@one-commerce/sdk-core 1.17.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 +23 -2
- 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 +23 -2
- 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} +2 -2
- package/lib/cjs/backoffice/services.js.map +1 -0
- package/lib/cjs/index.js +26 -16
- 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 -2
- package/lib/esm/backoffice/services.js.map +1 -0
- package/lib/esm/index.js +12 -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 -2
- package/lib/types/backoffice/services.d.ts.map +1 -0
- package/lib/types/index.d.ts +10 -2
- 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
|
@@ -213,7 +213,18 @@ exports.Errors = exports.Message = void 0;
|
|
|
213
213
|
|
|
214
214
|
var api = {};
|
|
215
215
|
|
|
216
|
-
|
|
216
|
+
(function (exports) {
|
|
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));
|
|
217
228
|
|
|
218
229
|
(function (exports) {
|
|
219
230
|
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
@@ -851,6 +862,8 @@ var Sdk = /*#__PURE__*/function (_Events) {
|
|
|
851
862
|
|
|
852
863
|
_defineProperty(_assertThisInitialized(_this), "instances", void 0);
|
|
853
864
|
|
|
865
|
+
_defineProperty(_assertThisInitialized(_this), "contextClass", void 0);
|
|
866
|
+
|
|
854
867
|
_this.initializeServiceGetters();
|
|
855
868
|
|
|
856
869
|
_this.origin = options.origin;
|
|
@@ -914,6 +927,11 @@ var Sdk = /*#__PURE__*/function (_Events) {
|
|
|
914
927
|
}
|
|
915
928
|
|
|
916
929
|
_createClass(Sdk, [{
|
|
930
|
+
key: "initializeContextClass",
|
|
931
|
+
value: function initializeContextClass() {
|
|
932
|
+
return new this.contextClass(this.callFunction.bind(this));
|
|
933
|
+
}
|
|
934
|
+
}, {
|
|
917
935
|
key: "initializeServiceGetters",
|
|
918
936
|
value: function initializeServiceGetters() {
|
|
919
937
|
var _this2 = this;
|
|
@@ -973,6 +991,8 @@ var Sdk = /*#__PURE__*/function (_Events) {
|
|
|
973
991
|
if (typeof options.autoheight !== 'undefined') {
|
|
974
992
|
this.autoheight = options.autoheight;
|
|
975
993
|
}
|
|
994
|
+
|
|
995
|
+
this.contextClass = options.context;
|
|
976
996
|
}
|
|
977
997
|
}
|
|
978
998
|
}, {
|
|
@@ -1072,7 +1092,8 @@ var BackofficeSdk = /*#__PURE__*/function (_Sdk) {
|
|
|
1072
1092
|
layout: new BackofficeLayout(_this5.callFunction.bind(_assertThisInitialized(_this5))),
|
|
1073
1093
|
authorization: new BackofficeAuthorization(_this5.callFunction.bind(_assertThisInitialized(_this5))),
|
|
1074
1094
|
customer: new BackofficeCustomer(_this5.callFunction.bind(_assertThisInitialized(_this5))),
|
|
1075
|
-
plugin: new BackofficePlugin(_this5.callFunction.bind(_assertThisInitialized(_this5)))
|
|
1095
|
+
plugin: new BackofficePlugin(_this5.callFunction.bind(_assertThisInitialized(_this5))),
|
|
1096
|
+
context: _this5.initializeContextClass()
|
|
1076
1097
|
});
|
|
1077
1098
|
|
|
1078
1099
|
return _this5;
|