@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,54 +1,52 @@
|
|
|
1
|
-
var
|
|
1
|
+
var g;
|
|
2
2
|
// @__NO_SIDE_EFFECTS__
|
|
3
|
-
function
|
|
3
|
+
function b(n) {
|
|
4
4
|
return {
|
|
5
|
-
lang:
|
|
6
|
-
message: n
|
|
7
|
-
abortEarly:
|
|
8
|
-
abortPipeEarly:
|
|
5
|
+
lang: n?.lang ?? g?.lang,
|
|
6
|
+
message: n?.message,
|
|
7
|
+
abortEarly: n?.abortEarly ?? g?.abortEarly,
|
|
8
|
+
abortPipeEarly: n?.abortPipeEarly ?? g?.abortPipeEarly
|
|
9
9
|
};
|
|
10
10
|
}
|
|
11
|
-
var
|
|
11
|
+
var P;
|
|
12
12
|
// @__NO_SIDE_EFFECTS__
|
|
13
|
-
function
|
|
14
|
-
return
|
|
13
|
+
function S(n) {
|
|
14
|
+
return P?.get(n);
|
|
15
15
|
}
|
|
16
|
-
var
|
|
16
|
+
var _;
|
|
17
17
|
// @__NO_SIDE_EFFECTS__
|
|
18
|
-
function
|
|
19
|
-
return
|
|
18
|
+
function D(n) {
|
|
19
|
+
return _?.get(n);
|
|
20
20
|
}
|
|
21
|
-
var
|
|
21
|
+
var w;
|
|
22
22
|
// @__NO_SIDE_EFFECTS__
|
|
23
23
|
function A(n, r) {
|
|
24
|
-
|
|
25
|
-
return (e = x == null ? void 0 : x.get(n)) == null ? void 0 : e.get(r);
|
|
24
|
+
return w?.get(n)?.get(r);
|
|
26
25
|
}
|
|
27
26
|
// @__NO_SIDE_EFFECTS__
|
|
28
|
-
function
|
|
29
|
-
var e, t;
|
|
27
|
+
function k(n) {
|
|
30
28
|
const r = typeof n;
|
|
31
|
-
return r === "string" ? `"${n}"` : r === "number" || r === "bigint" || r === "boolean" ? `${n}` : r === "object" || r === "function" ? (n &&
|
|
29
|
+
return r === "string" ? `"${n}"` : r === "number" || r === "bigint" || r === "boolean" ? `${n}` : r === "object" || r === "function" ? (n && Object.getPrototypeOf(n)?.constructor?.name) ?? "null" : r;
|
|
32
30
|
}
|
|
33
|
-
function
|
|
34
|
-
const
|
|
31
|
+
function c(n, r, e, t, s) {
|
|
32
|
+
const i = s && "input" in s ? s.input : e.value, u = s?.expected ?? n.expects ?? null, a = s?.received ?? /* @__PURE__ */ k(i), l = {
|
|
35
33
|
kind: n.kind,
|
|
36
34
|
type: n.type,
|
|
37
|
-
input:
|
|
38
|
-
expected:
|
|
39
|
-
received:
|
|
40
|
-
message: `Invalid ${r}: ${
|
|
35
|
+
input: i,
|
|
36
|
+
expected: u,
|
|
37
|
+
received: a,
|
|
38
|
+
message: `Invalid ${r}: ${u ? `Expected ${u} but r` : "R"}eceived ${a}`,
|
|
41
39
|
requirement: n.requirement,
|
|
42
|
-
path:
|
|
43
|
-
issues:
|
|
40
|
+
path: s?.path,
|
|
41
|
+
issues: s?.issues,
|
|
44
42
|
lang: t.lang,
|
|
45
43
|
abortEarly: t.abortEarly,
|
|
46
44
|
abortPipeEarly: t.abortPipeEarly
|
|
47
|
-
},
|
|
48
|
-
|
|
45
|
+
}, o = n.kind === "schema", p = s?.message ?? n.message ?? /* @__PURE__ */ A(n.reference, l.lang) ?? (o ? /* @__PURE__ */ D(l.lang) : null) ?? t.message ?? /* @__PURE__ */ S(l.lang);
|
|
46
|
+
p !== void 0 && (l.message = typeof p == "function" ? (
|
|
49
47
|
// @ts-expect-error
|
|
50
|
-
|
|
51
|
-
) :
|
|
48
|
+
p(l)
|
|
49
|
+
) : p), o && (e.typed = !1), e.issues ? e.issues.push(l) : e.issues = [l];
|
|
52
50
|
}
|
|
53
51
|
// @__NO_SIDE_EFFECTS__
|
|
54
52
|
function f(n) {
|
|
@@ -56,12 +54,12 @@ function f(n) {
|
|
|
56
54
|
version: 1,
|
|
57
55
|
vendor: "valibot",
|
|
58
56
|
validate(r) {
|
|
59
|
-
return n["~run"]({ value: r }, /* @__PURE__ */
|
|
57
|
+
return n["~run"]({ value: r }, /* @__PURE__ */ b());
|
|
60
58
|
}
|
|
61
59
|
};
|
|
62
60
|
}
|
|
63
61
|
// @__NO_SIDE_EFFECTS__
|
|
64
|
-
function
|
|
62
|
+
function E(n, r) {
|
|
65
63
|
const e = [...new Set(n)];
|
|
66
64
|
return e.length > 1 ? `(${e.join(` ${r} `)})` : e[0] ?? "never";
|
|
67
65
|
}
|
|
@@ -76,7 +74,7 @@ function O(n, r) {
|
|
|
76
74
|
requirement: n,
|
|
77
75
|
message: r,
|
|
78
76
|
async "~run"(e, t) {
|
|
79
|
-
return e.typed && !await this.requirement(e.value) &&
|
|
77
|
+
return e.typed && !await this.requirement(e.value) && c(this, "input", e, t), e;
|
|
80
78
|
}
|
|
81
79
|
};
|
|
82
80
|
}
|
|
@@ -91,7 +89,7 @@ function I(n, r) {
|
|
|
91
89
|
requirement: n,
|
|
92
90
|
message: r,
|
|
93
91
|
"~run"(e, t) {
|
|
94
|
-
return e.typed && e.value.length > this.requirement &&
|
|
92
|
+
return e.typed && e.value.length > this.requirement && c(this, "length", e, t, {
|
|
95
93
|
received: `${e.value.length}`
|
|
96
94
|
}), e;
|
|
97
95
|
}
|
|
@@ -108,7 +106,7 @@ function q(n, r) {
|
|
|
108
106
|
requirement: n,
|
|
109
107
|
message: r,
|
|
110
108
|
"~run"(e, t) {
|
|
111
|
-
return e.typed && e.value.length < this.requirement &&
|
|
109
|
+
return e.typed && e.value.length < this.requirement && c(this, "length", e, t, {
|
|
112
110
|
received: `${e.value.length}`
|
|
113
111
|
}), e;
|
|
114
112
|
}
|
|
@@ -124,7 +122,7 @@ function M(n) {
|
|
|
124
122
|
expects: "!0",
|
|
125
123
|
message: n,
|
|
126
124
|
"~run"(r, e) {
|
|
127
|
-
return r.typed && r.value.length === 0 &&
|
|
125
|
+
return r.typed && r.value.length === 0 && c(this, "length", r, e, {
|
|
128
126
|
received: "0"
|
|
129
127
|
}), r;
|
|
130
128
|
}
|
|
@@ -153,7 +151,7 @@ function L(n, r, e) {
|
|
|
153
151
|
);
|
|
154
152
|
}
|
|
155
153
|
// @__NO_SIDE_EFFECTS__
|
|
156
|
-
function
|
|
154
|
+
function $(n, r, e) {
|
|
157
155
|
return typeof n.default == "function" ? (
|
|
158
156
|
// @ts-expect-error
|
|
159
157
|
n.default(r, e)
|
|
@@ -176,31 +174,30 @@ function N(n, r) {
|
|
|
176
174
|
return /* @__PURE__ */ f(this);
|
|
177
175
|
},
|
|
178
176
|
"~run"(e, t) {
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
if (Array.isArray(i)) {
|
|
177
|
+
const s = e.value;
|
|
178
|
+
if (Array.isArray(s)) {
|
|
182
179
|
e.typed = !0, e.value = [];
|
|
183
|
-
for (let
|
|
184
|
-
const
|
|
185
|
-
if (
|
|
186
|
-
const
|
|
180
|
+
for (let i = 0; i < s.length; i++) {
|
|
181
|
+
const u = s[i], a = this.item["~run"]({ value: u }, t);
|
|
182
|
+
if (a.issues) {
|
|
183
|
+
const l = {
|
|
187
184
|
type: "array",
|
|
188
185
|
origin: "value",
|
|
189
|
-
input:
|
|
190
|
-
key:
|
|
191
|
-
value:
|
|
186
|
+
input: s,
|
|
187
|
+
key: i,
|
|
188
|
+
value: u
|
|
192
189
|
};
|
|
193
|
-
for (const
|
|
194
|
-
|
|
195
|
-
if (e.issues || (e.issues =
|
|
190
|
+
for (const o of a.issues)
|
|
191
|
+
o.path ? o.path.unshift(l) : o.path = [l], e.issues?.push(o);
|
|
192
|
+
if (e.issues || (e.issues = a.issues), t.abortEarly) {
|
|
196
193
|
e.typed = !1;
|
|
197
194
|
break;
|
|
198
195
|
}
|
|
199
196
|
}
|
|
200
|
-
|
|
197
|
+
a.typed || (e.typed = !1), e.value.push(a.value);
|
|
201
198
|
}
|
|
202
199
|
} else
|
|
203
|
-
|
|
200
|
+
c(this, "type", e, t);
|
|
204
201
|
return e;
|
|
205
202
|
}
|
|
206
203
|
};
|
|
@@ -218,7 +215,7 @@ function C(n) {
|
|
|
218
215
|
return /* @__PURE__ */ f(this);
|
|
219
216
|
},
|
|
220
217
|
"~run"(r, e) {
|
|
221
|
-
return typeof r.value == "boolean" ? r.typed = !0 :
|
|
218
|
+
return typeof r.value == "boolean" ? r.typed = !0 : c(this, "type", r, e), r;
|
|
222
219
|
}
|
|
223
220
|
};
|
|
224
221
|
}
|
|
@@ -236,7 +233,7 @@ function F(n, r) {
|
|
|
236
233
|
return /* @__PURE__ */ f(this);
|
|
237
234
|
},
|
|
238
235
|
"~run"(e, t) {
|
|
239
|
-
return this.check(e.value) ? e.typed = !0 :
|
|
236
|
+
return this.check(e.value) ? e.typed = !0 : c(this, "type", e, t), e;
|
|
240
237
|
}
|
|
241
238
|
};
|
|
242
239
|
}
|
|
@@ -246,7 +243,7 @@ function K(n, r) {
|
|
|
246
243
|
kind: "schema",
|
|
247
244
|
type: "literal",
|
|
248
245
|
reference: K,
|
|
249
|
-
expects: /* @__PURE__ */
|
|
246
|
+
expects: /* @__PURE__ */ k(n),
|
|
250
247
|
async: !1,
|
|
251
248
|
literal: n,
|
|
252
249
|
message: r,
|
|
@@ -254,7 +251,7 @@ function K(n, r) {
|
|
|
254
251
|
return /* @__PURE__ */ f(this);
|
|
255
252
|
},
|
|
256
253
|
"~run"(e, t) {
|
|
257
|
-
return e.value === this.literal ? e.typed = !0 :
|
|
254
|
+
return e.value === this.literal ? e.typed = !0 : c(this, "type", e, t), e;
|
|
258
255
|
}
|
|
259
256
|
};
|
|
260
257
|
}
|
|
@@ -271,7 +268,7 @@ function R(n) {
|
|
|
271
268
|
return /* @__PURE__ */ f(this);
|
|
272
269
|
},
|
|
273
270
|
"~run"(r, e) {
|
|
274
|
-
return typeof r.value == "number" && !isNaN(r.value) ? r.typed = !0 :
|
|
271
|
+
return typeof r.value == "number" && !isNaN(r.value) ? r.typed = !0 : c(this, "type", r, e), r;
|
|
275
272
|
}
|
|
276
273
|
};
|
|
277
274
|
}
|
|
@@ -289,54 +286,53 @@ function V(n, r) {
|
|
|
289
286
|
return /* @__PURE__ */ f(this);
|
|
290
287
|
},
|
|
291
288
|
"~run"(e, t) {
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
if (i && typeof i == "object") {
|
|
289
|
+
const s = e.value;
|
|
290
|
+
if (s && typeof s == "object") {
|
|
295
291
|
e.typed = !0, e.value = {};
|
|
296
|
-
for (const
|
|
297
|
-
const
|
|
298
|
-
if (
|
|
299
|
-
|
|
300
|
-
const
|
|
292
|
+
for (const i in this.entries) {
|
|
293
|
+
const u = this.entries[i];
|
|
294
|
+
if (i in s || (u.type === "exact_optional" || u.type === "optional" || u.type === "nullish") && // @ts-expect-error
|
|
295
|
+
u.default !== void 0) {
|
|
296
|
+
const a = i in s ? (
|
|
301
297
|
// @ts-expect-error
|
|
302
|
-
i
|
|
303
|
-
) : /* @__PURE__ */
|
|
304
|
-
if (
|
|
305
|
-
const
|
|
298
|
+
s[i]
|
|
299
|
+
) : /* @__PURE__ */ $(u), l = u["~run"]({ value: a }, t);
|
|
300
|
+
if (l.issues) {
|
|
301
|
+
const o = {
|
|
306
302
|
type: "object",
|
|
307
303
|
origin: "value",
|
|
308
|
-
input:
|
|
309
|
-
key:
|
|
310
|
-
value:
|
|
304
|
+
input: s,
|
|
305
|
+
key: i,
|
|
306
|
+
value: a
|
|
311
307
|
};
|
|
312
|
-
for (const
|
|
313
|
-
|
|
314
|
-
if (e.issues || (e.issues =
|
|
308
|
+
for (const p of l.issues)
|
|
309
|
+
p.path ? p.path.unshift(o) : p.path = [o], e.issues?.push(p);
|
|
310
|
+
if (e.issues || (e.issues = l.issues), t.abortEarly) {
|
|
315
311
|
e.typed = !1;
|
|
316
312
|
break;
|
|
317
313
|
}
|
|
318
314
|
}
|
|
319
|
-
|
|
320
|
-
} else if (
|
|
321
|
-
e.value[
|
|
322
|
-
else if (
|
|
315
|
+
l.typed || (e.typed = !1), e.value[i] = l.value;
|
|
316
|
+
} else if (u.fallback !== void 0)
|
|
317
|
+
e.value[i] = /* @__PURE__ */ L(u);
|
|
318
|
+
else if (u.type !== "exact_optional" && u.type !== "optional" && u.type !== "nullish" && (c(this, "key", e, t, {
|
|
323
319
|
input: void 0,
|
|
324
|
-
expected: `"${
|
|
320
|
+
expected: `"${i}"`,
|
|
325
321
|
path: [
|
|
326
322
|
{
|
|
327
323
|
type: "object",
|
|
328
324
|
origin: "key",
|
|
329
|
-
input:
|
|
330
|
-
key:
|
|
325
|
+
input: s,
|
|
326
|
+
key: i,
|
|
331
327
|
// @ts-expect-error
|
|
332
|
-
value: i
|
|
328
|
+
value: s[i]
|
|
333
329
|
}
|
|
334
330
|
]
|
|
335
331
|
}), t.abortEarly))
|
|
336
332
|
break;
|
|
337
333
|
}
|
|
338
334
|
} else
|
|
339
|
-
|
|
335
|
+
c(this, "type", e, t);
|
|
340
336
|
return e;
|
|
341
337
|
}
|
|
342
338
|
};
|
|
@@ -355,7 +351,7 @@ function z(n, r) {
|
|
|
355
351
|
return /* @__PURE__ */ f(this);
|
|
356
352
|
},
|
|
357
353
|
"~run"(e, t) {
|
|
358
|
-
return e.value === void 0 && (this.default !== void 0 && (e.value = /* @__PURE__ */
|
|
354
|
+
return e.value === void 0 && (this.default !== void 0 && (e.value = /* @__PURE__ */ $(this, e, t)), e.value === void 0) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
|
|
359
355
|
}
|
|
360
356
|
};
|
|
361
357
|
}
|
|
@@ -365,7 +361,7 @@ function B(n, r) {
|
|
|
365
361
|
kind: "schema",
|
|
366
362
|
type: "picklist",
|
|
367
363
|
reference: B,
|
|
368
|
-
expects: /* @__PURE__ */
|
|
364
|
+
expects: /* @__PURE__ */ E(n.map(k), "|"),
|
|
369
365
|
async: !1,
|
|
370
366
|
options: n,
|
|
371
367
|
message: r,
|
|
@@ -373,7 +369,7 @@ function B(n, r) {
|
|
|
373
369
|
return /* @__PURE__ */ f(this);
|
|
374
370
|
},
|
|
375
371
|
"~run"(e, t) {
|
|
376
|
-
return this.options.includes(e.value) ? e.typed = !0 :
|
|
372
|
+
return this.options.includes(e.value) ? e.typed = !0 : c(this, "type", e, t), e;
|
|
377
373
|
}
|
|
378
374
|
};
|
|
379
375
|
}
|
|
@@ -390,7 +386,7 @@ function H(n) {
|
|
|
390
386
|
return /* @__PURE__ */ f(this);
|
|
391
387
|
},
|
|
392
388
|
"~run"(r, e) {
|
|
393
|
-
return typeof r.value == "string" ? r.typed = !0 :
|
|
389
|
+
return typeof r.value == "string" ? r.typed = !0 : c(this, "type", r, e), r;
|
|
394
390
|
}
|
|
395
391
|
};
|
|
396
392
|
}
|
|
@@ -408,58 +404,58 @@ function J(n, r, e) {
|
|
|
408
404
|
get "~standard"() {
|
|
409
405
|
return /* @__PURE__ */ f(this);
|
|
410
406
|
},
|
|
411
|
-
"~run"(t,
|
|
412
|
-
const
|
|
413
|
-
if (
|
|
414
|
-
let
|
|
415
|
-
const
|
|
416
|
-
for (const h of
|
|
407
|
+
"~run"(t, s) {
|
|
408
|
+
const i = t.value;
|
|
409
|
+
if (i && typeof i == "object") {
|
|
410
|
+
let u, a = 0, l = this.key, o = [];
|
|
411
|
+
const p = (j, d) => {
|
|
412
|
+
for (const h of j.options) {
|
|
417
413
|
if (h.type === "variant")
|
|
418
|
-
|
|
414
|
+
p(h, new Set(d).add(h.key));
|
|
419
415
|
else {
|
|
420
|
-
let
|
|
421
|
-
for (const
|
|
422
|
-
const
|
|
423
|
-
if (
|
|
416
|
+
let x = !0, v = 0;
|
|
417
|
+
for (const y of d) {
|
|
418
|
+
const m = h.entries[y];
|
|
419
|
+
if (y in i ? m["~run"](
|
|
424
420
|
// @ts-expect-error
|
|
425
|
-
{ typed: !1, value:
|
|
421
|
+
{ typed: !1, value: i[y] },
|
|
426
422
|
{ abortEarly: !0 }
|
|
427
|
-
).issues :
|
|
428
|
-
|
|
429
|
-
h.entries[
|
|
423
|
+
).issues : m.type !== "exact_optional" && m.type !== "optional" && m.type !== "nullish") {
|
|
424
|
+
x = !1, l !== y && (a < v || a === v && y in i && !(l in i)) && (a = v, l = y, o = []), l === y && o.push(
|
|
425
|
+
h.entries[y].expects
|
|
430
426
|
);
|
|
431
427
|
break;
|
|
432
428
|
}
|
|
433
|
-
|
|
429
|
+
v++;
|
|
434
430
|
}
|
|
435
|
-
if (
|
|
436
|
-
const
|
|
437
|
-
(!
|
|
431
|
+
if (x) {
|
|
432
|
+
const y = h["~run"]({ value: i }, s);
|
|
433
|
+
(!u || !u.typed && y.typed) && (u = y);
|
|
438
434
|
}
|
|
439
435
|
}
|
|
440
|
-
if (
|
|
436
|
+
if (u && !u.issues)
|
|
441
437
|
break;
|
|
442
438
|
}
|
|
443
439
|
};
|
|
444
|
-
if (
|
|
445
|
-
return
|
|
446
|
-
|
|
440
|
+
if (p(this, /* @__PURE__ */ new Set([this.key])), u)
|
|
441
|
+
return u;
|
|
442
|
+
c(this, "type", t, s, {
|
|
447
443
|
// @ts-expect-error
|
|
448
|
-
input:
|
|
449
|
-
expected: /* @__PURE__ */
|
|
444
|
+
input: i[l],
|
|
445
|
+
expected: /* @__PURE__ */ E(o, "|"),
|
|
450
446
|
path: [
|
|
451
447
|
{
|
|
452
448
|
type: "object",
|
|
453
449
|
origin: "value",
|
|
454
|
-
input:
|
|
455
|
-
key:
|
|
450
|
+
input: i,
|
|
451
|
+
key: l,
|
|
456
452
|
// @ts-expect-error
|
|
457
|
-
value:
|
|
453
|
+
value: i[l]
|
|
458
454
|
}
|
|
459
455
|
]
|
|
460
456
|
});
|
|
461
457
|
} else
|
|
462
|
-
|
|
458
|
+
c(this, "type", t, s);
|
|
463
459
|
return t;
|
|
464
460
|
}
|
|
465
461
|
};
|
|
@@ -509,7 +505,7 @@ function T(...n) {
|
|
|
509
505
|
}
|
|
510
506
|
// @__NO_SIDE_EFFECTS__
|
|
511
507
|
function U(n, r, e) {
|
|
512
|
-
const t = n["~run"]({ value: r }, /* @__PURE__ */
|
|
508
|
+
const t = n["~run"]({ value: r }, /* @__PURE__ */ b(e));
|
|
513
509
|
return {
|
|
514
510
|
typed: t.typed,
|
|
515
511
|
success: !t.issues,
|
|
@@ -521,7 +517,7 @@ function U(n, r, e) {
|
|
|
521
517
|
async function W(n, r, e) {
|
|
522
518
|
const t = await n["~run"](
|
|
523
519
|
{ value: r },
|
|
524
|
-
/* @__PURE__ */
|
|
520
|
+
/* @__PURE__ */ b(e)
|
|
525
521
|
);
|
|
526
522
|
return {
|
|
527
523
|
typed: t.typed,
|
|
@@ -531,19 +527,19 @@ async function W(n, r, e) {
|
|
|
531
527
|
};
|
|
532
528
|
}
|
|
533
529
|
export {
|
|
534
|
-
|
|
530
|
+
c as _addIssue,
|
|
535
531
|
f as _getStandardProps,
|
|
536
|
-
|
|
537
|
-
|
|
532
|
+
E as _joinExpects,
|
|
533
|
+
k as _stringify,
|
|
538
534
|
N as array,
|
|
539
535
|
C as boolean,
|
|
540
536
|
O as checkAsync,
|
|
541
537
|
F as custom,
|
|
542
|
-
|
|
538
|
+
$ as getDefault,
|
|
543
539
|
L as getFallback,
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
540
|
+
b as getGlobalConfig,
|
|
541
|
+
S as getGlobalMessage,
|
|
542
|
+
D as getSchemaMessage,
|
|
547
543
|
A as getSpecificMessage,
|
|
548
544
|
K as literal,
|
|
549
545
|
I as maxLength,
|
package/dist/package.json.js
CHANGED
|
@@ -1,34 +1,31 @@
|
|
|
1
|
-
import { useHttp as
|
|
2
|
-
import { QUERY_PARAMS as
|
|
3
|
-
const
|
|
4
|
-
const { get:
|
|
1
|
+
import { useHttp as n } from "../composables/useHttp.js";
|
|
2
|
+
import { QUERY_PARAMS as m, URLS as i } from "../enums/extensions/recommendationBlock.js";
|
|
3
|
+
const p = () => {
|
|
4
|
+
const { get: o } = n(), { get: c } = n({ headers: {} }), a = "6KcLM9TwheVB1mgK";
|
|
5
5
|
return {
|
|
6
6
|
fetchRecommendationCreateData: async () => {
|
|
7
7
|
try {
|
|
8
|
-
return (await
|
|
8
|
+
return (await o("/newsletter/recommendations/create-data")).data;
|
|
9
9
|
} catch (e) {
|
|
10
10
|
throw console.error("fetchUserModalState error:", e), e;
|
|
11
11
|
}
|
|
12
12
|
},
|
|
13
13
|
fetchRecommendationFilters: async () => {
|
|
14
14
|
try {
|
|
15
|
-
const { data: e } = await
|
|
15
|
+
const { data: e } = await o("/stripo/email-recommendation-attributes");
|
|
16
16
|
return e;
|
|
17
17
|
} catch (e) {
|
|
18
18
|
throw console.error("fetchRecommendationFilters error:", e), e;
|
|
19
19
|
}
|
|
20
20
|
},
|
|
21
|
-
fetchRecommendationProducts: async (e,
|
|
22
|
-
var n;
|
|
21
|
+
fetchRecommendationProducts: async (e, s) => {
|
|
23
22
|
try {
|
|
24
|
-
const t = new URLSearchParams(Object.entries(
|
|
25
|
-
t.set(
|
|
26
|
-
const
|
|
27
|
-
console.debug("🏁 Recommendation API Query:", c
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
);
|
|
31
|
-
return ((n = o == null ? void 0 : o.data) == null ? void 0 : n.data) ?? [];
|
|
23
|
+
const t = new URLSearchParams(Object.entries(s));
|
|
24
|
+
t.set(m.CLIENT_ID, a);
|
|
25
|
+
const r = decodeURIComponent(t.toString());
|
|
26
|
+
return console.debug("🏁 Recommendation API Query:", r), (await c(
|
|
27
|
+
`${i.RECOMMENDATION_API_URL}/v2/${e}?${r}`
|
|
28
|
+
))?.data?.data ?? [];
|
|
32
29
|
} catch (t) {
|
|
33
30
|
throw console.error("fetchRecommendationProducts error:", t), t;
|
|
34
31
|
}
|
|
@@ -36,5 +33,5 @@ const y = () => {
|
|
|
36
33
|
};
|
|
37
34
|
};
|
|
38
35
|
export {
|
|
39
|
-
|
|
36
|
+
p as useRecommendationApi
|
|
40
37
|
};
|