@zenky/storefront-vue 0.9.43 → 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 +8 -4
- package/dist/esm/index.js +8 -4
- package/dist/zenky.d.ts +2 -2
- package/package.json +2 -2
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:
|
|
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;
|
|
@@ -2612,8 +2613,11 @@ function useCheckoutSummary(emit) {
|
|
|
2612
2613
|
saving.value = true;
|
|
2613
2614
|
try {
|
|
2614
2615
|
const response = await api.checkoutOrder(credentials.value, payload);
|
|
2615
|
-
if (response.
|
|
2616
|
-
emit('confirmation',
|
|
2616
|
+
if (response.confirmation.required) {
|
|
2617
|
+
emit('confirmation', {
|
|
2618
|
+
credentials: credentials.value,
|
|
2619
|
+
method: response.confirmation.method,
|
|
2620
|
+
});
|
|
2617
2621
|
}
|
|
2618
2622
|
else {
|
|
2619
2623
|
emit('completed', response);
|
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:
|
|
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;
|
|
@@ -2604,8 +2605,11 @@ function useCheckoutSummary(emit) {
|
|
|
2604
2605
|
saving.value = true;
|
|
2605
2606
|
try {
|
|
2606
2607
|
const response = await checkoutOrder(credentials.value, payload);
|
|
2607
|
-
if (response.
|
|
2608
|
-
emit('confirmation',
|
|
2608
|
+
if (response.confirmation.required) {
|
|
2609
|
+
emit('confirmation', {
|
|
2610
|
+
credentials: credentials.value,
|
|
2611
|
+
method: response.confirmation.method,
|
|
2612
|
+
});
|
|
2609
2613
|
}
|
|
2610
2614
|
else {
|
|
2611
2615
|
emit('completed', response);
|
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.
|
|
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",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"Zenky"
|
|
20
20
|
],
|
|
21
21
|
"peerDependencies": {
|
|
22
|
-
"@zenky/api": "^0.9.
|
|
22
|
+
"@zenky/api": "^0.9.52",
|
|
23
23
|
"@zenky/events": "^1.0.3",
|
|
24
24
|
"date-fns": "^2.29.2",
|
|
25
25
|
"lodash-es": "^4.17.21",
|