@carbon/ibm-products 2.43.2-canary.78 → 2.43.2-canary.81
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/css/index-full-carbon.css +252 -58
- package/css/index-full-carbon.css.map +1 -1
- package/css/index-full-carbon.min.css +1 -1
- package/css/index-full-carbon.min.css.map +1 -1
- package/css/index-without-carbon-released-only.css +3 -0
- package/css/index-without-carbon-released-only.css.map +1 -1
- package/css/index-without-carbon-released-only.min.css +1 -1
- package/css/index-without-carbon-released-only.min.css.map +1 -1
- package/css/index-without-carbon.css +72 -20
- package/css/index-without-carbon.css.map +1 -1
- package/css/index-without-carbon.min.css +1 -1
- package/css/index-without-carbon.min.css.map +1 -1
- package/css/index.css +173 -44
- package/css/index.css.map +1 -1
- package/css/index.min.css +1 -1
- package/css/index.min.css.map +1 -1
- package/es/components/ActionBar/ActionBarItem.js +1 -1
- package/es/components/ConditionBuilder/ConditionBlock/ConditionBlock.js +20 -14
- package/es/components/ConditionBuilder/ConditionBuilder.js +3 -3
- package/es/components/ConditionBuilder/ConditionBuilderActions/ConditionBuilderActions.js +8 -5
- package/es/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.js +4 -2
- package/es/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.js +2 -2
- package/es/components/ConditionBuilder/ConditionBuilderConnector/ConditionConnector.js +4 -3
- package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts +1 -3
- package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +4 -10
- package/es/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.d.ts +1 -0
- package/es/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.js +6 -1
- package/es/components/ConditionBuilder/ConditionBuilderContext/translationObject.d.ts +3 -1
- package/es/components/ConditionBuilder/ConditionBuilderContext/translationObject.js +4 -2
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.d.ts +3 -1
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +47 -23
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.js +1 -1
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemNumber/ConditionBuilderItemNumber.js +3 -3
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOptionForValueField.js +6 -3
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemText/ConditionBuilderItemText.js +3 -2
- package/es/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.d.ts +1 -3
- package/es/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.js +52 -32
- package/es/components/ConditionBuilder/utils/handleKeyboardEvents.d.ts +1 -0
- package/es/components/ConditionBuilder/utils/handleKeyboardEvents.js +51 -44
- package/es/components/ConditionBuilder/utils/util.d.ts +6 -4
- package/es/components/ConditionBuilder/utils/util.js +35 -17
- package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +33 -1
- package/es/components/StringFormatter/StringFormatter.js +14 -3
- package/es/components/StringFormatter/utils/enums.d.ts +20 -1
- package/es/components/StringFormatter/utils/enums.js +22 -2
- package/es/node_modules/@carbon/icon-helpers/es/index.js +49 -62
- package/es/node_modules/@carbon/icons-react/es/generated/bucket-2.js +1020 -1058
- package/es/node_modules/@carbon/icons-react/es/generated/bucket-9.js +881 -758
- package/lib/components/ActionBar/ActionBarItem.js +1 -1
- package/lib/components/ConditionBuilder/ConditionBlock/ConditionBlock.js +19 -13
- package/lib/components/ConditionBuilder/ConditionBuilder.js +3 -3
- package/lib/components/ConditionBuilder/ConditionBuilderActions/ConditionBuilderActions.js +8 -5
- package/lib/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.js +4 -2
- package/lib/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.js +2 -2
- package/lib/components/ConditionBuilder/ConditionBuilderConnector/ConditionConnector.js +4 -3
- package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts +1 -3
- package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +4 -10
- package/lib/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.d.ts +1 -0
- package/lib/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.js +6 -1
- package/lib/components/ConditionBuilder/ConditionBuilderContext/translationObject.d.ts +3 -1
- package/lib/components/ConditionBuilder/ConditionBuilderContext/translationObject.js +4 -2
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.d.ts +3 -1
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +46 -22
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.js +1 -1
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemNumber/ConditionBuilderItemNumber.js +3 -3
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOptionForValueField.js +6 -3
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemText/ConditionBuilderItemText.js +3 -2
- package/lib/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.d.ts +1 -3
- package/lib/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.js +51 -31
- package/lib/components/ConditionBuilder/utils/handleKeyboardEvents.d.ts +1 -0
- package/lib/components/ConditionBuilder/utils/handleKeyboardEvents.js +50 -42
- package/lib/components/ConditionBuilder/utils/util.d.ts +6 -4
- package/lib/components/ConditionBuilder/utils/util.js +36 -16
- package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +32 -0
- package/lib/components/StringFormatter/StringFormatter.js +13 -2
- package/lib/components/StringFormatter/utils/enums.d.ts +20 -1
- package/lib/components/StringFormatter/utils/enums.js +23 -1
- package/lib/node_modules/@carbon/icon-helpers/es/index.js +49 -62
- package/lib/node_modules/@carbon/icons-react/es/generated/bucket-2.js +1036 -1074
- package/lib/node_modules/@carbon/icons-react/es/generated/bucket-9.js +946 -823
- package/package.json +5 -5
- package/scss/components/ConditionBuilder/_condition-builder.scss +4 -0
- package/scss/components/ConditionBuilder/styles/_conditionBuilderCondition.scss +6 -1
- package/scss/components/ConditionBuilder/styles/_conditionBuilderItem.scss +1 -1
- package/scss/components/Datagrid/styles/addons/_CustomizeColumnsTearsheet.scss +7 -5
- package/scss/components/Datagrid/styles/addons/_FilterFlyout.scss +5 -4
@@ -18,7 +18,7 @@ import { ConditionBuilderItemText } from '../ConditionBuilderItem/ConditionBuild
|
|
18
18
|
import { ConditionBuilderItemDate } from '../ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.js';
|
19
19
|
import { ConditionBuilderContext } from '../ConditionBuilderContext/ConditionBuilderProvider.js';
|
20
20
|
import { ConditionBuilderButton } from '../ConditionBuilderButton/ConditionBuilderButton.js';
|
21
|
-
import { focusThisField } from '../utils/util.js';
|
21
|
+
import { checkIsValid, focusThisField } from '../utils/util.js';
|
22
22
|
import { ConditionBuilderItemTime } from '../ConditionBuilderItem/ConditionBuilderItemTime/ConditionBuilderItemTime.js';
|
23
23
|
import ConditionBuilderAdd from '../ConditionBuilderAdd/ConditionBuilderAdd.js';
|
24
24
|
import { ItemOption } from '../ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.js';
|
@@ -55,7 +55,8 @@ var ConditionBlock = function ConditionBlock(props) {
|
|
55
55
|
isLastCondition = props.isLastCondition;
|
56
56
|
var _useContext = useContext(ConditionBuilderContext),
|
57
57
|
inputConfig = _useContext.inputConfig,
|
58
|
-
variant = _useContext.variant
|
58
|
+
variant = _useContext.variant,
|
59
|
+
conditionBuilderRef = _useContext.conditionBuilderRef;
|
59
60
|
var _useState = useState(false),
|
60
61
|
_useState2 = _slicedToArray(_useState, 2),
|
61
62
|
showDeletionPreview = _useState2[0],
|
@@ -71,9 +72,9 @@ var ConditionBlock = function ConditionBlock(props) {
|
|
71
72
|
//filtering the current property to access its properties and config options
|
72
73
|
var getCurrentConfig = function getCurrentConfig(property) {
|
73
74
|
var _inputConfig$properti, _inputConfig$properti2;
|
74
|
-
return (_inputConfig$properti = (_inputConfig$properti2 = inputConfig.properties) === null || _inputConfig$properti2 === void 0 ? void 0 : _inputConfig$properti2.
|
75
|
+
return (_inputConfig$properti = (_inputConfig$properti2 = inputConfig.properties) === null || _inputConfig$properti2 === void 0 ? void 0 : _inputConfig$properti2.find(function (eachProperty) {
|
75
76
|
return eachProperty.id == property;
|
76
|
-
})
|
77
|
+
})) !== null && _inputConfig$properti !== void 0 ? _inputConfig$properti : {};
|
77
78
|
};
|
78
79
|
var _getCurrentConfig = getCurrentConfig(property),
|
79
80
|
icon = _getCurrentConfig.icon,
|
@@ -93,7 +94,7 @@ var ConditionBlock = function ConditionBlock(props) {
|
|
93
94
|
};
|
94
95
|
var ItemComponent = property ? itemComponents[type] : null;
|
95
96
|
var onStatementChangeHandler = function onStatementChangeHandler(v, evt) {
|
96
|
-
focusThisField(evt);
|
97
|
+
focusThisField(evt, conditionBuilderRef);
|
97
98
|
onStatementChange(v);
|
98
99
|
};
|
99
100
|
var onPropertyChangeHandler = function onPropertyChangeHandler(newProperty) {
|
@@ -101,19 +102,20 @@ var ConditionBlock = function ConditionBlock(props) {
|
|
101
102
|
property: newProperty,
|
102
103
|
operator: undefined,
|
103
104
|
value: '',
|
104
|
-
popoverToOpen: 'operatorField'
|
105
|
+
popoverToOpen: checkIsValid(newProperty) ? 'operatorField' : ''
|
105
106
|
}));
|
106
107
|
};
|
107
108
|
var onOperatorChangeHandler = function onOperatorChangeHandler(newOperator) {
|
108
109
|
onChange(_objectSpread2(_objectSpread2({}, condition), {}, {
|
109
110
|
operator: newOperator,
|
110
111
|
value: undefined,
|
111
|
-
popoverToOpen: 'valueField'
|
112
|
+
popoverToOpen: checkIsValid(newOperator) ? 'valueField' : ''
|
112
113
|
}));
|
113
114
|
};
|
114
|
-
var onValueChangeHandler = function onValueChangeHandler(newValue) {
|
115
|
+
var onValueChangeHandler = function onValueChangeHandler(newValue, evt) {
|
115
116
|
var currentCondition = _objectSpread2({}, condition);
|
116
117
|
delete currentCondition.popoverToOpen;
|
118
|
+
focusThisField(evt, conditionBuilderRef);
|
117
119
|
onChange(_objectSpread2(_objectSpread2({}, currentCondition), {}, {
|
118
120
|
value: newValue
|
119
121
|
}));
|
@@ -149,7 +151,8 @@ var ConditionBlock = function ConditionBlock(props) {
|
|
149
151
|
onChange: onValueChangeHandler,
|
150
152
|
config: config,
|
151
153
|
"data-name": "valueField",
|
152
|
-
parentRef: popoverRef
|
154
|
+
parentRef: popoverRef,
|
155
|
+
type: type
|
153
156
|
});
|
154
157
|
};
|
155
158
|
return /*#__PURE__*/React__default.createElement("div", _extends({
|
@@ -180,13 +183,14 @@ var ConditionBlock = function ConditionBlock(props) {
|
|
180
183
|
options: statementConfig
|
181
184
|
}
|
182
185
|
})), /*#__PURE__*/React__default.createElement(ConditionBuilderItem, {
|
183
|
-
label: label,
|
186
|
+
label: label !== null && label !== void 0 ? label : condition === null || condition === void 0 ? void 0 : condition.property,
|
184
187
|
title: propertyText,
|
185
188
|
renderIcon: icon !== null && icon !== void 0 ? icon : null,
|
186
189
|
className: "".concat(blockClass, "__property-field"),
|
187
190
|
"data-name": "propertyField",
|
188
191
|
condition: condition,
|
189
|
-
type: type
|
192
|
+
type: type,
|
193
|
+
onChange: onPropertyChangeHandler
|
190
194
|
}, /*#__PURE__*/React__default.createElement(ItemOption, {
|
191
195
|
conditionState: {
|
192
196
|
value: property,
|
@@ -196,12 +200,13 @@ var ConditionBlock = function ConditionBlock(props) {
|
|
196
200
|
config: {
|
197
201
|
options: inputConfig.properties
|
198
202
|
}
|
199
|
-
})), property && /*#__PURE__*/React__default.createElement(ConditionBuilderItem, {
|
203
|
+
})), checkIsValid(property) && /*#__PURE__*/React__default.createElement(ConditionBuilderItem, {
|
200
204
|
label: operator,
|
201
205
|
title: operatorText,
|
202
206
|
"data-name": "operatorField",
|
203
207
|
condition: condition,
|
204
|
-
type: type
|
208
|
+
type: type,
|
209
|
+
onChange: onOperatorChangeHandler
|
205
210
|
}, /*#__PURE__*/React__default.createElement(ItemOption, {
|
206
211
|
config: {
|
207
212
|
options: getOperators()
|
@@ -211,7 +216,7 @@ var ConditionBlock = function ConditionBlock(props) {
|
|
211
216
|
label: operatorText
|
212
217
|
},
|
213
218
|
onChange: onOperatorChangeHandler
|
214
|
-
})), property && operator && /*#__PURE__*/React__default.createElement(ConditionBuilderItem, {
|
219
|
+
})), checkIsValid(property) && checkIsValid(operator) && /*#__PURE__*/React__default.createElement(ConditionBuilderItem, {
|
215
220
|
label: value,
|
216
221
|
type: type,
|
217
222
|
title: label,
|
@@ -219,6 +224,7 @@ var ConditionBlock = function ConditionBlock(props) {
|
|
219
224
|
"data-name": "valueField",
|
220
225
|
condition: condition,
|
221
226
|
config: config,
|
227
|
+
onChange: onValueChangeHandler,
|
222
228
|
renderChildren: renderChildren
|
223
229
|
}), /*#__PURE__*/React__default.createElement("span", {
|
224
230
|
role: "gridcell",
|
@@ -68,7 +68,8 @@ var ConditionBuilder = /*#__PURE__*/React__default.forwardRef(function (_ref, re
|
|
68
68
|
popOverSearchThreshold: popOverSearchThreshold,
|
69
69
|
getOptions: getOptions,
|
70
70
|
variant: variant,
|
71
|
-
translateWithId: translateWithId
|
71
|
+
translateWithId: translateWithId,
|
72
|
+
conditionBuilderRef: conditionBuilderRef
|
72
73
|
}, /*#__PURE__*/React__default.createElement("div", _extends({}, rest, {
|
73
74
|
className: cx(blockClass,
|
74
75
|
// Apply the block class to the main HTML element
|
@@ -86,7 +87,6 @@ var ConditionBuilder = /*#__PURE__*/React__default.forwardRef(function (_ref, re
|
|
86
87
|
onKeyDown: handleKeyDownHandler
|
87
88
|
}, /*#__PURE__*/React__default.createElement(ConditionBuilderContent, {
|
88
89
|
startConditionLabel: startConditionLabel,
|
89
|
-
conditionBuilderRef: conditionBuilderRef,
|
90
90
|
getConditionState: getConditionState,
|
91
91
|
getActionsState: getActionsState,
|
92
92
|
initialState: initialState,
|
@@ -202,7 +202,7 @@ ConditionBuilder.propTypes = {
|
|
202
202
|
/**
|
203
203
|
* Optional prop, if you need to pass translations to the texts on the component instead of the defined defaults.
|
204
204
|
* This callback function will receive the message id and you need to return the corresponding text for that id.
|
205
|
-
* The message id will be one of [ "ifText","addConditionText", "addConditionGroupText", "addSubgroupText", "conditionText", "propertyText", "operatorText", "valueText", "connectorText", "conditionRowText", "removeConditionText", "addConditionRowText", "startText", "endText", "clearSearchText", "actionsText", "then", "removeActionText", "addActionText", "invalidText",
|
205
|
+
* The message id will be one of [ "ifText","addConditionText", "addConditionGroupText", "addSubgroupText", "conditionText", "propertyText", "operatorText", "valueText", "connectorText", "conditionRowText","conditionRowGroupText","conditionBuilderText","actionSectionText", "removeConditionText", "addConditionRowText", "startText", "endText", "clearSearchText", "actionsText", "then", "removeActionText", "addActionText", "invalidText", "invalidNumberWarnText"]
|
206
206
|
]
|
207
207
|
*/
|
208
208
|
translateWithId: PropTypes.func,
|
@@ -30,13 +30,14 @@ var ConditionBuilderActions = function ConditionBuilderActions(_ref) {
|
|
30
30
|
_useState2 = _slicedToArray(_useState, 2),
|
31
31
|
showDeletionPreview = _useState2[0],
|
32
32
|
setShowDeletionPreview = _useState2[1];
|
33
|
-
var _useTranslations = useTranslations(['actionsText', 'then', 'and', 'removeActionText', 'addActionText']),
|
34
|
-
_useTranslations2 = _slicedToArray(_useTranslations,
|
33
|
+
var _useTranslations = useTranslations(['actionsText', 'then', 'and', 'removeActionText', 'addActionText', 'actionSectionText']),
|
34
|
+
_useTranslations2 = _slicedToArray(_useTranslations, 6),
|
35
35
|
actionsText = _useTranslations2[0],
|
36
36
|
thenText = _useTranslations2[1],
|
37
37
|
andText = _useTranslations2[2],
|
38
38
|
removeActionText = _useTranslations2[3],
|
39
|
-
addActionText = _useTranslations2[4]
|
39
|
+
addActionText = _useTranslations2[4],
|
40
|
+
actionSectionText = _useTranslations2[5];
|
40
41
|
var addActionHandler = function addActionHandler() {
|
41
42
|
var action = {
|
42
43
|
id: uuidv4(),
|
@@ -74,7 +75,8 @@ var ConditionBuilderActions = function ConditionBuilderActions(_ref) {
|
|
74
75
|
level: 4
|
75
76
|
}, /*#__PURE__*/React__default.createElement(Heading, null, actionsText)), /*#__PURE__*/React__default.createElement("div", {
|
76
77
|
className: "".concat(blockClass, "__condition-wrapper"),
|
77
|
-
role: "grid"
|
78
|
+
role: "grid",
|
79
|
+
"aria-label": actionSectionText
|
78
80
|
}, actionState === null || actionState === void 0 ? void 0 : actionState.map(function (action, index) {
|
79
81
|
return /*#__PURE__*/React__default.createElement("div", {
|
80
82
|
key: action.id,
|
@@ -124,7 +126,8 @@ var ConditionBuilderActions = function ConditionBuilderActions(_ref) {
|
|
124
126
|
})), actionState.length === index + 1 && /*#__PURE__*/React__default.createElement(ConditionBuilderAdd, {
|
125
127
|
onClick: addActionHandler,
|
126
128
|
className: "".concat(blockClass, "__gap ").concat(blockClass, "__gap-left"),
|
127
|
-
buttonLabel: addActionText
|
129
|
+
buttonLabel: addActionText,
|
130
|
+
tabIndex: 0
|
128
131
|
}));
|
129
132
|
}), actionState.length === 0 && /*#__PURE__*/React__default.createElement(ConditionBuilderAdd, {
|
130
133
|
onClick: addActionHandler,
|
@@ -60,14 +60,16 @@ var ConditionBuilderAdd = function ConditionBuilderAdd(_ref) {
|
|
60
60
|
onBlur: hideConditionSubGroupPreviewHandler
|
61
61
|
};
|
62
62
|
};
|
63
|
+
var getAriaLabel = function getAriaLabel() {
|
64
|
+
return buttonLabel ? buttonLabel : !enableSubGroup ? addConditionRowText : undefined;
|
65
|
+
};
|
63
66
|
var wrapperProps = enableSubGroup ? {
|
64
67
|
role: 'gridcell'
|
65
|
-
// 'aria-label': addSubgroupText,
|
66
68
|
} : {};
|
67
69
|
return /*#__PURE__*/React__default.createElement("div", {
|
68
70
|
className: "".concat(className, " ").concat(blockClass, "__add-button-wrapper"),
|
69
71
|
role: !enableSubGroup ? 'gridcell' : 'none',
|
70
|
-
"aria-label":
|
72
|
+
"aria-label": getAriaLabel(),
|
71
73
|
onMouseEnter: showAddSubGroup,
|
72
74
|
onMouseLeave: hideAddSubGroup,
|
73
75
|
onFocus: showAddSubGroup,
|
@@ -36,7 +36,7 @@ var ConditionBuilderButton = function ConditionBuilderButton(_ref) {
|
|
36
36
|
var Button = function Button() {
|
37
37
|
var _rest$dataName;
|
38
38
|
var dataName = (_rest$dataName = rest['data-name']) !== null && _rest$dataName !== void 0 ? _rest$dataName : '';
|
39
|
-
return /*#__PURE__*/React__default.createElement("button", {
|
39
|
+
return /*#__PURE__*/React__default.createElement("button", _extends({
|
40
40
|
// role={'gridcell'}
|
41
41
|
tabIndex: tabIndex != undefined ? tabIndex : -1,
|
42
42
|
className: cx([className, "".concat(blockClass, "__button"), _defineProperty({}, "".concat(blockClass, "__text-ellipsis"), showToolTip && !hideLabel && !isInvalid), _defineProperty({}, "".concat(blockClass, "__invalid-input"), isInvalid)]),
|
@@ -47,7 +47,7 @@ var ConditionBuilderButton = function ConditionBuilderButton(_ref) {
|
|
47
47
|
onMouseEnter: onMouseEnter,
|
48
48
|
onMouseLeave: onMouseLeave,
|
49
49
|
"data-name": dataName
|
50
|
-
}, Icon && (_Icon || (_Icon = /*#__PURE__*/React__default.createElement(Icon, null))), !hideLabel && (_span || (_span = /*#__PURE__*/React__default.createElement("span", null, label))), isInvalid && (_WarningAltFilled || (_WarningAltFilled = /*#__PURE__*/React__default.createElement(WarningAltFilled, null))));
|
50
|
+
}, rest), Icon && (_Icon || (_Icon = /*#__PURE__*/React__default.createElement(Icon, null))), !hideLabel && (_span || (_span = /*#__PURE__*/React__default.createElement("span", null, label))), isInvalid && (_WarningAltFilled || (_WarningAltFilled = /*#__PURE__*/React__default.createElement(WarningAltFilled, null))));
|
51
51
|
};
|
52
52
|
return hideLabel || showToolTip ? /*#__PURE__*/React__default.createElement(Tooltip, _extends({
|
53
53
|
label: label,
|
@@ -22,7 +22,8 @@ var ConditionConnector = function ConditionConnector(_ref) {
|
|
22
22
|
onChange = _ref.onChange,
|
23
23
|
rest = _objectWithoutProperties(_ref, _excluded);
|
24
24
|
var _useContext = useContext(ConditionBuilderContext),
|
25
|
-
variant = _useContext.variant
|
25
|
+
variant = _useContext.variant,
|
26
|
+
conditionBuilderRef = _useContext.conditionBuilderRef;
|
26
27
|
var _useTranslations = useTranslations(['connectorText']),
|
27
28
|
_useTranslations2 = _slicedToArray(_useTranslations, 1),
|
28
29
|
connectorText = _useTranslations2[0];
|
@@ -43,10 +44,10 @@ var ConditionConnector = function ConditionConnector(_ref) {
|
|
43
44
|
};
|
44
45
|
var onChangeHandler = function onChangeHandler(op, evt) {
|
45
46
|
onChange(op);
|
46
|
-
focusThisField(evt);
|
47
|
+
focusThisField(evt, conditionBuilderRef);
|
47
48
|
};
|
48
49
|
return variant == 'tree' ? /*#__PURE__*/React__default.createElement("span", {
|
49
|
-
className: "".concat(className, " ").concat(blockClass, "__connector
|
50
|
+
className: "".concat(className, " ").concat(blockClass, "__connector--disabled")
|
50
51
|
}, operator) :
|
51
52
|
/*#__PURE__*/
|
52
53
|
// <div className={className} {...rest}>
|
@@ -1,7 +1,6 @@
|
|
1
1
|
export default ConditionBuilderContent;
|
2
|
-
declare function ConditionBuilderContent({ startConditionLabel,
|
2
|
+
declare function ConditionBuilderContent({ startConditionLabel, getConditionState, getActionsState, initialState, actions, }: {
|
3
3
|
startConditionLabel: any;
|
4
|
-
conditionBuilderRef: any;
|
5
4
|
getConditionState: any;
|
6
5
|
getActionsState: any;
|
7
6
|
initialState: any;
|
@@ -13,7 +12,6 @@ declare namespace ConditionBuilderContent {
|
|
13
12
|
id: PropTypes.Validator<NonNullable<NonNullable<string | number | null | undefined>>>;
|
14
13
|
label: PropTypes.Validator<string>;
|
15
14
|
}> | null | undefined)[]>;
|
16
|
-
let conditionBuilderRef: PropTypes.Requireable<object>;
|
17
15
|
let getActionsState: PropTypes.Requireable<(...args: any[]) => any>;
|
18
16
|
let getConditionState: PropTypes.Validator<(...args: any[]) => any>;
|
19
17
|
let initialState: PropTypes.Requireable<PropTypes.InferProps<{
|
@@ -24,7 +24,6 @@ var _Heading, _GroupConnector;
|
|
24
24
|
var ConditionBuilderContent = function ConditionBuilderContent(_ref) {
|
25
25
|
var _rootState$groups2;
|
26
26
|
var startConditionLabel = _ref.startConditionLabel,
|
27
|
-
conditionBuilderRef = _ref.conditionBuilderRef,
|
28
27
|
getConditionState = _ref.getConditionState,
|
29
28
|
getActionsState = _ref.getActionsState,
|
30
29
|
initialState = _ref.initialState,
|
@@ -145,13 +144,13 @@ var ConditionBuilderContent = function ConditionBuilderContent(_ref) {
|
|
145
144
|
},
|
146
145
|
onChange: function onChange(updatedGroup) {
|
147
146
|
onChangeHandler(updatedGroup, groupIndex);
|
148
|
-
}
|
149
|
-
conditionBuilderRef: conditionBuilderRef
|
147
|
+
}
|
150
148
|
}), groupIndex < rootState.groups.length - 1 && (_GroupConnector || (_GroupConnector = /*#__PURE__*/React__default.createElement(GroupConnector, null))));
|
151
149
|
})), isConditionBuilderActive && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, variant == 'tree' && /*#__PURE__*/React__default.createElement("div", {
|
152
150
|
role: "row",
|
153
151
|
tabIndex: -1,
|
154
|
-
"aria-level": 1
|
152
|
+
"aria-level": 1,
|
153
|
+
className: "".concat(blockClass, "__add-group")
|
155
154
|
}, /*#__PURE__*/React__default.createElement(ConditionBuilderButton, {
|
156
155
|
renderIcon: TextNewLine,
|
157
156
|
onClick: addConditionGroupHandler,
|
@@ -174,8 +173,7 @@ var ConditionBuilderContent = function ConditionBuilderContent(_ref) {
|
|
174
173
|
}))), isConditionBuilderActive && actions && /*#__PURE__*/React__default.createElement(ConditionBuilderActions, {
|
175
174
|
actions: actions,
|
176
175
|
className: "".concat(blockClass, "__actions-container"),
|
177
|
-
variant: variant
|
178
|
-
conditionBuilderRef: conditionBuilderRef
|
176
|
+
variant: variant
|
179
177
|
}));
|
180
178
|
};
|
181
179
|
var ConditionBuilderContent$1 = ConditionBuilderContent;
|
@@ -187,10 +185,6 @@ ConditionBuilderContent.propTypes = {
|
|
187
185
|
id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,
|
188
186
|
label: PropTypes.string.isRequired
|
189
187
|
})),
|
190
|
-
/**
|
191
|
-
* ref of condition builder
|
192
|
-
*/
|
193
|
-
conditionBuilderRef: PropTypes.object,
|
194
188
|
/**
|
195
189
|
* callback functions that will provide the updated action state back.
|
196
190
|
*/
|
package/es/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.d.ts
CHANGED
@@ -18,6 +18,7 @@ export function ConditionBuilderProvider(props: any): import("react/jsx-runtime"
|
|
18
18
|
export namespace ConditionBuilderProvider {
|
19
19
|
namespace propTypes {
|
20
20
|
let children: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
|
21
|
+
let conditionBuilderRef: PropTypes.Requireable<object>;
|
21
22
|
let getOptions: PropTypes.Requireable<(...args: any[]) => any>;
|
22
23
|
let inputConfig: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
23
24
|
properties: PropTypes.Requireable<(PropTypes.InferProps<{
|
@@ -63,7 +63,8 @@ var ConditionBuilderProvider = function ConditionBuilderProvider(props) {
|
|
63
63
|
popOverSearchThreshold: props.popOverSearchThreshold,
|
64
64
|
getOptions: props.getOptions,
|
65
65
|
variant: props.variant,
|
66
|
-
translateWithId: props.translateWithId
|
66
|
+
translateWithId: props.translateWithId,
|
67
|
+
conditionBuilderRef: props.conditionBuilderRef
|
67
68
|
}
|
68
69
|
},
|
69
70
|
// eslint-disable-next-line react/prop-types
|
@@ -74,6 +75,10 @@ ConditionBuilderProvider.propTypes = {
|
|
74
75
|
* Provide the contents of the ConditionBuilder.
|
75
76
|
*/
|
76
77
|
children: PropTypes.node.isRequired,
|
78
|
+
/**
|
79
|
+
* ref of condition builder
|
80
|
+
*/
|
81
|
+
conditionBuilderRef: PropTypes.object,
|
77
82
|
/**
|
78
83
|
* This is an optional callback function that will be triggered when options array is not passed in the inputConfig against a property.
|
79
84
|
* This can be a asynchronous function that need to return a promise, so it will allow to fetch options from API call.
|
@@ -24,6 +24,7 @@ export namespace translationsObject {
|
|
24
24
|
let valueText: string;
|
25
25
|
let connectorText: string;
|
26
26
|
let conditionRowText: string;
|
27
|
+
let conditionRowGroupText: string;
|
27
28
|
let removeConditionText: string;
|
28
29
|
let addConditionRowText: string;
|
29
30
|
let startText: string;
|
@@ -34,6 +35,7 @@ export namespace translationsObject {
|
|
34
35
|
let removeActionText: string;
|
35
36
|
let addActionText: string;
|
36
37
|
let invalidText: string;
|
37
|
-
let invalidDateText: string;
|
38
38
|
let invalidNumberWarnText: string;
|
39
|
+
let conditionBuilderText: string;
|
40
|
+
let actionSectionText: string;
|
39
41
|
}
|
@@ -31,6 +31,7 @@ var translationsObject = {
|
|
31
31
|
valueText: 'Value',
|
32
32
|
connectorText: 'Connector',
|
33
33
|
conditionRowText: 'Condition row',
|
34
|
+
conditionRowGroupText: 'Condition row group',
|
34
35
|
removeConditionText: 'Remove condition',
|
35
36
|
addConditionRowText: 'Add condition row',
|
36
37
|
startText: 'Start',
|
@@ -41,8 +42,9 @@ var translationsObject = {
|
|
41
42
|
removeActionText: 'Remove Action',
|
42
43
|
addActionText: 'Add action',
|
43
44
|
invalidText: 'Incomplete',
|
44
|
-
|
45
|
-
|
45
|
+
invalidNumberWarnText: 'Invalid number, must be 0 or greater',
|
46
|
+
conditionBuilderText: 'Condition Builder',
|
47
|
+
actionSectionText: 'Action Section'
|
46
48
|
};
|
47
49
|
|
48
50
|
export { translationsObject };
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export function ConditionBuilderItem({ children, className, label, renderIcon, title, type, showToolTip, condition, popOverClassName, config, renderChildren, ...rest }: {
|
1
|
+
export function ConditionBuilderItem({ children, className, label, renderIcon, title, type, showToolTip, condition, popOverClassName, config, renderChildren, onChange, ...rest }: {
|
2
2
|
[x: string]: any;
|
3
3
|
children: any;
|
4
4
|
className: any;
|
@@ -11,6 +11,7 @@ export function ConditionBuilderItem({ children, className, label, renderIcon, t
|
|
11
11
|
popOverClassName: any;
|
12
12
|
config: any;
|
13
13
|
renderChildren: any;
|
14
|
+
onChange: any;
|
14
15
|
}): import("react/jsx-runtime").JSX.Element;
|
15
16
|
export namespace ConditionBuilderItem {
|
16
17
|
namespace propTypes {
|
@@ -19,6 +20,7 @@ export namespace ConditionBuilderItem {
|
|
19
20
|
let condition: PropTypes.Requireable<object>;
|
20
21
|
let config: PropTypes.Requireable<object>;
|
21
22
|
let label: PropTypes.Requireable<NonNullable<string | object | null | undefined>>;
|
23
|
+
let onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
22
24
|
let popOverClassName: PropTypes.Requireable<string>;
|
23
25
|
let renderChildren: PropTypes.Requireable<(...args: any[]) => any>;
|
24
26
|
let renderIcon: PropTypes.Requireable<object>;
|
@@ -6,15 +6,17 @@
|
|
6
6
|
*/
|
7
7
|
|
8
8
|
import { objectWithoutProperties as _objectWithoutProperties, slicedToArray as _slicedToArray, extends as _extends } from '../../../_virtual/_rollupPluginBabelHelpers.js';
|
9
|
-
import React__default, { useRef, useState, useEffect } from 'react';
|
9
|
+
import React__default, { useRef, useState, useContext, useEffect } from 'react';
|
10
10
|
import { Popover, PopoverContent, Layer } from '@carbon/react';
|
11
11
|
import PropTypes from '../../../node_modules/prop-types/index.js';
|
12
12
|
import { Add } from '@carbon/react/icons';
|
13
13
|
import { blockClass, valueRenderers } from '../ConditionBuilderContext/DataConfigs.js';
|
14
14
|
import { ConditionBuilderButton } from '../ConditionBuilderButton/ConditionBuilderButton.js';
|
15
15
|
import { useTranslations } from '../utils/useTranslations.js';
|
16
|
+
import { ConditionBuilderContext } from '../ConditionBuilderContext/ConditionBuilderProvider.js';
|
17
|
+
import { handleKeyDownForPopover } from '../utils/handleKeyboardEvents.js';
|
16
18
|
|
17
|
-
var _excluded = ["children", "className", "label", "renderIcon", "title", "type", "showToolTip", "condition", "popOverClassName", "config", "renderChildren"];
|
19
|
+
var _excluded = ["children", "className", "label", "renderIcon", "title", "type", "showToolTip", "condition", "popOverClassName", "config", "renderChildren", "onChange"];
|
18
20
|
var ConditionBuilderItem = function ConditionBuilderItem(_ref) {
|
19
21
|
var children = _ref.children,
|
20
22
|
className = _ref.className,
|
@@ -27,30 +29,29 @@ var ConditionBuilderItem = function ConditionBuilderItem(_ref) {
|
|
27
29
|
popOverClassName = _ref.popOverClassName,
|
28
30
|
config = _ref.config,
|
29
31
|
renderChildren = _ref.renderChildren,
|
32
|
+
onChange = _ref.onChange,
|
30
33
|
rest = _objectWithoutProperties(_ref, _excluded);
|
31
|
-
var contentRef = useRef(null);
|
32
34
|
var popoverRef = useRef(null);
|
33
35
|
var _useState = useState(false),
|
34
36
|
_useState2 = _slicedToArray(_useState, 2),
|
35
37
|
open = _useState2[0],
|
36
38
|
setOpen = _useState2[1];
|
37
|
-
var _useTranslations = useTranslations(['invalidText', 'addConditionText', label
|
38
|
-
_useTranslations2 = _slicedToArray(_useTranslations,
|
39
|
+
var _useTranslations = useTranslations(['invalidText', 'addConditionText', label]),
|
40
|
+
_useTranslations2 = _slicedToArray(_useTranslations, 3),
|
39
41
|
invalidText = _useTranslations2[0],
|
40
42
|
addConditionText = _useTranslations2[1],
|
41
|
-
labelText = _useTranslations2[2]
|
42
|
-
|
43
|
+
labelText = _useTranslations2[2];
|
44
|
+
var _useContext = useContext(ConditionBuilderContext),
|
45
|
+
conditionBuilderRef = _useContext.conditionBuilderRef;
|
43
46
|
var getPropertyDetails = function getPropertyDetails() {
|
44
|
-
|
47
|
+
var _ref2 = condition || {},
|
48
|
+
property = _ref2.property,
|
49
|
+
operator = _ref2.operator;
|
50
|
+
if (label === 'INVALID' || rest['data-name'] === 'propertyField' && property === 'INVALID' || rest['data-name'] === 'operatorField' && operator === 'INVALID') {
|
45
51
|
return {
|
46
52
|
propertyLabel: invalidText,
|
47
53
|
isInvalid: true
|
48
54
|
};
|
49
|
-
} else if (label === 'INVALID_DATE') {
|
50
|
-
return {
|
51
|
-
propertyLabel: invalidDateText,
|
52
|
-
isInvalid: true
|
53
|
-
};
|
54
55
|
}
|
55
56
|
var propertyId = rest['data-name'] == 'valueField' && type ? valueRenderers[type](label, config) : labelText;
|
56
57
|
return {
|
@@ -89,27 +90,46 @@ var ConditionBuilderItem = function ConditionBuilderItem(_ref) {
|
|
89
90
|
}, [condition, label]);
|
90
91
|
useEffect(function () {
|
91
92
|
//this will focus the first input field in the popover
|
92
|
-
if (open &&
|
93
|
-
var firstFocusableElement =
|
93
|
+
if (open && popoverRef.current) {
|
94
|
+
var firstFocusableElement = popoverRef.current.querySelector('input,textarea');
|
94
95
|
if (firstFocusableElement) {
|
95
|
-
|
96
|
+
setTimeout(function () {
|
97
|
+
return firstFocusableElement.focus();
|
98
|
+
}, 0);
|
96
99
|
}
|
97
100
|
}
|
98
|
-
}, [
|
101
|
+
}, [popoverRef, open]);
|
102
|
+
var manageInvalidSelection = function manageInvalidSelection() {
|
103
|
+
//when the user didn't select any value , we need to show as incomplete
|
104
|
+
if (rest['data-name'] === 'propertyField' && !(condition !== null && condition !== void 0 && condition.property) || rest['data-name'] === 'operatorField' && !(condition !== null && condition !== void 0 && condition.operator) || rest['data-name'] === 'valueField' && !(condition !== null && condition !== void 0 && condition.value)) {
|
105
|
+
onChange === null || onChange === void 0 || onChange('INVALID');
|
106
|
+
}
|
107
|
+
};
|
99
108
|
var closePopover = function closePopover() {
|
100
|
-
|
109
|
+
if (open) {
|
110
|
+
manageInvalidSelection();
|
111
|
+
}
|
112
|
+
setOpen(false);
|
101
113
|
};
|
102
114
|
var openPopOver = function openPopOver() {
|
103
115
|
return setOpen(true);
|
104
116
|
};
|
105
117
|
var togglePopover = function togglePopover() {
|
106
|
-
|
118
|
+
if (children || renderChildren) {
|
119
|
+
setOpen(!open);
|
120
|
+
}
|
121
|
+
};
|
122
|
+
var handleKeyDownHandler = function handleKeyDownHandler(evt) {
|
123
|
+
handleKeyDownForPopover(evt, conditionBuilderRef, popoverRef);
|
124
|
+
if (evt.key === 'Escape') {
|
125
|
+
manageInvalidSelection();
|
126
|
+
}
|
107
127
|
};
|
108
128
|
return /*#__PURE__*/React__default.createElement(Popover, {
|
109
129
|
open: open,
|
110
130
|
isTabTip: true,
|
111
131
|
role: "gridcell",
|
112
|
-
className: popOverClassName,
|
132
|
+
className: "".concat(popOverClassName, " ").concat(blockClass, "__popover"),
|
113
133
|
ref: popoverRef,
|
114
134
|
onRequestClose: closePopover
|
115
135
|
}, /*#__PURE__*/React__default.createElement(ConditionBuilderButton, _extends({
|
@@ -124,13 +144,13 @@ var ConditionBuilderItem = function ConditionBuilderItem(_ref) {
|
|
124
144
|
isInvalid: isInvalid,
|
125
145
|
condition: condition
|
126
146
|
}, rest)), open && /*#__PURE__*/React__default.createElement(PopoverContent, {
|
127
|
-
className: "".concat(blockClass, "
|
147
|
+
className: "".concat(blockClass, "__popover-content-wrapper"),
|
128
148
|
role: "dialog",
|
129
|
-
"aria-label": title
|
149
|
+
"aria-label": title,
|
150
|
+
onKeyDown: handleKeyDownHandler
|
130
151
|
}, /*#__PURE__*/React__default.createElement(Layer, null, /*#__PURE__*/React__default.createElement("h1", {
|
131
152
|
className: "".concat(blockClass, "__item__title")
|
132
153
|
}, title), /*#__PURE__*/React__default.createElement("div", {
|
133
|
-
ref: contentRef,
|
134
154
|
className: "".concat(blockClass, "__popover-content")
|
135
155
|
}, renderChildren ? renderChildren(popoverRef) : children))));
|
136
156
|
};
|
@@ -156,6 +176,10 @@ ConditionBuilderItem.propTypes = {
|
|
156
176
|
* text to be displayed in the field
|
157
177
|
*/
|
158
178
|
label: PropTypes.oneOfType([PropTypes.string, PropTypes.array, PropTypes.object]),
|
179
|
+
/**
|
180
|
+
* callback to update the current condition of the state tree
|
181
|
+
*/
|
182
|
+
onChange: PropTypes.func,
|
159
183
|
/**
|
160
184
|
* class name for popover
|
161
185
|
*/
|
@@ -24,7 +24,7 @@ var ConditionBuilderItemDate = function ConditionBuilderItemDate(_ref) {
|
|
24
24
|
endText = _useTranslations2[1];
|
25
25
|
var datePickerType = conditionState.operator == 'between' ? 'range' : 'single';
|
26
26
|
var onCloseHandler = function onCloseHandler(selectedDate) {
|
27
|
-
onChange(selectedDate && selectedDate.length > 0 ? selectedDate : '
|
27
|
+
onChange(selectedDate && selectedDate.length > 0 ? selectedDate : 'INVALID');
|
28
28
|
};
|
29
29
|
return /*#__PURE__*/React__default.createElement("div", {
|
30
30
|
className: "".concat(blockClass, "__item-date ")
|
@@ -22,7 +22,7 @@ var ConditionBuilderItemNumber = function ConditionBuilderItemNumber(_ref) {
|
|
22
22
|
invalidNumberWarnText = _useTranslations2[0];
|
23
23
|
var onChangeHandler = function onChangeHandler(e, _ref2) {
|
24
24
|
var value = _ref2.value;
|
25
|
-
if (!isNaN(value) && checkIfValid(value)) {
|
25
|
+
if (value !== '' && !isNaN(value) && checkIfValid(value)) {
|
26
26
|
var _config$unit;
|
27
27
|
onChange("".concat(value, " ").concat((_config$unit = config.unit) !== null && _config$unit !== void 0 ? _config$unit : ''));
|
28
28
|
} else {
|
@@ -36,8 +36,8 @@ var ConditionBuilderItemNumber = function ConditionBuilderItemNumber(_ref) {
|
|
36
36
|
return true;
|
37
37
|
};
|
38
38
|
var getDefaultValue = function getDefaultValue() {
|
39
|
-
var _conditionState$value;
|
40
|
-
return (_conditionState$value = conditionState.value) === null || _conditionState$
|
39
|
+
var _conditionState$value, _conditionState$value2;
|
40
|
+
return (_conditionState$value = (_conditionState$value2 = conditionState.value) === null || _conditionState$value2 === void 0 || (_conditionState$value2 = _conditionState$value2.split(' ')) === null || _conditionState$value2 === void 0 ? void 0 : _conditionState$value2[0]) !== null && _conditionState$value !== void 0 ? _conditionState$value : '';
|
41
41
|
};
|
42
42
|
return /*#__PURE__*/React__default.createElement("div", {
|
43
43
|
className: "".concat(blockClass, "__item-number")
|
@@ -113,14 +113,17 @@ var ItemOptionForValueField = function ItemOptionForValueField(_ref) {
|
|
113
113
|
setSearchValue(value);
|
114
114
|
};
|
115
115
|
var onClickHandler = function onClickHandler(evt, option, isSelected) {
|
116
|
+
var updatedSelections = selection.filter(function (item) {
|
117
|
+
return item !== 'INVALID';
|
118
|
+
});
|
116
119
|
if (multiSelectable) {
|
117
120
|
if (isSelected) {
|
118
|
-
var items =
|
121
|
+
var items = updatedSelections.filter(function (v) {
|
119
122
|
return v.id !== option.id;
|
120
123
|
});
|
121
|
-
onChange(items.length > 0 ? items : undefined
|
124
|
+
onChange(items.length > 0 ? items : undefined);
|
122
125
|
} else {
|
123
|
-
onChange([].concat(_toConsumableArray(
|
126
|
+
onChange([].concat(_toConsumableArray(updatedSelections), [option]));
|
124
127
|
}
|
125
128
|
} else {
|
126
129
|
onChange(option, evt);
|
@@ -10,9 +10,10 @@ import React__default from 'react';
|
|
10
10
|
import { TextArea, TextInput } from '@carbon/react';
|
11
11
|
import PropTypes from '../../../../node_modules/prop-types/index.js';
|
12
12
|
import { blockClass } from '../../ConditionBuilderContext/DataConfigs.js';
|
13
|
+
import { checkIsValid } from '../../utils/util.js';
|
13
14
|
|
14
15
|
var ConditionBuilderItemText = function ConditionBuilderItemText(_ref) {
|
15
|
-
var _conditionState$
|
16
|
+
var _conditionState$prope;
|
16
17
|
var conditionState = _ref.conditionState,
|
17
18
|
_onChange = _ref.onChange,
|
18
19
|
config = _ref.config,
|
@@ -20,7 +21,7 @@ var ConditionBuilderItemText = function ConditionBuilderItemText(_ref) {
|
|
20
21
|
var inputProps = _objectSpread2({
|
21
22
|
labelText: conditionState.property,
|
22
23
|
hideLabel: true,
|
23
|
-
value: (
|
24
|
+
value: checkIsValid(conditionState.value) ? conditionState.value : '',
|
24
25
|
id: (_conditionState$prope = conditionState.property) === null || _conditionState$prope === void 0 ? void 0 : _conditionState$prope.replace(/\s/g, ''),
|
25
26
|
onChange: function onChange(evt) {
|
26
27
|
_onChange(evt.target.value);
|