@useinsider/guido 2.0.0-beta.dd0d492 → 2.0.0-beta.e66a90a
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 +2 -0
- package/dist/@types/config/schemas.js +55 -39
- package/dist/components/Guido.vue.js +1 -1
- package/dist/components/Guido.vue2.js +15 -17
- package/dist/components/organisms/email-preview/amp/AmpToggle.vue.js +2 -2
- package/dist/components/organisms/header/RightSlot.vue2.js +10 -10
- package/dist/composables/useConfig.js +29 -27
- package/dist/composables/useSave.js +13 -11
- package/dist/composables/useStripo.js +40 -40
- package/dist/config/migrator/recommendationMigrator.js +2 -2
- package/dist/extensions/Blocks/CouponBlock/constants.js +4 -0
- package/dist/extensions/Blocks/CouponBlock/controls/index.js +29 -0
- package/dist/extensions/Blocks/CouponBlock/extension.js +5 -4
- package/dist/extensions/Blocks/CouponBlock/settingsPanel.js +20 -14
- package/dist/extensions/Blocks/CouponBlock/template.js +22 -11
- package/dist/extensions/Blocks/Items/controls/cardComposition.js +13 -4
- package/dist/extensions/Blocks/Recommendation/block.js +1 -1
- package/dist/extensions/Blocks/Recommendation/constants/blockIds.js +4 -0
- package/dist/extensions/Blocks/Recommendation/constants/controlIds.js +4 -0
- package/dist/extensions/Blocks/Recommendation/constants/selectors.js +11 -0
- package/dist/extensions/Blocks/Recommendation/controls/button/index.js +64 -0
- package/dist/extensions/Blocks/Recommendation/controls/cardBackground/index.js +100 -0
- package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +243 -0
- package/dist/extensions/Blocks/Recommendation/controls/image/index.js +19 -0
- package/dist/extensions/Blocks/Recommendation/controls/layout/index.js +104 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/algorithm.js +86 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/currency.js +134 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/filters.js +54 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +106 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/locale.js +64 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/productLayout.js +123 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/shuffle.js +60 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +112 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/index.js +46 -0
- package/dist/extensions/Blocks/Recommendation/controls/name/textTrim.js +76 -0
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/index.js +44 -0
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/index.js +48 -0
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/textAfter.js +73 -0
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/textBefore.js +73 -0
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/index.js +48 -0
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/textAfter.js +73 -0
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/textBefore.js +73 -0
- package/dist/extensions/Blocks/Recommendation/controls/price/index.js +44 -0
- package/dist/extensions/Blocks/Recommendation/controls/spacing/index.js +224 -0
- package/dist/extensions/Blocks/Recommendation/extension.js +40 -43
- package/dist/extensions/Blocks/Recommendation/recommendation.css.js +5 -0
- package/dist/extensions/Blocks/Recommendation/settingsPanel.js +128 -72
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +20 -20
- package/dist/extensions/Blocks/Recommendation/templates/horizontal/elementRenderer.js +157 -0
- package/dist/extensions/Blocks/Recommendation/templates/horizontal/template.js +72 -0
- package/dist/extensions/Blocks/Recommendation/templates/index.js +12 -0
- package/dist/extensions/Blocks/Recommendation/templates/utils.js +173 -0
- package/dist/extensions/Blocks/Recommendation/templates/vertical/elementRenderer.js +186 -0
- package/dist/extensions/Blocks/Recommendation/templates/vertical/migration.js +251 -0
- package/dist/extensions/Blocks/Recommendation/templates/vertical/template.js +61 -0
- package/dist/extensions/Blocks/Recommendation/utils/preserveTextStyles.js +25 -0
- package/dist/extensions/Blocks/Unsubscribe/extension.js +9 -9
- package/dist/extensions/Blocks/common-control.js +6 -7
- package/dist/extensions/Blocks/controlFactories.js +162 -117
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +366 -291
- package/dist/package.json.js +1 -1
- package/dist/services/stripoApi.js +6 -10
- package/dist/src/@types/config/index.d.ts +2 -2
- package/dist/src/@types/config/schemas.d.ts +30 -0
- package/dist/src/@types/config/types.d.ts +7 -1
- package/dist/src/composables/useConfig.d.ts +8 -0
- package/dist/src/extensions/Blocks/CouponBlock/constants.d.ts +14 -0
- package/dist/src/extensions/Blocks/CouponBlock/controls/index.d.ts +108 -0
- package/dist/src/extensions/Blocks/CouponBlock/template.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/constants/blockIds.d.ts +13 -0
- package/dist/src/extensions/Blocks/Recommendation/{constants.d.ts → constants/controlIds.d.ts} +19 -11
- package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +11 -0
- package/dist/src/extensions/Blocks/Recommendation/constants/selectors.d.ts +19 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/index.d.ts +143 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/cardBackground/index.d.ts +41 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/cardComposition/index.d.ts +95 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/image/index.d.ts +35 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/index.d.ts +24 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/layout/index.d.ts +34 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/algorithm.d.ts +17 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/currency.d.ts +16 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/filters.d.ts +22 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +54 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/locale.d.ts +15 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/productLayout.d.ts +40 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/shuffle.d.ts +15 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +81 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/index.d.ts +97 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/textTrim.d.ts +16 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/index.d.ts +95 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscount/index.d.ts +100 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscount/textAfter.d.ts +15 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscount/textBefore.d.ts +15 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPrice/index.d.ts +100 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPrice/textAfter.d.ts +15 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPrice/textBefore.d.ts +15 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/index.d.ts +95 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/spacing/index.d.ts +77 -0
- package/dist/src/extensions/Blocks/Recommendation/extension.d.ts +9 -0
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +16 -16
- package/dist/src/extensions/Blocks/Recommendation/templates/horizontal/elementRenderer.d.ts +8 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/horizontal/migration.d.ts +25 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/horizontal/template.d.ts +18 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/index.d.ts +39 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/utils.d.ts +45 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/vertical/elementRenderer.d.ts +7 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/{migrationTemplate.d.ts → vertical/migration.d.ts} +11 -4
- package/dist/src/extensions/Blocks/Recommendation/templates/vertical/template.d.ts +33 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/preserveTextStyles.d.ts +19 -0
- package/dist/src/extensions/Blocks/common-control.d.ts +1 -1
- package/dist/src/extensions/Blocks/controlFactories.d.ts +30 -7
- package/dist/src/stores/config.d.ts +164 -1
- package/dist/static/styles/components/button.css.js +1 -1
- package/dist/static/styles/components/wide-panel.css.js +0 -4
- package/dist/static/styles/customEditorStyle.css.js +38 -2
- package/dist/stores/config.js +7 -0
- package/package.json +3 -3
- package/dist/extensions/Blocks/Recommendation/cardCompositionControl.js +0 -103
- package/dist/extensions/Blocks/Recommendation/constants.js +0 -5
- package/dist/extensions/Blocks/Recommendation/control.js +0 -306
- package/dist/extensions/Blocks/Recommendation/controls/button/align.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/border.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/borderRadius.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/color.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/fitToContent.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/fontFamily.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/margins.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/paddings.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/text.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/textSize.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/textStyleAndFontColor.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/image/margins.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/image/size.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/name/align.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/name/background.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/name/color.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/name/fontFamily.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/name/paddings.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/name/size.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/name/style.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/align.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/background.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/color.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/fontFamily.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/paddings.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/size.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/style.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/price/align.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/price/background.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/price/color.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/price/fontFamily.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/price/paddings.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/price/size.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/price/style.js +0 -13
- package/dist/extensions/Blocks/Recommendation/templates/blockTemplate.js +0 -160
- package/dist/extensions/Blocks/Recommendation/templates/migrationTemplate.js +0 -152
- package/dist/extensions/Blocks/Recommendation/templates/templateUtils.js +0 -180
- package/dist/src/extensions/Blocks/Recommendation/cardCompositionControl.d.ts +0 -28
- package/dist/src/extensions/Blocks/Recommendation/control.d.ts +0 -35
- package/dist/src/extensions/Blocks/Recommendation/controls/button/align.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/border.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/borderRadius.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/color.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/fitToContent.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/fontFamily.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/margins.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/paddings.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/text.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/textSize.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/textStyleAndFontColor.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/image/margins.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/image/size.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/name/align.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/name/background.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/name/color.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/name/fontFamily.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/name/paddings.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/name/size.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/name/style.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/align.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/background.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/color.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/fontFamily.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/paddings.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/size.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/style.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/price/align.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/price/background.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/price/color.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/price/fontFamily.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/price/paddings.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/price/size.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/price/style.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/templates/blockTemplate.d.ts +0 -16
- package/dist/src/extensions/Blocks/Recommendation/templates/templateUtils.d.ts +0 -44
package/README.md
CHANGED
|
@@ -110,6 +110,7 @@ const config: GuidoConfigInput = {
|
|
|
110
110
|
css?: string,
|
|
111
111
|
preselectedDynamicContent?: DynamicContent[],
|
|
112
112
|
selectedUnsubscribePages?: number[],
|
|
113
|
+
forceRecreate?: boolean, // Default: false - Force recreate template in Stripo storage
|
|
113
114
|
},
|
|
114
115
|
|
|
115
116
|
// Optional: Editor settings
|
|
@@ -137,6 +138,7 @@ const config: GuidoConfigInput = {
|
|
|
137
138
|
testMessage?: boolean, // Default: true
|
|
138
139
|
displayConditions?: boolean, // Default: true
|
|
139
140
|
unsubscribe?: boolean, // Default: true
|
|
141
|
+
modulesDisabled?: boolean, // Default: false - Disable modules panel
|
|
140
142
|
},
|
|
141
143
|
|
|
142
144
|
// Optional: Block configuration
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { object as o, number as
|
|
2
|
-
const
|
|
1
|
+
import { object as o, number as b, optional as e, string as t, pipe as u, picklist as n, custom as d, boolean as c, array as a, minLength as p, literal as r, variant as S } from "../../node_modules/valibot/dist/index.js";
|
|
2
|
+
const m = {
|
|
3
3
|
/** Promotional/marketing emails */
|
|
4
4
|
PROMOTIONAL: 1,
|
|
5
5
|
/** Transactional/system emails */
|
|
@@ -13,22 +13,22 @@ const i = {
|
|
|
13
13
|
UNSUBSCRIBE_PAGES: 97
|
|
14
14
|
}, h = o({
|
|
15
15
|
/** Unique identifier for the template being edited */
|
|
16
|
-
templateId:
|
|
16
|
+
templateId: u(
|
|
17
17
|
t(),
|
|
18
|
-
|
|
18
|
+
p(1, "templateId is required")
|
|
19
19
|
),
|
|
20
20
|
/** Unique identifier for the user editing the template */
|
|
21
|
-
userId:
|
|
21
|
+
userId: u(
|
|
22
22
|
t(),
|
|
23
|
-
|
|
23
|
+
p(1, "userId is required")
|
|
24
24
|
),
|
|
25
25
|
/** Optional variation ID for A/B testing */
|
|
26
26
|
variationId: e(t())
|
|
27
27
|
}), k = o({
|
|
28
28
|
/** Partner/organization name (required) */
|
|
29
|
-
name:
|
|
29
|
+
name: u(
|
|
30
30
|
t(),
|
|
31
|
-
|
|
31
|
+
p(1, "partner.name is required")
|
|
32
32
|
),
|
|
33
33
|
/** Product type identifier */
|
|
34
34
|
productType: e(
|
|
@@ -41,8 +41,8 @@ const i = {
|
|
|
41
41
|
),
|
|
42
42
|
/** Message type (promotional or transactional) */
|
|
43
43
|
messageType: e(
|
|
44
|
-
n([
|
|
45
|
-
|
|
44
|
+
n([m.PROMOTIONAL, m.TRANSACTIONAL]),
|
|
45
|
+
m.PROMOTIONAL
|
|
46
46
|
),
|
|
47
47
|
/** Display name for the current user */
|
|
48
48
|
username: e(t(), "Guido User")
|
|
@@ -71,27 +71,29 @@ const i = {
|
|
|
71
71
|
[]
|
|
72
72
|
),
|
|
73
73
|
/** Selected unsubscribe page IDs */
|
|
74
|
-
selectedUnsubscribePages: e(a(
|
|
75
|
-
|
|
74
|
+
selectedUnsubscribePages: e(a(b()), []),
|
|
75
|
+
/** Force recreate template in Stripo storage (use true when updating externally modified templates) */
|
|
76
|
+
forceRecreate: e(c(), !1)
|
|
77
|
+
}), f = o({
|
|
76
78
|
/** Sender display name */
|
|
77
79
|
senderName: e(t(), ""),
|
|
78
80
|
/** Email subject line */
|
|
79
81
|
subject: e(t(), "")
|
|
80
|
-
}),
|
|
82
|
+
}), C = o({
|
|
81
83
|
/** Locale for the editor UI */
|
|
82
84
|
locale: e(t(), "en"),
|
|
83
85
|
/** Path to translations object */
|
|
84
86
|
translationsPath: e(t(), "window.trans.en"),
|
|
85
87
|
/** Migration date for template compatibility */
|
|
86
|
-
migrationDate: e(
|
|
88
|
+
migrationDate: e(b(), 1759696858),
|
|
87
89
|
/** Email header settings */
|
|
88
|
-
emailHeader: e(
|
|
89
|
-
}),
|
|
90
|
+
emailHeader: e(f, { senderName: "", subject: "" })
|
|
91
|
+
}), I = o({
|
|
90
92
|
/** Whether to show the header bar */
|
|
91
93
|
showHeader: e(c(), !0),
|
|
92
94
|
/** Custom label for back button (if shown) */
|
|
93
95
|
backButtonLabel: e(t())
|
|
94
|
-
}),
|
|
96
|
+
}), T = o({
|
|
95
97
|
/** Enable dynamic content insertion */
|
|
96
98
|
dynamicContent: e(c(), !0),
|
|
97
99
|
/** Enable save as template functionality */
|
|
@@ -106,7 +108,7 @@ const i = {
|
|
|
106
108
|
unsubscribe: e(c(), !0),
|
|
107
109
|
/** Disable modules panel in the editor */
|
|
108
110
|
modulesDisabled: e(c(), !1)
|
|
109
|
-
}),
|
|
111
|
+
}), A = n([
|
|
110
112
|
"amp-accordion",
|
|
111
113
|
"amp-carousel",
|
|
112
114
|
"amp-form-controls",
|
|
@@ -131,7 +133,7 @@ const i = {
|
|
|
131
133
|
]), E = o({
|
|
132
134
|
/** Default blocks to exclude from the editor */
|
|
133
135
|
excludeDefaults: e(
|
|
134
|
-
a(
|
|
136
|
+
a(A),
|
|
135
137
|
[]
|
|
136
138
|
),
|
|
137
139
|
/** Custom blocks to include in the editor */
|
|
@@ -145,7 +147,7 @@ const i = {
|
|
|
145
147
|
/** Human-readable description */
|
|
146
148
|
description: e(t()),
|
|
147
149
|
/** Priority for rule ordering (lower = earlier) */
|
|
148
|
-
priority:
|
|
150
|
+
priority: b()
|
|
149
151
|
}), N = o({
|
|
150
152
|
...l.entries,
|
|
151
153
|
type: r("replace"),
|
|
@@ -173,21 +175,32 @@ const i = {
|
|
|
173
175
|
...l.entries,
|
|
174
176
|
type: r("custom"),
|
|
175
177
|
/** Custom processor function */
|
|
176
|
-
processor:
|
|
177
|
-
(
|
|
178
|
+
processor: d(
|
|
179
|
+
(i) => typeof i == "function",
|
|
178
180
|
"processor must be a function"
|
|
179
181
|
)
|
|
180
|
-
}),
|
|
182
|
+
}), x = S("type", [
|
|
181
183
|
N,
|
|
182
184
|
O,
|
|
183
185
|
L,
|
|
184
186
|
v
|
|
185
|
-
]),
|
|
187
|
+
]), B = o({
|
|
186
188
|
/** Custom compiler rules to apply */
|
|
187
|
-
customRules: e(a(
|
|
189
|
+
customRules: e(a(x), []),
|
|
188
190
|
/** Skip default compiler rules */
|
|
189
191
|
ignoreDefaultRules: e(c(), !1)
|
|
190
|
-
}),
|
|
192
|
+
}), P = o({
|
|
193
|
+
/**
|
|
194
|
+
* External validation handler called before save completes.
|
|
195
|
+
* Return false to cancel the save operation.
|
|
196
|
+
*/
|
|
197
|
+
externalValidation: e(
|
|
198
|
+
d(
|
|
199
|
+
(i) => typeof i == "function",
|
|
200
|
+
"externalValidation must be a function"
|
|
201
|
+
)
|
|
202
|
+
)
|
|
203
|
+
}), D = o({
|
|
191
204
|
// Required sections
|
|
192
205
|
/** Identity configuration (required) */
|
|
193
206
|
identity: h,
|
|
@@ -197,35 +210,38 @@ const i = {
|
|
|
197
210
|
/** Template content and presets */
|
|
198
211
|
template: e(R, {}),
|
|
199
212
|
/** Editor settings */
|
|
200
|
-
editor: e(
|
|
213
|
+
editor: e(C, {}),
|
|
201
214
|
/** UI configuration */
|
|
202
|
-
ui: e(
|
|
215
|
+
ui: e(I, {}),
|
|
203
216
|
/** Feature toggles */
|
|
204
|
-
features: e(
|
|
217
|
+
features: e(T, {}),
|
|
205
218
|
/** Block configuration */
|
|
206
219
|
blocks: e(E, {}),
|
|
207
220
|
/** Compiler configuration */
|
|
208
|
-
compiler: e(
|
|
221
|
+
compiler: e(B, {}),
|
|
222
|
+
/** Callbacks and event handlers */
|
|
223
|
+
callbacks: e(P, {})
|
|
209
224
|
});
|
|
210
225
|
export {
|
|
211
226
|
E as BlocksSchema,
|
|
212
|
-
|
|
213
|
-
|
|
227
|
+
P as CallbacksSchema,
|
|
228
|
+
x as CompilerRuleSchema,
|
|
229
|
+
B as CompilerSchema,
|
|
214
230
|
g as CustomBlockTypeSchema,
|
|
215
231
|
v as CustomRuleSchema,
|
|
216
|
-
|
|
232
|
+
A as DefaultBlockTypeSchema,
|
|
217
233
|
y as DynamicContentSchema,
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
234
|
+
C as EditorSchema,
|
|
235
|
+
f as EmailHeaderSchema,
|
|
236
|
+
T as FeaturesSchema,
|
|
237
|
+
D as GuidoConfigSchema,
|
|
222
238
|
h as IdentitySchema,
|
|
223
|
-
|
|
239
|
+
m as MessageType,
|
|
224
240
|
k as PartnerSchema,
|
|
225
241
|
s as ProductType,
|
|
226
242
|
O as RegexRuleSchema,
|
|
227
243
|
L as RemoveRuleSchema,
|
|
228
244
|
N as ReplaceRuleSchema,
|
|
229
245
|
R as TemplateSchema,
|
|
230
|
-
|
|
246
|
+
I as UISchema
|
|
231
247
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as B, defineAsyncComponent as P, ref as N, computed as U, watch as R, onMounted as z, onUnmounted as K } from "vue";
|
|
2
2
|
import { provideGuidoActions as M } from "../composables/useGuidoActions.js";
|
|
3
3
|
import { usePartner as j } from "../composables/usePartner.js";
|
|
4
4
|
import { useStripo as q } from "../composables/useStripo.js";
|
|
@@ -15,8 +15,8 @@ import { useConfigStore as oe } from "../stores/config.js";
|
|
|
15
15
|
import { useDynamicContentStore as te } from "../stores/dynamic-content.js";
|
|
16
16
|
import { useEditorStore as ne } from "../stores/editor.js";
|
|
17
17
|
import { usePreviewStore as re } from "../stores/preview.js";
|
|
18
|
-
import { useUnsubscribeStore as
|
|
19
|
-
const Ee = /* @__PURE__ */
|
|
18
|
+
import { useUnsubscribeStore as se } from "../stores/unsubscribe.js";
|
|
19
|
+
const Ee = /* @__PURE__ */ B({
|
|
20
20
|
__name: "Guido",
|
|
21
21
|
props: {
|
|
22
22
|
config: null
|
|
@@ -27,19 +27,19 @@ const Ee = /* @__PURE__ */ x({
|
|
|
27
27
|
() => import("./organisms/email-preview/PreviewContainer.vue.js")
|
|
28
28
|
), A = P(
|
|
29
29
|
() => import("./organisms/onboarding/OnboardingWrapper.vue.js")
|
|
30
|
-
), p =
|
|
30
|
+
), p = N(), c = te(), u = se(), n = oe();
|
|
31
31
|
n.init(l.config);
|
|
32
32
|
const i = ne(), F = re(), r = U(() => i.hasChanges), { isTestPartner: G } = j(), v = () => {
|
|
33
33
|
var e;
|
|
34
34
|
return (e = p.value) == null ? void 0 : e.handleSave(!0);
|
|
35
|
-
}, { templateId: a, userId: y, partnerName: h, productType:
|
|
35
|
+
}, { templateId: a, userId: y, partnerName: h, productType: b, username: f, template: o } = n, s = (o == null ? void 0 : o.html) || "", g = (o == null ? void 0 : o.css) || "", m = (o == null ? void 0 : o.preselectedDynamicContent) || [];
|
|
36
36
|
i.templateId = a;
|
|
37
37
|
const { initPlugin: S } = q({
|
|
38
38
|
emailId: a,
|
|
39
39
|
userId: y,
|
|
40
|
-
username:
|
|
40
|
+
username: f,
|
|
41
41
|
partnerName: h,
|
|
42
|
-
productType:
|
|
42
|
+
productType: b,
|
|
43
43
|
preselectedDynamicContentList: m,
|
|
44
44
|
onReady: () => {
|
|
45
45
|
console.debug("guido:ready"), t("ready");
|
|
@@ -63,28 +63,26 @@ const Ee = /* @__PURE__ */ x({
|
|
|
63
63
|
}
|
|
64
64
|
});
|
|
65
65
|
const E = (e) => {
|
|
66
|
-
console.debug("dynamic-content:close", e),
|
|
66
|
+
console.debug("dynamic-content:close", e), c.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
|
|
67
67
|
}, k = () => {
|
|
68
68
|
console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
|
|
69
69
|
};
|
|
70
|
-
|
|
70
|
+
R(() => r.value, () => {
|
|
71
71
|
t("on-change", r.value);
|
|
72
72
|
});
|
|
73
73
|
const d = (e) => {
|
|
74
|
-
const T = e, { attribute: O, position:
|
|
75
|
-
console.debug("dynamic-content:open", T.detail), t("dynamic-content:open", O,
|
|
74
|
+
const T = e, { attribute: O, position: x } = T.detail;
|
|
75
|
+
console.debug("dynamic-content:open", T.detail), t("dynamic-content:open", O, x);
|
|
76
76
|
};
|
|
77
77
|
return z(async () => {
|
|
78
78
|
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
|
|
79
79
|
try {
|
|
80
80
|
u.selectedUnsubscribePages = (o == null ? void 0 : o.selectedUnsubscribePages) || [];
|
|
81
81
|
let e = {
|
|
82
|
-
html:
|
|
83
|
-
css: g
|
|
84
|
-
forceRecreate: !0
|
|
85
|
-
// TODO: It should be false for old templates. We will communicate with Stripo
|
|
82
|
+
html: s && await W(s),
|
|
83
|
+
css: g
|
|
86
84
|
};
|
|
87
|
-
e.html || (e = await w(), e.html = await W(e.html)), D(e.html) && (e.html = await C(e.html)), await S(e),
|
|
85
|
+
e.html || (e = await w(), e.html = await W(e.html)), D(e.html) && (e.html = await C(e.html)), await S(e), c.selectedDynamicContentList = m;
|
|
88
86
|
} catch (e) {
|
|
89
87
|
console.error("Failed to initialize Stripo editor:", e);
|
|
90
88
|
}
|
|
@@ -104,7 +102,7 @@ const Ee = /* @__PURE__ */ x({
|
|
|
104
102
|
},
|
|
105
103
|
hasChanges: r,
|
|
106
104
|
saveSilent: v
|
|
107
|
-
}), { __sfc: !0, PreviewContainer: L, OnboardingWrapper: A, headerWrapperRef: p, dynamicContentStore:
|
|
105
|
+
}), { __sfc: !0, PreviewContainer: L, OnboardingWrapper: A, headerWrapperRef: p, dynamicContentStore: c, unsubscribeStore: u, props: l, configStore: n, editorStore: i, previewStore: F, hasChanges: r, isTestPartner: G, saveSilent: v, templateId: a, userId: y, partnerName: h, productType: b, username: f, templateConfig: o, html: s, css: g, preselectedDynamicContentList: m, emit: t, initPlugin: S, getDefaultTemplate: w, cloneTimersOnSave: C, hasTimerBlocks: D, noHeader: H, insertDynamicContent: E, closeDynamicContent: k, handleDynamicContentOpen: d, Toaster: Q, FilterSelectionDrawer: V, HeaderWrapper: X, LoadingWrapper: Y, SaveAsTemplateDrawer: Z, UnsubscribeWrapper: $ };
|
|
108
106
|
}
|
|
109
107
|
});
|
|
110
108
|
export {
|
|
@@ -3,7 +3,7 @@ import o from "./AmpToggle.vue2.js";
|
|
|
3
3
|
import n from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
4
|
var s = function() {
|
|
5
5
|
var r = this, t = r._self._c, e = r._self._setupProxy;
|
|
6
|
-
return t("div", [t("div", { staticClass: "d-f a-i-c ml-3" }, [t(e.InSegments, { attrs: { id: "guido__amp-toggle", "segment-list": e.segmentList, selected: e.previewStore.emailFormat }, on: { click: e.handleFormatChange } }), e.previewStore.showAMPErrorButton ? t(e.InButtonV2, { staticClass: "ml-
|
|
6
|
+
return t("div", [t("div", { staticClass: "d-f a-i-c ml-3" }, [t(e.InSegments, { attrs: { id: "guido__amp-toggle", "segment-list": e.segmentList, selected: e.previewStore.emailFormat }, on: { click: e.handleFormatChange } }), e.previewStore.showAMPErrorButton ? t(e.InButtonV2, { staticClass: "ml-3 d-f a-i-c b-c-11 b-c-h-11 t-c-4 t-c-h-4 i-c-4 bor-w-1 bor-s-s bor-c-11 bor-r-2", attrs: { id: "guido__amp-error-button", "left-icon": "line-error-box", type: "danger", "label-text-status": !1 }, on: { click: function(l) {
|
|
7
7
|
return e.previewStore.openErrorModal();
|
|
8
8
|
} } }) : r._e()], 1)]);
|
|
9
9
|
}, a = [], i = /* @__PURE__ */ n(
|
|
@@ -12,7 +12,7 @@ var s = function() {
|
|
|
12
12
|
a,
|
|
13
13
|
!1,
|
|
14
14
|
null,
|
|
15
|
-
"
|
|
15
|
+
"5196584c"
|
|
16
16
|
);
|
|
17
17
|
const d = i.exports;
|
|
18
18
|
export {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as H, ref as
|
|
1
|
+
import { defineComponent as H, ref as c, computed as _ } from "vue";
|
|
2
2
|
import { useConfig as h } from "../../../composables/useConfig.js";
|
|
3
3
|
import { useExport as V } from "../../../composables/useExport.js";
|
|
4
4
|
import { useTestEmailClick as x } from "../../../composables/useGuidoActions.js";
|
|
@@ -10,25 +10,25 @@ import { getTooltipOptions as O } from "../../../utils/tooltipUtils.js";
|
|
|
10
10
|
import { InButtonV2 as A } from "@useinsider/design-system-vue";
|
|
11
11
|
const J = /* @__PURE__ */ H({
|
|
12
12
|
__name: "RightSlot",
|
|
13
|
-
setup(k, { expose:
|
|
14
|
-
const { config:
|
|
13
|
+
setup(k, { expose: u }) {
|
|
14
|
+
const { config: f } = h(), { exportHtml: r } = V(), { save: n } = E(), { openVersionHistory: i, closeVersionHistory: a } = w(), o = C(), t = T(), e = c(!1), s = c(!1), v = x(), d = () => {
|
|
15
15
|
if (o.isVersionHistoryOpen) {
|
|
16
16
|
a();
|
|
17
17
|
return;
|
|
18
18
|
}
|
|
19
19
|
i();
|
|
20
|
-
},
|
|
20
|
+
}, y = async () => {
|
|
21
21
|
e.value = !0, await r(), e.value = !1;
|
|
22
|
-
},
|
|
22
|
+
}, S = () => {
|
|
23
23
|
o.isSaveAsTemplateDrawerOpen = !0;
|
|
24
|
-
},
|
|
24
|
+
}, g = _(() => o.isVersionHistoryOpen ? t("newsletter.close-version-history") : t("newsletter.version-history")), l = async (p) => {
|
|
25
25
|
s.value = !0, o.loadingStatus = !0;
|
|
26
|
-
const
|
|
27
|
-
return s.value = !1, p && (o.loadingStatus = !1),
|
|
26
|
+
const m = await n(p);
|
|
27
|
+
return s.value = !1, (p || !m) && (o.loadingStatus = !1), m;
|
|
28
28
|
};
|
|
29
|
-
return
|
|
29
|
+
return u({
|
|
30
30
|
handleSave: l
|
|
31
|
-
}), { __sfc: !0, config:
|
|
31
|
+
}), { __sfc: !0, config: f, exportHtml: r, save: n, openVersionHistory: i, closeVersionHistory: a, editorStore: o, trans: t, isExporting: e, isSaving: s, testEmailClick: v, handleVersionHistory: d, handleExport: y, handleSaveAs: S, versionHistoryTooltipText: g, handleSave: l, getTooltipOptions: O, InButtonV2: A };
|
|
32
32
|
}
|
|
33
33
|
});
|
|
34
34
|
export {
|
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
import { useConfigStore as
|
|
2
|
-
import { storeToRefs as
|
|
3
|
-
const
|
|
4
|
-
const e =
|
|
1
|
+
import { useConfigStore as I } from "../stores/config.js";
|
|
2
|
+
import { storeToRefs as T } from "pinia";
|
|
3
|
+
const w = () => {
|
|
4
|
+
const e = I(), {
|
|
5
5
|
config: t,
|
|
6
6
|
initialized: o,
|
|
7
7
|
identity: r,
|
|
8
8
|
partner: i,
|
|
9
|
-
template:
|
|
10
|
-
editor:
|
|
9
|
+
template: a,
|
|
10
|
+
editor: n,
|
|
11
11
|
ui: s,
|
|
12
|
-
features:
|
|
13
|
-
blocks:
|
|
14
|
-
compiler:
|
|
15
|
-
|
|
12
|
+
features: c,
|
|
13
|
+
blocks: u,
|
|
14
|
+
compiler: d,
|
|
15
|
+
callbacks: l,
|
|
16
|
+
templateId: p,
|
|
16
17
|
userId: f,
|
|
17
18
|
variationId: m,
|
|
18
19
|
partnerName: g,
|
|
19
|
-
productType:
|
|
20
|
-
messageType:
|
|
21
|
-
username:
|
|
22
|
-
showHeader:
|
|
23
|
-
} =
|
|
20
|
+
productType: b,
|
|
21
|
+
messageType: C,
|
|
22
|
+
username: y,
|
|
23
|
+
showHeader: E
|
|
24
|
+
} = T(e);
|
|
24
25
|
return {
|
|
25
26
|
// State refs
|
|
26
27
|
config: t,
|
|
@@ -28,26 +29,27 @@ const k = () => {
|
|
|
28
29
|
// Section refs
|
|
29
30
|
identity: r,
|
|
30
31
|
partner: i,
|
|
31
|
-
template:
|
|
32
|
-
editor:
|
|
32
|
+
template: a,
|
|
33
|
+
editor: n,
|
|
33
34
|
ui: s,
|
|
34
|
-
features:
|
|
35
|
-
blocks:
|
|
36
|
-
compiler:
|
|
35
|
+
features: c,
|
|
36
|
+
blocks: u,
|
|
37
|
+
compiler: d,
|
|
38
|
+
callbacks: l,
|
|
37
39
|
// Convenience refs
|
|
38
|
-
templateId:
|
|
40
|
+
templateId: p,
|
|
39
41
|
userId: f,
|
|
40
42
|
variationId: m,
|
|
41
43
|
partnerName: g,
|
|
42
|
-
productType:
|
|
43
|
-
messageType:
|
|
44
|
-
username:
|
|
45
|
-
showHeader:
|
|
44
|
+
productType: b,
|
|
45
|
+
messageType: C,
|
|
46
|
+
username: y,
|
|
47
|
+
showHeader: E,
|
|
46
48
|
// Methods
|
|
47
49
|
getConfig: () => t.value,
|
|
48
|
-
isFeatureEnabled: (
|
|
50
|
+
isFeatureEnabled: (F) => e.isFeatureEnabled(F)
|
|
49
51
|
};
|
|
50
52
|
};
|
|
51
53
|
export {
|
|
52
|
-
|
|
54
|
+
w as useConfig
|
|
53
55
|
};
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { useConfig as l } from "./useConfig.js";
|
|
2
|
+
import { useSaveStart as m, useSaveComplete as c } from "./useGuidoActions.js";
|
|
3
|
+
import { useTemplatePreparation as d } from "../utils/templatePreparation.js";
|
|
4
|
+
import { useHtmlValidator as p } from "./useHtmlValidator.js";
|
|
5
|
+
const w = () => {
|
|
6
|
+
const i = m(), s = c(), { validateHtml: o } = p(), { callbacks: a } = l();
|
|
7
|
+
return { save: async (r = !1) => {
|
|
8
|
+
var e;
|
|
9
|
+
i();
|
|
10
|
+
const { prepareTemplateDetails: n } = d(), t = await n();
|
|
11
|
+
if (await o(t.compiledHtml, t.dynamicContentList, !0) && !((e = a.value) != null && e.externalValidation && !await a.value.externalValidation(t)))
|
|
12
|
+
return r || s(t), t;
|
|
11
13
|
} };
|
|
12
14
|
};
|
|
13
15
|
export {
|
|
14
|
-
|
|
16
|
+
w as useSave
|
|
15
17
|
};
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { useActionsApi as
|
|
2
|
-
import { useBlocksConfig as
|
|
3
|
-
import { useConfig as
|
|
4
|
-
import { useCustomInterfaceAppearance as
|
|
5
|
-
import { useStripoEventHandler as
|
|
6
|
-
import { useToaster as
|
|
7
|
-
import { displayConditions as
|
|
8
|
-
import { useStripoApi as
|
|
9
|
-
import
|
|
10
|
-
import { useEditorStore as
|
|
11
|
-
import { dynamicContentToMergeTags as
|
|
12
|
-
import
|
|
13
|
-
const
|
|
14
|
-
const { features: l } =
|
|
15
|
-
var g, f;
|
|
16
|
-
const o =
|
|
1
|
+
import { useActionsApi as _ } from "./useActionsApi.js";
|
|
2
|
+
import { useBlocksConfig as B } from "./useBlocksConfig.js";
|
|
3
|
+
import { useConfig as v } from "./useConfig.js";
|
|
4
|
+
import { useCustomInterfaceAppearance as A } from "./useCustomInterfaceAppearance.js";
|
|
5
|
+
import { useStripoEventHandler as F } from "./useStripoEventHandler.js";
|
|
6
|
+
import { useToaster as D } from "./useToaster.js";
|
|
7
|
+
import { displayConditions as I } from "../enums/displayConditions.js";
|
|
8
|
+
import { useStripoApi as M } from "../services/stripoApi.js";
|
|
9
|
+
import U from "../static/styles/customEditorStyle.css.js";
|
|
10
|
+
import { useEditorStore as P } from "../stores/editor.js";
|
|
11
|
+
import { dynamicContentToMergeTags as R } from "../utils/genericUtil.js";
|
|
12
|
+
import H from "../package.json.js";
|
|
13
|
+
const W = (c) => {
|
|
14
|
+
const { features: l, template: y } = v(), { handleError: u } = D(), { getToken: C, getCustomFonts: S } = M(), { handleEvent: E } = F(), { getStripoBlocksConfig: h } = B(), w = async (i, n = []) => {
|
|
15
|
+
var m, g, f;
|
|
16
|
+
const o = P(), { html: r, css: p } = i, { baseBlocks: s, extensions: t } = await h(), a = ((m = l.value) == null ? void 0 : m.displayConditions) ?? !0, k = ((g = l.value) == null ? void 0 : g.modulesDisabled) ?? !1, T = ((f = y.value) == null ? void 0 : f.forceRecreate) ?? !1;
|
|
17
17
|
window.UIEditor.initEditor(
|
|
18
18
|
document.querySelector("#guido-editor"),
|
|
19
19
|
{
|
|
20
20
|
metadata: c,
|
|
21
21
|
html: r,
|
|
22
22
|
css: p,
|
|
23
|
-
forceRecreate:
|
|
23
|
+
forceRecreate: T,
|
|
24
24
|
locale: "en",
|
|
25
25
|
undoButtonSelector: "#guido__undo-button",
|
|
26
26
|
redoButtonSelector: "#guido__redo-button",
|
|
@@ -30,19 +30,19 @@ const K = (c) => {
|
|
|
30
30
|
customAppearanceMergetags: !0,
|
|
31
31
|
customAppearanceMergetagsBorderColor: "#f1f3fe",
|
|
32
32
|
customAppearanceMergetagsBackgroundColor: "#f1f3fe",
|
|
33
|
-
customViewStyles:
|
|
34
|
-
conditionsEnabled:
|
|
35
|
-
customConditionsEnabled:
|
|
36
|
-
conditionCategories:
|
|
33
|
+
customViewStyles: U,
|
|
34
|
+
conditionsEnabled: a,
|
|
35
|
+
customConditionsEnabled: a,
|
|
36
|
+
conditionCategories: I,
|
|
37
37
|
enableXSSSecurity: !0,
|
|
38
|
-
modulesDisabled:
|
|
38
|
+
modulesDisabled: k,
|
|
39
39
|
messageSettingsEnabled: !0,
|
|
40
40
|
displayGmailAnnotations: !0,
|
|
41
41
|
displayHiddenPreheader: !1,
|
|
42
42
|
displayTitle: !1,
|
|
43
43
|
displayUTM: !1,
|
|
44
44
|
selectElementAfterDrop: !0,
|
|
45
|
-
...
|
|
45
|
+
...s ? { baseBlocks: s } : {},
|
|
46
46
|
editorFonts: {
|
|
47
47
|
showDefaultStandardFonts: !0,
|
|
48
48
|
showDefaultNotStandardFonts: !0,
|
|
@@ -50,21 +50,21 @@ const K = (c) => {
|
|
|
50
50
|
},
|
|
51
51
|
mergeTags: [
|
|
52
52
|
{
|
|
53
|
-
entries:
|
|
53
|
+
entries: R(c.preselectedDynamicContentList)
|
|
54
54
|
}
|
|
55
55
|
],
|
|
56
56
|
async onTokenRefreshRequest(e) {
|
|
57
57
|
try {
|
|
58
|
-
const
|
|
59
|
-
e(
|
|
60
|
-
} catch (
|
|
61
|
-
u(
|
|
58
|
+
const d = await C();
|
|
59
|
+
e(d);
|
|
60
|
+
} catch (d) {
|
|
61
|
+
u(d, "Failed to refresh token");
|
|
62
62
|
}
|
|
63
63
|
},
|
|
64
64
|
onTemplateLoaded() {
|
|
65
65
|
try {
|
|
66
|
-
const { importCss: e } =
|
|
67
|
-
e(),
|
|
66
|
+
const { importCss: e } = A(), { activateCustomViewStyles: d, updateTimerInClonedTemplate: V } = _();
|
|
67
|
+
e(), d(), V(), c.onReady(), o.isStripoInitialized = !0, o.loadingStatus = !1, setTimeout(() => {
|
|
68
68
|
o.hasChanges = !1;
|
|
69
69
|
}, 1e3);
|
|
70
70
|
} catch (e) {
|
|
@@ -83,35 +83,35 @@ const K = (c) => {
|
|
|
83
83
|
onDataChanged() {
|
|
84
84
|
o.hasChanges = !0;
|
|
85
85
|
},
|
|
86
|
-
onEvent:
|
|
86
|
+
onEvent: E,
|
|
87
87
|
ignoreClickOutsideSelectors: [
|
|
88
88
|
"#guido-dynamic-content-modal",
|
|
89
89
|
".in-on-board-wrapper",
|
|
90
90
|
".in-drawer__container"
|
|
91
91
|
],
|
|
92
|
-
extensions:
|
|
92
|
+
extensions: t
|
|
93
93
|
}
|
|
94
94
|
);
|
|
95
|
-
},
|
|
96
|
-
var
|
|
95
|
+
}, b = (i) => new Promise((n, o) => {
|
|
96
|
+
var a;
|
|
97
97
|
if (document.getElementById("UiEditorScript")) {
|
|
98
98
|
i(), n();
|
|
99
99
|
return;
|
|
100
100
|
}
|
|
101
|
-
const r =
|
|
102
|
-
t.id = "UiEditorScript", t.type = "module", t.src =
|
|
101
|
+
const r = H.guido, s = `https://email-static.useinsider.com/guido/${(a = r == null ? void 0 : r.stripo) == null ? void 0 : a.version}/UIEditor.js`, t = document.createElement("script");
|
|
102
|
+
t.id = "UiEditorScript", t.type = "module", t.src = s, t.onload = () => {
|
|
103
103
|
i(), n();
|
|
104
104
|
}, t.onerror = () => {
|
|
105
|
-
o(new Error(`Failed to load Stripo UIEditor script from S3: ${
|
|
105
|
+
o(new Error(`Failed to load Stripo UIEditor script from S3: ${s}`));
|
|
106
106
|
}, document.body.appendChild(t);
|
|
107
107
|
});
|
|
108
108
|
return { initPlugin: async (i) => {
|
|
109
|
-
await
|
|
109
|
+
await b(async () => {
|
|
110
110
|
const n = await S();
|
|
111
|
-
await
|
|
111
|
+
await w(i, n);
|
|
112
112
|
});
|
|
113
113
|
} };
|
|
114
114
|
};
|
|
115
115
|
export {
|
|
116
|
-
|
|
116
|
+
W as useStripo
|
|
117
117
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var h = Object.defineProperty;
|
|
2
2
|
var T = (A, e, t) => e in A ? h(A, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : A[e] = t;
|
|
3
3
|
var m = (A, e, t) => T(A, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
-
import P, { prepareProductRows as S } from "../../extensions/Blocks/Recommendation/templates/
|
|
5
|
-
import { getDefaultProducts as q } from "../../extensions/Blocks/Recommendation/templates/
|
|
4
|
+
import P, { prepareProductRows as S } from "../../extensions/Blocks/Recommendation/templates/vertical/migration.js";
|
|
5
|
+
import { getDefaultProducts as q } from "../../extensions/Blocks/Recommendation/templates/utils.js";
|
|
6
6
|
class w {
|
|
7
7
|
constructor() {
|
|
8
8
|
m(this, "parser");
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
var t = /* @__PURE__ */ ((c) => (c.TEXT_ALIGN = "coupon-block-text-align-control", c.TEXT_COLOR = "coupon-block-text-color-control", c.TEXT_SIZE = "coupon-block-text-size-control", c.TEXT_STYLE = "coupon-block-text-style-control", c.TEXT_FONT_FAMILY = "coupon-block-text-font-family-control", c.TEXT_BACKGROUND = "coupon-block-text-background-control", c.TEXT_PADDINGS = "coupon-block-text-paddings-control", c.TEXT_LINE_SPACING = "coupon-block-text-line-spacing-control", c))(t || {});
|
|
2
|
+
export {
|
|
3
|
+
t as CouponControlId
|
|
4
|
+
};
|