@useinsider/guido 3.18.2-beta.45f708c → 3.18.2-beta.6dbea61
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/dist/components/Guido.vue.js +3 -3
- package/dist/components/Guido.vue2.js +30 -30
- package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +11 -13
- package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +51 -70
- package/dist/components/organisms/extensions/recommendation/RemoveStrategyModal.vue2.js +37 -23
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +18 -20
- package/dist/components/organisms/save-as-template/SaveAsTemplateDrawer.vue2.js +34 -34
- package/dist/composables/useCustomInterfaceAppearance.js +46 -56
- package/dist/composables/useHtmlValidator.js +79 -84
- package/dist/composables/useHttp.js +22 -24
- package/dist/composables/useRecommendation.js +35 -40
- package/dist/composables/useStripo.js +30 -30
- package/dist/enums/extensions/recommendationBlock.js +31 -38
- package/dist/extensions/Blocks/Recommendation/block.js +39 -43
- package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +20 -21
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +44 -55
- package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +52 -84
- package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +74 -74
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +90 -190
- package/dist/extensions/Blocks/Recommendation/utils/nodeConfigWriter.js +16 -26
- package/dist/extensions/Blocks/Recommendation/validation/requiredFields.js +12 -21
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +28 -29
- package/dist/package.json.js +1 -1
- package/dist/services/templateLibraryApi.js +14 -17
- package/dist/src/enums/extensions/recommendationBlock.d.ts +0 -2
- package/dist/src/extensions/Blocks/Recommendation/constants/defaultConfig.d.ts +0 -1
- package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +1 -7
- package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +0 -9
- package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +2 -7
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +0 -87
- package/dist/src/extensions/Blocks/Recommendation/validation/requiredFields.d.ts +0 -4
- package/dist/src/stores/onboarding.d.ts +0 -377
- package/dist/src/utils/genericUtil.d.ts +0 -6
- package/dist/static/styles/components/recommendation-strategy.css.js +4 -34
- package/dist/stores/onboarding.js +36 -41
- package/dist/utils/genericUtil.js +54 -63
- package/dist/utils/templatePreparation.js +59 -61
- package/package.json +3 -3
- package/dist/components/organisms/onboarding/RecommendationStrategyOnboarding.vue.js +0 -21
- package/dist/components/organisms/onboarding/RecommendationStrategyOnboarding.vue2.js +0 -47
- package/dist/extensions/Blocks/Recommendation/utils/strategyCommit.js +0 -24
- package/dist/src/components/organisms/onboarding/RecommendationStrategyOnboarding.vue.d.ts +0 -2
- package/dist/src/extensions/Blocks/Recommendation/utils/strategyCommit.d.ts +0 -14
- package/dist/src/utils/liquidDynamicContent.d.ts +0 -20
- package/dist/static/styles/components/skeleton.css.js +0 -23
- package/dist/utils/liquidDynamicContent.js +0 -15
|
@@ -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 y;
|
|
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" && ((y = process.env) == null ? void 0 : y.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 || {}), P = class T extends i {
|
|
45
45
|
constructor() {
|
|
46
|
-
super(
|
|
46
|
+
super(T.REQUIRED_METHODS, T);
|
|
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
|
+
P.REQUIRED_METHODS = ["getId", "getTemplate", "getIcon", "getName", "getDescription"];
|
|
225
|
+
var qe = P, Z = class c extends i {
|
|
226
226
|
constructor() {
|
|
227
|
-
super(
|
|
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.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.
|
|
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
|
-
BLOCK_IMAGE:
|
|
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 || {}),
|
|
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 = {
|
|
@@ -369,19 +369,18 @@ var j = {
|
|
|
369
369
|
hint: "hint"
|
|
370
370
|
}, Le = {
|
|
371
371
|
...a,
|
|
372
|
-
type: "type"
|
|
373
|
-
icon: "icon"
|
|
372
|
+
type: "type"
|
|
374
373
|
}, _e = {
|
|
375
374
|
...a,
|
|
376
375
|
buttons: "buttons"
|
|
377
|
-
},
|
|
376
|
+
}, X = {
|
|
378
377
|
...a,
|
|
379
378
|
searchable: "searchable",
|
|
380
379
|
multiSelect: "multi-select",
|
|
381
380
|
placeholder: "placeholder",
|
|
382
381
|
items: "items"
|
|
383
382
|
}, Ce = {
|
|
384
|
-
...
|
|
383
|
+
...X,
|
|
385
384
|
addCustomFontOption: "add-custom-font-option"
|
|
386
385
|
}, Ae = {
|
|
387
386
|
...a,
|
|
@@ -423,10 +422,10 @@ var j = {
|
|
|
423
422
|
}, xe = {
|
|
424
423
|
...a,
|
|
425
424
|
controlId: "control-id"
|
|
426
|
-
},
|
|
425
|
+
}, ye = {
|
|
427
426
|
...a,
|
|
428
427
|
expanded: "expanded"
|
|
429
|
-
},
|
|
428
|
+
}, Pe = {
|
|
430
429
|
...a,
|
|
431
430
|
icon: "icon",
|
|
432
431
|
position: "position"
|
|
@@ -456,7 +455,7 @@ var j = {
|
|
|
456
455
|
LABEL: Re,
|
|
457
456
|
MESSAGE: Le,
|
|
458
457
|
RADIO_BUTTONS: _e,
|
|
459
|
-
SELECTPICKER:
|
|
458
|
+
SELECTPICKER: X,
|
|
460
459
|
FONT_FAMILY_SELECT: Ce,
|
|
461
460
|
SWITCHER: a,
|
|
462
461
|
TEXT: Me,
|
|
@@ -466,15 +465,15 @@ var j = {
|
|
|
466
465
|
SELECT_ITEM: Ae,
|
|
467
466
|
RADIO_ITEM: Se,
|
|
468
467
|
NESTED_CONTROL: xe,
|
|
469
|
-
EXPANDABLE:
|
|
470
|
-
ORDERABLE:
|
|
468
|
+
EXPANDABLE: ye,
|
|
469
|
+
ORDERABLE: Pe,
|
|
471
470
|
ORDERABLE_ITEM: Ue,
|
|
472
471
|
ORDERABLE_ICON: we,
|
|
473
472
|
REPEATABLE: Ke,
|
|
474
473
|
DRAGGABLE_BLOCK: Fe,
|
|
475
474
|
AMP_FORM_SERVICE_PICKER: He,
|
|
476
475
|
MULTIPLE_SELECT: ke
|
|
477
|
-
},
|
|
476
|
+
}, pe = /* @__PURE__ */ ((e) => (e.BUTTON = "UE-BUTTON", e.CHECKBOX = "UE-CHECKBOX", e.CHECK_BUTTONS = "UE-CHECK-BUTTONS", e.COLOR = "UE-COLOR", e.COUNTER = "UE-COUNTER", e.DATEPICKER = "UE-DATEPICKER", e.LABEL = "UE-LABEL", e.MESSAGE = "UE-MESSAGE", e.RADIO_BUTTONS = "UE-RADIO-BUTTONS", e.SELECTPICKER = "UE-SELECT", e.SWITCHER = "UE-SWITCHER", e.TEXT = "UE-TEXT", e.TEXTAREA = "UE-TEXTAREA", e.CHECK_ITEM = "UE-CHECK-ITEM", e.RADIO_ITEM = "UE-RADIO-ITEM", e.SELECT_ITEM = "UE-SELECT-ITEM", e.ICON = "UE-ICON", e.MERGETAGS = "UE-MERGETAGS", e.FONT_FAMILY_SELECT = "UE-FONT-FAMILY-SELECT", e.NESTED_CONTROL = "UE-NESTED-CONTROL", e.EXPANDABLE = "UE-EXPANDABLE", e.EXPANDABLE_HEADER = "UE-EXPANDABLE_HEADER", e.EXPANDABLE_CONTENT = "UE-EXPANDABLE_CONTENT", e.ORDERABLE = "UE-ORDERABLE", e.ORDERABLE_ITEM = "UE-ORDERABLE-ITEM", e.ORDERABLE_ICON = "UE-ORDERABLE-ICON", e.REPEATABLE = "UE-REPEATABLE", e.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))(pe || {}), x = class {
|
|
478
477
|
/**
|
|
479
478
|
* @description returns map of nodes parent control operates on
|
|
480
479
|
*/
|
|
@@ -620,7 +619,7 @@ var j = {
|
|
|
620
619
|
}
|
|
621
620
|
};
|
|
622
621
|
G.REQUIRED_METHODS = ["getId", "getTemplate"];
|
|
623
|
-
var
|
|
622
|
+
var Tt = G, Xe = class m extends i {
|
|
624
623
|
constructor() {
|
|
625
624
|
super(m.REQUIRED_METHODS, m);
|
|
626
625
|
}
|
|
@@ -689,13 +688,13 @@ var ct = G, pe = class m extends i {
|
|
|
689
688
|
onDestroy() {
|
|
690
689
|
}
|
|
691
690
|
};
|
|
692
|
-
|
|
691
|
+
Xe.REQUIRED_METHODS = ["getId", "getIcon", "getName", "getTemplate", "getTabIndex"];
|
|
693
692
|
var V = class extends x {
|
|
694
693
|
getTargetNodes(e) {
|
|
695
694
|
const t = e.querySelectorAll(I.IMAGE), r = e.asElement().hasClass(K) ? [e] : [];
|
|
696
695
|
return t.length ? t : r;
|
|
697
696
|
}
|
|
698
|
-
},
|
|
697
|
+
}, ct = class extends V {
|
|
699
698
|
getParentControlId() {
|
|
700
699
|
return n.BLOCK_IMAGE.EXTERNAL_INDENTS;
|
|
701
700
|
}
|
|
@@ -1216,17 +1215,17 @@ export {
|
|
|
1216
1215
|
It as ButtonTextStyleAndFontColorBuiltInControl,
|
|
1217
1216
|
ue as ContainerControls,
|
|
1218
1217
|
Ie as ContextActionType,
|
|
1219
|
-
|
|
1220
|
-
|
|
1218
|
+
Tt as Control,
|
|
1219
|
+
Te as EditorStatePropertyType,
|
|
1221
1220
|
Ve as Extension,
|
|
1222
1221
|
Nt as ExtensionBuilder,
|
|
1223
1222
|
F as GeneralControls,
|
|
1224
1223
|
Dt as IconsRegistry,
|
|
1225
|
-
|
|
1226
|
-
|
|
1224
|
+
p as ImageControls,
|
|
1225
|
+
ct as ImageMarginsBuiltInControl,
|
|
1227
1226
|
bt as ImageSizeBuiltInControl,
|
|
1228
1227
|
St as ModificationDescription,
|
|
1229
|
-
|
|
1228
|
+
ce as PreviewDeviceMode,
|
|
1230
1229
|
ht as SettingsPanelRegistry,
|
|
1231
1230
|
mt as SettingsPanelTab,
|
|
1232
1231
|
be as SettingsTab,
|
|
@@ -1241,5 +1240,5 @@ export {
|
|
|
1241
1240
|
et as UEAttr,
|
|
1242
1241
|
Mt as UIElement,
|
|
1243
1242
|
Bt as UIElementTagRegistry,
|
|
1244
|
-
|
|
1243
|
+
pe as UIElementType
|
|
1245
1244
|
};
|
package/dist/package.json.js
CHANGED
|
@@ -4,14 +4,13 @@ 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 N } from "../enums/toaster.js";
|
|
8
|
+
import { useRecommendationExtensionStore as x } from "../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
9
|
+
import { useSaveAsTemplateStore as E } 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";
|
|
12
11
|
import { useTemplatePreparation as A } from "../utils/templatePreparation.js";
|
|
13
|
-
const
|
|
14
|
-
const { get: n, post: m } = b(), { handleError: o, showToaster: l } = C(), { config: c, isFeatureEnabled: p } = w(), { validateLiquidSyntax:
|
|
12
|
+
const j = () => {
|
|
13
|
+
const { get: n, post: m } = b(), { handleError: o, showToaster: l } = C(), { config: c, isFeatureEnabled: p } = w(), { validateLiquidSyntax: g } = S(), u = h();
|
|
15
14
|
return {
|
|
16
15
|
getCategories: async () => {
|
|
17
16
|
try {
|
|
@@ -41,10 +40,10 @@ const B = () => {
|
|
|
41
40
|
createTemplate: async () => {
|
|
42
41
|
var e, t, d, y;
|
|
43
42
|
try {
|
|
44
|
-
const { prepareTemplateDetails: i } = A(), s =
|
|
45
|
-
if (p("liquidSyntax") && !await
|
|
43
|
+
const { prepareTemplateDetails: i } = A(), s = E(), a = await i();
|
|
44
|
+
if (p("liquidSyntax") && !await g(a.compiledHtml))
|
|
46
45
|
return !1;
|
|
47
|
-
const
|
|
46
|
+
const f = {
|
|
48
47
|
name: s.getTemplateName,
|
|
49
48
|
categories: s.getSelectedCategoryIds,
|
|
50
49
|
productId: ((t = (e = c.value) == null ? void 0 : e.partner) == null ? void 0 : t.productType) || 0,
|
|
@@ -55,7 +54,7 @@ const B = () => {
|
|
|
55
54
|
unsubscriptionPreferencePageStatus: !1,
|
|
56
55
|
unsubscriptionPreferencePages: [],
|
|
57
56
|
recommendationCampaignUrls: r(
|
|
58
|
-
|
|
57
|
+
x().recommendationCampaignUrls
|
|
59
58
|
),
|
|
60
59
|
recommendationConfigs: r({}),
|
|
61
60
|
isGuido: !0,
|
|
@@ -67,18 +66,16 @@ const B = () => {
|
|
|
67
66
|
css: a.css,
|
|
68
67
|
dynamicContentList: a.dynamicContentList
|
|
69
68
|
})
|
|
70
|
-
}, { data:
|
|
69
|
+
}, { data: { type: T } } = await m(
|
|
71
70
|
"/newsletter/template-library/create-template",
|
|
72
|
-
|
|
71
|
+
f
|
|
73
72
|
);
|
|
74
|
-
|
|
75
|
-
throw new Error("Unexpected create-template response");
|
|
76
|
-
return g.type === "alert" ? (l({
|
|
73
|
+
return T === "alert" ? (l({
|
|
77
74
|
message: u(
|
|
78
75
|
"newsletter.template-library-save-alert",
|
|
79
76
|
{ templateName: s.getTemplateName }
|
|
80
77
|
),
|
|
81
|
-
type:
|
|
78
|
+
type: N.Error
|
|
82
79
|
}), !1) : (l({
|
|
83
80
|
message: u(
|
|
84
81
|
"newsletter.template-library-save-success",
|
|
@@ -93,5 +90,5 @@ const B = () => {
|
|
|
93
90
|
};
|
|
94
91
|
};
|
|
95
92
|
export {
|
|
96
|
-
|
|
93
|
+
j as useTemplateLibraryApi
|
|
97
94
|
};
|
|
@@ -5,9 +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
|
-
RECOMMENDATION_STRATEGY_CREATE_PATH: string;
|
|
9
8
|
};
|
|
10
|
-
export declare const strategyEditPath: (strategyId: string | number) => string;
|
|
11
9
|
export declare const QUERY_PARAMS: {
|
|
12
10
|
CLIENT_ID: string;
|
|
13
11
|
};
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
import type { RecommendationNodeConfig, CurrencyConfig, OmnibusTextConfig } from '../types/nodeConfig';
|
|
11
11
|
export declare const PRE_RRS_CONFIG_VERSION = 1;
|
|
12
12
|
export declare const CURRENT_CONFIG_VERSION = 2;
|
|
13
|
-
export declare const RRS_CONFIG_VERSION = 2;
|
|
14
13
|
/**
|
|
15
14
|
* Default currency configuration
|
|
16
15
|
* Uses USD as the base currency with standard formatting
|
|
@@ -10,4 +10,4 @@ export { RecommendationBlockId } from './blockIds';
|
|
|
10
10
|
export { RecommendationControlId } from './controlIds';
|
|
11
11
|
export { BLOCK_ROOT_SELECTOR, CONTAINER_SELECTOR, DESKTOP_CONTAINER_SELECTOR, MOBILE_CONTAINER_SELECTOR, MOBILE_ROW_SELECTOR, CSS_CLASS_RECO_BUTTON, CSS_CLASS_SKIP_COMPILE, RECOMMENDATION_VARIABLE_BUILTIN_ATTRIBUTES, CURRENCY_ATTR, ATTR_PRODUCT_IMAGE, ATTR_PRODUCT_NAME, ATTR_PRODUCT_PRICE, ATTR_PRODUCT_OLD_PRICE, ATTR_PRODUCT_OMNIBUS_PRICE, ATTR_PRODUCT_OMNIBUS_DISCOUNT, ATTR_PRODUCT_BUTTON, ATTR_RECOMMENDATION_TITLE, SELECTOR_TITLE_CELL, ATTR_CUSTOM_PREFIX, ATTR_DATA_CARD_COMPOSITION, ATTR_DATA_CUSTOM_ATTRIBUTES, ATTR_PRODUCT_ATTR, CSS_CLASS_ATTRIBUTE_ROW, CSS_CLASS_SPACER, SELECTOR_ATTRIBUTE_ROW, ATTR_DATA_ATTRIBUTE_TYPE, ATTR_DATA_VISIBILITY, PRODUCT_ATTRIBUTE_PREFIX, BUILT_IN_DEFAULT_ATTRIBUTES, } from './selectors';
|
|
12
12
|
export { LAYOUT_VALUES, LAYOUT_OPTIONS, DEFAULT_PRODUCTS_PER_ROW, DEFAULT_CARDS_IN_ROW, DEFAULT_MOBILE_CARDS_IN_ROW, MAX_PRODUCT_COUNT, MIN_PRODUCT_COUNT, MAX_PRODUCTS_PER_ROW, MIN_PRODUCTS_PER_ROW, MAX_MOBILE_PRODUCTS_PER_ROW, MIN_MOBILE_PRODUCTS_PER_ROW, DEFAULT_COLUMN_SPACING, DEFAULT_ROW_SPACING, DEFAULT_MOBILE_COLUMN_SPACING, DEFAULT_MOBILE_ROW_SPACING, MIN_SPACING, MAX_SPACING, SPACING_STEP, } from './layout';
|
|
13
|
-
export { DEFAULT_NODE_CONFIG, DEFAULT_CURRENCY, DEFAULT_COMPOSITION, DEFAULT_VISIBILITY, CURRENT_CONFIG_VERSION, PRE_RRS_CONFIG_VERSION,
|
|
13
|
+
export { DEFAULT_NODE_CONFIG, DEFAULT_CURRENCY, DEFAULT_COMPOSITION, DEFAULT_VISIBILITY, CURRENT_CONFIG_VERSION, PRE_RRS_CONFIG_VERSION, EXCLUDED_ALGORITHM_IDS, } from './defaultConfig';
|
|
@@ -20,6 +20,7 @@ export * from './utils';
|
|
|
20
20
|
export declare class RecommendationBlockControl extends CommonControl {
|
|
21
21
|
private store;
|
|
22
22
|
private storeUnsubscription;
|
|
23
|
+
private syncedConfigs;
|
|
23
24
|
private pendingNodeConfigWrite;
|
|
24
25
|
private pendingConfigFlushTimer;
|
|
25
26
|
private algorithmControl;
|
|
@@ -63,15 +64,8 @@ export declare class RecommendationBlockControl extends CommonControl {
|
|
|
63
64
|
* fingerprint diff on this hook is the only way to notice (SD-149105).
|
|
64
65
|
* An unchanged fingerprint means the move came from us, so runtime store
|
|
65
66
|
* 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).
|
|
71
67
|
*/
|
|
72
68
|
private _syncNodeConfigIfChanged;
|
|
73
|
-
/** Whether the deferred write would move the node's strategyId — see the caller (SD-149916). */
|
|
74
|
-
private _isPendingStrategyIdChange;
|
|
75
69
|
private _capturePendingNodeConfigWrite;
|
|
76
70
|
/**
|
|
77
71
|
* Accumulates the pending write into `documentModifier` without applying, so the
|
|
@@ -2,7 +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
5
|
private storeUnsubscription;
|
|
7
6
|
private listeners;
|
|
8
7
|
private lastPaintedState;
|
|
@@ -10,14 +9,6 @@ export declare class StrategyControl extends CommonControl {
|
|
|
10
9
|
getTemplate(): string;
|
|
11
10
|
private _strategyAction;
|
|
12
11
|
onRender(): void;
|
|
13
|
-
/**
|
|
14
|
-
* Whether the document itself says this block has no strategy.
|
|
15
|
-
*
|
|
16
|
-
* Read the node, not the store: when the main control cannot resolve the block id off the
|
|
17
|
-
* node it never syncs the persisted config, so the store still holds defaults (empty
|
|
18
|
-
* strategyId) for an assigned block.
|
|
19
|
-
*/
|
|
20
|
-
private _isNodeUnassigned;
|
|
21
12
|
onDestroy(): void;
|
|
22
13
|
private _teardown;
|
|
23
14
|
private _setupButtonListeners;
|
|
@@ -107,7 +107,7 @@ export interface RegenerateWithStylesOptions extends Omit<RegenerateProductRowsO
|
|
|
107
107
|
* HTML removes the need for any post-rebuild reapply pass.
|
|
108
108
|
* @param options - Configuration options for regeneration
|
|
109
109
|
*/
|
|
110
|
-
export declare function regenerateProductRowsWithStyles(options: RegenerateWithStylesOptions):
|
|
110
|
+
export declare function regenerateProductRowsWithStyles(options: RegenerateWithStylesOptions): void;
|
|
111
111
|
/**
|
|
112
112
|
* Adjusts a products array to a target size.
|
|
113
113
|
* Used by ProductLayoutControl to synchronously match products to the new size
|
|
@@ -151,11 +151,6 @@ export interface UpdateProductContentInPlaceOptions {
|
|
|
151
151
|
currentNode: ImmutableHtmlNode | null | undefined;
|
|
152
152
|
documentModifier: DocumentModifier;
|
|
153
153
|
products: RecommendationProduct[];
|
|
154
|
-
/**
|
|
155
|
-
* Called when the batch was actually committed. Identical products commit nothing, which
|
|
156
|
-
* leaves anything a caller staged into the same batch unwritten unless it applies itself.
|
|
157
|
-
*/
|
|
158
|
-
onApplied?: () => void;
|
|
159
154
|
}
|
|
160
155
|
/**
|
|
161
156
|
* Updates product content in-place without regenerating HTML structure.
|
|
@@ -166,7 +161,7 @@ export interface UpdateProductContentInPlaceOptions {
|
|
|
166
161
|
* After updating desktop, also updates mobile container to keep them in sync.
|
|
167
162
|
*
|
|
168
163
|
* Falls back to false when product count changed (need to add/remove elements).
|
|
169
|
-
* @param options - Configuration options
|
|
164
|
+
* @param options - Configuration options
|
|
170
165
|
* @returns true if in-place update was successful, false to fall back to full regeneration
|
|
171
166
|
*/
|
|
172
167
|
export declare function updateProductContentInPlace(options: UpdateProductContentInPlaceOptions): boolean;
|
|
@@ -41,16 +41,6 @@ interface PerBlockState {
|
|
|
41
41
|
isInitialized: boolean;
|
|
42
42
|
/** Snapshot of filters taken when the drawer opens, used to revert on cancel */
|
|
43
43
|
filterSnapshot: Filter[] | null;
|
|
44
|
-
/**
|
|
45
|
-
* Fingerprint of the node config as this block's state last adopted it.
|
|
46
|
-
*
|
|
47
|
-
* Lives here, not on the control, because it is a claim ABOUT this state —
|
|
48
|
-
* "the store already holds that node config". Held on the control it
|
|
49
|
-
* outlived the state it described: `removeBlockState` tore the state down
|
|
50
|
-
* while the fingerprint survived, so re-dropping a saved module under the
|
|
51
|
-
* same id skipped the re-sync and kept the defaults (SD-150347).
|
|
52
|
-
*/
|
|
53
|
-
syncedConfigFingerprint: string | null;
|
|
54
44
|
}
|
|
55
45
|
/**
|
|
56
46
|
* Persisted-config subset used by `seedBlockUrlConfig` to reconstruct
|
|
@@ -67,8 +57,6 @@ export interface PerBlockUrlConfig {
|
|
|
67
57
|
filters: Filter[];
|
|
68
58
|
shuffleProducts: boolean;
|
|
69
59
|
currencyCode: string;
|
|
70
|
-
/** The displayed symbol, which is not the code — a TRY block shows `₺`. */
|
|
71
|
-
currencySymbol: string;
|
|
72
60
|
currencyAlignment: 'before' | 'after';
|
|
73
61
|
currencyDecimalCount: number;
|
|
74
62
|
currencyDecimalSeparator: string;
|
|
@@ -83,11 +71,8 @@ interface StoreState {
|
|
|
83
71
|
strategies: RrsStrategy[];
|
|
84
72
|
strategiesLoading: boolean;
|
|
85
73
|
strategyUrlTemplates: Record<string, string>;
|
|
86
|
-
strategiesFetched: boolean;
|
|
87
|
-
strategiesSettled: boolean;
|
|
88
74
|
blockStates: Record<number, PerBlockState>;
|
|
89
75
|
currentRecommendationId: number | null;
|
|
90
|
-
strategyPanelOpen: boolean;
|
|
91
76
|
configVersion: number;
|
|
92
77
|
}
|
|
93
78
|
export declare const useRecommendationExtensionStore: import("pinia").StoreDefinition<"guidoRecommendationExtension", StoreState, {
|
|
@@ -114,11 +99,8 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
114
99
|
}[];
|
|
115
100
|
strategiesLoading: boolean;
|
|
116
101
|
strategyUrlTemplates: Record<string, string>;
|
|
117
|
-
strategiesFetched: boolean;
|
|
118
|
-
strategiesSettled: boolean;
|
|
119
102
|
blockStates: Record<number, PerBlockState>;
|
|
120
103
|
currentRecommendationId: number | null;
|
|
121
|
-
strategyPanelOpen: boolean;
|
|
122
104
|
configVersion: number;
|
|
123
105
|
} & import("pinia").PiniaCustomStateProperties<StoreState>): PerBlockConfigs;
|
|
124
106
|
/**
|
|
@@ -143,11 +125,8 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
143
125
|
}[];
|
|
144
126
|
strategiesLoading: boolean;
|
|
145
127
|
strategyUrlTemplates: Record<string, string>;
|
|
146
|
-
strategiesFetched: boolean;
|
|
147
|
-
strategiesSettled: boolean;
|
|
148
128
|
blockStates: Record<number, PerBlockState>;
|
|
149
129
|
currentRecommendationId: number | null;
|
|
150
|
-
strategyPanelOpen: boolean;
|
|
151
130
|
configVersion: number;
|
|
152
131
|
} & import("pinia").PiniaCustomStateProperties<StoreState>): RecommendationProduct[];
|
|
153
132
|
/**
|
|
@@ -172,11 +151,8 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
172
151
|
}[];
|
|
173
152
|
strategiesLoading: boolean;
|
|
174
153
|
strategyUrlTemplates: Record<string, string>;
|
|
175
|
-
strategiesFetched: boolean;
|
|
176
|
-
strategiesSettled: boolean;
|
|
177
154
|
blockStates: Record<number, PerBlockState>;
|
|
178
155
|
currentRecommendationId: number | null;
|
|
179
|
-
strategyPanelOpen: boolean;
|
|
180
156
|
configVersion: number;
|
|
181
157
|
} & import("pinia").PiniaCustomStateProperties<StoreState>): boolean;
|
|
182
158
|
assignStrategyDrawerStatus(state: {
|
|
@@ -198,11 +174,8 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
198
174
|
}[];
|
|
199
175
|
strategiesLoading: boolean;
|
|
200
176
|
strategyUrlTemplates: Record<string, string>;
|
|
201
|
-
strategiesFetched: boolean;
|
|
202
|
-
strategiesSettled: boolean;
|
|
203
177
|
blockStates: Record<number, PerBlockState>;
|
|
204
178
|
currentRecommendationId: number | null;
|
|
205
|
-
strategyPanelOpen: boolean;
|
|
206
179
|
configVersion: number;
|
|
207
180
|
} & import("pinia").PiniaCustomStateProperties<StoreState>): boolean;
|
|
208
181
|
removeStrategyModalStatus(state: {
|
|
@@ -224,11 +197,8 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
224
197
|
}[];
|
|
225
198
|
strategiesLoading: boolean;
|
|
226
199
|
strategyUrlTemplates: Record<string, string>;
|
|
227
|
-
strategiesFetched: boolean;
|
|
228
|
-
strategiesSettled: boolean;
|
|
229
200
|
blockStates: Record<number, PerBlockState>;
|
|
230
201
|
currentRecommendationId: number | null;
|
|
231
|
-
strategyPanelOpen: boolean;
|
|
232
202
|
configVersion: number;
|
|
233
203
|
} & import("pinia").PiniaCustomStateProperties<StoreState>): boolean;
|
|
234
204
|
assignedStrategy(state: {
|
|
@@ -250,11 +220,8 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
250
220
|
}[];
|
|
251
221
|
strategiesLoading: boolean;
|
|
252
222
|
strategyUrlTemplates: Record<string, string>;
|
|
253
|
-
strategiesFetched: boolean;
|
|
254
|
-
strategiesSettled: boolean;
|
|
255
223
|
blockStates: Record<number, PerBlockState>;
|
|
256
224
|
currentRecommendationId: number | null;
|
|
257
|
-
strategyPanelOpen: boolean;
|
|
258
225
|
configVersion: number;
|
|
259
226
|
} & import("pinia").PiniaCustomStateProperties<StoreState>): RrsStrategy | null;
|
|
260
227
|
/**
|
|
@@ -279,11 +246,8 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
279
246
|
}[];
|
|
280
247
|
strategiesLoading: boolean;
|
|
281
248
|
strategyUrlTemplates: Record<string, string>;
|
|
282
|
-
strategiesFetched: boolean;
|
|
283
|
-
strategiesSettled: boolean;
|
|
284
249
|
blockStates: Record<number, PerBlockState>;
|
|
285
250
|
currentRecommendationId: number | null;
|
|
286
|
-
strategyPanelOpen: boolean;
|
|
287
251
|
configVersion: number;
|
|
288
252
|
} & import("pinia").PiniaCustomStateProperties<StoreState>): boolean;
|
|
289
253
|
/**
|
|
@@ -308,11 +272,8 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
308
272
|
}[];
|
|
309
273
|
strategiesLoading: boolean;
|
|
310
274
|
strategyUrlTemplates: Record<string, string>;
|
|
311
|
-
strategiesFetched: boolean;
|
|
312
|
-
strategiesSettled: boolean;
|
|
313
275
|
blockStates: Record<number, PerBlockState>;
|
|
314
276
|
currentRecommendationId: number | null;
|
|
315
|
-
strategyPanelOpen: boolean;
|
|
316
277
|
configVersion: number;
|
|
317
278
|
} & import("pinia").PiniaCustomStateProperties<StoreState>): number;
|
|
318
279
|
hasFilters(): boolean;
|
|
@@ -338,11 +299,8 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
338
299
|
}[];
|
|
339
300
|
strategiesLoading: boolean;
|
|
340
301
|
strategyUrlTemplates: Record<string, string>;
|
|
341
|
-
strategiesFetched: boolean;
|
|
342
|
-
strategiesSettled: boolean;
|
|
343
302
|
blockStates: Record<number, PerBlockState>;
|
|
344
303
|
currentRecommendationId: number | null;
|
|
345
|
-
strategyPanelOpen: boolean;
|
|
346
304
|
configVersion: number;
|
|
347
305
|
} & import("pinia").PiniaCustomStateProperties<StoreState>) => {
|
|
348
306
|
text: string;
|
|
@@ -367,11 +325,8 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
367
325
|
}[];
|
|
368
326
|
strategiesLoading: boolean;
|
|
369
327
|
strategyUrlTemplates: Record<string, string>;
|
|
370
|
-
strategiesFetched: boolean;
|
|
371
|
-
strategiesSettled: boolean;
|
|
372
328
|
blockStates: Record<number, PerBlockState>;
|
|
373
329
|
currentRecommendationId: number | null;
|
|
374
|
-
strategyPanelOpen: boolean;
|
|
375
330
|
configVersion: number;
|
|
376
331
|
} & import("pinia").PiniaCustomStateProperties<StoreState>) => {
|
|
377
332
|
text: string;
|
|
@@ -396,11 +351,8 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
396
351
|
}[];
|
|
397
352
|
strategiesLoading: boolean;
|
|
398
353
|
strategyUrlTemplates: Record<string, string>;
|
|
399
|
-
strategiesFetched: boolean;
|
|
400
|
-
strategiesSettled: boolean;
|
|
401
354
|
blockStates: Record<number, PerBlockState>;
|
|
402
355
|
currentRecommendationId: number | null;
|
|
403
|
-
strategyPanelOpen: boolean;
|
|
404
356
|
configVersion: number;
|
|
405
357
|
} & import("pinia").PiniaCustomStateProperties<StoreState>) => {
|
|
406
358
|
text: string;
|
|
@@ -481,40 +433,6 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
481
433
|
openRemoveStrategyModal(): void;
|
|
482
434
|
closeRemoveStrategyModal(): void;
|
|
483
435
|
fetchStrategies(): Promise<void>;
|
|
484
|
-
invalidateStrategies(): void;
|
|
485
|
-
/**
|
|
486
|
-
* Opens a Smart Recommender strategy page in a new tab and refreshes the list every time
|
|
487
|
-
* the user comes back. `visibilitychange` only: a `focus` listener would also fire when
|
|
488
|
-
* focus merely returns from the Stripo canvas iframe to the panel, refetching and
|
|
489
|
-
* regenerating the canvas while the user never left the editor (SD-149916).
|
|
490
|
-
*
|
|
491
|
-
* Deliberately NOT one-shot: the strategy tab stays open, so a user can create a second
|
|
492
|
-
* strategy in it and come back again — a listener that disarmed on the first return would
|
|
493
|
-
* leave that one missing from the list. It disarms on the first return AFTER that tab is
|
|
494
|
-
* closed instead, so an ordinary alt-tab later in the session costs nothing. Armed only
|
|
495
|
-
* once the user actually opens a strategy page, so anyone who never does pays nothing.
|
|
496
|
-
*/
|
|
497
|
-
_armStrategyPageReturn(url: string): void;
|
|
498
|
-
/**
|
|
499
|
-
* Reloads the products of the block the user is on, so an edit made in the strategy tab
|
|
500
|
-
* lands on the canvas instead of waiting for the assign drawer to be reopened.
|
|
501
|
-
*
|
|
502
|
-
* Only the selected block: the canvas regeneration is driven off the active block's
|
|
503
|
-
* product array, so refreshing an unselected block would fetch without redrawing it.
|
|
504
|
-
*/
|
|
505
|
-
_refreshAssignedStrategyProducts(): Promise<void>;
|
|
506
|
-
/** Lets the editor tear the return listeners down when it unmounts. */
|
|
507
|
-
disposeStrategyPageReturn(): void;
|
|
508
|
-
/**
|
|
509
|
-
* Opens Smart Recommender's strategy creation page. Every return refreshes the list so the
|
|
510
|
-
* new strategy is offered; the user picks it themselves.
|
|
511
|
-
*/
|
|
512
|
-
openStrategyCreation(): void;
|
|
513
|
-
/**
|
|
514
|
-
* Opens the strategy's edit page. Every return refreshes the list so the block reflects the
|
|
515
|
-
* edited configuration.
|
|
516
|
-
*/
|
|
517
|
-
openStrategyEdit(strategyId: string | number): void;
|
|
518
436
|
resolveStrategyUrlTemplate(strategy: RrsStrategy, currency: string): Promise<string>;
|
|
519
437
|
assignStrategy(strategy: RrsStrategy): void;
|
|
520
438
|
removeStrategy(): void;
|
|
@@ -532,11 +450,6 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
532
450
|
* every block's recommendationConfigs across user edits.
|
|
533
451
|
*/
|
|
534
452
|
hasInvalidBlock(): boolean;
|
|
535
|
-
/**
|
|
536
|
-
* Which required fields are missing across the design's blocks, so the save
|
|
537
|
-
* toaster can name the cause instead of always showing the generic message.
|
|
538
|
-
*/
|
|
539
|
-
invalidBlockFields(): string[];
|
|
540
453
|
fetchRecommendationProducts(): Promise<void>;
|
|
541
454
|
_doFetchProducts(): Promise<void>;
|
|
542
455
|
_doFetchStrategyProducts(blockId: number): Promise<void>;
|
|
@@ -15,11 +15,7 @@ export interface RequiredField {
|
|
|
15
15
|
getAvailableOptions?: (store: ExtensionStoreSlice) => string[];
|
|
16
16
|
condition?: (config: PerBlockConfigs) => boolean;
|
|
17
17
|
}
|
|
18
|
-
/** Field key of the strategy/algorithm descriptor, used to pick the toaster message. */
|
|
19
|
-
export declare const STRATEGY_FIELD_KEY = "strategy";
|
|
20
18
|
export declare const REQUIRED_RECOMMENDATION_FIELDS: RequiredField[];
|
|
21
19
|
export declare const RecommendationRequiredFieldsKey = "newsletter.recommendation-fill-required-fields";
|
|
22
|
-
/** Shown instead of the generic message when the only thing missing is the strategy. */
|
|
23
|
-
export declare const RecommendationAssignStrategyKey = "newsletter.recommendation-assign-strategy";
|
|
24
20
|
export declare function getInvalidFields(config: PerBlockConfigs, store: ExtensionStoreSlice, fields?: RequiredField[]): string[];
|
|
25
21
|
export declare function isConfigValid(config: PerBlockConfigs, store: ExtensionStoreSlice): boolean;
|