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