@useinsider/guido 3.18.1-beta.fefef3c → 3.18.2-beta.3e1d9ab
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -21
- package/dist/@types/config/schemas.js +51 -59
- package/dist/components/Guido.vue.js +4 -4
- package/dist/components/Guido.vue2.js +53 -55
- package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +7 -7
- package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +57 -82
- package/dist/components/organisms/extensions/recommendation/RemoveStrategyModal.vue2.js +22 -24
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +24 -28
- package/dist/components/organisms/save-as-template/SaveAsTemplateDrawer.vue2.js +34 -34
- package/dist/composables/useCustomInterfaceAppearance.js +42 -46
- package/dist/composables/useHttp.js +24 -22
- package/dist/enums/extensions/recommendationBlock.js +14 -17
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +85 -80
- package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +28 -72
- package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +44 -45
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +48 -93
- package/dist/extensions/Blocks/Recommendation/utils/nodeConfigWriter.js +7 -7
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +29 -28
- package/dist/package.json.js +1 -1
- package/dist/services/recommendationApi.js +84 -93
- package/dist/services/templateLibraryApi.js +17 -14
- package/dist/src/@types/config/schemas.d.ts +0 -16
- package/dist/src/composables/useConfig.d.ts +0 -4
- package/dist/src/enums/extensions/recommendationBlock.d.ts +0 -3
- package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +5 -1
- package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +0 -2
- package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +0 -4
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +13 -54
- package/dist/src/services/recommendationApi.d.ts +1 -2
- package/dist/src/stores/config.d.ts +0 -322
- package/dist/src/stores/onboarding.d.ts +10 -808
- package/dist/src/utils/genericUtil.d.ts +6 -0
- package/dist/src/utils/liquidDynamicContent.d.ts +20 -0
- package/dist/static/styles/components/recommendation-strategy.css.js +5 -70
- package/dist/stores/config.js +60 -74
- package/dist/stores/onboarding.js +36 -46
- package/dist/utils/genericUtil.js +63 -54
- package/dist/utils/liquidDynamicContent.js +15 -0
- package/dist/utils/templatePreparation.js +54 -52
- package/package.json +3 -3
- package/dist/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.js +0 -18
- package/dist/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue2.js +0 -25
- package/dist/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue.js +0 -21
- package/dist/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue2.js +0 -46
- package/dist/components/organisms/onboarding/RecommendationStrategyOnboarding.vue.js +0 -21
- package/dist/components/organisms/onboarding/RecommendationStrategyOnboarding.vue2.js +0 -46
- package/dist/composables/useLegacyStrategyConversion.js +0 -61
- package/dist/extensions/Blocks/Recommendation/utils/legacyStrategyMigration.js +0 -72
- package/dist/src/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.d.ts +0 -2
- package/dist/src/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue.d.ts +0 -2
- package/dist/src/components/organisms/onboarding/RecommendationStrategyOnboarding.vue.d.ts +0 -2
- package/dist/src/composables/useLegacyStrategyConversion.d.ts +0 -3
- package/dist/src/extensions/Blocks/Recommendation/utils/legacyStrategyMigration.d.ts +0 -44
- package/dist/static/assets/icons/filled-arrow-rising.svg.js +0 -5
- package/dist/static/assets/icons/line-info.svg.js +0 -5
|
@@ -21,7 +21,7 @@ ${s.map((o) => ` - ${o}`).join(`
|
|
|
21
21
|
* This validation runs only once per class type and results are cached.
|
|
22
22
|
*/
|
|
23
23
|
validateImplementation(t, r) {
|
|
24
|
-
var
|
|
24
|
+
var P;
|
|
25
25
|
const s = [], o = r.name, W = Object.getPrototypeOf(this);
|
|
26
26
|
t.forEach((u) => {
|
|
27
27
|
if (typeof this[u] != "function") {
|
|
@@ -29,7 +29,7 @@ ${s.map((o) => ` - ${o}`).join(`
|
|
|
29
29
|
return;
|
|
30
30
|
}
|
|
31
31
|
W[u] === r.prototype[u] && s.push(`Method ${u}() must be implemented (currently using base class error-throwing implementation)`);
|
|
32
|
-
}), d.validatedClasses.add(r), s.length > 0 ? (d.validationErrors.set(r, s), console.error(`[${o} Validation] ${o} validation failed:`, s)) : typeof process < "u" && ((
|
|
32
|
+
}), d.validatedClasses.add(r), s.length > 0 ? (d.validationErrors.set(r, s), console.error(`[${o} Validation] ${o} validation failed:`, s)) : typeof process < "u" && ((P = process.env) == null ? void 0 : P.NODE_ENV) === "development" && console.log(`[${o} Validation] ✅ ${o} validated successfully`);
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
35
35
|
* Lifecycle method for cleaning up resources (e.g., removing DOM artifacts from document.body).
|
|
@@ -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 || {}),
|
|
44
|
+
var i = v, z = /* @__PURE__ */ ((e) => (e.BLOCK = "BLOCK", e.CONTAINER = "CONTAINER", e.STRUCTURE = "STRUCTURE", e.STRIPE = "STRIPE", e))(z || {}), y = class c extends i {
|
|
45
45
|
constructor() {
|
|
46
|
-
super(
|
|
46
|
+
super(c.REQUIRED_METHODS, c);
|
|
47
47
|
}
|
|
48
48
|
/**
|
|
49
49
|
* Determines if the block should be available for use in the editor.
|
|
@@ -221,10 +221,10 @@ var i = v, z = /* @__PURE__ */ ((e) => (e.BLOCK = "BLOCK", e.CONTAINER = "CONTAI
|
|
|
221
221
|
throw new Error("Method getDescription() must be implemented by the subclass");
|
|
222
222
|
}
|
|
223
223
|
};
|
|
224
|
-
|
|
225
|
-
var qe =
|
|
224
|
+
y.REQUIRED_METHODS = ["getId", "getTemplate", "getIcon", "getName", "getDescription"];
|
|
225
|
+
var qe = y, Z = class T extends i {
|
|
226
226
|
constructor() {
|
|
227
|
-
super(
|
|
227
|
+
super(T.REQUIRED_METHODS, T);
|
|
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.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 || {}),
|
|
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.LETTER_SPACING = "textBlockLetterSpacing", 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 || {}), X = /* @__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))(X || {}), 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
|
-
BLOCK_IMAGE:
|
|
345
|
+
BLOCK_IMAGE: X,
|
|
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 || {}),
|
|
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 = {
|
|
348
348
|
name: "name",
|
|
349
349
|
disabled: "disabled"
|
|
350
350
|
}, he = {
|
|
@@ -369,18 +369,19 @@ var j = {
|
|
|
369
369
|
hint: "hint"
|
|
370
370
|
}, Le = {
|
|
371
371
|
...a,
|
|
372
|
-
type: "type"
|
|
372
|
+
type: "type",
|
|
373
|
+
icon: "icon"
|
|
373
374
|
}, _e = {
|
|
374
375
|
...a,
|
|
375
376
|
buttons: "buttons"
|
|
376
|
-
},
|
|
377
|
+
}, p = {
|
|
377
378
|
...a,
|
|
378
379
|
searchable: "searchable",
|
|
379
380
|
multiSelect: "multi-select",
|
|
380
381
|
placeholder: "placeholder",
|
|
381
382
|
items: "items"
|
|
382
383
|
}, Ce = {
|
|
383
|
-
...
|
|
384
|
+
...p,
|
|
384
385
|
addCustomFontOption: "add-custom-font-option"
|
|
385
386
|
}, Ae = {
|
|
386
387
|
...a,
|
|
@@ -422,10 +423,10 @@ var j = {
|
|
|
422
423
|
}, xe = {
|
|
423
424
|
...a,
|
|
424
425
|
controlId: "control-id"
|
|
425
|
-
},
|
|
426
|
+
}, Pe = {
|
|
426
427
|
...a,
|
|
427
428
|
expanded: "expanded"
|
|
428
|
-
},
|
|
429
|
+
}, ye = {
|
|
429
430
|
...a,
|
|
430
431
|
icon: "icon",
|
|
431
432
|
position: "position"
|
|
@@ -455,7 +456,7 @@ var j = {
|
|
|
455
456
|
LABEL: Re,
|
|
456
457
|
MESSAGE: Le,
|
|
457
458
|
RADIO_BUTTONS: _e,
|
|
458
|
-
SELECTPICKER:
|
|
459
|
+
SELECTPICKER: p,
|
|
459
460
|
FONT_FAMILY_SELECT: Ce,
|
|
460
461
|
SWITCHER: a,
|
|
461
462
|
TEXT: Me,
|
|
@@ -465,15 +466,15 @@ var j = {
|
|
|
465
466
|
SELECT_ITEM: Ae,
|
|
466
467
|
RADIO_ITEM: Se,
|
|
467
468
|
NESTED_CONTROL: xe,
|
|
468
|
-
EXPANDABLE:
|
|
469
|
-
ORDERABLE:
|
|
469
|
+
EXPANDABLE: Pe,
|
|
470
|
+
ORDERABLE: ye,
|
|
470
471
|
ORDERABLE_ITEM: Ue,
|
|
471
472
|
ORDERABLE_ICON: we,
|
|
472
473
|
REPEATABLE: Ke,
|
|
473
474
|
DRAGGABLE_BLOCK: Fe,
|
|
474
475
|
AMP_FORM_SERVICE_PICKER: He,
|
|
475
476
|
MULTIPLE_SELECT: ke
|
|
476
|
-
},
|
|
477
|
+
}, Xe = /* @__PURE__ */ ((e) => (e.BUTTON = "UE-BUTTON", e.CHECKBOX = "UE-CHECKBOX", e.CHECK_BUTTONS = "UE-CHECK-BUTTONS", e.COLOR = "UE-COLOR", e.COUNTER = "UE-COUNTER", e.DATEPICKER = "UE-DATEPICKER", e.LABEL = "UE-LABEL", e.MESSAGE = "UE-MESSAGE", e.RADIO_BUTTONS = "UE-RADIO-BUTTONS", e.SELECTPICKER = "UE-SELECT", e.SWITCHER = "UE-SWITCHER", e.TEXT = "UE-TEXT", e.RICH_TEXT = "UE-RICH-TEXT", e.TEXTAREA = "UE-TEXTAREA", e.CHECK_ITEM = "UE-CHECK-ITEM", e.RADIO_ITEM = "UE-RADIO-ITEM", e.SELECT_ITEM = "UE-SELECT-ITEM", e.ICON = "UE-ICON", e.MERGETAGS = "UE-MERGETAGS", e.FONT_FAMILY_SELECT = "UE-FONT-FAMILY-SELECT", e.NESTED_CONTROL = "UE-NESTED-CONTROL", e.EXPANDABLE = "UE-EXPANDABLE", e.EXPANDABLE_HEADER = "UE-EXPANDABLE_HEADER", e.EXPANDABLE_CONTENT = "UE-EXPANDABLE_CONTENT", e.ORDERABLE = "UE-ORDERABLE", e.ORDERABLE_ITEM = "UE-ORDERABLE-ITEM", e.ORDERABLE_ICON = "UE-ORDERABLE-ICON", e.REPEATABLE = "UE-REPEATABLE", e.DRAGGABLE_BLOCK = "UE-DRAGGABLE-BLOCK", e.AMP_FORM_SERVICE_PICKER = "UE-AMP-FORM-SERVICE-PICKER", e.MULTIPLE_SELECT = "UE-MULTIPLE_SELECT", e.SCROLLABLE = "UE-SCROLLABLE-CONTAINER", e.POPUP_PANEL = "UE-POPUP-PANEL", e))(Xe || {}), x = class {
|
|
477
478
|
/**
|
|
478
479
|
* @description returns map of nodes parent control operates on
|
|
479
480
|
*/
|
|
@@ -619,7 +620,7 @@ var j = {
|
|
|
619
620
|
}
|
|
620
621
|
};
|
|
621
622
|
G.REQUIRED_METHODS = ["getId", "getTemplate"];
|
|
622
|
-
var
|
|
623
|
+
var ct = G, pe = class m extends i {
|
|
623
624
|
constructor() {
|
|
624
625
|
super(m.REQUIRED_METHODS, m);
|
|
625
626
|
}
|
|
@@ -688,13 +689,13 @@ var Tt = G, Xe = class m extends i {
|
|
|
688
689
|
onDestroy() {
|
|
689
690
|
}
|
|
690
691
|
};
|
|
691
|
-
|
|
692
|
+
pe.REQUIRED_METHODS = ["getId", "getIcon", "getName", "getTemplate", "getTabIndex"];
|
|
692
693
|
var V = class extends x {
|
|
693
694
|
getTargetNodes(e) {
|
|
694
695
|
const t = e.querySelectorAll(I.IMAGE), r = e.asElement().hasClass(K) ? [e] : [];
|
|
695
696
|
return t.length ? t : r;
|
|
696
697
|
}
|
|
697
|
-
},
|
|
698
|
+
}, Tt = class extends V {
|
|
698
699
|
getParentControlId() {
|
|
699
700
|
return n.BLOCK_IMAGE.EXTERNAL_INDENTS;
|
|
700
701
|
}
|
|
@@ -1215,17 +1216,17 @@ export {
|
|
|
1215
1216
|
It as ButtonTextStyleAndFontColorBuiltInControl,
|
|
1216
1217
|
ue as ContainerControls,
|
|
1217
1218
|
Ie as ContextActionType,
|
|
1218
|
-
|
|
1219
|
-
|
|
1219
|
+
ct as Control,
|
|
1220
|
+
ce as EditorStatePropertyType,
|
|
1220
1221
|
Ve as Extension,
|
|
1221
1222
|
Nt as ExtensionBuilder,
|
|
1222
1223
|
F as GeneralControls,
|
|
1223
1224
|
Dt as IconsRegistry,
|
|
1224
|
-
|
|
1225
|
-
|
|
1225
|
+
X as ImageControls,
|
|
1226
|
+
Tt as ImageMarginsBuiltInControl,
|
|
1226
1227
|
bt as ImageSizeBuiltInControl,
|
|
1227
1228
|
St as ModificationDescription,
|
|
1228
|
-
|
|
1229
|
+
Te as PreviewDeviceMode,
|
|
1229
1230
|
ht as SettingsPanelRegistry,
|
|
1230
1231
|
mt as SettingsPanelTab,
|
|
1231
1232
|
be as SettingsTab,
|
|
@@ -1240,5 +1241,5 @@ export {
|
|
|
1240
1241
|
et as UEAttr,
|
|
1241
1242
|
Mt as UIElement,
|
|
1242
1243
|
Bt as UIElementTagRegistry,
|
|
1243
|
-
|
|
1244
|
+
Xe as UIElementType
|
|
1244
1245
|
};
|
package/dist/package.json.js
CHANGED
|
@@ -1,100 +1,91 @@
|
|
|
1
|
-
import { useHttp as
|
|
2
|
-
import { URLS as
|
|
3
|
-
const
|
|
4
|
-
(
|
|
5
|
-
attributeName:
|
|
6
|
-
attributeJs:
|
|
7
|
-
attributeType:
|
|
8
|
-
type:
|
|
9
|
-
displayName:
|
|
10
|
-
isFilterable:
|
|
11
|
-
},
|
|
1
|
+
import { useHttp as l } from "../composables/useHttp.js";
|
|
2
|
+
import { URLS as m, QUERY_PARAMS as u } from "../enums/extensions/recommendationBlock.js";
|
|
3
|
+
const y = "[sr_strategies.status][=][active]*[sr_strategies.suitable_channels][~][EMAIL]", R = (c) => c.reduce(
|
|
4
|
+
(s, r, i) => (s[i] = {
|
|
5
|
+
attributeName: r.attributeName,
|
|
6
|
+
attributeJs: r.attributeJs,
|
|
7
|
+
attributeType: r.attributeType,
|
|
8
|
+
type: r.type,
|
|
9
|
+
displayName: r.displayName,
|
|
10
|
+
isFilterable: r.isFilterable
|
|
11
|
+
}, s),
|
|
12
12
|
{}
|
|
13
|
-
),
|
|
14
|
-
const { get:
|
|
15
|
-
try {
|
|
16
|
-
return (await i(`${c.NEWSLETTER_RECOMMENDATIONS_PATH}/create-data`)).data;
|
|
17
|
-
} catch (t) {
|
|
18
|
-
throw console.error("fetchUserModalState error:", t), t;
|
|
19
|
-
}
|
|
20
|
-
}, R = async () => {
|
|
21
|
-
try {
|
|
22
|
-
const { data: t } = await i(
|
|
23
|
-
c.PRODUCT_ATTRIBUTES_PATH
|
|
24
|
-
), a = Array.isArray(t) ? t : (t == null ? void 0 : t.data) ?? [];
|
|
25
|
-
return S(a);
|
|
26
|
-
} catch (t) {
|
|
27
|
-
throw console.error("fetchRecommendationFilters error:", t), t;
|
|
28
|
-
}
|
|
29
|
-
}, l = async (t, a) => {
|
|
30
|
-
var e;
|
|
31
|
-
try {
|
|
32
|
-
const r = new URLSearchParams(Object.entries(a));
|
|
33
|
-
r.set(m.CLIENT_ID, E);
|
|
34
|
-
const n = decodeURIComponent(r.toString());
|
|
35
|
-
console.debug("🏁 Recommendation API Query:", n);
|
|
36
|
-
const s = await o(
|
|
37
|
-
`${c.RECOMMENDATION_API_URL}/v2/${t}?${n}`
|
|
38
|
-
);
|
|
39
|
-
return ((e = s == null ? void 0 : s.data) == null ? void 0 : e.data) ?? [];
|
|
40
|
-
} catch (r) {
|
|
41
|
-
throw console.error("fetchRecommendationProducts error:", r), r;
|
|
42
|
-
}
|
|
43
|
-
}, g = async (t) => {
|
|
44
|
-
var a;
|
|
45
|
-
try {
|
|
46
|
-
const e = new RegExp(`[?&]${m.CLIENT_ID}=`).test(t), r = t.includes("?") ? "&" : "?", n = e ? t : `${t}${r}${m.CLIENT_ID}=${E}`, s = await o(
|
|
47
|
-
n
|
|
48
|
-
);
|
|
49
|
-
return ((a = s == null ? void 0 : s.data) == null ? void 0 : a.data) ?? [];
|
|
50
|
-
} catch (e) {
|
|
51
|
-
return console.error("fetchRecommendationProductsByUrl error:", e), [];
|
|
52
|
-
}
|
|
53
|
-
}, p = async () => {
|
|
54
|
-
try {
|
|
55
|
-
const { data: t } = await i(
|
|
56
|
-
`${c.RECOMMENDATION_STRATEGIES_PATH}?filters=${encodeURIComponent(h)}`
|
|
57
|
-
);
|
|
58
|
-
return Array.isArray(t) ? t : (t == null ? void 0 : t.data) ?? [];
|
|
59
|
-
} catch (t) {
|
|
60
|
-
throw console.error("fetchRecommendationStrategies error:", t), t;
|
|
61
|
-
}
|
|
62
|
-
}, I = async (t, a) => {
|
|
63
|
-
try {
|
|
64
|
-
const { data: e } = await d(
|
|
65
|
-
`${c.RECOMMENDATION_STRATEGIES_PATH}/endpoint-generate`,
|
|
66
|
-
{
|
|
67
|
-
campaignId: 0,
|
|
68
|
-
pageTypes: [],
|
|
69
|
-
isPreviewer: !1,
|
|
70
|
-
strategy: t,
|
|
71
|
-
userId: "",
|
|
72
|
-
currency: a
|
|
73
|
-
}
|
|
74
|
-
);
|
|
75
|
-
return !e || typeof e != "object" || !("full_path" in e || "data" in e) ? (console.error("generateStrategyEndpoint unexpected response shape:", e), null) : "full_path" in e ? e : e.data;
|
|
76
|
-
} catch (e) {
|
|
77
|
-
return console.error("generateStrategyEndpoint error:", e), null;
|
|
78
|
-
}
|
|
79
|
-
}, A = (t) => t.scope === "template" ? `${c.NEWSLETTER_RECOMMENDATIONS_PATH}/${_}/${u}` : `${c.NEWSLETTER_RECOMMENDATIONS_PATH}/${u}`;
|
|
13
|
+
), _ = () => {
|
|
14
|
+
const { get: c, post: s } = l(), { get: r } = l({ headers: {} }), i = "6KcLM9TwheVB1mgK";
|
|
80
15
|
return {
|
|
81
|
-
fetchRecommendationCreateData:
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
16
|
+
fetchRecommendationCreateData: async () => {
|
|
17
|
+
try {
|
|
18
|
+
return (await c("/newsletter/recommendations/create-data")).data;
|
|
19
|
+
} catch (e) {
|
|
20
|
+
throw console.error("fetchUserModalState error:", e), e;
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
fetchRecommendationFilters: async () => {
|
|
24
|
+
try {
|
|
25
|
+
const { data: e } = await c(
|
|
26
|
+
m.PRODUCT_ATTRIBUTES_PATH
|
|
27
|
+
), o = Array.isArray(e) ? e : (e == null ? void 0 : e.data) ?? [];
|
|
28
|
+
return R(o);
|
|
29
|
+
} catch (e) {
|
|
30
|
+
throw console.error("fetchRecommendationFilters error:", e), e;
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
fetchRecommendationProducts: async (e, o) => {
|
|
34
|
+
var t;
|
|
35
|
+
try {
|
|
36
|
+
const n = new URLSearchParams(Object.entries(o));
|
|
37
|
+
n.set(u.CLIENT_ID, i);
|
|
38
|
+
const d = decodeURIComponent(n.toString());
|
|
39
|
+
console.debug("🏁 Recommendation API Query:", d);
|
|
40
|
+
const a = await r(
|
|
41
|
+
`${m.RECOMMENDATION_API_URL}/v2/${e}?${d}`
|
|
42
|
+
);
|
|
43
|
+
return ((t = a == null ? void 0 : a.data) == null ? void 0 : t.data) ?? [];
|
|
44
|
+
} catch (n) {
|
|
45
|
+
throw console.error("fetchRecommendationProducts error:", n), n;
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
fetchRecommendationProductsByUrl: async (e) => {
|
|
49
|
+
var o;
|
|
50
|
+
try {
|
|
51
|
+
const t = new RegExp(`[?&]${u.CLIENT_ID}=`).test(e), n = e.includes("?") ? "&" : "?", d = t ? e : `${e}${n}${u.CLIENT_ID}=${i}`, a = await r(
|
|
52
|
+
d
|
|
53
|
+
);
|
|
54
|
+
return ((o = a == null ? void 0 : a.data) == null ? void 0 : o.data) ?? [];
|
|
55
|
+
} catch (t) {
|
|
56
|
+
return console.error("fetchRecommendationProductsByUrl error:", t), [];
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
fetchRecommendationStrategies: async () => {
|
|
60
|
+
try {
|
|
61
|
+
const { data: e } = await c(
|
|
62
|
+
`${m.RECOMMENDATION_STRATEGIES_PATH}?filters=${encodeURIComponent(y)}`
|
|
63
|
+
);
|
|
64
|
+
return Array.isArray(e) ? e : (e == null ? void 0 : e.data) ?? [];
|
|
65
|
+
} catch (e) {
|
|
66
|
+
throw console.error("fetchRecommendationStrategies error:", e), e;
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
generateStrategyEndpoint: async (e, o) => {
|
|
70
|
+
try {
|
|
71
|
+
const { data: t } = await s(
|
|
72
|
+
`${m.RECOMMENDATION_STRATEGIES_PATH}/endpoint-generate`,
|
|
73
|
+
{
|
|
74
|
+
campaignId: 0,
|
|
75
|
+
pageTypes: [],
|
|
76
|
+
isPreviewer: !1,
|
|
77
|
+
strategy: e,
|
|
78
|
+
userId: "",
|
|
79
|
+
currency: o
|
|
80
|
+
}
|
|
81
|
+
);
|
|
82
|
+
return !t || typeof t != "object" || !("full_path" in t || "data" in t) ? (console.error("generateStrategyEndpoint unexpected response shape:", t), null) : "full_path" in t ? t : t.data;
|
|
83
|
+
} catch (t) {
|
|
84
|
+
return console.error("generateStrategyEndpoint error:", t), null;
|
|
85
|
+
}
|
|
95
86
|
}
|
|
96
87
|
};
|
|
97
88
|
};
|
|
98
89
|
export {
|
|
99
|
-
|
|
90
|
+
_ as useRecommendationApi
|
|
100
91
|
};
|
|
@@ -4,13 +4,14 @@ import { useToaster as C } from "../composables/useToaster.js";
|
|
|
4
4
|
import { useTranslations as h } from "../composables/useTranslations.js";
|
|
5
5
|
import { useLiquidValidator as S } from "../composables/validators/useLiquidValidator.js";
|
|
6
6
|
import { EditorType as v } from "../enums/defaults.js";
|
|
7
|
-
import { ToasterTypeOptions as
|
|
8
|
-
import { useRecommendationExtensionStore as
|
|
9
|
-
import { useSaveAsTemplateStore as
|
|
7
|
+
import { ToasterTypeOptions as x } from "../enums/toaster.js";
|
|
8
|
+
import { useRecommendationExtensionStore as E } from "../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
9
|
+
import { useSaveAsTemplateStore as N } from "../stores/save-as-template.js";
|
|
10
10
|
import { base64EncodeWithSpecialChars as r } from "../utils/base64.js";
|
|
11
|
+
import { isPlainObject as P } from "../utils/genericUtil.js";
|
|
11
12
|
import { useTemplatePreparation as A } from "../utils/templatePreparation.js";
|
|
12
|
-
const
|
|
13
|
-
const { get: n, post: m } = b(), { handleError: o, showToaster: l } = C(), { config: c, isFeatureEnabled: p } = w(), { validateLiquidSyntax:
|
|
13
|
+
const B = () => {
|
|
14
|
+
const { get: n, post: m } = b(), { handleError: o, showToaster: l } = C(), { config: c, isFeatureEnabled: p } = w(), { validateLiquidSyntax: f } = S(), u = h();
|
|
14
15
|
return {
|
|
15
16
|
getCategories: async () => {
|
|
16
17
|
try {
|
|
@@ -40,10 +41,10 @@ const j = () => {
|
|
|
40
41
|
createTemplate: async () => {
|
|
41
42
|
var e, t, d, y;
|
|
42
43
|
try {
|
|
43
|
-
const { prepareTemplateDetails: i } = A(), s =
|
|
44
|
-
if (p("liquidSyntax") && !await
|
|
44
|
+
const { prepareTemplateDetails: i } = A(), s = N(), a = await i();
|
|
45
|
+
if (p("liquidSyntax") && !await f(a.compiledHtml))
|
|
45
46
|
return !1;
|
|
46
|
-
const
|
|
47
|
+
const T = {
|
|
47
48
|
name: s.getTemplateName,
|
|
48
49
|
categories: s.getSelectedCategoryIds,
|
|
49
50
|
productId: ((t = (e = c.value) == null ? void 0 : e.partner) == null ? void 0 : t.productType) || 0,
|
|
@@ -54,7 +55,7 @@ const j = () => {
|
|
|
54
55
|
unsubscriptionPreferencePageStatus: !1,
|
|
55
56
|
unsubscriptionPreferencePages: [],
|
|
56
57
|
recommendationCampaignUrls: r(
|
|
57
|
-
|
|
58
|
+
E().recommendationCampaignUrls
|
|
58
59
|
),
|
|
59
60
|
recommendationConfigs: r({}),
|
|
60
61
|
isGuido: !0,
|
|
@@ -66,16 +67,18 @@ const j = () => {
|
|
|
66
67
|
css: a.css,
|
|
67
68
|
dynamicContentList: a.dynamicContentList
|
|
68
69
|
})
|
|
69
|
-
}, { data:
|
|
70
|
+
}, { data: g } = await m(
|
|
70
71
|
"/newsletter/template-library/create-template",
|
|
71
|
-
|
|
72
|
+
T
|
|
72
73
|
);
|
|
73
|
-
|
|
74
|
+
if (!P(g))
|
|
75
|
+
throw new Error("Unexpected create-template response");
|
|
76
|
+
return g.type === "alert" ? (l({
|
|
74
77
|
message: u(
|
|
75
78
|
"newsletter.template-library-save-alert",
|
|
76
79
|
{ templateName: s.getTemplateName }
|
|
77
80
|
),
|
|
78
|
-
type:
|
|
81
|
+
type: x.Error
|
|
79
82
|
}), !1) : (l({
|
|
80
83
|
message: u(
|
|
81
84
|
"newsletter.template-library-save-success",
|
|
@@ -90,5 +93,5 @@ const j = () => {
|
|
|
90
93
|
};
|
|
91
94
|
};
|
|
92
95
|
export {
|
|
93
|
-
|
|
96
|
+
B as useTemplateLibraryApi
|
|
94
97
|
};
|
|
@@ -50,14 +50,6 @@ export declare const IdentitySchema: v.ObjectSchema<{
|
|
|
50
50
|
readonly userId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, "userId is required">]>;
|
|
51
51
|
/** Optional variation ID for A/B testing */
|
|
52
52
|
readonly variationId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
53
|
-
/** Optional numeric campaign ID of the host campaign; absent for templates and modules */
|
|
54
|
-
readonly campaignId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
55
|
-
/**
|
|
56
|
-
* Optional numeric template-library id of the host template; absent for campaigns and
|
|
57
|
-
* modules. Distinct from `templateId`, which is the editor's document identity (a uuid /
|
|
58
|
-
* Stripo doc id) and is never an endpoint id.
|
|
59
|
-
*/
|
|
60
|
-
readonly templateLibraryId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
61
53
|
}, undefined>;
|
|
62
54
|
/**
|
|
63
55
|
* Partner configuration - organization and product context
|
|
@@ -633,14 +625,6 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
|
|
|
633
625
|
readonly userId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, "userId is required">]>;
|
|
634
626
|
/** Optional variation ID for A/B testing */
|
|
635
627
|
readonly variationId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
636
|
-
/** Optional numeric campaign ID of the host campaign; absent for templates and modules */
|
|
637
|
-
readonly campaignId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
638
|
-
/**
|
|
639
|
-
* Optional numeric template-library id of the host template; absent for campaigns and
|
|
640
|
-
* modules. Distinct from `templateId`, which is the editor's document identity (a uuid /
|
|
641
|
-
* Stripo doc id) and is never an endpoint id.
|
|
642
|
-
*/
|
|
643
|
-
readonly templateLibraryId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
644
628
|
}, undefined>;
|
|
645
629
|
/** Partner configuration (required) */
|
|
646
630
|
readonly partner: v.ObjectSchema<{
|
|
@@ -11,8 +11,6 @@ export declare const useConfig: () => {
|
|
|
11
11
|
templateId: string;
|
|
12
12
|
userId: string;
|
|
13
13
|
variationId?: string | undefined;
|
|
14
|
-
campaignId?: string | undefined;
|
|
15
|
-
templateLibraryId?: string | undefined;
|
|
16
14
|
};
|
|
17
15
|
partner: {
|
|
18
16
|
name: string;
|
|
@@ -148,8 +146,6 @@ export declare const useConfig: () => {
|
|
|
148
146
|
templateId: string;
|
|
149
147
|
userId: string;
|
|
150
148
|
variationId?: string | undefined;
|
|
151
|
-
campaignId?: string | undefined;
|
|
152
|
-
templateLibraryId?: string | undefined;
|
|
153
149
|
} | null>;
|
|
154
150
|
partner: import("vue").ComputedRef<{
|
|
155
151
|
name: string;
|
|
@@ -5,10 +5,7 @@ export declare const URLS: {
|
|
|
5
5
|
PRODUCT_ATTRIBUTES_PATH: string;
|
|
6
6
|
RECOMMENDATION_STRATEGIES_PATH: string;
|
|
7
7
|
RECOMMENDATION_STRATEGIES_PANEL_PATH: string;
|
|
8
|
-
NEWSLETTER_RECOMMENDATIONS_PATH: string;
|
|
9
8
|
};
|
|
10
|
-
export declare const MIGRATE_STRATEGIES_SEGMENT = "migrate-strategies";
|
|
11
|
-
export declare const TEMPLATE_MIGRATION_SCOPE_SEGMENT = "template";
|
|
12
9
|
export declare const QUERY_PARAMS: {
|
|
13
10
|
CLIENT_ID: string;
|
|
14
11
|
};
|
|
@@ -20,7 +20,6 @@ export * from './utils';
|
|
|
20
20
|
export declare class RecommendationBlockControl extends CommonControl {
|
|
21
21
|
private store;
|
|
22
22
|
private storeUnsubscription;
|
|
23
|
-
private syncedConfigs;
|
|
24
23
|
private pendingNodeConfigWrite;
|
|
25
24
|
private pendingConfigFlushTimer;
|
|
26
25
|
private algorithmControl;
|
|
@@ -64,6 +63,11 @@ export declare class RecommendationBlockControl extends CommonControl {
|
|
|
64
63
|
* fingerprint diff on this hook is the only way to notice (SD-149105).
|
|
65
64
|
* An unchanged fingerprint means the move came from us, so runtime store
|
|
66
65
|
* edits are never clobbered (SD-141049).
|
|
66
|
+
*
|
|
67
|
+
* The fingerprint is kept on the block's own store state so deleting the
|
|
68
|
+
* block drops it with the state it describes. A control-owned memo outlived
|
|
69
|
+
* that state and made a re-dropped saved module keep the defaults its wiped
|
|
70
|
+
* state was rebuilt with (SD-150347).
|
|
67
71
|
*/
|
|
68
72
|
private _syncNodeConfigIfChanged;
|
|
69
73
|
private _capturePendingNodeConfigWrite;
|
|
@@ -2,8 +2,6 @@ import { CommonControl } from '../../../common-control';
|
|
|
2
2
|
export declare const STRATEGY_CONTROL_ID = "recommendation-strategy-control";
|
|
3
3
|
export declare class StrategyControl extends CommonControl {
|
|
4
4
|
private store;
|
|
5
|
-
private onboardingStore;
|
|
6
|
-
private legacyConversion;
|
|
7
5
|
private storeUnsubscription;
|
|
8
6
|
private listeners;
|
|
9
7
|
private lastPaintedState;
|
|
@@ -88,8 +88,6 @@ export interface RegenerateWithStylesOptions extends Omit<RegenerateProductRowsO
|
|
|
88
88
|
products?: RecommendationProduct[];
|
|
89
89
|
/** Optional: pass layout directly to avoid stale DOM reads after setAttribute */
|
|
90
90
|
layout?: Orientation;
|
|
91
|
-
/** Applies the batch even when the rows are unchanged, for callers that staged their own edits. */
|
|
92
|
-
forceApply?: boolean;
|
|
93
91
|
}
|
|
94
92
|
/**
|
|
95
93
|
* Regenerates product rows while preserving user-applied styles, in a SINGLE commit.
|
|
@@ -153,8 +151,6 @@ export interface UpdateProductContentInPlaceOptions {
|
|
|
153
151
|
currentNode: ImmutableHtmlNode | null | undefined;
|
|
154
152
|
documentModifier: DocumentModifier;
|
|
155
153
|
products: RecommendationProduct[];
|
|
156
|
-
/** Applies the batch even when the cards are unchanged, for callers that staged their own edits. */
|
|
157
|
-
forceApply?: boolean;
|
|
158
154
|
}
|
|
159
155
|
/**
|
|
160
156
|
* Updates product content in-place without regenerating HTML structure.
|