@one-commerce/sdk-backoffice-vue3 1.18.0-alpha.0 → 1.18.0
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/lib/bundles/bundle.esm.js +7 -40
- package/lib/bundles/bundle.esm.js.map +1 -1
- package/lib/bundles/bundle.esm.min.js +1 -1
- package/lib/bundles/bundle.esm.min.js.map +1 -1
- package/lib/bundles/bundle.umd.js +7 -40
- package/lib/bundles/bundle.umd.js.map +1 -1
- package/lib/bundles/bundle.umd.min.js +1 -1
- package/lib/bundles/bundle.umd.min.js.map +1 -1
- package/lib/cjs/index.js +0 -2
- package/lib/cjs/index.js.map +1 -1
- package/lib/esm/index.js +0 -2
- package/lib/esm/index.js.map +1 -1
- package/lib/types/index.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -185,14 +185,6 @@ class BackofficeTenant extends BaseCallClass {
|
|
|
185
185
|
_defineProperty$2(this, "currency", void 0);
|
|
186
186
|
}
|
|
187
187
|
|
|
188
|
-
}
|
|
189
|
-
class BackofficeOrderpath extends BaseCallClass {
|
|
190
|
-
constructor(...args) {
|
|
191
|
-
super(...args);
|
|
192
|
-
|
|
193
|
-
_defineProperty$2(this, "serviceName", 'orderpath');
|
|
194
|
-
}
|
|
195
|
-
|
|
196
188
|
}
|
|
197
189
|
class BackofficeLayout extends BaseCallClass {
|
|
198
190
|
constructor(...args) {
|
|
@@ -241,32 +233,6 @@ class BackofficePlugin extends BaseCallClass {
|
|
|
241
233
|
_defineProperty$2(this, "name", void 0);
|
|
242
234
|
}
|
|
243
235
|
|
|
244
|
-
}
|
|
245
|
-
class BackofficeAddToCartContext extends BaseCallClass {
|
|
246
|
-
constructor(...args) {
|
|
247
|
-
super(...args);
|
|
248
|
-
|
|
249
|
-
_defineProperty$2(this, "serviceName", 'addToCartContext');
|
|
250
|
-
|
|
251
|
-
_defineProperty$2(this, "productId", void 0);
|
|
252
|
-
|
|
253
|
-
_defineProperty$2(this, "cartId", void 0);
|
|
254
|
-
|
|
255
|
-
_defineProperty$2(this, "warehouses", void 0);
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
closePlugin() {
|
|
259
|
-
this.call('closePlugin');
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
closePluginAndAddToCart() {
|
|
263
|
-
this.call('closePluginAndAddToCart');
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
closePluginAndRefreshCart() {
|
|
267
|
-
this.call('closePluginAndRefreshCart');
|
|
268
|
-
}
|
|
269
|
-
|
|
270
236
|
}
|
|
271
237
|
|
|
272
238
|
function _defineProperty$1(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
@@ -451,10 +417,15 @@ class Sdk extends Events {
|
|
|
451
417
|
method: fun,
|
|
452
418
|
payload: payload
|
|
453
419
|
});
|
|
454
|
-
return new Promise(resolve => {
|
|
420
|
+
return new Promise((resolve, reject) => {
|
|
455
421
|
const onChannelMessage = response => {
|
|
456
422
|
if (response.callId === callId) {
|
|
457
423
|
this.channel.unsubscribe(main.Message.METHOD_RESULT, onChannelMessage);
|
|
424
|
+
|
|
425
|
+
if (response.isException) {
|
|
426
|
+
return reject(response.result);
|
|
427
|
+
}
|
|
428
|
+
|
|
458
429
|
return resolve(response.result);
|
|
459
430
|
}
|
|
460
431
|
};
|
|
@@ -484,15 +455,13 @@ class BackofficeSdk extends Sdk {
|
|
|
484
455
|
hash: '',
|
|
485
456
|
query: {}
|
|
486
457
|
},
|
|
487
|
-
orderpath: new BackofficeOrderpath(this.callFunction.bind(this)),
|
|
488
458
|
catalog: new BackofficeCatalog(this.callFunction.bind(this)),
|
|
489
459
|
user: new BackofficeUser(this.callFunction.bind(this)),
|
|
490
460
|
tenant: new BackofficeTenant(this.callFunction.bind(this)),
|
|
491
461
|
layout: new BackofficeLayout(this.callFunction.bind(this)),
|
|
492
462
|
authorization: new BackofficeAuthorization(this.callFunction.bind(this)),
|
|
493
463
|
customer: new BackofficeCustomer(this.callFunction.bind(this)),
|
|
494
|
-
plugin: new BackofficePlugin(this.callFunction.bind(this))
|
|
495
|
-
addToCartContext: new BackofficeAddToCartContext(this.callFunction.bind(this))
|
|
464
|
+
plugin: new BackofficePlugin(this.callFunction.bind(this))
|
|
496
465
|
});
|
|
497
466
|
}
|
|
498
467
|
|
|
@@ -529,11 +498,9 @@ var index = {
|
|
|
529
498
|
obj.tenant.update(payload);
|
|
530
499
|
obj.layout.update(payload);
|
|
531
500
|
obj.catalog.update(payload);
|
|
532
|
-
obj.orderpath.update(payload);
|
|
533
501
|
obj.authorization.update(payload);
|
|
534
502
|
obj.customer.update(payload);
|
|
535
503
|
obj.plugin.update(payload);
|
|
536
|
-
obj.addToCartContext.update(payload);
|
|
537
504
|
};
|
|
538
505
|
|
|
539
506
|
sdk.on(SdkEvents.INIT, function (payload) {
|