formeo 5.5.0 → 5.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/demo/assets/css/demo.min.css +2 -2
- package/dist/demo/assets/css/demo.min.css.gz +0 -0
- package/dist/demo/assets/css/formeo.min.css +2 -2
- package/dist/demo/assets/img/formeo-sprite.svg +1 -1
- package/dist/demo/assets/js/demo.min.js +76 -92
- package/dist/demo/assets/js/demo.min.js.gz +0 -0
- package/dist/demo/assets/js/form.min.js +1 -1
- package/dist/demo/assets/js/formeo.cjs.js +1008 -38
- package/dist/demo/assets/js/formeo.es.js +1008 -38
- package/dist/demo/assets/js/formeo.min.cjs.js +2 -2
- package/dist/demo/assets/js/formeo.min.es.js +2 -2
- package/dist/demo/assets/js/formeo.min.js +1008 -38
- package/dist/demo/assets/js/formeo.min.umd.js +2 -2
- package/dist/demo/assets/js/formeo.umd.js +1008 -38
- package/dist/demo/assets/js/html.min.js +1 -1
- package/dist/demo/assets/js/layout.min.js +1 -1
- package/dist/demo/assets/js/mode-json.min.js +1 -1
- package/dist/demo/assets/js/mode-json.min.js.gz +0 -0
- package/dist/demo/assets/js/theme-github_light_default.min.js +1 -1
- package/dist/demo/index.html +1 -1
- package/dist/formeo-sprite.svg +1 -1
- package/dist/formeo.cjs.js +1008 -38
- package/dist/formeo.css +138 -2
- package/dist/formeo.es.js +1008 -38
- package/dist/formeo.min.cjs.js +2 -2
- package/dist/formeo.min.css +2 -2
- package/dist/formeo.min.es.js +2 -2
- package/dist/formeo.min.js +1008 -38
- package/dist/formeo.min.umd.js +2 -2
- package/dist/formeo.umd.js +1008 -38
- package/package.json +1 -1
package/dist/formeo.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
/**
|
|
3
3
|
formeo - https://formeo.io
|
|
4
|
-
Version: 5.
|
|
4
|
+
Version: 5.6.0
|
|
5
5
|
Author: Draggable https://draggable.io
|
|
6
6
|
*/
|
|
7
7
|
|
|
@@ -6060,7 +6060,7 @@ if (globalThis !== void 0) globalThis.SmartTooltip = SmartTooltip;
|
|
|
6060
6060
|
var name$1, version$2, type, main, module$1, unpkg, exports$1, files, homepage, repository, author, contributors, bugs, description, keywords, ignore, config, scripts, devDependencies, dependencies, release, commitlint, package_default;
|
|
6061
6061
|
var init_package = __esmMin((() => {
|
|
6062
6062
|
name$1 = "formeo";
|
|
6063
|
-
version$2 = "5.
|
|
6063
|
+
version$2 = "5.6.0";
|
|
6064
6064
|
type = "module";
|
|
6065
6065
|
main = "dist/formeo.cjs.js";
|
|
6066
6066
|
module$1 = "dist/formeo.es.js";
|
|
@@ -8333,7 +8333,7 @@ function buildFlatDataStructure(data, componentId, componentType, result = {}) {
|
|
|
8333
8333
|
}
|
|
8334
8334
|
return result;
|
|
8335
8335
|
}
|
|
8336
|
-
var import_mergeWith, uuidv4, shortId, match, remove, componentType, unique, uuid, merge, clone$1, percent, numToPercent, formDataStorageKey, sessionStorage, isAddress, isInternalAddress, cleanFormData;
|
|
8336
|
+
var import_mergeWith, uuidv4, shortId, match, remove, componentType, unique, uuid, looksLikeArrayIndex, nonIndexId, merge, clone$1, percent, numToPercent, formDataStorageKey, sessionStorage, isAddress, isInternalAddress, cleanFormData;
|
|
8337
8337
|
var init_utils = __esmMin((() => {
|
|
8338
8338
|
import_mergeWith = /* @__PURE__ */ __toESM(require_mergeWith(), 1);
|
|
8339
8339
|
init_constants();
|
|
@@ -8365,6 +8365,12 @@ var init_utils = __esmMin((() => {
|
|
|
8365
8365
|
uuid = (elem) => {
|
|
8366
8366
|
return elem?.attrs?.id || elem?.id || shortId();
|
|
8367
8367
|
};
|
|
8368
|
+
looksLikeArrayIndex = (id) => /^(?:0|[1-9]\d*)$/.test(id) && Number(id) < 2 ** 32 - 1;
|
|
8369
|
+
nonIndexId = () => {
|
|
8370
|
+
let id = uuid();
|
|
8371
|
+
while (looksLikeArrayIndex(id)) id = uuid();
|
|
8372
|
+
return id;
|
|
8373
|
+
};
|
|
8368
8374
|
merge = (obj1, obj2) => {
|
|
8369
8375
|
const customizer = (objValue, srcValue) => {
|
|
8370
8376
|
if (Array.isArray(objValue)) {
|
|
@@ -8431,8 +8437,8 @@ var init_utils = __esmMin((() => {
|
|
|
8431
8437
|
//#region src/lib/icons/formeo-sprite.svg?raw
|
|
8432
8438
|
var formeo_sprite_default;
|
|
8433
8439
|
var init_formeo_sprite = __esmMin((() => {
|
|
8434
|
-
formeo_sprite_default = "<?xml version=\"1.0\" encoding=\"utf-8\"?><!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\"><svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"><symbol id=\"f-i-autocomplete\" viewBox=\"0 0 16 16\" xml:space=\"preserve\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M6,5h1v1H6V5z M4,4H3v1h1V4z M6,4H5v1h1V4z M2,5v1h1V5H2z M3,7h1V6H3V7z M5,7h1V6H5V7z M4,5v1h1V5H4z M2,14h1v-1H2V14z M4,14h1v-1H4V14z M6,14h1v-1H6V14z M9,13H8v1h1V13z M16,3.5v4C16,8.3,15.3,9,14.5,9H14v3v3c0,0.6-0.4,1-1,1H1c-0.6,0-1-0.4-1-1V3.5 C0,2.7,0.7,2,1.5,2h3H8V1.5V1H7H6V0.5V0h2.5H11v0.5V1h-1H9v0.5V2h3h2.5C15.3,2,16,2.7,16,3.5z M13,12H7H1v3h12V12z M3,11v-1H2v1H3z M5,11v-1H4v1H5z M15,3.5C15,3.2,14.8,3,14.5,3H9v2.5V8H8.5H8V7.5V7H7V6h1V5.5V5H7V4h1V3.5V3H1.5C1.2,3,1,3.2,1,3.5v4 C1,7.8,1.2,8,1.5,8H8v1H6v0.5V10h2.5H11V9.5V9H9V8h5.5C14.8,8,15,7.8,15,7.5V3.5z\"/></symbol><symbol viewBox=\"0 0 32 32\" id=\"f-i-bin\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M4 10v20c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2v-20h-22zM10 28h-2v-14h2v14zM14 28h-2v-14h2v14zM18 28h-2v-14h2v14zM22 28h-2v-14h2v14zM26.5 4h-6.5v-2.5c0-.825-.675-1.5-1.5-1.5h-7c-.825 0-1.5.675-1.5 1.5v2.5h-6.5c-.825 0-1.5.675-1.5 1.5v2.5h26v-2.5c0-.825-.675-1.5-1.5-1.5zM18 4h-6v-1.975h6v1.975z\"/></symbol><symbol id=\"f-i-button\" viewBox=\"0 0 16 16\" xml:space=\"preserve\" xmlns=\"http://www.w3.org/2000/svg\"><metadata id=\"acprefix__metadata8\"><rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"><cc:Work rdf:about=\"\" xmlns:cc=\"http://creativecommons.org/ns#\"><dc:format xmlns:dc=\"http://purl.org/dc/elements/1.1/\">image/svg+xml</dc:format><dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\"/><dc:title xmlns:dc=\"http://purl.org/dc/elements/1.1/\"/></cc:Work></rdf:RDF></metadata><path id=\"acprefix__rect4140\" d=\"M 0.4765625,4 A 0.47706934,0.47706934 0 0 0 0,4.4765625 L 0,11.523438 A 0.47706934,0.47706934 0 0 0 0.4765625,12 L 15.523438,12 A 0.47706934,0.47706934 0 0 0 16,11.523438 L 16,4.4765625 A 0.47706934,0.47706934 0 0 0 15.523438,4 L 0.4765625,4 Z m 0.4765625,0.953125 14.09375,0 0,6.09375 -14.09375,0 0,-6.09375 z\"/><g id=\"acprefix__layer1\"><g id=\"acprefix__text4203\"><g id=\"acprefix__g4212\" transform=\"translate(0.10112835,0.1001358)\"><path id=\"acprefix__path4208\" d=\"m 6.0690374,6.4093857 q -0.5371093,0 -0.8544922,0.4003906 -0.3149414,0.4003906 -0.3149414,1.0913086 0,0.6884766 0.3149414,1.0888672 0.3173829,0.4003906 0.8544922,0.4003906 0.5371094,0 0.8496094,-0.4003906 0.3149414,-0.4003906 0.3149414,-1.0888672 0,-0.690918 -0.3149414,-1.0913086 -0.3125,-0.4003906 -0.8496094,-0.4003906 z m 0,-0.4003906 q 0.7666016,0 1.225586,0.5151367 0.4589843,0.5126953 0.4589843,1.3769531 0,0.8618164 -0.4589843,1.3769531 -0.4589844,0.5126953 -1.225586,0.5126953 -0.7690429,0 -1.2304687,-0.5126953 -0.4589844,-0.5126953 -0.4589844,-1.3769531 0,-0.8642578 0.4589844,-1.3769531 0.4614258,-0.5151367 1.2304687,-0.5151367 z\"/><path id=\"acprefix__path4210\" d=\"m 8.5250921,6.074913 0.4931641,0 0,1.5405274 1.6357418,-1.5405274 0.634766,0 -1.809082,1.6992188 1.938477,1.9458008 -0.649415,0 -1.7504878,-1.7553711 0,1.7553711 -0.4931641,0 0,-3.6450196 z\"/></g></g></g></symbol><symbol viewBox=\"0 0 32 32\" id=\"f-i-calendar\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M12.048 16.961c-0.178 0.257-0.395 0.901-0.652 1.059-0.257 0.157-0.547 0.267-0.869 0.328-0.323 0.062-0.657 0.089-1.002 0.079v1.527h2.467v6.046h1.991v-9.996h-1.584c-0.056 0.381-0.173 0.7-0.351 0.957zM23 8h2c0.553 0 1-0.448 1-1v-6c0-0.552-0.447-1-1-1h-2c-0.553 0-1 0.448-1 1v6c0 0.552 0.447 1 1 1zM7 8h2c0.552 0 1-0.448 1-1v-6c0-0.552-0.448-1-1-1h-2c-0.552 0-1 0.448-1 1v6c0 0.552 0.448 1 1 1zM30 4h-2v5c0 0.552-0.447 1-1 1h-6c-0.553 0-1-0.448-1-1v-5h-8v5c0 0.552-0.448 1-1 1h-6c-0.552 0-1-0.448-1-1v-5h-2c-1.104 0-2 0.896-2 2v24c0 1.104 0.896 2 2 2h28c1.104 0 2-0.896 2-2v-24c0-1.104-0.896-2-2-2zM30 29c0 0.553-0.447 1-1 1h-26c-0.552 0-1-0.447-1-1v-16c0-0.552 0.448-1 1-1h26c0.553 0 1 0.448 1 1v16zM15.985 17.982h4.968c-0.936 1.152-1.689 2.325-2.265 3.705-0.575 1.381-0.638 2.818-0.749 4.312h2.131c0.009-0.666-0.195-1.385-0.051-2.156 0.146-0.771 0.352-1.532 0.617-2.285 0.267-0.752 0.598-1.461 0.996-2.127 0.396-0.667 0.853-1.229 1.367-1.686v-1.742h-7.015v1.979z\"/></symbol><symbol id=\"f-i-checkbox\" viewBox=\"0 0 16 16\" xml:space=\"preserve\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M13.5,5v8c0,0.8-0.7,1.5-1.5,1.5H3c-0.8,0-1.5-0.7-1.5-1.5V4c0-0.8,0.7-1.5,1.5-1.5h9c0.7,0,1.3,0.5,1.5,1.2l2.4-1.4L13.5,5 z M12.5,6.2L7.7,12L2.8,5.5l4.9,1.6l4.8-2.9V4c0-0.3-0.2-0.5-0.5-0.5H3C2.7,3.5,2.5,3.7,2.5,4v9c0,0.3,0.2,0.5,0.5,0.5h9 c0.3,0,0.5-0.2,0.5-0.5V6.2z\"/></symbol><symbol id=\"f-i-checkbox-group\" viewBox=\"0 0 16 16\" xml:space=\"preserve\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M0,1h16V0H0V1z M0,3h16V2H0V3z M6,5v1h9V5H6z M15,14v-1H6v1H15z M6,10h9V9H6V10z M4,12l-2.5,1.5L0,13l1.5,2L4,12z M4,8 L1.5,9.5L0,9l1.5,2L4,8z M4,4L1.5,5.5L0,5l1.5,2L4,4z\"/></symbol><symbol xml:space=\"preserve\" viewBox=\"0 0 16 16\" id=\"f-i-columns\" xmlns=\"http://www.w3.org/2000/svg\"><metadata id=\"agprefix__metadata4318\"><rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"><cc:Work rdf:about=\"\" xmlns:cc=\"http://creativecommons.org/ns#\"><dc:format xmlns:dc=\"http://purl.org/dc/elements/1.1/\">image/svg+xml</dc:format><dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\"/><dc:title xmlns:dc=\"http://purl.org/dc/elements/1.1/\"/></cc:Work></rdf:RDF></metadata><path id=\"agprefix__rect4860-3-5\" d=\"M 16,0.5 A 0.50004997,0.50004997 0 0 0 15.5,0 l -5,0 -5,0 -5,0 A 0.50004997,0.50004997 0 0 0 0,0.5 l 0,15 A 0.50004997,0.50004997 0 0 0 0.5,16 l 5,0 5,0 5,0 A 0.50004997,0.50004997 0 0 0 16,15.5 l 0,-15 z M 15,1 15,15 11,15 11,1 15,1 Z M 10,1 10,15 6,15 6,1 10,1 Z M 5,1 5,15 1,15 1,1 5,1 Z\"/></symbol><symbol viewBox=\"0 0 32 32\" id=\"f-i-copy\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M20 8v-8h-14l-6 6v18h12v8h20v-24h-12zM6 2.828v3.172h-3.172l3.172-3.172zM2 22v-14h6v-6h10v6l-6 6v8h-10zM18 10.828v3.172h-3.172l3.172-3.172zM30 30h-16v-14h6v-6h10v20z\"/></symbol><symbol id=\"f-i-divider\" viewBox=\"0 0 15 15\" xmlns=\"http://www.w3.org/2000/svg\"><metadata id=\"aiprefix__metadata10\"><rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"><cc:Work rdf:about=\"\" xmlns:cc=\"http://creativecommons.org/ns#\"><dc:format xmlns:dc=\"http://purl.org/dc/elements/1.1/\">image/svg+xml</dc:format><dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\"/><dc:title xmlns:dc=\"http://purl.org/dc/elements/1.1/\"/></cc:Work></rdf:RDF></metadata><rect y=\"7\" x=\"0\" height=\"1\" width=\"15\" id=\"aiprefix__rect4182\"/></symbol><symbol viewBox=\"0 0 28 32\" id=\"f-i-edit\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M22 2l-4 4 6 6 4-4-6-6zM0 24l0.021 6.018 5.979-0.018 16-16-6-6-16 16zM6 28h-4v-4h2v2h2v2z\"/></symbol><symbol viewBox=\"0 0 24 24\" id=\"f-i-email\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M12,2 C17.4292399,2 21.8479317,6.32667079 21.9961582,11.7200952 L22,12 L22,13 C22,15.1729208 20.477434,17 18.5,17 C17.3269391,17 16.3139529,16.3570244 15.6839382,15.3803024 C14.770593,16.3757823 13.4581934,17 12,17 C9.23857625,17 7,14.7614237 7,12 C7,9.23857625 9.23857625,7 12,7 C14.6887547,7 16.8818181,9.12230671 16.9953805,11.7831104 L17,12 L17,13 C17,14.1407877 17.7160103,15 18.5,15 C19.2447902,15 19.928229,14.2245609 19.9947109,13.1689341 L20,13 L20,12 C20,7.581722 16.418278,4 12,4 C7.581722,4 4,7.581722 4,12 C4,16.418278 7.581722,20 12,20 C13.1630948,20 14.2892822,19.7522618 15.3225159,19.2798331 C15.8247876,19.0501777 16.4181317,19.271177 16.647787,19.7734487 C16.8774423,20.2757205 16.656443,20.8690646 16.1541713,21.0987199 C14.861218,21.689901 13.4515463,22 12,22 C6.4771525,22 2,17.5228475 2,12 C2,6.4771525 6.4771525,2 12,2 Z M12,9 C10.3431458,9 9,10.3431458 9,12 C9,13.6568542 10.3431458,15 12,15 C13.6568542,15 15,13.6568542 15,12 C15,10.3431458 13.6568542,9 12,9 Z\"/></symbol><symbol viewBox=\"0 0 32 32\" id=\"f-i-floppy-disk\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M28 0h-28v32h32v-28l-4-4zM16 4h4v8h-4v-8zM28 28h-24v-24h2v10h18v-10h2.343l1.657 1.657v22.343z\"/></symbol><symbol xml:space=\"preserve\" viewBox=\"0 0 16 16\" id=\"f-i-handle\" xmlns=\"http://www.w3.org/2000/svg\"><metadata id=\"aqprefix__metadata8\"><rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"><cc:Work rdf:about=\"\" xmlns:cc=\"http://creativecommons.org/ns#\"><dc:format xmlns:dc=\"http://purl.org/dc/elements/1.1/\">image/svg+xml</dc:format><dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\"/><dc:title xmlns:dc=\"http://purl.org/dc/elements/1.1/\"/></cc:Work></rdf:RDF></metadata><g transform=\"translate(0,-2)\" id=\"aqprefix__g4220\"><rect id=\"aqprefix__rect4191\" width=\"2\" height=\"2\" x=\"2\" y=\"7\"/><rect id=\"aqprefix__rect4191-2\" width=\"2\" height=\"2\" x=\"7\" y=\"7\"/><rect id=\"aqprefix__rect4191-4\" width=\"2\" height=\"2\" x=\"12\" y=\"7\"/></g><g transform=\"translate(0,2)\" id=\"aqprefix__g4220-6\"><rect id=\"aqprefix__rect4191-40\" width=\"2\" height=\"2\" x=\"2\" y=\"7\"/><rect id=\"aqprefix__rect4191-2-3\" width=\"2\" height=\"2\" x=\"7\" y=\"7\"/><rect id=\"aqprefix__rect4191-4-9\" width=\"2\" height=\"2\" x=\"12\" y=\"7\"/></g></symbol><symbol xml:space=\"preserve\" viewBox=\"0 0 16 16\" id=\"f-i-handle-column\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M2 7h2v2H2zM7 7h2v2H7zM12 7h2v2h-2zM2 12h2v2H2zM7 12h2v2H7zM12 12h2v2h-2z\" transform=\"rotate(90 9.25 9.25)\"/></symbol><symbol xml:space=\"preserve\" viewBox=\"0 0 16 16\" id=\"f-i-handle-field\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M9.5-6.5h2v2h-2zm-5 0h2v2h-2zm5-5h2v2h-2zm-5 0h2v2h-2z\" transform=\"rotate(90)\"/></symbol><symbol xml:space=\"preserve\" viewBox=\"0 0 16 16\" id=\"f-i-handle-row\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M12 9.5h2v2h-2zm-5 0h2v2H7Zm-5 0h2v2H2Zm10-5h2v2h-2zm-5 0h2v2H7Zm-5 0h2v2H2Z\"/></symbol><symbol xml:space=\"preserve\" viewBox=\"0 0 16 16\" id=\"f-i-handle-stage\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M2 4.5h2v2H2zM7 4.5h2v2H7zM12 4.5h2v2h-2zM2 9.5h2v2H2zM7 9.5h2v2H7zM12 9.5h2v2h-2zM2-.5h2v2H2zM7-.5h2v2H7zM12-.5h2v2h-2z\" transform=\"translate(0 2.5)\"/></symbol><symbol viewBox=\"0 0 448 512\" id=\"f-i-hash\" xmlns=\"http://www.w3.org/2000/svg\"><g id=\"arprefix__icomoon-ignore\"/><path d=\"M448 192v-64h-80.064l16-128h-64l-16 128h-127.968l16-128h-64l-16 128h-111.968v64h103.968l-15.968 128h-88v64h80l-16 128h64l16-128h127.968l-16 128h64.032l16-128h112v-64h-104l15.936-128h88.064zM279.968 320h-127.968l15.968-128h127.968l-15.968 128z\"/></symbol><symbol viewBox=\"0 0 28 28\" id=\"f-i-header\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M26.281 26q-0.688 0-2.070-0.055t-2.086-0.055q-0.688 0-2.063 0.055t-2.063 0.055q-0.375 0-0.578-0.32t-0.203-0.711q0-0.484 0.266-0.719t0.609-0.266 0.797-0.109 0.703-0.234q0.516-0.328 0.516-2.188l-0.016-6.109q0-0.328-0.016-0.484-0.203-0.063-0.781-0.063h-10.547q-0.594 0-0.797 0.063-0.016 0.156-0.016 0.484l-0.016 5.797q0 2.219 0.578 2.562 0.25 0.156 0.75 0.203t0.891 0.055 0.703 0.234 0.313 0.711q0 0.406-0.195 0.75t-0.57 0.344q-0.734 0-2.18-0.055t-2.164-0.055q-0.672 0-2 0.055t-1.984 0.055q-0.359 0-0.555-0.328t-0.195-0.703q0-0.469 0.242-0.703t0.562-0.273 0.742-0.117 0.656-0.234q0.516-0.359 0.516-2.234l-0.016-0.891v-12.703q0-0.047 0.008-0.406t0-0.57-0.023-0.602-0.055-0.656-0.102-0.57-0.172-0.492-0.25-0.281q-0.234-0.156-0.703-0.187t-0.828-0.031-0.641-0.219-0.281-0.703q0-0.406 0.187-0.75t0.562-0.344q0.719 0 2.164 0.055t2.164 0.055q0.656 0 1.977-0.055t1.977-0.055q0.391 0 0.586 0.344t0.195 0.75q0 0.469-0.266 0.68t-0.602 0.227-0.773 0.063-0.672 0.203q-0.547 0.328-0.547 2.5l0.016 5q0 0.328 0.016 0.5 0.203 0.047 0.609 0.047h10.922q0.391 0 0.594-0.047 0.016-0.172 0.016-0.5l0.016-5q0-2.172-0.547-2.5-0.281-0.172-0.914-0.195t-1.031-0.203-0.398-0.773q0-0.406 0.195-0.75t0.586-0.344q0.688 0 2.063 0.055t2.063 0.055q0.672 0 2.016-0.055t2.016-0.055q0.391 0 0.586 0.344t0.195 0.75q0 0.469-0.273 0.688t-0.625 0.227-0.805 0.047-0.688 0.195q-0.547 0.359-0.547 2.516l0.016 14.734q0 1.859 0.531 2.188 0.25 0.156 0.719 0.211t0.836 0.070 0.648 0.242 0.281 0.695q0 0.406-0.187 0.75t-0.562 0.344z\"/></symbol><symbol xml:space=\"preserve\" viewBox=\"0 0 16 16\" id=\"f-i-hidden\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M0 12h1v-1H0Zm15-7h1V4h-1zm-1 7h1v-1h-1zm-2 0h1v-1h-1zm-2 0h1v-1h-1Zm-2 0h1v-1H8Zm-2 0h1v-1H6Zm-2 0h1v-1H4Zm-2 0h1v-1H2Zm13-1h1v-1h-1ZM0 10h1V9H0Zm15-1h1V8h-1ZM0 8h1V7H0Zm15-1h1V6h-1ZM0 6h1V5H0Zm13-1h1V4h-1zm-2 0h1V4h-1ZM9 5h1V4H9ZM7 5h1V4H7ZM5 5h1V4H5ZM3 5h1V4H3ZM1 5h1V4H1Z\"/></symbol><symbol xml:space=\"preserve\" viewBox=\"0 0 32 32\" id=\"f-i-info-circle\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m17.962 24.725 1.806.096v2.531h-7.534v-2.406l1.045-.094c.568-.063.916-.254.916-1.014v-8.801c0-.699-.188-.92-.791-.92l-1.106-.062v-2.626h5.666zM15.747 4.648c1.394 0 2.405 1.047 2.405 2.374 0 1.331-1.014 2.313-2.438 2.313-1.454 0-2.404-.982-2.404-2.313 0-1.327.95-2.374 2.437-2.374M16 32C7.178 32 0 24.822 0 16S7.178 0 16 0c8.82 0 16 7.178 16 16s-7.18 16-16 16m0-29C8.832 3 3 8.832 3 16s5.832 13 13 13 13-5.832 13-13S23.168 3 16 3\"/></symbol><symbol viewBox=\"0 0 384 512\" id=\"f-i-menu\" xmlns=\"http://www.w3.org/2000/svg\"><g id=\"avprefix__icomoon-ignore\"/><path d=\"M0 96v64h384v-64h-384zM0 288h384v-64h-384v64zM0 416h384v-64h-384v64z\"/></symbol><symbol viewBox=\"0 0 24 24\" fill=\"none\" id=\"f-i-minus\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M6 12L18 12\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></symbol><symbol viewBox=\"0 0 512 512\" id=\"f-i-move\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M287.744 94.736v129.008h128v-64l96.256 96.256-96.256 96.24v-65.488h-128v129.008h64.496l-96.24 96.24-96.256-96.24h64v-129.008h-128v64.992l-95.744-95.744 95.744-95.744v63.488h128v-129.008h-62.496l94.752-94.736 94.752 94.736h-63.008z\"/></symbol><symbol viewBox=\"0 0 512 512\" id=\"f-i-move-vertical\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m 287.744,94.736 0,321.024 64.496,0 L 256,512 l -96.256,-96.24 64,0 0,-321.024 -62.496,0 L 256,0 350.752,94.736 Z\"/></symbol><symbol viewBox=\"0 0 20 28\" id=\"f-i-paragraph\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M19.969 2.953v1.141q0 0.453-0.289 0.953t-0.664 0.5q-0.781 0-0.844 0.016-0.406 0.094-0.5 0.484-0.047 0.172-0.047 1v18q0 0.391-0.281 0.672t-0.672 0.281h-1.687q-0.391 0-0.672-0.281t-0.281-0.672v-19.031h-2.234v19.031q0 0.391-0.273 0.672t-0.68 0.281h-1.687q-0.406 0-0.68-0.281t-0.273-0.672v-7.75q-2.297-0.187-3.828-0.922-1.969-0.906-3-2.797-1-1.828-1-4.047 0-2.594 1.375-4.469 1.375-1.844 3.266-2.484 1.734-0.578 6.516-0.578h7.484q0.391 0 0.672 0.281t0.281 0.672z\"/></symbol><symbol id=\"f-i-phone-receiver\" viewBox=\"0 0 578.106 578.106\" xml:space=\"preserve\" xmlns=\"http://www.w3.org/2000/svg\"><g><g><path d=\"M577.83,456.128c1.225,9.385-1.635,17.545-8.568,24.48l-81.396,80.781 c-3.672,4.08-8.465,7.551-14.381,10.404c-5.916,2.857-11.729,4.693-17.439,5.508c-0.408,0-1.635,0.105-3.676,0.309 c-2.037,0.203-4.689,0.307-7.953,0.307c-7.754,0-20.301-1.326-37.641-3.979s-38.555-9.182-63.645-19.584 c-25.096-10.404-53.553-26.012-85.376-46.818c-31.823-20.805-65.688-49.367-101.592-85.68 c-28.56-28.152-52.224-55.08-70.992-80.783c-18.768-25.705-33.864-49.471-45.288-71.299 c-11.425-21.828-19.993-41.616-25.705-59.364S4.59,177.362,2.55,164.51s-2.856-22.95-2.448-30.294 c0.408-7.344,0.612-11.424,0.612-12.24c0.816-5.712,2.652-11.526,5.508-17.442s6.324-10.71,10.404-14.382L98.022,8.756 c5.712-5.712,12.24-8.568,19.584-8.568c5.304,0,9.996,1.53,14.076,4.59s7.548,6.834,10.404,11.322l65.484,124.236 c3.672,6.528,4.692,13.668,3.06,21.42c-1.632,7.752-5.1,14.28-10.404,19.584l-29.988,29.988c-0.816,0.816-1.53,2.142-2.142,3.978 s-0.918,3.366-0.918,4.59c1.632,8.568,5.304,18.36,11.016,29.376c4.896,9.792,12.444,21.726,22.644,35.802 s24.684,30.293,43.452,48.653c18.36,18.77,34.68,33.354,48.96,43.76c14.277,10.4,26.215,18.053,35.803,22.949 c9.588,4.896,16.932,7.854,22.031,8.871l7.648,1.531c0.816,0,2.145-0.307,3.979-0.918c1.836-0.613,3.162-1.326,3.979-2.143 l34.883-35.496c7.348-6.527,15.912-9.791,25.705-9.791c6.938,0,12.443,1.223,16.523,3.672h0.611l118.115,69.768 C571.098,441.238,576.197,447.968,577.83,456.128z\"/></g></g><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/></symbol><symbol viewBox=\"0 0 24 24\" fill=\"none\" id=\"f-i-plus\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M6 12H18M12 6V18\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></symbol><symbol id=\"f-i-radio-group\" viewBox=\"0 0 16 16\" xml:space=\"preserve\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M0,1h16V0H0V1z M0,3h16V2H0V3z M5,6h10V5H5V6z M15,9H5v1h10V9z M15,14v-1H5v1H15z M1.5,7C0.7,7,0,6.3,0,5.5S0.7,4,1.5,4 S3,4.7,3,5.5S2.3,7,1.5,7z M1.5,5C1.2,5,1,5.2,1,5.5S1.2,6,1.5,6S2,5.8,2,5.5S1.8,5,1.5,5z M1.5,11.1C0.7,11.1,0,10.4,0,9.6 s0.7-1.5,1.5-1.5S3,8.7,3,9.6S2.3,11.1,1.5,11.1z M1.5,9.1C1.2,9.1,1,9.3,1,9.6s0.2,0.5,0.5,0.5S2,9.8,2,9.6S1.8,9.1,1.5,9.1z M1.5,15C0.7,15,0,14.3,0,13.5S0.7,12,1.5,12S3,12.7,3,13.5S2.3,15,1.5,15z M1.5,13C1.2,13,1,13.2,1,13.5S1.2,14,1.5,14 S2,13.8,2,13.5S1.8,13,1.5,13z\"/></symbol><symbol viewBox=\"0 0 512 512\" id=\"f-i-remove\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M193.694-139.2h87.322v510.916h-87.322zM-18.103 159.92V72.597h510.915v87.322z\" transform=\"rotate(45 77.994 208.636)\"/></symbol><symbol id=\"f-i-rich-text\" viewBox=\"0 0 16 16\" xml:space=\"preserve\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M15,1H1C0.4,1,0,1.4,0,2v12c0,0.6,0.4,1,1,1h14c0.6,0,1-0.4,1-1V2C16,1.4,15.6,1,15,1z M1,3.1h0.8v0.3H1V3.1z M1,3.6h0.8 v0.3H1V3.6z M15,14H1V5.1h14V14z M15,4.9H1V4.6h14V4.9z M15,4.4H1V4.1h0.8v0.2h1.5V4.1h1.3v0.2H6V4.1h1.3v0.2h1.5V4.1H10v0.2h1.5 V4.1h1.3v0.2h1.5V4.1H15V4.4z M4.5,3.6v0.3H3.3V3.6H4.5z M3.3,3.4V3.1h1.3v0.3H3.3z M7.3,3.6v0.3H6V3.6H7.3z M6,3.4V3.1h1.3v0.3H6z M10,3.6v0.3H8.8V3.6H10z M8.8,3.4V3.1H10v0.3H8.8z M12.8,3.6v0.3h-1.3V3.6H12.8z M11.5,3.4V3.1h1.3v0.3H11.5z M15,3.9h-0.8V3.6H15 V3.9z M15,3.4h-0.8V3.1H15V3.4z M15,2.9h-0.8V2.8h-1.5v0.2h-1.3V2.8H10v0.2H8.8V2.8H7.3v0.2H6V2.8H4.5v0.2H3.3V2.8H1.8v0.2H1V2.6h14 V2.9z M15,2.4H1V2.1h14V2.4z M3,12v-1h10v1H3z M13,10H3V9h10V10z M11,8H3V7h8V8z\"/></symbol><symbol xml:space=\"preserve\" viewBox=\"0 0 16 16\" id=\"f-i-rows\" xmlns=\"http://www.w3.org/2000/svg\"><metadata id=\"bfprefix__metadata4318\"><rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"><cc:Work rdf:about=\"\" xmlns:cc=\"http://creativecommons.org/ns#\"><dc:format xmlns:dc=\"http://purl.org/dc/elements/1.1/\">image/svg+xml</dc:format><dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\"/><dc:title xmlns:dc=\"http://purl.org/dc/elements/1.1/\"/></cc:Work></rdf:RDF></metadata><g transform=\"matrix(0,1,-1,0,3.0984025,11.835155)\" id=\"bfprefix__g7209\"><path id=\"bfprefix__rect4860-3-5\" d=\"m 4.1640625,-12.402344 a 0.50004997,0.50004997 0 0 0 -0.5,-0.5 l -5,0 -5,0 -5.0000005,0 a 0.50004997,0.50004997 0 0 0 -0.5,0.5 l 0,15.0000002 a 0.50004997,0.50004997 0 0 0 0.5,0.5 l 4.9648442,0 a 0.50004997,0.50004997 0 0 0 0.035156,0 l 4.9648437,0 a 0.50004997,0.50004997 0 0 0 0.035156,0 l 5,0 a 0.50004997,0.50004997 0 0 0 0.5,-0.5 l 0,-15.0000002 z m -1,0.5 0,14.0000002 -4,0 0,-14.0000002 4,0 z m -5,0 0,14.0000002 -4,0 0,-14.0000002 4,0 z m -5,0 0,14.0000002 -4.0000005,0 0,-14.0000002 4.0000005,0 z\"/></g></symbol><symbol id=\"f-i-select\" viewBox=\"0 0 16 16\" xml:space=\"preserve\" xmlns=\"http://www.w3.org/2000/svg\"><path id=\"bgprefix__XMLID_1_\" d=\"M0,0v14h0c0,0.6,0.4,1,1,1h10c0.6,0,1-0.4,1-1h0V5h4V0H0z M1,1h10v3H1V1z M1,7h10v3H1V7z M1,14v-3h10v3H1z M15,4h-3V1h3V4z M2,2h1v1H2V2z M2,12h1v1H2V12z M4,12h1v1H4V12z M6,12h1v1H6V12z M9,12v1H8v-1H9z M2,8h1v1H2V8z M4,8h1v1H4V8z M6,8 h1v1H6V8z M13.5,3.1l-1-1.1h1.9L13.5,3.1z M2,6V5h1v1H2L2,6z M4,6V5h1v1H4L4,6z\"/></symbol><symbol viewBox=\"0 0 448 512\" id=\"f-i-settings\" xmlns=\"http://www.w3.org/2000/svg\"><g id=\"bhprefix__icomoon-ignore\"/><path d=\"M223.969 175c-44.703 0-80.969 36.266-80.969 81 0 44.688 36.266 81.031 80.969 81.031 44.719 0 80.719-36.344 80.719-81.031-0-44.734-36-81-80.719-81zM386.313 302.531l-14.594 35.156 29.469 57.875-36.094 36.094-59.218-27.969-35.156 14.438-17.844 54.625-2.281 7.25h-51.016l-22.078-61.656-35.156-14.5-57.952 29.344-36.078-36.063 27.938-59.25-14.484-35.125-61.767-20.156v-50.984l61.703-22.109 14.485-35.094-25.953-51.234-3.422-6.719 36.031-36.031 59.297 27.922 35.109-14.516 17.828-54.594 2.297-7.234h51l22.094 61.734 35.063 14.516 58.031-29.406 36.063 36.031-27.938 59.203 14.438 35.172 61.875 20.125v50.969l-61.688 22.187z\"/></symbol><symbol id=\"f-i-text-input\" viewBox=\"0 0 16 16\" xml:space=\"preserve\" xmlns=\"http://www.w3.org/2000/svg\"><path id=\"biprefix__XMLID_10_\" d=\"M15,4H4.5V3H6V2H4.5h-1H2v1h1.5v1H1C0.4,4,0,4.5,0,5v6c0,0.6,0.4,1,1,1h2.5v1H2v1h4v-1H4.5v-1H15 c0.6,0,1-0.4,1-1V5C16,4.5,15.6,4,15,4z M1,11V5h2.5v6H1z M15,11H4.5V5H15V11z\"/></symbol><symbol id=\"f-i-textarea\" viewBox=\"0 0 16 16\" xml:space=\"preserve\" xmlns=\"http://www.w3.org/2000/svg\"><path id=\"bjprefix__XMLID_1_\" d=\"M3,11v-1h8v1H3L3,11z M3,7h10V6H3V7L3,7z M3,8v1h10V8H3L3,8z M13,4H3v1h10V4L13,4z M16,14V2c0-0.6-0.4-1-1-1 H1C0.4,1,0,1.4,0,2v12c0,0.6,0.4,1,1,1h14C15.6,15,16,14.6,16,14z M15,2v12H1V2H15z\"/></symbol><symbol viewBox=\"0 0 24 32\" id=\"f-i-triangle-down\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M0 12l11.992 11.992 11.992-11.992h-23.984z\"/></symbol><symbol viewBox=\"0 0 12 32\" id=\"f-i-triangle-left\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M0 15.996l11.992 11.992v-23.984l-11.992 11.992z\"/></symbol><symbol viewBox=\"0 0 12 32\" id=\"f-i-triangle-right\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M0.002 4.008l11.992 11.992-11.992 11.992v-23.984z\"/></symbol><symbol viewBox=\"0 0 24 32\" id=\"f-i-triangle-up\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M11.992 8l-11.992 11.992h23.984l-11.992-11.992z\"/></symbol><symbol viewBox=\"0 0 512 512\" id=\"f-i-upload\" xmlns=\"http://www.w3.org/2000/svg\"><g id=\"boprefix__icomoon-ignore\"/><path d=\"M240 352h-240v128h480v-128h-240zM448 416h-64v-32h64v32zM112 160l128-128 128 128h-80v160h-96v-160z\"/></symbol></svg>";
|
|
8435
|
-
})), name, version$1, PACKAGE_NAME, formeoSpriteId, FALLBACK_SVG_SPRITE_URL, CSS_URL, FALLBACK_CSS_URL, PANEL_CLASSNAME, CONTROL_GROUP_CLASSNAME, STAGE_CLASSNAME, ROW_CLASSNAME, COLUMN_CLASSNAME, FIELD_CLASSNAME, HIDDEN_BY_CONDITION_SELECTOR, CUSTOM_COLUMN_OPTION_CLASSNAME, COLUMN_PRESET_CLASSNAME, COLUMN_RESIZE_CLASSNAME, CHILD_CLASSNAME_MAP, INTERNAL_COMPONENT_TYPES, INTERNAL_COMPONENT_INDEX_TYPES, INTERNAL_COMPONENT_INDEX_REGEX, COMPONENT_TYPES, COMPONENT_INDEX_TYPES, COMPONENT_INDEX_TYPE_MAP, COMPONENT_TYPE_MAP, COMPONENT_TYPE_CONFIGS, COMPONENT_TYPE_CLASSNAMES, COMPONENT_TYPE_CLASSNAMES_LOOKUP, COMPONENT_TYPE_CLASSNAMES_ARRAY, COMPONENT_TYPE_CLASSNAMES_REGEXP, childTypeMapVals, childTypeIndexMapVals, parentTypeMap, CHILD_TYPE_MAP, CHILD_TYPE_INDEX_MAP, PARENT_TYPE_MAP, columnTemplates, COLUMN_TEMPLATES, SESSION_FORMDATA_KEY, SESSION_LOCALE_KEY, ANIMATION_SPEED_FAST, ANIMATION_SPEED_SLOW, EVENT_FORMEO_SAVED, EVENT_FORMEO_UPDATED, EVENT_FORMEO_CHANGED, EVENT_FORMEO_UPDATED_STAGE, EVENT_FORMEO_UPDATED_ROW, EVENT_FORMEO_UPDATED_COLUMN, EVENT_FORMEO_UPDATED_FIELD, EVENT_FORMEO_CLEARED, EVENT_FORMEO_ON_RENDER, EVENT_FORMEO_CONDITION_UPDATED, EVENT_FORMEO_ADDED_ROW, EVENT_FORMEO_ADDED_COLUMN, EVENT_FORMEO_ADDED_FIELD, EVENT_FORMEO_REMOVED_ROW, EVENT_FORMEO_REMOVED_COLUMN, EVENT_FORMEO_REMOVED_FIELD, COMPARISON_OPERATORS, LOGICAL_OPERATORS, ASSIGNMENT_OPERATORS, CONDITION_INPUT_ORDER, CHECKABLE_OPTIONS, VISIBLE_OPTIONS, PROPERTY_OPTIONS, OPERATORS, conditionTypeThen, CONDITION_TEMPLATE, UUID_REGEXP, bsColRegExp, iconPrefix, DEFAULT_FORMDATA, CHECKED_TYPES, REVERSED_CHECKED_TYPES, FILTERED_PANEL_DATA_KEYS;
|
|
8440
|
+
formeo_sprite_default = "<?xml version=\"1.0\" encoding=\"utf-8\"?><!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\"><svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"><symbol id=\"f-i-autocomplete\" viewBox=\"0 0 16 16\" xml:space=\"preserve\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M6,5h1v1H6V5z M4,4H3v1h1V4z M6,4H5v1h1V4z M2,5v1h1V5H2z M3,7h1V6H3V7z M5,7h1V6H5V7z M4,5v1h1V5H4z M2,14h1v-1H2V14z M4,14h1v-1H4V14z M6,14h1v-1H6V14z M9,13H8v1h1V13z M16,3.5v4C16,8.3,15.3,9,14.5,9H14v3v3c0,0.6-0.4,1-1,1H1c-0.6,0-1-0.4-1-1V3.5 C0,2.7,0.7,2,1.5,2h3H8V1.5V1H7H6V0.5V0h2.5H11v0.5V1h-1H9v0.5V2h3h2.5C15.3,2,16,2.7,16,3.5z M13,12H7H1v3h12V12z M3,11v-1H2v1H3z M5,11v-1H4v1H5z M15,3.5C15,3.2,14.8,3,14.5,3H9v2.5V8H8.5H8V7.5V7H7V6h1V5.5V5H7V4h1V3.5V3H1.5C1.2,3,1,3.2,1,3.5v4 C1,7.8,1.2,8,1.5,8H8v1H6v0.5V10h2.5H11V9.5V9H9V8h5.5C14.8,8,15,7.8,15,7.5V3.5z\"/></symbol><symbol viewBox=\"0 0 32 32\" id=\"f-i-bin\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M4 10v20c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2v-20h-22zM10 28h-2v-14h2v14zM14 28h-2v-14h2v14zM18 28h-2v-14h2v14zM22 28h-2v-14h2v14zM26.5 4h-6.5v-2.5c0-.825-.675-1.5-1.5-1.5h-7c-.825 0-1.5.675-1.5 1.5v2.5h-6.5c-.825 0-1.5.675-1.5 1.5v2.5h26v-2.5c0-.825-.675-1.5-1.5-1.5zM18 4h-6v-1.975h6v1.975z\"/></symbol><symbol id=\"f-i-button\" viewBox=\"0 0 16 16\" xml:space=\"preserve\" xmlns=\"http://www.w3.org/2000/svg\"><metadata id=\"acprefix__metadata8\"><rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"><cc:Work rdf:about=\"\" xmlns:cc=\"http://creativecommons.org/ns#\"><dc:format xmlns:dc=\"http://purl.org/dc/elements/1.1/\">image/svg+xml</dc:format><dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\"/><dc:title xmlns:dc=\"http://purl.org/dc/elements/1.1/\"/></cc:Work></rdf:RDF></metadata><path id=\"acprefix__rect4140\" d=\"M 0.4765625,4 A 0.47706934,0.47706934 0 0 0 0,4.4765625 L 0,11.523438 A 0.47706934,0.47706934 0 0 0 0.4765625,12 L 15.523438,12 A 0.47706934,0.47706934 0 0 0 16,11.523438 L 16,4.4765625 A 0.47706934,0.47706934 0 0 0 15.523438,4 L 0.4765625,4 Z m 0.4765625,0.953125 14.09375,0 0,6.09375 -14.09375,0 0,-6.09375 z\"/><g id=\"acprefix__layer1\"><g id=\"acprefix__text4203\"><g id=\"acprefix__g4212\" transform=\"translate(0.10112835,0.1001358)\"><path id=\"acprefix__path4208\" d=\"m 6.0690374,6.4093857 q -0.5371093,0 -0.8544922,0.4003906 -0.3149414,0.4003906 -0.3149414,1.0913086 0,0.6884766 0.3149414,1.0888672 0.3173829,0.4003906 0.8544922,0.4003906 0.5371094,0 0.8496094,-0.4003906 0.3149414,-0.4003906 0.3149414,-1.0888672 0,-0.690918 -0.3149414,-1.0913086 -0.3125,-0.4003906 -0.8496094,-0.4003906 z m 0,-0.4003906 q 0.7666016,0 1.225586,0.5151367 0.4589843,0.5126953 0.4589843,1.3769531 0,0.8618164 -0.4589843,1.3769531 -0.4589844,0.5126953 -1.225586,0.5126953 -0.7690429,0 -1.2304687,-0.5126953 -0.4589844,-0.5126953 -0.4589844,-1.3769531 0,-0.8642578 0.4589844,-1.3769531 0.4614258,-0.5151367 1.2304687,-0.5151367 z\"/><path id=\"acprefix__path4210\" d=\"m 8.5250921,6.074913 0.4931641,0 0,1.5405274 1.6357418,-1.5405274 0.634766,0 -1.809082,1.6992188 1.938477,1.9458008 -0.649415,0 -1.7504878,-1.7553711 0,1.7553711 -0.4931641,0 0,-3.6450196 z\"/></g></g></g></symbol><symbol viewBox=\"0 0 32 32\" id=\"f-i-calendar\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M12.048 16.961c-0.178 0.257-0.395 0.901-0.652 1.059-0.257 0.157-0.547 0.267-0.869 0.328-0.323 0.062-0.657 0.089-1.002 0.079v1.527h2.467v6.046h1.991v-9.996h-1.584c-0.056 0.381-0.173 0.7-0.351 0.957zM23 8h2c0.553 0 1-0.448 1-1v-6c0-0.552-0.447-1-1-1h-2c-0.553 0-1 0.448-1 1v6c0 0.552 0.447 1 1 1zM7 8h2c0.552 0 1-0.448 1-1v-6c0-0.552-0.448-1-1-1h-2c-0.552 0-1 0.448-1 1v6c0 0.552 0.448 1 1 1zM30 4h-2v5c0 0.552-0.447 1-1 1h-6c-0.553 0-1-0.448-1-1v-5h-8v5c0 0.552-0.448 1-1 1h-6c-0.552 0-1-0.448-1-1v-5h-2c-1.104 0-2 0.896-2 2v24c0 1.104 0.896 2 2 2h28c1.104 0 2-0.896 2-2v-24c0-1.104-0.896-2-2-2zM30 29c0 0.553-0.447 1-1 1h-26c-0.552 0-1-0.447-1-1v-16c0-0.552 0.448-1 1-1h26c0.553 0 1 0.448 1 1v16zM15.985 17.982h4.968c-0.936 1.152-1.689 2.325-2.265 3.705-0.575 1.381-0.638 2.818-0.749 4.312h2.131c0.009-0.666-0.195-1.385-0.051-2.156 0.146-0.771 0.352-1.532 0.617-2.285 0.267-0.752 0.598-1.461 0.996-2.127 0.396-0.667 0.853-1.229 1.367-1.686v-1.742h-7.015v1.979z\"/></symbol><symbol id=\"f-i-checkbox\" viewBox=\"0 0 16 16\" xml:space=\"preserve\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M13.5,5v8c0,0.8-0.7,1.5-1.5,1.5H3c-0.8,0-1.5-0.7-1.5-1.5V4c0-0.8,0.7-1.5,1.5-1.5h9c0.7,0,1.3,0.5,1.5,1.2l2.4-1.4L13.5,5 z M12.5,6.2L7.7,12L2.8,5.5l4.9,1.6l4.8-2.9V4c0-0.3-0.2-0.5-0.5-0.5H3C2.7,3.5,2.5,3.7,2.5,4v9c0,0.3,0.2,0.5,0.5,0.5h9 c0.3,0,0.5-0.2,0.5-0.5V6.2z\"/></symbol><symbol id=\"f-i-checkbox-group\" viewBox=\"0 0 16 16\" xml:space=\"preserve\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M0,1h16V0H0V1z M0,3h16V2H0V3z M6,5v1h9V5H6z M15,14v-1H6v1H15z M6,10h9V9H6V10z M4,12l-2.5,1.5L0,13l1.5,2L4,12z M4,8 L1.5,9.5L0,9l1.5,2L4,8z M4,4L1.5,5.5L0,5l1.5,2L4,4z\"/></symbol><symbol xml:space=\"preserve\" viewBox=\"0 0 16 16\" id=\"f-i-columns\" xmlns=\"http://www.w3.org/2000/svg\"><metadata id=\"agprefix__metadata4318\"><rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"><cc:Work rdf:about=\"\" xmlns:cc=\"http://creativecommons.org/ns#\"><dc:format xmlns:dc=\"http://purl.org/dc/elements/1.1/\">image/svg+xml</dc:format><dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\"/><dc:title xmlns:dc=\"http://purl.org/dc/elements/1.1/\"/></cc:Work></rdf:RDF></metadata><path id=\"agprefix__rect4860-3-5\" d=\"M 16,0.5 A 0.50004997,0.50004997 0 0 0 15.5,0 l -5,0 -5,0 -5,0 A 0.50004997,0.50004997 0 0 0 0,0.5 l 0,15 A 0.50004997,0.50004997 0 0 0 0.5,16 l 5,0 5,0 5,0 A 0.50004997,0.50004997 0 0 0 16,15.5 l 0,-15 z M 15,1 15,15 11,15 11,1 15,1 Z M 10,1 10,15 6,15 6,1 10,1 Z M 5,1 5,15 1,15 1,1 5,1 Z\"/></symbol><symbol viewBox=\"0 0 32 32\" id=\"f-i-copy\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M20 8v-8h-14l-6 6v18h12v8h20v-24h-12zM6 2.828v3.172h-3.172l3.172-3.172zM2 22v-14h6v-6h10v6l-6 6v8h-10zM18 10.828v3.172h-3.172l3.172-3.172zM30 30h-16v-14h6v-6h10v20z\"/></symbol><symbol id=\"f-i-divider\" viewBox=\"0 0 15 15\" xmlns=\"http://www.w3.org/2000/svg\"><metadata id=\"aiprefix__metadata10\"><rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"><cc:Work rdf:about=\"\" xmlns:cc=\"http://creativecommons.org/ns#\"><dc:format xmlns:dc=\"http://purl.org/dc/elements/1.1/\">image/svg+xml</dc:format><dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\"/><dc:title xmlns:dc=\"http://purl.org/dc/elements/1.1/\"/></cc:Work></rdf:RDF></metadata><rect y=\"7\" x=\"0\" height=\"1\" width=\"15\" id=\"aiprefix__rect4182\"/></symbol><symbol viewBox=\"0 0 28 32\" id=\"f-i-edit\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M22 2l-4 4 6 6 4-4-6-6zM0 24l0.021 6.018 5.979-0.018 16-16-6-6-16 16zM6 28h-4v-4h2v2h2v2z\"/></symbol><symbol viewBox=\"0 0 24 24\" id=\"f-i-email\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M12,2 C17.4292399,2 21.8479317,6.32667079 21.9961582,11.7200952 L22,12 L22,13 C22,15.1729208 20.477434,17 18.5,17 C17.3269391,17 16.3139529,16.3570244 15.6839382,15.3803024 C14.770593,16.3757823 13.4581934,17 12,17 C9.23857625,17 7,14.7614237 7,12 C7,9.23857625 9.23857625,7 12,7 C14.6887547,7 16.8818181,9.12230671 16.9953805,11.7831104 L17,12 L17,13 C17,14.1407877 17.7160103,15 18.5,15 C19.2447902,15 19.928229,14.2245609 19.9947109,13.1689341 L20,13 L20,12 C20,7.581722 16.418278,4 12,4 C7.581722,4 4,7.581722 4,12 C4,16.418278 7.581722,20 12,20 C13.1630948,20 14.2892822,19.7522618 15.3225159,19.2798331 C15.8247876,19.0501777 16.4181317,19.271177 16.647787,19.7734487 C16.8774423,20.2757205 16.656443,20.8690646 16.1541713,21.0987199 C14.861218,21.689901 13.4515463,22 12,22 C6.4771525,22 2,17.5228475 2,12 C2,6.4771525 6.4771525,2 12,2 Z M12,9 C10.3431458,9 9,10.3431458 9,12 C9,13.6568542 10.3431458,15 12,15 C13.6568542,15 15,13.6568542 15,12 C15,10.3431458 13.6568542,9 12,9 Z\"/></symbol><symbol viewBox=\"0 0 32 32\" id=\"f-i-floppy-disk\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M28 0h-28v32h32v-28l-4-4zM16 4h4v8h-4v-8zM28 28h-24v-24h2v10h18v-10h2.343l1.657 1.657v22.343z\"/></symbol><symbol xml:space=\"preserve\" viewBox=\"0 0 16 16\" id=\"f-i-handle\" xmlns=\"http://www.w3.org/2000/svg\"><metadata id=\"aqprefix__metadata8\"><rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"><cc:Work rdf:about=\"\" xmlns:cc=\"http://creativecommons.org/ns#\"><dc:format xmlns:dc=\"http://purl.org/dc/elements/1.1/\">image/svg+xml</dc:format><dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\"/><dc:title xmlns:dc=\"http://purl.org/dc/elements/1.1/\"/></cc:Work></rdf:RDF></metadata><g transform=\"translate(0,-2)\" id=\"aqprefix__g4220\"><rect id=\"aqprefix__rect4191\" width=\"2\" height=\"2\" x=\"2\" y=\"7\"/><rect id=\"aqprefix__rect4191-2\" width=\"2\" height=\"2\" x=\"7\" y=\"7\"/><rect id=\"aqprefix__rect4191-4\" width=\"2\" height=\"2\" x=\"12\" y=\"7\"/></g><g transform=\"translate(0,2)\" id=\"aqprefix__g4220-6\"><rect id=\"aqprefix__rect4191-40\" width=\"2\" height=\"2\" x=\"2\" y=\"7\"/><rect id=\"aqprefix__rect4191-2-3\" width=\"2\" height=\"2\" x=\"7\" y=\"7\"/><rect id=\"aqprefix__rect4191-4-9\" width=\"2\" height=\"2\" x=\"12\" y=\"7\"/></g></symbol><symbol xml:space=\"preserve\" viewBox=\"0 0 16 16\" id=\"f-i-handle-column\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M2 7h2v2H2zM7 7h2v2H7zM12 7h2v2h-2zM2 12h2v2H2zM7 12h2v2H7zM12 12h2v2h-2z\" transform=\"rotate(90 9.25 9.25)\"/></symbol><symbol xml:space=\"preserve\" viewBox=\"0 0 16 16\" id=\"f-i-handle-field\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M9.5-6.5h2v2h-2zm-5 0h2v2h-2zm5-5h2v2h-2zm-5 0h2v2h-2z\" transform=\"rotate(90)\"/></symbol><symbol xml:space=\"preserve\" viewBox=\"0 0 16 16\" id=\"f-i-handle-row\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M12 9.5h2v2h-2zm-5 0h2v2H7Zm-5 0h2v2H2Zm10-5h2v2h-2zm-5 0h2v2H7Zm-5 0h2v2H2Z\"/></symbol><symbol xml:space=\"preserve\" viewBox=\"0 0 16 16\" id=\"f-i-handle-stage\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M2 4.5h2v2H2zM7 4.5h2v2H7zM12 4.5h2v2h-2zM2 9.5h2v2H2zM7 9.5h2v2H7zM12 9.5h2v2h-2zM2-.5h2v2H2zM7-.5h2v2H7zM12-.5h2v2h-2z\" transform=\"translate(0 2.5)\"/></symbol><symbol viewBox=\"0 0 448 512\" id=\"f-i-hash\" xmlns=\"http://www.w3.org/2000/svg\"><g id=\"arprefix__icomoon-ignore\"/><path d=\"M448 192v-64h-80.064l16-128h-64l-16 128h-127.968l16-128h-64l-16 128h-111.968v64h103.968l-15.968 128h-88v64h80l-16 128h64l16-128h127.968l-16 128h64.032l16-128h112v-64h-104l15.936-128h88.064zM279.968 320h-127.968l15.968-128h127.968l-15.968 128z\"/></symbol><symbol viewBox=\"0 0 28 28\" id=\"f-i-header\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M26.281 26q-0.688 0-2.070-0.055t-2.086-0.055q-0.688 0-2.063 0.055t-2.063 0.055q-0.375 0-0.578-0.32t-0.203-0.711q0-0.484 0.266-0.719t0.609-0.266 0.797-0.109 0.703-0.234q0.516-0.328 0.516-2.188l-0.016-6.109q0-0.328-0.016-0.484-0.203-0.063-0.781-0.063h-10.547q-0.594 0-0.797 0.063-0.016 0.156-0.016 0.484l-0.016 5.797q0 2.219 0.578 2.562 0.25 0.156 0.75 0.203t0.891 0.055 0.703 0.234 0.313 0.711q0 0.406-0.195 0.75t-0.57 0.344q-0.734 0-2.18-0.055t-2.164-0.055q-0.672 0-2 0.055t-1.984 0.055q-0.359 0-0.555-0.328t-0.195-0.703q0-0.469 0.242-0.703t0.562-0.273 0.742-0.117 0.656-0.234q0.516-0.359 0.516-2.234l-0.016-0.891v-12.703q0-0.047 0.008-0.406t0-0.57-0.023-0.602-0.055-0.656-0.102-0.57-0.172-0.492-0.25-0.281q-0.234-0.156-0.703-0.187t-0.828-0.031-0.641-0.219-0.281-0.703q0-0.406 0.187-0.75t0.562-0.344q0.719 0 2.164 0.055t2.164 0.055q0.656 0 1.977-0.055t1.977-0.055q0.391 0 0.586 0.344t0.195 0.75q0 0.469-0.266 0.68t-0.602 0.227-0.773 0.063-0.672 0.203q-0.547 0.328-0.547 2.5l0.016 5q0 0.328 0.016 0.5 0.203 0.047 0.609 0.047h10.922q0.391 0 0.594-0.047 0.016-0.172 0.016-0.5l0.016-5q0-2.172-0.547-2.5-0.281-0.172-0.914-0.195t-1.031-0.203-0.398-0.773q0-0.406 0.195-0.75t0.586-0.344q0.688 0 2.063 0.055t2.063 0.055q0.672 0 2.016-0.055t2.016-0.055q0.391 0 0.586 0.344t0.195 0.75q0 0.469-0.273 0.688t-0.625 0.227-0.805 0.047-0.688 0.195q-0.547 0.359-0.547 2.516l0.016 14.734q0 1.859 0.531 2.188 0.25 0.156 0.719 0.211t0.836 0.070 0.648 0.242 0.281 0.695q0 0.406-0.187 0.75t-0.562 0.344z\"/></symbol><symbol xml:space=\"preserve\" viewBox=\"0 0 16 16\" id=\"f-i-hidden\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M0 12h1v-1H0Zm15-7h1V4h-1zm-1 7h1v-1h-1zm-2 0h1v-1h-1zm-2 0h1v-1h-1Zm-2 0h1v-1H8Zm-2 0h1v-1H6Zm-2 0h1v-1H4Zm-2 0h1v-1H2Zm13-1h1v-1h-1ZM0 10h1V9H0Zm15-1h1V8h-1ZM0 8h1V7H0Zm15-1h1V6h-1ZM0 6h1V5H0Zm13-1h1V4h-1zm-2 0h1V4h-1ZM9 5h1V4H9ZM7 5h1V4H7ZM5 5h1V4H5ZM3 5h1V4H3ZM1 5h1V4H1Z\"/></symbol><symbol xml:space=\"preserve\" viewBox=\"0 0 32 32\" id=\"f-i-info-circle\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m17.962 24.725 1.806.096v2.531h-7.534v-2.406l1.045-.094c.568-.063.916-.254.916-1.014v-8.801c0-.699-.188-.92-.791-.92l-1.106-.062v-2.626h5.666zM15.747 4.648c1.394 0 2.405 1.047 2.405 2.374 0 1.331-1.014 2.313-2.438 2.313-1.454 0-2.404-.982-2.404-2.313 0-1.327.95-2.374 2.437-2.374M16 32C7.178 32 0 24.822 0 16S7.178 0 16 0c8.82 0 16 7.178 16 16s-7.18 16-16 16m0-29C8.832 3 3 8.832 3 16s5.832 13 13 13 13-5.832 13-13S23.168 3 16 3\"/></symbol><symbol viewBox=\"0 0 384 512\" id=\"f-i-menu\" xmlns=\"http://www.w3.org/2000/svg\"><g id=\"avprefix__icomoon-ignore\"/><path d=\"M0 96v64h384v-64h-384zM0 288h384v-64h-384v64zM0 416h384v-64h-384v64z\"/></symbol><symbol viewBox=\"0 0 24 24\" fill=\"none\" id=\"f-i-minus\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M6 12L18 12\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></symbol><symbol viewBox=\"0 0 512 512\" id=\"f-i-move\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M287.744 94.736v129.008h128v-64l96.256 96.256-96.256 96.24v-65.488h-128v129.008h64.496l-96.24 96.24-96.256-96.24h64v-129.008h-128v64.992l-95.744-95.744 95.744-95.744v63.488h128v-129.008h-62.496l94.752-94.736 94.752 94.736h-63.008z\"/></symbol><symbol viewBox=\"0 0 512 512\" id=\"f-i-move-vertical\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m 287.744,94.736 0,321.024 64.496,0 L 256,512 l -96.256,-96.24 64,0 0,-321.024 -62.496,0 L 256,0 350.752,94.736 Z\"/></symbol><symbol viewBox=\"0 0 512 512\" id=\"f-i-page-move\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M96 32h224l96 96v96h-48v-64h-80v-80h-192v384h192v48h-240v-480zM352 288l128 96-128 96v-64h-128v-64h128v-64z\"/></symbol><symbol viewBox=\"0 0 20 28\" id=\"f-i-paragraph\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M19.969 2.953v1.141q0 0.453-0.289 0.953t-0.664 0.5q-0.781 0-0.844 0.016-0.406 0.094-0.5 0.484-0.047 0.172-0.047 1v18q0 0.391-0.281 0.672t-0.672 0.281h-1.687q-0.391 0-0.672-0.281t-0.281-0.672v-19.031h-2.234v19.031q0 0.391-0.273 0.672t-0.68 0.281h-1.687q-0.406 0-0.68-0.281t-0.273-0.672v-7.75q-2.297-0.187-3.828-0.922-1.969-0.906-3-2.797-1-1.828-1-4.047 0-2.594 1.375-4.469 1.375-1.844 3.266-2.484 1.734-0.578 6.516-0.578h7.484q0.391 0 0.672 0.281t0.281 0.672z\"/></symbol><symbol id=\"f-i-phone-receiver\" viewBox=\"0 0 578.106 578.106\" xml:space=\"preserve\" xmlns=\"http://www.w3.org/2000/svg\"><g><g><path d=\"M577.83,456.128c1.225,9.385-1.635,17.545-8.568,24.48l-81.396,80.781 c-3.672,4.08-8.465,7.551-14.381,10.404c-5.916,2.857-11.729,4.693-17.439,5.508c-0.408,0-1.635,0.105-3.676,0.309 c-2.037,0.203-4.689,0.307-7.953,0.307c-7.754,0-20.301-1.326-37.641-3.979s-38.555-9.182-63.645-19.584 c-25.096-10.404-53.553-26.012-85.376-46.818c-31.823-20.805-65.688-49.367-101.592-85.68 c-28.56-28.152-52.224-55.08-70.992-80.783c-18.768-25.705-33.864-49.471-45.288-71.299 c-11.425-21.828-19.993-41.616-25.705-59.364S4.59,177.362,2.55,164.51s-2.856-22.95-2.448-30.294 c0.408-7.344,0.612-11.424,0.612-12.24c0.816-5.712,2.652-11.526,5.508-17.442s6.324-10.71,10.404-14.382L98.022,8.756 c5.712-5.712,12.24-8.568,19.584-8.568c5.304,0,9.996,1.53,14.076,4.59s7.548,6.834,10.404,11.322l65.484,124.236 c3.672,6.528,4.692,13.668,3.06,21.42c-1.632,7.752-5.1,14.28-10.404,19.584l-29.988,29.988c-0.816,0.816-1.53,2.142-2.142,3.978 s-0.918,3.366-0.918,4.59c1.632,8.568,5.304,18.36,11.016,29.376c4.896,9.792,12.444,21.726,22.644,35.802 s24.684,30.293,43.452,48.653c18.36,18.77,34.68,33.354,48.96,43.76c14.277,10.4,26.215,18.053,35.803,22.949 c9.588,4.896,16.932,7.854,22.031,8.871l7.648,1.531c0.816,0,2.145-0.307,3.979-0.918c1.836-0.613,3.162-1.326,3.979-2.143 l34.883-35.496c7.348-6.527,15.912-9.791,25.705-9.791c6.938,0,12.443,1.223,16.523,3.672h0.611l118.115,69.768 C571.098,441.238,576.197,447.968,577.83,456.128z\"/></g></g><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/></symbol><symbol viewBox=\"0 0 24 24\" fill=\"none\" id=\"f-i-plus\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M6 12H18M12 6V18\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></symbol><symbol id=\"f-i-radio-group\" viewBox=\"0 0 16 16\" xml:space=\"preserve\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M0,1h16V0H0V1z M0,3h16V2H0V3z M5,6h10V5H5V6z M15,9H5v1h10V9z M15,14v-1H5v1H15z M1.5,7C0.7,7,0,6.3,0,5.5S0.7,4,1.5,4 S3,4.7,3,5.5S2.3,7,1.5,7z M1.5,5C1.2,5,1,5.2,1,5.5S1.2,6,1.5,6S2,5.8,2,5.5S1.8,5,1.5,5z M1.5,11.1C0.7,11.1,0,10.4,0,9.6 s0.7-1.5,1.5-1.5S3,8.7,3,9.6S2.3,11.1,1.5,11.1z M1.5,9.1C1.2,9.1,1,9.3,1,9.6s0.2,0.5,0.5,0.5S2,9.8,2,9.6S1.8,9.1,1.5,9.1z M1.5,15C0.7,15,0,14.3,0,13.5S0.7,12,1.5,12S3,12.7,3,13.5S2.3,15,1.5,15z M1.5,13C1.2,13,1,13.2,1,13.5S1.2,14,1.5,14 S2,13.8,2,13.5S1.8,13,1.5,13z\"/></symbol><symbol viewBox=\"0 0 512 512\" id=\"f-i-remove\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M193.694-139.2h87.322v510.916h-87.322zM-18.103 159.92V72.597h510.915v87.322z\" transform=\"rotate(45 77.994 208.636)\"/></symbol><symbol id=\"f-i-rich-text\" viewBox=\"0 0 16 16\" xml:space=\"preserve\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M15,1H1C0.4,1,0,1.4,0,2v12c0,0.6,0.4,1,1,1h14c0.6,0,1-0.4,1-1V2C16,1.4,15.6,1,15,1z M1,3.1h0.8v0.3H1V3.1z M1,3.6h0.8 v0.3H1V3.6z M15,14H1V5.1h14V14z M15,4.9H1V4.6h14V4.9z M15,4.4H1V4.1h0.8v0.2h1.5V4.1h1.3v0.2H6V4.1h1.3v0.2h1.5V4.1H10v0.2h1.5 V4.1h1.3v0.2h1.5V4.1H15V4.4z M4.5,3.6v0.3H3.3V3.6H4.5z M3.3,3.4V3.1h1.3v0.3H3.3z M7.3,3.6v0.3H6V3.6H7.3z M6,3.4V3.1h1.3v0.3H6z M10,3.6v0.3H8.8V3.6H10z M8.8,3.4V3.1H10v0.3H8.8z M12.8,3.6v0.3h-1.3V3.6H12.8z M11.5,3.4V3.1h1.3v0.3H11.5z M15,3.9h-0.8V3.6H15 V3.9z M15,3.4h-0.8V3.1H15V3.4z M15,2.9h-0.8V2.8h-1.5v0.2h-1.3V2.8H10v0.2H8.8V2.8H7.3v0.2H6V2.8H4.5v0.2H3.3V2.8H1.8v0.2H1V2.6h14 V2.9z M15,2.4H1V2.1h14V2.4z M3,12v-1h10v1H3z M13,10H3V9h10V10z M11,8H3V7h8V8z\"/></symbol><symbol xml:space=\"preserve\" viewBox=\"0 0 16 16\" id=\"f-i-rows\" xmlns=\"http://www.w3.org/2000/svg\"><metadata id=\"bgprefix__metadata4318\"><rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"><cc:Work rdf:about=\"\" xmlns:cc=\"http://creativecommons.org/ns#\"><dc:format xmlns:dc=\"http://purl.org/dc/elements/1.1/\">image/svg+xml</dc:format><dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\"/><dc:title xmlns:dc=\"http://purl.org/dc/elements/1.1/\"/></cc:Work></rdf:RDF></metadata><g transform=\"matrix(0,1,-1,0,3.0984025,11.835155)\" id=\"bgprefix__g7209\"><path id=\"bgprefix__rect4860-3-5\" d=\"m 4.1640625,-12.402344 a 0.50004997,0.50004997 0 0 0 -0.5,-0.5 l -5,0 -5,0 -5.0000005,0 a 0.50004997,0.50004997 0 0 0 -0.5,0.5 l 0,15.0000002 a 0.50004997,0.50004997 0 0 0 0.5,0.5 l 4.9648442,0 a 0.50004997,0.50004997 0 0 0 0.035156,0 l 4.9648437,0 a 0.50004997,0.50004997 0 0 0 0.035156,0 l 5,0 a 0.50004997,0.50004997 0 0 0 0.5,-0.5 l 0,-15.0000002 z m -1,0.5 0,14.0000002 -4,0 0,-14.0000002 4,0 z m -5,0 0,14.0000002 -4,0 0,-14.0000002 4,0 z m -5,0 0,14.0000002 -4.0000005,0 0,-14.0000002 4.0000005,0 z\"/></g></symbol><symbol id=\"f-i-select\" viewBox=\"0 0 16 16\" xml:space=\"preserve\" xmlns=\"http://www.w3.org/2000/svg\"><path id=\"bhprefix__XMLID_1_\" d=\"M0,0v14h0c0,0.6,0.4,1,1,1h10c0.6,0,1-0.4,1-1h0V5h4V0H0z M1,1h10v3H1V1z M1,7h10v3H1V7z M1,14v-3h10v3H1z M15,4h-3V1h3V4z M2,2h1v1H2V2z M2,12h1v1H2V12z M4,12h1v1H4V12z M6,12h1v1H6V12z M9,12v1H8v-1H9z M2,8h1v1H2V8z M4,8h1v1H4V8z M6,8 h1v1H6V8z M13.5,3.1l-1-1.1h1.9L13.5,3.1z M2,6V5h1v1H2L2,6z M4,6V5h1v1H4L4,6z\"/></symbol><symbol viewBox=\"0 0 448 512\" id=\"f-i-settings\" xmlns=\"http://www.w3.org/2000/svg\"><g id=\"biprefix__icomoon-ignore\"/><path d=\"M223.969 175c-44.703 0-80.969 36.266-80.969 81 0 44.688 36.266 81.031 80.969 81.031 44.719 0 80.719-36.344 80.719-81.031-0-44.734-36-81-80.719-81zM386.313 302.531l-14.594 35.156 29.469 57.875-36.094 36.094-59.218-27.969-35.156 14.438-17.844 54.625-2.281 7.25h-51.016l-22.078-61.656-35.156-14.5-57.952 29.344-36.078-36.063 27.938-59.25-14.484-35.125-61.767-20.156v-50.984l61.703-22.109 14.485-35.094-25.953-51.234-3.422-6.719 36.031-36.031 59.297 27.922 35.109-14.516 17.828-54.594 2.297-7.234h51l22.094 61.734 35.063 14.516 58.031-29.406 36.063 36.031-27.938 59.203 14.438 35.172 61.875 20.125v50.969l-61.688 22.187z\"/></symbol><symbol id=\"f-i-text-input\" viewBox=\"0 0 16 16\" xml:space=\"preserve\" xmlns=\"http://www.w3.org/2000/svg\"><path id=\"bjprefix__XMLID_10_\" d=\"M15,4H4.5V3H6V2H4.5h-1H2v1h1.5v1H1C0.4,4,0,4.5,0,5v6c0,0.6,0.4,1,1,1h2.5v1H2v1h4v-1H4.5v-1H15 c0.6,0,1-0.4,1-1V5C16,4.5,15.6,4,15,4z M1,11V5h2.5v6H1z M15,11H4.5V5H15V11z\"/></symbol><symbol id=\"f-i-textarea\" viewBox=\"0 0 16 16\" xml:space=\"preserve\" xmlns=\"http://www.w3.org/2000/svg\"><path id=\"bkprefix__XMLID_1_\" d=\"M3,11v-1h8v1H3L3,11z M3,7h10V6H3V7L3,7z M3,8v1h10V8H3L3,8z M13,4H3v1h10V4L13,4z M16,14V2c0-0.6-0.4-1-1-1 H1C0.4,1,0,1.4,0,2v12c0,0.6,0.4,1,1,1h14C15.6,15,16,14.6,16,14z M15,2v12H1V2H15z\"/></symbol><symbol viewBox=\"0 0 24 32\" id=\"f-i-triangle-down\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M0 12l11.992 11.992 11.992-11.992h-23.984z\"/></symbol><symbol viewBox=\"0 0 12 32\" id=\"f-i-triangle-left\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M0 15.996l11.992 11.992v-23.984l-11.992 11.992z\"/></symbol><symbol viewBox=\"0 0 12 32\" id=\"f-i-triangle-right\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M0.002 4.008l11.992 11.992-11.992 11.992v-23.984z\"/></symbol><symbol viewBox=\"0 0 24 32\" id=\"f-i-triangle-up\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M11.992 8l-11.992 11.992h23.984l-11.992-11.992z\"/></symbol><symbol viewBox=\"0 0 512 512\" id=\"f-i-upload\" xmlns=\"http://www.w3.org/2000/svg\"><g id=\"bpprefix__icomoon-ignore\"/><path d=\"M240 352h-240v128h480v-128h-240zM448 416h-64v-32h64v32zM112 160l128-128 128 128h-80v160h-96v-160z\"/></symbol></svg>";
|
|
8441
|
+
})), name, version$1, PACKAGE_NAME, formeoSpriteId, FALLBACK_SVG_SPRITE_URL, CSS_URL, FALLBACK_CSS_URL, PANEL_CLASSNAME, CONTROL_GROUP_CLASSNAME, STAGE_CLASSNAME, ROW_CLASSNAME, COLUMN_CLASSNAME, FIELD_CLASSNAME, HIDDEN_BY_CONDITION_SELECTOR, CUSTOM_COLUMN_OPTION_CLASSNAME, COLUMN_PRESET_CLASSNAME, COLUMN_RESIZE_CLASSNAME, CHILD_CLASSNAME_MAP, INTERNAL_COMPONENT_TYPES, INTERNAL_COMPONENT_INDEX_TYPES, INTERNAL_COMPONENT_INDEX_REGEX, COMPONENT_TYPES, COMPONENT_INDEX_TYPES, COMPONENT_INDEX_TYPE_MAP, COMPONENT_TYPE_MAP, COMPONENT_TYPE_CONFIGS, COMPONENT_TYPE_CLASSNAMES, COMPONENT_TYPE_CLASSNAMES_LOOKUP, COMPONENT_TYPE_CLASSNAMES_ARRAY, COMPONENT_TYPE_CLASSNAMES_REGEXP, childTypeMapVals, childTypeIndexMapVals, parentTypeMap, CHILD_TYPE_MAP, CHILD_TYPE_INDEX_MAP, PARENT_TYPE_MAP, columnTemplates, COLUMN_TEMPLATES, SESSION_FORMDATA_KEY, SESSION_LOCALE_KEY, ANIMATION_SPEED_FAST, ANIMATION_SPEED_SLOW, EVENT_FORMEO_SAVED, EVENT_FORMEO_UPDATED, EVENT_FORMEO_CHANGED, EVENT_FORMEO_UPDATED_STAGE, EVENT_FORMEO_UPDATED_ROW, EVENT_FORMEO_UPDATED_COLUMN, EVENT_FORMEO_UPDATED_FIELD, EVENT_FORMEO_CLEARED, EVENT_FORMEO_ON_RENDER, EVENT_FORMEO_CONDITION_UPDATED, EVENT_FORMEO_ADDED_ROW, EVENT_FORMEO_ADDED_COLUMN, EVENT_FORMEO_ADDED_FIELD, EVENT_FORMEO_REMOVED_ROW, EVENT_FORMEO_REMOVED_COLUMN, EVENT_FORMEO_REMOVED_FIELD, EVENT_FORMEO_ADDED_STAGE, EVENT_FORMEO_REMOVED_STAGE, EVENT_FORMEO_PAGE_CHANGED, COMPARISON_OPERATORS, LOGICAL_OPERATORS, ASSIGNMENT_OPERATORS, CONDITION_INPUT_ORDER, CHECKABLE_OPTIONS, VISIBLE_OPTIONS, PROPERTY_OPTIONS, OPERATORS, conditionTypeThen, CONDITION_TEMPLATE, UUID_REGEXP, bsColRegExp, iconPrefix, DEFAULT_FORMDATA, CHECKED_TYPES, REVERSED_CHECKED_TYPES, FILTERED_PANEL_DATA_KEYS;
|
|
8436
8442
|
var init_constants = __esmMin((() => {
|
|
8437
8443
|
init_package();
|
|
8438
8444
|
init_utils();
|
|
@@ -8600,6 +8606,9 @@ var init_constants = __esmMin((() => {
|
|
|
8600
8606
|
EVENT_FORMEO_REMOVED_ROW = "formeoRemovedRow";
|
|
8601
8607
|
EVENT_FORMEO_REMOVED_COLUMN = "formeoRemovedColumn";
|
|
8602
8608
|
EVENT_FORMEO_REMOVED_FIELD = "formeoRemovedField";
|
|
8609
|
+
EVENT_FORMEO_ADDED_STAGE = "formeoAddedStage";
|
|
8610
|
+
EVENT_FORMEO_REMOVED_STAGE = "formeoRemovedStage";
|
|
8611
|
+
EVENT_FORMEO_PAGE_CHANGED = "formeoPageChanged";
|
|
8603
8612
|
COMPARISON_OPERATORS = {
|
|
8604
8613
|
equals: "==",
|
|
8605
8614
|
notEquals: "!=",
|
|
@@ -8650,7 +8659,7 @@ var init_constants = __esmMin((() => {
|
|
|
8650
8659
|
iconPrefix = "f-i-";
|
|
8651
8660
|
DEFAULT_FORMDATA = () => ({
|
|
8652
8661
|
id: uuid(),
|
|
8653
|
-
stages: { [
|
|
8662
|
+
stages: { [nonIndexId()]: {} },
|
|
8654
8663
|
rows: {},
|
|
8655
8664
|
columns: {},
|
|
8656
8665
|
fields: {}
|
|
@@ -10691,19 +10700,19 @@ var init_helpers = __esmMin((() => {
|
|
|
10691
10700
|
field.set("options", updatedOptions);
|
|
10692
10701
|
}
|
|
10693
10702
|
field.set(dataKey, target.checked);
|
|
10694
|
-
field.updatePreview();
|
|
10703
|
+
field.updatePreview?.();
|
|
10695
10704
|
} }),
|
|
10696
10705
|
string: (dataKey, field) => ({ input: ({ target: { value } }) => {
|
|
10697
10706
|
field.set(dataKey, value);
|
|
10698
|
-
field.debouncedUpdatePreview();
|
|
10707
|
+
field.debouncedUpdatePreview?.();
|
|
10699
10708
|
} }),
|
|
10700
10709
|
number: (dataKey, field) => ({ input: ({ target: { value } }) => {
|
|
10701
10710
|
field.set(dataKey, Number(value));
|
|
10702
|
-
field.debouncedUpdatePreview();
|
|
10711
|
+
field.debouncedUpdatePreview?.();
|
|
10703
10712
|
} }),
|
|
10704
10713
|
array: (dataKey, field) => ({ change: ({ target: { value } }) => {
|
|
10705
10714
|
field.set(dataKey, value);
|
|
10706
|
-
field.debouncedUpdatePreview();
|
|
10715
|
+
field.debouncedUpdatePreview?.();
|
|
10707
10716
|
} }),
|
|
10708
10717
|
object: () => ({})
|
|
10709
10718
|
};
|
|
@@ -10944,9 +10953,29 @@ var init_dialog = __esmMin((() => {
|
|
|
10944
10953
|
};
|
|
10945
10954
|
}));
|
|
10946
10955
|
//#endregion
|
|
10956
|
+
//#region src/lib/js/components/stages/page-text.mjs
|
|
10957
|
+
var PAGE_TEXT, fill, pageText;
|
|
10958
|
+
var init_page_text = __esmMin((() => {
|
|
10959
|
+
init_i18n_es_min();
|
|
10960
|
+
PAGE_TEXT = Object.freeze({
|
|
10961
|
+
"pages.label": "Pages",
|
|
10962
|
+
"pages.add": "Add page",
|
|
10963
|
+
"pages.untitled": "Page {n}",
|
|
10964
|
+
"pages.rename": "Rename page",
|
|
10965
|
+
"pages.remove": "Remove page \"{title}\"",
|
|
10966
|
+
"pages.removeConfirm": "Remove \"{title}\" and everything on it?",
|
|
10967
|
+
"pages.moveTo": "Move to page",
|
|
10968
|
+
"pages.move": "Move",
|
|
10969
|
+
"pages.moved": "Moved to {title}"
|
|
10970
|
+
});
|
|
10971
|
+
fill = (text, vars) => text.replace(/\{(\w+)\}/g, (token, name) => name in vars ? String(vars[name]) : token);
|
|
10972
|
+
pageText = (key, vars = {}) => fill(s.get(key) || PAGE_TEXT[key] || key, vars);
|
|
10973
|
+
}));
|
|
10974
|
+
//#endregion
|
|
10947
10975
|
//#region src/lib/js/common/actions.js
|
|
10948
10976
|
init_i18n_es_min();
|
|
10949
10977
|
init_dialog();
|
|
10978
|
+
init_page_text();
|
|
10950
10979
|
init_constants();
|
|
10951
10980
|
init_utils();
|
|
10952
10981
|
var ATTRIBUTE_NAME = /^[A-Za-z_:][-A-Za-z0-9_:]*$/;
|
|
@@ -10995,6 +11024,24 @@ var openAddAttributeDialog = (evt) => new Dialog({
|
|
|
10995
11024
|
if (attr && !attributeProblem(attr, evt)) evt.addAction(attr, String(formData.get("attrValue") ?? ""));
|
|
10996
11025
|
}
|
|
10997
11026
|
}).open();
|
|
11027
|
+
/**
|
|
11028
|
+
* Default page removal (#122): an empty page goes at once, a page with content asks first
|
|
11029
|
+
* @param {Object} evt { stage, stageId, index, title, isEmpty, removeAction }
|
|
11030
|
+
* @return {Dialog|*}
|
|
11031
|
+
*/
|
|
11032
|
+
var removePage = (evt) => {
|
|
11033
|
+
if (evt.isEmpty) return evt.removeAction();
|
|
11034
|
+
return new Dialog({
|
|
11035
|
+
className: "remove-page-dialog",
|
|
11036
|
+
content: {
|
|
11037
|
+
tag: "p",
|
|
11038
|
+
className: "remove-page-message",
|
|
11039
|
+
textContent: pageText("pages.removeConfirm", { title: evt.title })
|
|
11040
|
+
},
|
|
11041
|
+
confirmText: () => s.get("remove") || "Remove",
|
|
11042
|
+
onConfirm: () => evt.removeAction()
|
|
11043
|
+
}).open();
|
|
11044
|
+
};
|
|
10998
11045
|
var defaultActions = {
|
|
10999
11046
|
add: {
|
|
11000
11047
|
attr: (evt) => openAddAttributeDialog(evt),
|
|
@@ -11017,7 +11064,8 @@ var defaultActions = {
|
|
|
11017
11064
|
},
|
|
11018
11065
|
conditions: (evt) => {
|
|
11019
11066
|
evt.removeAction();
|
|
11020
|
-
}
|
|
11067
|
+
},
|
|
11068
|
+
page: removePage
|
|
11021
11069
|
},
|
|
11022
11070
|
click: { btn: (evt) => {
|
|
11023
11071
|
evt.action();
|
|
@@ -11075,6 +11123,9 @@ var Actions = class {
|
|
|
11075
11123
|
},
|
|
11076
11124
|
conditions: (evt) => {
|
|
11077
11125
|
return this.opts.remove.conditions(evt);
|
|
11126
|
+
},
|
|
11127
|
+
page: (evt) => {
|
|
11128
|
+
return (this.opts?.remove?.page || defaultActions.remove.page)(evt);
|
|
11078
11129
|
}
|
|
11079
11130
|
};
|
|
11080
11131
|
click = { btn: (evt) => {
|
|
@@ -11101,12 +11152,15 @@ var EVENT_CALLBACKS = new Map([
|
|
|
11101
11152
|
[EVENT_FORMEO_UPDATED_ROW, ["onUpdate", "onUpdateRow"]],
|
|
11102
11153
|
[EVENT_FORMEO_UPDATED_COLUMN, ["onUpdate", "onUpdateColumn"]],
|
|
11103
11154
|
[EVENT_FORMEO_UPDATED_FIELD, ["onUpdate", "onUpdateField"]],
|
|
11155
|
+
[EVENT_FORMEO_ADDED_STAGE, ["onAdd", "onAddStage"]],
|
|
11104
11156
|
[EVENT_FORMEO_ADDED_ROW, ["onAdd", "onAddRow"]],
|
|
11105
11157
|
[EVENT_FORMEO_ADDED_COLUMN, ["onAdd", "onAddColumn"]],
|
|
11106
11158
|
[EVENT_FORMEO_ADDED_FIELD, ["onAdd", "onAddField"]],
|
|
11159
|
+
[EVENT_FORMEO_REMOVED_STAGE, ["onRemove", "onRemoveStage"]],
|
|
11107
11160
|
[EVENT_FORMEO_REMOVED_ROW, ["onRemove", "onRemoveRow"]],
|
|
11108
11161
|
[EVENT_FORMEO_REMOVED_COLUMN, ["onRemove", "onRemoveColumn"]],
|
|
11109
11162
|
[EVENT_FORMEO_REMOVED_FIELD, ["onRemove", "onRemoveField"]],
|
|
11163
|
+
[EVENT_FORMEO_PAGE_CHANGED, ["onPageChange"]],
|
|
11110
11164
|
[EVENT_FORMEO_ON_RENDER, ["onRender"]]
|
|
11111
11165
|
]);
|
|
11112
11166
|
var reachesDocument = (evt) => evt.target === document || Boolean(evt.bubbles && evt.target?.isConnected);
|
|
@@ -11116,9 +11170,11 @@ var reachesDocument = (evt) => evt.target === document || Boolean(evt.bubbles &&
|
|
|
11116
11170
|
*/
|
|
11117
11171
|
var Events = class {
|
|
11118
11172
|
components = null;
|
|
11173
|
+
destroyed = false;
|
|
11119
11174
|
constructor() {
|
|
11120
11175
|
this.opts = this.defaults();
|
|
11121
11176
|
this.formeoUpdatedThrottled = throttle$1(() => {
|
|
11177
|
+
if (this.destroyed) return;
|
|
11122
11178
|
const eventData = {
|
|
11123
11179
|
timeStamp: globalThis.performance.now(),
|
|
11124
11180
|
type: EVENT_FORMEO_UPDATED,
|
|
@@ -11142,13 +11198,16 @@ var Events = class {
|
|
|
11142
11198
|
onUpdateRow: log,
|
|
11143
11199
|
onUpdateColumn: log,
|
|
11144
11200
|
onUpdateField: log,
|
|
11201
|
+
onAddStage: log,
|
|
11145
11202
|
onAddRow: log,
|
|
11146
11203
|
onAddColumn: log,
|
|
11147
11204
|
onAddField: log,
|
|
11205
|
+
onRemoveStage: log,
|
|
11148
11206
|
onRemoveRow: log,
|
|
11149
11207
|
onRemoveColumn: log,
|
|
11150
11208
|
onRemoveField: log,
|
|
11151
11209
|
onRender: log,
|
|
11210
|
+
onPageChange: () => {},
|
|
11152
11211
|
onSave: (_evt) => {},
|
|
11153
11212
|
confirmClearAll: (evt) => {
|
|
11154
11213
|
if (globalThis.confirm(evt.confirmationMessage)) evt.clearAllAction(evt);
|
|
@@ -11174,6 +11233,7 @@ var Events = class {
|
|
|
11174
11233
|
return evt;
|
|
11175
11234
|
}
|
|
11176
11235
|
runCallbacks({ type, timeStamp, detail }) {
|
|
11236
|
+
if (this.destroyed) return;
|
|
11177
11237
|
if (type === "formeoUpdated") return this.formeoUpdatedThrottled();
|
|
11178
11238
|
if (type === "formeoSaved") return this.opts.onSave({
|
|
11179
11239
|
timeStamp,
|
|
@@ -11191,16 +11251,20 @@ var Events = class {
|
|
|
11191
11251
|
formeoCleared = (evt) => this.dispatch(EVENT_FORMEO_CLEARED, evt);
|
|
11192
11252
|
formeoOnRender = (evt) => this.dispatch(EVENT_FORMEO_ON_RENDER, evt);
|
|
11193
11253
|
formeoConditionUpdated = (evt) => this.dispatch(EVENT_FORMEO_CONDITION_UPDATED, evt);
|
|
11254
|
+
formeoAddedStage = (evt) => this.dispatch(EVENT_FORMEO_ADDED_STAGE, evt);
|
|
11194
11255
|
formeoAddedRow = (evt) => this.dispatch(EVENT_FORMEO_ADDED_ROW, evt);
|
|
11195
11256
|
formeoAddedColumn = (evt) => this.dispatch(EVENT_FORMEO_ADDED_COLUMN, evt);
|
|
11196
11257
|
formeoAddedField = (evt) => this.dispatch(EVENT_FORMEO_ADDED_FIELD, evt);
|
|
11258
|
+
formeoRemovedStage = (evt) => this.dispatch(EVENT_FORMEO_REMOVED_STAGE, evt);
|
|
11197
11259
|
formeoRemovedRow = (evt) => this.dispatch(EVENT_FORMEO_REMOVED_ROW, evt);
|
|
11198
11260
|
formeoRemovedColumn = (evt) => this.dispatch(EVENT_FORMEO_REMOVED_COLUMN, evt);
|
|
11199
11261
|
formeoRemovedField = (evt) => this.dispatch(EVENT_FORMEO_REMOVED_FIELD, evt);
|
|
11262
|
+
formeoPageChanged = (evt) => this.dispatch(EVENT_FORMEO_PAGE_CHANGED, evt);
|
|
11200
11263
|
/** detail: { confirmationMessage, clearAllAction, btnCoords } */
|
|
11201
11264
|
confirmClearAll = (detail) => {
|
|
11202
11265
|
const evt = new globalThis.CustomEvent("confirmClearAll", { detail });
|
|
11203
11266
|
document.dispatchEvent(evt);
|
|
11267
|
+
if (this.destroyed) return;
|
|
11204
11268
|
this.opts.confirmClearAll({
|
|
11205
11269
|
timeStamp: evt.timeStamp,
|
|
11206
11270
|
type: evt.type,
|
|
@@ -11209,7 +11273,7 @@ var Events = class {
|
|
|
11209
11273
|
};
|
|
11210
11274
|
formeoLoaded = (formeo) => {
|
|
11211
11275
|
document.dispatchEvent(new globalThis.CustomEvent("formeoLoaded", { detail: { formeo } }));
|
|
11212
|
-
this.opts.formeoLoaded(formeo);
|
|
11276
|
+
if (!this.destroyed) this.opts.formeoLoaded(formeo);
|
|
11213
11277
|
};
|
|
11214
11278
|
columnResized = (detail) => document.dispatchEvent(new globalThis.CustomEvent("columnResized", { detail }));
|
|
11215
11279
|
/**
|
|
@@ -11219,7 +11283,7 @@ var Events = class {
|
|
|
11219
11283
|
*/
|
|
11220
11284
|
onResizeWindow = () => {
|
|
11221
11285
|
const { columns, controls } = this.components || {};
|
|
11222
|
-
if (!columns || !controls?.dom?.isConnected || this.resizeFrame) return;
|
|
11286
|
+
if (this.destroyed || !columns || !controls?.dom?.isConnected || this.resizeFrame) return;
|
|
11223
11287
|
this.resizeFrame = window.requestAnimationFrame(() => {
|
|
11224
11288
|
this.resizeFrame = null;
|
|
11225
11289
|
for (const column of Object.values(columns.data)) {
|
|
@@ -11234,6 +11298,18 @@ var Events = class {
|
|
|
11234
11298
|
}
|
|
11235
11299
|
});
|
|
11236
11300
|
};
|
|
11301
|
+
/**
|
|
11302
|
+
* Stop calling this editor's option callbacks, including a trailing onUpdate/onChange that is
|
|
11303
|
+
* already scheduled, and cancel a pending resize frame. FormeoEditor#destroy (#166) calls it.
|
|
11304
|
+
* DOM events are still dispatched, so page listeners are unaffected.
|
|
11305
|
+
*/
|
|
11306
|
+
destroy() {
|
|
11307
|
+
this.destroyed = true;
|
|
11308
|
+
if (this.resizeFrame) {
|
|
11309
|
+
window.cancelAnimationFrame(this.resizeFrame);
|
|
11310
|
+
this.resizeFrame = null;
|
|
11311
|
+
}
|
|
11312
|
+
}
|
|
11237
11313
|
};
|
|
11238
11314
|
var events = new Events();
|
|
11239
11315
|
//#endregion
|
|
@@ -13106,6 +13182,24 @@ var init_sortable_esm = __esmMin((() => {
|
|
|
13106
13182
|
Sortable.mount(Remove, Revert);
|
|
13107
13183
|
}));
|
|
13108
13184
|
//#endregion
|
|
13185
|
+
//#region src/lib/js/common/sortable.js
|
|
13186
|
+
var destroySortables;
|
|
13187
|
+
var init_sortable = __esmMin((() => {
|
|
13188
|
+
init_sortable_esm();
|
|
13189
|
+
destroySortables = (root) => {
|
|
13190
|
+
if (!root) return 0;
|
|
13191
|
+
let count = 0;
|
|
13192
|
+
for (const el of [root, ...root.querySelectorAll("*")]) {
|
|
13193
|
+
const sortable = Sortable.get(el);
|
|
13194
|
+
if (sortable) {
|
|
13195
|
+
sortable.destroy();
|
|
13196
|
+
count++;
|
|
13197
|
+
}
|
|
13198
|
+
}
|
|
13199
|
+
return count;
|
|
13200
|
+
};
|
|
13201
|
+
}));
|
|
13202
|
+
//#endregion
|
|
13109
13203
|
//#region src/lib/js/components/panels.js
|
|
13110
13204
|
var defaults$1, getTransition, Panels;
|
|
13111
13205
|
var init_panels = __esmMin((() => {
|
|
@@ -13135,18 +13229,25 @@ var init_panels = __esmMin((() => {
|
|
|
13135
13229
|
const panelsWrap = this.createPanelsWrap();
|
|
13136
13230
|
this.nav = this.navActions();
|
|
13137
13231
|
this.nav.groupChange(this.activePanelIndex);
|
|
13138
|
-
|
|
13232
|
+
this.resizeObserver = new window.ResizeObserver(([{ contentRect: { width } }]) => {
|
|
13139
13233
|
if (this.currentWidth !== width) {
|
|
13140
13234
|
this.toggleTabbedLayout();
|
|
13141
13235
|
this.currentWidth = width;
|
|
13142
13236
|
this.nav.setTranslateX(this.activePanelIndex, false);
|
|
13143
13237
|
}
|
|
13144
13238
|
});
|
|
13145
|
-
|
|
13146
|
-
resizeObserver
|
|
13147
|
-
window.clearTimeout(observeTimeout);
|
|
13239
|
+
this.observeTimeout = window.setTimeout(() => {
|
|
13240
|
+
this.resizeObserver?.observe(panelsWrap);
|
|
13148
13241
|
}, ANIMATION_SPEED_SLOW);
|
|
13149
13242
|
}
|
|
13243
|
+
/**
|
|
13244
|
+
* Stop watching the panels' size
|
|
13245
|
+
*/
|
|
13246
|
+
destroy() {
|
|
13247
|
+
window.clearTimeout(this.observeTimeout);
|
|
13248
|
+
this.resizeObserver?.disconnect();
|
|
13249
|
+
this.resizeObserver = null;
|
|
13250
|
+
}
|
|
13150
13251
|
getPanelDisplay() {
|
|
13151
13252
|
const column = this.panelsWrap;
|
|
13152
13253
|
const autoDisplayType = Number.parseInt(dom.getStyle(column, "width"), 10) > 390 ? "tabbed" : "slider";
|
|
@@ -13445,7 +13546,7 @@ var init_control = __esmMin((() => {
|
|
|
13445
13546
|
}));
|
|
13446
13547
|
//#endregion
|
|
13447
13548
|
//#region src/lib/js/components/controls/options.js
|
|
13448
|
-
|
|
13549
|
+
init_sortable();
|
|
13449
13550
|
init_panels();
|
|
13450
13551
|
init_control();
|
|
13451
13552
|
var defaultOptions = Object.freeze({
|
|
@@ -14763,6 +14864,7 @@ var init_edit_panel_item = __esmMin((() => {
|
|
|
14763
14864
|
var addAttributeActions, defaultConfigOptions, defaultConfigValues, EditPanel;
|
|
14764
14865
|
var init_edit_panel = __esmMin((() => {
|
|
14765
14866
|
init_i18n_es_min();
|
|
14867
|
+
init_sortable_esm();
|
|
14766
14868
|
init_dom();
|
|
14767
14869
|
init_helpers$2();
|
|
14768
14870
|
init_string();
|
|
@@ -14835,6 +14937,14 @@ var init_edit_panel = __esmMin((() => {
|
|
|
14835
14937
|
};
|
|
14836
14938
|
}
|
|
14837
14939
|
/**
|
|
14940
|
+
* A stage's config.title is its page title (#122): editable only while the editor's page tabs are on
|
|
14941
|
+
* @param {String} keyBase
|
|
14942
|
+
* @return {Boolean}
|
|
14943
|
+
*/
|
|
14944
|
+
isPageTitle(keyBase) {
|
|
14945
|
+
return this.name === "config" && keyBase === "title" && this.component.name === "stage" && Boolean(this.component.components?.opts?.pages);
|
|
14946
|
+
}
|
|
14947
|
+
/**
|
|
14838
14948
|
* Generates the edit panel for attrs, meta and options for a fields(s)
|
|
14839
14949
|
* @param {String} panelName
|
|
14840
14950
|
* @param {Object} dataObj field config object
|
|
@@ -14848,7 +14958,8 @@ var init_edit_panel = __esmMin((() => {
|
|
|
14848
14958
|
const val = isArray ? dataVal : { [dataVal[0]]: dataVal[1] };
|
|
14849
14959
|
const itemKey = `${this.name}${key}`;
|
|
14850
14960
|
const isDisabledProp = this.component.isDisabledProp(itemKey, this.name);
|
|
14851
|
-
const
|
|
14961
|
+
const allowedKeys = FILTERED_PANEL_DATA_KEYS.get(this.name);
|
|
14962
|
+
const isEditableProp = !allowedKeys || allowedKeys.has(keyBase) || this.isPageTitle(keyBase);
|
|
14852
14963
|
if (isDisabledProp || !isEditableProp) return null;
|
|
14853
14964
|
return new EditPanelItem({
|
|
14854
14965
|
key: itemKey,
|
|
@@ -15088,6 +15199,7 @@ var init_edit_panel = __esmMin((() => {
|
|
|
15088
15199
|
//#region src/lib/js/components/component.js
|
|
15089
15200
|
var propertyOptions, Component;
|
|
15090
15201
|
var init_component = __esmMin((() => {
|
|
15202
|
+
init_sortable_esm();
|
|
15091
15203
|
init_animation();
|
|
15092
15204
|
init_dom();
|
|
15093
15205
|
init_helpers$2();
|
|
@@ -15097,6 +15209,7 @@ var init_component = __esmMin((() => {
|
|
|
15097
15209
|
init_constants();
|
|
15098
15210
|
init_data();
|
|
15099
15211
|
init_edit_panel();
|
|
15212
|
+
init_page_text();
|
|
15100
15213
|
propertyOptions = objectFromStringArray(PROPERTY_OPTIONS);
|
|
15101
15214
|
Component = class extends Data {
|
|
15102
15215
|
/**
|
|
@@ -15230,7 +15343,7 @@ var init_component = __esmMin((() => {
|
|
|
15230
15343
|
}
|
|
15231
15344
|
return parent;
|
|
15232
15345
|
}
|
|
15233
|
-
if (this.name === "stage") return
|
|
15346
|
+
if (this.name === "stage") return this.removeStage();
|
|
15234
15347
|
const parent = this.parent;
|
|
15235
15348
|
const children = this.children;
|
|
15236
15349
|
const siblingsPath = `${parent.name}s.${parent.id}.children`;
|
|
@@ -15242,6 +15355,8 @@ var init_component = __esmMin((() => {
|
|
|
15242
15355
|
});
|
|
15243
15356
|
forEach(children, (child) => child.remove());
|
|
15244
15357
|
this.dom.remove();
|
|
15358
|
+
this.panels?.destroy();
|
|
15359
|
+
this.releaseSortables();
|
|
15245
15360
|
remove(this.components.getAddress(siblingsPath), this.id);
|
|
15246
15361
|
if (!parent.children.length) parent.emptyClass();
|
|
15247
15362
|
if (parent.name === "row") parent.autoColumnWidths();
|
|
@@ -15403,10 +15518,29 @@ var init_component = __esmMin((() => {
|
|
|
15403
15518
|
if (this.name === "column") this.parent.autoColumnWidths();
|
|
15404
15519
|
} }
|
|
15405
15520
|
};
|
|
15406
|
-
}
|
|
15521
|
+
},
|
|
15522
|
+
page: (icon = "page-move") => ({
|
|
15523
|
+
...dom.btnTemplate({
|
|
15524
|
+
content: dom.icon(icon),
|
|
15525
|
+
title: pageText("pages.moveTo")
|
|
15526
|
+
}),
|
|
15527
|
+
className: ["item-page"],
|
|
15528
|
+
meta: { id: "page" },
|
|
15529
|
+
action: { click: () => this.components.pages?.openMoveDialog(this) }
|
|
15530
|
+
})
|
|
15407
15531
|
};
|
|
15408
15532
|
const { buttons, disabled } = this.config.actionButtons;
|
|
15409
|
-
const
|
|
15533
|
+
const pagesOn = Boolean(this.components.opts?.pages);
|
|
15534
|
+
let rowButtons = buttons;
|
|
15535
|
+
if (pagesOn && this.name === "row" && !buttons.includes("page")) {
|
|
15536
|
+
const at = buttons.indexOf("remove");
|
|
15537
|
+
rowButtons = at === -1 ? [...buttons, "page"] : [
|
|
15538
|
+
...buttons.slice(0, at),
|
|
15539
|
+
"page",
|
|
15540
|
+
...buttons.slice(at)
|
|
15541
|
+
];
|
|
15542
|
+
}
|
|
15543
|
+
const actionButtonsConfigs = rowButtons.filter((btn) => !disabled.includes(btn) && (btn !== "page" || pagesOn && this.name === "row")).map((btn) => buttonConfig[btn]?.() || btn);
|
|
15410
15544
|
this.actionButtons = actionButtonsConfigs;
|
|
15411
15545
|
return this.actionButtons;
|
|
15412
15546
|
}
|
|
@@ -15590,6 +15724,20 @@ var init_component = __esmMin((() => {
|
|
|
15590
15724
|
return this.saveChildOrder();
|
|
15591
15725
|
};
|
|
15592
15726
|
/**
|
|
15727
|
+
* Destroy the Sortables of this removed component and its descendants, so Sortable's page-wide
|
|
15728
|
+
* list stops holding them (and through them the editor). A column emptied by a drag is removed
|
|
15729
|
+
* from inside Sortable's drop handler; destroying that Sortable there would end the drop early,
|
|
15730
|
+
* so during a drag it is released once the drop has finished.
|
|
15731
|
+
*/
|
|
15732
|
+
releaseSortables() {
|
|
15733
|
+
const { dom: removedDom } = this;
|
|
15734
|
+
if (Sortable.active) {
|
|
15735
|
+
queueMicrotask(() => destroySortables(removedDom));
|
|
15736
|
+
return;
|
|
15737
|
+
}
|
|
15738
|
+
destroySortables(removedDom);
|
|
15739
|
+
}
|
|
15740
|
+
/**
|
|
15593
15741
|
* Handler for removing content from a sortable component
|
|
15594
15742
|
* @param {Object} evt
|
|
15595
15743
|
* @return {Array} updated child order
|
|
@@ -15815,6 +15963,7 @@ var init_component = __esmMin((() => {
|
|
|
15815
15963
|
id: this.id,
|
|
15816
15964
|
displayType: "auto"
|
|
15817
15965
|
};
|
|
15966
|
+
this.panels?.destroy();
|
|
15818
15967
|
this.panels = new Panels(panelsData);
|
|
15819
15968
|
if (this.dom) {
|
|
15820
15969
|
this.dom.querySelector(".panel-nav").replaceWith(this.panels.panelNav);
|
|
@@ -16593,6 +16742,7 @@ init_i18n_es_min();
|
|
|
16593
16742
|
init_sortable_esm();
|
|
16594
16743
|
init_dom();
|
|
16595
16744
|
init_helpers$2();
|
|
16745
|
+
init_sortable();
|
|
16596
16746
|
init_utils();
|
|
16597
16747
|
init_object();
|
|
16598
16748
|
init_constants();
|
|
@@ -16882,6 +17032,22 @@ var Controls = class {
|
|
|
16882
17032
|
if (group === "layout") return this.layoutTypes[metaId.replace("layout-", "")]();
|
|
16883
17033
|
return this.layoutTypes.field(elementData);
|
|
16884
17034
|
};
|
|
17035
|
+
/**
|
|
17036
|
+
* Remove the controls from the page and release their Sortables and Panels. A control drag in
|
|
17037
|
+
* progress in these controls is ended: its ghost is removed and the page overflow it hid is
|
|
17038
|
+
* restored. Safe to call more than once, and before init().
|
|
17039
|
+
*/
|
|
17040
|
+
destroy() {
|
|
17041
|
+
const element = this.dom;
|
|
17042
|
+
if (element && Sortable.active?.el && element.contains(Sortable.active.el)) Sortable.ghost?.remove();
|
|
17043
|
+
if (this.originalDocumentOverflow != null) {
|
|
17044
|
+
document.documentElement.style.overflow = this.originalDocumentOverflow;
|
|
17045
|
+
this.originalDocumentOverflow = null;
|
|
17046
|
+
}
|
|
17047
|
+
destroySortables(element);
|
|
17048
|
+
this.panels?.destroy();
|
|
17049
|
+
element?.remove();
|
|
17050
|
+
}
|
|
16885
17051
|
applyOptions = async (controlOptions = {}) => {
|
|
16886
17052
|
const { container, elements, groupOrder, ...options } = merge(defaultOptions, controlOptions);
|
|
16887
17053
|
this.container = dom.resolveContainer(container);
|
|
@@ -16927,6 +17093,13 @@ var ComponentData = class extends Data {
|
|
|
16927
17093
|
*/
|
|
16928
17094
|
get = (path) => path ? get(this.data, path) : this.add();
|
|
16929
17095
|
/**
|
|
17096
|
+
* Generates an id for a new component when none is given. Stores where key order is meaningful (Stages: page
|
|
17097
|
+
* order is `Object.keys(this.data)` order, #122) override this, since JS objects always list an integer-like
|
|
17098
|
+
* key ("1", "2") before any string key, regardless of insertion order.
|
|
17099
|
+
* @returns {String}
|
|
17100
|
+
*/
|
|
17101
|
+
generateId = () => uuid();
|
|
17102
|
+
/**
|
|
16930
17103
|
* Adds a new component with the given id and data.
|
|
16931
17104
|
*
|
|
16932
17105
|
* @param {string} id - The unique identifier for the component. If not provided, a new UUID will be generated.
|
|
@@ -16936,7 +17109,7 @@ var ComponentData = class extends Data {
|
|
|
16936
17109
|
* @returns {Object} The newly created component.
|
|
16937
17110
|
*/
|
|
16938
17111
|
add = (id, data = Object.create(null), { silent = false } = {}) => {
|
|
16939
|
-
const elemId = id ||
|
|
17112
|
+
const elemId = id || this.generateId();
|
|
16940
17113
|
const component = this.Component({
|
|
16941
17114
|
...data,
|
|
16942
17115
|
id: elemId
|
|
@@ -16944,6 +17117,7 @@ var ComponentData = class extends Data {
|
|
|
16944
17117
|
this.data[elemId] = component;
|
|
16945
17118
|
this.active = component;
|
|
16946
17119
|
const addEvent = {
|
|
17120
|
+
stages: EVENT_FORMEO_ADDED_STAGE,
|
|
16947
17121
|
rows: EVENT_FORMEO_ADDED_ROW,
|
|
16948
17122
|
columns: EVENT_FORMEO_ADDED_COLUMN,
|
|
16949
17123
|
fields: EVENT_FORMEO_ADDED_FIELD
|
|
@@ -17720,9 +17894,47 @@ var Stage = class extends Component {
|
|
|
17720
17894
|
const component = super.onAdd(...args);
|
|
17721
17895
|
if (component?.name === "column") component.parent.autoColumnWidths();
|
|
17722
17896
|
}
|
|
17897
|
+
/**
|
|
17898
|
+
* Removes this stage, a page with the editor's `pages` option (#122), with everything on it.
|
|
17899
|
+
* formData always keeps one stage, so the last one is never removed.
|
|
17900
|
+
* @return {String|null} the removed id, or null when nothing was removed
|
|
17901
|
+
*/
|
|
17902
|
+
removeStage() {
|
|
17903
|
+
const { stages, events } = this.components;
|
|
17904
|
+
if (stages.size <= 1) return null;
|
|
17905
|
+
const previousValue = Object.keys(stages.data);
|
|
17906
|
+
const children = [...this.children];
|
|
17907
|
+
this.dispatchComponentEvent("onRemove", {
|
|
17908
|
+
parent: null,
|
|
17909
|
+
children
|
|
17910
|
+
});
|
|
17911
|
+
for (const row of children) row.remove();
|
|
17912
|
+
this.dom.remove();
|
|
17913
|
+
this.panels?.destroy();
|
|
17914
|
+
this.releaseSortables();
|
|
17915
|
+
stages.delete(this.id);
|
|
17916
|
+
if (stages.active === this) stages.active = Object.values(stages.data)[0];
|
|
17917
|
+
events.formeoRemovedStage({
|
|
17918
|
+
componentId: this.id,
|
|
17919
|
+
componentType: this.name
|
|
17920
|
+
});
|
|
17921
|
+
events.formeoUpdated({
|
|
17922
|
+
entity: this,
|
|
17923
|
+
componentId: this.id,
|
|
17924
|
+
componentType: this.name,
|
|
17925
|
+
dataPath: "stages",
|
|
17926
|
+
changePath: "stages",
|
|
17927
|
+
value: Object.keys(stages.data),
|
|
17928
|
+
previousValue,
|
|
17929
|
+
changeType: "removed"
|
|
17930
|
+
});
|
|
17931
|
+
return this.id;
|
|
17932
|
+
}
|
|
17723
17933
|
};
|
|
17724
17934
|
//#endregion
|
|
17725
17935
|
//#region src/lib/js/components/stages/index.js
|
|
17936
|
+
init_utils();
|
|
17937
|
+
init_page_text();
|
|
17726
17938
|
var DEFAULT_CONFIG = () => ({
|
|
17727
17939
|
actionButtons: {
|
|
17728
17940
|
buttons: ["edit"],
|
|
@@ -17743,7 +17955,67 @@ var Stages = class extends ComponentData {
|
|
|
17743
17955
|
this.config = { all: DEFAULT_CONFIG() };
|
|
17744
17956
|
}
|
|
17745
17957
|
Component(data) {
|
|
17746
|
-
return new Stage(data, this.components);
|
|
17958
|
+
return new Stage(this.withPageTitle(data), this.components);
|
|
17959
|
+
}
|
|
17960
|
+
/**
|
|
17961
|
+
* A fresh id that never looks like an array index: page order is this store's key order, and an integer-like
|
|
17962
|
+
* key would jump to the front regardless of when it was added (#122).
|
|
17963
|
+
* @returns {String}
|
|
17964
|
+
*/
|
|
17965
|
+
generateId = () => nonIndexId();
|
|
17966
|
+
/**
|
|
17967
|
+
* With the editor's `pages` option every stage carries a string `config.title` (#122), so its edit panel always
|
|
17968
|
+
* offers one. An empty title shows as "Page {n}".
|
|
17969
|
+
* @param {Object} data stage data
|
|
17970
|
+
* @return {Object}
|
|
17971
|
+
*/
|
|
17972
|
+
withPageTitle(data) {
|
|
17973
|
+
const title = data.config?.title;
|
|
17974
|
+
if (!this.components?.opts?.pages || typeof title === "string") return data;
|
|
17975
|
+
return {
|
|
17976
|
+
...data,
|
|
17977
|
+
config: {
|
|
17978
|
+
...data.config,
|
|
17979
|
+
title: title == null ? "" : String(title)
|
|
17980
|
+
}
|
|
17981
|
+
};
|
|
17982
|
+
}
|
|
17983
|
+
/**
|
|
17984
|
+
* A page's title: its config.title, or "Page {n}" (1-based) when that is empty
|
|
17985
|
+
* @param {Stage} stage
|
|
17986
|
+
* @param {Number} [index] the page's 0-based position, when the caller already knows it
|
|
17987
|
+
* @return {String}
|
|
17988
|
+
*/
|
|
17989
|
+
pageTitle(stage, index = Object.keys(this.data).indexOf(stage.id)) {
|
|
17990
|
+
const title = stage.get("config.title");
|
|
17991
|
+
return typeof title === "string" && title.trim() ? title : pageText("pages.untitled", { n: index + 1 });
|
|
17992
|
+
}
|
|
17993
|
+
/**
|
|
17994
|
+
* Puts the stages (pages) in a new order. Page order is the key order of this store's data, the same object as
|
|
17995
|
+
* the editor's formData.stages, so the keys are re-inserted in place.
|
|
17996
|
+
* @param {String[]} ids stage ids in the new order; unknown ids are ignored, missing ones keep their order at the end
|
|
17997
|
+
* @return {Boolean} whether the order changed
|
|
17998
|
+
*/
|
|
17999
|
+
reorder(ids) {
|
|
18000
|
+
const current = Object.keys(this.data);
|
|
18001
|
+
const wanted = unique([...ids.filter((id) => Object.hasOwn(this.data, id)), ...current]);
|
|
18002
|
+
if (wanted.every((id, i) => id === current[i])) return false;
|
|
18003
|
+
if (wanted.some(looksLikeArrayIndex)) {
|
|
18004
|
+
console.warn("formeo: pages whose ids look like array indexes (\"1\", \"2\") keep their order; use other ids to reorder them.");
|
|
18005
|
+
return false;
|
|
18006
|
+
}
|
|
18007
|
+
const entries = wanted.map((id) => [id, this.data[id]]);
|
|
18008
|
+
for (const id of current) delete this.data[id];
|
|
18009
|
+
for (const [id, stage] of entries) this.data[id] = stage;
|
|
18010
|
+
this.events?.formeoUpdated({
|
|
18011
|
+
entity: this,
|
|
18012
|
+
dataPath: "stages",
|
|
18013
|
+
changePath: "stages",
|
|
18014
|
+
value: wanted,
|
|
18015
|
+
previousValue: current,
|
|
18016
|
+
changeType: "reordered"
|
|
18017
|
+
});
|
|
18018
|
+
return true;
|
|
17747
18019
|
}
|
|
17748
18020
|
};
|
|
17749
18021
|
var stages = new Stages();
|
|
@@ -17895,6 +18167,603 @@ new Components({
|
|
|
17895
18167
|
});
|
|
17896
18168
|
actions.events = events;
|
|
17897
18169
|
//#endregion
|
|
18170
|
+
//#region src/lib/js/components/stages/pages.js
|
|
18171
|
+
init_sortable_esm();
|
|
18172
|
+
init_dom();
|
|
18173
|
+
init_sortable();
|
|
18174
|
+
init_dialog();
|
|
18175
|
+
init_page_text();
|
|
18176
|
+
/** How long a tab stays highlighted after content moves to its page, in ms */
|
|
18177
|
+
var FLASH_DURATION = 1e3;
|
|
18178
|
+
/**
|
|
18179
|
+
* Creates an element with attributes, text and children. Titles are user data, so text is never parsed as HTML.
|
|
18180
|
+
* @param {String} tag
|
|
18181
|
+
* @param {Object} [props] className, text, and attributes to set
|
|
18182
|
+
* @param {Array<Node>} [children]
|
|
18183
|
+
* @return {HTMLElement}
|
|
18184
|
+
*/
|
|
18185
|
+
var el = (tag, { className, text, ...attrs } = {}, children = []) => {
|
|
18186
|
+
const node = document.createElement(tag);
|
|
18187
|
+
if (className) node.className = className;
|
|
18188
|
+
if (text !== void 0) node.textContent = text;
|
|
18189
|
+
for (const [name, value] of Object.entries(attrs)) node.setAttribute(name, value);
|
|
18190
|
+
node.append(...children);
|
|
18191
|
+
return node;
|
|
18192
|
+
};
|
|
18193
|
+
/**
|
|
18194
|
+
* Page tabs for one editor (#122): each stage is a page. Created by FormeoEditor when its `pages` option is on.
|
|
18195
|
+
* Holds no page-wide state, so every editor on a page has its own tabs.
|
|
18196
|
+
*/
|
|
18197
|
+
var EditorPages = class {
|
|
18198
|
+
/**
|
|
18199
|
+
* @param {Components} components the editor's Components
|
|
18200
|
+
*/
|
|
18201
|
+
constructor(components) {
|
|
18202
|
+
this.components = components;
|
|
18203
|
+
this.activeId = null;
|
|
18204
|
+
this.activeIndex = -1;
|
|
18205
|
+
this.wrapper = null;
|
|
18206
|
+
this.tablist = null;
|
|
18207
|
+
this.status = null;
|
|
18208
|
+
this.renaming = null;
|
|
18209
|
+
this.flashTimers = /* @__PURE__ */ new Map();
|
|
18210
|
+
this.announceTimer = null;
|
|
18211
|
+
this.stageListeners = /* @__PURE__ */ new Map();
|
|
18212
|
+
}
|
|
18213
|
+
get stages() {
|
|
18214
|
+
return this.components.stages;
|
|
18215
|
+
}
|
|
18216
|
+
/** @return {String[]} stage ids in page order */
|
|
18217
|
+
get ids() {
|
|
18218
|
+
return Object.keys(this.stages.data);
|
|
18219
|
+
}
|
|
18220
|
+
get count() {
|
|
18221
|
+
return this.ids.length;
|
|
18222
|
+
}
|
|
18223
|
+
/** @return {Number} 0-based index of the active page */
|
|
18224
|
+
get index() {
|
|
18225
|
+
return Math.max(0, this.ids.indexOf(this.activeId));
|
|
18226
|
+
}
|
|
18227
|
+
tabId(stageId) {
|
|
18228
|
+
return `${this.components.instanceId}-page-tab-${stageId}`;
|
|
18229
|
+
}
|
|
18230
|
+
wrapFor(stageId) {
|
|
18231
|
+
return [...this.tablist?.children || []].find((wrap) => wrap.dataset.stageId === stageId);
|
|
18232
|
+
}
|
|
18233
|
+
tabFor(stageId) {
|
|
18234
|
+
return this.wrapFor(stageId)?.querySelector(".formeo-page-tab");
|
|
18235
|
+
}
|
|
18236
|
+
titleOf(stageId) {
|
|
18237
|
+
return this.stages.pageTitle(this.stages.get(stageId), this.ids.indexOf(stageId));
|
|
18238
|
+
}
|
|
18239
|
+
stageAt(stageIdOrIndex) {
|
|
18240
|
+
const id = typeof stageIdOrIndex === "number" ? this.ids[stageIdOrIndex] : stageIdOrIndex;
|
|
18241
|
+
return id && Object.hasOwn(this.stages.data, id) ? this.stages.get(id) : void 0;
|
|
18242
|
+
}
|
|
18243
|
+
isRtl() {
|
|
18244
|
+
return this.tablist?.closest("[dir]")?.getAttribute("dir") === "rtl";
|
|
18245
|
+
}
|
|
18246
|
+
/**
|
|
18247
|
+
* Builds the tab bar and a wrapper holding it and every stage. Called by FormeoEditor#render; keeps the active
|
|
18248
|
+
* page when it still exists, otherwise starts on the first page. Never fires onPageChange.
|
|
18249
|
+
* @return {HTMLElement} .formeo-pages-editor
|
|
18250
|
+
*/
|
|
18251
|
+
render() {
|
|
18252
|
+
this.teardown();
|
|
18253
|
+
const ids = this.ids;
|
|
18254
|
+
if (!ids.includes(this.activeId)) this.activeId = ids[0] ?? null;
|
|
18255
|
+
for (const [id, { stage }] of [...this.stageListeners]) if (!ids.includes(id) || this.stages.get(id) !== stage) this.unwatchStage(id);
|
|
18256
|
+
for (const id of ids) this.watchStage(this.stages.get(id));
|
|
18257
|
+
this.tablist = el("div", {
|
|
18258
|
+
className: "formeo-page-tabs",
|
|
18259
|
+
role: "tablist",
|
|
18260
|
+
"aria-label": pageText("pages.label")
|
|
18261
|
+
});
|
|
18262
|
+
this.tablist.addEventListener("click", this.onClick);
|
|
18263
|
+
this.tablist.addEventListener("dblclick", this.onDblClick);
|
|
18264
|
+
this.tablist.addEventListener("keydown", this.onKeydown);
|
|
18265
|
+
const addLabel = pageText("pages.add");
|
|
18266
|
+
const addButton = el("button", {
|
|
18267
|
+
className: "formeo-page-add",
|
|
18268
|
+
type: "button",
|
|
18269
|
+
"aria-label": addLabel,
|
|
18270
|
+
title: addLabel
|
|
18271
|
+
});
|
|
18272
|
+
addButton.innerHTML = dom.icon("plus");
|
|
18273
|
+
addButton.addEventListener("click", () => this.add());
|
|
18274
|
+
this.status = el("span", {
|
|
18275
|
+
className: "formeo-pages-status",
|
|
18276
|
+
"aria-live": "polite"
|
|
18277
|
+
});
|
|
18278
|
+
const bar = el("div", { className: "formeo-pages-bar" }, [
|
|
18279
|
+
this.tablist,
|
|
18280
|
+
addButton,
|
|
18281
|
+
this.status
|
|
18282
|
+
]);
|
|
18283
|
+
this.wrapper = el("div", { className: "formeo-pages-editor" }, [bar, ...ids.map((id) => this.stages.get(id).dom)]);
|
|
18284
|
+
this.createTabSorter();
|
|
18285
|
+
this.rebuildTabs();
|
|
18286
|
+
if (this.activeId) this.stages.active = this.stages.get(this.activeId);
|
|
18287
|
+
return this.wrapper;
|
|
18288
|
+
}
|
|
18289
|
+
renderTab(stageId, index) {
|
|
18290
|
+
const title = this.stages.pageTitle(this.stages.get(stageId), index);
|
|
18291
|
+
const tab = el("button", {
|
|
18292
|
+
className: "formeo-page-tab",
|
|
18293
|
+
type: "button",
|
|
18294
|
+
role: "tab",
|
|
18295
|
+
id: this.tabId(stageId),
|
|
18296
|
+
"aria-controls": stageId,
|
|
18297
|
+
text: title
|
|
18298
|
+
});
|
|
18299
|
+
const wrap = el("div", {
|
|
18300
|
+
className: "formeo-page-tab-wrap",
|
|
18301
|
+
role: "presentation",
|
|
18302
|
+
"data-stage-id": stageId
|
|
18303
|
+
}, [tab]);
|
|
18304
|
+
if (this.count > 1) {
|
|
18305
|
+
const label = pageText("pages.remove", { title });
|
|
18306
|
+
const remove = el("button", {
|
|
18307
|
+
className: "formeo-page-remove",
|
|
18308
|
+
type: "button",
|
|
18309
|
+
tabindex: "-1",
|
|
18310
|
+
"aria-label": label,
|
|
18311
|
+
title: label
|
|
18312
|
+
});
|
|
18313
|
+
remove.innerHTML = dom.icon("remove");
|
|
18314
|
+
wrap.append(remove);
|
|
18315
|
+
}
|
|
18316
|
+
return wrap;
|
|
18317
|
+
}
|
|
18318
|
+
/** Re-creates every tab (after an add or a removal) */
|
|
18319
|
+
rebuildTabs() {
|
|
18320
|
+
this.commitRename();
|
|
18321
|
+
for (const wrap of this.tablist.children) destroySortables(wrap);
|
|
18322
|
+
this.tablist.replaceChildren(...this.ids.map((id, index) => this.renderTab(id, index)));
|
|
18323
|
+
for (const wrap of this.tablist.children) this.createDropTarget(wrap, wrap.dataset.stageId);
|
|
18324
|
+
this.sync();
|
|
18325
|
+
}
|
|
18326
|
+
/** Shows the active stage, hides the rest, and updates the tabs' selection state */
|
|
18327
|
+
sync() {
|
|
18328
|
+
const ids = this.ids;
|
|
18329
|
+
this.activeIndex = ids.indexOf(this.activeId);
|
|
18330
|
+
for (const id of ids) {
|
|
18331
|
+
const selected = id === this.activeId;
|
|
18332
|
+
const { dom: stageDom } = this.stages.get(id);
|
|
18333
|
+
stageDom.hidden = !selected;
|
|
18334
|
+
stageDom.setAttribute("role", "tabpanel");
|
|
18335
|
+
stageDom.setAttribute("aria-labelledby", this.tabId(id));
|
|
18336
|
+
const tab = this.tabFor(id);
|
|
18337
|
+
if (tab) {
|
|
18338
|
+
tab.setAttribute("aria-selected", String(selected));
|
|
18339
|
+
tab.tabIndex = selected ? 0 : -1;
|
|
18340
|
+
}
|
|
18341
|
+
}
|
|
18342
|
+
this.wrapper?.setAttribute("data-page-count", String(ids.length));
|
|
18343
|
+
}
|
|
18344
|
+
/** Re-titles every tab, e.g. after a rename, or renumbers untitled pages after a move */
|
|
18345
|
+
refreshLabels() {
|
|
18346
|
+
this.ids.forEach((id, index) => {
|
|
18347
|
+
const title = this.stages.pageTitle(this.stages.get(id), index);
|
|
18348
|
+
const tab = this.tabFor(id);
|
|
18349
|
+
if (tab) tab.textContent = title;
|
|
18350
|
+
const remove = this.wrapFor(id)?.querySelector(".formeo-page-remove");
|
|
18351
|
+
if (remove) {
|
|
18352
|
+
const label = pageText("pages.remove", { title });
|
|
18353
|
+
remove.setAttribute("aria-label", label);
|
|
18354
|
+
remove.title = label;
|
|
18355
|
+
}
|
|
18356
|
+
});
|
|
18357
|
+
}
|
|
18358
|
+
/**
|
|
18359
|
+
* Shows a page
|
|
18360
|
+
* @param {String|Number} stageIdOrIndex
|
|
18361
|
+
* @param {Object} [options]
|
|
18362
|
+
* @param {Boolean} [options.focus] move focus to its tab
|
|
18363
|
+
*/
|
|
18364
|
+
activate(stageIdOrIndex, { focus = false } = {}) {
|
|
18365
|
+
const stage = this.stageAt(stageIdOrIndex);
|
|
18366
|
+
if (!stage) return;
|
|
18367
|
+
this.commitRename();
|
|
18368
|
+
const previousStageId = this.activeId;
|
|
18369
|
+
const previousPage = this.activeIndex;
|
|
18370
|
+
this.activeId = stage.id;
|
|
18371
|
+
this.stages.active = stage;
|
|
18372
|
+
this.sync();
|
|
18373
|
+
if (focus) this.tabFor(stage.id)?.focus();
|
|
18374
|
+
if (previousStageId && previousStageId !== stage.id) this.components.events.formeoPageChanged({
|
|
18375
|
+
src: this.tablist?.isConnected ? this.tablist : void 0,
|
|
18376
|
+
page: this.activeIndex,
|
|
18377
|
+
previousPage,
|
|
18378
|
+
stageId: stage.id,
|
|
18379
|
+
previousStageId
|
|
18380
|
+
});
|
|
18381
|
+
}
|
|
18382
|
+
/**
|
|
18383
|
+
* Appends a page and switches to it
|
|
18384
|
+
* @param {Object} [options]
|
|
18385
|
+
* @param {String} [options.title] its config.title; empty shows "Page {n}"
|
|
18386
|
+
* @return {Stage}
|
|
18387
|
+
*/
|
|
18388
|
+
add({ title = "" } = {}) {
|
|
18389
|
+
const previousValue = this.ids;
|
|
18390
|
+
const stage = this.stages.add(null, { config: { title } });
|
|
18391
|
+
this.components.events.formeoUpdated({
|
|
18392
|
+
entity: stage,
|
|
18393
|
+
componentId: stage.id,
|
|
18394
|
+
componentType: stage.name,
|
|
18395
|
+
dataPath: "stages",
|
|
18396
|
+
changePath: "stages",
|
|
18397
|
+
value: this.ids,
|
|
18398
|
+
previousValue,
|
|
18399
|
+
changeType: "added"
|
|
18400
|
+
});
|
|
18401
|
+
this.watchStage(stage);
|
|
18402
|
+
this.wrapper?.append(stage.dom);
|
|
18403
|
+
if (this.tablist) this.rebuildTabs();
|
|
18404
|
+
this.activate(stage.id, { focus: true });
|
|
18405
|
+
return stage;
|
|
18406
|
+
}
|
|
18407
|
+
/** Relabels a tab when its stage's config.title changes, from its tab or from the edit panel */
|
|
18408
|
+
watchStage(stage) {
|
|
18409
|
+
if (!stage || this.stageListeners.has(stage.id)) return;
|
|
18410
|
+
const listener = ({ path }) => {
|
|
18411
|
+
const changed = Array.isArray(path) ? path.join(".") : String(path);
|
|
18412
|
+
if (changed === "config" || changed === "config.title") this.refreshLabels();
|
|
18413
|
+
};
|
|
18414
|
+
stage.addEventListener("onUpdate", listener);
|
|
18415
|
+
this.stageListeners.set(stage.id, {
|
|
18416
|
+
stage,
|
|
18417
|
+
listener
|
|
18418
|
+
});
|
|
18419
|
+
}
|
|
18420
|
+
unwatchStage(stageId) {
|
|
18421
|
+
const watched = this.stageListeners.get(stageId);
|
|
18422
|
+
if (watched) {
|
|
18423
|
+
watched.stage.removeEventListener("onUpdate", watched.listener);
|
|
18424
|
+
this.stageListeners.delete(stageId);
|
|
18425
|
+
}
|
|
18426
|
+
}
|
|
18427
|
+
/**
|
|
18428
|
+
* Says something to screen readers through the bar's live region
|
|
18429
|
+
* @param {String} text
|
|
18430
|
+
*/
|
|
18431
|
+
announce(text) {
|
|
18432
|
+
const { status } = this;
|
|
18433
|
+
if (!status) return;
|
|
18434
|
+
clearTimeout(this.announceTimer);
|
|
18435
|
+
status.textContent = "";
|
|
18436
|
+
this.announceTimer = setTimeout(() => {
|
|
18437
|
+
this.announceTimer = null;
|
|
18438
|
+
status.textContent = text;
|
|
18439
|
+
}, 100);
|
|
18440
|
+
}
|
|
18441
|
+
onClick = ({ target }) => {
|
|
18442
|
+
const remove = target.closest(".formeo-page-remove");
|
|
18443
|
+
if (remove) return this.requestRemove(remove.closest(".formeo-page-tab-wrap").dataset.stageId);
|
|
18444
|
+
const tab = target.closest(".formeo-page-tab");
|
|
18445
|
+
if (tab) this.activate(tab.closest(".formeo-page-tab-wrap").dataset.stageId, { focus: true });
|
|
18446
|
+
};
|
|
18447
|
+
onDblClick = ({ target }) => {
|
|
18448
|
+
const tab = target.closest(".formeo-page-tab");
|
|
18449
|
+
if (tab) this.startRename(tab.closest(".formeo-page-tab-wrap").dataset.stageId);
|
|
18450
|
+
};
|
|
18451
|
+
onKeydown = (evt) => {
|
|
18452
|
+
const tab = evt.target.closest?.(".formeo-page-tab");
|
|
18453
|
+
if (!tab) return;
|
|
18454
|
+
const stageId = tab.closest(".formeo-page-tab-wrap").dataset.stageId;
|
|
18455
|
+
const ids = this.ids;
|
|
18456
|
+
const index = ids.indexOf(stageId);
|
|
18457
|
+
const rtl = this.isRtl();
|
|
18458
|
+
const step = {
|
|
18459
|
+
ArrowRight: rtl ? -1 : 1,
|
|
18460
|
+
ArrowLeft: rtl ? 1 : -1
|
|
18461
|
+
}[evt.key];
|
|
18462
|
+
const handled = () => {
|
|
18463
|
+
evt.preventDefault();
|
|
18464
|
+
evt.stopPropagation();
|
|
18465
|
+
};
|
|
18466
|
+
if (step && evt.altKey) {
|
|
18467
|
+
handled();
|
|
18468
|
+
return this.movePage(stageId, index + step);
|
|
18469
|
+
}
|
|
18470
|
+
const target = {
|
|
18471
|
+
ArrowRight: () => ids[(index + step + ids.length) % ids.length],
|
|
18472
|
+
ArrowLeft: () => ids[(index + step + ids.length) % ids.length],
|
|
18473
|
+
Home: () => ids[0],
|
|
18474
|
+
End: () => ids.at(-1)
|
|
18475
|
+
}[evt.key]?.();
|
|
18476
|
+
if (target) {
|
|
18477
|
+
handled();
|
|
18478
|
+
return this.activate(target, { focus: true });
|
|
18479
|
+
}
|
|
18480
|
+
if (evt.key === "F2") {
|
|
18481
|
+
handled();
|
|
18482
|
+
return this.startRename(stageId);
|
|
18483
|
+
}
|
|
18484
|
+
if (evt.key === "Delete") {
|
|
18485
|
+
handled();
|
|
18486
|
+
return this.requestRemove(stageId);
|
|
18487
|
+
}
|
|
18488
|
+
};
|
|
18489
|
+
/**
|
|
18490
|
+
* Swaps a tab for a text input holding the page's title
|
|
18491
|
+
* @param {String} stageId
|
|
18492
|
+
*/
|
|
18493
|
+
startRename(stageId) {
|
|
18494
|
+
this.commitRename();
|
|
18495
|
+
const tab = this.tabFor(stageId);
|
|
18496
|
+
if (!tab) return;
|
|
18497
|
+
const stage = this.stages.get(stageId);
|
|
18498
|
+
const input = el("input", {
|
|
18499
|
+
className: "formeo-page-title-input",
|
|
18500
|
+
type: "text",
|
|
18501
|
+
"aria-label": pageText("pages.rename"),
|
|
18502
|
+
placeholder: this.titleOf(stageId)
|
|
18503
|
+
});
|
|
18504
|
+
input.value = stage.get("config.title") || "";
|
|
18505
|
+
input.addEventListener("keydown", (evt) => {
|
|
18506
|
+
if (evt.key === "Enter" || evt.key === "Escape") {
|
|
18507
|
+
evt.preventDefault();
|
|
18508
|
+
evt.stopPropagation();
|
|
18509
|
+
this.commitRename({
|
|
18510
|
+
save: evt.key === "Enter",
|
|
18511
|
+
focus: true
|
|
18512
|
+
});
|
|
18513
|
+
}
|
|
18514
|
+
});
|
|
18515
|
+
input.addEventListener("blur", () => this.commitRename());
|
|
18516
|
+
tab.hidden = true;
|
|
18517
|
+
tab.after(input);
|
|
18518
|
+
this.renaming = {
|
|
18519
|
+
stageId,
|
|
18520
|
+
input,
|
|
18521
|
+
tab
|
|
18522
|
+
};
|
|
18523
|
+
input.focus();
|
|
18524
|
+
input.select();
|
|
18525
|
+
}
|
|
18526
|
+
/**
|
|
18527
|
+
* Ends a rename in progress
|
|
18528
|
+
* @param {Object} [options]
|
|
18529
|
+
* @param {Boolean} [options.save] keep the typed title (false on Escape)
|
|
18530
|
+
* @param {Boolean} [options.focus] focus the tab afterwards
|
|
18531
|
+
*/
|
|
18532
|
+
commitRename({ save = true, focus = false } = {}) {
|
|
18533
|
+
const renaming = this.renaming;
|
|
18534
|
+
if (!renaming) return;
|
|
18535
|
+
this.renaming = null;
|
|
18536
|
+
const stage = this.stages.get(renaming.stageId);
|
|
18537
|
+
const title = renaming.input.value.trim();
|
|
18538
|
+
if (save && stage && title !== (stage.get("config.title") || "")) stage.set("config.title", title);
|
|
18539
|
+
renaming.input.remove();
|
|
18540
|
+
renaming.tab.hidden = false;
|
|
18541
|
+
this.refreshLabels();
|
|
18542
|
+
if (focus) renaming.tab.focus();
|
|
18543
|
+
}
|
|
18544
|
+
/**
|
|
18545
|
+
* Asks the editor's actions.remove.page to remove a page; the last page is never offered
|
|
18546
|
+
* @param {String} stageId
|
|
18547
|
+
*/
|
|
18548
|
+
requestRemove(stageId) {
|
|
18549
|
+
const stage = this.stageAt(stageId);
|
|
18550
|
+
if (!stage || this.count <= 1) return;
|
|
18551
|
+
this.commitRename();
|
|
18552
|
+
const index = this.ids.indexOf(stageId);
|
|
18553
|
+
this.components.actions.remove.page({
|
|
18554
|
+
stage,
|
|
18555
|
+
stageId,
|
|
18556
|
+
index,
|
|
18557
|
+
title: this.titleOf(stageId),
|
|
18558
|
+
isEmpty: !stage.children.length,
|
|
18559
|
+
removeAction: () => this.removePage(stageId)
|
|
18560
|
+
});
|
|
18561
|
+
}
|
|
18562
|
+
/**
|
|
18563
|
+
* Removes a page with everything on it, then shows its neighbour
|
|
18564
|
+
* @param {String} stageId
|
|
18565
|
+
* @return {Boolean} whether it was removed
|
|
18566
|
+
*/
|
|
18567
|
+
removePage(stageId) {
|
|
18568
|
+
const stage = this.stageAt(stageId);
|
|
18569
|
+
if (!stage || this.count <= 1) return false;
|
|
18570
|
+
const index = this.ids.indexOf(stageId);
|
|
18571
|
+
const wasActive = this.activeId === stageId;
|
|
18572
|
+
const previousPage = this.activeIndex;
|
|
18573
|
+
this.unwatchStage(stageId);
|
|
18574
|
+
stage.remove();
|
|
18575
|
+
const remaining = this.ids;
|
|
18576
|
+
this.rebuildTabs();
|
|
18577
|
+
if (wasActive) {
|
|
18578
|
+
this.activeIndex = previousPage;
|
|
18579
|
+
this.activate(remaining[Math.max(0, index - 1)], { focus: true });
|
|
18580
|
+
} else this.tabFor(this.activeId)?.focus();
|
|
18581
|
+
return true;
|
|
18582
|
+
}
|
|
18583
|
+
/** Tabs can be dragged along the tablist to reorder pages */
|
|
18584
|
+
createTabSorter() {
|
|
18585
|
+
Sortable.create(this.tablist, {
|
|
18586
|
+
animation: 150,
|
|
18587
|
+
direction: "horizontal",
|
|
18588
|
+
draggable: ".formeo-page-tab-wrap",
|
|
18589
|
+
handle: ".formeo-page-tab",
|
|
18590
|
+
filter: ".formeo-page-title-input",
|
|
18591
|
+
preventOnFilter: false,
|
|
18592
|
+
forceFallback: true,
|
|
18593
|
+
fallbackTolerance: 5,
|
|
18594
|
+
group: {
|
|
18595
|
+
name: `page-tabs-${this.components.instanceId}`,
|
|
18596
|
+
pull: false,
|
|
18597
|
+
put: false
|
|
18598
|
+
},
|
|
18599
|
+
onEnd: () => this.reorderFromDom()
|
|
18600
|
+
});
|
|
18601
|
+
}
|
|
18602
|
+
/** Puts the pages in the order their tabs now have; a rename in progress on another tab is committed first */
|
|
18603
|
+
reorderFromDom() {
|
|
18604
|
+
this.commitRename();
|
|
18605
|
+
const ids = [...this.tablist.children].map((wrap) => wrap.dataset.stageId);
|
|
18606
|
+
if (this.stages.reorder(ids)) this.afterReorder();
|
|
18607
|
+
else this.orderTabs();
|
|
18608
|
+
}
|
|
18609
|
+
/**
|
|
18610
|
+
* Moves a page to a new position (Alt+ArrowLeft/Right)
|
|
18611
|
+
* @param {String} stageId
|
|
18612
|
+
* @param {Number} toIndex
|
|
18613
|
+
*/
|
|
18614
|
+
movePage(stageId, toIndex) {
|
|
18615
|
+
const ids = this.ids;
|
|
18616
|
+
if (toIndex < 0 || toIndex >= ids.length || ids.indexOf(stageId) === toIndex) return;
|
|
18617
|
+
const order = ids.filter((id) => id !== stageId);
|
|
18618
|
+
order.splice(toIndex, 0, stageId);
|
|
18619
|
+
if (this.stages.reorder(order)) {
|
|
18620
|
+
this.afterReorder();
|
|
18621
|
+
this.tabFor(stageId)?.focus();
|
|
18622
|
+
}
|
|
18623
|
+
}
|
|
18624
|
+
/** Puts the tabs back in page order, e.g. when a reorder was refused */
|
|
18625
|
+
orderTabs() {
|
|
18626
|
+
for (const id of this.ids) {
|
|
18627
|
+
const wrap = this.wrapFor(id);
|
|
18628
|
+
if (wrap) this.tablist.append(wrap);
|
|
18629
|
+
}
|
|
18630
|
+
}
|
|
18631
|
+
afterReorder() {
|
|
18632
|
+
this.orderTabs();
|
|
18633
|
+
for (const id of this.ids) this.wrapper?.append(this.stages.get(id).dom);
|
|
18634
|
+
this.refreshLabels();
|
|
18635
|
+
this.sync();
|
|
18636
|
+
}
|
|
18637
|
+
/**
|
|
18638
|
+
* Makes a tab accept rows, columns, fields and controls from this editor; what lands on it goes to the end
|
|
18639
|
+
* of its page, and the page on screen stays the same
|
|
18640
|
+
* @param {HTMLElement} wrap .formeo-page-tab-wrap
|
|
18641
|
+
* @param {String} stageId
|
|
18642
|
+
*/
|
|
18643
|
+
createDropTarget(wrap, stageId) {
|
|
18644
|
+
const group = (name) => `${name}-${this.components.instanceId}`;
|
|
18645
|
+
Sortable.create(wrap, {
|
|
18646
|
+
group: {
|
|
18647
|
+
name: group("page-tab"),
|
|
18648
|
+
pull: false,
|
|
18649
|
+
put: [
|
|
18650
|
+
"stage",
|
|
18651
|
+
"row",
|
|
18652
|
+
"column",
|
|
18653
|
+
"controls"
|
|
18654
|
+
].map(group)
|
|
18655
|
+
},
|
|
18656
|
+
sort: false,
|
|
18657
|
+
draggable: ".formeo-page-drop-item",
|
|
18658
|
+
onAdd: (evt) => this.onTabDrop(evt, stageId)
|
|
18659
|
+
});
|
|
18660
|
+
}
|
|
18661
|
+
/**
|
|
18662
|
+
* Moves what was dropped on a tab to the end of that tab's page. The target stage's own onAdd sorts out
|
|
18663
|
+
* what it becomes: a row moves, a column gets a new row, a field a new row and column, a control its field.
|
|
18664
|
+
*/
|
|
18665
|
+
onTabDrop({ item, from }, stageId) {
|
|
18666
|
+
const stage = this.stageAt(stageId);
|
|
18667
|
+
if (!stage) return;
|
|
18668
|
+
const children = stage.dom.querySelector(".children");
|
|
18669
|
+
children.appendChild(item);
|
|
18670
|
+
stage.onAdd({
|
|
18671
|
+
from,
|
|
18672
|
+
to: children,
|
|
18673
|
+
item,
|
|
18674
|
+
newIndex: children.children.length - 1
|
|
18675
|
+
});
|
|
18676
|
+
this.afterMove(stageId);
|
|
18677
|
+
}
|
|
18678
|
+
/**
|
|
18679
|
+
* Moves a row to the end of another page ("Move to page")
|
|
18680
|
+
* @param {Row} row
|
|
18681
|
+
* @param {String} stageId
|
|
18682
|
+
* @return {Boolean} whether it moved
|
|
18683
|
+
*/
|
|
18684
|
+
moveToPage(row, stageId) {
|
|
18685
|
+
const stage = this.stageAt(stageId);
|
|
18686
|
+
const source = row?.parent;
|
|
18687
|
+
if (row?.name !== "row" || !stage || !source || source === stage) return false;
|
|
18688
|
+
stage.dom.querySelector(".children").appendChild(row.dom);
|
|
18689
|
+
for (const changed of [stage, source]) {
|
|
18690
|
+
changed.saveChildOrder();
|
|
18691
|
+
changed.emptyClass();
|
|
18692
|
+
}
|
|
18693
|
+
this.afterMove(stageId);
|
|
18694
|
+
return true;
|
|
18695
|
+
}
|
|
18696
|
+
/**
|
|
18697
|
+
* Asks which page a row should move to, then moves it there
|
|
18698
|
+
* @param {Row} row
|
|
18699
|
+
*/
|
|
18700
|
+
openMoveDialog(row) {
|
|
18701
|
+
const currentId = row?.parent?.id;
|
|
18702
|
+
const targets = this.ids.filter((id) => id !== currentId);
|
|
18703
|
+
if (row?.name !== "row" || !targets.length) return;
|
|
18704
|
+
const label = pageText("pages.moveTo");
|
|
18705
|
+
new Dialog({
|
|
18706
|
+
title: label,
|
|
18707
|
+
className: "move-to-page-dialog",
|
|
18708
|
+
content: el("select", {
|
|
18709
|
+
name: "page",
|
|
18710
|
+
className: "move-to-page-select",
|
|
18711
|
+
"aria-label": label
|
|
18712
|
+
}, targets.map((id) => el("option", {
|
|
18713
|
+
value: id,
|
|
18714
|
+
text: this.titleOf(id)
|
|
18715
|
+
}))),
|
|
18716
|
+
confirmText: () => pageText("pages.move"),
|
|
18717
|
+
onConfirm: (formData) => this.moveToPage(row, String(formData.get("page")))
|
|
18718
|
+
}).open();
|
|
18719
|
+
}
|
|
18720
|
+
/**
|
|
18721
|
+
* Highlights a page's tab for a moment and announces "Moved to {title}"
|
|
18722
|
+
* @param {String} stageId
|
|
18723
|
+
*/
|
|
18724
|
+
afterMove(stageId) {
|
|
18725
|
+
const wrap = this.wrapFor(stageId);
|
|
18726
|
+
if (wrap) {
|
|
18727
|
+
clearTimeout(this.flashTimers.get(stageId));
|
|
18728
|
+
wrap.classList.add("formeo-page-tab-flash");
|
|
18729
|
+
this.flashTimers.set(stageId, setTimeout(() => {
|
|
18730
|
+
wrap.classList.remove("formeo-page-tab-flash");
|
|
18731
|
+
this.flashTimers.delete(stageId);
|
|
18732
|
+
}, FLASH_DURATION));
|
|
18733
|
+
}
|
|
18734
|
+
this.announce(pageText("pages.moved", { title: this.titleOf(stageId) }));
|
|
18735
|
+
}
|
|
18736
|
+
/** Releases the bar's Sortables (the tab sorter and every tab's drop target) and timers; the stages keep their DOM */
|
|
18737
|
+
teardown() {
|
|
18738
|
+
this.commitRename();
|
|
18739
|
+
if (this.tablist) destroySortables(this.tablist);
|
|
18740
|
+
for (const timer of this.flashTimers.values()) clearTimeout(timer);
|
|
18741
|
+
this.flashTimers.clear();
|
|
18742
|
+
clearTimeout(this.announceTimer);
|
|
18743
|
+
this.announceTimer = null;
|
|
18744
|
+
}
|
|
18745
|
+
/**
|
|
18746
|
+
* Releases everything this editor's page tabs hold. FormeoEditor#destroy calls it, after the editor's events are
|
|
18747
|
+
* gone, so an open rename is discarded rather than saved: nothing may change the form while it is torn down.
|
|
18748
|
+
*/
|
|
18749
|
+
destroy() {
|
|
18750
|
+
this.commitRename({ save: false });
|
|
18751
|
+
this.teardown();
|
|
18752
|
+
for (const id of [...this.stageListeners.keys()]) this.unwatchStage(id);
|
|
18753
|
+
for (const id of this.ids) {
|
|
18754
|
+
const stageDom = this.stages.get(id)?.dom;
|
|
18755
|
+
if (stageDom?.getAttribute("aria-labelledby") === this.tabId(id)) {
|
|
18756
|
+
stageDom.hidden = false;
|
|
18757
|
+
stageDom.removeAttribute("role");
|
|
18758
|
+
stageDom.removeAttribute("aria-labelledby");
|
|
18759
|
+
}
|
|
18760
|
+
}
|
|
18761
|
+
this.wrapper = null;
|
|
18762
|
+
this.tablist = null;
|
|
18763
|
+
this.status = null;
|
|
18764
|
+
}
|
|
18765
|
+
};
|
|
18766
|
+
//#endregion
|
|
17898
18767
|
//#region src/lib/js/config.js
|
|
17899
18768
|
init_constants();
|
|
17900
18769
|
var defaults = { get editor() {
|
|
@@ -17904,6 +18773,7 @@ var defaults = { get editor() {
|
|
|
17904
18773
|
dataType: "json",
|
|
17905
18774
|
debug: false,
|
|
17906
18775
|
sessionStorage: false,
|
|
18776
|
+
pages: false,
|
|
17907
18777
|
editorContainer: null,
|
|
17908
18778
|
svgSprite: null,
|
|
17909
18779
|
style: CSS_URL,
|
|
@@ -17921,6 +18791,7 @@ var defaults = { get editor() {
|
|
|
17921
18791
|
init_i18n_es_min();
|
|
17922
18792
|
init_dom();
|
|
17923
18793
|
init_loaders();
|
|
18794
|
+
init_sortable();
|
|
17924
18795
|
init_utils();
|
|
17925
18796
|
init_constants();
|
|
17926
18797
|
/**
|
|
@@ -17931,9 +18802,11 @@ var INIT_STATES = {
|
|
|
17931
18802
|
LOADING_RESOURCES: "loading",
|
|
17932
18803
|
INITIALIZING: "initializing",
|
|
17933
18804
|
READY: "ready",
|
|
17934
|
-
ERROR: "error"
|
|
18805
|
+
ERROR: "error",
|
|
18806
|
+
DESTROYED: "destroyed"
|
|
17935
18807
|
};
|
|
17936
18808
|
var storageKeyHolders = /* @__PURE__ */ new Map();
|
|
18809
|
+
var pageTooltip = null;
|
|
17937
18810
|
/**
|
|
17938
18811
|
* Whether an editor is still on the page, or still on its way there. An editor whose container
|
|
17939
18812
|
* left the page or no longer holds its DOM (a remount, a demo switch) no longer owns its key.
|
|
@@ -17941,7 +18814,7 @@ var storageKeyHolders = /* @__PURE__ */ new Map();
|
|
|
17941
18814
|
* @return {Boolean}
|
|
17942
18815
|
*/
|
|
17943
18816
|
var isLiveEditor = (editor) => {
|
|
17944
|
-
if (editor.initState === INIT_STATES.ERROR) return false;
|
|
18817
|
+
if (editor.initState === INIT_STATES.ERROR || editor.initState === INIT_STATES.DESTROYED) return false;
|
|
17945
18818
|
if (!editor.editor) return !editor.editorContainer || editor.editorContainer.isConnected;
|
|
17946
18819
|
return Boolean(editor.editorContainer?.isConnected && editor.editorContainer.contains(editor.editor));
|
|
17947
18820
|
};
|
|
@@ -17953,6 +18826,7 @@ var FormeoEditor$1 = class {
|
|
|
17953
18826
|
#initPromise = null;
|
|
17954
18827
|
#lockedFormData = null;
|
|
17955
18828
|
#dataLoadedOnce = false;
|
|
18829
|
+
#onDOMContentLoaded = () => this.loadResources();
|
|
17956
18830
|
/**
|
|
17957
18831
|
* @param {Object} options formeo options
|
|
17958
18832
|
* @param {String|Object} userFormData loaded formData
|
|
@@ -17982,13 +18856,15 @@ var FormeoEditor$1 = class {
|
|
|
17982
18856
|
actions: this.actions
|
|
17983
18857
|
});
|
|
17984
18858
|
this.Components.config = config;
|
|
18859
|
+
this.pages = opts.pages ? new EditorPages(this.Components) : null;
|
|
18860
|
+
this.Components.pages = this.pages;
|
|
17985
18861
|
if (opts.sessionStorage) {
|
|
17986
18862
|
const key = formDataStorageKey(opts.sessionStorage);
|
|
17987
18863
|
const holder = storageKeyHolders.get(key);
|
|
17988
18864
|
if (holder && isLiveEditor(holder)) console.warn(`formeo: another editor on this page already saves to sessionStorage key "${key}". Give each editor its own key, e.g. sessionStorage: 'orders-form'.`);
|
|
17989
18865
|
storageKeyHolders.set(key, this);
|
|
17990
18866
|
}
|
|
17991
|
-
if (document.readyState === "loading") document.addEventListener("DOMContentLoaded", this
|
|
18867
|
+
if (document.readyState === "loading") document.addEventListener("DOMContentLoaded", this.#onDOMContentLoaded, { once: true });
|
|
17992
18868
|
else this.loadResources();
|
|
17993
18869
|
}
|
|
17994
18870
|
get formData() {
|
|
@@ -18011,6 +18887,7 @@ var FormeoEditor$1 = class {
|
|
|
18011
18887
|
* @return {void}
|
|
18012
18888
|
*/
|
|
18013
18889
|
clear() {
|
|
18890
|
+
if (this.isDestroyed) return;
|
|
18014
18891
|
const defaultData = DEFAULT_FORMDATA();
|
|
18015
18892
|
this.#lockedFormData = defaultData;
|
|
18016
18893
|
this.userFormData = defaultData;
|
|
@@ -18022,7 +18899,8 @@ var FormeoEditor$1 = class {
|
|
|
18022
18899
|
* @return {Promise} asynchronously loaded remote resources
|
|
18023
18900
|
*/
|
|
18024
18901
|
async loadResources() {
|
|
18025
|
-
document.removeEventListener("DOMContentLoaded", this
|
|
18902
|
+
document.removeEventListener("DOMContentLoaded", this.#onDOMContentLoaded);
|
|
18903
|
+
if (this.isDestroyed) return;
|
|
18026
18904
|
this.#initState = INIT_STATES.LOADING_RESOURCES;
|
|
18027
18905
|
const promises = [
|
|
18028
18906
|
fetchIcons(this.opts.svgSprite),
|
|
@@ -18035,8 +18913,10 @@ var FormeoEditor$1 = class {
|
|
|
18035
18913
|
].filter(Boolean);
|
|
18036
18914
|
try {
|
|
18037
18915
|
await Promise.all(promises);
|
|
18916
|
+
if (this.isDestroyed) return;
|
|
18038
18917
|
if (this.opts.allowEdit) this.init();
|
|
18039
18918
|
} catch (error) {
|
|
18919
|
+
if (this.isDestroyed) return;
|
|
18040
18920
|
this.#initState = INIT_STATES.ERROR;
|
|
18041
18921
|
console.error("Failed to load resources:", error);
|
|
18042
18922
|
throw error;
|
|
@@ -18048,10 +18928,15 @@ var FormeoEditor$1 = class {
|
|
|
18048
18928
|
* dom elements, actions events and more.
|
|
18049
18929
|
*/
|
|
18050
18930
|
init() {
|
|
18931
|
+
if (this.isDestroyed) return Promise.resolve(this);
|
|
18051
18932
|
if (this.#initState === INIT_STATES.INITIALIZING) return this.#initPromise;
|
|
18052
18933
|
if (this.#initState === INIT_STATES.READY) return this.#refreshUI();
|
|
18053
18934
|
this.#initState = INIT_STATES.INITIALIZING;
|
|
18054
18935
|
this.#initPromise = new Controls(this.Components).init(this.opts.controls, this.opts.stickyControls).then((controls) => {
|
|
18936
|
+
if (this.isDestroyed) {
|
|
18937
|
+
controls.destroy();
|
|
18938
|
+
return this;
|
|
18939
|
+
}
|
|
18055
18940
|
this.controls = controls;
|
|
18056
18941
|
this.Components.controls = controls;
|
|
18057
18942
|
if (!this.#dataLoadedOnce) {
|
|
@@ -18061,13 +18946,17 @@ var FormeoEditor$1 = class {
|
|
|
18061
18946
|
this.formId = this.Components.get("id");
|
|
18062
18947
|
this.i18n = { setLang: this.#setLanguage.bind(this) };
|
|
18063
18948
|
this.render();
|
|
18949
|
+
if (this.isDestroyed) return this;
|
|
18064
18950
|
this.onResize = this.events.onResizeWindow;
|
|
18065
18951
|
window.addEventListener("resize", this.onResize);
|
|
18066
18952
|
this.#initState = INIT_STATES.READY;
|
|
18067
18953
|
this.opts.onLoad?.(this);
|
|
18954
|
+
if (this.isDestroyed) return this;
|
|
18068
18955
|
this.tooltipInstance = new SmartTooltip();
|
|
18956
|
+
pageTooltip = this.tooltipInstance;
|
|
18069
18957
|
return this;
|
|
18070
18958
|
}).catch((error) => {
|
|
18959
|
+
if (this.isDestroyed) return this;
|
|
18071
18960
|
this.#initState = INIT_STATES.ERROR;
|
|
18072
18961
|
console.error("Failed to initialize editor:", error);
|
|
18073
18962
|
throw error;
|
|
@@ -18089,7 +18978,13 @@ var FormeoEditor$1 = class {
|
|
|
18089
18978
|
* @return {Promise}
|
|
18090
18979
|
*/
|
|
18091
18980
|
async #refreshUI() {
|
|
18092
|
-
|
|
18981
|
+
if (this.isDestroyed) return this;
|
|
18982
|
+
const controls = await new Controls(this.Components).init(this.opts.controls, this.opts.stickyControls);
|
|
18983
|
+
if (this.isDestroyed) {
|
|
18984
|
+
controls.destroy();
|
|
18985
|
+
return this;
|
|
18986
|
+
}
|
|
18987
|
+
this.controls = controls;
|
|
18093
18988
|
this.Components.controls = this.controls;
|
|
18094
18989
|
this.render();
|
|
18095
18990
|
return this;
|
|
@@ -18117,6 +19012,7 @@ var FormeoEditor$1 = class {
|
|
|
18117
19012
|
return DEFAULT_FORMDATA();
|
|
18118
19013
|
}
|
|
18119
19014
|
load(formData = this.userFormData, opts = this.opts) {
|
|
19015
|
+
if (this.isDestroyed) return;
|
|
18120
19016
|
this.Components.load(formData, opts);
|
|
18121
19017
|
this.render();
|
|
18122
19018
|
}
|
|
@@ -18135,16 +19031,28 @@ var FormeoEditor$1 = class {
|
|
|
18135
19031
|
return this.#initState === INIT_STATES.READY;
|
|
18136
19032
|
}
|
|
18137
19033
|
/**
|
|
19034
|
+
* Check if destroy() was called
|
|
19035
|
+
* @return {boolean}
|
|
19036
|
+
*/
|
|
19037
|
+
get isDestroyed() {
|
|
19038
|
+
return this.#initState === INIT_STATES.DESTROYED;
|
|
19039
|
+
}
|
|
19040
|
+
/**
|
|
18138
19041
|
* Wait for the editor to be ready
|
|
18139
19042
|
* @return {Promise} resolves when editor is ready
|
|
18140
19043
|
*/
|
|
18141
19044
|
async whenReady() {
|
|
18142
19045
|
if (this.#initState === INIT_STATES.READY) return this;
|
|
19046
|
+
if (this.isDestroyed) return Promise.reject(/* @__PURE__ */ new Error("Editor was destroyed"));
|
|
18143
19047
|
if (this.#initState === INIT_STATES.ERROR) return Promise.reject(/* @__PURE__ */ new Error("Editor initialization failed"));
|
|
18144
|
-
if (this.#initPromise) return this.#initPromise
|
|
19048
|
+
if (this.#initPromise) return this.#initPromise.then((editor) => {
|
|
19049
|
+
if (this.isDestroyed) throw new Error("Editor was destroyed");
|
|
19050
|
+
return editor;
|
|
19051
|
+
});
|
|
18145
19052
|
return new Promise((resolve, reject) => {
|
|
18146
19053
|
const checkReady = () => {
|
|
18147
19054
|
if (this.#initState === INIT_STATES.READY) resolve(this);
|
|
19055
|
+
else if (this.isDestroyed) reject(/* @__PURE__ */ new Error("Editor was destroyed"));
|
|
18148
19056
|
else if (this.#initState === INIT_STATES.ERROR) reject(/* @__PURE__ */ new Error("Editor initialization failed"));
|
|
18149
19057
|
else globalThis.requestAnimationFrame(checkReady);
|
|
18150
19058
|
};
|
|
@@ -18156,15 +19064,17 @@ var FormeoEditor$1 = class {
|
|
|
18156
19064
|
* @return {void}
|
|
18157
19065
|
*/
|
|
18158
19066
|
render() {
|
|
19067
|
+
if (this.isDestroyed) return;
|
|
18159
19068
|
if (!this.controls) return globalThis.requestAnimationFrame(() => this.render());
|
|
18160
19069
|
this.stages = Object.values(this.Components.get("stages"));
|
|
18161
|
-
|
|
19070
|
+
const stageArea = this.pages ? [this.pages.render()] : this.stages.map(({ dom }) => dom);
|
|
19071
|
+
if (this.opts.controlOnLeft) for (const element of stageArea) element.style.order = 1;
|
|
18162
19072
|
const elemConfig = {
|
|
18163
19073
|
attrs: {
|
|
18164
19074
|
className: "formeo formeo-editor",
|
|
18165
19075
|
id: this.formId
|
|
18166
19076
|
},
|
|
18167
|
-
content: [
|
|
19077
|
+
content: [stageArea]
|
|
18168
19078
|
};
|
|
18169
19079
|
if (s.current.dir) {
|
|
18170
19080
|
elemConfig.attrs.dir = s.current.dir;
|
|
@@ -18186,6 +19096,47 @@ var FormeoEditor$1 = class {
|
|
|
18186
19096
|
}
|
|
18187
19097
|
this.events.formeoLoaded(this);
|
|
18188
19098
|
}
|
|
19099
|
+
/**
|
|
19100
|
+
* Remove the editor from the page and release what it holds: its Sortable instances, resize
|
|
19101
|
+
* observers, window resize listener, pending callbacks and loaded components. Other editors on
|
|
19102
|
+
* the page keep working, and a new editor can mount in the same container.
|
|
19103
|
+
* Safe to call more than once, and before the editor is ready.
|
|
19104
|
+
* @return {void}
|
|
19105
|
+
*/
|
|
19106
|
+
destroy() {
|
|
19107
|
+
if (this.isDestroyed) return;
|
|
19108
|
+
this.#initState = INIT_STATES.DESTROYED;
|
|
19109
|
+
document.removeEventListener("DOMContentLoaded", this.#onDOMContentLoaded);
|
|
19110
|
+
window.removeEventListener("resize", this.onResize);
|
|
19111
|
+
this.events.destroy();
|
|
19112
|
+
this.controls?.destroy();
|
|
19113
|
+
this.pages?.destroy();
|
|
19114
|
+
if (this.opts.sessionStorage) {
|
|
19115
|
+
const key = formDataStorageKey(this.opts.sessionStorage);
|
|
19116
|
+
if (storageKeyHolders.get(key) === this) storageKeyHolders.delete(key);
|
|
19117
|
+
}
|
|
19118
|
+
destroySortables(this.editor);
|
|
19119
|
+
for (const type of [
|
|
19120
|
+
"stages",
|
|
19121
|
+
"rows",
|
|
19122
|
+
"columns",
|
|
19123
|
+
"fields"
|
|
19124
|
+
]) {
|
|
19125
|
+
for (const component of Object.values(this.Components[type]?.data || {})) component.panels?.destroy();
|
|
19126
|
+
this.Components[type]?.empty();
|
|
19127
|
+
}
|
|
19128
|
+
this.editor?.remove();
|
|
19129
|
+
this.Components.empty();
|
|
19130
|
+
if (pageTooltip && !document.querySelector(".formeo-editor")) {
|
|
19131
|
+
pageTooltip.destroy();
|
|
19132
|
+
pageTooltip = null;
|
|
19133
|
+
}
|
|
19134
|
+
this.tooltipInstance = null;
|
|
19135
|
+
this.editor = null;
|
|
19136
|
+
this.controls = null;
|
|
19137
|
+
this.Components.controls = null;
|
|
19138
|
+
this.stages = [];
|
|
19139
|
+
}
|
|
18189
19140
|
};
|
|
18190
19141
|
//#endregion
|
|
18191
19142
|
//#region src/lib/js/renderer/helpers.js
|
|
@@ -18467,7 +19418,7 @@ var focusFirst = (page) => {
|
|
|
18467
19418
|
* `progress` only affects the wizard, adding a clickable step list above the pages
|
|
18468
19419
|
* @param {Array<Object>} stages stage data in render order, for page titles
|
|
18469
19420
|
* @param {Function} [onChange] called with (page, previousPage) whenever the page changes
|
|
18470
|
-
* @return {{show: Function, index: Number, count: Number}|null} null when there is only one page
|
|
19421
|
+
* @return {{show: Function, index: Number, count: Number, destroy: Function}|null} null when there is only one page
|
|
18471
19422
|
*/
|
|
18472
19423
|
var paginate = (form, { type, progress, labels }, stages, onChange) => {
|
|
18473
19424
|
const pages = Array.from(form.children).filter((elem) => elem.classList.contains(STAGE_CLASSNAME));
|
|
@@ -18660,14 +19611,16 @@ var paginate = (form, { type, progress, labels }, stages, onChange) => {
|
|
|
18660
19611
|
}
|
|
18661
19612
|
};
|
|
18662
19613
|
const ownerDocument = form.ownerDocument;
|
|
18663
|
-
|
|
19614
|
+
const onDocumentClick = ({ target }) => {
|
|
18664
19615
|
const control = target.closest?.("button, input");
|
|
18665
19616
|
if (control?.form !== form) return;
|
|
18666
19617
|
if (control?.type === "submit" || control?.tagName === "INPUT" && control.type === "image") markReported();
|
|
18667
|
-
}
|
|
18668
|
-
|
|
19618
|
+
};
|
|
19619
|
+
const onDocumentKeydown = ({ key, target }) => {
|
|
18669
19620
|
if (key === "Enter" && target.tagName === "INPUT" && target.form === form) markReported();
|
|
18670
|
-
}
|
|
19621
|
+
};
|
|
19622
|
+
ownerDocument.addEventListener("click", onDocumentClick, true);
|
|
19623
|
+
ownerDocument.addEventListener("keydown", onDocumentKeydown, true);
|
|
18671
19624
|
for (const method of ["requestSubmit", "reportValidity"]) {
|
|
18672
19625
|
const native = HTMLFormElement.prototype[method];
|
|
18673
19626
|
if (typeof native !== "function") continue;
|
|
@@ -18687,7 +19640,11 @@ var paginate = (form, { type, progress, labels }, stages, onChange) => {
|
|
|
18687
19640
|
get index() {
|
|
18688
19641
|
return current;
|
|
18689
19642
|
},
|
|
18690
|
-
count
|
|
19643
|
+
count,
|
|
19644
|
+
destroy() {
|
|
19645
|
+
ownerDocument.removeEventListener("click", onDocumentClick, true);
|
|
19646
|
+
ownerDocument.removeEventListener("keydown", onDocumentKeydown, true);
|
|
19647
|
+
}
|
|
18691
19648
|
};
|
|
18692
19649
|
};
|
|
18693
19650
|
//#endregion
|
|
@@ -18814,8 +19771,21 @@ var FormeoRenderer$1 = class {
|
|
|
18814
19771
|
formData: this.form
|
|
18815
19772
|
});
|
|
18816
19773
|
}
|
|
19774
|
+
/**
|
|
19775
|
+
* Remove the rendered form from the page and stop its pagination. render() can be called again afterwards.
|
|
19776
|
+
* @return {void}
|
|
19777
|
+
*/
|
|
19778
|
+
destroy() {
|
|
19779
|
+
this.pager?.destroy();
|
|
19780
|
+
this.pager = null;
|
|
19781
|
+
this.renderedForm?.remove();
|
|
19782
|
+
this.renderedForm = null;
|
|
19783
|
+
this.components = Object.create(null);
|
|
19784
|
+
}
|
|
18817
19785
|
getRenderedForm(formData = this.form) {
|
|
18818
19786
|
this.form = cleanFormData(formData);
|
|
19787
|
+
this.pager?.destroy();
|
|
19788
|
+
this.pager = null;
|
|
18819
19789
|
const renderCount = document.getElementsByClassName("formeo-render").length;
|
|
18820
19790
|
const config = {
|
|
18821
19791
|
...this.config,
|