oa-componentbook 0.18.388 → 0.18.390
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.
|
@@ -336,7 +336,7 @@ function GenricLayOut(_ref) {
|
|
|
336
336
|
} = _ref2;
|
|
337
337
|
dispatch({
|
|
338
338
|
type: _layoutReducer.actionTypes.SET_INPUT_SEARCH_VALUE,
|
|
339
|
-
payload: value
|
|
339
|
+
payload: value.trim()
|
|
340
340
|
});
|
|
341
341
|
if (value === "") {
|
|
342
342
|
resetTabsExtraActionSwitch();
|
|
@@ -483,7 +483,7 @@ function GenricLayOut(_ref) {
|
|
|
483
483
|
} = _ref3;
|
|
484
484
|
dispatch({
|
|
485
485
|
type: _layoutReducer.actionTypes.SET_DROPDOWN_SEARCH_VALUE,
|
|
486
|
-
payload: value
|
|
486
|
+
payload: value === null || value === void 0 ? void 0 : value.trim()
|
|
487
487
|
});
|
|
488
488
|
if (value === "") {
|
|
489
489
|
resetTabsExtraActionSwitch();
|
|
@@ -577,7 +577,7 @@ function GenricLayOut(_ref) {
|
|
|
577
577
|
}
|
|
578
578
|
dispatch({
|
|
579
579
|
type: _layoutReducer.actionTypes.SET_DROPDOWN_SEARCH_VALUE,
|
|
580
|
-
payload:
|
|
580
|
+
payload: trimedValue
|
|
581
581
|
});
|
|
582
582
|
resetTabsExtraActionSwitch();
|
|
583
583
|
if (handleDropdownSearchEnter) {
|
|
@@ -586,7 +586,7 @@ function GenricLayOut(_ref) {
|
|
|
586
586
|
error,
|
|
587
587
|
data
|
|
588
588
|
} = await handleDropdownSearchEnter(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
589
|
-
searchedValue:
|
|
589
|
+
searchedValue: trimedValue,
|
|
590
590
|
selectedTab: state === null || state === void 0 || (_state$tabs4 = state.tabs) === null || _state$tabs4 === void 0 ? void 0 : _state$tabs4.active,
|
|
591
591
|
selectedOption: state === null || state === void 0 ? void 0 : state.dropdownSearch.selectedOption,
|
|
592
592
|
current: config === null || config === void 0 || (_config$tables13 = config.tables) === null || _config$tables13 === void 0 || (_config$tables13 = _config$tables13.pagination) === null || _config$tables13 === void 0 ? void 0 : _config$tables13.current,
|
|
@@ -2685,7 +2685,7 @@ function GenricLayOut(_ref) {
|
|
|
2685
2685
|
}
|
|
2686
2686
|
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
2687
2687
|
className: "oaheaderButtonsRight"
|
|
2688
|
-
}, !isFiltersEmpty(customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) && /*#__PURE__*/_react.default.createElement(_CustomButton.default, {
|
|
2688
|
+
}, !isFiltersEmpty(customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) && (rightHeaderSecondButton === null || rightHeaderSecondButton === void 0 ? void 0 : rightHeaderSecondButton.visible) && /*#__PURE__*/_react.default.createElement(_CustomButton.default, {
|
|
2689
2689
|
label: rightHeaderSecondButton === null || rightHeaderSecondButton === void 0 ? void 0 : rightHeaderSecondButton.label,
|
|
2690
2690
|
onClick: rightHeaderSecondButtonClick,
|
|
2691
2691
|
type: rightHeaderSecondButton === null || rightHeaderSecondButton === void 0 ? void 0 : rightHeaderSecondButton.type,
|
|
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
require("core-js/modules/web.dom-collections.iterator.js");
|
|
10
|
+
require("core-js/modules/es.string.trim.js");
|
|
10
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
12
13
|
var _antd = require("antd");
|
|
@@ -112,7 +113,8 @@ function DropdownSearchInput(_ref) {
|
|
|
112
113
|
* @param {React.ChangeEvent<HTMLInputElement>} e - The change event.
|
|
113
114
|
*/
|
|
114
115
|
const handleInputChange = e => {
|
|
115
|
-
|
|
116
|
+
var _e$target$value;
|
|
117
|
+
setInternalInputValue((_e$target$value = e.target.value) === null || _e$target$value === void 0 ? void 0 : _e$target$value.trim()); // Update internal state with trimmed value
|
|
116
118
|
if (onInputChange) {
|
|
117
119
|
onInputChange(e); // Return the event `e` instead of just its value
|
|
118
120
|
}
|
|
@@ -5,6 +5,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
require("core-js/modules/web.dom-collections.iterator.js");
|
|
8
|
+
require("core-js/modules/es.promise.js");
|
|
9
|
+
require("core-js/modules/es.string.trim.js");
|
|
10
|
+
require("core-js/modules/es.regexp.exec.js");
|
|
11
|
+
require("core-js/modules/es.regexp.test.js");
|
|
8
12
|
var _react = _interopRequireDefault(require("react"));
|
|
9
13
|
var _antd = require("antd");
|
|
10
14
|
var _CustomInput = _interopRequireDefault(require("../../components/oa-component-input/CustomInput"));
|
|
@@ -55,6 +59,18 @@ function AddressForm(props) {
|
|
|
55
59
|
rules: [{
|
|
56
60
|
required: true,
|
|
57
61
|
message: "Please input your House no. / Flat / Floor!"
|
|
62
|
+
}, {
|
|
63
|
+
validator: (_, value) => {
|
|
64
|
+
if (!value) return Promise.resolve();
|
|
65
|
+
const trimmed = value.trim();
|
|
66
|
+
if (trimmed.length < 2) {
|
|
67
|
+
return Promise.reject(new Error('Please enter at least 2 characters.'));
|
|
68
|
+
}
|
|
69
|
+
if (!/[a-zA-Z0-9]/.test(trimmed)) {
|
|
70
|
+
return Promise.reject(new Error('Please enter a valid House no. / Flat / Floor!'));
|
|
71
|
+
}
|
|
72
|
+
return Promise.resolve();
|
|
73
|
+
}
|
|
58
74
|
}]
|
|
59
75
|
}, /*#__PURE__*/_react.default.createElement(_CustomInput.default, {
|
|
60
76
|
placeholder: "Type here",
|