@useinsider/guido 2.0.0-beta.5ccd854 → 2.0.0-beta.5da4dde
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/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.js +2 -2
- package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.js +5 -5
- package/dist/composables/useStripo.js +37 -35
- package/dist/config/migrator/index.js +8 -9
- package/dist/extensions/Blocks/CouponBlock/constants.js +4 -0
- package/dist/extensions/Blocks/CouponBlock/controls/index.js +29 -0
- package/dist/extensions/Blocks/CouponBlock/extension.js +5 -4
- package/dist/extensions/Blocks/CouponBlock/settingsPanel.js +20 -14
- package/dist/extensions/Blocks/CouponBlock/template.js +22 -11
- package/dist/extensions/Blocks/Items/block.js +40 -39
- package/dist/extensions/Blocks/Items/controls/cardComposition.js +49 -46
- package/dist/extensions/Blocks/Items/controls/price/priceOrientation.js +26 -28
- package/dist/extensions/Blocks/Items/controls/settingsControl.js +127 -132
- package/dist/extensions/Blocks/Items/enums/settingsEnums.js +2 -2
- package/dist/extensions/Blocks/Items/layouts/horizontal.html.js +48 -58
- package/dist/extensions/Blocks/Items/layouts/vertical.html.js +58 -48
- package/dist/extensions/Blocks/Items/store/items-block.js +2 -2
- package/dist/extensions/Blocks/Items/template.js +123 -296
- package/dist/extensions/Blocks/Items/utils/syncAttributesFromConfigBlock.js +20 -11
- package/dist/extensions/Blocks/Recommendation/cardCompositionControl.js +153 -69
- package/dist/extensions/Blocks/Recommendation/constants.js +9 -1
- package/dist/extensions/Blocks/Recommendation/control.js +74 -59
- package/dist/extensions/Blocks/Recommendation/controls/cardBackgroundColorControl.js +68 -0
- package/dist/extensions/Blocks/Recommendation/controls/index.js +245 -0
- package/dist/extensions/Blocks/Recommendation/controls/nameTextTrimControl.js +74 -0
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscountTextAfterControl.js +71 -0
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscountTextBeforeControl.js +71 -0
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPriceTextAfterControl.js +71 -0
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPriceTextBeforeControl.js +71 -0
- package/dist/extensions/Blocks/Recommendation/controls/spacingControl.js +188 -0
- package/dist/extensions/Blocks/Recommendation/extension.js +16 -42
- package/dist/extensions/Blocks/Recommendation/settingsPanel.js +117 -72
- package/dist/extensions/Blocks/Recommendation/templates/blockTemplate.js +85 -64
- package/dist/extensions/Blocks/Recommendation/templates/migrationTemplate.js +54 -17
- package/dist/extensions/Blocks/Recommendation/templates/templateUtils.js +74 -45
- package/dist/extensions/Blocks/Recommendation/utils/preserveTextStyles.js +25 -0
- package/dist/extensions/Blocks/common-control.js +53 -64
- package/dist/extensions/Blocks/controlFactories.js +122 -111
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +289 -368
- package/dist/package.json.js +7 -0
- package/dist/src/extensions/Blocks/CouponBlock/constants.d.ts +14 -0
- package/dist/src/extensions/Blocks/CouponBlock/controls/index.d.ts +108 -0
- package/dist/src/extensions/Blocks/CouponBlock/template.d.ts +1 -1
- package/dist/src/extensions/Blocks/Items/controls/price/priceOrientation.d.ts +1 -1
- package/dist/src/extensions/Blocks/Items/controls/settingsControl.d.ts +4 -0
- package/dist/src/extensions/Blocks/Items/template.d.ts +1 -20
- package/dist/src/extensions/Blocks/Recommendation/cardCompositionControl.d.ts +50 -3
- package/dist/src/extensions/Blocks/Recommendation/constants.d.ts +32 -0
- package/dist/src/extensions/Blocks/Recommendation/control.d.ts +5 -2
- package/dist/src/extensions/Blocks/Recommendation/controls/cardBackgroundColorControl.d.ts +25 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/index.d.ts +592 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/nameTextTrimControl.d.ts +16 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscountTextAfterControl.d.ts +15 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscountTextBeforeControl.d.ts +15 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPriceTextAfterControl.d.ts +15 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPriceTextBeforeControl.d.ts +15 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/spacingControl.d.ts +60 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/blockTemplate.d.ts +3 -3
- package/dist/src/extensions/Blocks/Recommendation/templates/templateUtils.d.ts +15 -7
- package/dist/src/extensions/Blocks/Recommendation/utils/preserveTextStyles.d.ts +19 -0
- package/dist/src/extensions/Blocks/common-control.d.ts +8 -13
- package/dist/src/extensions/Blocks/controlFactories.d.ts +30 -7
- package/dist/static/styles/components/wide-panel.css.js +0 -4
- package/dist/static/styles/customEditorStyle.css.js +13 -0
- package/package.json +3 -3
- package/dist/config/migrator/itemsBlockMigrator.js +0 -283
- package/dist/extensions/Blocks/Items/utils/nodeConfigUtils.js +0 -172
- package/dist/extensions/Blocks/Recommendation/controls/button/align.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/border.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/borderRadius.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/color.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/fitToContent.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/fontFamily.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/margins.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/paddings.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/text.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/textSize.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/textStyleAndFontColor.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/image/margins.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/image/size.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/name/align.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/name/background.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/name/color.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/name/fontFamily.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/name/paddings.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/name/size.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/name/style.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/align.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/background.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/color.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/fontFamily.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/paddings.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/size.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/style.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/price/align.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/price/background.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/price/color.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/price/fontFamily.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/price/paddings.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/price/size.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/price/style.js +0 -13
- package/dist/src/config/migrator/itemsBlockMigrator.d.ts +0 -6
- package/dist/src/extensions/Blocks/Items/utils/nodeConfigUtils.d.ts +0 -71
- package/dist/src/extensions/Blocks/Recommendation/controls/button/align.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/border.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/borderRadius.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/color.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/fitToContent.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/fontFamily.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/margins.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/paddings.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/text.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/textSize.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/textStyleAndFontColor.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/image/margins.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/image/size.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/name/align.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/name/background.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/name/color.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/name/fontFamily.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/name/paddings.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/name/size.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/name/style.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/align.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/background.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/color.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/fontFamily.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/paddings.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/size.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/style.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/price/align.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/price/background.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/price/color.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/price/fontFamily.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/price/paddings.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/price/size.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/price/style.d.ts +0 -5
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
var
|
|
1
|
+
var M = class u {
|
|
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(
|
|
8
|
-
if (r !==
|
|
9
|
-
|
|
10
|
-
const s =
|
|
7
|
+
constructor(e, r) {
|
|
8
|
+
if (r !== u) {
|
|
9
|
+
u.validatedClasses.has(r) || this.validateImplementation(e, r);
|
|
10
|
+
const s = u.validationErrors.get(r);
|
|
11
11
|
if (s && s.length > 0)
|
|
12
12
|
throw new Error(
|
|
13
13
|
`${r.name} has validation errors:
|
|
14
|
-
${s.map((
|
|
14
|
+
${s.map((E) => ` - ${E}`).join(`
|
|
15
15
|
`)}`
|
|
16
16
|
);
|
|
17
17
|
}
|
|
@@ -20,23 +20,23 @@ ${s.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(
|
|
24
|
-
var
|
|
25
|
-
const s = [],
|
|
26
|
-
|
|
27
|
-
if (typeof this[
|
|
28
|
-
s.push(`Method ${
|
|
23
|
+
validateImplementation(e, r) {
|
|
24
|
+
var I;
|
|
25
|
+
const s = [], E = r.name, T = Object.getPrototypeOf(this);
|
|
26
|
+
e.forEach((l) => {
|
|
27
|
+
if (typeof this[l] != "function") {
|
|
28
|
+
s.push(`Method ${l}() is not defined`);
|
|
29
29
|
return;
|
|
30
30
|
}
|
|
31
|
-
|
|
32
|
-
}),
|
|
31
|
+
T[l] === r.prototype[l] && s.push(`Method ${l}() must be implemented (currently using base class error-throwing implementation)`);
|
|
32
|
+
}), u.validatedClasses.add(r), s.length > 0 ? (u.validationErrors.set(r, s), console.error(`[${E} Validation] ${E} validation failed:`, s)) : typeof process < "u" && ((I = process.env) == null ? void 0 : I.NODE_ENV) === "development" && console.log(`[${E} Validation] ✅ ${E} validated successfully`);
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
var a =
|
|
35
|
+
M.validatedClasses = /* @__PURE__ */ new Set();
|
|
36
|
+
M.validationErrors = /* @__PURE__ */ new Map();
|
|
37
|
+
var a = M, et = /* @__PURE__ */ ((t) => (t.BLOCK = "BLOCK", t.STRUCTURE = "STRUCTURE", t.CONTAINER = "CONTAINER", t))(et || {}), y = class c extends a {
|
|
38
38
|
constructor() {
|
|
39
|
-
super(
|
|
39
|
+
super(c.REQUIRED_METHODS, c);
|
|
40
40
|
}
|
|
41
41
|
/**
|
|
42
42
|
* Determines if the block should be available for use in the editor.
|
|
@@ -86,28 +86,28 @@ var a = B, $ = /* @__PURE__ */ ((e) => (e.BLOCK = "BLOCK", e.STRUCTURE = "STRUCT
|
|
|
86
86
|
* @param node - The immutable HTML node representing the selected block instance.
|
|
87
87
|
*/
|
|
88
88
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
89
|
-
onSelect(
|
|
89
|
+
onSelect(e) {
|
|
90
90
|
}
|
|
91
91
|
/**
|
|
92
92
|
* Lifecycle hook called when an instance of this block is copied.
|
|
93
93
|
* @param modifier - The HTML node modifier to apply changes to the copied block instance.
|
|
94
94
|
*/
|
|
95
95
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
96
|
-
onCopy(
|
|
96
|
+
onCopy(e) {
|
|
97
97
|
}
|
|
98
98
|
/**
|
|
99
99
|
* Lifecycle hook called when an instance of this block is deleted.
|
|
100
100
|
* @param node - The immutable HTML node representing the block instance being deleted.
|
|
101
101
|
*/
|
|
102
102
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
103
|
-
onDelete(
|
|
103
|
+
onDelete(e) {
|
|
104
104
|
}
|
|
105
105
|
/**
|
|
106
106
|
* Lifecycle hook called after a new instance of this block is created and added to the document (e.g., via drag-and-drop).
|
|
107
107
|
* @param node - The immutable HTML node representing the newly created block instance.
|
|
108
108
|
*/
|
|
109
109
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
110
|
-
onCreated(
|
|
110
|
+
onCreated(e) {
|
|
111
111
|
}
|
|
112
112
|
/**
|
|
113
113
|
* Lifecycle hook called when any part of the document template has changed.
|
|
@@ -115,7 +115,7 @@ var a = B, $ = /* @__PURE__ */ ((e) => (e.BLOCK = "BLOCK", e.STRUCTURE = "STRUCT
|
|
|
115
115
|
* @param node - The immutable HTML node representing current node instance
|
|
116
116
|
*/
|
|
117
117
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
118
|
-
onDocumentChanged(
|
|
118
|
+
onDocumentChanged(e) {
|
|
119
119
|
}
|
|
120
120
|
/**
|
|
121
121
|
* @description Determines if block is atomic or composite.
|
|
@@ -183,7 +183,7 @@ var a = B, $ = /* @__PURE__ */ ((e) => (e.BLOCK = "BLOCK", e.STRUCTURE = "STRUCT
|
|
|
183
183
|
*
|
|
184
184
|
* @return {string} The name of the block panel.
|
|
185
185
|
*/
|
|
186
|
-
|
|
186
|
+
getSettingsPanelName() {
|
|
187
187
|
return "";
|
|
188
188
|
}
|
|
189
189
|
/**
|
|
@@ -196,27 +196,27 @@ var a = B, $ = /* @__PURE__ */ ((e) => (e.BLOCK = "BLOCK", e.STRUCTURE = "STRUCT
|
|
|
196
196
|
}
|
|
197
197
|
};
|
|
198
198
|
y.REQUIRED_METHODS = ["getId", "getTemplate", "getIcon", "getName", "getDescription"];
|
|
199
|
-
var
|
|
199
|
+
var Xt = y, rt = class _ extends a {
|
|
200
200
|
constructor() {
|
|
201
|
-
super(
|
|
201
|
+
super(_.REQUIRED_METHODS, _);
|
|
202
202
|
}
|
|
203
203
|
/**
|
|
204
204
|
* @deprecated - use {@link getPreviewInnerHtml} instead
|
|
205
205
|
*/
|
|
206
206
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
207
|
-
getPreviewHtml(
|
|
207
|
+
getPreviewHtml(e) {
|
|
208
208
|
}
|
|
209
209
|
/**
|
|
210
210
|
* @description returns custom content to be displayed inside the {@link Block} root TD element
|
|
211
211
|
*/
|
|
212
|
-
getPreviewInnerHtml(
|
|
212
|
+
getPreviewInnerHtml(e) {
|
|
213
213
|
throw new Error("Method getPreviewInnerHtml() must be implemented by the subclass");
|
|
214
214
|
}
|
|
215
215
|
};
|
|
216
|
-
|
|
217
|
-
var
|
|
216
|
+
rt.REQUIRED_METHODS = ["getPreviewInnerHtml"];
|
|
217
|
+
var nt = class h extends a {
|
|
218
218
|
constructor() {
|
|
219
|
-
super(
|
|
219
|
+
super(h.REQUIRED_METHODS, h);
|
|
220
220
|
}
|
|
221
221
|
getId() {
|
|
222
222
|
throw new Error("Method getId() must be implemented by the subclass");
|
|
@@ -227,94 +227,93 @@ var z = class c extends a {
|
|
|
227
227
|
getLabel() {
|
|
228
228
|
throw new Error("Method getLabel() must be implemented by the subclass");
|
|
229
229
|
}
|
|
230
|
-
onClick(
|
|
230
|
+
onClick(e) {
|
|
231
231
|
throw new Error("Method onClick() must be implemented by the subclass");
|
|
232
232
|
}
|
|
233
233
|
};
|
|
234
|
-
|
|
235
|
-
var
|
|
234
|
+
nt.REQUIRED_METHODS = ["getId", "getIcon", "getLabel", "onClick"];
|
|
235
|
+
var st = {
|
|
236
236
|
src: "src",
|
|
237
237
|
alt: "alt",
|
|
238
238
|
href: "href",
|
|
239
|
-
width: "width"
|
|
240
|
-
|
|
241
|
-
}, j = {
|
|
239
|
+
width: "width"
|
|
240
|
+
}, at = {
|
|
242
241
|
href: "href"
|
|
243
|
-
},
|
|
244
|
-
BLOCK_IMAGE:
|
|
245
|
-
BLOCK_BUTTON:
|
|
246
|
-
},
|
|
247
|
-
BLOCK_BUTTON:
|
|
248
|
-
BLOCK_TEXT:
|
|
242
|
+
}, kt = {
|
|
243
|
+
BLOCK_IMAGE: st,
|
|
244
|
+
BLOCK_BUTTON: at
|
|
245
|
+
}, U = "esd-block-button", p = "esd-block-text", K = "esd-block-image", it = "esd-structure", ot = "esd-block-video", Et = "esd-block-social", lt = "esd-block-banner", dt = "esd-block-timer", ut = "esd-block-menu", It = "esd-block-html", Ot = "esd-block-spacer", Tt = "esd-container-frame", ct = "esd-stripe", _t = "esd-amp-form", O = ((t) => (t.BUTTON = `.${U}`, t.TEXT = `.${p}`, t.IMAGE = `.${K}`, t.STRUCTURE = `.${it}`, t.VIDEO = `.${ot}`, t.SOCIAL = `.${Et}`, t.BANNER = `.${lt}`, t.TIMER = `.${dt}`, t.MENU = `.${ut}`, t.HTML = `.${It}`, t.SPACER = `.${Ot}`, t.CONTAINER = `.${Tt}`, t.STRIPE = `.${ct}`, t.FORM = `.${_t}`, t))(O || {}), ht = /* @__PURE__ */ ((t) => (t.BLOCK_IMAGE = "BLOCK_IMAGE", t.BLOCK_TEXT = "BLOCK_TEXT", t.BLOCK_BUTTON = "BLOCK_BUTTON", t.BLOCK_SPACER = "BLOCK_SPACER", t.BLOCK_VIDEO = "BLOCK_VIDEO", t.BLOCK_SOCIAL = "BLOCK_SOCIAL", t.BLOCK_BANNER = "BLOCK_BANNER", t.BLOCK_TIMER = "BLOCK_TIMER", t.BLOCK_MENU = "BLOCK_MENU", t.BLOCK_MENU_ITEM = "BLOCK_MENU_ITEM", t.BLOCK_HTML = "BLOCK_HTML", t.BLOCK_AMP_CAROUSEL = "BLOCK_AMP_CAROUSEL", t.BLOCK_AMP_ACCORDION = "BLOCK_AMP_ACCORDION", t.BLOCK_AMP_FORM = "BLOCK_AMP_FORM", t.CONTAINER = "CONTAINER", t.FORM_CONTAINER = "FORM_CONTAINER", t.STRUCTURE = "STRUCTURE", t.STRIPE = "STRIPE", t.EMPTY_CONTAINER = "EMPTY_CONTAINER", t.CUSTOM_BLOCK_LINK = "CUSTOM_BLOCK_LINK", t.CUSTOM_BLOCK_IMAGE = "CUSTOM_BLOCK_IMAGE", t.CUSTOM_BLOCK_TEXT = "CUSTOM_BLOCK_TEXT", t))(ht || {}), F = /* @__PURE__ */ ((t) => (t.ANCHOR_LINK_CONTAINER = "anchorLinkFormContainer", t.APPLY_CONDITION = "applyCondition", t.APPLY_CONDITION_SWITCHER = "applyConditionSwitcher", t.BACKGROUND_COLOR = "backgroundColor", t.BACKGROUND_IMAGE = "generalImageContainer", t.TEXT_COLOR = "textColor", t.TEXT_STYLE = "textStyle", t.TEXT_SIZE = "textSize", t.TEXT_LINE_SPACING = "textLineSpacing", t.TEXT_ALIGN = "textAlign", t.FIXED_HEIGHT_SWITCHER = "fixedHeightSwitcherForm", t.HIDDEN_NODE = "hiddenNode", t.SMART_BLOCK = "smartBlock", t.SYNCHRONIZED_MODULE = "synchronizedModuleForm", t.FONT_FAMILY = "generalFontFamilyForm", t.BLOCK_INTERNAL_INDENTS = "generalBlockInternalIndents", t.STRUCTURE_INTERNAL_INDENTS = "generalStructureInternalIndents", t))(F || {}), w = /* @__PURE__ */ ((t) => (t.ADJUST_TO_WIDTH = "adjustToWidth", t.ALIGNMENT = "buttonAlignment", t.BORDER = "buttonBorder", t.BORDER_RADIUS = "buttonBorderRadius", t.COLOR = "buttonColor", t.BUTTON_BLOCK_BACKGROUND_COLOR = "buttonBlockBackgroundColor", t.EXTERNAL_INDENTS = "buttonExternalIndents", t.FIXED_HEIGHT = "buttonFixedHeightForm", t.FONT_COLOR = "buttonFontColor", t.FONT_FAMILY = "buttonFontFamily", t.FONT_SIZE = "buttonFontSize", t.ICON = "buttonIconContainer", t.ICON_ALIGN = "buttonIconAlign", t.ICON_INDENT = "buttonIconIndent", t.ICON_WIDTH = "buttonIconWidth", t.IMAGE = "buttonImageForm", t.INTERNAL_INDENTS = "buttonInternalIndents", t.LINK = "buttonLink", t.MIME_TYPE = "buttonMimeTypeForm", t.SWITCHER_HOVERED_STYLES = "buttonSwitcherHoveredStylesForm", t.TEXT = "buttonText", t.TEXT_STYLE_AND_COLOR = "buttonTextStyleAndColorForm", t.HOVERED_BORDER_COLOR = "hoveredStyleBorderButtonForm", t.HOVERED_COLOR = "hoveredButtonColorForm", t.HOVERED_TEXT_COLOR = "hoveredButtonTextColorForm", t))(w || {}), P = /* @__PURE__ */ ((t) => (t.HIDDEN_NODE = "hiddenNodeText", t.PARAGRAPH_STYLE = "paragraphStyleForm", t.ALIGN = "textAlignmentForm", t.ANCHOR_CONTAINER = "textAnchorForm", t.FONT_BACKGROUND_COLOR = "textBlockFontBackgroundColor", t.TEXT_BLOCK_BACKGROUND_COLOR = "textBlockBackgroundColor", t.FONT_COLOR = "textBlockFontColor", t.TEXT_BLOCK_FONT_FAMILY = "textBlockFontFamily", t.FONT_FAMILY = "textFontFamily", t.FONT_SIZE = "textBlockFontSize", t.DIRECTION = "textBlockDirectionForm", t.INSERT_FORM = "textBlockInsertForm", t.LINK_DATA = "textBlockLinkDataForm", t.FORMAT = "textBlockTextFormatForm", t.FIXED_HEIGHT = "textFixedHeightForm", t.INTERNAL_INDENTS = "textInternalIndents", t.LINE_HEIGHT = "textLineHeightForm", t.LINKS_COLOR = "textLinksFontColorForm", t.MIME_TYPE = "textMimeTypeForm", t.NO_LINE_WRAPS = "textNoLineWrapsForm", t))(P || {}), H = /* @__PURE__ */ ((t) => (t.ALT_TEXT = "altText", t.LINK = "blockLink", t.ALIGNMENT = "imageAlignment", t.ANCHOR_LINK_CONTAINER = "imageAnchorLinkContainerForm", t.BORDER_RADIUS = "imageBorderRadiusForm", t.IMAGE = "imageImageForm", t.EXTERNAL_INDENTS = "imageExternalIndents", t.MIME_TYPE = "imageMimeTypeForm", t.RESPONSIVE = "imageResponsive", t.ROLLOVER_IMAGE = "imageRolloverImageForm", t.ROLLOVER_SWITCHER = "imageRolloverSwitcherForm", t.SIZE = "imageSizeContainer", t))(H || {}), Rt = /* @__PURE__ */ ((t) => (t.BACKGROUND_COLOR = "containerBackgroundColorForm", t.BORDER_FORM = "containerBorderForm", t.BORDER_RADIUS = "containerBorderRadiusForm", t.EXTERNAL_INDENTS = "containerExternalIndentsForm", t.IMAGE_CONTAINER = "containerImageContainerForm", t.MIME_TYPE = "containerMimeTypeForm", t.DISPLAY_CONDITIONS = "displayConditions", t.HIDDEN_NODE = "containerHiddenNodeForm", t))(Rt || {}), n = {
|
|
246
|
+
BLOCK_BUTTON: w,
|
|
247
|
+
BLOCK_TEXT: P,
|
|
249
248
|
BLOCK_IMAGE: H,
|
|
250
|
-
GENERAL:
|
|
251
|
-
},
|
|
249
|
+
GENERAL: F
|
|
250
|
+
}, Lt = /* @__PURE__ */ ((t) => (t.SETTINGS = "settings", t.STYLES = "styles", t.DATA = "data", t))(Lt || {}), o = {
|
|
252
251
|
name: "name",
|
|
253
252
|
disabled: "disabled"
|
|
254
|
-
},
|
|
255
|
-
...
|
|
253
|
+
}, Ct = {
|
|
254
|
+
...o,
|
|
256
255
|
caption: "caption",
|
|
257
256
|
icon: "icon"
|
|
258
|
-
},
|
|
259
|
-
...
|
|
257
|
+
}, mt = {
|
|
258
|
+
...o,
|
|
260
259
|
caption: "caption"
|
|
261
|
-
},
|
|
262
|
-
...
|
|
260
|
+
}, gt = {
|
|
261
|
+
...o,
|
|
263
262
|
minValue: "min-value",
|
|
264
263
|
maxValue: "max-value",
|
|
265
264
|
step: "step"
|
|
266
|
-
},
|
|
267
|
-
...
|
|
265
|
+
}, bt = {
|
|
266
|
+
...o,
|
|
268
267
|
text: "text"
|
|
269
|
-
},
|
|
270
|
-
...
|
|
268
|
+
}, Nt = {
|
|
269
|
+
...o
|
|
271
270
|
}, X = {
|
|
272
|
-
...
|
|
271
|
+
...o,
|
|
273
272
|
searchable: "searchable",
|
|
274
273
|
multiSelect: "multi-select",
|
|
275
274
|
placeholder: "placeholder",
|
|
276
275
|
items: "items"
|
|
277
|
-
},
|
|
276
|
+
}, At = {
|
|
278
277
|
...X
|
|
279
|
-
},
|
|
278
|
+
}, Dt = {
|
|
280
279
|
text: "text",
|
|
281
280
|
value: "value"
|
|
282
|
-
},
|
|
281
|
+
}, St = {
|
|
283
282
|
text: "text",
|
|
284
283
|
icon: "icon",
|
|
285
284
|
value: "value"
|
|
286
|
-
},
|
|
287
|
-
...
|
|
288
|
-
},
|
|
285
|
+
}, Bt = {
|
|
286
|
+
...o
|
|
287
|
+
}, Mt = {
|
|
289
288
|
controlId: "control-id"
|
|
290
|
-
},
|
|
291
|
-
...
|
|
289
|
+
}, xt = {
|
|
290
|
+
...o,
|
|
292
291
|
icon: "icon",
|
|
293
292
|
position: "position"
|
|
294
|
-
},
|
|
295
|
-
...
|
|
296
|
-
},
|
|
297
|
-
BUTTON:
|
|
298
|
-
CHECKBOX:
|
|
299
|
-
COLOR:
|
|
300
|
-
COUNTER:
|
|
301
|
-
LABEL:
|
|
302
|
-
RADIO_BUTTONS:
|
|
293
|
+
}, vt = {
|
|
294
|
+
...o
|
|
295
|
+
}, Vt = {
|
|
296
|
+
BUTTON: Ct,
|
|
297
|
+
CHECKBOX: mt,
|
|
298
|
+
COLOR: o,
|
|
299
|
+
COUNTER: gt,
|
|
300
|
+
LABEL: bt,
|
|
301
|
+
RADIO_BUTTONS: Nt,
|
|
303
302
|
SELECTPICKER: X,
|
|
304
|
-
FONT_FAMILY_SELECT:
|
|
305
|
-
SWITCHER:
|
|
306
|
-
TEXT:
|
|
307
|
-
SELECT_ITEM:
|
|
308
|
-
RADIO_ITEM:
|
|
309
|
-
NESTED_CONTROL:
|
|
310
|
-
ORDERABLE:
|
|
311
|
-
ORDERABLE_ITEM:
|
|
312
|
-
},
|
|
303
|
+
FONT_FAMILY_SELECT: At,
|
|
304
|
+
SWITCHER: o,
|
|
305
|
+
TEXT: Bt,
|
|
306
|
+
SELECT_ITEM: Dt,
|
|
307
|
+
RADIO_ITEM: St,
|
|
308
|
+
NESTED_CONTROL: Mt,
|
|
309
|
+
ORDERABLE: xt,
|
|
310
|
+
ORDERABLE_ITEM: vt
|
|
311
|
+
}, yt = /* @__PURE__ */ ((t) => (t.BUTTON = "UE-BUTTON", t.CHECKBOX = "UE-CHECKBOX", t.CHECK_BUTTONS = "UE-CHECK-BUTTONS", t.COLOR = "UE-COLOR", t.COUNTER = "UE-COUNTER", t.DATEPICKER = "UE-DATEPICKER", t.LABEL = "UE-LABEL", t.MESSAGE = "UE-MESSAGE", t.RADIO_BUTTONS = "UE-RADIO-BUTTONS", t.SELECTPICKER = "UE-SELECT", t.SWITCHER = "UE-SWITCHER", t.TEXT = "UE-TEXT", t.TEXTAREA = "UE-TEXTAREA", t.CHECK_ITEM = "UE-CHECK-ITEM", t.RADIO_ITEM = "UE-RADIO-ITEM", t.SELECT_ITEM = "UE-SELECT-ITEM", t.ICON = "UE-ICON", t.MERGETAGS = "UE-MERGETAGS", t.FONT_FAMILY_SELECT = "UE-FONT-FAMILY-SELECT", t.NESTED_CONTROL = "UE-NESTED-CONTROL", t.EXPANDABLE = "UE-EXPANDABLE", t.EXPANDABLE_HEADER = "UE-EXPANDABLE_HEADER", t.EXPANDABLE_CONTENT = "UE-EXPANDABLE_CONTENT", t.ORDERABLE = "UE-ORDERABLE", t.ORDERABLE_ITEM = "UE-ORDERABLE-ITEM", t.ORDERABLE_ICON = "UE-ORDERABLE-ICON", t))(yt || {}), x = class {
|
|
313
312
|
/**
|
|
314
313
|
* @description returns map of nodes parent control operates on
|
|
315
314
|
*/
|
|
316
|
-
getTargetNodes(
|
|
317
|
-
return [
|
|
315
|
+
getTargetNodes(t) {
|
|
316
|
+
return [t];
|
|
318
317
|
}
|
|
319
318
|
/**
|
|
320
319
|
* @description returns map of labels used by parent control UI
|
|
@@ -329,7 +328,7 @@ var Z = {
|
|
|
329
328
|
/**
|
|
330
329
|
* @description returns custom modifications to be included in the parent control patch
|
|
331
330
|
*/
|
|
332
|
-
getAdditionalModifications(
|
|
331
|
+
getAdditionalModifications(t) {
|
|
333
332
|
}
|
|
334
333
|
/**
|
|
335
334
|
* Determines whether the specified HTML node is visible.
|
|
@@ -337,77 +336,77 @@ var Z = {
|
|
|
337
336
|
* @param _node - The HTML node to evaluate for visibility, provided as an immutable object.
|
|
338
337
|
* @return A boolean value indicating whether the node is visible. Returns `true` if the node is visible, otherwise `false`.
|
|
339
338
|
*/
|
|
340
|
-
isVisible(
|
|
339
|
+
isVisible(t) {
|
|
341
340
|
return !0;
|
|
342
341
|
}
|
|
343
|
-
}, i = class extends
|
|
344
|
-
getTargetNodes(
|
|
345
|
-
const
|
|
346
|
-
return
|
|
342
|
+
}, i = class extends x {
|
|
343
|
+
getTargetNodes(t) {
|
|
344
|
+
const e = t.querySelectorAll(O.BUTTON), r = t.asElement().hasClass(U) ? [t] : [];
|
|
345
|
+
return e.length ? e : r;
|
|
347
346
|
}
|
|
348
|
-
},
|
|
347
|
+
}, Gt = class extends i {
|
|
349
348
|
getParentControlId() {
|
|
350
349
|
return n.BLOCK_BUTTON.BORDER_RADIUS;
|
|
351
350
|
}
|
|
352
351
|
getLabels() {
|
|
353
352
|
}
|
|
354
|
-
},
|
|
353
|
+
}, Qt = class extends i {
|
|
355
354
|
getParentControlId() {
|
|
356
355
|
return n.BLOCK_BUTTON.ALIGNMENT;
|
|
357
356
|
}
|
|
358
|
-
},
|
|
357
|
+
}, ft = class extends i {
|
|
359
358
|
getParentControlId() {
|
|
360
359
|
return n.GENERAL.BACKGROUND_COLOR;
|
|
361
360
|
}
|
|
362
|
-
},
|
|
361
|
+
}, Yt = class extends i {
|
|
363
362
|
getParentControlId() {
|
|
364
363
|
return n.BLOCK_BUTTON.BORDER;
|
|
365
364
|
}
|
|
366
365
|
getLabels() {
|
|
367
366
|
}
|
|
368
|
-
},
|
|
367
|
+
}, $t = class extends i {
|
|
369
368
|
getParentControlId() {
|
|
370
369
|
return n.BLOCK_BUTTON.COLOR;
|
|
371
370
|
}
|
|
372
|
-
},
|
|
371
|
+
}, Wt = class extends i {
|
|
373
372
|
getParentControlId() {
|
|
374
373
|
return n.BLOCK_BUTTON.ADJUST_TO_WIDTH;
|
|
375
374
|
}
|
|
376
|
-
},
|
|
375
|
+
}, zt = class extends i {
|
|
377
376
|
getParentControlId() {
|
|
378
377
|
return n.BLOCK_BUTTON.FONT_FAMILY;
|
|
379
378
|
}
|
|
380
|
-
},
|
|
379
|
+
}, Zt = class extends i {
|
|
381
380
|
getParentControlId() {
|
|
382
381
|
return n.BLOCK_BUTTON.EXTERNAL_INDENTS;
|
|
383
382
|
}
|
|
384
|
-
},
|
|
383
|
+
}, jt = class extends i {
|
|
385
384
|
getParentControlId() {
|
|
386
385
|
return n.BLOCK_BUTTON.INTERNAL_INDENTS;
|
|
387
386
|
}
|
|
388
|
-
},
|
|
387
|
+
}, qt = class extends i {
|
|
389
388
|
getParentControlId() {
|
|
390
389
|
return n.BLOCK_BUTTON.TEXT;
|
|
391
390
|
}
|
|
392
|
-
},
|
|
391
|
+
}, Jt = class extends i {
|
|
393
392
|
getParentControlId() {
|
|
394
393
|
return n.BLOCK_BUTTON.FONT_SIZE;
|
|
395
394
|
}
|
|
396
|
-
},
|
|
395
|
+
}, te = class extends i {
|
|
397
396
|
getParentControlId() {
|
|
398
397
|
return n.BLOCK_BUTTON.TEXT_STYLE_AND_COLOR;
|
|
399
398
|
}
|
|
400
399
|
getLabels() {
|
|
401
400
|
}
|
|
402
|
-
}, k = class
|
|
401
|
+
}, k = class R extends a {
|
|
403
402
|
constructor() {
|
|
404
|
-
super(
|
|
403
|
+
super(R.REQUIRED_METHODS, R);
|
|
405
404
|
}
|
|
406
405
|
/**
|
|
407
406
|
* @description Allows to determine if control should be visible or hidden in control panel.
|
|
408
407
|
* Called on every node modification.
|
|
409
408
|
*/
|
|
410
|
-
isVisible(
|
|
409
|
+
isVisible(e) {
|
|
411
410
|
return !0;
|
|
412
411
|
}
|
|
413
412
|
/**
|
|
@@ -444,112 +443,42 @@ var Z = {
|
|
|
444
443
|
* Implement this to react to changes in the block/structure and update the control's UI elements accordingly.
|
|
445
444
|
* @param node - The updated immutable HTML node representing the control's context.
|
|
446
445
|
*/
|
|
447
|
-
onTemplateNodeUpdated(
|
|
446
|
+
onTemplateNodeUpdated(e) {
|
|
448
447
|
}
|
|
449
448
|
/**
|
|
450
449
|
* Lifecycle hook called when any part of the document template has changed.
|
|
451
450
|
* This can be frequent; use cautiously for performance-sensitive operations.
|
|
452
451
|
* @param _node - The immutable HTML node representing current node instance
|
|
453
452
|
*/
|
|
454
|
-
onDocumentChanged(
|
|
453
|
+
onDocumentChanged(e) {
|
|
455
454
|
}
|
|
456
455
|
};
|
|
457
456
|
k.REQUIRED_METHODS = ["getId", "getTemplate"];
|
|
458
|
-
var
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
/**
|
|
463
|
-
* Gets the unique identifier for this tab.
|
|
464
|
-
* This ID is used for registration.
|
|
465
|
-
* @returns A unique string ID.
|
|
466
|
-
*/
|
|
467
|
-
getId() {
|
|
468
|
-
throw new Error("Method getId() must be implemented by the subclass");
|
|
469
|
-
}
|
|
470
|
-
/**
|
|
471
|
-
* Gets the icon key representing this tab in the header.
|
|
472
|
-
* @returns A string representing the icon key from the IconsRegistry
|
|
473
|
-
*/
|
|
474
|
-
getIcon() {
|
|
475
|
-
throw new Error("Method getIcon() must be implemented by the subclass");
|
|
476
|
-
}
|
|
477
|
-
/**
|
|
478
|
-
* Retrieves the index of the tab associated with the panel.
|
|
479
|
-
* The index represents the position/order of the tab in the UI.
|
|
480
|
-
*
|
|
481
|
-
* @returns {number} The index of the tab.
|
|
482
|
-
*/
|
|
483
|
-
getTabIndex() {
|
|
484
|
-
throw new Error("Method getTabIndex() must be implemented by the subclass");
|
|
485
|
-
}
|
|
486
|
-
/**
|
|
487
|
-
* Gets the display name of the tab shown to the user in the header hint.
|
|
488
|
-
* Use `this.api.translate()` for localization.
|
|
489
|
-
* @returns The localized tab name string.
|
|
490
|
-
*/
|
|
491
|
-
getName() {
|
|
492
|
-
throw new Error("Method getName() must be implemented by the subclass");
|
|
493
|
-
}
|
|
494
|
-
/**
|
|
495
|
-
* Determines if the tab should be available for use in the editor.
|
|
496
|
-
* Override to provide custom logic based on the editor state or configuration.
|
|
497
|
-
* @returns True if the tab is enabled, false otherwise. Defaults to true.
|
|
498
|
-
*/
|
|
499
|
-
isEnabled() {
|
|
500
|
-
return !0;
|
|
501
|
-
}
|
|
502
|
-
/**
|
|
503
|
-
* Gets the HTML template string that defines the initial template of general tab.
|
|
504
|
-
* @returns An HTML string.
|
|
505
|
-
*/
|
|
506
|
-
getTemplate() {
|
|
507
|
-
throw new Error("Method getTemplate() must be implemented by the subclass");
|
|
457
|
+
var ee = k, V = class extends x {
|
|
458
|
+
getTargetNodes(t) {
|
|
459
|
+
const e = t.querySelectorAll(O.IMAGE), r = t.asElement().hasClass(K) ? [t] : [];
|
|
460
|
+
return e.length ? e : r;
|
|
508
461
|
}
|
|
509
|
-
|
|
510
|
-
* Lifecycle hook called when any part of the document template has changed.
|
|
511
|
-
* This can be frequent; use cautiously for performance-sensitive operations.
|
|
512
|
-
*/
|
|
513
|
-
onDocumentChanged() {
|
|
514
|
-
}
|
|
515
|
-
/**
|
|
516
|
-
* Optional hook called when the general panel tab is initially rendered.
|
|
517
|
-
* Use this for setup tasks like attaching event listeners to the panel's template elements.
|
|
518
|
-
*/
|
|
519
|
-
onRender() {
|
|
520
|
-
}
|
|
521
|
-
/**
|
|
522
|
-
* Optional cleanup hook called when the general panel tab is being destroyed.
|
|
523
|
-
*/
|
|
524
|
-
onDestroy() {
|
|
525
|
-
}
|
|
526
|
-
};
|
|
527
|
-
Ne.REQUIRED_METHODS = ["getId", "getIcon", "getName", "getTemplate", "getTabIndex"];
|
|
528
|
-
var G = class extends M {
|
|
529
|
-
getTargetNodes(e) {
|
|
530
|
-
const t = e.querySelectorAll(I.IMAGE), r = e.asElement().hasClass(w) ? [e] : [];
|
|
531
|
-
return t.length ? t : r;
|
|
532
|
-
}
|
|
533
|
-
}, Ze = class extends G {
|
|
462
|
+
}, re = class extends V {
|
|
534
463
|
getParentControlId() {
|
|
535
464
|
return n.BLOCK_IMAGE.EXTERNAL_INDENTS;
|
|
536
465
|
}
|
|
537
|
-
},
|
|
466
|
+
}, ne = class extends V {
|
|
538
467
|
getParentControlId() {
|
|
539
468
|
return n.BLOCK_IMAGE.SIZE;
|
|
540
469
|
}
|
|
541
|
-
},
|
|
470
|
+
}, G = class L extends a {
|
|
542
471
|
constructor() {
|
|
543
|
-
super(
|
|
472
|
+
super(L.REQUIRED_METHODS, L);
|
|
544
473
|
}
|
|
545
|
-
registerBlockControls(
|
|
474
|
+
registerBlockControls(e) {
|
|
546
475
|
throw new Error("Method registerBlockControls() must be implemented by the subclass");
|
|
547
476
|
}
|
|
548
477
|
};
|
|
549
|
-
|
|
550
|
-
var
|
|
551
|
-
constructor(
|
|
552
|
-
this.tabId =
|
|
478
|
+
G.REQUIRED_METHODS = ["registerBlockControls"];
|
|
479
|
+
var se = G, ae = class {
|
|
480
|
+
constructor(t, e) {
|
|
481
|
+
this.tabId = t, this.controlsIds = e;
|
|
553
482
|
}
|
|
554
483
|
getTabId() {
|
|
555
484
|
return this.tabId;
|
|
@@ -560,52 +489,52 @@ var qe = V, Je = class {
|
|
|
560
489
|
getControlsIds() {
|
|
561
490
|
return this.controlsIds;
|
|
562
491
|
}
|
|
563
|
-
withLabel(
|
|
564
|
-
return this.label =
|
|
492
|
+
withLabel(t) {
|
|
493
|
+
return this.label = t, this;
|
|
565
494
|
}
|
|
566
|
-
addControl(
|
|
567
|
-
return
|
|
495
|
+
addControl(t, e) {
|
|
496
|
+
return e < 0 ? this.controlsIds.unshift(t) : e > this.controlsIds.length ? this.controlsIds.push(t) : this.controlsIds.splice(e, 0, t), this;
|
|
568
497
|
}
|
|
569
|
-
deleteControl(
|
|
570
|
-
const
|
|
571
|
-
|
|
498
|
+
deleteControl(t) {
|
|
499
|
+
const e = this.controlsIds.indexOf(t);
|
|
500
|
+
e !== -1 && this.controlsIds.splice(e, 1);
|
|
572
501
|
}
|
|
573
|
-
},
|
|
574
|
-
getTargetNodes(
|
|
575
|
-
const
|
|
576
|
-
return
|
|
502
|
+
}, d = class extends x {
|
|
503
|
+
getTargetNodes(t) {
|
|
504
|
+
const e = t.querySelectorAll(O.TEXT), r = t.asElement().hasClass(p) ? [t] : [];
|
|
505
|
+
return e.length ? e : r;
|
|
577
506
|
}
|
|
578
|
-
},
|
|
507
|
+
}, ie = class extends d {
|
|
579
508
|
getParentControlId() {
|
|
580
509
|
return n.GENERAL.TEXT_ALIGN;
|
|
581
510
|
}
|
|
582
|
-
},
|
|
583
|
-
getParentControlId() {
|
|
584
|
-
return n.BLOCK_TEXT.TEXT_BLOCK_BACKGROUND_COLOR;
|
|
585
|
-
}
|
|
586
|
-
}, rt = class extends l {
|
|
511
|
+
}, oe = class extends d {
|
|
587
512
|
getParentControlId() {
|
|
588
513
|
return n.GENERAL.TEXT_COLOR;
|
|
589
514
|
}
|
|
590
|
-
},
|
|
515
|
+
}, Ee = class extends d {
|
|
591
516
|
getParentControlId() {
|
|
592
517
|
return n.BLOCK_TEXT.FONT_FAMILY;
|
|
593
518
|
}
|
|
594
|
-
},
|
|
519
|
+
}, le = class extends d {
|
|
520
|
+
getParentControlId() {
|
|
521
|
+
return n.GENERAL.TEXT_LINE_SPACING;
|
|
522
|
+
}
|
|
523
|
+
}, de = class extends d {
|
|
595
524
|
getParentControlId() {
|
|
596
525
|
return n.BLOCK_TEXT.INTERNAL_INDENTS;
|
|
597
526
|
}
|
|
598
|
-
},
|
|
527
|
+
}, ue = class extends d {
|
|
599
528
|
getParentControlId() {
|
|
600
529
|
return n.GENERAL.TEXT_SIZE;
|
|
601
530
|
}
|
|
602
|
-
},
|
|
531
|
+
}, Ie = class extends d {
|
|
603
532
|
getParentControlId() {
|
|
604
533
|
return n.GENERAL.TEXT_STYLE;
|
|
605
534
|
}
|
|
606
|
-
},
|
|
607
|
-
constructor(e) {
|
|
608
|
-
this.uiElements = [], this.controls = [], this.contextActions = [], this.blocks = [], this.
|
|
535
|
+
}, Ut = class {
|
|
536
|
+
constructor(t, e, r = [], s, E = [], T, I = [], l = [], v, $, W, z, Z, j, q, J, tt) {
|
|
537
|
+
this.uiElements = [], this.controls = [], this.contextActions = [], this.blocks = [], this.i18n = t, this.styles = e, this.previewStyles = W, this.uiElements = r, this.uiElementTagRegistry = s, this.controls = E, this.settingsPanelRegistry = T, this.contextActions = I, this.blocks = l, this.externalSmartElementsLibrary = v, this.externalImageLibrary = $, this.externalImageLibraryTab = tt, this.externalAiAssistant = z, this.externalDisplayConditionsLibrary = Z, this.externalVideoLibrary = j, this.blocksPanel = q, this.iconsRegistry = J, this.id = Math.random().toString(36).substring(2);
|
|
609
538
|
}
|
|
610
539
|
getI18n() {
|
|
611
540
|
return this.i18n;
|
|
@@ -661,111 +590,104 @@ var qe = V, Je = class {
|
|
|
661
590
|
getIconsRegistry() {
|
|
662
591
|
return this.iconsRegistry;
|
|
663
592
|
}
|
|
664
|
-
|
|
665
|
-
return this.generalPanelTabs;
|
|
666
|
-
}
|
|
667
|
-
}, Et = class {
|
|
593
|
+
}, Oe = class {
|
|
668
594
|
constructor() {
|
|
669
|
-
this.styles = [], this.uiElements = [], this.controls = [], this.contextActions = [], this.blocks = []
|
|
595
|
+
this.styles = [], this.uiElements = [], this.controls = [], this.contextActions = [], this.blocks = [];
|
|
670
596
|
}
|
|
671
|
-
withLocalization(
|
|
672
|
-
return this.i18n =
|
|
597
|
+
withLocalization(t) {
|
|
598
|
+
return this.i18n = t, this;
|
|
673
599
|
}
|
|
674
600
|
/**
|
|
675
601
|
* @deprecated Use addStyles() instead. This method will be removed in a future version.
|
|
676
602
|
*/
|
|
677
|
-
withStyles(
|
|
678
|
-
return this.styles = [
|
|
603
|
+
withStyles(t) {
|
|
604
|
+
return this.styles = [t], this;
|
|
679
605
|
}
|
|
680
|
-
addStyles(
|
|
681
|
-
return this.styles.push(
|
|
606
|
+
addStyles(t) {
|
|
607
|
+
return this.styles.push(t), this;
|
|
682
608
|
}
|
|
683
609
|
/**
|
|
684
610
|
* @description defines custom developer styles to use inside the editor document preview
|
|
685
611
|
*/
|
|
686
|
-
withPreviewStyles(
|
|
687
|
-
return this.previewStyles =
|
|
688
|
-
}
|
|
689
|
-
addContextAction(e) {
|
|
690
|
-
return this.contextActions.push(e), this;
|
|
612
|
+
withPreviewStyles(t) {
|
|
613
|
+
return this.previewStyles = t, this;
|
|
691
614
|
}
|
|
692
|
-
|
|
693
|
-
return this.
|
|
615
|
+
addContextAction(t) {
|
|
616
|
+
return this.contextActions.push(t), this;
|
|
694
617
|
}
|
|
695
|
-
|
|
696
|
-
return this.
|
|
618
|
+
addUiElement(t) {
|
|
619
|
+
return this.uiElements.push(t), this;
|
|
697
620
|
}
|
|
698
|
-
|
|
699
|
-
return this.
|
|
621
|
+
withUiElementTagRegistry(t) {
|
|
622
|
+
return this.uiElementTagRegistry = t, this;
|
|
700
623
|
}
|
|
701
|
-
|
|
702
|
-
return this.
|
|
624
|
+
addControl(t) {
|
|
625
|
+
return this.controls.push(t), this;
|
|
703
626
|
}
|
|
704
|
-
|
|
705
|
-
return this.
|
|
627
|
+
withSettingsPanelRegistry(t) {
|
|
628
|
+
return this.settingsPanelRegistry = t, this;
|
|
706
629
|
}
|
|
707
|
-
|
|
708
|
-
return this.
|
|
630
|
+
withExternalSmartElementsLibrary(t) {
|
|
631
|
+
return this.externalSmartElementsLibrary = t, this;
|
|
709
632
|
}
|
|
710
|
-
|
|
711
|
-
return this.
|
|
633
|
+
withExternalImageLibrary(t) {
|
|
634
|
+
return this.externalImageLibrary = t, this;
|
|
712
635
|
}
|
|
713
|
-
|
|
714
|
-
return this.
|
|
636
|
+
withExternalImageLibraryTab(t) {
|
|
637
|
+
return this.externalImageLibraryTab = t, this;
|
|
715
638
|
}
|
|
716
|
-
|
|
717
|
-
return this.
|
|
639
|
+
withExternalAiAssistant(t) {
|
|
640
|
+
return this.externalAiAssistant = t, this;
|
|
718
641
|
}
|
|
719
|
-
|
|
720
|
-
return this.
|
|
642
|
+
withExternalDisplayCondition(t) {
|
|
643
|
+
return this.externalDisplayConditionsLibrary = t, this;
|
|
721
644
|
}
|
|
722
|
-
|
|
723
|
-
return this.
|
|
645
|
+
withExternalVideosLibrary(t) {
|
|
646
|
+
return this.externalVideoLibrary = t, this;
|
|
724
647
|
}
|
|
725
|
-
|
|
726
|
-
return this.
|
|
648
|
+
withBlocksPanel(t) {
|
|
649
|
+
return this.blocksPanel = t, this;
|
|
727
650
|
}
|
|
728
|
-
|
|
729
|
-
return this.
|
|
651
|
+
addBlock(t) {
|
|
652
|
+
return this.blocks.push(t), this;
|
|
730
653
|
}
|
|
731
|
-
|
|
732
|
-
return this.
|
|
654
|
+
withIconsRegistry(t) {
|
|
655
|
+
return this.iconsRegistry = t, this;
|
|
733
656
|
}
|
|
734
657
|
build() {
|
|
735
|
-
return new
|
|
736
|
-
|
|
737
|
-
|
|
658
|
+
return new Ut(
|
|
659
|
+
this.i18n,
|
|
660
|
+
(this.styles || []).map((t) => t.trim()).join(`
|
|
738
661
|
`),
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
}, Se = class m extends a {
|
|
662
|
+
this.uiElements,
|
|
663
|
+
this.uiElementTagRegistry,
|
|
664
|
+
this.controls,
|
|
665
|
+
this.settingsPanelRegistry,
|
|
666
|
+
this.contextActions,
|
|
667
|
+
this.blocks,
|
|
668
|
+
this.externalSmartElementsLibrary,
|
|
669
|
+
this.externalImageLibrary,
|
|
670
|
+
this.previewStyles,
|
|
671
|
+
this.externalAiAssistant,
|
|
672
|
+
this.externalDisplayConditionsLibrary,
|
|
673
|
+
this.externalVideoLibrary,
|
|
674
|
+
this.blocksPanel,
|
|
675
|
+
this.iconsRegistry,
|
|
676
|
+
this.externalImageLibraryTab
|
|
677
|
+
);
|
|
678
|
+
}
|
|
679
|
+
}, pt = class C extends a {
|
|
758
680
|
constructor() {
|
|
759
|
-
super(
|
|
681
|
+
super(C.REQUIRED_METHODS, C);
|
|
760
682
|
}
|
|
761
|
-
openAiAssistant(
|
|
683
|
+
openAiAssistant({ value: e, onDataSelectCallback: r, onCancelCallback: s, type: E }) {
|
|
762
684
|
throw new Error("Method openAiAssistant() must be implemented by the subclass");
|
|
763
685
|
}
|
|
764
686
|
};
|
|
765
|
-
|
|
766
|
-
var
|
|
687
|
+
pt.REQUIRED_METHODS = ["openAiAssistant"];
|
|
688
|
+
var Kt = class m extends a {
|
|
767
689
|
constructor() {
|
|
768
|
-
super(
|
|
690
|
+
super(m.REQUIRED_METHODS, m);
|
|
769
691
|
}
|
|
770
692
|
/**
|
|
771
693
|
* Retrieves the name of the category.
|
|
@@ -778,11 +700,11 @@ var Be = class R extends a {
|
|
|
778
700
|
/**
|
|
779
701
|
* Opens a popup dialog for creating or updating a display condition.
|
|
780
702
|
*
|
|
781
|
-
* @param {DisplayCondition}
|
|
782
|
-
* @param {ExternalDisplayConditionSelectedCB}
|
|
783
|
-
* @param {() => void}
|
|
703
|
+
* @param {DisplayCondition} currentCondition - The currently selected display condition to edit.
|
|
704
|
+
* @param {ExternalDisplayConditionSelectedCB} successCallback - Callback executed with the updated or newly created condition upon success.
|
|
705
|
+
* @param {() => void} cancelCallback - Callback executed when the dialog is closed without making changes.
|
|
784
706
|
*/
|
|
785
|
-
openExternalDisplayConditionsDialog(
|
|
707
|
+
openExternalDisplayConditionsDialog(e, r, s) {
|
|
786
708
|
throw new Error("Method openExternalDisplayConditionsDialog() must be implemented by the subclass");
|
|
787
709
|
}
|
|
788
710
|
/**
|
|
@@ -803,19 +725,19 @@ var Be = class R extends a {
|
|
|
803
725
|
throw new Error("Method getContextActionIndex() must be implemented by the subclass");
|
|
804
726
|
}
|
|
805
727
|
};
|
|
806
|
-
|
|
807
|
-
var
|
|
728
|
+
Kt.REQUIRED_METHODS = ["getCategoryName", "openExternalDisplayConditionsDialog"];
|
|
729
|
+
var Ft = class g extends a {
|
|
808
730
|
constructor() {
|
|
809
|
-
super(
|
|
731
|
+
super(g.REQUIRED_METHODS, g);
|
|
810
732
|
}
|
|
811
|
-
openImageLibrary(
|
|
733
|
+
openImageLibrary(e, r, s) {
|
|
812
734
|
throw new Error("Method openImageLibrary() must be implemented by the subclass");
|
|
813
735
|
}
|
|
814
736
|
};
|
|
815
|
-
|
|
816
|
-
var
|
|
737
|
+
Ft.REQUIRED_METHODS = ["openImageLibrary"];
|
|
738
|
+
var wt = class b extends a {
|
|
817
739
|
constructor() {
|
|
818
|
-
super(
|
|
740
|
+
super(b.REQUIRED_METHODS, b);
|
|
819
741
|
}
|
|
820
742
|
/**
|
|
821
743
|
* @description Returns the translated name/label for the tab
|
|
@@ -828,46 +750,45 @@ var xe = class L extends a {
|
|
|
828
750
|
* @description Opens the external image library tab and provides a container for rendering
|
|
829
751
|
* @param _container - DOM element container where the external library UI should be rendered
|
|
830
752
|
* @param _onImageSelectCallback - Callback to invoke when an image is selected
|
|
831
|
-
* @param _selectedNode - (Optional) Selected node for which the gallery is being opened
|
|
832
753
|
*/
|
|
833
|
-
openImageLibraryTab(
|
|
754
|
+
openImageLibraryTab(e, r) {
|
|
834
755
|
throw new Error("Method openImageLibraryTab() must be implemented by the subclass");
|
|
835
756
|
}
|
|
836
757
|
};
|
|
837
|
-
|
|
838
|
-
var
|
|
758
|
+
wt.REQUIRED_METHODS = ["getName", "openImageLibraryTab"];
|
|
759
|
+
var Pt = class N extends a {
|
|
839
760
|
constructor() {
|
|
840
|
-
super(
|
|
761
|
+
super(N.REQUIRED_METHODS, N);
|
|
841
762
|
}
|
|
842
|
-
openSmartElementsLibrary(
|
|
763
|
+
openSmartElementsLibrary(e, r) {
|
|
843
764
|
throw new Error("Method openSmartElementsLibrary() must be implemented by the subclass");
|
|
844
765
|
}
|
|
845
766
|
};
|
|
846
|
-
|
|
847
|
-
var
|
|
767
|
+
Pt.REQUIRED_METHODS = ["openSmartElementsLibrary"];
|
|
768
|
+
var Ht = class A extends a {
|
|
848
769
|
constructor() {
|
|
849
770
|
super(A.REQUIRED_METHODS, A);
|
|
850
771
|
}
|
|
851
|
-
openExternalVideosLibraryDialog(
|
|
772
|
+
openExternalVideosLibraryDialog(e, r, s) {
|
|
852
773
|
throw new Error("Method openExternalVideosLibraryDialog() must be implemented by the subclass");
|
|
853
774
|
}
|
|
854
775
|
};
|
|
855
|
-
|
|
856
|
-
var Q = class
|
|
776
|
+
Ht.REQUIRED_METHODS = ["openExternalVideosLibraryDialog"];
|
|
777
|
+
var Q = class D extends a {
|
|
857
778
|
constructor() {
|
|
858
|
-
super(
|
|
779
|
+
super(D.REQUIRED_METHODS, D);
|
|
859
780
|
}
|
|
860
|
-
registerIconsSvg(
|
|
781
|
+
registerIconsSvg(e) {
|
|
861
782
|
throw new Error("Method registerIconsSvg() must be implemented by the subclass");
|
|
862
783
|
}
|
|
863
784
|
};
|
|
864
785
|
Q.REQUIRED_METHODS = ["registerIconsSvg"];
|
|
865
|
-
var
|
|
866
|
-
constructor(
|
|
867
|
-
this.key =
|
|
786
|
+
var Te = Q, ce = class {
|
|
787
|
+
constructor(t) {
|
|
788
|
+
this.key = t;
|
|
868
789
|
}
|
|
869
|
-
withParams(
|
|
870
|
-
return this.params =
|
|
790
|
+
withParams(t) {
|
|
791
|
+
return this.params = t, this;
|
|
871
792
|
}
|
|
872
793
|
getValue() {
|
|
873
794
|
return {
|
|
@@ -875,15 +796,15 @@ var lt = Q, ot = class {
|
|
|
875
796
|
params: this.params
|
|
876
797
|
};
|
|
877
798
|
}
|
|
878
|
-
},
|
|
799
|
+
}, f = class S extends a {
|
|
879
800
|
constructor() {
|
|
880
|
-
super(
|
|
801
|
+
super(S.REQUIRED_METHODS, S);
|
|
881
802
|
}
|
|
882
803
|
/**
|
|
883
804
|
* Called when the UI element should render its content into the provided container.
|
|
884
805
|
* @param container - The HTMLElement where the UI element should be rendered.
|
|
885
806
|
*/
|
|
886
|
-
onRender(
|
|
807
|
+
onRender(e) {
|
|
887
808
|
throw new Error("Method onRender() must be implemented by the subclass");
|
|
888
809
|
}
|
|
889
810
|
/**
|
|
@@ -904,7 +825,7 @@ var lt = Q, ot = class {
|
|
|
904
825
|
* Implement this if the element manages a state or value and needs to be updated externally.
|
|
905
826
|
* @param value - The new value to set.
|
|
906
827
|
*/
|
|
907
|
-
setValue(
|
|
828
|
+
setValue(e) {
|
|
908
829
|
}
|
|
909
830
|
/**
|
|
910
831
|
* @description Optional hook called when one of the element's supported attributes ({@link UEAttr}) gets updated externally.
|
|
@@ -912,7 +833,7 @@ var lt = Q, ot = class {
|
|
|
912
833
|
* @param name - The name of the attribute that was updated.
|
|
913
834
|
* @param value - The new value of the attribute.
|
|
914
835
|
*/
|
|
915
|
-
onAttributeUpdated(
|
|
836
|
+
onAttributeUpdated(e, r) {
|
|
916
837
|
}
|
|
917
838
|
/**
|
|
918
839
|
* Gets the unique identifier for this UI element type.
|
|
@@ -930,61 +851,61 @@ var lt = Q, ot = class {
|
|
|
930
851
|
throw new Error("Method getTemplate() must be implemented by the subclass");
|
|
931
852
|
}
|
|
932
853
|
};
|
|
933
|
-
|
|
934
|
-
var
|
|
854
|
+
f.REQUIRED_METHODS = ["onRender", "getId", "getTemplate"];
|
|
855
|
+
var _e = f, Y = class B extends a {
|
|
935
856
|
constructor() {
|
|
936
|
-
super(
|
|
857
|
+
super(B.REQUIRED_METHODS, B);
|
|
937
858
|
}
|
|
938
|
-
registerUiElements(
|
|
859
|
+
registerUiElements(e) {
|
|
939
860
|
throw new Error("Method registerUiElements() must be implemented by the subclass");
|
|
940
861
|
}
|
|
941
862
|
};
|
|
942
|
-
|
|
943
|
-
var
|
|
863
|
+
Y.REQUIRED_METHODS = ["registerUiElements"];
|
|
864
|
+
var he = Y;
|
|
944
865
|
export {
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
866
|
+
Xt as Block,
|
|
867
|
+
kt as BlockAttr,
|
|
868
|
+
et as BlockCompositionType,
|
|
869
|
+
O as BlockSelector,
|
|
870
|
+
ht as BlockType,
|
|
871
|
+
x as BuiltInControl,
|
|
951
872
|
n as BuiltInControlTypes,
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
873
|
+
Qt as ButtonAlignBuiltInControl,
|
|
874
|
+
ft as ButtonBackgroundColorBuiltInControl,
|
|
875
|
+
Yt as ButtonBorderBuiltInControl,
|
|
876
|
+
Gt as ButtonBorderRadiusBuiltInControl,
|
|
877
|
+
$t as ButtonColorBuiltInControl,
|
|
878
|
+
w as ButtonControls,
|
|
879
|
+
Wt as ButtonFitToContainerBuiltInControl,
|
|
880
|
+
zt as ButtonFontFamilyBuiltInControl,
|
|
881
|
+
Zt as ButtonMarginsBuiltInControl,
|
|
882
|
+
jt as ButtonPaddingsBuiltInControl,
|
|
883
|
+
qt as ButtonTextBuiltInControl,
|
|
884
|
+
Jt as ButtonTextSizeBuiltInControl,
|
|
885
|
+
te as ButtonTextStyleAndFontColorBuiltInControl,
|
|
886
|
+
Rt as ContainerControls,
|
|
887
|
+
ee as Control,
|
|
888
|
+
Ut as Extension,
|
|
889
|
+
Oe as ExtensionBuilder,
|
|
890
|
+
F as GeneralControls,
|
|
891
|
+
Te as IconsRegistry,
|
|
971
892
|
H as ImageControls,
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
893
|
+
re as ImageMarginsBuiltInControl,
|
|
894
|
+
ne as ImageSizeBuiltInControl,
|
|
895
|
+
ce as ModificationDescription,
|
|
896
|
+
se as SettingsPanelRegistry,
|
|
897
|
+
ae as SettingsPanelTab,
|
|
898
|
+
Lt as SettingsTab,
|
|
899
|
+
ie as TextAlignBuiltInControl,
|
|
900
|
+
oe as TextColorBuiltInControl,
|
|
901
|
+
P as TextControls,
|
|
902
|
+
Ee as TextFontFamilyBuiltInControl,
|
|
903
|
+
le as TextLineSpacingBuiltInControl,
|
|
904
|
+
de as TextPaddingsBuiltInControl,
|
|
905
|
+
ue as TextSizeBuiltInControl,
|
|
906
|
+
Ie as TextStyleBuiltInControl,
|
|
907
|
+
Vt as UEAttr,
|
|
908
|
+
_e as UIElement,
|
|
909
|
+
he as UIElementTagRegistry,
|
|
910
|
+
yt as UIElementType
|
|
990
911
|
};
|