@useinsider/guido 3.2.0-beta.78d83bd → 3.2.0-beta.7e0c6bd
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 +27 -34
- package/dist/components/Guido.vue.js +1 -1
- package/dist/components/Guido.vue2.js +76 -81
- 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/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 +11 -12
- package/dist/components/organisms/header/EditorActions.vue2.js +18 -22
- 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.vue2.js +14 -17
- 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 +8 -9
- 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 +8 -9
- package/dist/composables/useHtmlCompiler.js +34 -26
- package/dist/composables/useHtmlValidator.js +101 -109
- package/dist/composables/useHttp.js +30 -30
- package/dist/composables/usePartner.js +1 -1
- package/dist/composables/useRecommendation.js +14 -15
- package/dist/composables/useRibbonOffset.js +21 -0
- package/dist/composables/useSave.js +21 -22
- package/dist/composables/useStripo.js +53 -50
- package/dist/composables/useSyncModuleExtractor.js +31 -29
- package/dist/composables/useTimerClone.js +24 -25
- package/dist/composables/useTranslations.js +23 -16
- package/dist/composables/useValidation.js +7 -8
- package/dist/composables/validators/useLiquidValidator.js +13 -13
- package/dist/config/compiler/unsubscribeCompilerRules.js +17 -19
- package/dist/config/compiler/utils/recommendationCompilerUtils.js +10 -11
- package/dist/config/migrator/checkboxMigrator.js +20 -21
- package/dist/config/migrator/couponBlockMigrator.js +18 -19
- package/dist/config/migrator/itemsBlockMigrator.js +87 -89
- package/dist/config/migrator/radioButtonMigrator.js +12 -13
- package/dist/config/migrator/recommendationMigrator.js +106 -109
- package/dist/config/migrator/unsubscribeMigrator.js +10 -11
- package/dist/enums/onboarding.js +7 -2
- package/dist/enums/unsubscribe.js +18 -19
- 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 +9 -14
- package/dist/extensions/Blocks/Items/template.js +218 -216
- package/dist/extensions/Blocks/Recommendation/controls/button/index.js +36 -36
- package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +128 -133
- 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 +17 -18
- package/dist/extensions/Blocks/Recommendation/controls/main/filters.js +4 -6
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +82 -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 +134 -135
- 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 +18 -20
- package/dist/extensions/Blocks/Recommendation/extension.js +31 -32
- package/dist/extensions/Blocks/Recommendation/settingsPanel.js +8 -16
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +55 -56
- package/dist/extensions/Blocks/Recommendation/templates/grid/elementRenderer.js +22 -23
- 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 +24 -25
- package/dist/extensions/Blocks/Recommendation/templates/list/template.js +1 -1
- package/dist/extensions/Blocks/Recommendation/templates/utils.js +45 -47
- package/dist/extensions/Blocks/Recommendation/validation/filterSchema.js +13 -16
- 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 +53 -58
- package/dist/guido.css +1 -1
- package/dist/library.js +11 -12
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +233 -210
- package/dist/node_modules/valibot/dist/index.js +122 -126
- package/dist/package.json.js +1 -1
- package/dist/services/recommendationApi.js +14 -17
- package/dist/services/templateLibraryApi.js +37 -38
- package/dist/src/components/wrappers/WpModal.vue.d.ts +1 -1
- package/dist/src/composables/useHtmlCompiler.d.ts +1 -2
- package/dist/src/composables/useRibbonOffset.d.ts +4 -0
- package/dist/src/composables/useTranslations.d.ts +1 -1
- package/dist/src/enums/onboarding.d.ts +6 -0
- package/dist/src/stores/dynamic-content.d.ts +3 -3
- package/dist/src/stores/onboarding.d.ts +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 +6 -9
- package/dist/stores/unsubscribe.js +1 -4
- package/dist/utils/dateUtil.js +7 -10
- package/dist/utils/genericUtil.js +10 -13
- package/dist/utils/pairProductVariables.js +13 -14
- package/package.json +8 -5
- package/dist/node_modules/lodash-es/_DataView.js +0 -6
- package/dist/node_modules/lodash-es/_Hash.js +0 -20
- package/dist/node_modules/lodash-es/_ListCache.js +0 -20
- package/dist/node_modules/lodash-es/_Map.js +0 -6
- package/dist/node_modules/lodash-es/_MapCache.js +0 -20
- 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/_Symbol.js +0 -5
- 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/_assocIndexOf.js +0 -10
- 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/_baseGetTag.js +0 -10
- 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/_baseIsNative.js +0 -16
- 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/_coreJsData.js +0 -5
- 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/_freeGlobal.js +0 -4
- package/dist/node_modules/lodash-es/_getAllKeys.js +0 -9
- package/dist/node_modules/lodash-es/_getMapData.js +0 -8
- package/dist/node_modules/lodash-es/_getMatchData.js +0 -12
- package/dist/node_modules/lodash-es/_getNative.js +0 -9
- package/dist/node_modules/lodash-es/_getRawTag.js +0 -15
- 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/_getValue.js +0 -6
- package/dist/node_modules/lodash-es/_hasPath.js +0 -19
- package/dist/node_modules/lodash-es/_hashClear.js +0 -7
- package/dist/node_modules/lodash-es/_hashDelete.js +0 -7
- package/dist/node_modules/lodash-es/_hashGet.js +0 -13
- package/dist/node_modules/lodash-es/_hashHas.js +0 -9
- package/dist/node_modules/lodash-es/_hashSet.js +0 -9
- 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/_isKeyable.js +0 -7
- package/dist/node_modules/lodash-es/_isMasked.js +0 -11
- 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/_listCacheClear.js +0 -6
- package/dist/node_modules/lodash-es/_listCacheDelete.js +0 -12
- package/dist/node_modules/lodash-es/_listCacheGet.js +0 -8
- package/dist/node_modules/lodash-es/_listCacheHas.js +0 -7
- package/dist/node_modules/lodash-es/_listCacheSet.js +0 -8
- package/dist/node_modules/lodash-es/_mapCacheClear.js +0 -13
- package/dist/node_modules/lodash-es/_mapCacheDelete.js +0 -8
- package/dist/node_modules/lodash-es/_mapCacheGet.js +0 -7
- package/dist/node_modules/lodash-es/_mapCacheHas.js +0 -7
- package/dist/node_modules/lodash-es/_mapCacheSet.js +0 -8
- 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/_nativeCreate.js +0 -5
- 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/_objectToString.js +0 -7
- package/dist/node_modules/lodash-es/_overArg.js +0 -8
- package/dist/node_modules/lodash-es/_root.js +0 -5
- 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/_toSource.js +0 -17
- package/dist/node_modules/lodash-es/_trimmedEndIndex.js +0 -9
- package/dist/node_modules/lodash-es/eq.js +0 -6
- 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/isFunction.js +0 -12
- package/dist/node_modules/lodash-es/isLength.js +0 -7
- package/dist/node_modules/lodash-es/isObject.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/memoize.js +0 -18
- 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,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,
|
|
@@ -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
|
};
|
|
@@ -1,131 +1,126 @@
|
|
|
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 { RIBBON_SELECTOR as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import re from "./organisms/header/HeaderWrapper.vue.js";
|
|
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";
|
|
12
11
|
import ce from "./organisms/LoadingWrapper.vue.js";
|
|
13
|
-
import ae from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
|
|
14
|
-
import ie from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
|
|
15
12
|
import { useStripoApi as me } from "../services/stripoApi.js";
|
|
16
13
|
import { useConfigStore as de } from "../stores/config.js";
|
|
17
14
|
import { useDynamicContentStore as le } from "../stores/dynamic-content.js";
|
|
18
|
-
import { useEditorStore as
|
|
19
|
-
import { usePreviewStore as
|
|
15
|
+
import { useEditorStore as pe } from "../stores/editor.js";
|
|
16
|
+
import { usePreviewStore as ue } from "../stores/preview.js";
|
|
20
17
|
import { useUnsubscribeStore as fe } from "../stores/unsubscribe.js";
|
|
21
|
-
const
|
|
18
|
+
const Me = /* @__PURE__ */ X({
|
|
22
19
|
__name: "Guido",
|
|
23
20
|
props: {
|
|
24
21
|
config: null
|
|
25
22
|
},
|
|
26
23
|
emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
|
|
27
|
-
setup(
|
|
28
|
-
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(
|
|
29
32
|
() => import("./organisms/email-preview/PreviewContainer.vue.js")
|
|
30
|
-
),
|
|
33
|
+
), K = s(
|
|
31
34
|
() => import("./organisms/onboarding/OnboardingWrapper.vue.js")
|
|
32
|
-
),
|
|
33
|
-
|
|
34
|
-
const
|
|
35
|
-
var e;
|
|
36
|
-
return (e = S.value) == null ? void 0 : e.handleSave(!0);
|
|
37
|
-
}, {
|
|
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
38
|
templateId: p,
|
|
39
|
-
userId:
|
|
40
|
-
partnerName:
|
|
41
|
-
username:
|
|
42
|
-
template:
|
|
43
|
-
editor:
|
|
44
|
-
} =
|
|
45
|
-
|
|
46
|
-
const
|
|
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
47
|
emailId: p,
|
|
48
|
-
userId:
|
|
49
|
-
username:
|
|
50
|
-
partnerName:
|
|
51
|
-
savedModulesFolderName:
|
|
52
|
-
defaultModulesFolderName:
|
|
53
|
-
},
|
|
48
|
+
userId: w,
|
|
49
|
+
username: D,
|
|
50
|
+
partnerName: E,
|
|
51
|
+
savedModulesFolderName: O,
|
|
52
|
+
defaultModulesFolderName: k
|
|
53
|
+
}, F = {
|
|
54
54
|
preselectedDynamicContentList: f,
|
|
55
55
|
onReady: () => {
|
|
56
|
-
console.debug("guido:ready"),
|
|
56
|
+
console.debug("guido:ready"), o("ready");
|
|
57
57
|
}
|
|
58
|
-
}, { initPlugin:
|
|
59
|
-
|
|
60
|
-
return !((e = a.ui) != null && e.showHeader);
|
|
61
|
-
});
|
|
62
|
-
Y({
|
|
58
|
+
}, { initPlugin: L } = ne(b, F), { getDefaultTemplate: U } = me(), { cloneTimersOnSave: _, hasTimerBlocks: M } = re(), j = A(() => !n.ui?.showHeader);
|
|
59
|
+
te({
|
|
63
60
|
onBack: () => {
|
|
64
|
-
console.debug("guido:back"),
|
|
61
|
+
console.debug("guido:back"), o("back");
|
|
65
62
|
},
|
|
66
63
|
onSaveStart: () => {
|
|
67
|
-
console.debug("guido:save:start"),
|
|
64
|
+
console.debug("guido:save:start"), o("save:start");
|
|
68
65
|
},
|
|
69
|
-
onSaveComplete: (
|
|
70
|
-
const
|
|
71
|
-
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);
|
|
72
69
|
},
|
|
73
70
|
onTestEmailClick: () => {
|
|
74
|
-
console.debug("guido:test-email:click"),
|
|
71
|
+
console.debug("guido:test-email:click"), o("test-email:click");
|
|
75
72
|
}
|
|
76
73
|
});
|
|
77
|
-
const P = (
|
|
78
|
-
console.debug("dynamic-content:close",
|
|
74
|
+
const P = (t) => {
|
|
75
|
+
console.debug("dynamic-content:close", t), d.setSelectedDynamicContent(t), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: t }));
|
|
79
76
|
}, N = () => {
|
|
80
77
|
console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
|
|
81
78
|
};
|
|
82
|
-
|
|
83
|
-
|
|
79
|
+
Y(() => i.value, () => {
|
|
80
|
+
o("on-change", i.value);
|
|
84
81
|
});
|
|
85
|
-
const
|
|
86
|
-
const
|
|
87
|
-
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);
|
|
88
85
|
};
|
|
89
86
|
let c = null;
|
|
90
|
-
const
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
(n = d.value) == null || n.style.setProperty("--ribbon-offset", `${(e == null ? void 0 : e.offsetHeight) ?? 0}px`);
|
|
87
|
+
const g = () => {
|
|
88
|
+
const t = document.querySelector(se);
|
|
89
|
+
m.value?.style.setProperty("--ribbon-offset", `${t?.offsetHeight ?? 0}px`);
|
|
94
90
|
};
|
|
95
|
-
return
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
e && (c = new ResizeObserver(h), c.observe(e));
|
|
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));
|
|
100
95
|
try {
|
|
101
|
-
|
|
102
|
-
let
|
|
103
|
-
html:
|
|
96
|
+
S.selectedUnsubscribePages = r?.selectedUnsubscribePages || [];
|
|
97
|
+
let e = {
|
|
98
|
+
html: a && await I(a),
|
|
104
99
|
css: T
|
|
105
100
|
};
|
|
106
|
-
|
|
107
|
-
} catch (
|
|
108
|
-
console.error("Failed to initialize Stripo editor:",
|
|
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;
|
|
102
|
+
} catch (e) {
|
|
103
|
+
console.error("Failed to initialize Stripo editor:", e);
|
|
109
104
|
}
|
|
110
|
-
document.addEventListener("dynamic-content:open",
|
|
111
|
-
}),
|
|
112
|
-
c
|
|
105
|
+
document.addEventListener("dynamic-content:open", v);
|
|
106
|
+
}), ee(() => {
|
|
107
|
+
c?.disconnect(), document.removeEventListener("dynamic-content:open", v);
|
|
113
108
|
try {
|
|
114
109
|
window.UIEditor.removeEditor();
|
|
115
110
|
} catch {
|
|
116
111
|
console.debug("Failed to remove Stripo editor: No editor found");
|
|
117
112
|
}
|
|
118
|
-
|
|
119
|
-
}),
|
|
113
|
+
n.reset();
|
|
114
|
+
}), H({
|
|
120
115
|
dynamicContent: {
|
|
121
116
|
insert: P,
|
|
122
117
|
close: N
|
|
123
118
|
},
|
|
124
119
|
hasChanges: i,
|
|
125
|
-
saveSilent:
|
|
126
|
-
}), { __sfc: !0,
|
|
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 };
|
|
127
122
|
}
|
|
128
123
|
});
|
|
129
124
|
export {
|
|
130
|
-
|
|
125
|
+
Me as default
|
|
131
126
|
};
|
|
@@ -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
|
};
|
|
@@ -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
|
};
|