@useinsider/guido 3.13.1 → 3.14.0-beta.0a46bdf

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 (31) hide show
  1. package/dist/components/organisms/header/ViewOptions.vue.js +1 -1
  2. package/dist/components/organisms/header/version-history/ViewOptions.vue.js +1 -1
  3. package/dist/composables/useEmailTemplateApplier.js +46 -32
  4. package/dist/config/compiler/itemsCompilerRules.js +25 -4
  5. package/dist/config/compiler/utils/itemsCompilerUtils.js +28 -0
  6. package/dist/config/migrator/index.js +9 -8
  7. package/dist/config/migrator/itemsBlockMigrator.js +47 -45
  8. package/dist/config/migrator/productNameLinkMigrator.js +27 -0
  9. package/dist/extensions/Blocks/Items/block.js +30 -30
  10. package/dist/extensions/Blocks/Items/controls/name/trimming.js +16 -16
  11. package/dist/extensions/Blocks/Items/controls/price/hideDiscount.js +26 -22
  12. package/dist/extensions/Blocks/Items/controls/settingsControl.js +36 -35
  13. package/dist/extensions/Blocks/Items/template.js +228 -263
  14. package/dist/extensions/Blocks/Items/utils/nameNode.js +4 -0
  15. package/dist/guido.css +1 -1
  16. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +12 -12
  17. package/dist/package.json.js +1 -1
  18. package/dist/src/config/compiler/utils/itemsCompilerUtils.d.ts +12 -0
  19. package/dist/src/config/migrator/productNameLinkMigrator.d.ts +1 -0
  20. package/dist/src/extensions/Blocks/Items/block.d.ts +1 -1
  21. package/dist/src/extensions/Blocks/Items/utils/nameNode.d.ts +9 -0
  22. package/dist/src/stores/dynamic-content.d.ts +8 -0
  23. package/dist/src/utils/registerUsedDynamicContent.d.ts +8 -0
  24. package/dist/src/utils/unwrapProductNameLink.d.ts +15 -0
  25. package/dist/static/styles/components/wide-panel.css.js +7 -0
  26. package/dist/static/styles/customEditorStyle.css.js +8 -0
  27. package/dist/stores/dynamic-content.js +12 -2
  28. package/dist/utils/pairProductVariables.js +75 -72
  29. package/dist/utils/registerUsedDynamicContent.js +23 -0
  30. package/dist/utils/unwrapProductNameLink.js +37 -0
  31. package/package.json +4 -4
@@ -0,0 +1,4 @@
1
+ const e = (t) => t ? t.querySelector('[product-attr="name"]') ?? t.querySelector("p > a") : void 0;
2
+ export {
3
+ e as findNameTextNode
4
+ };
package/dist/guido.css CHANGED
@@ -1 +1 @@
1
- .gap-16[data-v-5553d071],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-73199fa4] .in-button-v2__wrapper{line-height:0}[data-v-22226124] .in-segments-wrapper__button_selected,[data-v-22226124] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb;color:#0010ac;border-color:#0010ac}[data-v-2cb418af] .in-progress-wrapper__progress p span:last-child{display:none!important}[data-v-2cb418af] .in-progress-description-status{display:none!important}.view-options-wrapper[data-v-195ab6d4]{position:relative;display:inline-block}.new-tag[data-v-195ab6d4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-195ab6d4] .guido__view-option-selection-desktop svg,[data-v-195ab6d4] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-195ab6d4] .in-segments-wrapper__button_selected,[data-v-195ab6d4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-195ab6d4] .in-tooltip-wrapper__icon{cursor:pointer}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-fad98586]{gap:8px}.version-history__toolbar[data-v-fad98586]{gap:4px}.view-options-wrapper[data-v-d405ca59]{position:relative;display:inline-block}.new-tag[data-v-d405ca59]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-d405ca59] .guido__verion-history-view-option-selection-desktop svg,[data-v-d405ca59] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-d405ca59] .in-segments-wrapper__button_selected,[data-v-d405ca59] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-d405ca59] .in-tooltip-wrapper__icon{cursor:pointer}.auto-save-toggle[data-v-2c964af4]{position:relative}.auto-save-toggle__info-box[data-v-2c964af4]{position:absolute;top:100%;left:0;z-index:10;width:280px}.editor-actions[data-v-6e711fd7]{gap:4px}.header-wrapper[data-v-d11dd577]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.guido-editor__wrapper[data-v-5079a1c8]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-5079a1c8]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-5079a1c8]{height:calc(100vh - 75px - var(--ribbon-offset))}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-91a26acd]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-91a26acd]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-91a26acd]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-91a26acd]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-91a26acd]{object-fit:cover;transform:scale(1)}[data-v-b9a93c6e] .guido__verion-history-view-option-selection-desktop svg,[data-v-b9a93c6e] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-b9a93c6e] .in-segments-wrapper__button_selected,[data-v-b9a93c6e] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}.error-list[data-v-c3fd5d4b]{gap:16px}.desktop-browser-header[data-v-d86c5af5]{height:79px;min-height:79px}.desktop-browser-header__left[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:378px}.desktop-browser-header__center[data-v-d86c5af5]{height:79px;background-repeat:repeat-x;background-size:auto 100%;background-position:left top}.desktop-browser-header__right[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:112px}.desktop-preview[data-v-cf946232]{min-width:602px;height:70vh;min-height:583px;border-radius:10px}.desktop-preview iframe[data-v-cf946232]{min-height:504px}.iframe-wrapper[data-v-f255b2bb]{width:258px}.iframe-scaled[data-v-f255b2bb]{width:320px;height:124.0310077519%;transform:scale(.80625);transform-origin:top left}.cropped-text[data-v-eb3d05d7]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mobile-preview-wrapper__phone[data-v-3f472f96]{width:282px}.mobile-preview-wrapper__phone img[data-v-3f472f96]{object-fit:cover;border-radius:44px}.mobile-preview-wrapper__content[data-v-3f472f96]{width:258px;height:450px;left:12px}[data-v-6bcaca8a] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-f16f20f8] .vueperslides__bullets{pointer-events:none!important}[data-v-f16f20f8] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-bb3cca55] .vueperslides__bullets{pointer-events:none!important}[data-v-bb3cca55] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-b09e80c4] .vueperslides__bullets{pointer-events:none!important}[data-v-b09e80c4] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-9bdef600] .vueperslides__parallax-wrapper{padding-bottom:110px!important}
1
+ .gap-16[data-v-5553d071],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-73199fa4] .in-button-v2__wrapper{line-height:0}[data-v-22226124] .in-segments-wrapper__button_selected,[data-v-22226124] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb;color:#0010ac;border-color:#0010ac}[data-v-2cb418af] .in-progress-wrapper__progress p span:last-child{display:none!important}[data-v-2cb418af] .in-progress-description-status{display:none!important}.view-options-wrapper[data-v-87033101]{position:relative;display:inline-block}.new-tag[data-v-87033101]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-87033101] .guido__view-option-selection-desktop svg,[data-v-87033101] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-87033101] .in-segments-wrapper__button_selected,[data-v-87033101] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-87033101] .in-tooltip-wrapper-v2__icon{cursor:pointer}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-fad98586]{gap:8px}.version-history__toolbar[data-v-fad98586]{gap:4px}.view-options-wrapper[data-v-6ebabfe4]{position:relative;display:inline-block}.new-tag[data-v-6ebabfe4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-6ebabfe4] .guido__verion-history-view-option-selection-desktop svg,[data-v-6ebabfe4] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-6ebabfe4] .in-segments-wrapper__button_selected,[data-v-6ebabfe4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-6ebabfe4] .in-tooltip-wrapper-v2__icon{cursor:pointer}.auto-save-toggle[data-v-2c964af4]{position:relative}.auto-save-toggle__info-box[data-v-2c964af4]{position:absolute;top:100%;left:0;z-index:10;width:280px}.editor-actions[data-v-6e711fd7]{gap:4px}.header-wrapper[data-v-d11dd577]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.guido-editor__wrapper[data-v-5079a1c8]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-5079a1c8]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-5079a1c8]{height:calc(100vh - 75px - var(--ribbon-offset))}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-91a26acd]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-91a26acd]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-91a26acd]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-91a26acd]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-91a26acd]{object-fit:cover;transform:scale(1)}[data-v-b9a93c6e] .guido__verion-history-view-option-selection-desktop svg,[data-v-b9a93c6e] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-b9a93c6e] .in-segments-wrapper__button_selected,[data-v-b9a93c6e] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}.error-list[data-v-c3fd5d4b]{gap:16px}.desktop-browser-header[data-v-d86c5af5]{height:79px;min-height:79px}.desktop-browser-header__left[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:378px}.desktop-browser-header__center[data-v-d86c5af5]{height:79px;background-repeat:repeat-x;background-size:auto 100%;background-position:left top}.desktop-browser-header__right[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:112px}.desktop-preview[data-v-cf946232]{min-width:602px;height:70vh;min-height:583px;border-radius:10px}.desktop-preview iframe[data-v-cf946232]{min-height:504px}.iframe-wrapper[data-v-f255b2bb]{width:258px}.iframe-scaled[data-v-f255b2bb]{width:320px;height:124.0310077519%;transform:scale(.80625);transform-origin:top left}.cropped-text[data-v-eb3d05d7]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mobile-preview-wrapper__phone[data-v-3f472f96]{width:282px}.mobile-preview-wrapper__phone img[data-v-3f472f96]{object-fit:cover;border-radius:44px}.mobile-preview-wrapper__content[data-v-3f472f96]{width:258px;height:450px;left:12px}[data-v-6bcaca8a] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-f16f20f8] .vueperslides__bullets{pointer-events:none!important}[data-v-f16f20f8] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-bb3cca55] .vueperslides__bullets{pointer-events:none!important}[data-v-bb3cca55] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-b09e80c4] .vueperslides__bullets{pointer-events:none!important}[data-v-b09e80c4] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-9bdef600] .vueperslides__parallax-wrapper{padding-bottom:110px!important}
@@ -41,9 +41,9 @@ ${s.map((o) => ` - ${o}`).join(`
41
41
  };
42
42
  v.validatedClasses = /* @__PURE__ */ new Set();
43
43
  v.validationErrors = /* @__PURE__ */ new Map();
44
- var i = v, z = /* @__PURE__ */ ((e) => (e.BLOCK = "BLOCK", e.CONTAINER = "CONTAINER", e.STRUCTURE = "STRUCTURE", e.STRIPE = "STRIPE", e))(z || {}), P = class c extends i {
44
+ var i = v, z = /* @__PURE__ */ ((e) => (e.BLOCK = "BLOCK", e.CONTAINER = "CONTAINER", e.STRUCTURE = "STRUCTURE", e.STRIPE = "STRIPE", e))(z || {}), P = class T extends i {
45
45
  constructor() {
46
- super(c.REQUIRED_METHODS, c);
46
+ super(T.REQUIRED_METHODS, T);
47
47
  }
48
48
  /**
49
49
  * Determines if the block should be available for use in the editor.
@@ -222,9 +222,9 @@ var i = v, z = /* @__PURE__ */ ((e) => (e.BLOCK = "BLOCK", e.CONTAINER = "CONTAI
222
222
  }
223
223
  };
224
224
  P.REQUIRED_METHODS = ["getId", "getTemplate", "getIcon", "getName", "getDescription"];
225
- var qe = P, Z = class T extends i {
225
+ var qe = P, Z = class c extends i {
226
226
  constructor() {
227
- super(T.REQUIRED_METHODS, T);
227
+ super(c.REQUIRED_METHODS, c);
228
228
  }
229
229
  /**
230
230
  * @deprecated - use {@link getPreviewInnerHtml} instead
@@ -339,12 +339,12 @@ var j = {
339
339
  height: "height"
340
340
  }, Je = {
341
341
  BLOCK_IMAGE: j
342
- }, U = "esd-block-button", w = "esd-block-text", K = "esd-block-image", J = "esd-structure", ee = "esd-block-video", te = "esd-block-social", re = "esd-block-banner", ae = "esd-block-timer", ne = "esd-block-menu", se = "esd-block-html", ie = "esd-block-spacer", le = "esd-container-frame", Ee = "esd-stripe", oe = "esd-amp-form", I = ((e) => (e.BUTTON = `.${U}`, e.TEXT = `.${w}`, e.IMAGE = `.${K}`, e.STRUCTURE = `.${J}`, e.VIDEO = `.${ee}`, e.SOCIAL = `.${te}`, e.BANNER = `.${re}`, e.TIMER = `.${ae}`, e.MENU = `.${ne}`, e.HTML = `.${se}`, e.SPACER = `.${ie}`, e.CONTAINER = `.${le}`, e.STRIPE = `.${Ee}`, e.FORM = `.${oe}`, e))(I || {}), de = /* @__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))(de || {}), F = /* @__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))(F || {}), H = /* @__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))(H || {}), k = /* @__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.FONT_WEIGHT = "textBlockFontWeight", 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.MIME_TYPE = "textMimeTypeForm", e.NO_LINE_WRAPS = "textNoLineWrapsForm", e))(k || {}), p = /* @__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))(p || {}), ue = /* @__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))(ue || {}), n = {
342
+ }, U = "esd-block-button", w = "esd-block-text", K = "esd-block-image", J = "esd-structure", ee = "esd-block-video", te = "esd-block-social", re = "esd-block-banner", ae = "esd-block-timer", ne = "esd-block-menu", se = "esd-block-html", ie = "esd-block-spacer", le = "esd-container-frame", Ee = "esd-stripe", oe = "esd-amp-form", I = ((e) => (e.BUTTON = `.${U}`, e.TEXT = `.${w}`, e.IMAGE = `.${K}`, e.STRUCTURE = `.${J}`, e.VIDEO = `.${ee}`, e.SOCIAL = `.${te}`, e.BANNER = `.${re}`, e.TIMER = `.${ae}`, e.MENU = `.${ne}`, e.HTML = `.${se}`, e.SPACER = `.${ie}`, e.CONTAINER = `.${le}`, e.STRIPE = `.${Ee}`, e.FORM = `.${oe}`, e))(I || {}), de = /* @__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))(de || {}), F = /* @__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))(F || {}), H = /* @__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.FONT_WEIGHT = "buttonFontWeight", 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))(H || {}), k = /* @__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.FONT_WEIGHT = "textBlockFontWeight", 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.MIME_TYPE = "textMimeTypeForm", e.NO_LINE_WRAPS = "textNoLineWrapsForm", e))(k || {}), p = /* @__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))(p || {}), ue = /* @__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))(ue || {}), n = {
343
343
  BLOCK_BUTTON: H,
344
344
  BLOCK_TEXT: k,
345
345
  BLOCK_IMAGE: p,
346
346
  GENERAL: F
347
- }, Ie = /* @__PURE__ */ ((e) => (e.SAVE_AS_MODULE = "saveAsModule", e.IMPROVE_WITH_AI = "improveWithAI", e.MOVE = "move", e.COPY = "copy", e.REMOVE = "remove", e.CLEAR_CONTAINER = "clearContainer", e.EXTERNAL_DISPLAY_CONDITION = "externalDisplayCondition", e))(Ie || {}), ce = /* @__PURE__ */ ((e) => (e.previewDeviceMode = "previewDeviceMode", e.panelPosition = "panelPosition", e.themeMode = "themeMode", e))(ce || {}), Te = /* @__PURE__ */ ((e) => (e.DESKTOP = "DESKTOP", e.MOBILE = "MOBILE", e))(Te || {}), be = /* @__PURE__ */ ((e) => (e.SETTINGS = "settings", e.STYLES = "styles", e.DATA = "data", e))(be || {}), a = {
347
+ }, Ie = /* @__PURE__ */ ((e) => (e.SAVE_AS_MODULE = "saveAsModule", e.IMPROVE_WITH_AI = "improveWithAI", e.MOVE = "move", e.COPY = "copy", e.REMOVE = "remove", e.CLEAR_CONTAINER = "clearContainer", e.EXTERNAL_DISPLAY_CONDITION = "externalDisplayCondition", e))(Ie || {}), Te = /* @__PURE__ */ ((e) => (e.previewDeviceMode = "previewDeviceMode", e.panelPosition = "panelPosition", e.themeMode = "themeMode", e))(Te || {}), ce = /* @__PURE__ */ ((e) => (e.DESKTOP = "DESKTOP", e.MOBILE = "MOBILE", e))(ce || {}), be = /* @__PURE__ */ ((e) => (e.SETTINGS = "settings", e.STYLES = "styles", e.DATA = "data", e))(be || {}), a = {
348
348
  name: "name",
349
349
  disabled: "disabled"
350
350
  }, he = {
@@ -619,7 +619,7 @@ var j = {
619
619
  }
620
620
  };
621
621
  G.REQUIRED_METHODS = ["getId", "getTemplate"];
622
- var ct = G, Xe = class m extends i {
622
+ var Tt = G, Xe = class m extends i {
623
623
  constructor() {
624
624
  super(m.REQUIRED_METHODS, m);
625
625
  }
@@ -694,7 +694,7 @@ var V = class extends x {
694
694
  const t = e.querySelectorAll(I.IMAGE), r = e.asElement().hasClass(K) ? [e] : [];
695
695
  return t.length ? t : r;
696
696
  }
697
- }, Tt = class extends V {
697
+ }, ct = class extends V {
698
698
  getParentControlId() {
699
699
  return n.BLOCK_IMAGE.EXTERNAL_INDENTS;
700
700
  }
@@ -1215,17 +1215,17 @@ export {
1215
1215
  It as ButtonTextStyleAndFontColorBuiltInControl,
1216
1216
  ue as ContainerControls,
1217
1217
  Ie as ContextActionType,
1218
- ct as Control,
1219
- ce as EditorStatePropertyType,
1218
+ Tt as Control,
1219
+ Te as EditorStatePropertyType,
1220
1220
  Ve as Extension,
1221
1221
  Nt as ExtensionBuilder,
1222
1222
  F as GeneralControls,
1223
1223
  Dt as IconsRegistry,
1224
1224
  p as ImageControls,
1225
- Tt as ImageMarginsBuiltInControl,
1225
+ ct as ImageMarginsBuiltInControl,
1226
1226
  bt as ImageSizeBuiltInControl,
1227
1227
  St as ModificationDescription,
1228
- Te as PreviewDeviceMode,
1228
+ ce as PreviewDeviceMode,
1229
1229
  ht as SettingsPanelRegistry,
1230
1230
  mt as SettingsPanelTab,
1231
1231
  be as SettingsTab,
@@ -1,4 +1,4 @@
1
- const o = { stripo: { version: "2.69.1" } }, s = {
1
+ const o = { stripo: { version: "2.72.1" } }, s = {
2
2
  guido: o
3
3
  };
4
4
  export {
@@ -0,0 +1,12 @@
1
+ export declare const MSO_ITEMS_HIDE_START = "MSO_ITEMS_HIDE_START";
2
+ export declare const MSO_ITEMS_HIDE_END = "MSO_ITEMS_HIDE_END";
3
+ /**
4
+ * SD-147597: the horizontal Items layout ships a second copy of price +
5
+ * original price in a `td.vertical-price` fallback hidden only by inline
6
+ * `display:none` (and vice versa for the vertical price orientation). Outlook's
7
+ * Word engine ignores `display:none` on `<td>`, so it paints BOTH copies —
8
+ * duplicate price. Wrap whichever price td(s) are hidden at export time in safe
9
+ * placeholder comments (swapped into `<!--[if !mso]>` by the priority-101 rule)
10
+ * and collapse them inline for web-engine Outlook.
11
+ */
12
+ export declare function wrapHiddenPriceTdsForOutlook(html: string): string;
@@ -0,0 +1 @@
1
+ export declare function migrateProductNameLink(html: string): string;
@@ -34,7 +34,7 @@ export declare class ItemsBlock extends Block {
34
34
  */
35
35
  onDocumentChanged(node: ImmutableHtmlNode): void;
36
36
  /**
37
- * Bakes the compiler-read DOM attributes (`data-type`, `data-number`) onto the
37
+ * Bakes the compiler-read DOM attributes (`data-type`, `data-number`, `data-nodup`) onto the
38
38
  * `.ins-product-td` container from the recovered config. Required for saved modules:
39
39
  * `migrate()` (which backfills these) only runs at template load — never when a module
40
40
  * is dropped into a live editor — so this is the one place the namespace + index get
@@ -0,0 +1,9 @@
1
+ import type { ImmutableHtmlElementNode, ImmutableHtmlNode } from '@stripoinc/ui-editor-extensions';
2
+ /**
3
+ * Resolves the element carrying the product name text.
4
+ *
5
+ * New blocks put `product-attr="name"` on the `<p>`; blocks saved before SD-147616 still
6
+ * carry it on the inner `<a>`, and the oldest ones have no attribute at all — hence the
7
+ * `p > a` fallback. Without it, trimming silently no-ops on legacy blocks.
8
+ */
9
+ export declare const findNameTextNode: (container?: ImmutableHtmlNode) => ImmutableHtmlElementNode | undefined;
@@ -36,4 +36,12 @@ export declare const useDynamicContentStore: import("pinia").StoreDefinition<"gu
36
36
  }[];
37
37
  }, {
38
38
  setSelectedDynamicContent(dynamicContent: DynamicContent): void;
39
+ /**
40
+ * Append-only bulk registration for dynamic content used by an
41
+ * AI-applied template. Unlike `setSelectedDynamicContent` it doesn't
42
+ * touch `selectedDynamicContent`; the getter removes duplicates, so
43
+ * re-registering the same entries is harmless. Items are shallow-copied so Pinia
44
+ * reactivity can't write a later mutation back into the host's catalog.
45
+ */
46
+ registerDynamicContent(items: DynamicContent[]): void;
39
47
  }>;
@@ -0,0 +1,8 @@
1
+ import type { DynamicContent } from '@@/Types/generic';
2
+ export declare const extractUsedDynamicContent: (html: string, flattenedCatalog: DynamicContent[] | undefined | null) => DynamicContent[];
3
+ /**
4
+ * Dev-diagnostic sibling of `extractUsedDynamicContent`: the used token names
5
+ * with NO catalog match (so intentionally not registered). Surfaced via a
6
+ * dev-gated `console.debug` to spot a neo↔guido vocabulary mismatch. Never throws.
7
+ */
8
+ export declare const getUnmatchedDynamicContentTokens: (html: string, flattenedCatalog: DynamicContent[] | undefined | null) => string[];
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Unwraps the `<a>` around an Items-block product name so the name compiles as plain text.
3
+ *
4
+ * Outlook's Word engine ignores `color: inherit` on an `<a>` and paints its own blue link
5
+ * color (SD-147616). New blocks no longer emit the anchor, but templates saved before the
6
+ * fix still carry it in their stored HTML — this heals them at compile time.
7
+ */
8
+ /**
9
+ * Removes the product-name link from every `.ins-product-td` in the document, in place.
10
+ *
11
+ * Scoped like `pairProductVariables` so partner or legacy recommendation markup outside a
12
+ * product cell is never touched. Idempotent.
13
+ * @param doc - Parsed template document, mutated in place
14
+ */
15
+ export declare function unwrapProductNameLinks(doc: Document): void;
@@ -103,6 +103,13 @@ ue-control-panel,
103
103
  display: none !important;
104
104
  }
105
105
 
106
+ /* Stripo 2.72 added a "Restore default styles" button to the settings header that does
107
+ nothing when clicked — styles are never reset. Reported upstream; hidden until fixed.
108
+ Scoped to Stripo's own e2e hook class so the sibling close (X) and level-up buttons stay. */
109
+ .control-panel-header .e2e-restore-default-styles {
110
+ display: none !important;
111
+ }
112
+
106
113
  .container.droppable-header-container ue-button:last-child {
107
114
  margin-right: 0;
108
115
  }
@@ -47,6 +47,14 @@ const n = `.esd-x,
47
47
  display: none !important;
48
48
  }
49
49
 
50
+ /* Stripo 2.72 renders drag-to-resize handles over images. Product image size must come
51
+ from the Image Size control in the settings panel, not free-hand dragging, which breaks
52
+ the card layout. Grid layout uses .product-image, list layout .product-image-cell. */
53
+ .recommendation-block-v2 .product-image ue-image-resize-control,
54
+ .recommendation-block-v2 .product-image-cell ue-image-resize-control {
55
+ display: none !important;
56
+ }
57
+
50
58
  /* Mobile layout: hide mobile container by default in editor */
51
59
  .ins-recommendation-mobile-container {
52
60
  display: none;
@@ -1,6 +1,6 @@
1
1
  import { removeDuplicatesFromArray as n } from "../utils/arrayUtil.js";
2
2
  import { defineStore as a } from "pinia";
3
- const s = a("guidoDynamicContent", {
3
+ const c = a("guidoDynamicContent", {
4
4
  state: () => ({
5
5
  selectedDynamicContent: { text: "", value: "" },
6
6
  selectedDynamicContentList: []
@@ -8,6 +8,16 @@ const s = a("guidoDynamicContent", {
8
8
  actions: {
9
9
  setSelectedDynamicContent(t) {
10
10
  this.selectedDynamicContent = t, this.selectedDynamicContentList.push(t);
11
+ },
12
+ /**
13
+ * Append-only bulk registration for dynamic content used by an
14
+ * AI-applied template. Unlike `setSelectedDynamicContent` it doesn't
15
+ * touch `selectedDynamicContent`; the getter removes duplicates, so
16
+ * re-registering the same entries is harmless. Items are shallow-copied so Pinia
17
+ * reactivity can't write a later mutation back into the host's catalog.
18
+ */
19
+ registerDynamicContent(t) {
20
+ this.selectedDynamicContentList.push(...t.map((e) => ({ ...e })));
11
21
  }
12
22
  },
13
23
  getters: {
@@ -20,5 +30,5 @@ const s = a("guidoDynamicContent", {
20
30
  }
21
31
  });
22
32
  export {
23
- s as useDynamicContentStore
33
+ c as useDynamicContentStore
24
34
  };
@@ -1,85 +1,88 @@
1
- import { productPairs as N } from "../extensions/Blocks/Items/enums/productEnums.js";
1
+ import { productPairs as q } from "../extensions/Blocks/Items/enums/productEnums.js";
2
2
  import { DefaultConfigValues as O } from "../extensions/Blocks/Items/enums/settingsEnums.js";
3
3
  import { preserveTextStyles as C } from "./preserveTextStyles.js";
4
- function V(L) {
5
- const H = L.replaceAll("{%", "<!--{%").replaceAll("%}", "%}-->"), g = new DOMParser().parseFromString(H, "text/html"), m = N.PAIRS_FOR_EXTENSION;
6
- Object.entries(m).forEach(([r, f]) => {
7
- g.querySelectorAll(".ins-product-td").forEach((c) => {
8
- const A = c.getAttribute("data-number") || "1", y = c.getAttribute("data-type") || "CART_ITEMS";
9
- c.querySelectorAll(`[product-attr="${r}"]`).forEach((t) => {
4
+ import { unwrapProductNameLinks as U } from "./unwrapProductNameLink.js";
5
+ function Y(L) {
6
+ const H = L.replaceAll("{%", "<!--{%").replaceAll("%}", "%}-->"), b = new DOMParser().parseFromString(H, "text/html");
7
+ U(b);
8
+ const R = q.PAIRS_FOR_EXTENSION;
9
+ Object.entries(R).forEach(([r, u]) => {
10
+ b.querySelectorAll(".ins-product-td").forEach((l) => {
11
+ const h = l.getAttribute("data-number") || "1", $ = l.getAttribute("data-type") || "CART_ITEMS";
12
+ l.querySelectorAll(`[product-attr="${r}"]`).forEach((t) => {
10
13
  var F, I, w;
11
- const T = t.getAttribute("data-type") || y, u = t.getAttribute("data-number") || A, d = f[T];
14
+ const T = t.getAttribute("data-type") || $, f = t.getAttribute("data-number") || h, d = u[T];
12
15
  if (d)
13
16
  switch (r) {
14
17
  case "imageSrc": {
15
- let e = null, i = null;
16
- if (t.tagName === "IMG" ? (e = t, i = e.closest("a")) : (e = t.querySelector("img"), i = t.querySelector("a") || t.closest("a")), !e)
18
+ let e = null, c = null;
19
+ if (t.tagName === "IMG" ? (e = t, c = e.closest("a")) : (e = t.querySelector("img"), c = t.querySelector("a") || t.closest("a")), !e)
17
20
  break;
18
- const a = d.DEFAULT, s = d.ATTR;
19
- if (a && e.src) {
21
+ const i = d.DEFAULT, a = d.ATTR;
22
+ if (i && e.src) {
20
23
  const o = e.src;
21
- a.some((h) => {
22
- const l = h.split("/").pop() || "", $ = o.split("/").pop() || "";
23
- return o.includes(h) || o.includes(l) || $ === l;
24
- }) && (e.src = `{{${s}_${u}}}`);
24
+ i.some((E) => {
25
+ const s = E.split("/").pop() || "", g = o.split("/").pop() || "";
26
+ return o.includes(E) || o.includes(s) || g === s;
27
+ }) && (e.src = `{{${a}_${f}}}`);
25
28
  }
26
- const n = (I = (F = m.name) == null ? void 0 : F[T]) == null ? void 0 : I.ATTR;
27
- if (n && e.setAttribute("alt", `{{${n}_${u}}}`), i) {
28
- const o = (w = m.itemLink) == null ? void 0 : w[T];
29
+ const n = (I = (F = R.name) == null ? void 0 : F[T]) == null ? void 0 : I.ATTR;
30
+ if (n && e.setAttribute("alt", `{{${n}_${f}}}`), c) {
31
+ const o = (w = R.itemLink) == null ? void 0 : w[T];
29
32
  if (o) {
30
- const E = o.HREF, h = o.DEFAULT_HREF || "#!", l = i.href;
31
- (l === "#" || l === "" || l.endsWith("#!") || l.endsWith(h) || l === `${window.location.href}${h}` || !l || l === window.location.href) && (i.href = `{{${E}_${u}}}`);
33
+ const A = o.HREF, E = o.DEFAULT_HREF || "#!", s = c.href;
34
+ (s === "#" || s === "" || s.endsWith("#!") || s.endsWith(E) || s === `${window.location.href}${E}` || !s || s === window.location.href) && (c.href = `{{${A}_${f}}}`);
32
35
  }
33
36
  }
34
37
  break;
35
38
  }
36
39
  case "name": {
37
- const e = d, i = e.ATTR, a = e.DEFAULT_HREF || "#!", s = e.HREF;
38
- t.textContent && (t.innerHTML = C(t, `{{${i}_${u}}}`));
40
+ const e = d, c = e.ATTR, i = e.DEFAULT_HREF || "#!", a = e.HREF;
41
+ t.textContent && (t.innerHTML = C(t, `{{${c}_${f}}}`));
39
42
  const n = t.closest("a") || (t.tagName === "A" ? t : null);
40
- if (n && s) {
41
- const o = n.href, E = `${window.location.href}${a}`;
42
- (o === E || o.endsWith(a)) && (n.href = `{{${s}_${u}}}`);
43
+ if (n && a) {
44
+ const o = n.href, A = `${window.location.href}${i}`;
45
+ (o === A || o.endsWith(i)) && (n.href = `{{${a}_${f}}}`);
43
46
  }
44
47
  break;
45
48
  }
46
49
  case "price":
47
50
  case "originalPrice": {
48
- const e = d, i = t.getAttribute("data-formated"), a = t.getAttribute("data-single_price"), s = i === "true", n = a === "true", o = t.getAttribute("data-curency") || "before";
49
- let E;
50
- n ? E = s ? e.SINGLE_PRICE_FORMATTED : e.SINGLE_PRICE : E = s ? e.PRICE_FORMATTED : e.PRICE;
51
- const h = e.CURRENCY;
52
- let l = `{{${E}_${u}}}`;
53
- const $ = (t.getAttribute("data-currency_symbol") || "").trim(), q = $ !== "" && $ !== O.productPriceCurrencySymbolControlValue;
54
- let b = "";
55
- q ? b = $ : h && (b = `{{${h}_${u}}}`), b && (l = o === "after" ? `${l} ${b}` : `${b} ${l}`), t.innerHTML = C(t, l);
51
+ const e = d, c = t.getAttribute("data-formated"), i = t.getAttribute("data-single_price"), a = c === "true", n = i === "true", o = t.getAttribute("data-curency") || "before";
52
+ let A;
53
+ n ? A = a ? e.SINGLE_PRICE_FORMATTED : e.SINGLE_PRICE : A = a ? e.PRICE_FORMATTED : e.PRICE;
54
+ const E = e.CURRENCY;
55
+ let s = `{{${A}_${f}}}`;
56
+ const g = (t.getAttribute("data-currency_symbol") || "").trim(), N = g !== "" && g !== O.productPriceCurrencySymbolControlValue;
57
+ let m = "";
58
+ N ? m = g : E && (m = `{{${E}_${f}}}`), m && (s = o === "after" ? `${s} ${m}` : `${m} ${s}`), t.innerHTML = C(t, s);
56
59
  break;
57
60
  }
58
61
  case "quantity": {
59
- const e = d, i = e.ATTR, a = e.DEFAULT;
60
- t.textContent && t.textContent.trim() === a && (t.innerHTML = C(t, `{{${i}_${u}}}`));
62
+ const e = d, c = e.ATTR, i = e.DEFAULT;
63
+ t.textContent && t.textContent.trim() === i && (t.innerHTML = C(t, `{{${c}_${f}}}`));
61
64
  break;
62
65
  }
63
66
  case "button": {
64
- const e = d, i = e.HREF, a = e.DEFAULT_HREF || "#!", s = t.tagName === "A" ? t : t.querySelector("a");
65
- if (s) {
66
- const n = s.href || "", o = `${window.location.href}${a}`;
67
- (n === "" || n === "#" || n === o || n.endsWith(a) || n.endsWith("#!") || n === window.location.href) && (s.href = `{{${i}_${u}}}`);
67
+ const e = d, c = e.HREF, i = e.DEFAULT_HREF || "#!", a = t.tagName === "A" ? t : t.querySelector("a");
68
+ if (a) {
69
+ const n = a.href || "", o = `${window.location.href}${i}`;
70
+ (n === "" || n === "#" || n === o || n.endsWith(i) || n.endsWith("#!") || n === window.location.href) && (a.href = `{{${c}_${f}}}`);
68
71
  }
69
72
  break;
70
73
  }
71
74
  case "itemLink": {
72
- const e = d, i = e.HREF, a = e.DEFAULT_HREF || "#!", s = t;
73
- if (s.href) {
74
- const n = s.href, o = `${window.location.href}${a}`;
75
- (n === o || n.endsWith(a)) && (s.href = `{{${i}_${u}}}`);
75
+ const e = d, c = e.HREF, i = e.DEFAULT_HREF || "#!", a = t;
76
+ if (a.href) {
77
+ const n = a.href, o = `${window.location.href}${i}`;
78
+ (n === o || n.endsWith(i)) && (a.href = `{{${c}_${f}}}`);
76
79
  }
77
80
  break;
78
81
  }
79
82
  default: {
80
83
  if ("ATTR" in d) {
81
84
  const e = d.ATTR;
82
- t.textContent && (t.innerHTML = C(t, `{{${e}_${u}}}`));
85
+ t.textContent && (t.innerHTML = C(t, `{{${e}_${f}}}`));
83
86
  }
84
87
  break;
85
88
  }
@@ -88,54 +91,54 @@ function V(L) {
88
91
  });
89
92
  });
90
93
  const k = H.match(/<!DOCTYPE[^>]*>/i), P = k ? `${k[0]}
91
- ` : "", D = g.querySelectorAll(".ins-product-td"), M = [];
94
+ ` : "", D = b.querySelectorAll(".ins-product-td"), M = [];
92
95
  D.forEach((r) => {
93
- const f = r.getAttribute("data-type") || "CART_ITEMS", p = r.getAttribute("data-number") || "1", c = r.getAttribute("data-nodup"), A = r.outerHTML;
96
+ const u = r.getAttribute("data-type") || "CART_ITEMS", p = r.getAttribute("data-number") || "1", l = r.outerHTML;
94
97
  M.push({
95
98
  element: r,
96
- outerHtml: A,
97
- type: f,
98
- number: p,
99
- nodup: c || void 0
99
+ outerHtml: l,
100
+ type: u,
101
+ number: p
100
102
  });
101
103
  });
102
- let _ = P + g.documentElement.outerHTML;
103
- M.reverse().forEach(({ outerHtml: r, type: f, number: p }) => {
104
- let c = "";
105
- switch (f) {
104
+ let _ = P + b.documentElement.outerHTML;
105
+ M.reverse().forEach(({ outerHtml: r, type: u, number: p }) => {
106
+ let l = "";
107
+ switch (u) {
106
108
  case "CART_ITEMS":
107
- c = "ins_apr_total_product_kind";
109
+ l = "ins_apr_total_product_kind";
108
110
  break;
109
111
  case "BROWSED_ITEMS":
110
- c = "browsed_item_total_product_kind";
112
+ l = "browsed_item_total_product_kind";
111
113
  break;
112
114
  case "PURCHASED_ITEMS":
113
- c = "purchased_item_total_product_kind";
115
+ l = "purchased_item_total_product_kind";
114
116
  break;
115
117
  }
116
- if (c) {
117
- const y = parseInt(p) - 1, T = `${`{% if ${c} > ${y} %}`}${r}{% endif %}`;
118
+ if (l) {
119
+ const $ = parseInt(p) - 1, T = `${`{% if ${l} > ${$} %}`}${r}{% endif %}`;
118
120
  _ = _.replace(r, T);
119
121
  }
120
122
  });
121
- const x = g.querySelectorAll('[product-attr="originalPrice"][data-type="CART_ITEMS"]'), R = [];
123
+ const x = b.querySelectorAll('[product-attr="originalPrice"][data-type="CART_ITEMS"]'), S = [];
122
124
  return x.forEach((r) => {
123
- const f = r.getAttribute("data-number"), p = r.getAttribute("data-type");
124
- if (!f || p !== "CART_ITEMS")
125
+ var $;
126
+ const u = r.getAttribute("data-number"), p = r.getAttribute("data-type");
127
+ if (!u || p !== "CART_ITEMS" || (($ = r.closest(".ins-product-td")) == null ? void 0 : $.getAttribute("data-nodup")) === "false")
125
128
  return;
126
- const c = r.closest(".product-original-price-class");
127
- if (c) {
128
- const A = c.outerHTML;
129
- R.some((S) => S.tdOuterHtml === A) || R.push({ tdOuterHtml: A, number: f });
129
+ const h = r.closest(".product-original-price-class");
130
+ if (h) {
131
+ const y = h.outerHTML;
132
+ S.some((T) => T.tdOuterHtml === y) || S.push({ tdOuterHtml: y, number: u });
130
133
  }
131
- }), R.reverse().forEach(({ tdOuterHtml: r, number: f }) => {
132
- const p = `{% if ins_apr_price_${f} != ins_apr_originalprice_${f} %}`;
134
+ }), S.reverse().forEach(({ tdOuterHtml: r, number: u }) => {
135
+ const p = `{% if ins_apr_price_${u} != ins_apr_originalprice_${u} %}`;
133
136
  if (!_.includes(p) && !r.includes("{% if")) {
134
- const A = `${p}${r}{% endif %}`;
135
- _ = _.replace(r, A);
137
+ const h = `${p}${r}{% endif %}`;
138
+ _ = _.replace(r, h);
136
139
  }
137
140
  }), _.replaceAll("<!--{%", "{%").replaceAll("%}-->", "%}").replaceAll("&lt;!--{%", "{%").replaceAll("%}--&gt;", "%}");
138
141
  }
139
142
  export {
140
- V as pairProductVariables
143
+ Y as pairProductVariables
141
144
  };
@@ -0,0 +1,23 @@
1
+ import { DATA_ATTRIBUTE_REGEX as T } from "../enums/html-validator.js";
2
+ const d = /{{([a-zA-Z0-9_.\s]*)}}/gm, h = (n, e) => {
3
+ if (!e || e.length === 0)
4
+ return { matched: [], unmatchedTokens: [] };
5
+ const s = n.replace(T, "$1").match(d);
6
+ if (!s)
7
+ return { matched: [], unmatchedTokens: [] };
8
+ const u = new Map(
9
+ e.map((c) => [c.value.trim().toLowerCase(), c])
10
+ ), a = /* @__PURE__ */ new Set(), o = [], m = [];
11
+ return s.forEach((c) => {
12
+ const t = c.slice(2, -2).trim().toLowerCase();
13
+ if (t === "" || a.has(t))
14
+ return;
15
+ a.add(t);
16
+ const r = u.get(t);
17
+ r ? o.push(r) : m.push(t);
18
+ }), { matched: o, unmatchedTokens: m };
19
+ }, E = (n, e) => h(n, e).matched, k = (n, e) => h(n, e).unmatchedTokens;
20
+ export {
21
+ E as extractUsedDynamicContent,
22
+ k as getUnmatchedDynamicContentTokens
23
+ };
@@ -0,0 +1,37 @@
1
+ const f = "text-decoration", A = /(?:[^;"'()]|"[^"]*"|'[^']*'|\([^)]*\))+/g, c = (e) => (e.match(A) || []).map((r) => r.trim()).filter(Boolean), l = (e) => e.slice(0, e.indexOf(":")).trim().toLowerCase(), m = (e) => e.slice(e.indexOf(":") + 1).trim().toLowerCase(), u = (e, r) => {
2
+ const s = e.getAttribute("style");
3
+ if (!s)
4
+ return;
5
+ const t = c(r.getAttribute("style") || ""), i = new Set(t.map(l)), o = c(s).filter((n) => {
6
+ const a = l(n);
7
+ return !a || i.has(a) ? !1 : !a.startsWith(f) && m(n) !== "inherit";
8
+ });
9
+ o.length && r.setAttribute("style", [...t, ...o].join("; "));
10
+ }, y = ["product-attr", "data-type", "data-number", "data-slot-2"], p = (e, r) => {
11
+ y.forEach((s) => {
12
+ const t = e.getAttribute(s);
13
+ t !== null && !r.hasAttribute(s) && r.setAttribute(s, t);
14
+ });
15
+ };
16
+ function E(e) {
17
+ e.querySelectorAll(".ins-product-td").forEach((r) => {
18
+ const s = /* @__PURE__ */ new Set();
19
+ r.querySelectorAll('[product-attr="name"]').forEach((t) => {
20
+ const i = t.closest("a");
21
+ i && r.contains(i) && s.add(i);
22
+ }), s.forEach((t) => {
23
+ if (t.querySelector("img") || Array.from(t.querySelectorAll("[product-attr]")).some((a) => a.getAttribute("product-attr") !== "name"))
24
+ return;
25
+ const o = t.closest("p");
26
+ if (o && r.contains(o)) {
27
+ p(t, o), u(t, o), t.replaceWith(...Array.from(t.childNodes));
28
+ return;
29
+ }
30
+ const n = e.createElement("span");
31
+ p(t, n), u(t, n), n.append(...Array.from(t.childNodes)), t.replaceWith(n);
32
+ });
33
+ });
34
+ }
35
+ export {
36
+ E as unwrapProductNameLinks
37
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useinsider/guido",
3
- "version": "3.13.1",
3
+ "version": "3.14.0-beta.0a46bdf",
4
4
  "description": "Guido is a Vue + TypeScript wrapper for Email Plugin. Easily embed the email editor in your Vue applications.",
5
5
  "main": "./dist/guido.umd.cjs",
6
6
  "module": "./dist/library.js",
@@ -43,8 +43,8 @@
43
43
  "author": "",
44
44
  "license": "ISC",
45
45
  "dependencies": {
46
- "@stripoinc/ui-editor-extensions": "3.8.0",
47
- "@useinsider/design-system-vue": "1.3.0",
46
+ "@stripoinc/ui-editor-extensions": "3.9.0",
47
+ "@useinsider/design-system-vue": "1.5.0",
48
48
  "@vueuse/core": "11.3.0",
49
49
  "lodash-es": "4.17.21",
50
50
  "pinia": "2.3.1",
@@ -113,7 +113,7 @@
113
113
  },
114
114
  "guido": {
115
115
  "stripo": {
116
- "version": "2.69.1"
116
+ "version": "2.72.1"
117
117
  }
118
118
  }
119
119
  }