@one-commerce/sdk-backoffice-vue3 1.19.0-alpha.0 → 1.19.3-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.
@@ -17,7 +17,7 @@ function _objectSpread2(target) {
17
17
  for (var i = 1; i < arguments.length; i++) {
18
18
  var source = null != arguments[i] ? arguments[i] : {};
19
19
  i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
20
- _defineProperty$4(target, key, source[key]);
20
+ _defineProperty$5(target, key, source[key]);
21
21
  }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
22
22
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
23
23
  });
@@ -26,7 +26,7 @@ function _objectSpread2(target) {
26
26
  return target;
27
27
  }
28
28
 
29
- function _defineProperty$4(obj, key, value) {
29
+ function _defineProperty$5(obj, key, value) {
30
30
  if (key in obj) {
31
31
  Object.defineProperty(obj, key, {
32
32
  value: value,
@@ -73,18 +73,7 @@ exports.Errors = exports.Message = void 0;
73
73
 
74
74
  var api = {};
75
75
 
76
- (function (exports) {
77
- Object.defineProperty(exports, "__esModule", { value: true });
78
- exports.Backoffice = void 0;
79
- (function (Backoffice) {
80
- (function (Context) {
81
- (function (AvailableContext) {
82
- AvailableContext["ADD_TO_CART"] = "backofficeAddToCart";
83
- })(Context.AvailableContext || (Context.AvailableContext = {}));
84
- })(Backoffice.Context || (Backoffice.Context = {}));
85
- })(exports.Backoffice || (exports.Backoffice = {}));
86
-
87
- }(api));
76
+ Object.defineProperty(api, "__esModule", { value: true });
88
77
 
89
78
  (function (exports) {
90
79
  var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
@@ -111,7 +100,7 @@ var lib = {exports: {}};
111
100
 
112
101
  var Channel = /*@__PURE__*/getDefaultExportFromCjs(lib.exports);
113
102
 
114
- function _defineProperty$3(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; }
103
+ function _defineProperty$4(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; }
115
104
 
116
105
  const dec2hex = dec => {
117
106
  return dec.toString(16).padStart(2, "0");
@@ -125,9 +114,9 @@ function generateCallId() {
125
114
  }
126
115
  class BaseCallClass {
127
116
  constructor(call) {
128
- _defineProperty$3(this, "serviceName", '');
117
+ _defineProperty$4(this, "serviceName", '');
129
118
 
130
- _defineProperty$3(this, "call", void 0);
119
+ _defineProperty$4(this, "call", void 0);
131
120
 
132
121
  this.call = (fun, ...arg) => {
133
122
  return call(this.serviceName, fun, ...arg);
@@ -150,6 +139,44 @@ class BaseCallClass {
150
139
 
151
140
  }
152
141
 
142
+ function _defineProperty$3(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; }
143
+
144
+ class ContextCallClass extends BaseCallClass {
145
+ constructor(...args) {
146
+ super(...args);
147
+
148
+ _defineProperty$3(this, "serviceName", 'context');
149
+ }
150
+
151
+ }
152
+
153
+ class AddToCartContext extends ContextCallClass {
154
+ constructor(...args) {
155
+ super(...args);
156
+
157
+ _defineProperty$3(this, "productId", void 0);
158
+
159
+ _defineProperty$3(this, "cartId", void 0);
160
+
161
+ _defineProperty$3(this, "warehouses", void 0);
162
+
163
+ _defineProperty$3(this, "meta", void 0);
164
+ }
165
+
166
+ closePlugin() {
167
+ return this.call('closePlugin');
168
+ }
169
+
170
+ closePluginAndAddToCart() {
171
+ return this.call('closePluginAndAddToCart');
172
+ }
173
+
174
+ closePluginAndRefreshCart() {
175
+ return this.call('closePluginAndRefreshCart');
176
+ }
177
+
178
+ }
179
+
153
180
  function _defineProperty$2(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; }
154
181
  class BackofficeCatalog extends BaseCallClass {
155
182
  constructor(...args) {
@@ -545,5 +572,5 @@ var index = {
545
572
  }
546
573
  };
547
574
 
548
- export { index as default, useOneSdk };
575
+ export { AddToCartContext, index as default, useOneSdk };
549
576
  //# sourceMappingURL=bundle.esm.js.map