@useinsider/guido 2.0.0-beta.782343a → 2.0.0-beta.7a88d79
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/@types/config/schemas.js +53 -39
- package/dist/components/organisms/email-preview/amp/AmpToggle.vue.js +2 -2
- package/dist/components/organisms/header/RightSlot.vue2.js +10 -10
- package/dist/composables/useConfig.js +29 -27
- package/dist/composables/useSave.js +13 -11
- package/dist/extensions/Blocks/Items/controls/cardComposition.js +4 -13
- package/dist/extensions/Blocks/Recommendation/cardCompositionControl.js +103 -0
- package/dist/extensions/Blocks/Recommendation/constants.js +5 -0
- package/dist/extensions/Blocks/Recommendation/{controls/main/index.js → control.js} +67 -101
- package/dist/extensions/Blocks/Recommendation/controls/button/align.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/border.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/borderRadius.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/color.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/fitToContent.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/fontFamily.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/margins.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/paddings.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/text.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/textSize.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/textStyleAndFontColor.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/image/margins.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/image/size.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/align.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/background.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/color.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/fontFamily.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/paddings.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/size.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/style.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/align.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/background.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/color.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/fontFamily.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/paddings.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/size.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/style.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/price/align.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/price/background.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/price/color.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/price/fontFamily.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/price/paddings.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/price/size.js +13 -0
- package/dist/extensions/Blocks/Recommendation/controls/price/style.js +13 -0
- package/dist/extensions/Blocks/Recommendation/extension.js +43 -37
- package/dist/extensions/Blocks/Recommendation/settingsPanel.js +72 -125
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +20 -20
- package/dist/extensions/Blocks/Recommendation/templates/blockTemplate.js +69 -91
- package/dist/extensions/Blocks/Recommendation/templates/migrationTemplate.js +17 -54
- package/dist/extensions/Blocks/Recommendation/templates/templateUtils.js +62 -66
- package/dist/extensions/Blocks/Unsubscribe/extension.js +9 -9
- package/dist/extensions/Blocks/common-control.js +6 -7
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +290 -363
- package/dist/package.json.js +1 -1
- package/dist/src/@types/config/index.d.ts +2 -2
- package/dist/src/@types/config/schemas.d.ts +26 -0
- package/dist/src/@types/config/types.d.ts +7 -1
- package/dist/src/composables/useConfig.d.ts +6 -0
- package/dist/src/extensions/Blocks/Recommendation/cardCompositionControl.d.ts +28 -0
- package/dist/src/extensions/Blocks/Recommendation/{constants/controlIds.d.ts → constants.d.ts} +11 -19
- package/dist/src/extensions/Blocks/Recommendation/{controls/main/index.d.ts → control.d.ts} +3 -6
- package/dist/src/extensions/Blocks/Recommendation/controls/button/align.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/border.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/borderRadius.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/color.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/fitToContent.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/fontFamily.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/margins.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/paddings.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/text.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/textSize.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/textStyleAndFontColor.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/image/margins.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/image/size.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/align.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/background.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/color.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/fontFamily.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/paddings.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/size.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/style.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/align.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/background.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/color.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/fontFamily.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/paddings.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/size.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/style.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/align.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/background.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/color.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/fontFamily.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/paddings.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/size.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/style.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/extension.d.ts +0 -9
- package/dist/src/extensions/Blocks/Recommendation/templates/blockTemplate.d.ts +3 -3
- package/dist/src/extensions/Blocks/Recommendation/templates/templateUtils.d.ts +7 -15
- package/dist/src/extensions/Blocks/common-control.d.ts +1 -1
- package/dist/src/stores/config.d.ts +147 -1
- package/dist/static/styles/components/button.css.js +1 -1
- package/dist/static/styles/components/wide-panel.css.js +4 -0
- package/dist/static/styles/customEditorStyle.css.js +0 -13
- package/dist/stores/config.js +7 -0
- package/package.json +3 -3
- package/dist/extensions/Blocks/Recommendation/constants/blockIds.js +0 -4
- package/dist/extensions/Blocks/Recommendation/constants/controlIds.js +0 -4
- package/dist/extensions/Blocks/Recommendation/constants/selectors.js +0 -11
- package/dist/extensions/Blocks/Recommendation/controls/button/index.js +0 -64
- package/dist/extensions/Blocks/Recommendation/controls/cardBackground/index.js +0 -68
- package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +0 -179
- package/dist/extensions/Blocks/Recommendation/controls/image/index.js +0 -19
- package/dist/extensions/Blocks/Recommendation/controls/name/index.js +0 -46
- package/dist/extensions/Blocks/Recommendation/controls/name/textTrim.js +0 -76
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/index.js +0 -44
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/index.js +0 -48
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/textAfter.js +0 -73
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/textBefore.js +0 -73
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/index.js +0 -48
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/textAfter.js +0 -73
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/textBefore.js +0 -73
- package/dist/extensions/Blocks/Recommendation/controls/price/index.js +0 -44
- package/dist/extensions/Blocks/Recommendation/controls/spacing/index.js +0 -183
- package/dist/extensions/Blocks/Recommendation/utils/preserveTextStyles.js +0 -25
- package/dist/src/extensions/Blocks/Recommendation/constants/blockIds.d.ts +0 -13
- package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +0 -11
- package/dist/src/extensions/Blocks/Recommendation/constants/selectors.d.ts +0 -19
- package/dist/src/extensions/Blocks/Recommendation/controls/button/index.d.ts +0 -143
- package/dist/src/extensions/Blocks/Recommendation/controls/cardBackground/index.d.ts +0 -25
- package/dist/src/extensions/Blocks/Recommendation/controls/cardComposition/index.d.ts +0 -75
- package/dist/src/extensions/Blocks/Recommendation/controls/image/index.d.ts +0 -35
- package/dist/src/extensions/Blocks/Recommendation/controls/index.d.ts +0 -22
- package/dist/src/extensions/Blocks/Recommendation/controls/name/index.d.ts +0 -97
- package/dist/src/extensions/Blocks/Recommendation/controls/name/textTrim.d.ts +0 -16
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/index.d.ts +0 -95
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscount/index.d.ts +0 -100
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscount/textAfter.d.ts +0 -15
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscount/textBefore.d.ts +0 -15
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPrice/index.d.ts +0 -100
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPrice/textAfter.d.ts +0 -15
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPrice/textBefore.d.ts +0 -15
- package/dist/src/extensions/Blocks/Recommendation/controls/price/index.d.ts +0 -95
- package/dist/src/extensions/Blocks/Recommendation/controls/spacing/index.d.ts +0 -57
- package/dist/src/extensions/Blocks/Recommendation/utils/preserveTextStyles.d.ts +0 -19
|
@@ -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((d) => {
|
|
27
|
+
if (typeof this[d] != "function") {
|
|
28
|
+
s.push(`Method ${d}() is not defined`);
|
|
29
29
|
return;
|
|
30
30
|
}
|
|
31
|
-
|
|
32
|
-
}),
|
|
31
|
+
T[d] === r.prototype[d] && s.push(`Method ${d}() 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,93 +227,93 @@ var z = class O 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
239
|
width: "width"
|
|
240
|
-
},
|
|
240
|
+
}, at = {
|
|
241
241
|
href: "href"
|
|
242
|
-
},
|
|
243
|
-
BLOCK_IMAGE:
|
|
244
|
-
BLOCK_BUTTON:
|
|
245
|
-
},
|
|
246
|
-
BLOCK_BUTTON:
|
|
247
|
-
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,
|
|
248
248
|
BLOCK_IMAGE: H,
|
|
249
|
-
GENERAL:
|
|
250
|
-
},
|
|
249
|
+
GENERAL: F
|
|
250
|
+
}, Lt = /* @__PURE__ */ ((t) => (t.SETTINGS = "settings", t.STYLES = "styles", t.DATA = "data", t))(Lt || {}), o = {
|
|
251
251
|
name: "name",
|
|
252
252
|
disabled: "disabled"
|
|
253
|
-
},
|
|
254
|
-
...
|
|
253
|
+
}, Ct = {
|
|
254
|
+
...o,
|
|
255
255
|
caption: "caption",
|
|
256
256
|
icon: "icon"
|
|
257
|
-
},
|
|
258
|
-
...
|
|
257
|
+
}, gt = {
|
|
258
|
+
...o,
|
|
259
259
|
caption: "caption"
|
|
260
|
-
},
|
|
261
|
-
...
|
|
260
|
+
}, mt = {
|
|
261
|
+
...o,
|
|
262
262
|
minValue: "min-value",
|
|
263
263
|
maxValue: "max-value",
|
|
264
264
|
step: "step"
|
|
265
|
-
},
|
|
266
|
-
...
|
|
265
|
+
}, bt = {
|
|
266
|
+
...o,
|
|
267
267
|
text: "text"
|
|
268
|
-
},
|
|
269
|
-
...
|
|
268
|
+
}, Nt = {
|
|
269
|
+
...o
|
|
270
270
|
}, X = {
|
|
271
|
-
...
|
|
271
|
+
...o,
|
|
272
272
|
searchable: "searchable",
|
|
273
273
|
multiSelect: "multi-select",
|
|
274
274
|
placeholder: "placeholder",
|
|
275
275
|
items: "items"
|
|
276
|
-
},
|
|
276
|
+
}, At = {
|
|
277
277
|
...X
|
|
278
|
-
},
|
|
278
|
+
}, Dt = {
|
|
279
279
|
text: "text",
|
|
280
280
|
value: "value"
|
|
281
|
-
},
|
|
281
|
+
}, St = {
|
|
282
282
|
text: "text",
|
|
283
283
|
icon: "icon",
|
|
284
284
|
value: "value"
|
|
285
|
-
},
|
|
286
|
-
...
|
|
287
|
-
},
|
|
285
|
+
}, Bt = {
|
|
286
|
+
...o
|
|
287
|
+
}, Mt = {
|
|
288
288
|
controlId: "control-id"
|
|
289
|
-
},
|
|
290
|
-
...
|
|
289
|
+
}, xt = {
|
|
290
|
+
...o,
|
|
291
291
|
icon: "icon",
|
|
292
292
|
position: "position"
|
|
293
|
-
},
|
|
294
|
-
...
|
|
295
|
-
},
|
|
296
|
-
BUTTON:
|
|
297
|
-
CHECKBOX:
|
|
298
|
-
COLOR:
|
|
299
|
-
COUNTER:
|
|
300
|
-
LABEL:
|
|
301
|
-
RADIO_BUTTONS:
|
|
293
|
+
}, vt = {
|
|
294
|
+
...o
|
|
295
|
+
}, Gt = {
|
|
296
|
+
BUTTON: Ct,
|
|
297
|
+
CHECKBOX: gt,
|
|
298
|
+
COLOR: o,
|
|
299
|
+
COUNTER: mt,
|
|
300
|
+
LABEL: bt,
|
|
301
|
+
RADIO_BUTTONS: Nt,
|
|
302
302
|
SELECTPICKER: X,
|
|
303
|
-
FONT_FAMILY_SELECT:
|
|
304
|
-
SWITCHER:
|
|
305
|
-
TEXT:
|
|
306
|
-
SELECT_ITEM:
|
|
307
|
-
RADIO_ITEM:
|
|
308
|
-
NESTED_CONTROL:
|
|
309
|
-
ORDERABLE:
|
|
310
|
-
ORDERABLE_ITEM:
|
|
311
|
-
},
|
|
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 {
|
|
312
312
|
/**
|
|
313
313
|
* @description returns map of nodes parent control operates on
|
|
314
314
|
*/
|
|
315
|
-
getTargetNodes(
|
|
316
|
-
return [
|
|
315
|
+
getTargetNodes(t) {
|
|
316
|
+
return [t];
|
|
317
317
|
}
|
|
318
318
|
/**
|
|
319
319
|
* @description returns map of labels used by parent control UI
|
|
@@ -328,7 +328,7 @@ var Z = {
|
|
|
328
328
|
/**
|
|
329
329
|
* @description returns custom modifications to be included in the parent control patch
|
|
330
330
|
*/
|
|
331
|
-
getAdditionalModifications(
|
|
331
|
+
getAdditionalModifications(t) {
|
|
332
332
|
}
|
|
333
333
|
/**
|
|
334
334
|
* Determines whether the specified HTML node is visible.
|
|
@@ -336,77 +336,77 @@ var Z = {
|
|
|
336
336
|
* @param _node - The HTML node to evaluate for visibility, provided as an immutable object.
|
|
337
337
|
* @return A boolean value indicating whether the node is visible. Returns `true` if the node is visible, otherwise `false`.
|
|
338
338
|
*/
|
|
339
|
-
isVisible(
|
|
339
|
+
isVisible(t) {
|
|
340
340
|
return !0;
|
|
341
341
|
}
|
|
342
|
-
}, i = class extends
|
|
343
|
-
getTargetNodes(
|
|
344
|
-
const
|
|
345
|
-
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;
|
|
346
346
|
}
|
|
347
|
-
},
|
|
347
|
+
}, Vt = class extends i {
|
|
348
348
|
getParentControlId() {
|
|
349
349
|
return n.BLOCK_BUTTON.BORDER_RADIUS;
|
|
350
350
|
}
|
|
351
351
|
getLabels() {
|
|
352
352
|
}
|
|
353
|
-
},
|
|
353
|
+
}, Qt = class extends i {
|
|
354
354
|
getParentControlId() {
|
|
355
355
|
return n.BLOCK_BUTTON.ALIGNMENT;
|
|
356
356
|
}
|
|
357
|
-
},
|
|
357
|
+
}, ft = class extends i {
|
|
358
358
|
getParentControlId() {
|
|
359
359
|
return n.GENERAL.BACKGROUND_COLOR;
|
|
360
360
|
}
|
|
361
|
-
},
|
|
361
|
+
}, Yt = class extends i {
|
|
362
362
|
getParentControlId() {
|
|
363
363
|
return n.BLOCK_BUTTON.BORDER;
|
|
364
364
|
}
|
|
365
365
|
getLabels() {
|
|
366
366
|
}
|
|
367
|
-
},
|
|
367
|
+
}, $t = class extends i {
|
|
368
368
|
getParentControlId() {
|
|
369
369
|
return n.BLOCK_BUTTON.COLOR;
|
|
370
370
|
}
|
|
371
|
-
},
|
|
371
|
+
}, Wt = class extends i {
|
|
372
372
|
getParentControlId() {
|
|
373
373
|
return n.BLOCK_BUTTON.ADJUST_TO_WIDTH;
|
|
374
374
|
}
|
|
375
|
-
},
|
|
375
|
+
}, zt = class extends i {
|
|
376
376
|
getParentControlId() {
|
|
377
377
|
return n.BLOCK_BUTTON.FONT_FAMILY;
|
|
378
378
|
}
|
|
379
|
-
},
|
|
379
|
+
}, Zt = class extends i {
|
|
380
380
|
getParentControlId() {
|
|
381
381
|
return n.BLOCK_BUTTON.EXTERNAL_INDENTS;
|
|
382
382
|
}
|
|
383
|
-
},
|
|
383
|
+
}, jt = class extends i {
|
|
384
384
|
getParentControlId() {
|
|
385
385
|
return n.BLOCK_BUTTON.INTERNAL_INDENTS;
|
|
386
386
|
}
|
|
387
|
-
},
|
|
387
|
+
}, qt = class extends i {
|
|
388
388
|
getParentControlId() {
|
|
389
389
|
return n.BLOCK_BUTTON.TEXT;
|
|
390
390
|
}
|
|
391
|
-
},
|
|
391
|
+
}, Jt = class extends i {
|
|
392
392
|
getParentControlId() {
|
|
393
393
|
return n.BLOCK_BUTTON.FONT_SIZE;
|
|
394
394
|
}
|
|
395
|
-
},
|
|
395
|
+
}, te = class extends i {
|
|
396
396
|
getParentControlId() {
|
|
397
397
|
return n.BLOCK_BUTTON.TEXT_STYLE_AND_COLOR;
|
|
398
398
|
}
|
|
399
399
|
getLabels() {
|
|
400
400
|
}
|
|
401
|
-
}, k = class
|
|
401
|
+
}, k = class R extends a {
|
|
402
402
|
constructor() {
|
|
403
|
-
super(
|
|
403
|
+
super(R.REQUIRED_METHODS, R);
|
|
404
404
|
}
|
|
405
405
|
/**
|
|
406
406
|
* @description Allows to determine if control should be visible or hidden in control panel.
|
|
407
407
|
* Called on every node modification.
|
|
408
408
|
*/
|
|
409
|
-
isVisible(
|
|
409
|
+
isVisible(e) {
|
|
410
410
|
return !0;
|
|
411
411
|
}
|
|
412
412
|
/**
|
|
@@ -443,112 +443,42 @@ var Z = {
|
|
|
443
443
|
* Implement this to react to changes in the block/structure and update the control's UI elements accordingly.
|
|
444
444
|
* @param node - The updated immutable HTML node representing the control's context.
|
|
445
445
|
*/
|
|
446
|
-
onTemplateNodeUpdated(
|
|
446
|
+
onTemplateNodeUpdated(e) {
|
|
447
447
|
}
|
|
448
448
|
/**
|
|
449
449
|
* Lifecycle hook called when any part of the document template has changed.
|
|
450
450
|
* This can be frequent; use cautiously for performance-sensitive operations.
|
|
451
451
|
* @param _node - The immutable HTML node representing current node instance
|
|
452
452
|
*/
|
|
453
|
-
onDocumentChanged(
|
|
453
|
+
onDocumentChanged(e) {
|
|
454
454
|
}
|
|
455
455
|
};
|
|
456
456
|
k.REQUIRED_METHODS = ["getId", "getTemplate"];
|
|
457
|
-
var
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
/**
|
|
462
|
-
* Gets the unique identifier for this tab.
|
|
463
|
-
* This ID is used for registration.
|
|
464
|
-
* @returns A unique string ID.
|
|
465
|
-
*/
|
|
466
|
-
getId() {
|
|
467
|
-
throw new Error("Method getId() must be implemented by the subclass");
|
|
468
|
-
}
|
|
469
|
-
/**
|
|
470
|
-
* Gets the icon key representing this tab in the header.
|
|
471
|
-
* @returns A string representing the icon key from the IconsRegistry
|
|
472
|
-
*/
|
|
473
|
-
getIcon() {
|
|
474
|
-
throw new Error("Method getIcon() must be implemented by the subclass");
|
|
475
|
-
}
|
|
476
|
-
/**
|
|
477
|
-
* Retrieves the index of the tab associated with the panel.
|
|
478
|
-
* The index represents the position/order of the tab in the UI.
|
|
479
|
-
*
|
|
480
|
-
* @returns {number} The index of the tab.
|
|
481
|
-
*/
|
|
482
|
-
getTabIndex() {
|
|
483
|
-
throw new Error("Method getTabIndex() must be implemented by the subclass");
|
|
484
|
-
}
|
|
485
|
-
/**
|
|
486
|
-
* Gets the display name of the tab shown to the user in the header hint.
|
|
487
|
-
* Use `this.api.translate()` for localization.
|
|
488
|
-
* @returns The localized tab name string.
|
|
489
|
-
*/
|
|
490
|
-
getName() {
|
|
491
|
-
throw new Error("Method getName() must be implemented by the subclass");
|
|
492
|
-
}
|
|
493
|
-
/**
|
|
494
|
-
* Determines if the tab should be available for use in the editor.
|
|
495
|
-
* Override to provide custom logic based on the editor state or configuration.
|
|
496
|
-
* @returns True if the tab is enabled, false otherwise. Defaults to true.
|
|
497
|
-
*/
|
|
498
|
-
isEnabled() {
|
|
499
|
-
return !0;
|
|
500
|
-
}
|
|
501
|
-
/**
|
|
502
|
-
* Gets the HTML template string that defines the initial template of general tab.
|
|
503
|
-
* @returns An HTML string.
|
|
504
|
-
*/
|
|
505
|
-
getTemplate() {
|
|
506
|
-
throw new Error("Method getTemplate() must be implemented by the subclass");
|
|
507
|
-
}
|
|
508
|
-
/**
|
|
509
|
-
* Lifecycle hook called when any part of the document template has changed.
|
|
510
|
-
* This can be frequent; use cautiously for performance-sensitive operations.
|
|
511
|
-
*/
|
|
512
|
-
onDocumentChanged() {
|
|
513
|
-
}
|
|
514
|
-
/**
|
|
515
|
-
* Optional hook called when the general panel tab is initially rendered.
|
|
516
|
-
* Use this for setup tasks like attaching event listeners to the panel's template elements.
|
|
517
|
-
*/
|
|
518
|
-
onRender() {
|
|
519
|
-
}
|
|
520
|
-
/**
|
|
521
|
-
* Optional cleanup hook called when the general panel tab is being destroyed.
|
|
522
|
-
*/
|
|
523
|
-
onDestroy() {
|
|
457
|
+
var ee = k, G = 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;
|
|
524
461
|
}
|
|
525
|
-
}
|
|
526
|
-
Ne.REQUIRED_METHODS = ["getId", "getIcon", "getName", "getTemplate", "getTabIndex"];
|
|
527
|
-
var G = class extends M {
|
|
528
|
-
getTargetNodes(e) {
|
|
529
|
-
const t = e.querySelectorAll(I.IMAGE), r = e.asElement().hasClass(w) ? [e] : [];
|
|
530
|
-
return t.length ? t : r;
|
|
531
|
-
}
|
|
532
|
-
}, Ze = class extends G {
|
|
462
|
+
}, re = class extends G {
|
|
533
463
|
getParentControlId() {
|
|
534
464
|
return n.BLOCK_IMAGE.EXTERNAL_INDENTS;
|
|
535
465
|
}
|
|
536
|
-
},
|
|
466
|
+
}, ne = class extends G {
|
|
537
467
|
getParentControlId() {
|
|
538
468
|
return n.BLOCK_IMAGE.SIZE;
|
|
539
469
|
}
|
|
540
|
-
}, V = class
|
|
470
|
+
}, V = class L extends a {
|
|
541
471
|
constructor() {
|
|
542
|
-
super(
|
|
472
|
+
super(L.REQUIRED_METHODS, L);
|
|
543
473
|
}
|
|
544
|
-
registerBlockControls(
|
|
474
|
+
registerBlockControls(e) {
|
|
545
475
|
throw new Error("Method registerBlockControls() must be implemented by the subclass");
|
|
546
476
|
}
|
|
547
477
|
};
|
|
548
478
|
V.REQUIRED_METHODS = ["registerBlockControls"];
|
|
549
|
-
var
|
|
550
|
-
constructor(
|
|
551
|
-
this.tabId =
|
|
479
|
+
var se = V, ae = class {
|
|
480
|
+
constructor(t, e) {
|
|
481
|
+
this.tabId = t, this.controlsIds = e;
|
|
552
482
|
}
|
|
553
483
|
getTabId() {
|
|
554
484
|
return this.tabId;
|
|
@@ -559,52 +489,56 @@ var qe = V, Je = class {
|
|
|
559
489
|
getControlsIds() {
|
|
560
490
|
return this.controlsIds;
|
|
561
491
|
}
|
|
562
|
-
withLabel(
|
|
563
|
-
return this.label =
|
|
492
|
+
withLabel(t) {
|
|
493
|
+
return this.label = t, this;
|
|
564
494
|
}
|
|
565
|
-
addControl(
|
|
566
|
-
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;
|
|
567
497
|
}
|
|
568
|
-
deleteControl(
|
|
569
|
-
const
|
|
570
|
-
|
|
498
|
+
deleteControl(t) {
|
|
499
|
+
const e = this.controlsIds.indexOf(t);
|
|
500
|
+
e !== -1 && this.controlsIds.splice(e, 1);
|
|
571
501
|
}
|
|
572
|
-
}, l = class extends
|
|
573
|
-
getTargetNodes(
|
|
574
|
-
const
|
|
575
|
-
return
|
|
502
|
+
}, l = 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;
|
|
576
506
|
}
|
|
577
|
-
},
|
|
507
|
+
}, ie = class extends l {
|
|
578
508
|
getParentControlId() {
|
|
579
509
|
return n.GENERAL.TEXT_ALIGN;
|
|
580
510
|
}
|
|
581
|
-
},
|
|
511
|
+
}, oe = class extends l {
|
|
512
|
+
getParentControlId() {
|
|
513
|
+
return n.BLOCK_TEXT.TEXT_BLOCK_BACKGROUND_COLOR;
|
|
514
|
+
}
|
|
515
|
+
}, Ee = class extends l {
|
|
582
516
|
getParentControlId() {
|
|
583
517
|
return n.GENERAL.TEXT_COLOR;
|
|
584
518
|
}
|
|
585
|
-
},
|
|
519
|
+
}, le = class extends l {
|
|
586
520
|
getParentControlId() {
|
|
587
521
|
return n.BLOCK_TEXT.FONT_FAMILY;
|
|
588
522
|
}
|
|
589
|
-
},
|
|
523
|
+
}, de = class extends l {
|
|
590
524
|
getParentControlId() {
|
|
591
525
|
return n.GENERAL.TEXT_LINE_SPACING;
|
|
592
526
|
}
|
|
593
|
-
},
|
|
527
|
+
}, ue = class extends l {
|
|
594
528
|
getParentControlId() {
|
|
595
529
|
return n.BLOCK_TEXT.INTERNAL_INDENTS;
|
|
596
530
|
}
|
|
597
|
-
},
|
|
531
|
+
}, Ie = class extends l {
|
|
598
532
|
getParentControlId() {
|
|
599
533
|
return n.GENERAL.TEXT_SIZE;
|
|
600
534
|
}
|
|
601
|
-
},
|
|
535
|
+
}, Oe = class extends l {
|
|
602
536
|
getParentControlId() {
|
|
603
537
|
return n.GENERAL.TEXT_STYLE;
|
|
604
538
|
}
|
|
605
|
-
},
|
|
606
|
-
constructor(e) {
|
|
607
|
-
this.uiElements = [], this.controls = [], this.contextActions = [], this.blocks = [], this.
|
|
539
|
+
}, Ut = class {
|
|
540
|
+
constructor(t, e, r = [], s, E = [], T, I = [], d = [], v, $, W, z, Z, j, q, J, tt) {
|
|
541
|
+
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 = d, 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);
|
|
608
542
|
}
|
|
609
543
|
getI18n() {
|
|
610
544
|
return this.i18n;
|
|
@@ -660,111 +594,104 @@ var qe = V, Je = class {
|
|
|
660
594
|
getIconsRegistry() {
|
|
661
595
|
return this.iconsRegistry;
|
|
662
596
|
}
|
|
663
|
-
|
|
664
|
-
return this.generalPanelTabs;
|
|
665
|
-
}
|
|
666
|
-
}, Et = class {
|
|
597
|
+
}, Te = class {
|
|
667
598
|
constructor() {
|
|
668
|
-
this.styles = [], this.uiElements = [], this.controls = [], this.contextActions = [], this.blocks = []
|
|
599
|
+
this.styles = [], this.uiElements = [], this.controls = [], this.contextActions = [], this.blocks = [];
|
|
669
600
|
}
|
|
670
|
-
withLocalization(
|
|
671
|
-
return this.i18n =
|
|
601
|
+
withLocalization(t) {
|
|
602
|
+
return this.i18n = t, this;
|
|
672
603
|
}
|
|
673
604
|
/**
|
|
674
605
|
* @deprecated Use addStyles() instead. This method will be removed in a future version.
|
|
675
606
|
*/
|
|
676
|
-
withStyles(
|
|
677
|
-
return this.styles = [
|
|
607
|
+
withStyles(t) {
|
|
608
|
+
return this.styles = [t], this;
|
|
678
609
|
}
|
|
679
|
-
addStyles(
|
|
680
|
-
return this.styles.push(
|
|
610
|
+
addStyles(t) {
|
|
611
|
+
return this.styles.push(t), this;
|
|
681
612
|
}
|
|
682
613
|
/**
|
|
683
614
|
* @description defines custom developer styles to use inside the editor document preview
|
|
684
615
|
*/
|
|
685
|
-
withPreviewStyles(
|
|
686
|
-
return this.previewStyles =
|
|
687
|
-
}
|
|
688
|
-
addContextAction(e) {
|
|
689
|
-
return this.contextActions.push(e), this;
|
|
616
|
+
withPreviewStyles(t) {
|
|
617
|
+
return this.previewStyles = t, this;
|
|
690
618
|
}
|
|
691
|
-
|
|
692
|
-
return this.
|
|
619
|
+
addContextAction(t) {
|
|
620
|
+
return this.contextActions.push(t), this;
|
|
693
621
|
}
|
|
694
|
-
|
|
695
|
-
return this.
|
|
622
|
+
addUiElement(t) {
|
|
623
|
+
return this.uiElements.push(t), this;
|
|
696
624
|
}
|
|
697
|
-
|
|
698
|
-
return this.
|
|
625
|
+
withUiElementTagRegistry(t) {
|
|
626
|
+
return this.uiElementTagRegistry = t, this;
|
|
699
627
|
}
|
|
700
|
-
|
|
701
|
-
return this.
|
|
628
|
+
addControl(t) {
|
|
629
|
+
return this.controls.push(t), this;
|
|
702
630
|
}
|
|
703
|
-
|
|
704
|
-
return this.
|
|
631
|
+
withSettingsPanelRegistry(t) {
|
|
632
|
+
return this.settingsPanelRegistry = t, this;
|
|
705
633
|
}
|
|
706
|
-
|
|
707
|
-
return this.
|
|
634
|
+
withExternalSmartElementsLibrary(t) {
|
|
635
|
+
return this.externalSmartElementsLibrary = t, this;
|
|
708
636
|
}
|
|
709
|
-
|
|
710
|
-
return this.
|
|
637
|
+
withExternalImageLibrary(t) {
|
|
638
|
+
return this.externalImageLibrary = t, this;
|
|
711
639
|
}
|
|
712
|
-
|
|
713
|
-
return this.
|
|
640
|
+
withExternalImageLibraryTab(t) {
|
|
641
|
+
return this.externalImageLibraryTab = t, this;
|
|
714
642
|
}
|
|
715
|
-
|
|
716
|
-
return this.
|
|
643
|
+
withExternalAiAssistant(t) {
|
|
644
|
+
return this.externalAiAssistant = t, this;
|
|
717
645
|
}
|
|
718
|
-
|
|
719
|
-
return this.
|
|
646
|
+
withExternalDisplayCondition(t) {
|
|
647
|
+
return this.externalDisplayConditionsLibrary = t, this;
|
|
720
648
|
}
|
|
721
|
-
|
|
722
|
-
return this.
|
|
649
|
+
withExternalVideosLibrary(t) {
|
|
650
|
+
return this.externalVideoLibrary = t, this;
|
|
723
651
|
}
|
|
724
|
-
|
|
725
|
-
return this.
|
|
652
|
+
withBlocksPanel(t) {
|
|
653
|
+
return this.blocksPanel = t, this;
|
|
726
654
|
}
|
|
727
|
-
|
|
728
|
-
return this.
|
|
655
|
+
addBlock(t) {
|
|
656
|
+
return this.blocks.push(t), this;
|
|
729
657
|
}
|
|
730
|
-
|
|
731
|
-
return this.
|
|
658
|
+
withIconsRegistry(t) {
|
|
659
|
+
return this.iconsRegistry = t, this;
|
|
732
660
|
}
|
|
733
661
|
build() {
|
|
734
|
-
return new
|
|
735
|
-
|
|
736
|
-
|
|
662
|
+
return new Ut(
|
|
663
|
+
this.i18n,
|
|
664
|
+
(this.styles || []).map((t) => t.trim()).join(`
|
|
737
665
|
`),
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
}, Se = class m extends a {
|
|
666
|
+
this.uiElements,
|
|
667
|
+
this.uiElementTagRegistry,
|
|
668
|
+
this.controls,
|
|
669
|
+
this.settingsPanelRegistry,
|
|
670
|
+
this.contextActions,
|
|
671
|
+
this.blocks,
|
|
672
|
+
this.externalSmartElementsLibrary,
|
|
673
|
+
this.externalImageLibrary,
|
|
674
|
+
this.previewStyles,
|
|
675
|
+
this.externalAiAssistant,
|
|
676
|
+
this.externalDisplayConditionsLibrary,
|
|
677
|
+
this.externalVideoLibrary,
|
|
678
|
+
this.blocksPanel,
|
|
679
|
+
this.iconsRegistry,
|
|
680
|
+
this.externalImageLibraryTab
|
|
681
|
+
);
|
|
682
|
+
}
|
|
683
|
+
}, pt = class C extends a {
|
|
757
684
|
constructor() {
|
|
758
|
-
super(
|
|
685
|
+
super(C.REQUIRED_METHODS, C);
|
|
759
686
|
}
|
|
760
|
-
openAiAssistant(
|
|
687
|
+
openAiAssistant({ value: e, onDataSelectCallback: r, onCancelCallback: s, type: E }) {
|
|
761
688
|
throw new Error("Method openAiAssistant() must be implemented by the subclass");
|
|
762
689
|
}
|
|
763
690
|
};
|
|
764
|
-
|
|
765
|
-
var
|
|
691
|
+
pt.REQUIRED_METHODS = ["openAiAssistant"];
|
|
692
|
+
var Kt = class g extends a {
|
|
766
693
|
constructor() {
|
|
767
|
-
super(
|
|
694
|
+
super(g.REQUIRED_METHODS, g);
|
|
768
695
|
}
|
|
769
696
|
/**
|
|
770
697
|
* Retrieves the name of the category.
|
|
@@ -777,11 +704,11 @@ var Be = class R extends a {
|
|
|
777
704
|
/**
|
|
778
705
|
* Opens a popup dialog for creating or updating a display condition.
|
|
779
706
|
*
|
|
780
|
-
* @param {DisplayCondition}
|
|
781
|
-
* @param {ExternalDisplayConditionSelectedCB}
|
|
782
|
-
* @param {() => void}
|
|
707
|
+
* @param {DisplayCondition} currentCondition - The currently selected display condition to edit.
|
|
708
|
+
* @param {ExternalDisplayConditionSelectedCB} successCallback - Callback executed with the updated or newly created condition upon success.
|
|
709
|
+
* @param {() => void} cancelCallback - Callback executed when the dialog is closed without making changes.
|
|
783
710
|
*/
|
|
784
|
-
openExternalDisplayConditionsDialog(
|
|
711
|
+
openExternalDisplayConditionsDialog(e, r, s) {
|
|
785
712
|
throw new Error("Method openExternalDisplayConditionsDialog() must be implemented by the subclass");
|
|
786
713
|
}
|
|
787
714
|
/**
|
|
@@ -802,19 +729,19 @@ var Be = class R extends a {
|
|
|
802
729
|
throw new Error("Method getContextActionIndex() must be implemented by the subclass");
|
|
803
730
|
}
|
|
804
731
|
};
|
|
805
|
-
|
|
806
|
-
var
|
|
732
|
+
Kt.REQUIRED_METHODS = ["getCategoryName", "openExternalDisplayConditionsDialog"];
|
|
733
|
+
var Ft = class m extends a {
|
|
807
734
|
constructor() {
|
|
808
|
-
super(
|
|
735
|
+
super(m.REQUIRED_METHODS, m);
|
|
809
736
|
}
|
|
810
|
-
openImageLibrary(
|
|
737
|
+
openImageLibrary(e, r, s) {
|
|
811
738
|
throw new Error("Method openImageLibrary() must be implemented by the subclass");
|
|
812
739
|
}
|
|
813
740
|
};
|
|
814
|
-
|
|
815
|
-
var
|
|
741
|
+
Ft.REQUIRED_METHODS = ["openImageLibrary"];
|
|
742
|
+
var wt = class b extends a {
|
|
816
743
|
constructor() {
|
|
817
|
-
super(
|
|
744
|
+
super(b.REQUIRED_METHODS, b);
|
|
818
745
|
}
|
|
819
746
|
/**
|
|
820
747
|
* @description Returns the translated name/label for the tab
|
|
@@ -827,46 +754,45 @@ var xe = class L extends a {
|
|
|
827
754
|
* @description Opens the external image library tab and provides a container for rendering
|
|
828
755
|
* @param _container - DOM element container where the external library UI should be rendered
|
|
829
756
|
* @param _onImageSelectCallback - Callback to invoke when an image is selected
|
|
830
|
-
* @param _selectedNode - (Optional) Selected node for which the gallery is being opened
|
|
831
757
|
*/
|
|
832
|
-
openImageLibraryTab(
|
|
758
|
+
openImageLibraryTab(e, r) {
|
|
833
759
|
throw new Error("Method openImageLibraryTab() must be implemented by the subclass");
|
|
834
760
|
}
|
|
835
761
|
};
|
|
836
|
-
|
|
837
|
-
var
|
|
762
|
+
wt.REQUIRED_METHODS = ["getName", "openImageLibraryTab"];
|
|
763
|
+
var Pt = class N extends a {
|
|
838
764
|
constructor() {
|
|
839
|
-
super(
|
|
765
|
+
super(N.REQUIRED_METHODS, N);
|
|
840
766
|
}
|
|
841
|
-
openSmartElementsLibrary(
|
|
767
|
+
openSmartElementsLibrary(e, r) {
|
|
842
768
|
throw new Error("Method openSmartElementsLibrary() must be implemented by the subclass");
|
|
843
769
|
}
|
|
844
770
|
};
|
|
845
|
-
|
|
846
|
-
var
|
|
771
|
+
Pt.REQUIRED_METHODS = ["openSmartElementsLibrary"];
|
|
772
|
+
var Ht = class A extends a {
|
|
847
773
|
constructor() {
|
|
848
774
|
super(A.REQUIRED_METHODS, A);
|
|
849
775
|
}
|
|
850
|
-
openExternalVideosLibraryDialog(
|
|
776
|
+
openExternalVideosLibraryDialog(e, r, s) {
|
|
851
777
|
throw new Error("Method openExternalVideosLibraryDialog() must be implemented by the subclass");
|
|
852
778
|
}
|
|
853
779
|
};
|
|
854
|
-
|
|
855
|
-
var
|
|
780
|
+
Ht.REQUIRED_METHODS = ["openExternalVideosLibraryDialog"];
|
|
781
|
+
var Q = class D extends a {
|
|
856
782
|
constructor() {
|
|
857
|
-
super(
|
|
783
|
+
super(D.REQUIRED_METHODS, D);
|
|
858
784
|
}
|
|
859
|
-
registerIconsSvg(
|
|
785
|
+
registerIconsSvg(e) {
|
|
860
786
|
throw new Error("Method registerIconsSvg() must be implemented by the subclass");
|
|
861
787
|
}
|
|
862
788
|
};
|
|
863
|
-
|
|
864
|
-
var
|
|
865
|
-
constructor(
|
|
866
|
-
this.key =
|
|
789
|
+
Q.REQUIRED_METHODS = ["registerIconsSvg"];
|
|
790
|
+
var ce = Q, _e = class {
|
|
791
|
+
constructor(t) {
|
|
792
|
+
this.key = t;
|
|
867
793
|
}
|
|
868
|
-
withParams(
|
|
869
|
-
return this.params =
|
|
794
|
+
withParams(t) {
|
|
795
|
+
return this.params = t, this;
|
|
870
796
|
}
|
|
871
797
|
getValue() {
|
|
872
798
|
return {
|
|
@@ -874,15 +800,15 @@ var lt = p, ot = class {
|
|
|
874
800
|
params: this.params
|
|
875
801
|
};
|
|
876
802
|
}
|
|
877
|
-
},
|
|
803
|
+
}, f = class S extends a {
|
|
878
804
|
constructor() {
|
|
879
|
-
super(
|
|
805
|
+
super(S.REQUIRED_METHODS, S);
|
|
880
806
|
}
|
|
881
807
|
/**
|
|
882
808
|
* Called when the UI element should render its content into the provided container.
|
|
883
809
|
* @param container - The HTMLElement where the UI element should be rendered.
|
|
884
810
|
*/
|
|
885
|
-
onRender(
|
|
811
|
+
onRender(e) {
|
|
886
812
|
throw new Error("Method onRender() must be implemented by the subclass");
|
|
887
813
|
}
|
|
888
814
|
/**
|
|
@@ -903,7 +829,7 @@ var lt = p, ot = class {
|
|
|
903
829
|
* Implement this if the element manages a state or value and needs to be updated externally.
|
|
904
830
|
* @param value - The new value to set.
|
|
905
831
|
*/
|
|
906
|
-
setValue(
|
|
832
|
+
setValue(e) {
|
|
907
833
|
}
|
|
908
834
|
/**
|
|
909
835
|
* @description Optional hook called when one of the element's supported attributes ({@link UEAttr}) gets updated externally.
|
|
@@ -911,7 +837,7 @@ var lt = p, ot = class {
|
|
|
911
837
|
* @param name - The name of the attribute that was updated.
|
|
912
838
|
* @param value - The new value of the attribute.
|
|
913
839
|
*/
|
|
914
|
-
onAttributeUpdated(
|
|
840
|
+
onAttributeUpdated(e, r) {
|
|
915
841
|
}
|
|
916
842
|
/**
|
|
917
843
|
* Gets the unique identifier for this UI element type.
|
|
@@ -929,61 +855,62 @@ var lt = p, ot = class {
|
|
|
929
855
|
throw new Error("Method getTemplate() must be implemented by the subclass");
|
|
930
856
|
}
|
|
931
857
|
};
|
|
932
|
-
|
|
933
|
-
var
|
|
858
|
+
f.REQUIRED_METHODS = ["onRender", "getId", "getTemplate"];
|
|
859
|
+
var he = f, Y = class B extends a {
|
|
934
860
|
constructor() {
|
|
935
|
-
super(
|
|
861
|
+
super(B.REQUIRED_METHODS, B);
|
|
936
862
|
}
|
|
937
|
-
registerUiElements(
|
|
863
|
+
registerUiElements(e) {
|
|
938
864
|
throw new Error("Method registerUiElements() must be implemented by the subclass");
|
|
939
865
|
}
|
|
940
866
|
};
|
|
941
|
-
|
|
942
|
-
var
|
|
867
|
+
Y.REQUIRED_METHODS = ["registerUiElements"];
|
|
868
|
+
var Re = Y;
|
|
943
869
|
export {
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
870
|
+
Xt as Block,
|
|
871
|
+
kt as BlockAttr,
|
|
872
|
+
et as BlockCompositionType,
|
|
873
|
+
O as BlockSelector,
|
|
874
|
+
ht as BlockType,
|
|
875
|
+
x as BuiltInControl,
|
|
950
876
|
n as BuiltInControlTypes,
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
877
|
+
Qt as ButtonAlignBuiltInControl,
|
|
878
|
+
ft as ButtonBackgroundColorBuiltInControl,
|
|
879
|
+
Yt as ButtonBorderBuiltInControl,
|
|
880
|
+
Vt as ButtonBorderRadiusBuiltInControl,
|
|
881
|
+
$t as ButtonColorBuiltInControl,
|
|
882
|
+
w as ButtonControls,
|
|
883
|
+
Wt as ButtonFitToContainerBuiltInControl,
|
|
884
|
+
zt as ButtonFontFamilyBuiltInControl,
|
|
885
|
+
Zt as ButtonMarginsBuiltInControl,
|
|
886
|
+
jt as ButtonPaddingsBuiltInControl,
|
|
887
|
+
qt as ButtonTextBuiltInControl,
|
|
888
|
+
Jt as ButtonTextSizeBuiltInControl,
|
|
889
|
+
te as ButtonTextStyleAndFontColorBuiltInControl,
|
|
890
|
+
Rt as ContainerControls,
|
|
891
|
+
ee as Control,
|
|
892
|
+
Ut as Extension,
|
|
893
|
+
Te as ExtensionBuilder,
|
|
894
|
+
F as GeneralControls,
|
|
895
|
+
ce as IconsRegistry,
|
|
970
896
|
H as ImageControls,
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
897
|
+
re as ImageMarginsBuiltInControl,
|
|
898
|
+
ne as ImageSizeBuiltInControl,
|
|
899
|
+
_e as ModificationDescription,
|
|
900
|
+
se as SettingsPanelRegistry,
|
|
901
|
+
ae as SettingsPanelTab,
|
|
902
|
+
Lt as SettingsTab,
|
|
903
|
+
ie as TextAlignBuiltInControl,
|
|
904
|
+
oe as TextBlockBackgroundBuiltInControl,
|
|
905
|
+
Ee as TextColorBuiltInControl,
|
|
906
|
+
P as TextControls,
|
|
907
|
+
le as TextFontFamilyBuiltInControl,
|
|
908
|
+
de as TextLineSpacingBuiltInControl,
|
|
909
|
+
ue as TextPaddingsBuiltInControl,
|
|
910
|
+
Ie as TextSizeBuiltInControl,
|
|
911
|
+
Oe as TextStyleBuiltInControl,
|
|
912
|
+
Gt as UEAttr,
|
|
913
|
+
he as UIElement,
|
|
914
|
+
Re as UIElementTagRegistry,
|
|
915
|
+
yt as UIElementType
|
|
989
916
|
};
|