@useinsider/guido 3.18.1-beta.cb31236 → 3.18.1-beta.d0bc5f3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/config/schemas.js +51 -59
- package/dist/components/Guido.vue.js +4 -4
- package/dist/components/Guido.vue2.js +70 -72
- package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +9 -7
- package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +76 -87
- package/dist/components/organisms/extensions/recommendation/RemoveStrategyModal.vue2.js +22 -24
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +26 -28
- package/dist/composables/useCustomInterfaceAppearance.js +42 -46
- package/dist/enums/extensions/recommendationBlock.js +29 -25
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +71 -72
- package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +37 -68
- package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +44 -45
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +119 -105
- package/dist/extensions/Blocks/Recommendation/utils/nodeConfigWriter.js +7 -7
- package/dist/guido.css +1 -1
- package/dist/services/recommendationApi.js +84 -93
- package/dist/src/@types/config/schemas.d.ts +0 -16
- package/dist/src/composables/useConfig.d.ts +0 -4
- package/dist/src/enums/extensions/recommendationBlock.d.ts +2 -3
- package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +0 -1
- package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +0 -4
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +45 -54
- package/dist/src/services/recommendationApi.d.ts +1 -2
- package/dist/src/stores/config.d.ts +0 -322
- package/dist/src/stores/onboarding.d.ts +0 -421
- package/dist/static/styles/components/recommendation-strategy.css.js +41 -74
- package/dist/stores/config.js +60 -74
- package/dist/stores/onboarding.js +1 -6
- package/package.json +1 -1
- package/dist/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.js +0 -18
- package/dist/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue2.js +0 -25
- package/dist/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue.js +0 -21
- package/dist/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue2.js +0 -46
- package/dist/composables/useLegacyStrategyConversion.js +0 -58
- package/dist/extensions/Blocks/Recommendation/utils/legacyStrategyMigration.js +0 -72
- package/dist/src/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.d.ts +0 -2
- package/dist/src/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue.d.ts +0 -2
- package/dist/src/composables/useLegacyStrategyConversion.d.ts +0 -3
- package/dist/src/extensions/Blocks/Recommendation/utils/legacyStrategyMigration.d.ts +0 -44
- package/dist/static/assets/icons/filled-arrow-rising.svg.js +0 -5
- package/dist/static/assets/icons/line-info.svg.js +0 -5
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ModuleFolderDefaults as f } from "../../enums/defaults.js";
|
|
2
|
-
import { object as
|
|
2
|
+
import { object as a, number as n, optional as e, string as t, picklist as i, pipe as m, minLength as b, custom as y, boolean as o, array as c, transform as C, record as k, fallback as R, literal as u, looseObject as g, variant as T, union as h, unknown as r, lazy as I } from "../../node_modules/valibot/dist/index.js";
|
|
3
3
|
const p = {
|
|
4
4
|
/** Promotional/marketing emails */
|
|
5
5
|
PROMOTIONAL: 1,
|
|
@@ -12,7 +12,7 @@ const p = {
|
|
|
12
12
|
ARCHITECT: 49,
|
|
13
13
|
/** Unsubscribe page builder */
|
|
14
14
|
UNSUBSCRIBE_PAGES: 97
|
|
15
|
-
}, A =
|
|
15
|
+
}, A = a({
|
|
16
16
|
/** Unique identifier for the template being edited */
|
|
17
17
|
templateId: m(
|
|
18
18
|
t(),
|
|
@@ -24,21 +24,13 @@ const p = {
|
|
|
24
24
|
b(1, "userId is required")
|
|
25
25
|
),
|
|
26
26
|
/** Optional variation ID for A/B testing */
|
|
27
|
-
variationId: e(t())
|
|
28
|
-
|
|
29
|
-
campaignId: e(t()),
|
|
30
|
-
/**
|
|
31
|
-
* Optional numeric template-library id of the host template; absent for campaigns and
|
|
32
|
-
* modules. Distinct from `templateId`, which is the editor's document identity (a uuid /
|
|
33
|
-
* Stripo doc id) and is never an endpoint id.
|
|
34
|
-
*/
|
|
35
|
-
templateLibraryId: e(t())
|
|
36
|
-
}), L = o({
|
|
27
|
+
variationId: e(t())
|
|
28
|
+
}), L = a({
|
|
37
29
|
/** Fallback font name (e.g., "Georgia") */
|
|
38
30
|
name: t(),
|
|
39
31
|
/** Fallback font family (e.g., "serif" or "sans-serif") */
|
|
40
32
|
family: t()
|
|
41
|
-
}), M =
|
|
33
|
+
}), M = a({
|
|
42
34
|
/** Partner/organization name (required) */
|
|
43
35
|
name: m(
|
|
44
36
|
t(),
|
|
@@ -62,7 +54,7 @@ const p = {
|
|
|
62
54
|
username: e(t(), "Guido User"),
|
|
63
55
|
/** Fallback font settings from partner settings — used to match backend size calculation */
|
|
64
56
|
fallbackFont: e(L)
|
|
65
|
-
}), E =
|
|
57
|
+
}), E = a({
|
|
66
58
|
/** Display text for the dynamic content */
|
|
67
59
|
text: t(),
|
|
68
60
|
/** Template variable value (e.g., {{username}}) */
|
|
@@ -71,12 +63,12 @@ const p = {
|
|
|
71
63
|
fallback: e(t()),
|
|
72
64
|
/** Optional formatting options */
|
|
73
65
|
format: e(
|
|
74
|
-
|
|
66
|
+
a({
|
|
75
67
|
key: t(),
|
|
76
68
|
value: t()
|
|
77
69
|
})
|
|
78
70
|
)
|
|
79
|
-
}), S =
|
|
71
|
+
}), S = I(() => g({
|
|
80
72
|
text: e(t()),
|
|
81
73
|
// eslint-disable-next-line camelcase -- backend field name
|
|
82
74
|
tag_text: e(t()),
|
|
@@ -91,13 +83,13 @@ const p = {
|
|
|
91
83
|
/** Block ID (matches the dictionary key and the legacy HTML element id) */
|
|
92
84
|
id: e(n()),
|
|
93
85
|
/** Decimal places for price display (legacy data may use string or number) */
|
|
94
|
-
decimalCount: e(
|
|
86
|
+
decimalCount: e(h([t(), n()])),
|
|
95
87
|
/** Pinned product IDs (empty array when filter-driven) */
|
|
96
88
|
productIds: e(c(r())),
|
|
97
89
|
/** Whether the block requested live products at send time */
|
|
98
|
-
sendProductRequestFlag: e(
|
|
90
|
+
sendProductRequestFlag: e(o()),
|
|
99
91
|
/** Whether to randomize product order */
|
|
100
|
-
shuffleProducts: e(
|
|
92
|
+
shuffleProducts: e(o()),
|
|
101
93
|
/** Filter rules driving product selection */
|
|
102
94
|
filters: e(c(r())),
|
|
103
95
|
/** Currency code (e.g. 'EUR') — sometimes absent in legacy data */
|
|
@@ -117,22 +109,22 @@ const p = {
|
|
|
117
109
|
/** Mobile-only padding (left) */
|
|
118
110
|
mobileLeftPadding: e(n()),
|
|
119
111
|
/** Disable responsive scaling */
|
|
120
|
-
unresponsive: e(
|
|
112
|
+
unresponsive: e(o()),
|
|
121
113
|
/** Layout orientation ('vertical' | 'horizontal') */
|
|
122
114
|
orientation: e(t()),
|
|
123
115
|
/** Whether long text is trimmed */
|
|
124
|
-
textTrimming: e(
|
|
116
|
+
textTrimming: e(o()),
|
|
125
117
|
/** Block type marker used by some legacy variants */
|
|
126
118
|
blockType: e(t()),
|
|
127
119
|
/** Size variant marker (legacy data may use string or number) */
|
|
128
|
-
size: e(
|
|
120
|
+
size: e(h([t(), n()])),
|
|
129
121
|
/** Vertical responsiveness flag (legacy size=1 variants) */
|
|
130
|
-
verticalResponsiveness: e(
|
|
122
|
+
verticalResponsiveness: e(o()),
|
|
131
123
|
/** Legacy "Move to next line" price placement toggle (cardPricePlacement.js) */
|
|
132
|
-
isPriceMovedToNextLine: e(
|
|
124
|
+
isPriceMovedToNextLine: e(o()),
|
|
133
125
|
/** Legacy "Hide if same as discounted" / delete-price-for-zero-sale toggle */
|
|
134
|
-
isPriceDeletedForZeroSale: e(
|
|
135
|
-
}), v =
|
|
126
|
+
isPriceDeletedForZeroSale: e(o())
|
|
127
|
+
}), v = a({
|
|
136
128
|
/**
|
|
137
129
|
* Legacy recommendation block configs keyed by block ID.
|
|
138
130
|
* Pass this when loading a template authored with the v1
|
|
@@ -143,7 +135,7 @@ const p = {
|
|
|
143
135
|
k(t(), P),
|
|
144
136
|
{}
|
|
145
137
|
)
|
|
146
|
-
}), x =
|
|
138
|
+
}), x = a({
|
|
147
139
|
/** Initial HTML content */
|
|
148
140
|
html: e(t(), ""),
|
|
149
141
|
/** Initial CSS content */
|
|
@@ -165,7 +157,7 @@ const p = {
|
|
|
165
157
|
/** Selected unsubscribe page IDs */
|
|
166
158
|
selectedUnsubscribePages: e(c(n()), []),
|
|
167
159
|
/** Force recreate template in Stripo storage (use true when updating externally modified templates) */
|
|
168
|
-
forceRecreate: e(
|
|
160
|
+
forceRecreate: e(o(), !1),
|
|
169
161
|
/**
|
|
170
162
|
* Consumer-persisted tracking-id high-water mark (SD-141414). Used as the id floor
|
|
171
163
|
* during migration so a rolled-back document never re-mints retired tracking ids.
|
|
@@ -182,12 +174,12 @@ const p = {
|
|
|
182
174
|
),
|
|
183
175
|
/** Migration-only inputs (legacy block configs) */
|
|
184
176
|
migration: e(v, {})
|
|
185
|
-
}), D =
|
|
177
|
+
}), D = a({
|
|
186
178
|
/** Sender display name */
|
|
187
179
|
senderName: e(t(), ""),
|
|
188
180
|
/** Email subject line */
|
|
189
181
|
subject: e(t(), "")
|
|
190
|
-
}), O =
|
|
182
|
+
}), O = a({
|
|
191
183
|
/** Locale for the editor UI */
|
|
192
184
|
locale: e(t(), "en"),
|
|
193
185
|
/** Path to translations object */
|
|
@@ -200,35 +192,35 @@ const p = {
|
|
|
200
192
|
savedModulesFolderName: e(t(), f.SAVED_MODULES),
|
|
201
193
|
/** Folder name for default/prebuilt modules (used by Stripo plugin panel for path construction) */
|
|
202
194
|
defaultModulesFolderName: e(t(), f.DEFAULT_MODULES)
|
|
203
|
-
}), F =
|
|
195
|
+
}), F = a({
|
|
204
196
|
/** Whether to show the header bar */
|
|
205
|
-
showHeader: e(
|
|
197
|
+
showHeader: e(o(), !0),
|
|
206
198
|
/** Custom label for back button (if shown) */
|
|
207
199
|
backButtonLabel: e(t())
|
|
208
|
-
}), U =
|
|
200
|
+
}), U = a({
|
|
209
201
|
/** Enable dynamic content insertion */
|
|
210
|
-
dynamicContent: e(
|
|
202
|
+
dynamicContent: e(o(), !0),
|
|
211
203
|
/** Enable save as template functionality */
|
|
212
|
-
saveAsTemplate: e(
|
|
204
|
+
saveAsTemplate: e(o(), !0),
|
|
213
205
|
/** Enable version history */
|
|
214
|
-
versionHistory: e(
|
|
206
|
+
versionHistory: e(o(), !0),
|
|
215
207
|
/** Enable test message sending */
|
|
216
|
-
testMessage: e(
|
|
208
|
+
testMessage: e(o(), !0),
|
|
217
209
|
/** Enable display conditions */
|
|
218
|
-
displayConditions: e(
|
|
210
|
+
displayConditions: e(o(), !0),
|
|
219
211
|
/** Enable unsubscribe block */
|
|
220
|
-
unsubscribe: e(
|
|
212
|
+
unsubscribe: e(o(), !0),
|
|
221
213
|
/** Disable modules panel in the editor */
|
|
222
|
-
modulesDisabled: e(
|
|
214
|
+
modulesDisabled: e(o(), !1),
|
|
223
215
|
/** Enable Liquid template syntax */
|
|
224
|
-
liquidSyntax: e(
|
|
216
|
+
liquidSyntax: e(o(), !1),
|
|
225
217
|
/** Enable autosave (3-min interval + tab-hide). User toggles on/off from the header. */
|
|
226
|
-
autosave: e(
|
|
218
|
+
autosave: e(o(), !1),
|
|
227
219
|
/** Enable pre-save domain-allowlist validation (opt-in; Guido self-serves the block toaster) */
|
|
228
|
-
allowlistEnabled: e(
|
|
220
|
+
allowlistEnabled: e(o(), !1),
|
|
229
221
|
/** Enable persistent link tracking-id assignment for the click heatmap (opt-in) */
|
|
230
|
-
linkTrackingIds: e(
|
|
231
|
-
reusableRecommendationStrategy: e(
|
|
222
|
+
linkTrackingIds: e(o(), !1),
|
|
223
|
+
reusableRecommendationStrategy: e(o(), !1)
|
|
232
224
|
}), B = i([
|
|
233
225
|
"amp-accordion",
|
|
234
226
|
"amp-carousel",
|
|
@@ -251,7 +243,7 @@ const p = {
|
|
|
251
243
|
"unsubscribe-block",
|
|
252
244
|
"coupon-block",
|
|
253
245
|
"items-block"
|
|
254
|
-
]), H =
|
|
246
|
+
]), H = a({
|
|
255
247
|
/** Default blocks to exclude from the editor */
|
|
256
248
|
excludeDefaults: e(
|
|
257
249
|
c(B),
|
|
@@ -262,14 +254,14 @@ const p = {
|
|
|
262
254
|
c(w),
|
|
263
255
|
[]
|
|
264
256
|
)
|
|
265
|
-
}), d =
|
|
257
|
+
}), d = a({
|
|
266
258
|
/** Unique identifier for the rule */
|
|
267
259
|
id: t(),
|
|
268
260
|
/** Human-readable description */
|
|
269
261
|
description: e(t()),
|
|
270
262
|
/** Priority for rule ordering (lower = earlier) */
|
|
271
263
|
priority: n()
|
|
272
|
-
}), _ =
|
|
264
|
+
}), _ = a({
|
|
273
265
|
...d.entries,
|
|
274
266
|
type: u("replace"),
|
|
275
267
|
/** String to search for */
|
|
@@ -277,8 +269,8 @@ const p = {
|
|
|
277
269
|
/** Replacement string */
|
|
278
270
|
replacement: t(),
|
|
279
271
|
/** Replace all occurrences (default: false) */
|
|
280
|
-
replaceAll: e(
|
|
281
|
-
}), j =
|
|
272
|
+
replaceAll: e(o())
|
|
273
|
+
}), j = a({
|
|
282
274
|
...d.entries,
|
|
283
275
|
type: u("regex"),
|
|
284
276
|
/** Regex pattern string */
|
|
@@ -287,41 +279,41 @@ const p = {
|
|
|
287
279
|
replacement: t(),
|
|
288
280
|
/** Regex flags (e.g., 'gi') */
|
|
289
281
|
flags: e(t())
|
|
290
|
-
}), q =
|
|
282
|
+
}), q = a({
|
|
291
283
|
...d.entries,
|
|
292
284
|
type: u("remove"),
|
|
293
285
|
/** Strings or patterns to remove */
|
|
294
286
|
targets: c(t())
|
|
295
|
-
}), G =
|
|
287
|
+
}), G = a({
|
|
296
288
|
...d.entries,
|
|
297
289
|
type: u("custom"),
|
|
298
290
|
/** Custom processor function */
|
|
299
|
-
processor:
|
|
291
|
+
processor: y(
|
|
300
292
|
(s) => typeof s == "function",
|
|
301
293
|
"processor must be a function"
|
|
302
294
|
)
|
|
303
|
-
}), V =
|
|
295
|
+
}), V = T("type", [
|
|
304
296
|
_,
|
|
305
297
|
j,
|
|
306
298
|
q,
|
|
307
299
|
G
|
|
308
|
-
]), z =
|
|
300
|
+
]), z = a({
|
|
309
301
|
/** Custom compiler rules to apply */
|
|
310
302
|
customRules: e(c(V), []),
|
|
311
303
|
/** Skip default compiler rules */
|
|
312
|
-
ignoreDefaultRules: e(
|
|
313
|
-
}), Z =
|
|
304
|
+
ignoreDefaultRules: e(o(), !1)
|
|
305
|
+
}), Z = a({
|
|
314
306
|
/**
|
|
315
307
|
* External validation handler called before save completes.
|
|
316
308
|
* Return false to cancel the save operation.
|
|
317
309
|
*/
|
|
318
310
|
externalValidation: e(
|
|
319
|
-
|
|
311
|
+
y(
|
|
320
312
|
(s) => typeof s == "function",
|
|
321
313
|
"externalValidation must be a function"
|
|
322
314
|
)
|
|
323
315
|
)
|
|
324
|
-
}), Q =
|
|
316
|
+
}), Q = a({
|
|
325
317
|
// Required sections
|
|
326
318
|
/** Identity configuration (required) */
|
|
327
319
|
identity: A,
|
|
@@ -3,7 +3,7 @@ import o from "./Guido.vue2.js";
|
|
|
3
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.FilterSelectionDrawer), e.isRrsEnabled || e.hasAssignedStrategy ? r(e.AssignStrategyDrawer) : a._e(), e.isRrsEnabled || e.hasAssignedStrategy ? r(e.RemoveStrategyModal) : a._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.FilterSelectionDrawer), e.isRrsEnabled || e.hasAssignedStrategy ? r(e.AssignStrategyDrawer) : a._e(), e.isRrsEnabled || e.hasAssignedStrategy ? r(e.RemoveStrategyModal) : a._e(), r(e.SaveAsTemplateDrawer), 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
9
|
}, s = [], n = /* @__PURE__ */ i(
|
|
@@ -12,9 +12,9 @@ var t = function() {
|
|
|
12
12
|
s,
|
|
13
13
|
!1,
|
|
14
14
|
null,
|
|
15
|
-
"
|
|
15
|
+
"cc5ee925"
|
|
16
16
|
);
|
|
17
|
-
const
|
|
17
|
+
const v = n.exports;
|
|
18
18
|
export {
|
|
19
|
-
|
|
19
|
+
v as default
|
|
20
20
|
};
|
|
@@ -1,31 +1,31 @@
|
|
|
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 { useStripo as
|
|
8
|
-
import { useTimerClone as
|
|
9
|
-
import { migrate as
|
|
10
|
-
import { ModuleFolderDefaults as
|
|
11
|
-
import { RIBBON_SELECTOR as
|
|
12
|
-
import { useRecommendationExtensionStore as
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import { useStripoApi as
|
|
21
|
-
import { useConfigStore as
|
|
22
|
-
import { useDynamicContentStore as
|
|
1
|
+
import { defineComponent as ne, defineAsyncComponent as l, ref as O, computed as u, watch as x, onMounted as re, onUnmounted as se } from "vue";
|
|
2
|
+
import { useCortexBlueprintBridge as ae } from "../composables/useCortexBlueprintBridge.js";
|
|
3
|
+
import { useEditorLock as ie } from "../composables/useEditorLock.js";
|
|
4
|
+
import { provideGuidoActions as ce } from "../composables/useGuidoActions.js";
|
|
5
|
+
import { useGuidoStateBridge as de } from "../composables/useGuidoStateBridge.js";
|
|
6
|
+
import { usePartner as me } from "../composables/usePartner.js";
|
|
7
|
+
import { useStripo as le } from "../composables/useStripo.js";
|
|
8
|
+
import { useTimerClone as ue } from "../composables/useTimerClone.js";
|
|
9
|
+
import { migrate as W } from "../config/migrator/index.js";
|
|
10
|
+
import { ModuleFolderDefaults as G } from "../enums/defaults.js";
|
|
11
|
+
import { RIBBON_SELECTOR as pe } from "../enums/onboarding.js";
|
|
12
|
+
import { useRecommendationExtensionStore as h } from "../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
13
|
+
import fe from "./organisms/AutoSaveController.vue.js";
|
|
14
|
+
import ye from "./organisms/base/Toaster.vue.js";
|
|
15
|
+
import ge from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
|
|
16
|
+
import ve from "./organisms/header/HeaderWrapper.vue.js";
|
|
17
|
+
import Se from "./organisms/LoadingWrapper.vue.js";
|
|
18
|
+
import be from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
|
|
19
|
+
import he from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
|
|
20
|
+
import { useStripoApi as Ee } from "../services/stripoApi.js";
|
|
21
|
+
import { useConfigStore as we } from "../stores/config.js";
|
|
22
|
+
import { useDynamicContentStore as Ce } from "../stores/dynamic-content.js";
|
|
23
23
|
import { useEditorStore as H } from "../stores/editor.js";
|
|
24
|
-
import { usePreviewStore as
|
|
25
|
-
import { useTemplateStore as
|
|
26
|
-
import { useUnsubscribeStore as
|
|
24
|
+
import { usePreviewStore as De } from "../stores/preview.js";
|
|
25
|
+
import { useTemplateStore as ke } from "../stores/template.js";
|
|
26
|
+
import { useUnsubscribeStore as Te } from "../stores/unsubscribe.js";
|
|
27
27
|
import { readTrackFloor as $ } from "../utils/linkTrackingIds.js";
|
|
28
|
-
const
|
|
28
|
+
const et = /* @__PURE__ */ ne({
|
|
29
29
|
__name: "Guido",
|
|
30
30
|
props: {
|
|
31
31
|
config: null,
|
|
@@ -33,25 +33,23 @@ const tt = /* @__PURE__ */ re({
|
|
|
33
33
|
},
|
|
34
34
|
emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
|
|
35
35
|
setup(z, { expose: q, emit: r }) {
|
|
36
|
-
const a = z, K =
|
|
36
|
+
const a = z, K = l(
|
|
37
37
|
() => import("./organisms/email-preview/PreviewContainer.vue.js")
|
|
38
|
-
), V =
|
|
38
|
+
), V = l(
|
|
39
39
|
() => import("./organisms/onboarding/OnboardingWrapper.vue.js")
|
|
40
|
-
), j =
|
|
40
|
+
), j = l(
|
|
41
41
|
() => import("./organisms/extensions/recommendation/AssignStrategyDrawer.vue.js")
|
|
42
|
-
), J =
|
|
42
|
+
), J = l(
|
|
43
43
|
() => import("./organisms/extensions/recommendation/RemoveStrategyModal.vue.js")
|
|
44
|
-
),
|
|
45
|
-
() => import("./organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.js")
|
|
46
|
-
), h = O(), p = O(), f = De(), E = Fe(), o = Ce();
|
|
44
|
+
), E = O(), p = O(), f = Ce(), w = Te(), o = we();
|
|
47
45
|
a.ready && o.init(a.config);
|
|
48
|
-
const c = H(),
|
|
46
|
+
const c = H(), Q = De(), m = u(() => c.hasChanges), { isTestPartner: X } = me(), C = () => {
|
|
49
47
|
var t;
|
|
50
|
-
return (t =
|
|
51
|
-
},
|
|
48
|
+
return (t = E.value) == null ? void 0 : t.handleSave(!0);
|
|
49
|
+
}, D = (t) => {
|
|
52
50
|
c.loadingStatus = t;
|
|
53
51
|
};
|
|
54
|
-
|
|
52
|
+
ae(), de();
|
|
55
53
|
const y = () => {
|
|
56
54
|
var t, e;
|
|
57
55
|
return {
|
|
@@ -59,18 +57,18 @@ const tt = /* @__PURE__ */ re({
|
|
|
59
57
|
userId: o.userId,
|
|
60
58
|
username: o.username,
|
|
61
59
|
partnerName: o.partnerName,
|
|
62
|
-
savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) ||
|
|
63
|
-
defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) ||
|
|
60
|
+
savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) || G.SAVED_MODULES,
|
|
61
|
+
defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) || G.DEFAULT_MODULES
|
|
64
62
|
};
|
|
65
|
-
}, { initPlugin:
|
|
63
|
+
}, { initPlugin: k, preloadRuntime: T } = le(), { runExclusive: F, beginMount: R, isCurrentMount: I } = ie();
|
|
66
64
|
let g = 0;
|
|
67
|
-
const { getDefaultTemplate:
|
|
65
|
+
const { getDefaultTemplate: M } = Ee(), { cloneTimersOnSave: L, hasTimerBlocks: B } = ue(), Y = u(() => {
|
|
68
66
|
var t;
|
|
69
67
|
return !((t = o.ui) != null && t.showHeader);
|
|
70
|
-
}),
|
|
71
|
-
() => !!
|
|
68
|
+
}), Z = u(() => o.isFeatureEnabled("reusableRecommendationStrategy")), ee = u(
|
|
69
|
+
() => !!h().recommendationConfigs.strategyId
|
|
72
70
|
);
|
|
73
|
-
|
|
71
|
+
ce({
|
|
74
72
|
onBack: () => {
|
|
75
73
|
console.debug("guido:back"), r("back");
|
|
76
74
|
},
|
|
@@ -85,13 +83,13 @@ const tt = /* @__PURE__ */ re({
|
|
|
85
83
|
console.debug("guido:test-email:click"), r("test-email:click");
|
|
86
84
|
}
|
|
87
85
|
});
|
|
88
|
-
const
|
|
86
|
+
const A = (t) => {
|
|
89
87
|
console.debug("dynamic-content:close", t), f.setSelectedDynamicContent(t), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: t }));
|
|
90
|
-
},
|
|
88
|
+
}, P = () => {
|
|
91
89
|
console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
|
|
92
90
|
};
|
|
93
|
-
|
|
94
|
-
r("on-change",
|
|
91
|
+
x(() => m.value, () => {
|
|
92
|
+
r("on-change", m.value);
|
|
95
93
|
});
|
|
96
94
|
const v = (t) => {
|
|
97
95
|
const e = t, { attribute: s, position: d } = e.detail;
|
|
@@ -100,48 +98,48 @@ const tt = /* @__PURE__ */ re({
|
|
|
100
98
|
let i = null;
|
|
101
99
|
const S = () => {
|
|
102
100
|
var e;
|
|
103
|
-
const t = document.querySelector(
|
|
101
|
+
const t = document.querySelector(pe);
|
|
104
102
|
(e = p.value) == null || e.style.setProperty("--ribbon-offset", `${(t == null ? void 0 : t.offsetHeight) ?? 0}px`);
|
|
105
103
|
}, b = async () => {
|
|
106
104
|
var t;
|
|
107
105
|
try {
|
|
108
106
|
o.initialized || o.init(a.config), c.templateId = o.templateId;
|
|
109
|
-
const e = o.template, s = (e == null ? void 0 : e.html) || "", d = (e == null ? void 0 : e.css) || "",
|
|
110
|
-
|
|
107
|
+
const e = o.template, s = (e == null ? void 0 : e.html) || "", d = (e == null ? void 0 : e.css) || "", U = (e == null ? void 0 : e.preselectedDynamicContent) || [];
|
|
108
|
+
w.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
|
|
111
109
|
const _ = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {}, N = o.isFeatureEnabled("linkTrackingIds");
|
|
112
110
|
let n = {
|
|
113
|
-
html: s && await
|
|
111
|
+
html: s && await W(s, _),
|
|
114
112
|
css: d
|
|
115
113
|
};
|
|
116
|
-
n.html || (n = await
|
|
117
|
-
const
|
|
118
|
-
|
|
119
|
-
const
|
|
120
|
-
preselectedDynamicContentList:
|
|
114
|
+
n.html || (n = await M(), n.html = await W(n.html, _));
|
|
115
|
+
const te = N ? $(n.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
|
|
116
|
+
B(n.html) && (n.html = await L(n.html)), N && (c.trackIdSessionFloor = Math.max(te, $(n.html)));
|
|
117
|
+
const oe = {
|
|
118
|
+
preselectedDynamicContentList: U,
|
|
121
119
|
onReady: () => {
|
|
122
120
|
console.debug("guido:ready"), r("ready");
|
|
123
121
|
}
|
|
124
122
|
};
|
|
125
|
-
g =
|
|
123
|
+
g = R(), await k(n, y(), oe), f.selectedDynamicContentList = U;
|
|
126
124
|
} catch (e) {
|
|
127
125
|
console.error("Failed to initialize Stripo editor:", e);
|
|
128
126
|
}
|
|
129
127
|
};
|
|
130
|
-
return
|
|
128
|
+
return re(async () => {
|
|
131
129
|
var e;
|
|
132
|
-
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"),
|
|
130
|
+
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), h().$reset(), H().$reset(), ke().$reset(), S();
|
|
133
131
|
const t = (e = p.value) == null ? void 0 : e.parentElement;
|
|
134
|
-
if (t && (i = new ResizeObserver(S), i.observe(t)),
|
|
132
|
+
if (t && (i = new ResizeObserver(S), i.observe(t)), T(), a.ready)
|
|
135
133
|
await b();
|
|
136
134
|
else {
|
|
137
|
-
const s =
|
|
135
|
+
const s = x(() => a.ready, (d) => {
|
|
138
136
|
d && (s(), b());
|
|
139
137
|
});
|
|
140
138
|
}
|
|
141
139
|
document.addEventListener("dynamic-content:open", v);
|
|
142
|
-
}),
|
|
143
|
-
i == null || i.disconnect(), document.removeEventListener("dynamic-content:open", v),
|
|
144
|
-
if (
|
|
140
|
+
}), se(() => {
|
|
141
|
+
i == null || i.disconnect(), document.removeEventListener("dynamic-content:open", v), h().disposeStrategyPageReturn(), F(async () => {
|
|
142
|
+
if (I(g))
|
|
145
143
|
try {
|
|
146
144
|
window.UIEditor.removeEditor();
|
|
147
145
|
} catch {
|
|
@@ -150,15 +148,15 @@ const tt = /* @__PURE__ */ re({
|
|
|
150
148
|
}), o.reset();
|
|
151
149
|
}), q({
|
|
152
150
|
dynamicContent: {
|
|
153
|
-
insert:
|
|
154
|
-
close:
|
|
151
|
+
insert: A,
|
|
152
|
+
close: P
|
|
155
153
|
},
|
|
156
|
-
hasChanges:
|
|
157
|
-
saveSilent:
|
|
158
|
-
setLoading:
|
|
159
|
-
}), { __sfc: !0, PreviewContainer: K, OnboardingWrapper: V, AssignStrategyDrawer: j, RemoveStrategyModal: J,
|
|
154
|
+
hasChanges: m,
|
|
155
|
+
saveSilent: C,
|
|
156
|
+
setLoading: D
|
|
157
|
+
}), { __sfc: !0, PreviewContainer: K, OnboardingWrapper: V, AssignStrategyDrawer: j, RemoveStrategyModal: J, headerWrapperRef: E, wrapperRef: p, dynamicContentStore: f, unsubscribeStore: w, props: a, configStore: o, editorStore: c, previewStore: Q, hasChanges: m, isTestPartner: X, saveSilent: C, setLoading: D, emit: r, buildMetadata: y, initPlugin: k, preloadRuntime: T, runExclusive: F, beginMount: R, isCurrentMount: I, mountGeneration: g, getDefaultTemplate: M, cloneTimersOnSave: L, hasTimerBlocks: B, noHeader: Y, isRrsEnabled: Z, hasAssignedStrategy: ee, insertDynamicContent: A, closeDynamicContent: P, handleDynamicContentOpen: v, ribbonObserver: i, updateRibbonOffset: S, startEditor: b, AutoSaveController: fe, Toaster: ye, FilterSelectionDrawer: ge, HeaderWrapper: ve, LoadingWrapper: Se, SaveAsTemplateDrawer: be, UnsubscribeWrapper: he };
|
|
160
158
|
}
|
|
161
159
|
});
|
|
162
160
|
export {
|
|
163
|
-
|
|
161
|
+
et as default
|
|
164
162
|
};
|
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
import
|
|
1
|
+
import s from "./AssignStrategyDrawer.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
4
|
import o from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
5
5
|
var a = function() {
|
|
6
|
-
var e = this,
|
|
7
|
-
return t.store.assignStrategyDrawerStatus ?
|
|
8
|
-
return [
|
|
9
|
-
|
|
6
|
+
var e = this, r = e._self._c, t = e._self._setupProxy;
|
|
7
|
+
return t.store.assignStrategyDrawerStatus ? r(t.OrgStrategyDetailModal, { staticClass: "assign-strategy-drawer", attrs: { "description-status": "", show: "", "description-text": t.drawerDescription, "footer-button-group-options": t.footerButtonGroupOptions, strategy: t.selectedStrategy ?? {}, "title-text": t.trans("gpt-app-builder.assign-recommendation-strategy") }, on: { close: t.closeDrawer, primaryClick: t.assignStrategy }, scopedSlots: e._u([{ key: "contentTop", fn: function() {
|
|
8
|
+
return [r("div", { staticClass: "assign-strategy-drawer-content px-5 py-5" }, [r(t.OrgStrategyDropdown, { staticClass: "assign-strategy-select", attrs: { id: "assign-strategy-select", "create-button-visible": "", "info-box-position": "bottom right", loading: t.store.strategiesLoading, "placeholder-text": t.trans("smart-recommender.select-recommendation-strategy"), "selected-strategy-id": t.selectedStrategyId, state: t.showSelectionError ? "error" : "default", "state-message": t.showSelectionError ? t.trans("ds-steps.select-strategy-tooltip") : "", strategies: t.strategyOptions }, on: { create: function(l) {
|
|
9
|
+
return t.store.openStrategyCreation();
|
|
10
|
+
}, infoBoxButtonClick: t.onInfoBoxButtonClick, select: t.onSelect } })], 1)];
|
|
11
|
+
}, proxy: !0 }], null, !1, 1517791821) }) : e._e();
|
|
10
12
|
}, n = [], i = /* @__PURE__ */ o(
|
|
11
|
-
|
|
13
|
+
s,
|
|
12
14
|
a,
|
|
13
15
|
n,
|
|
14
16
|
!1,
|
|
15
17
|
null,
|
|
16
|
-
"
|
|
18
|
+
"3bcefe18"
|
|
17
19
|
);
|
|
18
20
|
const y = i.exports;
|
|
19
21
|
export {
|