ordering-ui-external 2.5.6 → 2.5.7
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/{7.ordering-ui.85a2550014dbd4b103c6.js → 7.ordering-ui.57cbcaf0252f6e022f93.js} +1 -1
- package/_bundles/{ordering-ui.85a2550014dbd4b103c6.js → ordering-ui.57cbcaf0252f6e022f93.js} +2 -2
- package/_modules/themes/five/src/components/AddressForm/index.js +8 -6
- package/package.json +2 -2
- package/src/themes/five/src/components/AddressForm/index.js +2 -0
- /package/_bundles/{0.ordering-ui.85a2550014dbd4b103c6.js → 0.ordering-ui.57cbcaf0252f6e022f93.js} +0 -0
- /package/_bundles/{1.ordering-ui.85a2550014dbd4b103c6.js → 1.ordering-ui.57cbcaf0252f6e022f93.js} +0 -0
- /package/_bundles/{2.ordering-ui.85a2550014dbd4b103c6.js → 2.ordering-ui.57cbcaf0252f6e022f93.js} +0 -0
- /package/_bundles/{4.ordering-ui.85a2550014dbd4b103c6.js → 4.ordering-ui.57cbcaf0252f6e022f93.js} +0 -0
- /package/_bundles/{5.ordering-ui.85a2550014dbd4b103c6.js → 5.ordering-ui.57cbcaf0252f6e022f93.js} +0 -0
- /package/_bundles/{6.ordering-ui.85a2550014dbd4b103c6.js → 6.ordering-ui.57cbcaf0252f6e022f93.js} +0 -0
- /package/_bundles/{7.ordering-ui.85a2550014dbd4b103c6.js.LICENSE.txt → 7.ordering-ui.57cbcaf0252f6e022f93.js.LICENSE.txt} +0 -0
- /package/_bundles/{8.ordering-ui.85a2550014dbd4b103c6.js → 8.ordering-ui.57cbcaf0252f6e022f93.js} +0 -0
- /package/_bundles/{9.ordering-ui.85a2550014dbd4b103c6.js → 9.ordering-ui.57cbcaf0252f6e022f93.js} +0 -0
- /package/_bundles/{ordering-ui.85a2550014dbd4b103c6.js.LICENSE.txt → ordering-ui.57cbcaf0252f6e022f93.js.LICENSE.txt} +0 -0
|
@@ -49,7 +49,7 @@ var inputNames = [{
|
|
|
49
49
|
code: 'Address notes'
|
|
50
50
|
}];
|
|
51
51
|
var AddressFormUI = function AddressFormUI(props) {
|
|
52
|
-
var _addressState$address, _ref, _formState$changes$ad, _formState$changes, _addressState$address2, _addressState$address3, _addressState$address4, _formState$changes$lo, _formState$changes2, _orderingTheme$
|
|
52
|
+
var _addressState$address, _ref, _formState$changes$ad, _formState$changes, _addressState$address2, _addressState$address3, _orderingTheme$theme, _orderingTheme$theme$, _orderingTheme$theme$2, _orderingTheme$theme$3, _orderingTheme$theme$4, _addressState$address4, _formState$changes$lo, _formState$changes2, _orderingTheme$theme2, _orderingTheme$theme3, _orderingTheme$theme4, _orderingTheme$theme5, _orderingTheme$theme6, _orderingTheme$theme7, _orderingTheme$theme8, _orderingTheme$theme9, _configState$configs, _configState$configs$, _configState$configs2, _configState$configs3, _configState$configs4, _configState$configs5, _configState$configs6, _configState$configs7, _props$beforeElements, _props$beforeComponen, _props$beforeMidEleme, _props$beforeMidCompo, _props$afterMidElemen, _props$afterMidCompon, _orderState$options6, _orderState$options6$, _props$afterComponent, _props$afterElements;
|
|
53
53
|
var addressesList = props.addressesList,
|
|
54
54
|
googleMapsControls = props.googleMapsControls,
|
|
55
55
|
formState = props.formState,
|
|
@@ -106,12 +106,13 @@ var AddressFormUI = function AddressFormUI(props) {
|
|
|
106
106
|
firstLocationNoEdit = _useState10[0],
|
|
107
107
|
setFirstLocationNoEdit = _useState10[1];
|
|
108
108
|
var isEditing = !!((_addressState$address3 = addressState.address) !== null && _addressState$address3 !== void 0 && _addressState$address3.id);
|
|
109
|
+
var isChew = (orderingTheme === null || orderingTheme === void 0 ? void 0 : (_orderingTheme$theme = orderingTheme.theme) === null || _orderingTheme$theme === void 0 ? void 0 : (_orderingTheme$theme$ = _orderingTheme$theme.header) === null || _orderingTheme$theme$ === void 0 ? void 0 : (_orderingTheme$theme$2 = _orderingTheme$theme$.components) === null || _orderingTheme$theme$2 === void 0 ? void 0 : (_orderingTheme$theme$3 = _orderingTheme$theme$2.layout) === null || _orderingTheme$theme$3 === void 0 ? void 0 : (_orderingTheme$theme$4 = _orderingTheme$theme$3.type) === null || _orderingTheme$theme$4 === void 0 ? void 0 : _orderingTheme$theme$4.toLowerCase()) === 'chew';
|
|
109
110
|
var _useState11 = (0, _react.useState)(isEditing ? addressState === null || addressState === void 0 ? void 0 : (_addressState$address4 = addressState.address) === null || _addressState$address4 === void 0 ? void 0 : _addressState$address4.location : (_formState$changes$lo = (_formState$changes2 = formState.changes) === null || _formState$changes2 === void 0 ? void 0 : _formState$changes2.location) !== null && _formState$changes$lo !== void 0 ? _formState$changes$lo : null),
|
|
110
111
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
111
112
|
locationChange = _useState12[0],
|
|
112
113
|
setLocationChange = _useState12[1];
|
|
113
|
-
var isHideMap = orderingTheme === null || orderingTheme === void 0 ? void 0 : (_orderingTheme$
|
|
114
|
-
var isHideIcons = orderingTheme === null || orderingTheme === void 0 ? void 0 : (_orderingTheme$
|
|
114
|
+
var isHideMap = orderingTheme === null || orderingTheme === void 0 ? void 0 : (_orderingTheme$theme2 = orderingTheme.theme) === null || _orderingTheme$theme2 === void 0 ? void 0 : (_orderingTheme$theme3 = _orderingTheme$theme2.address) === null || _orderingTheme$theme3 === void 0 ? void 0 : (_orderingTheme$theme4 = _orderingTheme$theme3.components) === null || _orderingTheme$theme4 === void 0 ? void 0 : (_orderingTheme$theme5 = _orderingTheme$theme4.map) === null || _orderingTheme$theme5 === void 0 ? void 0 : _orderingTheme$theme5.hidden;
|
|
115
|
+
var isHideIcons = orderingTheme === null || orderingTheme === void 0 ? void 0 : (_orderingTheme$theme6 = orderingTheme.theme) === null || _orderingTheme$theme6 === void 0 ? void 0 : (_orderingTheme$theme7 = _orderingTheme$theme6.address) === null || _orderingTheme$theme7 === void 0 ? void 0 : (_orderingTheme$theme8 = _orderingTheme$theme7.components) === null || _orderingTheme$theme8 === void 0 ? void 0 : (_orderingTheme$theme9 = _orderingTheme$theme8.icons) === null || _orderingTheme$theme9 === void 0 ? void 0 : _orderingTheme$theme9.hidden;
|
|
115
116
|
var maxLimitLocation = configState === null || configState === void 0 ? void 0 : (_configState$configs = configState.configs) === null || _configState$configs === void 0 ? void 0 : (_configState$configs$ = _configState$configs.meters_to_change_address) === null || _configState$configs$ === void 0 ? void 0 : _configState$configs$.value;
|
|
116
117
|
var googleMapsApiKey = configState === null || configState === void 0 ? void 0 : (_configState$configs2 = configState.configs) === null || _configState$configs2 === void 0 ? void 0 : (_configState$configs3 = _configState$configs2.google_maps_api_key) === null || _configState$configs3 === void 0 ? void 0 : _configState$configs3.value;
|
|
117
118
|
var isLocationRequired = ((_configState$configs4 = configState.configs) === null || _configState$configs4 === void 0 ? void 0 : (_configState$configs5 = _configState$configs4.google_autocomplete_selection_required) === null || _configState$configs5 === void 0 ? void 0 : _configState$configs5.value) === '1' || ((_configState$configs6 = configState.configs) === null || _configState$configs6 === void 0 ? void 0 : (_configState$configs7 = _configState$configs6.google_autocomplete_selection_required) === null || _configState$configs7 === void 0 ? void 0 : _configState$configs7.value) === 'true';
|
|
@@ -320,8 +321,8 @@ var AddressFormUI = function AddressFormUI(props) {
|
|
|
320
321
|
});
|
|
321
322
|
};
|
|
322
323
|
var showFieldWithTheme = function showFieldWithTheme(name) {
|
|
323
|
-
var _orderingTheme$
|
|
324
|
-
return !(orderingTheme !== null && orderingTheme !== void 0 && (_orderingTheme$
|
|
324
|
+
var _orderingTheme$theme10, _orderingTheme$theme11, _orderingTheme$theme12, _orderingTheme$theme13, _orderingTheme$theme14, _orderingTheme$theme15;
|
|
325
|
+
return !(orderingTheme !== null && orderingTheme !== void 0 && (_orderingTheme$theme10 = orderingTheme.theme) !== null && _orderingTheme$theme10 !== void 0 && (_orderingTheme$theme11 = _orderingTheme$theme10.header) !== null && _orderingTheme$theme11 !== void 0 && (_orderingTheme$theme12 = _orderingTheme$theme11.components) !== null && _orderingTheme$theme12 !== void 0 && (_orderingTheme$theme13 = _orderingTheme$theme12.address_form) !== null && _orderingTheme$theme13 !== void 0 && (_orderingTheme$theme14 = _orderingTheme$theme13.components) !== null && _orderingTheme$theme14 !== void 0 && (_orderingTheme$theme15 = _orderingTheme$theme14[name]) !== null && _orderingTheme$theme15 !== void 0 && _orderingTheme$theme15.hidden);
|
|
325
326
|
};
|
|
326
327
|
(0, _react.useEffect)(function () {
|
|
327
328
|
var _formState$result, _ref5, _formState$changes$ad3, _formState$changes9, _addressState$address8, _ref6, _formState$changes$ad4, _formState$changes10, _addressState$address9;
|
|
@@ -492,7 +493,8 @@ var AddressFormUI = function AddressFormUI(props) {
|
|
|
492
493
|
mapControls: googleMapsControls,
|
|
493
494
|
handleChangeAddressMap: handleChangeAddress,
|
|
494
495
|
setErrors: setMapErrors,
|
|
495
|
-
maxLimitLocation: parseInt(maxLimitLocation, 10)
|
|
496
|
+
maxLimitLocation: parseInt(maxLimitLocation, 10),
|
|
497
|
+
isSetInputs: isChew
|
|
496
498
|
}))) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
|
|
497
499
|
key: field.name
|
|
498
500
|
}, (isRequiredField(field.name) || showFieldWithTheme(field.name)) && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, field.name !== 'address_notes' ? /*#__PURE__*/_react.default.createElement(_Inputs.Input, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ordering-ui-external",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.7",
|
|
4
4
|
"description": "Ordering UI Components",
|
|
5
5
|
"main": "./_modules/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"lodash": "^4.17.19",
|
|
88
88
|
"moment": "^2.29.4",
|
|
89
89
|
"nanoid": "^4.0.0",
|
|
90
|
-
"ordering-components-external": "2.6.
|
|
90
|
+
"ordering-components-external": "2.6.2",
|
|
91
91
|
"polished": "^3.6.6",
|
|
92
92
|
"react-bootstrap-icons": "^1.7.2",
|
|
93
93
|
"react-calendar": "^3.3.1",
|
|
@@ -70,6 +70,7 @@ const AddressFormUI = (props) => {
|
|
|
70
70
|
const [addressValue, setAddressValue] = useState(formState.changes?.address ?? addressState.address?.address ?? '')
|
|
71
71
|
const [firstLocationNoEdit, setFirstLocationNoEdit] = useState({ value: null })
|
|
72
72
|
const isEditing = !!addressState.address?.id
|
|
73
|
+
const isChew = orderingTheme?.theme?.header?.components?.layout?.type?.toLowerCase() === 'chew'
|
|
73
74
|
|
|
74
75
|
const [locationChange, setLocationChange] = useState(
|
|
75
76
|
isEditing
|
|
@@ -424,6 +425,7 @@ const AddressFormUI = (props) => {
|
|
|
424
425
|
handleChangeAddressMap={handleChangeAddress}
|
|
425
426
|
setErrors={setMapErrors}
|
|
426
427
|
maxLimitLocation={parseInt(maxLimitLocation, 10)}
|
|
428
|
+
isSetInputs={isChew}
|
|
427
429
|
/>
|
|
428
430
|
</WrapperMap>
|
|
429
431
|
)}
|
/package/_bundles/{0.ordering-ui.85a2550014dbd4b103c6.js → 0.ordering-ui.57cbcaf0252f6e022f93.js}
RENAMED
|
File without changes
|
/package/_bundles/{1.ordering-ui.85a2550014dbd4b103c6.js → 1.ordering-ui.57cbcaf0252f6e022f93.js}
RENAMED
|
File without changes
|
/package/_bundles/{2.ordering-ui.85a2550014dbd4b103c6.js → 2.ordering-ui.57cbcaf0252f6e022f93.js}
RENAMED
|
File without changes
|
/package/_bundles/{4.ordering-ui.85a2550014dbd4b103c6.js → 4.ordering-ui.57cbcaf0252f6e022f93.js}
RENAMED
|
File without changes
|
/package/_bundles/{5.ordering-ui.85a2550014dbd4b103c6.js → 5.ordering-ui.57cbcaf0252f6e022f93.js}
RENAMED
|
File without changes
|
/package/_bundles/{6.ordering-ui.85a2550014dbd4b103c6.js → 6.ordering-ui.57cbcaf0252f6e022f93.js}
RENAMED
|
File without changes
|
|
File without changes
|
/package/_bundles/{8.ordering-ui.85a2550014dbd4b103c6.js → 8.ordering-ui.57cbcaf0252f6e022f93.js}
RENAMED
|
File without changes
|
/package/_bundles/{9.ordering-ui.85a2550014dbd4b103c6.js → 9.ordering-ui.57cbcaf0252f6e022f93.js}
RENAMED
|
File without changes
|