dce-reactkit 3.2.2-beta.35 → 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 +21 -13
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +21 -13
- 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 +20 -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: {
|
|
@@ -2396,10 +2396,11 @@ const IntelliTable = (props) => {
|
|
|
2396
2396
|
type: ActionType$1.ToggleColVisCusModalVisibility,
|
|
2397
2397
|
});
|
|
2398
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: () => {
|
|
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
2405
|
}, checked: columnVisibilityMap[column.param], ariaLabel: `show "${column.title}" column`, checkedVariant: Variant$1.Light, uncheckedVariant: Variant$1.Secondary }));
|
|
2405
2406
|
})));
|
|
@@ -2467,8 +2468,12 @@ 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));
|
|
2472
2477
|
// Auto-sort undefined and null to end of list
|
|
2473
2478
|
if ((aVal === undefined || aVal === null)
|
|
2474
2479
|
|| (bVal === undefined || bVal === null)) {
|
|
@@ -2476,7 +2481,7 @@ const IntelliTable = (props) => {
|
|
|
2476
2481
|
if ((aVal === undefined || aVal === null)
|
|
2477
2482
|
&& (bVal === undefined || bVal === null)) {
|
|
2478
2483
|
// Both undefined
|
|
2479
|
-
return
|
|
2484
|
+
return tiebreaker;
|
|
2480
2485
|
}
|
|
2481
2486
|
if (aVal === undefined || aVal === null) {
|
|
2482
2487
|
// First was undefined
|
|
@@ -2494,7 +2499,7 @@ const IntelliTable = (props) => {
|
|
|
2494
2499
|
if (!aVal && bVal) {
|
|
2495
2500
|
return (descending ? 1 : -1);
|
|
2496
2501
|
}
|
|
2497
|
-
return
|
|
2502
|
+
return tiebreaker;
|
|
2498
2503
|
}
|
|
2499
2504
|
// > Number
|
|
2500
2505
|
if (paramType === ParamType$1.Int
|
|
@@ -2511,7 +2516,7 @@ const IntelliTable = (props) => {
|
|
|
2511
2516
|
if (aVal > bVal) {
|
|
2512
2517
|
return (descending ? -1 : 1);
|
|
2513
2518
|
}
|
|
2514
|
-
return
|
|
2519
|
+
return tiebreaker;
|
|
2515
2520
|
}
|
|
2516
2521
|
// > JSON
|
|
2517
2522
|
if (paramType === ParamType$1.JSON) {
|
|
@@ -2526,7 +2531,7 @@ const IntelliTable = (props) => {
|
|
|
2526
2531
|
: (aSize - bSize));
|
|
2527
2532
|
}
|
|
2528
2533
|
// No sort
|
|
2529
|
-
return
|
|
2534
|
+
return tiebreaker;
|
|
2530
2535
|
});
|
|
2531
2536
|
}
|
|
2532
2537
|
// Table body
|
|
@@ -3023,7 +3028,6 @@ const LogReviewer = (props) => {
|
|
|
3023
3028
|
});
|
|
3024
3029
|
// Check which year/month combos we need to load
|
|
3025
3030
|
const toLoad = listMonthsToLoad(newDateFilterState);
|
|
3026
|
-
console.log('Filter update:', newDateFilterState, toLoad, logMap);
|
|
3027
3031
|
// If nothing to load, finished
|
|
3028
3032
|
if (toLoad.length === 0) {
|
|
3029
3033
|
return;
|
|
@@ -3223,6 +3227,10 @@ const LogReviewer = (props) => {
|
|
|
3223
3227
|
const description = genHumanReadableName(tag);
|
|
3224
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) => {
|
|
3225
3229
|
tagFilterState[tag] = checked;
|
|
3230
|
+
dispatch({
|
|
3231
|
+
type: ActionType.UpdateTagFilterState,
|
|
3232
|
+
tagFilterState,
|
|
3233
|
+
});
|
|
3226
3234
|
} }));
|
|
3227
3235
|
})));
|
|
3228
3236
|
}
|
|
@@ -3256,7 +3264,7 @@ const LogReviewer = (props) => {
|
|
|
3256
3264
|
React__default["default"].createElement(ButtonInputGroup, { label: "Action", className: "mb-2" }, Object.keys(LogAction$1)
|
|
3257
3265
|
.map((action, i) => {
|
|
3258
3266
|
const description = genHumanReadableName(action);
|
|
3259
|
-
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) => {
|
|
3260
3268
|
actionErrorFilterState.action[action] = checked;
|
|
3261
3269
|
dispatch({
|
|
3262
3270
|
type: ActionType.UpdateActionErrorFilterState,
|
|
@@ -3270,7 +3278,7 @@ const LogReviewer = (props) => {
|
|
|
3270
3278
|
.map((target, i) => {
|
|
3271
3279
|
var _a;
|
|
3272
3280
|
const description = genHumanReadableName(target);
|
|
3273
|
-
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) => {
|
|
3274
3282
|
actionErrorFilterState.target[target] = checked;
|
|
3275
3283
|
dispatch({
|
|
3276
3284
|
type: ActionType.UpdateActionErrorFilterState,
|