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/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
|
|
@@ -2955,6 +2960,7 @@ const LogReviewer = (props) => {
|
|
|
2955
2960
|
Object.values(LogBuiltInMetadata.Target).forEach((target) => {
|
|
2956
2961
|
initActionErrorFilterState.target[target] = true;
|
|
2957
2962
|
});
|
|
2963
|
+
console.log(initActionErrorFilterState);
|
|
2958
2964
|
// Initial state
|
|
2959
2965
|
const initialState = {
|
|
2960
2966
|
loading: true,
|
|
@@ -3023,7 +3029,6 @@ const LogReviewer = (props) => {
|
|
|
3023
3029
|
});
|
|
3024
3030
|
// Check which year/month combos we need to load
|
|
3025
3031
|
const toLoad = listMonthsToLoad(newDateFilterState);
|
|
3026
|
-
console.log('Filter update:', newDateFilterState, toLoad, logMap);
|
|
3027
3032
|
// If nothing to load, finished
|
|
3028
3033
|
if (toLoad.length === 0) {
|
|
3029
3034
|
return;
|
|
@@ -3223,6 +3228,10 @@ const LogReviewer = (props) => {
|
|
|
3223
3228
|
const description = genHumanReadableName(tag);
|
|
3224
3229
|
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
3230
|
tagFilterState[tag] = checked;
|
|
3231
|
+
dispatch({
|
|
3232
|
+
type: ActionType.UpdateTagFilterState,
|
|
3233
|
+
tagFilterState,
|
|
3234
|
+
});
|
|
3226
3235
|
} }));
|
|
3227
3236
|
})));
|
|
3228
3237
|
}
|
|
@@ -3256,8 +3265,9 @@ const LogReviewer = (props) => {
|
|
|
3256
3265
|
React__default["default"].createElement(ButtonInputGroup, { label: "Action", className: "mb-2" }, Object.keys(LogAction$1)
|
|
3257
3266
|
.map((action, i) => {
|
|
3258
3267
|
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) => {
|
|
3268
|
+
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
3269
|
actionErrorFilterState.action[action] = checked;
|
|
3270
|
+
console.log(actionErrorFilterState);
|
|
3261
3271
|
dispatch({
|
|
3262
3272
|
type: ActionType.UpdateActionErrorFilterState,
|
|
3263
3273
|
actionErrorFilterState,
|
|
@@ -3270,7 +3280,7 @@ const LogReviewer = (props) => {
|
|
|
3270
3280
|
.map((target, i) => {
|
|
3271
3281
|
var _a;
|
|
3272
3282
|
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) => {
|
|
3283
|
+
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
3284
|
actionErrorFilterState.target[target] = checked;
|
|
3275
3285
|
dispatch({
|
|
3276
3286
|
type: ActionType.UpdateActionErrorFilterState,
|