@zenky/storefront-vue 0.9.44 → 0.9.45

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/cjs/index.js CHANGED
@@ -340,7 +340,7 @@ const useStoreStore = pinia.defineStore({
340
340
  loading: false,
341
341
  loaded: false,
342
342
  store: null,
343
- storeId: window.zenky.storeId,
343
+ storeId: null,
344
344
  cityId: storage.get('cityId'),
345
345
  };
346
346
  },
@@ -383,10 +383,11 @@ const useStoreStore = pinia.defineStore({
383
383
  },
384
384
  },
385
385
  actions: {
386
- async loadStore(inclusions) {
386
+ async loadStore(storeId, inclusions) {
387
387
  if (this.loading || this.loaded) {
388
388
  return;
389
389
  }
390
+ this.storeId = storeId;
390
391
  try {
391
392
  this.store = await api.getStore(inclusions);
392
393
  this.loaded = true;
package/dist/esm/index.js CHANGED
@@ -332,7 +332,7 @@ const useStoreStore = defineStore({
332
332
  loading: false,
333
333
  loaded: false,
334
334
  store: null,
335
- storeId: window.zenky.storeId,
335
+ storeId: null,
336
336
  cityId: storage.get('cityId'),
337
337
  };
338
338
  },
@@ -375,10 +375,11 @@ const useStoreStore = defineStore({
375
375
  },
376
376
  },
377
377
  actions: {
378
- async loadStore(inclusions) {
378
+ async loadStore(storeId, inclusions) {
379
379
  if (this.loading || this.loaded) {
380
380
  return;
381
381
  }
382
+ this.storeId = storeId;
382
383
  try {
383
384
  this.store = await getStore(inclusions);
384
385
  this.loaded = true;
package/dist/zenky.d.ts CHANGED
@@ -10344,7 +10344,7 @@ interface StoreState {
10344
10344
  loading: boolean;
10345
10345
  loaded: boolean;
10346
10346
  store: Store | null;
10347
- storeId: string;
10347
+ storeId: string | null;
10348
10348
  cityId: string | null;
10349
10349
  }
10350
10350
  declare const useStoreStore: pinia.StoreDefinition<"zenky:storefront:store", StoreState, {
@@ -10355,7 +10355,7 @@ declare const useStoreStore: pinia.StoreDefinition<"zenky:storefront:store", Sto
10355
10355
  addressesResolver(): string | null;
10356
10356
  loyalty(): any;
10357
10357
  }, {
10358
- loadStore(inclusions: string): Promise<void>;
10358
+ loadStore(storeId: string, inclusions: string): Promise<void>;
10359
10359
  selectDefaultCity(): City | null;
10360
10360
  selectCity(cityId: string): City | null;
10361
10361
  }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zenky/storefront-vue",
3
- "version": "0.9.44",
3
+ "version": "0.9.45",
4
4
  "description": "Zenky Storefront library for Vue 3.",
5
5
  "author": "Timur Zurbaev <hello@zurbaev.ru>",
6
6
  "license": "MIT",