@useinsider/guido 3.21.2-beta.cfc5be2 → 3.21.2-beta.eea8885
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 +39 -41
- package/dist/components/Guido.vue.js +6 -6
- package/dist/components/Guido.vue2.js +79 -81
- package/dist/composables/useBlocksConfig.js +24 -32
- package/dist/enums/academy.js +0 -1
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +92 -93
- package/dist/node_modules/valibot/dist/index.js +261 -297
- package/dist/src/@types/config/schemas.d.ts +0 -4
- package/dist/src/composables/useConfig.d.ts +0 -2
- package/dist/src/enums/academy.d.ts +0 -1
- package/dist/src/stores/config.d.ts +0 -166
- package/dist/stores/config.js +6 -13
- package/dist/utils/pairProductVariables.js +98 -91
- package/package.json +1 -1
- package/dist/@types/display-condition.js +0 -25
- package/dist/components/organisms/display-conditions/CodeEditorField.vue.js +0 -20
- package/dist/components/organisms/display-conditions/CodeEditorField.vue2.js +0 -30
- package/dist/components/organisms/display-conditions/DisplayConditionCreateDrawer.vue.js +0 -30
- package/dist/components/organisms/display-conditions/DisplayConditionCreateDrawer.vue2.js +0 -71
- package/dist/components/organisms/display-conditions/DisplayConditionSelectDrawer.vue.js +0 -34
- package/dist/components/organisms/display-conditions/DisplayConditionSelectDrawer.vue2.js +0 -57
- package/dist/components/organisms/display-conditions/DisplayConditionsHost.vue.js +0 -17
- package/dist/components/organisms/display-conditions/DisplayConditionsHost.vue2.js +0 -22
- package/dist/composables/useDisplayConditions.js +0 -102
- package/dist/enums/display-condition.js +0 -12
- package/dist/extensions/DisplayConditions/bridge.js +0 -17
- package/dist/extensions/DisplayConditions/constants.js +0 -17
- package/dist/extensions/DisplayConditions/control.js +0 -178
- package/dist/extensions/DisplayConditions/display-conditions.css.js +0 -201
- package/dist/extensions/DisplayConditions/extension.js +0 -28
- package/dist/extensions/DisplayConditions/iconsRegistry.js +0 -20
- package/dist/extensions/DisplayConditions/library.js +0 -27
- package/dist/extensions/DisplayConditions/settingsPanel.js +0 -17
- package/dist/services/displayConditionApi.js +0 -39
- package/dist/src/@types/display-condition.d.ts +0 -59
- package/dist/src/components/organisms/display-conditions/CodeEditorField.vue.d.ts +0 -43
- package/dist/src/components/organisms/display-conditions/DisplayConditionCreateDrawer.vue.d.ts +0 -2
- package/dist/src/components/organisms/display-conditions/DisplayConditionSelectDrawer.vue.d.ts +0 -2
- package/dist/src/components/organisms/display-conditions/DisplayConditionsHost.vue.d.ts +0 -2
- package/dist/src/composables/useDisplayConditions.d.ts +0 -16
- package/dist/src/enums/display-condition.d.ts +0 -15
- package/dist/src/extensions/DisplayConditions/bridge.d.ts +0 -6
- package/dist/src/extensions/DisplayConditions/constants.d.ts +0 -14
- package/dist/src/extensions/DisplayConditions/control.d.ts +0 -23
- package/dist/src/extensions/DisplayConditions/extension.d.ts +0 -2
- package/dist/src/extensions/DisplayConditions/iconsRegistry.d.ts +0 -4
- package/dist/src/extensions/DisplayConditions/library.d.ts +0 -8
- package/dist/src/extensions/DisplayConditions/settingsPanel.d.ts +0 -5
- package/dist/src/mock/api/display-conditions.d.ts +0 -2
- package/dist/src/services/displayConditionApi.d.ts +0 -8
- package/dist/src/stores/display-condition.d.ts +0 -81
- package/dist/src/utils/displayCondition.d.ts +0 -10
- package/dist/src/utils/protectTableText.d.ts +0 -2
- package/dist/stores/display-condition.js +0 -28
- package/dist/utils/displayCondition.js +0 -26
- package/dist/utils/protectTableText.js +0 -22
package/README.md
CHANGED
|
@@ -150,7 +150,6 @@ const config: GuidoConfigInput = {
|
|
|
150
150
|
ui?: {
|
|
151
151
|
showHeader?: boolean, // Default: true
|
|
152
152
|
backButtonLabel?: string,
|
|
153
|
-
externalDisplayConditions?: boolean, // Default: false - Replace Stripo's display-condition UI with a Conditions tab in the settings panel and create/select drawers for reusable Liquid/Pongo display conditions.
|
|
154
153
|
},
|
|
155
154
|
|
|
156
155
|
// Optional: Feature toggles (defaults apply once initialized — see `ready` prop below)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ModuleFolderDefaults as
|
|
2
|
-
import { object as a, number as s, optional as e, string as t, picklist as m, pipe as i, minLength as b, custom as k, boolean as o, array as
|
|
1
|
+
import { ModuleFolderDefaults as f } from "../../enums/defaults.js";
|
|
2
|
+
import { object as a, number as s, optional as e, string as t, picklist as m, pipe as i, minLength as b, custom as k, boolean as o, array as c, transform as y, unknown as r, record as g, fallback as R, literal as u, looseObject as C, variant as I, union as h, lazy as T } from "../../node_modules/valibot/dist/index.js";
|
|
3
3
|
const p = {
|
|
4
4
|
/** Promotional/marketing emails */
|
|
5
5
|
PROMOTIONAL: 1,
|
|
@@ -76,30 +76,30 @@ const p = {
|
|
|
76
76
|
value: t()
|
|
77
77
|
})
|
|
78
78
|
)
|
|
79
|
-
}),
|
|
79
|
+
}), S = T(() => C({
|
|
80
80
|
text: e(t()),
|
|
81
81
|
// eslint-disable-next-line camelcase -- backend field name
|
|
82
82
|
tag_text: e(t()),
|
|
83
83
|
value: e(t()),
|
|
84
|
-
children: e(
|
|
84
|
+
children: e(c(S)),
|
|
85
85
|
// eslint-disable-next-line camelcase -- backend field name
|
|
86
|
-
select_items: e(
|
|
87
|
-
})),
|
|
86
|
+
select_items: e(c(S))
|
|
87
|
+
})), N = g(
|
|
88
88
|
t(),
|
|
89
|
-
R(
|
|
90
|
-
),
|
|
89
|
+
R(c(S), [])
|
|
90
|
+
), P = C({
|
|
91
91
|
/** Block ID (matches the dictionary key and the legacy HTML element id) */
|
|
92
92
|
id: e(s()),
|
|
93
93
|
/** Decimal places for price display (legacy data may use string or number) */
|
|
94
94
|
decimalCount: e(h([t(), s()])),
|
|
95
95
|
/** Pinned product IDs (empty array when filter-driven) */
|
|
96
|
-
productIds: e(
|
|
96
|
+
productIds: e(c(r())),
|
|
97
97
|
/** Whether the block requested live products at send time */
|
|
98
98
|
sendProductRequestFlag: e(o()),
|
|
99
99
|
/** Whether to randomize product order */
|
|
100
100
|
shuffleProducts: e(o()),
|
|
101
101
|
/** Filter rules driving product selection */
|
|
102
|
-
filters: e(
|
|
102
|
+
filters: e(c(r())),
|
|
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) */
|
|
@@ -109,7 +109,7 @@ const p = {
|
|
|
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(
|
|
112
|
+
recommendedProducts: e(c(r())),
|
|
113
113
|
/** Number of product cards per row */
|
|
114
114
|
cardsInRow: e(s()),
|
|
115
115
|
/** Mobile-only padding (right) */
|
|
@@ -132,7 +132,7 @@ const p = {
|
|
|
132
132
|
isPriceMovedToNextLine: e(o()),
|
|
133
133
|
/** Legacy "Hide if same as discounted" / delete-price-for-zero-sale toggle */
|
|
134
134
|
isPriceDeletedForZeroSale: e(o())
|
|
135
|
-
}),
|
|
135
|
+
}), v = a({
|
|
136
136
|
/**
|
|
137
137
|
* Legacy recommendation block configs keyed by block ID.
|
|
138
138
|
* Pass this when loading a template authored with the v1
|
|
@@ -140,17 +140,17 @@ const p = {
|
|
|
140
140
|
* strategy, currency, locale, and layout data.
|
|
141
141
|
*/
|
|
142
142
|
recommendationConfigs: e(
|
|
143
|
-
g(t(),
|
|
143
|
+
g(t(), P),
|
|
144
144
|
{}
|
|
145
145
|
)
|
|
146
|
-
}),
|
|
146
|
+
}), x = a({
|
|
147
147
|
/** Initial HTML content */
|
|
148
148
|
html: e(t(), ""),
|
|
149
149
|
/** Initial CSS content */
|
|
150
150
|
css: e(t(), ""),
|
|
151
151
|
/** Preselected dynamic content items */
|
|
152
152
|
preselectedDynamicContent: e(
|
|
153
|
-
|
|
153
|
+
c(M),
|
|
154
154
|
[]
|
|
155
155
|
),
|
|
156
156
|
/**
|
|
@@ -159,11 +159,11 @@ const p = {
|
|
|
159
159
|
* (first) partner's leaf attributes into the label→token map that repairs
|
|
160
160
|
* label-form placeholders (`{{ Phone Number }}`) in dropped saved modules.
|
|
161
161
|
*/
|
|
162
|
-
dynamicContentList: e(
|
|
162
|
+
dynamicContentList: e(N, {}),
|
|
163
163
|
/** Valid custom field attribute names from the partner's categorized fields */
|
|
164
|
-
customFieldAttributes: e(
|
|
164
|
+
customFieldAttributes: e(c(t()), []),
|
|
165
165
|
/** Selected unsubscribe page IDs */
|
|
166
|
-
selectedUnsubscribePages: e(
|
|
166
|
+
selectedUnsubscribePages: e(c(s()), []),
|
|
167
167
|
/** Force recreate template in Stripo storage (use true when updating externally modified templates) */
|
|
168
168
|
forceRecreate: e(o(), !1),
|
|
169
169
|
/**
|
|
@@ -176,7 +176,7 @@ const p = {
|
|
|
176
176
|
trackIdCounter: e(
|
|
177
177
|
i(
|
|
178
178
|
s(),
|
|
179
|
-
y((
|
|
179
|
+
y((n) => Number.isFinite(n) ? Math.max(0, Math.floor(n)) : 0)
|
|
180
180
|
),
|
|
181
181
|
0
|
|
182
182
|
),
|
|
@@ -190,12 +190,12 @@ const p = {
|
|
|
190
190
|
recommendationCampaignUrls: e(
|
|
191
191
|
i(
|
|
192
192
|
r(),
|
|
193
|
-
y((
|
|
193
|
+
y((n) => n && typeof n == "object" ? { ...n } : void 0)
|
|
194
194
|
)
|
|
195
195
|
),
|
|
196
196
|
/** Migration-only inputs (legacy block configs) */
|
|
197
|
-
migration: e(
|
|
198
|
-
}),
|
|
197
|
+
migration: e(v, {})
|
|
198
|
+
}), D = a({
|
|
199
199
|
/** Sender display name */
|
|
200
200
|
senderName: e(t(), ""),
|
|
201
201
|
/** Email subject line */
|
|
@@ -208,18 +208,16 @@ const p = {
|
|
|
208
208
|
/** Migration date for template compatibility */
|
|
209
209
|
migrationDate: e(s(), 1759696858),
|
|
210
210
|
/** Email header settings */
|
|
211
|
-
emailHeader: e(
|
|
211
|
+
emailHeader: e(D, { senderName: "", subject: "" }),
|
|
212
212
|
/** Folder name for user-saved modules (used by Stripo plugin panel for path construction) */
|
|
213
|
-
savedModulesFolderName: e(t(),
|
|
213
|
+
savedModulesFolderName: e(t(), f.SAVED_MODULES),
|
|
214
214
|
/** Folder name for default/prebuilt modules (used by Stripo plugin panel for path construction) */
|
|
215
|
-
defaultModulesFolderName: e(t(),
|
|
215
|
+
defaultModulesFolderName: e(t(), f.DEFAULT_MODULES)
|
|
216
216
|
}), F = a({
|
|
217
217
|
/** Whether to show the header bar */
|
|
218
218
|
showHeader: e(o(), !0),
|
|
219
219
|
/** Custom label for back button (if shown) */
|
|
220
|
-
backButtonLabel: e(t())
|
|
221
|
-
/** Replace Stripo's display-condition UI with the Conditions tab and create/select drawers */
|
|
222
|
-
externalDisplayConditions: e(o(), !1)
|
|
220
|
+
backButtonLabel: e(t())
|
|
223
221
|
}), U = a({
|
|
224
222
|
/** Enable dynamic content insertion */
|
|
225
223
|
dynamicContent: e(o(), !0),
|
|
@@ -271,12 +269,12 @@ const p = {
|
|
|
271
269
|
]), j = a({
|
|
272
270
|
/** Default blocks to exclude from the editor */
|
|
273
271
|
excludeDefaults: e(
|
|
274
|
-
|
|
272
|
+
c(w),
|
|
275
273
|
[]
|
|
276
274
|
),
|
|
277
275
|
/** Custom blocks to include in the editor */
|
|
278
276
|
includeCustoms: e(
|
|
279
|
-
|
|
277
|
+
c(B),
|
|
280
278
|
[]
|
|
281
279
|
)
|
|
282
280
|
}), d = a({
|
|
@@ -308,13 +306,13 @@ const p = {
|
|
|
308
306
|
...d.entries,
|
|
309
307
|
type: u("remove"),
|
|
310
308
|
/** Strings or patterns to remove */
|
|
311
|
-
targets:
|
|
309
|
+
targets: c(t())
|
|
312
310
|
}), G = a({
|
|
313
311
|
...d.entries,
|
|
314
312
|
type: u("custom"),
|
|
315
313
|
/** Custom processor function */
|
|
316
314
|
processor: k(
|
|
317
|
-
(
|
|
315
|
+
(n) => typeof n == "function",
|
|
318
316
|
"processor must be a function"
|
|
319
317
|
)
|
|
320
318
|
}), V = I("type", [
|
|
@@ -324,7 +322,7 @@ const p = {
|
|
|
324
322
|
G
|
|
325
323
|
]), z = a({
|
|
326
324
|
/** Custom compiler rules to apply */
|
|
327
|
-
customRules: e(
|
|
325
|
+
customRules: e(c(V), []),
|
|
328
326
|
/** Skip default compiler rules */
|
|
329
327
|
ignoreDefaultRules: e(o(), !1)
|
|
330
328
|
}), W = a({
|
|
@@ -334,7 +332,7 @@ const p = {
|
|
|
334
332
|
*/
|
|
335
333
|
externalValidation: e(
|
|
336
334
|
k(
|
|
337
|
-
(
|
|
335
|
+
(n) => typeof n == "function",
|
|
338
336
|
"externalValidation must be a function"
|
|
339
337
|
)
|
|
340
338
|
)
|
|
@@ -346,7 +344,7 @@ const p = {
|
|
|
346
344
|
partner: E,
|
|
347
345
|
// Optional sections (with defaults)
|
|
348
346
|
/** Template content and presets */
|
|
349
|
-
template: e(
|
|
347
|
+
template: e(x, {}),
|
|
350
348
|
/** Editor settings */
|
|
351
349
|
editor: e(O, {}),
|
|
352
350
|
/** UI configuration */
|
|
@@ -368,23 +366,23 @@ export {
|
|
|
368
366
|
B as CustomBlockTypeSchema,
|
|
369
367
|
G as CustomRuleSchema,
|
|
370
368
|
w as DefaultBlockTypeSchema,
|
|
371
|
-
|
|
372
|
-
|
|
369
|
+
N as DynamicContentListSchema,
|
|
370
|
+
S as DynamicContentNodeSchema,
|
|
373
371
|
M as DynamicContentSchema,
|
|
374
372
|
O as EditorSchema,
|
|
375
|
-
|
|
373
|
+
D as EmailHeaderSchema,
|
|
376
374
|
L as FallbackFontSchema,
|
|
377
375
|
U as FeaturesSchema,
|
|
378
376
|
K as GuidoConfigSchema,
|
|
379
377
|
A as IdentitySchema,
|
|
380
|
-
|
|
378
|
+
P as LegacyRecommendationConfigSchema,
|
|
381
379
|
p as MessageType,
|
|
382
380
|
E as PartnerSchema,
|
|
383
381
|
l as ProductType,
|
|
384
382
|
_ as RegexRuleSchema,
|
|
385
383
|
q as RemoveRuleSchema,
|
|
386
384
|
H as ReplaceRuleSchema,
|
|
387
|
-
|
|
388
|
-
|
|
385
|
+
v as TemplateMigrationSchema,
|
|
386
|
+
x as TemplateSchema,
|
|
389
387
|
F as UISchema
|
|
390
388
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import
|
|
1
|
+
import o from "./Guido.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
3
|
+
import i from "../_virtual/_plugin-vue2_normalizer.js";
|
|
4
4
|
var t = function() {
|
|
5
5
|
var a = this, r = a._self._c, e = a._self._setupProxy;
|
|
6
|
-
return r("div", { ref: "wrapperRef", staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper, { ref: "headerWrapperRef" }), r(e.AutoSaveController), e.editorStore.isPreviewModeOpen ? r(e.PreviewContainer) : a._e(), r("div", { directives: [{ name: "show", rawName: "v-show", value: !e.previewStore.isLoaded, expression: "!previewStore.isLoaded" }], staticClass: "guido-editor__container", class: { "guido-editor__no-header": e.noHeader }, attrs: { id: "guido-editor" } }), r(e.Toaster), r(e.AuthErrorModal), r(e.FilterSelectionDrawer), e.isRrsEnabled || e.hasAssignedStrategy ? r(e.AssignStrategyDrawer) : a._e(), e.isRrsEnabled || e.hasAssignedStrategy ? r(e.RemoveStrategyModal) : a._e(), e.isRrsEnabled ? r(e.LegacyStrategyUpdatedModal) : a._e(), r(e.SaveAsTemplateDrawer), e.isSaveValidationEnabled ? r(e.ValidationErrorDrawer) : a._e(), e.
|
|
6
|
+
return r("div", { ref: "wrapperRef", staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper, { ref: "headerWrapperRef" }), r(e.AutoSaveController), e.editorStore.isPreviewModeOpen ? r(e.PreviewContainer) : a._e(), r("div", { directives: [{ name: "show", rawName: "v-show", value: !e.previewStore.isLoaded, expression: "!previewStore.isLoaded" }], staticClass: "guido-editor__container", class: { "guido-editor__no-header": e.noHeader }, attrs: { id: "guido-editor" } }), r(e.Toaster), r(e.AuthErrorModal), r(e.FilterSelectionDrawer), e.isRrsEnabled || e.hasAssignedStrategy ? r(e.AssignStrategyDrawer) : a._e(), e.isRrsEnabled || e.hasAssignedStrategy ? r(e.RemoveStrategyModal) : a._e(), e.isRrsEnabled ? r(e.LegacyStrategyUpdatedModal) : a._e(), r(e.SaveAsTemplateDrawer), e.isSaveValidationEnabled ? r(e.ValidationErrorDrawer) : a._e(), e.isTestPartner() ? a._e() : r(e.OnboardingWrapper, { on: { "onboarding-finished": function(_) {
|
|
7
7
|
return e.emit("onboarding:finished");
|
|
8
8
|
} } }), r(e.UnsubscribeWrapper), r(e.LoadingWrapper)], 1);
|
|
9
|
-
}, s = [], n = /* @__PURE__ */
|
|
10
|
-
|
|
9
|
+
}, s = [], n = /* @__PURE__ */ i(
|
|
10
|
+
o,
|
|
11
11
|
t,
|
|
12
12
|
s,
|
|
13
13
|
!1,
|
|
14
14
|
null,
|
|
15
|
-
"
|
|
15
|
+
"c5146fc5"
|
|
16
16
|
);
|
|
17
17
|
const v = n.exports;
|
|
18
18
|
export {
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useCortexBlueprintBridge as
|
|
3
|
-
import { useEditorLock as
|
|
4
|
-
import { provideGuidoActions as
|
|
5
|
-
import { useGuidoStateBridge as
|
|
6
|
-
import { usePartner as
|
|
7
|
-
import { useSaveValidationRollout as
|
|
8
|
-
import { useStripo as
|
|
9
|
-
import { useTimerClone as
|
|
10
|
-
import { migrate as
|
|
11
|
-
import { ModuleFolderDefaults as
|
|
12
|
-
import { RIBBON_SELECTOR as
|
|
13
|
-
import { useRecommendationExtensionStore as
|
|
14
|
-
import { disposeUnsubscribeListeners as
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import { useStripoApi as
|
|
25
|
-
import { useConfigStore as
|
|
26
|
-
import { useDynamicContentStore as
|
|
1
|
+
import { defineComponent as ie, defineAsyncComponent as m, ref as W, computed as p, watch as G, onMounted as ce, onUnmounted as de } from "vue";
|
|
2
|
+
import { useCortexBlueprintBridge as me } from "../composables/useCortexBlueprintBridge.js";
|
|
3
|
+
import { useEditorLock as le } from "../composables/useEditorLock.js";
|
|
4
|
+
import { provideGuidoActions as ue } from "../composables/useGuidoActions.js";
|
|
5
|
+
import { useGuidoStateBridge as pe } from "../composables/useGuidoStateBridge.js";
|
|
6
|
+
import { usePartner as fe } from "../composables/usePartner.js";
|
|
7
|
+
import { useSaveValidationRollout as ye } from "../composables/useSaveValidationRollout.js";
|
|
8
|
+
import { useStripo as ge } from "../composables/useStripo.js";
|
|
9
|
+
import { useTimerClone as Se } from "../composables/useTimerClone.js";
|
|
10
|
+
import { migrate as V } from "../config/migrator/index.js";
|
|
11
|
+
import { ModuleFolderDefaults as $ } from "../enums/defaults.js";
|
|
12
|
+
import { RIBBON_SELECTOR as ve } from "../enums/onboarding.js";
|
|
13
|
+
import { useRecommendationExtensionStore as z, disposeStrategyPageReturnListeners as be } from "../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
14
|
+
import { disposeUnsubscribeListeners as he } from "../extensions/Blocks/Unsubscribe/block.js";
|
|
15
|
+
import Ee from "./organisms/AutoSaveController.vue.js";
|
|
16
|
+
import we from "./organisms/base/AuthErrorModal.vue.js";
|
|
17
|
+
import De from "./organisms/base/Toaster.vue.js";
|
|
18
|
+
import Ce from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
|
|
19
|
+
import ke from "./organisms/header/HeaderWrapper.vue.js";
|
|
20
|
+
import Re from "./organisms/LoadingWrapper.vue.js";
|
|
21
|
+
import Fe from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
|
|
22
|
+
import Le from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
|
|
23
|
+
import Me from "./organisms/validation/ValidationErrorDrawer.vue.js";
|
|
24
|
+
import { useStripoApi as Te } from "../services/stripoApi.js";
|
|
25
|
+
import { useConfigStore as Ie } from "../stores/config.js";
|
|
26
|
+
import { useDynamicContentStore as Ue } from "../stores/dynamic-content.js";
|
|
27
27
|
import { useEditorStore as E } from "../stores/editor.js";
|
|
28
|
-
import { usePreviewStore as
|
|
29
|
-
import { useSaveValidationStore as
|
|
30
|
-
import { useTemplateStore as
|
|
31
|
-
import { useUnsubscribeStore as
|
|
32
|
-
import { readTrackFloor as
|
|
33
|
-
const
|
|
28
|
+
import { usePreviewStore as Ae } from "../stores/preview.js";
|
|
29
|
+
import { useSaveValidationStore as Be } from "../stores/save-validation.js";
|
|
30
|
+
import { useTemplateStore as Ne } from "../stores/template.js";
|
|
31
|
+
import { useUnsubscribeStore as Pe } from "../stores/unsubscribe.js";
|
|
32
|
+
import { readTrackFloor as H } from "../utils/linkTrackingIds.js";
|
|
33
|
+
const yt = /* @__PURE__ */ ie({
|
|
34
34
|
__name: "Guido",
|
|
35
35
|
props: {
|
|
36
36
|
config: null,
|
|
@@ -38,27 +38,25 @@ const St = /* @__PURE__ */ de({
|
|
|
38
38
|
},
|
|
39
39
|
emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
|
|
40
40
|
setup(q, { expose: K, emit: r }) {
|
|
41
|
-
const
|
|
41
|
+
const s = q, j = m(
|
|
42
42
|
() => import("./organisms/email-preview/PreviewContainer.vue.js")
|
|
43
|
-
), J =
|
|
43
|
+
), J = m(
|
|
44
44
|
() => import("./organisms/onboarding/OnboardingWrapper.vue.js")
|
|
45
|
-
), Q =
|
|
45
|
+
), Q = m(
|
|
46
46
|
() => import("./organisms/extensions/recommendation/AssignStrategyDrawer.vue.js")
|
|
47
|
-
), X =
|
|
47
|
+
), X = m(
|
|
48
48
|
() => import("./organisms/extensions/recommendation/RemoveStrategyModal.vue.js")
|
|
49
|
-
), Y =
|
|
50
|
-
() => import("./organisms/display-conditions/DisplayConditionsHost.vue.js")
|
|
51
|
-
), Z = c(
|
|
49
|
+
), Y = m(
|
|
52
50
|
() => import("./organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.js")
|
|
53
|
-
),
|
|
54
|
-
|
|
55
|
-
const
|
|
51
|
+
), w = W(), f = W(), y = Ue(), D = Pe(), o = Ie();
|
|
52
|
+
s.ready && o.init(s.config);
|
|
53
|
+
const c = E(), Z = Ae(), l = p(() => c.hasChanges), { isTestPartner: ee } = fe(), { isEnabled: te, loadRollout: C } = ye(), k = () => {
|
|
56
54
|
var t;
|
|
57
|
-
return (t =
|
|
55
|
+
return (t = w.value) == null ? void 0 : t.handleSave(!0);
|
|
58
56
|
}, R = (t) => {
|
|
59
|
-
|
|
57
|
+
c.loadingStatus = t;
|
|
60
58
|
};
|
|
61
|
-
|
|
59
|
+
me(), pe();
|
|
62
60
|
const g = () => {
|
|
63
61
|
var t, e;
|
|
64
62
|
return {
|
|
@@ -66,18 +64,18 @@ const St = /* @__PURE__ */ de({
|
|
|
66
64
|
userId: o.userId,
|
|
67
65
|
username: o.username,
|
|
68
66
|
partnerName: o.partnerName,
|
|
69
|
-
savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) ||
|
|
70
|
-
defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) ||
|
|
67
|
+
savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) || $.SAVED_MODULES,
|
|
68
|
+
defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) || $.DEFAULT_MODULES
|
|
71
69
|
};
|
|
72
|
-
}, { initPlugin: F, preloadRuntime: L } =
|
|
73
|
-
let
|
|
74
|
-
const { getDefaultTemplate: I } =
|
|
70
|
+
}, { initPlugin: F, preloadRuntime: L } = ge(), { runExclusive: M, beginMount: T, isCurrentMount: S } = le();
|
|
71
|
+
let u = 0;
|
|
72
|
+
const { getDefaultTemplate: I } = Te(), { cloneTimersOnSave: U, hasTimerBlocks: A } = Se(), oe = p(() => {
|
|
75
73
|
var t;
|
|
76
74
|
return !((t = o.ui) != null && t.showHeader);
|
|
77
|
-
}),
|
|
78
|
-
() =>
|
|
75
|
+
}), ne = p(() => o.isFeatureEnabled("reusableRecommendationStrategy")), re = p(
|
|
76
|
+
() => !!z().recommendationConfigs.strategyId
|
|
79
77
|
);
|
|
80
|
-
|
|
78
|
+
ue({
|
|
81
79
|
onBack: () => {
|
|
82
80
|
console.debug("guido:back"), r("back");
|
|
83
81
|
},
|
|
@@ -97,68 +95,68 @@ const St = /* @__PURE__ */ de({
|
|
|
97
95
|
}, N = () => {
|
|
98
96
|
console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
|
|
99
97
|
};
|
|
100
|
-
G(() =>
|
|
101
|
-
r("on-change",
|
|
98
|
+
G(() => l.value, () => {
|
|
99
|
+
r("on-change", l.value);
|
|
102
100
|
});
|
|
103
101
|
const v = (t) => {
|
|
104
|
-
const e = t, { attribute:
|
|
105
|
-
console.debug("dynamic-content:open", e.detail), r("dynamic-content:open",
|
|
102
|
+
const e = t, { attribute: a, position: d } = e.detail;
|
|
103
|
+
console.debug("dynamic-content:open", e.detail), r("dynamic-content:open", a, d);
|
|
106
104
|
};
|
|
107
105
|
let i = null;
|
|
108
106
|
const b = () => {
|
|
109
107
|
var e;
|
|
110
|
-
const t = document.querySelector(
|
|
108
|
+
const t = document.querySelector(ve);
|
|
111
109
|
(e = f.value) == null || e.style.setProperty("--ribbon-offset", `${(t == null ? void 0 : t.offsetHeight) ?? 0}px`);
|
|
112
110
|
}, h = async () => {
|
|
113
111
|
var t;
|
|
114
112
|
try {
|
|
115
|
-
o.initialized || o.init(
|
|
116
|
-
const e = o.template,
|
|
117
|
-
|
|
118
|
-
const
|
|
113
|
+
o.initialized || o.init(s.config), c.templateId = o.templateId;
|
|
114
|
+
const e = o.template, a = (e == null ? void 0 : e.html) || "", d = (e == null ? void 0 : e.css) || "", P = (e == null ? void 0 : e.preselectedDynamicContent) || [];
|
|
115
|
+
D.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
|
|
116
|
+
const _ = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {}, O = o.isFeatureEnabled("linkTrackingIds"), x = {
|
|
119
117
|
partnerName: o.partnerName,
|
|
120
118
|
campaignUrls: e == null ? void 0 : e.recommendationCampaignUrls,
|
|
121
119
|
rrsEnabled: o.isFeatureEnabled("reusableRecommendationStrategy")
|
|
122
120
|
};
|
|
123
121
|
let n = {
|
|
124
|
-
html:
|
|
125
|
-
css:
|
|
122
|
+
html: a && await V(a, _, x),
|
|
123
|
+
css: d
|
|
126
124
|
};
|
|
127
|
-
n.html || (n = await I(), n.html = await
|
|
128
|
-
const
|
|
129
|
-
A(n.html) && (n.html = await U(n.html)),
|
|
130
|
-
const
|
|
131
|
-
preselectedDynamicContentList:
|
|
125
|
+
n.html || (n = await I(), n.html = await V(n.html, _, x));
|
|
126
|
+
const ae = O ? H(n.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
|
|
127
|
+
A(n.html) && (n.html = await U(n.html)), O && (c.trackIdSessionFloor = Math.max(ae, H(n.html)));
|
|
128
|
+
const se = {
|
|
129
|
+
preselectedDynamicContentList: P,
|
|
132
130
|
onReady: () => {
|
|
133
131
|
console.debug("guido:ready"), r("ready");
|
|
134
132
|
}
|
|
135
133
|
};
|
|
136
|
-
|
|
134
|
+
u = T(), await F(n, g(), se), y.selectedDynamicContentList = P;
|
|
137
135
|
} catch (e) {
|
|
138
136
|
console.error("Failed to initialize Stripo editor:", e);
|
|
139
137
|
}
|
|
140
138
|
};
|
|
141
|
-
return
|
|
139
|
+
return ce(async () => {
|
|
142
140
|
var e;
|
|
143
|
-
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"),
|
|
141
|
+
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), z().$reset(), E().$reset(), Ne().$reset(), Be().$reset(), C(), b();
|
|
144
142
|
const t = (e = f.value) == null ? void 0 : e.parentElement;
|
|
145
|
-
if (t && (i = new ResizeObserver(b), i.observe(t)), L(),
|
|
143
|
+
if (t && (i = new ResizeObserver(b), i.observe(t)), L(), s.ready)
|
|
146
144
|
await h();
|
|
147
145
|
else {
|
|
148
|
-
const
|
|
149
|
-
|
|
146
|
+
const a = G(() => s.ready, (d) => {
|
|
147
|
+
d && (a(), h());
|
|
150
148
|
});
|
|
151
149
|
}
|
|
152
150
|
document.addEventListener("dynamic-content:open", v);
|
|
153
|
-
}),
|
|
154
|
-
if (
|
|
151
|
+
}), de(() => {
|
|
152
|
+
if (he(), be(), i == null || i.disconnect(), document.removeEventListener("dynamic-content:open", v), S(u))
|
|
155
153
|
try {
|
|
156
154
|
E().isStripoInitialized = !1;
|
|
157
155
|
} catch (t) {
|
|
158
156
|
console.debug("Failed to close the editor readiness gate on unmount", t);
|
|
159
157
|
}
|
|
160
158
|
M(async () => {
|
|
161
|
-
if (S(
|
|
159
|
+
if (S(u))
|
|
162
160
|
try {
|
|
163
161
|
window.UIEditor.removeEditor();
|
|
164
162
|
} catch {
|
|
@@ -170,12 +168,12 @@ const St = /* @__PURE__ */ de({
|
|
|
170
168
|
insert: B,
|
|
171
169
|
close: N
|
|
172
170
|
},
|
|
173
|
-
hasChanges:
|
|
171
|
+
hasChanges: l,
|
|
174
172
|
saveSilent: k,
|
|
175
173
|
setLoading: R
|
|
176
|
-
}), { __sfc: !0, PreviewContainer: j, OnboardingWrapper: J, AssignStrategyDrawer: Q, RemoveStrategyModal: X,
|
|
174
|
+
}), { __sfc: !0, PreviewContainer: j, OnboardingWrapper: J, AssignStrategyDrawer: Q, RemoveStrategyModal: X, LegacyStrategyUpdatedModal: Y, headerWrapperRef: w, wrapperRef: f, dynamicContentStore: y, unsubscribeStore: D, props: s, configStore: o, editorStore: c, previewStore: Z, hasChanges: l, isTestPartner: ee, isSaveValidationEnabled: te, loadRollout: C, saveSilent: k, setLoading: R, emit: r, buildMetadata: g, initPlugin: F, preloadRuntime: L, runExclusive: M, beginMount: T, isCurrentMount: S, mountGeneration: u, getDefaultTemplate: I, cloneTimersOnSave: U, hasTimerBlocks: A, noHeader: oe, isRrsEnabled: ne, hasAssignedStrategy: re, insertDynamicContent: B, closeDynamicContent: N, handleDynamicContentOpen: v, ribbonObserver: i, updateRibbonOffset: b, startEditor: h, AutoSaveController: Ee, AuthErrorModal: we, Toaster: De, FilterSelectionDrawer: Ce, HeaderWrapper: ke, LoadingWrapper: Re, SaveAsTemplateDrawer: Fe, UnsubscribeWrapper: Le, ValidationErrorDrawer: Me };
|
|
177
175
|
}
|
|
178
176
|
});
|
|
179
177
|
export {
|
|
180
|
-
|
|
178
|
+
yt as default
|
|
181
179
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { useConfigStore as
|
|
3
|
-
const
|
|
1
|
+
import r from "../extensions/ModulesTabIcons/extension.js";
|
|
2
|
+
import { useConfigStore as l } from "../stores/config.js";
|
|
3
|
+
const a = {
|
|
4
4
|
"amp-accordion": "ampAccordionEnabled",
|
|
5
5
|
"amp-carousel": "ampCarouselEnabled",
|
|
6
6
|
"amp-form-controls": "ampFormControlsEnabled",
|
|
@@ -14,7 +14,7 @@ const s = {
|
|
|
14
14
|
"text-block": "textEnabled",
|
|
15
15
|
"timer-block": "timerEnabled",
|
|
16
16
|
"video-block": "videoEnabled"
|
|
17
|
-
},
|
|
17
|
+
}, s = {
|
|
18
18
|
"dynamic-content": () => import("../extensions/DynamicContent/extension.js"),
|
|
19
19
|
"checkbox-block": () => import("../extensions/Blocks/Checkbox/extension.js"),
|
|
20
20
|
"radio-button-block": () => import("../extensions/Blocks/RadioButton/extension.js"),
|
|
@@ -22,48 +22,40 @@ const s = {
|
|
|
22
22
|
"unsubscribe-block": () => import("../extensions/Blocks/Unsubscribe/extension.js"),
|
|
23
23
|
"coupon-block": () => import("../extensions/Blocks/CouponBlock/extension.js"),
|
|
24
24
|
"items-block": () => import("../extensions/Blocks/Items/extension.js")
|
|
25
|
-
},
|
|
26
|
-
if (!
|
|
25
|
+
}, i = (n) => {
|
|
26
|
+
if (!n || !n.length)
|
|
27
27
|
return {};
|
|
28
28
|
const t = {};
|
|
29
|
-
return
|
|
30
|
-
const e =
|
|
29
|
+
return n.forEach((o) => {
|
|
30
|
+
const e = a[o];
|
|
31
31
|
e && (t[e] = !1);
|
|
32
32
|
}), t;
|
|
33
|
-
}, m = async (
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
return n;
|
|
42
|
-
const e = await Promise.all(
|
|
43
|
-
o.map(async (r) => {
|
|
44
|
-
const a = i[r];
|
|
45
|
-
return a ? (await a()).default : null;
|
|
33
|
+
}, b = () => [r], m = async (n) => {
|
|
34
|
+
const t = b();
|
|
35
|
+
if (!n || !n.length)
|
|
36
|
+
return t;
|
|
37
|
+
const o = await Promise.all(
|
|
38
|
+
n.map(async (e) => {
|
|
39
|
+
const c = s[e];
|
|
40
|
+
return c ? (await c()).default : null;
|
|
46
41
|
})
|
|
47
42
|
);
|
|
48
43
|
return [
|
|
49
|
-
...
|
|
50
|
-
...
|
|
44
|
+
...t,
|
|
45
|
+
...o.filter((e) => e !== null)
|
|
51
46
|
];
|
|
52
|
-
},
|
|
53
|
-
const
|
|
47
|
+
}, E = () => {
|
|
48
|
+
const n = l();
|
|
54
49
|
return {
|
|
55
50
|
getStripoBlocksConfig: async () => {
|
|
56
|
-
const
|
|
51
|
+
const o = n.blocks;
|
|
57
52
|
return {
|
|
58
|
-
baseBlocks:
|
|
59
|
-
extensions: await
|
|
60
|
-
n == null ? void 0 : n.includeCustoms,
|
|
61
|
-
o.externalDisplayConditions
|
|
62
|
-
)
|
|
53
|
+
baseBlocks: i(o == null ? void 0 : o.excludeDefaults),
|
|
54
|
+
extensions: await m(o == null ? void 0 : o.includeCustoms)
|
|
63
55
|
};
|
|
64
56
|
}
|
|
65
57
|
};
|
|
66
58
|
};
|
|
67
59
|
export {
|
|
68
|
-
|
|
60
|
+
E as useBlocksConfig
|
|
69
61
|
};
|
package/dist/enums/academy.js
CHANGED
|
@@ -2,7 +2,6 @@ const e = "https://academy.insiderone.com", o = {
|
|
|
2
2
|
EMAIL_EDITOR: `${e}/docs/email-drag-and-drop-editor`,
|
|
3
3
|
GLOBAL_UNSUBSCRIBE: `${e}/docs/global-unsubscribe-preference-center`,
|
|
4
4
|
AMP_FOR_EMAILS: `${e}/docs/amp-for-emails`,
|
|
5
|
-
EMAIL_DISPLAY_CONDITIONS: `${e}/docs/new-editor-add-display-conditions-to-an-email`,
|
|
6
5
|
EMAIL_RECOMMENDATION_BLOCK: `${e}/docs/new-editor-email-recommendation-block`
|
|
7
6
|
};
|
|
8
7
|
export {
|