@useinsider/guido 3.2.0-beta.e01b42a → 3.2.0-beta.e69fb3b
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 +66 -54
- package/dist/@types/config/validator.js +27 -34
- package/dist/components/Guido.vue.js +4 -4
- package/dist/components/Guido.vue2.js +87 -82
- package/dist/components/organisms/base/Toaster.vue2.js +10 -11
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue2.js +12 -12
- package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.js +7 -7
- package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue2.js +12 -20
- package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue2.js +6 -6
- package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue2.js +9 -15
- package/dist/components/organisms/extensions/recommendation/FilterItem.vue2.js +31 -40
- package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue2.js +19 -20
- package/dist/components/organisms/extensions/recommendation/Filters.vue2.js +11 -14
- package/dist/components/organisms/header/EditorActions.vue.js +12 -13
- package/dist/components/organisms/header/EditorActions.vue2.js +51 -40
- package/dist/components/organisms/header/HeaderWrapper.vue2.js +12 -15
- package/dist/components/organisms/header/LeftSlot.vue2.js +16 -19
- package/dist/components/organisms/header/MiddleSlot.vue2.js +14 -11
- package/dist/components/organisms/header/RightSlot.vue.js +10 -10
- package/dist/components/organisms/header/RightSlot.vue2.js +13 -13
- package/dist/components/organisms/onboarding/AMPOnboarding.vue.js +11 -12
- package/dist/components/organisms/onboarding/AMPOnboarding.vue2.js +49 -31
- package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +12 -13
- package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +36 -38
- package/dist/components/organisms/onboarding/ItemsOnboarding.vue.js +12 -13
- package/dist/components/organisms/onboarding/ItemsOnboarding.vue2.js +47 -51
- package/dist/components/organisms/onboarding/NewVersionPopup.vue2.js +18 -21
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +27 -31
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.js +12 -13
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue2.js +33 -46
- package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue.js +11 -12
- package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue2.js +20 -21
- package/dist/components/organisms/save-as-template/SaveAsTemplateDrawer.vue2.js +18 -18
- package/dist/components/organisms/unsubscribe/UnsubscribeWrapper.vue.js +9 -10
- package/dist/composables/useActionsApi.js +37 -38
- package/dist/composables/useBlocksConfig.js +26 -26
- package/dist/composables/useFullStoryBridge.js +13 -0
- package/dist/composables/useHtmlCompiler.js +34 -24
- package/dist/composables/useHtmlValidator.js +91 -97
- package/dist/composables/useHttp.js +30 -30
- package/dist/composables/usePartner.js +1 -1
- package/dist/composables/usePreviewMode.js +20 -16
- package/dist/composables/useRecommendation.js +14 -15
- package/dist/composables/useRibbonOffset.js +21 -0
- package/dist/composables/useSave.js +23 -16
- package/dist/composables/useStripo.js +55 -47
- package/dist/composables/useSyncModuleExtractor.js +31 -29
- package/dist/composables/useTimerClone.js +24 -25
- package/dist/composables/useTranslations.js +2 -3
- package/dist/composables/useValidation.js +7 -8
- package/dist/composables/validators/useLiquidValidator.js +42 -0
- package/dist/config/compiler/liquidCompilerRules.js +15 -0
- package/dist/config/compiler/recommendationCompilerRules.js +162 -43
- package/dist/config/compiler/unsubscribeCompilerRules.js +45 -44
- package/dist/config/compiler/utils/recommendationCompilerUtils.js +51 -46
- package/dist/config/migrator/checkboxMigrator.js +23 -22
- package/dist/config/migrator/couponBlockMigrator.js +18 -19
- package/dist/config/migrator/itemsBlockMigrator.js +87 -89
- package/dist/config/migrator/radioButtonMigrator.js +19 -18
- package/dist/config/migrator/recommendationMigrator.js +107 -110
- package/dist/config/migrator/unsubscribeMigrator.js +10 -11
- package/dist/enums/extensions/recommendationBlock.js +14 -11
- package/dist/enums/onboarding.js +7 -2
- package/dist/enums/recommendation.js +2 -2
- package/dist/enums/unsubscribe.js +33 -27
- package/dist/extensions/Blocks/CouponBlock/template.js +24 -13
- package/dist/extensions/Blocks/Items/block.js +9 -9
- package/dist/extensions/Blocks/Items/controls/button/link.js +14 -14
- package/dist/extensions/Blocks/Items/controls/cardComposition.js +89 -97
- package/dist/extensions/Blocks/Items/controls/image/link.js +14 -14
- package/dist/extensions/Blocks/Items/controls/name/trimming.js +23 -24
- package/dist/extensions/Blocks/Items/controls/price/currencyLocation.js +13 -14
- package/dist/extensions/Blocks/Items/controls/price/currencySymbol.js +44 -47
- package/dist/extensions/Blocks/Items/controls/price/formattedPrice.js +38 -38
- package/dist/extensions/Blocks/Items/controls/price/hideDiscount.js +11 -11
- package/dist/extensions/Blocks/Items/controls/price/priceOrientation.js +38 -40
- package/dist/extensions/Blocks/Items/controls/price/singlePrice.js +35 -35
- package/dist/extensions/Blocks/Items/controls/settingsControl.js +155 -162
- package/dist/extensions/Blocks/Items/enums/productEnums.js +21 -14
- package/dist/extensions/Blocks/Items/template.js +210 -210
- package/dist/extensions/Blocks/Recommendation/constants/controlIds.js +1 -1
- package/dist/extensions/Blocks/Recommendation/constants/selectors.js +27 -11
- package/dist/extensions/Blocks/Recommendation/controls/button/index.js +36 -36
- package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +208 -200
- package/dist/extensions/Blocks/Recommendation/controls/customAttribute/index.js +23 -20
- package/dist/extensions/Blocks/Recommendation/controls/customAttribute/textTrim.js +99 -0
- package/dist/extensions/Blocks/Recommendation/controls/image/index.js +9 -9
- package/dist/extensions/Blocks/Recommendation/controls/main/algorithm.js +19 -20
- package/dist/extensions/Blocks/Recommendation/controls/main/filters.js +4 -6
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +84 -90
- package/dist/extensions/Blocks/Recommendation/controls/main/layoutOrientation.js +18 -18
- package/dist/extensions/Blocks/Recommendation/controls/main/productCount.js +4 -4
- package/dist/extensions/Blocks/Recommendation/controls/main/productLayout.js +35 -36
- package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +127 -126
- package/dist/extensions/Blocks/Recommendation/controls/name/index.js +24 -24
- package/dist/extensions/Blocks/Recommendation/controls/name/textTrim.js +27 -57
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/index.js +24 -24
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/index.js +24 -24
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/textAfter.js +4 -4
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/textBefore.js +4 -4
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/index.js +24 -24
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/textAfter.js +4 -4
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/textBefore.js +4 -4
- package/dist/extensions/Blocks/Recommendation/controls/price/index.js +24 -24
- package/dist/extensions/Blocks/Recommendation/controls/shared/textTrimCssRules.js +14 -0
- package/dist/extensions/Blocks/Recommendation/controls/spacing/index.js +50 -50
- package/dist/extensions/Blocks/Recommendation/controls/syncInfoMessage.js +18 -20
- package/dist/extensions/Blocks/Recommendation/extension.js +31 -32
- package/dist/extensions/Blocks/Recommendation/settingsPanel.js +25 -32
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +72 -69
- package/dist/extensions/Blocks/Recommendation/templates/grid/elementRenderer.js +24 -23
- package/dist/extensions/Blocks/Recommendation/templates/grid/migration.js +10 -10
- package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +28 -27
- package/dist/extensions/Blocks/Recommendation/templates/index.js +9 -9
- package/dist/extensions/Blocks/Recommendation/templates/list/elementRenderer.js +26 -25
- package/dist/extensions/Blocks/Recommendation/templates/list/template.js +21 -21
- package/dist/extensions/Blocks/Recommendation/templates/utils.js +53 -48
- package/dist/extensions/Blocks/Recommendation/utils/filterUtil.js +17 -14
- package/dist/extensions/Blocks/Recommendation/validation/filterSchema.js +13 -16
- package/dist/extensions/Blocks/Unsubscribe/block.js +11 -11
- package/dist/extensions/Blocks/Unsubscribe/control.js +11 -13
- package/dist/extensions/Blocks/Unsubscribe/elements/preview.js +16 -18
- package/dist/extensions/Blocks/common-control.js +25 -26
- package/dist/extensions/DynamicContent/dynamic-content.js +59 -59
- package/dist/guido.css +1 -1
- package/dist/library.js +11 -12
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +232 -210
- package/dist/node_modules/lodash-es/_getValue.js +1 -1
- package/dist/node_modules/valibot/dist/index.js +122 -126
- package/dist/package.json.js +1 -1
- package/dist/services/recommendationApi.js +12 -15
- package/dist/services/stripoApi.js +9 -9
- package/dist/services/templateLibraryApi.js +49 -48
- package/dist/src/@types/config/index.d.ts +1 -1
- package/dist/src/@types/config/schemas.d.ts +28 -0
- package/dist/src/@types/config/types.d.ts +3 -1
- package/dist/src/@types/generic.d.ts +0 -1
- package/dist/src/@types/save-as-template.d.ts +1 -0
- package/dist/src/components/wrappers/WpModal.vue.d.ts +1 -1
- package/dist/src/composables/useActionsApi.d.ts +1 -1
- package/dist/src/composables/useConfig.d.ts +12 -0
- package/dist/src/composables/useFullStoryBridge.d.ts +11 -0
- package/dist/src/composables/useHtmlCompiler.d.ts +1 -2
- package/dist/src/composables/useRibbonOffset.d.ts +4 -0
- package/dist/src/composables/validators/useLiquidValidator.d.ts +3 -0
- package/dist/src/config/compiler/liquidCompilerRules.d.ts +2 -0
- package/dist/src/config/compiler/utils/recommendationCompilerUtils.d.ts +1 -1
- package/dist/src/enums/extensions/recommendationBlock.d.ts +3 -0
- package/dist/src/enums/onboarding.d.ts +6 -0
- package/dist/src/enums/unsubscribe.d.ts +5 -0
- package/dist/src/extensions/Blocks/CouponBlock/template.d.ts +2 -0
- package/dist/src/extensions/Blocks/Recommendation/constants/controlIds.d.ts +1 -0
- package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/constants/selectors.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/cardComposition/index.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/customAttribute/index.d.ts +3 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/customAttribute/textTrim.d.ts +35 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/textTrim.d.ts +3 -20
- package/dist/src/extensions/Blocks/Recommendation/controls/shared/textTrimCssRules.d.ts +29 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/grid/template.d.ts +4 -4
- package/dist/src/extensions/Blocks/Recommendation/templates/list/template.d.ts +3 -3
- package/dist/src/extensions/Blocks/Recommendation/templates/utils.d.ts +20 -3
- package/dist/src/extensions/Blocks/Recommendation/utils/tagName.d.ts +3 -3
- package/dist/src/services/templateLibraryApi.d.ts +1 -1
- package/dist/src/stores/config.d.ts +108 -0
- package/dist/src/stores/dynamic-content.d.ts +3 -3
- package/dist/src/stores/onboarding.d.ts +4 -0
- package/dist/src/stores/preview.d.ts +3 -0
- package/dist/src/utils/genericUtil.d.ts +1 -1
- package/dist/src/utils/htmlCompiler.d.ts +2 -1
- package/dist/static/styles/base.css.js +7 -2
- package/dist/static/styles/components/button.css.js +3 -2
- package/dist/static/styles/components/loader.css.js +4 -0
- package/dist/stores/config.js +25 -81
- package/dist/stores/dynamic-content.js +6 -11
- package/dist/stores/onboarding.js +5 -1
- package/dist/stores/preview.js +8 -10
- package/dist/stores/unsubscribe.js +1 -4
- package/dist/utils/dateUtil.js +7 -10
- package/dist/utils/genericUtil.js +39 -20
- package/dist/utils/htmlCompiler.js +48 -41
- package/dist/utils/pairProductVariables.js +13 -14
- package/dist/utils/templatePreparation.js +36 -25
- package/dist/utils/tooltipUtils.js +4 -5
- package/package.json +9 -4
- package/dist/node_modules/lodash-es/_DataView.js +0 -6
- package/dist/node_modules/lodash-es/_Promise.js +0 -6
- package/dist/node_modules/lodash-es/_Set.js +0 -6
- package/dist/node_modules/lodash-es/_SetCache.js +0 -13
- package/dist/node_modules/lodash-es/_Stack.js +0 -18
- package/dist/node_modules/lodash-es/_Uint8Array.js +0 -5
- package/dist/node_modules/lodash-es/_WeakMap.js +0 -6
- package/dist/node_modules/lodash-es/_arrayFilter.js +0 -10
- package/dist/node_modules/lodash-es/_arrayLikeKeys.js +0 -20
- package/dist/node_modules/lodash-es/_arrayMap.js +0 -8
- package/dist/node_modules/lodash-es/_arrayPush.js +0 -8
- package/dist/node_modules/lodash-es/_arraySome.js +0 -9
- package/dist/node_modules/lodash-es/_baseEach.js +0 -6
- package/dist/node_modules/lodash-es/_baseFlatten.js +0 -13
- package/dist/node_modules/lodash-es/_baseFor.js +0 -5
- package/dist/node_modules/lodash-es/_baseForOwn.js +0 -8
- package/dist/node_modules/lodash-es/_baseGet.js +0 -11
- package/dist/node_modules/lodash-es/_baseGetAllKeys.js +0 -9
- package/dist/node_modules/lodash-es/_baseHasIn.js +0 -6
- package/dist/node_modules/lodash-es/_baseIsArguments.js +0 -9
- package/dist/node_modules/lodash-es/_baseIsEqual.js +0 -8
- package/dist/node_modules/lodash-es/_baseIsEqualDeep.js +0 -32
- package/dist/node_modules/lodash-es/_baseIsMatch.js +0 -29
- package/dist/node_modules/lodash-es/_baseIsTypedArray.js +0 -12
- package/dist/node_modules/lodash-es/_baseIteratee.js +0 -11
- package/dist/node_modules/lodash-es/_baseKeys.js +0 -14
- package/dist/node_modules/lodash-es/_baseMap.js +0 -11
- package/dist/node_modules/lodash-es/_baseMatches.js +0 -12
- package/dist/node_modules/lodash-es/_baseMatchesProperty.js +0 -17
- package/dist/node_modules/lodash-es/_baseProperty.js +0 -8
- package/dist/node_modules/lodash-es/_basePropertyDeep.js +0 -9
- package/dist/node_modules/lodash-es/_baseRange.js +0 -9
- package/dist/node_modules/lodash-es/_baseTimes.js +0 -8
- package/dist/node_modules/lodash-es/_baseToString.js +0 -18
- package/dist/node_modules/lodash-es/_baseTrim.js +0 -8
- package/dist/node_modules/lodash-es/_baseUnary.js +0 -8
- package/dist/node_modules/lodash-es/_cacheHas.js +0 -6
- package/dist/node_modules/lodash-es/_castPath.js +0 -10
- package/dist/node_modules/lodash-es/_createBaseEach.js +0 -15
- package/dist/node_modules/lodash-es/_createBaseFor.js +0 -13
- package/dist/node_modules/lodash-es/_createRange.js +0 -11
- package/dist/node_modules/lodash-es/_equalArrays.js +0 -40
- package/dist/node_modules/lodash-es/_equalByTag.js +0 -45
- package/dist/node_modules/lodash-es/_equalObjects.js +0 -36
- package/dist/node_modules/lodash-es/_getAllKeys.js +0 -9
- package/dist/node_modules/lodash-es/_getMatchData.js +0 -12
- package/dist/node_modules/lodash-es/_getSymbols.js +0 -10
- package/dist/node_modules/lodash-es/_getTag.js +0 -28
- package/dist/node_modules/lodash-es/_hasPath.js +0 -19
- package/dist/node_modules/lodash-es/_isFlattenable.js +0 -10
- package/dist/node_modules/lodash-es/_isIndex.js +0 -8
- package/dist/node_modules/lodash-es/_isIterateeCall.js +0 -13
- package/dist/node_modules/lodash-es/_isKey.js +0 -12
- package/dist/node_modules/lodash-es/_isPrototype.js +0 -8
- package/dist/node_modules/lodash-es/_isStrictComparable.js +0 -7
- package/dist/node_modules/lodash-es/_mapToArray.js +0 -9
- package/dist/node_modules/lodash-es/_matchesStrictComparable.js +0 -8
- package/dist/node_modules/lodash-es/_memoizeCapped.js +0 -11
- package/dist/node_modules/lodash-es/_nativeKeys.js +0 -5
- package/dist/node_modules/lodash-es/_nodeUtil.js +0 -11
- package/dist/node_modules/lodash-es/_overArg.js +0 -8
- package/dist/node_modules/lodash-es/_setCacheAdd.js +0 -7
- package/dist/node_modules/lodash-es/_setCacheHas.js +0 -6
- package/dist/node_modules/lodash-es/_setToArray.js +0 -9
- package/dist/node_modules/lodash-es/_stackClear.js +0 -7
- package/dist/node_modules/lodash-es/_stackDelete.js +0 -7
- package/dist/node_modules/lodash-es/_stackGet.js +0 -6
- package/dist/node_modules/lodash-es/_stackHas.js +0 -6
- package/dist/node_modules/lodash-es/_stackSet.js +0 -17
- package/dist/node_modules/lodash-es/_stringToPath.js +0 -10
- package/dist/node_modules/lodash-es/_toKey.js +0 -10
- package/dist/node_modules/lodash-es/_trimmedEndIndex.js +0 -9
- package/dist/node_modules/lodash-es/flatMap.js +0 -8
- package/dist/node_modules/lodash-es/get.js +0 -8
- package/dist/node_modules/lodash-es/hasIn.js +0 -8
- package/dist/node_modules/lodash-es/identity.js +0 -6
- package/dist/node_modules/lodash-es/isArguments.js +0 -10
- package/dist/node_modules/lodash-es/isArray.js +0 -4
- package/dist/node_modules/lodash-es/isArrayLike.js +0 -8
- package/dist/node_modules/lodash-es/isBuffer.js +0 -6
- package/dist/node_modules/lodash-es/isLength.js +0 -7
- package/dist/node_modules/lodash-es/isObjectLike.js +0 -6
- package/dist/node_modules/lodash-es/isSymbol.js +0 -9
- package/dist/node_modules/lodash-es/isTypedArray.js +0 -7
- package/dist/node_modules/lodash-es/keys.js +0 -9
- package/dist/node_modules/lodash-es/map.js +0 -11
- package/dist/node_modules/lodash-es/property.js +0 -10
- package/dist/node_modules/lodash-es/range.js +0 -5
- package/dist/node_modules/lodash-es/stubArray.js +0 -6
- package/dist/node_modules/lodash-es/stubFalse.js +0 -6
- package/dist/node_modules/lodash-es/toFinite.js +0 -14
- package/dist/node_modules/lodash-es/toNumber.js +0 -22
- package/dist/node_modules/lodash-es/toString.js +0 -7
package/README.md
CHANGED
|
@@ -143,6 +143,7 @@ const config: GuidoConfigInput = {
|
|
|
143
143
|
displayConditions?: boolean, // Default: true
|
|
144
144
|
unsubscribe?: boolean, // Default: true
|
|
145
145
|
modulesDisabled?: boolean, // Default: false - Disable modules panel
|
|
146
|
+
liquidSyntax?: boolean, // Default: false - Enable Liquid template syntax
|
|
146
147
|
},
|
|
147
148
|
|
|
148
149
|
// Optional: Callbacks
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ModuleFolderDefaults as b } from "../../enums/defaults.js";
|
|
2
|
-
import { object as o,
|
|
2
|
+
import { object as o, optional as e, pipe as u, string as t, picklist as n, minLength as d, literal as l, boolean as a, array as c, custom as S, number as p, variant as k } from "../../node_modules/valibot/dist/index.js";
|
|
3
3
|
const m = {
|
|
4
4
|
/** Promotional/marketing emails */
|
|
5
5
|
PROMOTIONAL: 1,
|
|
@@ -26,6 +26,11 @@ const m = {
|
|
|
26
26
|
/** Optional variation ID for A/B testing */
|
|
27
27
|
variationId: e(t())
|
|
28
28
|
}), y = o({
|
|
29
|
+
/** Fallback font name (e.g., "Georgia") */
|
|
30
|
+
name: t(),
|
|
31
|
+
/** Fallback font family (e.g., "serif" or "sans-serif") */
|
|
32
|
+
family: t()
|
|
33
|
+
}), f = o({
|
|
29
34
|
/** Partner/organization name (required) */
|
|
30
35
|
name: u(
|
|
31
36
|
t(),
|
|
@@ -46,8 +51,10 @@ const m = {
|
|
|
46
51
|
m.PROMOTIONAL
|
|
47
52
|
),
|
|
48
53
|
/** Display name for the current user */
|
|
49
|
-
username: e(t(), "Guido User")
|
|
50
|
-
|
|
54
|
+
username: e(t(), "Guido User"),
|
|
55
|
+
/** Fallback font settings from partner settings — used to match backend size calculation */
|
|
56
|
+
fallbackFont: e(y)
|
|
57
|
+
}), A = o({
|
|
51
58
|
/** Display text for the dynamic content */
|
|
52
59
|
text: t(),
|
|
53
60
|
/** Template variable value (e.g., {{username}}) */
|
|
@@ -68,19 +75,21 @@ const m = {
|
|
|
68
75
|
css: e(t(), ""),
|
|
69
76
|
/** Preselected dynamic content items */
|
|
70
77
|
preselectedDynamicContent: e(
|
|
71
|
-
c(
|
|
78
|
+
c(A),
|
|
72
79
|
[]
|
|
73
80
|
),
|
|
81
|
+
/** Valid custom field attribute names from the partner's categorized fields */
|
|
82
|
+
customFieldAttributes: e(c(t()), []),
|
|
74
83
|
/** Selected unsubscribe page IDs */
|
|
75
84
|
selectedUnsubscribePages: e(c(p()), []),
|
|
76
85
|
/** Force recreate template in Stripo storage (use true when updating externally modified templates) */
|
|
77
86
|
forceRecreate: e(a(), !1)
|
|
78
|
-
}),
|
|
87
|
+
}), C = o({
|
|
79
88
|
/** Sender display name */
|
|
80
89
|
senderName: e(t(), ""),
|
|
81
90
|
/** Email subject line */
|
|
82
91
|
subject: e(t(), "")
|
|
83
|
-
}),
|
|
92
|
+
}), T = o({
|
|
84
93
|
/** Locale for the editor UI */
|
|
85
94
|
locale: e(t(), "en"),
|
|
86
95
|
/** Path to translations object */
|
|
@@ -88,17 +97,17 @@ const m = {
|
|
|
88
97
|
/** Migration date for template compatibility */
|
|
89
98
|
migrationDate: e(p(), 1759696858),
|
|
90
99
|
/** Email header settings */
|
|
91
|
-
emailHeader: e(
|
|
100
|
+
emailHeader: e(C, { senderName: "", subject: "" }),
|
|
92
101
|
/** Folder name for user-saved modules (used by Stripo plugin panel for path construction) */
|
|
93
102
|
savedModulesFolderName: e(t(), b.SAVED_MODULES),
|
|
94
103
|
/** Folder name for default/prebuilt modules (used by Stripo plugin panel for path construction) */
|
|
95
104
|
defaultModulesFolderName: e(t(), b.DEFAULT_MODULES)
|
|
96
|
-
}),
|
|
105
|
+
}), I = o({
|
|
97
106
|
/** Whether to show the header bar */
|
|
98
107
|
showHeader: e(a(), !0),
|
|
99
108
|
/** Custom label for back button (if shown) */
|
|
100
109
|
backButtonLabel: e(t())
|
|
101
|
-
}),
|
|
110
|
+
}), E = o({
|
|
102
111
|
/** Enable dynamic content insertion */
|
|
103
112
|
dynamicContent: e(a(), !0),
|
|
104
113
|
/** Enable save as template functionality */
|
|
@@ -112,8 +121,10 @@ const m = {
|
|
|
112
121
|
/** Enable unsubscribe block */
|
|
113
122
|
unsubscribe: e(a(), !0),
|
|
114
123
|
/** Disable modules panel in the editor */
|
|
115
|
-
modulesDisabled: e(a(), !1)
|
|
116
|
-
|
|
124
|
+
modulesDisabled: e(a(), !1),
|
|
125
|
+
/** Enable Liquid template syntax */
|
|
126
|
+
liquidSyntax: e(a(), !1)
|
|
127
|
+
}), g = n([
|
|
117
128
|
"amp-accordion",
|
|
118
129
|
"amp-carousel",
|
|
119
130
|
"amp-form-controls",
|
|
@@ -127,7 +138,7 @@ const m = {
|
|
|
127
138
|
"text-block",
|
|
128
139
|
"timer-block",
|
|
129
140
|
"video-block"
|
|
130
|
-
]),
|
|
141
|
+
]), O = n([
|
|
131
142
|
"dynamic-content",
|
|
132
143
|
"checkbox-block",
|
|
133
144
|
"radio-button-block",
|
|
@@ -135,66 +146,66 @@ const m = {
|
|
|
135
146
|
"unsubscribe-block",
|
|
136
147
|
"coupon-block",
|
|
137
148
|
"items-block"
|
|
138
|
-
]),
|
|
149
|
+
]), L = o({
|
|
139
150
|
/** Default blocks to exclude from the editor */
|
|
140
151
|
excludeDefaults: e(
|
|
141
|
-
c(
|
|
152
|
+
c(g),
|
|
142
153
|
[]
|
|
143
154
|
),
|
|
144
155
|
/** Custom blocks to include in the editor */
|
|
145
156
|
includeCustoms: e(
|
|
146
|
-
c(
|
|
157
|
+
c(O),
|
|
147
158
|
[]
|
|
148
159
|
)
|
|
149
|
-
}),
|
|
160
|
+
}), r = o({
|
|
150
161
|
/** Unique identifier for the rule */
|
|
151
162
|
id: t(),
|
|
152
163
|
/** Human-readable description */
|
|
153
164
|
description: e(t()),
|
|
154
165
|
/** Priority for rule ordering (lower = earlier) */
|
|
155
166
|
priority: p()
|
|
156
|
-
}),
|
|
157
|
-
...
|
|
158
|
-
type:
|
|
167
|
+
}), M = o({
|
|
168
|
+
...r.entries,
|
|
169
|
+
type: l("replace"),
|
|
159
170
|
/** String to search for */
|
|
160
171
|
search: t(),
|
|
161
172
|
/** Replacement string */
|
|
162
173
|
replacement: t(),
|
|
163
174
|
/** Replace all occurrences (default: false) */
|
|
164
175
|
replaceAll: e(a())
|
|
165
|
-
}),
|
|
166
|
-
...
|
|
167
|
-
type:
|
|
176
|
+
}), N = o({
|
|
177
|
+
...r.entries,
|
|
178
|
+
type: l("regex"),
|
|
168
179
|
/** Regex pattern string */
|
|
169
180
|
pattern: t(),
|
|
170
181
|
/** Replacement string (supports $1, $2, etc.) */
|
|
171
182
|
replacement: t(),
|
|
172
183
|
/** Regex flags (e.g., 'gi') */
|
|
173
184
|
flags: e(t())
|
|
174
|
-
}),
|
|
175
|
-
...
|
|
176
|
-
type:
|
|
185
|
+
}), D = o({
|
|
186
|
+
...r.entries,
|
|
187
|
+
type: l("remove"),
|
|
177
188
|
/** Strings or patterns to remove */
|
|
178
189
|
targets: c(t())
|
|
179
|
-
}),
|
|
180
|
-
...
|
|
181
|
-
type:
|
|
190
|
+
}), v = o({
|
|
191
|
+
...r.entries,
|
|
192
|
+
type: l("custom"),
|
|
182
193
|
/** Custom processor function */
|
|
183
194
|
processor: S(
|
|
184
195
|
(i) => typeof i == "function",
|
|
185
196
|
"processor must be a function"
|
|
186
197
|
)
|
|
187
|
-
}),
|
|
188
|
-
L,
|
|
198
|
+
}), x = k("type", [
|
|
189
199
|
M,
|
|
190
200
|
N,
|
|
191
|
-
D
|
|
201
|
+
D,
|
|
202
|
+
v
|
|
192
203
|
]), U = o({
|
|
193
204
|
/** Custom compiler rules to apply */
|
|
194
|
-
customRules: e(c(
|
|
205
|
+
customRules: e(c(x), []),
|
|
195
206
|
/** Skip default compiler rules */
|
|
196
207
|
ignoreDefaultRules: e(a(), !1)
|
|
197
|
-
}),
|
|
208
|
+
}), B = o({
|
|
198
209
|
/**
|
|
199
210
|
* External validation handler called before save completes.
|
|
200
211
|
* Return false to cancel the save operation.
|
|
@@ -210,43 +221,44 @@ const m = {
|
|
|
210
221
|
/** Identity configuration (required) */
|
|
211
222
|
identity: h,
|
|
212
223
|
/** Partner configuration (required) */
|
|
213
|
-
partner:
|
|
224
|
+
partner: f,
|
|
214
225
|
// Optional sections (with defaults)
|
|
215
226
|
/** Template content and presets */
|
|
216
227
|
template: e(R, {}),
|
|
217
228
|
/** Editor settings */
|
|
218
|
-
editor: e(
|
|
229
|
+
editor: e(T, {}),
|
|
219
230
|
/** UI configuration */
|
|
220
|
-
ui: e(
|
|
231
|
+
ui: e(I, {}),
|
|
221
232
|
/** Feature toggles */
|
|
222
|
-
features: e(
|
|
233
|
+
features: e(E, {}),
|
|
223
234
|
/** Block configuration */
|
|
224
|
-
blocks: e(
|
|
235
|
+
blocks: e(L, {}),
|
|
225
236
|
/** Compiler configuration */
|
|
226
237
|
compiler: e(U, {}),
|
|
227
238
|
/** Callbacks and event handlers */
|
|
228
|
-
callbacks: e(
|
|
239
|
+
callbacks: e(B, {})
|
|
229
240
|
});
|
|
230
241
|
export {
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
242
|
+
L as BlocksSchema,
|
|
243
|
+
B as CallbacksSchema,
|
|
244
|
+
x as CompilerRuleSchema,
|
|
234
245
|
U as CompilerSchema,
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
246
|
+
O as CustomBlockTypeSchema,
|
|
247
|
+
v as CustomRuleSchema,
|
|
248
|
+
g as DefaultBlockTypeSchema,
|
|
249
|
+
A as DynamicContentSchema,
|
|
250
|
+
T as EditorSchema,
|
|
251
|
+
C as EmailHeaderSchema,
|
|
252
|
+
y as FallbackFontSchema,
|
|
253
|
+
E as FeaturesSchema,
|
|
242
254
|
H as GuidoConfigSchema,
|
|
243
255
|
h as IdentitySchema,
|
|
244
256
|
m as MessageType,
|
|
245
|
-
|
|
257
|
+
f as PartnerSchema,
|
|
246
258
|
s as ProductType,
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
259
|
+
N as RegexRuleSchema,
|
|
260
|
+
D as RemoveRuleSchema,
|
|
261
|
+
M as ReplaceRuleSchema,
|
|
250
262
|
R as TemplateSchema,
|
|
251
|
-
|
|
263
|
+
I as UISchema
|
|
252
264
|
};
|
|
@@ -1,56 +1,49 @@
|
|
|
1
|
-
import { safeParse as
|
|
2
|
-
import { GuidoConfigSchema as
|
|
3
|
-
function
|
|
4
|
-
return s.map((r) => {
|
|
5
|
-
var e;
|
|
6
|
-
return `[${((e = r.path) == null ? void 0 : e.map((a) => a.key).join(".")) || "root"}] ${r.message}`;
|
|
7
|
-
});
|
|
1
|
+
import { safeParse as t } from "../../node_modules/valibot/dist/index.js";
|
|
2
|
+
import { GuidoConfigSchema as e } from "./schemas.js";
|
|
3
|
+
function a(s) {
|
|
4
|
+
return s.map((r) => `[${r.path?.map((u) => u.key).join(".") || "root"}] ${r.message}`);
|
|
8
5
|
}
|
|
9
|
-
function
|
|
10
|
-
return s.map((r) => {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
message: r.message
|
|
15
|
-
};
|
|
16
|
-
});
|
|
6
|
+
function i(s) {
|
|
7
|
+
return s.map((r) => ({
|
|
8
|
+
path: r.path?.map((n) => n.key).join(".") || "root",
|
|
9
|
+
message: r.message
|
|
10
|
+
}));
|
|
17
11
|
}
|
|
18
|
-
function
|
|
19
|
-
const r =
|
|
12
|
+
function o(s) {
|
|
13
|
+
const r = t(e, s);
|
|
20
14
|
return r.success ? {
|
|
21
15
|
success: !0,
|
|
22
16
|
data: r.output
|
|
23
17
|
} : {
|
|
24
18
|
success: !1,
|
|
25
|
-
errors:
|
|
19
|
+
errors: a(r.issues)
|
|
26
20
|
};
|
|
27
21
|
}
|
|
28
|
-
function
|
|
29
|
-
|
|
30
|
-
const r = u(s);
|
|
22
|
+
function l(s) {
|
|
23
|
+
const r = o(s);
|
|
31
24
|
if (!r.success)
|
|
32
25
|
throw new Error(
|
|
33
26
|
`Invalid GuidoConfig:
|
|
34
|
-
${
|
|
27
|
+
${r.errors?.join(`
|
|
35
28
|
`)}`
|
|
36
29
|
);
|
|
37
30
|
return r.data;
|
|
38
31
|
}
|
|
39
|
-
function
|
|
40
|
-
const r =
|
|
32
|
+
function p(s) {
|
|
33
|
+
const r = o(s);
|
|
41
34
|
return r.success ? r.data : (console.error("[Guido] Invalid configuration:", r.errors), null);
|
|
42
35
|
}
|
|
43
|
-
function
|
|
44
|
-
const r =
|
|
45
|
-
return r.success ? [] :
|
|
36
|
+
function m(s) {
|
|
37
|
+
const r = t(e, s);
|
|
38
|
+
return r.success ? [] : i(r.issues);
|
|
46
39
|
}
|
|
47
|
-
function
|
|
48
|
-
return
|
|
40
|
+
function d(s) {
|
|
41
|
+
return t(e, s).success;
|
|
49
42
|
}
|
|
50
43
|
export {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
44
|
+
m as getValidationErrors,
|
|
45
|
+
d as isValidConfig,
|
|
46
|
+
l as parseConfig,
|
|
47
|
+
p as parseConfigSafe,
|
|
48
|
+
o as validateConfig
|
|
56
49
|
};
|
|
@@ -3,7 +3,7 @@ import i from "./Guido.vue2.js";
|
|
|
3
3
|
import a from "../_virtual/_plugin-vue2_normalizer.js";
|
|
4
4
|
var t = function() {
|
|
5
5
|
var o = this, r = o._self._c, e = o._self._setupProxy;
|
|
6
|
-
return r("div", { staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper, { ref: "headerWrapperRef" }), e.editorStore.isPreviewModeOpen ? r(e.PreviewContainer) : o._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), r(e.SaveAsTemplateDrawer), e.isTestPartner() ? o._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" }), e.editorStore.isPreviewModeOpen ? r(e.PreviewContainer) : o._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), r(e.SaveAsTemplateDrawer), e.isTestPartner() ? o._e() : r(e.OnboardingWrapper, { on: { "onboarding-finished": function(p) {
|
|
7
7
|
return e.emit("onboarding:finished");
|
|
8
8
|
} } }), r(e.UnsubscribeWrapper), r(e.LoadingWrapper)], 1);
|
|
9
9
|
}, n = [], s = /* @__PURE__ */ a(
|
|
@@ -12,9 +12,9 @@ var t = function() {
|
|
|
12
12
|
n,
|
|
13
13
|
!1,
|
|
14
14
|
null,
|
|
15
|
-
"
|
|
15
|
+
"c3fe2732"
|
|
16
16
|
);
|
|
17
|
-
const
|
|
17
|
+
const u = s.exports;
|
|
18
18
|
export {
|
|
19
|
-
|
|
19
|
+
u as default
|
|
20
20
|
};
|
|
@@ -1,119 +1,124 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { provideGuidoActions as
|
|
3
|
-
import { usePartner as
|
|
4
|
-
import { useStripo as
|
|
5
|
-
import { useTimerClone as
|
|
6
|
-
import { migrate as
|
|
7
|
-
import { ModuleFolderDefaults as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
|
|
19
|
-
import { useUnsubscribeStore as de } from "../stores/unsubscribe.js";
|
|
20
|
-
const Me = /* @__PURE__ */ K({
|
|
1
|
+
import { defineComponent as X, defineAsyncComponent as s, ref as R, computed as A, watch as Y, onMounted as Z, onUnmounted as ee } from "vue";
|
|
2
|
+
import { provideGuidoActions as te } from "../composables/useGuidoActions.js";
|
|
3
|
+
import { usePartner as oe } from "../composables/usePartner.js";
|
|
4
|
+
import { useStripo as ne } from "../composables/useStripo.js";
|
|
5
|
+
import { useTimerClone as re } from "../composables/useTimerClone.js";
|
|
6
|
+
import { migrate as I } from "../config/migrator/index.js";
|
|
7
|
+
import { ModuleFolderDefaults as W } from "../enums/defaults.js";
|
|
8
|
+
import { RIBBON_SELECTOR as se } from "../enums/onboarding.js";
|
|
9
|
+
import ie from "./organisms/base/Toaster.vue.js";
|
|
10
|
+
import ae from "./organisms/header/HeaderWrapper.vue.js";
|
|
11
|
+
import ce from "./organisms/LoadingWrapper.vue.js";
|
|
12
|
+
import { useStripoApi as me } from "../services/stripoApi.js";
|
|
13
|
+
import { useConfigStore as de } from "../stores/config.js";
|
|
14
|
+
import { useDynamicContentStore as le } from "../stores/dynamic-content.js";
|
|
15
|
+
import { useEditorStore as pe } from "../stores/editor.js";
|
|
16
|
+
import { usePreviewStore as ue } from "../stores/preview.js";
|
|
17
|
+
import { useUnsubscribeStore as fe } from "../stores/unsubscribe.js";
|
|
18
|
+
const Me = /* @__PURE__ */ X({
|
|
21
19
|
__name: "Guido",
|
|
22
20
|
props: {
|
|
23
21
|
config: null
|
|
24
22
|
},
|
|
25
23
|
emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
|
|
26
|
-
setup(
|
|
27
|
-
const
|
|
24
|
+
setup(B, { expose: H, emit: o }) {
|
|
25
|
+
const y = B, x = s(
|
|
26
|
+
() => import("./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js")
|
|
27
|
+
), G = s(
|
|
28
|
+
() => import("./organisms/save-as-template/SaveAsTemplateDrawer.vue.js")
|
|
29
|
+
), z = s(
|
|
30
|
+
() => import("./organisms/unsubscribe/UnsubscribeWrapper.vue.js")
|
|
31
|
+
), q = s(
|
|
28
32
|
() => import("./organisms/email-preview/PreviewContainer.vue.js")
|
|
29
|
-
),
|
|
33
|
+
), K = s(
|
|
30
34
|
() => import("./organisms/onboarding/OnboardingWrapper.vue.js")
|
|
31
|
-
), h =
|
|
32
|
-
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
defaultModulesFolderName: E
|
|
52
|
-
}, C = {
|
|
53
|
-
preselectedDynamicContentList: l,
|
|
35
|
+
), h = R(), m = R(), d = le(), S = fe(), n = de();
|
|
36
|
+
n.init(y.config);
|
|
37
|
+
const l = pe(), V = ue(), i = A(() => l.hasChanges), { isTestPartner: $ } = oe(), C = () => h.value?.handleSave(!0), {
|
|
38
|
+
templateId: p,
|
|
39
|
+
userId: w,
|
|
40
|
+
partnerName: E,
|
|
41
|
+
username: D,
|
|
42
|
+
template: r,
|
|
43
|
+
editor: u
|
|
44
|
+
} = n, a = r?.html || "", T = r?.css || "", f = r?.preselectedDynamicContent || [], O = u?.savedModulesFolderName || W.SAVED_MODULES, k = u?.defaultModulesFolderName || W.DEFAULT_MODULES;
|
|
45
|
+
l.templateId = p;
|
|
46
|
+
const b = {
|
|
47
|
+
emailId: p,
|
|
48
|
+
userId: w,
|
|
49
|
+
username: D,
|
|
50
|
+
partnerName: E,
|
|
51
|
+
savedModulesFolderName: O,
|
|
52
|
+
defaultModulesFolderName: k
|
|
53
|
+
}, F = {
|
|
54
|
+
preselectedDynamicContentList: f,
|
|
54
55
|
onReady: () => {
|
|
55
|
-
console.debug("guido:ready"),
|
|
56
|
+
console.debug("guido:ready"), o("ready");
|
|
56
57
|
}
|
|
57
|
-
}, { initPlugin:
|
|
58
|
-
|
|
59
|
-
return !((e = s.ui) != null && e.showHeader);
|
|
60
|
-
});
|
|
61
|
-
Q({
|
|
58
|
+
}, { initPlugin: L } = ne(b, F), { getDefaultTemplate: U } = me(), { cloneTimersOnSave: _, hasTimerBlocks: M } = re(), j = A(() => !n.ui?.showHeader);
|
|
59
|
+
te({
|
|
62
60
|
onBack: () => {
|
|
63
|
-
console.debug("guido:back"),
|
|
61
|
+
console.debug("guido:back"), o("back");
|
|
64
62
|
},
|
|
65
63
|
onSaveStart: () => {
|
|
66
|
-
console.debug("guido:save:start"),
|
|
64
|
+
console.debug("guido:save:start"), o("save:start");
|
|
67
65
|
},
|
|
68
|
-
onSaveComplete: (
|
|
69
|
-
const
|
|
70
|
-
console.debug("guido:save:complete",
|
|
66
|
+
onSaveComplete: (t) => {
|
|
67
|
+
const e = { ...t, metadata: b };
|
|
68
|
+
console.debug("guido:save:complete", e), o("save:complete", e);
|
|
71
69
|
},
|
|
72
70
|
onTestEmailClick: () => {
|
|
73
|
-
console.debug("guido:test-email:click"),
|
|
71
|
+
console.debug("guido:test-email:click"), o("test-email:click");
|
|
74
72
|
}
|
|
75
73
|
});
|
|
76
|
-
const
|
|
77
|
-
console.debug("dynamic-content:close",
|
|
78
|
-
},
|
|
74
|
+
const P = (t) => {
|
|
75
|
+
console.debug("dynamic-content:close", t), d.setSelectedDynamicContent(t), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: t }));
|
|
76
|
+
}, N = () => {
|
|
79
77
|
console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
|
|
80
78
|
};
|
|
81
|
-
|
|
82
|
-
|
|
79
|
+
Y(() => i.value, () => {
|
|
80
|
+
o("on-change", i.value);
|
|
83
81
|
});
|
|
84
|
-
const
|
|
85
|
-
const
|
|
86
|
-
console.debug("dynamic-content:open",
|
|
82
|
+
const v = (t) => {
|
|
83
|
+
const e = t, { attribute: J, position: Q } = e.detail;
|
|
84
|
+
console.debug("dynamic-content:open", e.detail), o("dynamic-content:open", J, Q);
|
|
85
|
+
};
|
|
86
|
+
let c = null;
|
|
87
|
+
const g = () => {
|
|
88
|
+
const t = document.querySelector(se);
|
|
89
|
+
m.value?.style.setProperty("--ribbon-offset", `${t?.offsetHeight ?? 0}px`);
|
|
87
90
|
};
|
|
88
|
-
return
|
|
89
|
-
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
|
|
91
|
+
return Z(async () => {
|
|
92
|
+
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), g();
|
|
93
|
+
const t = m.value?.parentElement;
|
|
94
|
+
t && (c = new ResizeObserver(g), c.observe(t));
|
|
90
95
|
try {
|
|
91
|
-
|
|
96
|
+
S.selectedUnsubscribePages = r?.selectedUnsubscribePages || [];
|
|
92
97
|
let e = {
|
|
93
|
-
html: a && await
|
|
94
|
-
css:
|
|
98
|
+
html: a && await I(a),
|
|
99
|
+
css: T
|
|
95
100
|
};
|
|
96
|
-
e.html || (e = await
|
|
101
|
+
e.html || (e = await U(), e.html = await I(e.html)), M(e.html) && (e.html = await _(e.html)), await L(e), d.selectedDynamicContentList = f;
|
|
97
102
|
} catch (e) {
|
|
98
103
|
console.error("Failed to initialize Stripo editor:", e);
|
|
99
104
|
}
|
|
100
|
-
document.addEventListener("dynamic-content:open",
|
|
101
|
-
}),
|
|
102
|
-
document.removeEventListener("dynamic-content:open",
|
|
105
|
+
document.addEventListener("dynamic-content:open", v);
|
|
106
|
+
}), ee(() => {
|
|
107
|
+
c?.disconnect(), document.removeEventListener("dynamic-content:open", v);
|
|
103
108
|
try {
|
|
104
109
|
window.UIEditor.removeEditor();
|
|
105
110
|
} catch {
|
|
106
111
|
console.debug("Failed to remove Stripo editor: No editor found");
|
|
107
112
|
}
|
|
108
|
-
|
|
109
|
-
}),
|
|
113
|
+
n.reset();
|
|
114
|
+
}), H({
|
|
110
115
|
dynamicContent: {
|
|
111
|
-
insert:
|
|
112
|
-
close:
|
|
116
|
+
insert: P,
|
|
117
|
+
close: N
|
|
113
118
|
},
|
|
114
|
-
hasChanges:
|
|
115
|
-
saveSilent:
|
|
116
|
-
}), { __sfc: !0, PreviewContainer:
|
|
119
|
+
hasChanges: i,
|
|
120
|
+
saveSilent: C
|
|
121
|
+
}), { __sfc: !0, FilterSelectionDrawer: x, SaveAsTemplateDrawer: G, UnsubscribeWrapper: z, PreviewContainer: q, OnboardingWrapper: K, headerWrapperRef: h, wrapperRef: m, dynamicContentStore: d, unsubscribeStore: S, props: y, configStore: n, editorStore: l, previewStore: V, hasChanges: i, isTestPartner: $, saveSilent: C, templateId: p, userId: w, partnerName: E, username: D, templateConfig: r, editorConfig: u, html: a, css: T, preselectedDynamicContentList: f, savedModulesFolderName: O, defaultModulesFolderName: k, emit: o, metadata: b, options: F, initPlugin: L, getDefaultTemplate: U, cloneTimersOnSave: _, hasTimerBlocks: M, noHeader: j, insertDynamicContent: P, closeDynamicContent: N, handleDynamicContentOpen: v, ribbonObserver: c, updateRibbonOffset: g, Toaster: ie, HeaderWrapper: ae, LoadingWrapper: ce };
|
|
117
122
|
}
|
|
118
123
|
});
|
|
119
124
|
export {
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useToasterStore as
|
|
3
|
-
import { InToasts as
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as r, ref as s, computed as a, onBeforeUnmount as c } from "vue";
|
|
2
|
+
import { useToasterStore as i } from "../../../stores/toaster.js";
|
|
3
|
+
import { InToasts as u } from "@useinsider/design-system-vue";
|
|
4
|
+
const _ = /* @__PURE__ */ r({
|
|
5
5
|
__name: "Toaster",
|
|
6
|
-
setup(
|
|
7
|
-
const t =
|
|
6
|
+
setup(f) {
|
|
7
|
+
const t = i(), o = s(null), e = a(() => t.actionButton ? [{ text: t.actionButton.text }] : []), n = () => {
|
|
8
8
|
t.actionButton && t.actionButton.onClick(), t.hideToaster();
|
|
9
9
|
};
|
|
10
|
-
return
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}), { __sfc: !0, store: t, toastRef: o, actionButtonsConfig: r, handleActionClick: s, InToasts: m };
|
|
10
|
+
return c(() => {
|
|
11
|
+
t.$reset(), o.value?.$el?.remove();
|
|
12
|
+
}), { __sfc: !0, store: t, toastRef: o, actionButtonsConfig: e, handleActionClick: n, InToasts: u };
|
|
14
13
|
}
|
|
15
14
|
});
|
|
16
15
|
export {
|
|
17
|
-
|
|
16
|
+
_ as default
|
|
18
17
|
};
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { defineComponent as f, ref as s, onMounted as c, onBeforeUnmount as m, nextTick as u } from "vue";
|
|
2
2
|
import { useTranslations as p } from "../../../../composables/useTranslations.js";
|
|
3
3
|
import { usePreviewStore as l } from "../../../../stores/preview.js";
|
|
4
|
-
import
|
|
5
|
-
const
|
|
4
|
+
import v from "./DesktopBrowserHeader.vue.js";
|
|
5
|
+
const R = /* @__PURE__ */ f({
|
|
6
6
|
__name: "DesktopPreview",
|
|
7
|
-
setup(
|
|
8
|
-
const
|
|
7
|
+
setup(_) {
|
|
8
|
+
const i = p(), r = s(), o = s(!1), a = l();
|
|
9
9
|
let e = null;
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
}), e.observe(
|
|
13
|
-
|
|
10
|
+
const n = () => {
|
|
11
|
+
r.value && (e = new ResizeObserver(() => {
|
|
12
|
+
}), e.observe(r.value), u(() => {
|
|
13
|
+
o.value = !0;
|
|
14
14
|
}));
|
|
15
|
-
},
|
|
16
|
-
e
|
|
15
|
+
}, t = () => {
|
|
16
|
+
e?.disconnect();
|
|
17
17
|
};
|
|
18
|
-
return c(
|
|
18
|
+
return c(n), m(t), { __sfc: !0, trans: i, containerRef: r, isContainerReady: o, previewStore: a, resizeObserver: e, initIframe: n, cleanIframe: t, DesktopBrowserHeader: v };
|
|
19
19
|
}
|
|
20
20
|
});
|
|
21
21
|
export {
|
|
22
|
-
|
|
22
|
+
R as default
|
|
23
23
|
};
|