@useinsider/guido 3.23.0-beta.2595053 → 3.23.0-beta.2df7606
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 +1 -0
- package/dist/@types/config/schemas.js +9 -8
- package/dist/components/Guido.vue.js +8 -8
- package/dist/components/Guido.vue2.js +111 -100
- package/dist/components/organisms/AutoSaveController.vue2.js +20 -10
- package/dist/components/organisms/display-conditions/DisplayConditionCreateDrawer.vue.js +1 -1
- package/dist/components/organisms/display-conditions/DisplayConditionCreateDrawer.vue2.js +28 -28
- package/dist/components/organisms/display-conditions/DisplayConditionSelectDrawer.vue.js +1 -1
- package/dist/components/organisms/display-conditions/DisplayConditionSelectDrawer.vue2.js +25 -25
- package/dist/components/organisms/header/AutoSaveStatus.vue.js +17 -0
- package/dist/components/organisms/header/AutoSaveStatus.vue2.js +25 -0
- package/dist/components/organisms/header/EditorActions.vue.js +13 -13
- package/dist/components/organisms/header/EditorActions.vue2.js +58 -73
- package/dist/components/organisms/header/EditorActionsMenu.vue.js +20 -0
- package/dist/components/organisms/header/EditorActionsMenu.vue2.js +99 -0
- package/dist/components/organisms/header/HeaderWrapper.vue.js +6 -6
- package/dist/components/organisms/header/HeaderWrapper.vue2.js +9 -17
- package/dist/components/organisms/header/LeftSlot.vue.js +1 -1
- package/dist/components/organisms/header/LeftSlot.vue2.js +28 -23
- package/dist/components/organisms/header/MiddleSlot.vue.js +4 -4
- package/dist/components/organisms/header/MiddleSlot.vue2.js +8 -7
- package/dist/components/organisms/header/RightSlot.vue.js +11 -10
- package/dist/components/organisms/header/RightSlot.vue2.js +13 -18
- package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue.js +18 -0
- package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue2.js +37 -0
- package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue.js +22 -0
- package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue2.js +48 -0
- package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue.js +19 -0
- package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue2.js +90 -0
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue.js +12 -12
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +60 -35
- package/dist/composables/useAccessibilityApi.js +51 -0
- package/dist/composables/useCustomInterfaceAppearance.js +42 -41
- package/dist/composables/useDisplayConditions.js +42 -41
- package/dist/composables/useTranslations.js +2 -1
- package/dist/config/i18n/en/labels.json.js +36 -4
- package/dist/config/i18n/en/tooltips.json.js +2 -1
- package/dist/extensions/DisplayConditions/control.js +32 -22
- package/dist/extensions/LinkTracking/writer.js +29 -23
- package/dist/guido.css +1 -1
- package/dist/package.json.js +1 -1
- package/dist/sprite.svg +10 -0
- package/dist/src/@types/config/schemas.d.ts +2 -0
- package/dist/src/components/organisms/AutoSaveController.vue.d.ts +19 -1
- package/dist/src/components/organisms/header/EditorActionsMenu.vue.d.ts +2 -0
- package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +1 -19
- package/dist/src/components/organisms/header/RightSlot.vue.d.ts +1 -19
- package/dist/src/components/organisms/header/accessibility/AccessibilityToolbar.vue.d.ts +2 -0
- package/dist/src/components/organisms/header/accessibility/ColorVisionSelect.vue.d.ts +2 -0
- package/dist/src/components/organisms/onboarding/EditorTabBarOnboarding.vue.d.ts +2 -0
- package/dist/src/composables/useAccessibilityApi.d.ts +13 -0
- package/dist/src/composables/useActionsApi.d.ts +2 -2
- package/dist/src/composables/useConfig.d.ts +2 -0
- package/dist/src/composables/useDisplayConditions.d.ts +1 -0
- package/dist/src/extensions/DisplayConditions/control.d.ts +1 -0
- package/dist/src/extensions/LinkTracking/writer.d.ts +1 -1
- package/dist/src/stores/autosave.d.ts +73 -1
- package/dist/src/stores/config.d.ts +21 -0
- package/dist/src/stores/editor.d.ts +109 -0
- package/dist/src/stores/onboarding.d.ts +966 -35
- package/dist/src/stores/version-history.d.ts +1 -1
- package/dist/src/utils/displayCondition.d.ts +2 -2
- package/dist/src/utils/linkTrackingIds.d.ts +2 -0
- package/dist/src/utils/templatePreparation.d.ts +1 -1
- package/dist/src/utils/timeUtil.d.ts +5 -8
- package/dist/static/stripo-runtime-manifest.json.js +1 -1
- package/dist/static/styles/components/accessibility.css.js +234 -0
- package/dist/static/styles/variables.css.js +2 -0
- package/dist/stores/autosave.js +12 -7
- package/dist/stores/editor.js +8 -3
- package/dist/stores/onboarding.js +48 -22
- package/dist/utils/displayCondition.js +11 -11
- package/dist/utils/linkTrackingIds.js +60 -59
- package/dist/utils/templatePreparation.js +61 -52
- package/dist/utils/timeUtil.js +6 -17
- package/package.json +2 -2
- package/dist/components/organisms/header/AutoSaveToggle.vue.js +0 -22
- package/dist/components/organisms/header/AutoSaveToggle.vue2.js +0 -19
- /package/dist/src/components/organisms/header/{AutoSaveToggle.vue.d.ts → AutoSaveStatus.vue.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -167,6 +167,7 @@ const config: GuidoConfigInput = {
|
|
|
167
167
|
allowlistEnabled?: boolean, // Default: false - Pre-save domain-allowlist check (opt-in). Guido self-serves the block toaster (role lookup, deep-link, copy from window.trans).
|
|
168
168
|
allowSaveWithErrors?: boolean, // Default: true - Allow the validation drawer's "Save and Continue" soft-save. Set false to hard-block invalid saves (transactional + unsubscribe pages).
|
|
169
169
|
reusableRecommendationStrategy?: boolean, // Default: false - Assign an RRS strategy to recommendation blocks instead of per-block algorithm/filters/shuffle/product-count settings.
|
|
170
|
+
accessibilityTesting?: boolean, // Default: false - Show the Accessibility Test entry in the header kebab menu (Stripo's checker: contrast, image alternatives, colour-vision simulation) and the tab-bar onboarding tour that points at it.
|
|
170
171
|
},
|
|
171
172
|
|
|
172
173
|
// Optional: Callbacks
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ModuleFolderDefaults as
|
|
2
|
-
import { object as a, number as s, optional as e, string as t, picklist as m, pipe as i, minLength as b, custom as k, boolean as o, array as n, transform as
|
|
1
|
+
import { ModuleFolderDefaults as y } from "../../enums/defaults.js";
|
|
2
|
+
import { object as a, number as s, optional as e, string as t, picklist as m, pipe as i, minLength as b, custom as k, boolean as o, array as n, transform as S, unknown as r, record as g, fallback as R, literal as u, looseObject as C, variant as T, union as h, lazy as I } from "../../node_modules/valibot/dist/index.js";
|
|
3
3
|
const p = {
|
|
4
4
|
/** Promotional/marketing emails */
|
|
5
5
|
PROMOTIONAL: 1,
|
|
@@ -76,7 +76,7 @@ const p = {
|
|
|
76
76
|
value: t()
|
|
77
77
|
})
|
|
78
78
|
)
|
|
79
|
-
}), f =
|
|
79
|
+
}), f = I(() => C({
|
|
80
80
|
text: e(t()),
|
|
81
81
|
// eslint-disable-next-line camelcase -- backend field name
|
|
82
82
|
tag_text: e(t()),
|
|
@@ -176,7 +176,7 @@ const p = {
|
|
|
176
176
|
trackIdCounter: e(
|
|
177
177
|
i(
|
|
178
178
|
s(),
|
|
179
|
-
|
|
179
|
+
S((c) => Number.isFinite(c) ? Math.max(0, Math.floor(c)) : 0)
|
|
180
180
|
),
|
|
181
181
|
0
|
|
182
182
|
),
|
|
@@ -190,7 +190,7 @@ const p = {
|
|
|
190
190
|
recommendationCampaignUrls: e(
|
|
191
191
|
i(
|
|
192
192
|
r(),
|
|
193
|
-
|
|
193
|
+
S((c) => c && typeof c == "object" ? { ...c } : void 0)
|
|
194
194
|
)
|
|
195
195
|
),
|
|
196
196
|
/** Migration-only inputs (legacy block configs) */
|
|
@@ -210,9 +210,9 @@ const p = {
|
|
|
210
210
|
/** Email header settings */
|
|
211
211
|
emailHeader: e(v, { senderName: "", subject: "" }),
|
|
212
212
|
/** Folder name for user-saved modules (used by Stripo plugin panel for path construction) */
|
|
213
|
-
savedModulesFolderName: e(t(),
|
|
213
|
+
savedModulesFolderName: e(t(), y.SAVED_MODULES),
|
|
214
214
|
/** Folder name for default/prebuilt modules (used by Stripo plugin panel for path construction) */
|
|
215
|
-
defaultModulesFolderName: e(t(),
|
|
215
|
+
defaultModulesFolderName: e(t(), y.DEFAULT_MODULES)
|
|
216
216
|
}), F = a({
|
|
217
217
|
/** Whether to show the header bar */
|
|
218
218
|
showHeader: e(o(), !0),
|
|
@@ -239,6 +239,7 @@ const p = {
|
|
|
239
239
|
liquidSyntax: e(o(), !1),
|
|
240
240
|
/** Enable autosave (3-min interval + tab-hide). User toggles on/off from the header. */
|
|
241
241
|
autosave: e(o(), !1),
|
|
242
|
+
accessibilityTesting: e(o(), !1),
|
|
242
243
|
/** Enable pre-save domain-allowlist validation (opt-in; Guido self-serves the block toaster) */
|
|
243
244
|
allowlistEnabled: e(o(), !1),
|
|
244
245
|
/** Enable persistent link tracking-id assignment for the click heatmap (opt-in) */
|
|
@@ -317,7 +318,7 @@ const p = {
|
|
|
317
318
|
(c) => typeof c == "function",
|
|
318
319
|
"processor must be a function"
|
|
319
320
|
)
|
|
320
|
-
}), V =
|
|
321
|
+
}), V = T("type", [
|
|
321
322
|
H,
|
|
322
323
|
_,
|
|
323
324
|
q,
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import
|
|
1
|
+
import o from "./Guido.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
3
|
+
import i from "../_virtual/_plugin-vue2_normalizer.js";
|
|
4
4
|
var t = function() {
|
|
5
5
|
var a = this, r = a._self._c, e = a._self._setupProxy;
|
|
6
|
-
return r("div", { ref: "wrapperRef", staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper, { ref: "
|
|
6
|
+
return r("div", { ref: "wrapperRef", staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper), r(e.AutoSaveController, { ref: "autoSaveControllerRef" }), e.editorStore.isPreviewModeOpen ? r(e.PreviewContainer) : a._e(), r("div", { directives: [{ name: "show", rawName: "v-show", value: !e.previewStore.isLoaded, expression: "!previewStore.isLoaded" }], staticClass: "guido-editor__container", class: { "guido-editor__no-header": e.noHeader }, attrs: { id: "guido-editor" } }), r(e.Toaster), r(e.AuthErrorModal), r(e.FilterSelectionDrawer), e.isRrsEnabled || e.hasAssignedStrategy ? r(e.AssignStrategyDrawer) : a._e(), e.isRrsEnabled || e.hasAssignedStrategy ? r(e.RemoveStrategyModal) : a._e(), e.isRrsEnabled ? r(e.LegacyStrategyUpdatedModal) : a._e(), r(e.SaveAsTemplateDrawer), e.isSaveValidationEnabled ? r(e.ValidationErrorDrawer) : a._e(), e.isExternalDisplayConditionsEnabled ? r(e.DisplayConditionsHost) : a._e(), e.isTestPartner() ? a._e() : r(e.OnboardingWrapper, { on: { "onboarding-finished": function(l) {
|
|
7
7
|
return e.emit("onboarding:finished");
|
|
8
8
|
} } }), r(e.UnsubscribeWrapper), r(e.LoadingWrapper)], 1);
|
|
9
|
-
}, s = [], n = /* @__PURE__ */
|
|
10
|
-
|
|
9
|
+
}, s = [], n = /* @__PURE__ */ i(
|
|
10
|
+
o,
|
|
11
11
|
t,
|
|
12
12
|
s,
|
|
13
13
|
!1,
|
|
14
14
|
null,
|
|
15
|
-
"
|
|
15
|
+
"ab777dca"
|
|
16
16
|
);
|
|
17
|
-
const
|
|
17
|
+
const v = n.exports;
|
|
18
18
|
export {
|
|
19
|
-
|
|
19
|
+
v as default
|
|
20
20
|
};
|
|
@@ -1,67 +1,77 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useCortexBlueprintBridge as
|
|
3
|
-
import { useEditorLock as
|
|
4
|
-
import { startEditorOpenMetrics as
|
|
5
|
-
import { provideGuidoActions as
|
|
6
|
-
import { useGuidoStateBridge as
|
|
7
|
-
import { usePartner as
|
|
8
|
-
import { useSaveValidationRollout as
|
|
9
|
-
import { useStripo as
|
|
10
|
-
import { useTimerClone as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import xe from "./organisms/
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import
|
|
1
|
+
import { defineComponent as ue, defineAsyncComponent as m, ref as W, computed as p, watch as G, onMounted as fe, onUnmounted as ye } from "vue";
|
|
2
|
+
import { useCortexBlueprintBridge as ge } from "../composables/useCortexBlueprintBridge.js";
|
|
3
|
+
import { useEditorLock as ve } from "../composables/useEditorLock.js";
|
|
4
|
+
import { startEditorOpenMetrics as be } from "../composables/useEditorOpenMetrics.js";
|
|
5
|
+
import { provideGuidoActions as Se } from "../composables/useGuidoActions.js";
|
|
6
|
+
import { useGuidoStateBridge as he } from "../composables/useGuidoStateBridge.js";
|
|
7
|
+
import { usePartner as Ee } from "../composables/usePartner.js";
|
|
8
|
+
import { useSaveValidationRollout as Ce } from "../composables/useSaveValidationRollout.js";
|
|
9
|
+
import { useStripo as De } from "../composables/useStripo.js";
|
|
10
|
+
import { useTimerClone as Te } from "../composables/useTimerClone.js";
|
|
11
|
+
import { useToaster as ke } from "../composables/useToaster.js";
|
|
12
|
+
import { useTranslations as we } from "../composables/useTranslations.js";
|
|
13
|
+
import { migrate as Ie } from "../config/migrator/index.js";
|
|
14
|
+
import { ModuleFolderDefaults as $ } from "../enums/defaults.js";
|
|
15
|
+
import { RIBBON_SELECTOR as Re } from "../enums/onboarding.js";
|
|
16
|
+
import { ToasterTypeOptions as Fe } from "../enums/toaster.js";
|
|
17
|
+
import { useRecommendationExtensionStore as z, disposeStrategyPageReturnListeners as Me } from "../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
18
|
+
import { disposeUnsubscribeListeners as Le } from "../extensions/Blocks/Unsubscribe/block.js";
|
|
19
|
+
import { disposeDisplayConditionRequest as Oe } from "../extensions/DisplayConditions/bridge.js";
|
|
20
|
+
import { disposeTrackingIdWriter as Ue } from "../extensions/LinkTracking/writer.js";
|
|
21
|
+
import Ne from "./organisms/AutoSaveController.vue.js";
|
|
22
|
+
import _e from "./organisms/base/AuthErrorModal.vue.js";
|
|
23
|
+
import Ae from "./organisms/base/Toaster.vue.js";
|
|
24
|
+
import xe from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
|
|
25
|
+
import Be from "./organisms/header/HeaderWrapper.vue.js";
|
|
26
|
+
import He from "./organisms/LoadingWrapper.vue.js";
|
|
27
|
+
import Pe from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
|
|
28
|
+
import Ve from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
|
|
29
|
+
import We from "./organisms/validation/ValidationErrorDrawer.vue.js";
|
|
30
|
+
import { useStripoApi as Ge } from "../services/stripoApi.js";
|
|
31
|
+
import { useConfigStore as $e } from "../stores/config.js";
|
|
32
|
+
import { useDynamicContentStore as ze } from "../stores/dynamic-content.js";
|
|
30
33
|
import { useEditorStore as C } from "../stores/editor.js";
|
|
31
|
-
import { usePreviewStore as
|
|
32
|
-
import { useSaveValidationStore as
|
|
33
|
-
import { useTemplateStore as
|
|
34
|
-
import { useUnsubscribeStore as
|
|
35
|
-
import { readTrackFloor as
|
|
36
|
-
const
|
|
34
|
+
import { usePreviewStore as qe } from "../stores/preview.js";
|
|
35
|
+
import { useSaveValidationStore as Ke } from "../stores/save-validation.js";
|
|
36
|
+
import { useTemplateStore as je } from "../stores/template.js";
|
|
37
|
+
import { useUnsubscribeStore as Je } from "../stores/unsubscribe.js";
|
|
38
|
+
import { readTrackFloor as q } from "../utils/linkTrackingIds.js";
|
|
39
|
+
const Nt = /* @__PURE__ */ ue({
|
|
37
40
|
__name: "Guido",
|
|
38
41
|
props: {
|
|
39
42
|
config: null,
|
|
40
43
|
ready: { type: Boolean, default: !0 }
|
|
41
44
|
},
|
|
42
45
|
emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
|
|
43
|
-
setup(
|
|
44
|
-
const
|
|
46
|
+
setup(K, { expose: j, emit: i }) {
|
|
47
|
+
const a = K, n = be(), J = m(
|
|
45
48
|
() => import("./organisms/email-preview/PreviewContainer.vue.js")
|
|
46
|
-
),
|
|
49
|
+
), Q = m(
|
|
47
50
|
() => import("./organisms/onboarding/OnboardingWrapper.vue.js")
|
|
48
|
-
),
|
|
51
|
+
), X = m(
|
|
49
52
|
() => import("./organisms/extensions/recommendation/AssignStrategyDrawer.vue.js")
|
|
50
|
-
),
|
|
53
|
+
), Y = m(
|
|
51
54
|
() => import("./organisms/extensions/recommendation/RemoveStrategyModal.vue.js")
|
|
52
|
-
),
|
|
55
|
+
), Z = m(
|
|
53
56
|
() => import("./organisms/display-conditions/DisplayConditionsHost.vue.js")
|
|
54
|
-
),
|
|
57
|
+
), D = W(), ee = m(
|
|
55
58
|
() => import("./organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.js")
|
|
56
|
-
),
|
|
57
|
-
|
|
58
|
-
const
|
|
59
|
+
), y = W(), g = ze(), T = Je(), o = $e();
|
|
60
|
+
a.ready && o.init(a.config);
|
|
61
|
+
const c = C(), te = qe(), u = p(() => c.hasChanges), { isTestPartner: oe } = Ee(), { isEnabled: re, loadRollout: k } = Ce(), { showToaster: w } = ke(), I = we(), R = () => {
|
|
59
62
|
var t;
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
+
if (c.isVersionHistoryOpen) {
|
|
64
|
+
console.debug("guido:save:silent:blocked", { isVersionHistoryOpen: !0 }), w({
|
|
65
|
+
type: Fe.Warning,
|
|
66
|
+
message: I("email-editor.save-blocked-outside-editor")
|
|
67
|
+
});
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
return (t = D.value) == null ? void 0 : t.saveSilent();
|
|
71
|
+
}, F = (t) => {
|
|
72
|
+
c.loadingStatus = t;
|
|
63
73
|
};
|
|
64
|
-
|
|
74
|
+
ge(), he();
|
|
65
75
|
const v = () => {
|
|
66
76
|
var t, e;
|
|
67
77
|
return {
|
|
@@ -69,127 +79,128 @@ const It = /* @__PURE__ */ le({
|
|
|
69
79
|
userId: o.userId,
|
|
70
80
|
username: o.username,
|
|
71
81
|
partnerName: o.partnerName,
|
|
72
|
-
savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) ||
|
|
73
|
-
defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) ||
|
|
82
|
+
savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) || $.SAVED_MODULES,
|
|
83
|
+
defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) || $.DEFAULT_MODULES
|
|
74
84
|
};
|
|
75
|
-
}, { initPlugin:
|
|
85
|
+
}, { initPlugin: M, preloadRuntime: L } = De(n), { runExclusive: O, beginMount: U, isCurrentMount: b } = ve();
|
|
76
86
|
let f = 0;
|
|
77
|
-
const { getDefaultTemplate:
|
|
87
|
+
const { getDefaultTemplate: N } = Ge(), { cloneTimersOnSave: _, hasTimerBlocks: A } = Te(), ne = p(() => {
|
|
78
88
|
var t;
|
|
79
89
|
return !((t = o.ui) != null && t.showHeader);
|
|
80
|
-
}),
|
|
81
|
-
() => !!
|
|
90
|
+
}), ie = p(() => o.isFeatureEnabled("reusableRecommendationStrategy")), se = p(() => o.externalDisplayConditions), ae = p(
|
|
91
|
+
() => !!z().recommendationConfigs.strategyId
|
|
82
92
|
);
|
|
83
|
-
|
|
93
|
+
Se({
|
|
84
94
|
onBack: () => {
|
|
85
|
-
console.debug("guido:back"),
|
|
95
|
+
console.debug("guido:back"), i("back");
|
|
86
96
|
},
|
|
87
97
|
onSaveStart: () => {
|
|
88
|
-
console.debug("guido:save:start"),
|
|
98
|
+
console.debug("guido:save:start"), i("save:start");
|
|
89
99
|
},
|
|
90
100
|
onSaveComplete: (t) => {
|
|
91
101
|
const e = { ...t, metadata: v() };
|
|
92
|
-
console.debug("guido:save:complete", e),
|
|
102
|
+
console.debug("guido:save:complete", e), i("save:complete", e);
|
|
93
103
|
},
|
|
94
104
|
onTestEmailClick: () => {
|
|
95
|
-
console.debug("guido:test-email:click"),
|
|
105
|
+
console.debug("guido:test-email:click"), i("test-email:click");
|
|
96
106
|
}
|
|
97
107
|
});
|
|
98
108
|
const x = (t) => {
|
|
99
109
|
console.debug("dynamic-content:close", t), g.setSelectedDynamicContent(t), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: t }));
|
|
100
|
-
},
|
|
110
|
+
}, B = () => {
|
|
101
111
|
console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
|
|
102
112
|
};
|
|
103
|
-
|
|
104
|
-
|
|
113
|
+
G(() => u.value, () => {
|
|
114
|
+
i("on-change", u.value);
|
|
105
115
|
});
|
|
106
|
-
const
|
|
107
|
-
const e = t, { attribute:
|
|
108
|
-
console.debug("dynamic-content:open", e.detail),
|
|
116
|
+
const S = (t) => {
|
|
117
|
+
const e = t, { attribute: s, position: l } = e.detail;
|
|
118
|
+
console.debug("dynamic-content:open", e.detail), i("dynamic-content:open", s, l);
|
|
109
119
|
};
|
|
110
|
-
let
|
|
120
|
+
let d = null;
|
|
111
121
|
const h = () => {
|
|
112
122
|
var e;
|
|
113
|
-
const t = document.querySelector(
|
|
123
|
+
const t = document.querySelector(Re);
|
|
114
124
|
(e = y.value) == null || e.style.setProperty("--ribbon-offset", `${(t == null ? void 0 : t.offsetHeight) ?? 0}px`);
|
|
115
125
|
}, E = async () => {
|
|
116
126
|
var t;
|
|
117
127
|
n.mark("host_ready");
|
|
118
128
|
try {
|
|
119
|
-
o.initialized || o.init(
|
|
129
|
+
o.initialized || o.init(a.config), c.templateId = o.templateId, n.setContext({
|
|
120
130
|
partnerName: o.partnerName,
|
|
121
131
|
productType: o.productType,
|
|
122
132
|
templateId: o.templateId,
|
|
123
133
|
variationId: o.variationId
|
|
124
134
|
});
|
|
125
|
-
const e = o.template,
|
|
126
|
-
|
|
127
|
-
const
|
|
135
|
+
const e = o.template, s = (e == null ? void 0 : e.html) || "", l = (e == null ? void 0 : e.css) || "", H = (e == null ? void 0 : e.preselectedDynamicContent) || [];
|
|
136
|
+
T.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
|
|
137
|
+
const ce = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {}, P = o.isFeatureEnabled("linkTrackingIds"), de = {
|
|
128
138
|
partnerName: o.partnerName,
|
|
129
139
|
campaignUrls: e == null ? void 0 : e.recommendationCampaignUrls,
|
|
130
140
|
rrsEnabled: o.isFeatureEnabled("reusableRecommendationStrategy")
|
|
131
|
-
},
|
|
141
|
+
}, V = (pe) => n.timed(
|
|
132
142
|
"migration",
|
|
133
|
-
() =>
|
|
143
|
+
() => Ie(pe, ce, de)
|
|
134
144
|
);
|
|
135
145
|
let r = {
|
|
136
|
-
html:
|
|
146
|
+
html: s && await V(s),
|
|
137
147
|
css: l
|
|
138
148
|
};
|
|
139
|
-
r.html || (r = await n.timed("default_template", () =>
|
|
140
|
-
const
|
|
141
|
-
|
|
142
|
-
const
|
|
143
|
-
preselectedDynamicContentList:
|
|
149
|
+
r.html || (r = await n.timed("default_template", () => N()), r.html = await V(r.html));
|
|
150
|
+
const me = P ? q(r.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
|
|
151
|
+
A(r.html) && (r.html = await n.timed("timer_clone", () => _(r.html))), P && (c.trackIdSessionFloor = Math.max(me, q(r.html)));
|
|
152
|
+
const le = {
|
|
153
|
+
preselectedDynamicContentList: H,
|
|
144
154
|
onReady: () => {
|
|
145
|
-
console.debug("guido:ready"),
|
|
155
|
+
console.debug("guido:ready"), i("ready");
|
|
146
156
|
}
|
|
147
157
|
};
|
|
148
|
-
f =
|
|
158
|
+
f = U(), await M(r, v(), le), g.selectedDynamicContentList = H;
|
|
149
159
|
} catch (e) {
|
|
150
160
|
console.error("Failed to initialize Stripo editor:", e), n.markFailed();
|
|
151
161
|
}
|
|
152
162
|
};
|
|
153
|
-
return
|
|
163
|
+
return fe(async () => {
|
|
154
164
|
var e;
|
|
155
|
-
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"),
|
|
165
|
+
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), z().$reset(), C().$reset(), je().$reset(), Ke().$reset(), k(), h();
|
|
156
166
|
const t = (e = y.value) == null ? void 0 : e.parentElement;
|
|
157
|
-
if (t && (
|
|
167
|
+
if (t && (d = new ResizeObserver(h), d.observe(t)), L(), a.ready)
|
|
158
168
|
await E();
|
|
159
169
|
else {
|
|
160
|
-
const
|
|
161
|
-
l && (
|
|
170
|
+
const s = G(() => a.ready, (l) => {
|
|
171
|
+
l && (s(), E());
|
|
162
172
|
});
|
|
163
173
|
}
|
|
164
|
-
document.addEventListener("dynamic-content:open",
|
|
165
|
-
}),
|
|
166
|
-
if (
|
|
167
|
-
|
|
174
|
+
document.addEventListener("dynamic-content:open", S);
|
|
175
|
+
}), ye(() => {
|
|
176
|
+
if (Le(), Me(), n.dispose(), d == null || d.disconnect(), document.removeEventListener("dynamic-content:open", S), b(f)) {
|
|
177
|
+
Oe(), Ue();
|
|
168
178
|
try {
|
|
169
|
-
C()
|
|
179
|
+
const t = C();
|
|
180
|
+
t.isStripoInitialized = !1, t.isAccessibilityTestingOpen = !1, t.imagesHidden = !1, t.colorVisionDeficiency = "";
|
|
170
181
|
} catch (t) {
|
|
171
182
|
console.debug("Failed to close the editor readiness gate on unmount", t);
|
|
172
183
|
}
|
|
173
184
|
}
|
|
174
|
-
|
|
175
|
-
if (
|
|
185
|
+
O(async () => {
|
|
186
|
+
if (b(f))
|
|
176
187
|
try {
|
|
177
188
|
window.UIEditor.removeEditor();
|
|
178
189
|
} catch {
|
|
179
190
|
console.debug("Failed to remove Stripo editor: No editor found");
|
|
180
191
|
}
|
|
181
192
|
}), o.reset();
|
|
182
|
-
}),
|
|
193
|
+
}), j({
|
|
183
194
|
dynamicContent: {
|
|
184
195
|
insert: x,
|
|
185
|
-
close:
|
|
196
|
+
close: B
|
|
186
197
|
},
|
|
187
198
|
hasChanges: u,
|
|
188
|
-
saveSilent:
|
|
189
|
-
setLoading:
|
|
190
|
-
}), { __sfc: !0, openMetrics: n, PreviewContainer:
|
|
199
|
+
saveSilent: R,
|
|
200
|
+
setLoading: F
|
|
201
|
+
}), { __sfc: !0, openMetrics: n, PreviewContainer: J, OnboardingWrapper: Q, AssignStrategyDrawer: X, RemoveStrategyModal: Y, DisplayConditionsHost: Z, autoSaveControllerRef: D, LegacyStrategyUpdatedModal: ee, wrapperRef: y, dynamicContentStore: g, unsubscribeStore: T, props: a, configStore: o, editorStore: c, previewStore: te, hasChanges: u, isTestPartner: oe, isSaveValidationEnabled: re, loadRollout: k, showToaster: w, trans: I, saveSilent: R, setLoading: F, emit: i, buildMetadata: v, initPlugin: M, preloadRuntime: L, runExclusive: O, beginMount: U, isCurrentMount: b, mountGeneration: f, getDefaultTemplate: N, cloneTimersOnSave: _, hasTimerBlocks: A, noHeader: ne, isRrsEnabled: ie, isExternalDisplayConditionsEnabled: se, hasAssignedStrategy: ae, insertDynamicContent: x, closeDynamicContent: B, handleDynamicContentOpen: S, ribbonObserver: d, updateRibbonOffset: h, startEditor: E, AutoSaveController: Ne, AuthErrorModal: _e, Toaster: Ae, FilterSelectionDrawer: xe, HeaderWrapper: Be, LoadingWrapper: He, SaveAsTemplateDrawer: Pe, UnsubscribeWrapper: Ve, ValidationErrorDrawer: We };
|
|
191
202
|
}
|
|
192
203
|
});
|
|
193
204
|
export {
|
|
194
|
-
|
|
205
|
+
Nt as default
|
|
195
206
|
};
|
|
@@ -1,15 +1,25 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useAutoSave as
|
|
3
|
-
import { useSave as
|
|
4
|
-
import { useSaveValidationRollout as
|
|
5
|
-
import {
|
|
6
|
-
|
|
1
|
+
import { defineComponent as c } from "vue";
|
|
2
|
+
import { useAutoSave as m } from "../../composables/useAutoSave.js";
|
|
3
|
+
import { useSave as f } from "../../composables/useSave.js";
|
|
4
|
+
import { useSaveValidationRollout as v } from "../../composables/useSaveValidationRollout.js";
|
|
5
|
+
import { useToaster as p } from "../../composables/useToaster.js";
|
|
6
|
+
import { useConfigStore as S } from "../../stores/config.js";
|
|
7
|
+
const A = /* @__PURE__ */ c({
|
|
7
8
|
__name: "AutoSaveController",
|
|
8
|
-
setup(
|
|
9
|
-
const { save: e, saveRawOnly: t } =
|
|
10
|
-
|
|
9
|
+
setup(d, { expose: u }) {
|
|
10
|
+
const { save: e, saveRawOnly: t } = f(), { isEnabled: r } = v(), { handleError: a } = p(), s = S(), o = () => r.value && s.allowSaveWithErrors, n = () => o() ? t() : e(!1, !0);
|
|
11
|
+
m(n, { clearsChanges: () => !o() });
|
|
12
|
+
const i = async () => {
|
|
13
|
+
try {
|
|
14
|
+
return await e(!0);
|
|
15
|
+
} catch (l) {
|
|
16
|
+
a(l, "Failed to save template");
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
return u({ saveSilent: i }), { __sfc: !0, save: e, saveRawOnly: t, isEnabled: r, handleError: a, configStore: s, isRawAutosave: o, backgroundSave: n, saveSilent: i };
|
|
11
21
|
}
|
|
12
22
|
});
|
|
13
23
|
export {
|
|
14
|
-
|
|
24
|
+
A as default
|
|
15
25
|
};
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { defineComponent as w, reactive as
|
|
1
|
+
import { defineComponent as w, reactive as L, ref as c, computed as u, watch as N } from "vue";
|
|
2
2
|
import R from "../../wrappers/WpDrawer.vue.js";
|
|
3
|
-
import { useDisplayConditions as
|
|
4
|
-
import { useTranslations as
|
|
5
|
-
import { DISPLAY_CONDITION_LIMITS as
|
|
6
|
-
import { useDisplayConditionStore as
|
|
7
|
-
import { InRadioButton as
|
|
8
|
-
import
|
|
3
|
+
import { useDisplayConditions as k, DISPLAY_CONDITIONS_TRANS_KEY as i } from "../../../composables/useDisplayConditions.js";
|
|
4
|
+
import { useTranslations as Y } from "../../../composables/useTranslations.js";
|
|
5
|
+
import { DISPLAY_CONDITION_LIMITS as j } from "../../../enums/display-condition.js";
|
|
6
|
+
import { useDisplayConditionStore as E } from "../../../stores/display-condition.js";
|
|
7
|
+
import { InRadioButton as P, InBasicTextInput as F } from "@useinsider/design-system-vue";
|
|
8
|
+
import G from "./CodeEditorField.vue.js";
|
|
9
9
|
const Z = /* @__PURE__ */ w({
|
|
10
10
|
__name: "DisplayConditionCreateDrawer",
|
|
11
|
-
setup(
|
|
12
|
-
const n =
|
|
11
|
+
setup(K) {
|
|
12
|
+
const n = Y(), p = E(), {
|
|
13
13
|
validate: v,
|
|
14
14
|
notifyInvalid: f,
|
|
15
15
|
createInline: y,
|
|
16
|
-
createAndSave:
|
|
17
|
-
cancel:
|
|
18
|
-
describeWithAcademyLink:
|
|
19
|
-
} =
|
|
16
|
+
createAndSave: _,
|
|
17
|
+
cancel: b,
|
|
18
|
+
describeWithAcademyLink: B
|
|
19
|
+
} = k(), m = () => ({ name: "", description: "", codeBefore: "", codeAfter: "" }), e = L(m()), o = c({}), r = c(!1), l = c(!1), s = u(() => r.value || l.value), g = c(), I = c();
|
|
20
20
|
let d = 0;
|
|
21
|
-
|
|
21
|
+
N(() => p.isCreateOpen, (a) => {
|
|
22
22
|
if (d += 1, !a)
|
|
23
23
|
return;
|
|
24
24
|
const { editing: t } = p;
|
|
@@ -27,37 +27,37 @@ const Z = /* @__PURE__ */ w({
|
|
|
27
27
|
description: t.description,
|
|
28
28
|
codeBefore: t.beforeScript,
|
|
29
29
|
codeAfter: t.afterScript
|
|
30
|
-
} : m()), o.value = {},
|
|
30
|
+
} : m()), o.value = {}, r.value = !1;
|
|
31
31
|
}, { immediate: !0 });
|
|
32
|
-
const C = u(() =>
|
|
32
|
+
const C = u(() => B("create-description")), D = u(() => ({
|
|
33
33
|
cancelOrBackButton: {
|
|
34
34
|
styling: "ghost",
|
|
35
35
|
type: "secondary",
|
|
36
|
-
labelText:
|
|
36
|
+
labelText: n(`${i}.cancel`),
|
|
37
37
|
disabledStatus: s.value
|
|
38
38
|
},
|
|
39
39
|
secondaryButton: {
|
|
40
40
|
styling: "solid",
|
|
41
41
|
type: "subtle-primary",
|
|
42
|
-
labelText:
|
|
43
|
-
loadingStatus:
|
|
42
|
+
labelText: n(`${i}.create-and-save`),
|
|
43
|
+
loadingStatus: r.value
|
|
44
44
|
},
|
|
45
45
|
primaryButton: {
|
|
46
46
|
styling: "solid",
|
|
47
47
|
type: "primary",
|
|
48
|
-
labelText:
|
|
48
|
+
labelText: n(`${i}.create`),
|
|
49
49
|
disabledStatus: s.value
|
|
50
50
|
}
|
|
51
51
|
})), O = (a, t) => {
|
|
52
52
|
t !== e[a] && (e[a] = t, o.value[a] && (o.value = { ...o.value, [a]: void 0 }));
|
|
53
|
-
}, T = u(() => `${
|
|
54
|
-
return { __sfc: !0,
|
|
53
|
+
}, T = u(() => `${n(`${i}.condition-description`)} <span class="guido-display-condition-create__optional">(${n(`${i}.optional`)})</span>`);
|
|
54
|
+
return { __sfc: !0, trans: n, store: p, validate: v, notifyInvalid: f, createInline: y, createAndSave: _, cancel: b, describeWithAcademyLink: B, emptyDraft: m, draft: e, errors: o, isSaving: r, isReadingCode: l, isBusy: s, codeBeforeRef: g, codeAfterRef: I, openGeneration: d, descriptionText: C, footerButtonGroupOptions: D, updateField: O, descriptionLabel: T, submit: async (a) => {
|
|
55
55
|
var S, A;
|
|
56
56
|
if (s.value)
|
|
57
57
|
return;
|
|
58
58
|
const t = d;
|
|
59
59
|
l.value = !0;
|
|
60
|
-
const [$, x] = await Promise.all([(S =
|
|
60
|
+
const [$, x] = await Promise.all([(S = g.value) == null ? void 0 : S.read(), (A = I.value) == null ? void 0 : A.read()]);
|
|
61
61
|
if (l.value = !1, t !== d)
|
|
62
62
|
return;
|
|
63
63
|
if (e.codeBefore = $ ?? e.codeBefore, e.codeAfter = x ?? e.codeAfter, o.value = v(e), Object.keys(o.value).length) {
|
|
@@ -68,12 +68,12 @@ const Z = /* @__PURE__ */ w({
|
|
|
68
68
|
y({ ...e });
|
|
69
69
|
return;
|
|
70
70
|
}
|
|
71
|
-
|
|
72
|
-
const h = await
|
|
73
|
-
|
|
71
|
+
r.value = !0;
|
|
72
|
+
const h = await _({ ...e });
|
|
73
|
+
r.value = !1, o.value = h ?? {}, Object.keys(o.value).length && f();
|
|
74
74
|
}, close: () => {
|
|
75
|
-
s.value ||
|
|
76
|
-
}, WpDrawer: R, DISPLAY_CONDITION_LIMITS:
|
|
75
|
+
s.value || b();
|
|
76
|
+
}, WpDrawer: R, KEY: i, DISPLAY_CONDITION_LIMITS: j, InBasicTextInput: F, InRadioButton: P, CodeEditorField: G };
|
|
77
77
|
}
|
|
78
78
|
});
|
|
79
79
|
export {
|