@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
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import s from "./EmailSizeIndicator.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
return
|
|
7
|
-
}, a = [], n = /* @__PURE__ */
|
|
3
|
+
import o from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var r = function() {
|
|
5
|
+
var i = this, e = i._self._c, t = i._self._setupProxy;
|
|
6
|
+
return e("div", { staticClass: "d-f a-i-c j-c-c" }, [t.previewStore.isLoaded ? [e(t.InProgress, { staticClass: "min-w-15-s", attrs: { id: "email-size-progress", "description-status": "", "description-position": "left", description: t.htmlSize, "max-value": t.MAX_EMAIL_SIZE_IN_KB, type: t.progress.type, value: t.progress.value } }), e(t.InTooltipV2, { attrs: { id: "email-size-tooltip", "icon-status": "", "static-position": "bottom center", "dynamic-position": !1, text: t.trans("email-editor.preview-design-size-tooltip") } })] : e(t.InSkeleton, { attrs: { sizing: { width: 200, height: 20 } } })], 2);
|
|
7
|
+
}, a = [], n = /* @__PURE__ */ o(
|
|
8
8
|
s,
|
|
9
|
-
|
|
9
|
+
r,
|
|
10
10
|
a,
|
|
11
11
|
!1,
|
|
12
12
|
null,
|
|
13
|
-
"
|
|
13
|
+
"2cb418af"
|
|
14
14
|
);
|
|
15
15
|
const m = n.exports;
|
|
16
16
|
export {
|
|
@@ -1,25 +1,17 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useTranslations as
|
|
3
|
-
import { usePreviewStore as
|
|
4
|
-
import { InTooltipV2 as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as i, computed as t } from "vue";
|
|
2
|
+
import { useTranslations as m } from "../../../../composables/useTranslations.js";
|
|
3
|
+
import { usePreviewStore as a } from "../../../../stores/preview.js";
|
|
4
|
+
import { InTooltipV2 as p, InSkeleton as c, InProgress as _ } from "@useinsider/design-system-vue";
|
|
5
|
+
const z = /* @__PURE__ */ i({
|
|
6
6
|
__name: "EmailSizeIndicator",
|
|
7
|
-
setup(
|
|
8
|
-
const
|
|
9
|
-
type: "success",
|
|
10
|
-
value:
|
|
11
|
-
})
|
|
12
|
-
|
|
13
|
-
e.value = Math.round(m / 1024), s.value = {
|
|
14
|
-
type: e.value < o ? "success" : "warning",
|
|
15
|
-
value: Math.min(e.value, o)
|
|
16
|
-
};
|
|
17
|
-
}, i = p();
|
|
18
|
-
return u(() => t.previewHtml, () => {
|
|
19
|
-
r();
|
|
20
|
-
}, { immediate: !0 }), { __sfc: !0, previewStore: t, MAX_EMAIL_SIZE_IN_KB: o, htmlKB: e, progress: s, htmlSize: a, calculateProgress: r, trans: i, InProgress: f, InTooltipV2: v };
|
|
7
|
+
setup(l) {
|
|
8
|
+
const e = a(), o = 102, r = t(() => `~${e.emailSizeKB} KB`), n = t(() => ({
|
|
9
|
+
type: e.emailSizeKB < o ? "success" : "warning",
|
|
10
|
+
value: Math.min(e.emailSizeKB, o)
|
|
11
|
+
})), s = m();
|
|
12
|
+
return { __sfc: !0, previewStore: e, MAX_EMAIL_SIZE_IN_KB: o, htmlSize: r, progress: n, trans: s, InProgress: _, InSkeleton: c, InTooltipV2: p };
|
|
21
13
|
}
|
|
22
14
|
});
|
|
23
15
|
export {
|
|
24
|
-
|
|
16
|
+
z as default
|
|
25
17
|
};
|
|
@@ -7,14 +7,14 @@ const h = /* @__PURE__ */ m({
|
|
|
7
7
|
__name: "ContentView",
|
|
8
8
|
emits: ["back-to-inbox"],
|
|
9
9
|
setup(v) {
|
|
10
|
-
const i = a(),
|
|
11
|
-
["transform", "transform-origin", "height"].forEach((
|
|
12
|
-
|
|
10
|
+
const i = a(), r = p(), t = c(), { setupResponsivePreview: n } = f(), s = (e) => {
|
|
11
|
+
["transform", "transform-origin", "height"].forEach((o) => {
|
|
12
|
+
e.documentElement.style.removeProperty(o);
|
|
13
13
|
});
|
|
14
14
|
};
|
|
15
|
-
return { __sfc: !0, trans: i, previewStore:
|
|
16
|
-
const
|
|
17
|
-
|
|
15
|
+
return { __sfc: !0, trans: i, previewStore: r, iframeRef: t, setupResponsivePreview: n, clearAMPTransforms: s, onLoad: () => {
|
|
16
|
+
const e = t.value, o = e?.contentDocument;
|
|
17
|
+
o && (n(e), r.isAMPResponsive && s(o));
|
|
18
18
|
}, InIcons: u };
|
|
19
19
|
}
|
|
20
20
|
});
|
|
@@ -1,21 +1,15 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useConfig as
|
|
3
|
-
import { useTranslations as
|
|
4
|
-
import { InIcons as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as m, computed as o } from "vue";
|
|
2
|
+
import { useConfig as a } from "../../../../composables/useConfig.js";
|
|
3
|
+
import { useTranslations as i } from "../../../../composables/useTranslations.js";
|
|
4
|
+
import { InIcons as c } from "@useinsider/design-system-vue";
|
|
5
|
+
const _ = /* @__PURE__ */ m({
|
|
6
6
|
__name: "InboxView",
|
|
7
7
|
emits: ["open-email"],
|
|
8
|
-
setup(
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
return ((o = (t = (e = s.value) == null ? void 0 : e.editor) == null ? void 0 : t.emailHeader) == null ? void 0 : o.senderName) || n("settings.sender-name");
|
|
12
|
-
}), i = r(() => {
|
|
13
|
-
var e, t, o;
|
|
14
|
-
return ((o = (t = (e = s.value) == null ? void 0 : e.editor) == null ? void 0 : t.emailHeader) == null ? void 0 : o.subject) || n("email-editor.default-subject");
|
|
15
|
-
});
|
|
16
|
-
return { __sfc: !0, emit: m, trans: n, config: s, senderName: a, subject: i, InIcons: f };
|
|
8
|
+
setup(u, { emit: n }) {
|
|
9
|
+
const e = i(), { config: t } = a(), s = o(() => t.value?.editor?.emailHeader?.senderName || e("settings.sender-name")), r = o(() => t.value?.editor?.emailHeader?.subject || e("email-editor.default-subject"));
|
|
10
|
+
return { __sfc: !0, emit: n, trans: e, config: t, senderName: s, subject: r, InIcons: c };
|
|
17
11
|
}
|
|
18
12
|
});
|
|
19
13
|
export {
|
|
20
|
-
|
|
14
|
+
_ as default
|
|
21
15
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useTranslations as
|
|
3
|
-
import { getOperatorOptions as
|
|
4
|
-
import { useRecommendationExtensionStore as
|
|
5
|
-
import { getInvalidFilterFields as
|
|
6
|
-
import { InButtonV2 as
|
|
7
|
-
import
|
|
8
|
-
import { useDebounceFn as
|
|
9
|
-
const
|
|
1
|
+
import { defineComponent as I, computed as r } from "vue";
|
|
2
|
+
import { useTranslations as O } from "../../../../composables/useTranslations.js";
|
|
3
|
+
import { getOperatorOptions as u } from "../../../../enums/extensions/recommendationBlock.js";
|
|
4
|
+
import { useRecommendationExtensionStore as _ } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
5
|
+
import { getInvalidFilterFields as C } from "../../../../extensions/Blocks/Recommendation/validation/filterSchema.js";
|
|
6
|
+
import { InButtonV2 as V, InSelect as L, InBasicTextInput as S } from "@useinsider/design-system-vue";
|
|
7
|
+
import w from "./LogicAdapter.vue.js";
|
|
8
|
+
import { useDebounceFn as E } from "../../../../node_modules/@vueuse/shared/index.js";
|
|
9
|
+
const J = /* @__PURE__ */ I({
|
|
10
10
|
__name: "FilterItem",
|
|
11
11
|
props: {
|
|
12
12
|
filter: null,
|
|
@@ -15,55 +15,46 @@ const K = /* @__PURE__ */ _({
|
|
|
15
15
|
submitted: { type: Boolean }
|
|
16
16
|
},
|
|
17
17
|
emits: ["delete-filter"],
|
|
18
|
-
setup(f, { emit:
|
|
19
|
-
const t = f,
|
|
18
|
+
setup(f, { emit: m }) {
|
|
19
|
+
const t = f, l = O(), o = _(), v = [
|
|
20
20
|
{
|
|
21
|
-
text:
|
|
21
|
+
text: l("email-editor.standard-filter"),
|
|
22
22
|
value: "standardFilter"
|
|
23
23
|
}
|
|
24
|
-
],
|
|
24
|
+
], n = [
|
|
25
25
|
{ text: "True", value: "true" },
|
|
26
26
|
{ text: "False", value: "false" }
|
|
27
|
-
],
|
|
28
|
-
() =>
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
), u = l(() => t.submitted ? A(t.filter) : /* @__PURE__ */ new Set()), h = (e) => u.value.has(e) ? "error" : "default", B = l(
|
|
38
|
-
() => u.value.has("value") ? n("action-builder.filter-empty-value-error") : ""
|
|
39
|
-
), c = l(
|
|
40
|
-
() => {
|
|
41
|
-
var e;
|
|
42
|
-
return ((e = r.value) == null ? void 0 : e.type) === "Number";
|
|
43
|
-
}
|
|
44
|
-
), x = l(() => c.value ? "number" : "text"), T = N((e) => {
|
|
45
|
-
a.updateFilter({
|
|
27
|
+
], s = r(() => t.filter.attribute || ""), a = r(() => o.getFilterList.find((e) => e.value === s.value) || { text: "", value: "", type: "" }), b = r(
|
|
28
|
+
() => a.value?.type === "Boolean"
|
|
29
|
+
), y = r(() => u(a.value?.type).find((e) => e.value === t.filter.operator)), F = r(
|
|
30
|
+
() => n.find((e) => e.value === t.filter.value) || n[0]
|
|
31
|
+
), i = r(() => t.submitted ? C(t.filter) : /* @__PURE__ */ new Set()), g = (e) => i.value.has(e) ? "error" : "default", h = r(
|
|
32
|
+
() => i.value.has("value") ? l("action-builder.filter-empty-value-error") : ""
|
|
33
|
+
), p = r(
|
|
34
|
+
() => a.value?.type === "Number"
|
|
35
|
+
), B = r(() => p.value ? "number" : "text"), x = E((e) => {
|
|
36
|
+
o.updateFilter({
|
|
46
37
|
...t.filter,
|
|
47
38
|
[e.text]: e.value
|
|
48
39
|
});
|
|
49
40
|
}, 500);
|
|
50
|
-
return { __sfc: !0, trans:
|
|
51
|
-
const
|
|
52
|
-
|
|
41
|
+
return { __sfc: !0, trans: l, store: o, props: t, filterTypeOptions: v, booleanValueOptions: n, attributeType: s, selectedAttributeType: a, isBooleanAttribute: b, selectedOperatorType: y, selectedBooleanValue: F, emit: m, invalidFields: i, getFieldState: g, valueErrorMessage: h, isNumericAttribute: p, valueInputType: B, updateFilter: x, handleAttributeChange: (e) => {
|
|
42
|
+
const d = o.getFilterList.find((T) => T.value === e.value), c = d?.type === "Boolean", [A] = u(d?.type);
|
|
43
|
+
o.updateFilter({
|
|
53
44
|
...t.filter,
|
|
54
45
|
attribute: e.value,
|
|
55
|
-
operator:
|
|
56
|
-
value:
|
|
46
|
+
operator: c ? "=" : A?.value ?? "",
|
|
47
|
+
value: c ? "true" : ""
|
|
57
48
|
});
|
|
58
49
|
}, handleBooleanValueChange: (e) => {
|
|
59
|
-
|
|
50
|
+
o.updateFilter({
|
|
60
51
|
...t.filter,
|
|
61
52
|
operator: "=",
|
|
62
53
|
value: e.value
|
|
63
54
|
});
|
|
64
|
-
}, getOperatorOptions:
|
|
55
|
+
}, getOperatorOptions: u, InBasicTextInput: S, InSelect: L, InButtonV2: V, LogicAdapter: w };
|
|
65
56
|
}
|
|
66
57
|
});
|
|
67
58
|
export {
|
|
68
|
-
|
|
59
|
+
J as default
|
|
69
60
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { useTranslations as
|
|
4
|
-
import { useRecommendationExtensionStore as
|
|
5
|
-
import { isFilterValid as
|
|
6
|
-
import
|
|
7
|
-
const
|
|
1
|
+
import { defineComponent as p, ref as s, watch as m, computed as d, nextTick as y } from "vue";
|
|
2
|
+
import g from "../../../wrappers/WpDrawer.vue.js";
|
|
3
|
+
import { useTranslations as v } from "../../../../composables/useTranslations.js";
|
|
4
|
+
import { useRecommendationExtensionStore as b } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
5
|
+
import { isFilterValid as w } from "../../../../extensions/Blocks/Recommendation/validation/filterSchema.js";
|
|
6
|
+
import F from "./Filters.vue.js";
|
|
7
|
+
const R = /* @__PURE__ */ p({
|
|
8
8
|
__name: "FilterSelectionDrawer",
|
|
9
|
-
setup(
|
|
10
|
-
const r =
|
|
11
|
-
|
|
9
|
+
setup(_) {
|
|
10
|
+
const r = v(), e = b(), t = s(!1), o = s(!1), a = s();
|
|
11
|
+
m(() => e.filterSelectionDrawerStatus, (n) => {
|
|
12
12
|
n && (o.value = !1);
|
|
13
13
|
});
|
|
14
|
-
const
|
|
14
|
+
const c = d(() => ({
|
|
15
15
|
primaryButton: {
|
|
16
16
|
styling: "solid",
|
|
17
17
|
type: "primary",
|
|
@@ -27,25 +27,24 @@ const I = /* @__PURE__ */ d({
|
|
|
27
27
|
disabledStatus: t.value
|
|
28
28
|
}
|
|
29
29
|
}));
|
|
30
|
-
return { __sfc: !0, trans: r, store: e, isApplying: t, submitted: o, filtersRef:
|
|
30
|
+
return { __sfc: !0, trans: r, store: e, isApplying: t, submitted: o, filtersRef: a, footerButtonGroupOptions: c, cancelModal: () => {
|
|
31
31
|
e.cancelFilterDrawer();
|
|
32
32
|
}, applyFilter: async () => {
|
|
33
|
-
var u;
|
|
34
33
|
o.value = !0;
|
|
35
|
-
const { filters: n } = e.recommendationConfigs,
|
|
36
|
-
if (
|
|
37
|
-
|
|
38
|
-
const { filterGroup:
|
|
39
|
-
|
|
34
|
+
const { filters: n } = e.recommendationConfigs, l = n.find((i) => !w(i));
|
|
35
|
+
if (l) {
|
|
36
|
+
a.value?.switchToGroup(l.filterGroup), await y();
|
|
37
|
+
const { filterGroup: i, filterNumber: u } = l, f = `[data-filter-group="${i}"][data-filter-number="${u}"]`;
|
|
38
|
+
document.querySelector(f)?.scrollIntoView({ behavior: "smooth", block: "center" });
|
|
40
39
|
return;
|
|
41
40
|
}
|
|
42
41
|
t.value = !0, e.patchCurrentBlockConfig(
|
|
43
42
|
{ filters: e.recommendationConfigs.filters },
|
|
44
43
|
{ triggerRefetch: !0 }
|
|
45
44
|
), e.closeFilterDrawer(), t.value = !1;
|
|
46
|
-
}, WpDrawer:
|
|
45
|
+
}, WpDrawer: g, Filters: F };
|
|
47
46
|
}
|
|
48
47
|
});
|
|
49
48
|
export {
|
|
50
|
-
|
|
49
|
+
R as default
|
|
51
50
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as v, computed as
|
|
1
|
+
import { defineComponent as v, computed as o, ref as O, watch as f } from "vue";
|
|
2
2
|
import { useTranslations as g } from "../../../../composables/useTranslations.js";
|
|
3
3
|
import { useRecommendationExtensionStore as R } from "../../../../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
4
4
|
import { getTooltipOptions as T } from "../../../../utils/tooltipUtils.js";
|
|
@@ -12,11 +12,11 @@ const V = /* @__PURE__ */ v({
|
|
|
12
12
|
},
|
|
13
13
|
emits: ["reset-validation"],
|
|
14
14
|
setup(x, { expose: u, emit: s }) {
|
|
15
|
-
const p = g(), t = R(),
|
|
15
|
+
const p = g(), t = R(), n = o(() => t.getUniqueFilterGroups.map((e) => ({
|
|
16
16
|
text: e.toString(),
|
|
17
17
|
value: e
|
|
18
18
|
}))), r = O(1);
|
|
19
|
-
f(
|
|
19
|
+
f(n, (e) => {
|
|
20
20
|
if (!e.length)
|
|
21
21
|
return;
|
|
22
22
|
e.some((h) => h.value === r.value) || (r.value = e[0].value);
|
|
@@ -27,27 +27,24 @@ const V = /* @__PURE__ */ v({
|
|
|
27
27
|
u({ switchToGroup: i });
|
|
28
28
|
const c = () => {
|
|
29
29
|
s("reset-validation");
|
|
30
|
-
const e = t.getUniqueFilterGroups,
|
|
31
|
-
t.addFilterGroup(
|
|
32
|
-
}, d =
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
return { __sfc: !0, MAX_FILTER_GROUP_COUNT: 3, MAX_FILTER_PER_GROUP_COUNT: 10, trans: p, store: t, emit: s, filterGroupList: a, selectedFilterGroup: r, switchToGroup: i, handleAddFilterGroup: c, isMaxFilterGroupCount: d, selectedFilterGroupFilters: n, isMaxFilterPerGroupCount: F, hasLogicAdapter: _, hasRemoveFilterButton: G, outerGroupOperator: m, handleOuterGroupOperatorChange: (e) => {
|
|
37
|
-
n.value.forEach((o) => {
|
|
38
|
-
t.updateFilter({ ...o, outerGroupOperator: e });
|
|
30
|
+
const e = t.getUniqueFilterGroups, a = e.length > 0 ? Math.max(...e) + 1 : 1;
|
|
31
|
+
t.addFilterGroup(a), r.value = a;
|
|
32
|
+
}, d = o(() => n.value.length >= 3), l = o(() => t.getSelectedFilterGroup(r.value)), F = o(() => l.value.length >= 10), _ = o(() => l.value.length > 1), G = o(() => n.value.length > 1), m = o(() => l.value[0]?.outerGroupOperator || "*");
|
|
33
|
+
return { __sfc: !0, MAX_FILTER_GROUP_COUNT: 3, MAX_FILTER_PER_GROUP_COUNT: 10, trans: p, store: t, emit: s, filterGroupList: n, selectedFilterGroup: r, switchToGroup: i, handleAddFilterGroup: c, isMaxFilterGroupCount: d, selectedFilterGroupFilters: l, isMaxFilterPerGroupCount: F, hasLogicAdapter: _, hasRemoveFilterButton: G, outerGroupOperator: m, handleOuterGroupOperatorChange: (e) => {
|
|
34
|
+
l.value.forEach((a) => {
|
|
35
|
+
t.updateFilter({ ...a, outerGroupOperator: e });
|
|
39
36
|
});
|
|
40
37
|
}, handleAddFilter: () => {
|
|
41
38
|
s("reset-validation"), t.addFilter(
|
|
42
39
|
t.createDefaultFilter(
|
|
43
40
|
r.value,
|
|
44
|
-
|
|
41
|
+
l.value.length + 1
|
|
45
42
|
)
|
|
46
43
|
);
|
|
47
44
|
}, handleDeleteFilter: (e) => {
|
|
48
45
|
t.deleteFilter(e);
|
|
49
46
|
}, handleDeleteFilterGroup: () => {
|
|
50
|
-
|
|
47
|
+
n.value.length <= 1 || t.deleteFilterGroup(r.value);
|
|
51
48
|
}, getTooltipOptions: T, InSegments: E, InButtonV2: U, FilterItem: A, LogicAdapter: C };
|
|
52
49
|
}
|
|
53
50
|
});
|
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
import
|
|
1
|
+
import i from "./EditorActions.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
var
|
|
5
|
-
var s, i, n, a;
|
|
3
|
+
import n from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var a = function() {
|
|
6
5
|
var o = this, e = o._self._c, t = o._self._setupProxy;
|
|
7
|
-
return e("div", { staticClass: "d-f editor-actions" }, [t.isVersionHistoryButtonVisible ? e(t.InButtonV2, { attrs: { id: "guido__history-button", "left-icon": "line-architect-version-history", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryButtonDisabled, "label-text-status": !1, "selected-status": t.editorStore.isVersionHistoryOpen, "tooltip-options": t.getTooltipOptions("guido__history-button"), "tooltip-text": t.versionHistoryTooltipText }, on: { click: t.handleVersionHistory } }) : o._e(), e(t.InButtonV2, { attrs: { id: "guido__export-button", "left-icon": "line-export", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isExportButtonDisabled, "label-text-status": !1, "loading-status": t.isExporting, "tooltip-options": t.getTooltipOptions("guido__export-button"), "tooltip-text": t.trans("newsletter.export") }, on: { click: t.handleExport } }),
|
|
6
|
+
return e("div", { staticClass: "d-f editor-actions" }, [t.isVersionHistoryButtonVisible ? e(t.InButtonV2, { attrs: { id: "guido__history-button", "left-icon": "line-architect-version-history", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryButtonDisabled, "label-text-status": !1, "selected-status": t.editorStore.isVersionHistoryOpen, "tooltip-options": t.getTooltipOptions("guido__history-button"), "tooltip-text": t.versionHistoryTooltipText }, on: { click: t.handleVersionHistory } }) : o._e(), e(t.InButtonV2, { attrs: { id: "guido__export-button", "left-icon": "line-export", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isExportButtonDisabled, "label-text-status": !1, "loading-status": t.isExporting, "tooltip-options": t.getTooltipOptions("guido__export-button"), "tooltip-text": t.trans("newsletter.export") }, on: { click: t.handleExport } }), t.config?.features?.saveAsTemplate ? e(t.InButtonV2, { attrs: { id: "guido__save-as-button", "left-icon": "line-newsletter-save-as-template", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isSaveAsButtonDisabled, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__save-as-button"), "tooltip-text": t.trans("newsletter.save-templates") }, on: { click: t.handleSaveAs } }) : o._e(), t.config?.features?.testMessage ? e(t.InButtonV2, { attrs: { id: "guido__test-button", "left-icon": "line-architect-test-journey", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isTestButtonDisabled, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__test-button", { staticPosition: "bottom right" }), "tooltip-text": t.trans("newsletter.test-email") }, on: { click: t.handleTestEmail } }) : o._e(), t.editorStore.isPreviewModeOpen ? o._e() : e(t.InButtonV2, { staticClass: "ml-3", attrs: { id: "guido__save-button", "label-text": "Save", "disabled-status": !t.isSaving && t.editorStore.isSaveButtonDisabled, "loading-status": t.isSaving }, on: { click: function(s) {
|
|
8
7
|
return t.handleSave(!1);
|
|
9
|
-
} } }), e(t.MigrationConfirmModal, { ref: "migrationModalRef", on: { confirm: function(
|
|
8
|
+
} } }), e(t.MigrationConfirmModal, { ref: "migrationModalRef", on: { confirm: function(s) {
|
|
10
9
|
return t.executeSave(!1);
|
|
11
10
|
} } })], 1);
|
|
12
|
-
},
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
}, r = [], l = /* @__PURE__ */ n(
|
|
12
|
+
i,
|
|
13
|
+
a,
|
|
14
|
+
r,
|
|
16
15
|
!1,
|
|
17
16
|
null,
|
|
18
|
-
"
|
|
17
|
+
"4e2a4adb"
|
|
19
18
|
);
|
|
20
|
-
const
|
|
19
|
+
const _ = l.exports;
|
|
21
20
|
export {
|
|
22
|
-
|
|
21
|
+
_ as default
|
|
23
22
|
};
|
|
@@ -1,51 +1,62 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import
|
|
14
|
-
|
|
1
|
+
import { defineComponent as O, ref as n, computed as h } from "vue";
|
|
2
|
+
import { useActionsApi as q } from "../../../composables/useActionsApi.js";
|
|
3
|
+
import { useConfig as b } from "../../../composables/useConfig.js";
|
|
4
|
+
import { useExport as k } from "../../../composables/useExport.js";
|
|
5
|
+
import { useTestEmailClick as B } from "../../../composables/useGuidoActions.js";
|
|
6
|
+
import { useHtmlCompiler as D } from "../../../composables/useHtmlCompiler.js";
|
|
7
|
+
import { useSave as F } from "../../../composables/useSave.js";
|
|
8
|
+
import { useTranslations as L } from "../../../composables/useTranslations.js";
|
|
9
|
+
import { useVersionHistoryApi as R } from "../../../composables/useVersionHistoryApi.js";
|
|
10
|
+
import { useLiquidValidator as z } from "../../../composables/validators/useLiquidValidator.js";
|
|
11
|
+
import { useEditorStore as I } from "../../../stores/editor.js";
|
|
12
|
+
import { useTemplateStore as P } from "../../../stores/template.js";
|
|
13
|
+
import { getTooltipOptions as j } from "../../../utils/tooltipUtils.js";
|
|
14
|
+
import { InButtonV2 as G } from "@useinsider/design-system-vue";
|
|
15
|
+
import { storeToRefs as J } from "pinia";
|
|
16
|
+
import K from "./MigrationConfirmModal.vue.js";
|
|
17
|
+
const ut = /* @__PURE__ */ O({
|
|
15
18
|
__name: "EditorActions",
|
|
16
|
-
setup(
|
|
17
|
-
const { config: a } =
|
|
18
|
-
if (
|
|
19
|
-
|
|
19
|
+
setup(N, { expose: x }) {
|
|
20
|
+
const { config: a, isFeatureEnabled: l } = b(), { exportHtml: m } = k(), { save: u } = F(), { openVersionHistory: c, closeVersionHistory: p } = R(), { getCompiledEmail: f } = q(), { compileHtml: d } = D(), { validateLiquidSyntax: v } = z(), t = I(), y = P(), { hasMigrations: S } = J(y), s = L(), i = n(!1), r = n(!1), g = n(), H = B(), T = () => {
|
|
21
|
+
if (t.isVersionHistoryOpen) {
|
|
22
|
+
p();
|
|
20
23
|
return;
|
|
21
24
|
}
|
|
22
|
-
|
|
23
|
-
},
|
|
24
|
-
|
|
25
|
+
c();
|
|
26
|
+
}, w = async () => {
|
|
27
|
+
i.value = !0, await m(), i.value = !1;
|
|
25
28
|
}, _ = () => {
|
|
26
|
-
|
|
27
|
-
},
|
|
28
|
-
() =>
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}, y = (o) => {
|
|
37
|
-
var t;
|
|
38
|
-
if (!o && f.value) {
|
|
39
|
-
(t = v.value) == null || t.open();
|
|
29
|
+
t.isSaveAsTemplateDrawerOpen = !0;
|
|
30
|
+
}, C = h(() => t.isVersionHistoryOpen ? s("newsletter.close-version-history") : s("newsletter.version-history")), A = h(
|
|
31
|
+
() => a.value?.features?.versionHistory && !t.isPreviewModeOpen
|
|
32
|
+
), V = async (o) => {
|
|
33
|
+
r.value = !0, t.loadingStatus = !0;
|
|
34
|
+
const e = await u(o);
|
|
35
|
+
return r.value = !1, (o || !e) && (t.loadingStatus = !1), e;
|
|
36
|
+
}, E = (o) => {
|
|
37
|
+
if (!o && S.value) {
|
|
38
|
+
g.value?.open();
|
|
40
39
|
return;
|
|
41
40
|
}
|
|
42
|
-
return
|
|
41
|
+
return V(o);
|
|
42
|
+
}, M = async () => {
|
|
43
|
+
if (l("liquidSyntax")) {
|
|
44
|
+
t.loadingStatus = !0;
|
|
45
|
+
try {
|
|
46
|
+
const { html: o } = await f({ minimize: !0, resetDataSavedFlag: !1 }), { compiledHtml: e } = d(o);
|
|
47
|
+
if (!await v(e))
|
|
48
|
+
return;
|
|
49
|
+
} finally {
|
|
50
|
+
t.loadingStatus = !1;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
H();
|
|
43
54
|
};
|
|
44
|
-
return
|
|
45
|
-
handleSave:
|
|
46
|
-
}), { __sfc: !0, config: a, exportHtml: m, save:
|
|
55
|
+
return x({
|
|
56
|
+
handleSave: E
|
|
57
|
+
}), { __sfc: !0, config: a, isFeatureEnabled: l, exportHtml: m, save: u, openVersionHistory: c, closeVersionHistory: p, getCompiledEmail: f, compileHtml: d, validateLiquidSyntax: v, editorStore: t, templateStore: y, hasMigrations: S, trans: s, isExporting: i, isSaving: r, migrationModalRef: g, testEmailClick: H, handleVersionHistory: T, handleExport: w, handleSaveAs: _, versionHistoryTooltipText: C, isVersionHistoryButtonVisible: A, executeSave: V, handleSave: E, handleTestEmail: M, getTooltipOptions: j, InButtonV2: G, MigrationConfirmModal: K };
|
|
47
58
|
}
|
|
48
59
|
});
|
|
49
60
|
export {
|
|
50
|
-
|
|
61
|
+
ut as default
|
|
51
62
|
};
|
|
@@ -1,20 +1,17 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { InContainer as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
const
|
|
1
|
+
import { defineComponent as t, ref as n } from "vue";
|
|
2
|
+
import { InContainer as m } from "@useinsider/design-system-vue";
|
|
3
|
+
import a from "./LeftSlot.vue.js";
|
|
4
|
+
import f from "./MiddleSlot.vue.js";
|
|
5
|
+
import p from "./RightSlot.vue.js";
|
|
6
|
+
const S = /* @__PURE__ */ t({
|
|
7
7
|
__name: "HeaderWrapper",
|
|
8
|
-
setup(
|
|
9
|
-
const e =
|
|
10
|
-
return
|
|
11
|
-
handleSave: (
|
|
12
|
-
|
|
13
|
-
return (o = e.value) == null ? void 0 : o.handleSave(t);
|
|
14
|
-
}
|
|
15
|
-
}), { __sfc: !0, rightSlotRef: e, InContainer: a, LeftSlot: f, MiddleSlot: p, RightSlot: i };
|
|
8
|
+
setup(i, { expose: o }) {
|
|
9
|
+
const e = n(null);
|
|
10
|
+
return o({
|
|
11
|
+
handleSave: (r) => e.value?.handleSave(r)
|
|
12
|
+
}), { __sfc: !0, rightSlotRef: e, InContainer: m, LeftSlot: a, MiddleSlot: f, RightSlot: p };
|
|
16
13
|
}
|
|
17
14
|
});
|
|
18
15
|
export {
|
|
19
|
-
|
|
16
|
+
S as default
|
|
20
17
|
};
|
|
@@ -1,19 +1,16 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useConfig as
|
|
3
|
-
import { useBack as
|
|
4
|
-
import { usePreviewMode as
|
|
5
|
-
import { useTranslations as
|
|
6
|
-
import { useVersionHistoryApi as
|
|
7
|
-
import { useEditorStore as
|
|
8
|
-
import { InButtonV2 as
|
|
9
|
-
import { useDebounceFn as
|
|
10
|
-
const
|
|
1
|
+
import { defineComponent as m, computed as f, ref as l } from "vue";
|
|
2
|
+
import { useConfig as d } from "../../../composables/useConfig.js";
|
|
3
|
+
import { useBack as p } from "../../../composables/useGuidoActions.js";
|
|
4
|
+
import { usePreviewMode as k } from "../../../composables/usePreviewMode.js";
|
|
5
|
+
import { useTranslations as B } from "../../../composables/useTranslations.js";
|
|
6
|
+
import { useVersionHistoryApi as b } from "../../../composables/useVersionHistoryApi.js";
|
|
7
|
+
import { useEditorStore as v } from "../../../stores/editor.js";
|
|
8
|
+
import { InButtonV2 as _ } from "@useinsider/design-system-vue";
|
|
9
|
+
import { useDebounceFn as V } from "../../../node_modules/@vueuse/shared/index.js";
|
|
10
|
+
const A = /* @__PURE__ */ m({
|
|
11
11
|
__name: "LeftSlot",
|
|
12
|
-
setup(
|
|
13
|
-
const e =
|
|
14
|
-
var u, m;
|
|
15
|
-
return e.isVersionHistoryOpen || e.isPreviewModeOpen ? o("email-editor.back-to-editor") : (m = (u = t.value) == null ? void 0 : u.ui) != null && m.backButtonLabel ? t.value.ui.backButtonLabel : o("email-editor.back-to-design");
|
|
16
|
-
}), r = p(!1), c = () => {
|
|
12
|
+
setup(g) {
|
|
13
|
+
const e = v(), i = p(), { closeVersionHistory: n } = b(), { closePreviewMode: s } = k(), o = B(), { config: t } = d(), u = f(() => e.isVersionHistoryOpen || e.isPreviewModeOpen ? o("email-editor.back-to-editor") : t.value?.ui?.backButtonLabel ? t.value.ui.backButtonLabel : o("email-editor.back-to-design")), r = l(!1), c = () => {
|
|
17
14
|
if (e.isVersionHistoryOpen) {
|
|
18
15
|
n();
|
|
19
16
|
return;
|
|
@@ -23,14 +20,14 @@ const D = /* @__PURE__ */ l({
|
|
|
23
20
|
return;
|
|
24
21
|
}
|
|
25
22
|
e.loadingStatus = !0, i();
|
|
26
|
-
}, a =
|
|
23
|
+
}, a = V(() => {
|
|
27
24
|
c(), r.value = !1;
|
|
28
25
|
}, 500);
|
|
29
|
-
return { __sfc: !0, editorStore: e, handleBack: i, closeVersionHistory: n, closePreviewMode: s, trans: o, config: t, backButtonLabel:
|
|
26
|
+
return { __sfc: !0, editorStore: e, handleBack: i, closeVersionHistory: n, closePreviewMode: s, trans: o, config: t, backButtonLabel: u, isBackButtonDisabled: r, executeBackAction: c, debouncedBackAction: a, handleBackClick: () => {
|
|
30
27
|
r.value = !0, a();
|
|
31
|
-
}, InButtonV2:
|
|
28
|
+
}, InButtonV2: _ };
|
|
32
29
|
}
|
|
33
30
|
});
|
|
34
31
|
export {
|
|
35
|
-
|
|
32
|
+
A as default
|
|
36
33
|
};
|
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
import { defineComponent as o } from "vue";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { useEditorStore as
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
import p from "./version-history/ViewOptions.vue.js";
|
|
8
|
-
const S = /* @__PURE__ */ o({
|
|
1
|
+
import { defineComponent as e, defineAsyncComponent as o } from "vue";
|
|
2
|
+
import m from "../email-preview/amp/AmpToggle.vue.js";
|
|
3
|
+
import n from "../email-preview/desktop-preview/EmailSizeIndicator.vue.js";
|
|
4
|
+
import { useEditorStore as s } from "../../../stores/editor.js";
|
|
5
|
+
import p from "./EditorToolbar.vue.js";
|
|
6
|
+
const u = /* @__PURE__ */ e({
|
|
9
7
|
__name: "MiddleSlot",
|
|
10
|
-
setup(
|
|
11
|
-
|
|
8
|
+
setup(f) {
|
|
9
|
+
const r = o(
|
|
10
|
+
() => import("./version-history/VersionHistory.vue.js")
|
|
11
|
+
), t = o(
|
|
12
|
+
() => import("./version-history/ViewOptions.vue.js")
|
|
13
|
+
), i = s();
|
|
14
|
+
return { __sfc: !0, VersionHistory: r, VersionHistoryViewOptions: t, editorStore: i, AmpToggle: m, EmailSizeIndicator: n, EditorToolbar: p };
|
|
12
15
|
}
|
|
13
16
|
});
|
|
14
17
|
export {
|
|
15
|
-
|
|
18
|
+
u as default
|
|
16
19
|
};
|