@useinsider/guido 3.19.0-beta.80b64cf → 3.19.0-beta.84c97db
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 +9 -8
- package/dist/components/Guido.vue.js +8 -8
- package/dist/components/Guido.vue2.js +104 -86
- package/dist/components/organisms/AutoSaveController.vue2.js +18 -8
- package/dist/components/organisms/base/AuthErrorModal.vue.js +18 -0
- package/dist/components/organisms/base/AuthErrorModal.vue2.js +42 -0
- 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 +37 -52
- package/dist/components/organisms/header/EditorActionsMenu.vue.js +20 -0
- package/dist/components/organisms/header/EditorActionsMenu.vue2.js +98 -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 +5 -5
- package/dist/components/organisms/header/LeftSlot.vue2.js +32 -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 +9 -8
- 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 +56 -38
- package/dist/components/wrappers/WpModal.vue.js +1 -1
- package/dist/components/wrappers/WpModal.vue2.js +4 -3
- package/dist/composables/useAccessibilityApi.js +45 -0
- package/dist/composables/useAuthError.js +52 -0
- package/dist/composables/useAutoSave.js +11 -11
- package/dist/composables/useCortexBlueprintBridge.js +122 -54
- package/dist/composables/useCustomInterfaceAppearance.js +42 -41
- package/dist/composables/useEmailTemplateApplier.js +111 -50
- package/dist/composables/useHttp.js +64 -54
- package/dist/composables/useLegacyStrategyConversion.js +23 -19
- package/dist/composables/useStripo.js +24 -20
- package/dist/composables/useToaster.js +17 -15
- package/dist/composables/validators/useLiquidValidator.js +15 -15
- package/dist/config/i18n/en/labels.json.js +36 -4
- package/dist/config/i18n/en/tooltips.json.js +2 -1
- package/dist/config/migrator/index.js +14 -13
- package/dist/config/migrator/itemsBlockMigrator.js +236 -248
- package/dist/config/migrator/recommendationMigrator.js +28 -21
- package/dist/config/migrator/recommendationPartnerMigrator.js +56 -0
- package/dist/enums/extensions/recommendationBlock.js +30 -29
- package/dist/extensions/Blocks/Items/constants/cardLayout.js +20 -0
- package/dist/extensions/Blocks/Items/controls/name/trimming.js +18 -17
- package/dist/extensions/Blocks/Items/controls/settingsControl.js +114 -105
- package/dist/extensions/Blocks/Items/enums/productEnums.js +14 -9
- package/dist/extensions/Blocks/Items/layouts/horizontal.html.js +11 -9
- package/dist/extensions/Blocks/Items/template.js +219 -204
- package/dist/extensions/Blocks/Recommendation/block.js +54 -88
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +32 -51
- package/dist/extensions/Blocks/Recommendation/utils/partnerScope.js +11 -12
- package/dist/guido.css +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 +3 -1
- package/dist/src/components/organisms/header/AutoSaveStatus.vue.d.ts +2 -0
- package/dist/src/components/organisms/header/EditorActionsMenu.vue.d.ts +2 -0
- package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +1 -3
- package/dist/src/components/organisms/header/RightSlot.vue.d.ts +1 -3
- 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/components/wrappers/WpModal.vue.d.ts +5 -1
- package/dist/src/composables/useAccessibilityApi.d.ts +13 -0
- package/dist/src/composables/useActionsApi.d.ts +2 -2
- package/dist/src/composables/useAuthError.d.ts +12 -0
- package/dist/src/composables/useConfig.d.ts +2 -0
- package/dist/src/composables/useCortexBlueprintBridge.d.ts +2 -3
- package/dist/src/composables/useEmailTemplateApplier.d.ts +18 -5
- package/dist/src/composables/useGuidoActions.d.ts +2 -0
- package/dist/src/composables/useHttp.d.ts +2 -0
- package/dist/src/config/migrator/index.d.ts +2 -1
- package/dist/src/config/migrator/recommendationPartnerMigrator.d.ts +19 -0
- package/dist/src/enums/extensions/recommendationBlock.d.ts +1 -1
- package/dist/src/extensions/Blocks/Items/constants/cardLayout.d.ts +44 -0
- package/dist/src/extensions/Blocks/Items/enums/productEnums.d.ts +3 -0
- package/dist/src/extensions/Blocks/Items/template.d.ts +19 -0
- package/dist/src/extensions/Blocks/Recommendation/block.d.ts +0 -6
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/utils/partnerScope.d.ts +13 -7
- package/dist/src/mock/cortexChatStore.d.ts +12 -0
- package/dist/src/stores/autosave.d.ts +73 -1
- package/dist/src/stores/config.d.ts +20 -0
- package/dist/src/stores/editor.d.ts +109 -0
- package/dist/src/stores/guido-email-editor.d.ts +20 -10
- package/dist/src/stores/onboarding.d.ts +956 -21
- package/dist/src/stores/recommendation.d.ts +5 -0
- package/dist/src/stores/version-history.d.ts +1 -1
- package/dist/src/utils/dateUtil.d.ts +10 -0
- package/dist/src/utils/genericUtil.d.ts +3 -0
- package/dist/src/utils/timeUtil.d.ts +5 -0
- package/dist/static/styles/components/accessibility.css.js +234 -0
- package/dist/static/styles/components/version-history.css.js +2 -6
- package/dist/static/styles/variables.css.js +2 -0
- package/dist/stores/autosave.js +12 -7
- package/dist/stores/editor.js +7 -4
- package/dist/stores/guido-email-editor.js +3 -1
- package/dist/stores/onboarding.js +47 -21
- package/dist/utils/pairProductVariables.js +71 -71
- package/dist/utils/timeUtil.js +6 -17
- package/package.json +2 -1
- 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 → base/AuthErrorModal.vue.d.ts} +0 -0
|
@@ -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 c, 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 c, 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((n) => Number.isFinite(n) ? Math.max(0, Math.floor(n)) : 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((n) => n && typeof n == "object" ? { ...n } : 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(O, { 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),
|
|
@@ -237,6 +237,7 @@ const p = {
|
|
|
237
237
|
liquidSyntax: e(o(), !1),
|
|
238
238
|
/** Enable autosave (3-min interval + tab-hide). User toggles on/off from the header. */
|
|
239
239
|
autosave: e(o(), !1),
|
|
240
|
+
accessibilityTesting: e(o(), !1),
|
|
240
241
|
/** Enable pre-save domain-allowlist validation (opt-in; Guido self-serves the block toaster) */
|
|
241
242
|
allowlistEnabled: e(o(), !1),
|
|
242
243
|
/** Enable persistent link tracking-id assignment for the click heatmap (opt-in) */
|
|
@@ -313,7 +314,7 @@ const p = {
|
|
|
313
314
|
(n) => typeof n == "function",
|
|
314
315
|
"processor must be a function"
|
|
315
316
|
)
|
|
316
|
-
}), V =
|
|
317
|
+
}), V = T("type", [
|
|
317
318
|
H,
|
|
318
319
|
_,
|
|
319
320
|
q,
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import o from "./Guido.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
var
|
|
3
|
+
import t from "../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var i = 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.isTestPartner() ? a._e() : r(e.OnboardingWrapper, { on: { "onboarding-finished": function(_) {
|
|
7
7
|
return e.emit("onboarding:finished");
|
|
8
8
|
} } }), r(e.UnsubscribeWrapper), r(e.LoadingWrapper)], 1);
|
|
9
|
-
}, s = [], n = /* @__PURE__ */
|
|
9
|
+
}, s = [], n = /* @__PURE__ */ t(
|
|
10
10
|
o,
|
|
11
|
-
|
|
11
|
+
i,
|
|
12
12
|
s,
|
|
13
13
|
!1,
|
|
14
14
|
null,
|
|
15
|
-
"
|
|
15
|
+
"ecfaf815"
|
|
16
16
|
);
|
|
17
|
-
const
|
|
17
|
+
const f = n.exports;
|
|
18
18
|
export {
|
|
19
|
-
|
|
19
|
+
f as default
|
|
20
20
|
};
|
|
@@ -1,76 +1,84 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useCortexBlueprintBridge as
|
|
3
|
-
import { useEditorLock as
|
|
4
|
-
import { provideGuidoActions as
|
|
5
|
-
import { useGuidoStateBridge as
|
|
6
|
-
import { usePartner as
|
|
7
|
-
import { useStripo as
|
|
8
|
-
import { useTimerClone as
|
|
9
|
-
import { migrate as
|
|
10
|
-
import { ModuleFolderDefaults as
|
|
11
|
-
import { RIBBON_SELECTOR as
|
|
12
|
-
import { useRecommendationExtensionStore as
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
1
|
+
import { defineComponent as se, defineAsyncComponent as m, ref as H, computed as p, watch as W, onMounted as ie, onUnmounted as ae } from "vue";
|
|
2
|
+
import { useCortexBlueprintBridge as ce } from "../composables/useCortexBlueprintBridge.js";
|
|
3
|
+
import { useEditorLock as de } from "../composables/useEditorLock.js";
|
|
4
|
+
import { provideGuidoActions as me } from "../composables/useGuidoActions.js";
|
|
5
|
+
import { useGuidoStateBridge as le } from "../composables/useGuidoStateBridge.js";
|
|
6
|
+
import { usePartner as ue } from "../composables/usePartner.js";
|
|
7
|
+
import { useStripo as pe } from "../composables/useStripo.js";
|
|
8
|
+
import { useTimerClone as fe } from "../composables/useTimerClone.js";
|
|
9
|
+
import { migrate as G } from "../config/migrator/index.js";
|
|
10
|
+
import { ModuleFolderDefaults as z } from "../enums/defaults.js";
|
|
11
|
+
import { RIBBON_SELECTOR as ye } from "../enums/onboarding.js";
|
|
12
|
+
import { useRecommendationExtensionStore as E } from "../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
13
|
+
import ge from "./organisms/AutoSaveController.vue.js";
|
|
14
|
+
import ve from "./organisms/base/AuthErrorModal.vue.js";
|
|
15
|
+
import Se from "./organisms/base/Toaster.vue.js";
|
|
16
|
+
import be from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
|
|
17
|
+
import he from "./organisms/header/HeaderWrapper.vue.js";
|
|
18
|
+
import Ee from "./organisms/LoadingWrapper.vue.js";
|
|
19
|
+
import we from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
|
|
20
|
+
import Ce from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
|
|
21
|
+
import { useStripoApi as ke } from "../services/stripoApi.js";
|
|
22
|
+
import { useConfigStore as De } from "../stores/config.js";
|
|
23
|
+
import { useDynamicContentStore as Te } from "../stores/dynamic-content.js";
|
|
24
|
+
import { useEditorStore as w } from "../stores/editor.js";
|
|
25
|
+
import { usePreviewStore as Fe } from "../stores/preview.js";
|
|
26
|
+
import { useTemplateStore as Me } from "../stores/template.js";
|
|
27
|
+
import { useUnsubscribeStore as Re } from "../stores/unsubscribe.js";
|
|
27
28
|
import { readTrackFloor as $ } from "../utils/linkTrackingIds.js";
|
|
28
|
-
const
|
|
29
|
+
const rt = /* @__PURE__ */ se({
|
|
29
30
|
__name: "Guido",
|
|
30
31
|
props: {
|
|
31
32
|
config: null,
|
|
32
33
|
ready: { type: Boolean, default: !0 }
|
|
33
34
|
},
|
|
34
35
|
emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
|
|
35
|
-
setup(
|
|
36
|
-
const a =
|
|
36
|
+
setup(V, { expose: q, emit: r }) {
|
|
37
|
+
const a = V, K = m(
|
|
37
38
|
() => import("./organisms/email-preview/PreviewContainer.vue.js")
|
|
38
|
-
), V = m(
|
|
39
|
-
() => import("./organisms/onboarding/OnboardingWrapper.vue.js")
|
|
40
39
|
), j = m(
|
|
41
|
-
() => import("./organisms/
|
|
40
|
+
() => import("./organisms/onboarding/OnboardingWrapper.vue.js")
|
|
42
41
|
), J = m(
|
|
43
|
-
() => import("./organisms/extensions/recommendation/
|
|
42
|
+
() => import("./organisms/extensions/recommendation/AssignStrategyDrawer.vue.js")
|
|
44
43
|
), Q = m(
|
|
44
|
+
() => import("./organisms/extensions/recommendation/RemoveStrategyModal.vue.js")
|
|
45
|
+
), C = H(), X = m(
|
|
45
46
|
() => import("./organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.js")
|
|
46
|
-
),
|
|
47
|
+
), f = H(), y = Te(), k = Re(), o = De();
|
|
47
48
|
a.ready && o.init(a.config);
|
|
48
|
-
const
|
|
49
|
+
const s = w(), Y = Fe(), l = p(() => s.hasChanges), { isTestPartner: Z } = ue(), D = () => {
|
|
49
50
|
var t;
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
if (!s.isNormalMode) {
|
|
52
|
+
console.debug("guido:save:silent:blocked", {
|
|
53
|
+
isVersionHistoryOpen: s.isVersionHistoryOpen,
|
|
54
|
+
isAccessibilityTestingOpen: s.isAccessibilityTestingOpen
|
|
55
|
+
});
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
return (t = C.value) == null ? void 0 : t.saveSilent();
|
|
59
|
+
}, T = (t) => {
|
|
60
|
+
s.loadingStatus = t;
|
|
53
61
|
};
|
|
54
|
-
|
|
55
|
-
const
|
|
62
|
+
ce(), le();
|
|
63
|
+
const g = () => {
|
|
56
64
|
var t, e;
|
|
57
65
|
return {
|
|
58
66
|
emailId: o.templateId,
|
|
59
67
|
userId: o.userId,
|
|
60
68
|
username: o.username,
|
|
61
69
|
partnerName: o.partnerName,
|
|
62
|
-
savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) ||
|
|
63
|
-
defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) ||
|
|
70
|
+
savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) || z.SAVED_MODULES,
|
|
71
|
+
defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) || z.DEFAULT_MODULES
|
|
64
72
|
};
|
|
65
|
-
}, { initPlugin:
|
|
66
|
-
let
|
|
67
|
-
const { getDefaultTemplate:
|
|
73
|
+
}, { initPlugin: F, preloadRuntime: M } = pe(), { runExclusive: R, beginMount: I, isCurrentMount: v } = de();
|
|
74
|
+
let u = 0;
|
|
75
|
+
const { getDefaultTemplate: L } = ke(), { cloneTimersOnSave: A, hasTimerBlocks: O } = fe(), ee = p(() => {
|
|
68
76
|
var t;
|
|
69
77
|
return !((t = o.ui) != null && t.showHeader);
|
|
70
|
-
}),
|
|
71
|
-
() => !!
|
|
78
|
+
}), te = p(() => o.isFeatureEnabled("reusableRecommendationStrategy")), oe = p(
|
|
79
|
+
() => !!E().recommendationConfigs.strategyId
|
|
72
80
|
);
|
|
73
|
-
|
|
81
|
+
me({
|
|
74
82
|
onBack: () => {
|
|
75
83
|
console.debug("guido:back"), r("back");
|
|
76
84
|
},
|
|
@@ -78,7 +86,7 @@ const tt = /* @__PURE__ */ re({
|
|
|
78
86
|
console.debug("guido:save:start"), r("save:start");
|
|
79
87
|
},
|
|
80
88
|
onSaveComplete: (t) => {
|
|
81
|
-
const e = { ...t, metadata:
|
|
89
|
+
const e = { ...t, metadata: g() };
|
|
82
90
|
console.debug("guido:save:complete", e), r("save:complete", e);
|
|
83
91
|
},
|
|
84
92
|
onTestEmailClick: () => {
|
|
@@ -86,62 +94,72 @@ const tt = /* @__PURE__ */ re({
|
|
|
86
94
|
}
|
|
87
95
|
});
|
|
88
96
|
const U = (t) => {
|
|
89
|
-
console.debug("dynamic-content:close", t),
|
|
90
|
-
},
|
|
97
|
+
console.debug("dynamic-content:close", t), y.setSelectedDynamicContent(t), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: t }));
|
|
98
|
+
}, N = () => {
|
|
91
99
|
console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
|
|
92
100
|
};
|
|
93
|
-
|
|
101
|
+
W(() => l.value, () => {
|
|
94
102
|
r("on-change", l.value);
|
|
95
103
|
});
|
|
96
|
-
const
|
|
97
|
-
const e = t, { attribute:
|
|
98
|
-
console.debug("dynamic-content:open", e.detail), r("dynamic-content:open",
|
|
104
|
+
const S = (t) => {
|
|
105
|
+
const e = t, { attribute: i, position: d } = e.detail;
|
|
106
|
+
console.debug("dynamic-content:open", e.detail), r("dynamic-content:open", i, d);
|
|
99
107
|
};
|
|
100
|
-
let
|
|
101
|
-
const
|
|
108
|
+
let c = null;
|
|
109
|
+
const b = () => {
|
|
102
110
|
var e;
|
|
103
|
-
const t = document.querySelector(
|
|
104
|
-
(e =
|
|
105
|
-
},
|
|
111
|
+
const t = document.querySelector(ye);
|
|
112
|
+
(e = f.value) == null || e.style.setProperty("--ribbon-offset", `${(t == null ? void 0 : t.offsetHeight) ?? 0}px`);
|
|
113
|
+
}, h = async () => {
|
|
106
114
|
var t;
|
|
107
115
|
try {
|
|
108
|
-
o.initialized || o.init(a.config),
|
|
109
|
-
const e = o.template,
|
|
110
|
-
|
|
111
|
-
const
|
|
116
|
+
o.initialized || o.init(a.config), s.templateId = o.templateId;
|
|
117
|
+
const e = o.template, i = (e == null ? void 0 : e.html) || "", d = (e == null ? void 0 : e.css) || "", B = (e == null ? void 0 : e.preselectedDynamicContent) || [];
|
|
118
|
+
k.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
|
|
119
|
+
const P = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {}, _ = o.isFeatureEnabled("linkTrackingIds"), x = {
|
|
120
|
+
partnerName: o.partnerName,
|
|
121
|
+
campaignUrls: e == null ? void 0 : e.recommendationCampaignUrls,
|
|
122
|
+
rrsEnabled: o.isFeatureEnabled("reusableRecommendationStrategy")
|
|
123
|
+
};
|
|
112
124
|
let n = {
|
|
113
|
-
html:
|
|
125
|
+
html: i && await G(i, P, x),
|
|
114
126
|
css: d
|
|
115
127
|
};
|
|
116
|
-
n.html || (n = await
|
|
117
|
-
const
|
|
118
|
-
|
|
119
|
-
const
|
|
120
|
-
preselectedDynamicContentList:
|
|
128
|
+
n.html || (n = await L(), n.html = await G(n.html, P, x));
|
|
129
|
+
const ne = _ ? $(n.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
|
|
130
|
+
O(n.html) && (n.html = await A(n.html)), _ && (s.trackIdSessionFloor = Math.max(ne, $(n.html)));
|
|
131
|
+
const re = {
|
|
132
|
+
preselectedDynamicContentList: B,
|
|
121
133
|
onReady: () => {
|
|
122
134
|
console.debug("guido:ready"), r("ready");
|
|
123
135
|
}
|
|
124
136
|
};
|
|
125
|
-
|
|
137
|
+
u = I(), await F(n, g(), re), y.selectedDynamicContentList = B;
|
|
126
138
|
} catch (e) {
|
|
127
139
|
console.error("Failed to initialize Stripo editor:", e);
|
|
128
140
|
}
|
|
129
141
|
};
|
|
130
|
-
return
|
|
142
|
+
return ie(async () => {
|
|
131
143
|
var e;
|
|
132
|
-
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"),
|
|
133
|
-
const t = (e =
|
|
134
|
-
if (t && (
|
|
135
|
-
await
|
|
144
|
+
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), E().$reset(), w().$reset(), Me().$reset(), b();
|
|
145
|
+
const t = (e = f.value) == null ? void 0 : e.parentElement;
|
|
146
|
+
if (t && (c = new ResizeObserver(b), c.observe(t)), M(), a.ready)
|
|
147
|
+
await h();
|
|
136
148
|
else {
|
|
137
|
-
const
|
|
138
|
-
d && (
|
|
149
|
+
const i = W(() => a.ready, (d) => {
|
|
150
|
+
d && (i(), h());
|
|
139
151
|
});
|
|
140
152
|
}
|
|
141
|
-
document.addEventListener("dynamic-content:open",
|
|
153
|
+
document.addEventListener("dynamic-content:open", S);
|
|
142
154
|
}), ae(() => {
|
|
143
|
-
|
|
144
|
-
|
|
155
|
+
if (c == null || c.disconnect(), document.removeEventListener("dynamic-content:open", S), E().disposeStrategyPageReturn(), v(u))
|
|
156
|
+
try {
|
|
157
|
+
w().isStripoInitialized = !1;
|
|
158
|
+
} catch (t) {
|
|
159
|
+
console.debug("Failed to close the editor readiness gate on unmount", t);
|
|
160
|
+
}
|
|
161
|
+
R(async () => {
|
|
162
|
+
if (v(u))
|
|
145
163
|
try {
|
|
146
164
|
window.UIEditor.removeEditor();
|
|
147
165
|
} catch {
|
|
@@ -151,14 +169,14 @@ const tt = /* @__PURE__ */ re({
|
|
|
151
169
|
}), q({
|
|
152
170
|
dynamicContent: {
|
|
153
171
|
insert: U,
|
|
154
|
-
close:
|
|
172
|
+
close: N
|
|
155
173
|
},
|
|
156
174
|
hasChanges: l,
|
|
157
|
-
saveSilent:
|
|
158
|
-
setLoading:
|
|
159
|
-
}), { __sfc: !0, PreviewContainer: K, OnboardingWrapper:
|
|
175
|
+
saveSilent: D,
|
|
176
|
+
setLoading: T
|
|
177
|
+
}), { __sfc: !0, PreviewContainer: K, OnboardingWrapper: j, AssignStrategyDrawer: J, RemoveStrategyModal: Q, autoSaveControllerRef: C, LegacyStrategyUpdatedModal: X, wrapperRef: f, dynamicContentStore: y, unsubscribeStore: k, props: a, configStore: o, editorStore: s, previewStore: Y, hasChanges: l, isTestPartner: Z, saveSilent: D, setLoading: T, emit: r, buildMetadata: g, initPlugin: F, preloadRuntime: M, runExclusive: R, beginMount: I, isCurrentMount: v, mountGeneration: u, getDefaultTemplate: L, cloneTimersOnSave: A, hasTimerBlocks: O, noHeader: ee, isRrsEnabled: te, hasAssignedStrategy: oe, insertDynamicContent: U, closeDynamicContent: N, handleDynamicContentOpen: S, ribbonObserver: c, updateRibbonOffset: b, startEditor: h, AutoSaveController: ge, AuthErrorModal: ve, Toaster: Se, FilterSelectionDrawer: be, HeaderWrapper: he, LoadingWrapper: Ee, SaveAsTemplateDrawer: we, UnsubscribeWrapper: Ce };
|
|
160
178
|
}
|
|
161
179
|
});
|
|
162
180
|
export {
|
|
163
|
-
|
|
181
|
+
rt as default
|
|
164
182
|
};
|
|
@@ -1,13 +1,23 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useAutoSave as
|
|
3
|
-
import { useSave as
|
|
4
|
-
|
|
1
|
+
import { defineComponent as n } from "vue";
|
|
2
|
+
import { useAutoSave as u } from "../../composables/useAutoSave.js";
|
|
3
|
+
import { useSave as m } from "../../composables/useSave.js";
|
|
4
|
+
import { useToaster as c } from "../../composables/useToaster.js";
|
|
5
|
+
const _ = /* @__PURE__ */ n({
|
|
5
6
|
__name: "AutoSaveController",
|
|
6
|
-
setup(a) {
|
|
7
|
-
const { save: e } =
|
|
8
|
-
|
|
7
|
+
setup(i, { expose: a }) {
|
|
8
|
+
const { save: e } = m(), { handleError: r } = c(), t = () => e(!1, !0);
|
|
9
|
+
u(t);
|
|
10
|
+
const o = async () => {
|
|
11
|
+
try {
|
|
12
|
+
return await e(!0);
|
|
13
|
+
} catch (s) {
|
|
14
|
+
r(s, "Failed to save template");
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
return a({ saveSilent: o }), { __sfc: !0, save: e, handleError: r, backgroundSave: t, saveSilent: o };
|
|
9
19
|
}
|
|
10
20
|
});
|
|
11
21
|
export {
|
|
12
|
-
|
|
22
|
+
_ as default
|
|
13
23
|
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import e from "./AuthErrorModal.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import s from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var a = function() {
|
|
5
|
+
var o = this, r = o._self._c, t = o._self._setupProxy;
|
|
6
|
+
return t.authError ? r("div", { staticClass: "auth-error-modal" }, [r(t.WpModal, { attrs: { id: "guido__auth-error-modal", state: "warning", "close-button-status": !1, "close-on-outside-click": !1, "footer-button-options": t.footerButtonOptions, title: t.title }, on: { close: t.dismiss, "primary-action": t.recover } }, [r("p", [o._v(o._s(t.message))])])], 1) : o._e();
|
|
7
|
+
}, n = [], i = /* @__PURE__ */ s(
|
|
8
|
+
e,
|
|
9
|
+
a,
|
|
10
|
+
n,
|
|
11
|
+
!1,
|
|
12
|
+
null,
|
|
13
|
+
"b4d7ae51"
|
|
14
|
+
);
|
|
15
|
+
const m = i.exports;
|
|
16
|
+
export {
|
|
17
|
+
m as default
|
|
18
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { defineComponent as c, computed as n } from "vue";
|
|
2
|
+
import p from "../../wrappers/WpModal.vue.js";
|
|
3
|
+
import { useAuthError as d } from "../../../composables/useAuthError.js";
|
|
4
|
+
import { useTranslations as m } from "../../../composables/useTranslations.js";
|
|
5
|
+
const _ = /* @__PURE__ */ c({
|
|
6
|
+
__name: "AuthErrorModal",
|
|
7
|
+
setup(v) {
|
|
8
|
+
const e = m(), { authError: t } = d(), r = n(() => {
|
|
9
|
+
var o;
|
|
10
|
+
return ((o = t.value) == null ? void 0 : o.status) === 419 && t.value.data !== null;
|
|
11
|
+
}), s = n(() => {
|
|
12
|
+
var o;
|
|
13
|
+
return ((o = t.value) == null ? void 0 : o.status) === 419 && t.value.data === null;
|
|
14
|
+
}), i = n(() => r.value ? e("integration-hub.reload-this-page") : e("action-builder.session-expired")), u = n(() => r.value ? e("auth.error-occurred-refresh") : s.value ? e("settings.session-on-another-device") : e("journey-builder.login-session-expired")), l = n(() => ({
|
|
15
|
+
primaryButton: {
|
|
16
|
+
type: "primary",
|
|
17
|
+
labelText: r.value ? e("integration-hub.reload") : e("journey-builder.login-popup-button")
|
|
18
|
+
},
|
|
19
|
+
cancelOrBackButton: {
|
|
20
|
+
type: "secondary",
|
|
21
|
+
styling: "ghost",
|
|
22
|
+
labelText: e("settings.cancel")
|
|
23
|
+
}
|
|
24
|
+
})), a = () => {
|
|
25
|
+
if (r.value) {
|
|
26
|
+
window.location.reload();
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
window.location.replace("/");
|
|
30
|
+
};
|
|
31
|
+
return { __sfc: !0, trans: e, authError: t, isPageExpired: r, isTakenOver: s, title: i, message: u, footerButtonOptions: l, recover: a, dismiss: () => {
|
|
32
|
+
if (r.value) {
|
|
33
|
+
t.value = null;
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
a();
|
|
37
|
+
}, WpModal: p };
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
export {
|
|
41
|
+
_ as default
|
|
42
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import t from "./AutoSaveStatus.vue2.js";
|
|
2
|
+
import r from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
+
var _ = function() {
|
|
4
|
+
var s = this, e = s._self._c, a = s._self._setupProxy;
|
|
5
|
+
return a.isFeatureEnabled("autosave") ? e("div", { staticClass: "d-f a-i-c auto-save-status" }, [a.autosaveStore.status === a.AUTOSAVE_STATUS.SAVING ? e("span", { staticClass: "d-f a-i-c f-s-1" }, [e(a.InLoading, { attrs: { "color-class": "i-c-53", size: "16" } }), e("span", { staticClass: "ml-1 t-c-53" }, [s._v(s._s(a.trans("newsletter.saving")))])], 1) : a.savedLabel ? e("span", { staticClass: "f-s-1 t-c-53" }, [s._v(s._s(a.savedLabel.before)), a.savedLabel.word ? e("span", { staticClass: "f-w-600" }, [s._v(s._s(a.savedLabel.word))]) : s._e(), s._v(s._s(a.savedLabel.after))]) : s._e()]) : s._e();
|
|
6
|
+
}, n = [], o = /* @__PURE__ */ r(
|
|
7
|
+
t,
|
|
8
|
+
_,
|
|
9
|
+
n,
|
|
10
|
+
!1,
|
|
11
|
+
null,
|
|
12
|
+
null
|
|
13
|
+
);
|
|
14
|
+
const v = o.exports;
|
|
15
|
+
export {
|
|
16
|
+
v as default
|
|
17
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { defineComponent as p, computed as S } from "vue";
|
|
2
|
+
import { useConfig as A } from "../../../composables/useConfig.js";
|
|
3
|
+
import { useTranslations as T } from "../../../composables/useTranslations.js";
|
|
4
|
+
import { useAutosaveStore as v, AUTOSAVE_STATUS as m } from "../../../stores/autosave.js";
|
|
5
|
+
import { autoSaveTimestamp as b } from "../../../utils/timeUtil.js";
|
|
6
|
+
import { InLoading as D } from "@useinsider/design-system-vue";
|
|
7
|
+
const j = /* @__PURE__ */ p({
|
|
8
|
+
__name: "AutoSaveStatus",
|
|
9
|
+
setup(O) {
|
|
10
|
+
const { isFeatureEnabled: u } = A(), a = v(), n = T(), t = "__BOLD_START__", o = "__BOLD_END__", s = (i) => i.split(t).join("").split(o).join(""), _ = S(() => {
|
|
11
|
+
if (a.status !== m.SAVED || !a.lastSavedAt)
|
|
12
|
+
return null;
|
|
13
|
+
const { isToday: i, time: c, date: f } = b(a.lastSavedAt), l = { boldStart: t, boldEnd: o }, e = i ? n("email-editor.autosaved-at-today", { ...l, time: c }) : n("email-editor.autosaved-at-date", { ...l, date: f }), r = e.indexOf(t), d = e.indexOf(o, r + t.length);
|
|
14
|
+
return r === -1 || d === -1 ? { before: s(e), word: "", after: "" } : {
|
|
15
|
+
before: s(e.slice(0, r)),
|
|
16
|
+
word: s(e.slice(r + t.length, d)),
|
|
17
|
+
after: s(e.slice(d + o.length))
|
|
18
|
+
};
|
|
19
|
+
});
|
|
20
|
+
return { __sfc: !0, isFeatureEnabled: u, autosaveStore: a, trans: n, BOLD_START: t, BOLD_END: o, stripMarkers: s, savedLabel: _, AUTOSAVE_STATUS: m, InLoading: D };
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
export {
|
|
24
|
+
j as default
|
|
25
|
+
};
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import
|
|
1
|
+
import a from "./EditorActions.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
return e("div", { staticClass: "d-f editor-actions" }, [
|
|
3
|
+
import r from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var d = function() {
|
|
5
|
+
var o, s;
|
|
6
|
+
var i = this, e = i._self._c, t = i._self._setupProxy;
|
|
7
|
+
return e("div", { staticClass: "d-f a-i-c editor-actions" }, [!t.editorStore.isPreviewModeOpen && t.hasContentOnTheLeft ? e("div", { staticClass: "editor-actions__divider" }) : i._e(), (s = (o = t.config) == null ? void 0 : o.features) != null && s.testMessage ? e(t.InButtonV2, { attrs: { id: "guido__test-button", "left-icon": "line-architect-test-journey", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isTestButtonDisabled, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__test-button", { staticPosition: "bottom right" }), "tooltip-text": t.trans("newsletter.test-email") }, on: { click: t.handleTestEmail } }) : i._e(), e(t.EditorActionsMenu), t.editorStore.isPreviewModeOpen ? i._e() : e("div", { staticClass: "editor-actions__divider" }), t.editorStore.isPreviewModeOpen ? i._e() : e(t.InButtonV2, { attrs: { id: "guido__save-button", "label-text": "Save", "disabled-status": !t.isSaving && t.editorStore.isSaveButtonDisabled, "loading-status": t.isSaving }, on: { click: function(n) {
|
|
8
8
|
return t.handleSave(!1);
|
|
9
|
-
} } }), e(t.MigrationConfirmModal, { ref: "migrationModalRef", on: { confirm: function(
|
|
9
|
+
} } }), e(t.MigrationConfirmModal, { ref: "migrationModalRef", on: { confirm: function(n) {
|
|
10
10
|
return t.executeSave(!1);
|
|
11
11
|
} } })], 1);
|
|
12
|
-
},
|
|
12
|
+
}, l = [], c = /* @__PURE__ */ r(
|
|
13
|
+
a,
|
|
14
|
+
d,
|
|
13
15
|
l,
|
|
14
|
-
u,
|
|
15
|
-
c,
|
|
16
16
|
!1,
|
|
17
17
|
null,
|
|
18
|
-
"
|
|
18
|
+
"23b54db0"
|
|
19
19
|
);
|
|
20
|
-
const
|
|
20
|
+
const p = c.exports;
|
|
21
21
|
export {
|
|
22
|
-
|
|
22
|
+
p as default
|
|
23
23
|
};
|