carbon-addons-iot-react 5.15.1 → 5.16.0
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/es/components/PageWizard/PageWizard.js +20 -4
- package/es/components/ProgressIndicator/ProgressIndicator.js +31 -8
- package/es/components/Table/TableHead/TableHead.js +19 -14
- package/lib/components/PageWizard/PageWizard.js +20 -4
- package/lib/components/ProgressIndicator/ProgressIndicator.js +31 -8
- package/lib/components/Table/TableHead/TableHead.js +19 -15
- package/package.json +1 -1
- package/umd/carbon-addons-iot-react.js +70 -25
|
@@ -67,7 +67,9 @@ var PageWizardPropTypes = {
|
|
|
67
67
|
testId: PropTypes.string,
|
|
68
68
|
/** Specify whether the progress steps should be split equally in size in the div */
|
|
69
69
|
spaceEqually: PropTypes.bool,
|
|
70
|
-
stepWidth: PropTypes.number
|
|
70
|
+
stepWidth: PropTypes.number,
|
|
71
|
+
/** When true, all connector lines are highlighted blue to show progress */
|
|
72
|
+
highlightConnectorLinesToShowProgress: PropTypes.bool
|
|
71
73
|
};
|
|
72
74
|
var defaultProps = {
|
|
73
75
|
children: [],
|
|
@@ -92,7 +94,8 @@ var defaultProps = {
|
|
|
92
94
|
isClickable: false,
|
|
93
95
|
testId: 'page-wizard',
|
|
94
96
|
spaceEqually: false,
|
|
95
|
-
stepWidth: null
|
|
97
|
+
stepWidth: null,
|
|
98
|
+
highlightConnectorLinesToShowProgress: true
|
|
96
99
|
};
|
|
97
100
|
var PageWizard = function PageWizard(_ref) {
|
|
98
101
|
var ch = _ref.children,
|
|
@@ -115,7 +118,8 @@ var PageWizard = function PageWizard(_ref) {
|
|
|
115
118
|
isClickable = _ref.isClickable,
|
|
116
119
|
testId = _ref.testId,
|
|
117
120
|
spaceEqually = _ref.spaceEqually,
|
|
118
|
-
stepWidth = _ref.stepWidth
|
|
121
|
+
stepWidth = _ref.stepWidth,
|
|
122
|
+
highlightConnectorLinesToShowProgress = _ref.highlightConnectorLinesToShowProgress;
|
|
119
123
|
var children = ch.length ? ch : [ch];
|
|
120
124
|
var steps = React__default.Children.map(children, function (step) {
|
|
121
125
|
return step.props;
|
|
@@ -220,7 +224,8 @@ var PageWizard = function PageWizard(_ref) {
|
|
|
220
224
|
isVerticalMode: isProgressIndicatorVertical,
|
|
221
225
|
isClickable: isClickable,
|
|
222
226
|
spaceEqually: spaceEqually,
|
|
223
|
-
stepWidth: stepWidth
|
|
227
|
+
stepWidth: stepWidth,
|
|
228
|
+
highlightConnectorLinesToShowProgress: highlightConnectorLinesToShowProgress
|
|
224
229
|
// TODO: pass down the testId in v3 instead of falling back to the
|
|
225
230
|
// default.
|
|
226
231
|
// testId={`${testId}-progress-indicator`}
|
|
@@ -451,6 +456,17 @@ PageWizard.__docgenInfo = {
|
|
|
451
456
|
},
|
|
452
457
|
"required": false
|
|
453
458
|
},
|
|
459
|
+
"highlightConnectorLinesToShowProgress": {
|
|
460
|
+
"defaultValue": {
|
|
461
|
+
"value": "true",
|
|
462
|
+
"computed": false
|
|
463
|
+
},
|
|
464
|
+
"description": "When true, all connector lines are highlighted blue to show progress",
|
|
465
|
+
"type": {
|
|
466
|
+
"name": "bool"
|
|
467
|
+
},
|
|
468
|
+
"required": false
|
|
469
|
+
},
|
|
454
470
|
"onClose": {
|
|
455
471
|
"description": "action if the inline wizard is closed or canceled",
|
|
456
472
|
"type": {
|
|
@@ -42,7 +42,8 @@ var ProgressStep = function ProgressStep(_ref) {
|
|
|
42
42
|
subStep = _ref.subStep,
|
|
43
43
|
spaceEqually = _ref.spaceEqually,
|
|
44
44
|
pictogramName = _ref.pictogramName,
|
|
45
|
-
hasPictogram = _ref.hasPictogram
|
|
45
|
+
hasPictogram = _ref.hasPictogram,
|
|
46
|
+
highlightConnectorLinesToShowProgress = _ref.highlightConnectorLinesToShowProgress;
|
|
46
47
|
var accessible = isClickable && !disabled && !current;
|
|
47
48
|
var handleClick = function handleClick() {
|
|
48
49
|
if (onClick) {
|
|
@@ -115,7 +116,8 @@ var ProgressStep = function ProgressStep(_ref) {
|
|
|
115
116
|
}, value);
|
|
116
117
|
};
|
|
117
118
|
var StepLine = function StepLine() {
|
|
118
|
-
var
|
|
119
|
+
var showComplete = complete && highlightConnectorLinesToShowProgress;
|
|
120
|
+
var classes = classnames(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(iotPrefix, "--progress-step-line"), !subStep && !showComplete), "".concat(iotPrefix, "--progress-step-line--sub"), subStep && !showComplete), "".concat(iotPrefix, "--progress-step-line--complete"), !subStep && showComplete), "".concat(iotPrefix, "--progress-step-line--sub-complete"), subStep && showComplete));
|
|
119
121
|
return !lastItem ? /*#__PURE__*/React__default.createElement("div", {
|
|
120
122
|
className: classes
|
|
121
123
|
}) : null;
|
|
@@ -187,7 +189,9 @@ ProgressStep.propTypes = {
|
|
|
187
189
|
onClick: PropTypes.func,
|
|
188
190
|
spaceEqually: PropTypes.bool,
|
|
189
191
|
pictogramName: PropTypes.string,
|
|
190
|
-
hasPictogram: PropTypes.bool
|
|
192
|
+
hasPictogram: PropTypes.bool,
|
|
193
|
+
/** When true, all connector lines are highlighted blue to show progress */
|
|
194
|
+
highlightConnectorLinesToShowProgress: PropTypes.bool
|
|
191
195
|
};
|
|
192
196
|
ProgressStep.defaultProps = {
|
|
193
197
|
label: null,
|
|
@@ -209,7 +213,9 @@ ProgressStep.defaultProps = {
|
|
|
209
213
|
onClick: null,
|
|
210
214
|
spaceEqually: false,
|
|
211
215
|
pictogramName: null,
|
|
212
|
-
hasPictogram: false
|
|
216
|
+
hasPictogram: false,
|
|
217
|
+
/** default false, all connector lines are highlighted grey to show progress */
|
|
218
|
+
highlightConnectorLinesToShowProgress: true
|
|
213
219
|
};
|
|
214
220
|
var ProgressIndicator = function ProgressIndicator(_ref2) {
|
|
215
221
|
var className = _ref2.className,
|
|
@@ -221,7 +227,8 @@ var ProgressIndicator = function ProgressIndicator(_ref2) {
|
|
|
221
227
|
isClickable = _ref2.isClickable,
|
|
222
228
|
onClickItem = _ref2.onClickItem,
|
|
223
229
|
testId = _ref2.testId,
|
|
224
|
-
spaceEqually = _ref2.spaceEqually
|
|
230
|
+
spaceEqually = _ref2.spaceEqually,
|
|
231
|
+
highlightConnectorLinesToShowProgress = _ref2.highlightConnectorLinesToShowProgress;
|
|
225
232
|
var _useState = useState(currentItemId || items[0].id),
|
|
226
233
|
_useState2 = _slicedToArray(_useState, 2),
|
|
227
234
|
currentStep = _useState2[0],
|
|
@@ -320,7 +327,8 @@ var ProgressIndicator = function ProgressIndicator(_ref2) {
|
|
|
320
327
|
isClickable: isClickable,
|
|
321
328
|
spaceEqually: spaceEqually,
|
|
322
329
|
pictogramName: pictogramName,
|
|
323
|
-
hasPictogram: hasPictogram
|
|
330
|
+
hasPictogram: hasPictogram,
|
|
331
|
+
highlightConnectorLinesToShowProgress: highlightConnectorLinesToShowProgress
|
|
324
332
|
});
|
|
325
333
|
})) : null;
|
|
326
334
|
};
|
|
@@ -343,7 +351,9 @@ ProgressIndicator.propTypes = {
|
|
|
343
351
|
onClickItem: PropTypes.func,
|
|
344
352
|
testId: PropTypes.string,
|
|
345
353
|
/** Specify whether the progress steps should be split equally in size in the div */
|
|
346
|
-
spaceEqually: PropTypes.bool
|
|
354
|
+
spaceEqually: PropTypes.bool,
|
|
355
|
+
/** When true, all connector lines are highlighted blue to show progress */
|
|
356
|
+
highlightConnectorLinesToShowProgress: PropTypes.bool
|
|
347
357
|
};
|
|
348
358
|
ProgressIndicator.defaultProps = {
|
|
349
359
|
className: null,
|
|
@@ -355,7 +365,9 @@ ProgressIndicator.defaultProps = {
|
|
|
355
365
|
isClickable: false,
|
|
356
366
|
onClickItem: null,
|
|
357
367
|
testId: "".concat(iotPrefix, "--progress-indicator-testid"),
|
|
358
|
-
spaceEqually: false
|
|
368
|
+
spaceEqually: false,
|
|
369
|
+
/** default false, all connector lines are highlighted grey to show progress */
|
|
370
|
+
highlightConnectorLinesToShowProgress: true
|
|
359
371
|
};
|
|
360
372
|
ProgressIndicator.__docgenInfo = {
|
|
361
373
|
"description": "",
|
|
@@ -506,6 +518,17 @@ ProgressIndicator.__docgenInfo = {
|
|
|
506
518
|
"name": "bool"
|
|
507
519
|
},
|
|
508
520
|
"required": false
|
|
521
|
+
},
|
|
522
|
+
"highlightConnectorLinesToShowProgress": {
|
|
523
|
+
"defaultValue": {
|
|
524
|
+
"value": "true",
|
|
525
|
+
"computed": false
|
|
526
|
+
},
|
|
527
|
+
"description": "When true, all connector lines are highlighted blue to show progress",
|
|
528
|
+
"type": {
|
|
529
|
+
"name": "bool"
|
|
530
|
+
},
|
|
531
|
+
"required": false
|
|
509
532
|
}
|
|
510
533
|
}
|
|
511
534
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
2
1
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
3
2
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
4
3
|
import debounce from '../../../node_modules/lodash-es/debounce.js';
|
|
@@ -272,21 +271,27 @@ var TableHead = function TableHead(_ref) {
|
|
|
272
271
|
};
|
|
273
272
|
var onManualColumnResize = function onManualColumnResize(modifiedColumnWidths) {
|
|
274
273
|
if (percentageMode) {
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
delete modifiedColumns[key].width;
|
|
279
|
-
}
|
|
280
|
-
});
|
|
274
|
+
// Measure current rendered widths BEFORE switching to pixel mode
|
|
275
|
+
// This prevents unused space by preserving actual column widths
|
|
276
|
+
var measuredWidths = measureColumnWidths();
|
|
281
277
|
|
|
282
|
-
//
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
278
|
+
// Convert measured widths directly to column format with pixel values
|
|
279
|
+
// This preserves the actual rendered widths instead of using defaults
|
|
280
|
+
var columnsWithMeasuredWidths = columns.map(function (col) {
|
|
281
|
+
var measured = measuredWidths.find(function (m) {
|
|
282
|
+
return m.id === col.id;
|
|
283
|
+
});
|
|
284
|
+
return _objectSpread(_objectSpread({}, col), {}, {
|
|
285
|
+
width: measured ? "".concat(measured.width, "px") : col.width
|
|
286
|
+
});
|
|
287
287
|
});
|
|
288
|
-
|
|
289
|
-
|
|
288
|
+
|
|
289
|
+
// Create width map from columns with measured values, then apply user's resize
|
|
290
|
+
var newColumnWidths = createNewWidthsMap(ordering, columnsWithMeasuredWidths, modifiedColumnWidths);
|
|
291
|
+
|
|
292
|
+
// Update both state and notify parent component
|
|
293
|
+
// This ensures horizontal scrollbar appears if total width exceeds container
|
|
294
|
+
updateColumnWidths(newColumnWidths);
|
|
290
295
|
setPercentageMode(false);
|
|
291
296
|
} else {
|
|
292
297
|
var _newColumnWidths = createNewWidthsMap(ordering, currentColumnWidths, modifiedColumnWidths);
|
|
@@ -78,7 +78,9 @@ var PageWizardPropTypes = {
|
|
|
78
78
|
testId: PropTypes__default.default.string,
|
|
79
79
|
/** Specify whether the progress steps should be split equally in size in the div */
|
|
80
80
|
spaceEqually: PropTypes__default.default.bool,
|
|
81
|
-
stepWidth: PropTypes__default.default.number
|
|
81
|
+
stepWidth: PropTypes__default.default.number,
|
|
82
|
+
/** When true, all connector lines are highlighted blue to show progress */
|
|
83
|
+
highlightConnectorLinesToShowProgress: PropTypes__default.default.bool
|
|
82
84
|
};
|
|
83
85
|
var defaultProps = {
|
|
84
86
|
children: [],
|
|
@@ -103,7 +105,8 @@ var defaultProps = {
|
|
|
103
105
|
isClickable: false,
|
|
104
106
|
testId: 'page-wizard',
|
|
105
107
|
spaceEqually: false,
|
|
106
|
-
stepWidth: null
|
|
108
|
+
stepWidth: null,
|
|
109
|
+
highlightConnectorLinesToShowProgress: true
|
|
107
110
|
};
|
|
108
111
|
var PageWizard = function PageWizard(_ref) {
|
|
109
112
|
var ch = _ref.children,
|
|
@@ -126,7 +129,8 @@ var PageWizard = function PageWizard(_ref) {
|
|
|
126
129
|
isClickable = _ref.isClickable,
|
|
127
130
|
testId = _ref.testId,
|
|
128
131
|
spaceEqually = _ref.spaceEqually,
|
|
129
|
-
stepWidth = _ref.stepWidth
|
|
132
|
+
stepWidth = _ref.stepWidth,
|
|
133
|
+
highlightConnectorLinesToShowProgress = _ref.highlightConnectorLinesToShowProgress;
|
|
130
134
|
var children = ch.length ? ch : [ch];
|
|
131
135
|
var steps = React__default.default.Children.map(children, function (step) {
|
|
132
136
|
return step.props;
|
|
@@ -231,7 +235,8 @@ var PageWizard = function PageWizard(_ref) {
|
|
|
231
235
|
isVerticalMode: isProgressIndicatorVertical,
|
|
232
236
|
isClickable: isClickable,
|
|
233
237
|
spaceEqually: spaceEqually,
|
|
234
|
-
stepWidth: stepWidth
|
|
238
|
+
stepWidth: stepWidth,
|
|
239
|
+
highlightConnectorLinesToShowProgress: highlightConnectorLinesToShowProgress
|
|
235
240
|
// TODO: pass down the testId in v3 instead of falling back to the
|
|
236
241
|
// default.
|
|
237
242
|
// testId={`${testId}-progress-indicator`}
|
|
@@ -462,6 +467,17 @@ PageWizard.__docgenInfo = {
|
|
|
462
467
|
},
|
|
463
468
|
"required": false
|
|
464
469
|
},
|
|
470
|
+
"highlightConnectorLinesToShowProgress": {
|
|
471
|
+
"defaultValue": {
|
|
472
|
+
"value": "true",
|
|
473
|
+
"computed": false
|
|
474
|
+
},
|
|
475
|
+
"description": "When true, all connector lines are highlighted blue to show progress",
|
|
476
|
+
"type": {
|
|
477
|
+
"name": "bool"
|
|
478
|
+
},
|
|
479
|
+
"required": false
|
|
480
|
+
},
|
|
465
481
|
"onClose": {
|
|
466
482
|
"description": "action if the inline wizard is closed or canceled",
|
|
467
483
|
"type": {
|
|
@@ -71,7 +71,8 @@ var ProgressStep = function ProgressStep(_ref) {
|
|
|
71
71
|
subStep = _ref.subStep,
|
|
72
72
|
spaceEqually = _ref.spaceEqually,
|
|
73
73
|
pictogramName = _ref.pictogramName,
|
|
74
|
-
hasPictogram = _ref.hasPictogram
|
|
74
|
+
hasPictogram = _ref.hasPictogram,
|
|
75
|
+
highlightConnectorLinesToShowProgress = _ref.highlightConnectorLinesToShowProgress;
|
|
75
76
|
var accessible = isClickable && !disabled && !current;
|
|
76
77
|
var handleClick = function handleClick() {
|
|
77
78
|
if (onClick) {
|
|
@@ -144,7 +145,8 @@ var ProgressStep = function ProgressStep(_ref) {
|
|
|
144
145
|
}, value);
|
|
145
146
|
};
|
|
146
147
|
var StepLine = function StepLine() {
|
|
147
|
-
var
|
|
148
|
+
var showComplete = complete && highlightConnectorLinesToShowProgress;
|
|
149
|
+
var classes = classnames__default.default(_defineProperty__default.default(_defineProperty__default.default(_defineProperty__default.default(_defineProperty__default.default({}, "".concat(iotPrefix, "--progress-step-line"), !subStep && !showComplete), "".concat(iotPrefix, "--progress-step-line--sub"), subStep && !showComplete), "".concat(iotPrefix, "--progress-step-line--complete"), !subStep && showComplete), "".concat(iotPrefix, "--progress-step-line--sub-complete"), subStep && showComplete));
|
|
148
150
|
return !lastItem ? /*#__PURE__*/React__default.default.createElement("div", {
|
|
149
151
|
className: classes
|
|
150
152
|
}) : null;
|
|
@@ -216,7 +218,9 @@ ProgressStep.propTypes = {
|
|
|
216
218
|
onClick: PropTypes__default.default.func,
|
|
217
219
|
spaceEqually: PropTypes__default.default.bool,
|
|
218
220
|
pictogramName: PropTypes__default.default.string,
|
|
219
|
-
hasPictogram: PropTypes__default.default.bool
|
|
221
|
+
hasPictogram: PropTypes__default.default.bool,
|
|
222
|
+
/** When true, all connector lines are highlighted blue to show progress */
|
|
223
|
+
highlightConnectorLinesToShowProgress: PropTypes__default.default.bool
|
|
220
224
|
};
|
|
221
225
|
ProgressStep.defaultProps = {
|
|
222
226
|
label: null,
|
|
@@ -238,7 +242,9 @@ ProgressStep.defaultProps = {
|
|
|
238
242
|
onClick: null,
|
|
239
243
|
spaceEqually: false,
|
|
240
244
|
pictogramName: null,
|
|
241
|
-
hasPictogram: false
|
|
245
|
+
hasPictogram: false,
|
|
246
|
+
/** default false, all connector lines are highlighted grey to show progress */
|
|
247
|
+
highlightConnectorLinesToShowProgress: true
|
|
242
248
|
};
|
|
243
249
|
var ProgressIndicator = function ProgressIndicator(_ref2) {
|
|
244
250
|
var className = _ref2.className,
|
|
@@ -250,7 +256,8 @@ var ProgressIndicator = function ProgressIndicator(_ref2) {
|
|
|
250
256
|
isClickable = _ref2.isClickable,
|
|
251
257
|
onClickItem = _ref2.onClickItem,
|
|
252
258
|
testId = _ref2.testId,
|
|
253
|
-
spaceEqually = _ref2.spaceEqually
|
|
259
|
+
spaceEqually = _ref2.spaceEqually,
|
|
260
|
+
highlightConnectorLinesToShowProgress = _ref2.highlightConnectorLinesToShowProgress;
|
|
254
261
|
var _useState = React.useState(currentItemId || items[0].id),
|
|
255
262
|
_useState2 = _slicedToArray__default.default(_useState, 2),
|
|
256
263
|
currentStep = _useState2[0],
|
|
@@ -349,7 +356,8 @@ var ProgressIndicator = function ProgressIndicator(_ref2) {
|
|
|
349
356
|
isClickable: isClickable,
|
|
350
357
|
spaceEqually: spaceEqually,
|
|
351
358
|
pictogramName: pictogramName,
|
|
352
|
-
hasPictogram: hasPictogram
|
|
359
|
+
hasPictogram: hasPictogram,
|
|
360
|
+
highlightConnectorLinesToShowProgress: highlightConnectorLinesToShowProgress
|
|
353
361
|
});
|
|
354
362
|
})) : null;
|
|
355
363
|
};
|
|
@@ -372,7 +380,9 @@ ProgressIndicator.propTypes = {
|
|
|
372
380
|
onClickItem: PropTypes__default.default.func,
|
|
373
381
|
testId: PropTypes__default.default.string,
|
|
374
382
|
/** Specify whether the progress steps should be split equally in size in the div */
|
|
375
|
-
spaceEqually: PropTypes__default.default.bool
|
|
383
|
+
spaceEqually: PropTypes__default.default.bool,
|
|
384
|
+
/** When true, all connector lines are highlighted blue to show progress */
|
|
385
|
+
highlightConnectorLinesToShowProgress: PropTypes__default.default.bool
|
|
376
386
|
};
|
|
377
387
|
ProgressIndicator.defaultProps = {
|
|
378
388
|
className: null,
|
|
@@ -384,7 +394,9 @@ ProgressIndicator.defaultProps = {
|
|
|
384
394
|
isClickable: false,
|
|
385
395
|
onClickItem: null,
|
|
386
396
|
testId: "".concat(iotPrefix, "--progress-indicator-testid"),
|
|
387
|
-
spaceEqually: false
|
|
397
|
+
spaceEqually: false,
|
|
398
|
+
/** default false, all connector lines are highlighted grey to show progress */
|
|
399
|
+
highlightConnectorLinesToShowProgress: true
|
|
388
400
|
};
|
|
389
401
|
ProgressIndicator.__docgenInfo = {
|
|
390
402
|
"description": "",
|
|
@@ -535,6 +547,17 @@ ProgressIndicator.__docgenInfo = {
|
|
|
535
547
|
"name": "bool"
|
|
536
548
|
},
|
|
537
549
|
"required": false
|
|
550
|
+
},
|
|
551
|
+
"highlightConnectorLinesToShowProgress": {
|
|
552
|
+
"defaultValue": {
|
|
553
|
+
"value": "true",
|
|
554
|
+
"computed": false
|
|
555
|
+
},
|
|
556
|
+
"description": "When true, all connector lines are highlighted blue to show progress",
|
|
557
|
+
"type": {
|
|
558
|
+
"name": "bool"
|
|
559
|
+
},
|
|
560
|
+
"required": false
|
|
538
561
|
}
|
|
539
562
|
}
|
|
540
563
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var _toConsumableArray = require('@babel/runtime/helpers/toConsumableArray');
|
|
4
3
|
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
5
4
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
6
5
|
var debounce = require('../../../node_modules/lodash-es/debounce.js');
|
|
@@ -49,7 +48,6 @@ var iconsReact = require('@carbon/icons-react');
|
|
|
49
48
|
|
|
50
49
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
51
50
|
|
|
52
|
-
var _toConsumableArray__default = /*#__PURE__*/_interopDefault(_toConsumableArray);
|
|
53
51
|
var _slicedToArray__default = /*#__PURE__*/_interopDefault(_slicedToArray);
|
|
54
52
|
var _defineProperty__default = /*#__PURE__*/_interopDefault(_defineProperty);
|
|
55
53
|
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
@@ -284,21 +282,27 @@ var TableHead = function TableHead(_ref) {
|
|
|
284
282
|
};
|
|
285
283
|
var onManualColumnResize = function onManualColumnResize(modifiedColumnWidths) {
|
|
286
284
|
if (percentageMode) {
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
delete modifiedColumns[key].width;
|
|
291
|
-
}
|
|
292
|
-
});
|
|
285
|
+
// Measure current rendered widths BEFORE switching to pixel mode
|
|
286
|
+
// This prevents unused space by preserving actual column widths
|
|
287
|
+
var measuredWidths = measureColumnWidths();
|
|
293
288
|
|
|
294
|
-
//
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
289
|
+
// Convert measured widths directly to column format with pixel values
|
|
290
|
+
// This preserves the actual rendered widths instead of using defaults
|
|
291
|
+
var columnsWithMeasuredWidths = columns.map(function (col) {
|
|
292
|
+
var measured = measuredWidths.find(function (m) {
|
|
293
|
+
return m.id === col.id;
|
|
294
|
+
});
|
|
295
|
+
return _objectSpread(_objectSpread({}, col), {}, {
|
|
296
|
+
width: measured ? "".concat(measured.width, "px") : col.width
|
|
297
|
+
});
|
|
299
298
|
});
|
|
300
|
-
|
|
301
|
-
|
|
299
|
+
|
|
300
|
+
// Create width map from columns with measured values, then apply user's resize
|
|
301
|
+
var newColumnWidths = columnWidthUtilityFunctions.createNewWidthsMap(ordering, columnsWithMeasuredWidths, modifiedColumnWidths);
|
|
302
|
+
|
|
303
|
+
// Update both state and notify parent component
|
|
304
|
+
// This ensures horizontal scrollbar appears if total width exceeds container
|
|
305
|
+
updateColumnWidths(newColumnWidths);
|
|
302
306
|
setPercentageMode(false);
|
|
303
307
|
} else {
|
|
304
308
|
var _newColumnWidths = columnWidthUtilityFunctions.createNewWidthsMap(ordering, currentColumnWidths, modifiedColumnWidths);
|
package/package.json
CHANGED
|
@@ -234295,21 +234295,27 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
234295
234295
|
};
|
|
234296
234296
|
var onManualColumnResize = function onManualColumnResize(modifiedColumnWidths) {
|
|
234297
234297
|
if (percentageMode) {
|
|
234298
|
-
|
|
234299
|
-
|
|
234300
|
-
|
|
234301
|
-
delete modifiedColumns[key].width;
|
|
234302
|
-
}
|
|
234303
|
-
});
|
|
234298
|
+
// Measure current rendered widths BEFORE switching to pixel mode
|
|
234299
|
+
// This prevents unused space by preserving actual column widths
|
|
234300
|
+
var measuredWidths = measureColumnWidths();
|
|
234304
234301
|
|
|
234305
|
-
//
|
|
234306
|
-
|
|
234307
|
-
|
|
234308
|
-
|
|
234309
|
-
|
|
234302
|
+
// Convert measured widths directly to column format with pixel values
|
|
234303
|
+
// This preserves the actual rendered widths instead of using defaults
|
|
234304
|
+
var columnsWithMeasuredWidths = columns.map(function (col) {
|
|
234305
|
+
var measured = measuredWidths.find(function (m) {
|
|
234306
|
+
return m.id === col.id;
|
|
234307
|
+
});
|
|
234308
|
+
return _objectSpread$1R(_objectSpread$1R({}, col), {}, {
|
|
234309
|
+
width: measured ? "".concat(measured.width, "px") : col.width
|
|
234310
|
+
});
|
|
234310
234311
|
});
|
|
234311
|
-
|
|
234312
|
-
|
|
234312
|
+
|
|
234313
|
+
// Create width map from columns with measured values, then apply user's resize
|
|
234314
|
+
var newColumnWidths = createNewWidthsMap(ordering, columnsWithMeasuredWidths, modifiedColumnWidths);
|
|
234315
|
+
|
|
234316
|
+
// Update both state and notify parent component
|
|
234317
|
+
// This ensures horizontal scrollbar appears if total width exceeds container
|
|
234318
|
+
updateColumnWidths(newColumnWidths);
|
|
234313
234319
|
setPercentageMode(false);
|
|
234314
234320
|
} else {
|
|
234315
234321
|
var _newColumnWidths = createNewWidthsMap(ordering, currentColumnWidths, modifiedColumnWidths);
|
|
@@ -270018,7 +270024,8 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
270018
270024
|
subStep = _ref.subStep,
|
|
270019
270025
|
spaceEqually = _ref.spaceEqually,
|
|
270020
270026
|
pictogramName = _ref.pictogramName,
|
|
270021
|
-
hasPictogram = _ref.hasPictogram
|
|
270027
|
+
hasPictogram = _ref.hasPictogram,
|
|
270028
|
+
highlightConnectorLinesToShowProgress = _ref.highlightConnectorLinesToShowProgress;
|
|
270022
270029
|
var accessible = isClickable && !disabled && !current;
|
|
270023
270030
|
var handleClick = function handleClick() {
|
|
270024
270031
|
if (onClick) {
|
|
@@ -270091,7 +270098,8 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
270091
270098
|
}, value);
|
|
270092
270099
|
};
|
|
270093
270100
|
var StepLine = function StepLine() {
|
|
270094
|
-
var
|
|
270101
|
+
var showComplete = complete && highlightConnectorLinesToShowProgress;
|
|
270102
|
+
var classes = classnames(_defineProperty$d(_defineProperty$d(_defineProperty$d(_defineProperty$d({}, "".concat(iotPrefix$1E, "--progress-step-line"), !subStep && !showComplete), "".concat(iotPrefix$1E, "--progress-step-line--sub"), subStep && !showComplete), "".concat(iotPrefix$1E, "--progress-step-line--complete"), !subStep && showComplete), "".concat(iotPrefix$1E, "--progress-step-line--sub-complete"), subStep && showComplete));
|
|
270095
270103
|
return !lastItem ? /*#__PURE__*/React$1.createElement("div", {
|
|
270096
270104
|
className: classes
|
|
270097
270105
|
}) : null;
|
|
@@ -270163,7 +270171,9 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
270163
270171
|
onClick: PropTypes.func,
|
|
270164
270172
|
spaceEqually: PropTypes.bool,
|
|
270165
270173
|
pictogramName: PropTypes.string,
|
|
270166
|
-
hasPictogram: PropTypes.bool
|
|
270174
|
+
hasPictogram: PropTypes.bool,
|
|
270175
|
+
/** When true, all connector lines are highlighted blue to show progress */
|
|
270176
|
+
highlightConnectorLinesToShowProgress: PropTypes.bool
|
|
270167
270177
|
};
|
|
270168
270178
|
ProgressStep.defaultProps = {
|
|
270169
270179
|
label: null,
|
|
@@ -270185,7 +270195,9 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
270185
270195
|
onClick: null,
|
|
270186
270196
|
spaceEqually: false,
|
|
270187
270197
|
pictogramName: null,
|
|
270188
|
-
hasPictogram: false
|
|
270198
|
+
hasPictogram: false,
|
|
270199
|
+
/** default false, all connector lines are highlighted grey to show progress */
|
|
270200
|
+
highlightConnectorLinesToShowProgress: true
|
|
270189
270201
|
};
|
|
270190
270202
|
var ProgressIndicator = function ProgressIndicator(_ref2) {
|
|
270191
270203
|
var className = _ref2.className,
|
|
@@ -270197,7 +270209,8 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
270197
270209
|
isClickable = _ref2.isClickable,
|
|
270198
270210
|
onClickItem = _ref2.onClickItem,
|
|
270199
270211
|
testId = _ref2.testId,
|
|
270200
|
-
spaceEqually = _ref2.spaceEqually
|
|
270212
|
+
spaceEqually = _ref2.spaceEqually,
|
|
270213
|
+
highlightConnectorLinesToShowProgress = _ref2.highlightConnectorLinesToShowProgress;
|
|
270201
270214
|
var _useState = React$1.useState(currentItemId || items[0].id),
|
|
270202
270215
|
_useState2 = _slicedToArray$9(_useState, 2),
|
|
270203
270216
|
currentStep = _useState2[0],
|
|
@@ -270296,7 +270309,8 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
270296
270309
|
isClickable: isClickable,
|
|
270297
270310
|
spaceEqually: spaceEqually,
|
|
270298
270311
|
pictogramName: pictogramName,
|
|
270299
|
-
hasPictogram: hasPictogram
|
|
270312
|
+
hasPictogram: hasPictogram,
|
|
270313
|
+
highlightConnectorLinesToShowProgress: highlightConnectorLinesToShowProgress
|
|
270300
270314
|
});
|
|
270301
270315
|
})) : null;
|
|
270302
270316
|
};
|
|
@@ -270319,7 +270333,9 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
270319
270333
|
onClickItem: PropTypes.func,
|
|
270320
270334
|
testId: PropTypes.string,
|
|
270321
270335
|
/** Specify whether the progress steps should be split equally in size in the div */
|
|
270322
|
-
spaceEqually: PropTypes.bool
|
|
270336
|
+
spaceEqually: PropTypes.bool,
|
|
270337
|
+
/** When true, all connector lines are highlighted blue to show progress */
|
|
270338
|
+
highlightConnectorLinesToShowProgress: PropTypes.bool
|
|
270323
270339
|
};
|
|
270324
270340
|
ProgressIndicator.defaultProps = {
|
|
270325
270341
|
className: null,
|
|
@@ -270331,7 +270347,9 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
270331
270347
|
isClickable: false,
|
|
270332
270348
|
onClickItem: null,
|
|
270333
270349
|
testId: "".concat(iotPrefix$1E, "--progress-indicator-testid"),
|
|
270334
|
-
spaceEqually: false
|
|
270350
|
+
spaceEqually: false,
|
|
270351
|
+
/** default false, all connector lines are highlighted grey to show progress */
|
|
270352
|
+
highlightConnectorLinesToShowProgress: true
|
|
270335
270353
|
};
|
|
270336
270354
|
ProgressIndicator.__docgenInfo = {
|
|
270337
270355
|
"description": "",
|
|
@@ -270482,6 +270500,17 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
270482
270500
|
"name": "bool"
|
|
270483
270501
|
},
|
|
270484
270502
|
"required": false
|
|
270503
|
+
},
|
|
270504
|
+
"highlightConnectorLinesToShowProgress": {
|
|
270505
|
+
"defaultValue": {
|
|
270506
|
+
"value": "true",
|
|
270507
|
+
"computed": false
|
|
270508
|
+
},
|
|
270509
|
+
"description": "When true, all connector lines are highlighted blue to show progress",
|
|
270510
|
+
"type": {
|
|
270511
|
+
"name": "bool"
|
|
270512
|
+
},
|
|
270513
|
+
"required": false
|
|
270485
270514
|
}
|
|
270486
270515
|
}
|
|
270487
270516
|
};
|
|
@@ -342786,7 +342815,9 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
342786
342815
|
testId: PropTypes.string,
|
|
342787
342816
|
/** Specify whether the progress steps should be split equally in size in the div */
|
|
342788
342817
|
spaceEqually: PropTypes.bool,
|
|
342789
|
-
stepWidth: PropTypes.number
|
|
342818
|
+
stepWidth: PropTypes.number,
|
|
342819
|
+
/** When true, all connector lines are highlighted blue to show progress */
|
|
342820
|
+
highlightConnectorLinesToShowProgress: PropTypes.bool
|
|
342790
342821
|
};
|
|
342791
342822
|
var defaultProps$r = {
|
|
342792
342823
|
children: [],
|
|
@@ -342811,7 +342842,8 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
342811
342842
|
isClickable: false,
|
|
342812
342843
|
testId: 'page-wizard',
|
|
342813
342844
|
spaceEqually: false,
|
|
342814
|
-
stepWidth: null
|
|
342845
|
+
stepWidth: null,
|
|
342846
|
+
highlightConnectorLinesToShowProgress: true
|
|
342815
342847
|
};
|
|
342816
342848
|
var PageWizard = function PageWizard(_ref) {
|
|
342817
342849
|
var ch = _ref.children,
|
|
@@ -342834,7 +342866,8 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
342834
342866
|
isClickable = _ref.isClickable,
|
|
342835
342867
|
testId = _ref.testId,
|
|
342836
342868
|
spaceEqually = _ref.spaceEqually,
|
|
342837
|
-
stepWidth = _ref.stepWidth
|
|
342869
|
+
stepWidth = _ref.stepWidth,
|
|
342870
|
+
highlightConnectorLinesToShowProgress = _ref.highlightConnectorLinesToShowProgress;
|
|
342838
342871
|
var children = ch.length ? ch : [ch];
|
|
342839
342872
|
var steps = React$1.Children.map(children, function (step) {
|
|
342840
342873
|
return step.props;
|
|
@@ -342939,7 +342972,8 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
342939
342972
|
isVerticalMode: isProgressIndicatorVertical,
|
|
342940
342973
|
isClickable: isClickable,
|
|
342941
342974
|
spaceEqually: spaceEqually,
|
|
342942
|
-
stepWidth: stepWidth
|
|
342975
|
+
stepWidth: stepWidth,
|
|
342976
|
+
highlightConnectorLinesToShowProgress: highlightConnectorLinesToShowProgress
|
|
342943
342977
|
// TODO: pass down the testId in v3 instead of falling back to the
|
|
342944
342978
|
// default.
|
|
342945
342979
|
// testId={`${testId}-progress-indicator`}
|
|
@@ -343170,6 +343204,17 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
343170
343204
|
},
|
|
343171
343205
|
"required": false
|
|
343172
343206
|
},
|
|
343207
|
+
"highlightConnectorLinesToShowProgress": {
|
|
343208
|
+
"defaultValue": {
|
|
343209
|
+
"value": "true",
|
|
343210
|
+
"computed": false
|
|
343211
|
+
},
|
|
343212
|
+
"description": "When true, all connector lines are highlighted blue to show progress",
|
|
343213
|
+
"type": {
|
|
343214
|
+
"name": "bool"
|
|
343215
|
+
},
|
|
343216
|
+
"required": false
|
|
343217
|
+
},
|
|
343173
343218
|
"onClose": {
|
|
343174
343219
|
"description": "action if the inline wizard is closed or canceled",
|
|
343175
343220
|
"type": {
|