@useinsider/guido 3.21.2-beta.1cc8327 → 3.21.2-beta.b6f3ef8
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 +34 -4
- package/dist/components/Guido.vue.js +3 -3
- package/dist/components/Guido.vue2.js +118 -108
- package/dist/composables/useActionsApi.js +21 -22
- package/dist/composables/useEditorOpenMetrics.js +164 -0
- package/dist/composables/useFullStoryBridge.js +9 -10
- package/dist/composables/useStripo.js +94 -82
- package/dist/config/migrator/index.js +10 -11
- package/dist/guido.css +1 -1
- package/dist/library.js +12 -10
- package/dist/package.json.js +6 -4
- package/dist/public/prefetchRuntime.js +4 -0
- package/dist/src/composables/useEditorOpenMetrics.d.ts +27 -0
- package/dist/src/library.d.ts +1 -0
- package/dist/src/public/prefetchRuntime.d.ts +1 -0
- package/dist/src/utils/runtimePrefetch.d.ts +4 -0
- package/dist/src/utils/stripoRuntime.d.ts +2 -0
- package/dist/static/stripo-runtime-manifest.json.js +9 -0
- package/dist/utils/runtimePrefetch.js +26 -0
- package/dist/utils/stripoRuntime.js +9 -0
- package/package.json +6 -1
- package/dist/config/migrator/fullStoryScriptMigrator.js +0 -5
- package/dist/src/config/migrator/fullStoryScriptMigrator.d.ts +0 -1
- package/dist/src/utils/fullStoryScripts.d.ts +0 -6
- package/dist/utils/fullStoryScripts.js +0 -8
package/README.md
CHANGED
|
@@ -582,9 +582,9 @@ import '@useinsider/guido/style';
|
|
|
582
582
|
|
|
583
583
|
### Subpath entries
|
|
584
584
|
|
|
585
|
-
|
|
586
|
-
own dependencies, so a consumer that needs the store
|
|
587
|
-
never loads the editor:
|
|
585
|
+
Three surfaces also ship as their own entry points. Importing one pulls in only its
|
|
586
|
+
own dependencies, so a consumer that needs the store, the tracking-id helpers or the
|
|
587
|
+
runtime prefetch never loads the editor:
|
|
588
588
|
|
|
589
589
|
```typescript
|
|
590
590
|
// Live editor state, published by the editor into the host's shared Pinia instance.
|
|
@@ -595,11 +595,41 @@ import type { GuidoEmailEditorState } from '@useinsider/guido/editor-state';
|
|
|
595
595
|
// Persistent link ids for the click heatmap.
|
|
596
596
|
import { assignTrackingIds, TRACK_ID_ATTRIBUTE } from '@useinsider/guido/tracking-ids';
|
|
597
597
|
import type { TrackingIdResult } from '@useinsider/guido/tracking-ids';
|
|
598
|
+
|
|
599
|
+
// Start downloading the Stripo editor runtime before the editor opens.
|
|
600
|
+
import { prefetchGuidoRuntime } from '@useinsider/guido/prefetch';
|
|
598
601
|
```
|
|
599
602
|
|
|
600
|
-
|
|
603
|
+
All three are re-exported from the root barrel as well; the subpath is what keeps the
|
|
601
604
|
editor out of the consumer's module graph.
|
|
602
605
|
|
|
606
|
+
### Runtime prefetch
|
|
607
|
+
|
|
608
|
+
```typescript
|
|
609
|
+
import { prefetchGuidoRuntime } from '@useinsider/guido/prefetch';
|
|
610
|
+
|
|
611
|
+
prefetchGuidoRuntime(); // e.g. when the user lands on the page that opens the editor
|
|
612
|
+
```
|
|
613
|
+
|
|
614
|
+
Call it as early as the host knows an editor is likely to open. It appends one
|
|
615
|
+
`<link rel="prefetch" data-guido-prefetch>` per file of the pinned Stripo runtime
|
|
616
|
+
(`src/static/stripo-runtime-manifest.json`) from
|
|
617
|
+
`https://email-static.useinsider.com/guido/<stripo version>/`, so the files are in the
|
|
618
|
+
HTTP cache when `<Guido>` mounts. It only downloads: no Stripo code runs and the
|
|
619
|
+
editor's startup order does not change.
|
|
620
|
+
|
|
621
|
+
- Returns `void` and never throws.
|
|
622
|
+
- Idempotent: later calls add nothing.
|
|
623
|
+
- Adds nothing when the runtime is already loading or loaded (`#UiEditorScript` exists
|
|
624
|
+
or `window.UIEditor` is defined), when `navigator.connection.saveData` is on, or when
|
|
625
|
+
`navigator.connection.effectiveType` is `slow-2g` or `2g`.
|
|
626
|
+
- The `guido_editor_open` metric reports it as `runtime_prefetch`: `none` (not called
|
|
627
|
+
before Guido's setup), `pending` (some files still downloading) or `done`.
|
|
628
|
+
|
|
629
|
+
After bumping `guido.stripo.version`, regenerate the file list with
|
|
630
|
+
`npm run stripo:manifest`; a unit test fails while the manifest's version differs from
|
|
631
|
+
the pinned one.
|
|
632
|
+
|
|
603
633
|
---
|
|
604
634
|
|
|
605
635
|
## Constants
|
|
@@ -6,15 +6,15 @@ var t = function() {
|
|
|
6
6
|
return r("div", { ref: "wrapperRef", staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper, { ref: "headerWrapperRef" }), r(e.AutoSaveController), 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.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 = [],
|
|
9
|
+
}, s = [], d = /* @__PURE__ */ i(
|
|
10
10
|
o,
|
|
11
11
|
t,
|
|
12
12
|
s,
|
|
13
13
|
!1,
|
|
14
14
|
null,
|
|
15
|
-
"
|
|
15
|
+
"1a3ddd48"
|
|
16
16
|
);
|
|
17
|
-
const v =
|
|
17
|
+
const v = d.exports;
|
|
18
18
|
export {
|
|
19
19
|
v as default
|
|
20
20
|
};
|
|
@@ -1,179 +1,189 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useCortexBlueprintBridge as
|
|
3
|
-
import { useEditorLock as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import Re from "./organisms/
|
|
21
|
-
import
|
|
22
|
-
import Le from "./organisms/
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
|
|
1
|
+
import { defineComponent as de, defineAsyncComponent as l, ref as W, computed as f, watch as G, onMounted as me, onUnmounted as le } from "vue";
|
|
2
|
+
import { useCortexBlueprintBridge as ue } from "../composables/useCortexBlueprintBridge.js";
|
|
3
|
+
import { useEditorLock as pe } from "../composables/useEditorLock.js";
|
|
4
|
+
import { startEditorOpenMetrics as fe } from "../composables/useEditorOpenMetrics.js";
|
|
5
|
+
import { provideGuidoActions as ye } from "../composables/useGuidoActions.js";
|
|
6
|
+
import { useGuidoStateBridge as ge } from "../composables/useGuidoStateBridge.js";
|
|
7
|
+
import { usePartner as ve } from "../composables/usePartner.js";
|
|
8
|
+
import { useSaveValidationRollout as Se } from "../composables/useSaveValidationRollout.js";
|
|
9
|
+
import { useStripo as be } from "../composables/useStripo.js";
|
|
10
|
+
import { useTimerClone as he } from "../composables/useTimerClone.js";
|
|
11
|
+
import { migrate as Ee } from "../config/migrator/index.js";
|
|
12
|
+
import { ModuleFolderDefaults as H } from "../enums/defaults.js";
|
|
13
|
+
import { RIBBON_SELECTOR as we } from "../enums/onboarding.js";
|
|
14
|
+
import { useRecommendationExtensionStore as V, disposeStrategyPageReturnListeners as ke } from "../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
15
|
+
import { disposeUnsubscribeListeners as Ce } from "../extensions/Blocks/Unsubscribe/block.js";
|
|
16
|
+
import De from "./organisms/AutoSaveController.vue.js";
|
|
17
|
+
import Ie from "./organisms/base/AuthErrorModal.vue.js";
|
|
18
|
+
import Fe from "./organisms/base/Toaster.vue.js";
|
|
19
|
+
import Me from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
|
|
20
|
+
import Re from "./organisms/header/HeaderWrapper.vue.js";
|
|
21
|
+
import Te from "./organisms/LoadingWrapper.vue.js";
|
|
22
|
+
import Le from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
|
|
23
|
+
import Ue from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
|
|
24
|
+
import Ne from "./organisms/validation/ValidationErrorDrawer.vue.js";
|
|
25
|
+
import { useStripoApi as _e } from "../services/stripoApi.js";
|
|
26
|
+
import { useConfigStore as Ae } from "../stores/config.js";
|
|
27
|
+
import { useDynamicContentStore as Be } from "../stores/dynamic-content.js";
|
|
28
|
+
import { useEditorStore as w } from "../stores/editor.js";
|
|
29
|
+
import { usePreviewStore as Oe } from "../stores/preview.js";
|
|
30
|
+
import { useSaveValidationStore as Pe } from "../stores/save-validation.js";
|
|
31
|
+
import { useTemplateStore as xe } from "../stores/template.js";
|
|
32
|
+
import { useUnsubscribeStore as We } from "../stores/unsubscribe.js";
|
|
33
|
+
import { readTrackFloor as $ } from "../utils/linkTrackingIds.js";
|
|
34
|
+
const ht = /* @__PURE__ */ de({
|
|
34
35
|
__name: "Guido",
|
|
35
36
|
props: {
|
|
36
37
|
config: null,
|
|
37
38
|
ready: { type: Boolean, default: !0 }
|
|
38
39
|
},
|
|
39
40
|
emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
|
|
40
|
-
setup(
|
|
41
|
-
const s =
|
|
41
|
+
setup(z, { expose: q, emit: n }) {
|
|
42
|
+
const s = z, a = fe(), K = l(
|
|
42
43
|
() => import("./organisms/email-preview/PreviewContainer.vue.js")
|
|
43
|
-
),
|
|
44
|
+
), j = l(
|
|
44
45
|
() => import("./organisms/onboarding/OnboardingWrapper.vue.js")
|
|
45
|
-
),
|
|
46
|
+
), J = l(
|
|
46
47
|
() => import("./organisms/extensions/recommendation/AssignStrategyDrawer.vue.js")
|
|
47
|
-
),
|
|
48
|
+
), Q = l(
|
|
48
49
|
() => import("./organisms/extensions/recommendation/RemoveStrategyModal.vue.js")
|
|
49
|
-
),
|
|
50
|
+
), X = l(
|
|
50
51
|
() => import("./organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.js")
|
|
51
|
-
),
|
|
52
|
+
), k = W(), y = W(), g = Be(), C = We(), o = Ae();
|
|
52
53
|
s.ready && o.init(s.config);
|
|
53
|
-
const
|
|
54
|
+
const d = w(), Y = Oe(), u = f(() => d.hasChanges), { isTestPartner: Z } = ve(), { isEnabled: ee, loadRollout: D } = Se(), I = () => {
|
|
54
55
|
var t;
|
|
55
|
-
return (t =
|
|
56
|
-
},
|
|
57
|
-
|
|
56
|
+
return (t = k.value) == null ? void 0 : t.handleSave(!0);
|
|
57
|
+
}, F = (t) => {
|
|
58
|
+
d.loadingStatus = t;
|
|
58
59
|
};
|
|
59
|
-
|
|
60
|
-
const
|
|
60
|
+
ue(), ge();
|
|
61
|
+
const v = () => {
|
|
61
62
|
var t, e;
|
|
62
63
|
return {
|
|
63
64
|
emailId: o.templateId,
|
|
64
65
|
userId: o.userId,
|
|
65
66
|
username: o.username,
|
|
66
67
|
partnerName: o.partnerName,
|
|
67
|
-
savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) ||
|
|
68
|
-
defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) ||
|
|
68
|
+
savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) || H.SAVED_MODULES,
|
|
69
|
+
defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) || H.DEFAULT_MODULES
|
|
69
70
|
};
|
|
70
|
-
}, { initPlugin:
|
|
71
|
-
let
|
|
72
|
-
const { getDefaultTemplate:
|
|
71
|
+
}, { initPlugin: M, preloadRuntime: R } = be(), { runExclusive: T, beginMount: L, isCurrentMount: S } = pe();
|
|
72
|
+
let p = 0;
|
|
73
|
+
const { getDefaultTemplate: U } = _e(), { cloneTimersOnSave: N, hasTimerBlocks: _ } = he(), te = f(() => {
|
|
73
74
|
var t;
|
|
74
75
|
return !((t = o.ui) != null && t.showHeader);
|
|
75
|
-
}),
|
|
76
|
-
() => !!
|
|
76
|
+
}), oe = f(() => o.isFeatureEnabled("reusableRecommendationStrategy")), re = f(
|
|
77
|
+
() => !!V().recommendationConfigs.strategyId
|
|
77
78
|
);
|
|
78
|
-
|
|
79
|
+
ye({
|
|
79
80
|
onBack: () => {
|
|
80
|
-
console.debug("guido:back"),
|
|
81
|
+
console.debug("guido:back"), n("back");
|
|
81
82
|
},
|
|
82
83
|
onSaveStart: () => {
|
|
83
|
-
console.debug("guido:save:start"),
|
|
84
|
+
console.debug("guido:save:start"), n("save:start");
|
|
84
85
|
},
|
|
85
86
|
onSaveComplete: (t) => {
|
|
86
|
-
const e = { ...t, metadata:
|
|
87
|
-
console.debug("guido:save:complete", e),
|
|
87
|
+
const e = { ...t, metadata: v() };
|
|
88
|
+
console.debug("guido:save:complete", e), n("save:complete", e);
|
|
88
89
|
},
|
|
89
90
|
onTestEmailClick: () => {
|
|
90
|
-
console.debug("guido:test-email:click"),
|
|
91
|
+
console.debug("guido:test-email:click"), n("test-email:click");
|
|
91
92
|
}
|
|
92
93
|
});
|
|
93
|
-
const
|
|
94
|
-
console.debug("dynamic-content:close", t),
|
|
95
|
-
},
|
|
94
|
+
const A = (t) => {
|
|
95
|
+
console.debug("dynamic-content:close", t), g.setSelectedDynamicContent(t), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: t }));
|
|
96
|
+
}, B = () => {
|
|
96
97
|
console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
|
|
97
98
|
};
|
|
98
|
-
G(() =>
|
|
99
|
-
|
|
99
|
+
G(() => u.value, () => {
|
|
100
|
+
n("on-change", u.value);
|
|
100
101
|
});
|
|
101
|
-
const
|
|
102
|
-
const e = t, { attribute:
|
|
103
|
-
console.debug("dynamic-content:open", e.detail),
|
|
102
|
+
const b = (t) => {
|
|
103
|
+
const e = t, { attribute: i, position: m } = e.detail;
|
|
104
|
+
console.debug("dynamic-content:open", e.detail), n("dynamic-content:open", i, m);
|
|
104
105
|
};
|
|
105
|
-
let
|
|
106
|
-
const
|
|
106
|
+
let c = null;
|
|
107
|
+
const h = () => {
|
|
107
108
|
var e;
|
|
108
|
-
const t = document.querySelector(
|
|
109
|
-
(e =
|
|
110
|
-
},
|
|
109
|
+
const t = document.querySelector(we);
|
|
110
|
+
(e = y.value) == null || e.style.setProperty("--ribbon-offset", `${(t == null ? void 0 : t.offsetHeight) ?? 0}px`);
|
|
111
|
+
}, E = async () => {
|
|
111
112
|
var t;
|
|
113
|
+
a.mark("host_ready");
|
|
112
114
|
try {
|
|
113
|
-
o.initialized || o.init(s.config),
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
115
|
+
o.initialized || o.init(s.config), d.templateId = o.templateId, a.setContext({
|
|
116
|
+
partnerName: o.partnerName,
|
|
117
|
+
productType: o.productType,
|
|
118
|
+
templateId: o.templateId,
|
|
119
|
+
variationId: o.variationId
|
|
120
|
+
});
|
|
121
|
+
const e = o.template, i = (e == null ? void 0 : e.html) || "", m = (e == null ? void 0 : e.css) || "", O = (e == null ? void 0 : e.preselectedDynamicContent) || [];
|
|
122
|
+
C.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
|
|
123
|
+
const ne = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {}, P = o.isFeatureEnabled("linkTrackingIds"), ae = {
|
|
117
124
|
partnerName: o.partnerName,
|
|
118
125
|
campaignUrls: e == null ? void 0 : e.recommendationCampaignUrls,
|
|
119
126
|
rrsEnabled: o.isFeatureEnabled("reusableRecommendationStrategy")
|
|
127
|
+
}, x = (ce) => a.timed(
|
|
128
|
+
"migration",
|
|
129
|
+
() => Ee(ce, ne, ae)
|
|
130
|
+
);
|
|
131
|
+
let r = {
|
|
132
|
+
html: i && await x(i),
|
|
133
|
+
css: m
|
|
120
134
|
};
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
};
|
|
125
|
-
n.html || (n = await I(), n.html = await V(n.html, _, x));
|
|
126
|
-
const ae = O ? H(n.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
|
|
127
|
-
A(n.html) && (n.html = await U(n.html)), O && (c.trackIdSessionFloor = Math.max(ae, H(n.html)));
|
|
135
|
+
r.html || (r = await a.timed("default_template", () => U()), r.html = await x(r.html));
|
|
136
|
+
const ie = P ? $(r.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
|
|
137
|
+
_(r.html) && (r.html = await a.timed("timer_clone", () => N(r.html))), P && (d.trackIdSessionFloor = Math.max(ie, $(r.html)));
|
|
128
138
|
const se = {
|
|
129
|
-
preselectedDynamicContentList:
|
|
139
|
+
preselectedDynamicContentList: O,
|
|
130
140
|
onReady: () => {
|
|
131
|
-
console.debug("guido:ready"),
|
|
141
|
+
console.debug("guido:ready"), n("ready");
|
|
132
142
|
}
|
|
133
143
|
};
|
|
134
|
-
|
|
144
|
+
p = L(), await M(r, v(), se), g.selectedDynamicContentList = O;
|
|
135
145
|
} catch (e) {
|
|
136
|
-
console.error("Failed to initialize Stripo editor:", e);
|
|
146
|
+
console.error("Failed to initialize Stripo editor:", e), a.markFailed();
|
|
137
147
|
}
|
|
138
148
|
};
|
|
139
|
-
return
|
|
149
|
+
return me(async () => {
|
|
140
150
|
var e;
|
|
141
|
-
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"),
|
|
142
|
-
const t = (e =
|
|
143
|
-
if (t && (
|
|
144
|
-
await
|
|
151
|
+
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), V().$reset(), w().$reset(), xe().$reset(), Pe().$reset(), D(), h();
|
|
152
|
+
const t = (e = y.value) == null ? void 0 : e.parentElement;
|
|
153
|
+
if (t && (c = new ResizeObserver(h), c.observe(t)), R(), s.ready)
|
|
154
|
+
await E();
|
|
145
155
|
else {
|
|
146
|
-
const
|
|
147
|
-
|
|
156
|
+
const i = G(() => s.ready, (m) => {
|
|
157
|
+
m && (i(), E());
|
|
148
158
|
});
|
|
149
159
|
}
|
|
150
|
-
document.addEventListener("dynamic-content:open",
|
|
151
|
-
}),
|
|
152
|
-
if (
|
|
160
|
+
document.addEventListener("dynamic-content:open", b);
|
|
161
|
+
}), le(() => {
|
|
162
|
+
if (Ce(), ke(), a.dispose(), c == null || c.disconnect(), document.removeEventListener("dynamic-content:open", b), S(p))
|
|
153
163
|
try {
|
|
154
|
-
|
|
164
|
+
w().isStripoInitialized = !1;
|
|
155
165
|
} catch (t) {
|
|
156
166
|
console.debug("Failed to close the editor readiness gate on unmount", t);
|
|
157
167
|
}
|
|
158
|
-
|
|
159
|
-
if (S(
|
|
168
|
+
T(async () => {
|
|
169
|
+
if (S(p))
|
|
160
170
|
try {
|
|
161
171
|
window.UIEditor.removeEditor();
|
|
162
172
|
} catch {
|
|
163
173
|
console.debug("Failed to remove Stripo editor: No editor found");
|
|
164
174
|
}
|
|
165
175
|
}), o.reset();
|
|
166
|
-
}),
|
|
176
|
+
}), q({
|
|
167
177
|
dynamicContent: {
|
|
168
|
-
insert:
|
|
169
|
-
close:
|
|
178
|
+
insert: A,
|
|
179
|
+
close: B
|
|
170
180
|
},
|
|
171
|
-
hasChanges:
|
|
172
|
-
saveSilent:
|
|
173
|
-
setLoading:
|
|
174
|
-
}), { __sfc: !0, PreviewContainer:
|
|
181
|
+
hasChanges: u,
|
|
182
|
+
saveSilent: I,
|
|
183
|
+
setLoading: F
|
|
184
|
+
}), { __sfc: !0, openMetrics: a, PreviewContainer: K, OnboardingWrapper: j, AssignStrategyDrawer: J, RemoveStrategyModal: Q, LegacyStrategyUpdatedModal: X, headerWrapperRef: k, wrapperRef: y, dynamicContentStore: g, unsubscribeStore: C, props: s, configStore: o, editorStore: d, previewStore: Y, hasChanges: u, isTestPartner: Z, isSaveValidationEnabled: ee, loadRollout: D, saveSilent: I, setLoading: F, emit: n, buildMetadata: v, initPlugin: M, preloadRuntime: R, runExclusive: T, beginMount: L, isCurrentMount: S, mountGeneration: p, getDefaultTemplate: U, cloneTimersOnSave: N, hasTimerBlocks: _, noHeader: te, isRrsEnabled: oe, hasAssignedStrategy: re, insertDynamicContent: A, closeDynamicContent: B, handleDynamicContentOpen: b, ribbonObserver: c, updateRibbonOffset: h, startEditor: E, AutoSaveController: De, AuthErrorModal: Ie, Toaster: Fe, FilterSelectionDrawer: Me, HeaderWrapper: Re, LoadingWrapper: Te, SaveAsTemplateDrawer: Le, UnsubscribeWrapper: Ue, ValidationErrorDrawer: Ne };
|
|
175
185
|
}
|
|
176
186
|
});
|
|
177
187
|
export {
|
|
178
|
-
|
|
188
|
+
ht as default
|
|
179
189
|
};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { filterAmpErrors as
|
|
2
|
-
import {
|
|
3
|
-
import { getEditorApi as r } from "../utils/stripoEditorApi.js";
|
|
1
|
+
import { filterAmpErrors as y } from "../utils/ampErrorFilter.js";
|
|
2
|
+
import { getEditorApi as s } from "../utils/stripoEditorApi.js";
|
|
4
3
|
import { useToaster as D } from "./useToaster.js";
|
|
5
|
-
const
|
|
4
|
+
const h = 1e4, T = 3e4, r = (n, l, A) => new Promise((C, p) => {
|
|
6
5
|
const f = setTimeout(
|
|
7
6
|
() => p(new Error(`${n} did not report completion within ${l}ms`)),
|
|
8
7
|
l
|
|
@@ -14,8 +13,8 @@ const H = 1e4, T = 3e4, m = (n, l, A) => new Promise((C, p) => {
|
|
|
14
13
|
} catch (t) {
|
|
15
14
|
d(t);
|
|
16
15
|
}
|
|
17
|
-
}),
|
|
18
|
-
const { handleError: n } = D(), l = (t = {}) =>
|
|
16
|
+
}), P = () => {
|
|
17
|
+
const { handleError: n } = D(), l = (t = {}) => r(
|
|
19
18
|
"compileEmail",
|
|
20
19
|
T,
|
|
21
20
|
(e, i) => {
|
|
@@ -39,38 +38,38 @@ const H = 1e4, T = 3e4, m = (n, l, A) => new Promise((C, p) => {
|
|
|
39
38
|
resetDataSavedFlag: !1,
|
|
40
39
|
disableLineHeightsReplace: !0
|
|
41
40
|
}, ...t }, u = {
|
|
42
|
-
callback: (
|
|
43
|
-
|
|
41
|
+
callback: (m, g, w, S, v) => {
|
|
42
|
+
m ? i(m) : e({
|
|
44
43
|
html: g,
|
|
45
44
|
ampHtml: w,
|
|
46
|
-
ampErrors:
|
|
47
|
-
displayConditions:
|
|
45
|
+
ampErrors: y(S ?? []),
|
|
46
|
+
displayConditions: v
|
|
48
47
|
});
|
|
49
48
|
},
|
|
50
49
|
...o
|
|
51
50
|
};
|
|
52
|
-
|
|
51
|
+
s().actionsApi.compileEmail(u);
|
|
53
52
|
}
|
|
54
53
|
);
|
|
55
54
|
return {
|
|
56
55
|
getCompiledEmail: l,
|
|
57
|
-
getTemplateData: () =>
|
|
56
|
+
getTemplateData: () => r(
|
|
58
57
|
"getTemplateData",
|
|
59
58
|
T,
|
|
60
59
|
(t) => {
|
|
61
|
-
const e = ({ html: i, css: a, width: o, height: E, utmParams: u, syncModulesIds:
|
|
62
|
-
html:
|
|
60
|
+
const e = ({ html: i, css: a, width: o, height: E, utmParams: u, syncModulesIds: m }) => t({
|
|
61
|
+
html: i,
|
|
63
62
|
css: a,
|
|
64
63
|
width: o,
|
|
65
64
|
height: E,
|
|
66
65
|
utmParams: u,
|
|
67
|
-
syncModulesIds:
|
|
66
|
+
syncModulesIds: m
|
|
68
67
|
});
|
|
69
|
-
|
|
68
|
+
s().actionsApi.getTemplateData(e);
|
|
70
69
|
}
|
|
71
70
|
),
|
|
72
71
|
activateCustomViewStyles: (t = !0) => {
|
|
73
|
-
|
|
72
|
+
s().actionsApi.activateCustomViewStyles(t);
|
|
74
73
|
},
|
|
75
74
|
getPreviewData: async (t) => {
|
|
76
75
|
try {
|
|
@@ -110,16 +109,16 @@ const H = 1e4, T = 3e4, m = (n, l, A) => new Promise((C, p) => {
|
|
|
110
109
|
}
|
|
111
110
|
}),
|
|
112
111
|
updateHtmlAndCss: (t, e) => {
|
|
113
|
-
const { actionsApi: i } =
|
|
114
|
-
return
|
|
112
|
+
const { actionsApi: i } = s();
|
|
113
|
+
return r("updateHtmlAndCss", h, (a) => {
|
|
115
114
|
i.updateHtmlAndCss(t, e, () => a());
|
|
116
115
|
});
|
|
117
116
|
},
|
|
118
|
-
editorSave: () =>
|
|
117
|
+
editorSave: () => r(
|
|
119
118
|
"save",
|
|
120
119
|
T,
|
|
121
120
|
(t) => {
|
|
122
|
-
|
|
121
|
+
s().actionsApi.save((e) => {
|
|
123
122
|
if (e) {
|
|
124
123
|
n(e, "Failed to save template"), t(!1);
|
|
125
124
|
return;
|
|
@@ -131,5 +130,5 @@ const H = 1e4, T = 3e4, m = (n, l, A) => new Promise((C, p) => {
|
|
|
131
130
|
};
|
|
132
131
|
};
|
|
133
132
|
export {
|
|
134
|
-
|
|
133
|
+
P as useActionsApi
|
|
135
134
|
};
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { SYNC_MODULE_CLASS as w } from "./useSyncModuleExtractor.js";
|
|
2
|
+
import { readRuntimePrefetchState as M } from "../utils/runtimePrefetch.js";
|
|
3
|
+
import f from "../package.json.js";
|
|
4
|
+
const s = "guido:open:", k = "total", A = [
|
|
5
|
+
"setup",
|
|
6
|
+
"host_ready",
|
|
7
|
+
"migration_start",
|
|
8
|
+
"migration_end",
|
|
9
|
+
"default_template_start",
|
|
10
|
+
"default_template_end",
|
|
11
|
+
"timer_clone_start",
|
|
12
|
+
"timer_clone_end",
|
|
13
|
+
"plugin_start",
|
|
14
|
+
"script_ready",
|
|
15
|
+
"fonts_sync_ready",
|
|
16
|
+
"blocks_config_ready",
|
|
17
|
+
"init_editor",
|
|
18
|
+
"token_start",
|
|
19
|
+
"token_end",
|
|
20
|
+
"ready"
|
|
21
|
+
], p = [
|
|
22
|
+
["host_wait", "setup", "host_ready"],
|
|
23
|
+
["migration", "migration_start", "migration_end"],
|
|
24
|
+
["default_template", "default_template_start", "default_template_end"],
|
|
25
|
+
["timer_clone", "timer_clone_start", "timer_clone_end"],
|
|
26
|
+
["script", "plugin_start", "script_ready"],
|
|
27
|
+
["fonts_sync", "script_ready", "fonts_sync_ready"],
|
|
28
|
+
["blocks_config", "fonts_sync_ready", "blocks_config_ready"],
|
|
29
|
+
["editor_config", "blocks_config_ready", "init_editor"],
|
|
30
|
+
["stripo_load", "init_editor", "ready"],
|
|
31
|
+
["token", "token_start", "token_end"]
|
|
32
|
+
], b = (e) => new RegExp(`(?:^|[\\s"'])(?:${e})(?=[\\s"'])`, "g"), N = /<img\b/gi, $ = b(w), C = /\srecommendation-id=/g, O = b("items-block-v2|esd-(?:cart|browsed|purchased)-items-block"), I = "esd-timer-id", g = {
|
|
33
|
+
html_bytes: null,
|
|
34
|
+
css_bytes: null,
|
|
35
|
+
image_count: null,
|
|
36
|
+
synced_module_count: null,
|
|
37
|
+
recommendation_block_count: null,
|
|
38
|
+
items_block_count: null,
|
|
39
|
+
has_timers: null,
|
|
40
|
+
force_recreate: null
|
|
41
|
+
};
|
|
42
|
+
let d = null;
|
|
43
|
+
const i = (e) => {
|
|
44
|
+
try {
|
|
45
|
+
e();
|
|
46
|
+
} catch (t) {
|
|
47
|
+
console.debug("guido:open: metrics step failed", t);
|
|
48
|
+
}
|
|
49
|
+
}, E = () => window.DD_RUM, y = (e, t) => e === void 0 || t === void 0 ? null : Math.round(t - e), _ = (e, t) => {
|
|
50
|
+
var r;
|
|
51
|
+
return ((r = e.match(t)) == null ? void 0 : r.length) ?? 0;
|
|
52
|
+
}, h = (e) => new TextEncoder().encode(e).length, L = (e) => {
|
|
53
|
+
if (!e)
|
|
54
|
+
return g;
|
|
55
|
+
try {
|
|
56
|
+
const { html: t, css: r, forceRecreate: o } = e;
|
|
57
|
+
return {
|
|
58
|
+
html_bytes: h(t),
|
|
59
|
+
css_bytes: h(r),
|
|
60
|
+
image_count: _(t, N),
|
|
61
|
+
synced_module_count: _(t, $),
|
|
62
|
+
recommendation_block_count: _(t, C),
|
|
63
|
+
items_block_count: _(t, O),
|
|
64
|
+
has_timers: t.includes(I),
|
|
65
|
+
force_recreate: o
|
|
66
|
+
};
|
|
67
|
+
} catch (t) {
|
|
68
|
+
return console.debug("guido:open: template weight failed", t), g;
|
|
69
|
+
}
|
|
70
|
+
}, T = () => {
|
|
71
|
+
i(() => {
|
|
72
|
+
A.forEach((e) => performance.clearMarks(`${s}${e}`)), [...p.map(([e]) => e), k].forEach((e) => performance.clearMeasures(`${s}${e}`));
|
|
73
|
+
});
|
|
74
|
+
}, v = (e) => {
|
|
75
|
+
const t = {
|
|
76
|
+
marks: {},
|
|
77
|
+
context: null,
|
|
78
|
+
template: null,
|
|
79
|
+
scriptPreloaded: null,
|
|
80
|
+
runtimePrefetch: null,
|
|
81
|
+
wasBackgrounded: document.visibilityState === "hidden",
|
|
82
|
+
finished: e,
|
|
83
|
+
onVisibilityChange: () => {
|
|
84
|
+
document.visibilityState === "hidden" && (t.wasBackgrounded = !0);
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
return t;
|
|
88
|
+
}, l = (e, t) => {
|
|
89
|
+
if (e.finished || e.marks[t] !== void 0)
|
|
90
|
+
return;
|
|
91
|
+
const r = performance.now();
|
|
92
|
+
e.marks[t] = r, e === d && i(() => performance.mark(`${s}${t}`, { startTime: r }));
|
|
93
|
+
}, u = (e) => {
|
|
94
|
+
e.finished = !0, document.removeEventListener("visibilitychange", e.onVisibilityChange);
|
|
95
|
+
}, B = (e, t) => {
|
|
96
|
+
const { marks: r } = e, o = p.map(([n, a, c]) => [n, r[a], r[c]]);
|
|
97
|
+
o.push([k, r.setup, t]), o.forEach(([n, a, c]) => {
|
|
98
|
+
a !== void 0 && c !== void 0 && i(() => performance.measure(`${s}${n}`, { start: a, end: c }));
|
|
99
|
+
});
|
|
100
|
+
}, D = (e, t, r) => {
|
|
101
|
+
const { marks: o, context: n } = e, a = Object.fromEntries(
|
|
102
|
+
p.map(([c, R, S]) => [`${c}_ms`, y(o[R], o[S])])
|
|
103
|
+
);
|
|
104
|
+
return {
|
|
105
|
+
outcome: t,
|
|
106
|
+
open_ms: y(o.setup, r),
|
|
107
|
+
...a,
|
|
108
|
+
script_preloaded: e.scriptPreloaded,
|
|
109
|
+
runtime_prefetch: e.runtimePrefetch,
|
|
110
|
+
...L(e.template),
|
|
111
|
+
partner_name: (n == null ? void 0 : n.partnerName) ?? null,
|
|
112
|
+
product_type: (n == null ? void 0 : n.productType) ?? null,
|
|
113
|
+
template_id: (n == null ? void 0 : n.templateId) ?? null,
|
|
114
|
+
variation_id: (n == null ? void 0 : n.variationId) ?? null,
|
|
115
|
+
guido_version: f.version,
|
|
116
|
+
stripo_version: f.guido.stripo.version,
|
|
117
|
+
was_backgrounded: e.wasBackgrounded
|
|
118
|
+
};
|
|
119
|
+
}, m = (e, t) => {
|
|
120
|
+
i(() => {
|
|
121
|
+
const r = e.marks.ready ?? performance.now(), o = D(e, t, r);
|
|
122
|
+
e.template = null, e === d && B(e, r), console.debug("guido:open", o), i(() => {
|
|
123
|
+
var n, a;
|
|
124
|
+
return (a = (n = E()) == null ? void 0 : n.addAction) == null ? void 0 : a.call(n, "guido_editor_open", o);
|
|
125
|
+
});
|
|
126
|
+
});
|
|
127
|
+
}, P = (e) => ({
|
|
128
|
+
mark: (t) => l(e, t),
|
|
129
|
+
timed: async (t, r) => {
|
|
130
|
+
l(e, `${t}_start`);
|
|
131
|
+
const o = await r();
|
|
132
|
+
return l(e, `${t}_end`), o;
|
|
133
|
+
},
|
|
134
|
+
setContext: (t) => {
|
|
135
|
+
e.context = t;
|
|
136
|
+
},
|
|
137
|
+
setTemplate: (t) => {
|
|
138
|
+
e.template = t;
|
|
139
|
+
},
|
|
140
|
+
setScriptPreloaded: (t) => {
|
|
141
|
+
e.scriptPreloaded = t;
|
|
142
|
+
},
|
|
143
|
+
markReady: () => {
|
|
144
|
+
e.finished || (l(e, "ready"), u(e), i(() => {
|
|
145
|
+
var t, r;
|
|
146
|
+
return (r = (t = E()) == null ? void 0 : t.addTiming) == null ? void 0 : r.call(t, "guido_editor_ready");
|
|
147
|
+
}), setTimeout(() => m(e, "ready"), 0));
|
|
148
|
+
},
|
|
149
|
+
markFailed: () => {
|
|
150
|
+
e.finished || (u(e), m(e, "error"));
|
|
151
|
+
},
|
|
152
|
+
dispose: () => {
|
|
153
|
+
e.finished || (u(e), m(e, "abandoned")), e === d && (T(), d = null);
|
|
154
|
+
}
|
|
155
|
+
}), F = () => {
|
|
156
|
+
const e = v(!1);
|
|
157
|
+
return T(), d = e, i(() => {
|
|
158
|
+
e.runtimePrefetch = M();
|
|
159
|
+
}), document.addEventListener("visibilitychange", e.onVisibilityChange), l(e, "setup"), P(e);
|
|
160
|
+
}, G = () => P(d ?? v(!0));
|
|
161
|
+
export {
|
|
162
|
+
F as startEditorOpenMetrics,
|
|
163
|
+
G as useEditorOpenMetrics
|
|
164
|
+
};
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
if (typeof n._fs_org != "string" || !n._fs_org)
|
|
1
|
+
const c = "https://email-static.useinsider.com/guido/guido-fs.js", u = () => ({ injectFullStory: () => {
|
|
2
|
+
var n;
|
|
3
|
+
const s = window;
|
|
4
|
+
if (typeof s._fs_org != "string" || !s._fs_org)
|
|
6
5
|
return;
|
|
7
|
-
const
|
|
8
|
-
if (!
|
|
6
|
+
const r = document.querySelector("ui-editor"), o = (n = r == null ? void 0 : r.shadowRoot) == null ? void 0 : n.querySelector("iframe"), e = o == null ? void 0 : o.contentDocument;
|
|
7
|
+
if (!e || e.querySelector('script[data-fullstory-bridge="true"]'))
|
|
9
8
|
return;
|
|
10
|
-
const t =
|
|
11
|
-
t.src =
|
|
9
|
+
const t = e.createElement("script");
|
|
10
|
+
t.src = c, t.async = !0, t.crossOrigin = "anonymous", t.dataset.fullstoryBridge = "true", e.head.appendChild(t);
|
|
12
11
|
} });
|
|
13
12
|
export {
|
|
14
|
-
|
|
13
|
+
u as useFullStoryBridge
|
|
15
14
|
};
|
|
@@ -1,44 +1,55 @@
|
|
|
1
|
-
import { useActionsApi as
|
|
2
|
-
import { useBlocksConfig as
|
|
3
|
-
import { useConfig as
|
|
4
|
-
import { useCustomInterfaceAppearance as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import {
|
|
17
|
-
import
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
import { useActionsApi as H } from "./useActionsApi.js";
|
|
2
|
+
import { useBlocksConfig as N } from "./useBlocksConfig.js";
|
|
3
|
+
import { useConfig as j } from "./useConfig.js";
|
|
4
|
+
import { useCustomInterfaceAppearance as _ } from "./useCustomInterfaceAppearance.js";
|
|
5
|
+
import { useEditorOpenMetrics as z } from "./useEditorOpenMetrics.js";
|
|
6
|
+
import { useFullStoryBridge as $ } from "./useFullStoryBridge.js";
|
|
7
|
+
import { useModuleRepair as G } from "./useModuleRepair.js";
|
|
8
|
+
import { useStripoEventHandler as X } from "./useStripoEventHandler.js";
|
|
9
|
+
import { useStripoNotifications as J } from "./useStripoNotifications.js";
|
|
10
|
+
import { useToaster as K } from "./useToaster.js";
|
|
11
|
+
import { localePatch as Q } from "../config/i18n/index.js";
|
|
12
|
+
import { en as B } from "../config/i18n/en/index.js";
|
|
13
|
+
import { ToasterTypeOptions as W } from "../enums/toaster.js";
|
|
14
|
+
import { useStripoApi as Y } from "../services/stripoApi.js";
|
|
15
|
+
import Z from "../static/styles/customEditorStyle.css.js";
|
|
16
|
+
import { useEditorStore as M } from "../stores/editor.js";
|
|
17
|
+
import { buildMergeTagEntries as ee, flattenDynamicContentList as te } from "../utils/genericUtil.js";
|
|
18
|
+
import { getStripoRuntimeBaseUrl as oe } from "../utils/stripoRuntime.js";
|
|
19
|
+
let d = null, v = !1;
|
|
20
|
+
const be = () => {
|
|
21
|
+
const { features: u, template: m, isFeatureEnabled: p } = j(), { handleError: f, showToaster: T } = K(), { getToken: F, getCustomFonts: A, getSyncModulesStatus: P } = Y(), { handleEvent: R } = X(), { handleModuleAdd: U } = G(), { getStripoBlocksConfig: V } = N(), { getStripoNotifications: D } = J(), e = z(), g = () => d || (d = new Promise((s, a) => {
|
|
22
22
|
if (document.getElementById("UiEditorScript")) {
|
|
23
|
-
|
|
23
|
+
s();
|
|
24
24
|
return;
|
|
25
25
|
}
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
26
|
+
const i = oe();
|
|
27
|
+
if (!i) {
|
|
28
|
+
a(
|
|
29
|
+
new Error("guido.stripo.version is not set in package.json. Please configure the Stripo version.")
|
|
30
|
+
);
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
const n = `${i}UIEditor.js`, t = document.createElement("script");
|
|
34
|
+
t.id = "UiEditorScript", t.type = "module", t.src = n, t.onload = () => {
|
|
35
|
+
v = !0, s();
|
|
36
|
+
}, t.onerror = () => {
|
|
37
|
+
t.remove(), a(new Error(`Failed to load Stripo UIEditor script from S3: ${n}`));
|
|
38
|
+
}, document.body.appendChild(t);
|
|
39
|
+
}), d.catch(() => {
|
|
40
|
+
d = null;
|
|
41
|
+
}), d), I = async (s, a, i, n = [], t = !1) => {
|
|
42
|
+
var C, w, k, b;
|
|
43
|
+
const o = M(), { html: c, css: S } = s, { baseBlocks: y, extensions: L } = await V();
|
|
44
|
+
e.mark("blocks_config_ready");
|
|
45
|
+
const E = ((C = u.value) == null ? void 0 : C.displayConditions) ?? !0, O = ((w = u.value) == null ? void 0 : w.modulesDisabled) ?? !1, h = !!c || (((k = m.value) == null ? void 0 : k.forceRecreate) ?? !1), q = "https://email-static.useinsider.com https://edge.fullstory.com https://rs.fullstory.com";
|
|
46
|
+
e.setTemplate({ html: c, css: S, forceRecreate: h }), _().importCss(), e.mark("init_editor"), await window.UIEditor.initEditor(
|
|
36
47
|
document.querySelector("#guido-editor"),
|
|
37
48
|
{
|
|
38
|
-
metadata:
|
|
39
|
-
html:
|
|
40
|
-
css:
|
|
41
|
-
forceRecreate:
|
|
49
|
+
metadata: a,
|
|
50
|
+
html: c,
|
|
51
|
+
css: S,
|
|
52
|
+
forceRecreate: h,
|
|
42
53
|
locale: "en",
|
|
43
54
|
undoButtonSelector: "#guido__undo-button",
|
|
44
55
|
redoButtonSelector: "#guido__redo-button",
|
|
@@ -48,12 +59,12 @@ const he = () => {
|
|
|
48
59
|
customAppearanceMergetags: !p("liquidSyntax"),
|
|
49
60
|
customAppearanceMergetagsBorderColor: "#f1f3fe",
|
|
50
61
|
customAppearanceMergetagsBackgroundColor: "#f1f3fe",
|
|
51
|
-
customViewStyles:
|
|
52
|
-
conditionsEnabled:
|
|
53
|
-
customConditionsEnabled:
|
|
62
|
+
customViewStyles: Z,
|
|
63
|
+
conditionsEnabled: E,
|
|
64
|
+
customConditionsEnabled: E,
|
|
54
65
|
enableXSSSecurity: !0,
|
|
55
|
-
modulesDisabled:
|
|
56
|
-
syncModulesEnabled:
|
|
66
|
+
modulesDisabled: O,
|
|
67
|
+
syncModulesEnabled: t,
|
|
57
68
|
messageSettingsEnabled: !0,
|
|
58
69
|
displayGmailAnnotations: !0,
|
|
59
70
|
displayHiddenPreheader: !1,
|
|
@@ -64,54 +75,55 @@ const he = () => {
|
|
|
64
75
|
selectElementAfterDrop: !0,
|
|
65
76
|
sameFontSizeForOutlook: !0,
|
|
66
77
|
allowedScriptSourceDomains: q,
|
|
67
|
-
...
|
|
78
|
+
...y ? { baseBlocks: y } : {},
|
|
68
79
|
editorFonts: {
|
|
69
80
|
showDefaultStandardFonts: !0,
|
|
70
81
|
showDefaultNotStandardFonts: !0,
|
|
71
|
-
customFonts:
|
|
82
|
+
customFonts: n
|
|
72
83
|
},
|
|
73
84
|
mergeTags: [
|
|
74
85
|
{
|
|
75
|
-
entries:
|
|
76
|
-
|
|
77
|
-
|
|
86
|
+
entries: ee(
|
|
87
|
+
i.preselectedDynamicContentList,
|
|
88
|
+
te((b = m.value) == null ? void 0 : b.dynamicContentList),
|
|
78
89
|
p("liquidSyntax")
|
|
79
90
|
)
|
|
80
91
|
}
|
|
81
92
|
],
|
|
82
|
-
async onTokenRefreshRequest(
|
|
93
|
+
async onTokenRefreshRequest(r) {
|
|
83
94
|
try {
|
|
84
|
-
|
|
85
|
-
|
|
95
|
+
e.mark("token_start");
|
|
96
|
+
const l = await F();
|
|
97
|
+
e.mark("token_end"), r(l);
|
|
86
98
|
} catch (l) {
|
|
87
|
-
|
|
99
|
+
f(l, "Failed to refresh token");
|
|
88
100
|
}
|
|
89
101
|
},
|
|
90
102
|
onTemplateLoaded() {
|
|
91
103
|
try {
|
|
92
|
-
const { activateCustomViewStyles:
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}, 1e3);
|
|
96
|
-
} catch (
|
|
97
|
-
|
|
104
|
+
const { activateCustomViewStyles: r, updateTimerInClonedTemplate: l } = H(), { injectFullStory: x } = $();
|
|
105
|
+
_().importCss(), r(), x(), l(), i.onReady(), o.isStripoInitialized = !0, o.loadingStatus = !1, setTimeout(() => {
|
|
106
|
+
o.hasChanges = !1;
|
|
107
|
+
}, 1e3), e.markReady();
|
|
108
|
+
} catch (r) {
|
|
109
|
+
f(r, "Failed to load custom interface appearance");
|
|
98
110
|
}
|
|
99
111
|
},
|
|
100
|
-
onCodeEditorVisibilityChanged(
|
|
101
|
-
|
|
112
|
+
onCodeEditorVisibilityChanged(r) {
|
|
113
|
+
o.isCodeEditorOpen = r;
|
|
102
114
|
},
|
|
103
|
-
onEditorVisualModeChanged(
|
|
104
|
-
|
|
115
|
+
onEditorVisualModeChanged(r) {
|
|
116
|
+
o.editorVisualMode = r.toLowerCase();
|
|
105
117
|
},
|
|
106
|
-
onVersionHistoryVisibilityChanged(
|
|
107
|
-
|
|
118
|
+
onVersionHistoryVisibilityChanged(r) {
|
|
119
|
+
o.isVersionHistoryOpen = r;
|
|
108
120
|
},
|
|
109
121
|
onDataChanged() {
|
|
110
|
-
|
|
122
|
+
o.hasChanges = !0, o.changeSeq += 1;
|
|
111
123
|
},
|
|
112
|
-
onEvent:
|
|
113
|
-
onModuleAdd:
|
|
114
|
-
notifications:
|
|
124
|
+
onEvent: R,
|
|
125
|
+
onModuleAdd: U,
|
|
126
|
+
notifications: D(),
|
|
115
127
|
// Stripo deselects the block on any click outside the canvas, so every surface
|
|
116
128
|
// that belongs to the block's own flow has to be listed here (SD-153273).
|
|
117
129
|
ignoreClickOutsideSelectors: [
|
|
@@ -121,35 +133,35 @@ const he = () => {
|
|
|
121
133
|
".in-modal-v2-wrapper",
|
|
122
134
|
".in-toasts-wrapper"
|
|
123
135
|
],
|
|
124
|
-
extensions:
|
|
125
|
-
localePatch:
|
|
136
|
+
extensions: L,
|
|
137
|
+
localePatch: Q
|
|
126
138
|
}
|
|
127
139
|
);
|
|
128
140
|
};
|
|
129
|
-
return { initPlugin: async (
|
|
130
|
-
const
|
|
141
|
+
return { initPlugin: async (s, a, i) => {
|
|
142
|
+
const n = M();
|
|
131
143
|
try {
|
|
132
|
-
await
|
|
133
|
-
const [
|
|
134
|
-
|
|
135
|
-
|
|
144
|
+
e.mark("plugin_start"), e.setScriptPreloaded(v), await g(), e.mark("script_ready");
|
|
145
|
+
const [t, o] = await Promise.all([
|
|
146
|
+
A(),
|
|
147
|
+
P()
|
|
136
148
|
]);
|
|
137
|
-
|
|
149
|
+
e.mark("fonts_sync_ready"), n.syncModulesEnabled = o, await I(s, a, i, t, o);
|
|
138
150
|
} catch {
|
|
139
|
-
|
|
140
|
-
type:
|
|
141
|
-
message:
|
|
151
|
+
n.loadingStatus = !1, T({
|
|
152
|
+
type: W.Error,
|
|
153
|
+
message: B["An error has occurred. Please report the error code to support."],
|
|
142
154
|
actionButton: {
|
|
143
|
-
text:
|
|
155
|
+
text: B["Reload page"],
|
|
144
156
|
onClick: () => window.location.reload()
|
|
145
157
|
}
|
|
146
|
-
});
|
|
158
|
+
}), e.markFailed();
|
|
147
159
|
}
|
|
148
160
|
}, preloadRuntime: () => {
|
|
149
|
-
|
|
161
|
+
g().catch(() => {
|
|
150
162
|
});
|
|
151
163
|
} };
|
|
152
164
|
};
|
|
153
165
|
export {
|
|
154
|
-
|
|
166
|
+
be as useStripo
|
|
155
167
|
};
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { migrateCheckbox as i } from "./checkboxMigrator.js";
|
|
2
2
|
import { migrateCouponBlock as e } from "./couponBlockMigrator.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { migrateRecommendation as p } from "./recommendationMigrator.js";
|
|
3
|
+
import { migrateItemsBlock as a } from "./itemsBlockMigrator.js";
|
|
4
|
+
import { migrateProductNameLink as n } from "./productNameLinkMigrator.js";
|
|
5
|
+
import { migrateRadioButton as c } from "./radioButtonMigrator.js";
|
|
6
|
+
import { migrateRecommendation as g } from "./recommendationMigrator.js";
|
|
8
7
|
import { migrateRecommendationPartnerScope as f } from "./recommendationPartnerMigrator.js";
|
|
9
|
-
import { migrateRecommendationTitle as
|
|
10
|
-
import { migrateSocialIcons as
|
|
11
|
-
import { migrateUnsubscribe as
|
|
12
|
-
const h = async (
|
|
13
|
-
let m =
|
|
14
|
-
return m = i(m), m =
|
|
8
|
+
import { migrateRecommendationTitle as p } from "./recommendationTitleMigrator.js";
|
|
9
|
+
import { migrateSocialIcons as d } from "./socialIconMigrator.js";
|
|
10
|
+
import { migrateUnsubscribe as l } from "./unsubscribeMigrator.js";
|
|
11
|
+
const h = async (r, t = {}, o) => {
|
|
12
|
+
let m = r;
|
|
13
|
+
return m = i(m), m = c(m), m = await l(m), m = e(m), m = g(m, t), o && (m = f(m, o)), m = p(m), m = a(m), m = n(m), m = d(m), m;
|
|
15
14
|
};
|
|
16
15
|
export {
|
|
17
16
|
h as migrate
|
package/dist/guido.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";.auth-error-modal[data-v-b4d7ae51]{position:relative;z-index:145}.gap-16[data-v-5553d071],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-b8f24f34] .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-baf7a5dd]{gap:4px}.header-wrapper[data-v-d11dd577]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.validation-error-list[data-v-e48cebe9]{gap:16px}.validation-error-row[data-v-e48cebe9]{gap:8px;padding:24px;border:1px solid #E1E1E1;border-radius:8px}.validation-error-row__icon[data-v-e48cebe9]{flex-shrink:0;font-size:24px;line-height:0}.validation-error-row__text[data-v-e48cebe9]{font-size:13px;line-height:16px;color:#292929;word-break:break-word}.guido-editor__wrapper[data-v-
|
|
1
|
+
@charset "UTF-8";.auth-error-modal[data-v-b4d7ae51]{position:relative;z-index:145}.gap-16[data-v-5553d071],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-b8f24f34] .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-baf7a5dd]{gap:4px}.header-wrapper[data-v-d11dd577]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.validation-error-list[data-v-e48cebe9]{gap:16px}.validation-error-row[data-v-e48cebe9]{gap:8px;padding:24px;border:1px solid #E1E1E1;border-radius:8px}.validation-error-row__icon[data-v-e48cebe9]{flex-shrink:0;font-size:24px;line-height:0}.validation-error-row__text[data-v-e48cebe9]{font-size:13px;line-height:16px;color:#292929;word-break:break-word}.guido-editor__wrapper[data-v-1a3ddd48]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-1a3ddd48]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-1a3ddd48]{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-19d8cb42] .vueperslides__bullets,[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-6ce48dfd]{width:100%;max-width:none}.assign-strategy-drawer-content .assign-strategy-select[data-v-6ce48dfd] .in-skeleton{width:100%!important}.assign-strategy-drawer-content .assign-strategy-select[data-v-6ce48dfd] .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}.legacy-strategy-updated-modal[data-v-da2225a1]{position:relative;z-index:145}
|
package/dist/library.js
CHANGED
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
import { default as a } from "./components/Guido.vue.js";
|
|
2
|
-
import { MessageType as t, ProductType as
|
|
2
|
+
import { MessageType as t, ProductType as f } from "./@types/config/schemas.js";
|
|
3
3
|
import "./@types/config/defaults.js";
|
|
4
|
-
import { getValidationErrors as
|
|
5
|
-
import { assignTrackingIds as
|
|
4
|
+
import { getValidationErrors as p, isValidConfig as s, parseConfig as m, parseConfigSafe as g, validateConfig as n } from "./@types/config/validator.js";
|
|
5
|
+
import { assignTrackingIds as l, readTrackFloor as x, readTrackSeq as c } from "./utils/linkTrackingIds.js";
|
|
6
6
|
import { useGuidoEmailEditorStore as C } from "./stores/guido-email-editor.js";
|
|
7
|
+
import { prefetchGuidoRuntime as E } from "./utils/runtimePrefetch.js";
|
|
7
8
|
export {
|
|
8
9
|
a as Guido,
|
|
9
10
|
t as MessageType,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
f as ProductType,
|
|
12
|
+
l as assignTrackingIds,
|
|
13
|
+
p as getValidationErrors,
|
|
14
|
+
s as isValidConfig,
|
|
15
|
+
m as parseConfig,
|
|
16
|
+
g as parseConfigSafe,
|
|
17
|
+
E as prefetchGuidoRuntime,
|
|
16
18
|
x as readTrackFloor,
|
|
17
|
-
|
|
19
|
+
c as readTrackSeq,
|
|
18
20
|
C as useGuidoEmailEditorStore,
|
|
19
21
|
n as validateConfig
|
|
20
22
|
};
|
package/dist/package.json.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
const o = { stripo: { version: "2.81.1" } },
|
|
2
|
-
|
|
1
|
+
const o = "3.21.2-beta.b6f3ef8", s = { stripo: { version: "2.81.1" } }, e = {
|
|
2
|
+
version: o,
|
|
3
|
+
guido: s
|
|
3
4
|
};
|
|
4
5
|
export {
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
e as default,
|
|
7
|
+
s as guido,
|
|
8
|
+
o as version
|
|
7
9
|
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export type TimedOpenPhase = 'migration' | 'default_template' | 'timer_clone';
|
|
2
|
+
export type OpenPhase = 'setup' | 'host_ready' | `${TimedOpenPhase}_start` | `${TimedOpenPhase}_end` | 'plugin_start' | 'script_ready' | 'fonts_sync_ready' | 'blocks_config_ready' | 'init_editor' | 'token_start' | 'token_end' | 'ready';
|
|
3
|
+
export type OpenOutcome = 'ready' | 'error' | 'abandoned';
|
|
4
|
+
export interface OpenContext {
|
|
5
|
+
partnerName: string;
|
|
6
|
+
productType: number;
|
|
7
|
+
templateId: string;
|
|
8
|
+
variationId: string;
|
|
9
|
+
}
|
|
10
|
+
export interface OpenTemplate {
|
|
11
|
+
html: string;
|
|
12
|
+
css: string;
|
|
13
|
+
forceRecreate: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface EditorOpenMetrics {
|
|
16
|
+
mark: (phase: OpenPhase) => void;
|
|
17
|
+
timed: <T>(phase: TimedOpenPhase, task: () => Promise<T>) => Promise<T>;
|
|
18
|
+
setContext: (context: OpenContext) => void;
|
|
19
|
+
setTemplate: (template: OpenTemplate) => void;
|
|
20
|
+
setScriptPreloaded: (preloaded: boolean) => void;
|
|
21
|
+
markReady: () => void;
|
|
22
|
+
markFailed: () => void;
|
|
23
|
+
dispose: () => void;
|
|
24
|
+
}
|
|
25
|
+
export declare const startEditorOpenMetrics: () => EditorOpenMetrics;
|
|
26
|
+
/** Binds to the session open at call time, so a remounted editor never writes into its replacement's session. */
|
|
27
|
+
export declare const useEditorOpenMetrics: () => EditorOpenMetrics;
|
package/dist/src/library.d.ts
CHANGED
|
@@ -4,5 +4,6 @@ export { validateConfig, parseConfig, parseConfigSafe, isValidConfig, getValidat
|
|
|
4
4
|
export { assignTrackingIds, readTrackFloor, readTrackSeq } from './public/trackingIds';
|
|
5
5
|
export { useGuidoEmailEditorStore } from './public/editorState';
|
|
6
6
|
export type { GuidoEmailEditorState } from './public/editorState';
|
|
7
|
+
export { prefetchGuidoRuntime } from './public/prefetchRuntime';
|
|
7
8
|
export type { StripoEventType } from './@types/events';
|
|
8
9
|
export type { PositionData, DynamicContentEvent, MergeTagClickEvent, MergeTag, BaseDynamicContent, DynamicContentNode, DynamicContentList, TooltipOptions, TextValueObject, L10n, } from './@types/generic';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { prefetchGuidoRuntime } from '../utils/runtimePrefetch';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const s = "2.81.1", n = ["UIEditor.js", "zone.js", "styles-BWH3PMR4.css", "polyfills-FF3RLU5F.js", "main-5LCHF56A.js", "chunk-2HYLRI4G.js", "chunk-4SN7BSQN.js", "chunk-5IY7ZG3R.js", "chunk-62K3AMOD.js", "chunk-GK543IRH.js", "chunk-L2EPGQ76.js", "chunk-LXS5IGCQ.js", "chunk-PNWIGF4L.js", "chunk-S2TYCIH3.js", "chunk-S5UZ4LUK.js", "chunk-V2AGQPVL.js", "chunk-XZ6MUAN5.js", "chunk-ZPL4VL4O.js", "assets/css/uiEditor.css", "assets/i18n/en.json", "assets/icons/ui-editor-icons.sprite.svg", "assets/icons/ui-editor-icons.map.json", "assets/imageeditor/scripts.min.js", "assets/imageeditor/assets/icons/merged.svg"], i = {
|
|
2
|
+
version: s,
|
|
3
|
+
files: n
|
|
4
|
+
};
|
|
5
|
+
export {
|
|
6
|
+
i as default,
|
|
7
|
+
n as files,
|
|
8
|
+
s as version
|
|
9
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import s from "../static/stripo-runtime-manifest.json.js";
|
|
2
|
+
import { getStripoRuntimeBaseUrl as c } from "./stripoRuntime.js";
|
|
3
|
+
const r = "data-guido-prefetch", d = "pending", o = "settled", i = `link[${r}]`, u = ["slow-2g", "2g"], l = /\.(?:js|json)$/, a = () => document.getElementById("UiEditorScript") !== null || window.UIEditor !== void 0, E = () => {
|
|
4
|
+
const { connection: e } = navigator;
|
|
5
|
+
return (e == null ? void 0 : e.saveData) === !0 || u.includes((e == null ? void 0 : e.effectiveType) ?? "");
|
|
6
|
+
}, m = (e) => {
|
|
7
|
+
const t = document.createElement("link"), n = () => t.setAttribute(r, o);
|
|
8
|
+
t.rel = "prefetch", t.href = e, l.test(e) && t.setAttribute("crossorigin", "anonymous"), t.setAttribute(r, d), t.addEventListener("load", n, { once: !0 }), t.addEventListener("error", n, { once: !0 }), document.head.appendChild(t);
|
|
9
|
+
}, T = () => {
|
|
10
|
+
try {
|
|
11
|
+
const e = c(), t = document.querySelector(i) !== null;
|
|
12
|
+
if (!e || t || a() || E())
|
|
13
|
+
return;
|
|
14
|
+
s.files.forEach((n) => m(`${e}${n}`));
|
|
15
|
+
} catch (e) {
|
|
16
|
+
console.debug("guido: runtime prefetch skipped", e);
|
|
17
|
+
}
|
|
18
|
+
}, g = () => {
|
|
19
|
+
const e = Array.from(document.querySelectorAll(i));
|
|
20
|
+
return e.length ? e.every((t) => t.getAttribute(r) === o) ? "done" : "pending" : "none";
|
|
21
|
+
};
|
|
22
|
+
export {
|
|
23
|
+
r as RUNTIME_PREFETCH_ATTRIBUTE,
|
|
24
|
+
T as prefetchGuidoRuntime,
|
|
25
|
+
g as readRuntimePrefetchState
|
|
26
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import r from "../package.json.js";
|
|
2
|
+
const e = "https://email-static.useinsider.com/guido/", n = () => {
|
|
3
|
+
var s;
|
|
4
|
+
const t = r.guido, o = (s = t == null ? void 0 : t.stripo) == null ? void 0 : s.version;
|
|
5
|
+
return o ? `${e}${o}/` : null;
|
|
6
|
+
};
|
|
7
|
+
export {
|
|
8
|
+
n as getStripoRuntimeBaseUrl
|
|
9
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/guido",
|
|
3
|
-
"version": "3.21.2-beta.
|
|
3
|
+
"version": "3.21.2-beta.b6f3ef8",
|
|
4
4
|
"description": "Guido is a Vue + TypeScript wrapper for Email Plugin. Easily embed the email editor in your Vue applications.",
|
|
5
5
|
"main": "./dist/guido.umd.cjs",
|
|
6
6
|
"module": "./dist/library.js",
|
|
@@ -22,6 +22,10 @@
|
|
|
22
22
|
"types": "./dist/src/public/editorState.d.ts",
|
|
23
23
|
"import": "./dist/public/editorState.js"
|
|
24
24
|
},
|
|
25
|
+
"./prefetch": {
|
|
26
|
+
"types": "./dist/src/public/prefetchRuntime.d.ts",
|
|
27
|
+
"import": "./dist/public/prefetchRuntime.js"
|
|
28
|
+
},
|
|
25
29
|
"./style": "./dist/guido.css"
|
|
26
30
|
},
|
|
27
31
|
"scripts": {
|
|
@@ -45,6 +49,7 @@
|
|
|
45
49
|
"coverage:e2e:report": "nyc report --reporter=lcov --reporter=text-summary --report-dir=coverage/e2e",
|
|
46
50
|
"test:mutation": "stryker run",
|
|
47
51
|
"test:mutation:since": "CHANGED=$(git diff --name-only --diff-filter=AMR origin/develop...HEAD -- 'src/**/*.ts' ':(glob)src/components/organisms/onboarding/**/*.vue' ':(glob)src/components/organisms/header/**/*.vue' ':(glob)src/components/organisms/unsubscribe/**/*.vue' ':(glob)src/components/organisms/save-as-template/**/*.vue' ':(glob)src/components/organisms/email-preview/**/*.vue' ':(glob)src/components/wrappers/**/*.vue' 'src/components/Guido.vue' ':(exclude)src/**/*.test.ts' ':(exclude)src/**/index.ts' ':(exclude)src/@types/**' ':(exclude)src/enums/**' ':(exclude)src/mock/**' ':(exclude)src/**/_Boilerplate/**' | paste -sd, -); if [ -n \"$CHANGED\" ]; then stryker run --incremental --mutate \"$CHANGED\"; else echo \"No changed mutatable src files vs origin/develop\"; fi",
|
|
52
|
+
"stripo:manifest": "node scripts/stripo-runtime-manifest.mjs",
|
|
48
53
|
"prepare": "husky",
|
|
49
54
|
"preinstall": "rm -rf ./node_modules/.vite"
|
|
50
55
|
},
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const migrateFullStoryScripts: (html: string) => string;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare const FULLSTORY_BRIDGE_SCRIPT_URL = "https://email-static.useinsider.com/guido/guido-fs.js";
|
|
2
|
-
/**
|
|
3
|
-
* Removes FullStory `<script>` elements that the panel / bridge leave in the editor iframe head,
|
|
4
|
-
* which Stripo then serializes into the stored source. Other scripts are left untouched.
|
|
5
|
-
*/
|
|
6
|
-
export declare function stripFullStoryScripts(html: string): string;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
const o = "https://email-static.useinsider.com/guido/guido-fs.js", E = new RegExp("<script\\b([^>]*?)(?<!\\/)>([\\s\\S]*?)<\\/script\\s*>", "gi"), _ = /<script\b([^>]*?)\/>/gi, e = /\bsrc\s*=\s*["']?(?:https?:)?\/\/(?:[\w-]+\.)*fullstory\.com[/"'\s>]/i, R = /\bdata-fullstory-bridge\b/i, S = /\b_fs_(?:script|namespace)\b/, i = (s, t = "") => e.test(`${s} `) || R.test(s) || s.includes(o) || S.test(t);
|
|
2
|
-
function n(s) {
|
|
3
|
-
return !s || !/fullstory|_fs_|guido-fs\.js/i.test(s) ? s : s.replace(E, (t, c, r) => i(c, r) ? "" : t).replace(_, (t, c) => i(c) ? "" : t);
|
|
4
|
-
}
|
|
5
|
-
export {
|
|
6
|
-
o as FULLSTORY_BRIDGE_SCRIPT_URL,
|
|
7
|
-
n as stripFullStoryScripts
|
|
8
|
-
};
|