@useinsider/guido 3.18.2-beta.9be830c → 3.18.2-beta.a5a0a11
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/@types/config/schemas.js +13 -15
- package/dist/components/Guido.vue.js +7 -7
- package/dist/components/Guido.vue2.js +30 -30
- package/dist/components/organisms/AutoSaveController.vue2.js +8 -10
- package/dist/components/organisms/base/Toaster.vue2.js +13 -12
- package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +13 -11
- package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +74 -57
- package/dist/components/organisms/extensions/recommendation/RemoveStrategyModal.vue2.js +23 -37
- package/dist/components/organisms/header/AutoSaveToggle.vue.js +22 -0
- package/dist/components/organisms/header/AutoSaveToggle.vue2.js +19 -0
- package/dist/components/organisms/header/EditorActions.vue.js +13 -13
- package/dist/components/organisms/header/EditorActions.vue2.js +52 -36
- package/dist/components/organisms/header/HeaderWrapper.vue.js +6 -6
- package/dist/components/organisms/header/HeaderWrapper.vue2.js +17 -9
- package/dist/components/organisms/header/LeftSlot.vue.js +5 -5
- package/dist/components/organisms/header/LeftSlot.vue2.js +23 -28
- package/dist/components/organisms/header/MiddleSlot.vue.js +4 -4
- package/dist/components/organisms/header/MiddleSlot.vue2.js +7 -8
- package/dist/components/organisms/header/RightSlot.vue.js +8 -9
- package/dist/components/organisms/header/RightSlot.vue2.js +18 -13
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue.js +12 -12
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +38 -54
- package/dist/components/organisms/onboarding/RecommendationStrategyOnboarding.vue.js +21 -0
- package/dist/components/organisms/onboarding/RecommendationStrategyOnboarding.vue2.js +47 -0
- package/dist/composables/useCustomInterfaceAppearance.js +52 -45
- package/dist/composables/useHtmlValidator.js +87 -82
- package/dist/composables/useRecommendation.js +40 -35
- package/dist/composables/useStripo.js +30 -30
- package/dist/composables/useToaster.js +14 -20
- package/dist/config/i18n/en/labels.json.js +4 -36
- package/dist/config/i18n/en/tooltips.json.js +1 -2
- package/dist/enums/extensions/recommendationBlock.js +38 -31
- package/dist/extensions/Blocks/Recommendation/block.js +61 -42
- package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +21 -20
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +40 -35
- package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +84 -52
- package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +74 -74
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +260 -140
- package/dist/extensions/Blocks/Recommendation/utils/nodeConfigWriter.js +26 -16
- package/dist/extensions/Blocks/Recommendation/utils/strategyCommit.js +24 -0
- package/dist/extensions/Blocks/Recommendation/validation/requiredFields.js +21 -12
- package/dist/guido.css +1 -1
- package/dist/node_modules/@vueuse/shared/index.js +28 -40
- package/dist/sprite.svg +0 -6
- package/dist/src/@types/config/schemas.d.ts +0 -4
- package/dist/src/components/organisms/AutoSaveController.vue.d.ts +1 -3
- package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +3 -1
- package/dist/src/components/organisms/header/RightSlot.vue.d.ts +3 -1
- package/dist/src/composables/useActionsApi.d.ts +2 -2
- package/dist/src/composables/useConfig.d.ts +0 -2
- package/dist/src/enums/extensions/recommendationBlock.d.ts +2 -0
- package/dist/src/extensions/Blocks/Recommendation/block.d.ts +10 -0
- package/dist/src/extensions/Blocks/Recommendation/constants/defaultConfig.d.ts +1 -0
- package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +2 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +9 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +7 -2
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +86 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/strategyCommit.d.ts +14 -0
- package/dist/src/extensions/Blocks/Recommendation/validation/requiredFields.d.ts +4 -0
- package/dist/src/stores/config.d.ts +0 -18
- package/dist/src/stores/editor.d.ts +0 -107
- package/dist/src/stores/onboarding.d.ts +21 -195
- package/dist/src/stores/version-history.d.ts +1 -1
- package/dist/src/utils/timeUtil.d.ts +0 -10
- package/dist/static/styles/components/recommendation-strategy.css.js +34 -4
- package/dist/static/styles/components/skeleton.css.js +23 -0
- package/dist/static/styles/variables.css.js +0 -2
- package/dist/stores/editor.js +4 -13
- package/dist/stores/onboarding.js +50 -66
- package/dist/utils/templatePreparation.js +55 -55
- package/dist/utils/timeUtil.js +17 -7
- package/package.json +5 -5
- package/dist/components/organisms/header/AutoSaveStatus.vue.js +0 -17
- package/dist/components/organisms/header/AutoSaveStatus.vue2.js +0 -27
- package/dist/components/organisms/header/EditorActionsMenu.vue.js +0 -20
- package/dist/components/organisms/header/EditorActionsMenu.vue2.js +0 -48
- package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue.js +0 -18
- package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue2.js +0 -37
- package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue.js +0 -24
- package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue2.js +0 -48
- package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue.js +0 -19
- package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue2.js +0 -82
- package/dist/composables/useAccessibilityApi.js +0 -35
- package/dist/node_modules/@vueuse/core/index.js +0 -102
- package/dist/src/components/organisms/header/accessibility/AccessibilityToolbar.vue.d.ts +0 -2
- package/dist/src/components/organisms/header/accessibility/ColorVisionSelect.vue.d.ts +0 -2
- package/dist/src/components/organisms/onboarding/EditorTabBarOnboarding.vue.d.ts +0 -2
- package/dist/src/composables/useAccessibilityApi.d.ts +0 -15
- package/dist/static/styles/components/accessibility.css.js +0 -282
- /package/dist/src/components/organisms/header/{AutoSaveStatus.vue.d.ts → AutoSaveToggle.vue.d.ts} +0 -0
- /package/dist/src/components/organisms/{header/EditorActionsMenu.vue.d.ts → onboarding/RecommendationStrategyOnboarding.vue.d.ts} +0 -0
|
@@ -1,22 +1,32 @@
|
|
|
1
|
-
import { ModificationDescription as
|
|
2
|
-
import { RECOMMENDATION_ID_ATTR as
|
|
3
|
-
import { isPartnerManagedBlock as
|
|
4
|
-
import { RecommendationConfigService as
|
|
5
|
-
let
|
|
6
|
-
function
|
|
7
|
-
|
|
1
|
+
import { ModificationDescription as g } from "../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
|
+
import { RECOMMENDATION_ID_ATTR as s } from "../constants/selectors.js";
|
|
3
|
+
import { isPartnerManagedBlock as p, updateProductContentInPlace as C, regenerateProductRowsWithStyles as N } from "../controls/main/utils.js";
|
|
4
|
+
import { RecommendationConfigService as m } from "../services/configService.js";
|
|
5
|
+
let o = null;
|
|
6
|
+
function D(n) {
|
|
7
|
+
o = n;
|
|
8
8
|
}
|
|
9
|
-
function
|
|
10
|
-
const
|
|
11
|
-
if (!
|
|
9
|
+
function P(n, r, c, l) {
|
|
10
|
+
const i = o == null ? void 0 : o.getDocumentRootHtmlNode();
|
|
11
|
+
if (!o || !i || !("querySelector" in i))
|
|
12
12
|
return !1;
|
|
13
|
-
const
|
|
14
|
-
if (!
|
|
13
|
+
const e = i.querySelector(`[${s}="${n}"]`);
|
|
14
|
+
if (!e)
|
|
15
15
|
return !1;
|
|
16
|
-
const o = e.
|
|
17
|
-
|
|
16
|
+
const t = o.getDocumentModifier(), a = m.getConfig(e), d = Object.keys(r).some((u) => JSON.stringify(a[u]) !== JSON.stringify(r[u]));
|
|
17
|
+
if (m.stageConfig(t, e, r), p(e))
|
|
18
|
+
return t.apply(new g(l)), !0;
|
|
19
|
+
let f = !1;
|
|
20
|
+
return C({
|
|
21
|
+
currentNode: e,
|
|
22
|
+
documentModifier: t,
|
|
23
|
+
products: c,
|
|
24
|
+
onApplied: () => {
|
|
25
|
+
f = !0;
|
|
26
|
+
}
|
|
27
|
+
}) || (f = N({ currentNode: e, documentModifier: t, products: c })), !f && d && t.apply(new g(l)), !0;
|
|
18
28
|
}
|
|
19
29
|
export {
|
|
20
|
-
|
|
21
|
-
|
|
30
|
+
P as commitBlockChangeOutsidePanel,
|
|
31
|
+
D as registerNodeConfigWriter
|
|
22
32
|
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { useRecommendationExtensionStore as s } from "../store/recommendation.js";
|
|
2
|
+
import { commitBlockChangeOutsidePanel as d } from "./nodeConfigWriter.js";
|
|
3
|
+
async function u(e, n) {
|
|
4
|
+
const t = s(), o = t.blockStates[e];
|
|
5
|
+
if (!o)
|
|
6
|
+
return !1;
|
|
7
|
+
const { strategyId: a, strategy: c, size: i } = o.recommendationConfigs;
|
|
8
|
+
if (t.currentRecommendationId === e)
|
|
9
|
+
try {
|
|
10
|
+
await t.fetchRecommendationProducts();
|
|
11
|
+
} catch (m) {
|
|
12
|
+
console.error("[recommendation] product refetch after a strategy change failed", m);
|
|
13
|
+
}
|
|
14
|
+
const r = d(
|
|
15
|
+
e,
|
|
16
|
+
{ strategyId: a, strategy: c, size: i },
|
|
17
|
+
o.recommendationProducts,
|
|
18
|
+
n
|
|
19
|
+
);
|
|
20
|
+
return r || console.error("[recommendation] strategy change did not reach a node", { blockId: e }), r;
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
u as commitStrategyChange
|
|
24
|
+
};
|
|
@@ -1,34 +1,43 @@
|
|
|
1
|
-
const
|
|
1
|
+
const o = "strategy", u = [
|
|
2
2
|
{
|
|
3
3
|
key: "locale",
|
|
4
4
|
getValue: (e) => e.language,
|
|
5
5
|
getAvailableOptions: (e) => Object.keys(e.languages)
|
|
6
6
|
},
|
|
7
|
+
{
|
|
8
|
+
// A block feeds from either an assigned strategy (RRS) or an algorithm (legacy).
|
|
9
|
+
// Only a fresh RRS block has neither, and its feed URL would otherwise be built
|
|
10
|
+
// from an empty algorithm path.
|
|
11
|
+
key: o,
|
|
12
|
+
getValue: (e) => e.strategyId || e.strategy
|
|
13
|
+
},
|
|
7
14
|
{
|
|
8
15
|
key: "currency",
|
|
9
16
|
getValue: (e) => e.currencySettings.value,
|
|
10
17
|
getAvailableOptions: (e) => e.currencyList.map((n) => n.text),
|
|
11
18
|
canBeEmpty: !0
|
|
12
19
|
}
|
|
13
|
-
],
|
|
14
|
-
function c(e, n, i =
|
|
20
|
+
], l = "newsletter.recommendation-fill-required-fields", g = "newsletter.recommendation-assign-strategy";
|
|
21
|
+
function c(e, n, i = u) {
|
|
15
22
|
return i.filter((t) => {
|
|
16
|
-
var
|
|
23
|
+
var s;
|
|
17
24
|
if (t.condition && !t.condition(e))
|
|
18
25
|
return !1;
|
|
19
|
-
const
|
|
20
|
-
if (t.canBeEmpty && (
|
|
26
|
+
const a = (s = t.getAvailableOptions) == null ? void 0 : s.call(t, n);
|
|
27
|
+
if (t.canBeEmpty && (a == null ? void 0 : a.length) === 0)
|
|
21
28
|
return !1;
|
|
22
|
-
const
|
|
23
|
-
return
|
|
29
|
+
const r = t.getValue(e);
|
|
30
|
+
return r ? a !== void 0 && !a.includes(r) : !0;
|
|
24
31
|
}).map((t) => t.key);
|
|
25
32
|
}
|
|
26
|
-
function
|
|
33
|
+
function y(e, n) {
|
|
27
34
|
return c(e, n).length === 0;
|
|
28
35
|
}
|
|
29
36
|
export {
|
|
30
|
-
|
|
31
|
-
|
|
37
|
+
u as REQUIRED_RECOMMENDATION_FIELDS,
|
|
38
|
+
g as RecommendationAssignStrategyKey,
|
|
39
|
+
l as RecommendationRequiredFieldsKey,
|
|
40
|
+
o as STRATEGY_FIELD_KEY,
|
|
32
41
|
c as getInvalidFields,
|
|
33
|
-
|
|
42
|
+
y as isConfigValid
|
|
34
43
|
};
|
package/dist/guido.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";.gap-16[data-v-5553d071],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-
|
|
1
|
+
@charset "UTF-8";.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-1ca6baf0]{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-cc5ee925]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-cc5ee925]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-cc5ee925]{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-ec2027ff] .vueperslides__bullets,[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}.assign-strategy-drawer-content .assign-strategy-select[data-v-7f9442a6]{width:100%;max-width:none}.assign-strategy-drawer-content .assign-strategy-select[data-v-7f9442a6] .in-skeleton{width:100%!important}.assign-strategy-drawer-content .assign-strategy-select[data-v-7f9442a6] .in-dropdown-box__container{width:413px}.assign-strategy-drawer .spaced-dot-sep{background-image:linear-gradient(90deg,#91949f 20%,#fff0 0);background-position:center bottom;background-repeat:repeat-x;background-size:5px 1px}.assign-strategy-drawer .spaced-dot-sep--top{background-position:center top}.assign-strategy-drawer .spaced-dot-sep--fc-n:first-child{background:none}
|
|
@@ -1,57 +1,45 @@
|
|
|
1
1
|
import "../../vue-demi/lib/index.js";
|
|
2
|
-
import { unref as p
|
|
3
|
-
function
|
|
4
|
-
return w() ? (m(t), !0) : !1;
|
|
5
|
-
}
|
|
6
|
-
function a(t) {
|
|
2
|
+
import { unref as p } from "vue";
|
|
3
|
+
function f(t) {
|
|
7
4
|
return typeof t == "function" ? t() : p(t);
|
|
8
5
|
}
|
|
9
|
-
const g = typeof window < "u" && typeof document < "u";
|
|
10
6
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
11
|
-
const
|
|
12
|
-
}
|
|
13
|
-
function h() {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
function v(t, n) {
|
|
18
|
-
function o(...e) {
|
|
19
|
-
return new Promise((r, i) => {
|
|
20
|
-
Promise.resolve(t(() => n.apply(this, e), { fn: n, thisArg: this, args: e })).then(r).catch(i);
|
|
7
|
+
const m = () => {
|
|
8
|
+
};
|
|
9
|
+
function h(t, n) {
|
|
10
|
+
function r(...e) {
|
|
11
|
+
return new Promise((i, o) => {
|
|
12
|
+
Promise.resolve(t(() => n.apply(this, e), { fn: n, thisArg: this, args: e })).then(i).catch(o);
|
|
21
13
|
});
|
|
22
14
|
}
|
|
23
|
-
return
|
|
15
|
+
return r;
|
|
24
16
|
}
|
|
25
|
-
function
|
|
26
|
-
let
|
|
27
|
-
const
|
|
28
|
-
clearTimeout(u),
|
|
17
|
+
function T(t, n = {}) {
|
|
18
|
+
let r, e, i = m;
|
|
19
|
+
const o = (u) => {
|
|
20
|
+
clearTimeout(u), i(), i = m;
|
|
29
21
|
};
|
|
30
22
|
return (u) => {
|
|
31
|
-
const
|
|
32
|
-
return
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
},
|
|
36
|
-
e &&
|
|
37
|
-
},
|
|
23
|
+
const a = f(t), l = f(n.maxWait);
|
|
24
|
+
return r && o(r), a <= 0 || l !== void 0 && l <= 0 ? (e && (o(e), e = null), Promise.resolve(u())) : new Promise((c, s) => {
|
|
25
|
+
i = n.rejectOnCancel ? s : c, l && !e && (e = setTimeout(() => {
|
|
26
|
+
r && o(r), e = null, c(u());
|
|
27
|
+
}, l)), r = setTimeout(() => {
|
|
28
|
+
e && o(e), e = null, c(u());
|
|
29
|
+
}, a);
|
|
38
30
|
});
|
|
39
31
|
};
|
|
40
32
|
}
|
|
41
|
-
function
|
|
42
|
-
return
|
|
43
|
-
|
|
33
|
+
function P(t, n = 200, r = {}) {
|
|
34
|
+
return h(
|
|
35
|
+
T(n, r),
|
|
44
36
|
t
|
|
45
37
|
);
|
|
46
38
|
}
|
|
47
39
|
export {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
f as noop,
|
|
54
|
-
a as toValue,
|
|
55
|
-
T as tryOnScopeDispose,
|
|
56
|
-
A as useDebounceFn
|
|
40
|
+
h as createFilterWrapper,
|
|
41
|
+
T as debounceFilter,
|
|
42
|
+
m as noop,
|
|
43
|
+
f as toValue,
|
|
44
|
+
P as useDebounceFn
|
|
57
45
|
};
|
package/dist/sprite.svg
CHANGED
|
@@ -3107,12 +3107,6 @@
|
|
|
3107
3107
|
<symbol viewBox="0 0 24 24" data-token-name="line-replace-dynamic-content" id="line-replace-dynamic-content">
|
|
3108
3108
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.8327 5.42341C11.2222 5.81502 11.221 6.44877 10.8301 6.83894C10.8013 6.86765 10.7712 6.89425 10.74 6.91873L8.70549 8.95706C8.31533 9.34795 7.68275 9.34795 7.29259 8.95706C6.90243 8.56617 6.90243 7.93242 7.29259 7.54153L7.73664 7.09666L7.00053 7.09662C6.44823 7.0966 6.00049 7.54432 6.00049 8.09662V10.0001C6.00049 10.5524 5.55277 11.0001 5.00049 11.0001C4.4482 11.0001 4.00049 10.5524 4.00049 10.0001V8.09662C4.00049 6.43972 5.34372 5.09655 7.00062 5.09662L7.6872 5.09665L7.30179 4.70909C6.91235 4.31748 6.91353 3.68372 7.30442 3.29356C7.69531 2.9034 8.32788 2.90458 8.71732 3.29619L10.8327 5.42341ZM12 6.00024C12 4.89567 12.8954 4.00024 14 4.00024H18C19.1046 4.00024 20 4.89567 20 6.00024V10.0002C20 11.1048 19.1046 12.0002 18 12.0002H14C12.8954 12.0002 12 11.1048 12 10.0002V6.00024ZM14 6.00024H18V10.0002H14V6.00024ZM4 14.0002C4 12.8957 4.89543 12.0002 6 12.0002H10C11.1046 12.0002 12 12.8957 12 14.0002V18.0002C12 19.1048 11.1046 20.0002 10 20.0002H6C4.89543 20.0002 4 19.1048 4 18.0002V14.0002ZM6 14.0002H10V18.0002H6V14.0002ZM13.2939 17.1612C12.9031 17.5513 12.9019 18.1851 13.2913 18.5767L15.4067 20.7039C15.7961 21.0955 16.4287 21.0967 16.8196 20.7065C17.2105 20.3164 17.2117 19.6826 16.8222 19.291L16.4368 18.9034L17.1234 18.9035C18.7803 18.9035 20.1235 17.5604 20.1235 15.9035V14C20.1235 13.4477 19.6758 13 19.1235 13C18.5713 13 18.1235 13.4477 18.1235 14L18.1235 15.9035C18.1235 16.4558 17.6758 16.9035 17.1235 16.9035L16.3874 16.9034L16.8314 16.4586C17.2216 16.0677 17.2216 15.4339 16.8314 15.043C16.4413 14.6522 15.8087 14.6522 15.4185 15.043L13.384 17.0814C13.3528 17.1058 13.3227 17.1324 13.2939 17.1612Z"/>
|
|
3109
3109
|
</symbol>
|
|
3110
|
-
<symbol viewBox="0 0 24 24" id="line-accessibility">
|
|
3111
|
-
<g transform="translate(2 2)">
|
|
3112
|
-
<rect x="1" y="1" width="18" height="18" rx="9" fill="none" stroke="currentColor" stroke-width="2"/>
|
|
3113
|
-
<path fill="currentColor" d="M14.8125 6.08473C15.332 5.94828 15.6875 6.47668 15.6875 6.95875C15.6873 7.44052 15.2498 7.66778 14.8125 7.8318C14.798 7.83727 14.7826 7.84147 14.7676 7.84547L12.3262 8.69898C12.013 8.81663 11.8784 8.93913 11.8486 8.99391C11.848 8.99533 11.8475 8.9975 11.8467 8.99879C11.8153 9.05489 11.7235 9.29227 11.8379 10.0076L11.9961 11.238L12.8887 16.0154C12.8969 16.0521 12.9036 16.0895 12.9092 16.1267C12.9741 16.5696 12.6498 16.9997 12.0342 16.9998C11.4983 16.9998 11.2617 16.63 11.1592 16.1267C11.1592 16.1267 10.3701 11.8181 9.9873 11.8181C9.60444 11.8205 8.94137 15.6235 8.83887 16.1267C8.7363 16.63 8.49971 16.9998 7.96387 16.9998C7.34999 16.9996 7.02548 16.5711 7.08887 16.1296L7.0957 16.0955C7.09789 16.0818 7.09981 16.0676 7.10254 16.0545L7.9834 11.2371L8.1416 10.0066C8.17359 9.80644 8.26392 9.23379 8.15137 8.9441C8.11665 8.85389 8.0452 8.7492 7.7793 8.64723L5.17962 7.83495C5.17734 7.83424 5.17578 7.83212 5.17578 7.82972C5.17578 7.82745 5.17437 7.82541 5.17224 7.8246C4.74007 7.66146 4.31254 7.43412 4.3125 6.95777C4.31258 6.47553 4.66813 5.9482 5.1875 6.08473C5.26161 6.10405 5.33481 6.12744 5.40625 6.15504C6.12486 6.3593 8.37146 6.9607 9.98828 6.9607C11.7281 6.96068 14.1981 6.26431 14.707 6.115C14.7342 6.10658 14.7619 6.09917 14.7891 6.09156L14.7998 6.08766L14.8125 6.08473ZM9.70117 3.02906C9.99821 2.96998 10.3061 3.00106 10.5859 3.11695C10.8657 3.23286 11.1052 3.42866 11.2734 3.68043C11.4416 3.93217 11.5312 4.22828 11.5312 4.53101C11.5308 4.93693 11.369 5.326 11.082 5.61305C10.795 5.9001 10.406 6.06183 10 6.06226C9.69721 6.06226 9.40119 5.97264 9.14941 5.80445C8.89762 5.63621 8.70086 5.39673 8.58496 5.11695C8.46918 4.83725 8.439 4.52909 8.49805 4.23219C8.55716 3.93526 8.70292 3.6621 8.91699 3.44801C9.13112 3.23391 9.4042 3.08814 9.70117 3.02906Z"/>
|
|
3114
|
-
</g>
|
|
3115
|
-
</symbol>
|
|
3116
3110
|
<svg viewBox="0 0 24 24" data-token-name="line-advanced-settings" id="line-advanced-settings">
|
|
3117
3111
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M16 3C15.4477 3 15 3.44772 15 4V6V8C15 8.55228 15.4477 9 16 9C16.5523 9 17 8.55228 17 8V7H20C20.5523 7 21 6.55228 21 6C21 5.44772 20.5523 5 20 5H17V4C17 3.44772 16.5523 3 16 3ZM3 6C3 5.44772 3.44772 5 4 5H12C12.5523 5 13 5.44772 13 6C13 6.55228 12.5523 7 12 7H4C3.44772 7 3 6.55228 3 6ZM16 15C15.4477 15 15 15.4477 15 16V18V20C15 20.5523 15.4477 21 16 21C16.5523 21 17 20.5523 17 20V19H20C20.5523 19 21 18.5523 21 18C21 17.4477 20.5523 17 20 17H17V16C17 15.4477 16.5523 15 16 15ZM3 18C3 17.4477 3.44772 17 4 17H12C12.5523 17 13 17.4477 13 18C13 18.5523 12.5523 19 12 19H4C3.44772 19 3 18.5523 3 18ZM7 10C7 9.44772 7.44772 9 8 9C8.55228 9 9 9.44772 9 10V12V14C9 14.5523 8.55228 15 8 15C7.44772 15 7 14.5523 7 14V13H4C3.44772 13 3 12.5523 3 12C3 11.4477 3.44772 11 4 11H7V10ZM12 11C11.4477 11 11 11.4477 11 12C11 12.5523 11.4477 13 12 13H20C20.5523 13 21 12.5523 21 12C21 11.4477 20.5523 11 20 11H12Z"/>
|
|
3118
3112
|
</svg>
|
|
@@ -391,8 +391,6 @@ export declare const FeaturesSchema: v.ObjectSchema<{
|
|
|
391
391
|
readonly liquidSyntax: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
392
392
|
/** Enable autosave (3-min interval + tab-hide). User toggles on/off from the header. */
|
|
393
393
|
readonly autosave: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
394
|
-
/** Enable the Stripo Accessibility Checker control in the editor toolbar. */
|
|
395
|
-
readonly accessibilityTesting: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
396
394
|
/** Enable pre-save domain-allowlist validation (opt-in; Guido self-serves the block toaster) */
|
|
397
395
|
readonly allowlistEnabled: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
398
396
|
/** Enable persistent link tracking-id assignment for the click heatmap (opt-in) */
|
|
@@ -793,8 +791,6 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
|
|
|
793
791
|
readonly liquidSyntax: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
794
792
|
/** Enable autosave (3-min interval + tab-hide). User toggles on/off from the header. */
|
|
795
793
|
readonly autosave: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
796
|
-
/** Enable the Stripo Accessibility Checker control in the editor toolbar. */
|
|
797
|
-
readonly accessibilityTesting: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
798
794
|
/** Enable pre-save domain-allowlist validation (opt-in; Guido self-serves the block toaster) */
|
|
799
795
|
readonly allowlistEnabled: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
800
796
|
/** Enable persistent link tracking-id assignment for the click heatmap (opt-in) */
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
|
-
saveSilent: () => Promise<Omit<import("../../@types/stripo").SavedTemplateDetails, "metadata" | "silent"> | undefined>;
|
|
3
|
-
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
4
2
|
export default _default;
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
|
+
handleSave: (isSilent: boolean) => Promise<Omit<import("../../../@types/stripo.js").SavedTemplateDetails, "metadata" | "silent"> | undefined> | undefined;
|
|
3
|
+
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
4
|
export default _default;
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
|
+
handleSave: (isSilent: boolean) => Promise<Omit<import("../../../@types/stripo.js").SavedTemplateDetails, "metadata" | "silent"> | undefined> | undefined;
|
|
3
|
+
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
4
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { CompileEmailOptions } from '@@/Types/
|
|
2
|
-
import { GetCompiledEmailOptions, CompiledEmailResult, TemplateData } from '@@/Types/
|
|
1
|
+
import type { CompileEmailOptions } from '@@/Types/actions-api';
|
|
2
|
+
import { GetCompiledEmailOptions, CompiledEmailResult, TemplateData } from '@@/Types/actions-api';
|
|
3
3
|
export declare const useActionsApi: () => {
|
|
4
4
|
getCompiledEmail: (options?: GetCompiledEmailOptions) => Promise<CompiledEmailResult>;
|
|
5
5
|
getTemplateData: () => Promise<TemplateData>;
|
|
@@ -97,7 +97,6 @@ export declare const useConfig: () => {
|
|
|
97
97
|
modulesDisabled: boolean;
|
|
98
98
|
liquidSyntax: boolean;
|
|
99
99
|
autosave: boolean;
|
|
100
|
-
accessibilityTesting: boolean;
|
|
101
100
|
allowlistEnabled: boolean;
|
|
102
101
|
linkTrackingIds: boolean;
|
|
103
102
|
reusableRecommendationStrategy: boolean;
|
|
@@ -233,7 +232,6 @@ export declare const useConfig: () => {
|
|
|
233
232
|
modulesDisabled: boolean;
|
|
234
233
|
liquidSyntax: boolean;
|
|
235
234
|
autosave: boolean;
|
|
236
|
-
accessibilityTesting: boolean;
|
|
237
235
|
allowlistEnabled: boolean;
|
|
238
236
|
linkTrackingIds: boolean;
|
|
239
237
|
reusableRecommendationStrategy: boolean;
|
|
@@ -5,7 +5,9 @@ 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;
|
|
8
9
|
};
|
|
10
|
+
export declare const strategyEditPath: (strategyId: string | number) => string;
|
|
9
11
|
export declare const QUERY_PARAMS: {
|
|
10
12
|
CLIENT_ID: string;
|
|
11
13
|
};
|
|
@@ -15,6 +15,8 @@ export declare class RecommendationBlock extends Block {
|
|
|
15
15
|
* This avoids generating a new (different) ID in onCreated().
|
|
16
16
|
*/
|
|
17
17
|
private _pendingBlockId;
|
|
18
|
+
/** Ids already reset under their new name, so the deferred pass skips their stale snapshot. */
|
|
19
|
+
private _resetSourceIds;
|
|
18
20
|
constructor();
|
|
19
21
|
getId(): string;
|
|
20
22
|
getIcon(): string;
|
|
@@ -73,6 +75,14 @@ export declare class RecommendationBlock extends Block {
|
|
|
73
75
|
* in the document and finding the maximum existing ID + 1.
|
|
74
76
|
*/
|
|
75
77
|
private _generateNextId;
|
|
78
|
+
/**
|
|
79
|
+
* Drops the "already fetched" claims of a block that arrived holding a baked id
|
|
80
|
+
* (saved module, paste, duplicate), so the settings panel reads its strategy again.
|
|
81
|
+
*
|
|
82
|
+
* Deferred a tick: the collision handlers rename a sibling first, and either sibling can be
|
|
83
|
+
* the renamed one depending on where the module was dropped (SD-149916).
|
|
84
|
+
*/
|
|
85
|
+
private _scheduleArrivalReset;
|
|
76
86
|
/**
|
|
77
87
|
* Heals a duplicate that slipped past the create-time `_detectDuplicate`
|
|
78
88
|
* scan (or that was persisted by an older template before SD-142352).
|
|
@@ -10,6 +10,7 @@
|
|
|
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;
|
|
13
14
|
/**
|
|
14
15
|
* Default currency configuration
|
|
15
16
|
* 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, EXCLUDED_ALGORITHM_IDS, } from './defaultConfig';
|
|
13
|
+
export { DEFAULT_NODE_CONFIG, DEFAULT_CURRENCY, DEFAULT_COMPOSITION, DEFAULT_VISIBILITY, CURRENT_CONFIG_VERSION, PRE_RRS_CONFIG_VERSION, RRS_CONFIG_VERSION, EXCLUDED_ALGORITHM_IDS, } from './defaultConfig';
|
|
@@ -70,6 +70,8 @@ export declare class RecommendationBlockControl extends CommonControl {
|
|
|
70
70
|
* state was rebuilt with (SD-150347).
|
|
71
71
|
*/
|
|
72
72
|
private _syncNodeConfigIfChanged;
|
|
73
|
+
/** Whether the deferred write would move the node's strategyId — see the caller (SD-149916). */
|
|
74
|
+
private _isPendingStrategyIdChange;
|
|
73
75
|
private _capturePendingNodeConfigWrite;
|
|
74
76
|
/**
|
|
75
77
|
* Accumulates the pending write into `documentModifier` without applying, so the
|
|
@@ -2,6 +2,7 @@ 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;
|
|
5
6
|
private storeUnsubscription;
|
|
6
7
|
private listeners;
|
|
7
8
|
private lastPaintedState;
|
|
@@ -9,6 +10,14 @@ export declare class StrategyControl extends CommonControl {
|
|
|
9
10
|
getTemplate(): string;
|
|
10
11
|
private _strategyAction;
|
|
11
12
|
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;
|
|
12
21
|
onDestroy(): void;
|
|
13
22
|
private _teardown;
|
|
14
23
|
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): boolean;
|
|
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,6 +151,11 @@ 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;
|
|
154
159
|
}
|
|
155
160
|
/**
|
|
156
161
|
* Updates product content in-place without regenerating HTML structure.
|
|
@@ -161,7 +166,7 @@ export interface UpdateProductContentInPlaceOptions {
|
|
|
161
166
|
* After updating desktop, also updates mobile container to keep them in sync.
|
|
162
167
|
*
|
|
163
168
|
* Falls back to false when product count changed (need to add/remove elements).
|
|
164
|
-
* @param options - Configuration options
|
|
169
|
+
* @param options - Configuration options; `onApplied` fires only when a batch was committed
|
|
165
170
|
* @returns true if in-place update was successful, false to fall back to full regeneration
|
|
166
171
|
*/
|
|
167
172
|
export declare function updateProductContentInPlace(options: UpdateProductContentInPlaceOptions): boolean;
|