@useinsider/guido 2.0.0-beta.5ccd854 → 2.0.0-beta.689d09e
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/@types/config/schemas.js +55 -39
- package/dist/components/Guido.vue.js +1 -1
- package/dist/components/Guido.vue2.js +15 -17
- package/dist/components/organisms/header/LeftSlot.vue.js +12 -12
- package/dist/components/organisms/header/LeftSlot.vue2.js +6 -6
- package/dist/components/organisms/header/RightSlot.vue2.js +10 -10
- package/dist/composables/useConfig.js +29 -27
- package/dist/composables/useSave.js +13 -11
- package/dist/composables/useStripo.js +42 -40
- package/dist/config/migrator/itemsBlockMigrator.js +184 -125
- package/dist/extensions/Blocks/CouponBlock/constants.js +4 -0
- package/dist/extensions/Blocks/CouponBlock/controls/index.js +29 -0
- package/dist/extensions/Blocks/CouponBlock/extension.js +5 -4
- package/dist/extensions/Blocks/CouponBlock/settingsPanel.js +20 -14
- package/dist/extensions/Blocks/CouponBlock/template.js +22 -11
- package/dist/extensions/Blocks/Items/block.js +1 -1
- package/dist/extensions/Blocks/Items/controls/button/link.js +22 -29
- package/dist/extensions/Blocks/Items/controls/cardComposition.js +59 -36
- package/dist/extensions/Blocks/Items/controls/image/link.js +23 -30
- package/dist/extensions/Blocks/Items/controls/name/trimming.js +25 -25
- package/dist/extensions/Blocks/Items/controls/price/currencyLocation.js +19 -17
- package/dist/extensions/Blocks/Items/controls/price/currencySymbol.js +31 -29
- package/dist/extensions/Blocks/Items/controls/price/formattedPrice.js +44 -38
- package/dist/extensions/Blocks/Items/controls/price/hideDiscount.js +21 -19
- package/dist/extensions/Blocks/Items/controls/price/priceOrientation.js +1 -1
- package/dist/extensions/Blocks/Items/controls/price/singlePrice.js +93 -0
- package/dist/extensions/Blocks/Items/controls/settingsControl.js +99 -95
- package/dist/extensions/Blocks/Items/enums/controlEnums.js +2 -2
- package/dist/extensions/Blocks/Items/enums/productEnums.js +43 -45
- package/dist/extensions/Blocks/Items/enums/settingsEnums.js +2 -1
- package/dist/extensions/Blocks/Items/extension.js +7 -6
- package/dist/extensions/Blocks/Items/layouts/horizontal.html.js +0 -1
- package/dist/extensions/Blocks/Items/layouts/vertical.html.js +0 -1
- package/dist/extensions/Blocks/Items/settingsPanel.js +27 -26
- package/dist/extensions/Blocks/Items/store/items-block.js +9 -5
- package/dist/extensions/Blocks/Items/template.js +285 -221
- package/dist/extensions/Blocks/Items/utils/nodeConfigUtils.js +94 -82
- package/dist/extensions/Blocks/Unsubscribe/extension.js +9 -9
- package/dist/extensions/Blocks/common-control.js +45 -57
- package/dist/extensions/Blocks/controlFactories.js +139 -118
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +53 -48
- package/dist/package.json.js +7 -0
- package/dist/services/stripoApi.js +6 -10
- package/dist/src/@types/config/index.d.ts +2 -2
- package/dist/src/@types/config/schemas.d.ts +30 -0
- package/dist/src/@types/config/types.d.ts +7 -1
- package/dist/src/composables/useConfig.d.ts +8 -0
- package/dist/src/extensions/Blocks/CouponBlock/constants.d.ts +14 -0
- package/dist/src/extensions/Blocks/CouponBlock/controls/index.d.ts +108 -0
- package/dist/src/extensions/Blocks/CouponBlock/template.d.ts +1 -1
- package/dist/src/extensions/Blocks/Items/controls/button/link.d.ts +0 -2
- package/dist/src/extensions/Blocks/Items/controls/cardComposition.d.ts +9 -0
- package/dist/src/extensions/Blocks/Items/controls/image/link.d.ts +0 -2
- package/dist/src/extensions/Blocks/Items/controls/price/singlePrice.d.ts +18 -0
- package/dist/src/extensions/Blocks/Items/enums/controlEnums.d.ts +1 -0
- package/dist/src/extensions/Blocks/Items/enums/productEnums.d.ts +24 -26
- package/dist/src/extensions/Blocks/Items/enums/settingsEnums.d.ts +1 -0
- package/dist/src/extensions/Blocks/Items/store/items-block.d.ts +2 -0
- package/dist/src/extensions/Blocks/Items/template.d.ts +3 -1
- package/dist/src/extensions/Blocks/Items/utils/nodeConfigUtils.d.ts +4 -2
- package/dist/src/extensions/Blocks/common-control.d.ts +1 -7
- package/dist/src/extensions/Blocks/controlFactories.d.ts +30 -7
- package/dist/src/stores/config.d.ts +164 -1
- package/dist/static/styles/components/button.css.js +1 -1
- package/dist/stores/config.js +7 -0
- package/dist/utils/pairProductVariables.js +61 -58
- package/package.json +1 -1
- package/dist/extensions/Blocks/Items/utils/configBlockUtils.js +0 -17
- package/dist/extensions/Blocks/Items/utils/syncAttributeFromConfigBlock.js +0 -28
- package/dist/extensions/Blocks/Items/utils/syncAttributesFromConfigBlock.js +0 -67
- package/dist/extensions/Blocks/Items/utils/updateAttributes.js +0 -46
- package/dist/src/extensions/Blocks/Items/utils/configBlockUtils.d.ts +0 -23
- package/dist/src/extensions/Blocks/Items/utils/syncAttributeFromConfigBlock.d.ts +0 -32
- package/dist/src/extensions/Blocks/Items/utils/syncAttributesFromConfigBlock.d.ts +0 -50
- package/dist/src/extensions/Blocks/Items/utils/updateAttributes.d.ts +0 -8
|
@@ -21,7 +21,7 @@ ${s.map((o) => ` - ${o}`).join(`
|
|
|
21
21
|
* This validation runs only once per class type and results are cached.
|
|
22
22
|
*/
|
|
23
23
|
validateImplementation(t, r) {
|
|
24
|
-
var
|
|
24
|
+
var M;
|
|
25
25
|
const s = [], o = r.name, Y = Object.getPrototypeOf(this);
|
|
26
26
|
t.forEach((u) => {
|
|
27
27
|
if (typeof this[u] != "function") {
|
|
@@ -29,7 +29,7 @@ ${s.map((o) => ` - ${o}`).join(`
|
|
|
29
29
|
return;
|
|
30
30
|
}
|
|
31
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" && ((
|
|
32
|
+
}), d.validatedClasses.add(r), s.length > 0 ? (d.validationErrors.set(r, s), console.error(`[${o} Validation] ${o} validation failed:`, s)) : typeof process < "u" && ((M = process.env) == null ? void 0 : M.NODE_ENV) === "development" && console.log(`[${o} Validation] ✅ ${o} validated successfully`);
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
35
|
B.validatedClasses = /* @__PURE__ */ new Set();
|
|
@@ -196,9 +196,9 @@ var a = B, $ = /* @__PURE__ */ ((e) => (e.BLOCK = "BLOCK", e.STRUCTURE = "STRUCT
|
|
|
196
196
|
}
|
|
197
197
|
};
|
|
198
198
|
y.REQUIRED_METHODS = ["getId", "getTemplate", "getIcon", "getName", "getDescription"];
|
|
199
|
-
var
|
|
199
|
+
var Pe = 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
|
|
@@ -214,9 +214,9 @@ var we = y, W = class O extends a {
|
|
|
214
214
|
}
|
|
215
215
|
};
|
|
216
216
|
W.REQUIRED_METHODS = ["getPreviewInnerHtml"];
|
|
217
|
-
var z = class
|
|
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");
|
|
@@ -240,14 +240,14 @@ var Z = {
|
|
|
240
240
|
height: "height"
|
|
241
241
|
}, j = {
|
|
242
242
|
href: "href"
|
|
243
|
-
},
|
|
243
|
+
}, we = {
|
|
244
244
|
BLOCK_IMAGE: Z,
|
|
245
245
|
BLOCK_BUTTON: j
|
|
246
|
-
}, v = "esd-block-button", U = "esd-block-text",
|
|
246
|
+
}, v = "esd-block-button", U = "esd-block-text", P = "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 = `.${P}`, 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 || {}), 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 || {}), 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 = {
|
|
247
247
|
BLOCK_BUTTON: K,
|
|
248
248
|
BLOCK_TEXT: F,
|
|
249
249
|
BLOCK_IMAGE: H,
|
|
250
|
-
GENERAL:
|
|
250
|
+
GENERAL: w
|
|
251
251
|
}, ue = /* @__PURE__ */ ((e) => (e.SETTINGS = "settings", e.STYLES = "styles", e.DATA = "data", e))(ue || {}), E = {
|
|
252
252
|
name: "name",
|
|
253
253
|
disabled: "disabled"
|
|
@@ -258,12 +258,12 @@ var Z = {
|
|
|
258
258
|
}, Te = {
|
|
259
259
|
...E,
|
|
260
260
|
caption: "caption"
|
|
261
|
-
},
|
|
261
|
+
}, ce = {
|
|
262
262
|
...E,
|
|
263
263
|
minValue: "min-value",
|
|
264
264
|
maxValue: "max-value",
|
|
265
265
|
step: "step"
|
|
266
|
-
},
|
|
266
|
+
}, Oe = {
|
|
267
267
|
...E,
|
|
268
268
|
text: "text"
|
|
269
269
|
}, he = {
|
|
@@ -297,8 +297,8 @@ var Z = {
|
|
|
297
297
|
BUTTON: Ie,
|
|
298
298
|
CHECKBOX: Te,
|
|
299
299
|
COLOR: E,
|
|
300
|
-
COUNTER:
|
|
301
|
-
LABEL:
|
|
300
|
+
COUNTER: ce,
|
|
301
|
+
LABEL: Oe,
|
|
302
302
|
RADIO_BUTTONS: he,
|
|
303
303
|
SELECTPICKER: X,
|
|
304
304
|
FONT_FAMILY_SELECT: ge,
|
|
@@ -309,7 +309,7 @@ var Z = {
|
|
|
309
309
|
NESTED_CONTROL: _e,
|
|
310
310
|
ORDERABLE: Le,
|
|
311
311
|
ORDERABLE_ITEM: Ce
|
|
312
|
-
}, 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 || {}),
|
|
312
|
+
}, 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 || {}), x = class {
|
|
313
313
|
/**
|
|
314
314
|
* @description returns map of nodes parent control operates on
|
|
315
315
|
*/
|
|
@@ -340,7 +340,7 @@ var Z = {
|
|
|
340
340
|
isVisible(e) {
|
|
341
341
|
return !0;
|
|
342
342
|
}
|
|
343
|
-
}, i = class extends
|
|
343
|
+
}, i = class extends x {
|
|
344
344
|
getTargetNodes(e) {
|
|
345
345
|
const t = e.querySelectorAll(I.BUTTON), r = e.asElement().hasClass(v) ? [e] : [];
|
|
346
346
|
return t.length ? t : r;
|
|
@@ -373,11 +373,11 @@ var Z = {
|
|
|
373
373
|
getParentControlId() {
|
|
374
374
|
return n.BLOCK_BUTTON.ADJUST_TO_WIDTH;
|
|
375
375
|
}
|
|
376
|
-
},
|
|
376
|
+
}, pe = class extends i {
|
|
377
377
|
getParentControlId() {
|
|
378
378
|
return n.BLOCK_BUTTON.FONT_FAMILY;
|
|
379
379
|
}
|
|
380
|
-
},
|
|
380
|
+
}, Qe = class extends i {
|
|
381
381
|
getParentControlId() {
|
|
382
382
|
return n.BLOCK_BUTTON.EXTERNAL_INDENTS;
|
|
383
383
|
}
|
|
@@ -525,9 +525,9 @@ var ze = k, Ne = class g extends a {
|
|
|
525
525
|
}
|
|
526
526
|
};
|
|
527
527
|
Ne.REQUIRED_METHODS = ["getId", "getIcon", "getName", "getTemplate", "getTabIndex"];
|
|
528
|
-
var G = class extends
|
|
528
|
+
var G = class extends x {
|
|
529
529
|
getTargetNodes(e) {
|
|
530
|
-
const t = e.querySelectorAll(I.IMAGE), r = e.asElement().hasClass(
|
|
530
|
+
const t = e.querySelectorAll(I.IMAGE), r = e.asElement().hasClass(P) ? [e] : [];
|
|
531
531
|
return t.length ? t : r;
|
|
532
532
|
}
|
|
533
533
|
}, Ze = class extends G {
|
|
@@ -570,7 +570,7 @@ var qe = V, Je = class {
|
|
|
570
570
|
const t = this.controlsIds.indexOf(e);
|
|
571
571
|
t !== -1 && this.controlsIds.splice(t, 1);
|
|
572
572
|
}
|
|
573
|
-
}, l = class extends
|
|
573
|
+
}, l = class extends x {
|
|
574
574
|
getTargetNodes(e) {
|
|
575
575
|
const t = e.querySelectorAll(I.TEXT), r = e.asElement().hasClass(U) ? [e] : [];
|
|
576
576
|
return t.length ? t : r;
|
|
@@ -593,13 +593,17 @@ var qe = V, Je = class {
|
|
|
593
593
|
}
|
|
594
594
|
}, at = class extends l {
|
|
595
595
|
getParentControlId() {
|
|
596
|
-
return n.
|
|
596
|
+
return n.GENERAL.TEXT_LINE_SPACING;
|
|
597
597
|
}
|
|
598
598
|
}, st = class extends l {
|
|
599
599
|
getParentControlId() {
|
|
600
|
-
return n.
|
|
600
|
+
return n.BLOCK_TEXT.INTERNAL_INDENTS;
|
|
601
601
|
}
|
|
602
602
|
}, it = class extends l {
|
|
603
|
+
getParentControlId() {
|
|
604
|
+
return n.GENERAL.TEXT_SIZE;
|
|
605
|
+
}
|
|
606
|
+
}, Et = class extends l {
|
|
603
607
|
getParentControlId() {
|
|
604
608
|
return n.GENERAL.TEXT_STYLE;
|
|
605
609
|
}
|
|
@@ -664,7 +668,7 @@ var qe = V, Je = class {
|
|
|
664
668
|
getGeneralPanelTabs() {
|
|
665
669
|
return this.generalPanelTabs;
|
|
666
670
|
}
|
|
667
|
-
},
|
|
671
|
+
}, lt = class {
|
|
668
672
|
constructor() {
|
|
669
673
|
this.styles = [], this.uiElements = [], this.controls = [], this.contextActions = [], this.blocks = [], this.generalPanelTabs = [];
|
|
670
674
|
}
|
|
@@ -804,7 +808,7 @@ var Be = class R extends a {
|
|
|
804
808
|
}
|
|
805
809
|
};
|
|
806
810
|
Be.REQUIRED_METHODS = ["getCategoryName", "openExternalDisplayConditionsDialog"];
|
|
807
|
-
var
|
|
811
|
+
var xe = class _ extends a {
|
|
808
812
|
constructor() {
|
|
809
813
|
super(_.REQUIRED_METHODS, _);
|
|
810
814
|
}
|
|
@@ -812,8 +816,8 @@ var Me = class _ extends a {
|
|
|
812
816
|
throw new Error("Method openImageLibrary() must be implemented by the subclass");
|
|
813
817
|
}
|
|
814
818
|
};
|
|
815
|
-
|
|
816
|
-
var
|
|
819
|
+
xe.REQUIRED_METHODS = ["openImageLibrary"];
|
|
820
|
+
var Me = class L extends a {
|
|
817
821
|
constructor() {
|
|
818
822
|
super(L.REQUIRED_METHODS, L);
|
|
819
823
|
}
|
|
@@ -834,7 +838,7 @@ var xe = class L extends a {
|
|
|
834
838
|
throw new Error("Method openImageLibraryTab() must be implemented by the subclass");
|
|
835
839
|
}
|
|
836
840
|
};
|
|
837
|
-
|
|
841
|
+
Me.REQUIRED_METHODS = ["getName", "openImageLibraryTab"];
|
|
838
842
|
var ye = class C extends a {
|
|
839
843
|
constructor() {
|
|
840
844
|
super(C.REQUIRED_METHODS, C);
|
|
@@ -853,7 +857,7 @@ var ve = class A extends a {
|
|
|
853
857
|
}
|
|
854
858
|
};
|
|
855
859
|
ve.REQUIRED_METHODS = ["openExternalVideosLibraryDialog"];
|
|
856
|
-
var
|
|
860
|
+
var p = class N extends a {
|
|
857
861
|
constructor() {
|
|
858
862
|
super(N.REQUIRED_METHODS, N);
|
|
859
863
|
}
|
|
@@ -861,8 +865,8 @@ var Q = class N extends a {
|
|
|
861
865
|
throw new Error("Method registerIconsSvg() must be implemented by the subclass");
|
|
862
866
|
}
|
|
863
867
|
};
|
|
864
|
-
|
|
865
|
-
var
|
|
868
|
+
p.REQUIRED_METHODS = ["registerIconsSvg"];
|
|
869
|
+
var ot = p, dt = class {
|
|
866
870
|
constructor(e) {
|
|
867
871
|
this.key = e;
|
|
868
872
|
}
|
|
@@ -875,7 +879,7 @@ var lt = Q, ot = class {
|
|
|
875
879
|
params: this.params
|
|
876
880
|
};
|
|
877
881
|
}
|
|
878
|
-
},
|
|
882
|
+
}, Q = class D extends a {
|
|
879
883
|
constructor() {
|
|
880
884
|
super(D.REQUIRED_METHODS, D);
|
|
881
885
|
}
|
|
@@ -930,8 +934,8 @@ var lt = Q, ot = class {
|
|
|
930
934
|
throw new Error("Method getTemplate() must be implemented by the subclass");
|
|
931
935
|
}
|
|
932
936
|
};
|
|
933
|
-
|
|
934
|
-
var
|
|
937
|
+
Q.REQUIRED_METHODS = ["onRender", "getId", "getTemplate"];
|
|
938
|
+
var ut = Q, f = class S extends a {
|
|
935
939
|
constructor() {
|
|
936
940
|
super(S.REQUIRED_METHODS, S);
|
|
937
941
|
}
|
|
@@ -940,14 +944,14 @@ var dt = p, f = class S extends a {
|
|
|
940
944
|
}
|
|
941
945
|
};
|
|
942
946
|
f.REQUIRED_METHODS = ["registerUiElements"];
|
|
943
|
-
var
|
|
947
|
+
var It = f;
|
|
944
948
|
export {
|
|
945
|
-
|
|
946
|
-
|
|
949
|
+
Pe as Block,
|
|
950
|
+
we as BlockAttr,
|
|
947
951
|
$ as BlockCompositionType,
|
|
948
952
|
I as BlockSelector,
|
|
949
953
|
oe as BlockType,
|
|
950
|
-
|
|
954
|
+
x as BuiltInControl,
|
|
951
955
|
n as BuiltInControlTypes,
|
|
952
956
|
He as ButtonAlignBuiltInControl,
|
|
953
957
|
Xe as ButtonBackgroundColorBuiltInControl,
|
|
@@ -956,8 +960,8 @@ export {
|
|
|
956
960
|
Ge as ButtonColorBuiltInControl,
|
|
957
961
|
K as ButtonControls,
|
|
958
962
|
Ve as ButtonFitToContainerBuiltInControl,
|
|
959
|
-
|
|
960
|
-
|
|
963
|
+
pe as ButtonFontFamilyBuiltInControl,
|
|
964
|
+
Qe as ButtonMarginsBuiltInControl,
|
|
961
965
|
fe as ButtonPaddingsBuiltInControl,
|
|
962
966
|
Ye as ButtonTextBuiltInControl,
|
|
963
967
|
$e as ButtonTextSizeBuiltInControl,
|
|
@@ -965,13 +969,13 @@ export {
|
|
|
965
969
|
de as ContainerControls,
|
|
966
970
|
ze as Control,
|
|
967
971
|
De as Extension,
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
972
|
+
lt as ExtensionBuilder,
|
|
973
|
+
w as GeneralControls,
|
|
974
|
+
ot as IconsRegistry,
|
|
971
975
|
H as ImageControls,
|
|
972
976
|
Ze as ImageMarginsBuiltInControl,
|
|
973
977
|
je as ImageSizeBuiltInControl,
|
|
974
|
-
|
|
978
|
+
dt as ModificationDescription,
|
|
975
979
|
qe as SettingsPanelRegistry,
|
|
976
980
|
Je as SettingsPanelTab,
|
|
977
981
|
ue as SettingsTab,
|
|
@@ -980,11 +984,12 @@ export {
|
|
|
980
984
|
rt as TextColorBuiltInControl,
|
|
981
985
|
F as TextControls,
|
|
982
986
|
nt as TextFontFamilyBuiltInControl,
|
|
983
|
-
at as
|
|
984
|
-
st as
|
|
985
|
-
it as
|
|
987
|
+
at as TextLineSpacingBuiltInControl,
|
|
988
|
+
st as TextPaddingsBuiltInControl,
|
|
989
|
+
it as TextSizeBuiltInControl,
|
|
990
|
+
Et as TextStyleBuiltInControl,
|
|
986
991
|
Ke as UEAttr,
|
|
987
|
-
|
|
988
|
-
|
|
992
|
+
ut as UIElement,
|
|
993
|
+
It as UIElementTagRegistry,
|
|
989
994
|
Ae as UIElementType
|
|
990
995
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useHttp as m } from "../composables/useHttp.js";
|
|
2
|
-
import { useToaster as
|
|
3
|
-
import { MAX_DEFAULT_TEMPLATE_ID as
|
|
2
|
+
import { useToaster as i } from "../composables/useToaster.js";
|
|
3
|
+
import { MAX_DEFAULT_TEMPLATE_ID as p } from "../enums/defaults.js";
|
|
4
4
|
const y = () => {
|
|
5
|
-
const { get: r } = m(), { handleError: o } =
|
|
5
|
+
const { get: r } = m(), { handleError: o } = i();
|
|
6
6
|
return {
|
|
7
7
|
getToken: async () => {
|
|
8
8
|
try {
|
|
@@ -26,17 +26,13 @@ const y = () => {
|
|
|
26
26
|
getDefaultTemplate: async () => {
|
|
27
27
|
const t = {
|
|
28
28
|
html: "",
|
|
29
|
-
css: ""
|
|
30
|
-
forceRecreate: !0
|
|
29
|
+
css: ""
|
|
31
30
|
};
|
|
32
31
|
try {
|
|
33
|
-
const c = new URLSearchParams(window.location.search).get("default-template"), s = c ? parseInt(c) : 0, l = s >= 1 && s <=
|
|
32
|
+
const c = new URLSearchParams(window.location.search).get("default-template"), s = c ? parseInt(c) : 0, l = s >= 1 && s <= p ? s : 0, { data: n } = await r(
|
|
34
33
|
`/stripo/default-template/${l}`
|
|
35
34
|
), a = typeof n == "string" ? JSON.parse(n) : n;
|
|
36
|
-
return !a || typeof a != "object" || !("html" in a) || !("css" in a) ? t :
|
|
37
|
-
...a,
|
|
38
|
-
forceRecreate: !0
|
|
39
|
-
};
|
|
35
|
+
return !a || typeof a != "object" || !("html" in a) || !("css" in a) ? t : a;
|
|
40
36
|
} catch (e) {
|
|
41
37
|
return o(e, "Failed to fetch default template"), t;
|
|
42
38
|
}
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
* - Default values for optional configuration
|
|
8
8
|
* - Validation utilities
|
|
9
9
|
*/
|
|
10
|
-
export { MessageType, ProductType, GuidoConfigSchema, IdentitySchema, PartnerSchema, TemplateSchema, EditorSchema, UISchema, FeaturesSchema, BlocksSchema, CompilerSchema, DynamicContentSchema, EmailHeaderSchema, DefaultBlockTypeSchema, CustomBlockTypeSchema, CompilerRuleSchema, CompilerRuleTypeSchema, ReplaceRuleSchema, RegexRuleSchema, RemoveRuleSchema, CustomRuleSchema, } from './schemas';
|
|
11
|
-
export type { GuidoConfig, GuidoConfigInput, IdentityConfig, IdentityConfigInput, PartnerConfig, PartnerConfigInput, TemplateConfig, TemplateConfigInput, EditorConfig, EditorConfigInput, UIConfig, UIConfigInput, FeaturesConfig, FeaturesConfigInput, BlocksConfig, BlocksConfigInput, CompilerConfig, CompilerConfigInput, EmailHeader, DynamicContent, DefaultBlockType, CustomBlockType, BlockType, FeatureName, CompilerRule, ReplaceRule, RegexRule, RemoveRule, CustomRule, DeepPartial, ConfigOverrides, } from './types';
|
|
10
|
+
export { MessageType, ProductType, GuidoConfigSchema, IdentitySchema, PartnerSchema, TemplateSchema, EditorSchema, UISchema, FeaturesSchema, BlocksSchema, CompilerSchema, CallbacksSchema, DynamicContentSchema, EmailHeaderSchema, DefaultBlockTypeSchema, CustomBlockTypeSchema, CompilerRuleSchema, CompilerRuleTypeSchema, ReplaceRuleSchema, RegexRuleSchema, RemoveRuleSchema, CustomRuleSchema, } from './schemas';
|
|
11
|
+
export type { GuidoConfig, GuidoConfigInput, IdentityConfig, IdentityConfigInput, PartnerConfig, PartnerConfigInput, TemplateConfig, TemplateConfigInput, EditorConfig, EditorConfigInput, UIConfig, UIConfigInput, FeaturesConfig, FeaturesConfigInput, BlocksConfig, BlocksConfigInput, CompilerConfig, CompilerConfigInput, CallbacksConfig, CallbacksConfigInput, ExternalValidationHandler, EmailHeader, DynamicContent, DefaultBlockType, CustomBlockType, BlockType, FeatureName, CompilerRule, ReplaceRule, RegexRule, RemoveRule, CustomRule, DeepPartial, ConfigOverrides, } from './types';
|
|
12
12
|
export { DEFAULT_EMAIL_HEADER, DEFAULT_TEMPLATE, DEFAULT_EDITOR, DEFAULT_UI, DEFAULT_FEATURES, DEFAULT_BLOCKS, DEFAULT_COMPILER, DEFAULT_PRODUCT_TYPE, DEFAULT_MESSAGE_TYPE, DEFAULT_USERNAME, EDITOR_TYPE, TEST_PARTNERS, isTestPartner, } from './defaults';
|
|
13
13
|
export { validateConfig, parseConfig, parseConfigSafe, getValidationErrors, isValidConfig, validateIdentity, validatePartner, } from './validator';
|
|
14
14
|
export type { ValidationResult, ValidationError, } from './validator';
|
|
@@ -5,7 +5,14 @@
|
|
|
5
5
|
* All types are inferred from these schemas to ensure single source of truth.
|
|
6
6
|
* @module @types/config/schemas
|
|
7
7
|
*/
|
|
8
|
+
import type { SavedTemplateDetails } from '../stripo';
|
|
8
9
|
import * as v from 'valibot';
|
|
10
|
+
/**
|
|
11
|
+
* Handler function for external validation before save
|
|
12
|
+
* @param data - The template details to validate
|
|
13
|
+
* @returns Promise<boolean> - true if valid, false to cancel save
|
|
14
|
+
*/
|
|
15
|
+
export type ExternalValidationHandler = (data: SavedTemplateDetails) => Promise<boolean>;
|
|
9
16
|
/**
|
|
10
17
|
* Message type constants for email templates
|
|
11
18
|
*/
|
|
@@ -90,6 +97,8 @@ export declare const TemplateSchema: v.ObjectSchema<{
|
|
|
90
97
|
}, undefined>, undefined>, readonly []>;
|
|
91
98
|
/** Selected unsubscribe page IDs */
|
|
92
99
|
readonly selectedUnsubscribePages: v.OptionalSchema<v.ArraySchema<v.NumberSchema<undefined>, undefined>, readonly []>;
|
|
100
|
+
/** Force recreate template in Stripo storage (use true when updating externally modified templates) */
|
|
101
|
+
readonly forceRecreate: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
93
102
|
}, undefined>;
|
|
94
103
|
/**
|
|
95
104
|
* Email header configuration (sender name and subject)
|
|
@@ -344,6 +353,16 @@ export declare const CompilerSchema: v.ObjectSchema<{
|
|
|
344
353
|
/** Skip default compiler rules */
|
|
345
354
|
readonly ignoreDefaultRules: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
346
355
|
}, undefined>;
|
|
356
|
+
/**
|
|
357
|
+
* Callbacks configuration - event handlers and hooks
|
|
358
|
+
*/
|
|
359
|
+
export declare const CallbacksSchema: v.ObjectSchema<{
|
|
360
|
+
/**
|
|
361
|
+
* External validation handler called before save completes.
|
|
362
|
+
* Return false to cancel the save operation.
|
|
363
|
+
*/
|
|
364
|
+
readonly externalValidation: v.OptionalSchema<v.CustomSchema<ExternalValidationHandler, v.ErrorMessage<v.CustomIssue> | undefined>, undefined>;
|
|
365
|
+
}, undefined>;
|
|
347
366
|
/**
|
|
348
367
|
* Complete Guido configuration schema
|
|
349
368
|
*
|
|
@@ -356,6 +375,7 @@ export declare const CompilerSchema: v.ObjectSchema<{
|
|
|
356
375
|
* - features: Feature toggles
|
|
357
376
|
* - blocks: Block configuration
|
|
358
377
|
* - compiler: HTML compilation
|
|
378
|
+
* - callbacks: Event handlers and hooks
|
|
359
379
|
*/
|
|
360
380
|
export declare const GuidoConfigSchema: v.ObjectSchema<{
|
|
361
381
|
/** Identity configuration (required) */
|
|
@@ -400,6 +420,8 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
|
|
|
400
420
|
}, undefined>, undefined>, readonly []>;
|
|
401
421
|
/** Selected unsubscribe page IDs */
|
|
402
422
|
readonly selectedUnsubscribePages: v.OptionalSchema<v.ArraySchema<v.NumberSchema<undefined>, undefined>, readonly []>;
|
|
423
|
+
/** Force recreate template in Stripo storage (use true when updating externally modified templates) */
|
|
424
|
+
readonly forceRecreate: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
403
425
|
}, undefined>, {}>;
|
|
404
426
|
/** Editor settings */
|
|
405
427
|
readonly editor: v.OptionalSchema<v.ObjectSchema<{
|
|
@@ -506,4 +528,12 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
|
|
|
506
528
|
/** Skip default compiler rules */
|
|
507
529
|
readonly ignoreDefaultRules: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
508
530
|
}, undefined>, {}>;
|
|
531
|
+
/** Callbacks and event handlers */
|
|
532
|
+
readonly callbacks: v.OptionalSchema<v.ObjectSchema<{
|
|
533
|
+
/**
|
|
534
|
+
* External validation handler called before save completes.
|
|
535
|
+
* Return false to cancel the save operation.
|
|
536
|
+
*/
|
|
537
|
+
readonly externalValidation: v.OptionalSchema<v.CustomSchema<ExternalValidationHandler, v.ErrorMessage<v.CustomIssue> | undefined>, undefined>;
|
|
538
|
+
}, undefined>, {}>;
|
|
509
539
|
}, undefined>;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* This ensures type definitions are always in sync with validation.
|
|
6
6
|
* @module @types/config/types
|
|
7
7
|
*/
|
|
8
|
-
import type { GuidoConfigSchema, IdentitySchema, PartnerSchema, TemplateSchema, EditorSchema, UISchema, FeaturesSchema, BlocksSchema, CompilerSchema, DynamicContentSchema, EmailHeaderSchema, CompilerRuleSchema, ReplaceRuleSchema, RegexRuleSchema, RemoveRuleSchema, CustomRuleSchema, DefaultBlockTypeSchema, CustomBlockTypeSchema } from './schemas';
|
|
8
|
+
import type { GuidoConfigSchema, IdentitySchema, PartnerSchema, TemplateSchema, EditorSchema, UISchema, FeaturesSchema, BlocksSchema, CompilerSchema, CallbacksSchema, DynamicContentSchema, EmailHeaderSchema, CompilerRuleSchema, ReplaceRuleSchema, RegexRuleSchema, RemoveRuleSchema, CustomRuleSchema, DefaultBlockTypeSchema, CustomBlockTypeSchema, ExternalValidationHandler } from './schemas';
|
|
9
9
|
import type * as v from 'valibot';
|
|
10
10
|
/**
|
|
11
11
|
* Complete validated Guido configuration.
|
|
@@ -41,6 +41,10 @@ export type FeaturesConfig = v.InferOutput<typeof FeaturesSchema>;
|
|
|
41
41
|
export type BlocksConfig = v.InferOutput<typeof BlocksSchema>;
|
|
42
42
|
/** Compiler configuration (custom rules, ignore defaults) */
|
|
43
43
|
export type CompilerConfig = v.InferOutput<typeof CompilerSchema>;
|
|
44
|
+
/** Callbacks configuration (event handlers and hooks) */
|
|
45
|
+
export type CallbacksConfig = v.InferOutput<typeof CallbacksSchema>;
|
|
46
|
+
/** Re-export ExternalValidationHandler for convenience */
|
|
47
|
+
export type { ExternalValidationHandler };
|
|
44
48
|
/** Email header configuration (senderName, subject) */
|
|
45
49
|
export type EmailHeader = v.InferOutput<typeof EmailHeaderSchema>;
|
|
46
50
|
/** Dynamic content item */
|
|
@@ -85,6 +89,8 @@ export type FeaturesConfigInput = v.InferInput<typeof FeaturesSchema>;
|
|
|
85
89
|
export type BlocksConfigInput = v.InferInput<typeof BlocksSchema>;
|
|
86
90
|
/** Input type for compiler configuration */
|
|
87
91
|
export type CompilerConfigInput = v.InferInput<typeof CompilerSchema>;
|
|
92
|
+
/** Input type for callbacks configuration */
|
|
93
|
+
export type CallbacksConfigInput = v.InferInput<typeof CallbacksSchema>;
|
|
88
94
|
/** Default Stripo block types */
|
|
89
95
|
export type DefaultBlockType = v.InferOutput<typeof DefaultBlockTypeSchema>;
|
|
90
96
|
/** Custom Guido block types */
|
|
@@ -31,6 +31,7 @@ export declare const useConfig: () => {
|
|
|
31
31
|
} | undefined;
|
|
32
32
|
}[];
|
|
33
33
|
selectedUnsubscribePages: number[];
|
|
34
|
+
forceRecreate: boolean;
|
|
34
35
|
};
|
|
35
36
|
editor: {
|
|
36
37
|
locale: string;
|
|
@@ -90,6 +91,9 @@ export declare const useConfig: () => {
|
|
|
90
91
|
})[];
|
|
91
92
|
ignoreDefaultRules: boolean;
|
|
92
93
|
};
|
|
94
|
+
callbacks: {
|
|
95
|
+
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
96
|
+
};
|
|
93
97
|
} | null>;
|
|
94
98
|
initialized: import("vue").Ref<boolean>;
|
|
95
99
|
identity: import("vue").ComputedRef<{
|
|
@@ -116,6 +120,7 @@ export declare const useConfig: () => {
|
|
|
116
120
|
} | undefined;
|
|
117
121
|
}[];
|
|
118
122
|
selectedUnsubscribePages: number[];
|
|
123
|
+
forceRecreate: boolean;
|
|
119
124
|
} | null>;
|
|
120
125
|
editor: import("vue").ComputedRef<{
|
|
121
126
|
locale: string;
|
|
@@ -175,6 +180,9 @@ export declare const useConfig: () => {
|
|
|
175
180
|
})[];
|
|
176
181
|
ignoreDefaultRules: boolean;
|
|
177
182
|
} | null>;
|
|
183
|
+
callbacks: import("vue").ComputedRef<{
|
|
184
|
+
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
185
|
+
} | null>;
|
|
178
186
|
templateId: import("vue").ComputedRef<string>;
|
|
179
187
|
userId: import("vue").ComputedRef<string>;
|
|
180
188
|
variationId: import("vue").ComputedRef<string>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Control IDs used in the CouponBlock Extension
|
|
3
|
+
* These IDs are returned by the getId() method of each control
|
|
4
|
+
*/
|
|
5
|
+
export declare enum CouponControlId {
|
|
6
|
+
TEXT_ALIGN = "coupon-block-text-align-control",
|
|
7
|
+
TEXT_COLOR = "coupon-block-text-color-control",
|
|
8
|
+
TEXT_SIZE = "coupon-block-text-size-control",
|
|
9
|
+
TEXT_STYLE = "coupon-block-text-style-control",
|
|
10
|
+
TEXT_FONT_FAMILY = "coupon-block-text-font-family-control",
|
|
11
|
+
TEXT_BACKGROUND = "coupon-block-text-background-control",
|
|
12
|
+
TEXT_PADDINGS = "coupon-block-text-paddings-control",
|
|
13
|
+
TEXT_LINE_SPACING = "coupon-block-text-line-spacing-control"
|
|
14
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CouponBlock Control Instances
|
|
3
|
+
*
|
|
4
|
+
* This file generates all control instances for the CouponBlock
|
|
5
|
+
* using the reusable factory functions from controlFactories.ts
|
|
6
|
+
*
|
|
7
|
+
* Note: Factory-generated controls use runtime class generation which TypeScript
|
|
8
|
+
* cannot fully type-check. The controls are type-safe at runtime.
|
|
9
|
+
*
|
|
10
|
+
* These controls apply directly to the selected root element (no targetBlockId/containerSelector)
|
|
11
|
+
* to ensure styles are applied correctly regardless of nested element structure.
|
|
12
|
+
*/
|
|
13
|
+
export declare const TextAlignControl: {
|
|
14
|
+
new (): {
|
|
15
|
+
getId(): string;
|
|
16
|
+
getTargetNodes(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode[];
|
|
17
|
+
getParentControlId(): string;
|
|
18
|
+
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
19
|
+
getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
|
|
20
|
+
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
21
|
+
getAdditionalModifications(_root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
22
|
+
isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export declare const TextColorControl: {
|
|
26
|
+
new (): {
|
|
27
|
+
getId(): string;
|
|
28
|
+
getTargetNodes(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode[];
|
|
29
|
+
getParentControlId(): string;
|
|
30
|
+
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
31
|
+
getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
|
|
32
|
+
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
33
|
+
getAdditionalModifications(_root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
34
|
+
isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
export declare const TextSizeControl: {
|
|
38
|
+
new (): {
|
|
39
|
+
getId(): string;
|
|
40
|
+
getTargetNodes(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode[];
|
|
41
|
+
getParentControlId(): string;
|
|
42
|
+
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
43
|
+
getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
|
|
44
|
+
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
45
|
+
getAdditionalModifications(_root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
46
|
+
isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
export declare const TextStyleControl: {
|
|
50
|
+
new (): {
|
|
51
|
+
getId(): string;
|
|
52
|
+
getTargetNodes(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode[];
|
|
53
|
+
getParentControlId(): string;
|
|
54
|
+
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
55
|
+
getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
|
|
56
|
+
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
57
|
+
getAdditionalModifications(_root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
58
|
+
isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
export declare const TextFontFamilyControl: {
|
|
62
|
+
new (): {
|
|
63
|
+
getId(): string;
|
|
64
|
+
getTargetNodes(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode[];
|
|
65
|
+
getParentControlId(): string;
|
|
66
|
+
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
67
|
+
getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
|
|
68
|
+
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
69
|
+
getAdditionalModifications(_root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
70
|
+
isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
export declare const TextBackgroundControl: {
|
|
74
|
+
new (): {
|
|
75
|
+
getId(): string;
|
|
76
|
+
getTargetNodes(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode[];
|
|
77
|
+
getParentControlId(): string;
|
|
78
|
+
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
79
|
+
getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
|
|
80
|
+
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
81
|
+
getAdditionalModifications(_root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
82
|
+
isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
export declare const TextPaddingsControl: {
|
|
86
|
+
new (): {
|
|
87
|
+
getId(): string;
|
|
88
|
+
getTargetNodes(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode[];
|
|
89
|
+
getParentControlId(): string;
|
|
90
|
+
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
91
|
+
getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
|
|
92
|
+
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
93
|
+
getAdditionalModifications(_root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
94
|
+
isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
export declare const TextLineSpacingControl: {
|
|
98
|
+
new (): {
|
|
99
|
+
getId(): string;
|
|
100
|
+
getTargetNodes(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode[];
|
|
101
|
+
getParentControlId(): string;
|
|
102
|
+
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
103
|
+
getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
|
|
104
|
+
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
105
|
+
getAdditionalModifications(_root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
106
|
+
isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
|
|
107
|
+
};
|
|
108
|
+
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
declare const migrationTemplate = "\n <td
|
|
1
|
+
declare const migrationTemplate = "\n <td\n class=\"coupon-block coupon-block-v2 ins-coupon-code esd-block-text esd-extension-block\"\n esd-extension-block-id=\"coupon-block\"\n >\n <p class=\"ins-title\" contenteditable=\"false\">{@COUPON_CODE}</p>\n </td>\n";
|
|
2
2
|
export declare function getDefaultTemplate(): string;
|
|
3
3
|
export default migrationTemplate;
|