@zenky/storefront-vue 0.10.14 → 0.10.15

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/index.js CHANGED
@@ -1,17 +1,17 @@
1
- export { canAddDirectly, findProductInCatalog, formatWeight, getProductWeight, getVariantWeight, resolveVariantPrice, toGrams, usePriceRecalculation, useProductDetail, useProductList, useProductPricing, useProductVariant, useProductVariantModifiers, useProductVariantSelector, useProductsByCategory, useRelatedProducts } from './chunk-6FVXAF7L.js';
1
+ export { canAddDirectly, findProductInCatalog, formatWeight, getProductWeight, getVariantWeight, resolveVariantPrice, toGrams, usePriceRecalculation, useProductDetail, useProductList, useProductPricing, useProductVariant, useProductVariantModifiers, useProductVariantSelector, useProductsByCategory, useRelatedProducts } from './chunk-F2LJ6TDH.js';
2
2
  export { normalizeSnippets } from './chunk-GLQXTMVW.js';
3
- export { buildCssVariableMap, generatePrimaryShades, generateShades, useTheme } from './chunk-BUNI6MGH.js';
4
3
  export { RESEND_TIMER_SECONDS, useAuthFlowStore, useProductsStore, useStore, useStorefrontProfile } from './chunk-LUJSF6V7.js';
4
+ export { buildCssVariableMap, generatePrimaryShades, generateShades, useTheme } from './chunk-BUNI6MGH.js';
5
5
  export { buildQrCodeUrl, createOperationChain, formatAddressCityLast, formatDate, formatDateTime, formatPhoneNational, formatPhoneSpaced, formatScheduleStatus, getApiErrorMessage, getApiFieldErrors, getEmailLink, getPhoneTelLink, getSocialLinks, getTodayInfo, getWebsiteLink, getWeeklySchedule, groupScheduleDays, pluralize, toDateInputValue, todayInTimezone } from './chunk-RURXGVWW.js';
6
6
  export { createDebounce } from './chunk-XUGXLJZB.js';
7
7
  import './chunk-EMGQXBU3.js';
8
8
  import './chunk-5B2P5W3E.js';
9
- export { CASH_DENOMINATIONS_MAJOR, DEFAULT_ROUND_STEPS_MAJOR, ORDER_EVENTS, ORDER_WITH, buildCartLineKey, buildCashChangePresets, buildMainPaymentRequest, getCashDenominationsMinor, getDefaultRoundStepsMinor, normalizeAddress, useBonusesReconciliation, useCartAddressSync, useCartCustomerAttachment, useCartDeliveryAttachment, useCartInitialization, useCartMutation, useCartOperations, useCartQuantities, useCartRecalculation, useCartStockWatcher, useCheckoutFlow, useCheckoutSubmit, useCustomerAttach, useOnlinePaymentRetry, useOrderBonuses, useOrderChannel, useOrderDelivery, useOrderPromocode, useOrderSettings, useOrderTotal, usePaymentSelection, useRestrictedAddToCart, useRestrictionGate, useStorefrontCart, useVisibleCartVariants, variantLineKey } from './chunk-KQBNLJLQ.js';
9
+ export { CASH_DENOMINATIONS_MAJOR, DEFAULT_ROUND_STEPS_MAJOR, ORDER_EVENTS, ORDER_WITH, buildCartLineKey, buildCashChangePresets, buildMainPaymentRequest, getCashDenominationsMinor, getDefaultRoundStepsMinor, normalizeAddress, useBonusesReconciliation, useCartAddressSync, useCartCustomerAttachment, useCartDeliveryAttachment, useCartInitialization, useCartMutation, useCartOperations, useCartQuantities, useCartRecalculation, useCartStockWatcher, useCheckoutFlow, useCheckoutSubmit, useCustomerAttach, useOnlinePaymentRetry, useOrderBonuses, useOrderChannel, useOrderDelivery, useOrderPromocode, useOrderSettings, useOrderTotal, usePaymentSelection, useRestrictedAddToCart, useRestrictionGate, useStorefrontCart, useVisibleCartVariants, variantLineKey } from './chunk-YVPN5MKP.js';
10
10
  export { useCartCredentials } from './chunk-W43D7JYV.js';
11
11
  import './chunk-5QCUH3FF.js';
12
12
  export { getCartErrorCode, getCartErrorHttpCode, getCartErrorMessage, getValidationErrors, logCartError } from './chunk-TE42OCFK.js';
13
13
  export { useCartStore, useOrderSettingsStore, usePromotionsStore } from './chunk-TE2QPH74.js';
14
- export { useCatalogStore } from './chunk-NSOIL7PW.js';
14
+ export { useCatalogStore } from './chunk-4JCJHAL3.js';
15
15
  export { createStorefront, provideStorefront, useAuthStore, useRuntime } from './chunk-WTZXTBF6.js';
16
16
  import './chunk-TIQ7AJLY.js';
17
17
  export { useStoreProfileStore } from './chunk-IOYYCA75.js';
@@ -1,7 +1,7 @@
1
- export { canAddDirectly, findProductInCatalog, formatWeight, getProductWeight, getVariantWeight, resolveVariantPrice, toGrams, usePriceRecalculation, useProductDetail, useProductList, useProductPricing, useProductVariant, useProductVariantModifiers, useProductVariantSelector, useProductsByCategory, useRelatedProducts } from '../chunk-6FVXAF7L.js';
1
+ export { canAddDirectly, findProductInCatalog, formatWeight, getProductWeight, getVariantWeight, resolveVariantPrice, toGrams, usePriceRecalculation, useProductDetail, useProductList, useProductPricing, useProductVariant, useProductVariantModifiers, useProductVariantSelector, useProductsByCategory, useRelatedProducts } from '../chunk-F2LJ6TDH.js';
2
2
  import '../chunk-XUGXLJZB.js';
3
3
  import '../chunk-5QCUH3FF.js';
4
- import '../chunk-NSOIL7PW.js';
4
+ import '../chunk-4JCJHAL3.js';
5
5
  import '../chunk-WTZXTBF6.js';
6
6
  import '../chunk-IOYYCA75.js';
7
7
  //# sourceMappingURL=index.js.map
package/dist/seo/index.js CHANGED
@@ -1,8 +1,8 @@
1
- import { resolveVariantPrice } from '../chunk-6FVXAF7L.js';
1
+ import { resolveVariantPrice } from '../chunk-F2LJ6TDH.js';
2
2
  import { getSocialLinks } from '../chunk-RURXGVWW.js';
3
3
  import '../chunk-XUGXLJZB.js';
4
4
  import '../chunk-5QCUH3FF.js';
5
- import '../chunk-NSOIL7PW.js';
5
+ import '../chunk-4JCJHAL3.js';
6
6
  import '../chunk-WTZXTBF6.js';
7
7
  import '../chunk-IOYYCA75.js';
8
8
  import { minorToMajorString } from '../chunk-2Y6QTHXI.js';
@@ -13,14 +13,16 @@ import '../snippets/index.js';
13
13
  interface CatalogStore {
14
14
  catalog: Ref<StaticCatalogItem[]>;
15
15
  currentHash: Ref<string | null>;
16
+ catalogId: Ref<string | null>;
16
17
  reloading: Ref<boolean>;
17
18
  loadError: Ref<boolean>;
18
- initCatalog: (items: StaticCatalogItem[], hash?: string | null) => void;
19
+ initCatalog: (items: StaticCatalogItem[], hash?: string | null, catalogId?: string | null) => void;
19
20
  setLoadError: () => void;
20
21
  setReloading: (value: boolean) => void;
21
22
  hasCatalog: ComputedRef<boolean>;
23
+ isManualCatalog: ComputedRef<boolean>;
22
24
  }
23
- declare const useCatalogStore: pinia.StoreDefinition<"zenky-catalog", Pick<CatalogStore, "catalog" | "currentHash" | "reloading" | "loadError">, Pick<CatalogStore, "hasCatalog">, Pick<CatalogStore, "initCatalog" | "setLoadError" | "setReloading">>;
25
+ declare const useCatalogStore: pinia.StoreDefinition<"zenky-catalog", Pick<CatalogStore, "catalog" | "currentHash" | "catalogId" | "reloading" | "loadError">, Pick<CatalogStore, "hasCatalog" | "isManualCatalog">, Pick<CatalogStore, "initCatalog" | "setLoadError" | "setReloading">>;
24
26
 
25
27
  interface ProductsStore {
26
28
  products: Ref<Product[]>;
@@ -2,7 +2,7 @@ export { RESEND_TIMER_SECONDS, useAuthFlowStore, useProductsStore, useStore, use
2
2
  import '../chunk-5B2P5W3E.js';
3
3
  import '../chunk-TE42OCFK.js';
4
4
  export { useCartStore, useOrderSettingsStore, usePromotionsStore } from '../chunk-TE2QPH74.js';
5
- export { useCatalogStore } from '../chunk-NSOIL7PW.js';
5
+ export { useCatalogStore } from '../chunk-4JCJHAL3.js';
6
6
  export { useAuthStore } from '../chunk-WTZXTBF6.js';
7
7
  import '../chunk-TIQ7AJLY.js';
8
8
  export { useStoreProfileStore } from '../chunk-IOYYCA75.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zenky/storefront-vue",
3
- "version": "0.10.14",
3
+ "version": "0.10.15",
4
4
  "description": "Zenky Storefront SDK for Vue 3.",
5
5
  "keywords": [
6
6
  "zenky",
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/stores/catalog.ts"],"names":[],"mappings":";;;;AAsBO,IAAM,eAAA,GAAkB,WAAA,CAAY,eAAA,EAAiB,MAAoB;AAC5E,EAAA,MAAM,OAAA,GAAU,GAAA,CAAyB,EAAE,CAAA;AAC3C,EAAA,MAAM,WAAA,GAAc,IAAmB,IAAI,CAAA;AAC3C,EAAA,MAAM,SAAA,GAAY,IAAI,KAAK,CAAA;AAC3B,EAAA,MAAM,SAAA,GAAY,IAAI,KAAK,CAAA;AAE3B,EAAA,SAAS,WAAA,CAAY,OAA4B,IAAA,EAA4B;AACzE,IAAA,OAAA,CAAQ,KAAA,GAAQ,KAAA;AAChB,IAAA,WAAA,CAAY,QAAQ,IAAA,IAAQ,IAAA;AAC5B,IAAA,SAAA,CAAU,KAAA,GAAQ,KAAA;AAAA,EACtB;AAEA,EAAA,SAAS,YAAA,GAAqB;AAC1B,IAAA,SAAA,CAAU,KAAA,GAAQ,IAAA;AAAA,EACtB;AAEA,EAAA,SAAS,aAAa,KAAA,EAAsB;AACxC,IAAA,SAAA,CAAU,KAAA,GAAQ,KAAA;AAAA,EACtB;AAEA,EAAA,MAAM,aAAa,QAAA,CAAS,MAAM,OAAA,CAAQ,KAAA,CAAM,SAAS,CAAC,CAAA;AAE1D,EAAA,OAAO;AAAA,IACH,OAAA;AAAA,IACA,WAAA;AAAA,IACA,SAAA;AAAA,IACA,SAAA;AAAA,IACA,WAAA;AAAA,IACA,YAAA;AAAA,IACA,YAAA;AAAA,IACA;AAAA,GACJ;AACJ,CAAC","file":"chunk-NSOIL7PW.js","sourcesContent":["import { defineStore } from 'pinia'\nimport { computed, ref, type ComputedRef, type Ref } from 'vue'\n\nimport type { StaticCatalogItem } from '../catalog/catalogEntity'\n\n// Explicit return type (not inferred): otherwise Pinia's inference structurally\n// expands the SDK types in the .d.ts and bloats it. This also satisfies the\n// \"explicit return types\" rule.\nexport interface CatalogStore {\n catalog: Ref<StaticCatalogItem[]>\n currentHash: Ref<string | null>\n reloading: Ref<boolean>\n loadError: Ref<boolean>\n initCatalog: (items: StaticCatalogItem[], hash?: string | null) => void\n setLoadError: () => void\n setReloading: (value: boolean) => void\n hasCatalog: ComputedRef<boolean>\n}\n\n// Setup store (doc 05): id prefixed with zenky-* to avoid colliding with the\n// consumer's own stores. A plain state container — API calls and cookies live in\n// the composables/bootstrap layer, which calls these actions.\nexport const useCatalogStore = defineStore('zenky-catalog', (): CatalogStore => {\n const catalog = ref<StaticCatalogItem[]>([])\n const currentHash = ref<string | null>(null)\n const reloading = ref(false)\n const loadError = ref(false)\n\n function initCatalog(items: StaticCatalogItem[], hash?: string | null): void {\n catalog.value = items\n currentHash.value = hash ?? null\n loadError.value = false\n }\n\n function setLoadError(): void {\n loadError.value = true\n }\n\n function setReloading(value: boolean): void {\n reloading.value = value\n }\n\n const hasCatalog = computed(() => catalog.value.length > 0)\n\n return {\n catalog,\n currentHash,\n reloading,\n loadError,\n initCatalog,\n setLoadError,\n setReloading,\n hasCatalog,\n }\n})\n"]}