@useinsider/guido 1.0.3-beta.830bb2b → 1.0.3-beta.83937b4

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 (59) hide show
  1. package/README.md +137 -3
  2. package/dist/components/Guido.vue.js +7 -7
  3. package/dist/components/Guido.vue2.js +36 -35
  4. package/dist/components/organisms/extensions/recommendation/FilterItem.vue.js +28 -0
  5. package/dist/components/organisms/extensions/recommendation/FilterItem.vue2.js +38 -0
  6. package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue.js +17 -0
  7. package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue2.js +37 -0
  8. package/dist/components/organisms/extensions/recommendation/Filters.vue.js +20 -0
  9. package/dist/components/organisms/extensions/recommendation/Filters.vue2.js +44 -0
  10. package/dist/components/organisms/extensions/recommendation/LogicAdapter.vue.js +17 -0
  11. package/dist/components/organisms/extensions/recommendation/LogicAdapter.vue2.js +27 -0
  12. package/dist/components/organisms/header/LeftSlot.vue.js +1 -1
  13. package/dist/components/organisms/header/LeftSlot.vue2.js +16 -15
  14. package/dist/components/organisms/header/RightSlot.vue.js +11 -11
  15. package/dist/composables/useBlocksConfig.js +49 -0
  16. package/dist/composables/useStripo.js +39 -48
  17. package/dist/enums/defaults.js +14 -8
  18. package/dist/enums/extensions/recommendationBlock.js +80 -0
  19. package/dist/extensions/Blocks/Checkbox/extension.js +2 -2
  20. package/dist/extensions/Blocks/CouponBlock/extension.js +2 -2
  21. package/dist/extensions/Blocks/RadioButton/template.js +6 -6
  22. package/dist/extensions/Blocks/Recommendation/block.js +27 -0
  23. package/dist/extensions/Blocks/Recommendation/control.js +277 -0
  24. package/dist/extensions/Blocks/Recommendation/extension.js +10 -0
  25. package/dist/extensions/Blocks/Recommendation/iconsRegistry.js +51 -0
  26. package/dist/extensions/Blocks/Recommendation/recommendation.css.js +19 -0
  27. package/dist/extensions/Blocks/Recommendation/settingsPanel.js +32 -0
  28. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +266 -0
  29. package/dist/extensions/Blocks/Recommendation/template.js +200 -0
  30. package/dist/extensions/Blocks/Recommendation/utils/filterUtil.js +28 -0
  31. package/dist/extensions/Blocks/common-control.js +102 -0
  32. package/dist/guido.css +1 -1
  33. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +83 -72
  34. package/dist/services/recommendationApi.js +43 -0
  35. package/dist/src/@types/generic.d.ts +13 -0
  36. package/dist/src/components/organisms/extensions/recommendation/FilterItem.vue.d.ts +19 -0
  37. package/dist/src/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue.d.ts +2 -0
  38. package/dist/src/components/organisms/extensions/recommendation/Filters.vue.d.ts +2 -0
  39. package/dist/src/components/organisms/extensions/recommendation/LogicAdapter.vue.d.ts +16 -0
  40. package/dist/src/components/wrappers/WpModal.vue.d.ts +1 -1
  41. package/dist/src/composables/useBlocksConfig.d.ts +11 -0
  42. package/dist/src/enums/extensions/recommendationBlock.d.ts +16 -0
  43. package/dist/src/extensions/Blocks/Recommendation/block.d.ts +10 -0
  44. package/dist/src/extensions/Blocks/Recommendation/control.d.ts +29 -0
  45. package/dist/src/extensions/Blocks/Recommendation/extension.d.ts +2 -0
  46. package/dist/src/extensions/Blocks/Recommendation/iconsRegistry.d.ts +4 -0
  47. package/dist/src/extensions/Blocks/Recommendation/settingsPanel.d.ts +4 -0
  48. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +555 -0
  49. package/dist/src/extensions/Blocks/Recommendation/template.d.ts +6 -0
  50. package/dist/src/extensions/Blocks/Recommendation/utils/filterUtil.d.ts +7 -0
  51. package/dist/src/extensions/Blocks/common-control.d.ts +66 -0
  52. package/dist/src/mock/api/recommendation.d.ts +2 -0
  53. package/dist/src/services/recommendationApi.d.ts +6 -0
  54. package/dist/src/stores/config.d.ts +6 -0
  55. package/dist/src/stores/editor.d.ts +21 -0
  56. package/dist/src/utils/genericUtil.d.ts +1 -0
  57. package/dist/stores/editor.js +2 -1
  58. package/dist/utils/genericUtil.js +8 -7
  59. package/package.json +2 -2
@@ -1,4 +1,4 @@
1
- var F = /* @__PURE__ */ ((t) => (t.BLOCK = "BLOCK", t.STRUCTURE = "STRUCTURE", t.CONTAINER = "CONTAINER", t))(F || {}), A = class o {
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
@@ -21,22 +21,22 @@ ${s.map((i) => ` - ${i}`).join(`
21
21
  * This validation runs only once per class type and results are cached.
22
22
  */
23
23
  validateImplementation(e, r) {
24
- var E;
25
- const s = [], i = r.name, l = Object.getPrototypeOf(this);
24
+ var l;
25
+ const s = [], i = r.name, d = Object.getPrototypeOf(this);
26
26
  e.forEach((a) => {
27
27
  if (typeof this[a] != "function") {
28
28
  s.push(`Method ${a}() is not defined`);
29
29
  return;
30
30
  }
31
- l[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" && ((E = process.env) == null ? void 0 : E.NODE_ENV) === "development" && console.log(`[${i} Validation] ✅ ${i} 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
- A.validatedClasses = /* @__PURE__ */ new Set();
36
- A.validationErrors = /* @__PURE__ */ new Map();
37
- var n = A, M = class d extends n {
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(d.REQUIRED_METHODS, d);
39
+ super(h.REQUIRED_METHODS, h);
40
40
  }
41
41
  /**
42
42
  * Determines if the block should be available for use in the editor.
@@ -186,9 +186,9 @@ var n = A, M = class d extends n {
186
186
  }
187
187
  };
188
188
  M.REQUIRED_METHODS = ["getId", "getTemplate", "getIcon", "getName", "getDescription"];
189
- var Ct = M, k = class h extends n {
189
+ var It = M, k = class u extends n {
190
190
  constructor() {
191
- super(h.REQUIRED_METHODS, h);
191
+ super(u.REQUIRED_METHODS, u);
192
192
  }
193
193
  /**
194
194
  * @deprecated - use {@link getPreviewInnerHtml} instead
@@ -204,9 +204,9 @@ var Ct = M, k = class h extends n {
204
204
  }
205
205
  };
206
206
  k.REQUIRED_METHODS = ["getPreviewInnerHtml"];
207
- var Q = class u extends n {
207
+ var V = class c extends n {
208
208
  constructor() {
209
- super(u.REQUIRED_METHODS, u);
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,31 +221,42 @@ var Q = class u extends n {
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 V = "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 = `.${V}`, 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 || {}), D = {
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 = {
226
226
  name: "name",
227
227
  disabled: "disabled"
228
228
  }, ot = {
229
- ...D,
230
- caption: "caption"
229
+ ...E,
230
+ caption: "caption",
231
+ icon: "icon"
231
232
  }, Et = {
232
- ...D,
233
- text: "text"
233
+ ...E,
234
+ minValue: "min-value",
235
+ maxValue: "max-value",
236
+ step: "step"
234
237
  }, lt = {
235
- ...D,
238
+ ...E,
239
+ text: "text"
240
+ }, dt = {
241
+ ...E,
236
242
  placeholder: "placeholder",
237
243
  items: "items"
238
- }, dt = {
244
+ }, ht = {
239
245
  text: "text",
240
246
  value: "value"
241
- }, gt = {
247
+ }, ut = {
248
+ ...E
249
+ }, _t = {
242
250
  BUTTON: ot,
243
- LABEL: Et,
244
- SELECTPICKER: lt,
245
- SELECT_ITEM: dt
246
- }, ht = /* @__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))(ht || {}), S = class c extends n {
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 {
247
258
  constructor() {
248
- super(c.REQUIRED_METHODS, c);
259
+ super(m.REQUIRED_METHODS, m);
249
260
  }
250
261
  /**
251
262
  * @description Allows to determine if control should be visible or hidden in control panel.
@@ -292,16 +303,16 @@ var V = "esd-block-button", $ = "esd-block-text", X = "esd-block-image", G = "es
292
303
  }
293
304
  };
294
305
  S.REQUIRED_METHODS = ["getId", "getTemplate"];
295
- var It = S, N = class m extends n {
306
+ var Lt = S, N = class O extends n {
296
307
  constructor() {
297
- super(m.REQUIRED_METHODS, m);
308
+ super(O.REQUIRED_METHODS, O);
298
309
  }
299
310
  registerBlockControls(e) {
300
311
  throw new Error("Method registerBlockControls() must be implemented by the subclass");
301
312
  }
302
313
  };
303
314
  N.REQUIRED_METHODS = ["registerBlockControls"];
304
- var _t = N, Lt = class {
315
+ var At = N, Dt = class {
305
316
  constructor(t, e) {
306
317
  this.tabId = t, this.controlsIds = e;
307
318
  }
@@ -324,9 +335,9 @@ var _t = N, Lt = class {
324
335
  const e = this.controlsIds.indexOf(t);
325
336
  e !== -1 && this.controlsIds.splice(e, 1);
326
337
  }
327
- }, ut = class {
328
- constructor(t, e, r = [], s, i = [], l, E = [], a = [], T, v, p, w, B, K, P, H) {
329
- 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 = l, this.contextActions = E, this.blocks = a, this.externalSmartElementsLibrary = T, this.externalImageLibrary = v, this.externalAiAssistant = w, this.externalDisplayConditionsLibrary = B, this.externalVideoLibrary = K, this.blocksPanel = P, this.iconsRegistry = H, 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);
330
341
  }
331
342
  getI18n() {
332
343
  return this.i18n;
@@ -379,7 +390,7 @@ var _t = N, Lt = class {
379
390
  getIconsRegistry() {
380
391
  return this.iconsRegistry;
381
392
  }
382
- }, At = class {
393
+ }, Tt = class {
383
394
  constructor() {
384
395
  this.styles = [], this.uiElements = [], this.controls = [], this.contextActions = [], this.blocks = [];
385
396
  }
@@ -441,7 +452,7 @@ var _t = N, Lt = class {
441
452
  return this.iconsRegistry = t, this;
442
453
  }
443
454
  build() {
444
- return new ut(
455
+ return new mt(
445
456
  this.i18n,
446
457
  (this.styles || []).map((t) => t.trim()).join(`
447
458
  `),
@@ -461,18 +472,18 @@ var _t = N, Lt = class {
461
472
  this.iconsRegistry
462
473
  );
463
474
  }
464
- }, ct = class O extends n {
475
+ }, Ot = class b extends n {
465
476
  constructor() {
466
- super(O.REQUIRED_METHODS, O);
477
+ super(b.REQUIRED_METHODS, b);
467
478
  }
468
479
  openAiAssistant({ value: e, onDataSelectCallback: r, onCancelCallback: s, type: i }) {
469
480
  throw new Error("Method openAiAssistant() must be implemented by the subclass");
470
481
  }
471
482
  };
472
- ct.REQUIRED_METHODS = ["openAiAssistant"];
473
- var mt = class b extends n {
483
+ Ot.REQUIRED_METHODS = ["openAiAssistant"];
484
+ var bt = class R extends n {
474
485
  constructor() {
475
- super(b.REQUIRED_METHODS, b);
486
+ super(R.REQUIRED_METHODS, R);
476
487
  }
477
488
  /**
478
489
  * Retrieves the name of the category.
@@ -510,44 +521,44 @@ var mt = class b extends n {
510
521
  throw new Error("Method getContextActionIndex() must be implemented by the subclass");
511
522
  }
512
523
  };
513
- mt.REQUIRED_METHODS = ["getCategoryName", "openExternalDisplayConditionsDialog"];
514
- var Ot = class R extends n {
524
+ bt.REQUIRED_METHODS = ["getCategoryName", "openExternalDisplayConditionsDialog"];
525
+ var Rt = class C extends n {
515
526
  constructor() {
516
- super(R.REQUIRED_METHODS, R);
527
+ super(C.REQUIRED_METHODS, C);
517
528
  }
518
529
  openImageLibrary(e, r, s) {
519
530
  throw new Error("Method openImageLibrary() must be implemented by the subclass");
520
531
  }
521
532
  };
522
- Ot.REQUIRED_METHODS = ["openImageLibrary"];
523
- var bt = class C extends n {
533
+ Rt.REQUIRED_METHODS = ["openImageLibrary"];
534
+ var Ct = class g extends n {
524
535
  constructor() {
525
- super(C.REQUIRED_METHODS, C);
536
+ super(g.REQUIRED_METHODS, g);
526
537
  }
527
538
  openSmartElementsLibrary(e, r) {
528
539
  throw new Error("Method openSmartElementsLibrary() must be implemented by the subclass");
529
540
  }
530
541
  };
531
- bt.REQUIRED_METHODS = ["openSmartElementsLibrary"];
532
- var Rt = class g extends n {
542
+ Ct.REQUIRED_METHODS = ["openSmartElementsLibrary"];
543
+ var gt = class I extends n {
533
544
  constructor() {
534
- super(g.REQUIRED_METHODS, g);
545
+ super(I.REQUIRED_METHODS, I);
535
546
  }
536
547
  openExternalVideosLibraryDialog(e, r, s) {
537
548
  throw new Error("Method openExternalVideosLibraryDialog() must be implemented by the subclass");
538
549
  }
539
550
  };
540
- Rt.REQUIRED_METHODS = ["openExternalVideosLibraryDialog"];
541
- var y = class I extends n {
551
+ gt.REQUIRED_METHODS = ["openExternalVideosLibraryDialog"];
552
+ var y = class _ extends n {
542
553
  constructor() {
543
- super(I.REQUIRED_METHODS, I);
554
+ super(_.REQUIRED_METHODS, _);
544
555
  }
545
556
  registerIconsSvg(e) {
546
557
  throw new Error("Method registerIconsSvg() must be implemented by the subclass");
547
558
  }
548
559
  };
549
560
  y.REQUIRED_METHODS = ["registerIconsSvg"];
550
- var Dt = y, Tt = class {
561
+ var Mt = y, St = class {
551
562
  constructor(t) {
552
563
  this.key = t;
553
564
  }
@@ -560,9 +571,9 @@ var Dt = y, Tt = class {
560
571
  params: this.params
561
572
  };
562
573
  }
563
- }, x = class _ extends n {
574
+ }, v = class L extends n {
564
575
  constructor() {
565
- super(_.REQUIRED_METHODS, _);
576
+ super(L.REQUIRED_METHODS, L);
566
577
  }
567
578
  /**
568
579
  * Called when the UI element should render its content into the provided container.
@@ -615,34 +626,34 @@ var Dt = y, Tt = class {
615
626
  throw new Error("Method getTemplate() must be implemented by the subclass");
616
627
  }
617
628
  };
618
- x.REQUIRED_METHODS = ["onRender", "getId", "getTemplate"];
619
- var Mt = x, U = class L extends n {
629
+ v.REQUIRED_METHODS = ["onRender", "getId", "getTemplate"];
630
+ var Nt = v, x = class A extends n {
620
631
  constructor() {
621
- super(L.REQUIRED_METHODS, L);
632
+ super(A.REQUIRED_METHODS, A);
622
633
  }
623
634
  registerUiElements(e) {
624
635
  throw new Error("Method registerUiElements() must be implemented by the subclass");
625
636
  }
626
637
  };
627
- U.REQUIRED_METHODS = ["registerUiElements"];
628
- var St = U;
638
+ x.REQUIRED_METHODS = ["registerUiElements"];
639
+ var yt = x;
629
640
  export {
630
- Ct as Block,
641
+ It as Block,
631
642
  F as BlockCompositionType,
632
643
  rt as BlockSelector,
633
644
  st as BlockType,
634
645
  it as ContainerControls,
635
- It as Control,
636
- ut as Extension,
637
- At as ExtensionBuilder,
638
- Dt as IconsRegistry,
639
- Tt as ModificationDescription,
640
- _t as SettingsPanelRegistry,
641
- Lt as SettingsPanelTab,
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,
642
653
  at as SettingsTab,
643
654
  nt as TextControls,
644
- gt as UEAttr,
645
- Mt as UIElement,
646
- St as UIElementTagRegistry,
647
- ht as UIElementType
655
+ _t as UEAttr,
656
+ Nt as UIElement,
657
+ yt as UIElementTagRegistry,
658
+ ct as UIElementType
648
659
  };
@@ -0,0 +1,43 @@
1
+ import { useHttp as c } from "../composables/useHttp.js";
2
+ import { URLS as a } from "../enums/extensions/recommendationBlock.js";
3
+ import { useEditorStore as m } from "../stores/editor.js";
4
+ import { replaceString as s } from "../utils/genericUtil.js";
5
+ const l = () => {
6
+ const { get: o } = c();
7
+ return {
8
+ fetchRecommendationCreateData: async () => {
9
+ const e = m();
10
+ try {
11
+ return (await o(s(
12
+ "/newsletter/{id}/recommendations/get-campaign-create-data",
13
+ { id: e.templateId }
14
+ ))).data;
15
+ } catch (t) {
16
+ throw console.error("fetchUserModalState error:", t), t;
17
+ }
18
+ },
19
+ fetchRecommendationFilters: async () => {
20
+ try {
21
+ const { data: e } = await o("/stripo/email-recommendation-attributes");
22
+ return e;
23
+ } catch (e) {
24
+ throw console.error("fetchRecommendationFilters error:", e), e;
25
+ }
26
+ },
27
+ fetchRecommendationProducts: async (e, t) => {
28
+ try {
29
+ const r = decodeURIComponent(new URLSearchParams(Object.entries(t)).toString());
30
+ console.debug("🏁 Recommendation API Query:", r);
31
+ const n = await o(
32
+ `${a.RECOMMENDATION_API_URL}/v2/${e}?${r}`
33
+ );
34
+ return (n == null ? void 0 : n.data) ?? [];
35
+ } catch (r) {
36
+ throw console.error("fetchRecommendationProducts error:", r), r;
37
+ }
38
+ }
39
+ };
40
+ };
41
+ export {
42
+ l as useRecommendationApi
43
+ };
@@ -6,12 +6,19 @@ type Features = {
6
6
  dynamicContent?: boolean;
7
7
  saveAsTemplate?: boolean;
8
8
  versionHistory?: boolean;
9
+ testMessage?: boolean;
9
10
  };
10
11
  type Partner = {
11
12
  partnerName: string;
12
13
  productType: number;
13
14
  messageType: number;
14
15
  };
16
+ 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';
17
+ export type GuidoCustomBlockType = 'dynamic-content' | 'checkbox-block' | 'radio-button-block' | 'recommendation-block' | 'unsubscribe-block' | 'coupon-block' | 'items-block';
18
+ type BlocksConfig = {
19
+ excludeDefaults?: GuidoBlockType[];
20
+ includeCustoms?: GuidoCustomBlockType[];
21
+ };
15
22
  export type GuidoConfig = {
16
23
  translationsPath: string;
17
24
  htmlCompilerRules?: CompilerRule[];
@@ -21,6 +28,8 @@ export type GuidoConfig = {
21
28
  partner?: Partner;
22
29
  extensions?: Extensions;
23
30
  features?: Features;
31
+ blocks?: BlocksConfig;
32
+ backButtonLabel?: string;
24
33
  };
25
34
  export type TemplateConfig = {
26
35
  preselectedDynamicContentList?: DynamicContent[];
@@ -55,4 +64,8 @@ export type MergeTag = {
55
64
  label: string;
56
65
  value: string;
57
66
  };
67
+ export type TextValueObject = {
68
+ text: string;
69
+ value: string;
70
+ };
58
71
  export {};
@@ -0,0 +1,19 @@
1
+ import type { Filter } from '@@/Types/recommendation';
2
+ type __VLS_Props = {
3
+ filter: Filter;
4
+ index: number;
5
+ hasLogicAdapter?: boolean;
6
+ };
7
+ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__VLS_Props>, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
8
+ "delete-filter": (filter: Filter) => void;
9
+ }, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}>;
10
+ export default _default;
11
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
12
+ type __VLS_TypePropsToOption<T> = {
13
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
14
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
15
+ } : {
16
+ type: import('vue').PropType<T[K]>;
17
+ required: true;
18
+ };
19
+ };
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
2
+ export default _default;
@@ -0,0 +1,16 @@
1
+ type __VLS_Props = {
2
+ logic?: string;
3
+ };
4
+ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__VLS_Props>, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
5
+ change: (value: string) => void;
6
+ }, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}>;
7
+ export default _default;
8
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
9
+ type __VLS_TypePropsToOption<T> = {
10
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
11
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
12
+ } : {
13
+ type: import('vue').PropType<T[K]>;
14
+ required: true;
15
+ };
16
+ };
@@ -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: () => Promise<{
8
+ baseBlocks: Record<string, boolean>;
9
+ extensions: Extension[];
10
+ }>;
11
+ };
@@ -0,0 +1,16 @@
1
+ import type { TextValueObject } from '@@/Types/generic';
2
+ import type { RecommendationFeedItem } from '@@/Types/recommendation';
3
+ export declare const URLS: {
4
+ RECOMMENDATION_API_URL: string;
5
+ };
6
+ export declare const RecommendationFeedSourceMaps: RecommendationFeedItem[];
7
+ export declare const PriceAttributes: string[];
8
+ export declare const currencyLocationMaps: TextValueObject[];
9
+ export declare const currencyOperators: TextValueObject[];
10
+ export declare const currencyDecimalCounts: TextValueObject[];
11
+ export declare const operatorOptionsForStrings: TextValueObject[];
12
+ export declare const operatorOptionsForArrayOfStrings: TextValueObject[];
13
+ export declare const operatorOptionsForNumbers: TextValueObject[];
14
+ export declare const operatorOptionsForDates: TextValueObject[];
15
+ export declare const operatorOptionsForBooleans: TextValueObject[];
16
+ export declare const getOperatorOptions: (type?: string) => TextValueObject[];
@@ -0,0 +1,10 @@
1
+ import { Block, BlockCompositionType } from '@stripoinc/ui-editor-extensions';
2
+ export declare const BLOCK_ID = "recommendation-block";
3
+ export declare class RecommendationBlock extends Block {
4
+ getId(): string;
5
+ getIcon(): string;
6
+ getBlockCompositionType(): BlockCompositionType;
7
+ getName(): string;
8
+ getDescription(): string;
9
+ getTemplate(): string;
10
+ }
@@ -0,0 +1,29 @@
1
+ import { CommonControl } from '../common-control';
2
+ export declare const CONTROL_BLOCK_ID = "ui-elements-recommendation-block";
3
+ export declare class RecommendationBlockControl extends CommonControl {
4
+ private store;
5
+ private storeUnsubscription;
6
+ private addFilterListener;
7
+ private addFilterButton;
8
+ getId(): string;
9
+ getTemplate(): string;
10
+ onRender(): Promise<void>;
11
+ onDestroy(): void;
12
+ _setFormValues(): void;
13
+ _initializeSelectItems(): void;
14
+ _getAlgorithms(): string;
15
+ _getLanguages(): string;
16
+ _getCurrency(): string;
17
+ _getProductLayout(): string;
18
+ _getFilterStatus(): string;
19
+ _getShuffleProducts(): string;
20
+ _getResponsive(): string;
21
+ _onFilterChange(value: boolean): void;
22
+ _onFilterSelectClick(): void;
23
+ _onDataChange(item: string, value: string | number | string[]): void;
24
+ _onCurrencyConfigChange(item: string, value: string | number): void;
25
+ _onCurrencyChange(value: string): void;
26
+ _setProductIdsVisibility(): void;
27
+ _listenToFormUpdates(): void;
28
+ _listenStateUpdates(): void;
29
+ }
@@ -0,0 +1,2 @@
1
+ declare const _default: import("@stripoinc/ui-editor-extensions").Extension;
2
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import { IconsRegistry } from '@stripoinc/ui-editor-extensions';
2
+ export declare class RecommendationIconsRegistry extends IconsRegistry {
3
+ registerIconsSvg(iconsMap: Record<string, string>): void;
4
+ }
@@ -0,0 +1,4 @@
1
+ import { SettingsPanelRegistry, SettingsPanelTab } from '@stripoinc/ui-editor-extensions';
2
+ export declare class SettingsPanel extends SettingsPanelRegistry {
3
+ registerBlockControls(blockControlsMap: Record<string, SettingsPanelTab[]>): void;
4
+ }