dce-reactkit 3.2.2-beta.34 → 3.2.2-beta.36
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/dist/cjs/index.js +39 -15
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +39 -15
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/ButtonInputGroup.tsx +1 -1
- package/src/components/IntelliTable.tsx +46 -11
- package/src/components/LogReviewer.tsx +6 -1
package/dist/cjs/index.js
CHANGED
|
@@ -1202,7 +1202,7 @@ const ButtonInputGroup = (props) => {
|
|
|
1202
1202
|
borderTopRightRadius: 0,
|
|
1203
1203
|
borderBottomRightRadius: 0,
|
|
1204
1204
|
} }, label),
|
|
1205
|
-
React__default["default"].createElement("span", { className: "input-group-text flex-grow-1 rounded-right", style: {
|
|
1205
|
+
React__default["default"].createElement("span", { className: "input-group-text flex-grow-1 rounded-right d-flex flex-wrap", style: {
|
|
1206
1206
|
backgroundColor: 'white',
|
|
1207
1207
|
borderTopLeftRadius: 0,
|
|
1208
1208
|
borderBottomLeftRadius: 0,
|
|
@@ -2316,7 +2316,7 @@ var ActionType$1;
|
|
|
2316
2316
|
// Toggle sort column param
|
|
2317
2317
|
ActionType["ToggleSortColumn"] = "toggle-sort-column";
|
|
2318
2318
|
// Toggle the visibility of a column
|
|
2319
|
-
ActionType["
|
|
2319
|
+
ActionType["UpdateColumnVisibility"] = "update-column-visibility";
|
|
2320
2320
|
// Toggle the column visibility customization modal
|
|
2321
2321
|
ActionType["ToggleColVisCusModalVisibility"] = "toggle-col-vis-cus-modal-visibility";
|
|
2322
2322
|
})(ActionType$1 || (ActionType$1 = {}));
|
|
@@ -2340,9 +2340,9 @@ const reducer$1 = (state, action) => {
|
|
|
2340
2340
|
// Stop sorting by column
|
|
2341
2341
|
return Object.assign(Object.assign({}, state), { sortColumnParam: undefined, sortType: SortType.Ascending });
|
|
2342
2342
|
}
|
|
2343
|
-
case ActionType$1.
|
|
2343
|
+
case ActionType$1.UpdateColumnVisibility: {
|
|
2344
2344
|
const { columnVisibilityMap } = state;
|
|
2345
|
-
columnVisibilityMap[action.param] =
|
|
2345
|
+
columnVisibilityMap[action.param] = action.visible;
|
|
2346
2346
|
return Object.assign(Object.assign({}, state), { columnVisibilityMap });
|
|
2347
2347
|
}
|
|
2348
2348
|
case ActionType$1.ToggleColVisCusModalVisibility: {
|
|
@@ -2395,13 +2395,14 @@ const IntelliTable = (props) => {
|
|
|
2395
2395
|
dispatch({
|
|
2396
2396
|
type: ActionType$1.ToggleColVisCusModalVisibility,
|
|
2397
2397
|
});
|
|
2398
|
-
} }, columns.map((column) => {
|
|
2399
|
-
return (React__default["default"].createElement(CheckboxButton, { key: column.param, id: `IntelliTable-${id}-toggle-visibility-${column.param}`, text: column.title, onChanged: () => {
|
|
2398
|
+
}, okayVariant: Variant$1.Light }, columns.map((column) => {
|
|
2399
|
+
return (React__default["default"].createElement(CheckboxButton, { key: column.param, id: `IntelliTable-${id}-toggle-visibility-${column.param}`, className: "mb-2", text: column.title, onChanged: (checked) => {
|
|
2400
2400
|
dispatch({
|
|
2401
|
-
type: ActionType$1.
|
|
2401
|
+
type: ActionType$1.UpdateColumnVisibility,
|
|
2402
2402
|
param: column.param,
|
|
2403
|
+
visible: checked,
|
|
2403
2404
|
});
|
|
2404
|
-
}, checked: columnVisibilityMap[column.param], ariaLabel: `show "${column.title}" column
|
|
2405
|
+
}, checked: columnVisibilityMap[column.param], ariaLabel: `show "${column.title}" column`, checkedVariant: Variant$1.Light, uncheckedVariant: Variant$1.Secondary }));
|
|
2405
2406
|
})));
|
|
2406
2407
|
}
|
|
2407
2408
|
/*----------------------------------------*/
|
|
@@ -2446,7 +2447,7 @@ const IntelliTable = (props) => {
|
|
|
2446
2447
|
borderRight: '0.05rem solid #555',
|
|
2447
2448
|
borderLeft: '0.05rem solid #555',
|
|
2448
2449
|
} },
|
|
2449
|
-
React__default["default"].createElement("div", { className: "d-flex align-items-center justify-content-
|
|
2450
|
+
React__default["default"].createElement("div", { className: "d-flex align-items-center justify-content-start flex-row h-100" },
|
|
2450
2451
|
React__default["default"].createElement("span", { className: "text-nowrap" }, column.title),
|
|
2451
2452
|
React__default["default"].createElement("div", null,
|
|
2452
2453
|
React__default["default"].createElement("button", { type: "button", id: `IntelliTable-${id}-sort-by-${column.param}-button`, className: `btn btn-${sortingByThisColumn ? 'light' : 'secondary'} btn-sm ms-1 ps-1 pe-1 pt-0 pb-0`, "aria-label": sortButtonAriaLabel, onClick: () => {
|
|
@@ -2467,8 +2468,28 @@ const IntelliTable = (props) => {
|
|
|
2467
2468
|
const descending = (sortType === SortType.Descending);
|
|
2468
2469
|
if (sortColumnParam) {
|
|
2469
2470
|
sortedData.sort((a, b) => {
|
|
2471
|
+
var _a, _b;
|
|
2470
2472
|
const aVal = a[sortColumnParam];
|
|
2471
2473
|
const bVal = b[sortColumnParam];
|
|
2474
|
+
// Tiebreaker sort by timestamp, most recent first (used if tied)
|
|
2475
|
+
const tiebreaker = (((_a = b.timestamp) !== null && _a !== void 0 ? _a : 0)
|
|
2476
|
+
- ((_b = a.timestamp) !== null && _b !== void 0 ? _b : 0));
|
|
2477
|
+
// Auto-sort undefined and null to end of list
|
|
2478
|
+
if ((aVal === undefined || aVal === null)
|
|
2479
|
+
|| (bVal === undefined || bVal === null)) {
|
|
2480
|
+
// At least one was undefined
|
|
2481
|
+
if ((aVal === undefined || aVal === null)
|
|
2482
|
+
&& (bVal === undefined || bVal === null)) {
|
|
2483
|
+
// Both undefined
|
|
2484
|
+
return tiebreaker;
|
|
2485
|
+
}
|
|
2486
|
+
if (aVal === undefined || aVal === null) {
|
|
2487
|
+
// First was undefined
|
|
2488
|
+
return 1;
|
|
2489
|
+
}
|
|
2490
|
+
// Second was undefined
|
|
2491
|
+
return -1;
|
|
2492
|
+
}
|
|
2472
2493
|
// Sort differently based on the data type
|
|
2473
2494
|
// > Boolean
|
|
2474
2495
|
if (paramType === ParamType$1.Boolean) {
|
|
@@ -2478,7 +2499,7 @@ const IntelliTable = (props) => {
|
|
|
2478
2499
|
if (!aVal && bVal) {
|
|
2479
2500
|
return (descending ? 1 : -1);
|
|
2480
2501
|
}
|
|
2481
|
-
return
|
|
2502
|
+
return tiebreaker;
|
|
2482
2503
|
}
|
|
2483
2504
|
// > Number
|
|
2484
2505
|
if (paramType === ParamType$1.Int
|
|
@@ -2495,7 +2516,7 @@ const IntelliTable = (props) => {
|
|
|
2495
2516
|
if (aVal > bVal) {
|
|
2496
2517
|
return (descending ? -1 : 1);
|
|
2497
2518
|
}
|
|
2498
|
-
return
|
|
2519
|
+
return tiebreaker;
|
|
2499
2520
|
}
|
|
2500
2521
|
// > JSON
|
|
2501
2522
|
if (paramType === ParamType$1.JSON) {
|
|
@@ -2510,7 +2531,7 @@ const IntelliTable = (props) => {
|
|
|
2510
2531
|
: (aSize - bSize));
|
|
2511
2532
|
}
|
|
2512
2533
|
// No sort
|
|
2513
|
-
return
|
|
2534
|
+
return tiebreaker;
|
|
2514
2535
|
});
|
|
2515
2536
|
}
|
|
2516
2537
|
// Table body
|
|
@@ -3007,7 +3028,6 @@ const LogReviewer = (props) => {
|
|
|
3007
3028
|
});
|
|
3008
3029
|
// Check which year/month combos we need to load
|
|
3009
3030
|
const toLoad = listMonthsToLoad(newDateFilterState);
|
|
3010
|
-
console.log('Filter update:', newDateFilterState, toLoad, logMap);
|
|
3011
3031
|
// If nothing to load, finished
|
|
3012
3032
|
if (toLoad.length === 0) {
|
|
3013
3033
|
return;
|
|
@@ -3207,6 +3227,10 @@ const LogReviewer = (props) => {
|
|
|
3207
3227
|
const description = genHumanReadableName(tag);
|
|
3208
3228
|
return (React__default["default"].createElement(CheckboxButton, { id: `LogReviewer-tag-${tag}-checkbox`, text: description, ariaLabel: `require that logs be tagged with "${description}" or any other selected tag`, noMarginOnRight: i === Object.keys(tagFilterState).length - 1, checked: tagFilterState[tag], onChanged: (checked) => {
|
|
3209
3229
|
tagFilterState[tag] = checked;
|
|
3230
|
+
dispatch({
|
|
3231
|
+
type: ActionType.UpdateTagFilterState,
|
|
3232
|
+
tagFilterState,
|
|
3233
|
+
});
|
|
3210
3234
|
} }));
|
|
3211
3235
|
})));
|
|
3212
3236
|
}
|
|
@@ -3240,7 +3264,7 @@ const LogReviewer = (props) => {
|
|
|
3240
3264
|
React__default["default"].createElement(ButtonInputGroup, { label: "Action", className: "mb-2" }, Object.keys(LogAction$1)
|
|
3241
3265
|
.map((action, i) => {
|
|
3242
3266
|
const description = genHumanReadableName(action);
|
|
3243
|
-
return (React__default["default"].createElement(CheckboxButton, { id: `LogReviewer-action-${action}-checkbox`, text: description, ariaLabel: `include logs with action type "${description}" in results`, noMarginOnRight: i === Object.keys(LogAction$1).length - 1, onChanged: (checked) => {
|
|
3267
|
+
return (React__default["default"].createElement(CheckboxButton, { id: `LogReviewer-action-${action}-checkbox`, text: description, ariaLabel: `include logs with action type "${description}" in results`, noMarginOnRight: i === Object.keys(LogAction$1).length - 1, checked: actionErrorFilterState.action[action], onChanged: (checked) => {
|
|
3244
3268
|
actionErrorFilterState.action[action] = checked;
|
|
3245
3269
|
dispatch({
|
|
3246
3270
|
type: ActionType.UpdateActionErrorFilterState,
|
|
@@ -3254,7 +3278,7 @@ const LogReviewer = (props) => {
|
|
|
3254
3278
|
.map((target, i) => {
|
|
3255
3279
|
var _a;
|
|
3256
3280
|
const description = genHumanReadableName(target);
|
|
3257
|
-
return (React__default["default"].createElement(CheckboxButton, { id: `LogReviewer-target-${target}-checkbox`, text: description, ariaLabel: `include logs with target "${description}" in results`, onChanged: (checked) => {
|
|
3281
|
+
return (React__default["default"].createElement(CheckboxButton, { id: `LogReviewer-target-${target}-checkbox`, text: description, ariaLabel: `include logs with target "${description}" in results`, checked: actionErrorFilterState.target[target], onChanged: (checked) => {
|
|
3258
3282
|
actionErrorFilterState.target[target] = checked;
|
|
3259
3283
|
dispatch({
|
|
3260
3284
|
type: ActionType.UpdateActionErrorFilterState,
|