@useinsider/guido 3.18.2-beta.ec25841 → 3.18.2-beta.eedafd2
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 +1 -0
- package/dist/@types/config/schemas.js +28 -26
- package/dist/components/Guido.vue.js +6 -6
- package/dist/components/Guido.vue2.js +72 -70
- package/dist/components/organisms/AutoSaveController.vue2.js +9 -8
- package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +11 -13
- package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +52 -70
- package/dist/components/organisms/extensions/recommendation/RemoveStrategyModal.vue2.js +37 -23
- package/dist/components/organisms/header/EditorActions.vue.js +2 -2
- package/dist/components/organisms/header/EditorActions.vue2.js +86 -56
- package/dist/components/organisms/header/LeftSlot.vue.js +5 -5
- package/dist/components/organisms/header/LeftSlot.vue2.js +16 -12
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +18 -20
- package/dist/components/organisms/save-as-template/SaveAsTemplateDrawer.vue2.js +34 -34
- package/dist/components/organisms/validation/ValidationErrorDrawer.vue.js +20 -0
- package/dist/components/organisms/validation/ValidationErrorDrawer.vue2.js +48 -0
- package/dist/components/wrappers/WpDrawer.vue.js +9 -7
- package/dist/components/wrappers/WpDrawer.vue2.js +1 -1
- package/dist/composables/useCustomInterfaceAppearance.js +46 -56
- package/dist/composables/useHtmlCompiler.js +37 -26
- package/dist/composables/useHtmlValidator.js +81 -84
- package/dist/composables/useHttp.js +24 -22
- package/dist/composables/useRecommendation.js +35 -40
- package/dist/composables/useSave.js +90 -45
- package/dist/composables/useSaveValidation.js +279 -0
- package/dist/composables/useSaveValidationRollout.js +9 -0
- package/dist/composables/useStripo.js +30 -30
- package/dist/composables/validators/useCouponBlockValidator.js +24 -21
- package/dist/composables/validators/useUnsubscribeBlockValidator.js +34 -27
- package/dist/enums/extensions/recommendationBlock.js +31 -38
- package/dist/enums/save-validation.js +4 -0
- package/dist/extensions/Blocks/Recommendation/block.js +39 -43
- package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +20 -21
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +33 -38
- package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +52 -84
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +78 -168
- package/dist/extensions/Blocks/Recommendation/validation/requiredFields.js +12 -21
- package/dist/guido.css +1 -1
- package/dist/services/templateLibraryApi.js +17 -14
- package/dist/src/@types/config/schemas.d.ts +4 -0
- package/dist/src/@types/save-validation.d.ts +19 -0
- package/dist/src/components/Guido.vue.d.ts +17 -1
- package/dist/src/components/organisms/header/EditorActions.vue.d.ts +17 -1
- package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +17 -1
- package/dist/src/components/organisms/header/RightSlot.vue.d.ts +17 -1
- package/dist/src/components/wrappers/WpDrawer.vue.d.ts +4 -3
- package/dist/src/composables/useConfig.d.ts +2 -0
- package/dist/src/composables/useHtmlValidator.d.ts +21 -0
- package/dist/src/composables/useSave.d.ts +6 -1
- package/dist/src/composables/useSaveValidation.d.ts +6 -0
- package/dist/src/composables/useSaveValidationRollout.d.ts +3 -0
- package/dist/src/composables/validators/useCouponBlockValidator.d.ts +3 -0
- package/dist/src/composables/validators/useUnsubscribeBlockValidator.d.ts +10 -0
- package/dist/src/enums/extensions/recommendationBlock.d.ts +0 -2
- package/dist/src/enums/save-validation.d.ts +27 -0
- package/dist/src/extensions/Blocks/Recommendation/constants/defaultConfig.d.ts +0 -1
- package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +0 -2
- package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +0 -9
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +3 -73
- package/dist/src/extensions/Blocks/Recommendation/validation/requiredFields.d.ts +0 -4
- package/dist/src/stores/config.d.ts +30 -0
- package/dist/src/stores/onboarding.d.ts +0 -377
- package/dist/src/stores/save-validation.d.ts +22 -0
- package/dist/src/utils/genericUtil.d.ts +6 -0
- package/dist/src/utils/liquidDynamicContent.d.ts +20 -0
- package/dist/src/utils/templatePreparation.d.ts +30 -0
- package/dist/static/styles/components/recommendation-strategy.css.js +4 -34
- package/dist/stores/config.js +39 -22
- package/dist/stores/onboarding.js +36 -41
- package/dist/stores/save-validation.js +30 -0
- package/dist/utils/genericUtil.js +63 -54
- package/dist/utils/liquidDynamicContent.js +15 -0
- package/dist/utils/templatePreparation.js +63 -59
- package/package.json +1 -1
- package/dist/components/organisms/onboarding/RecommendationStrategyOnboarding.vue.js +0 -21
- package/dist/components/organisms/onboarding/RecommendationStrategyOnboarding.vue2.js +0 -47
- package/dist/extensions/Blocks/Recommendation/utils/strategyDetach.js +0 -19
- package/dist/src/extensions/Blocks/Recommendation/utils/strategyDetach.d.ts +0 -12
- package/dist/static/styles/components/skeleton.css.js +0 -23
- /package/dist/src/components/organisms/{onboarding/RecommendationStrategyOnboarding.vue.d.ts → validation/ValidationErrorDrawer.vue.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -162,6 +162,7 @@ const config: GuidoConfigInput = {
|
|
|
162
162
|
liquidSyntax?: boolean, // Default: false - Enable Liquid template syntax
|
|
163
163
|
autosave?: boolean, // Default: false - Show the Auto Save toggle in the header. See wiki/AUTOSAVE.md.
|
|
164
164
|
allowlistEnabled?: boolean, // Default: false - Pre-save domain-allowlist check (opt-in). Guido self-serves the block toaster (role lookup, deep-link, copy from window.trans).
|
|
165
|
+
allowSaveWithErrors?: boolean, // Default: true - Allow the validation drawer's "Save and Continue" soft-save. Set false to hard-block invalid saves (transactional + unsubscribe pages).
|
|
165
166
|
reusableRecommendationStrategy?: boolean, // Default: false - Assign an RRS strategy to recommendation blocks instead of per-block algorithm/filters/shuffle/product-count settings.
|
|
166
167
|
},
|
|
167
168
|
|
|
@@ -30,7 +30,7 @@ const p = {
|
|
|
30
30
|
name: t(),
|
|
31
31
|
/** Fallback font family (e.g., "serif" or "sans-serif") */
|
|
32
32
|
family: t()
|
|
33
|
-
}),
|
|
33
|
+
}), E = a({
|
|
34
34
|
/** Partner/organization name (required) */
|
|
35
35
|
name: m(
|
|
36
36
|
t(),
|
|
@@ -54,7 +54,7 @@ const p = {
|
|
|
54
54
|
username: e(t(), "Guido User"),
|
|
55
55
|
/** Fallback font settings from partner settings — used to match backend size calculation */
|
|
56
56
|
fallbackFont: e(L)
|
|
57
|
-
}),
|
|
57
|
+
}), M = a({
|
|
58
58
|
/** Display text for the dynamic content */
|
|
59
59
|
text: t(),
|
|
60
60
|
/** Template variable value (e.g., {{username}}) */
|
|
@@ -76,10 +76,10 @@ const p = {
|
|
|
76
76
|
children: e(c(S)),
|
|
77
77
|
// eslint-disable-next-line camelcase -- backend field name
|
|
78
78
|
select_items: e(c(S))
|
|
79
|
-
})),
|
|
79
|
+
})), v = k(
|
|
80
80
|
t(),
|
|
81
81
|
R(c(S), [])
|
|
82
|
-
),
|
|
82
|
+
), N = g({
|
|
83
83
|
/** Block ID (matches the dictionary key and the legacy HTML element id) */
|
|
84
84
|
id: e(n()),
|
|
85
85
|
/** Decimal places for price display (legacy data may use string or number) */
|
|
@@ -124,7 +124,7 @@ const p = {
|
|
|
124
124
|
isPriceMovedToNextLine: e(o()),
|
|
125
125
|
/** Legacy "Hide if same as discounted" / delete-price-for-zero-sale toggle */
|
|
126
126
|
isPriceDeletedForZeroSale: e(o())
|
|
127
|
-
}),
|
|
127
|
+
}), P = a({
|
|
128
128
|
/**
|
|
129
129
|
* Legacy recommendation block configs keyed by block ID.
|
|
130
130
|
* Pass this when loading a template authored with the v1
|
|
@@ -132,7 +132,7 @@ const p = {
|
|
|
132
132
|
* strategy, currency, locale, and layout data.
|
|
133
133
|
*/
|
|
134
134
|
recommendationConfigs: e(
|
|
135
|
-
k(t(),
|
|
135
|
+
k(t(), N),
|
|
136
136
|
{}
|
|
137
137
|
)
|
|
138
138
|
}), x = a({
|
|
@@ -142,7 +142,7 @@ const p = {
|
|
|
142
142
|
css: e(t(), ""),
|
|
143
143
|
/** Preselected dynamic content items */
|
|
144
144
|
preselectedDynamicContent: e(
|
|
145
|
-
c(
|
|
145
|
+
c(M),
|
|
146
146
|
[]
|
|
147
147
|
),
|
|
148
148
|
/**
|
|
@@ -151,7 +151,7 @@ const p = {
|
|
|
151
151
|
* (first) partner's leaf attributes into the label→token map that repairs
|
|
152
152
|
* label-form placeholders (`{{ Phone Number }}`) in dropped saved modules.
|
|
153
153
|
*/
|
|
154
|
-
dynamicContentList: e(
|
|
154
|
+
dynamicContentList: e(v, {}),
|
|
155
155
|
/** Valid custom field attribute names from the partner's categorized fields */
|
|
156
156
|
customFieldAttributes: e(c(t()), []),
|
|
157
157
|
/** Selected unsubscribe page IDs */
|
|
@@ -173,7 +173,7 @@ const p = {
|
|
|
173
173
|
0
|
|
174
174
|
),
|
|
175
175
|
/** Migration-only inputs (legacy block configs) */
|
|
176
|
-
migration: e(
|
|
176
|
+
migration: e(P, {})
|
|
177
177
|
}), D = a({
|
|
178
178
|
/** Sender display name */
|
|
179
179
|
senderName: e(t(), ""),
|
|
@@ -220,8 +220,10 @@ const p = {
|
|
|
220
220
|
allowlistEnabled: e(o(), !1),
|
|
221
221
|
/** Enable persistent link tracking-id assignment for the click heatmap (opt-in) */
|
|
222
222
|
linkTrackingIds: e(o(), !1),
|
|
223
|
+
/** Allow persisting a template that still has validation errors (drawer "Save and Continue" soft-save). Host sets false for transactional + unsubscribe. */
|
|
224
|
+
allowSaveWithErrors: e(o(), !0),
|
|
223
225
|
reusableRecommendationStrategy: e(o(), !1)
|
|
224
|
-
}),
|
|
226
|
+
}), w = i([
|
|
225
227
|
"amp-accordion",
|
|
226
228
|
"amp-carousel",
|
|
227
229
|
"amp-form-controls",
|
|
@@ -235,7 +237,7 @@ const p = {
|
|
|
235
237
|
"text-block",
|
|
236
238
|
"timer-block",
|
|
237
239
|
"video-block"
|
|
238
|
-
]),
|
|
240
|
+
]), B = i([
|
|
239
241
|
"dynamic-content",
|
|
240
242
|
"checkbox-block",
|
|
241
243
|
"radio-button-block",
|
|
@@ -246,12 +248,12 @@ const p = {
|
|
|
246
248
|
]), H = a({
|
|
247
249
|
/** Default blocks to exclude from the editor */
|
|
248
250
|
excludeDefaults: e(
|
|
249
|
-
c(
|
|
251
|
+
c(w),
|
|
250
252
|
[]
|
|
251
253
|
),
|
|
252
254
|
/** Custom blocks to include in the editor */
|
|
253
255
|
includeCustoms: e(
|
|
254
|
-
c(
|
|
256
|
+
c(B),
|
|
255
257
|
[]
|
|
256
258
|
)
|
|
257
259
|
}), d = a({
|
|
@@ -302,7 +304,7 @@ const p = {
|
|
|
302
304
|
customRules: e(c(V), []),
|
|
303
305
|
/** Skip default compiler rules */
|
|
304
306
|
ignoreDefaultRules: e(o(), !1)
|
|
305
|
-
}),
|
|
307
|
+
}), W = a({
|
|
306
308
|
/**
|
|
307
309
|
* External validation handler called before save completes.
|
|
308
310
|
* Return false to cancel the save operation.
|
|
@@ -313,12 +315,12 @@ const p = {
|
|
|
313
315
|
"externalValidation must be a function"
|
|
314
316
|
)
|
|
315
317
|
)
|
|
316
|
-
}),
|
|
318
|
+
}), K = a({
|
|
317
319
|
// Required sections
|
|
318
320
|
/** Identity configuration (required) */
|
|
319
321
|
identity: A,
|
|
320
322
|
/** Partner configuration (required) */
|
|
321
|
-
partner:
|
|
323
|
+
partner: E,
|
|
322
324
|
// Optional sections (with defaults)
|
|
323
325
|
/** Template content and presets */
|
|
324
326
|
template: e(x, {}),
|
|
@@ -333,33 +335,33 @@ const p = {
|
|
|
333
335
|
/** Compiler configuration */
|
|
334
336
|
compiler: e(z, {}),
|
|
335
337
|
/** Callbacks and event handlers */
|
|
336
|
-
callbacks: e(
|
|
338
|
+
callbacks: e(W, {})
|
|
337
339
|
});
|
|
338
340
|
export {
|
|
339
341
|
H as BlocksSchema,
|
|
340
|
-
|
|
342
|
+
W as CallbacksSchema,
|
|
341
343
|
V as CompilerRuleSchema,
|
|
342
344
|
z as CompilerSchema,
|
|
343
|
-
|
|
345
|
+
B as CustomBlockTypeSchema,
|
|
344
346
|
G as CustomRuleSchema,
|
|
345
|
-
|
|
346
|
-
|
|
347
|
+
w as DefaultBlockTypeSchema,
|
|
348
|
+
v as DynamicContentListSchema,
|
|
347
349
|
S as DynamicContentNodeSchema,
|
|
348
|
-
|
|
350
|
+
M as DynamicContentSchema,
|
|
349
351
|
O as EditorSchema,
|
|
350
352
|
D as EmailHeaderSchema,
|
|
351
353
|
L as FallbackFontSchema,
|
|
352
354
|
U as FeaturesSchema,
|
|
353
|
-
|
|
355
|
+
K as GuidoConfigSchema,
|
|
354
356
|
A as IdentitySchema,
|
|
355
|
-
|
|
357
|
+
N as LegacyRecommendationConfigSchema,
|
|
356
358
|
p as MessageType,
|
|
357
|
-
|
|
359
|
+
E as PartnerSchema,
|
|
358
360
|
l as ProductType,
|
|
359
361
|
j as RegexRuleSchema,
|
|
360
362
|
q as RemoveRuleSchema,
|
|
361
363
|
_ as ReplaceRuleSchema,
|
|
362
|
-
|
|
364
|
+
P as TemplateMigrationSchema,
|
|
363
365
|
x as TemplateSchema,
|
|
364
366
|
F as UISchema
|
|
365
367
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import
|
|
1
|
+
import i from "./Guido.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
3
|
+
import o 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(), r(e.SaveAsTemplateDrawer), e.isTestPartner() ? a._e() : r(e.OnboardingWrapper, { on: { "onboarding-finished": function(_) {
|
|
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.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__ */ o(
|
|
10
|
+
i,
|
|
11
11
|
t,
|
|
12
12
|
s,
|
|
13
13
|
!1,
|
|
14
14
|
null,
|
|
15
|
-
"
|
|
15
|
+
"584fdf72"
|
|
16
16
|
);
|
|
17
17
|
const v = n.exports;
|
|
18
18
|
export {
|
|
@@ -1,55 +1,57 @@
|
|
|
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 {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import ge from "./organisms/
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import {
|
|
1
|
+
import { defineComponent as re, defineAsyncComponent as l, ref as O, computed as u, watch as P, onMounted as se, onUnmounted as ae } from "vue";
|
|
2
|
+
import { useCortexBlueprintBridge as ie } from "../composables/useCortexBlueprintBridge.js";
|
|
3
|
+
import { useEditorLock as ce } from "../composables/useEditorLock.js";
|
|
4
|
+
import { provideGuidoActions as de } from "../composables/useGuidoActions.js";
|
|
5
|
+
import { useGuidoStateBridge as me } from "../composables/useGuidoStateBridge.js";
|
|
6
|
+
import { usePartner as le } from "../composables/usePartner.js";
|
|
7
|
+
import { useSaveValidationRollout as ue } from "../composables/useSaveValidationRollout.js";
|
|
8
|
+
import { useStripo as pe } from "../composables/useStripo.js";
|
|
9
|
+
import { useTimerClone as fe } from "../composables/useTimerClone.js";
|
|
10
|
+
import { migrate as x } from "../config/migrator/index.js";
|
|
11
|
+
import { ModuleFolderDefaults as W } from "../enums/defaults.js";
|
|
12
|
+
import { RIBBON_SELECTOR as ye } from "../enums/onboarding.js";
|
|
13
|
+
import { useRecommendationExtensionStore as G } from "../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
14
|
+
import ve from "./organisms/AutoSaveController.vue.js";
|
|
15
|
+
import ge from "./organisms/base/Toaster.vue.js";
|
|
16
|
+
import Se from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
|
|
17
|
+
import be from "./organisms/header/HeaderWrapper.vue.js";
|
|
18
|
+
import he from "./organisms/LoadingWrapper.vue.js";
|
|
19
|
+
import Ee from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
|
|
20
|
+
import we from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
|
|
21
|
+
import Ce from "./organisms/validation/ValidationErrorDrawer.vue.js";
|
|
22
|
+
import { useStripoApi as De } from "../services/stripoApi.js";
|
|
23
|
+
import { useConfigStore as ke } from "../stores/config.js";
|
|
24
|
+
import { useDynamicContentStore as Te } from "../stores/dynamic-content.js";
|
|
23
25
|
import { useEditorStore as H } from "../stores/editor.js";
|
|
24
|
-
import { usePreviewStore as
|
|
25
|
-
import { useTemplateStore as
|
|
26
|
-
import { useUnsubscribeStore as
|
|
27
|
-
import { readTrackFloor as
|
|
28
|
-
const
|
|
26
|
+
import { usePreviewStore as Fe } from "../stores/preview.js";
|
|
27
|
+
import { useTemplateStore as Re } from "../stores/template.js";
|
|
28
|
+
import { useUnsubscribeStore as Ie } from "../stores/unsubscribe.js";
|
|
29
|
+
import { readTrackFloor as V } from "../utils/linkTrackingIds.js";
|
|
30
|
+
const st = /* @__PURE__ */ re({
|
|
29
31
|
__name: "Guido",
|
|
30
32
|
props: {
|
|
31
33
|
config: null,
|
|
32
34
|
ready: { type: Boolean, default: !0 }
|
|
33
35
|
},
|
|
34
36
|
emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
|
|
35
|
-
setup(
|
|
36
|
-
const a =
|
|
37
|
+
setup($, { expose: z, emit: r }) {
|
|
38
|
+
const a = $, q = l(
|
|
37
39
|
() => import("./organisms/email-preview/PreviewContainer.vue.js")
|
|
38
|
-
),
|
|
40
|
+
), K = l(
|
|
39
41
|
() => import("./organisms/onboarding/OnboardingWrapper.vue.js")
|
|
40
42
|
), j = l(
|
|
41
43
|
() => import("./organisms/extensions/recommendation/AssignStrategyDrawer.vue.js")
|
|
42
44
|
), J = l(
|
|
43
45
|
() => import("./organisms/extensions/recommendation/RemoveStrategyModal.vue.js")
|
|
44
|
-
),
|
|
46
|
+
), h = O(), p = O(), f = Te(), E = Ie(), o = ke();
|
|
45
47
|
a.ready && o.init(a.config);
|
|
46
|
-
const c = H(), Q =
|
|
48
|
+
const c = H(), Q = Fe(), m = u(() => c.hasChanges), { isTestPartner: X } = le(), { isEnabled: Y } = ue(), w = () => {
|
|
47
49
|
var t;
|
|
48
|
-
return (t =
|
|
49
|
-
},
|
|
50
|
+
return (t = h.value) == null ? void 0 : t.handleSave(!0);
|
|
51
|
+
}, C = (t) => {
|
|
50
52
|
c.loadingStatus = t;
|
|
51
53
|
};
|
|
52
|
-
|
|
54
|
+
ie(), me();
|
|
53
55
|
const y = () => {
|
|
54
56
|
var t, e;
|
|
55
57
|
return {
|
|
@@ -57,18 +59,18 @@ const et = /* @__PURE__ */ ne({
|
|
|
57
59
|
userId: o.userId,
|
|
58
60
|
username: o.username,
|
|
59
61
|
partnerName: o.partnerName,
|
|
60
|
-
savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) ||
|
|
61
|
-
defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) ||
|
|
62
|
+
savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) || W.SAVED_MODULES,
|
|
63
|
+
defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) || W.DEFAULT_MODULES
|
|
62
64
|
};
|
|
63
|
-
}, { initPlugin:
|
|
64
|
-
let
|
|
65
|
-
const { getDefaultTemplate:
|
|
65
|
+
}, { initPlugin: D, preloadRuntime: k } = pe(), { runExclusive: T, beginMount: F, isCurrentMount: R } = ce();
|
|
66
|
+
let v = 0;
|
|
67
|
+
const { getDefaultTemplate: I } = De(), { cloneTimersOnSave: M, hasTimerBlocks: L } = fe(), Z = u(() => {
|
|
66
68
|
var t;
|
|
67
69
|
return !((t = o.ui) != null && t.showHeader);
|
|
68
|
-
}),
|
|
69
|
-
() => !!
|
|
70
|
+
}), ee = u(() => o.isFeatureEnabled("reusableRecommendationStrategy")), te = u(
|
|
71
|
+
() => !!G().recommendationConfigs.strategyId
|
|
70
72
|
);
|
|
71
|
-
|
|
73
|
+
de({
|
|
72
74
|
onBack: () => {
|
|
73
75
|
console.debug("guido:back"), r("back");
|
|
74
76
|
},
|
|
@@ -83,80 +85,80 @@ const et = /* @__PURE__ */ ne({
|
|
|
83
85
|
console.debug("guido:test-email:click"), r("test-email:click");
|
|
84
86
|
}
|
|
85
87
|
});
|
|
86
|
-
const
|
|
88
|
+
const B = (t) => {
|
|
87
89
|
console.debug("dynamic-content:close", t), f.setSelectedDynamicContent(t), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: t }));
|
|
88
|
-
},
|
|
90
|
+
}, A = () => {
|
|
89
91
|
console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
|
|
90
92
|
};
|
|
91
|
-
|
|
93
|
+
P(() => m.value, () => {
|
|
92
94
|
r("on-change", m.value);
|
|
93
95
|
});
|
|
94
|
-
const
|
|
96
|
+
const g = (t) => {
|
|
95
97
|
const e = t, { attribute: s, position: d } = e.detail;
|
|
96
98
|
console.debug("dynamic-content:open", e.detail), r("dynamic-content:open", s, d);
|
|
97
99
|
};
|
|
98
100
|
let i = null;
|
|
99
101
|
const S = () => {
|
|
100
102
|
var e;
|
|
101
|
-
const t = document.querySelector(
|
|
103
|
+
const t = document.querySelector(ye);
|
|
102
104
|
(e = p.value) == null || e.style.setProperty("--ribbon-offset", `${(t == null ? void 0 : t.offsetHeight) ?? 0}px`);
|
|
103
105
|
}, b = async () => {
|
|
104
106
|
var t;
|
|
105
107
|
try {
|
|
106
108
|
o.initialized || o.init(a.config), c.templateId = o.templateId;
|
|
107
109
|
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
|
-
|
|
110
|
+
E.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
|
|
109
111
|
const _ = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {}, N = o.isFeatureEnabled("linkTrackingIds");
|
|
110
112
|
let n = {
|
|
111
|
-
html: s && await
|
|
113
|
+
html: s && await x(s, _),
|
|
112
114
|
css: d
|
|
113
115
|
};
|
|
114
|
-
n.html || (n = await
|
|
115
|
-
const
|
|
116
|
-
|
|
117
|
-
const
|
|
116
|
+
n.html || (n = await I(), n.html = await x(n.html, _));
|
|
117
|
+
const oe = N ? V(n.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
|
|
118
|
+
L(n.html) && (n.html = await M(n.html)), N && (c.trackIdSessionFloor = Math.max(oe, V(n.html)));
|
|
119
|
+
const ne = {
|
|
118
120
|
preselectedDynamicContentList: U,
|
|
119
121
|
onReady: () => {
|
|
120
122
|
console.debug("guido:ready"), r("ready");
|
|
121
123
|
}
|
|
122
124
|
};
|
|
123
|
-
|
|
125
|
+
v = F(), await D(n, y(), ne), f.selectedDynamicContentList = U;
|
|
124
126
|
} catch (e) {
|
|
125
127
|
console.error("Failed to initialize Stripo editor:", e);
|
|
126
128
|
}
|
|
127
129
|
};
|
|
128
|
-
return
|
|
130
|
+
return se(async () => {
|
|
129
131
|
var e;
|
|
130
|
-
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"),
|
|
132
|
+
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), G().$reset(), H().$reset(), Re().$reset(), S();
|
|
131
133
|
const t = (e = p.value) == null ? void 0 : e.parentElement;
|
|
132
|
-
if (t && (i = new ResizeObserver(S), i.observe(t)),
|
|
134
|
+
if (t && (i = new ResizeObserver(S), i.observe(t)), k(), a.ready)
|
|
133
135
|
await b();
|
|
134
136
|
else {
|
|
135
|
-
const s =
|
|
137
|
+
const s = P(() => a.ready, (d) => {
|
|
136
138
|
d && (s(), b());
|
|
137
139
|
});
|
|
138
140
|
}
|
|
139
|
-
document.addEventListener("dynamic-content:open",
|
|
140
|
-
}),
|
|
141
|
-
i == null || i.disconnect(), document.removeEventListener("dynamic-content:open",
|
|
142
|
-
if (
|
|
141
|
+
document.addEventListener("dynamic-content:open", g);
|
|
142
|
+
}), ae(() => {
|
|
143
|
+
i == null || i.disconnect(), document.removeEventListener("dynamic-content:open", g), T(async () => {
|
|
144
|
+
if (R(v))
|
|
143
145
|
try {
|
|
144
146
|
window.UIEditor.removeEditor();
|
|
145
147
|
} catch {
|
|
146
148
|
console.debug("Failed to remove Stripo editor: No editor found");
|
|
147
149
|
}
|
|
148
150
|
}), o.reset();
|
|
149
|
-
}),
|
|
151
|
+
}), z({
|
|
150
152
|
dynamicContent: {
|
|
151
|
-
insert:
|
|
152
|
-
close:
|
|
153
|
+
insert: B,
|
|
154
|
+
close: A
|
|
153
155
|
},
|
|
154
156
|
hasChanges: m,
|
|
155
|
-
saveSilent:
|
|
156
|
-
setLoading:
|
|
157
|
-
}), { __sfc: !0, PreviewContainer:
|
|
157
|
+
saveSilent: w,
|
|
158
|
+
setLoading: C
|
|
159
|
+
}), { __sfc: !0, PreviewContainer: q, OnboardingWrapper: K, AssignStrategyDrawer: j, RemoveStrategyModal: J, headerWrapperRef: h, wrapperRef: p, dynamicContentStore: f, unsubscribeStore: E, props: a, configStore: o, editorStore: c, previewStore: Q, hasChanges: m, isTestPartner: X, isSaveValidationEnabled: Y, saveSilent: w, setLoading: C, emit: r, buildMetadata: y, initPlugin: D, preloadRuntime: k, runExclusive: T, beginMount: F, isCurrentMount: R, mountGeneration: v, getDefaultTemplate: I, cloneTimersOnSave: M, hasTimerBlocks: L, noHeader: Z, isRrsEnabled: ee, hasAssignedStrategy: te, insertDynamicContent: B, closeDynamicContent: A, handleDynamicContentOpen: g, ribbonObserver: i, updateRibbonOffset: S, startEditor: b, AutoSaveController: ve, Toaster: ge, FilterSelectionDrawer: Se, HeaderWrapper: be, LoadingWrapper: he, SaveAsTemplateDrawer: Ee, UnsubscribeWrapper: we, ValidationErrorDrawer: Ce };
|
|
158
160
|
}
|
|
159
161
|
});
|
|
160
162
|
export {
|
|
161
|
-
|
|
163
|
+
st as default
|
|
162
164
|
};
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useAutoSave as
|
|
3
|
-
import { useSave as
|
|
4
|
-
|
|
1
|
+
import { defineComponent as r } from "vue";
|
|
2
|
+
import { useAutoSave as s } from "../../composables/useAutoSave.js";
|
|
3
|
+
import { useSave as n } from "../../composables/useSave.js";
|
|
4
|
+
import { useSaveValidationRollout as u } from "../../composables/useSaveValidationRollout.js";
|
|
5
|
+
const v = /* @__PURE__ */ r({
|
|
5
6
|
__name: "AutoSaveController",
|
|
6
|
-
setup(
|
|
7
|
-
const { save: e } =
|
|
8
|
-
return
|
|
7
|
+
setup(m) {
|
|
8
|
+
const { save: e, saveRawOnly: o } = n(), { isEnabled: t } = u(), a = () => t.value ? o() : e(!1, !0);
|
|
9
|
+
return s(a), { __sfc: !0, save: e, saveRawOnly: o, isEnabled: t, backgroundSave: a };
|
|
9
10
|
}
|
|
10
11
|
});
|
|
11
12
|
export {
|
|
12
|
-
|
|
13
|
+
v as default
|
|
13
14
|
};
|
|
@@ -1,21 +1,19 @@
|
|
|
1
|
-
import
|
|
1
|
+
import r from "./AssignStrategyDrawer.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
|
-
import
|
|
5
|
-
var
|
|
6
|
-
var e = this,
|
|
7
|
-
return t.store.assignStrategyDrawerStatus ?
|
|
8
|
-
return [
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
s,
|
|
14
|
-
a,
|
|
4
|
+
import a from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
5
|
+
var o = function() {
|
|
6
|
+
var e = this, s = e._self._c, t = e._self._setupProxy;
|
|
7
|
+
return t.store.assignStrategyDrawerStatus ? s(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 [s("div", { staticClass: "assign-strategy-drawer-content px-5 py-5" }, [s(t.OrgStrategyDropdown, { staticClass: "assign-strategy-select", attrs: { id: "assign-strategy-select", "info-box-position": "bottom right", "create-button-visible": !1, 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: { select: t.onSelect } })], 1)];
|
|
9
|
+
}, proxy: !0 }], null, !1, 2542767044) }) : e._e();
|
|
10
|
+
}, n = [], i = /* @__PURE__ */ a(
|
|
11
|
+
r,
|
|
12
|
+
o,
|
|
15
13
|
n,
|
|
16
14
|
!1,
|
|
17
15
|
null,
|
|
18
|
-
"
|
|
16
|
+
"2580a7d9"
|
|
19
17
|
);
|
|
20
18
|
const y = i.exports;
|
|
21
19
|
export {
|