@salesgenterp/ui-components 0.4.411 → 0.4.413
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 +37 -183
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +39 -185
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -623,142 +623,6 @@ var jsonParse = function jsonParse(value) {
|
|
|
623
623
|
}
|
|
624
624
|
return value;
|
|
625
625
|
};
|
|
626
|
-
var convertToBoolean = function convertToBoolean(value) {
|
|
627
|
-
return lodash.toNumber(value) === 1;
|
|
628
|
-
};
|
|
629
|
-
|
|
630
|
-
function useSystemFeatureList(_ref) {
|
|
631
|
-
var apiEndPoint = _ref.apiEndPoint,
|
|
632
|
-
token = _ref.token,
|
|
633
|
-
moduleName = _ref.moduleName,
|
|
634
|
-
listUpdate = _ref.listUpdate;
|
|
635
|
-
var _useState = React.useState(),
|
|
636
|
-
data = _useState[0],
|
|
637
|
-
setData = _useState[1];
|
|
638
|
-
var _useState2 = React.useState(false),
|
|
639
|
-
loading = _useState2[0],
|
|
640
|
-
setLoading = _useState2[1];
|
|
641
|
-
var _useState3 = React.useState(false),
|
|
642
|
-
error = _useState3[0],
|
|
643
|
-
setError = _useState3[1];
|
|
644
|
-
var _useState4 = React.useState(false),
|
|
645
|
-
status = _useState4[0],
|
|
646
|
-
setStatus = _useState4[1];
|
|
647
|
-
React.useEffect(function () {
|
|
648
|
-
(function () {
|
|
649
|
-
try {
|
|
650
|
-
var _temp2 = function () {
|
|
651
|
-
if (apiEndPoint && token) {
|
|
652
|
-
setError(false);
|
|
653
|
-
setStatus(null);
|
|
654
|
-
setLoading(true);
|
|
655
|
-
var _temp = _catch(function () {
|
|
656
|
-
return Promise.resolve(getSystemFeatureList({
|
|
657
|
-
apiEndPoint: apiEndPoint,
|
|
658
|
-
token: token,
|
|
659
|
-
moduleName: moduleName
|
|
660
|
-
})).then(function (modifyData) {
|
|
661
|
-
setData(modifyData);
|
|
662
|
-
setLoading(false);
|
|
663
|
-
});
|
|
664
|
-
}, function () {
|
|
665
|
-
setLoading(false);
|
|
666
|
-
setError(true);
|
|
667
|
-
setStatus(403);
|
|
668
|
-
});
|
|
669
|
-
if (_temp && _temp.then) return _temp.then(function () {});
|
|
670
|
-
}
|
|
671
|
-
}();
|
|
672
|
-
return _temp2 && _temp2.then ? _temp2.then(function () {}) : void 0;
|
|
673
|
-
} catch (e) {
|
|
674
|
-
Promise.reject(e);
|
|
675
|
-
}
|
|
676
|
-
})();
|
|
677
|
-
}, [moduleName, listUpdate]);
|
|
678
|
-
return {
|
|
679
|
-
systemFeatureList: data,
|
|
680
|
-
systemFeatureListLoading: loading,
|
|
681
|
-
error: error,
|
|
682
|
-
status: status
|
|
683
|
-
};
|
|
684
|
-
}
|
|
685
|
-
function useAllSystemFeatureValues(_ref4) {
|
|
686
|
-
var apiEndPoint = _ref4.apiEndPoint,
|
|
687
|
-
token = _ref4.token,
|
|
688
|
-
listUpdate = _ref4.listUpdate;
|
|
689
|
-
var _useState13 = React.useState(),
|
|
690
|
-
data = _useState13[0],
|
|
691
|
-
setData = _useState13[1];
|
|
692
|
-
var _useState14 = React.useState(false),
|
|
693
|
-
setLoading = _useState14[1];
|
|
694
|
-
var _useState15 = React.useState(false),
|
|
695
|
-
setError = _useState15[1];
|
|
696
|
-
var _useState16 = React.useState(false),
|
|
697
|
-
setStatus = _useState16[1];
|
|
698
|
-
var _useSystemFeatureList3 = useSystemFeatureList({
|
|
699
|
-
apiEndPoint: apiEndPoint,
|
|
700
|
-
token: token,
|
|
701
|
-
listUpdate: listUpdate
|
|
702
|
-
}),
|
|
703
|
-
systemFeatureListData = _useSystemFeatureList3.systemFeatureList;
|
|
704
|
-
React.useEffect(function () {
|
|
705
|
-
try {
|
|
706
|
-
if (apiEndPoint && token && systemFeatureListData) {
|
|
707
|
-
setError(false);
|
|
708
|
-
setStatus(null);
|
|
709
|
-
setLoading(true);
|
|
710
|
-
try {
|
|
711
|
-
var flattenData = function flattenData(data) {
|
|
712
|
-
return lodash.reduce(data, function (acc, item) {
|
|
713
|
-
acc = lodash.concat(acc, lodash.omit(item, 'systemFeatureList'));
|
|
714
|
-
if (item !== null && item !== void 0 && item.systemFeatureList) {
|
|
715
|
-
acc = lodash.concat(acc, flattenData(item === null || item === void 0 ? void 0 : item.systemFeatureList));
|
|
716
|
-
}
|
|
717
|
-
return acc;
|
|
718
|
-
}, []);
|
|
719
|
-
};
|
|
720
|
-
var flatArray = flattenData(systemFeatureListData);
|
|
721
|
-
var result = lodash.reduce(flatArray, function (acc, item) {
|
|
722
|
-
if (item !== null && item !== void 0 && item.featureName) {
|
|
723
|
-
acc[item === null || item === void 0 ? void 0 : item.featureName] = isNaN(item === null || item === void 0 ? void 0 : item.featureValue) ? item === null || item === void 0 ? void 0 : item.featureValue : Number(item === null || item === void 0 ? void 0 : item.featureValue) === 0 || Number(item === null || item === void 0 ? void 0 : item.featureValue) === 1 ? convertToBoolean(Number(item === null || item === void 0 ? void 0 : item.featureValue)) : Number(item === null || item === void 0 ? void 0 : item.featureValue);
|
|
724
|
-
}
|
|
725
|
-
return acc;
|
|
726
|
-
}, {});
|
|
727
|
-
setData(result);
|
|
728
|
-
setLoading(false);
|
|
729
|
-
} catch (e) {
|
|
730
|
-
setLoading(false);
|
|
731
|
-
setError(true);
|
|
732
|
-
setStatus(403);
|
|
733
|
-
}
|
|
734
|
-
}
|
|
735
|
-
} catch (e) {
|
|
736
|
-
Promise.reject(e);
|
|
737
|
-
}
|
|
738
|
-
}, [listUpdate, systemFeatureListData]);
|
|
739
|
-
return _extends({}, data);
|
|
740
|
-
}
|
|
741
|
-
var getSystemFeatureList = function getSystemFeatureList(_ref6) {
|
|
742
|
-
var apiEndPoint = _ref6.apiEndPoint,
|
|
743
|
-
token = _ref6.token,
|
|
744
|
-
moduleId = _ref6.moduleId,
|
|
745
|
-
moduleName = _ref6.moduleName;
|
|
746
|
-
try {
|
|
747
|
-
return Promise.resolve(API({
|
|
748
|
-
apiEndPoint: apiEndPoint,
|
|
749
|
-
token: token,
|
|
750
|
-
url: "/ecommerce/system/feature",
|
|
751
|
-
queryParams: {
|
|
752
|
-
moduleId: moduleId,
|
|
753
|
-
moduleName: moduleName
|
|
754
|
-
},
|
|
755
|
-
errorMessage: 'Error in getting System Feature.',
|
|
756
|
-
hideErrorMessage: true
|
|
757
|
-
}));
|
|
758
|
-
} catch (e) {
|
|
759
|
-
return Promise.reject(e);
|
|
760
|
-
}
|
|
761
|
-
};
|
|
762
626
|
|
|
763
627
|
var convertCamCaseToSnake = function convertCamCaseToSnake(child) {
|
|
764
628
|
var _Object$keys;
|
|
@@ -4330,18 +4194,23 @@ var StoreList = function StoreList(_ref) {
|
|
|
4330
4194
|
customer = _useState[0],
|
|
4331
4195
|
setCustomer = _useState[1];
|
|
4332
4196
|
React.useEffect(function () {
|
|
4333
|
-
|
|
4334
|
-
return
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
|
|
4341
|
-
|
|
4342
|
-
|
|
4343
|
-
|
|
4344
|
-
|
|
4197
|
+
(function () {
|
|
4198
|
+
return _catch(function () {
|
|
4199
|
+
var _temp = function () {
|
|
4200
|
+
if (apiEndPoint && token) {
|
|
4201
|
+
return Promise.resolve(API({
|
|
4202
|
+
apiEndPoint: apiEndPoint,
|
|
4203
|
+
token: token,
|
|
4204
|
+
url: "/ecommerce/customer",
|
|
4205
|
+
errorMessage: 'Error in getting user profile data.'
|
|
4206
|
+
})).then(function (data) {
|
|
4207
|
+
setCustomer(data);
|
|
4208
|
+
});
|
|
4209
|
+
}
|
|
4210
|
+
}();
|
|
4211
|
+
if (_temp && _temp.then) return _temp.then(function () {});
|
|
4212
|
+
}, function () {});
|
|
4213
|
+
})();
|
|
4345
4214
|
}, [token]);
|
|
4346
4215
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(StoreHeader, null, /*#__PURE__*/React__default.createElement("span", {
|
|
4347
4216
|
className: "manageStore"
|
|
@@ -4387,21 +4256,17 @@ var AccountDetails = function AccountDetails(_ref) {
|
|
|
4387
4256
|
sectionLeftImageSection = _ref.sectionLeftImageSection,
|
|
4388
4257
|
exploreCategoryImage = _ref.exploreCategoryImage,
|
|
4389
4258
|
sectionRightImageSection = _ref.sectionRightImageSection,
|
|
4390
|
-
discountImageSection = _ref.discountImageSection
|
|
4391
|
-
|
|
4392
|
-
|
|
4393
|
-
|
|
4394
|
-
|
|
4395
|
-
|
|
4396
|
-
|
|
4397
|
-
|
|
4398
|
-
|
|
4399
|
-
|
|
4400
|
-
|
|
4401
|
-
_useAllSystemFeatureV5 = _useAllSystemFeatureV.hideInvoiceActionOnAccount,
|
|
4402
|
-
hideInvoiceAction = _useAllSystemFeatureV5 === void 0 ? false : _useAllSystemFeatureV5,
|
|
4403
|
-
_useAllSystemFeatureV6 = _useAllSystemFeatureV.removeSocialLinksOnAccount,
|
|
4404
|
-
removeSocialLinks = _useAllSystemFeatureV6 === void 0 ? false : _useAllSystemFeatureV6;
|
|
4259
|
+
discountImageSection = _ref.discountImageSection,
|
|
4260
|
+
_ref$hideDiscountImag = _ref.hideDiscountImage,
|
|
4261
|
+
hideDiscountImage = _ref$hideDiscountImag === void 0 ? false : _ref$hideDiscountImag,
|
|
4262
|
+
_ref$hideBannerSectio = _ref.hideBannerSection,
|
|
4263
|
+
hideBannerSection = _ref$hideBannerSectio === void 0 ? false : _ref$hideBannerSectio,
|
|
4264
|
+
_ref$imgNotFoundUrl = _ref.imgNotFoundUrl,
|
|
4265
|
+
imgNotFoundUrl = _ref$imgNotFoundUrl === void 0 ? noImgAvailable$1 : _ref$imgNotFoundUrl,
|
|
4266
|
+
_ref$hideInvoiceActio = _ref.hideInvoiceAction,
|
|
4267
|
+
hideInvoiceAction = _ref$hideInvoiceActio === void 0 ? false : _ref$hideInvoiceActio,
|
|
4268
|
+
_ref$removeSocialLink = _ref.removeSocialLinks,
|
|
4269
|
+
removeSocialLinks = _ref$removeSocialLink === void 0 ? false : _ref$removeSocialLink;
|
|
4405
4270
|
serviceApiEndPoint = serviceApiEndPoint || (apiEndPoint === null || apiEndPoint === void 0 ? void 0 : apiEndPoint.replace('/api', '/services/pdf'));
|
|
4406
4271
|
var queryParams = searchQueryParams(window.location.search);
|
|
4407
4272
|
var isMobile = useMediaQuery('(max-width:768px)');
|
|
@@ -7243,13 +7108,8 @@ var CartPageComponent = function CartPageComponent(_ref) {
|
|
|
7243
7108
|
loading = _ref.loading,
|
|
7244
7109
|
imgnotfoundUrl = _ref.imgnotfoundUrl,
|
|
7245
7110
|
styles = _ref.styles,
|
|
7246
|
-
onChangeDiscountCoupon = _ref.onChangeDiscountCoupon
|
|
7247
|
-
|
|
7248
|
-
apiEndPoint: apiEndPoint,
|
|
7249
|
-
token: token
|
|
7250
|
-
}),
|
|
7251
|
-
_useAllSystemFeatureV2 = _useAllSystemFeatureV.disabledSelectAllProductOnCartPage,
|
|
7252
|
-
disabledSelectAllProductCheckbox = _useAllSystemFeatureV2 === void 0 ? false : _useAllSystemFeatureV2;
|
|
7111
|
+
onChangeDiscountCoupon = _ref.onChangeDiscountCoupon,
|
|
7112
|
+
disabledSelectAllProductCheckbox = _ref.disabledSelectAllProductCheckbox;
|
|
7253
7113
|
var _useState = React.useState([]),
|
|
7254
7114
|
storeData = _useState[0],
|
|
7255
7115
|
setStoreData = _useState[1];
|
|
@@ -12157,19 +12017,13 @@ var CheckoutPageComponent = function CheckoutPageComponent(_ref) {
|
|
|
12157
12017
|
handleLogin = _ref.handleLogin,
|
|
12158
12018
|
placeOrder = _ref.placeOrder,
|
|
12159
12019
|
clickRedirect = _ref.clickRedirect,
|
|
12160
|
-
shippingText = _ref.shippingText
|
|
12161
|
-
|
|
12162
|
-
|
|
12163
|
-
|
|
12164
|
-
|
|
12165
|
-
|
|
12166
|
-
|
|
12167
|
-
_useAllSystemFeatureV3 = _useAllSystemFeatureV.disabledPaymentOnMoreThanAmountOnCheckoutPage,
|
|
12168
|
-
disabledPaymentOnMoreThanAmount = _useAllSystemFeatureV3 === void 0 ? false : _useAllSystemFeatureV3,
|
|
12169
|
-
_useAllSystemFeatureV4 = _useAllSystemFeatureV.taxExemptOnCheckoutPage,
|
|
12170
|
-
taxExempt = _useAllSystemFeatureV4 === void 0 ? false : _useAllSystemFeatureV4,
|
|
12171
|
-
_useAllSystemFeatureV5 = _useAllSystemFeatureV.paymentWithPaypalOnCheckoutPage,
|
|
12172
|
-
paymentWithPaypal = _useAllSystemFeatureV5 === void 0 ? false : _useAllSystemFeatureV5;
|
|
12020
|
+
shippingText = _ref.shippingText,
|
|
12021
|
+
_ref$taxExempt = _ref.taxExempt,
|
|
12022
|
+
taxExempt = _ref$taxExempt === void 0 ? false : _ref$taxExempt,
|
|
12023
|
+
_ref$paymentWithPaypa = _ref.paymentWithPaypal,
|
|
12024
|
+
paymentWithPaypal = _ref$paymentWithPaypa === void 0 ? false : _ref$paymentWithPaypa,
|
|
12025
|
+
showShippingPriceRangeLimit = _ref.showShippingPriceRangeLimit,
|
|
12026
|
+
disabledPaymentOnMoreThanAmount = _ref.disabledPaymentOnMoreThanAmount;
|
|
12173
12027
|
var _useState = React.useState(false),
|
|
12174
12028
|
loginLoading = _useState[0],
|
|
12175
12029
|
setLoginLoading = _useState[1];
|