@carbon/ibm-products 2.38.0-alpha.5 → 2.39.0
Sign up to get free protection for your applications and to get access to all the features.
- package/css/index-full-carbon.css +227 -0
- 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 +218 -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 +227 -0
- 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 +445 -0
- 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/ActionSet/ActionSet.js +3 -2
- package/es/components/Card/Card.js +50 -9
- package/es/components/Card/CardFooter.d.ts +5 -1
- package/es/components/Card/CardFooter.js +11 -1
- package/es/components/Carousel/Carousel.d.ts +6 -2
- package/es/components/Checklist/Checklist.d.ts +100 -2
- package/es/components/Checklist/Checklist.js +19 -15
- package/es/components/Checklist/Checklist.types.d.ts +19 -0
- package/es/components/Checklist/Checklist.types.js +22 -0
- package/es/components/Checklist/ChecklistChart.d.ts +6 -2
- package/es/components/Checklist/ChecklistChart.js +14 -33
- package/es/components/Checklist/ChecklistIcon.d.ts +5 -1
- package/es/components/Checklist/ChecklistIcon.js +9 -4
- package/es/components/Coachmark/Coachmark.d.ts +65 -2
- package/es/components/Coachmark/Coachmark.js +7 -10
- package/es/components/Coachmark/CoachmarkDragbar.d.ts +40 -2
- package/es/components/Coachmark/CoachmarkDragbar.js +3 -1
- package/es/components/Coachmark/CoachmarkHeader.d.ts +27 -2
- package/es/components/Coachmark/CoachmarkHeader.js +0 -1
- package/es/components/Coachmark/CoachmarkOverlay.d.ts +42 -2
- package/es/components/Coachmark/CoachmarkOverlay.js +18 -15
- package/es/components/Coachmark/CoachmarkTagline.d.ts +27 -2
- package/es/components/Coachmark/CoachmarkTagline.js +0 -1
- package/es/components/Coachmark/utils/enums.d.ts +20 -20
- package/es/components/Coachmark/utils/enums.js +22 -20
- package/es/components/CoachmarkButton/CoachmarkButton.d.ts +19 -2
- package/es/components/CoachmarkFixed/CoachmarkFixed.d.ts +42 -2
- package/es/components/CoachmarkFixed/CoachmarkFixed.js +4 -2
- package/es/components/CoachmarkOverlayElements/CoachmarkOverlayElements.d.ts +46 -2
- package/es/components/CoachmarkOverlayElements/CoachmarkOverlayElements.js +5 -4
- package/es/components/ConditionBuilder/ConditionBlock/ConditionBlock.d.ts +2 -1
- package/es/components/ConditionBuilder/ConditionBlock/ConditionBlock.js +25 -23
- package/es/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.js +2 -2
- package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +14 -24
- package/es/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.d.ts +2 -0
- package/es/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.js +4 -1
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.d.ts +3 -3
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +11 -11
- package/es/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.d.ts +5 -3
- package/es/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.js +54 -44
- package/es/components/CreateInfluencer/CreateInfluencer.d.ts +55 -17
- package/es/components/DataSpreadsheet/DataSpreadsheet.d.ts +67 -2
- package/es/components/DataSpreadsheet/DataSpreadsheet.js +48 -27
- package/es/components/DataSpreadsheet/DataSpreadsheetBody.d.ts +139 -2
- package/es/components/DataSpreadsheet/DataSpreadsheetBody.js +60 -39
- package/es/components/DataSpreadsheet/DataSpreadsheetHeader.d.ts +89 -2
- package/es/components/DataSpreadsheet/DataSpreadsheetHeader.js +39 -27
- package/es/components/DataSpreadsheet/hooks/useMoveActiveCell.js +2 -1
- package/es/components/DataSpreadsheet/types/index.d.ts +30 -0
- package/es/components/EditTearsheetNarrow/EditTearsheetNarrow.d.ts +19 -2
- package/es/components/GetStartedCard/GetStartedCard.d.ts +5 -0
- package/es/components/GetStartedCard/GetStartedCard.js +82 -0
- package/es/components/GetStartedCard/index.d.ts +1 -0
- package/es/components/Guidebanner/Guidebanner.js +2 -2
- package/es/components/NotificationsPanel/NotificationsPanel.d.ts +162 -1
- package/es/components/NotificationsPanel/NotificationsPanel.js +10 -10
- package/es/components/SearchBar/SearchBar.d.ts +10 -1
- package/es/components/SearchBar/SearchBar.js +26 -20
- package/es/components/SidePanel/SidePanel.js +1 -1
- package/es/components/TagOverflow/TagOverflow.d.ts +5 -0
- package/es/components/TagOverflow/TagOverflow.js +153 -29
- package/es/components/TagOverflow/TagOverflowModal.d.ts +29 -0
- package/es/components/TagOverflow/TagOverflowModal.js +112 -0
- package/es/components/TagOverflow/TagOverflowPopover.d.ts +2 -0
- package/es/components/TagOverflow/TagOverflowPopover.js +135 -0
- package/es/components/TagSet/TagSet.d.ts +87 -3
- package/es/components/TagSet/TagSet.js +20 -9
- package/es/components/TagSet/TagSetModal.d.ts +32 -26
- package/es/components/TagSet/TagSetModal.js +5 -5
- package/es/components/TagSet/TagSetOverflow.d.ts +45 -2
- package/es/components/TagSet/TagSetOverflow.js +14 -12
- package/es/components/WebTerminal/WebTerminal.js +2 -2
- package/es/components/WebTerminal/WebTerminalContentWrapper.d.ts +15 -2
- package/es/components/WebTerminal/hooks/index.d.ts +16 -11
- package/es/components/WebTerminal/hooks/index.js +1 -1
- package/es/components/index.d.ts +1 -0
- package/es/global/js/package-settings.d.ts +2 -1
- package/es/global/js/package-settings.js +2 -1
- package/es/index.js +1 -0
- package/es/node_modules/@carbon/colors/es/index.js +4 -1
- package/es/settings.d.ts +2 -1
- package/lib/components/ActionSet/ActionSet.js +2 -1
- package/lib/components/Card/Card.js +50 -9
- package/lib/components/Card/CardFooter.d.ts +5 -1
- package/lib/components/Card/CardFooter.js +11 -1
- package/lib/components/Carousel/Carousel.d.ts +6 -2
- package/lib/components/Checklist/Checklist.d.ts +100 -2
- package/lib/components/Checklist/Checklist.js +19 -15
- package/lib/components/Checklist/Checklist.types.d.ts +19 -0
- package/lib/components/Checklist/Checklist.types.js +27 -0
- package/lib/components/Checklist/ChecklistChart.d.ts +6 -2
- package/lib/components/Checklist/ChecklistChart.js +17 -36
- package/lib/components/Checklist/ChecklistIcon.d.ts +5 -1
- package/lib/components/Checklist/ChecklistIcon.js +9 -4
- package/lib/components/Coachmark/Coachmark.d.ts +65 -2
- package/lib/components/Coachmark/Coachmark.js +6 -9
- package/lib/components/Coachmark/CoachmarkDragbar.d.ts +40 -2
- package/lib/components/Coachmark/CoachmarkDragbar.js +3 -1
- package/lib/components/Coachmark/CoachmarkHeader.d.ts +27 -2
- package/lib/components/Coachmark/CoachmarkHeader.js +0 -1
- package/lib/components/Coachmark/CoachmarkOverlay.d.ts +42 -2
- package/lib/components/Coachmark/CoachmarkOverlay.js +18 -15
- package/lib/components/Coachmark/CoachmarkTagline.d.ts +27 -2
- package/lib/components/Coachmark/CoachmarkTagline.js +0 -1
- package/lib/components/Coachmark/utils/enums.d.ts +20 -20
- package/lib/components/Coachmark/utils/enums.js +22 -20
- package/lib/components/CoachmarkButton/CoachmarkButton.d.ts +19 -2
- package/lib/components/CoachmarkFixed/CoachmarkFixed.d.ts +42 -2
- package/lib/components/CoachmarkFixed/CoachmarkFixed.js +4 -2
- package/lib/components/CoachmarkOverlayElements/CoachmarkOverlayElements.d.ts +46 -2
- package/lib/components/CoachmarkOverlayElements/CoachmarkOverlayElements.js +5 -4
- package/lib/components/ConditionBuilder/ConditionBlock/ConditionBlock.d.ts +2 -1
- package/lib/components/ConditionBuilder/ConditionBlock/ConditionBlock.js +25 -23
- package/lib/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.js +2 -2
- package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +13 -23
- package/lib/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.d.ts +2 -0
- package/lib/components/ConditionBuilder/ConditionBuilderContext/ConditionBuilderProvider.js +4 -1
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.d.ts +3 -3
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +11 -11
- package/lib/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.d.ts +5 -3
- package/lib/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.js +54 -44
- package/lib/components/CreateInfluencer/CreateInfluencer.d.ts +55 -17
- package/lib/components/DataSpreadsheet/DataSpreadsheet.d.ts +67 -2
- package/lib/components/DataSpreadsheet/DataSpreadsheet.js +48 -27
- package/lib/components/DataSpreadsheet/DataSpreadsheetBody.d.ts +139 -2
- package/lib/components/DataSpreadsheet/DataSpreadsheetBody.js +59 -38
- package/lib/components/DataSpreadsheet/DataSpreadsheetHeader.d.ts +89 -2
- package/lib/components/DataSpreadsheet/DataSpreadsheetHeader.js +39 -27
- package/lib/components/DataSpreadsheet/hooks/useMoveActiveCell.js +2 -1
- package/lib/components/DataSpreadsheet/types/index.d.ts +30 -0
- package/lib/components/EditTearsheetNarrow/EditTearsheetNarrow.d.ts +19 -2
- package/lib/components/GetStartedCard/GetStartedCard.d.ts +5 -0
- package/lib/components/GetStartedCard/GetStartedCard.js +88 -0
- package/lib/components/GetStartedCard/index.d.ts +1 -0
- package/lib/components/Guidebanner/Guidebanner.js +2 -2
- package/lib/components/NotificationsPanel/NotificationsPanel.d.ts +162 -1
- package/lib/components/NotificationsPanel/NotificationsPanel.js +10 -10
- package/lib/components/SearchBar/SearchBar.d.ts +10 -1
- package/lib/components/SearchBar/SearchBar.js +26 -18
- package/lib/components/SidePanel/SidePanel.js +1 -1
- package/lib/components/TagOverflow/TagOverflow.d.ts +5 -0
- package/lib/components/TagOverflow/TagOverflow.js +154 -28
- package/lib/components/TagOverflow/TagOverflowModal.d.ts +29 -0
- package/lib/components/TagOverflow/TagOverflowModal.js +121 -0
- package/lib/components/TagOverflow/TagOverflowPopover.d.ts +2 -0
- package/lib/components/TagOverflow/TagOverflowPopover.js +144 -0
- package/lib/components/TagSet/TagSet.d.ts +87 -3
- package/lib/components/TagSet/TagSet.js +20 -9
- package/lib/components/TagSet/TagSetModal.d.ts +32 -26
- package/lib/components/TagSet/TagSetModal.js +3 -3
- package/lib/components/TagSet/TagSetOverflow.d.ts +45 -2
- package/lib/components/TagSet/TagSetOverflow.js +14 -12
- package/lib/components/WebTerminal/WebTerminal.js +2 -2
- package/lib/components/WebTerminal/WebTerminalContentWrapper.d.ts +15 -2
- package/lib/components/WebTerminal/hooks/index.d.ts +16 -11
- package/lib/components/WebTerminal/hooks/index.js +1 -1
- package/lib/components/index.d.ts +1 -0
- package/lib/global/js/package-settings.d.ts +2 -1
- package/lib/global/js/package-settings.js +2 -1
- package/lib/index.js +5 -0
- package/lib/node_modules/@carbon/colors/es/index.js +6 -0
- package/lib/settings.d.ts +2 -1
- package/package.json +3 -3
- package/scss/components/Checklist/_carbon-imports.scss +2 -2
- package/scss/components/GetStartedCard/_carbon-imports.scss +9 -0
- package/scss/components/GetStartedCard/_get-started-card.scss +135 -0
- package/scss/components/GetStartedCard/_index-with-carbon.scss +9 -0
- package/scss/components/GetStartedCard/_index.scss +8 -0
- package/scss/components/TagOverflow/_tag-overflow.scss +157 -0
- package/scss/components/_index-released-only-with-carbon.scss +2 -1
- package/scss/components/_index-released-only.scss +2 -1
- package/scss/components/_index-with-carbon.scss +2 -0
- package/scss/components/_index.scss +1 -0
- package/telemetry.yml +28 -24
@@ -14,6 +14,7 @@ var React = require('react');
|
|
14
14
|
var ConditionBlock = require('../ConditionBlock/ConditionBlock.js');
|
15
15
|
var index = require('../../../node_modules/prop-types/index.js');
|
16
16
|
var DataConfigs = require('../ConditionBuilderContext/DataConfigs.js');
|
17
|
+
var uuidv4 = require('../../../global/js/utils/uuidv4.js');
|
17
18
|
|
18
19
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
19
20
|
|
@@ -26,17 +27,18 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
26
27
|
* @returns
|
27
28
|
*/
|
28
29
|
var ConditionGroupBuilder = function ConditionGroupBuilder(_ref) {
|
29
|
-
var
|
30
|
-
var
|
30
|
+
var _group$conditions;
|
31
|
+
var group = _ref.group,
|
31
32
|
aria = _ref.aria,
|
32
33
|
onRemove = _ref.onRemove,
|
33
34
|
onChange = _ref.onChange,
|
34
|
-
conditionBuilderRef = _ref.conditionBuilderRef
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
35
|
+
conditionBuilderRef = _ref.conditionBuilderRef,
|
36
|
+
className = _ref.className;
|
37
|
+
var onRemoveHandler = function onRemoveHandler(conditionId, e) {
|
38
|
+
if (group.conditions.length > 1) {
|
39
|
+
onChange(_rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, group), {}, {
|
40
|
+
conditions: group.conditions.filter(function (condition) {
|
41
|
+
return conditionId !== condition.id;
|
40
42
|
})
|
41
43
|
}));
|
42
44
|
handleFocusOnClose(e);
|
@@ -44,23 +46,27 @@ var ConditionGroupBuilder = function ConditionGroupBuilder(_ref) {
|
|
44
46
|
onRemove();
|
45
47
|
}
|
46
48
|
};
|
47
|
-
var onChangeHandler = function onChangeHandler(
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
})
|
49
|
+
var onChangeHandler = function onChangeHandler(updatedCondition, conditionIndex) {
|
50
|
+
var updatedConditions = [].concat(_rollupPluginBabelHelpers.toConsumableArray(group.conditions.slice(0, conditionIndex)), [updatedCondition], _rollupPluginBabelHelpers.toConsumableArray(group.conditions.slice(conditionIndex + 1)));
|
51
|
+
onChange(_rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, group), {}, {
|
52
|
+
conditions: updatedConditions
|
52
53
|
}));
|
53
54
|
};
|
54
55
|
var addConditionHandler = function addConditionHandler(conditionIndex) {
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
56
|
+
var newCondition = {
|
57
|
+
property: undefined,
|
58
|
+
operator: '',
|
59
|
+
value: '',
|
60
|
+
popoverToOpen: 'propertyField',
|
61
|
+
id: uuidv4["default"]()
|
62
|
+
};
|
63
|
+
onChange(_rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, group), {}, {
|
64
|
+
conditions: [].concat(_rollupPluginBabelHelpers.toConsumableArray(group.conditions.slice(0, conditionIndex + 1)), [newCondition], _rollupPluginBabelHelpers.toConsumableArray(group.conditions.slice(conditionIndex + 1)))
|
62
65
|
}));
|
63
66
|
};
|
67
|
+
var isLastCondition = function isLastCondition(conditionIndex, conditionArr) {
|
68
|
+
return conditionIndex + 1 >= conditionArr.length || conditionArr.length - 1 != conditionIndex && conditionArr[conditionIndex + 1].conditions;
|
69
|
+
};
|
64
70
|
var handleFocusOnClose = function handleFocusOnClose(e) {
|
65
71
|
var _e$currentTarget;
|
66
72
|
var previousClose = (_e$currentTarget = e.currentTarget) === null || _e$currentTarget === void 0 || (_e$currentTarget = _e$currentTarget.closest('[role="row"]')) === null || _e$currentTarget === void 0 || (_e$currentTarget = _e$currentTarget.previousSibling) === null || _e$currentTarget === void 0 ? void 0 : _e$currentTarget.querySelector('[data-name="closeCondition"]');
|
@@ -69,40 +75,39 @@ var ConditionGroupBuilder = function ConditionGroupBuilder(_ref) {
|
|
69
75
|
}
|
70
76
|
};
|
71
77
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
72
|
-
className: "
|
78
|
+
className: "".concat(className, " eachGroup")
|
73
79
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
74
80
|
className: "".concat(DataConfigs.blockClass, "__condition-wrapper"),
|
75
81
|
role: "grid",
|
76
82
|
"aria-label": DataConfigs.translateWithId('condition_builder_group')
|
77
|
-
},
|
83
|
+
}, group === null || group === void 0 || (_group$conditions = group.conditions) === null || _group$conditions === void 0 ? void 0 : _group$conditions.map(function (eachCondition, conditionIndex) {
|
78
84
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
79
|
-
key:
|
85
|
+
key: eachCondition.id
|
80
86
|
}, eachCondition.conditions && /*#__PURE__*/React__default["default"].createElement(ConditionGroupBuilder, {
|
87
|
+
className: "".concat(DataConfigs.blockClass, "__condition-builder__group"),
|
81
88
|
aria: {
|
82
89
|
level: aria.level + 1,
|
83
90
|
posinset: conditionIndex + 1,
|
84
|
-
setsize:
|
91
|
+
setsize: group.conditions.length
|
85
92
|
},
|
86
|
-
|
87
|
-
onChange: function onChange(
|
88
|
-
onChangeHandler(
|
93
|
+
group: eachCondition,
|
94
|
+
onChange: function onChange(updatedCondition) {
|
95
|
+
onChangeHandler(updatedCondition, conditionIndex);
|
89
96
|
},
|
90
97
|
onRemove: function onRemove(e) {
|
91
|
-
onRemoveHandler(
|
98
|
+
onRemoveHandler(eachCondition.id, e);
|
92
99
|
},
|
93
|
-
conditionBuilderRef: conditionBuilderRef
|
94
|
-
key: conditionIndex
|
100
|
+
conditionBuilderRef: conditionBuilderRef
|
95
101
|
}), !eachCondition.conditions && /*#__PURE__*/React__default["default"].createElement(ConditionBlock["default"], {
|
96
|
-
|
97
|
-
conjunction: conditionIndex > 0 ? state.groupOperator : undefined,
|
102
|
+
conjunction: conditionIndex > 0 ? group.groupOperator : undefined,
|
98
103
|
aria: {
|
99
104
|
level: aria.level + 1,
|
100
105
|
posinset: conditionIndex + 1,
|
101
|
-
setsize:
|
106
|
+
setsize: group.conditions.length
|
102
107
|
},
|
103
108
|
isStatement: conditionIndex == 0,
|
104
|
-
|
105
|
-
group:
|
109
|
+
condition: eachCondition,
|
110
|
+
group: group,
|
106
111
|
conditionIndex: conditionIndex,
|
107
112
|
className: "".concat(DataConfigs.blockClass, "__gap ").concat(DataConfigs.blockClass, "__gap-bottom"),
|
108
113
|
onChange: function onChange(updatedConditions) {
|
@@ -110,18 +115,19 @@ var ConditionGroupBuilder = function ConditionGroupBuilder(_ref) {
|
|
110
115
|
},
|
111
116
|
addConditionHandler: addConditionHandler,
|
112
117
|
onRemove: function onRemove(e) {
|
113
|
-
onRemoveHandler(
|
118
|
+
onRemoveHandler(eachCondition.id, e);
|
114
119
|
},
|
115
120
|
onConnectorOperatorChange: function onConnectorOperatorChange(op) {
|
116
|
-
onChange(_rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({},
|
121
|
+
onChange(_rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, group), {}, {
|
117
122
|
groupOperator: op
|
118
123
|
}));
|
119
124
|
},
|
120
125
|
onStatementChange: function onStatementChange(updatedStatement) {
|
121
|
-
onChange(_rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({},
|
126
|
+
onChange(_rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, group), {}, {
|
122
127
|
statement: updatedStatement
|
123
128
|
}));
|
124
|
-
}
|
129
|
+
},
|
130
|
+
isLastCondition: isLastCondition
|
125
131
|
}));
|
126
132
|
})));
|
127
133
|
};
|
@@ -131,10 +137,18 @@ ConditionGroupBuilder.propTypes = {
|
|
131
137
|
* object contains the aria attributes
|
132
138
|
*/
|
133
139
|
aria: index["default"].object,
|
140
|
+
/**
|
141
|
+
* Provide an class to be applied to the containing node.
|
142
|
+
*/
|
143
|
+
className: index["default"].string,
|
134
144
|
/**
|
135
145
|
* ref of condition builder
|
136
146
|
*/
|
137
147
|
conditionBuilderRef: index["default"].object,
|
148
|
+
/**
|
149
|
+
* group defines the current group
|
150
|
+
*/
|
151
|
+
group: index["default"].object,
|
138
152
|
/**
|
139
153
|
|
140
154
|
* callback to update the current condition of the state tree
|
@@ -143,11 +157,7 @@ ConditionGroupBuilder.propTypes = {
|
|
143
157
|
/**
|
144
158
|
* call back to remove the particular group from the state tree
|
145
159
|
*/
|
146
|
-
onRemove: index["default"].func
|
147
|
-
/**
|
148
|
-
* state defines the current group
|
149
|
-
*/
|
150
|
-
state: index["default"].object
|
160
|
+
onRemove: index["default"].func
|
151
161
|
};
|
152
162
|
|
153
163
|
exports["default"] = ConditionGroupBuilder$1;
|
@@ -1,23 +1,61 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
1
|
+
/**
|
2
|
+
* Copyright IBM Corp. 2021, 2022
|
3
|
+
*
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
import { PropsWithChildren, ReactNode } from 'react';
|
8
|
+
import PropTypes from 'prop-types';
|
9
|
+
import '../../global/js/utils/props-helper';
|
10
|
+
interface Step {
|
11
|
+
introStep?: boolean;
|
12
|
+
secondaryLabel?: string;
|
13
|
+
shouldIncludeStep?: boolean;
|
14
|
+
title?: ReactNode;
|
15
|
+
}
|
16
|
+
interface CreateInfluencerProps {
|
17
|
+
/**
|
18
|
+
* Provide an optional class to be applied to the containing node.
|
19
|
+
*/
|
20
|
+
className?: string;
|
21
|
+
/**
|
22
|
+
* Provide the current step number.
|
23
|
+
*/
|
24
|
+
currentStep: number;
|
25
|
+
/**
|
26
|
+
* Provide the Set Data.
|
27
|
+
*/
|
28
|
+
stepData: Step[];
|
29
|
+
/**
|
30
|
+
* Title.
|
31
|
+
*/
|
32
|
+
title?: string | undefined;
|
33
|
+
}
|
34
|
+
export declare const CreateInfluencer: {
|
35
|
+
({ className, currentStep, stepData, title, }: PropsWithChildren<CreateInfluencerProps>): import("react/jsx-runtime").JSX.Element;
|
36
|
+
displayName: string;
|
37
|
+
propTypes: {
|
38
|
+
/**
|
39
|
+
* Provide an optional class to be applied to the containing node.
|
40
|
+
*/
|
41
|
+
className: PropTypes.Requireable<string>;
|
42
|
+
/**
|
43
|
+
* Used to mark the current step on the ProgressIndicator component
|
44
|
+
*/
|
45
|
+
currentStep: PropTypes.Validator<number>;
|
46
|
+
/**
|
47
|
+
* The step data that renders the progress items
|
48
|
+
*/
|
49
|
+
stepData: PropTypes.Requireable<(PropTypes.InferProps<{
|
13
50
|
introStep: PropTypes.Requireable<boolean>;
|
14
51
|
secondaryLabel: PropTypes.Requireable<string>;
|
15
52
|
shouldIncludeStep: PropTypes.Requireable<boolean>;
|
16
53
|
title: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
17
54
|
}> | null | undefined)[]>;
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
55
|
+
/**
|
56
|
+
* The main title of the full page, displayed in the influencer area.
|
57
|
+
*/
|
58
|
+
title: PropTypes.Requireable<string>;
|
59
|
+
};
|
60
|
+
};
|
23
61
|
export {};
|
@@ -1,5 +1,70 @@
|
|
1
1
|
/**
|
2
|
-
*
|
2
|
+
* Copyright IBM Corp. 2022, 2022
|
3
|
+
*
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
3
6
|
*/
|
4
|
-
export let DataSpreadsheet: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
|
5
7
|
import React from 'react';
|
8
|
+
import { Column, Size, Theme } from './types';
|
9
|
+
interface DataSpreadsheetProps {
|
10
|
+
/**
|
11
|
+
* Specifies the cell height
|
12
|
+
*/
|
13
|
+
cellSize?: Size;
|
14
|
+
/**
|
15
|
+
* Provide an optional class to be applied to the containing node.
|
16
|
+
*/
|
17
|
+
className?: string;
|
18
|
+
/**
|
19
|
+
* The data that will build the column headers
|
20
|
+
*/
|
21
|
+
columns?: readonly Column[];
|
22
|
+
/**
|
23
|
+
* The spreadsheet data that will be rendered in the body of the spreadsheet component
|
24
|
+
*/
|
25
|
+
data?: readonly object[];
|
26
|
+
/**
|
27
|
+
* Sets the number of empty rows to be created when there is no data provided
|
28
|
+
*/
|
29
|
+
defaultEmptyRowCount?: number;
|
30
|
+
/**
|
31
|
+
* The spreadsheet id
|
32
|
+
*/
|
33
|
+
id?: number | string;
|
34
|
+
/**
|
35
|
+
* The event handler that is called when the active cell changes
|
36
|
+
*/
|
37
|
+
onActiveCellChange?: () => void;
|
38
|
+
/**
|
39
|
+
* The setter fn for the data prop
|
40
|
+
*/
|
41
|
+
onDataUpdate?: ({ ...args }: {
|
42
|
+
[x: string]: any;
|
43
|
+
}) => void;
|
44
|
+
/**
|
45
|
+
* The event handler that is called when the selection area values change
|
46
|
+
*/
|
47
|
+
onSelectionAreaChange?: () => void;
|
48
|
+
/**
|
49
|
+
* The aria label applied to the Select all button
|
50
|
+
*/
|
51
|
+
selectAllAriaLabel: string;
|
52
|
+
/**
|
53
|
+
* The aria label applied to the Data spreadsheet component
|
54
|
+
*/
|
55
|
+
spreadsheetAriaLabel: string;
|
56
|
+
/**
|
57
|
+
* The theme the DataSpreadsheet should use (only used to render active cell/selection area colors on dark theme)
|
58
|
+
*/
|
59
|
+
theme?: Theme;
|
60
|
+
/**
|
61
|
+
* The total number of columns to be initially visible, additional columns will be rendered and
|
62
|
+
* visible via horizontal scrollbar
|
63
|
+
*/
|
64
|
+
totalVisibleColumns?: number;
|
65
|
+
}
|
66
|
+
/**
|
67
|
+
* DataSpreadsheet: used to organize and display large amounts of structured data, separated by columns and rows in a grid-like format.
|
68
|
+
*/
|
69
|
+
export declare let DataSpreadsheet: React.ForwardRefExoticComponent<DataSpreadsheetProps & React.RefAttributes<HTMLDivElement>>;
|
70
|
+
export {};
|
@@ -42,14 +42,12 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
42
42
|
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
43
43
|
|
44
44
|
var _excluded = ["cellSize", "className", "columns", "data", "defaultEmptyRowCount", "onDataUpdate", "id", "onActiveCellChange", "onSelectionAreaChange", "selectAllAriaLabel", "spreadsheetAriaLabel", "theme", "totalVisibleColumns"];
|
45
|
-
|
46
45
|
// The block part of our conventional BEM class names (blockClass__E--M).
|
47
46
|
var blockClass = "".concat(settings.pkg.prefix, "--data-spreadsheet");
|
48
47
|
var componentName = 'DataSpreadsheet';
|
49
48
|
|
50
49
|
// Default values for props
|
51
50
|
var defaults = {
|
52
|
-
cellSize: 'sm',
|
53
51
|
columns: Object.freeze([]),
|
54
52
|
data: Object.freeze([]),
|
55
53
|
defaultEmptyRowCount: 16,
|
@@ -58,13 +56,12 @@ var defaults = {
|
|
58
56
|
onSelectionAreaChange: Object.freeze(function () {}),
|
59
57
|
theme: 'light'
|
60
58
|
};
|
61
|
-
|
62
59
|
/**
|
63
60
|
* DataSpreadsheet: used to organize and display large amounts of structured data, separated by columns and rows in a grid-like format.
|
64
61
|
*/
|
65
62
|
exports.DataSpreadsheet = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
|
66
63
|
var _ref$cellSize = _ref.cellSize,
|
67
|
-
cellSize = _ref$cellSize === void 0 ?
|
64
|
+
cellSize = _ref$cellSize === void 0 ? 'sm' : _ref$cellSize,
|
68
65
|
className = _ref.className,
|
69
66
|
_ref$columns = _ref.columns,
|
70
67
|
columns = _ref$columns === void 0 ? defaults.columns : _ref$columns,
|
@@ -84,7 +81,7 @@ exports.DataSpreadsheet = /*#__PURE__*/React__default["default"].forwardRef(func
|
|
84
81
|
theme = _ref.theme,
|
85
82
|
totalVisibleColumns = _ref.totalVisibleColumns,
|
86
83
|
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
87
|
-
var multiKeyTrackingRef = React.useRef();
|
84
|
+
var multiKeyTrackingRef = React.useRef(null);
|
88
85
|
var localRef = React.useRef();
|
89
86
|
var spreadsheetRef = ref || localRef;
|
90
87
|
var focusedElement = useActiveElement.useActiveElement();
|
@@ -124,7 +121,7 @@ exports.DataSpreadsheet = /*#__PURE__*/React__default["default"].forwardRef(func
|
|
124
121
|
_useState18 = _rollupPluginBabelHelpers.slicedToArray(_useState17, 2),
|
125
122
|
headerCellHoldActive = _useState18[0],
|
126
123
|
setHeaderCellHoldActive = _useState18[1];
|
127
|
-
var _useState19 = React.useState(
|
124
|
+
var _useState19 = React.useState(false),
|
128
125
|
_useState20 = _rollupPluginBabelHelpers.slicedToArray(_useState19, 2),
|
129
126
|
isActiveHeaderCellChanged = _useState20[0],
|
130
127
|
setIsActiveHeaderCellChanged = _useState20[1];
|
@@ -135,10 +132,10 @@ exports.DataSpreadsheet = /*#__PURE__*/React__default["default"].forwardRef(func
|
|
135
132
|
var previousState = usePreviousValue.usePreviousValue({
|
136
133
|
activeCellCoordinates: activeCellCoordinates,
|
137
134
|
isEditing: isEditing
|
138
|
-
});
|
135
|
+
}) || {};
|
139
136
|
var cellSizeValue = getCellSize.getCellSize(cellSize);
|
140
137
|
var cellEditorRef = React.useRef();
|
141
|
-
var _useState23 = React.useState(),
|
138
|
+
var _useState23 = React.useState(null),
|
142
139
|
_useState24 = _rollupPluginBabelHelpers.slicedToArray(_useState23, 2),
|
143
140
|
activeCellContent = _useState24[0],
|
144
141
|
setActiveCellContent = _useState24[1];
|
@@ -189,13 +186,18 @@ exports.DataSpreadsheet = /*#__PURE__*/React__default["default"].forwardRef(func
|
|
189
186
|
|
190
187
|
// Removes the active cell element
|
191
188
|
var removeActiveCell = React.useCallback(function () {
|
192
|
-
var
|
193
|
-
activeCellHighlight.
|
189
|
+
var _current;
|
190
|
+
var activeCellHighlight = spreadsheetRef === null || spreadsheetRef === void 0 || (_current = spreadsheetRef.current) === null || _current === void 0 ? void 0 : _current.querySelector(".".concat(blockClass, "__active-cell--highlight"));
|
191
|
+
if (activeCellHighlight) {
|
192
|
+
activeCellHighlight.style.display = 'none';
|
193
|
+
}
|
194
194
|
}, [spreadsheetRef]);
|
195
195
|
var removeCellEditor = React.useCallback(function () {
|
196
196
|
setCellEditorValue('');
|
197
197
|
setIsEditing(false);
|
198
|
-
cellEditorRef.current
|
198
|
+
if (cellEditorRef !== null && cellEditorRef !== void 0 && cellEditorRef.current) {
|
199
|
+
cellEditorRef.current.style.display = 'none';
|
200
|
+
}
|
199
201
|
}, []);
|
200
202
|
|
201
203
|
// Remove cell editor if the active cell coordinates change and save with new cell data, this will
|
@@ -205,8 +207,10 @@ exports.DataSpreadsheet = /*#__PURE__*/React__default["default"].forwardRef(func
|
|
205
207
|
if (((prevCoords === null || prevCoords === void 0 ? void 0 : prevCoords.row) !== (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.row) || (prevCoords === null || prevCoords === void 0 ? void 0 : prevCoords.column) !== (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.column)) && isEditing) {
|
206
208
|
var cellProps = rows[prevCoords === null || prevCoords === void 0 ? void 0 : prevCoords.row].cells[prevCoords === null || prevCoords === void 0 ? void 0 : prevCoords.column];
|
207
209
|
removeCellEditor();
|
208
|
-
updateData(prevCoords === null || prevCoords === void 0 ? void 0 : prevCoords.row, cellProps.column.id);
|
209
|
-
cellEditorRulerRef.current
|
210
|
+
updateData(prevCoords === null || prevCoords === void 0 ? void 0 : prevCoords.row, cellProps.column.id, undefined);
|
211
|
+
if (cellEditorRulerRef !== null && cellEditorRulerRef !== void 0 && cellEditorRulerRef.current) {
|
212
|
+
cellEditorRulerRef.current.textContent = '';
|
213
|
+
}
|
210
214
|
}
|
211
215
|
if ((prevCoords === null || prevCoords === void 0 ? void 0 : prevCoords.row) !== (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.row) || (prevCoords === null || prevCoords === void 0 ? void 0 : prevCoords.column) !== (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.column)) {
|
212
216
|
if (activeCellCoordinates && (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.row) !== 'header' && (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.column) !== 'header') {
|
@@ -251,7 +255,6 @@ exports.DataSpreadsheet = /*#__PURE__*/React__default["default"].forwardRef(func
|
|
251
255
|
setActiveCellCoordinates: setActiveCellCoordinates,
|
252
256
|
setSelectionAreas: setSelectionAreas,
|
253
257
|
removeActiveCell: removeActiveCell,
|
254
|
-
removeCellSelections: removeCellSelections.removeCellSelections,
|
255
258
|
setContainerHasFocus: setContainerHasFocus,
|
256
259
|
removeCellEditor: removeCellEditor
|
257
260
|
});
|
@@ -306,6 +309,7 @@ exports.DataSpreadsheet = /*#__PURE__*/React__default["default"].forwardRef(func
|
|
306
309
|
}
|
307
310
|
});
|
308
311
|
removeCellSelections.removeCellSelections({
|
312
|
+
matcher: undefined,
|
309
313
|
spreadsheetRef: spreadsheetRef
|
310
314
|
});
|
311
315
|
}, [activeCellCoordinates, updateActiveCellCoordinates, spreadsheetRef, columns.length]);
|
@@ -313,7 +317,8 @@ exports.DataSpreadsheet = /*#__PURE__*/React__default["default"].forwardRef(func
|
|
313
317
|
return isEditing || key === 'Meta' || key === 'Control';
|
314
318
|
}, [isEditing]);
|
315
319
|
var handleArrowKeyPress = React.useCallback(function (arrowKey) {
|
316
|
-
|
320
|
+
var _event;
|
321
|
+
(_event = event) === null || _event === void 0 || _event.preventDefault();
|
317
322
|
handleInitialArrowPress();
|
318
323
|
var coordinatesClone = _rollupPluginBabelHelpers.objectSpread2({}, activeCellCoordinates);
|
319
324
|
var updatedValue;
|
@@ -416,18 +421,28 @@ exports.DataSpreadsheet = /*#__PURE__*/React__default["default"].forwardRef(func
|
|
416
421
|
setIsEditing(true);
|
417
422
|
setClickAndHoldActive(false);
|
418
423
|
var activeCellFullData = typeof (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.column) === 'number' && typeof (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.row) === 'number' ? rows[activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.row].cells[activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.column] : null;
|
419
|
-
var activeCellValue
|
424
|
+
var activeCellValue;
|
425
|
+
if (activeCellFullData && activeCellCoordinates !== null && activeCellCoordinates !== void 0 && activeCellCoordinates.column) {
|
426
|
+
var _activeCellFullData$r;
|
427
|
+
activeCellValue = activeCellFullData ? (_activeCellFullData$r = activeCellFullData.row.cells) === null || _activeCellFullData$r === void 0 || (_activeCellFullData$r = _activeCellFullData$r[activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.column]) === null || _activeCellFullData$r === void 0 ? void 0 : _activeCellFullData$r.value : null;
|
428
|
+
}
|
420
429
|
setCellEditorValue(activeCellValue || '');
|
421
|
-
cellEditorRulerRef.current
|
422
|
-
|
430
|
+
if (cellEditorRulerRef !== null && cellEditorRulerRef !== void 0 && cellEditorRulerRef.current) {
|
431
|
+
cellEditorRulerRef.current.textContent = activeCellValue;
|
432
|
+
}
|
433
|
+
if (cellEditorRef !== null && cellEditorRef !== void 0 && cellEditorRef.current && activeCellRef !== null && activeCellRef !== void 0 && activeCellRef.current) {
|
434
|
+
var _activeCellRef$curren;
|
435
|
+
cellEditorRef.current.style.width = activeCellRef === null || activeCellRef === void 0 || (_activeCellRef$curren = activeCellRef.current) === null || _activeCellRef$curren === void 0 || (_activeCellRef$curren = _activeCellRef$curren.style) === null || _activeCellRef$curren === void 0 ? void 0 : _activeCellRef$curren.width;
|
436
|
+
}
|
423
437
|
};
|
424
438
|
|
425
439
|
// Sets the initial placement of the cell editor cursor at the end of the text area
|
426
440
|
// this is not done for us by default in Safari
|
427
441
|
React.useEffect(function () {
|
428
442
|
if (isEditing && !(previousState !== null && previousState !== void 0 && previousState.isEditing)) {
|
429
|
-
|
430
|
-
cellEditorRef.current.
|
443
|
+
var _cellEditorRef$curren, _cellEditorRulerRef$c, _cellEditorRulerRef$c2, _cellEditorRef$curren2;
|
444
|
+
cellEditorRef === null || cellEditorRef === void 0 || (_cellEditorRef$curren = cellEditorRef.current) === null || _cellEditorRef$curren === void 0 || _cellEditorRef$curren.setSelectionRange(Number(cellEditorRulerRef === null || cellEditorRulerRef === void 0 || (_cellEditorRulerRef$c = cellEditorRulerRef.current) === null || _cellEditorRulerRef$c === void 0 || (_cellEditorRulerRef$c = _cellEditorRulerRef$c.textContent) === null || _cellEditorRulerRef$c === void 0 ? void 0 : _cellEditorRulerRef$c.length), Number(cellEditorRulerRef === null || cellEditorRulerRef === void 0 || (_cellEditorRulerRef$c2 = cellEditorRulerRef.current) === null || _cellEditorRulerRef$c2 === void 0 || (_cellEditorRulerRef$c2 = _cellEditorRulerRef$c2.textContent) === null || _cellEditorRulerRef$c2 === void 0 ? void 0 : _cellEditorRulerRef$c2.length));
|
445
|
+
cellEditorRef === null || cellEditorRef === void 0 || (_cellEditorRef$curren2 = cellEditorRef.current) === null || _cellEditorRef$curren2 === void 0 || _cellEditorRef$curren2.focus();
|
431
446
|
}
|
432
447
|
}, [isEditing, previousState === null || previousState === void 0 ? void 0 : previousState.isEditing]);
|
433
448
|
var handleActiveCellClick = function handleActiveCellClick() {
|
@@ -438,7 +453,7 @@ exports.DataSpreadsheet = /*#__PURE__*/React__default["default"].forwardRef(func
|
|
438
453
|
}
|
439
454
|
handleRowColumnHeaderClick({
|
440
455
|
isKeyboard: false,
|
441
|
-
index: indexValue
|
456
|
+
index: Number(indexValue)
|
442
457
|
});
|
443
458
|
}
|
444
459
|
return;
|
@@ -455,6 +470,7 @@ exports.DataSpreadsheet = /*#__PURE__*/React__default["default"].forwardRef(func
|
|
455
470
|
var tempMatcher = uuidv4["default"]();
|
456
471
|
setClickAndHoldActive(true);
|
457
472
|
removeCellSelections.removeCellSelections({
|
473
|
+
matcher: null,
|
458
474
|
spreadsheetRef: spreadsheetRef
|
459
475
|
});
|
460
476
|
setSelectionAreas([{
|
@@ -485,19 +501,21 @@ exports.DataSpreadsheet = /*#__PURE__*/React__default["default"].forwardRef(func
|
|
485
501
|
var handleRowColumnHeaderClick = function handleRowColumnHeaderClick(_ref5) {
|
486
502
|
var isKeyboard = _ref5.isKeyboard,
|
487
503
|
_ref5$index = _ref5.index,
|
488
|
-
index = _ref5$index === void 0 ?
|
504
|
+
index = _ref5$index === void 0 ? -1 : _ref5$index;
|
489
505
|
var handleHeaderCellProps = {
|
490
506
|
activeCellCoordinates: activeCellCoordinates,
|
491
507
|
rows: rows,
|
492
508
|
columns: columns,
|
509
|
+
currentMatcher: currentMatcher,
|
493
510
|
setActiveCellCoordinates: setActiveCellCoordinates,
|
494
511
|
setCurrentMatcher: setCurrentMatcher,
|
495
512
|
setSelectionAreas: setSelectionAreas,
|
496
513
|
spreadsheetRef: spreadsheetRef,
|
514
|
+
index: index,
|
497
515
|
isKeyboard: isKeyboard,
|
498
516
|
setSelectionAreaData: setSelectionAreaData,
|
499
|
-
|
500
|
-
|
517
|
+
isHoldingCommandKey: null,
|
518
|
+
isHoldingShiftKey: null
|
501
519
|
};
|
502
520
|
// Select an entire column
|
503
521
|
if ((activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.row) === 'header' && (activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.column) !== 'header') {
|
@@ -621,7 +639,6 @@ exports.DataSpreadsheet = /*#__PURE__*/React__default["default"].forwardRef(func
|
|
621
639
|
setContainerHasFocus: setContainerHasFocus,
|
622
640
|
selectionAreas: selectionAreas,
|
623
641
|
setSelectionAreas: setSelectionAreas,
|
624
|
-
cellSize: cellSize,
|
625
642
|
headerGroups: headerGroups,
|
626
643
|
defaultColumn: defaultColumn,
|
627
644
|
getTableBodyProps: getTableBodyProps,
|
@@ -671,10 +688,12 @@ exports.DataSpreadsheet = /*#__PURE__*/React__default["default"].forwardRef(func
|
|
671
688
|
}),
|
672
689
|
onChange: function onChange(event) {
|
673
690
|
setCellEditorValue(event.target.value);
|
674
|
-
cellEditorRulerRef.current
|
691
|
+
if (cellEditorRulerRef !== null && cellEditorRulerRef !== void 0 && cellEditorRulerRef.current) {
|
692
|
+
cellEditorRulerRef.current.textContent = event.target.value;
|
693
|
+
}
|
675
694
|
},
|
676
695
|
ref: cellEditorRef,
|
677
|
-
"aria-labelledby": activeCellCoordinates ? "".concat(blockClass, "__cell--").concat(activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.row, "--").concat(activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.column) :
|
696
|
+
"aria-labelledby": activeCellCoordinates ? "".concat(blockClass, "__cell--").concat(activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.row, "--").concat(activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.column) : '',
|
678
697
|
className: cx__default["default"]("".concat(blockClass, "__cell-editor"), "".concat(blockClass, "--interactive-cell-element"), "".concat(blockClass, "__cell-editor--").concat(cellSize), _rollupPluginBabelHelpers.defineProperty({}, "".concat(blockClass, "__cell-editor--active"), isEditing))
|
679
698
|
}), /*#__PURE__*/React__default["default"].createElement("pre", {
|
680
699
|
"aria-hidden": true,
|
@@ -705,6 +724,7 @@ exports.DataSpreadsheet.propTypes = {
|
|
705
724
|
/**
|
706
725
|
* The data that will build the column headers
|
707
726
|
*/
|
727
|
+
/**@ts-ignore */
|
708
728
|
columns: index["default"].arrayOf(index["default"].shape({
|
709
729
|
Header: index["default"].string,
|
710
730
|
accessor: index["default"].oneOfType([index["default"].string, index["default"].func]),
|
@@ -713,6 +733,7 @@ exports.DataSpreadsheet.propTypes = {
|
|
713
733
|
/**
|
714
734
|
* The spreadsheet data that will be rendered in the body of the spreadsheet component
|
715
735
|
*/
|
736
|
+
/**@ts-ignore */
|
716
737
|
data: index["default"].arrayOf(index["default"].shape),
|
717
738
|
/**
|
718
739
|
* Sets the number of empty rows to be created when there is no data provided
|