dce-reactkit 3.2.2-beta.35 → 3.2.2-beta.37
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 +23 -13
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +23 -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 +8 -1
package/dist/esm/index.js
CHANGED
|
@@ -1194,7 +1194,7 @@ const ButtonInputGroup = (props) => {
|
|
|
1194
1194
|
borderTopRightRadius: 0,
|
|
1195
1195
|
borderBottomRightRadius: 0,
|
|
1196
1196
|
} }, label),
|
|
1197
|
-
React.createElement("span", { className: "input-group-text flex-grow-1 rounded-right", style: {
|
|
1197
|
+
React.createElement("span", { className: "input-group-text flex-grow-1 rounded-right d-flex flex-wrap", style: {
|
|
1198
1198
|
backgroundColor: 'white',
|
|
1199
1199
|
borderTopLeftRadius: 0,
|
|
1200
1200
|
borderBottomLeftRadius: 0,
|
|
@@ -2308,7 +2308,7 @@ var ActionType$1;
|
|
|
2308
2308
|
// Toggle sort column param
|
|
2309
2309
|
ActionType["ToggleSortColumn"] = "toggle-sort-column";
|
|
2310
2310
|
// Toggle the visibility of a column
|
|
2311
|
-
ActionType["
|
|
2311
|
+
ActionType["UpdateColumnVisibility"] = "update-column-visibility";
|
|
2312
2312
|
// Toggle the column visibility customization modal
|
|
2313
2313
|
ActionType["ToggleColVisCusModalVisibility"] = "toggle-col-vis-cus-modal-visibility";
|
|
2314
2314
|
})(ActionType$1 || (ActionType$1 = {}));
|
|
@@ -2332,9 +2332,9 @@ const reducer$1 = (state, action) => {
|
|
|
2332
2332
|
// Stop sorting by column
|
|
2333
2333
|
return Object.assign(Object.assign({}, state), { sortColumnParam: undefined, sortType: SortType.Ascending });
|
|
2334
2334
|
}
|
|
2335
|
-
case ActionType$1.
|
|
2335
|
+
case ActionType$1.UpdateColumnVisibility: {
|
|
2336
2336
|
const { columnVisibilityMap } = state;
|
|
2337
|
-
columnVisibilityMap[action.param] =
|
|
2337
|
+
columnVisibilityMap[action.param] = action.visible;
|
|
2338
2338
|
return Object.assign(Object.assign({}, state), { columnVisibilityMap });
|
|
2339
2339
|
}
|
|
2340
2340
|
case ActionType$1.ToggleColVisCusModalVisibility: {
|
|
@@ -2388,10 +2388,11 @@ const IntelliTable = (props) => {
|
|
|
2388
2388
|
type: ActionType$1.ToggleColVisCusModalVisibility,
|
|
2389
2389
|
});
|
|
2390
2390
|
}, okayVariant: Variant$1.Light }, columns.map((column) => {
|
|
2391
|
-
return (React.createElement(CheckboxButton, { key: column.param, id: `IntelliTable-${id}-toggle-visibility-${column.param}`, className: "mb-2", text: column.title, onChanged: () => {
|
|
2391
|
+
return (React.createElement(CheckboxButton, { key: column.param, id: `IntelliTable-${id}-toggle-visibility-${column.param}`, className: "mb-2", text: column.title, onChanged: (checked) => {
|
|
2392
2392
|
dispatch({
|
|
2393
|
-
type: ActionType$1.
|
|
2393
|
+
type: ActionType$1.UpdateColumnVisibility,
|
|
2394
2394
|
param: column.param,
|
|
2395
|
+
visible: checked,
|
|
2395
2396
|
});
|
|
2396
2397
|
}, checked: columnVisibilityMap[column.param], ariaLabel: `show "${column.title}" column`, checkedVariant: Variant$1.Light, uncheckedVariant: Variant$1.Secondary }));
|
|
2397
2398
|
})));
|
|
@@ -2459,8 +2460,12 @@ const IntelliTable = (props) => {
|
|
|
2459
2460
|
const descending = (sortType === SortType.Descending);
|
|
2460
2461
|
if (sortColumnParam) {
|
|
2461
2462
|
sortedData.sort((a, b) => {
|
|
2463
|
+
var _a, _b;
|
|
2462
2464
|
const aVal = a[sortColumnParam];
|
|
2463
2465
|
const bVal = b[sortColumnParam];
|
|
2466
|
+
// Tiebreaker sort by timestamp, most recent first (used if tied)
|
|
2467
|
+
const tiebreaker = (((_a = b.timestamp) !== null && _a !== void 0 ? _a : 0)
|
|
2468
|
+
- ((_b = a.timestamp) !== null && _b !== void 0 ? _b : 0));
|
|
2464
2469
|
// Auto-sort undefined and null to end of list
|
|
2465
2470
|
if ((aVal === undefined || aVal === null)
|
|
2466
2471
|
|| (bVal === undefined || bVal === null)) {
|
|
@@ -2468,7 +2473,7 @@ const IntelliTable = (props) => {
|
|
|
2468
2473
|
if ((aVal === undefined || aVal === null)
|
|
2469
2474
|
&& (bVal === undefined || bVal === null)) {
|
|
2470
2475
|
// Both undefined
|
|
2471
|
-
return
|
|
2476
|
+
return tiebreaker;
|
|
2472
2477
|
}
|
|
2473
2478
|
if (aVal === undefined || aVal === null) {
|
|
2474
2479
|
// First was undefined
|
|
@@ -2486,7 +2491,7 @@ const IntelliTable = (props) => {
|
|
|
2486
2491
|
if (!aVal && bVal) {
|
|
2487
2492
|
return (descending ? 1 : -1);
|
|
2488
2493
|
}
|
|
2489
|
-
return
|
|
2494
|
+
return tiebreaker;
|
|
2490
2495
|
}
|
|
2491
2496
|
// > Number
|
|
2492
2497
|
if (paramType === ParamType$1.Int
|
|
@@ -2503,7 +2508,7 @@ const IntelliTable = (props) => {
|
|
|
2503
2508
|
if (aVal > bVal) {
|
|
2504
2509
|
return (descending ? -1 : 1);
|
|
2505
2510
|
}
|
|
2506
|
-
return
|
|
2511
|
+
return tiebreaker;
|
|
2507
2512
|
}
|
|
2508
2513
|
// > JSON
|
|
2509
2514
|
if (paramType === ParamType$1.JSON) {
|
|
@@ -2518,7 +2523,7 @@ const IntelliTable = (props) => {
|
|
|
2518
2523
|
: (aSize - bSize));
|
|
2519
2524
|
}
|
|
2520
2525
|
// No sort
|
|
2521
|
-
return
|
|
2526
|
+
return tiebreaker;
|
|
2522
2527
|
});
|
|
2523
2528
|
}
|
|
2524
2529
|
// Table body
|
|
@@ -2947,6 +2952,7 @@ const LogReviewer = (props) => {
|
|
|
2947
2952
|
Object.values(LogBuiltInMetadata.Target).forEach((target) => {
|
|
2948
2953
|
initActionErrorFilterState.target[target] = true;
|
|
2949
2954
|
});
|
|
2955
|
+
console.log(initActionErrorFilterState);
|
|
2950
2956
|
// Initial state
|
|
2951
2957
|
const initialState = {
|
|
2952
2958
|
loading: true,
|
|
@@ -3015,7 +3021,6 @@ const LogReviewer = (props) => {
|
|
|
3015
3021
|
});
|
|
3016
3022
|
// Check which year/month combos we need to load
|
|
3017
3023
|
const toLoad = listMonthsToLoad(newDateFilterState);
|
|
3018
|
-
console.log('Filter update:', newDateFilterState, toLoad, logMap);
|
|
3019
3024
|
// If nothing to load, finished
|
|
3020
3025
|
if (toLoad.length === 0) {
|
|
3021
3026
|
return;
|
|
@@ -3215,6 +3220,10 @@ const LogReviewer = (props) => {
|
|
|
3215
3220
|
const description = genHumanReadableName(tag);
|
|
3216
3221
|
return (React.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) => {
|
|
3217
3222
|
tagFilterState[tag] = checked;
|
|
3223
|
+
dispatch({
|
|
3224
|
+
type: ActionType.UpdateTagFilterState,
|
|
3225
|
+
tagFilterState,
|
|
3226
|
+
});
|
|
3218
3227
|
} }));
|
|
3219
3228
|
})));
|
|
3220
3229
|
}
|
|
@@ -3248,8 +3257,9 @@ const LogReviewer = (props) => {
|
|
|
3248
3257
|
React.createElement(ButtonInputGroup, { label: "Action", className: "mb-2" }, Object.keys(LogAction$1)
|
|
3249
3258
|
.map((action, i) => {
|
|
3250
3259
|
const description = genHumanReadableName(action);
|
|
3251
|
-
return (React.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) => {
|
|
3260
|
+
return (React.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) => {
|
|
3252
3261
|
actionErrorFilterState.action[action] = checked;
|
|
3262
|
+
console.log(actionErrorFilterState);
|
|
3253
3263
|
dispatch({
|
|
3254
3264
|
type: ActionType.UpdateActionErrorFilterState,
|
|
3255
3265
|
actionErrorFilterState,
|
|
@@ -3262,7 +3272,7 @@ const LogReviewer = (props) => {
|
|
|
3262
3272
|
.map((target, i) => {
|
|
3263
3273
|
var _a;
|
|
3264
3274
|
const description = genHumanReadableName(target);
|
|
3265
|
-
return (React.createElement(CheckboxButton, { id: `LogReviewer-target-${target}-checkbox`, text: description, ariaLabel: `include logs with target "${description}" in results`, onChanged: (checked) => {
|
|
3275
|
+
return (React.createElement(CheckboxButton, { id: `LogReviewer-target-${target}-checkbox`, text: description, ariaLabel: `include logs with target "${description}" in results`, checked: actionErrorFilterState.target[target], onChanged: (checked) => {
|
|
3266
3276
|
actionErrorFilterState.target[target] = checked;
|
|
3267
3277
|
dispatch({
|
|
3268
3278
|
type: ActionType.UpdateActionErrorFilterState,
|