@useinsider/guido 3.30.0-beta.a1f329f → 3.30.0-beta.abc28c7
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 +0 -1
- package/dist/@types/config/schemas.js +11 -13
- package/dist/components/organisms/header/EditorActions.vue.js +2 -2
- package/dist/composables/useSave.js +78 -76
- package/dist/composables/useStripo.js +20 -20
- package/dist/config/migrator/itemsBlockMigrator.js +164 -161
- package/dist/guido.css +1 -1
- package/dist/package.json.js +1 -1
- package/dist/src/@types/config/schemas.d.ts +0 -4
- package/dist/src/composables/useConfig.d.ts +0 -2
- package/dist/src/stores/config.d.ts +0 -21
- package/dist/utils/pairProductVariables.js +98 -108
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -174,7 +174,6 @@ const config: GuidoConfigInput = {
|
|
|
174
174
|
allowSaveWithErrors?: boolean, // Default: true - Allow the validation drawer's "Save and Continue" soft-save. Set false to hard-block invalid saves (transactional + unsubscribe pages).
|
|
175
175
|
reusableRecommendationStrategy?: boolean, // Default: false - Assign an RRS strategy to recommendation blocks instead of per-block algorithm/filters/shuffle/product-count settings.
|
|
176
176
|
legacyUnsubscribeConversion?: boolean, // Default: false - Convert legacy unsubscribe blocks that have no unsubscribe link into text blocks (on load and on module drop/copy) and show a warning modal.
|
|
177
|
-
readonly?: boolean, // Default: false - Opens the design with Save disabled: no save path persists (toolbar Save, "Save and Continue", autosave, saveSilent() resolves undefined), no save:start / save:complete, and edits never emit on-change, so the host shows no leave-page warning. Read at mount; to change it, remount Guido.
|
|
178
177
|
accessibilityTesting?: boolean, // Default: false - Show the Accessibility Test entry in the header kebab menu (Stripo's checker: contrast, image alternatives, colour-vision simulation) and the tab-bar onboarding tour that points at it.
|
|
179
178
|
itemsPriceFormatting?: boolean, // Default: false - Items block price formatting: thousand/decimal separator + decimal count on the block root, raw price tags in the export (formatted at send time).
|
|
180
179
|
blockUnsubscribeLinks?: boolean, // Default: false - Warn on save when the design carries an Insider unsubscribe link or code ({{ins-*-unsubscribe-link}}, <%asm_*_raw_url%>, <%unsub%>): the legacy save is rejected with a warning toaster; with the validation drawer on it is a warning row that "Save and Continue" can skip. Launch blocking is up to the host. Set true for accounts whose unsubscribes are managed outside Insider (SFMC).
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ModuleFolderDefaults as y } from "../../enums/defaults.js";
|
|
2
|
-
import { object as o, number as c, optional as e, string as t, picklist as m, pipe as
|
|
2
|
+
import { object as o, number as c, optional as e, string as t, picklist as m, pipe as r, minLength as p, custom as k, boolean as a, array as n, transform as S, unknown as i, record as g, fallback as R, literal as u, lazy as T, looseObject as C, variant as I, union as h } from "../../node_modules/valibot/dist/index.js";
|
|
3
3
|
const b = {
|
|
4
4
|
/** Promotional/marketing emails */
|
|
5
5
|
PROMOTIONAL: 1,
|
|
@@ -14,12 +14,12 @@ const b = {
|
|
|
14
14
|
UNSUBSCRIBE_PAGES: 97
|
|
15
15
|
}, A = o({
|
|
16
16
|
/** Unique identifier for the template being edited */
|
|
17
|
-
templateId:
|
|
17
|
+
templateId: r(
|
|
18
18
|
t(),
|
|
19
19
|
p(1, "templateId is required")
|
|
20
20
|
),
|
|
21
21
|
/** Unique identifier for the user editing the template */
|
|
22
|
-
userId:
|
|
22
|
+
userId: r(
|
|
23
23
|
t(),
|
|
24
24
|
p(1, "userId is required")
|
|
25
25
|
),
|
|
@@ -40,7 +40,7 @@ const b = {
|
|
|
40
40
|
family: t()
|
|
41
41
|
}), E = o({
|
|
42
42
|
/** Partner/organization name (required) */
|
|
43
|
-
name:
|
|
43
|
+
name: r(
|
|
44
44
|
t(),
|
|
45
45
|
p(1, "partner.name is required")
|
|
46
46
|
),
|
|
@@ -93,23 +93,23 @@ const b = {
|
|
|
93
93
|
/** Decimal places for price display (legacy data may use string or number) */
|
|
94
94
|
decimalCount: e(h([t(), c()])),
|
|
95
95
|
/** Pinned product IDs (empty array when filter-driven) */
|
|
96
|
-
productIds: e(n(
|
|
96
|
+
productIds: e(n(i())),
|
|
97
97
|
/** Whether the block requested live products at send time */
|
|
98
98
|
sendProductRequestFlag: e(a()),
|
|
99
99
|
/** Whether to randomize product order */
|
|
100
100
|
shuffleProducts: e(a()),
|
|
101
101
|
/** Filter rules driving product selection */
|
|
102
|
-
filters: e(n(
|
|
102
|
+
filters: e(n(i())),
|
|
103
103
|
/** Currency code (e.g. 'EUR') — sometimes absent in legacy data */
|
|
104
104
|
currency: e(t()),
|
|
105
105
|
/** Currency display settings (separators, alignment, decimals) */
|
|
106
|
-
currencySettings: e(
|
|
106
|
+
currencySettings: e(i()),
|
|
107
107
|
/** Locale (e.g. 'nl_NL') */
|
|
108
108
|
language: e(t()),
|
|
109
109
|
/** Recommendation strategy key (e.g. 'newArrivals') */
|
|
110
110
|
strategy: e(t()),
|
|
111
111
|
/** Snapshot of products as rendered by the legacy block */
|
|
112
|
-
recommendedProducts: e(n(
|
|
112
|
+
recommendedProducts: e(n(i())),
|
|
113
113
|
/** Number of product cards per row */
|
|
114
114
|
cardsInRow: e(c()),
|
|
115
115
|
/** Mobile-only padding (right) */
|
|
@@ -174,7 +174,7 @@ const b = {
|
|
|
174
174
|
* mount. Non-numbers still fail, like every other field in this schema.
|
|
175
175
|
*/
|
|
176
176
|
trackIdCounter: e(
|
|
177
|
-
|
|
177
|
+
r(
|
|
178
178
|
c(),
|
|
179
179
|
S((s) => Number.isFinite(s) ? Math.max(0, Math.floor(s)) : 0)
|
|
180
180
|
),
|
|
@@ -188,8 +188,8 @@ const b = {
|
|
|
188
188
|
* cannot be undone. Hosts send `[]` for an empty map.
|
|
189
189
|
*/
|
|
190
190
|
recommendationCampaignUrls: e(
|
|
191
|
-
|
|
192
|
-
|
|
191
|
+
r(
|
|
192
|
+
i(),
|
|
193
193
|
S((s) => s && typeof s == "object" ? { ...s } : void 0)
|
|
194
194
|
)
|
|
195
195
|
),
|
|
@@ -249,8 +249,6 @@ const b = {
|
|
|
249
249
|
reusableRecommendationStrategy: e(a(), !1),
|
|
250
250
|
/** Convert linkless legacy unsubscribe blocks into text blocks and warn with a modal (opt-in) */
|
|
251
251
|
legacyUnsubscribeConversion: e(a(), !1),
|
|
252
|
-
/** Disable every save path and the unsaved-changes signal; read at mount only. */
|
|
253
|
-
readonly: e(a(), !1),
|
|
254
252
|
/** Items block: Recommendation-style price formatting (root currency-* attrs, raw price tags). Released dark. */
|
|
255
253
|
itemsPriceFormatting: e(a(), !1),
|
|
256
254
|
/** Warn on save when the design carries an Insider unsubscribe link or code (host sets true for SFMC accounts) */
|
|
@@ -4,7 +4,7 @@ import r from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
|
4
4
|
var d = function() {
|
|
5
5
|
var o, s;
|
|
6
6
|
var i = this, e = i._self._c, t = i._self._setupProxy;
|
|
7
|
-
return e("div", { staticClass: "d-f a-i-c editor-actions" }, [!t.editorStore.isPreviewModeOpen && t.hasContentOnTheLeft ? e("div", { staticClass: "editor-actions__divider" }) : i._e(), (s = (o = t.config) == null ? void 0 : o.features) != null && s.testMessage ? e(t.InButtonV2, { attrs: { id: "guido__test-button", "left-icon": "line-architect-test-journey", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isTestButtonDisabled, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__test-button", { staticPosition: "bottom right" }), "tooltip-text": t.trans("newsletter.test-email") }, on: { click: t.handleTestEmail } }) : i._e(), e(t.EditorActionsMenu), t.editorStore.isPreviewModeOpen ? i._e() : e("div", { staticClass: "editor-actions__divider" }), t.editorStore.isPreviewModeOpen ? i._e() : e(t.InButtonV2, { staticClass: "ml-3", attrs: { id: "guido__save-button", "disabled-status":
|
|
7
|
+
return e("div", { staticClass: "d-f a-i-c editor-actions" }, [!t.editorStore.isPreviewModeOpen && t.hasContentOnTheLeft ? e("div", { staticClass: "editor-actions__divider" }) : i._e(), (s = (o = t.config) == null ? void 0 : o.features) != null && s.testMessage ? e(t.InButtonV2, { attrs: { id: "guido__test-button", "left-icon": "line-architect-test-journey", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isTestButtonDisabled, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__test-button", { staticPosition: "bottom right" }), "tooltip-text": t.trans("newsletter.test-email") }, on: { click: t.handleTestEmail } }) : i._e(), e(t.EditorActionsMenu), t.editorStore.isPreviewModeOpen ? i._e() : e("div", { staticClass: "editor-actions__divider" }), t.editorStore.isPreviewModeOpen ? i._e() : e(t.InButtonV2, { staticClass: "ml-3", attrs: { id: "guido__save-button", "disabled-status": !t.isSaving && t.editorStore.isSaveButtonDisabled, "label-text": t.saveLabel, "loading-status": t.isSaving }, on: { click: function(n) {
|
|
8
8
|
return t.handleSave(!1);
|
|
9
9
|
} } }), e(t.MigrationConfirmModal, { ref: "migrationModalRef", on: { confirm: function(n) {
|
|
10
10
|
return t.executeSave(!1);
|
|
@@ -15,7 +15,7 @@ var d = function() {
|
|
|
15
15
|
l,
|
|
16
16
|
!1,
|
|
17
17
|
null,
|
|
18
|
-
"
|
|
18
|
+
"9a028d08"
|
|
19
19
|
);
|
|
20
20
|
const p = c.exports;
|
|
21
21
|
export {
|
|
@@ -1,101 +1,101 @@
|
|
|
1
|
-
import { useActionsApi as
|
|
2
|
-
import { useConfig as
|
|
3
|
-
import { useEditorLock as
|
|
4
|
-
import { useSaveStart as
|
|
5
|
-
import { useSaveValidation as
|
|
6
|
-
import { useSaveValidationRollout as
|
|
7
|
-
import { useSyncModuleExtractor as
|
|
8
|
-
import { ToasterTypeOptions as
|
|
9
|
-
import { useStripoApi as
|
|
10
|
-
import { useConfigStore as
|
|
11
|
-
import { useDynamicContentStore as
|
|
12
|
-
import { useSaveValidationStore as
|
|
13
|
-
import { useTemplatePreparation as
|
|
14
|
-
import { useAllowlist as
|
|
15
|
-
import { useHtmlValidator as
|
|
16
|
-
import { useToaster as
|
|
17
|
-
import { useCouponBlockValidator as
|
|
18
|
-
import { useHtmlDocumentCountValidator as
|
|
19
|
-
import { useLiquidValidator as
|
|
20
|
-
import { useSyncModuleBlockValidator as
|
|
21
|
-
import { useUnsubscribeBlockValidator as
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
validateUnsubscribeBlockUniqueness:
|
|
25
|
-
validateUnsubscribeBlockHasTemplate:
|
|
26
|
-
validateNoInsiderUnsubscribeCode:
|
|
27
|
-
} =
|
|
28
|
-
if (!
|
|
1
|
+
import { useActionsApi as O } from "./useActionsApi.js";
|
|
2
|
+
import { useConfig as D } from "./useConfig.js";
|
|
3
|
+
import { useEditorLock as F } from "./useEditorLock.js";
|
|
4
|
+
import { useSaveStart as I, useSaveComplete as N } from "./useGuidoActions.js";
|
|
5
|
+
import { useSaveValidation as j } from "./useSaveValidation.js";
|
|
6
|
+
import { useSaveValidationRollout as z } from "./useSaveValidationRollout.js";
|
|
7
|
+
import { useSyncModuleExtractor as G } from "./useSyncModuleExtractor.js";
|
|
8
|
+
import { ToasterTypeOptions as J } from "../enums/toaster.js";
|
|
9
|
+
import { useStripoApi as K } from "../services/stripoApi.js";
|
|
10
|
+
import { useConfigStore as Q } from "../stores/config.js";
|
|
11
|
+
import { useDynamicContentStore as X } from "../stores/dynamic-content.js";
|
|
12
|
+
import { useSaveValidationStore as Y } from "../stores/save-validation.js";
|
|
13
|
+
import { useTemplatePreparation as Z, getHtmlReferencedUnsubscribePages as _ } from "../utils/templatePreparation.js";
|
|
14
|
+
import { useAllowlist as $ } from "./useAllowlist.js";
|
|
15
|
+
import { useHtmlValidator as tt } from "./useHtmlValidator.js";
|
|
16
|
+
import { useToaster as et } from "./useToaster.js";
|
|
17
|
+
import { useCouponBlockValidator as ot } from "./validators/useCouponBlockValidator.js";
|
|
18
|
+
import { useHtmlDocumentCountValidator as it } from "./validators/useHtmlDocumentCountValidator.js";
|
|
19
|
+
import { useLiquidValidator as rt } from "./validators/useLiquidValidator.js";
|
|
20
|
+
import { useSyncModuleBlockValidator as st } from "./validators/useSyncModuleBlockValidator.js";
|
|
21
|
+
import { useUnsubscribeBlockValidator as at } from "./validators/useUnsubscribeBlockValidator.js";
|
|
22
|
+
const Pt = () => {
|
|
23
|
+
const n = I(), S = N(), { validateHtml: y } = tt(), { validateLiquidSyntax: b } = rt(), { validateCouponBlockTags: H } = ot(), {
|
|
24
|
+
validateUnsubscribeBlockUniqueness: E,
|
|
25
|
+
validateUnsubscribeBlockHasTemplate: g,
|
|
26
|
+
validateNoInsiderUnsubscribeCode: V
|
|
27
|
+
} = at(), { validateSyncModuleBlocks: l } = st(), { validateSingleHtmlDocument: c } = it(), { callbacks: a, isFeatureEnabled: u } = D(), { extractSyncModuleData: x } = G(), { setSyncModuleUnsubscriptionPages: k } = K(), { editorSave: C, getTemplateData: m } = O(), { showToaster: h } = et(), { getBlockedDomains: B, resolveToast: T } = $(), { prepareTemplateDetails: p } = Z(), { collectSaveValidationErrors: L } = j(), { isEnabled: P } = z(), U = Y(), A = X(), w = Q(), { runExclusive: d } = F(), f = async (t, e, i) => {
|
|
28
|
+
if (!u("allowlistEnabled"))
|
|
29
29
|
return !1;
|
|
30
|
-
const o = await
|
|
30
|
+
const o = await B(t, e);
|
|
31
31
|
if (!o.length)
|
|
32
32
|
return !1;
|
|
33
33
|
if (!i) {
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
type:
|
|
37
|
-
message:
|
|
38
|
-
actionButton:
|
|
34
|
+
const r = await T(o);
|
|
35
|
+
r != null && r.message && h({
|
|
36
|
+
type: J.Warning,
|
|
37
|
+
message: r.message,
|
|
38
|
+
actionButton: r.actionButton
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
41
|
return !0;
|
|
42
|
-
},
|
|
43
|
-
if (!await
|
|
42
|
+
}, M = async (t, e) => !H(t.compiledHtml) || u("blockUnsubscribeLinks") && !V(t.rawHtml, e) || !E(t.compiledHtml) || !g(t.compiledHtml) ? !1 : u("liquidSyntax") ? b(t.compiledHtml) : y(t.compiledHtml, t.dynamicContentList, !0), v = async (t, e) => {
|
|
43
|
+
if (!await C())
|
|
44
44
|
return;
|
|
45
|
-
const { unsubscribePayload: o, stripoModules:
|
|
46
|
-
if (await
|
|
47
|
-
const
|
|
48
|
-
S({ ...
|
|
45
|
+
const { unsubscribePayload: o, stripoModules: r } = x(t.rawHtml);
|
|
46
|
+
if (await k(o), t.modules = r, !e.suppress) {
|
|
47
|
+
const s = e.blankCompiled ? { compiledHtml: "", ampHtml: "" } : {};
|
|
48
|
+
S({ ...t, ...s, silent: e.silent });
|
|
49
49
|
}
|
|
50
|
-
return
|
|
51
|
-
}, W = async (
|
|
52
|
-
var
|
|
53
|
-
|
|
54
|
-
const i = await
|
|
55
|
-
if (!
|
|
50
|
+
return t;
|
|
51
|
+
}, W = async (t, e) => {
|
|
52
|
+
var r;
|
|
53
|
+
n();
|
|
54
|
+
const i = await m();
|
|
55
|
+
if (!c(i.html, e))
|
|
56
56
|
return;
|
|
57
|
-
const o = await
|
|
58
|
-
if (
|
|
59
|
-
if (
|
|
60
|
-
const
|
|
57
|
+
const o = await p(i);
|
|
58
|
+
if (l(o.rawHtml, e)) {
|
|
59
|
+
if (P.value && !e) {
|
|
60
|
+
const s = await L(
|
|
61
61
|
o.compiledHtml,
|
|
62
62
|
o.dynamicContentList,
|
|
63
63
|
o.rawHtml
|
|
64
64
|
);
|
|
65
|
-
if (!
|
|
65
|
+
if (!s)
|
|
66
66
|
return;
|
|
67
|
-
if (
|
|
68
|
-
|
|
67
|
+
if (s.length) {
|
|
68
|
+
U.open(s, "save");
|
|
69
69
|
return;
|
|
70
70
|
}
|
|
71
|
-
} else if (!await
|
|
71
|
+
} else if (!await M(o, e))
|
|
72
72
|
return;
|
|
73
|
-
if (!((
|
|
74
|
-
return v(o, { silent:
|
|
73
|
+
if (!((r = a.value) != null && r.externalValidation && !await a.value.externalValidation(o)) && !await f(o.compiledHtml, o.css, e))
|
|
74
|
+
return v(o, { silent: e, suppress: t });
|
|
75
75
|
}
|
|
76
|
-
},
|
|
76
|
+
}, R = async () => {
|
|
77
77
|
var i;
|
|
78
|
-
if (!
|
|
78
|
+
if (!w.allowSaveWithErrors)
|
|
79
79
|
return;
|
|
80
|
-
|
|
81
|
-
const
|
|
82
|
-
if (!
|
|
80
|
+
n();
|
|
81
|
+
const t = await m();
|
|
82
|
+
if (!c(t.html, !1))
|
|
83
83
|
return;
|
|
84
|
-
const
|
|
85
|
-
if (
|
|
86
|
-
return v(
|
|
87
|
-
},
|
|
88
|
-
if (!
|
|
84
|
+
const e = await p(t);
|
|
85
|
+
if (l(e.rawHtml, !1) && !((i = a.value) != null && i.externalValidation && !await a.value.externalValidation(e)) && !await f(e.compiledHtml, e.css, !1))
|
|
86
|
+
return v(e, { silent: !1, blankCompiled: !0 });
|
|
87
|
+
}, q = async () => {
|
|
88
|
+
if (!w.allowSaveWithErrors)
|
|
89
89
|
return;
|
|
90
|
-
|
|
91
|
-
const { html:
|
|
92
|
-
if (!
|
|
90
|
+
n();
|
|
91
|
+
const { html: t, css: e } = await m();
|
|
92
|
+
if (!c(t, !0) || !l(t, !0) || await f(t, e, !0))
|
|
93
93
|
return;
|
|
94
|
-
const i =
|
|
95
|
-
dynamicContentList:
|
|
94
|
+
const i = _(t), o = {
|
|
95
|
+
dynamicContentList: A.getSelectedDynamicContentList,
|
|
96
96
|
compiledHtml: "",
|
|
97
|
-
rawHtml:
|
|
98
|
-
css:
|
|
97
|
+
rawHtml: t,
|
|
98
|
+
css: e,
|
|
99
99
|
ampHtml: "",
|
|
100
100
|
ampErrors: [],
|
|
101
101
|
modules: [],
|
|
@@ -107,9 +107,11 @@ const Ue = () => {
|
|
|
107
107
|
}
|
|
108
108
|
};
|
|
109
109
|
return v(o, { silent: !0 });
|
|
110
|
-
}
|
|
111
|
-
return { save: (
|
|
110
|
+
};
|
|
111
|
+
return { save: (t = !1, e = !1) => d(
|
|
112
|
+
() => W(t, e)
|
|
113
|
+
), saveWithErrors: () => d(R), saveRawOnly: () => d(q) };
|
|
112
114
|
};
|
|
113
115
|
export {
|
|
114
|
-
|
|
116
|
+
Pt as useSave
|
|
115
117
|
};
|
|
@@ -18,37 +18,37 @@ import { buildMergeTagEntries as oe, flattenDynamicContentList as re } from "../
|
|
|
18
18
|
import { getStripoRuntimeBaseUrl as ie } from "../utils/stripoRuntime.js";
|
|
19
19
|
let d = null, F = !1;
|
|
20
20
|
const ve = (t) => {
|
|
21
|
-
const { features:
|
|
21
|
+
const { features: u, template: m, isFeatureEnabled: p } = G(), { handleError: f, showToaster: A } = W(), { getToken: P, getCustomFonts: R, getSyncModulesStatus: D } = ee(), { handleEvent: U } = K(), { handleModuleAdd: V } = J(), { restorePending: I } = z(), { getStripoBlocksConfig: L } = $(), { getStripoNotifications: q } = Q(), g = () => d || (d = new Promise((n, s) => {
|
|
22
22
|
if (document.getElementById("UiEditorScript")) {
|
|
23
23
|
n();
|
|
24
24
|
return;
|
|
25
25
|
}
|
|
26
26
|
const i = ie();
|
|
27
27
|
if (!i) {
|
|
28
|
-
|
|
28
|
+
s(
|
|
29
29
|
new Error("guido.stripo.version is not set in package.json. Please configure the Stripo version.")
|
|
30
30
|
);
|
|
31
31
|
return;
|
|
32
32
|
}
|
|
33
|
-
const
|
|
34
|
-
e.id = "UiEditorScript", e.type = "module", e.src =
|
|
33
|
+
const a = `${i}UIEditor.js`, e = document.createElement("script");
|
|
34
|
+
e.id = "UiEditorScript", e.type = "module", e.src = a, e.onload = () => {
|
|
35
35
|
F = !0, n();
|
|
36
36
|
}, e.onerror = () => {
|
|
37
|
-
e.remove(),
|
|
37
|
+
e.remove(), s(new Error(`Failed to load Stripo UIEditor script from S3: ${a}`));
|
|
38
38
|
}, document.body.appendChild(e);
|
|
39
39
|
}), d.catch(() => {
|
|
40
40
|
d = null;
|
|
41
|
-
}), d), x = async (n,
|
|
41
|
+
}), d), x = async (n, s, i, a = [], e = !1, c = !1) => {
|
|
42
42
|
var w, k, b, _;
|
|
43
|
-
const o = T(), { html:
|
|
43
|
+
const o = T(), { html: S, css: y } = n, { baseBlocks: E, extensions: O } = await L();
|
|
44
44
|
t.mark("blocks_config_ready");
|
|
45
|
-
const h = ((w =
|
|
46
|
-
t.setTemplate({ html:
|
|
45
|
+
const h = ((w = u.value) == null ? void 0 : w.displayConditions) ?? !0, H = ((k = u.value) == null ? void 0 : k.modulesDisabled) ?? !1, C = c || (((b = m.value) == null ? void 0 : b.forceRecreate) ?? !1), M = "https://email-static.useinsider.com https://edge.fullstory.com https://rs.fullstory.com";
|
|
46
|
+
t.setTemplate({ html: S, css: y, forceRecreate: C }), v().importCss(), t.mark("init_editor"), await window.UIEditor.initEditor(
|
|
47
47
|
document.querySelector("#guido-editor"),
|
|
48
48
|
{
|
|
49
|
-
metadata:
|
|
50
|
-
html:
|
|
51
|
-
css:
|
|
49
|
+
metadata: s,
|
|
50
|
+
html: S,
|
|
51
|
+
css: y,
|
|
52
52
|
forceRecreate: C,
|
|
53
53
|
locale: "en",
|
|
54
54
|
undoButtonSelector: "#guido__undo-button",
|
|
@@ -56,7 +56,7 @@ const ve = (t) => {
|
|
|
56
56
|
mobileViewButtonSelector: ".guido__view-option-selection-mobile",
|
|
57
57
|
desktopViewButtonSelector: ".guido__view-option-selection-desktop",
|
|
58
58
|
codeEditorButtonSelector: "#guido__code-button",
|
|
59
|
-
customAppearanceMergetags: !
|
|
59
|
+
customAppearanceMergetags: !p("liquidSyntax"),
|
|
60
60
|
customAppearanceMergetagsBorderColor: "#f1f3fe",
|
|
61
61
|
customAppearanceMergetagsBackgroundColor: "#f1f3fe",
|
|
62
62
|
customViewStyles: te,
|
|
@@ -79,14 +79,14 @@ const ve = (t) => {
|
|
|
79
79
|
editorFonts: {
|
|
80
80
|
showDefaultStandardFonts: !0,
|
|
81
81
|
showDefaultNotStandardFonts: !0,
|
|
82
|
-
customFonts:
|
|
82
|
+
customFonts: a
|
|
83
83
|
},
|
|
84
84
|
mergeTags: [
|
|
85
85
|
{
|
|
86
86
|
entries: oe(
|
|
87
87
|
i.preselectedDynamicContentList,
|
|
88
|
-
re((_ =
|
|
89
|
-
|
|
88
|
+
re((_ = m.value) == null ? void 0 : _.dynamicContentList),
|
|
89
|
+
p("liquidSyntax")
|
|
90
90
|
)
|
|
91
91
|
}
|
|
92
92
|
],
|
|
@@ -119,7 +119,7 @@ const ve = (t) => {
|
|
|
119
119
|
o.isVersionHistoryOpen = r;
|
|
120
120
|
},
|
|
121
121
|
onDataChanged() {
|
|
122
|
-
|
|
122
|
+
o.hasChanges = !0, o.changeSeq += 1;
|
|
123
123
|
},
|
|
124
124
|
onEvent: U,
|
|
125
125
|
onModuleAdd: V,
|
|
@@ -138,15 +138,15 @@ const ve = (t) => {
|
|
|
138
138
|
}
|
|
139
139
|
);
|
|
140
140
|
};
|
|
141
|
-
return { initPlugin: async (n,
|
|
141
|
+
return { initPlugin: async (n, s, i, a = !1) => {
|
|
142
142
|
const e = T();
|
|
143
143
|
try {
|
|
144
144
|
t.mark("plugin_start"), t.setScriptPreloaded(F), await g(), t.mark("script_ready");
|
|
145
|
-
const [
|
|
145
|
+
const [c, o] = await Promise.all([
|
|
146
146
|
R(),
|
|
147
147
|
D()
|
|
148
148
|
]);
|
|
149
|
-
t.mark("fonts_sync_ready"), e.syncModulesEnabled = o, await x(n,
|
|
149
|
+
t.mark("fonts_sync_ready"), e.syncModulesEnabled = o, await x(n, s, i, c, o, a);
|
|
150
150
|
} catch {
|
|
151
151
|
e.loadingStatus = !1, A({
|
|
152
152
|
type: Z.Error,
|