@useinsider/guido 3.2.0 → 3.3.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/README.md +117 -1
- package/dist/@types/config/schemas.js +153 -95
- package/dist/components/Guido.vue.js +4 -4
- package/dist/components/Guido.vue2.js +90 -88
- package/dist/components/organisms/AutoSaveController.vue.js +17 -0
- package/dist/components/organisms/AutoSaveController.vue2.js +13 -0
- package/dist/components/organisms/header/AutoSaveToggle.vue.js +22 -0
- package/dist/components/organisms/header/AutoSaveToggle.vue2.js +19 -0
- package/dist/components/organisms/header/RightSlot.vue.js +8 -8
- package/dist/components/organisms/header/RightSlot.vue2.js +9 -8
- package/dist/components/organisms/onboarding/AMPOnboarding.vue2.js +51 -31
- package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +1 -1
- package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +23 -22
- package/dist/components/organisms/onboarding/ItemsOnboarding.vue.js +1 -1
- package/dist/components/organisms/onboarding/ItemsOnboarding.vue2.js +37 -39
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.js +3 -3
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue2.js +30 -41
- package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue2.js +15 -14
- package/dist/composables/useActionsApi.js +4 -4
- package/dist/composables/useAutoSave.js +71 -0
- package/dist/composables/useFullStoryBridge.js +14 -0
- package/dist/composables/useRecommendation.js +46 -26
- package/dist/composables/useRibbonOffset.js +21 -0
- package/dist/composables/useSave.js +19 -16
- package/dist/composables/useStripo.js +40 -40
- package/dist/composables/validators/useCouponBlockValidator.js +24 -0
- package/dist/config/compiler/recommendationCompilerRules.js +79 -74
- package/dist/config/compiler/unsubscribeCompilerRules.js +40 -37
- package/dist/config/compiler/utils/recommendationCompilerUtils.js +107 -71
- package/dist/config/migrator/index.js +9 -9
- package/dist/config/migrator/radioButtonMigrator.js +64 -44
- package/dist/config/migrator/recommendation/compositionMapper.js +98 -0
- package/dist/config/migrator/recommendation/extractors.js +27 -0
- package/dist/config/migrator/recommendation/htmlBuilder.js +496 -0
- package/dist/config/migrator/recommendation/parseLegacyConfig.js +33 -0
- package/dist/config/migrator/recommendation/settingsMapper.js +70 -0
- package/dist/config/migrator/recommendation/themeMapper.js +93 -0
- package/dist/config/migrator/recommendationMigrator.js +74 -290
- package/dist/enums/extensions/recommendationBlock.js +2 -1
- package/dist/enums/onboarding.js +7 -2
- package/dist/enums/unsubscribe.js +34 -27
- package/dist/extensions/Blocks/Items/controls/price/singlePrice.js +38 -38
- package/dist/extensions/Blocks/Items/enums/productEnums.js +19 -7
- package/dist/extensions/Blocks/RadioButton/template.js +1 -1
- package/dist/extensions/Blocks/Recommendation/block.js +35 -32
- package/dist/extensions/Blocks/Recommendation/constants/controlIds.js +1 -1
- package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +5 -5
- package/dist/extensions/Blocks/Recommendation/controls/customAttribute/index.js +21 -18
- package/dist/extensions/Blocks/Recommendation/controls/customAttribute/textTrim.js +99 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/algorithm.js +27 -26
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +3 -1
- package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +228 -181
- package/dist/extensions/Blocks/Recommendation/controls/name/textTrim.js +27 -57
- package/dist/extensions/Blocks/Recommendation/controls/shared/textTrimCssRules.js +14 -0
- package/dist/extensions/Blocks/Recommendation/services/configService.js +65 -29
- package/dist/extensions/Blocks/Recommendation/settingsPanel.js +18 -17
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +123 -79
- package/dist/extensions/Blocks/Recommendation/templates/grid/elementRenderer.js +19 -10
- package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +8 -8
- package/dist/extensions/Blocks/Recommendation/templates/list/elementRenderer.js +25 -15
- package/dist/extensions/Blocks/Recommendation/templates/list/template.js +11 -11
- package/dist/extensions/Blocks/Recommendation/templates/utils.js +1 -1
- package/dist/extensions/Blocks/Recommendation/utils/filterUtil.js +17 -14
- package/dist/extensions/Blocks/Recommendation/utils/legacyStrategyMap.js +21 -0
- package/dist/extensions/Blocks/Recommendation/utils/preserveTextStyles.js +13 -22
- package/dist/extensions/Blocks/Unsubscribe/block.js +11 -11
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +393 -264
- package/dist/node_modules/valibot/dist/index.js +450 -235
- package/dist/package.json.js +1 -1
- package/dist/services/templateLibraryApi.js +5 -4
- package/dist/src/@types/config/defaults.d.ts +5 -1
- package/dist/src/@types/config/index.d.ts +3 -3
- package/dist/src/@types/config/schemas.d.ts +217 -0
- package/dist/src/@types/config/types.d.ts +9 -1
- package/dist/src/components/Guido.vue.d.ts +1 -1
- package/dist/src/components/organisms/AutoSaveController.vue.d.ts +2 -0
- package/dist/src/components/organisms/header/AutoSaveToggle.vue.d.ts +2 -0
- package/dist/src/components/organisms/header/EditorActions.vue.d.ts +1 -1
- package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +1 -1
- package/dist/src/components/organisms/header/RightSlot.vue.d.ts +1 -1
- package/dist/src/components/wrappers/WpModal.vue.d.ts +1 -1
- package/dist/src/composables/useActionsApi.d.ts +1 -1
- package/dist/src/composables/useAutoSave.d.ts +3 -0
- package/dist/src/composables/useConfig.d.ts +58 -0
- package/dist/src/composables/useFullStoryBridge.d.ts +11 -0
- package/dist/src/composables/useRecommendation.d.ts +10 -1
- package/dist/src/composables/useRecommendation.test.d.ts +1 -0
- package/dist/src/composables/useRibbonOffset.d.ts +4 -0
- package/dist/src/composables/useSave.d.ts +1 -1
- package/dist/src/composables/validators/useCouponBlockValidator.d.ts +3 -0
- package/dist/src/config/migrator/index.d.ts +2 -1
- package/dist/src/config/migrator/recommendation/compositionMapper.d.ts +2 -0
- package/dist/src/config/migrator/recommendation/compositionMapper.test.d.ts +1 -0
- package/dist/src/config/migrator/recommendation/extractors.d.ts +7 -0
- package/dist/src/config/migrator/recommendation/extractors.test.d.ts +1 -0
- package/dist/src/config/migrator/recommendation/htmlBuilder.d.ts +11 -0
- package/dist/src/config/migrator/recommendation/parseLegacyConfig.d.ts +15 -0
- package/dist/src/config/migrator/recommendation/parseLegacyConfig.test.d.ts +1 -0
- package/dist/src/config/migrator/recommendation/settingsMapper.d.ts +7 -0
- package/dist/src/config/migrator/recommendation/settingsMapper.test.d.ts +1 -0
- package/dist/src/config/migrator/recommendation/themeMapper.d.ts +5 -0
- package/dist/src/config/migrator/recommendation/themeMapper.test.d.ts +1 -0
- package/dist/src/config/migrator/recommendation/types.d.ts +205 -0
- package/dist/src/config/migrator/recommendationMigrator.d.ts +13 -1
- package/dist/src/config/migrator/recommendationMigrator.test.d.ts +1 -0
- package/dist/src/enums/onboarding.d.ts +6 -0
- package/dist/src/enums/unsubscribe.d.ts +5 -0
- package/dist/src/extensions/Blocks/RadioButton/template.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/constants/controlIds.d.ts +1 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/customAttribute/index.d.ts +3 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/customAttribute/textTrim.d.ts +35 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.test.d.ts +1 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/textTrim.d.ts +3 -20
- package/dist/src/extensions/Blocks/Recommendation/controls/shared/textTrimCssRules.d.ts +29 -0
- package/dist/src/extensions/Blocks/Recommendation/services/configService.d.ts +10 -0
- package/dist/src/extensions/Blocks/Recommendation/services/configService.test.d.ts +1 -0
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +34 -0
- package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/utils/legacyStrategyMap.d.ts +21 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/legacyStrategyMap.test.d.ts +1 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/preserveTextStyles.d.ts +0 -3
- package/dist/src/library.d.ts +1 -1
- package/dist/src/stores/autosave.d.ts +12 -0
- package/dist/src/stores/config.d.ts +522 -0
- package/dist/src/stores/editor.d.ts +23 -0
- package/dist/src/stores/onboarding.d.ts +4 -0
- package/dist/src/utils/htmlEscape.d.ts +5 -0
- package/dist/src/utils/htmlEscape.test.d.ts +1 -0
- package/dist/src/utils/timeUtil.d.ts +8 -0
- package/dist/static/styles/components/button.css.js +16 -9
- package/dist/static/styles/components/loader.css.js +4 -0
- package/dist/static/styles/components/narrow-panel.css.js +52 -0
- package/dist/stores/autosave.js +17 -0
- package/dist/stores/editor.js +3 -1
- package/dist/stores/onboarding.js +4 -0
- package/dist/utils/htmlEscape.js +13 -0
- package/dist/utils/pairProductVariables.js +89 -88
- package/dist/utils/templatePreparation.js +72 -32
- package/dist/utils/timeUtil.js +19 -0
- package/package.json +7 -3
- package/dist/enums/displayConditions.js +0 -80
- package/dist/extensions/Blocks/Recommendation/templates/grid/migration.js +0 -251
- package/dist/src/enums/displayConditions.d.ts +0 -2
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
var
|
|
1
|
+
var x = class d {
|
|
2
2
|
/**
|
|
3
3
|
* Validates that all required methods are properly implemented in the subclass.
|
|
4
4
|
* @param requiredMethods - Array of method names that must be implemented
|
|
5
5
|
* @param classRef - Reference to the class constructor for validation caching
|
|
6
6
|
*/
|
|
7
|
-
constructor(t,
|
|
8
|
-
if (
|
|
9
|
-
d.validatedClasses.has(
|
|
10
|
-
const
|
|
11
|
-
if (
|
|
7
|
+
constructor(t, r) {
|
|
8
|
+
if (r !== d) {
|
|
9
|
+
d.validatedClasses.has(r) || this.validateImplementation(t, r);
|
|
10
|
+
const s = d.validationErrors.get(r);
|
|
11
|
+
if (s && s.length > 0)
|
|
12
12
|
throw new Error(
|
|
13
|
-
`${
|
|
14
|
-
${
|
|
13
|
+
`${r.name} has validation errors:
|
|
14
|
+
${s.map((o) => ` - ${o}`).join(`
|
|
15
15
|
`)}`
|
|
16
16
|
);
|
|
17
17
|
}
|
|
@@ -20,23 +20,30 @@ ${i.map((o) => ` - ${o}`).join(`
|
|
|
20
20
|
* Validates that all required methods are properly implemented in the subclass.
|
|
21
21
|
* This validation runs only once per class type and results are cached.
|
|
22
22
|
*/
|
|
23
|
-
validateImplementation(t,
|
|
24
|
-
var
|
|
25
|
-
const
|
|
23
|
+
validateImplementation(t, r) {
|
|
24
|
+
var y;
|
|
25
|
+
const s = [], o = r.name, W = Object.getPrototypeOf(this);
|
|
26
26
|
t.forEach((u) => {
|
|
27
27
|
if (typeof this[u] != "function") {
|
|
28
|
-
|
|
28
|
+
s.push(`Method ${u}() is not defined`);
|
|
29
29
|
return;
|
|
30
30
|
}
|
|
31
|
-
|
|
32
|
-
}), d.validatedClasses.add(
|
|
31
|
+
W[u] === r.prototype[u] && s.push(`Method ${u}() must be implemented (currently using base class error-throwing implementation)`);
|
|
32
|
+
}), d.validatedClasses.add(r), s.length > 0 ? (d.validationErrors.set(r, s), console.error(`[${o} Validation] ${o} validation failed:`, s)) : typeof process < "u" && ((y = process.env) == null ? void 0 : y.NODE_ENV) === "development" && console.log(`[${o} Validation] ✅ ${o} validated successfully`);
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Lifecycle method for cleaning up resources (e.g., removing DOM artifacts from document.body).
|
|
36
|
+
* Override this method in subclasses to implement custom cleanup logic.
|
|
37
|
+
* Called when the editor is reinitialized or the extension is uninstalled.
|
|
38
|
+
*/
|
|
39
|
+
destroy() {
|
|
33
40
|
}
|
|
34
41
|
};
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
var
|
|
42
|
+
x.validatedClasses = /* @__PURE__ */ new Set();
|
|
43
|
+
x.validationErrors = /* @__PURE__ */ new Map();
|
|
44
|
+
var i = x, z = /* @__PURE__ */ ((e) => (e.BLOCK = "BLOCK", e.CONTAINER = "CONTAINER", e.STRUCTURE = "STRUCTURE", e.STRIPE = "STRIPE", e))(z || {}), P = class T extends i {
|
|
38
45
|
constructor() {
|
|
39
|
-
super(
|
|
46
|
+
super(T.REQUIRED_METHODS, T);
|
|
40
47
|
}
|
|
41
48
|
/**
|
|
42
49
|
* Determines if the block should be available for use in the editor.
|
|
@@ -133,6 +140,14 @@ var s = B, $ = /* @__PURE__ */ ((e) => (e.BLOCK = "BLOCK", e.STRUCTURE = "STRUCT
|
|
|
133
140
|
shouldDisplayQuickAddIcon() {
|
|
134
141
|
return !1;
|
|
135
142
|
}
|
|
143
|
+
/**
|
|
144
|
+
* Determines if the block should be shown in the blocks panel.
|
|
145
|
+
* Override to hide the block from the blocks panel while keeping it available elsewhere.
|
|
146
|
+
* @returns True if the block should appear in the blocks panel. Defaults to true.
|
|
147
|
+
*/
|
|
148
|
+
shouldDisplayInBlocksPanel() {
|
|
149
|
+
return !0;
|
|
150
|
+
}
|
|
136
151
|
/**
|
|
137
152
|
* @description Determines if nested blocks selection allowed in extension of type {@link BlockCompositionType.STRUCTURE}
|
|
138
153
|
*/
|
|
@@ -145,6 +160,9 @@ var s = B, $ = /* @__PURE__ */ ((e) => (e.BLOCK = "BLOCK", e.STRUCTURE = "STRUCT
|
|
|
145
160
|
allowInnerBlocksDND() {
|
|
146
161
|
return !0;
|
|
147
162
|
}
|
|
163
|
+
allowInteractWithAMPWhenSelected() {
|
|
164
|
+
return !0;
|
|
165
|
+
}
|
|
148
166
|
/**
|
|
149
167
|
* Gets the unique identifier for this block type.
|
|
150
168
|
* This ID is used for registration and referencing the block.
|
|
@@ -161,6 +179,14 @@ var s = B, $ = /* @__PURE__ */ ((e) => (e.BLOCK = "BLOCK", e.STRUCTURE = "STRUCT
|
|
|
161
179
|
getTemplate() {
|
|
162
180
|
throw new Error("Method getTemplate() must be implemented by the subclass");
|
|
163
181
|
}
|
|
182
|
+
/**
|
|
183
|
+
* Gets a CSS template string that contains the custom styles that apply to the block.
|
|
184
|
+
* This CSS will be used when a block is dragged into the editor and removed when the last block is deleted.
|
|
185
|
+
* @returns An CSS string.
|
|
186
|
+
*/
|
|
187
|
+
getTemplateStyles() {
|
|
188
|
+
return "";
|
|
189
|
+
}
|
|
164
190
|
/**
|
|
165
191
|
* Gets the URL or path to the icon representing this block in the editor's block panel.
|
|
166
192
|
* @returns A string representing the icon source (e.g., URL, data URI).
|
|
@@ -195,15 +221,14 @@ var s = B, $ = /* @__PURE__ */ ((e) => (e.BLOCK = "BLOCK", e.STRUCTURE = "STRUCT
|
|
|
195
221
|
throw new Error("Method getDescription() must be implemented by the subclass");
|
|
196
222
|
}
|
|
197
223
|
};
|
|
198
|
-
|
|
199
|
-
var
|
|
224
|
+
P.REQUIRED_METHODS = ["getId", "getTemplate", "getIcon", "getName", "getDescription"];
|
|
225
|
+
var Ze = P, Z = class I extends i {
|
|
200
226
|
constructor() {
|
|
201
|
-
super(
|
|
227
|
+
super(I.REQUIRED_METHODS, I);
|
|
202
228
|
}
|
|
203
229
|
/**
|
|
204
230
|
* @deprecated - use {@link getPreviewInnerHtml} instead
|
|
205
231
|
*/
|
|
206
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
207
232
|
getPreviewHtml(t) {
|
|
208
233
|
}
|
|
209
234
|
/**
|
|
@@ -213,8 +238,8 @@ var Qe = v, W = class T extends s {
|
|
|
213
238
|
throw new Error("Method getPreviewInnerHtml() must be implemented by the subclass");
|
|
214
239
|
}
|
|
215
240
|
};
|
|
216
|
-
|
|
217
|
-
var
|
|
241
|
+
Z.REQUIRED_METHODS = ["getPreviewInnerHtml"];
|
|
242
|
+
var qe = class {
|
|
218
243
|
/**
|
|
219
244
|
* Generates HTML representation for a block item
|
|
220
245
|
* @param block - The block item to generate HTML for
|
|
@@ -232,6 +257,13 @@ var fe = class {
|
|
|
232
257
|
isBlockHintVisible(e) {
|
|
233
258
|
return !0;
|
|
234
259
|
}
|
|
260
|
+
/**
|
|
261
|
+
* Determines whether a draggable handle should be displayed in modules panel
|
|
262
|
+
* @returns True if the block panel should be reorderable
|
|
263
|
+
*/
|
|
264
|
+
isPanelPlacementChangeEnabled() {
|
|
265
|
+
return !0;
|
|
266
|
+
}
|
|
235
267
|
/**
|
|
236
268
|
* Gets the hint text for a block
|
|
237
269
|
* @param block - The block item to get hint for
|
|
@@ -281,7 +313,7 @@ var fe = class {
|
|
|
281
313
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
282
314
|
getModulesTabIconName(e) {
|
|
283
315
|
}
|
|
284
|
-
},
|
|
316
|
+
}, q = class b extends i {
|
|
285
317
|
constructor() {
|
|
286
318
|
super(b.REQUIRED_METHODS, b);
|
|
287
319
|
}
|
|
@@ -298,86 +330,86 @@ var fe = class {
|
|
|
298
330
|
throw new Error("Method onClick() must be implemented by the subclass");
|
|
299
331
|
}
|
|
300
332
|
};
|
|
301
|
-
|
|
302
|
-
var
|
|
333
|
+
q.REQUIRED_METHODS = ["getId", "getIcon", "getLabel", "onClick"];
|
|
334
|
+
var j = {
|
|
303
335
|
src: "src",
|
|
304
336
|
alt: "alt",
|
|
305
337
|
href: "href",
|
|
306
338
|
width: "width",
|
|
307
339
|
height: "height"
|
|
308
|
-
},
|
|
309
|
-
BLOCK_IMAGE:
|
|
310
|
-
},
|
|
311
|
-
BLOCK_BUTTON:
|
|
312
|
-
BLOCK_TEXT:
|
|
313
|
-
BLOCK_IMAGE:
|
|
314
|
-
GENERAL:
|
|
315
|
-
},
|
|
340
|
+
}, je = {
|
|
341
|
+
BLOCK_IMAGE: j
|
|
342
|
+
}, U = "esd-block-button", w = "esd-block-text", K = "esd-block-image", J = "esd-structure", ee = "esd-block-video", te = "esd-block-social", re = "esd-block-banner", ae = "esd-block-timer", ne = "esd-block-menu", se = "esd-block-html", ie = "esd-block-spacer", le = "esd-container-frame", Ee = "esd-stripe", oe = "esd-amp-form", c = ((e) => (e.BUTTON = `.${U}`, e.TEXT = `.${w}`, e.IMAGE = `.${K}`, e.STRUCTURE = `.${J}`, e.VIDEO = `.${ee}`, e.SOCIAL = `.${te}`, e.BANNER = `.${re}`, e.TIMER = `.${ae}`, e.MENU = `.${ne}`, e.HTML = `.${se}`, e.SPACER = `.${ie}`, e.CONTAINER = `.${le}`, e.STRIPE = `.${Ee}`, e.FORM = `.${oe}`, e))(c || {}), de = /* @__PURE__ */ ((e) => (e.BLOCK_IMAGE = "BLOCK_IMAGE", e.BLOCK_TEXT = "BLOCK_TEXT", e.BLOCK_BUTTON = "BLOCK_BUTTON", e.BLOCK_SPACER = "BLOCK_SPACER", e.BLOCK_VIDEO = "BLOCK_VIDEO", e.BLOCK_SOCIAL = "BLOCK_SOCIAL", e.BLOCK_BANNER = "BLOCK_BANNER", e.BLOCK_TIMER = "BLOCK_TIMER", e.BLOCK_MENU = "BLOCK_MENU", e.BLOCK_MENU_ITEM = "BLOCK_MENU_ITEM", e.BLOCK_HTML = "BLOCK_HTML", e.BLOCK_AMP_CAROUSEL = "BLOCK_AMP_CAROUSEL", e.BLOCK_AMP_ACCORDION = "BLOCK_AMP_ACCORDION", e.BLOCK_AMP_FORM = "BLOCK_AMP_FORM", e.CONTAINER = "CONTAINER", e.FORM_CONTAINER = "FORM_CONTAINER", e.STRUCTURE = "STRUCTURE", e.STRIPE = "STRIPE", e.EMPTY_CONTAINER = "EMPTY_CONTAINER", e.CUSTOM_BLOCK_LINK = "CUSTOM_BLOCK_LINK", e.CUSTOM_BLOCK_IMAGE = "CUSTOM_BLOCK_IMAGE", e.CUSTOM_BLOCK_TEXT = "CUSTOM_BLOCK_TEXT", e))(de || {}), F = /* @__PURE__ */ ((e) => (e.ANCHOR_LINK_CONTAINER = "anchorLinkFormContainer", e.APPLY_CONDITION = "applyCondition", e.APPLY_CONDITION_SWITCHER = "applyConditionSwitcher", e.BACKGROUND_COLOR = "backgroundColor", e.BACKGROUND_IMAGE = "generalImageContainer", e.TEXT_COLOR = "textColor", e.TEXT_STYLE = "textStyle", e.TEXT_SIZE = "textSize", e.TEXT_LINE_SPACING = "textLineSpacing", e.TEXT_ALIGN = "textAlign", e.FIXED_HEIGHT_SWITCHER = "fixedHeightSwitcherForm", e.HIDDEN_NODE = "hiddenNode", e.SMART_BLOCK = "smartBlock", e.SYNCHRONIZED_MODULE = "synchronizedModuleForm", e.FONT_FAMILY = "generalFontFamilyForm", e.BLOCK_INTERNAL_INDENTS = "generalBlockInternalIndents", e.STRUCTURE_INTERNAL_INDENTS = "generalStructureInternalIndents", e))(F || {}), H = /* @__PURE__ */ ((e) => (e.ADJUST_TO_WIDTH = "adjustToWidth", e.ALIGNMENT = "buttonAlignment", e.BORDER = "buttonBorder", e.BORDER_RADIUS = "buttonBorderRadius", e.COLOR = "buttonColor", e.BUTTON_BLOCK_BACKGROUND_COLOR = "buttonBlockBackgroundColor", e.EXTERNAL_INDENTS = "buttonExternalIndents", e.FIXED_HEIGHT = "buttonFixedHeightForm", e.FONT_COLOR = "buttonFontColor", e.FONT_FAMILY = "buttonFontFamily", e.FONT_SIZE = "buttonFontSize", e.ICON = "buttonIconContainer", e.ICON_ALIGN = "buttonIconAlign", e.ICON_INDENT = "buttonIconIndent", e.ICON_WIDTH = "buttonIconWidth", e.IMAGE = "buttonImageForm", e.INTERNAL_INDENTS = "buttonInternalIndents", e.LINK = "buttonLink", e.MIME_TYPE = "buttonMimeTypeForm", e.SWITCHER_HOVERED_STYLES = "buttonSwitcherHoveredStylesForm", e.TEXT = "buttonText", e.TEXT_STYLE_AND_COLOR = "buttonTextStyleAndColorForm", e.HOVERED_BORDER_COLOR = "hoveredStyleBorderButtonForm", e.HOVERED_COLOR = "hoveredButtonColorForm", e.HOVERED_TEXT_COLOR = "hoveredButtonTextColorForm", e))(H || {}), k = /* @__PURE__ */ ((e) => (e.HIDDEN_NODE = "hiddenNodeText", e.PARAGRAPH_STYLE = "paragraphStyleForm", e.ALIGN = "textAlignmentForm", e.ANCHOR_CONTAINER = "textAnchorForm", e.FONT_BACKGROUND_COLOR = "textBlockFontBackgroundColor", e.TEXT_BLOCK_BACKGROUND_COLOR = "textBlockBackgroundColor", e.FONT_COLOR = "textBlockFontColor", e.TEXT_BLOCK_FONT_FAMILY = "textBlockFontFamily", e.FONT_FAMILY = "textFontFamily", e.FONT_SIZE = "textBlockFontSize", e.FONT_WEIGHT = "textBlockFontWeight", e.DIRECTION = "textBlockDirectionForm", e.INSERT_FORM = "textBlockInsertForm", e.LINK_DATA = "textBlockLinkDataForm", e.FORMAT = "textBlockTextFormatForm", e.FIXED_HEIGHT = "textFixedHeightForm", e.INTERNAL_INDENTS = "textInternalIndents", e.LINE_HEIGHT = "textLineHeightForm", e.MIME_TYPE = "textMimeTypeForm", e.NO_LINE_WRAPS = "textNoLineWrapsForm", e))(k || {}), p = /* @__PURE__ */ ((e) => (e.ALT_TEXT = "altText", e.LINK = "blockLink", e.ALIGNMENT = "imageAlignment", e.ANCHOR_LINK_CONTAINER = "imageAnchorLinkContainerForm", e.BORDER_RADIUS = "imageBorderRadiusForm", e.IMAGE = "imageImageForm", e.EXTERNAL_INDENTS = "imageExternalIndents", e.MIME_TYPE = "imageMimeTypeForm", e.RESPONSIVE = "imageResponsive", e.ROLLOVER_IMAGE = "imageRolloverImageForm", e.ROLLOVER_SWITCHER = "imageRolloverSwitcherForm", e.SIZE = "imageSizeContainer", e))(p || {}), ue = /* @__PURE__ */ ((e) => (e.BACKGROUND_COLOR = "containerBackgroundColorForm", e.BORDER_FORM = "containerBorderForm", e.BORDER_RADIUS = "containerBorderRadiusForm", e.EXTERNAL_INDENTS = "containerExternalIndentsForm", e.IMAGE_CONTAINER = "containerImageContainerForm", e.MIME_TYPE = "containerMimeTypeForm", e.DISPLAY_CONDITIONS = "displayConditions", e.HIDDEN_NODE = "containerHiddenNodeForm", e))(ue || {}), n = {
|
|
343
|
+
BLOCK_BUTTON: H,
|
|
344
|
+
BLOCK_TEXT: k,
|
|
345
|
+
BLOCK_IMAGE: p,
|
|
346
|
+
GENERAL: F
|
|
347
|
+
}, ce = /* @__PURE__ */ ((e) => (e.previewDeviceMode = "previewDeviceMode", e.panelPosition = "panelPosition", e.themeMode = "themeMode", e))(ce || {}), Te = /* @__PURE__ */ ((e) => (e.DESKTOP = "DESKTOP", e.MOBILE = "MOBILE", e))(Te || {}), Ie = /* @__PURE__ */ ((e) => (e.SETTINGS = "settings", e.STYLES = "styles", e.DATA = "data", e))(Ie || {}), a = {
|
|
316
348
|
name: "name",
|
|
317
349
|
disabled: "disabled"
|
|
318
|
-
},
|
|
319
|
-
...
|
|
350
|
+
}, be = {
|
|
351
|
+
...a,
|
|
320
352
|
caption: "caption",
|
|
321
353
|
icon: "icon"
|
|
322
|
-
},
|
|
323
|
-
...
|
|
354
|
+
}, he = {
|
|
355
|
+
...a,
|
|
324
356
|
caption: "caption"
|
|
325
|
-
},
|
|
326
|
-
...
|
|
357
|
+
}, me = {
|
|
358
|
+
...a,
|
|
327
359
|
minValue: "min-value",
|
|
328
360
|
maxValue: "max-value",
|
|
329
361
|
step: "step"
|
|
330
|
-
},
|
|
331
|
-
...
|
|
362
|
+
}, ge = {
|
|
363
|
+
...a,
|
|
332
364
|
placeholder: "placeholder",
|
|
333
365
|
minDate: "min-date"
|
|
334
|
-
},
|
|
335
|
-
...
|
|
366
|
+
}, Oe = {
|
|
367
|
+
...a,
|
|
336
368
|
text: "text",
|
|
337
369
|
hint: "hint"
|
|
338
|
-
},
|
|
339
|
-
...
|
|
370
|
+
}, Re = {
|
|
371
|
+
...a,
|
|
340
372
|
type: "type"
|
|
341
|
-
},
|
|
342
|
-
...
|
|
373
|
+
}, Le = {
|
|
374
|
+
...a,
|
|
343
375
|
buttons: "buttons"
|
|
344
|
-
},
|
|
345
|
-
...
|
|
376
|
+
}, X = {
|
|
377
|
+
...a,
|
|
346
378
|
searchable: "searchable",
|
|
347
379
|
multiSelect: "multi-select",
|
|
348
380
|
placeholder: "placeholder",
|
|
349
381
|
items: "items"
|
|
350
|
-
},
|
|
351
|
-
...
|
|
382
|
+
}, _e = {
|
|
383
|
+
...X,
|
|
352
384
|
addCustomFontOption: "add-custom-font-option"
|
|
353
|
-
},
|
|
354
|
-
...
|
|
385
|
+
}, Ce = {
|
|
386
|
+
...a,
|
|
355
387
|
text: "text",
|
|
356
388
|
value: "value"
|
|
357
|
-
},
|
|
358
|
-
...
|
|
389
|
+
}, Ae = {
|
|
390
|
+
...a,
|
|
359
391
|
text: "text",
|
|
360
392
|
hint: "hint",
|
|
361
393
|
icon: "icon",
|
|
362
394
|
value: "value"
|
|
363
|
-
},
|
|
364
|
-
...
|
|
395
|
+
}, Ne = {
|
|
396
|
+
...a,
|
|
365
397
|
buttons: "buttons"
|
|
366
|
-
},
|
|
367
|
-
...
|
|
398
|
+
}, De = {
|
|
399
|
+
...a,
|
|
368
400
|
text: "text",
|
|
369
401
|
hint: "hint",
|
|
370
402
|
icon: "icon",
|
|
371
403
|
value: "value"
|
|
372
|
-
},
|
|
373
|
-
...
|
|
404
|
+
}, Se = {
|
|
405
|
+
...a,
|
|
374
406
|
placeholder: "placeholder"
|
|
375
|
-
},
|
|
376
|
-
...
|
|
407
|
+
}, Me = {
|
|
408
|
+
...a,
|
|
377
409
|
resizable: "resizable",
|
|
378
410
|
placeholder: "placeholder"
|
|
379
|
-
},
|
|
380
|
-
...
|
|
411
|
+
}, Be = {
|
|
412
|
+
...a,
|
|
381
413
|
img: "img",
|
|
382
414
|
src: "src",
|
|
383
415
|
title: "title",
|
|
@@ -387,50 +419,61 @@ var Z = {
|
|
|
387
419
|
isActive: "is-active",
|
|
388
420
|
visibility: "visibility",
|
|
389
421
|
transform: "transform"
|
|
390
|
-
},
|
|
391
|
-
...
|
|
422
|
+
}, xe = {
|
|
423
|
+
...a,
|
|
392
424
|
controlId: "control-id"
|
|
393
|
-
},
|
|
394
|
-
...
|
|
425
|
+
}, ve = {
|
|
426
|
+
...a,
|
|
395
427
|
expanded: "expanded"
|
|
396
|
-
},
|
|
397
|
-
...
|
|
428
|
+
}, ye = {
|
|
429
|
+
...a,
|
|
398
430
|
icon: "icon",
|
|
399
431
|
position: "position"
|
|
400
|
-
},
|
|
401
|
-
...
|
|
402
|
-
}, ye = {
|
|
403
|
-
...r,
|
|
404
|
-
icon: "icon"
|
|
432
|
+
}, Pe = {
|
|
433
|
+
...a
|
|
405
434
|
}, Ue = {
|
|
406
|
-
...
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
435
|
+
...a,
|
|
436
|
+
icon: "icon"
|
|
437
|
+
}, we = {
|
|
438
|
+
...a
|
|
439
|
+
}, Ke = {
|
|
440
|
+
...a,
|
|
441
|
+
blockId: "block-id"
|
|
442
|
+
}, Fe = {
|
|
443
|
+
...a
|
|
444
|
+
}, He = {
|
|
445
|
+
...a,
|
|
446
|
+
placeholder: "placeholder"
|
|
447
|
+
}, Je = {
|
|
448
|
+
DEFAULT: a,
|
|
449
|
+
BUTTON: be,
|
|
450
|
+
CHECKBOX: he,
|
|
451
|
+
CHECK_BUTTONS: Ne,
|
|
452
|
+
COLOR: a,
|
|
453
|
+
COUNTER: me,
|
|
454
|
+
DATEPICKER: ge,
|
|
455
|
+
LABEL: Oe,
|
|
456
|
+
MESSAGE: Re,
|
|
457
|
+
RADIO_BUTTONS: Le,
|
|
458
|
+
SELECTPICKER: X,
|
|
459
|
+
FONT_FAMILY_SELECT: _e,
|
|
460
|
+
SWITCHER: a,
|
|
461
|
+
TEXT: Se,
|
|
462
|
+
TEXTAREA: Me,
|
|
463
|
+
ICON: Be,
|
|
464
|
+
CHECK_ITEM: Ae,
|
|
465
|
+
SELECT_ITEM: Ce,
|
|
466
|
+
RADIO_ITEM: De,
|
|
467
|
+
NESTED_CONTROL: xe,
|
|
468
|
+
EXPANDABLE: ve,
|
|
469
|
+
ORDERABLE: ye,
|
|
470
|
+
ORDERABLE_ITEM: Pe,
|
|
471
|
+
ORDERABLE_ICON: Ue,
|
|
472
|
+
REPEATABLE: we,
|
|
473
|
+
DRAGGABLE_BLOCK: Ke,
|
|
474
|
+
AMP_FORM_SERVICE_PICKER: Fe,
|
|
475
|
+
MULTIPLE_SELECT: He
|
|
476
|
+
}, ke = /* @__PURE__ */ ((e) => (e.BUTTON = "UE-BUTTON", e.CHECKBOX = "UE-CHECKBOX", e.CHECK_BUTTONS = "UE-CHECK-BUTTONS", e.COLOR = "UE-COLOR", e.COUNTER = "UE-COUNTER", e.DATEPICKER = "UE-DATEPICKER", e.LABEL = "UE-LABEL", e.MESSAGE = "UE-MESSAGE", e.RADIO_BUTTONS = "UE-RADIO-BUTTONS", e.SELECTPICKER = "UE-SELECT", e.SWITCHER = "UE-SWITCHER", e.TEXT = "UE-TEXT", e.TEXTAREA = "UE-TEXTAREA", e.CHECK_ITEM = "UE-CHECK-ITEM", e.RADIO_ITEM = "UE-RADIO-ITEM", e.SELECT_ITEM = "UE-SELECT-ITEM", e.ICON = "UE-ICON", e.MERGETAGS = "UE-MERGETAGS", e.FONT_FAMILY_SELECT = "UE-FONT-FAMILY-SELECT", e.NESTED_CONTROL = "UE-NESTED-CONTROL", e.EXPANDABLE = "UE-EXPANDABLE", e.EXPANDABLE_HEADER = "UE-EXPANDABLE_HEADER", e.EXPANDABLE_CONTENT = "UE-EXPANDABLE_CONTENT", e.ORDERABLE = "UE-ORDERABLE", e.ORDERABLE_ITEM = "UE-ORDERABLE-ITEM", e.ORDERABLE_ICON = "UE-ORDERABLE-ICON", e.REPEATABLE = "UE-REPEATABLE", e.DRAGGABLE_BLOCK = "UE-DRAGGABLE-BLOCK", e.AMP_FORM_SERVICE_PICKER = "UE-AMP-FORM-SERVICE-PICKER", e.MULTIPLE_SELECT = "UE-MULTIPLE_SELECT", e.SCROLLABLE = "UE-SCROLLABLE-CONTAINER", e))(ke || {}), v = class {
|
|
434
477
|
/**
|
|
435
478
|
* @description returns map of nodes parent control operates on
|
|
436
479
|
*/
|
|
@@ -461,68 +504,68 @@ var Z = {
|
|
|
461
504
|
isVisible(e) {
|
|
462
505
|
return !0;
|
|
463
506
|
}
|
|
464
|
-
}, l = class extends
|
|
507
|
+
}, l = class extends v {
|
|
465
508
|
getTargetNodes(e) {
|
|
466
|
-
const t = e.querySelectorAll(
|
|
467
|
-
return t.length ? t :
|
|
509
|
+
const t = e.querySelectorAll(c.BUTTON), r = e.asElement().hasClass(U) ? [e] : [];
|
|
510
|
+
return t.length ? t : r;
|
|
468
511
|
}
|
|
469
|
-
},
|
|
512
|
+
}, et = class extends l {
|
|
470
513
|
getParentControlId() {
|
|
471
|
-
return
|
|
514
|
+
return n.BLOCK_BUTTON.BORDER_RADIUS;
|
|
472
515
|
}
|
|
473
516
|
getLabels() {
|
|
474
517
|
}
|
|
475
|
-
},
|
|
518
|
+
}, tt = class extends l {
|
|
476
519
|
getParentControlId() {
|
|
477
|
-
return
|
|
520
|
+
return n.BLOCK_BUTTON.ALIGNMENT;
|
|
478
521
|
}
|
|
479
|
-
},
|
|
522
|
+
}, rt = class extends l {
|
|
480
523
|
getParentControlId() {
|
|
481
|
-
return
|
|
524
|
+
return n.GENERAL.BACKGROUND_COLOR;
|
|
482
525
|
}
|
|
483
|
-
},
|
|
526
|
+
}, at = class extends l {
|
|
484
527
|
getParentControlId() {
|
|
485
|
-
return
|
|
528
|
+
return n.BLOCK_BUTTON.BORDER;
|
|
486
529
|
}
|
|
487
530
|
getLabels() {
|
|
488
531
|
}
|
|
489
|
-
},
|
|
532
|
+
}, nt = class extends l {
|
|
490
533
|
getParentControlId() {
|
|
491
|
-
return
|
|
534
|
+
return n.BLOCK_BUTTON.COLOR;
|
|
492
535
|
}
|
|
493
|
-
},
|
|
536
|
+
}, st = class extends l {
|
|
494
537
|
getParentControlId() {
|
|
495
|
-
return
|
|
538
|
+
return n.BLOCK_BUTTON.ADJUST_TO_WIDTH;
|
|
496
539
|
}
|
|
497
|
-
},
|
|
540
|
+
}, it = class extends l {
|
|
498
541
|
getParentControlId() {
|
|
499
|
-
return
|
|
542
|
+
return n.BLOCK_BUTTON.FONT_FAMILY;
|
|
500
543
|
}
|
|
501
|
-
},
|
|
544
|
+
}, lt = class extends l {
|
|
502
545
|
getParentControlId() {
|
|
503
|
-
return
|
|
546
|
+
return n.BLOCK_BUTTON.EXTERNAL_INDENTS;
|
|
504
547
|
}
|
|
505
|
-
},
|
|
548
|
+
}, Et = class extends l {
|
|
506
549
|
getParentControlId() {
|
|
507
|
-
return
|
|
550
|
+
return n.BLOCK_BUTTON.INTERNAL_INDENTS;
|
|
508
551
|
}
|
|
509
|
-
},
|
|
552
|
+
}, ot = class extends l {
|
|
510
553
|
getParentControlId() {
|
|
511
|
-
return
|
|
554
|
+
return n.BLOCK_BUTTON.TEXT;
|
|
512
555
|
}
|
|
513
|
-
},
|
|
556
|
+
}, dt = class extends l {
|
|
514
557
|
getParentControlId() {
|
|
515
|
-
return
|
|
558
|
+
return n.BLOCK_BUTTON.FONT_SIZE;
|
|
516
559
|
}
|
|
517
|
-
},
|
|
560
|
+
}, ut = class extends l {
|
|
518
561
|
getParentControlId() {
|
|
519
|
-
return
|
|
562
|
+
return n.BLOCK_BUTTON.TEXT_STYLE_AND_COLOR;
|
|
520
563
|
}
|
|
521
564
|
getLabels() {
|
|
522
565
|
}
|
|
523
|
-
},
|
|
566
|
+
}, G = class h extends i {
|
|
524
567
|
constructor() {
|
|
525
|
-
super(
|
|
568
|
+
super(h.REQUIRED_METHODS, h);
|
|
526
569
|
}
|
|
527
570
|
/**
|
|
528
571
|
* @description Allows to determine if control should be visible or hidden in control panel.
|
|
@@ -575,10 +618,10 @@ var Z = {
|
|
|
575
618
|
onDocumentChanged(t) {
|
|
576
619
|
}
|
|
577
620
|
};
|
|
578
|
-
|
|
579
|
-
var
|
|
621
|
+
G.REQUIRED_METHODS = ["getId", "getTemplate"];
|
|
622
|
+
var ct = G, pe = class m extends i {
|
|
580
623
|
constructor() {
|
|
581
|
-
super(
|
|
624
|
+
super(m.REQUIRED_METHODS, m);
|
|
582
625
|
}
|
|
583
626
|
/**
|
|
584
627
|
* Gets the unique identifier for this tab.
|
|
@@ -645,32 +688,97 @@ var it = X, we = class h extends s {
|
|
|
645
688
|
onDestroy() {
|
|
646
689
|
}
|
|
647
690
|
};
|
|
648
|
-
|
|
649
|
-
var
|
|
691
|
+
pe.REQUIRED_METHODS = ["getId", "getIcon", "getName", "getTemplate", "getTabIndex"];
|
|
692
|
+
var V = class extends v {
|
|
650
693
|
getTargetNodes(e) {
|
|
651
|
-
const t = e.querySelectorAll(
|
|
652
|
-
return t.length ? t :
|
|
694
|
+
const t = e.querySelectorAll(c.IMAGE), r = e.asElement().hasClass(K) ? [e] : [];
|
|
695
|
+
return t.length ? t : r;
|
|
653
696
|
}
|
|
654
|
-
},
|
|
697
|
+
}, Tt = class extends V {
|
|
655
698
|
getParentControlId() {
|
|
656
|
-
return
|
|
699
|
+
return n.BLOCK_IMAGE.EXTERNAL_INDENTS;
|
|
657
700
|
}
|
|
658
|
-
},
|
|
701
|
+
}, It = class extends V {
|
|
659
702
|
getParentControlId() {
|
|
660
|
-
return
|
|
703
|
+
return n.BLOCK_IMAGE.SIZE;
|
|
661
704
|
}
|
|
662
|
-
},
|
|
705
|
+
}, Xe = class g extends i {
|
|
663
706
|
constructor() {
|
|
664
707
|
super(g.REQUIRED_METHODS, g);
|
|
665
708
|
}
|
|
709
|
+
/**
|
|
710
|
+
* Gets the unique identifier for this tab.
|
|
711
|
+
* This ID is used for registration.
|
|
712
|
+
* @returns A unique string ID.
|
|
713
|
+
*/
|
|
714
|
+
getId() {
|
|
715
|
+
throw new Error("Method getId() must be implemented by the subclass");
|
|
716
|
+
}
|
|
717
|
+
/**
|
|
718
|
+
* Gets the icon key representing this tab in the header.
|
|
719
|
+
* @returns A string representing the icon key from the IconsRegistry
|
|
720
|
+
*/
|
|
721
|
+
getIcon() {
|
|
722
|
+
throw new Error("Method getIcon() must be implemented by the subclass");
|
|
723
|
+
}
|
|
724
|
+
/**
|
|
725
|
+
* Retrieves the index of the tab associated with the panel.
|
|
726
|
+
* The index represents the position/order of the tab in the UI.
|
|
727
|
+
*
|
|
728
|
+
* @returns {number} The index of the tab.
|
|
729
|
+
*/
|
|
730
|
+
getTabIndex() {
|
|
731
|
+
throw new Error("Method getTabIndex() must be implemented by the subclass");
|
|
732
|
+
}
|
|
733
|
+
/**
|
|
734
|
+
* Gets the display name of the tab shown to the user in the header hint.
|
|
735
|
+
* Use `this.api.translate()` for localization.
|
|
736
|
+
* @returns The localized tab name string.
|
|
737
|
+
*/
|
|
738
|
+
getName() {
|
|
739
|
+
throw new Error("Method getName() must be implemented by the subclass");
|
|
740
|
+
}
|
|
741
|
+
/**
|
|
742
|
+
* Determines if the tab should be available for use in the editor.
|
|
743
|
+
* Override to provide custom logic based on the editor state or configuration.
|
|
744
|
+
* @returns True if the tab is enabled, false otherwise. Defaults to true.
|
|
745
|
+
*/
|
|
746
|
+
isEnabled() {
|
|
747
|
+
return !0;
|
|
748
|
+
}
|
|
749
|
+
/**
|
|
750
|
+
* Gets the HTML template string that defines the initial structure of this tab.
|
|
751
|
+
* @returns An HTML string.
|
|
752
|
+
*/
|
|
753
|
+
getTemplate() {
|
|
754
|
+
throw new Error("Method getTemplate() must be implemented by the subclass");
|
|
755
|
+
}
|
|
756
|
+
/**
|
|
757
|
+
* Optional hook called when the modules panel tab is initially rendered.
|
|
758
|
+
* Use this for setup tasks like attaching event listeners to the panel's template elements.
|
|
759
|
+
*/
|
|
760
|
+
onRender() {
|
|
761
|
+
}
|
|
762
|
+
/**
|
|
763
|
+
* Lifecycle hook called when any part of the document template has changed.
|
|
764
|
+
* This can be frequent; use cautiously for performance-sensitive operations.
|
|
765
|
+
*/
|
|
766
|
+
onDocumentChanged() {
|
|
767
|
+
}
|
|
768
|
+
};
|
|
769
|
+
Xe.REQUIRED_METHODS = ["getId", "getIcon", "getName", "getTemplate", "getTabIndex"];
|
|
770
|
+
var f = class O extends i {
|
|
771
|
+
constructor() {
|
|
772
|
+
super(O.REQUIRED_METHODS, O);
|
|
773
|
+
}
|
|
666
774
|
registerBlockControls(t) {
|
|
667
775
|
throw new Error("Method registerBlockControls() must be implemented by the subclass");
|
|
668
776
|
}
|
|
669
777
|
};
|
|
670
|
-
|
|
671
|
-
var
|
|
672
|
-
constructor(
|
|
673
|
-
this.tabId =
|
|
778
|
+
f.REQUIRED_METHODS = ["registerBlockControls"];
|
|
779
|
+
var bt = f, ht = class R {
|
|
780
|
+
constructor(t, r) {
|
|
781
|
+
this.tabId = t, this.controls = r.map(R.normalizeControl);
|
|
674
782
|
}
|
|
675
783
|
getTabId() {
|
|
676
784
|
return this.tabId;
|
|
@@ -679,54 +787,68 @@ var ot = G, dt = class {
|
|
|
679
787
|
return this.label;
|
|
680
788
|
}
|
|
681
789
|
getControlsIds() {
|
|
682
|
-
return this.
|
|
790
|
+
return this.controls.map((t) => t.id);
|
|
683
791
|
}
|
|
684
|
-
|
|
685
|
-
return this.
|
|
792
|
+
getControls() {
|
|
793
|
+
return this.controls;
|
|
794
|
+
}
|
|
795
|
+
withLabel(t) {
|
|
796
|
+
return this.label = t, this;
|
|
686
797
|
}
|
|
687
|
-
addControl(
|
|
688
|
-
|
|
798
|
+
addControl(t, r) {
|
|
799
|
+
const s = R.normalizeControl(t);
|
|
800
|
+
return r < 0 ? this.controls.unshift(s) : r > this.controls.length ? this.controls.push(s) : this.controls.splice(r, 0, s), this;
|
|
689
801
|
}
|
|
690
|
-
deleteControl(
|
|
691
|
-
const
|
|
692
|
-
|
|
802
|
+
deleteControl(t) {
|
|
803
|
+
const r = this.controls.findIndex((s) => s.id === t);
|
|
804
|
+
r !== -1 && this.controls.splice(r, 1);
|
|
805
|
+
}
|
|
806
|
+
static normalizeControl(t) {
|
|
807
|
+
if (typeof t == "string")
|
|
808
|
+
return { id: t };
|
|
809
|
+
if (!t.id)
|
|
810
|
+
throw new Error("SettingsPanelTabControlConfig.id is required");
|
|
811
|
+
return {
|
|
812
|
+
...t,
|
|
813
|
+
id: t.id
|
|
814
|
+
};
|
|
693
815
|
}
|
|
694
|
-
}, E = class extends
|
|
816
|
+
}, E = class extends v {
|
|
695
817
|
getTargetNodes(e) {
|
|
696
|
-
const t = e.querySelectorAll(
|
|
697
|
-
return t.length ? t :
|
|
818
|
+
const t = e.querySelectorAll(c.TEXT), r = e.asElement().hasClass(w) ? [e] : [];
|
|
819
|
+
return t.length ? t : r;
|
|
698
820
|
}
|
|
699
|
-
},
|
|
821
|
+
}, mt = class extends E {
|
|
700
822
|
getParentControlId() {
|
|
701
|
-
return
|
|
823
|
+
return n.GENERAL.TEXT_ALIGN;
|
|
702
824
|
}
|
|
703
|
-
},
|
|
825
|
+
}, gt = class extends E {
|
|
704
826
|
getParentControlId() {
|
|
705
|
-
return
|
|
827
|
+
return n.GENERAL.TEXT_COLOR;
|
|
706
828
|
}
|
|
707
|
-
},
|
|
829
|
+
}, Ot = class extends E {
|
|
708
830
|
getParentControlId() {
|
|
709
|
-
return
|
|
831
|
+
return n.BLOCK_TEXT.FONT_FAMILY;
|
|
710
832
|
}
|
|
711
|
-
},
|
|
833
|
+
}, Rt = class extends E {
|
|
712
834
|
getParentControlId() {
|
|
713
|
-
return
|
|
835
|
+
return n.GENERAL.TEXT_LINE_SPACING;
|
|
714
836
|
}
|
|
715
|
-
},
|
|
837
|
+
}, Lt = class extends E {
|
|
716
838
|
getParentControlId() {
|
|
717
|
-
return
|
|
839
|
+
return n.BLOCK_TEXT.INTERNAL_INDENTS;
|
|
718
840
|
}
|
|
719
|
-
},
|
|
841
|
+
}, _t = class extends E {
|
|
720
842
|
getParentControlId() {
|
|
721
|
-
return
|
|
843
|
+
return n.GENERAL.TEXT_SIZE;
|
|
722
844
|
}
|
|
723
|
-
},
|
|
845
|
+
}, Ct = class extends E {
|
|
724
846
|
getParentControlId() {
|
|
725
|
-
return
|
|
847
|
+
return n.GENERAL.TEXT_STYLE;
|
|
726
848
|
}
|
|
727
|
-
},
|
|
849
|
+
}, Ge = class {
|
|
728
850
|
constructor(e) {
|
|
729
|
-
this.uiElements = [], this.controls = [], this.contextActions = [], this.blocks = [], this.generalPanelTabs = [], this.i18n = e == null ? void 0 : e.i18n, this.styles = e == null ? void 0 : e.styles, this.previewStyles = e == null ? void 0 : e.previewStyles, this.uiElements = (e == null ? void 0 : e.uiElements) ?? [], this.uiElementTagRegistry = e == null ? void 0 : e.uiElementTagRegistry, this.controls = (e == null ? void 0 : e.controls) ?? [], this.settingsPanelRegistry = e == null ? void 0 : e.settingsPanelRegistry, this.contextActions = (e == null ? void 0 : e.contextActions) ?? [], this.blocks = (e == null ? void 0 : e.blocks) ?? [], this.generalPanelTabs = (e == null ? void 0 : e.generalPanelTabs) ?? [], this.externalSmartElementsLibrary = e == null ? void 0 : e.externalSmartElementsLibrary, this.externalImageLibrary = e == null ? void 0 : e.externalImageLibrary, this.externalImageLibraryTab = e == null ? void 0 : e.externalImageLibraryTab, this.externalAiAssistant = e == null ? void 0 : e.externalAiAssistant, this.externalDisplayConditionsLibrary = e == null ? void 0 : e.externalDisplayConditionsLibrary, this.externalVideoLibrary = e == null ? void 0 : e.externalVideoLibrary, this.blocksPanel = e == null ? void 0 : e.blocksPanel, this.iconsRegistry = e == null ? void 0 : e.iconsRegistry, this.id = Math.random().toString(36).substring(2);
|
|
851
|
+
this.uiElements = [], this.controls = [], this.contextActions = [], this.blocks = [], this.generalPanelTabs = [], this.modulesPanelTabs = [], this.i18n = e == null ? void 0 : e.i18n, this.styles = e == null ? void 0 : e.styles, this.previewStyles = e == null ? void 0 : e.previewStyles, this.uiElements = (e == null ? void 0 : e.uiElements) ?? [], this.uiElementTagRegistry = e == null ? void 0 : e.uiElementTagRegistry, this.controls = (e == null ? void 0 : e.controls) ?? [], this.settingsPanelRegistry = e == null ? void 0 : e.settingsPanelRegistry, this.contextActions = (e == null ? void 0 : e.contextActions) ?? [], this.blocks = (e == null ? void 0 : e.blocks) ?? [], this.generalPanelTabs = (e == null ? void 0 : e.generalPanelTabs) ?? [], this.modulesPanelTabs = (e == null ? void 0 : e.modulesPanelTabs) ?? [], this.externalSmartElementsLibrary = e == null ? void 0 : e.externalSmartElementsLibrary, this.externalImageLibrary = e == null ? void 0 : e.externalImageLibrary, this.externalImageLibraryTab = e == null ? void 0 : e.externalImageLibraryTab, this.externalAiAssistant = e == null ? void 0 : e.externalAiAssistant, this.externalDisplayConditionsLibrary = e == null ? void 0 : e.externalDisplayConditionsLibrary, this.externalVideoLibrary = e == null ? void 0 : e.externalVideoLibrary, this.blocksPanel = e == null ? void 0 : e.blocksPanel, this.iconsRegistry = e == null ? void 0 : e.iconsRegistry, this.id = Math.random().toString(36).substring(2);
|
|
730
852
|
}
|
|
731
853
|
getI18n() {
|
|
732
854
|
return this.i18n;
|
|
@@ -785,9 +907,12 @@ var ot = G, dt = class {
|
|
|
785
907
|
getGeneralPanelTabs() {
|
|
786
908
|
return this.generalPanelTabs;
|
|
787
909
|
}
|
|
788
|
-
|
|
910
|
+
getModulesPanelTabs() {
|
|
911
|
+
return this.modulesPanelTabs;
|
|
912
|
+
}
|
|
913
|
+
}, At = class {
|
|
789
914
|
constructor() {
|
|
790
|
-
this.styles = [], this.uiElements = [], this.controls = [], this.contextActions = [], this.blocks = [], this.generalPanelTabs = [];
|
|
915
|
+
this.styles = [], this.uiElements = [], this.controls = [], this.contextActions = [], this.blocks = [], this.generalPanelTabs = [], this.modulesPanelTabs = [];
|
|
791
916
|
}
|
|
792
917
|
withLocalization(e) {
|
|
793
918
|
return this.i18n = e, this;
|
|
@@ -852,8 +977,11 @@ var ot = G, dt = class {
|
|
|
852
977
|
addGeneralPanelTab(e) {
|
|
853
978
|
return this.generalPanelTabs.push(e), this;
|
|
854
979
|
}
|
|
980
|
+
addModulesPanelTab(e) {
|
|
981
|
+
return this.modulesPanelTabs.push(e), this;
|
|
982
|
+
}
|
|
855
983
|
build() {
|
|
856
|
-
return new
|
|
984
|
+
return new Ge({
|
|
857
985
|
i18n: this.i18n,
|
|
858
986
|
styles: this.styles.map((e) => e.trim()).join(`
|
|
859
987
|
`),
|
|
@@ -872,21 +1000,22 @@ var ot = G, dt = class {
|
|
|
872
1000
|
blocksPanel: this.blocksPanel,
|
|
873
1001
|
iconsRegistry: this.iconsRegistry,
|
|
874
1002
|
externalImageLibraryTab: this.externalImageLibraryTab,
|
|
875
|
-
generalPanelTabs: this.generalPanelTabs
|
|
1003
|
+
generalPanelTabs: this.generalPanelTabs,
|
|
1004
|
+
modulesPanelTabs: this.modulesPanelTabs
|
|
876
1005
|
});
|
|
877
1006
|
}
|
|
878
|
-
},
|
|
1007
|
+
}, Ve = class L extends i {
|
|
879
1008
|
constructor() {
|
|
880
|
-
super(
|
|
1009
|
+
super(L.REQUIRED_METHODS, L);
|
|
881
1010
|
}
|
|
882
1011
|
openAiAssistant(t) {
|
|
883
1012
|
throw new Error("Method openAiAssistant() must be implemented by the subclass");
|
|
884
1013
|
}
|
|
885
1014
|
};
|
|
886
|
-
|
|
887
|
-
var
|
|
1015
|
+
Ve.REQUIRED_METHODS = ["openAiAssistant"];
|
|
1016
|
+
var fe = class _ extends i {
|
|
888
1017
|
constructor() {
|
|
889
|
-
super(
|
|
1018
|
+
super(_.REQUIRED_METHODS, _);
|
|
890
1019
|
}
|
|
891
1020
|
/**
|
|
892
1021
|
* Retrieves the name of the category.
|
|
@@ -903,7 +1032,7 @@ var He = class R extends s {
|
|
|
903
1032
|
* @param {ExternalDisplayConditionSelectedCB} _successCallback - Callback executed with the updated or newly created condition upon success.
|
|
904
1033
|
* @param {() => void} _cancelCallback - Callback executed when the dialog is closed without making changes.
|
|
905
1034
|
*/
|
|
906
|
-
openExternalDisplayConditionsDialog(t,
|
|
1035
|
+
openExternalDisplayConditionsDialog(t, r, s) {
|
|
907
1036
|
throw new Error("Method openExternalDisplayConditionsDialog() must be implemented by the subclass");
|
|
908
1037
|
}
|
|
909
1038
|
/**
|
|
@@ -924,19 +1053,19 @@ var He = class R extends s {
|
|
|
924
1053
|
throw new Error("Method getContextActionIndex() must be implemented by the subclass");
|
|
925
1054
|
}
|
|
926
1055
|
};
|
|
927
|
-
|
|
928
|
-
var
|
|
1056
|
+
fe.REQUIRED_METHODS = ["getCategoryName", "openExternalDisplayConditionsDialog"];
|
|
1057
|
+
var Qe = class C extends i {
|
|
929
1058
|
constructor() {
|
|
930
|
-
super(
|
|
1059
|
+
super(C.REQUIRED_METHODS, C);
|
|
931
1060
|
}
|
|
932
|
-
openImageLibrary(t,
|
|
1061
|
+
openImageLibrary(t, r, s) {
|
|
933
1062
|
throw new Error("Method openImageLibrary() must be implemented by the subclass");
|
|
934
1063
|
}
|
|
935
1064
|
};
|
|
936
|
-
|
|
937
|
-
var
|
|
1065
|
+
Qe.REQUIRED_METHODS = ["openImageLibrary"];
|
|
1066
|
+
var Ye = class A extends i {
|
|
938
1067
|
constructor() {
|
|
939
|
-
super(
|
|
1068
|
+
super(A.REQUIRED_METHODS, A);
|
|
940
1069
|
}
|
|
941
1070
|
/**
|
|
942
1071
|
* @description Returns the translated name/label for the tab
|
|
@@ -951,39 +1080,39 @@ var Xe = class _ extends s {
|
|
|
951
1080
|
* @param _onImageSelectCallback - Callback to invoke when an image is selected
|
|
952
1081
|
* @param _selectedNode - (Optional) Selected node for which the gallery is being opened
|
|
953
1082
|
*/
|
|
954
|
-
openImageLibraryTab(t,
|
|
1083
|
+
openImageLibraryTab(t, r, s) {
|
|
955
1084
|
throw new Error("Method openImageLibraryTab() must be implemented by the subclass");
|
|
956
1085
|
}
|
|
957
1086
|
};
|
|
958
|
-
|
|
959
|
-
var
|
|
1087
|
+
Ye.REQUIRED_METHODS = ["getName", "openImageLibraryTab"];
|
|
1088
|
+
var $e = class N extends i {
|
|
960
1089
|
constructor() {
|
|
961
|
-
super(
|
|
1090
|
+
super(N.REQUIRED_METHODS, N);
|
|
962
1091
|
}
|
|
963
|
-
openSmartElementsLibrary(t,
|
|
1092
|
+
openSmartElementsLibrary(t, r) {
|
|
964
1093
|
throw new Error("Method openSmartElementsLibrary() must be implemented by the subclass");
|
|
965
1094
|
}
|
|
966
1095
|
};
|
|
967
|
-
|
|
968
|
-
var
|
|
1096
|
+
$e.REQUIRED_METHODS = ["openSmartElementsLibrary"];
|
|
1097
|
+
var We = class D extends i {
|
|
969
1098
|
constructor() {
|
|
970
|
-
super(
|
|
1099
|
+
super(D.REQUIRED_METHODS, D);
|
|
971
1100
|
}
|
|
972
|
-
openExternalVideosLibraryDialog(t,
|
|
1101
|
+
openExternalVideosLibraryDialog(t, r, s) {
|
|
973
1102
|
throw new Error("Method openExternalVideosLibraryDialog() must be implemented by the subclass");
|
|
974
1103
|
}
|
|
975
1104
|
};
|
|
976
|
-
|
|
977
|
-
var
|
|
1105
|
+
We.REQUIRED_METHODS = ["openExternalVideosLibraryDialog"];
|
|
1106
|
+
var Q = class S extends i {
|
|
978
1107
|
constructor() {
|
|
979
|
-
super(
|
|
1108
|
+
super(S.REQUIRED_METHODS, S);
|
|
980
1109
|
}
|
|
981
1110
|
registerIconsSvg(t) {
|
|
982
1111
|
throw new Error("Method registerIconsSvg() must be implemented by the subclass");
|
|
983
1112
|
}
|
|
984
1113
|
};
|
|
985
|
-
|
|
986
|
-
var
|
|
1114
|
+
Q.REQUIRED_METHODS = ["registerIconsSvg"];
|
|
1115
|
+
var Nt = Q, Dt = class {
|
|
987
1116
|
constructor(e) {
|
|
988
1117
|
this.key = e;
|
|
989
1118
|
}
|
|
@@ -996,9 +1125,9 @@ var mt = V, Rt = class {
|
|
|
996
1125
|
params: this.params
|
|
997
1126
|
};
|
|
998
1127
|
}
|
|
999
|
-
},
|
|
1128
|
+
}, Y = class M extends i {
|
|
1000
1129
|
constructor() {
|
|
1001
|
-
super(
|
|
1130
|
+
super(M.REQUIRED_METHODS, M);
|
|
1002
1131
|
}
|
|
1003
1132
|
/**
|
|
1004
1133
|
* Called when the UI element should render its content into the provided container.
|
|
@@ -1033,7 +1162,7 @@ var mt = V, Rt = class {
|
|
|
1033
1162
|
* @param name - The name of the attribute that was updated.
|
|
1034
1163
|
* @param value - The new value of the attribute.
|
|
1035
1164
|
*/
|
|
1036
|
-
onAttributeUpdated(t,
|
|
1165
|
+
onAttributeUpdated(t, r) {
|
|
1037
1166
|
}
|
|
1038
1167
|
/**
|
|
1039
1168
|
* Gets the unique identifier for this UI element type.
|
|
@@ -1051,64 +1180,64 @@ var mt = V, Rt = class {
|
|
|
1051
1180
|
throw new Error("Method getTemplate() must be implemented by the subclass");
|
|
1052
1181
|
}
|
|
1053
1182
|
};
|
|
1054
|
-
|
|
1055
|
-
var
|
|
1183
|
+
Y.REQUIRED_METHODS = ["onRender", "getId", "getTemplate"];
|
|
1184
|
+
var St = Y, $ = class B extends i {
|
|
1056
1185
|
constructor() {
|
|
1057
|
-
super(
|
|
1186
|
+
super(B.REQUIRED_METHODS, B);
|
|
1058
1187
|
}
|
|
1059
1188
|
registerUiElements(t) {
|
|
1060
1189
|
throw new Error("Method registerUiElements() must be implemented by the subclass");
|
|
1061
1190
|
}
|
|
1062
1191
|
};
|
|
1063
|
-
|
|
1064
|
-
var
|
|
1192
|
+
$.REQUIRED_METHODS = ["registerUiElements"];
|
|
1193
|
+
var Mt = $;
|
|
1065
1194
|
export {
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1195
|
+
Ze as Block,
|
|
1196
|
+
je as BlockAttr,
|
|
1197
|
+
z as BlockCompositionType,
|
|
1198
|
+
c as BlockSelector,
|
|
1199
|
+
de as BlockType,
|
|
1200
|
+
qe as BlocksPanel,
|
|
1201
|
+
v as BuiltInControl,
|
|
1202
|
+
n as BuiltInControlTypes,
|
|
1203
|
+
tt as ButtonAlignBuiltInControl,
|
|
1204
|
+
rt as ButtonBackgroundColorBuiltInControl,
|
|
1205
|
+
at as ButtonBorderBuiltInControl,
|
|
1206
|
+
et as ButtonBorderRadiusBuiltInControl,
|
|
1207
|
+
nt as ButtonColorBuiltInControl,
|
|
1208
|
+
H as ButtonControls,
|
|
1209
|
+
st as ButtonFitToContainerBuiltInControl,
|
|
1210
|
+
it as ButtonFontFamilyBuiltInControl,
|
|
1211
|
+
lt as ButtonMarginsBuiltInControl,
|
|
1212
|
+
Et as ButtonPaddingsBuiltInControl,
|
|
1213
|
+
ot as ButtonTextBuiltInControl,
|
|
1214
|
+
dt as ButtonTextSizeBuiltInControl,
|
|
1215
|
+
ut as ButtonTextStyleAndFontColorBuiltInControl,
|
|
1216
|
+
ue as ContainerControls,
|
|
1217
|
+
ct as Control,
|
|
1218
|
+
ce as EditorStatePropertyType,
|
|
1219
|
+
Ge as Extension,
|
|
1220
|
+
At as ExtensionBuilder,
|
|
1221
|
+
F as GeneralControls,
|
|
1222
|
+
Nt as IconsRegistry,
|
|
1223
|
+
p as ImageControls,
|
|
1224
|
+
Tt as ImageMarginsBuiltInControl,
|
|
1225
|
+
It as ImageSizeBuiltInControl,
|
|
1226
|
+
Dt as ModificationDescription,
|
|
1227
|
+
Te as PreviewDeviceMode,
|
|
1228
|
+
bt as SettingsPanelRegistry,
|
|
1229
|
+
ht as SettingsPanelTab,
|
|
1101
1230
|
Ie as SettingsTab,
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1231
|
+
mt as TextAlignBuiltInControl,
|
|
1232
|
+
gt as TextColorBuiltInControl,
|
|
1233
|
+
k as TextControls,
|
|
1234
|
+
Ot as TextFontFamilyBuiltInControl,
|
|
1235
|
+
Rt as TextLineSpacingBuiltInControl,
|
|
1236
|
+
Lt as TextPaddingsBuiltInControl,
|
|
1237
|
+
_t as TextSizeBuiltInControl,
|
|
1238
|
+
Ct as TextStyleBuiltInControl,
|
|
1239
|
+
Je as UEAttr,
|
|
1240
|
+
St as UIElement,
|
|
1241
|
+
Mt as UIElementTagRegistry,
|
|
1242
|
+
ke as UIElementType
|
|
1114
1243
|
};
|