@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.
- package/lib/bundles/bundle.esm.js +43 -27
- 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 +43 -27
- 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/backoffice/context.js +39 -17
- package/lib/cjs/backoffice/context.js.map +1 -1
- package/lib/cjs/backoffice/services.js +2 -2
- package/lib/cjs/backoffice/services.js.map +1 -1
- package/lib/cjs/events.js.map +1 -1
- package/lib/cjs/index.js +7 -3
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/shop/services.js +2 -2
- package/lib/cjs/shop/services.js.map +1 -1
- package/lib/cjs/utils.js.map +1 -1
- package/lib/esm/backoffice/context.js +12 -3
- package/lib/esm/backoffice/context.js.map +1 -1
- package/lib/esm/backoffice/services.js.map +1 -1
- package/lib/esm/events.js.map +1 -1
- package/lib/esm/index.js +5 -1
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/shop/services.js.map +1 -1
- package/lib/esm/utils.js.map +1 -1
- package/lib/types/backoffice/context.d.ts +6 -2
- package/lib/types/backoffice/context.d.ts.map +1 -1
- package/lib/types/index.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -57,18 +57,17 @@ function _inherits(subClass, superClass) {
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
function _getPrototypeOf(o) {
|
|
60
|
-
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
|
60
|
+
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
|
|
61
61
|
return o.__proto__ || Object.getPrototypeOf(o);
|
|
62
62
|
};
|
|
63
63
|
return _getPrototypeOf(o);
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
function _setPrototypeOf(o, p) {
|
|
67
|
-
_setPrototypeOf = Object.setPrototypeOf
|
|
67
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
68
68
|
o.__proto__ = p;
|
|
69
69
|
return o;
|
|
70
70
|
};
|
|
71
|
-
|
|
72
71
|
return _setPrototypeOf(o, p);
|
|
73
72
|
}
|
|
74
73
|
|
|
@@ -213,18 +212,7 @@ exports.Errors = exports.Message = void 0;
|
|
|
213
212
|
|
|
214
213
|
var api = {};
|
|
215
214
|
|
|
216
|
-
(
|
|
217
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
218
|
-
exports.Backoffice = void 0;
|
|
219
|
-
(function (Backoffice) {
|
|
220
|
-
(function (Context) {
|
|
221
|
-
(function (AvailableContext) {
|
|
222
|
-
AvailableContext["ADD_TO_CART"] = "backofficeAddToCart";
|
|
223
|
-
})(Context.AvailableContext || (Context.AvailableContext = {}));
|
|
224
|
-
})(Backoffice.Context || (Backoffice.Context = {}));
|
|
225
|
-
})(exports.Backoffice || (exports.Backoffice = {}));
|
|
226
|
-
|
|
227
|
-
}(api));
|
|
215
|
+
Object.defineProperty(api, "__esModule", { value: true });
|
|
228
216
|
|
|
229
217
|
(function (exports) {
|
|
230
218
|
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
@@ -301,15 +289,15 @@ var BaseCallClass = /*#__PURE__*/function () {
|
|
|
301
289
|
return BaseCallClass;
|
|
302
290
|
}();
|
|
303
291
|
|
|
304
|
-
var
|
|
305
|
-
_inherits(
|
|
292
|
+
var ContextCallClass = /*#__PURE__*/function (_BaseCallClass) {
|
|
293
|
+
_inherits(ContextCallClass, _BaseCallClass);
|
|
306
294
|
|
|
307
|
-
var _super = _createSuper(
|
|
295
|
+
var _super = _createSuper(ContextCallClass);
|
|
308
296
|
|
|
309
|
-
function
|
|
297
|
+
function ContextCallClass() {
|
|
310
298
|
var _this;
|
|
311
299
|
|
|
312
|
-
_classCallCheck(this,
|
|
300
|
+
_classCallCheck(this, ContextCallClass);
|
|
313
301
|
|
|
314
302
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
315
303
|
args[_key] = arguments[_key];
|
|
@@ -317,15 +305,39 @@ var AddToCartContext = /*#__PURE__*/function (_BaseCallClass) {
|
|
|
317
305
|
|
|
318
306
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
319
307
|
|
|
320
|
-
_defineProperty(_assertThisInitialized(_this), "serviceName",
|
|
308
|
+
_defineProperty(_assertThisInitialized(_this), "serviceName", 'context');
|
|
321
309
|
|
|
322
|
-
|
|
310
|
+
return _this;
|
|
311
|
+
}
|
|
323
312
|
|
|
324
|
-
|
|
313
|
+
return _createClass(ContextCallClass);
|
|
314
|
+
}(BaseCallClass);
|
|
325
315
|
|
|
326
|
-
|
|
316
|
+
var AddToCartContext = /*#__PURE__*/function (_ContextCallClass) {
|
|
317
|
+
_inherits(AddToCartContext, _ContextCallClass);
|
|
327
318
|
|
|
328
|
-
|
|
319
|
+
var _super2 = _createSuper(AddToCartContext);
|
|
320
|
+
|
|
321
|
+
function AddToCartContext() {
|
|
322
|
+
var _this2;
|
|
323
|
+
|
|
324
|
+
_classCallCheck(this, AddToCartContext);
|
|
325
|
+
|
|
326
|
+
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
327
|
+
args[_key2] = arguments[_key2];
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
_this2 = _super2.call.apply(_super2, [this].concat(args));
|
|
331
|
+
|
|
332
|
+
_defineProperty(_assertThisInitialized(_this2), "productId", void 0);
|
|
333
|
+
|
|
334
|
+
_defineProperty(_assertThisInitialized(_this2), "cartId", void 0);
|
|
335
|
+
|
|
336
|
+
_defineProperty(_assertThisInitialized(_this2), "warehouses", void 0);
|
|
337
|
+
|
|
338
|
+
_defineProperty(_assertThisInitialized(_this2), "meta", void 0);
|
|
339
|
+
|
|
340
|
+
return _this2;
|
|
329
341
|
}
|
|
330
342
|
|
|
331
343
|
_createClass(AddToCartContext, [{
|
|
@@ -346,7 +358,7 @@ var AddToCartContext = /*#__PURE__*/function (_BaseCallClass) {
|
|
|
346
358
|
}]);
|
|
347
359
|
|
|
348
360
|
return AddToCartContext;
|
|
349
|
-
}(
|
|
361
|
+
}(ContextCallClass);
|
|
350
362
|
|
|
351
363
|
var BackofficeCatalog = /*#__PURE__*/function (_BaseCallClass) {
|
|
352
364
|
_inherits(BackofficeCatalog, _BaseCallClass);
|
|
@@ -976,7 +988,11 @@ var Sdk = /*#__PURE__*/function (_Events) {
|
|
|
976
988
|
_createClass(Sdk, [{
|
|
977
989
|
key: "initializeContextClass",
|
|
978
990
|
value: function initializeContextClass() {
|
|
979
|
-
|
|
991
|
+
if (this.contextClass) {
|
|
992
|
+
return new this.contextClass(this.callFunction.bind(this));
|
|
993
|
+
}
|
|
994
|
+
|
|
995
|
+
return {};
|
|
980
996
|
}
|
|
981
997
|
}, {
|
|
982
998
|
key: "initializeServiceGetters",
|