@salesgenterp/ui-components 0.4.521 → 0.4.522
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/dist/index.js +30 -71
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +30 -71
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8050,10 +8050,9 @@ var CartSummaryCheckBoxRow = styled__default(CartSummaryRow)(_templateObject8$4
|
|
|
8050
8050
|
});
|
|
8051
8051
|
|
|
8052
8052
|
var CartSummary = function CartSummary(_ref) {
|
|
8053
|
-
var
|
|
8053
|
+
var _cartSummary$input, _cartSummary$input2, _cartSummary$input3, _cartSummary$input4;
|
|
8054
8054
|
var apiEndPoint = _ref.apiEndPoint,
|
|
8055
8055
|
token = _ref.token,
|
|
8056
|
-
storeData = _ref.storeData,
|
|
8057
8056
|
selectedShipping = _ref.selectedShipping,
|
|
8058
8057
|
clickRedirect = _ref.clickRedirect,
|
|
8059
8058
|
subtotal = _ref.subtotal,
|
|
@@ -8067,9 +8066,6 @@ var CartSummary = function CartSummary(_ref) {
|
|
|
8067
8066
|
couponDiscountTotal = _ref.couponDiscountTotal,
|
|
8068
8067
|
totalCartQuantity = _ref.totalCartQuantity,
|
|
8069
8068
|
doNotShowPrice = _ref.doNotShowPrice;
|
|
8070
|
-
var storeIdList = (storeData === null || storeData === void 0 ? void 0 : (_storeData$map = storeData.map(function (data) {
|
|
8071
|
-
return data === null || data === void 0 ? void 0 : data.id;
|
|
8072
|
-
})) === null || _storeData$map === void 0 ? void 0 : _storeData$map.join(',')) || 2;
|
|
8073
8069
|
var cartSummary = styles === null || styles === void 0 ? void 0 : styles.cartSummary;
|
|
8074
8070
|
var Btn = styles === null || styles === void 0 ? void 0 : styles.Btn;
|
|
8075
8071
|
var _useState = React.useState(false),
|
|
@@ -8284,18 +8280,15 @@ var CartPageComponent = function CartPageComponent(_ref) {
|
|
|
8284
8280
|
_useAllSystemFeatureV2 = _useAllSystemFeatureV.disabledSelectAllProductOnCartPage,
|
|
8285
8281
|
disabledSelectAllProductCheckbox = _useAllSystemFeatureV2 === void 0 ? false : _useAllSystemFeatureV2,
|
|
8286
8282
|
allowToProcessInvoiceForOutOfStockProductsEcommerce = _useAllSystemFeatureV.allowToProcessInvoiceForOutOfStockProductsEcommerce;
|
|
8287
|
-
var _useState = React.useState([]),
|
|
8288
|
-
storeData = _useState[0],
|
|
8289
|
-
setStoreData = _useState[1];
|
|
8290
8283
|
var _useWindowSize = useWindowSize(),
|
|
8291
8284
|
width = _useWindowSize.width;
|
|
8292
8285
|
var retail = width <= 768;
|
|
8293
|
-
var
|
|
8294
|
-
discountCoupons =
|
|
8295
|
-
setDiscountCoupons =
|
|
8296
|
-
var
|
|
8297
|
-
customer =
|
|
8298
|
-
setCustomer =
|
|
8286
|
+
var _useState = React.useState([]),
|
|
8287
|
+
discountCoupons = _useState[0],
|
|
8288
|
+
setDiscountCoupons = _useState[1];
|
|
8289
|
+
var _useState2 = React.useState(),
|
|
8290
|
+
customer = _useState2[0],
|
|
8291
|
+
setCustomer = _useState2[1];
|
|
8299
8292
|
var couponDiscountTotal = lodash.sumBy(discountCoupons, 'amount');
|
|
8300
8293
|
React.useEffect(function () {
|
|
8301
8294
|
(function () {
|
|
@@ -8303,29 +8296,6 @@ var CartPageComponent = function CartPageComponent(_ref) {
|
|
|
8303
8296
|
var _temp2 = function () {
|
|
8304
8297
|
if (apiEndPoint && token) {
|
|
8305
8298
|
var _temp = _catch(function () {
|
|
8306
|
-
return Promise.resolve(API({
|
|
8307
|
-
apiEndPoint: apiEndPoint,
|
|
8308
|
-
token: token,
|
|
8309
|
-
url: "/store"
|
|
8310
|
-
})).then(function (data) {
|
|
8311
|
-
setStoreData(data);
|
|
8312
|
-
});
|
|
8313
|
-
}, function () {});
|
|
8314
|
-
if (_temp && _temp.then) return _temp.then(function () {});
|
|
8315
|
-
}
|
|
8316
|
-
}();
|
|
8317
|
-
return _temp2 && _temp2.then ? _temp2.then(function () {}) : void 0;
|
|
8318
|
-
} catch (e) {
|
|
8319
|
-
Promise.reject(e);
|
|
8320
|
-
}
|
|
8321
|
-
})();
|
|
8322
|
-
}, []);
|
|
8323
|
-
React.useEffect(function () {
|
|
8324
|
-
(function () {
|
|
8325
|
-
try {
|
|
8326
|
-
var _temp4 = function () {
|
|
8327
|
-
if (apiEndPoint && token) {
|
|
8328
|
-
var _temp3 = _catch(function () {
|
|
8329
8299
|
return Promise.resolve(API({
|
|
8330
8300
|
apiEndPoint: apiEndPoint,
|
|
8331
8301
|
token: token,
|
|
@@ -8335,10 +8305,10 @@ var CartPageComponent = function CartPageComponent(_ref) {
|
|
|
8335
8305
|
setCustomer(data);
|
|
8336
8306
|
});
|
|
8337
8307
|
}, function () {});
|
|
8338
|
-
if (
|
|
8308
|
+
if (_temp && _temp.then) return _temp.then(function () {});
|
|
8339
8309
|
}
|
|
8340
8310
|
}();
|
|
8341
|
-
return
|
|
8311
|
+
return _temp2 && _temp2.then ? _temp2.then(function () {}) : void 0;
|
|
8342
8312
|
} catch (e) {
|
|
8343
8313
|
Promise.reject(e);
|
|
8344
8314
|
}
|
|
@@ -8347,12 +8317,12 @@ var CartPageComponent = function CartPageComponent(_ref) {
|
|
|
8347
8317
|
React.useEffect(function () {
|
|
8348
8318
|
(function () {
|
|
8349
8319
|
try {
|
|
8350
|
-
var
|
|
8320
|
+
var _temp3 = function () {
|
|
8351
8321
|
if (customer) {
|
|
8352
8322
|
return Promise.resolve(getDiscountList()).then(function () {});
|
|
8353
8323
|
}
|
|
8354
8324
|
}();
|
|
8355
|
-
return
|
|
8325
|
+
return _temp3 && _temp3.then ? _temp3.then(function () {}) : void 0;
|
|
8356
8326
|
} catch (e) {
|
|
8357
8327
|
Promise.reject(e);
|
|
8358
8328
|
}
|
|
@@ -8364,9 +8334,9 @@ var CartPageComponent = function CartPageComponent(_ref) {
|
|
|
8364
8334
|
inDebounce = setTimeout(function () {
|
|
8365
8335
|
(function () {
|
|
8366
8336
|
try {
|
|
8367
|
-
var
|
|
8337
|
+
var _temp5 = function () {
|
|
8368
8338
|
if (apiEndPoint && token) {
|
|
8369
|
-
var
|
|
8339
|
+
var _temp4 = _catch(function () {
|
|
8370
8340
|
return Promise.resolve(getCartDiscountList({
|
|
8371
8341
|
apiEndPoint: apiEndPoint,
|
|
8372
8342
|
token: token
|
|
@@ -8374,10 +8344,10 @@ var CartPageComponent = function CartPageComponent(_ref) {
|
|
|
8374
8344
|
setDiscountCoupons(data);
|
|
8375
8345
|
});
|
|
8376
8346
|
}, function () {});
|
|
8377
|
-
if (
|
|
8347
|
+
if (_temp4 && _temp4.then) return _temp4.then(function () {});
|
|
8378
8348
|
}
|
|
8379
8349
|
}();
|
|
8380
|
-
return
|
|
8350
|
+
return _temp5 && _temp5.then ? _temp5.then(function () {}) : void 0;
|
|
8381
8351
|
} catch (e) {
|
|
8382
8352
|
Promise.reject(e);
|
|
8383
8353
|
}
|
|
@@ -8390,11 +8360,11 @@ var CartPageComponent = function CartPageComponent(_ref) {
|
|
|
8390
8360
|
};
|
|
8391
8361
|
var onUpdateDiscountCoupon = function onUpdateDiscountCoupon() {
|
|
8392
8362
|
try {
|
|
8393
|
-
var
|
|
8363
|
+
var _temp6 = function _temp6(_onChangeDiscountCoup) {
|
|
8394
8364
|
_onChangeDiscountCoup;
|
|
8395
8365
|
return Promise.resolve(getDiscountList()).then(function () {});
|
|
8396
8366
|
};
|
|
8397
|
-
return Promise.resolve(onChangeDiscountCoupon ? Promise.resolve(onChangeDiscountCoupon()).then(
|
|
8367
|
+
return Promise.resolve(onChangeDiscountCoupon ? Promise.resolve(onChangeDiscountCoupon()).then(_temp6) : _temp6(onChangeDiscountCoupon));
|
|
8398
8368
|
} catch (e) {
|
|
8399
8369
|
return Promise.reject(e);
|
|
8400
8370
|
}
|
|
@@ -8443,7 +8413,6 @@ var CartPageComponent = function CartPageComponent(_ref) {
|
|
|
8443
8413
|
}), /*#__PURE__*/React__default.createElement(CartSummary, {
|
|
8444
8414
|
apiEndPoint: apiEndPoint,
|
|
8445
8415
|
token: token,
|
|
8446
|
-
storeData: storeData,
|
|
8447
8416
|
retail: retail,
|
|
8448
8417
|
shippingData: shippingData,
|
|
8449
8418
|
selectedShipping: selectedShipping,
|
|
@@ -10202,41 +10171,31 @@ var APIStaticPage = function APIStaticPage(_ref) {
|
|
|
10202
10171
|
staticPage = _useState3[0],
|
|
10203
10172
|
setStaticPage = _useState3[1];
|
|
10204
10173
|
var _useState4 = React.useState(''),
|
|
10205
|
-
logoUrl = _useState4[0]
|
|
10206
|
-
setLogoUrl = _useState4[1];
|
|
10174
|
+
logoUrl = _useState4[0];
|
|
10207
10175
|
React.useEffect(function () {
|
|
10208
10176
|
if (apiEndPoint || pageData) {
|
|
10209
10177
|
(function () {
|
|
10210
10178
|
try {
|
|
10211
|
-
var
|
|
10179
|
+
var _temp5 = function _temp5() {
|
|
10212
10180
|
setLoading(false);
|
|
10213
10181
|
};
|
|
10214
10182
|
setLoading(true);
|
|
10215
|
-
var
|
|
10216
|
-
var
|
|
10183
|
+
var _temp4 = _catch(function () {
|
|
10184
|
+
var _temp3 = function () {
|
|
10217
10185
|
if (id || pageData || alias) {
|
|
10218
|
-
var
|
|
10186
|
+
var _temp2 = function _temp2() {
|
|
10187
|
+
var _response, _response$title, _response2, _response2$urlAlias;
|
|
10219
10188
|
if (pageData) {
|
|
10220
10189
|
response = pageData;
|
|
10221
10190
|
}
|
|
10222
10191
|
setStaticPage(response);
|
|
10223
10192
|
setContactUsForm(false);
|
|
10224
|
-
|
|
10225
|
-
|
|
10226
|
-
|
|
10227
|
-
apiEndPoint: apiEndPoint,
|
|
10228
|
-
url: "/store"
|
|
10229
|
-
})).then(function (storeData) {
|
|
10230
|
-
var _storeData$;
|
|
10231
|
-
setContactUsForm(true);
|
|
10232
|
-
setLogoUrl((storeData === null || storeData === void 0 ? void 0 : (_storeData$ = storeData[0]) === null || _storeData$ === void 0 ? void 0 : _storeData$.logoUrl) || '');
|
|
10233
|
-
});
|
|
10234
|
-
}
|
|
10235
|
-
}();
|
|
10236
|
-
if (_temp && _temp.then) return _temp.then(function () {});
|
|
10193
|
+
if (((_response = response) === null || _response === void 0 ? void 0 : (_response$title = _response.title) === null || _response$title === void 0 ? void 0 : _response$title.toLowerCase()) === 'contact us' || ((_response2 = response) === null || _response2 === void 0 ? void 0 : (_response2$urlAlias = _response2.urlAlias) === null || _response2$urlAlias === void 0 ? void 0 : _response2$urlAlias.toLowerCase()) === 'contact-us') {
|
|
10194
|
+
setContactUsForm(true);
|
|
10195
|
+
}
|
|
10237
10196
|
};
|
|
10238
10197
|
var response;
|
|
10239
|
-
var
|
|
10198
|
+
var _temp = function () {
|
|
10240
10199
|
if (id || alias) {
|
|
10241
10200
|
return Promise.resolve(API({
|
|
10242
10201
|
apiEndPoint: apiEndPoint,
|
|
@@ -10250,12 +10209,12 @@ var APIStaticPage = function APIStaticPage(_ref) {
|
|
|
10250
10209
|
});
|
|
10251
10210
|
}
|
|
10252
10211
|
}();
|
|
10253
|
-
return
|
|
10212
|
+
return _temp && _temp.then ? _temp.then(_temp2) : _temp2(_temp);
|
|
10254
10213
|
}
|
|
10255
10214
|
}();
|
|
10256
|
-
if (
|
|
10215
|
+
if (_temp3 && _temp3.then) return _temp3.then(function () {});
|
|
10257
10216
|
}, function () {});
|
|
10258
|
-
return
|
|
10217
|
+
return _temp4 && _temp4.then ? _temp4.then(_temp5) : _temp5(_temp4);
|
|
10259
10218
|
} catch (e) {
|
|
10260
10219
|
Promise.reject(e);
|
|
10261
10220
|
}
|