@useinsider/guido 3.2.0-beta.e69fb3b → 3.2.0-beta.ecc7c6c
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 +1 -1
- package/dist/@types/config/validator.js +34 -27
- package/dist/components/Guido.vue.js +1 -1
- package/dist/components/Guido.vue2.js +81 -76
- package/dist/components/organisms/base/Toaster.vue2.js +11 -10
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue2.js +12 -12
- package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue2.js +6 -6
- package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue2.js +15 -9
- package/dist/components/organisms/extensions/recommendation/FilterItem.vue2.js +40 -31
- package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue2.js +20 -19
- package/dist/components/organisms/extensions/recommendation/Filters.vue2.js +14 -11
- package/dist/components/organisms/header/EditorActions.vue.js +12 -11
- package/dist/components/organisms/header/EditorActions.vue2.js +22 -18
- package/dist/components/organisms/header/HeaderWrapper.vue2.js +15 -12
- package/dist/components/organisms/header/LeftSlot.vue2.js +19 -16
- package/dist/components/organisms/header/MiddleSlot.vue2.js +11 -14
- package/dist/components/organisms/header/RightSlot.vue2.js +17 -14
- package/dist/components/organisms/onboarding/AMPOnboarding.vue.js +12 -11
- package/dist/components/organisms/onboarding/AMPOnboarding.vue2.js +26 -24
- package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +12 -11
- package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +44 -41
- package/dist/components/organisms/onboarding/ItemsOnboarding.vue.js +12 -11
- package/dist/components/organisms/onboarding/ItemsOnboarding.vue2.js +38 -36
- package/dist/components/organisms/onboarding/NewVersionPopup.vue2.js +21 -18
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +31 -27
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.js +12 -11
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue2.js +32 -30
- package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue.js +12 -11
- package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue2.js +23 -21
- package/dist/components/organisms/save-as-template/SaveAsTemplateDrawer.vue2.js +9 -8
- package/dist/components/organisms/unsubscribe/UnsubscribeWrapper.vue.js +10 -9
- package/dist/composables/useActionsApi.js +38 -37
- package/dist/composables/useBlocksConfig.js +26 -26
- package/dist/composables/useFullStoryBridge.js +9 -8
- package/dist/composables/useHtmlCompiler.js +26 -34
- package/dist/composables/useHtmlValidator.js +114 -101
- package/dist/composables/useHttp.js +30 -30
- package/dist/composables/usePartner.js +1 -1
- package/dist/composables/useRecommendation.js +15 -14
- package/dist/composables/useRibbonOffset.js +15 -15
- package/dist/composables/useSave.js +23 -19
- package/dist/composables/useStripo.js +48 -53
- package/dist/composables/useSyncModuleExtractor.js +29 -31
- package/dist/composables/useTimerClone.js +25 -24
- package/dist/composables/useTranslations.js +3 -2
- package/dist/composables/useValidation.js +8 -7
- package/dist/composables/validators/useCouponBlockValidator.js +24 -0
- package/dist/composables/validators/useLiquidValidator.js +13 -13
- package/dist/config/compiler/recommendationCompilerRules.js +27 -27
- package/dist/config/compiler/unsubscribeCompilerRules.js +19 -17
- package/dist/config/compiler/utils/recommendationCompilerUtils.js +11 -10
- package/dist/config/migrator/checkboxMigrator.js +21 -20
- package/dist/config/migrator/couponBlockMigrator.js +19 -18
- package/dist/config/migrator/itemsBlockMigrator.js +89 -87
- package/dist/config/migrator/radioButtonMigrator.js +63 -42
- package/dist/config/migrator/recommendationMigrator.js +109 -106
- package/dist/config/migrator/unsubscribeMigrator.js +11 -10
- package/dist/enums/unsubscribe.js +19 -18
- 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 +97 -89
- package/dist/extensions/Blocks/Items/controls/image/link.js +14 -14
- package/dist/extensions/Blocks/Items/controls/name/trimming.js +24 -23
- package/dist/extensions/Blocks/Items/controls/price/currencyLocation.js +14 -13
- package/dist/extensions/Blocks/Items/controls/price/currencySymbol.js +47 -44
- 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 +40 -38
- package/dist/extensions/Blocks/Items/controls/price/singlePrice.js +35 -35
- package/dist/extensions/Blocks/Items/controls/settingsControl.js +162 -155
- package/dist/extensions/Blocks/Items/enums/productEnums.js +14 -9
- package/dist/extensions/Blocks/Items/template.js +210 -210
- package/dist/extensions/Blocks/RadioButton/template.js +1 -1
- package/dist/extensions/Blocks/Recommendation/controls/button/index.js +36 -36
- package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +133 -128
- package/dist/extensions/Blocks/Recommendation/controls/customAttribute/index.js +9 -9
- package/dist/extensions/Blocks/Recommendation/controls/customAttribute/textTrim.js +10 -10
- package/dist/extensions/Blocks/Recommendation/controls/image/index.js +9 -9
- package/dist/extensions/Blocks/Recommendation/controls/main/algorithm.js +18 -17
- package/dist/extensions/Blocks/Recommendation/controls/main/filters.js +6 -4
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +90 -82
- 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 +36 -35
- package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +135 -134
- package/dist/extensions/Blocks/Recommendation/controls/name/index.js +24 -24
- package/dist/extensions/Blocks/Recommendation/controls/name/textTrim.js +10 -10
- 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/spacing/index.js +32 -32
- package/dist/extensions/Blocks/Recommendation/controls/syncInfoMessage.js +20 -18
- package/dist/extensions/Blocks/Recommendation/extension.js +32 -31
- package/dist/extensions/Blocks/Recommendation/settingsPanel.js +16 -8
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +64 -54
- package/dist/extensions/Blocks/Recommendation/templates/grid/elementRenderer.js +23 -22
- package/dist/extensions/Blocks/Recommendation/templates/grid/migration.js +10 -10
- package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +10 -10
- package/dist/extensions/Blocks/Recommendation/templates/index.js +6 -6
- package/dist/extensions/Blocks/Recommendation/templates/list/elementRenderer.js +25 -24
- package/dist/extensions/Blocks/Recommendation/templates/list/template.js +1 -1
- package/dist/extensions/Blocks/Recommendation/templates/utils.js +47 -45
- package/dist/extensions/Blocks/Recommendation/validation/filterSchema.js +16 -13
- package/dist/extensions/Blocks/Recommendation/validation/requiredFields.js +33 -0
- package/dist/extensions/Blocks/Unsubscribe/control.js +13 -11
- package/dist/extensions/Blocks/Unsubscribe/elements/preview.js +18 -16
- package/dist/extensions/Blocks/common-control.js +26 -25
- package/dist/extensions/DynamicContent/dynamic-content.js +58 -53
- package/dist/guido.css +1 -1
- package/dist/library.js +12 -11
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +234 -233
- package/dist/node_modules/lodash-es/_DataView.js +6 -0
- package/dist/node_modules/lodash-es/_Promise.js +6 -0
- package/dist/node_modules/lodash-es/_Set.js +6 -0
- package/dist/node_modules/lodash-es/_SetCache.js +13 -0
- package/dist/node_modules/lodash-es/_Stack.js +18 -0
- package/dist/node_modules/lodash-es/_Uint8Array.js +5 -0
- package/dist/node_modules/lodash-es/_WeakMap.js +6 -0
- package/dist/node_modules/lodash-es/_arrayFilter.js +10 -0
- package/dist/node_modules/lodash-es/_arrayLikeKeys.js +20 -0
- package/dist/node_modules/lodash-es/_arrayMap.js +8 -0
- package/dist/node_modules/lodash-es/_arrayPush.js +8 -0
- package/dist/node_modules/lodash-es/_arraySome.js +9 -0
- package/dist/node_modules/lodash-es/_baseEach.js +6 -0
- package/dist/node_modules/lodash-es/_baseFlatten.js +13 -0
- package/dist/node_modules/lodash-es/_baseFor.js +5 -0
- package/dist/node_modules/lodash-es/_baseForOwn.js +8 -0
- package/dist/node_modules/lodash-es/_baseGet.js +11 -0
- package/dist/node_modules/lodash-es/_baseGetAllKeys.js +9 -0
- package/dist/node_modules/lodash-es/_baseHasIn.js +6 -0
- package/dist/node_modules/lodash-es/_baseIsArguments.js +9 -0
- package/dist/node_modules/lodash-es/_baseIsEqual.js +8 -0
- package/dist/node_modules/lodash-es/_baseIsEqualDeep.js +32 -0
- package/dist/node_modules/lodash-es/_baseIsMatch.js +29 -0
- package/dist/node_modules/lodash-es/_baseIsTypedArray.js +12 -0
- package/dist/node_modules/lodash-es/_baseIteratee.js +11 -0
- package/dist/node_modules/lodash-es/_baseKeys.js +14 -0
- package/dist/node_modules/lodash-es/_baseMap.js +11 -0
- package/dist/node_modules/lodash-es/_baseMatches.js +12 -0
- package/dist/node_modules/lodash-es/_baseMatchesProperty.js +17 -0
- package/dist/node_modules/lodash-es/_baseProperty.js +8 -0
- package/dist/node_modules/lodash-es/_basePropertyDeep.js +9 -0
- package/dist/node_modules/lodash-es/_baseRange.js +9 -0
- package/dist/node_modules/lodash-es/_baseTimes.js +8 -0
- package/dist/node_modules/lodash-es/_baseToString.js +18 -0
- package/dist/node_modules/lodash-es/_baseTrim.js +8 -0
- package/dist/node_modules/lodash-es/_baseUnary.js +8 -0
- package/dist/node_modules/lodash-es/_cacheHas.js +6 -0
- package/dist/node_modules/lodash-es/_castPath.js +10 -0
- package/dist/node_modules/lodash-es/_createBaseEach.js +15 -0
- package/dist/node_modules/lodash-es/_createBaseFor.js +13 -0
- package/dist/node_modules/lodash-es/_createRange.js +11 -0
- package/dist/node_modules/lodash-es/_equalArrays.js +40 -0
- package/dist/node_modules/lodash-es/_equalByTag.js +45 -0
- package/dist/node_modules/lodash-es/_equalObjects.js +36 -0
- package/dist/node_modules/lodash-es/_getAllKeys.js +9 -0
- package/dist/node_modules/lodash-es/_getMatchData.js +12 -0
- package/dist/node_modules/lodash-es/_getSymbols.js +10 -0
- package/dist/node_modules/lodash-es/_getTag.js +28 -0
- package/dist/node_modules/lodash-es/_getValue.js +1 -1
- package/dist/node_modules/lodash-es/_hasPath.js +19 -0
- package/dist/node_modules/lodash-es/_isFlattenable.js +10 -0
- package/dist/node_modules/lodash-es/_isIndex.js +8 -0
- package/dist/node_modules/lodash-es/_isIterateeCall.js +13 -0
- package/dist/node_modules/lodash-es/_isKey.js +12 -0
- package/dist/node_modules/lodash-es/_isPrototype.js +8 -0
- package/dist/node_modules/lodash-es/_isStrictComparable.js +7 -0
- package/dist/node_modules/lodash-es/_mapToArray.js +9 -0
- package/dist/node_modules/lodash-es/_matchesStrictComparable.js +8 -0
- package/dist/node_modules/lodash-es/_memoizeCapped.js +11 -0
- package/dist/node_modules/lodash-es/_nativeKeys.js +5 -0
- package/dist/node_modules/lodash-es/_nodeUtil.js +11 -0
- package/dist/node_modules/lodash-es/_overArg.js +8 -0
- package/dist/node_modules/lodash-es/_setCacheAdd.js +7 -0
- package/dist/node_modules/lodash-es/_setCacheHas.js +6 -0
- package/dist/node_modules/lodash-es/_setToArray.js +9 -0
- package/dist/node_modules/lodash-es/_stackClear.js +7 -0
- package/dist/node_modules/lodash-es/_stackDelete.js +7 -0
- package/dist/node_modules/lodash-es/_stackGet.js +6 -0
- package/dist/node_modules/lodash-es/_stackHas.js +6 -0
- package/dist/node_modules/lodash-es/_stackSet.js +17 -0
- package/dist/node_modules/lodash-es/_stringToPath.js +10 -0
- package/dist/node_modules/lodash-es/_toKey.js +10 -0
- package/dist/node_modules/lodash-es/_trimmedEndIndex.js +9 -0
- package/dist/node_modules/lodash-es/flatMap.js +8 -0
- package/dist/node_modules/lodash-es/get.js +8 -0
- package/dist/node_modules/lodash-es/hasIn.js +8 -0
- package/dist/node_modules/lodash-es/identity.js +6 -0
- package/dist/node_modules/lodash-es/isArguments.js +10 -0
- package/dist/node_modules/lodash-es/isArray.js +4 -0
- package/dist/node_modules/lodash-es/isArrayLike.js +8 -0
- package/dist/node_modules/lodash-es/isBuffer.js +6 -0
- package/dist/node_modules/lodash-es/isLength.js +7 -0
- package/dist/node_modules/lodash-es/isObjectLike.js +6 -0
- package/dist/node_modules/lodash-es/isSymbol.js +9 -0
- package/dist/node_modules/lodash-es/isTypedArray.js +7 -0
- package/dist/node_modules/lodash-es/keys.js +9 -0
- package/dist/node_modules/lodash-es/map.js +11 -0
- package/dist/node_modules/lodash-es/property.js +10 -0
- package/dist/node_modules/lodash-es/range.js +5 -0
- package/dist/node_modules/lodash-es/stubArray.js +6 -0
- package/dist/node_modules/lodash-es/stubFalse.js +6 -0
- package/dist/node_modules/lodash-es/toFinite.js +14 -0
- package/dist/node_modules/lodash-es/toNumber.js +22 -0
- package/dist/node_modules/lodash-es/toString.js +7 -0
- package/dist/node_modules/valibot/dist/index.js +126 -122
- package/dist/services/recommendationApi.js +17 -14
- package/dist/services/templateLibraryApi.js +40 -38
- package/dist/src/components/wrappers/WpModal.vue.d.ts +1 -1
- package/dist/src/composables/useHtmlCompiler.d.ts +2 -1
- package/dist/src/composables/validators/useCouponBlockValidator.d.ts +3 -0
- package/dist/src/extensions/Blocks/RadioButton/template.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +7 -1
- package/dist/src/extensions/Blocks/Recommendation/validation/requiredFields.d.ts +21 -0
- package/dist/src/stores/dynamic-content.d.ts +3 -3
- package/dist/stores/config.js +81 -25
- package/dist/stores/dynamic-content.js +11 -6
- package/dist/stores/onboarding.js +1 -1
- package/dist/stores/preview.js +9 -6
- package/dist/stores/unsubscribe.js +4 -1
- package/dist/utils/dateUtil.js +10 -7
- package/dist/utils/genericUtil.js +13 -10
- package/dist/utils/pairProductVariables.js +89 -87
- package/package.json +1 -6
- package/dist/enums/displayConditions.js +0 -80
- package/dist/src/enums/displayConditions.d.ts +0 -2
|
@@ -1,91 +1,93 @@
|
|
|
1
|
-
import { useConfig as
|
|
2
|
-
import { useHttp as
|
|
3
|
-
import { useToaster as
|
|
4
|
-
import { useTranslations as
|
|
5
|
-
import { useLiquidValidator as
|
|
6
|
-
import { EditorType as
|
|
7
|
-
import { useRecommendationExtensionStore as
|
|
8
|
-
import { useSaveAsTemplateStore as
|
|
1
|
+
import { useConfig as w } from "../composables/useConfig.js";
|
|
2
|
+
import { useHttp as b } from "../composables/useHttp.js";
|
|
3
|
+
import { useToaster as C } from "../composables/useToaster.js";
|
|
4
|
+
import { useTranslations as h } from "../composables/useTranslations.js";
|
|
5
|
+
import { useLiquidValidator as S } from "../composables/validators/useLiquidValidator.js";
|
|
6
|
+
import { EditorType as v } from "../enums/defaults.js";
|
|
7
|
+
import { useRecommendationExtensionStore as N } from "../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
8
|
+
import { useSaveAsTemplateStore as x } from "../stores/save-as-template.js";
|
|
9
9
|
import { base64EncodeWithSpecialChars as r } from "../utils/base64.js";
|
|
10
|
-
import { useTemplatePreparation as
|
|
11
|
-
const
|
|
12
|
-
const { get:
|
|
10
|
+
import { useTemplatePreparation as A } from "../utils/templatePreparation.js";
|
|
11
|
+
const $ = () => {
|
|
12
|
+
const { get: n, post: m } = b(), { handleError: o, showToaster: l } = C(), { config: c, isFeatureEnabled: p } = w(), { validateLiquidSyntax: g } = S(), u = h();
|
|
13
13
|
return {
|
|
14
14
|
getCategories: async () => {
|
|
15
15
|
try {
|
|
16
|
-
const { data: e = [] } = await
|
|
16
|
+
const { data: e = [] } = await n("/newsletter/template-library/get-template-categories");
|
|
17
17
|
return e;
|
|
18
18
|
} catch (e) {
|
|
19
|
-
return
|
|
19
|
+
return o(e, "Failed to fetch template categories"), [];
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
checkTemplateNameAvailability: async (e) => {
|
|
23
|
-
const { data: { status: t = !1 } } = await
|
|
23
|
+
const { data: { status: t = !1 } } = await n(
|
|
24
24
|
`/newsletter/template-library/template-name-exists?name=${e}`
|
|
25
25
|
);
|
|
26
26
|
return !t;
|
|
27
27
|
},
|
|
28
28
|
createCategory: async (e) => {
|
|
29
29
|
try {
|
|
30
|
-
const { data: { id: t } } = await
|
|
30
|
+
const { data: { id: t } } = await m(
|
|
31
31
|
"/newsletter/template-library/create-category",
|
|
32
32
|
{ name: e }
|
|
33
33
|
);
|
|
34
34
|
return t.toString();
|
|
35
35
|
} catch (t) {
|
|
36
|
-
return
|
|
36
|
+
return o(t, "Failed to create category"), "";
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
39
|
createTemplate: async () => {
|
|
40
|
+
var e, t, d, y;
|
|
40
41
|
try {
|
|
41
|
-
const { prepareTemplateDetails:
|
|
42
|
-
if (
|
|
42
|
+
const { prepareTemplateDetails: i } = A(), s = x(), a = await i();
|
|
43
|
+
if (p("liquidSyntax") && !await g(a.compiledHtml))
|
|
43
44
|
return !1;
|
|
44
|
-
const
|
|
45
|
-
name:
|
|
46
|
-
categories:
|
|
47
|
-
productId:
|
|
48
|
-
editorType:
|
|
49
|
-
messageType:
|
|
45
|
+
const f = {
|
|
46
|
+
name: s.getTemplateName,
|
|
47
|
+
categories: s.getSelectedCategoryIds,
|
|
48
|
+
productId: ((t = (e = c.value) == null ? void 0 : e.partner) == null ? void 0 : t.productType) || 0,
|
|
49
|
+
editorType: v,
|
|
50
|
+
messageType: ((y = (d = c.value) == null ? void 0 : d.partner) == null ? void 0 : y.messageType) || 0,
|
|
50
51
|
content: r(a.compiledHtml),
|
|
51
52
|
css: r(a.css),
|
|
52
53
|
unsubscriptionPreferencePageStatus: !1,
|
|
53
54
|
unsubscriptionPreferencePages: [],
|
|
54
55
|
recommendationCampaignUrls: r(
|
|
55
|
-
|
|
56
|
+
N().recommendationCampaignUrls
|
|
56
57
|
),
|
|
57
58
|
recommendationConfigs: r({}),
|
|
58
59
|
isGuido: !0,
|
|
59
60
|
// eslint-disable-next-line camelcase
|
|
60
|
-
template_engine:
|
|
61
|
+
template_engine: p("liquidSyntax") ? 1 : 0,
|
|
61
62
|
stripoConfig: r({
|
|
62
63
|
editor: "stripo",
|
|
63
64
|
html: a.rawHtml,
|
|
64
|
-
css: a.css
|
|
65
|
+
css: a.css,
|
|
66
|
+
dynamicContentList: a.dynamicContentList
|
|
65
67
|
})
|
|
66
|
-
}, { data: { type:
|
|
68
|
+
}, { data: { type: T } } = await m(
|
|
67
69
|
"/newsletter/template-library/create-template",
|
|
68
|
-
|
|
70
|
+
f
|
|
69
71
|
);
|
|
70
|
-
return
|
|
71
|
-
message:
|
|
72
|
+
return T === "alert" ? (l({
|
|
73
|
+
message: u(
|
|
72
74
|
"newsletter.template-library-save-alert",
|
|
73
|
-
{ templateName:
|
|
75
|
+
{ templateName: s.getTemplateName }
|
|
74
76
|
),
|
|
75
77
|
type: "alert"
|
|
76
|
-
}), !1) : (
|
|
77
|
-
message:
|
|
78
|
+
}), !1) : (l({
|
|
79
|
+
message: u(
|
|
78
80
|
"newsletter.template-library-save-success",
|
|
79
|
-
{ templateName:
|
|
81
|
+
{ templateName: s.getTemplateName }
|
|
80
82
|
),
|
|
81
83
|
type: "success"
|
|
82
84
|
}), !0);
|
|
83
|
-
} catch (
|
|
84
|
-
return
|
|
85
|
+
} catch (i) {
|
|
86
|
+
return o(i, "Failed to create template"), !1;
|
|
85
87
|
}
|
|
86
88
|
}
|
|
87
89
|
};
|
|
88
90
|
};
|
|
89
91
|
export {
|
|
90
|
-
|
|
92
|
+
$ as useTemplateLibraryApi
|
|
91
93
|
};
|
|
@@ -34,9 +34,9 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<
|
|
|
34
34
|
}>>>, {
|
|
35
35
|
description: string;
|
|
36
36
|
size: "X-small" | "small" | "medium" | "large";
|
|
37
|
+
closeOnOutsideClick: boolean;
|
|
37
38
|
footerButtonOptions: FooterButtonGroup;
|
|
38
39
|
closeButtonStatus: boolean;
|
|
39
|
-
closeOnOutsideClick: boolean;
|
|
40
40
|
footerStatus: boolean;
|
|
41
41
|
}>;
|
|
42
42
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const migrationTemplate = "\n <td\n align=\"left\"\n esd-extension-block-id=\"radio-button-block\"\n esd-handler-name=\"esd-extension-RadioButtonBlock\"\n class=\"\n radio-button\n radio-button-v2\n esd-block-ra\n esd-radio-button-block\n esd-extension-block\n es-p10t\n es-p10b\n es-p30r\n es-p30l\"\n >\n <table cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"left\" width=\"70%\" style=\"vertical-align: top;\">\n <table cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" width=\"100%\">\n <tbody>\n <tr>\n {-{-TITLE-}-}\n </tr>\n <tr>\n {-{-DESCRIPTION-}-}\n </tr>\n </tbody>\n </table>\n </td>\n <td align=\"right\" width=\"30%\" style=\"vertical-align: middle;\">\n <table cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" width=\"100%\">\n <tbody>\n <tr>\n <td width=\"50%\">\n <table width=\"100%\">\n <tr>\n <td width=\"24\">\n <input\n type=\"radio\"\n id=\"radioYes\"\n name=\"unsubscribe\"\n data-cke-editable=\"1\"\n style=\"margin: 0px; vertical-align: middle
|
|
1
|
+
declare const migrationTemplate = "\n <td\n align=\"left\"\n esd-extension-block-id=\"radio-button-block\"\n esd-handler-name=\"esd-extension-RadioButtonBlock\"\n class=\"\n radio-button\n radio-button-v2\n esd-block-ra\n esd-radio-button-block\n esd-extension-block\n es-p10t\n es-p10b\n es-p30r\n es-p30l\"\n >\n <table cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"left\" width=\"70%\" style=\"vertical-align: top;\">\n <table cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" width=\"100%\">\n <tbody>\n <tr>\n {-{-TITLE-}-}\n </tr>\n <tr>\n {-{-DESCRIPTION-}-}\n </tr>\n </tbody>\n </table>\n </td>\n <td align=\"right\" width=\"30%\" style=\"vertical-align: middle;\">\n <table cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" width=\"100%\">\n <tbody>\n <tr>\n <td width=\"50%\">\n <table width=\"100%\">\n <tr>\n <td width=\"24\">\n <input\n type=\"radio\"\n id=\"radioYes\"\n name=\"unsubscribe\"\n data-cke-editable=\"1\"\n style=\"margin: 0px; vertical-align: middle;\">\n </td>\n {-{-YES-}-}\n </tr>\n </table>\n </td>\n <td width=\"50%\">\n <table width=\"100%\">\n <tr>\n <td width=\"24\">\n <input\n type=\"radio\"\n id=\"radioNo\"\n name=\"unsubscribe\"\n data-cke-editable=\"1\"\n style=\"margin: 0px; vertical-align: middle;\">\n </td>\n {-{-NO-}-}\n </tr>\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n";
|
|
2
2
|
/**
|
|
3
3
|
* @returns The template for the default checkbox block
|
|
4
4
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Orientation, Languages, Currency, NumericSeparator, FiltersResponse, Filter, RecommendationProduct } from '@@/Types/recommendation';
|
|
2
|
-
interface PerBlockConfigs {
|
|
2
|
+
export interface PerBlockConfigs {
|
|
3
3
|
cardsInRow: number;
|
|
4
4
|
currencySettings: {
|
|
5
5
|
name: string;
|
|
@@ -238,6 +238,12 @@ export declare const useRecommendationExtensionStore: import("pinia").StoreDefin
|
|
|
238
238
|
deleteFilter(filter: Filter): void;
|
|
239
239
|
addFilter(filter: Filter): void;
|
|
240
240
|
generateFilterQuery(): string;
|
|
241
|
+
/**
|
|
242
|
+
* Validation-only check invoked at save-CTA time. Defined as an action
|
|
243
|
+
* (not a getter) so reading it does not register reactive tracking on
|
|
244
|
+
* every block's recommendationConfigs across user edits.
|
|
245
|
+
*/
|
|
246
|
+
hasInvalidBlock(): boolean;
|
|
241
247
|
fetchRecommendationProducts(): Promise<void>;
|
|
242
248
|
_doFetchProducts(): Promise<void>;
|
|
243
249
|
}>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { PerBlockConfigs } from '../store/recommendation';
|
|
2
|
+
import type { Currency, Languages } from '@@/Types/recommendation';
|
|
3
|
+
/**
|
|
4
|
+
* Structural slice of the recommendation extension store that descriptors may read.
|
|
5
|
+
* Add new fields here when a future descriptor needs them.
|
|
6
|
+
*/
|
|
7
|
+
export interface ExtensionStoreSlice {
|
|
8
|
+
languages: Languages;
|
|
9
|
+
currencyList: Currency[];
|
|
10
|
+
}
|
|
11
|
+
interface RequiredField {
|
|
12
|
+
key: string;
|
|
13
|
+
getValue: (config: PerBlockConfigs) => string;
|
|
14
|
+
getAvailableOptions?: (store: ExtensionStoreSlice) => string[];
|
|
15
|
+
condition?: (config: PerBlockConfigs) => boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare const REQUIRED_RECOMMENDATION_FIELDS: RequiredField[];
|
|
18
|
+
export declare const RecommendationRequiredFieldsKey = "newsletter.recommendation-fill-required-fields";
|
|
19
|
+
export declare function getInvalidFields(config: PerBlockConfigs, store: ExtensionStoreSlice): string[];
|
|
20
|
+
export declare function isConfigValid(config: PerBlockConfigs, store: ExtensionStoreSlice): boolean;
|
|
21
|
+
export {};
|
|
@@ -26,13 +26,13 @@ export declare const useDynamicContentStore: import("pinia").StoreDefinition<"gu
|
|
|
26
26
|
selectedDynamicContent: DynamicContent;
|
|
27
27
|
selectedDynamicContentList: DynamicContent[];
|
|
28
28
|
}>) => {
|
|
29
|
+
text: string;
|
|
29
30
|
value: string;
|
|
30
|
-
fallback
|
|
31
|
-
format
|
|
31
|
+
fallback: string | undefined;
|
|
32
|
+
format: {
|
|
32
33
|
key: string;
|
|
33
34
|
value: string;
|
|
34
35
|
} | undefined;
|
|
35
|
-
text: string;
|
|
36
36
|
}[];
|
|
37
37
|
}, {
|
|
38
38
|
setSelectedDynamicContent(dynamicContent: DynamicContent): void;
|
package/dist/stores/config.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import "../@types/config/schemas.js";
|
|
2
|
+
import "../@types/config/defaults.js";
|
|
3
|
+
import { parseConfig as n } from "../@types/config/validator.js";
|
|
4
|
+
import { defineStore as o } from "pinia";
|
|
5
|
+
const s = o("guido-config", {
|
|
4
6
|
state: () => ({
|
|
5
7
|
initialized: !1,
|
|
6
8
|
config: null
|
|
@@ -9,83 +11,137 @@ const a = n("guido-config", {
|
|
|
9
11
|
/**
|
|
10
12
|
* Get the identity configuration
|
|
11
13
|
*/
|
|
12
|
-
identity: (
|
|
14
|
+
identity: (i) => {
|
|
15
|
+
var e;
|
|
16
|
+
return ((e = i.config) == null ? void 0 : e.identity) ?? null;
|
|
17
|
+
},
|
|
13
18
|
/**
|
|
14
19
|
* Get the partner configuration
|
|
15
20
|
*/
|
|
16
|
-
partner: (
|
|
21
|
+
partner: (i) => {
|
|
22
|
+
var e;
|
|
23
|
+
return ((e = i.config) == null ? void 0 : e.partner) ?? null;
|
|
24
|
+
},
|
|
17
25
|
/**
|
|
18
26
|
* Get the template configuration
|
|
19
27
|
*/
|
|
20
|
-
template: (
|
|
28
|
+
template: (i) => {
|
|
29
|
+
var e;
|
|
30
|
+
return ((e = i.config) == null ? void 0 : e.template) ?? null;
|
|
31
|
+
},
|
|
21
32
|
/**
|
|
22
33
|
* Get the editor configuration
|
|
23
34
|
*/
|
|
24
|
-
editor: (
|
|
35
|
+
editor: (i) => {
|
|
36
|
+
var e;
|
|
37
|
+
return ((e = i.config) == null ? void 0 : e.editor) ?? null;
|
|
38
|
+
},
|
|
25
39
|
/**
|
|
26
40
|
* Get the UI configuration
|
|
27
41
|
*/
|
|
28
|
-
ui: (
|
|
42
|
+
ui: (i) => {
|
|
43
|
+
var e;
|
|
44
|
+
return ((e = i.config) == null ? void 0 : e.ui) ?? null;
|
|
45
|
+
},
|
|
29
46
|
/**
|
|
30
47
|
* Get the features configuration
|
|
31
48
|
*/
|
|
32
|
-
features: (
|
|
49
|
+
features: (i) => {
|
|
50
|
+
var e;
|
|
51
|
+
return ((e = i.config) == null ? void 0 : e.features) ?? null;
|
|
52
|
+
},
|
|
33
53
|
/**
|
|
34
54
|
* Get the blocks configuration
|
|
35
55
|
*/
|
|
36
|
-
blocks: (
|
|
56
|
+
blocks: (i) => {
|
|
57
|
+
var e;
|
|
58
|
+
return ((e = i.config) == null ? void 0 : e.blocks) ?? null;
|
|
59
|
+
},
|
|
37
60
|
/**
|
|
38
61
|
* Get the compiler configuration
|
|
39
62
|
*/
|
|
40
|
-
compiler: (
|
|
63
|
+
compiler: (i) => {
|
|
64
|
+
var e;
|
|
65
|
+
return ((e = i.config) == null ? void 0 : e.compiler) ?? null;
|
|
66
|
+
},
|
|
41
67
|
/**
|
|
42
68
|
* Get the callbacks configuration
|
|
43
69
|
*/
|
|
44
|
-
callbacks: (
|
|
70
|
+
callbacks: (i) => {
|
|
71
|
+
var e;
|
|
72
|
+
return ((e = i.config) == null ? void 0 : e.callbacks) ?? null;
|
|
73
|
+
},
|
|
45
74
|
/**
|
|
46
75
|
* Get the template ID
|
|
47
76
|
*/
|
|
48
|
-
templateId: (
|
|
77
|
+
templateId: (i) => {
|
|
78
|
+
var e;
|
|
79
|
+
return ((e = i.config) == null ? void 0 : e.identity.templateId) ?? "";
|
|
80
|
+
},
|
|
49
81
|
/**
|
|
50
82
|
* Get the user ID
|
|
51
83
|
*/
|
|
52
|
-
userId: (
|
|
84
|
+
userId: (i) => {
|
|
85
|
+
var e;
|
|
86
|
+
return ((e = i.config) == null ? void 0 : e.identity.userId) ?? "";
|
|
87
|
+
},
|
|
53
88
|
/**
|
|
54
89
|
* Get the variation ID
|
|
55
90
|
*/
|
|
56
|
-
variationId: (
|
|
91
|
+
variationId: (i) => {
|
|
92
|
+
var e;
|
|
93
|
+
return ((e = i.config) == null ? void 0 : e.identity.variationId) ?? "";
|
|
94
|
+
},
|
|
57
95
|
/**
|
|
58
96
|
* Get the partner name
|
|
59
97
|
*/
|
|
60
|
-
partnerName: (
|
|
98
|
+
partnerName: (i) => {
|
|
99
|
+
var e;
|
|
100
|
+
return ((e = i.config) == null ? void 0 : e.partner.name) ?? "";
|
|
101
|
+
},
|
|
61
102
|
/**
|
|
62
103
|
* Get the product type
|
|
63
104
|
*/
|
|
64
|
-
productType: (
|
|
105
|
+
productType: (i) => {
|
|
106
|
+
var e;
|
|
107
|
+
return ((e = i.config) == null ? void 0 : e.partner.productType) ?? 60;
|
|
108
|
+
},
|
|
65
109
|
/**
|
|
66
110
|
* Get the message type
|
|
67
111
|
*/
|
|
68
|
-
messageType: (
|
|
112
|
+
messageType: (i) => {
|
|
113
|
+
var e;
|
|
114
|
+
return ((e = i.config) == null ? void 0 : e.partner.messageType) ?? 1;
|
|
115
|
+
},
|
|
69
116
|
/**
|
|
70
117
|
* Get the username
|
|
71
118
|
*/
|
|
72
|
-
username: (
|
|
119
|
+
username: (i) => {
|
|
120
|
+
var e;
|
|
121
|
+
return ((e = i.config) == null ? void 0 : e.partner.username) ?? "Guido User";
|
|
122
|
+
},
|
|
73
123
|
/**
|
|
74
124
|
* Check if header should be shown
|
|
75
125
|
*/
|
|
76
|
-
showHeader: (
|
|
126
|
+
showHeader: (i) => {
|
|
127
|
+
var e;
|
|
128
|
+
return ((e = i.config) == null ? void 0 : e.ui.showHeader) ?? !0;
|
|
129
|
+
},
|
|
77
130
|
/**
|
|
78
131
|
* Check if a specific feature is enabled
|
|
79
132
|
*/
|
|
80
|
-
isFeatureEnabled: (
|
|
133
|
+
isFeatureEnabled: (i) => (e) => {
|
|
134
|
+
var t;
|
|
135
|
+
return ((t = i.config) == null ? void 0 : t.features[e]) ?? !0;
|
|
136
|
+
}
|
|
81
137
|
},
|
|
82
138
|
actions: {
|
|
83
139
|
/**
|
|
84
140
|
* Initialize the config store with validated configuration
|
|
85
141
|
*/
|
|
86
|
-
init(
|
|
87
|
-
const
|
|
88
|
-
this.config =
|
|
142
|
+
init(i) {
|
|
143
|
+
const e = n(i);
|
|
144
|
+
this.config = e, this.initialized = !0;
|
|
89
145
|
},
|
|
90
146
|
/**
|
|
91
147
|
* Reset the config store
|
|
@@ -96,5 +152,5 @@ const a = n("guido-config", {
|
|
|
96
152
|
}
|
|
97
153
|
});
|
|
98
154
|
export {
|
|
99
|
-
|
|
155
|
+
s as useConfigStore
|
|
100
156
|
};
|
|
@@ -1,17 +1,22 @@
|
|
|
1
|
-
import { removeDuplicatesFromArray as
|
|
2
|
-
import { defineStore as
|
|
3
|
-
const s =
|
|
1
|
+
import { removeDuplicatesFromArray as n } from "../utils/arrayUtil.js";
|
|
2
|
+
import { defineStore as a } from "pinia";
|
|
3
|
+
const s = a("guidoDynamicContent", {
|
|
4
4
|
state: () => ({
|
|
5
5
|
selectedDynamicContent: { text: "", value: "" },
|
|
6
6
|
selectedDynamicContentList: []
|
|
7
7
|
}),
|
|
8
8
|
actions: {
|
|
9
|
-
setSelectedDynamicContent(
|
|
10
|
-
this.selectedDynamicContent =
|
|
9
|
+
setSelectedDynamicContent(t) {
|
|
10
|
+
this.selectedDynamicContent = t, this.selectedDynamicContentList.push(t);
|
|
11
11
|
}
|
|
12
12
|
},
|
|
13
13
|
getters: {
|
|
14
|
-
getSelectedDynamicContentList: (
|
|
14
|
+
getSelectedDynamicContentList: (t) => n(t.selectedDynamicContentList).map((e) => ({
|
|
15
|
+
text: e.text,
|
|
16
|
+
value: e.value,
|
|
17
|
+
fallback: e.fallback,
|
|
18
|
+
format: e.format
|
|
19
|
+
})) || []
|
|
15
20
|
}
|
|
16
21
|
});
|
|
17
22
|
export {
|
|
@@ -46,7 +46,7 @@ const t = () => ({
|
|
|
46
46
|
},
|
|
47
47
|
shouldShowOnboarding: (n) => (i) => {
|
|
48
48
|
const o = n.userModalState.Guido;
|
|
49
|
-
return i === "newVersionPopup" && o
|
|
49
|
+
return i === "newVersionPopup" && (o != null && o.genericOnboarding) ? !1 : o ? !o[i] : !0;
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
52
|
actions: {
|
package/dist/stores/preview.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineStore as
|
|
2
|
-
const
|
|
1
|
+
import { defineStore as e } from "pinia";
|
|
2
|
+
const i = () => ({
|
|
3
3
|
emailFormat: "html",
|
|
4
4
|
ampHtml: "",
|
|
5
5
|
ampErrors: [],
|
|
@@ -7,14 +7,17 @@ const e = () => ({
|
|
|
7
7
|
isLoaded: !1,
|
|
8
8
|
isAMPErrorModalVisible: !1,
|
|
9
9
|
emailSizeKB: 0
|
|
10
|
-
}),
|
|
11
|
-
state: () =>
|
|
10
|
+
}), a = e("guidoPreview", {
|
|
11
|
+
state: () => i(),
|
|
12
12
|
getters: {
|
|
13
13
|
isAMPModeEnabled: (t) => t.emailFormat === "AMP",
|
|
14
14
|
previewHtml() {
|
|
15
15
|
return this.isAMPModeEnabled ? this.ampHtml : this.templateHtml;
|
|
16
16
|
},
|
|
17
|
-
hasAMP: (t) =>
|
|
17
|
+
hasAMP: (t) => {
|
|
18
|
+
var r;
|
|
19
|
+
return !!((r = t.ampHtml) != null && r.trim());
|
|
20
|
+
},
|
|
18
21
|
hasAMPErrors: (t) => t.ampErrors.length > 0,
|
|
19
22
|
showAMPErrorButton() {
|
|
20
23
|
return this.isAMPModeEnabled && this.hasAMPErrors;
|
|
@@ -39,5 +42,5 @@ const e = () => ({
|
|
|
39
42
|
}
|
|
40
43
|
});
|
|
41
44
|
export {
|
|
42
|
-
|
|
45
|
+
a as usePreviewStore
|
|
43
46
|
};
|
|
@@ -19,7 +19,10 @@ const r = () => ({
|
|
|
19
19
|
getSelectedCollection: (e) => i[e.selectedCollectionType],
|
|
20
20
|
getSelectedTemplateByActiveType: (e) => e.selectedTemplates[e.activeType],
|
|
21
21
|
getTemplatesByActiveType: (e) => e.templates.filter((t) => t.type === e.activeType),
|
|
22
|
-
getThumbnailByTemplateId: (e) => (t) =>
|
|
22
|
+
getThumbnailByTemplateId: (e) => (t) => {
|
|
23
|
+
var l;
|
|
24
|
+
return ((l = e.templates.find((s) => s.id === t)) == null ? void 0 : l.thumbnail) ?? "";
|
|
25
|
+
},
|
|
23
26
|
getSelectedUnsubscribePagesByCollection: (e) => (t) => {
|
|
24
27
|
const l = i[t];
|
|
25
28
|
if (!l)
|
package/dist/utils/dateUtil.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { DEFAULT_LOCALE as r, DEFAULT as a, DEFAULT_TZ as c } from "../enums/date.js";
|
|
2
2
|
const m = (t) => t ? t instanceof Date ? t : typeof t == "string" ? t.length === 10 ? new Date(Number(t) * 1e3) : new Date(t) : typeof t == "number" ? t.toString().length === 10 ? new Date(t * 1e3) : new Date(t) : /* @__PURE__ */ new Date() : /* @__PURE__ */ new Date(), s = () => {
|
|
3
3
|
const t = window.l10n;
|
|
4
|
-
return t
|
|
5
|
-
}, u = new Intl.DateTimeFormat().resolvedOptions().timeZone, f = () =>
|
|
4
|
+
return (t == null ? void 0 : t.locale) === a ? r : (t == null ? void 0 : t.locale) || r;
|
|
5
|
+
}, u = new Intl.DateTimeFormat().resolvedOptions().timeZone, f = () => {
|
|
6
|
+
const t = window.l10n;
|
|
7
|
+
return (t == null ? void 0 : t.timezone) || u || c;
|
|
8
|
+
}, D = (t, e = s(), n = f()) => {
|
|
6
9
|
const o = {
|
|
7
10
|
year: "numeric",
|
|
8
11
|
month: "2-digit",
|
|
@@ -10,7 +13,7 @@ const m = (t) => t ? t instanceof Date ? t : typeof t == "string" ? t.length ===
|
|
|
10
13
|
timeZone: n
|
|
11
14
|
}, i = m(t);
|
|
12
15
|
return new Intl.DateTimeFormat(e, o).format(i);
|
|
13
|
-
},
|
|
16
|
+
}, T = (t) => {
|
|
14
17
|
if (!t)
|
|
15
18
|
return "";
|
|
16
19
|
const e = new Date(t);
|
|
@@ -22,12 +25,12 @@ const m = (t) => t ? t instanceof Date ? t : typeof t == "string" ? t.length ===
|
|
|
22
25
|
second: "2-digit",
|
|
23
26
|
hour12: !1
|
|
24
27
|
}).format(e);
|
|
25
|
-
},
|
|
28
|
+
}, h = (t) => t ? Math.floor(Date.now() / 1e3) >= t : !1;
|
|
26
29
|
export {
|
|
27
30
|
m as convertToDateObject,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
+
T as formatPatchDate,
|
|
32
|
+
D as formatShortDate,
|
|
33
|
+
h as isAfterDate,
|
|
31
34
|
u as localTz,
|
|
32
35
|
s as locale,
|
|
33
36
|
f as timezone
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
const s = (
|
|
2
|
-
const a =
|
|
3
|
-
text:
|
|
1
|
+
const s = (e) => {
|
|
2
|
+
const a = e.value.match(/\{\{([^}]+)\}\}/)[1].split("|").map((l) => l.trim()), [n] = a, c = {
|
|
3
|
+
text: e.label,
|
|
4
4
|
value: n || ""
|
|
5
5
|
};
|
|
6
6
|
if (a.length >= 2) {
|
|
7
7
|
const [, l, r] = a;
|
|
8
8
|
if (l.startsWith("default:")) {
|
|
9
9
|
let t = l.slice(8).trim();
|
|
10
|
-
t.startsWith('"') && t.endsWith('"') && (t = t.slice(1, -1)),
|
|
10
|
+
t.startsWith('"') && t.endsWith('"') && (t = t.slice(1, -1)), c.fallback = t;
|
|
11
11
|
} else {
|
|
12
12
|
const t = l.includes("=") ? { key: l.split("=")[0].trim(), value: l.split("=")[1].trim() } : null;
|
|
13
|
-
t ?
|
|
13
|
+
t ? c.format = t : r || (c.fallback = l), r && (c.fallback = r);
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
-
return
|
|
17
|
-
}, u = (
|
|
16
|
+
return c;
|
|
17
|
+
}, u = (e, f = !1) => e.map((a) => {
|
|
18
18
|
if (a.format)
|
|
19
19
|
return {
|
|
20
20
|
label: `${a.text} | ${a.format.key}=${a.format.value}`,
|
|
@@ -26,17 +26,20 @@ const s = (c) => {
|
|
|
26
26
|
label: a.text,
|
|
27
27
|
value: `{{ ${a.value} }}`
|
|
28
28
|
};
|
|
29
|
-
const
|
|
29
|
+
const c = !Number.isNaN(Number(a.fallback)) && a.fallback.trim() !== "" ? a.fallback : `"${a.fallback}"`;
|
|
30
30
|
return {
|
|
31
31
|
label: `${a.text} | ${a.fallback}`,
|
|
32
|
-
value: `{{ ${a.value} | default: ${
|
|
32
|
+
value: `{{ ${a.value} | default: ${c} }}`
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
35
|
return {
|
|
36
36
|
label: a.fallback ? `${a.text} | ${a.fallback}` : a.text,
|
|
37
37
|
value: a.fallback ? `{{${a.value}|${a.fallback}}}` : `{{${a.value}}}`
|
|
38
38
|
};
|
|
39
|
-
}), o = () =>
|
|
39
|
+
}), o = () => {
|
|
40
|
+
var e;
|
|
41
|
+
return ((e = document.head.querySelector('meta[name="csrf-token"]')) == null ? void 0 : e.getAttribute("content")) ?? "";
|
|
42
|
+
};
|
|
40
43
|
export {
|
|
41
44
|
u as dynamicContentToMergeTags,
|
|
42
45
|
o as getCsrfToken,
|