@useinsider/guido 3.1.1-beta.fd0bd89 → 3.2.0-beta.2a61d0e
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/Unsubscribe/block.js +11 -11
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +218 -324
- package/dist/package.json.js +1 -1
- package/dist/static/styles/components/button.css.js +9 -16
- package/dist/static/styles/components/narrow-panel.css.js +0 -52
- package/package.json +3 -3
|
@@ -3,15 +3,15 @@ var h = (n, i, e) => i in n ? d(n, i, { enumerable: !0, configurable: !0, writab
|
|
|
3
3
|
var u = (n, i, e) => h(n, typeof i != "symbol" ? i + "" : i, e);
|
|
4
4
|
import { PAGE_TYPES as E } from "../../../enums/unsubscribe.js";
|
|
5
5
|
import { useUnsubscribeStore as c } from "../../../stores/unsubscribe.js";
|
|
6
|
-
import { Block as _, BlockCompositionType as S, ModificationDescription as b } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
7
|
-
import { getDefaultTemplate as
|
|
6
|
+
import { Block as _, BlockCompositionType as S, BlockType as L, ModificationDescription as b } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
7
|
+
import { getDefaultTemplate as v } from "./template.js";
|
|
8
8
|
import { UNSUBSCRIBE_EVENTS as a, DATA_ATTRIBUTES as o } from "./utils/constants.js";
|
|
9
9
|
import { parsePageList as p } from "./utils/utils.js";
|
|
10
|
-
const
|
|
10
|
+
const g = "unsubscribe-block", T = 'a[data-unsubscribe-link="true"]', f = ".unsubscribe-block-v2", B = "{{ins-unsubscribe-link}}", C = {
|
|
11
11
|
[E.GLOBAL_UNSUBSCRIBE]: "{{ins-global-unsubscribe-link}}",
|
|
12
12
|
[E.SUBSCRIPTION_PREFERENCE_CENTER]: "{{ins-preferences-unsubscribe-link}}"
|
|
13
13
|
};
|
|
14
|
-
class
|
|
14
|
+
class I extends _ {
|
|
15
15
|
constructor() {
|
|
16
16
|
super();
|
|
17
17
|
u(this, "selectEventListener", null);
|
|
@@ -19,7 +19,7 @@ class R extends _ {
|
|
|
19
19
|
u(this, "currentNode");
|
|
20
20
|
}
|
|
21
21
|
getId() {
|
|
22
|
-
return
|
|
22
|
+
return g;
|
|
23
23
|
}
|
|
24
24
|
getIcon() {
|
|
25
25
|
return "unsubscribe-icon";
|
|
@@ -34,7 +34,7 @@ class R extends _ {
|
|
|
34
34
|
return this.api.translate("Unsubscribe Block Description");
|
|
35
35
|
}
|
|
36
36
|
getTemplate() {
|
|
37
|
-
return
|
|
37
|
+
return v();
|
|
38
38
|
}
|
|
39
39
|
onSelect(e) {
|
|
40
40
|
this.currentNode = e, !("getAttribute" in e && e.getAttribute("data-migration")) && (this._resetStoreState(), this._loadBlockState(e), this._setupSelectEventListener(), this._setupCancelEventListener(), this._checkExistingBlocks(), this._openDrawer());
|
|
@@ -66,7 +66,7 @@ class R extends _ {
|
|
|
66
66
|
try {
|
|
67
67
|
if (!this.currentNode)
|
|
68
68
|
return;
|
|
69
|
-
this.api.getDocumentModifier().modifyHtml(this.currentNode).
|
|
69
|
+
this.api.getDocumentModifier().modifyHtml(this.currentNode).replaceWith(`<${L.EMPTY_CONTAINER}/>`).apply(new b("Removed unsubscribe block due to cancel"));
|
|
70
70
|
} catch (e) {
|
|
71
71
|
console.warn("[UnsubscribeBlock] Failed to remove unsubscribe block:", e);
|
|
72
72
|
}
|
|
@@ -77,14 +77,14 @@ class R extends _ {
|
|
|
77
77
|
_updateBlock(e, r) {
|
|
78
78
|
if (!this.currentNode || !("querySelector" in this.currentNode))
|
|
79
79
|
return;
|
|
80
|
-
const s = this.currentNode.querySelector(
|
|
80
|
+
const s = this.currentNode.querySelector(T);
|
|
81
81
|
if (!s)
|
|
82
82
|
return;
|
|
83
83
|
const t = this._getMergeTag(e);
|
|
84
84
|
this.api.getDocumentModifier().modifyHtml(s).setAttribute("href", t).apply(new b(`Updated unsubscribe link to ${t}`)), this.api.getDocumentModifier().modifyHtml(this.currentNode).setAttribute(o.PAGE_TYPE, e.toString()).setAttribute(o.PAGE_LIST, r).apply(new b("Updated unsubscribe block metadata"));
|
|
85
85
|
}
|
|
86
86
|
_getMergeTag(e) {
|
|
87
|
-
return
|
|
87
|
+
return C[e] ?? B;
|
|
88
88
|
}
|
|
89
89
|
_openDrawer() {
|
|
90
90
|
if (!(this.currentNode && this.currentNode.getAttribute("data-unsubscribe-page-type")))
|
|
@@ -130,6 +130,6 @@ class R extends _ {
|
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
132
|
export {
|
|
133
|
-
|
|
134
|
-
|
|
133
|
+
g as UNSUBSCRIBE_BLOCK_ID,
|
|
134
|
+
I as UnsubscribeBlock
|
|
135
135
|
};
|
|
@@ -4,13 +4,13 @@ var B = class d {
|
|
|
4
4
|
* @param requiredMethods - Array of method names that must be implemented
|
|
5
5
|
* @param classRef - Reference to the class constructor for validation caching
|
|
6
6
|
*/
|
|
7
|
-
constructor(t,
|
|
8
|
-
if (
|
|
9
|
-
d.validatedClasses.has(
|
|
10
|
-
const i = d.validationErrors.get(
|
|
7
|
+
constructor(t, n) {
|
|
8
|
+
if (n !== d) {
|
|
9
|
+
d.validatedClasses.has(n) || this.validateImplementation(t, n);
|
|
10
|
+
const i = d.validationErrors.get(n);
|
|
11
11
|
if (i && i.length > 0)
|
|
12
12
|
throw new Error(
|
|
13
|
-
`${
|
|
13
|
+
`${n.name} has validation errors:
|
|
14
14
|
${i.map((o) => ` - ${o}`).join(`
|
|
15
15
|
`)}`
|
|
16
16
|
);
|
|
@@ -20,30 +20,23 @@ ${i.map((o) => ` - ${o}`).join(`
|
|
|
20
20
|
* Validates that all required methods are properly implemented in the subclass.
|
|
21
21
|
* This validation runs only once per class type and results are cached.
|
|
22
22
|
*/
|
|
23
|
-
validateImplementation(t,
|
|
24
|
-
var
|
|
25
|
-
const i = [], o =
|
|
23
|
+
validateImplementation(t, n) {
|
|
24
|
+
var x;
|
|
25
|
+
const i = [], o = n.name, Y = Object.getPrototypeOf(this);
|
|
26
26
|
t.forEach((u) => {
|
|
27
27
|
if (typeof this[u] != "function") {
|
|
28
28
|
i.push(`Method ${u}() is not defined`);
|
|
29
29
|
return;
|
|
30
30
|
}
|
|
31
|
-
|
|
32
|
-
}), d.validatedClasses.add(
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Lifecycle method for cleaning up resources (e.g., removing DOM artifacts from document.body).
|
|
36
|
-
* Override this method in subclasses to implement custom cleanup logic.
|
|
37
|
-
* Called when the editor is reinitialized or the extension is uninstalled.
|
|
38
|
-
*/
|
|
39
|
-
destroy() {
|
|
31
|
+
Y[u] === n.prototype[u] && i.push(`Method ${u}() must be implemented (currently using base class error-throwing implementation)`);
|
|
32
|
+
}), d.validatedClasses.add(n), i.length > 0 ? (d.validationErrors.set(n, i), console.error(`[${o} Validation] ${o} validation failed:`, i)) : typeof process < "u" && ((x = process.env) == null ? void 0 : x.NODE_ENV) === "development" && console.log(`[${o} Validation] ✅ ${o} validated successfully`);
|
|
40
33
|
}
|
|
41
34
|
};
|
|
42
35
|
B.validatedClasses = /* @__PURE__ */ new Set();
|
|
43
36
|
B.validationErrors = /* @__PURE__ */ new Map();
|
|
44
|
-
var s = B,
|
|
37
|
+
var s = B, $ = /* @__PURE__ */ ((e) => (e.BLOCK = "BLOCK", e.STRUCTURE = "STRUCTURE", e.CONTAINER = "CONTAINER", e))($ || {}), v = class c extends s {
|
|
45
38
|
constructor() {
|
|
46
|
-
super(
|
|
39
|
+
super(c.REQUIRED_METHODS, c);
|
|
47
40
|
}
|
|
48
41
|
/**
|
|
49
42
|
* Determines if the block should be available for use in the editor.
|
|
@@ -140,14 +133,6 @@ var s = B, W = /* @__PURE__ */ ((e) => (e.BLOCK = "BLOCK", e.CONTAINER = "CONTAI
|
|
|
140
133
|
shouldDisplayQuickAddIcon() {
|
|
141
134
|
return !1;
|
|
142
135
|
}
|
|
143
|
-
/**
|
|
144
|
-
* Determines if the block should be shown in the blocks panel.
|
|
145
|
-
* Override to hide the block from the blocks panel while keeping it available elsewhere.
|
|
146
|
-
* @returns True if the block should appear in the blocks panel. Defaults to true.
|
|
147
|
-
*/
|
|
148
|
-
shouldDisplayInBlocksPanel() {
|
|
149
|
-
return !0;
|
|
150
|
-
}
|
|
151
136
|
/**
|
|
152
137
|
* @description Determines if nested blocks selection allowed in extension of type {@link BlockCompositionType.STRUCTURE}
|
|
153
138
|
*/
|
|
@@ -176,14 +161,6 @@ var s = B, W = /* @__PURE__ */ ((e) => (e.BLOCK = "BLOCK", e.CONTAINER = "CONTAI
|
|
|
176
161
|
getTemplate() {
|
|
177
162
|
throw new Error("Method getTemplate() must be implemented by the subclass");
|
|
178
163
|
}
|
|
179
|
-
/**
|
|
180
|
-
* Gets a CSS template string that contains the custom styles that apply to the block.
|
|
181
|
-
* This CSS will be used when a block is dragged into the editor and removed when the last block is deleted.
|
|
182
|
-
* @returns An CSS string.
|
|
183
|
-
*/
|
|
184
|
-
getTemplateStyles() {
|
|
185
|
-
return "";
|
|
186
|
-
}
|
|
187
164
|
/**
|
|
188
165
|
* Gets the URL or path to the icon representing this block in the editor's block panel.
|
|
189
166
|
* @returns A string representing the icon source (e.g., URL, data URI).
|
|
@@ -218,10 +195,10 @@ var s = B, W = /* @__PURE__ */ ((e) => (e.BLOCK = "BLOCK", e.CONTAINER = "CONTAI
|
|
|
218
195
|
throw new Error("Method getDescription() must be implemented by the subclass");
|
|
219
196
|
}
|
|
220
197
|
};
|
|
221
|
-
|
|
222
|
-
var
|
|
198
|
+
v.REQUIRED_METHODS = ["getId", "getTemplate", "getIcon", "getName", "getDescription"];
|
|
199
|
+
var Qe = v, W = class T extends s {
|
|
223
200
|
constructor() {
|
|
224
|
-
super(
|
|
201
|
+
super(T.REQUIRED_METHODS, T);
|
|
225
202
|
}
|
|
226
203
|
/**
|
|
227
204
|
* @deprecated - use {@link getPreviewInnerHtml} instead
|
|
@@ -236,8 +213,8 @@ var $e = y, z = class I extends s {
|
|
|
236
213
|
throw new Error("Method getPreviewInnerHtml() must be implemented by the subclass");
|
|
237
214
|
}
|
|
238
215
|
};
|
|
239
|
-
|
|
240
|
-
var
|
|
216
|
+
W.REQUIRED_METHODS = ["getPreviewInnerHtml"];
|
|
217
|
+
var fe = class {
|
|
241
218
|
/**
|
|
242
219
|
* Generates HTML representation for a block item
|
|
243
220
|
* @param block - The block item to generate HTML for
|
|
@@ -255,13 +232,6 @@ var We = class {
|
|
|
255
232
|
isBlockHintVisible(e) {
|
|
256
233
|
return !0;
|
|
257
234
|
}
|
|
258
|
-
/**
|
|
259
|
-
* Determines whether a draggable handle should be displayed in modules panel
|
|
260
|
-
* @returns True if the block panel should be reorderable
|
|
261
|
-
*/
|
|
262
|
-
isPanelPlacementChangeEnabled() {
|
|
263
|
-
return !0;
|
|
264
|
-
}
|
|
265
235
|
/**
|
|
266
236
|
* Gets the hint text for a block
|
|
267
237
|
* @param block - The block item to get hint for
|
|
@@ -311,7 +281,7 @@ var We = class {
|
|
|
311
281
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
312
282
|
getModulesTabIconName(e) {
|
|
313
283
|
}
|
|
314
|
-
},
|
|
284
|
+
}, z = class b extends s {
|
|
315
285
|
constructor() {
|
|
316
286
|
super(b.REQUIRED_METHODS, b);
|
|
317
287
|
}
|
|
@@ -328,85 +298,85 @@ var We = class {
|
|
|
328
298
|
throw new Error("Method onClick() must be implemented by the subclass");
|
|
329
299
|
}
|
|
330
300
|
};
|
|
331
|
-
|
|
332
|
-
var
|
|
301
|
+
z.REQUIRED_METHODS = ["getId", "getIcon", "getLabel", "onClick"];
|
|
302
|
+
var Z = {
|
|
333
303
|
src: "src",
|
|
334
304
|
alt: "alt",
|
|
335
305
|
href: "href",
|
|
336
306
|
width: "width",
|
|
337
307
|
height: "height"
|
|
338
|
-
},
|
|
339
|
-
BLOCK_IMAGE:
|
|
340
|
-
},
|
|
341
|
-
BLOCK_BUTTON:
|
|
342
|
-
BLOCK_TEXT:
|
|
343
|
-
BLOCK_IMAGE:
|
|
344
|
-
GENERAL:
|
|
345
|
-
},
|
|
308
|
+
}, Ye = {
|
|
309
|
+
BLOCK_IMAGE: Z
|
|
310
|
+
}, y = "esd-block-button", U = "esd-block-text", P = "esd-block-image", j = "esd-structure", q = "esd-block-video", J = "esd-block-social", ee = "esd-block-banner", te = "esd-block-timer", re = "esd-block-menu", ne = "esd-block-html", ae = "esd-block-spacer", se = "esd-container-frame", ie = "esd-stripe", le = "esd-amp-form", I = ((e) => (e.BUTTON = `.${y}`, e.TEXT = `.${U}`, e.IMAGE = `.${P}`, e.STRUCTURE = `.${j}`, e.VIDEO = `.${q}`, e.SOCIAL = `.${J}`, e.BANNER = `.${ee}`, e.TIMER = `.${te}`, e.MENU = `.${re}`, e.HTML = `.${ne}`, e.SPACER = `.${ae}`, e.CONTAINER = `.${se}`, e.STRIPE = `.${ie}`, e.FORM = `.${le}`, e))(I || {}), Ee = /* @__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))(Ee || {}), w = /* @__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))(w || {}), 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 || {}), oe = /* @__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))(oe || {}), a = {
|
|
311
|
+
BLOCK_BUTTON: K,
|
|
312
|
+
BLOCK_TEXT: F,
|
|
313
|
+
BLOCK_IMAGE: H,
|
|
314
|
+
GENERAL: w
|
|
315
|
+
}, de = /* @__PURE__ */ ((e) => (e.previewDeviceMode = "previewDeviceMode", e.panelPosition = "panelPosition", e))(de || {}), ue = /* @__PURE__ */ ((e) => (e.DESKTOP = "DESKTOP", e.MOBILE = "MOBILE", e))(ue || {}), Ie = /* @__PURE__ */ ((e) => (e.SETTINGS = "settings", e.STYLES = "styles", e.DATA = "data", e))(Ie || {}), r = {
|
|
346
316
|
name: "name",
|
|
347
317
|
disabled: "disabled"
|
|
348
|
-
},
|
|
318
|
+
}, ce = {
|
|
349
319
|
...r,
|
|
350
320
|
caption: "caption",
|
|
351
321
|
icon: "icon"
|
|
352
|
-
},
|
|
322
|
+
}, Te = {
|
|
353
323
|
...r,
|
|
354
324
|
caption: "caption"
|
|
355
|
-
},
|
|
325
|
+
}, be = {
|
|
356
326
|
...r,
|
|
357
327
|
minValue: "min-value",
|
|
358
328
|
maxValue: "max-value",
|
|
359
329
|
step: "step"
|
|
360
|
-
},
|
|
330
|
+
}, Oe = {
|
|
361
331
|
...r,
|
|
362
332
|
placeholder: "placeholder",
|
|
363
333
|
minDate: "min-date"
|
|
364
|
-
},
|
|
334
|
+
}, he = {
|
|
365
335
|
...r,
|
|
366
336
|
text: "text",
|
|
367
337
|
hint: "hint"
|
|
368
|
-
},
|
|
338
|
+
}, ge = {
|
|
369
339
|
...r,
|
|
370
340
|
type: "type"
|
|
371
|
-
},
|
|
341
|
+
}, me = {
|
|
372
342
|
...r,
|
|
373
343
|
buttons: "buttons"
|
|
374
|
-
},
|
|
344
|
+
}, k = {
|
|
375
345
|
...r,
|
|
376
346
|
searchable: "searchable",
|
|
377
347
|
multiSelect: "multi-select",
|
|
378
348
|
placeholder: "placeholder",
|
|
379
349
|
items: "items"
|
|
380
|
-
},
|
|
381
|
-
...
|
|
350
|
+
}, Re = {
|
|
351
|
+
...k,
|
|
382
352
|
addCustomFontOption: "add-custom-font-option"
|
|
383
|
-
},
|
|
353
|
+
}, Le = {
|
|
384
354
|
...r,
|
|
385
355
|
text: "text",
|
|
386
356
|
value: "value"
|
|
387
|
-
},
|
|
357
|
+
}, _e = {
|
|
388
358
|
...r,
|
|
389
359
|
text: "text",
|
|
390
360
|
hint: "hint",
|
|
391
361
|
icon: "icon",
|
|
392
362
|
value: "value"
|
|
393
|
-
},
|
|
363
|
+
}, Ce = {
|
|
394
364
|
...r,
|
|
395
365
|
buttons: "buttons"
|
|
396
|
-
},
|
|
366
|
+
}, Ae = {
|
|
397
367
|
...r,
|
|
398
368
|
text: "text",
|
|
399
369
|
hint: "hint",
|
|
400
370
|
icon: "icon",
|
|
401
371
|
value: "value"
|
|
402
|
-
},
|
|
372
|
+
}, Ne = {
|
|
403
373
|
...r,
|
|
404
374
|
placeholder: "placeholder"
|
|
405
|
-
},
|
|
375
|
+
}, De = {
|
|
406
376
|
...r,
|
|
407
377
|
resizable: "resizable",
|
|
408
378
|
placeholder: "placeholder"
|
|
409
|
-
},
|
|
379
|
+
}, Se = {
|
|
410
380
|
...r,
|
|
411
381
|
img: "img",
|
|
412
382
|
src: "src",
|
|
@@ -420,51 +390,47 @@ var j = {
|
|
|
420
390
|
}, Be = {
|
|
421
391
|
...r,
|
|
422
392
|
controlId: "control-id"
|
|
423
|
-
},
|
|
393
|
+
}, Me = {
|
|
424
394
|
...r,
|
|
425
395
|
expanded: "expanded"
|
|
426
|
-
},
|
|
396
|
+
}, xe = {
|
|
427
397
|
...r,
|
|
428
398
|
icon: "icon",
|
|
429
399
|
position: "position"
|
|
430
|
-
},
|
|
400
|
+
}, ve = {
|
|
431
401
|
...r
|
|
432
|
-
},
|
|
402
|
+
}, ye = {
|
|
433
403
|
...r,
|
|
434
404
|
icon: "icon"
|
|
435
405
|
}, Ue = {
|
|
436
406
|
...r
|
|
437
|
-
},
|
|
438
|
-
...r,
|
|
439
|
-
blockId: "block-id"
|
|
440
|
-
}, Ze = {
|
|
407
|
+
}, $e = {
|
|
441
408
|
DEFAULT: r,
|
|
442
|
-
BUTTON:
|
|
443
|
-
CHECKBOX:
|
|
444
|
-
CHECK_BUTTONS:
|
|
409
|
+
BUTTON: ce,
|
|
410
|
+
CHECKBOX: Te,
|
|
411
|
+
CHECK_BUTTONS: Ce,
|
|
445
412
|
COLOR: r,
|
|
446
|
-
COUNTER:
|
|
447
|
-
DATEPICKER:
|
|
448
|
-
LABEL:
|
|
449
|
-
MESSAGE:
|
|
450
|
-
RADIO_BUTTONS:
|
|
451
|
-
SELECTPICKER:
|
|
452
|
-
FONT_FAMILY_SELECT:
|
|
413
|
+
COUNTER: be,
|
|
414
|
+
DATEPICKER: Oe,
|
|
415
|
+
LABEL: he,
|
|
416
|
+
MESSAGE: ge,
|
|
417
|
+
RADIO_BUTTONS: me,
|
|
418
|
+
SELECTPICKER: k,
|
|
419
|
+
FONT_FAMILY_SELECT: Re,
|
|
453
420
|
SWITCHER: r,
|
|
454
|
-
TEXT:
|
|
455
|
-
TEXTAREA:
|
|
456
|
-
ICON:
|
|
457
|
-
CHECK_ITEM:
|
|
458
|
-
SELECT_ITEM:
|
|
459
|
-
RADIO_ITEM:
|
|
421
|
+
TEXT: Ne,
|
|
422
|
+
TEXTAREA: De,
|
|
423
|
+
ICON: Se,
|
|
424
|
+
CHECK_ITEM: _e,
|
|
425
|
+
SELECT_ITEM: Le,
|
|
426
|
+
RADIO_ITEM: Ae,
|
|
460
427
|
NESTED_CONTROL: Be,
|
|
461
|
-
EXPANDABLE:
|
|
462
|
-
ORDERABLE:
|
|
463
|
-
ORDERABLE_ITEM:
|
|
464
|
-
ORDERABLE_ICON:
|
|
465
|
-
REPEATABLE: Ue
|
|
466
|
-
|
|
467
|
-
}, Ke = /* @__PURE__ */ ((e) => (e.BUTTON = "UE-BUTTON", e.CHECKBOX = "UE-CHECKBOX", e.CHECK_BUTTONS = "UE-CHECK-BUTTONS", e.COLOR = "UE-COLOR", e.COUNTER = "UE-COUNTER", e.DATEPICKER = "UE-DATEPICKER", e.LABEL = "UE-LABEL", e.MESSAGE = "UE-MESSAGE", e.RADIO_BUTTONS = "UE-RADIO-BUTTONS", e.SELECTPICKER = "UE-SELECT", e.SWITCHER = "UE-SWITCHER", e.TEXT = "UE-TEXT", e.TEXTAREA = "UE-TEXTAREA", e.CHECK_ITEM = "UE-CHECK-ITEM", e.RADIO_ITEM = "UE-RADIO-ITEM", e.SELECT_ITEM = "UE-SELECT-ITEM", e.ICON = "UE-ICON", e.MERGETAGS = "UE-MERGETAGS", e.FONT_FAMILY_SELECT = "UE-FONT-FAMILY-SELECT", e.NESTED_CONTROL = "UE-NESTED-CONTROL", e.EXPANDABLE = "UE-EXPANDABLE", e.EXPANDABLE_HEADER = "UE-EXPANDABLE_HEADER", e.EXPANDABLE_CONTENT = "UE-EXPANDABLE_CONTENT", e.ORDERABLE = "UE-ORDERABLE", e.ORDERABLE_ITEM = "UE-ORDERABLE-ITEM", e.ORDERABLE_ICON = "UE-ORDERABLE-ICON", e.REPEATABLE = "UE-REPEATABLE", e.DRAGGABLE_BLOCK = "UE-DRAGGABLE-BLOCK", e))(Ke || {}), x = class {
|
|
428
|
+
EXPANDABLE: Me,
|
|
429
|
+
ORDERABLE: xe,
|
|
430
|
+
ORDERABLE_ITEM: ve,
|
|
431
|
+
ORDERABLE_ICON: ye,
|
|
432
|
+
REPEATABLE: Ue
|
|
433
|
+
}, Pe = /* @__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))(Pe || {}), M = class {
|
|
468
434
|
/**
|
|
469
435
|
* @description returns map of nodes parent control operates on
|
|
470
436
|
*/
|
|
@@ -495,68 +461,68 @@ var j = {
|
|
|
495
461
|
isVisible(e) {
|
|
496
462
|
return !0;
|
|
497
463
|
}
|
|
498
|
-
}, l = class extends
|
|
464
|
+
}, l = class extends M {
|
|
499
465
|
getTargetNodes(e) {
|
|
500
|
-
const t = e.querySelectorAll(
|
|
501
|
-
return t.length ? t :
|
|
466
|
+
const t = e.querySelectorAll(I.BUTTON), n = e.asElement().hasClass(y) ? [e] : [];
|
|
467
|
+
return t.length ? t : n;
|
|
502
468
|
}
|
|
503
|
-
},
|
|
469
|
+
}, We = class extends l {
|
|
504
470
|
getParentControlId() {
|
|
505
|
-
return
|
|
471
|
+
return a.BLOCK_BUTTON.BORDER_RADIUS;
|
|
506
472
|
}
|
|
507
473
|
getLabels() {
|
|
508
474
|
}
|
|
509
|
-
},
|
|
475
|
+
}, ze = class extends l {
|
|
510
476
|
getParentControlId() {
|
|
511
|
-
return
|
|
477
|
+
return a.BLOCK_BUTTON.ALIGNMENT;
|
|
512
478
|
}
|
|
513
|
-
},
|
|
479
|
+
}, Ze = class extends l {
|
|
514
480
|
getParentControlId() {
|
|
515
|
-
return
|
|
481
|
+
return a.GENERAL.BACKGROUND_COLOR;
|
|
516
482
|
}
|
|
517
|
-
},
|
|
483
|
+
}, je = class extends l {
|
|
518
484
|
getParentControlId() {
|
|
519
|
-
return
|
|
485
|
+
return a.BLOCK_BUTTON.BORDER;
|
|
520
486
|
}
|
|
521
487
|
getLabels() {
|
|
522
488
|
}
|
|
523
|
-
},
|
|
489
|
+
}, qe = class extends l {
|
|
524
490
|
getParentControlId() {
|
|
525
|
-
return
|
|
491
|
+
return a.BLOCK_BUTTON.COLOR;
|
|
526
492
|
}
|
|
527
|
-
},
|
|
493
|
+
}, Je = class extends l {
|
|
528
494
|
getParentControlId() {
|
|
529
|
-
return
|
|
495
|
+
return a.BLOCK_BUTTON.ADJUST_TO_WIDTH;
|
|
530
496
|
}
|
|
531
|
-
},
|
|
497
|
+
}, et = class extends l {
|
|
532
498
|
getParentControlId() {
|
|
533
|
-
return
|
|
499
|
+
return a.BLOCK_BUTTON.FONT_FAMILY;
|
|
534
500
|
}
|
|
535
|
-
},
|
|
501
|
+
}, tt = class extends l {
|
|
536
502
|
getParentControlId() {
|
|
537
|
-
return
|
|
503
|
+
return a.BLOCK_BUTTON.EXTERNAL_INDENTS;
|
|
538
504
|
}
|
|
539
|
-
},
|
|
505
|
+
}, rt = class extends l {
|
|
540
506
|
getParentControlId() {
|
|
541
|
-
return
|
|
507
|
+
return a.BLOCK_BUTTON.INTERNAL_INDENTS;
|
|
542
508
|
}
|
|
543
|
-
},
|
|
509
|
+
}, nt = class extends l {
|
|
544
510
|
getParentControlId() {
|
|
545
|
-
return
|
|
511
|
+
return a.BLOCK_BUTTON.TEXT;
|
|
546
512
|
}
|
|
547
|
-
},
|
|
513
|
+
}, at = class extends l {
|
|
548
514
|
getParentControlId() {
|
|
549
|
-
return
|
|
515
|
+
return a.BLOCK_BUTTON.FONT_SIZE;
|
|
550
516
|
}
|
|
551
|
-
},
|
|
517
|
+
}, st = class extends l {
|
|
552
518
|
getParentControlId() {
|
|
553
|
-
return
|
|
519
|
+
return a.BLOCK_BUTTON.TEXT_STYLE_AND_COLOR;
|
|
554
520
|
}
|
|
555
521
|
getLabels() {
|
|
556
522
|
}
|
|
557
|
-
}, X = class
|
|
523
|
+
}, X = class O extends s {
|
|
558
524
|
constructor() {
|
|
559
|
-
super(
|
|
525
|
+
super(O.REQUIRED_METHODS, O);
|
|
560
526
|
}
|
|
561
527
|
/**
|
|
562
528
|
* @description Allows to determine if control should be visible or hidden in control panel.
|
|
@@ -610,9 +576,9 @@ var j = {
|
|
|
610
576
|
}
|
|
611
577
|
};
|
|
612
578
|
X.REQUIRED_METHODS = ["getId", "getTemplate"];
|
|
613
|
-
var
|
|
579
|
+
var it = X, we = class h extends s {
|
|
614
580
|
constructor() {
|
|
615
|
-
super(
|
|
581
|
+
super(h.REQUIRED_METHODS, h);
|
|
616
582
|
}
|
|
617
583
|
/**
|
|
618
584
|
* Gets the unique identifier for this tab.
|
|
@@ -679,95 +645,30 @@ var ot = X, Fe = class m extends s {
|
|
|
679
645
|
onDestroy() {
|
|
680
646
|
}
|
|
681
647
|
};
|
|
682
|
-
|
|
683
|
-
var
|
|
648
|
+
we.REQUIRED_METHODS = ["getId", "getIcon", "getName", "getTemplate", "getTabIndex"];
|
|
649
|
+
var p = class extends M {
|
|
684
650
|
getTargetNodes(e) {
|
|
685
|
-
const t = e.querySelectorAll(
|
|
686
|
-
return t.length ? t :
|
|
651
|
+
const t = e.querySelectorAll(I.IMAGE), n = e.asElement().hasClass(P) ? [e] : [];
|
|
652
|
+
return t.length ? t : n;
|
|
687
653
|
}
|
|
688
|
-
},
|
|
654
|
+
}, lt = class extends p {
|
|
689
655
|
getParentControlId() {
|
|
690
|
-
return
|
|
656
|
+
return a.BLOCK_IMAGE.EXTERNAL_INDENTS;
|
|
691
657
|
}
|
|
692
|
-
},
|
|
658
|
+
}, Et = class extends p {
|
|
693
659
|
getParentControlId() {
|
|
694
|
-
return
|
|
660
|
+
return a.BLOCK_IMAGE.SIZE;
|
|
695
661
|
}
|
|
696
|
-
},
|
|
662
|
+
}, G = class g extends s {
|
|
697
663
|
constructor() {
|
|
698
664
|
super(g.REQUIRED_METHODS, g);
|
|
699
665
|
}
|
|
700
|
-
/**
|
|
701
|
-
* Gets the unique identifier for this tab.
|
|
702
|
-
* This ID is used for registration.
|
|
703
|
-
* @returns A unique string ID.
|
|
704
|
-
*/
|
|
705
|
-
getId() {
|
|
706
|
-
throw new Error("Method getId() must be implemented by the subclass");
|
|
707
|
-
}
|
|
708
|
-
/**
|
|
709
|
-
* Gets the icon key representing this tab in the header.
|
|
710
|
-
* @returns A string representing the icon key from the IconsRegistry
|
|
711
|
-
*/
|
|
712
|
-
getIcon() {
|
|
713
|
-
throw new Error("Method getIcon() must be implemented by the subclass");
|
|
714
|
-
}
|
|
715
|
-
/**
|
|
716
|
-
* Retrieves the index of the tab associated with the panel.
|
|
717
|
-
* The index represents the position/order of the tab in the UI.
|
|
718
|
-
*
|
|
719
|
-
* @returns {number} The index of the tab.
|
|
720
|
-
*/
|
|
721
|
-
getTabIndex() {
|
|
722
|
-
throw new Error("Method getTabIndex() must be implemented by the subclass");
|
|
723
|
-
}
|
|
724
|
-
/**
|
|
725
|
-
* Gets the display name of the tab shown to the user in the header hint.
|
|
726
|
-
* Use `this.api.translate()` for localization.
|
|
727
|
-
* @returns The localized tab name string.
|
|
728
|
-
*/
|
|
729
|
-
getName() {
|
|
730
|
-
throw new Error("Method getName() must be implemented by the subclass");
|
|
731
|
-
}
|
|
732
|
-
/**
|
|
733
|
-
* Determines if the tab should be available for use in the editor.
|
|
734
|
-
* Override to provide custom logic based on the editor state or configuration.
|
|
735
|
-
* @returns True if the tab is enabled, false otherwise. Defaults to true.
|
|
736
|
-
*/
|
|
737
|
-
isEnabled() {
|
|
738
|
-
return !0;
|
|
739
|
-
}
|
|
740
|
-
/**
|
|
741
|
-
* Gets the HTML template string that defines the initial structure of this tab.
|
|
742
|
-
* @returns An HTML string.
|
|
743
|
-
*/
|
|
744
|
-
getTemplate() {
|
|
745
|
-
throw new Error("Method getTemplate() must be implemented by the subclass");
|
|
746
|
-
}
|
|
747
|
-
/**
|
|
748
|
-
* Optional hook called when the modules panel tab is initially rendered.
|
|
749
|
-
* Use this for setup tasks like attaching event listeners to the panel's template elements.
|
|
750
|
-
*/
|
|
751
|
-
onRender() {
|
|
752
|
-
}
|
|
753
|
-
/**
|
|
754
|
-
* Lifecycle hook called when any part of the document template has changed.
|
|
755
|
-
* This can be frequent; use cautiously for performance-sensitive operations.
|
|
756
|
-
*/
|
|
757
|
-
onDocumentChanged() {
|
|
758
|
-
}
|
|
759
|
-
};
|
|
760
|
-
He.REQUIRED_METHODS = ["getId", "getIcon", "getName", "getTemplate", "getTabIndex"];
|
|
761
|
-
var V = class O extends s {
|
|
762
|
-
constructor() {
|
|
763
|
-
super(O.REQUIRED_METHODS, O);
|
|
764
|
-
}
|
|
765
666
|
registerBlockControls(t) {
|
|
766
667
|
throw new Error("Method registerBlockControls() must be implemented by the subclass");
|
|
767
668
|
}
|
|
768
669
|
};
|
|
769
|
-
|
|
770
|
-
var
|
|
670
|
+
G.REQUIRED_METHODS = ["registerBlockControls"];
|
|
671
|
+
var ot = G, dt = class {
|
|
771
672
|
constructor(e, t) {
|
|
772
673
|
this.tabId = e, this.controlsIds = t;
|
|
773
674
|
}
|
|
@@ -790,42 +691,42 @@ var ct = V, Tt = class {
|
|
|
790
691
|
const t = this.controlsIds.indexOf(e);
|
|
791
692
|
t !== -1 && this.controlsIds.splice(t, 1);
|
|
792
693
|
}
|
|
793
|
-
}, E = class extends
|
|
694
|
+
}, E = class extends M {
|
|
794
695
|
getTargetNodes(e) {
|
|
795
|
-
const t = e.querySelectorAll(
|
|
796
|
-
return t.length ? t :
|
|
696
|
+
const t = e.querySelectorAll(I.TEXT), n = e.asElement().hasClass(U) ? [e] : [];
|
|
697
|
+
return t.length ? t : n;
|
|
797
698
|
}
|
|
798
|
-
},
|
|
699
|
+
}, ut = class extends E {
|
|
799
700
|
getParentControlId() {
|
|
800
|
-
return
|
|
701
|
+
return a.GENERAL.TEXT_ALIGN;
|
|
801
702
|
}
|
|
802
|
-
},
|
|
703
|
+
}, It = class extends E {
|
|
803
704
|
getParentControlId() {
|
|
804
|
-
return
|
|
705
|
+
return a.GENERAL.TEXT_COLOR;
|
|
805
706
|
}
|
|
806
|
-
},
|
|
707
|
+
}, ct = class extends E {
|
|
807
708
|
getParentControlId() {
|
|
808
|
-
return
|
|
709
|
+
return a.BLOCK_TEXT.FONT_FAMILY;
|
|
809
710
|
}
|
|
810
|
-
},
|
|
711
|
+
}, Tt = class extends E {
|
|
811
712
|
getParentControlId() {
|
|
812
|
-
return
|
|
713
|
+
return a.GENERAL.TEXT_LINE_SPACING;
|
|
813
714
|
}
|
|
814
|
-
},
|
|
715
|
+
}, bt = class extends E {
|
|
815
716
|
getParentControlId() {
|
|
816
|
-
return
|
|
717
|
+
return a.BLOCK_TEXT.INTERNAL_INDENTS;
|
|
817
718
|
}
|
|
818
719
|
}, Ot = class extends E {
|
|
819
720
|
getParentControlId() {
|
|
820
|
-
return
|
|
721
|
+
return a.GENERAL.TEXT_SIZE;
|
|
821
722
|
}
|
|
822
|
-
},
|
|
723
|
+
}, ht = class extends E {
|
|
823
724
|
getParentControlId() {
|
|
824
|
-
return
|
|
725
|
+
return a.GENERAL.TEXT_STYLE;
|
|
825
726
|
}
|
|
826
|
-
},
|
|
727
|
+
}, Ke = class {
|
|
827
728
|
constructor(e) {
|
|
828
|
-
this.uiElements = [], this.controls = [], this.contextActions = [], this.blocks = [], this.generalPanelTabs = [], this.
|
|
729
|
+
this.uiElements = [], this.controls = [], this.contextActions = [], this.blocks = [], this.generalPanelTabs = [], this.i18n = e == null ? void 0 : e.i18n, this.styles = e == null ? void 0 : e.styles, this.previewStyles = e == null ? void 0 : e.previewStyles, this.uiElements = (e == null ? void 0 : e.uiElements) ?? [], this.uiElementTagRegistry = e == null ? void 0 : e.uiElementTagRegistry, this.controls = (e == null ? void 0 : e.controls) ?? [], this.settingsPanelRegistry = e == null ? void 0 : e.settingsPanelRegistry, this.contextActions = (e == null ? void 0 : e.contextActions) ?? [], this.blocks = (e == null ? void 0 : e.blocks) ?? [], this.generalPanelTabs = (e == null ? void 0 : e.generalPanelTabs) ?? [], this.externalSmartElementsLibrary = e == null ? void 0 : e.externalSmartElementsLibrary, this.externalImageLibrary = e == null ? void 0 : e.externalImageLibrary, this.externalImageLibraryTab = e == null ? void 0 : e.externalImageLibraryTab, this.externalAiAssistant = e == null ? void 0 : e.externalAiAssistant, this.externalDisplayConditionsLibrary = e == null ? void 0 : e.externalDisplayConditionsLibrary, this.externalVideoLibrary = e == null ? void 0 : e.externalVideoLibrary, this.blocksPanel = e == null ? void 0 : e.blocksPanel, this.iconsRegistry = e == null ? void 0 : e.iconsRegistry, this.id = Math.random().toString(36).substring(2);
|
|
829
730
|
}
|
|
830
731
|
getI18n() {
|
|
831
732
|
return this.i18n;
|
|
@@ -884,12 +785,9 @@ var ct = V, Tt = class {
|
|
|
884
785
|
getGeneralPanelTabs() {
|
|
885
786
|
return this.generalPanelTabs;
|
|
886
787
|
}
|
|
887
|
-
|
|
888
|
-
return this.modulesPanelTabs;
|
|
889
|
-
}
|
|
890
|
-
}, Lt = class {
|
|
788
|
+
}, gt = class {
|
|
891
789
|
constructor() {
|
|
892
|
-
this.styles = [], this.uiElements = [], this.controls = [], this.contextActions = [], this.blocks = [], this.generalPanelTabs = []
|
|
790
|
+
this.styles = [], this.uiElements = [], this.controls = [], this.contextActions = [], this.blocks = [], this.generalPanelTabs = [];
|
|
893
791
|
}
|
|
894
792
|
withLocalization(e) {
|
|
895
793
|
return this.i18n = e, this;
|
|
@@ -954,11 +852,8 @@ var ct = V, Tt = class {
|
|
|
954
852
|
addGeneralPanelTab(e) {
|
|
955
853
|
return this.generalPanelTabs.push(e), this;
|
|
956
854
|
}
|
|
957
|
-
addModulesPanelTab(e) {
|
|
958
|
-
return this.modulesPanelTabs.push(e), this;
|
|
959
|
-
}
|
|
960
855
|
build() {
|
|
961
|
-
return new
|
|
856
|
+
return new Ke({
|
|
962
857
|
i18n: this.i18n,
|
|
963
858
|
styles: this.styles.map((e) => e.trim()).join(`
|
|
964
859
|
`),
|
|
@@ -977,22 +872,21 @@ var ct = V, Tt = class {
|
|
|
977
872
|
blocksPanel: this.blocksPanel,
|
|
978
873
|
iconsRegistry: this.iconsRegistry,
|
|
979
874
|
externalImageLibraryTab: this.externalImageLibraryTab,
|
|
980
|
-
generalPanelTabs: this.generalPanelTabs
|
|
981
|
-
modulesPanelTabs: this.modulesPanelTabs
|
|
875
|
+
generalPanelTabs: this.generalPanelTabs
|
|
982
876
|
});
|
|
983
877
|
}
|
|
984
|
-
},
|
|
878
|
+
}, Fe = class m extends s {
|
|
985
879
|
constructor() {
|
|
986
|
-
super(
|
|
880
|
+
super(m.REQUIRED_METHODS, m);
|
|
987
881
|
}
|
|
988
882
|
openAiAssistant(t) {
|
|
989
883
|
throw new Error("Method openAiAssistant() must be implemented by the subclass");
|
|
990
884
|
}
|
|
991
885
|
};
|
|
992
|
-
|
|
993
|
-
var
|
|
886
|
+
Fe.REQUIRED_METHODS = ["openAiAssistant"];
|
|
887
|
+
var He = class R extends s {
|
|
994
888
|
constructor() {
|
|
995
|
-
super(
|
|
889
|
+
super(R.REQUIRED_METHODS, R);
|
|
996
890
|
}
|
|
997
891
|
/**
|
|
998
892
|
* Retrieves the name of the category.
|
|
@@ -1009,7 +903,7 @@ var Xe = class L extends s {
|
|
|
1009
903
|
* @param {ExternalDisplayConditionSelectedCB} _successCallback - Callback executed with the updated or newly created condition upon success.
|
|
1010
904
|
* @param {() => void} _cancelCallback - Callback executed when the dialog is closed without making changes.
|
|
1011
905
|
*/
|
|
1012
|
-
openExternalDisplayConditionsDialog(t,
|
|
906
|
+
openExternalDisplayConditionsDialog(t, n, i) {
|
|
1013
907
|
throw new Error("Method openExternalDisplayConditionsDialog() must be implemented by the subclass");
|
|
1014
908
|
}
|
|
1015
909
|
/**
|
|
@@ -1030,19 +924,19 @@ var Xe = class L extends s {
|
|
|
1030
924
|
throw new Error("Method getContextActionIndex() must be implemented by the subclass");
|
|
1031
925
|
}
|
|
1032
926
|
};
|
|
1033
|
-
|
|
1034
|
-
var
|
|
927
|
+
He.REQUIRED_METHODS = ["getCategoryName", "openExternalDisplayConditionsDialog"];
|
|
928
|
+
var ke = class L extends s {
|
|
1035
929
|
constructor() {
|
|
1036
|
-
super(
|
|
930
|
+
super(L.REQUIRED_METHODS, L);
|
|
1037
931
|
}
|
|
1038
|
-
openImageLibrary(t,
|
|
932
|
+
openImageLibrary(t, n, i) {
|
|
1039
933
|
throw new Error("Method openImageLibrary() must be implemented by the subclass");
|
|
1040
934
|
}
|
|
1041
935
|
};
|
|
1042
|
-
|
|
1043
|
-
var
|
|
936
|
+
ke.REQUIRED_METHODS = ["openImageLibrary"];
|
|
937
|
+
var Xe = class _ extends s {
|
|
1044
938
|
constructor() {
|
|
1045
|
-
super(
|
|
939
|
+
super(_.REQUIRED_METHODS, _);
|
|
1046
940
|
}
|
|
1047
941
|
/**
|
|
1048
942
|
* @description Returns the translated name/label for the tab
|
|
@@ -1057,39 +951,39 @@ var Ve = class C extends s {
|
|
|
1057
951
|
* @param _onImageSelectCallback - Callback to invoke when an image is selected
|
|
1058
952
|
* @param _selectedNode - (Optional) Selected node for which the gallery is being opened
|
|
1059
953
|
*/
|
|
1060
|
-
openImageLibraryTab(t,
|
|
954
|
+
openImageLibraryTab(t, n, i) {
|
|
1061
955
|
throw new Error("Method openImageLibraryTab() must be implemented by the subclass");
|
|
1062
956
|
}
|
|
1063
957
|
};
|
|
1064
|
-
|
|
1065
|
-
var
|
|
958
|
+
Xe.REQUIRED_METHODS = ["getName", "openImageLibraryTab"];
|
|
959
|
+
var pe = class C extends s {
|
|
1066
960
|
constructor() {
|
|
1067
|
-
super(
|
|
961
|
+
super(C.REQUIRED_METHODS, C);
|
|
1068
962
|
}
|
|
1069
|
-
openSmartElementsLibrary(t,
|
|
963
|
+
openSmartElementsLibrary(t, n) {
|
|
1070
964
|
throw new Error("Method openSmartElementsLibrary() must be implemented by the subclass");
|
|
1071
965
|
}
|
|
1072
966
|
};
|
|
1073
|
-
|
|
1074
|
-
var
|
|
967
|
+
pe.REQUIRED_METHODS = ["openSmartElementsLibrary"];
|
|
968
|
+
var Ge = class A extends s {
|
|
1075
969
|
constructor() {
|
|
1076
|
-
super(
|
|
970
|
+
super(A.REQUIRED_METHODS, A);
|
|
1077
971
|
}
|
|
1078
|
-
openExternalVideosLibraryDialog(t,
|
|
972
|
+
openExternalVideosLibraryDialog(t, n, i) {
|
|
1079
973
|
throw new Error("Method openExternalVideosLibraryDialog() must be implemented by the subclass");
|
|
1080
974
|
}
|
|
1081
975
|
};
|
|
1082
|
-
|
|
1083
|
-
var
|
|
976
|
+
Ge.REQUIRED_METHODS = ["openExternalVideosLibraryDialog"];
|
|
977
|
+
var V = class N extends s {
|
|
1084
978
|
constructor() {
|
|
1085
|
-
super(
|
|
979
|
+
super(N.REQUIRED_METHODS, N);
|
|
1086
980
|
}
|
|
1087
981
|
registerIconsSvg(t) {
|
|
1088
982
|
throw new Error("Method registerIconsSvg() must be implemented by the subclass");
|
|
1089
983
|
}
|
|
1090
984
|
};
|
|
1091
|
-
|
|
1092
|
-
var
|
|
985
|
+
V.REQUIRED_METHODS = ["registerIconsSvg"];
|
|
986
|
+
var mt = V, Rt = class {
|
|
1093
987
|
constructor(e) {
|
|
1094
988
|
this.key = e;
|
|
1095
989
|
}
|
|
@@ -1102,9 +996,9 @@ var _t = Q, Ct = class {
|
|
|
1102
996
|
params: this.params
|
|
1103
997
|
};
|
|
1104
998
|
}
|
|
1105
|
-
},
|
|
999
|
+
}, Q = class D extends s {
|
|
1106
1000
|
constructor() {
|
|
1107
|
-
super(
|
|
1001
|
+
super(D.REQUIRED_METHODS, D);
|
|
1108
1002
|
}
|
|
1109
1003
|
/**
|
|
1110
1004
|
* Called when the UI element should render its content into the provided container.
|
|
@@ -1139,7 +1033,7 @@ var _t = Q, Ct = class {
|
|
|
1139
1033
|
* @param name - The name of the attribute that was updated.
|
|
1140
1034
|
* @param value - The new value of the attribute.
|
|
1141
1035
|
*/
|
|
1142
|
-
onAttributeUpdated(t,
|
|
1036
|
+
onAttributeUpdated(t, n) {
|
|
1143
1037
|
}
|
|
1144
1038
|
/**
|
|
1145
1039
|
* Gets the unique identifier for this UI element type.
|
|
@@ -1157,64 +1051,64 @@ var _t = Q, Ct = class {
|
|
|
1157
1051
|
throw new Error("Method getTemplate() must be implemented by the subclass");
|
|
1158
1052
|
}
|
|
1159
1053
|
};
|
|
1160
|
-
|
|
1161
|
-
var
|
|
1054
|
+
Q.REQUIRED_METHODS = ["onRender", "getId", "getTemplate"];
|
|
1055
|
+
var Lt = Q, f = class S extends s {
|
|
1162
1056
|
constructor() {
|
|
1163
|
-
super(
|
|
1057
|
+
super(S.REQUIRED_METHODS, S);
|
|
1164
1058
|
}
|
|
1165
1059
|
registerUiElements(t) {
|
|
1166
1060
|
throw new Error("Method registerUiElements() must be implemented by the subclass");
|
|
1167
1061
|
}
|
|
1168
1062
|
};
|
|
1169
|
-
|
|
1170
|
-
var
|
|
1063
|
+
f.REQUIRED_METHODS = ["registerUiElements"];
|
|
1064
|
+
var _t = f;
|
|
1171
1065
|
export {
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1066
|
+
Qe as Block,
|
|
1067
|
+
Ye as BlockAttr,
|
|
1068
|
+
$ as BlockCompositionType,
|
|
1069
|
+
I as BlockSelector,
|
|
1070
|
+
Ee as BlockType,
|
|
1071
|
+
fe as BlocksPanel,
|
|
1072
|
+
M as BuiltInControl,
|
|
1073
|
+
a as BuiltInControlTypes,
|
|
1074
|
+
ze as ButtonAlignBuiltInControl,
|
|
1075
|
+
Ze as ButtonBackgroundColorBuiltInControl,
|
|
1076
|
+
je as ButtonBorderBuiltInControl,
|
|
1077
|
+
We as ButtonBorderRadiusBuiltInControl,
|
|
1078
|
+
qe as ButtonColorBuiltInControl,
|
|
1079
|
+
K as ButtonControls,
|
|
1080
|
+
Je as ButtonFitToContainerBuiltInControl,
|
|
1081
|
+
et as ButtonFontFamilyBuiltInControl,
|
|
1082
|
+
tt as ButtonMarginsBuiltInControl,
|
|
1083
|
+
rt as ButtonPaddingsBuiltInControl,
|
|
1084
|
+
nt as ButtonTextBuiltInControl,
|
|
1085
|
+
at as ButtonTextSizeBuiltInControl,
|
|
1086
|
+
st as ButtonTextStyleAndFontColorBuiltInControl,
|
|
1087
|
+
oe as ContainerControls,
|
|
1088
|
+
it as Control,
|
|
1089
|
+
de as EditorStatePropertyType,
|
|
1090
|
+
Ke as Extension,
|
|
1091
|
+
gt as ExtensionBuilder,
|
|
1092
|
+
w as GeneralControls,
|
|
1093
|
+
mt as IconsRegistry,
|
|
1094
|
+
H as ImageControls,
|
|
1095
|
+
lt as ImageMarginsBuiltInControl,
|
|
1096
|
+
Et as ImageSizeBuiltInControl,
|
|
1097
|
+
Rt as ModificationDescription,
|
|
1098
|
+
ue as PreviewDeviceMode,
|
|
1099
|
+
ot as SettingsPanelRegistry,
|
|
1100
|
+
dt as SettingsPanelTab,
|
|
1101
|
+
Ie as SettingsTab,
|
|
1102
|
+
ut as TextAlignBuiltInControl,
|
|
1103
|
+
It as TextColorBuiltInControl,
|
|
1104
|
+
F as TextControls,
|
|
1105
|
+
ct as TextFontFamilyBuiltInControl,
|
|
1106
|
+
Tt as TextLineSpacingBuiltInControl,
|
|
1107
|
+
bt as TextPaddingsBuiltInControl,
|
|
1214
1108
|
Ot as TextSizeBuiltInControl,
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1109
|
+
ht as TextStyleBuiltInControl,
|
|
1110
|
+
$e as UEAttr,
|
|
1111
|
+
Lt as UIElement,
|
|
1112
|
+
_t as UIElementTagRegistry,
|
|
1113
|
+
Pe as UIElementType
|
|
1220
1114
|
};
|
package/dist/package.json.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const o = `.control-shadow-wrapper:has(.button) {
|
|
2
2
|
border-radius: 0;
|
|
3
3
|
box-shadow: none;
|
|
4
4
|
background-color: transparent;
|
|
@@ -99,12 +99,18 @@ ue-check-button.checked:not(.flat-white) input:checked + label .icon-button {
|
|
|
99
99
|
color: var(--guido-color-primary-500);
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
+
ue-select.full-width .button {
|
|
103
|
+
border: none !important;
|
|
104
|
+
background-color: var(--guido-color-neutral-200) !important;
|
|
105
|
+
color: var(--guido-color-neutral-800) !important;
|
|
106
|
+
}
|
|
107
|
+
|
|
102
108
|
ue-select.full-width .button .icon-button {
|
|
103
109
|
color: var(--guido-color-gray-600) !important;
|
|
104
110
|
}
|
|
105
111
|
|
|
106
112
|
ue-select.full-width .button:hover:not(:disabled,.disabled) {
|
|
107
|
-
background-color: var(--guido-color-
|
|
113
|
+
background-color: var(--guido-color-neutral-100) !important;
|
|
108
114
|
}
|
|
109
115
|
|
|
110
116
|
ue-color {
|
|
@@ -124,20 +130,7 @@ ue-select-text-input .select-text-input-toggle .button {
|
|
|
124
130
|
justify-content: center;
|
|
125
131
|
background-color: transparent !important;
|
|
126
132
|
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
.control-shadow-wrapper,
|
|
130
|
-
ue-button:not(.no-shadow,.flat-white),
|
|
131
|
-
ue-toggle:not(.no-shadow,.flat-white),
|
|
132
|
-
:is(ue-popover-toggler,ue-toggle-icon-picker,ue-emoji-toggle),
|
|
133
|
-
.button-group,
|
|
134
|
-
ue-counter:not(.no-shadow),
|
|
135
|
-
:is(ue-select,ue-mergetags,ue-font-family-select):not(.no-shadow),
|
|
136
|
-
ue-check-button:not(.no-shadow,.flat-white) {
|
|
137
|
-
background: none;
|
|
138
|
-
padding: 0;
|
|
139
|
-
}
|
|
140
133
|
`;
|
|
141
134
|
export {
|
|
142
|
-
|
|
135
|
+
o as default
|
|
143
136
|
};
|
|
@@ -28,58 +28,6 @@ ue-stripe-thumb:hover:not(.disabled),
|
|
|
28
28
|
border-color: var(--guido-color-primary-500);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
/* Module search — initial */
|
|
32
|
-
.module-search-container {
|
|
33
|
-
background-color: var(--guido-color-gray-0);
|
|
34
|
-
border: 1px solid var(--guido-color-gray-300);
|
|
35
|
-
border-radius: 4px;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.module-search-container .service-element {
|
|
39
|
-
background-color: unset;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.module-filter-toggle {
|
|
43
|
-
top: -1px !important;
|
|
44
|
-
right: -1px !important;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.module-filter-toggle > .button,
|
|
48
|
-
.module-search-container:hover .module-filter-toggle > .button {
|
|
49
|
-
border: none;
|
|
50
|
-
background: transparent;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/* Module search — hover */
|
|
54
|
-
.module-search-container:has(.module-search-chip-input:hover) {
|
|
55
|
-
border-color: var(--guido-color-primary-500);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.module-search-container .module-search-chip-input .service-element:hover {
|
|
59
|
-
background-color: var(--guido-color-gray-0);
|
|
60
|
-
border-radius: 4px;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.module-search-container .module-filter-toggle:hover > .button {
|
|
64
|
-
background-color: var(--guido-color-gray-1);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
/* Module search — selected (.on) */
|
|
68
|
-
.module-search-container:has(.module-search-chip-input.on),
|
|
69
|
-
.module-search-container:has(.module-search-chip-input.on):hover {
|
|
70
|
-
border-color: var(--guido-color-primary-500);
|
|
71
|
-
box-shadow: 0 0 0 3px var(--guido-color-primary-200) !important;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.module-search-container .module-search-chip-input.on .input-section {
|
|
75
|
-
background-color: unset;
|
|
76
|
-
box-shadow: unset;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.module-categories-list .menu-item {
|
|
80
|
-
padding: 8px 20px !important;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
31
|
.modules-layout-wrapper {
|
|
84
32
|
padding: 0 16px 16px;
|
|
85
33
|
grid-row-gap: 16px;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/guido",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0-beta.2a61d0e",
|
|
4
4
|
"description": "Guido is a Vue + TypeScript wrapper for Email Plugin. Easily embed the email editor in your Vue applications.",
|
|
5
5
|
"main": "./dist/guido.umd.cjs",
|
|
6
6
|
"module": "./dist/library.js",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"author": "",
|
|
33
33
|
"license": "ISC",
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@stripoinc/ui-editor-extensions": "3.
|
|
35
|
+
"@stripoinc/ui-editor-extensions": "3.5.0",
|
|
36
36
|
"@useinsider/design-system-vue": "1.1.0-beta.73ec2fa",
|
|
37
37
|
"@vueuse/core": "11.3.0",
|
|
38
38
|
"lodash-es": "4.17.21",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
},
|
|
87
87
|
"guido": {
|
|
88
88
|
"stripo": {
|
|
89
|
-
"version": "2.
|
|
89
|
+
"version": "2.54.0"
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
}
|