@useinsider/guido 1.0.3-beta.d1ff593 → 1.0.3-beta.d6f4719

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.
Files changed (68) hide show
  1. package/README.md +126 -0
  2. package/dist/components/organisms/header/LeftSlot.vue.js +1 -1
  3. package/dist/components/organisms/header/LeftSlot.vue2.js +16 -15
  4. package/dist/components/organisms/header/RightSlot.vue.js +5 -5
  5. package/dist/components/organisms/header/RightSlot.vue2.js +20 -19
  6. package/dist/composables/useBlocksConfig.js +58 -0
  7. package/dist/composables/usePartner.js +9 -5
  8. package/dist/composables/useStripo.js +39 -50
  9. package/dist/config/migrator/index.js +6 -7
  10. package/dist/enums/defaults.js +10 -5
  11. package/dist/extensions/Blocks/Recommendation/block.js +2 -5
  12. package/dist/extensions/Blocks/Recommendation/control.js +40 -68
  13. package/dist/extensions/Blocks/Recommendation/extension.js +6 -25
  14. package/dist/extensions/Blocks/Recommendation/settingsPanel.js +18 -58
  15. package/dist/extensions/Blocks/Recommendation/template.js +151 -265
  16. package/dist/extensions/Blocks/common-control.js +43 -125
  17. package/dist/guido.css +1 -1
  18. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +104 -289
  19. package/dist/src/@types/generic.d.ts +7 -0
  20. package/dist/src/components/wrappers/WpModal.vue.d.ts +1 -1
  21. package/dist/src/composables/useBlocksConfig.d.ts +11 -0
  22. package/dist/src/composables/usePartner.d.ts +1 -0
  23. package/dist/src/extensions/Blocks/Recommendation/block.d.ts +0 -1
  24. package/dist/src/extensions/Blocks/Recommendation/control.d.ts +0 -6
  25. package/dist/src/extensions/Blocks/Recommendation/template.d.ts +1 -38
  26. package/dist/src/extensions/Blocks/common-control.d.ts +0 -21
  27. package/dist/src/stores/config.d.ts +4 -0
  28. package/package.json +2 -2
  29. package/dist/config/migrator/recommendationMigrator.js +0 -203
  30. package/dist/extensions/Blocks/Recommendation/cardCompositionControl.js +0 -335
  31. package/dist/extensions/Blocks/Recommendation/controls/button/align.js +0 -12
  32. package/dist/extensions/Blocks/Recommendation/controls/button/border.js +0 -12
  33. package/dist/extensions/Blocks/Recommendation/controls/button/borderRadius.js +0 -12
  34. package/dist/extensions/Blocks/Recommendation/controls/button/color.js +0 -12
  35. package/dist/extensions/Blocks/Recommendation/controls/button/fitToContent.js +0 -12
  36. package/dist/extensions/Blocks/Recommendation/controls/button/fontFamily.js +0 -12
  37. package/dist/extensions/Blocks/Recommendation/controls/button/margins.js +0 -12
  38. package/dist/extensions/Blocks/Recommendation/controls/button/paddings.js +0 -12
  39. package/dist/extensions/Blocks/Recommendation/controls/button/text.js +0 -12
  40. package/dist/extensions/Blocks/Recommendation/controls/button/textSize.js +0 -12
  41. package/dist/extensions/Blocks/Recommendation/controls/button/textStyleAndFontColor.js +0 -12
  42. package/dist/extensions/Blocks/Recommendation/controls/name/align.js +0 -12
  43. package/dist/extensions/Blocks/Recommendation/controls/name/background.js +0 -12
  44. package/dist/extensions/Blocks/Recommendation/controls/name/color.js +0 -12
  45. package/dist/extensions/Blocks/Recommendation/controls/name/fontFamily.js +0 -12
  46. package/dist/extensions/Blocks/Recommendation/controls/name/paddings.js +0 -12
  47. package/dist/extensions/Blocks/Recommendation/controls/name/size.js +0 -12
  48. package/dist/extensions/Blocks/Recommendation/controls/name/style.js +0 -12
  49. package/dist/src/config/migrator/recommendationMigrator.d.ts +0 -1
  50. package/dist/src/extensions/Blocks/Recommendation/cardCompositionControl.d.ts +0 -65
  51. package/dist/src/extensions/Blocks/Recommendation/controls/button/align.d.ts +0 -5
  52. package/dist/src/extensions/Blocks/Recommendation/controls/button/border.d.ts +0 -5
  53. package/dist/src/extensions/Blocks/Recommendation/controls/button/borderRadius.d.ts +0 -5
  54. package/dist/src/extensions/Blocks/Recommendation/controls/button/color.d.ts +0 -5
  55. package/dist/src/extensions/Blocks/Recommendation/controls/button/fitToContent.d.ts +0 -5
  56. package/dist/src/extensions/Blocks/Recommendation/controls/button/fontFamily.d.ts +0 -5
  57. package/dist/src/extensions/Blocks/Recommendation/controls/button/margins.d.ts +0 -5
  58. package/dist/src/extensions/Blocks/Recommendation/controls/button/paddings.d.ts +0 -5
  59. package/dist/src/extensions/Blocks/Recommendation/controls/button/text.d.ts +0 -5
  60. package/dist/src/extensions/Blocks/Recommendation/controls/button/textSize.d.ts +0 -5
  61. package/dist/src/extensions/Blocks/Recommendation/controls/button/textStyleAndFontColor.d.ts +0 -5
  62. package/dist/src/extensions/Blocks/Recommendation/controls/name/align.d.ts +0 -5
  63. package/dist/src/extensions/Blocks/Recommendation/controls/name/background.d.ts +0 -5
  64. package/dist/src/extensions/Blocks/Recommendation/controls/name/color.d.ts +0 -5
  65. package/dist/src/extensions/Blocks/Recommendation/controls/name/fontFamily.d.ts +0 -5
  66. package/dist/src/extensions/Blocks/Recommendation/controls/name/paddings.d.ts +0 -5
  67. package/dist/src/extensions/Blocks/Recommendation/controls/name/size.d.ts +0 -5
  68. package/dist/src/extensions/Blocks/Recommendation/controls/name/style.d.ts +0 -5
@@ -1,17 +1,17 @@
1
- var Z = /* @__PURE__ */ ((t) => (t.BLOCK = "BLOCK", t.STRUCTURE = "STRUCTURE", t.CONTAINER = "CONTAINER", t))(Z || {}), S = class u {
1
+ var F = /* @__PURE__ */ ((t) => (t.BLOCK = "BLOCK", t.STRUCTURE = "STRUCTURE", t.CONTAINER = "CONTAINER", t))(F || {}), D = class o {
2
2
  /**
3
3
  * Validates that all required methods are properly implemented in the subclass.
4
4
  * @param requiredMethods - Array of method names that must be implemented
5
5
  * @param classRef - Reference to the class constructor for validation caching
6
6
  */
7
7
  constructor(e, r) {
8
- if (r !== u) {
9
- u.validatedClasses.has(r) || this.validateImplementation(e, r);
10
- const n = u.validationErrors.get(r);
11
- if (n && n.length > 0)
8
+ if (r !== o) {
9
+ o.validatedClasses.has(r) || this.validateImplementation(e, r);
10
+ const s = o.validationErrors.get(r);
11
+ if (s && s.length > 0)
12
12
  throw new Error(
13
13
  `${r.name} has validation errors:
14
- ${n.map((E) => ` - ${E}`).join(`
14
+ ${s.map((i) => ` - ${i}`).join(`
15
15
  `)}`
16
16
  );
17
17
  }
@@ -21,22 +21,22 @@ ${n.map((E) => ` - ${E}`).join(`
21
21
  * This validation runs only once per class type and results are cached.
22
22
  */
23
23
  validateImplementation(e, r) {
24
- var O;
25
- const n = [], E = r.name, I = Object.getPrototypeOf(this);
26
- e.forEach((l) => {
27
- if (typeof this[l] != "function") {
28
- n.push(`Method ${l}() is not defined`);
24
+ var l;
25
+ const s = [], i = r.name, d = Object.getPrototypeOf(this);
26
+ e.forEach((a) => {
27
+ if (typeof this[a] != "function") {
28
+ s.push(`Method ${a}() is not defined`);
29
29
  return;
30
30
  }
31
- I[l] === r.prototype[l] && n.push(`Method ${l}() must be implemented (currently using base class error-throwing implementation)`);
32
- }), u.validatedClasses.add(r), n.length > 0 ? (u.validationErrors.set(r, n), console.error(`[${E} Validation] ${E} validation failed:`, n)) : typeof process < "u" && ((O = process.env) == null ? void 0 : O.NODE_ENV) === "development" && console.log(`[${E} Validation] ✅ ${E} validated successfully`);
31
+ d[a] === r.prototype[a] && s.push(`Method ${a}() must be implemented (currently using base class error-throwing implementation)`);
32
+ }), o.validatedClasses.add(r), s.length > 0 ? (o.validationErrors.set(r, s), console.error(`[${i} Validation] ${i} validation failed:`, s)) : typeof process < "u" && ((l = process.env) == null ? void 0 : l.NODE_ENV) === "development" && console.log(`[${i} Validation] ✅ ${i} validated successfully`);
33
33
  }
34
34
  };
35
- S.validatedClasses = /* @__PURE__ */ new Set();
36
- S.validationErrors = /* @__PURE__ */ new Map();
37
- var i = S, x = class T extends i {
35
+ D.validatedClasses = /* @__PURE__ */ new Set();
36
+ D.validationErrors = /* @__PURE__ */ new Map();
37
+ var n = D, M = class h extends n {
38
38
  constructor() {
39
- super(T.REQUIRED_METHODS, T);
39
+ super(h.REQUIRED_METHODS, h);
40
40
  }
41
41
  /**
42
42
  * Determines if the block should be available for use in the editor.
@@ -185,10 +185,10 @@ var i = S, x = class T extends i {
185
185
  throw new Error("Method getDescription() must be implemented by the subclass");
186
186
  }
187
187
  };
188
- x.REQUIRED_METHODS = ["getId", "getTemplate", "getIcon", "getName", "getDescription"];
189
- var pt = x, j = class c extends i {
188
+ M.REQUIRED_METHODS = ["getId", "getTemplate", "getIcon", "getName", "getDescription"];
189
+ var It = M, k = class u extends n {
190
190
  constructor() {
191
- super(c.REQUIRED_METHODS, c);
191
+ super(u.REQUIRED_METHODS, u);
192
192
  }
193
193
  /**
194
194
  * @deprecated - use {@link getPreviewInnerHtml} instead
@@ -203,10 +203,10 @@ var pt = x, j = class c extends i {
203
203
  throw new Error("Method getPreviewInnerHtml() must be implemented by the subclass");
204
204
  }
205
205
  };
206
- j.REQUIRED_METHODS = ["getPreviewInnerHtml"];
207
- var q = class _ extends i {
206
+ k.REQUIRED_METHODS = ["getPreviewInnerHtml"];
207
+ var V = class c extends n {
208
208
  constructor() {
209
- super(_.REQUIRED_METHODS, _);
209
+ super(c.REQUIRED_METHODS, c);
210
210
  }
211
211
  getId() {
212
212
  throw new Error("Method getId() must be implemented by the subclass");
@@ -221,164 +221,42 @@ var q = class _ extends i {
221
221
  throw new Error("Method onClick() must be implemented by the subclass");
222
222
  }
223
223
  };
224
- q.REQUIRED_METHODS = ["getId", "getIcon", "getLabel", "onClick"];
225
- var J = {
226
- href: "href"
227
- }, Kt = {
228
- BLOCK_BUTTON: J
229
- }, v = "esd-block-button", U = "esd-block-text", tt = "esd-block-image", et = "esd-structure", rt = "esd-block-video", st = "esd-block-social", nt = "esd-block-banner", it = "esd-block-timer", at = "esd-block-menu", ot = "esd-block-html", Et = "esd-block-spacer", lt = "esd-container-frame", dt = "esd-stripe", ut = "esd-amp-form", B = ((t) => (t.BUTTON = `.${v}`, t.TEXT = `.${U}`, t.IMAGE = `.${tt}`, t.STRUCTURE = `.${et}`, t.VIDEO = `.${rt}`, t.SOCIAL = `.${st}`, t.BANNER = `.${nt}`, t.TIMER = `.${it}`, t.MENU = `.${at}`, t.HTML = `.${ot}`, t.SPACER = `.${Et}`, t.CONTAINER = `.${lt}`, t.STRIPE = `.${dt}`, t.FORM = `.${ut}`, t))(B || {}), Ot = /* @__PURE__ */ ((t) => (t.BLOCK_IMAGE = "BLOCK_IMAGE", t.BLOCK_TEXT = "BLOCK_TEXT", t.BLOCK_BUTTON = "BLOCK_BUTTON", t.BLOCK_SPACER = "BLOCK_SPACER", t.BLOCK_VIDEO = "BLOCK_VIDEO", t.BLOCK_SOCIAL = "BLOCK_SOCIAL", t.BLOCK_BANNER = "BLOCK_BANNER", t.BLOCK_TIMER = "BLOCK_TIMER", t.BLOCK_MENU = "BLOCK_MENU", t.BLOCK_MENU_ITEM = "BLOCK_MENU_ITEM", t.BLOCK_HTML = "BLOCK_HTML", t.BLOCK_AMP_CAROUSEL = "BLOCK_AMP_CAROUSEL", t.BLOCK_AMP_ACCORDION = "BLOCK_AMP_ACCORDION", t.BLOCK_AMP_FORM = "BLOCK_AMP_FORM", t.CONTAINER = "CONTAINER", t.FORM_CONTAINER = "FORM_CONTAINER", t.STRUCTURE = "STRUCTURE", t.STRIPE = "STRIPE", t.EMPTY_CONTAINER = "EMPTY_CONTAINER", t.CUSTOM_BLOCK_LINK = "CUSTOM_BLOCK_LINK", t.CUSTOM_BLOCK_IMAGE = "CUSTOM_BLOCK_IMAGE", t.CUSTOM_BLOCK_TEXT = "CUSTOM_BLOCK_TEXT", t))(Ot || {}), y = /* @__PURE__ */ ((t) => (t.ANCHOR_LINK_CONTAINER = "anchorLinkFormContainer", t.APPLY_CONDITION = "applyCondition", t.APPLY_CONDITION_SWITCHER = "applyConditionSwitcher", t.BACKGROUND_COLOR = "backgroundColor", t.BACKGROUND_IMAGE = "generalImageContainer", t.TEXT_COLOR = "textColor", t.TEXT_STYLE = "textStyle", t.TEXT_SIZE = "textSize", t.TEXT_LINE_SPACING = "textLineSpacing", t.TEXT_ALIGN = "textAlign", t.FIXED_HEIGHT_SWITCHER = "fixedHeightSwitcherForm", t.HIDDEN_NODE = "hiddenNode", t.SMART_BLOCK = "smartBlock", t.SYNCHRONIZED_MODULE = "synchronizedModuleForm", t.FONT_FAMILY = "generalFontFamilyForm", t.BLOCK_INTERNAL_INDENTS = "generalBlockInternalIndents", t.STRUCTURE_INTERNAL_INDENTS = "generalStructureInternalIndents", t))(y || {}), p = /* @__PURE__ */ ((t) => (t.ADJUST_TO_WIDTH = "adjustToWidth", t.ALIGNMENT = "buttonAlignment", t.BORDER = "buttonBorder", t.BORDER_RADIUS = "buttonBorderRadius", t.COLOR = "buttonColor", t.BUTTON_BLOCK_BACKGROUND_COLOR = "buttonBlockBackgroundColor", t.EXTERNAL_INDENTS = "buttonExternalIndents", t.FIXED_HEIGHT = "buttonFixedHeightForm", t.FONT_COLOR = "buttonFontColor", t.FONT_FAMILY = "buttonFontFamily", t.FONT_SIZE = "buttonFontSize", t.ICON = "buttonIconContainer", t.ICON_ALIGN = "buttonIconAlign", t.ICON_INDENT = "buttonIconIndent", t.ICON_WIDTH = "buttonIconWidth", t.IMAGE = "buttonImageForm", t.INTERNAL_INDENTS = "buttonInternalIndents", t.LINK = "buttonLink", t.MIME_TYPE = "buttonMimeTypeForm", t.SWITCHER_HOVERED_STYLES = "buttonSwitcherHoveredStylesForm", t.TEXT = "buttonText", t.TEXT_STYLE_AND_COLOR = "buttonTextStyleAndColorForm", t.HOVERED_BORDER_COLOR = "hoveredStyleBorderButtonForm", t.HOVERED_COLOR = "hoveredButtonColorForm", t.HOVERED_TEXT_COLOR = "hoveredButtonTextColorForm", t))(p || {}), K = /* @__PURE__ */ ((t) => (t.HIDDEN_NODE = "hiddenNodeText", t.PARAGRAPH_STYLE = "paragraphStyleForm", t.ALIGN = "textAlignmentForm", t.ANCHOR_CONTAINER = "textAnchorForm", t.FONT_BACKGROUND_COLOR = "textBlockFontBackgroundColor", t.TEXT_BLOCK_BACKGROUND_COLOR = "textBlockBackgroundColor", t.FONT_COLOR = "textBlockFontColor", t.TEXT_BLOCK_FONT_FAMILY = "textBlockFontFamily", t.FONT_FAMILY = "textFontFamily", t.FONT_SIZE = "textBlockFontSize", t.DIRECTION = "textBlockDirectionForm", t.INSERT_FORM = "textBlockInsertForm", t.LINK_DATA = "textBlockLinkDataForm", t.FORMAT = "textBlockTextFormatForm", t.FIXED_HEIGHT = "textFixedHeightForm", t.INTERNAL_INDENTS = "textInternalIndents", t.LINE_HEIGHT = "textLineHeightForm", t.LINKS_COLOR = "textLinksFontColorForm", t.MIME_TYPE = "textMimeTypeForm", t.NO_LINE_WRAPS = "textNoLineWrapsForm", t))(K || {}), It = /* @__PURE__ */ ((t) => (t.BACKGROUND_COLOR = "containerBackgroundColorForm", t.BORDER_FORM = "containerBorderForm", t.BORDER_RADIUS = "containerBorderRadiusForm", t.EXTERNAL_INDENTS = "containerExternalIndentsForm", t.IMAGE_CONTAINER = "containerImageContainerForm", t.MIME_TYPE = "containerMimeTypeForm", t.DISPLAY_CONDITIONS = "displayConditions", t.HIDDEN_NODE = "containerHiddenNodeForm", t))(It || {}), s = {
230
- BLOCK_BUTTON: p,
231
- BLOCK_TEXT: K,
232
- GENERAL: y
233
- }, Tt = /* @__PURE__ */ ((t) => (t.SETTINGS = "settings", t.STYLES = "styles", t.DATA = "data", t))(Tt || {}), a = {
224
+ V.REQUIRED_METHODS = ["getId", "getIcon", "getLabel", "onClick"];
225
+ var Q = "esd-block-button", $ = "esd-block-text", X = "esd-block-image", G = "esd-structure", f = "esd-block-video", Y = "esd-block-social", W = "esd-block-banner", j = "esd-block-timer", z = "esd-block-menu", q = "esd-block-html", Z = "esd-block-spacer", J = "esd-container-frame", tt = "esd-stripe", et = "esd-amp-form", rt = ((t) => (t.BUTTON = `.${Q}`, t.TEXT = `.${$}`, t.IMAGE = `.${X}`, t.STRUCTURE = `.${G}`, t.VIDEO = `.${f}`, t.SOCIAL = `.${Y}`, t.BANNER = `.${W}`, t.TIMER = `.${j}`, t.MENU = `.${z}`, t.HTML = `.${q}`, t.SPACER = `.${Z}`, t.CONTAINER = `.${J}`, t.STRIPE = `.${tt}`, t.FORM = `.${et}`, t))(rt || {}), st = /* @__PURE__ */ ((t) => (t.BLOCK_IMAGE = "BLOCK_IMAGE", t.BLOCK_TEXT = "BLOCK_TEXT", t.BLOCK_BUTTON = "BLOCK_BUTTON", t.BLOCK_SPACER = "BLOCK_SPACER", t.BLOCK_VIDEO = "BLOCK_VIDEO", t.BLOCK_SOCIAL = "BLOCK_SOCIAL", t.BLOCK_BANNER = "BLOCK_BANNER", t.BLOCK_TIMER = "BLOCK_TIMER", t.BLOCK_MENU = "BLOCK_MENU", t.BLOCK_MENU_ITEM = "BLOCK_MENU_ITEM", t.BLOCK_HTML = "BLOCK_HTML", t.BLOCK_AMP_CAROUSEL = "BLOCK_AMP_CAROUSEL", t.BLOCK_AMP_ACCORDION = "BLOCK_AMP_ACCORDION", t.BLOCK_AMP_FORM = "BLOCK_AMP_FORM", t.CONTAINER = "CONTAINER", t.FORM_CONTAINER = "FORM_CONTAINER", t.STRUCTURE = "STRUCTURE", t.STRIPE = "STRIPE", t.EMPTY_CONTAINER = "EMPTY_CONTAINER", t.CUSTOM_BLOCK_LINK = "CUSTOM_BLOCK_LINK", t.CUSTOM_BLOCK_IMAGE = "CUSTOM_BLOCK_IMAGE", t.CUSTOM_BLOCK_TEXT = "CUSTOM_BLOCK_TEXT", t))(st || {}), nt = /* @__PURE__ */ ((t) => (t.HIDDEN_NODE = "hiddenNodeText", t.PARAGRAPH_STYLE = "paragraphStyleForm", t.ALIGN = "textAlignmentForm", t.ANCHOR_CONTAINER = "textAnchorForm", t.FONT_BACKGROUND_COLOR = "textBlockFontBackgroundColor", t.TEXT_BLOCK_BACKGROUND_COLOR = "textBlockBackgroundColor", t.FONT_COLOR = "textBlockFontColor", t.TEXT_BLOCK_FONT_FAMILY = "textBlockFontFamily", t.FONT_FAMILY = "textFontFamily", t.FONT_SIZE = "textBlockFontSize", t.DIRECTION = "textBlockDirectionForm", t.INSERT_FORM = "textBlockInsertForm", t.LINK_DATA = "textBlockLinkDataForm", t.FORMAT = "textBlockTextFormatForm", t.FIXED_HEIGHT_CONTAINER = "textFixedHeightContainerForm", t.INTERNAL_INDENTS = "textInternalIndents", t.LINE_HEIGHT = "textLineHeightForm", t.LINKS_COLOR = "textLinksFontColorForm", t.MIME_TYPE = "textMimeTypeForm", t.NO_LINE_WRAPS = "textNoLineWrapsForm", t))(nt || {}), it = /* @__PURE__ */ ((t) => (t.BACKGROUND_COLOR = "containerBackgroundColorForm", t.BORDER_FORM = "containerBorderForm", t.BORDER_RADIUS = "containerBorderRadiusForm", t.EXTERNAL_INDENTS = "containerExternalIndentsForm", t.IMAGE_CONTAINER = "containerImageContainerForm", t.MIME_TYPE = "containerMimeTypeForm", t.DISPLAY_CONDITIONS = "displayConditions", t.HIDDEN_NODE = "containerHiddenNodeForm", t))(it || {}), at = /* @__PURE__ */ ((t) => (t.SETTINGS = "settings", t.STYLES = "styles", t.DATA = "data", t))(at || {}), E = {
234
226
  name: "name",
235
227
  disabled: "disabled"
236
- }, ct = {
237
- ...a,
228
+ }, ot = {
229
+ ...E,
238
230
  caption: "caption",
239
231
  icon: "icon"
240
- }, _t = {
241
- ...a,
242
- caption: "caption"
243
- }, ht = {
244
- ...a,
232
+ }, Et = {
233
+ ...E,
245
234
  minValue: "min-value",
246
235
  maxValue: "max-value",
247
236
  step: "step"
248
- }, Ct = {
249
- ...a,
237
+ }, lt = {
238
+ ...E,
250
239
  text: "text"
251
- }, Rt = {
252
- ...a
253
- }, F = {
254
- ...a,
255
- searchable: "searchable",
256
- multiSelect: "multi-select",
240
+ }, dt = {
241
+ ...E,
257
242
  placeholder: "placeholder",
258
243
  items: "items"
259
- }, Lt = {
260
- ...F
261
- }, gt = {
262
- text: "text",
263
- value: "value"
264
- }, mt = {
244
+ }, ht = {
265
245
  text: "text",
266
246
  value: "value"
267
- }, bt = {
268
- ...a
269
- }, At = {
270
- controlId: "control-id"
271
- }, Nt = {
272
- ...a,
273
- icon: "icon",
274
- position: "position"
275
- }, Dt = {
276
- ...a
277
- }, Ft = {
278
- BUTTON: ct,
279
- CHECKBOX: _t,
280
- COLOR: a,
281
- COUNTER: ht,
282
- LABEL: Ct,
283
- RADIO_BUTTONS: Rt,
284
- SELECTPICKER: F,
285
- FONT_FAMILY_SELECT: Lt,
286
- SWITCHER: a,
287
- TEXT: bt,
288
- SELECT_ITEM: gt,
289
- RADIO_ITEM: mt,
290
- NESTED_CONTROL: At,
291
- ORDERABLE: Nt,
292
- ORDERABLE_ITEM: Dt
293
- }, St = /* @__PURE__ */ ((t) => (t.BUTTON = "UE-BUTTON", t.CHECKBOX = "UE-CHECKBOX", t.CHECK_BUTTONS = "UE-CHECK-BUTTONS", t.COLOR = "UE-COLOR", t.COUNTER = "UE-COUNTER", t.DATEPICKER = "UE-DATEPICKER", t.LABEL = "UE-LABEL", t.MESSAGE = "UE-MESSAGE", t.RADIO_BUTTONS = "UE-RADIO-BUTTONS", t.SELECTPICKER = "UE-SELECT", t.SWITCHER = "UE-SWITCHER", t.TEXT = "UE-TEXT", t.TEXTAREA = "UE-TEXTAREA", t.CHECK_ITEM = "UE-CHECK-ITEM", t.RADIO_ITEM = "UE-RADIO-ITEM", t.SELECT_ITEM = "UE-SELECT-ITEM", t.ICON = "UE-ICON", t.MERGETAGS = "UE-MERGETAGS", t.FONT_FAMILY_SELECT = "UE-FONT-FAMILY-SELECT", t.NESTED_CONTROL = "UE-NESTED-CONTROL", t.EXPANDABLE = "UE-EXPANDABLE", t.EXPANDABLE_HEADER = "UE-EXPANDABLE_HEADER", t.EXPANDABLE_CONTENT = "UE-EXPANDABLE_CONTENT", t.ORDERABLE = "UE-ORDERABLE", t.ORDERABLE_ITEM = "UE-ORDERABLE-ITEM", t.ORDERABLE_ICON = "UE-ORDERABLE-ICON", t))(St || {}), w = class {
294
- /**
295
- * @description returns map of nodes parent control operates on
296
- */
297
- getTargetNodes(t) {
298
- return [t];
299
- }
300
- /**
301
- * @description returns map of labels used by parent control UI
302
- */
303
- getLabels() {
304
- }
305
- /**
306
- * @description returns custom description for parent modifications
307
- */
308
- getModificationDescription() {
309
- }
310
- /**
311
- * @description returns custom modifications to be included in the parent control patch
312
- */
313
- getAdditionalModifications(t) {
314
- }
315
- /**
316
- * Determines whether the specified HTML node is visible.
317
- *
318
- * @param _node - The HTML node to evaluate for visibility, provided as an immutable object.
319
- * @return A boolean value indicating whether the node is visible. Returns `true` if the node is visible, otherwise `false`.
320
- */
321
- isVisible(t) {
322
- return !0;
323
- }
324
- }, o = class extends w {
325
- getTargetNodes(t) {
326
- const e = t.querySelectorAll(B.BUTTON), r = t.asElement().hasClass(v) ? [t] : [];
327
- return e.length ? e : r;
328
- }
329
- }, wt = class extends o {
330
- getParentControlId() {
331
- return s.BLOCK_BUTTON.BORDER_RADIUS;
332
- }
333
- getLabels() {
334
- }
335
- }, Pt = class extends o {
336
- getParentControlId() {
337
- return s.BLOCK_BUTTON.ALIGNMENT;
338
- }
339
- }, Ht = class extends o {
340
- getParentControlId() {
341
- return s.BLOCK_BUTTON.BORDER;
342
- }
343
- getLabels() {
344
- }
345
- }, Xt = class extends o {
346
- getParentControlId() {
347
- return s.BLOCK_BUTTON.COLOR;
348
- }
349
- }, kt = class extends o {
350
- getParentControlId() {
351
- return s.BLOCK_BUTTON.ADJUST_TO_WIDTH;
352
- }
353
- }, Vt = class extends o {
354
- getParentControlId() {
355
- return s.BLOCK_BUTTON.FONT_FAMILY;
356
- }
357
- }, Qt = class extends o {
358
- getParentControlId() {
359
- return s.BLOCK_BUTTON.EXTERNAL_INDENTS;
360
- }
361
- }, ft = class extends o {
362
- getParentControlId() {
363
- return s.BLOCK_BUTTON.INTERNAL_INDENTS;
364
- }
365
- }, Yt = class extends o {
366
- getParentControlId() {
367
- return s.BLOCK_BUTTON.TEXT;
368
- }
369
- }, Gt = class extends o {
370
- getParentControlId() {
371
- return s.BLOCK_BUTTON.FONT_SIZE;
372
- }
373
- }, $t = class extends o {
374
- getParentControlId() {
375
- return s.BLOCK_BUTTON.TEXT_STYLE_AND_COLOR;
376
- }
377
- getLabels() {
378
- }
379
- }, P = class h extends i {
247
+ }, ut = {
248
+ ...E
249
+ }, _t = {
250
+ BUTTON: ot,
251
+ COUNTER: Et,
252
+ LABEL: lt,
253
+ SELECTPICKER: dt,
254
+ SWITCHER: E,
255
+ TEXT: ut,
256
+ SELECT_ITEM: ht
257
+ }, ct = /* @__PURE__ */ ((t) => (t.BUTTON = "UE-BUTTON", t.CHECKBOX = "UE-CHECKBOX", t.CHECK_BUTTONS = "UE-CHECK-BUTTONS", t.COLOR = "UE-COLOR", t.COUNTER = "UE-COUNTER", t.DATEPICKER = "UE-DATEPICKER", t.LABEL = "UE-LABEL", t.MESSAGE = "UE-MESSAGE", t.RADIO_BUTTONS = "UE-RADIO-BUTTONS", t.SELECTPICKER = "UE-SELECT", t.SWITCHER = "UE-SWITCHER", t.TEXT = "UE-TEXT", t.TEXTAREA = "UE-TEXTAREA", t.CHECK_ITEM = "UE-CHECK-ITEM", t.RADIO_ITEM = "UE-RADIO-ITEM", t.SELECT_ITEM = "UE-SELECT-ITEM", t.ICON = "UE-ICON", t.MERGETAGS = "UE-MERGETAGS", t.FONT_FAMILY_SELECT = "UE-FONT-FAMILY-SELECT", t.NESTED_CONTROL = "UE-NESTED-CONTROL", t.EXPANDABLE = "UE-EXPANDABLE", t.EXPANDABLE_HEADER = "UE-EXPANDABLE_HEADER", t.EXPANDABLE_CONTENT = "UE-EXPANDABLE_CONTENT", t))(ct || {}), S = class m extends n {
380
258
  constructor() {
381
- super(h.REQUIRED_METHODS, h);
259
+ super(m.REQUIRED_METHODS, m);
382
260
  }
383
261
  /**
384
262
  * @description Allows to determine if control should be visible or hidden in control panel.
@@ -423,25 +301,18 @@ var J = {
423
301
  */
424
302
  onTemplateNodeUpdated(e) {
425
303
  }
426
- /**
427
- * Lifecycle hook called when any part of the document template has changed.
428
- * This can be frequent; use cautiously for performance-sensitive operations.
429
- * @param _node - The immutable HTML node representing current node instance
430
- */
431
- onDocumentChanged(e) {
432
- }
433
304
  };
434
- P.REQUIRED_METHODS = ["getId", "getTemplate"];
435
- var Wt = P, H = class C extends i {
305
+ S.REQUIRED_METHODS = ["getId", "getTemplate"];
306
+ var Lt = S, N = class O extends n {
436
307
  constructor() {
437
- super(C.REQUIRED_METHODS, C);
308
+ super(O.REQUIRED_METHODS, O);
438
309
  }
439
310
  registerBlockControls(e) {
440
311
  throw new Error("Method registerBlockControls() must be implemented by the subclass");
441
312
  }
442
313
  };
443
- H.REQUIRED_METHODS = ["registerBlockControls"];
444
- var zt = H, Zt = class {
314
+ N.REQUIRED_METHODS = ["registerBlockControls"];
315
+ var At = N, Dt = class {
445
316
  constructor(t, e) {
446
317
  this.tabId = t, this.controlsIds = e;
447
318
  }
@@ -464,42 +335,9 @@ var zt = H, Zt = class {
464
335
  const e = this.controlsIds.indexOf(t);
465
336
  e !== -1 && this.controlsIds.splice(e, 1);
466
337
  }
467
- }, d = class extends w {
468
- getTargetNodes(t) {
469
- const e = t.querySelectorAll(B.TEXT), r = t.asElement().hasClass(U) ? [t] : [];
470
- return e.length ? e : r;
471
- }
472
- }, jt = class extends d {
473
- getParentControlId() {
474
- return s.GENERAL.TEXT_ALIGN;
475
- }
476
- }, qt = class extends d {
477
- getParentControlId() {
478
- return s.BLOCK_TEXT.TEXT_BLOCK_BACKGROUND_COLOR;
479
- }
480
- }, Jt = class extends d {
481
- getParentControlId() {
482
- return s.GENERAL.TEXT_COLOR;
483
- }
484
- }, te = class extends d {
485
- getParentControlId() {
486
- return s.BLOCK_TEXT.FONT_FAMILY;
487
- }
488
- }, ee = class extends d {
489
- getParentControlId() {
490
- return s.BLOCK_TEXT.INTERNAL_INDENTS;
491
- }
492
- }, re = class extends d {
493
- getParentControlId() {
494
- return s.GENERAL.TEXT_SIZE;
495
- }
496
- }, se = class extends d {
497
- getParentControlId() {
498
- return s.GENERAL.TEXT_STYLE;
499
- }
500
- }, Bt = class {
501
- constructor(t, e, r = [], n, E = [], I, O = [], l = [], M, Q, f, Y, G, $, W, z) {
502
- this.uiElements = [], this.controls = [], this.contextActions = [], this.blocks = [], this.i18n = t, this.styles = e, this.previewStyles = f, this.uiElements = r, this.uiElementTagRegistry = n, this.controls = E, this.settingsPanelRegistry = I, this.contextActions = O, this.blocks = l, this.externalSmartElementsLibrary = M, this.externalImageLibrary = Q, this.externalAiAssistant = Y, this.externalDisplayConditionsLibrary = G, this.externalVideoLibrary = $, this.blocksPanel = W, this.iconsRegistry = z, this.id = Math.random().toString(36).substring(2);
338
+ }, mt = class {
339
+ constructor(t, e, r = [], s, i = [], d, l = [], a = [], T, U, p, w, B, K, H, P) {
340
+ this.uiElements = [], this.controls = [], this.contextActions = [], this.blocks = [], this.i18n = t, this.styles = e, this.previewStyles = p, this.uiElements = r, this.uiElementTagRegistry = s, this.controls = i, this.settingsPanelRegistry = d, this.contextActions = l, this.blocks = a, this.externalSmartElementsLibrary = T, this.externalImageLibrary = U, this.externalAiAssistant = w, this.externalDisplayConditionsLibrary = B, this.externalVideoLibrary = K, this.blocksPanel = H, this.iconsRegistry = P, this.id = Math.random().toString(36).substring(2);
503
341
  }
504
342
  getI18n() {
505
343
  return this.i18n;
@@ -552,7 +390,7 @@ var zt = H, Zt = class {
552
390
  getIconsRegistry() {
553
391
  return this.iconsRegistry;
554
392
  }
555
- }, ne = class {
393
+ }, Tt = class {
556
394
  constructor() {
557
395
  this.styles = [], this.uiElements = [], this.controls = [], this.contextActions = [], this.blocks = [];
558
396
  }
@@ -614,7 +452,7 @@ var zt = H, Zt = class {
614
452
  return this.iconsRegistry = t, this;
615
453
  }
616
454
  build() {
617
- return new Bt(
455
+ return new mt(
618
456
  this.i18n,
619
457
  (this.styles || []).map((t) => t.trim()).join(`
620
458
  `),
@@ -634,18 +472,18 @@ var zt = H, Zt = class {
634
472
  this.iconsRegistry
635
473
  );
636
474
  }
637
- }, Mt = class R extends i {
475
+ }, Ot = class b extends n {
638
476
  constructor() {
639
- super(R.REQUIRED_METHODS, R);
477
+ super(b.REQUIRED_METHODS, b);
640
478
  }
641
- openAiAssistant({ value: e, onDataSelectCallback: r, onCancelCallback: n, type: E }) {
479
+ openAiAssistant({ value: e, onDataSelectCallback: r, onCancelCallback: s, type: i }) {
642
480
  throw new Error("Method openAiAssistant() must be implemented by the subclass");
643
481
  }
644
482
  };
645
- Mt.REQUIRED_METHODS = ["openAiAssistant"];
646
- var xt = class L extends i {
483
+ Ot.REQUIRED_METHODS = ["openAiAssistant"];
484
+ var bt = class R extends n {
647
485
  constructor() {
648
- super(L.REQUIRED_METHODS, L);
486
+ super(R.REQUIRED_METHODS, R);
649
487
  }
650
488
  /**
651
489
  * Retrieves the name of the category.
@@ -662,7 +500,7 @@ var xt = class L extends i {
662
500
  * @param {ExternalDisplayConditionSelectedCB} successCallback - Callback executed with the updated or newly created condition upon success.
663
501
  * @param {() => void} cancelCallback - Callback executed when the dialog is closed without making changes.
664
502
  */
665
- openExternalDisplayConditionsDialog(e, r, n) {
503
+ openExternalDisplayConditionsDialog(e, r, s) {
666
504
  throw new Error("Method openExternalDisplayConditionsDialog() must be implemented by the subclass");
667
505
  }
668
506
  /**
@@ -683,44 +521,44 @@ var xt = class L extends i {
683
521
  throw new Error("Method getContextActionIndex() must be implemented by the subclass");
684
522
  }
685
523
  };
686
- xt.REQUIRED_METHODS = ["getCategoryName", "openExternalDisplayConditionsDialog"];
687
- var vt = class g extends i {
524
+ bt.REQUIRED_METHODS = ["getCategoryName", "openExternalDisplayConditionsDialog"];
525
+ var Rt = class C extends n {
688
526
  constructor() {
689
- super(g.REQUIRED_METHODS, g);
527
+ super(C.REQUIRED_METHODS, C);
690
528
  }
691
- openImageLibrary(e, r, n) {
529
+ openImageLibrary(e, r, s) {
692
530
  throw new Error("Method openImageLibrary() must be implemented by the subclass");
693
531
  }
694
532
  };
695
- vt.REQUIRED_METHODS = ["openImageLibrary"];
696
- var Ut = class m extends i {
533
+ Rt.REQUIRED_METHODS = ["openImageLibrary"];
534
+ var Ct = class g extends n {
697
535
  constructor() {
698
- super(m.REQUIRED_METHODS, m);
536
+ super(g.REQUIRED_METHODS, g);
699
537
  }
700
538
  openSmartElementsLibrary(e, r) {
701
539
  throw new Error("Method openSmartElementsLibrary() must be implemented by the subclass");
702
540
  }
703
541
  };
704
- Ut.REQUIRED_METHODS = ["openSmartElementsLibrary"];
705
- var yt = class b extends i {
542
+ Ct.REQUIRED_METHODS = ["openSmartElementsLibrary"];
543
+ var gt = class I extends n {
706
544
  constructor() {
707
- super(b.REQUIRED_METHODS, b);
545
+ super(I.REQUIRED_METHODS, I);
708
546
  }
709
- openExternalVideosLibraryDialog(e, r, n) {
547
+ openExternalVideosLibraryDialog(e, r, s) {
710
548
  throw new Error("Method openExternalVideosLibraryDialog() must be implemented by the subclass");
711
549
  }
712
550
  };
713
- yt.REQUIRED_METHODS = ["openExternalVideosLibraryDialog"];
714
- var X = class A extends i {
551
+ gt.REQUIRED_METHODS = ["openExternalVideosLibraryDialog"];
552
+ var y = class _ extends n {
715
553
  constructor() {
716
- super(A.REQUIRED_METHODS, A);
554
+ super(_.REQUIRED_METHODS, _);
717
555
  }
718
556
  registerIconsSvg(e) {
719
557
  throw new Error("Method registerIconsSvg() must be implemented by the subclass");
720
558
  }
721
559
  };
722
- X.REQUIRED_METHODS = ["registerIconsSvg"];
723
- var ie = X, ae = class {
560
+ y.REQUIRED_METHODS = ["registerIconsSvg"];
561
+ var Mt = y, St = class {
724
562
  constructor(t) {
725
563
  this.key = t;
726
564
  }
@@ -733,9 +571,9 @@ var ie = X, ae = class {
733
571
  params: this.params
734
572
  };
735
573
  }
736
- }, k = class N extends i {
574
+ }, v = class L extends n {
737
575
  constructor() {
738
- super(N.REQUIRED_METHODS, N);
576
+ super(L.REQUIRED_METHODS, L);
739
577
  }
740
578
  /**
741
579
  * Called when the UI element should render its content into the provided container.
@@ -788,57 +626,34 @@ var ie = X, ae = class {
788
626
  throw new Error("Method getTemplate() must be implemented by the subclass");
789
627
  }
790
628
  };
791
- k.REQUIRED_METHODS = ["onRender", "getId", "getTemplate"];
792
- var oe = k, V = class D extends i {
629
+ v.REQUIRED_METHODS = ["onRender", "getId", "getTemplate"];
630
+ var Nt = v, x = class A extends n {
793
631
  constructor() {
794
- super(D.REQUIRED_METHODS, D);
632
+ super(A.REQUIRED_METHODS, A);
795
633
  }
796
634
  registerUiElements(e) {
797
635
  throw new Error("Method registerUiElements() must be implemented by the subclass");
798
636
  }
799
637
  };
800
- V.REQUIRED_METHODS = ["registerUiElements"];
801
- var Ee = V;
638
+ x.REQUIRED_METHODS = ["registerUiElements"];
639
+ var yt = x;
802
640
  export {
803
- pt as Block,
804
- Kt as BlockAttr,
805
- Z as BlockCompositionType,
806
- B as BlockSelector,
807
- Ot as BlockType,
808
- w as BuiltInControl,
809
- s as BuiltInControlTypes,
810
- Pt as ButtonAlignBuiltInControl,
811
- Ht as ButtonBorderBuiltInControl,
812
- wt as ButtonBorderRadiusBuiltInControl,
813
- Xt as ButtonColorBuiltInControl,
814
- p as ButtonControls,
815
- kt as ButtonFitToContainerBuiltInControl,
816
- Vt as ButtonFontFamilyBuiltInControl,
817
- Qt as ButtonMarginsBuiltInControl,
818
- ft as ButtonPaddingsBuiltInControl,
819
- Yt as ButtonTextBuiltInControl,
820
- Gt as ButtonTextSizeBuiltInControl,
821
- $t as ButtonTextStyleAndFontColorBuiltInControl,
822
- It as ContainerControls,
823
- Wt as Control,
824
- Bt as Extension,
825
- ne as ExtensionBuilder,
826
- y as GeneralControls,
827
- ie as IconsRegistry,
828
- ae as ModificationDescription,
829
- zt as SettingsPanelRegistry,
830
- Zt as SettingsPanelTab,
831
- Tt as SettingsTab,
832
- jt as TextAlignBuiltInControl,
833
- qt as TextBlockBackgroundBuiltInControl,
834
- Jt as TextColorBuiltInControl,
835
- K as TextControls,
836
- te as TextFontFamilyBuiltInControl,
837
- ee as TextPaddingsBuiltInControl,
838
- re as TextSizeBuiltInControl,
839
- se as TextStyleBuiltInControl,
840
- Ft as UEAttr,
841
- oe as UIElement,
842
- Ee as UIElementTagRegistry,
843
- St as UIElementType
641
+ It as Block,
642
+ F as BlockCompositionType,
643
+ rt as BlockSelector,
644
+ st as BlockType,
645
+ it as ContainerControls,
646
+ Lt as Control,
647
+ mt as Extension,
648
+ Tt as ExtensionBuilder,
649
+ Mt as IconsRegistry,
650
+ St as ModificationDescription,
651
+ At as SettingsPanelRegistry,
652
+ Dt as SettingsPanelTab,
653
+ at as SettingsTab,
654
+ nt as TextControls,
655
+ _t as UEAttr,
656
+ Nt as UIElement,
657
+ yt as UIElementTagRegistry,
658
+ ct as UIElementType
844
659
  };
@@ -12,6 +12,12 @@ type Partner = {
12
12
  productType: number;
13
13
  messageType: number;
14
14
  };
15
+ export type GuidoBlockType = 'amp-accordion' | 'amp-carousel' | 'amp-form-controls' | 'banner-block' | 'button-block' | 'html-block' | 'image-block' | 'menu-block' | 'social-block' | 'spacer-block' | 'text-block' | 'timer-block' | 'video-block';
16
+ export type GuidoCustomBlockType = 'dynamic-content' | 'checkbox-block' | 'radio-button-block' | 'recommendation-block' | 'unsubscribe-block' | 'coupon-block' | 'items-block';
17
+ type BlocksConfig = {
18
+ excludeDefaults?: GuidoBlockType[];
19
+ includeCustoms?: GuidoCustomBlockType[];
20
+ };
15
21
  export type GuidoConfig = {
16
22
  translationsPath: string;
17
23
  htmlCompilerRules?: CompilerRule[];
@@ -21,6 +27,7 @@ export type GuidoConfig = {
21
27
  partner?: Partner;
22
28
  extensions?: Extensions;
23
29
  features?: Features;
30
+ blocks?: BlocksConfig;
24
31
  };
25
32
  export type TemplateConfig = {
26
33
  preselectedDynamicContentList?: DynamicContent[];
@@ -32,8 +32,8 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<
32
32
  closeOnOutsideClick: boolean;
33
33
  footerStatus: boolean;
34
34
  }>>>, {
35
- description: string;
36
35
  size: "small" | "medium" | "large";
36
+ description: string;
37
37
  closeOnOutsideClick: boolean;
38
38
  footerButtonOptions: FooterButtonGroup;
39
39
  closeButtonStatus: boolean;
@@ -0,0 +1,11 @@
1
+ import type { Extension } from '@stripoinc/ui-editor-extensions';
2
+ /**
3
+ * Composable for managing Guido blocks configuration
4
+ * Converts GuidoConfig blocks settings to Stripo-compatible format
5
+ */
6
+ export declare const useBlocksConfig: () => {
7
+ getStripoBlocksConfig: () => {
8
+ baseBlocks: Record<string, boolean>;
9
+ extensions: Extension[];
10
+ };
11
+ };
@@ -2,4 +2,5 @@ export declare const usePartner: () => {
2
2
  getPartnerName: () => string;
3
3
  getProductType: () => number;
4
4
  isTestPartner: () => boolean;
5
+ isUnsubscribePages: () => boolean;
5
6
  };
@@ -1,7 +1,6 @@
1
1
  import { Block, BlockCompositionType } from '@stripoinc/ui-editor-extensions';
2
2
  export declare const BLOCK_ID = "recommendation-block";
3
3
  export declare class RecommendationBlock extends Block {
4
- constructor();
5
4
  getId(): string;
6
5
  getIcon(): string;
7
6
  getBlockCompositionType(): BlockCompositionType;
@@ -21,12 +21,6 @@ export declare class RecommendationBlockControl extends CommonControl {
21
21
  _onFilterChange(value: boolean): void;
22
22
  _onFilterSelectClick(): void;
23
23
  _onDataChange(item: string, value: string | number | string[]): void;
24
- /**
25
- * Get the current card composition from block data attribute or use default
26
- */
27
- _getCardComposition(): string[];
28
- _regenerateProductRows(): void;
29
- _debouncedRegenerateProductRows: import("@vueuse/shared").PromisifyFn<() => void>;
30
24
  _onCurrencyConfigChange(item: string, value: string | number): void;
31
25
  _onCurrencyChange(value: string): void;
32
26
  _setProductIdsVisibility(): void;