@silexlabs/grapesjs-data-source
Version:
Grapesjs Data Source
79 lines • 4.11 kB
JavaScript
;
/*
* Silex website builder, free/libre no-code tool for makers.
* Copyright (c) 2023 lexoyo and Silex Labs foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.Properties = exports.BinaryOperator = exports.UnariOperator = exports.builtinTypes = exports.builtinTypeIds = exports.COMMAND_ADD_DATA_SOURCE = exports.COMMAND_PREVIEW_TOGGLE = exports.COMMAND_PREVIEW_REFRESH = exports.COMMAND_PREVIEW_DEACTIVATE = exports.COMMAND_PREVIEW_ACTIVATE = exports.COMMAND_REFRESH = exports.PREVIEW_DEACTIVATED = exports.PREVIEW_ACTIVATED = exports.PREVIEW_RENDER_ERROR = exports.PREVIEW_RENDER_END = exports.PREVIEW_RENDER_START = exports.DATA_SOURCE_DATA_LOAD_CANCEL = exports.DATA_SOURCE_DATA_LOAD_END = exports.DATA_SOURCE_DATA_LOAD_START = exports.COMPONENT_STATE_CHANGED = exports.DATA_SOURCE_CHANGED = exports.DATA_SOURCE_ERROR = exports.DATA_SOURCE_READY = exports.FIXED_TOKEN_ID = void 0;
exports.FIXED_TOKEN_ID = 'fixed';
exports.DATA_SOURCE_READY = 'data-source:ready';
exports.DATA_SOURCE_ERROR = 'data-source:error';
exports.DATA_SOURCE_CHANGED = 'data-source:changed';
exports.COMPONENT_STATE_CHANGED = 'component:state:changed';
exports.DATA_SOURCE_DATA_LOAD_START = 'data-source:data-load:start';
exports.DATA_SOURCE_DATA_LOAD_END = 'data-source:data-load:end';
exports.DATA_SOURCE_DATA_LOAD_CANCEL = 'data-source:data-load:cancel';
exports.PREVIEW_RENDER_START = 'data-source:start:preview';
exports.PREVIEW_RENDER_END = 'data-source:start:end';
exports.PREVIEW_RENDER_ERROR = 'data-source:start:error';
exports.PREVIEW_ACTIVATED = 'data-source:preview:activated';
exports.PREVIEW_DEACTIVATED = 'data-source:preview:deactivated';
exports.COMMAND_REFRESH = 'data-source:refresh';
exports.COMMAND_PREVIEW_ACTIVATE = 'data-source:preview:activate';
exports.COMMAND_PREVIEW_DEACTIVATE = 'data-source:preview:deactivate';
exports.COMMAND_PREVIEW_REFRESH = 'data-source:preview:refresh';
exports.COMMAND_PREVIEW_TOGGLE = 'data-source:preview:toggle';
exports.COMMAND_ADD_DATA_SOURCE = 'data-source:add';
// From https://graphql.org/graphql-js/basic-types/
exports.builtinTypeIds = ['String', 'Int', 'Float', 'Boolean', 'ID', 'Unknown'];
exports.builtinTypes = exports.builtinTypeIds.map(id => ({
id,
label: id,
fields: [],
}));
/**
* Operators for condition in visibility property
*/
var UnariOperator;
(function (UnariOperator) {
UnariOperator["TRUTHY"] = "truthy";
UnariOperator["FALSY"] = "falsy";
UnariOperator["EMPTY_ARR"] = "empty array";
UnariOperator["NOT_EMPTY_ARR"] = "not empty array";
})(UnariOperator || (exports.UnariOperator = UnariOperator = {}));
/**
* Operators for condition in visibility property
*/
var BinaryOperator;
(function (BinaryOperator) {
BinaryOperator["EQUAL"] = "==";
BinaryOperator["NOT_EQUAL"] = "!=";
BinaryOperator["GREATER_THAN"] = ">";
BinaryOperator["LESS_THAN"] = "<";
BinaryOperator["GREATER_THAN_OR_EQUAL"] = ">=";
BinaryOperator["LESS_THAN_OR_EQUAL"] = "<=";
})(BinaryOperator || (exports.BinaryOperator = BinaryOperator = {}));
/**
* Properties of elements
* What is not a property is an attribute or a state
*/
var Properties;
(function (Properties) {
Properties["innerHTML"] = "innerHTML";
Properties["condition"] = "condition";
Properties["condition2"] = "condition2";
Properties["__data"] = "__data";
})(Properties || (exports.Properties = Properties = {}));
//# sourceMappingURL=types.js.map