@one-commerce/sdk-core 1.19.1-alpha.0 → 1.19.4-alpha.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.
@@ -63,18 +63,17 @@
63
63
  }
64
64
 
65
65
  function _getPrototypeOf(o) {
66
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
66
+ _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
67
67
  return o.__proto__ || Object.getPrototypeOf(o);
68
68
  };
69
69
  return _getPrototypeOf(o);
70
70
  }
71
71
 
72
72
  function _setPrototypeOf(o, p) {
73
- _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
73
+ _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
74
74
  o.__proto__ = p;
75
75
  return o;
76
76
  };
77
-
78
77
  return _setPrototypeOf(o, p);
79
78
  }
80
79
 
@@ -219,18 +218,7 @@
219
218
 
220
219
  var api = {};
221
220
 
222
- (function (exports) {
223
- Object.defineProperty(exports, "__esModule", { value: true });
224
- exports.Backoffice = void 0;
225
- (function (Backoffice) {
226
- (function (Context) {
227
- (function (AvailableContext) {
228
- AvailableContext["ADD_TO_CART"] = "backofficeAddToCart";
229
- })(Context.AvailableContext || (Context.AvailableContext = {}));
230
- })(Backoffice.Context || (Backoffice.Context = {}));
231
- })(exports.Backoffice || (exports.Backoffice = {}));
232
-
233
- }(api));
221
+ Object.defineProperty(api, "__esModule", { value: true });
234
222
 
235
223
  (function (exports) {
236
224
  var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
@@ -307,15 +295,15 @@
307
295
  return BaseCallClass;
308
296
  }();
309
297
 
310
- var AddToCartContext = /*#__PURE__*/function (_BaseCallClass) {
311
- _inherits(AddToCartContext, _BaseCallClass);
298
+ var ContextCallClass = /*#__PURE__*/function (_BaseCallClass) {
299
+ _inherits(ContextCallClass, _BaseCallClass);
312
300
 
313
- var _super = _createSuper(AddToCartContext);
301
+ var _super = _createSuper(ContextCallClass);
314
302
 
315
- function AddToCartContext() {
303
+ function ContextCallClass() {
316
304
  var _this;
317
305
 
318
- _classCallCheck(this, AddToCartContext);
306
+ _classCallCheck(this, ContextCallClass);
319
307
 
320
308
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
321
309
  args[_key] = arguments[_key];
@@ -323,15 +311,39 @@
323
311
 
324
312
  _this = _super.call.apply(_super, [this].concat(args));
325
313
 
326
- _defineProperty(_assertThisInitialized(_this), "serviceName", main.Backoffice.Context.AvailableContext.ADD_TO_CART);
314
+ _defineProperty(_assertThisInitialized(_this), "serviceName", 'context');
327
315
 
328
- _defineProperty(_assertThisInitialized(_this), "productId", void 0);
316
+ return _this;
317
+ }
329
318
 
330
- _defineProperty(_assertThisInitialized(_this), "cartId", void 0);
319
+ return _createClass(ContextCallClass);
320
+ }(BaseCallClass);
331
321
 
332
- _defineProperty(_assertThisInitialized(_this), "warehouses", void 0);
322
+ var AddToCartContext = /*#__PURE__*/function (_ContextCallClass) {
323
+ _inherits(AddToCartContext, _ContextCallClass);
333
324
 
334
- return _this;
325
+ var _super2 = _createSuper(AddToCartContext);
326
+
327
+ function AddToCartContext() {
328
+ var _this2;
329
+
330
+ _classCallCheck(this, AddToCartContext);
331
+
332
+ for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
333
+ args[_key2] = arguments[_key2];
334
+ }
335
+
336
+ _this2 = _super2.call.apply(_super2, [this].concat(args));
337
+
338
+ _defineProperty(_assertThisInitialized(_this2), "productId", void 0);
339
+
340
+ _defineProperty(_assertThisInitialized(_this2), "cartId", void 0);
341
+
342
+ _defineProperty(_assertThisInitialized(_this2), "warehouses", void 0);
343
+
344
+ _defineProperty(_assertThisInitialized(_this2), "meta", void 0);
345
+
346
+ return _this2;
335
347
  }
336
348
 
337
349
  _createClass(AddToCartContext, [{
@@ -352,7 +364,7 @@
352
364
  }]);
353
365
 
354
366
  return AddToCartContext;
355
- }(BaseCallClass);
367
+ }(ContextCallClass);
356
368
 
357
369
  var BackofficeCatalog = /*#__PURE__*/function (_BaseCallClass) {
358
370
  _inherits(BackofficeCatalog, _BaseCallClass);
@@ -982,7 +994,11 @@
982
994
  _createClass(Sdk, [{
983
995
  key: "initializeContextClass",
984
996
  value: function initializeContextClass() {
985
- return new this.contextClass(this.callFunction.bind(this));
997
+ if (this.contextClass) {
998
+ return new this.contextClass(this.callFunction.bind(this));
999
+ }
1000
+
1001
+ return {};
986
1002
  }
987
1003
  }, {
988
1004
  key: "initializeServiceGetters",