@one-commerce/sdk-core 1.18.0-alpha.0 → 1.19.0-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 +22 -48
- 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 +22 -48
- 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 +84 -0
- package/lib/cjs/backoffice/context.js.map +1 -0
- package/lib/cjs/{backofficeServices.js → backoffice/services.js} +3 -52
- package/lib/cjs/backoffice/services.js.map +1 -0
- package/lib/cjs/index.js +26 -17
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/{shopServices.js → shop/services.js} +2 -2
- package/lib/cjs/shop/services.js.map +1 -0
- package/lib/esm/backoffice/context.js +31 -0
- package/lib/esm/backoffice/context.js.map +1 -0
- package/lib/esm/{backofficeServices.js → backoffice/services.js} +2 -28
- package/lib/esm/backoffice/services.js.map +1 -0
- package/lib/esm/index.js +11 -3
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/{shopServices.js → shop/services.js} +2 -2
- package/lib/esm/shop/services.js.map +1 -0
- package/lib/types/backoffice/context.d.ts +13 -0
- package/lib/types/backoffice/context.d.ts.map +1 -0
- package/lib/types/{backofficeServices.d.ts → backoffice/services.d.ts} +2 -11
- package/lib/types/backoffice/services.d.ts.map +1 -0
- package/lib/types/index.d.ts +10 -4
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/{shopServices.d.ts → shop/services.d.ts} +2 -2
- package/lib/types/{shopServices.d.ts.map → shop/services.d.ts.map} +1 -1
- package/package.json +3 -3
- package/lib/cjs/backofficeServices.js.map +0 -1
- package/lib/cjs/shopServices.js.map +0 -1
- package/lib/esm/backofficeServices.js.map +0 -1
- package/lib/esm/shopServices.js.map +0 -1
- package/lib/types/backofficeServices.d.ts.map +0 -1
|
@@ -219,7 +219,18 @@
|
|
|
219
219
|
|
|
220
220
|
var api = {};
|
|
221
221
|
|
|
222
|
-
|
|
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));
|
|
223
234
|
|
|
224
235
|
(function (exports) {
|
|
225
236
|
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
@@ -525,52 +536,6 @@
|
|
|
525
536
|
|
|
526
537
|
return _createClass(BackofficePlugin);
|
|
527
538
|
}(BaseCallClass);
|
|
528
|
-
var BackofficeAddToCartContext = /*#__PURE__*/function (_BaseCallClass9) {
|
|
529
|
-
_inherits(BackofficeAddToCartContext, _BaseCallClass9);
|
|
530
|
-
|
|
531
|
-
var _super9 = _createSuper(BackofficeAddToCartContext);
|
|
532
|
-
|
|
533
|
-
function BackofficeAddToCartContext() {
|
|
534
|
-
var _this9;
|
|
535
|
-
|
|
536
|
-
_classCallCheck(this, BackofficeAddToCartContext);
|
|
537
|
-
|
|
538
|
-
for (var _len9 = arguments.length, args = new Array(_len9), _key9 = 0; _key9 < _len9; _key9++) {
|
|
539
|
-
args[_key9] = arguments[_key9];
|
|
540
|
-
}
|
|
541
|
-
|
|
542
|
-
_this9 = _super9.call.apply(_super9, [this].concat(args));
|
|
543
|
-
|
|
544
|
-
_defineProperty(_assertThisInitialized(_this9), "serviceName", 'addToCartContext');
|
|
545
|
-
|
|
546
|
-
_defineProperty(_assertThisInitialized(_this9), "productId", void 0);
|
|
547
|
-
|
|
548
|
-
_defineProperty(_assertThisInitialized(_this9), "cartId", void 0);
|
|
549
|
-
|
|
550
|
-
_defineProperty(_assertThisInitialized(_this9), "warehouses", void 0);
|
|
551
|
-
|
|
552
|
-
return _this9;
|
|
553
|
-
}
|
|
554
|
-
|
|
555
|
-
_createClass(BackofficeAddToCartContext, [{
|
|
556
|
-
key: "closePlugin",
|
|
557
|
-
value: function closePlugin() {
|
|
558
|
-
this.call('closePlugin');
|
|
559
|
-
}
|
|
560
|
-
}, {
|
|
561
|
-
key: "closePluginAndAddToCart",
|
|
562
|
-
value: function closePluginAndAddToCart() {
|
|
563
|
-
this.call('closePluginAndAddToCart');
|
|
564
|
-
}
|
|
565
|
-
}, {
|
|
566
|
-
key: "closePluginAndRefreshCart",
|
|
567
|
-
value: function closePluginAndRefreshCart() {
|
|
568
|
-
this.call('closePluginAndRefreshCart');
|
|
569
|
-
}
|
|
570
|
-
}]);
|
|
571
|
-
|
|
572
|
-
return BackofficeAddToCartContext;
|
|
573
|
-
}(BaseCallClass);
|
|
574
539
|
|
|
575
540
|
var Events = /*#__PURE__*/function () {
|
|
576
541
|
function Events() {
|
|
@@ -903,6 +868,8 @@
|
|
|
903
868
|
|
|
904
869
|
_defineProperty(_assertThisInitialized(_this), "instances", void 0);
|
|
905
870
|
|
|
871
|
+
_defineProperty(_assertThisInitialized(_this), "contextClass", void 0);
|
|
872
|
+
|
|
906
873
|
_this.initializeServiceGetters();
|
|
907
874
|
|
|
908
875
|
_this.origin = options.origin;
|
|
@@ -966,6 +933,11 @@
|
|
|
966
933
|
}
|
|
967
934
|
|
|
968
935
|
_createClass(Sdk, [{
|
|
936
|
+
key: "initializeContextClass",
|
|
937
|
+
value: function initializeContextClass() {
|
|
938
|
+
return new this.contextClass(this.callFunction.bind(this));
|
|
939
|
+
}
|
|
940
|
+
}, {
|
|
969
941
|
key: "initializeServiceGetters",
|
|
970
942
|
value: function initializeServiceGetters() {
|
|
971
943
|
var _this2 = this;
|
|
@@ -1025,6 +997,8 @@
|
|
|
1025
997
|
if (typeof options.autoheight !== 'undefined') {
|
|
1026
998
|
this.autoheight = options.autoheight;
|
|
1027
999
|
}
|
|
1000
|
+
|
|
1001
|
+
this.contextClass = options.context;
|
|
1028
1002
|
}
|
|
1029
1003
|
}
|
|
1030
1004
|
}, {
|
|
@@ -1125,7 +1099,7 @@
|
|
|
1125
1099
|
authorization: new BackofficeAuthorization(_this5.callFunction.bind(_assertThisInitialized(_this5))),
|
|
1126
1100
|
customer: new BackofficeCustomer(_this5.callFunction.bind(_assertThisInitialized(_this5))),
|
|
1127
1101
|
plugin: new BackofficePlugin(_this5.callFunction.bind(_assertThisInitialized(_this5))),
|
|
1128
|
-
|
|
1102
|
+
context: _this5.initializeContextClass()
|
|
1129
1103
|
});
|
|
1130
1104
|
|
|
1131
1105
|
return _this5;
|