@useinsider/guido 3.30.0-beta.2203d4d → 3.30.0-beta.23d415d
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Guido.vue.js +1 -1
- package/dist/components/Guido.vue2.js +26 -25
- package/dist/composables/useHtmlCompiler.js +15 -13
- package/dist/composables/useStripo.js +24 -23
- package/dist/config/compiler/liquidCompilerRules.js +13 -5
- package/dist/guido.css +1 -1
- package/dist/package.json.js +1 -1
- package/dist/src/utils/linkTokenPaste.d.ts +3 -0
- package/dist/src/utils/liquidLinkQuotes.d.ts +4 -0
- package/dist/utils/linkTokenPaste.js +28 -0
- package/dist/utils/liquidLinkQuotes.js +10 -0
- package/package.json +1 -1
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { defineComponent as Se, defineAsyncComponent as a, ref as W, computed as l, watch as $, onMounted as he, onUnmounted as Ee } from "vue";
|
|
2
2
|
import { useCortexBlueprintBridge as Ce } from "../composables/useCortexBlueprintBridge.js";
|
|
3
3
|
import { useEditorLock as De } from "../composables/useEditorLock.js";
|
|
4
|
-
import { startEditorOpenMetrics as
|
|
4
|
+
import { startEditorOpenMetrics as ke } from "../composables/useEditorOpenMetrics.js";
|
|
5
5
|
import { provideGuidoActions as Te } from "../composables/useGuidoActions.js";
|
|
6
|
-
import { useGuidoStateBridge as
|
|
6
|
+
import { useGuidoStateBridge as we } from "../composables/useGuidoStateBridge.js";
|
|
7
7
|
import { usePartner as Fe } from "../composables/usePartner.js";
|
|
8
8
|
import { useSaveValidationRollout as Me } from "../composables/useSaveValidationRollout.js";
|
|
9
|
-
import { useStripo as
|
|
10
|
-
import { useTimerClone as
|
|
9
|
+
import { useStripo as Le } from "../composables/useStripo.js";
|
|
10
|
+
import { useTimerClone as Ie } from "../composables/useTimerClone.js";
|
|
11
11
|
import { useToaster as Re } from "../composables/useToaster.js";
|
|
12
12
|
import { useTranslations as Oe } from "../composables/useTranslations.js";
|
|
13
13
|
import { migrate as Ue } from "../config/migrator/index.js";
|
|
14
14
|
import { ModuleFolderDefaults as G } from "../enums/defaults.js";
|
|
15
15
|
import { RIBBON_SELECTOR as Ae } from "../enums/onboarding.js";
|
|
16
16
|
import { ToasterTypeOptions as Ne } from "../enums/toaster.js";
|
|
17
|
-
import { useRecommendationExtensionStore as z, disposeStrategyPageReturnListeners as
|
|
18
|
-
import { disposeUnsubscribeListeners as
|
|
17
|
+
import { useRecommendationExtensionStore as z, disposeStrategyPageReturnListeners as Pe } from "../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
18
|
+
import { disposeUnsubscribeListeners as _e } from "../extensions/Blocks/Unsubscribe/block.js";
|
|
19
19
|
import { disposeDisplayConditionRequest as xe } from "../extensions/DisplayConditions/bridge.js";
|
|
20
20
|
import Be from "./organisms/AutoSaveController.vue.js";
|
|
21
21
|
import He from "./organisms/base/AuthErrorModal.vue.js";
|
|
@@ -36,8 +36,9 @@ import { usePreviewStore as Ye } from "../stores/preview.js";
|
|
|
36
36
|
import { useSaveValidationStore as Ze } from "../stores/save-validation.js";
|
|
37
37
|
import { useTemplateStore as et } from "../stores/template.js";
|
|
38
38
|
import { useUnsubscribeStore as tt } from "../stores/unsubscribe.js";
|
|
39
|
+
import { disposeLinkTokenPaste as ot } from "../utils/linkTokenPaste.js";
|
|
39
40
|
import { readTrackFloor as K } from "../utils/linkTrackingIds.js";
|
|
40
|
-
const
|
|
41
|
+
const $t = /* @__PURE__ */ Se({
|
|
41
42
|
__name: "Guido",
|
|
42
43
|
props: {
|
|
43
44
|
config: null,
|
|
@@ -45,7 +46,7 @@ const Vt = /* @__PURE__ */ Se({
|
|
|
45
46
|
},
|
|
46
47
|
emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
|
|
47
48
|
setup(j, { expose: J, emit: i }) {
|
|
48
|
-
const c = j, r =
|
|
49
|
+
const c = j, r = ke(), Q = a(
|
|
49
50
|
() => import("./organisms/email-preview/PreviewContainer.vue.js")
|
|
50
51
|
), X = a(
|
|
51
52
|
() => import("./organisms/onboarding/OnboardingWrapper.vue.js")
|
|
@@ -61,22 +62,22 @@ const Vt = /* @__PURE__ */ Se({
|
|
|
61
62
|
() => import("./organisms/unsubscribe/LegacyUnsubscribeConvertedModal.vue.js")
|
|
62
63
|
), ne = a(
|
|
63
64
|
() => import("./organisms/dynamic-content/AmbiguousDynamicContentModal.vue.js")
|
|
64
|
-
), y = W(), g = Qe(),
|
|
65
|
+
), y = W(), g = Qe(), k = tt(), re = q(), o = Je();
|
|
65
66
|
c.ready && o.init(c.config);
|
|
66
|
-
const d = C(), ie = Ye(), p = l(() => d.hasChanges), { isTestPartner: se } = Fe(), { isEnabled: ae, loadRollout: T } = Me(), { showToaster:
|
|
67
|
+
const d = C(), ie = Ye(), p = l(() => d.hasChanges), { isTestPartner: se } = Fe(), { isEnabled: ae, loadRollout: T } = Me(), { showToaster: w } = Re(), F = Oe(), M = () => {
|
|
67
68
|
var t;
|
|
68
69
|
if (d.isVersionHistoryOpen) {
|
|
69
|
-
console.debug("guido:save:silent:blocked", { isVersionHistoryOpen: !0 }),
|
|
70
|
+
console.debug("guido:save:silent:blocked", { isVersionHistoryOpen: !0 }), w({
|
|
70
71
|
type: Ne.Warning,
|
|
71
72
|
message: F("email-editor.save-blocked-outside-editor")
|
|
72
73
|
});
|
|
73
74
|
return;
|
|
74
75
|
}
|
|
75
76
|
return (t = D.value) == null ? void 0 : t.saveSilent();
|
|
76
|
-
},
|
|
77
|
+
}, L = (t) => {
|
|
77
78
|
d.loadingStatus = t;
|
|
78
79
|
};
|
|
79
|
-
Ce(),
|
|
80
|
+
Ce(), we();
|
|
80
81
|
const b = () => {
|
|
81
82
|
var t, e;
|
|
82
83
|
return {
|
|
@@ -87,9 +88,9 @@ const Vt = /* @__PURE__ */ Se({
|
|
|
87
88
|
savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) || G.SAVED_MODULES,
|
|
88
89
|
defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) || G.DEFAULT_MODULES
|
|
89
90
|
};
|
|
90
|
-
}, { initPlugin:
|
|
91
|
+
}, { initPlugin: I, preloadRuntime: R } = Le(r), { runExclusive: O, beginMount: U, isCurrentMount: v } = De();
|
|
91
92
|
let f = 0;
|
|
92
|
-
const { getDefaultTemplate: A } = je(), { cloneTimersOnSave: N, hasTimerBlocks:
|
|
93
|
+
const { getDefaultTemplate: A } = je(), { cloneTimersOnSave: N, hasTimerBlocks: P } = Ie(), ce = l(() => {
|
|
93
94
|
var t;
|
|
94
95
|
return !((t = o.ui) != null && t.showHeader);
|
|
95
96
|
}), de = l(() => o.isFeatureEnabled("reusableRecommendationStrategy")), me = l(() => o.externalDisplayConditions), le = l(
|
|
@@ -112,7 +113,7 @@ const Vt = /* @__PURE__ */ Se({
|
|
|
112
113
|
console.debug("guido:test-email:click"), i("test-email:click");
|
|
113
114
|
}
|
|
114
115
|
});
|
|
115
|
-
const
|
|
116
|
+
const _ = (t) => {
|
|
116
117
|
console.debug("dynamic-content:close", t), g.setSelectedDynamicContent(t), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: t }));
|
|
117
118
|
}, x = () => {
|
|
118
119
|
console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
|
|
@@ -140,7 +141,7 @@ const Vt = /* @__PURE__ */ Se({
|
|
|
140
141
|
variationId: o.variationId
|
|
141
142
|
});
|
|
142
143
|
const e = o.template, s = (e == null ? void 0 : e.html) || "", u = (e == null ? void 0 : e.css) || "", B = (e == null ? void 0 : e.preselectedDynamicContent) || [];
|
|
143
|
-
|
|
144
|
+
k.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
|
|
144
145
|
const pe = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {}, H = o.isFeatureEnabled("linkTrackingIds"), fe = {
|
|
145
146
|
partnerName: o.partnerName,
|
|
146
147
|
campaignUrls: e == null ? void 0 : e.recommendationCampaignUrls,
|
|
@@ -157,14 +158,14 @@ const Vt = /* @__PURE__ */ Se({
|
|
|
157
158
|
};
|
|
158
159
|
n.html || (n = await r.timed("default_template", () => A()), n.html = await V(n.html));
|
|
159
160
|
const ge = H ? K(n.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
|
|
160
|
-
|
|
161
|
+
P(n.html) && (n.html = await r.timed("timer_clone", () => N(n.html))), H && (d.trackIdSessionFloor = Math.max(ge, K(n.html)));
|
|
161
162
|
const be = {
|
|
162
163
|
preselectedDynamicContentList: B,
|
|
163
164
|
onReady: () => {
|
|
164
165
|
console.debug("guido:ready"), i("ready");
|
|
165
166
|
}
|
|
166
167
|
};
|
|
167
|
-
f = U(), await
|
|
168
|
+
f = U(), await I(n, b(), be, n.html !== s), g.selectedDynamicContentList = B;
|
|
168
169
|
} catch (e) {
|
|
169
170
|
console.error("Failed to initialize Stripo editor:", e), r.markFailed();
|
|
170
171
|
}
|
|
@@ -182,8 +183,8 @@ const Vt = /* @__PURE__ */ Se({
|
|
|
182
183
|
}
|
|
183
184
|
document.addEventListener("dynamic-content:open", S);
|
|
184
185
|
}), Ee(() => {
|
|
185
|
-
if (
|
|
186
|
-
xe();
|
|
186
|
+
if (_e(), Pe(), r.dispose(), m == null || m.disconnect(), document.removeEventListener("dynamic-content:open", S), v(f)) {
|
|
187
|
+
xe(), ot();
|
|
187
188
|
try {
|
|
188
189
|
const t = C();
|
|
189
190
|
t.isStripoInitialized = !1, t.isAccessibilityTestingOpen = !1, t.imagesHidden = !1, t.colorVisionDeficiency = "";
|
|
@@ -201,15 +202,15 @@ const Vt = /* @__PURE__ */ Se({
|
|
|
201
202
|
}), o.reset();
|
|
202
203
|
}), J({
|
|
203
204
|
dynamicContent: {
|
|
204
|
-
insert:
|
|
205
|
+
insert: _,
|
|
205
206
|
close: x
|
|
206
207
|
},
|
|
207
208
|
hasChanges: p,
|
|
208
209
|
saveSilent: M,
|
|
209
|
-
setLoading:
|
|
210
|
-
}), { __sfc: !0, openMetrics: r, PreviewContainer: Q, OnboardingWrapper: X, AssignStrategyDrawer: Y, RemoveStrategyModal: Z, DisplayConditionsHost: ee, autoSaveControllerRef: D, LegacyStrategyUpdatedModal: te, LegacyUnsubscribeConvertedModal: oe, AmbiguousDynamicContentModal: ne, wrapperRef: y, dynamicContentStore: g, unsubscribeStore:
|
|
210
|
+
setLoading: L
|
|
211
|
+
}), { __sfc: !0, openMetrics: r, PreviewContainer: Q, OnboardingWrapper: X, AssignStrategyDrawer: Y, RemoveStrategyModal: Z, DisplayConditionsHost: ee, autoSaveControllerRef: D, LegacyStrategyUpdatedModal: te, LegacyUnsubscribeConvertedModal: oe, AmbiguousDynamicContentModal: ne, wrapperRef: y, dynamicContentStore: g, unsubscribeStore: k, moduleDynamicContentStore: re, props: c, configStore: o, editorStore: d, previewStore: ie, hasChanges: p, isTestPartner: se, isSaveValidationEnabled: ae, loadRollout: T, showToaster: w, trans: F, saveSilent: M, setLoading: L, emit: i, buildMetadata: b, initPlugin: I, preloadRuntime: R, runExclusive: O, beginMount: U, isCurrentMount: v, mountGeneration: f, getDefaultTemplate: A, cloneTimersOnSave: N, hasTimerBlocks: P, noHeader: ce, isRrsEnabled: de, isExternalDisplayConditionsEnabled: me, isLegacyUnsubscribeConversionEnabled: le, hasAssignedStrategy: ue, insertDynamicContent: _, closeDynamicContent: x, handleDynamicContentOpen: S, ribbonObserver: m, updateRibbonOffset: h, startEditor: E, AutoSaveController: Be, AuthErrorModal: He, Toaster: Ve, FilterSelectionDrawer: We, HeaderWrapper: $e, LoadingWrapper: Ge, SaveAsTemplateDrawer: ze, UnsubscribeWrapper: qe, ValidationErrorDrawer: Ke };
|
|
211
212
|
}
|
|
212
213
|
});
|
|
213
214
|
export {
|
|
214
|
-
|
|
215
|
+
$t as default
|
|
215
216
|
};
|
|
@@ -8,8 +8,8 @@ import { socialCompilerRules as H } from "../config/compiler/socialCompilerRules
|
|
|
8
8
|
import { unsubscribeCompilerRules as b } from "../config/compiler/unsubscribeCompilerRules.js";
|
|
9
9
|
import { createHtmlCompiler as n } from "../utils/htmlCompiler.js";
|
|
10
10
|
import { computed as p } from "vue";
|
|
11
|
-
import { useConfig as
|
|
12
|
-
const
|
|
11
|
+
import { useConfig as k } from "./useConfig.js";
|
|
12
|
+
const x = /* @__PURE__ */ new Set([
|
|
13
13
|
// URL/tag encoding fixes — keep merge-tag and placeholder integrity intact.
|
|
14
14
|
"fix-url-encoding-start",
|
|
15
15
|
"fix-url-encoding-end",
|
|
@@ -31,6 +31,8 @@ const A = /* @__PURE__ */ new Set([
|
|
|
31
31
|
"add-universal-link-flags",
|
|
32
32
|
// Coupon placeholder replacement (only present when liquidSyntax is enabled).
|
|
33
33
|
"liquid-coupon-code",
|
|
34
|
+
// Liquid only: swaps the quotes inside {{ }} of href/src values, attribute-value edit only.
|
|
35
|
+
"liquid-single-quote-links",
|
|
34
36
|
// Pongo only: collapses line breaks inside {% %} tags, which pongo2 cannot parse in AMP either.
|
|
35
37
|
"pongo-single-line-tags",
|
|
36
38
|
// Editor-only attribute strip — AMP4EMAIL has no `contenteditable`, so leaving
|
|
@@ -38,29 +40,29 @@ const A = /* @__PURE__ */ new Set([
|
|
|
38
40
|
"remove-contenteditable",
|
|
39
41
|
"remove-dc-pending-marker"
|
|
40
42
|
]), M = () => {
|
|
41
|
-
const { compiler:
|
|
42
|
-
var
|
|
43
|
-
const e = ((
|
|
43
|
+
const { compiler: m, isFeatureEnabled: u, partner: a } = k(), c = p(() => {
|
|
44
|
+
var i, l;
|
|
45
|
+
const e = ((i = m.value) == null ? void 0 : i.customRules) || [];
|
|
44
46
|
return [
|
|
45
|
-
...!!((l =
|
|
47
|
+
...!!((l = m.value) != null && l.ignoreDefaultRules) ? [] : d,
|
|
46
48
|
...C,
|
|
47
49
|
...b,
|
|
48
50
|
...f,
|
|
49
51
|
...R,
|
|
50
52
|
...H,
|
|
51
|
-
...
|
|
52
|
-
...e.map((
|
|
53
|
-
...
|
|
54
|
-
priority:
|
|
53
|
+
...u("liquidSyntax") ? g : v,
|
|
54
|
+
...e.map((t, o) => ({
|
|
55
|
+
...t,
|
|
56
|
+
priority: t.priority + 1e3 + o
|
|
55
57
|
// Ensure additional rules run after default rules
|
|
56
58
|
}))
|
|
57
59
|
];
|
|
58
60
|
}), r = p(() => {
|
|
59
|
-
var
|
|
60
|
-
const e = c.value, s = n(e),
|
|
61
|
+
var t;
|
|
62
|
+
const e = c.value, s = n(e), i = n(e.filter((o) => x.has(o.id))), l = (t = a.value) == null ? void 0 : t.fallbackFont;
|
|
61
63
|
return {
|
|
62
64
|
compileHtml: (o) => s.compile(o, void 0, l),
|
|
63
|
-
compileAmpHtml: (o) =>
|
|
65
|
+
compileAmpHtml: (o) => i.compile(o, void 0, l)
|
|
64
66
|
};
|
|
65
67
|
});
|
|
66
68
|
return { compileHtml: (e) => r.value.compileHtml(e), compileAmpHtml: (e) => r.value.compileAmpHtml(e) };
|
|
@@ -2,7 +2,7 @@ import { useActionsApi as G } from "./useActionsApi.js";
|
|
|
2
2
|
import { useAmbiguousDynamicContent as $ } from "./useAmbiguousDynamicContent.js";
|
|
3
3
|
import { useBlocksConfig as X } from "./useBlocksConfig.js";
|
|
4
4
|
import { useConfig as J } from "./useConfig.js";
|
|
5
|
-
import { useCustomInterfaceAppearance as
|
|
5
|
+
import { useCustomInterfaceAppearance as B } from "./useCustomInterfaceAppearance.js";
|
|
6
6
|
import { useFullStoryBridge as K } from "./useFullStoryBridge.js";
|
|
7
7
|
import { useModuleRepair as Q } from "./useModuleRepair.js";
|
|
8
8
|
import { useStripoEventHandler as W } from "./useStripoEventHandler.js";
|
|
@@ -14,39 +14,40 @@ import { ToasterTypeOptions as te } from "../enums/toaster.js";
|
|
|
14
14
|
import { useStripoApi as oe } from "../services/stripoApi.js";
|
|
15
15
|
import re from "../static/styles/customEditorStyle.css.js";
|
|
16
16
|
import { useEditorStore as A } from "../stores/editor.js";
|
|
17
|
-
import { buildSpecialLinkGroups as ie, buildMergeTagEntries as ne, flattenDynamicContentList as
|
|
18
|
-
import {
|
|
17
|
+
import { buildSpecialLinkGroups as ie, buildMergeTagEntries as ne, flattenDynamicContentList as se } from "../utils/genericUtil.js";
|
|
18
|
+
import { listenForLinkTokenPaste as ae } from "../utils/linkTokenPaste.js";
|
|
19
|
+
import { getStripoRuntimeBaseUrl as de } from "../utils/stripoRuntime.js";
|
|
19
20
|
let d = null, P = !1;
|
|
20
|
-
const
|
|
21
|
-
const { features: p, template: u, isFeatureEnabled: c } = J(), { handleError: f, showToaster:
|
|
21
|
+
const Pe = (t) => {
|
|
22
|
+
const { features: p, template: u, isFeatureEnabled: c } = J(), { handleError: f, showToaster: L } = Z(), { getToken: R, getCustomFonts: D, getSyncModulesStatus: U } = oe(), { handleEvent: V } = W(), { handleModuleAdd: I } = Q(), { restorePending: q } = $(), { getStripoBlocksConfig: x } = X(), { getStripoNotifications: O } = Y(), g = () => d || (d = new Promise((n, s) => {
|
|
22
23
|
if (document.getElementById("UiEditorScript")) {
|
|
23
24
|
n();
|
|
24
25
|
return;
|
|
25
26
|
}
|
|
26
|
-
const i =
|
|
27
|
+
const i = de();
|
|
27
28
|
if (!i) {
|
|
28
|
-
|
|
29
|
+
s(
|
|
29
30
|
new Error("guido.stripo.version is not set in package.json. Please configure the Stripo version.")
|
|
30
31
|
);
|
|
31
32
|
return;
|
|
32
33
|
}
|
|
33
|
-
const
|
|
34
|
-
e.id = "UiEditorScript", e.type = "module", e.src =
|
|
34
|
+
const a = `${i}UIEditor.js`, e = document.createElement("script");
|
|
35
|
+
e.id = "UiEditorScript", e.type = "module", e.src = a, e.onload = () => {
|
|
35
36
|
P = !0, n();
|
|
36
37
|
}, e.onerror = () => {
|
|
37
|
-
e.remove(),
|
|
38
|
+
e.remove(), s(new Error(`Failed to load Stripo UIEditor script from S3: ${a}`));
|
|
38
39
|
}, document.body.appendChild(e);
|
|
39
40
|
}), d.catch(() => {
|
|
40
41
|
d = null;
|
|
41
|
-
}), d), H = async (n,
|
|
42
|
-
var w, b, _, v,
|
|
42
|
+
}), d), H = async (n, s, i, a = [], e = !1, m = !1) => {
|
|
43
|
+
var w, b, _, v, T;
|
|
43
44
|
const o = A(), { html: S, css: y } = n, { baseBlocks: E, extensions: M } = await x();
|
|
44
45
|
t.mark("blocks_config_ready");
|
|
45
46
|
const C = ((w = p.value) == null ? void 0 : w.displayConditions) ?? !0, N = ((b = p.value) == null ? void 0 : b.modulesDisabled) ?? !1, h = c("dynamicContentSpecialLinks") ? ie((_ = u.value) == null ? void 0 : _.dynamicContentList, c("liquidSyntax")) : [], k = m || (((v = u.value) == null ? void 0 : v.forceRecreate) ?? !1), j = "https://email-static.useinsider.com https://edge.fullstory.com https://rs.fullstory.com";
|
|
46
|
-
t.setTemplate({ html: S, css: y, forceRecreate: k }),
|
|
47
|
+
t.setTemplate({ html: S, css: y, forceRecreate: k }), B().importCss(), t.mark("init_editor"), await window.UIEditor.initEditor(
|
|
47
48
|
document.querySelector("#guido-editor"),
|
|
48
49
|
{
|
|
49
|
-
metadata:
|
|
50
|
+
metadata: s,
|
|
50
51
|
html: S,
|
|
51
52
|
css: y,
|
|
52
53
|
forceRecreate: k,
|
|
@@ -80,13 +81,13 @@ const Fe = (t) => {
|
|
|
80
81
|
editorFonts: {
|
|
81
82
|
showDefaultStandardFonts: !0,
|
|
82
83
|
showDefaultNotStandardFonts: !0,
|
|
83
|
-
customFonts:
|
|
84
|
+
customFonts: a
|
|
84
85
|
},
|
|
85
86
|
mergeTags: [
|
|
86
87
|
{
|
|
87
88
|
entries: ne(
|
|
88
89
|
i.preselectedDynamicContentList,
|
|
89
|
-
|
|
90
|
+
se((T = u.value) == null ? void 0 : T.dynamicContentList),
|
|
90
91
|
c("liquidSyntax")
|
|
91
92
|
)
|
|
92
93
|
}
|
|
@@ -94,7 +95,7 @@ const Fe = (t) => {
|
|
|
94
95
|
async onTokenRefreshRequest(r) {
|
|
95
96
|
try {
|
|
96
97
|
t.mark("token_start");
|
|
97
|
-
const l = await
|
|
98
|
+
const l = await R();
|
|
98
99
|
t.mark("token_end"), r(l);
|
|
99
100
|
} catch (l) {
|
|
100
101
|
f(l, "Failed to refresh token");
|
|
@@ -103,7 +104,7 @@ const Fe = (t) => {
|
|
|
103
104
|
onTemplateLoaded() {
|
|
104
105
|
try {
|
|
105
106
|
const { activateCustomViewStyles: r, updateTimerInClonedTemplate: l } = G(), { injectFullStory: z } = K();
|
|
106
|
-
|
|
107
|
+
B().importCss(), r(), z(), ae(), q(), l(), i.onReady(), o.isStripoInitialized = !0, o.loadingStatus = !1, setTimeout(() => {
|
|
107
108
|
o.hasChanges = !1;
|
|
108
109
|
}, 1e3), t.markReady();
|
|
109
110
|
} catch (r) {
|
|
@@ -139,17 +140,17 @@ const Fe = (t) => {
|
|
|
139
140
|
}
|
|
140
141
|
);
|
|
141
142
|
};
|
|
142
|
-
return { initPlugin: async (n,
|
|
143
|
+
return { initPlugin: async (n, s, i, a = !1) => {
|
|
143
144
|
const e = A();
|
|
144
145
|
try {
|
|
145
146
|
t.mark("plugin_start"), t.setScriptPreloaded(P), await g(), t.mark("script_ready");
|
|
146
147
|
const [m, o] = await Promise.all([
|
|
147
|
-
|
|
148
|
+
D(),
|
|
148
149
|
U()
|
|
149
150
|
]);
|
|
150
|
-
t.mark("fonts_sync_ready"), e.syncModulesEnabled = o, await H(n,
|
|
151
|
+
t.mark("fonts_sync_ready"), e.syncModulesEnabled = o, await H(n, s, i, m, o, a);
|
|
151
152
|
} catch {
|
|
152
|
-
e.loadingStatus = !1,
|
|
153
|
+
e.loadingStatus = !1, L({
|
|
153
154
|
type: te.Error,
|
|
154
155
|
message: F["An error has occurred. Please report the error code to support."],
|
|
155
156
|
actionButton: {
|
|
@@ -164,5 +165,5 @@ const Fe = (t) => {
|
|
|
164
165
|
} };
|
|
165
166
|
};
|
|
166
167
|
export {
|
|
167
|
-
|
|
168
|
+
Pe as useStripo
|
|
168
169
|
};
|
|
@@ -1,15 +1,23 @@
|
|
|
1
|
-
import { COUPON_PLACEHOLDER_LIQUID as
|
|
2
|
-
|
|
1
|
+
import { COUPON_PLACEHOLDER_LIQUID as i, COUPON_PLACEHOLDER_DEFAULT as o } from "../../extensions/Blocks/CouponBlock/template.js";
|
|
2
|
+
import { singleQuoteLiquidLinks as r } from "../../utils/liquidLinkQuotes.js";
|
|
3
|
+
const s = [
|
|
3
4
|
{
|
|
4
5
|
id: "liquid-coupon-code",
|
|
5
6
|
description: "Replace legacy coupon placeholder with liquid syntax",
|
|
6
7
|
type: "replace",
|
|
7
|
-
search:
|
|
8
|
-
replacement:
|
|
8
|
+
search: o,
|
|
9
|
+
replacement: i,
|
|
9
10
|
replaceAll: !0,
|
|
10
11
|
priority: 50
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
id: "liquid-single-quote-links",
|
|
15
|
+
description: "Replace " string literals with single quotes inside {{ }} tags of href and src values",
|
|
16
|
+
type: "custom",
|
|
17
|
+
processor: (e) => r(e),
|
|
18
|
+
priority: 60
|
|
11
19
|
}
|
|
12
20
|
];
|
|
13
21
|
export {
|
|
14
|
-
|
|
22
|
+
s as liquidCompilerRules
|
|
15
23
|
};
|
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-9d988e4b] .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}.color-vision-select__dropdown[data-v-64cb50da]{z-index:20;width:387px}.accessibility-toolbar[data-v-391019bc]{gap:16px}.accessibility-toolbar[data-v-391019bc] .in-segments-wrapper__button svg{margin-right:0}.accessibility-toolbar[data-v-391019bc] .in-segments-wrapper__button .clearfix:after{content:none}.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}.editor-actions-menu__dropdown[data-v-bdb3b37a]{z-index:20;width:222px}.editor-actions[data-v-9a028d08]{gap:16px}.editor-actions__divider[data-v-9a028d08]{width:1px;height:40px;background-color:#e1e1e1}.right-slot[data-v-77451c9a]{gap:16px}.header-wrapper[data-v-3c713746]{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-9d988e4b] .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}.color-vision-select__dropdown[data-v-64cb50da]{z-index:20;width:387px}.accessibility-toolbar[data-v-391019bc]{gap:16px}.accessibility-toolbar[data-v-391019bc] .in-segments-wrapper__button svg{margin-right:0}.accessibility-toolbar[data-v-391019bc] .in-segments-wrapper__button .clearfix:after{content:none}.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}.editor-actions-menu__dropdown[data-v-bdb3b37a]{z-index:20;width:222px}.editor-actions[data-v-9a028d08]{gap:16px}.editor-actions__divider[data-v-9a028d08]{width:1px;height:40px;background-color:#e1e1e1}.right-slot[data-v-77451c9a]{gap:16px}.header-wrapper[data-v-3c713746]{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-da8cab7f]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-da8cab7f]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-da8cab7f]{height:calc(100vh - 75px - var(--ribbon-offset))}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-eaf8e461]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-eaf8e461]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-eaf8e461]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-eaf8e461]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-eaf8e461]{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}.guido-tab-bar-onboarding[data-v-219b4f7c]{z-index:21}[data-v-fcba7e99] .vueperslides__bullets{pointer-events:none!important}[data-v-fcba7e99] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-1a34025a] .vueperslides__bullets{pointer-events:none!important}[data-v-1a34025a] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-8fc96a58] .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 .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}.guido-display-condition-create__separator[data-v-929822bc]{height:1px;margin:0 0 24px;background-image:linear-gradient(to right,currentColor 1px,transparent 1px);background-size:5px 1px}.guido-display-condition-create__methods[data-v-929822bc]{gap:16px}.guido-display-condition-select-root[data-v-0d740001] .in-drawer__footer{justify-content:flex-start}.guido-display-condition-select__delete-modal[data-v-0d740001]{position:relative;z-index:145}.guido-display-condition-select__delete-modal[data-v-0d740001] .in-modal-v2-wrapper__header-title{margin-bottom:0}.guido-display-condition-select-root[data-v-0d740001] .in-drawer__content>div{display:flex;flex-direction:column;min-height:100%}.guido-display-condition-select__list[data-v-0d740001]{display:flex;flex-direction:column;gap:24px;margin:0;padding:0;list-style:none}.guido-display-condition-card__header[data-v-0d740001]{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:15px}.guido-display-condition-card__text[data-v-0d740001]{min-width:0}.guido-display-condition-card__name[data-v-0d740001],.guido-display-condition-card__description[data-v-0d740001]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.guido-display-condition-card__actions[data-v-0d740001]{display:flex;flex-shrink:0;align-items:center;gap:16px}.guido-display-condition-card__split[data-v-0d740001]{position:relative;display:flex;gap:1px}.guido-display-condition-card__menu[data-v-0d740001]{z-index:2;min-width:115px}.guido-display-condition-card__divider[data-v-0d740001]{width:1px;height:24px}.guido-display-condition-card__code[data-v-0d740001]{margin:1px 15px 15px;padding:8px;font-family:inherit;white-space:pre-wrap;word-break:break-word}.legacy-strategy-updated-modal[data-v-da2225a1]{position:relative;z-index:145}.ambiguous-dynamic-content-modal__content[data-v-2643213c]{padding-bottom:150px}
|
package/dist/package.json.js
CHANGED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { findEditorShadowRoot as a } from "./editorShadowRoot.js";
|
|
2
|
+
const l = ".e2e-link-input .contenteditable-input", c = "https://", p = /^\{\{[^{}]+\}\}$/;
|
|
3
|
+
let e = null;
|
|
4
|
+
const d = (t) => p.test(t), u = (t) => {
|
|
5
|
+
var i;
|
|
6
|
+
const n = t instanceof Element ? t.closest(l) : null;
|
|
7
|
+
return ((i = n == null ? void 0 : n.textContent) == null ? void 0 : i.trim()) === c ? n : null;
|
|
8
|
+
}, r = (t) => {
|
|
9
|
+
var o, s;
|
|
10
|
+
const n = ((o = t.clipboardData) == null ? void 0 : o.getData("text/plain").trim()) ?? "", i = d(n) ? u(t.target) : null;
|
|
11
|
+
if (!i)
|
|
12
|
+
return;
|
|
13
|
+
(s = window.getSelection()) == null || s.selectAllChildren(i), !i.dispatchEvent(new InputEvent("beforeinput", {
|
|
14
|
+
inputType: "insertFromPaste",
|
|
15
|
+
data: n,
|
|
16
|
+
bubbles: !0,
|
|
17
|
+
cancelable: !0
|
|
18
|
+
})) && (t.preventDefault(), t.stopImmediatePropagation());
|
|
19
|
+
}, E = () => {
|
|
20
|
+
e == null || e.removeEventListener("paste", r, !0), e = null;
|
|
21
|
+
}, m = () => {
|
|
22
|
+
E(), e = a(), e == null || e.addEventListener("paste", r, !0);
|
|
23
|
+
};
|
|
24
|
+
export {
|
|
25
|
+
E as disposeLinkTokenPaste,
|
|
26
|
+
d as isBareToken,
|
|
27
|
+
m as listenForLinkTokenPaste
|
|
28
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
const o = /\s([\w:-]+)\s*=\s*(?:"[^"]*"|'[^']*')/g, E = /^(?:href|src)$/i, e = /\{\{[^{}]*\}\}/g, c = /'[^']*'|'.*?'|"(.*?)"/gs, i = /'|'|'|'|"|"/i, T = (t) => t.replace(
|
|
2
|
+
c,
|
|
3
|
+
(n, s) => s === void 0 || i.test(s) || s.startsWith("//") ? n : `'${s}'`
|
|
4
|
+
);
|
|
5
|
+
function r(t) {
|
|
6
|
+
return t.includes(""") ? t.replace(o, (n, s) => E.test(s) && n.endsWith('"') ? n.replace(e, T) : n) : t;
|
|
7
|
+
}
|
|
8
|
+
export {
|
|
9
|
+
r as singleQuoteLiquidLinks
|
|
10
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/guido",
|
|
3
|
-
"version": "3.30.0-beta.
|
|
3
|
+
"version": "3.30.0-beta.23d415d",
|
|
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",
|