ordering-ui-admin-external 1.45.31 → 1.45.32
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/_bundles/{ordering-ui-admin.f43cfd0781b08b79d121.js → ordering-ui-admin.14763341a973397485ad.js} +2 -2
- package/_modules/components/Stores/BatchImageForm/index.js +4 -2
- package/_modules/components/Stores/BusinessProductsListing/index.js +2 -1
- package/_modules/components/Stores/ProductDetails/index.js +2 -1
- package/_modules/components/Stores/ProductDetatilsInformation/index.js +4 -3
- package/_modules/components/Stores/ProductMainDetails/index.js +2 -1
- package/package.json +1 -1
- package/src/components/Stores/BatchImageForm/index.js +2 -2
- package/src/components/Stores/BusinessProductsListing/index.js +1 -0
- package/src/components/Stores/ProductDetails/index.js +1 -0
- package/src/components/Stores/ProductDetatilsInformation/index.js +2 -2
- package/src/components/Stores/ProductMainDetails/index.js +1 -0
- /package/_bundles/{ordering-ui-admin.f43cfd0781b08b79d121.js.LICENSE.txt → ordering-ui-admin.14763341a973397485ad.js.LICENSE.txt} +0 -0
|
@@ -61,6 +61,7 @@ var BatchImageFormUI = function BatchImageFormUI(props) {
|
|
|
61
61
|
var validfiles = [];
|
|
62
62
|
if (files && files.length > 0) {
|
|
63
63
|
Object.values(files).forEach(function (f) {
|
|
64
|
+
var _ref;
|
|
64
65
|
var type = f.type.split('/')[0];
|
|
65
66
|
if (type !== 'image') {
|
|
66
67
|
setAlertState({
|
|
@@ -70,10 +71,11 @@ var BatchImageFormUI = function BatchImageFormUI(props) {
|
|
|
70
71
|
invalidfileNames.push(f === null || f === void 0 ? void 0 : f.name);
|
|
71
72
|
return;
|
|
72
73
|
}
|
|
73
|
-
if ((0, _utils.bytesConverter)(f.size) > 2048) {
|
|
74
|
+
if ((_ref = (0, _utils.bytesConverter)(f.size) > (props === null || props === void 0 ? void 0 : props.maxLimitImage)) !== null && _ref !== void 0 ? _ref : 2048) {
|
|
75
|
+
var _props$maxLimitImage;
|
|
74
76
|
setAlertState({
|
|
75
77
|
open: true,
|
|
76
|
-
content: [t('
|
|
78
|
+
content: [t('IMAGE_MAXIMUM_SIZE_MESSAGE', 'The maximum image size is _amount_ megabytes').replace('_amount_', ((_props$maxLimitImage = props === null || props === void 0 ? void 0 : props.maxLimitImage) !== null && _props$maxLimitImage !== void 0 ? _props$maxLimitImage : 2048) / 1024)]
|
|
77
79
|
});
|
|
78
80
|
invalidfileNames.push(f === null || f === void 0 ? void 0 : f.name);
|
|
79
81
|
return;
|
|
@@ -466,7 +466,8 @@ var BusinessProductsListingUI = function BusinessProductsListingUI(props) {
|
|
|
466
466
|
fees: fees,
|
|
467
467
|
setFees: setFees,
|
|
468
468
|
categoryState: categoryState,
|
|
469
|
-
handleUpdateCategoryState: handleUpdateCategoryState
|
|
469
|
+
handleUpdateCategoryState: handleUpdateCategoryState,
|
|
470
|
+
maxLimitImage: props === null || props === void 0 ? void 0 : props.maxLimitImage
|
|
470
471
|
}), openSidebar === 'business_details' && /*#__PURE__*/_react.default.createElement(_BusinessDetails.BusinessDetails, {
|
|
471
472
|
open: openSidebar === 'business_details',
|
|
472
473
|
businessId: (selectedBusiness === null || selectedBusiness === void 0 ? void 0 : selectedBusiness.id) || (businessState === null || businessState === void 0 || (_businessState$busine18 = businessState.business) === null || _businessState$busine18 === void 0 ? void 0 : _businessState$busine18.id),
|
|
@@ -180,7 +180,8 @@ var ProductDetailsUI = function ProductDetailsUI(props) {
|
|
|
180
180
|
setTaxes: setTaxes,
|
|
181
181
|
fees: fees,
|
|
182
182
|
setFees: setFees,
|
|
183
|
-
cleanFormState: cleanFormState
|
|
183
|
+
cleanFormState: cleanFormState,
|
|
184
|
+
maxLimitImage: props === null || props === void 0 ? void 0 : props.maxLimitImage
|
|
184
185
|
}), showOption === 'service_details' && /*#__PURE__*/_react.default.createElement(_ServiceDetail.ServiceDetail, {
|
|
185
186
|
product: productState === null || productState === void 0 ? void 0 : productState.product,
|
|
186
187
|
formState: formState,
|
|
@@ -80,7 +80,7 @@ var ProductDetatilsInformation = exports.ProductDetatilsInformation = function P
|
|
|
80
80
|
};
|
|
81
81
|
var handleFiles = function handleFiles(files) {
|
|
82
82
|
if (files.length === 1) {
|
|
83
|
-
var _files$;
|
|
83
|
+
var _ref, _files$;
|
|
84
84
|
var type = files[0].type.split('/')[0];
|
|
85
85
|
if (type !== 'image') {
|
|
86
86
|
setAlertState({
|
|
@@ -89,10 +89,11 @@ var ProductDetatilsInformation = exports.ProductDetatilsInformation = function P
|
|
|
89
89
|
});
|
|
90
90
|
return;
|
|
91
91
|
}
|
|
92
|
-
if ((0, _utils.bytesConverter)((_files$ = files[0]) === null || _files$ === void 0 ? void 0 : _files$.size) > 2048) {
|
|
92
|
+
if ((_ref = (0, _utils.bytesConverter)((_files$ = files[0]) === null || _files$ === void 0 ? void 0 : _files$.size) > (props === null || props === void 0 ? void 0 : props.maxLimitImage)) !== null && _ref !== void 0 ? _ref : 2048) {
|
|
93
|
+
var _props$maxLimitImage;
|
|
93
94
|
setAlertState({
|
|
94
95
|
open: true,
|
|
95
|
-
content: [t('
|
|
96
|
+
content: [t('IMAGE_MAXIMUM_SIZE_MESSAGE', 'The maximum image size is _amount_ megabytes').replace('_amount_', ((_props$maxLimitImage = props === null || props === void 0 ? void 0 : props.maxLimitImage) !== null && _props$maxLimitImage !== void 0 ? _props$maxLimitImage : 2048) / 1024)]
|
|
96
97
|
});
|
|
97
98
|
return;
|
|
98
99
|
}
|
|
@@ -97,7 +97,8 @@ var ProductMainDetails = exports.ProductMainDetails = function ProductMainDetail
|
|
|
97
97
|
handleChangeRibbon: handleChangeRibbon,
|
|
98
98
|
handleChangeInput: handleChangeInput,
|
|
99
99
|
handleChangeFormState: handleChangeFormState,
|
|
100
|
-
handleButtonUpdateClick: handleUpdateClick
|
|
100
|
+
handleButtonUpdateClick: handleUpdateClick,
|
|
101
|
+
maxLimitImage: props === null || props === void 0 ? void 0 : props.maxLimitImage
|
|
101
102
|
}), selectedOption === 'advanced' && /*#__PURE__*/_react.default.createElement(_ProductDetailsAdvanced.ProductDetailsAdvanced, {
|
|
102
103
|
product: product,
|
|
103
104
|
business: business,
|
package/package.json
CHANGED
|
@@ -67,10 +67,10 @@ const BatchImageFormUI = (props) => {
|
|
|
67
67
|
invalidfileNames.push(f?.name)
|
|
68
68
|
return
|
|
69
69
|
}
|
|
70
|
-
if (bytesConverter(f.size) > 2048) {
|
|
70
|
+
if (bytesConverter(f.size) > props?.maxLimitImage ?? 2048) {
|
|
71
71
|
setAlertState({
|
|
72
72
|
open: true,
|
|
73
|
-
content: [t('
|
|
73
|
+
content: [t('IMAGE_MAXIMUM_SIZE_MESSAGE', 'The maximum image size is _amount_ megabytes').replace('_amount_', (props?.maxLimitImage ?? 2048) / 1024)]
|
|
74
74
|
})
|
|
75
75
|
invalidfileNames.push(f?.name)
|
|
76
76
|
return
|
|
@@ -513,6 +513,7 @@ const BusinessProductsListingUI = (props) => {
|
|
|
513
513
|
setFees={setFees}
|
|
514
514
|
categoryState={categoryState}
|
|
515
515
|
handleUpdateCategoryState={handleUpdateCategoryState}
|
|
516
|
+
maxLimitImage={props?.maxLimitImage}
|
|
516
517
|
/>
|
|
517
518
|
)}
|
|
518
519
|
{openSidebar === 'business_details' && (
|
|
@@ -66,10 +66,10 @@ export const ProductDetatilsInformation = (props) => {
|
|
|
66
66
|
return
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
if (bytesConverter(files[0]?.size) > 2048) {
|
|
69
|
+
if (bytesConverter(files[0]?.size) > props?.maxLimitImage ?? 2048) {
|
|
70
70
|
setAlertState({
|
|
71
71
|
open: true,
|
|
72
|
-
content: [t('
|
|
72
|
+
content: [t('IMAGE_MAXIMUM_SIZE_MESSAGE', 'The maximum image size is _amount_ megabytes').replace('_amount_', (props?.maxLimitImage ?? 2048) / 1024)]
|
|
73
73
|
})
|
|
74
74
|
return
|
|
75
75
|
}
|
|
@@ -88,6 +88,7 @@ export const ProductMainDetails = (props) => {
|
|
|
88
88
|
handleChangeInput={handleChangeInput}
|
|
89
89
|
handleChangeFormState={handleChangeFormState}
|
|
90
90
|
handleButtonUpdateClick={handleUpdateClick}
|
|
91
|
+
maxLimitImage={props?.maxLimitImage}
|
|
91
92
|
/>
|
|
92
93
|
)}
|
|
93
94
|
{selectedOption === 'advanced' && (
|