@carbon/ibm-products 2.42.1-canary.27 → 2.42.1-canary.4
Sign up to get free protection for your applications and to get access to all the features.
- package/css/index-full-carbon.css +9 -302
- 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.css +9 -302
- 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 +9 -302
- 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/ConditionBuilder/ConditionBlock/ConditionBlock.d.ts +0 -6
- package/es/components/ConditionBuilder/ConditionBlock/ConditionBlock.js +33 -74
- package/es/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.d.ts +1 -15
- package/es/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.js +12 -95
- package/es/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.d.ts +2 -11
- package/es/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.js +9 -27
- package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts +0 -5
- package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +14 -95
- package/es/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.d.ts +0 -1
- package/es/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.js +0 -1
- package/es/components/ConditionBuilder/ConditionBuilderContext/translationObject.d.ts +0 -7
- package/es/components/ConditionBuilder/ConditionBuilderContext/translationObject.js +1 -8
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +1 -1
- package/es/components/ConditionBuilder/{ConditionBuilderConnector → ConditionConnector}/ConditionConnector.js +33 -38
- package/es/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.js +67 -197
- package/es/components/ConditionBuilder/utils/util.d.ts +0 -1
- package/es/components/Datagrid/Datagrid/DatagridHeaderRow.js +1 -1
- package/es/components/Datagrid/Datagrid/DatagridVirtualBody.d.ts +1 -1
- package/es/components/Datagrid/Datagrid/DatagridVirtualBody.js +5 -0
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +4 -7
- package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilterContext.d.ts +1 -7
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.d.ts +0 -1
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +3 -13
- package/es/components/Datagrid/types/index.d.ts +0 -2
- package/es/components/Datagrid/useColumnOrder.d.ts +1 -7
- package/es/components/Datagrid/useFiltering.d.ts +1 -8
- package/es/components/Datagrid/useFiltering.js +7 -8
- package/es/components/Datagrid/useFlexResize.d.ts +1 -1
- package/es/components/Datagrid/useFlexResize.js +11 -11
- package/es/components/Datagrid/useNestedRows.js +2 -24
- package/es/components/Datagrid/useOnRowClick.d.ts +1 -8
- package/es/components/Datagrid/useOnRowClick.js +1 -2
- package/es/components/Datagrid/useRowIsMouseOver.d.ts +1 -2
- package/es/components/Datagrid/useRowIsMouseOver.js +1 -1
- package/es/components/Datagrid/useSelectRows.d.ts +1 -8
- package/es/components/Datagrid/useSelectRows.js +2 -3
- package/es/components/Datagrid/useSortableColumns.d.ts +3 -10
- package/es/components/Datagrid/useSortableColumns.js +2 -3
- package/es/components/Datagrid/utils/getAutoSizedColumnWidth.d.ts +1 -8
- package/es/components/Datagrid/utils/getAutoSizedColumnWidth.js +7 -0
- package/es/components/SidePanel/SidePanel.d.ts +2 -2
- package/es/components/SidePanel/SidePanel.js +5 -9
- package/lib/components/ConditionBuilder/ConditionBlock/ConditionBlock.d.ts +0 -6
- package/lib/components/ConditionBuilder/ConditionBlock/ConditionBlock.js +32 -73
- package/lib/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.d.ts +1 -15
- package/lib/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.js +9 -92
- package/lib/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.d.ts +2 -11
- package/lib/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.js +8 -26
- package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts +0 -5
- package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +11 -92
- package/lib/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.d.ts +0 -1
- package/lib/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.js +0 -1
- package/lib/components/ConditionBuilder/ConditionBuilderContext/translationObject.d.ts +0 -7
- package/lib/components/ConditionBuilder/ConditionBuilderContext/translationObject.js +1 -8
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +1 -1
- package/lib/components/ConditionBuilder/{ConditionBuilderConnector → ConditionConnector}/ConditionConnector.js +31 -36
- package/lib/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.js +64 -195
- package/lib/components/ConditionBuilder/utils/util.d.ts +0 -1
- package/lib/components/Datagrid/Datagrid/DatagridHeaderRow.js +1 -1
- package/lib/components/Datagrid/Datagrid/DatagridVirtualBody.d.ts +1 -1
- package/lib/components/Datagrid/Datagrid/DatagridVirtualBody.js +5 -0
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +4 -7
- package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilterContext.d.ts +1 -7
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.d.ts +0 -1
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +3 -13
- package/lib/components/Datagrid/types/index.d.ts +0 -2
- package/lib/components/Datagrid/useColumnOrder.d.ts +1 -7
- package/lib/components/Datagrid/useFiltering.d.ts +1 -8
- package/lib/components/Datagrid/useFiltering.js +7 -8
- package/lib/components/Datagrid/useFlexResize.d.ts +1 -1
- package/lib/components/Datagrid/useFlexResize.js +11 -11
- package/lib/components/Datagrid/useNestedRows.js +2 -24
- package/lib/components/Datagrid/useOnRowClick.d.ts +1 -8
- package/lib/components/Datagrid/useOnRowClick.js +1 -2
- package/lib/components/Datagrid/useRowIsMouseOver.d.ts +1 -2
- package/lib/components/Datagrid/useRowIsMouseOver.js +1 -1
- package/lib/components/Datagrid/useSelectRows.d.ts +1 -8
- package/lib/components/Datagrid/useSelectRows.js +2 -3
- package/lib/components/Datagrid/useSortableColumns.d.ts +3 -10
- package/lib/components/Datagrid/useSortableColumns.js +2 -3
- package/lib/components/Datagrid/utils/getAutoSizedColumnWidth.d.ts +1 -8
- package/lib/components/Datagrid/utils/getAutoSizedColumnWidth.js +7 -0
- package/lib/components/SidePanel/SidePanel.d.ts +2 -2
- package/lib/components/SidePanel/SidePanel.js +5 -9
- package/package.json +3 -3
- package/scss/components/ConditionBuilder/_condition-builder.scss +1 -21
- package/scss/components/ConditionBuilder/styles/_conditionBuilderCondition.scss +3 -22
- package/scss/components/ConditionBuilder/styles/_conditionBuilderItem.scss +21 -58
- package/telemetry.yml +0 -23
- package/es/components/ConditionBuilder/ConditionBuilderConnector/GroupConnector.d.ts +0 -2
- package/es/components/ConditionBuilder/ConditionBuilderConnector/GroupConnector.js +0 -44
- package/es/components/ConditionBuilder/ConditionPreview/ConditionPreview.d.ts +0 -10
- package/es/components/ConditionBuilder/ConditionPreview/ConditionPreview.js +0 -69
- package/lib/components/ConditionBuilder/ConditionBuilderConnector/GroupConnector.d.ts +0 -2
- package/lib/components/ConditionBuilder/ConditionBuilderConnector/GroupConnector.js +0 -52
- package/lib/components/ConditionBuilder/ConditionPreview/ConditionPreview.d.ts +0 -10
- package/lib/components/ConditionBuilder/ConditionPreview/ConditionPreview.js +0 -77
- /package/es/components/ConditionBuilder/{ConditionBuilderConnector → ConditionConnector}/ConditionConnector.d.ts +0 -0
- /package/lib/components/ConditionBuilder/{ConditionBuilderConnector → ConditionConnector}/ConditionConnector.d.ts +0 -0
@@ -5,7 +5,7 @@
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
6
6
|
*/
|
7
7
|
|
8
|
-
import { slicedToArray as _slicedToArray,
|
8
|
+
import { slicedToArray as _slicedToArray, defineProperty as _defineProperty, objectSpread2 as _objectSpread2 } from '../../../_virtual/_rollupPluginBabelHelpers.js';
|
9
9
|
import React__default, { useContext, useState } from 'react';
|
10
10
|
import { Close } from '@carbon/react/icons';
|
11
11
|
import { ConditionBuilderItem } from '../ConditionBuilderItem/ConditionBuilderItem.js';
|
@@ -13,7 +13,7 @@ import PropTypes from '../../../node_modules/prop-types/index.js';
|
|
13
13
|
import { blockClass, translateWithId, statementConfig, operatorConfig } from '../ConditionBuilderContext/DataConfigs.js';
|
14
14
|
import { ConditionBuilderItemOption } from '../ConditionBuilderItem/ConditionBuilderItemOption/ConditionBuilderItemOption.js';
|
15
15
|
import cx from 'classnames';
|
16
|
-
import ConditionConnector from '../
|
16
|
+
import ConditionConnector from '../ConditionConnector/ConditionConnector.js';
|
17
17
|
import { ConditionBuilderItemNumber } from '../ConditionBuilderItem/ConditionBuilderItemNumber/ConditionBuilderItemNumber.js';
|
18
18
|
import { ConditionBuilderItemText } from '../ConditionBuilderItem/ConditionBuilderItemText/ConditionBuilderItemText.js';
|
19
19
|
import { ConditionBuilderItemDate } from '../ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.js';
|
@@ -23,7 +23,6 @@ import { focusThisField } from '../utils/util.js';
|
|
23
23
|
import { ConditionBuilderItemTime } from '../ConditionBuilderItem/ConditionBuilderItemTime/ConditionBuilderItemTime.js';
|
24
24
|
import ConditionBuilderAdd from '../ConditionBuilderAdd/ConditionBuilderAdd.js';
|
25
25
|
|
26
|
-
var _div;
|
27
26
|
/**
|
28
27
|
* This component build each block of condition consisting of property, operator value and close button.
|
29
28
|
*/
|
@@ -41,19 +40,11 @@ var ConditionBlock = function ConditionBlock(props) {
|
|
41
40
|
isStatement = props.isStatement,
|
42
41
|
group = props.group,
|
43
42
|
onStatementChange = props.onStatementChange,
|
44
|
-
conditionIndex = props.conditionIndex,
|
45
43
|
addConditionHandler = props.addConditionHandler,
|
46
|
-
|
47
|
-
aria = props.aria,
|
48
|
-
hideConditionSubGroupPreviewHandler = props.hideConditionSubGroupPreviewHandler,
|
49
|
-
showConditionSubGroupPreviewHandler = props.showConditionSubGroupPreviewHandler,
|
50
|
-
hideConditionPreviewHandler = props.hideConditionPreviewHandler,
|
51
|
-
showConditionPreviewHandler = props.showConditionPreviewHandler,
|
44
|
+
conditionIndex = props.conditionIndex,
|
52
45
|
isLastCondition = props.isLastCondition;
|
53
46
|
var _useContext = useContext(ConditionBuilderContext),
|
54
|
-
inputConfig = _useContext.inputConfig
|
55
|
-
variant = _useContext.variant;
|
56
|
-
//Below possible input types expected for value field.
|
47
|
+
inputConfig = _useContext.inputConfig;
|
57
48
|
var itemComponents = {
|
58
49
|
option: ConditionBuilderItemOption,
|
59
50
|
text: ConditionBuilderItemText,
|
@@ -78,17 +69,14 @@ var ConditionBlock = function ConditionBlock(props) {
|
|
78
69
|
type = _getCurrentConfig.type,
|
79
70
|
config = _getCurrentConfig.config,
|
80
71
|
label = _getCurrentConfig.label;
|
81
|
-
var ItemComponent;
|
82
|
-
// if (type == 'custom') {
|
83
|
-
// ItemComponent = config.component;
|
84
|
-
// } else {
|
85
|
-
ItemComponent = property ? itemComponents[type] : null;
|
86
|
-
//}
|
87
|
-
|
72
|
+
var ItemComponent = property ? itemComponents[type] : null;
|
88
73
|
var onStatementChangeHandler = function onStatementChangeHandler(v, evt) {
|
89
74
|
focusThisField(evt);
|
90
75
|
onStatementChange(v);
|
91
76
|
};
|
77
|
+
var onConnectorOperatorChangeHandler = function onConnectorOperatorChangeHandler(op) {
|
78
|
+
onConnectorOperatorChange(op);
|
79
|
+
};
|
92
80
|
var onPropertyChangeHandler = function onPropertyChangeHandler(newProperty) {
|
93
81
|
onChange(_objectSpread2(_objectSpread2({}, condition), {}, {
|
94
82
|
property: newProperty,
|
@@ -121,32 +109,21 @@ var ConditionBlock = function ConditionBlock(props) {
|
|
121
109
|
return operator.type.indexOf(type) != -1 || operator.type == 'all';
|
122
110
|
});
|
123
111
|
};
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
'aria-posinset': aria.posinset,
|
128
|
-
'aria-setsize': aria.setsize
|
129
|
-
} : {};
|
130
|
-
};
|
131
|
-
return /*#__PURE__*/React__default.createElement("div", _extends({
|
132
|
-
className: cx("".concat(blockClass, "__condition-block"), _defineProperty({}, "".concat(blockClass, "__condition__deletion-preview"), showDeletionPreview), _defineProperty({}, "".concat(blockClass, "__gap-bottom"), variant == 'tree' && !(conditionIndex + 1 >= group.conditions.length)), _defineProperty({}, "".concat(blockClass, "__gap ").concat(blockClass, "__gap-bottom"), variant == 'sentence')),
|
112
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
113
|
+
className: cx("".concat(blockClass, "__condition-block conditionBlockWrapper ").concat(blockClass, "__gap ").concat(blockClass, "__gap-bottom"), _defineProperty({}, "".concat(blockClass, "__condition__deletion-preview"), showDeletionPreview)),
|
114
|
+
key: conditionIndex,
|
133
115
|
role: "row",
|
134
116
|
"aria-label": translateWithId('condition_row'),
|
135
117
|
tabIndex: -1
|
136
|
-
},
|
137
|
-
|
138
|
-
|
139
|
-
onChange: function onChange(op) {
|
140
|
-
return onConnectorOperatorChange(op);
|
141
|
-
}
|
142
|
-
}) : _div || (_div = /*#__PURE__*/React__default.createElement("div", {
|
143
|
-
role: "gridcell"
|
144
|
-
})), isStatement && /*#__PURE__*/React__default.createElement(ConditionBuilderItem, {
|
118
|
+
}, isStatement && /*#__PURE__*/React__default.createElement(ConditionBuilderItem
|
119
|
+
// open={false}
|
120
|
+
, {
|
145
121
|
label: group.statement,
|
146
122
|
title: translateWithId('condition'),
|
147
123
|
"data-name": "connectorField",
|
148
124
|
popOverClassName: "".concat(blockClass, "__gap"),
|
149
|
-
className: "".concat(blockClass, "__statement-button")
|
125
|
+
className: "".concat(blockClass, "__statement-button"),
|
126
|
+
tabIndex: 0
|
150
127
|
}, /*#__PURE__*/React__default.createElement(ConditionBuilderItemOption, {
|
151
128
|
conditionState: {
|
152
129
|
value: group.statement,
|
@@ -156,7 +133,11 @@ var ConditionBlock = function ConditionBlock(props) {
|
|
156
133
|
config: {
|
157
134
|
options: statementConfig
|
158
135
|
}
|
159
|
-
})), /*#__PURE__*/React__default.createElement(
|
136
|
+
})), conjunction && /*#__PURE__*/React__default.createElement(ConditionConnector, {
|
137
|
+
className: "".concat(blockClass, "__gap"),
|
138
|
+
operator: conjunction,
|
139
|
+
onChange: onConnectorOperatorChangeHandler
|
140
|
+
}), /*#__PURE__*/React__default.createElement(ConditionBuilderItem, {
|
160
141
|
label: label,
|
161
142
|
title: translateWithId('property'),
|
162
143
|
renderIcon: icon !== null && icon !== void 0 ? icon : null,
|
@@ -203,8 +184,7 @@ var ConditionBlock = function ConditionBlock(props) {
|
|
203
184
|
value: value
|
204
185
|
},
|
205
186
|
onChange: onValueChangeHandler,
|
206
|
-
config: config
|
207
|
-
"data-name": "valueField"
|
187
|
+
config: config
|
208
188
|
})), /*#__PURE__*/React__default.createElement("span", {
|
209
189
|
role: "gridcell",
|
210
190
|
"aria-label": translateWithId('remove_condition')
|
@@ -222,15 +202,9 @@ var ConditionBlock = function ConditionBlock(props) {
|
|
222
202
|
})), isLastCondition(conditionIndex, group.conditions) && /*#__PURE__*/React__default.createElement(ConditionBuilderAdd, {
|
223
203
|
onClick: function onClick() {
|
224
204
|
addConditionHandler(conditionIndex);
|
225
|
-
}
|
226
|
-
addConditionSubGroupHandler
|
227
|
-
|
228
|
-
},
|
229
|
-
showConditionSubGroupPreviewHandler: showConditionSubGroupPreviewHandler,
|
230
|
-
hideConditionSubGroupPreviewHandler: hideConditionSubGroupPreviewHandler,
|
231
|
-
enableSubGroup: variant == 'tree',
|
232
|
-
showConditionPreviewHandler: showConditionPreviewHandler,
|
233
|
-
hideConditionPreviewHandler: hideConditionPreviewHandler,
|
205
|
+
}
|
206
|
+
//addConditionSubGroupHandler={()=>{addConditionSubGroupHandler(conditionIndex)}}
|
207
|
+
,
|
234
208
|
className: "".concat(blockClass, "__gap ").concat(blockClass, "__gap-left")
|
235
209
|
}));
|
236
210
|
};
|
@@ -240,15 +214,17 @@ ConditionBlock.propTypes = {
|
|
240
214
|
* callback to add a new condition
|
241
215
|
*/
|
242
216
|
addConditionHandler: PropTypes.func,
|
243
|
-
/**
|
244
|
-
* callback to add a new condition subgroup
|
245
|
-
*/
|
246
|
-
addConditionSubGroupHandler: PropTypes.func,
|
247
217
|
/**
|
248
218
|
* object hold aria attributes
|
249
219
|
*/
|
250
220
|
aria: PropTypes.object,
|
221
|
+
/**
|
222
|
+
* object that hold the current condition
|
223
|
+
*/
|
251
224
|
condition: PropTypes.object,
|
225
|
+
/**
|
226
|
+
* index of the current condition
|
227
|
+
*/
|
252
228
|
conditionIndex: PropTypes.number,
|
253
229
|
/**
|
254
230
|
* string that decides to show the condition connector
|
@@ -259,13 +235,8 @@ ConditionBlock.propTypes = {
|
|
259
235
|
*/
|
260
236
|
group: PropTypes.object,
|
261
237
|
/**
|
262
|
-
*
|
263
|
-
*/
|
264
|
-
hideConditionPreviewHandler: PropTypes.func,
|
265
|
-
/**
|
266
|
-
* handler for hiding sub group preview
|
238
|
+
* callback to add a new condition
|
267
239
|
*/
|
268
|
-
hideConditionSubGroupPreviewHandler: PropTypes.func,
|
269
240
|
isLastCondition: PropTypes.func,
|
270
241
|
/**
|
271
242
|
* boolean that decides to show the statement(if/ excl.if)
|
@@ -286,19 +257,7 @@ ConditionBlock.propTypes = {
|
|
286
257
|
/**
|
287
258
|
* callback to handle the statement(if/ excl.if) change
|
288
259
|
*/
|
289
|
-
onStatementChange: PropTypes.func
|
290
|
-
/**
|
291
|
-
* handler for showing add condition preview
|
292
|
-
*/
|
293
|
-
showConditionPreviewHandler: PropTypes.func,
|
294
|
-
/**
|
295
|
-
* handler for showing sub group preview
|
296
|
-
*/
|
297
|
-
showConditionSubGroupPreviewHandler: PropTypes.func,
|
298
|
-
/**
|
299
|
-
* object that hold the current condition
|
300
|
-
*/
|
301
|
-
state: PropTypes.object
|
260
|
+
onStatementChange: PropTypes.func
|
302
261
|
};
|
303
262
|
|
304
263
|
export { ConditionBlock$1 as default };
|
@@ -1,26 +1,12 @@
|
|
1
1
|
export default ConditionBuilderAdd;
|
2
|
-
declare function ConditionBuilderAdd({ className, onClick
|
2
|
+
declare function ConditionBuilderAdd({ className, onClick }: {
|
3
3
|
className: any;
|
4
4
|
onClick: any;
|
5
|
-
addConditionSubGroupHandler: any;
|
6
|
-
showConditionSubGroupPreviewHandler: any;
|
7
|
-
hideConditionSubGroupPreviewHandler: any;
|
8
|
-
showConditionPreviewHandler: any;
|
9
|
-
hideConditionPreviewHandler: any;
|
10
|
-
enableSubGroup: any;
|
11
|
-
buttonLabel: any;
|
12
5
|
}): import("react/jsx-runtime").JSX.Element;
|
13
6
|
declare namespace ConditionBuilderAdd {
|
14
7
|
namespace propTypes {
|
15
|
-
let addConditionSubGroupHandler: PropTypes.Requireable<(...args: any[]) => any>;
|
16
|
-
let buttonLabel: PropTypes.Requireable<string>;
|
17
8
|
let className: PropTypes.Requireable<string>;
|
18
|
-
let enableSubGroup: PropTypes.Requireable<boolean>;
|
19
|
-
let hideConditionPreviewHandler: PropTypes.Requireable<(...args: any[]) => any>;
|
20
|
-
let hideConditionSubGroupPreviewHandler: PropTypes.Requireable<(...args: any[]) => any>;
|
21
9
|
let onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
22
|
-
let showConditionPreviewHandler: PropTypes.Requireable<(...args: any[]) => any>;
|
23
|
-
let showConditionSubGroupPreviewHandler: PropTypes.Requireable<(...args: any[]) => any>;
|
24
10
|
}
|
25
11
|
}
|
26
12
|
import PropTypes from 'prop-types';
|
@@ -5,119 +5,36 @@
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
6
6
|
*/
|
7
7
|
|
8
|
-
import
|
9
|
-
import
|
10
|
-
import { AddAlt, TextNewLine } from '@carbon/react/icons';
|
8
|
+
import React__default from 'react';
|
9
|
+
import { AddAlt } from '@carbon/react/icons';
|
11
10
|
import { ConditionBuilderButton } from '../ConditionBuilderButton/ConditionBuilderButton.js';
|
12
11
|
import PropTypes from '../../../node_modules/prop-types/index.js';
|
13
|
-
import {
|
12
|
+
import { blockClass, translateWithId } from '../ConditionBuilderContext/DataConfigs.js';
|
14
13
|
|
15
14
|
var ConditionBuilderAdd = function ConditionBuilderAdd(_ref) {
|
16
15
|
var className = _ref.className,
|
17
|
-
onClick = _ref.onClick
|
18
|
-
addConditionSubGroupHandler = _ref.addConditionSubGroupHandler,
|
19
|
-
showConditionSubGroupPreviewHandler = _ref.showConditionSubGroupPreviewHandler,
|
20
|
-
hideConditionSubGroupPreviewHandler = _ref.hideConditionSubGroupPreviewHandler,
|
21
|
-
showConditionPreviewHandler = _ref.showConditionPreviewHandler,
|
22
|
-
hideConditionPreviewHandler = _ref.hideConditionPreviewHandler,
|
23
|
-
enableSubGroup = _ref.enableSubGroup,
|
24
|
-
buttonLabel = _ref.buttonLabel;
|
25
|
-
var _useState = useState(false),
|
26
|
-
_useState2 = _slicedToArray(_useState, 2),
|
27
|
-
isAddSubgroup = _useState2[0],
|
28
|
-
setIsAddSubgroup = _useState2[1];
|
29
|
-
var showAddSubGroup = function showAddSubGroup() {
|
30
|
-
setIsAddSubgroup(true);
|
31
|
-
};
|
32
|
-
var hideAddSubGroup = function hideAddSubGroup() {
|
33
|
-
setIsAddSubgroup(false);
|
34
|
-
};
|
35
|
-
var onClickHandler = function onClickHandler() {
|
36
|
-
hideConditionPreviewHandler === null || hideConditionPreviewHandler === void 0 || hideConditionPreviewHandler();
|
37
|
-
onClick();
|
38
|
-
};
|
39
|
-
var previewHandlers = function previewHandlers() {
|
40
|
-
return enableSubGroup ? {
|
41
|
-
onMouseEnter: showConditionPreviewHandler,
|
42
|
-
onMouseLeave: hideConditionPreviewHandler,
|
43
|
-
onFocus: showConditionPreviewHandler,
|
44
|
-
onBlur: hideConditionPreviewHandler
|
45
|
-
} : {};
|
46
|
-
};
|
47
|
-
var previewHandlersForSubgroup = function previewHandlersForSubgroup() {
|
48
|
-
return {
|
49
|
-
onMouseEnter: showConditionSubGroupPreviewHandler,
|
50
|
-
onMouseLeave: hideConditionSubGroupPreviewHandler,
|
51
|
-
onFocus: showConditionSubGroupPreviewHandler,
|
52
|
-
onBlur: hideConditionSubGroupPreviewHandler
|
53
|
-
};
|
54
|
-
};
|
55
|
-
var wrapperProps = enableSubGroup ? {
|
56
|
-
role: 'gridcell',
|
57
|
-
'aria-label': translateWithId('add-condition')
|
58
|
-
} : {};
|
16
|
+
onClick = _ref.onClick;
|
59
17
|
return /*#__PURE__*/React__default.createElement("div", {
|
60
|
-
className:
|
61
|
-
role:
|
62
|
-
|
63
|
-
onMouseEnter: showAddSubGroup,
|
64
|
-
onMouseLeave: hideAddSubGroup,
|
65
|
-
onFocus: showAddSubGroup,
|
66
|
-
onBlur: hideAddSubGroup
|
67
|
-
}, /*#__PURE__*/React__default.createElement(ConditionBuilderButton, _extends({
|
18
|
+
className: className,
|
19
|
+
role: "gridcell"
|
20
|
+
}, /*#__PURE__*/React__default.createElement(ConditionBuilderButton, {
|
68
21
|
renderIcon: AddAlt,
|
69
|
-
onClick:
|
70
|
-
}, previewHandlers(), {
|
22
|
+
onClick: onClick,
|
71
23
|
className: "".concat(blockClass, "__add-button"),
|
72
24
|
hideLabel: true,
|
73
|
-
|
74
|
-
|
75
|
-
wrapperProps: wrapperProps
|
76
|
-
})), isAddSubgroup && enableSubGroup && /*#__PURE__*/React__default.createElement(ConditionBuilderButton, _extends({
|
77
|
-
renderIcon: TextNewLine,
|
78
|
-
onClick: addConditionSubGroupHandler,
|
79
|
-
className: "".concat(blockClass, "__add-condition-group ").concat(blockClass, "__gap-left"),
|
80
|
-
hideLabel: true,
|
81
|
-
label: translateWithId('add-condition'),
|
82
|
-
wrapperProps: wrapperProps
|
83
|
-
}, previewHandlersForSubgroup())));
|
25
|
+
label: translateWithId('add-condition')
|
26
|
+
}));
|
84
27
|
};
|
85
28
|
var ConditionBuilderAdd$1 = ConditionBuilderAdd;
|
86
29
|
ConditionBuilderAdd.propTypes = {
|
87
|
-
/**
|
88
|
-
* handler for hiding sub group preview
|
89
|
-
*/
|
90
|
-
addConditionSubGroupHandler: PropTypes.func,
|
91
|
-
/**
|
92
|
-
* handler for hiding sub group preview
|
93
|
-
*/ /**
|
94
|
-
* tooltip label for plus button
|
95
|
-
*/
|
96
|
-
buttonLabel: PropTypes.string,
|
97
30
|
/**
|
98
31
|
* Provide an optional class to be applied to the containing node.
|
99
32
|
*/
|
100
33
|
className: PropTypes.string,
|
101
34
|
/**
|
102
|
-
*
|
103
|
-
*/
|
104
|
-
enableSubGroup: PropTypes.bool,
|
105
|
-
/**
|
106
|
-
* handler for hiding sub group preview
|
107
|
-
*/
|
108
|
-
hideConditionPreviewHandler: PropTypes.func,
|
109
|
-
hideConditionSubGroupPreviewHandler: PropTypes.func,
|
110
|
-
/**
|
111
|
-
* handler for hiding sub group preview
|
112
|
-
*/ /**
|
113
|
-
* callback triggered on click of add button
|
114
|
-
*/
|
115
|
-
onClick: PropTypes.func,
|
116
|
-
showConditionPreviewHandler: PropTypes.func,
|
117
|
-
showConditionSubGroupPreviewHandler: PropTypes.func
|
118
|
-
/**
|
119
|
-
* handler for hiding sub group preview
|
35
|
+
* callback triggered on click of add button
|
120
36
|
*/
|
37
|
+
onClick: PropTypes.func
|
121
38
|
};
|
122
39
|
|
123
40
|
export { ConditionBuilderAdd$1 as default };
|
@@ -1,4 +1,5 @@
|
|
1
|
-
export function ConditionBuilderButton({ className, label, hideLabel, tooltipAlign, renderIcon: Icon, onClick, showToolTip,
|
1
|
+
export function ConditionBuilderButton({ className, label, hideLabel, tooltipAlign, renderIcon: Icon, onClick, showToolTip, ...rest }: {
|
2
|
+
[x: string]: any;
|
2
3
|
className: any;
|
3
4
|
label: any;
|
4
5
|
hideLabel: any;
|
@@ -6,26 +7,16 @@ export function ConditionBuilderButton({ className, label, hideLabel, tooltipAli
|
|
6
7
|
renderIcon: any;
|
7
8
|
onClick: any;
|
8
9
|
showToolTip: any;
|
9
|
-
wrapperProps: any;
|
10
|
-
onBlur: any;
|
11
|
-
onFocus: any;
|
12
|
-
onMouseEnter: any;
|
13
|
-
onMouseLeave: any;
|
14
10
|
}): import("react/jsx-runtime").JSX.Element;
|
15
11
|
export namespace ConditionBuilderButton {
|
16
12
|
namespace propTypes {
|
17
13
|
let className: PropTypes.Requireable<string>;
|
18
14
|
let hideLabel: PropTypes.Requireable<boolean>;
|
19
15
|
let label: PropTypes.Requireable<string>;
|
20
|
-
let onBlur: PropTypes.Requireable<(...args: any[]) => any>;
|
21
16
|
let onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
22
|
-
let onFocus: PropTypes.Requireable<(...args: any[]) => any>;
|
23
|
-
let onMouseEnter: PropTypes.Requireable<(...args: any[]) => any>;
|
24
|
-
let onMouseLeave: PropTypes.Requireable<(...args: any[]) => any>;
|
25
17
|
let renderIcon: PropTypes.Requireable<object>;
|
26
18
|
let showToolTip: PropTypes.Requireable<boolean>;
|
27
19
|
let tooltipAlign: PropTypes.Requireable<string>;
|
28
|
-
let wrapperProps: PropTypes.Requireable<object>;
|
29
20
|
}
|
30
21
|
}
|
31
22
|
import PropTypes from 'prop-types';
|
@@ -5,15 +5,16 @@
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
6
6
|
*/
|
7
7
|
|
8
|
-
import { extends as _extends, defineProperty as _defineProperty } from '../../../_virtual/_rollupPluginBabelHelpers.js';
|
8
|
+
import { objectWithoutProperties as _objectWithoutProperties, extends as _extends, defineProperty as _defineProperty } from '../../../_virtual/_rollupPluginBabelHelpers.js';
|
9
9
|
import React__default from 'react';
|
10
10
|
import cx from 'classnames';
|
11
11
|
import PropTypes from '../../../node_modules/prop-types/index.js';
|
12
12
|
import { Tooltip } from '@carbon/react';
|
13
13
|
import { blockClass } from '../ConditionBuilderContext/DataConfigs.js';
|
14
14
|
|
15
|
+
var _excluded = ["className", "label", "hideLabel", "tooltipAlign", "renderIcon", "onClick", "showToolTip"];
|
15
16
|
var ConditionBuilderButton = function ConditionBuilderButton(_ref) {
|
16
|
-
var _Icon
|
17
|
+
var _Icon;
|
17
18
|
var className = _ref.className,
|
18
19
|
label = _ref.label,
|
19
20
|
hideLabel = _ref.hideLabel,
|
@@ -21,29 +22,21 @@ var ConditionBuilderButton = function ConditionBuilderButton(_ref) {
|
|
21
22
|
Icon = _ref.renderIcon,
|
22
23
|
onClick = _ref.onClick,
|
23
24
|
showToolTip = _ref.showToolTip,
|
24
|
-
|
25
|
-
onBlur = _ref.onBlur,
|
26
|
-
onFocus = _ref.onFocus,
|
27
|
-
onMouseEnter = _ref.onMouseEnter,
|
28
|
-
onMouseLeave = _ref.onMouseLeave;
|
25
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
29
26
|
var Button = function Button() {
|
30
|
-
return /*#__PURE__*/React__default.createElement("button", {
|
27
|
+
return /*#__PURE__*/React__default.createElement("button", _extends({
|
31
28
|
// role={'gridcell'}
|
32
29
|
tabIndex: -1,
|
33
30
|
className: cx([className, "".concat(blockClass, "__button"), _defineProperty({}, "".concat(blockClass, "__text-ellipsis"), showToolTip && !hideLabel)]),
|
34
31
|
type: "button",
|
35
|
-
onClick: onClick
|
36
|
-
|
37
|
-
onFocus: onFocus,
|
38
|
-
onMouseEnter: onMouseEnter,
|
39
|
-
onMouseLeave: onMouseLeave
|
40
|
-
}, Icon && (_Icon || (_Icon = /*#__PURE__*/React__default.createElement(Icon, null))), !hideLabel && (_span || (_span = /*#__PURE__*/React__default.createElement("span", null, label))));
|
32
|
+
onClick: onClick
|
33
|
+
}, rest), Icon && (_Icon || (_Icon = /*#__PURE__*/React__default.createElement(Icon, null))), !hideLabel && label);
|
41
34
|
};
|
42
35
|
return hideLabel || showToolTip ? /*#__PURE__*/React__default.createElement(Tooltip, _extends({
|
43
36
|
label: label,
|
44
37
|
align: tooltipAlign,
|
45
38
|
className: "".concat(blockClass, "__con-tooltip")
|
46
|
-
}, wrapperProps), Button()) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, Button());
|
39
|
+
}, rest.wrapperProps), Button()) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, Button());
|
47
40
|
};
|
48
41
|
ConditionBuilderButton.propTypes = {
|
49
42
|
/**
|
@@ -58,17 +51,10 @@ ConditionBuilderButton.propTypes = {
|
|
58
51
|
* label of the button
|
59
52
|
*/
|
60
53
|
label: PropTypes.string,
|
61
|
-
/**
|
62
|
-
* mouse events callbacks
|
63
|
-
*/
|
64
|
-
onBlur: PropTypes.func,
|
65
54
|
/**
|
66
55
|
* callback triggered on click of add button
|
67
56
|
*/
|
68
57
|
onClick: PropTypes.func,
|
69
|
-
onFocus: PropTypes.func,
|
70
|
-
onMouseEnter: PropTypes.func,
|
71
|
-
onMouseLeave: PropTypes.func,
|
72
58
|
/**
|
73
59
|
* Optional prop to allow overriding the icon rendering.
|
74
60
|
*/
|
@@ -82,11 +68,7 @@ ConditionBuilderButton.propTypes = {
|
|
82
68
|
/**
|
83
69
|
* tooltip position
|
84
70
|
*/
|
85
|
-
tooltipAlign: PropTypes.string
|
86
|
-
/**
|
87
|
-
* optional props for tree grid to add role and aria-label to wrapper span
|
88
|
-
*/
|
89
|
-
wrapperProps: PropTypes.object
|
71
|
+
tooltipAlign: PropTypes.string
|
90
72
|
};
|
91
73
|
|
92
74
|
export { ConditionBuilderButton };
|
@@ -7,12 +7,7 @@ declare function ConditionBuilderContent({ startConditionLabel, conditionBuilder
|
|
7
7
|
}): import("react/jsx-runtime").JSX.Element;
|
8
8
|
declare namespace ConditionBuilderContent {
|
9
9
|
namespace propTypes {
|
10
|
-
let actions: PropTypes.Requireable<(PropTypes.InferProps<{
|
11
|
-
id: PropTypes.Requireable<number>;
|
12
|
-
label: PropTypes.Requireable<string>;
|
13
|
-
}> | null | undefined)[]>;
|
14
10
|
let conditionBuilderRef: PropTypes.Requireable<object>;
|
15
|
-
let getActionsState: PropTypes.Requireable<(...args: any[]) => any>;
|
16
11
|
let getConditionState: PropTypes.Validator<(...args: any[]) => any>;
|
17
12
|
let initialState: PropTypes.Requireable<PropTypes.InferProps<{
|
18
13
|
groups: PropTypes.Requireable<(PropTypes.InferProps<{
|
@@ -8,38 +8,25 @@
|
|
8
8
|
import { slicedToArray as _slicedToArray, objectSpread2 as _objectSpread2, extends as _extends, toConsumableArray as _toConsumableArray } from '../../../_virtual/_rollupPluginBabelHelpers.js';
|
9
9
|
import React__default, { useContext, useState, useEffect, useCallback } from 'react';
|
10
10
|
import PropTypes from '../../../node_modules/prop-types/index.js';
|
11
|
-
import { Button
|
12
|
-
import { Add
|
11
|
+
import { Button } from '@carbon/react';
|
12
|
+
import { Add } from '@carbon/react/icons';
|
13
13
|
import ConditionGroupBuilder from '../ConditionGroupBuilder/ConditionGroupBuilder.js';
|
14
14
|
import { ConditionBuilderContext, emptyState } from '../ConditionBuilderContext/ConditionBuilderProvider.js';
|
15
|
-
import { blockClass
|
16
|
-
import { ConditionBuilderButton } from '../ConditionBuilderButton/ConditionBuilderButton.js';
|
17
|
-
import uuidv4 from '../../../global/js/utils/uuidv4.js';
|
18
|
-
import ConditionPreview from '../ConditionPreview/ConditionPreview.js';
|
19
|
-
import GroupConnector from '../ConditionBuilderConnector/GroupConnector.js';
|
15
|
+
import { blockClass } from '../ConditionBuilderContext/DataConfigs.js';
|
20
16
|
|
21
|
-
var _Heading, _GroupConnector, _ConditionPreview;
|
22
17
|
var ConditionBuilderContent = function ConditionBuilderContent(_ref) {
|
23
18
|
var _rootState$groups2;
|
24
19
|
var startConditionLabel = _ref.startConditionLabel,
|
25
20
|
conditionBuilderRef = _ref.conditionBuilderRef,
|
26
21
|
getConditionState = _ref.getConditionState,
|
27
22
|
initialState = _ref.initialState;
|
28
|
-
// const { rootState, setRootState, variant, actionState } = useContext(
|
29
|
-
// ConditionBuilderContext
|
30
|
-
// );
|
31
23
|
var _useContext = useContext(ConditionBuilderContext),
|
32
24
|
rootState = _useContext.rootState,
|
33
|
-
setRootState = _useContext.setRootState
|
34
|
-
variant = _useContext.variant;
|
25
|
+
setRootState = _useContext.setRootState;
|
35
26
|
var _useState = useState(false),
|
36
27
|
_useState2 = _slicedToArray(_useState, 2),
|
37
28
|
isConditionBuilderActive = _useState2[0],
|
38
29
|
setIsConditionBuilderActive = _useState2[1];
|
39
|
-
var _useState3 = useState(false),
|
40
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
41
|
-
showConditionGroupPreview = _useState4[0],
|
42
|
-
setShowConditionGroupPreview = _useState4[1];
|
43
30
|
useEffect(function () {
|
44
31
|
var _rootState$groups;
|
45
32
|
if (rootState !== null && rootState !== void 0 && (_rootState$groups = rootState.groups) !== null && _rootState$groups !== void 0 && _rootState$groups.length) {
|
@@ -52,12 +39,7 @@ var ConditionBuilderContent = function ConditionBuilderContent(_ref) {
|
|
52
39
|
}
|
53
40
|
|
54
41
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
55
|
-
}, [rootState]);
|
56
|
-
|
57
|
-
// useEffect(() => {
|
58
|
-
// getActionsState?.(actionState);
|
59
|
-
// // eslint-disable-next-line react-hooks/exhaustive-deps
|
60
|
-
// }, [actionState]);
|
42
|
+
}, [rootState, conditionBuilderRef]);
|
61
43
|
var onStartConditionBuilder = function onStartConditionBuilder() {
|
62
44
|
//when add condition button is clicked.
|
63
45
|
setIsConditionBuilderActive(true);
|
@@ -81,28 +63,10 @@ var ConditionBuilderContent = function ConditionBuilderContent(_ref) {
|
|
81
63
|
groups: groups
|
82
64
|
}));
|
83
65
|
};
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
groupOperator: 'and',
|
89
|
-
//'and|or',
|
90
|
-
statement: 'if',
|
91
|
-
// 'if|exclude if',
|
92
|
-
id: uuidv4(),
|
93
|
-
conditions: [{
|
94
|
-
property: undefined,
|
95
|
-
operator: '',
|
96
|
-
value: '',
|
97
|
-
popoverToOpen: 'propertyField',
|
98
|
-
id: uuidv4()
|
99
|
-
}]
|
100
|
-
};
|
101
|
-
setRootState(_objectSpread2(_objectSpread2({}, rootState), {}, {
|
102
|
-
groups: [].concat(_toConsumableArray(rootState.groups), [newGroup])
|
103
|
-
}));
|
104
|
-
};
|
105
|
-
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, !isConditionBuilderActive && /*#__PURE__*/React__default.createElement(Button, {
|
66
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
67
|
+
className: "".concat(blockClass, "__content-container"),
|
68
|
+
tabIndex: -1
|
69
|
+
}, !isConditionBuilderActive && /*#__PURE__*/React__default.createElement(Button, {
|
106
70
|
className: "".concat(blockClass, "__add-condition-button"),
|
107
71
|
renderIcon: function renderIcon(props) {
|
108
72
|
return /*#__PURE__*/React__default.createElement(Add, _extends({
|
@@ -113,22 +77,10 @@ var ConditionBuilderContent = function ConditionBuilderContent(_ref) {
|
|
113
77
|
kind: "ghost",
|
114
78
|
size: "sm",
|
115
79
|
onClick: onStartConditionBuilder
|
116
|
-
}, startConditionLabel),
|
117
|
-
|
118
|
-
// <h5 >Condition</h5>
|
119
|
-
React__default.createElement(Section, {
|
120
|
-
className: "".concat(blockClass, "__heading"),
|
121
|
-
level: 4
|
122
|
-
}, _Heading || (_Heading = /*#__PURE__*/React__default.createElement(Heading, null, "Condition"))), /*#__PURE__*/React__default.createElement("div", {
|
123
|
-
className: "".concat(blockClass, "__content-container"),
|
124
|
-
role: "treegrid",
|
125
|
-
"aria-label": "condition builder tree"
|
126
|
-
}, rootState && (rootState === null || rootState === void 0 || (_rootState$groups2 = rootState.groups) === null || _rootState$groups2 === void 0 ? void 0 : _rootState$groups2.map(function (eachGroup, groupIndex) {
|
127
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
128
|
-
key: eachGroup.id,
|
129
|
-
className: "".concat(blockClass, "__group-wrapper")
|
130
|
-
}, /*#__PURE__*/React__default.createElement(ConditionGroupBuilder, {
|
80
|
+
}, startConditionLabel), rootState && (rootState === null || rootState === void 0 || (_rootState$groups2 = rootState.groups) === null || _rootState$groups2 === void 0 ? void 0 : _rootState$groups2.map(function (eachGroup, groupIndex) {
|
81
|
+
return /*#__PURE__*/React__default.createElement(ConditionGroupBuilder, {
|
131
82
|
className: "".concat(blockClass, "__group"),
|
83
|
+
key: groupIndex,
|
132
84
|
aria: {
|
133
85
|
level: 1,
|
134
86
|
posinset: groupIndex * 2 + 1,
|
@@ -142,48 +94,15 @@ var ConditionBuilderContent = function ConditionBuilderContent(_ref) {
|
|
142
94
|
onChangeHandler(updatedGroup, groupIndex);
|
143
95
|
},
|
144
96
|
conditionBuilderRef: conditionBuilderRef
|
145
|
-
})
|
146
|
-
}))
|
147
|
-
role: "row",
|
148
|
-
tabIndex: -1,
|
149
|
-
"aria-level": 1
|
150
|
-
}, /*#__PURE__*/React__default.createElement(ConditionBuilderButton, {
|
151
|
-
renderIcon: TextNewLine,
|
152
|
-
onClick: addConditionGroupHandler,
|
153
|
-
onMouseEnter: function onMouseEnter() {
|
154
|
-
setShowConditionGroupPreview(true);
|
155
|
-
},
|
156
|
-
onMouseLeave: function onMouseLeave() {
|
157
|
-
setShowConditionGroupPreview(false);
|
158
|
-
},
|
159
|
-
className: "".concat(blockClass, "__add-condition-group "),
|
160
|
-
hideLabel: true,
|
161
|
-
label: translateWithId('add-condition-sub-group'),
|
162
|
-
wrapperProps: {
|
163
|
-
role: 'gridcell',
|
164
|
-
'aria-label': translateWithId('add-condition-sub-group')
|
165
|
-
}
|
166
|
-
})), showConditionGroupPreview && (_ConditionPreview || (_ConditionPreview = /*#__PURE__*/React__default.createElement(ConditionPreview, {
|
167
|
-
previewType: "newGroup"
|
168
|
-
}))))));
|
97
|
+
});
|
98
|
+
})));
|
169
99
|
};
|
170
100
|
var ConditionBuilderContent$1 = ConditionBuilderContent;
|
171
101
|
ConditionBuilderContent.propTypes = {
|
172
|
-
/**
|
173
|
-
* optional array of object that give the list of actions.
|
174
|
-
*/
|
175
|
-
actions: PropTypes.arrayOf(PropTypes.shape({
|
176
|
-
id: PropTypes.number,
|
177
|
-
label: PropTypes.string
|
178
|
-
})),
|
179
102
|
/**
|
180
103
|
* ref of condition builder
|
181
104
|
*/
|
182
105
|
conditionBuilderRef: PropTypes.object,
|
183
|
-
/**
|
184
|
-
* callback functions that will provide the updated action state back.
|
185
|
-
*/
|
186
|
-
getActionsState: PropTypes.func,
|
187
106
|
/**
|
188
107
|
* This is a callback function that returns the updated state
|
189
108
|
*/
|