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/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: {
|
|
@@ -2387,13 +2387,14 @@ const IntelliTable = (props) => {
|
|
|
2387
2387
|
dispatch({
|
|
2388
2388
|
type: ActionType$1.ToggleColVisCusModalVisibility,
|
|
2389
2389
|
});
|
|
2390
|
-
} }, columns.map((column) => {
|
|
2391
|
-
return (React.createElement(CheckboxButton, { key: column.param, id: `IntelliTable-${id}-toggle-visibility-${column.param}`, text: column.title, onChanged: () => {
|
|
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: (checked) => {
|
|
2392
2392
|
dispatch({
|
|
2393
|
-
type: ActionType$1.
|
|
2393
|
+
type: ActionType$1.UpdateColumnVisibility,
|
|
2394
2394
|
param: column.param,
|
|
2395
|
+
visible: checked,
|
|
2395
2396
|
});
|
|
2396
|
-
}, checked: columnVisibilityMap[column.param], ariaLabel: `show "${column.title}" column
|
|
2397
|
+
}, checked: columnVisibilityMap[column.param], ariaLabel: `show "${column.title}" column`, checkedVariant: Variant$1.Light, uncheckedVariant: Variant$1.Secondary }));
|
|
2397
2398
|
})));
|
|
2398
2399
|
}
|
|
2399
2400
|
/*----------------------------------------*/
|
|
@@ -2438,7 +2439,7 @@ const IntelliTable = (props) => {
|
|
|
2438
2439
|
borderRight: '0.05rem solid #555',
|
|
2439
2440
|
borderLeft: '0.05rem solid #555',
|
|
2440
2441
|
} },
|
|
2441
|
-
React.createElement("div", { className: "d-flex align-items-center justify-content-
|
|
2442
|
+
React.createElement("div", { className: "d-flex align-items-center justify-content-start flex-row h-100" },
|
|
2442
2443
|
React.createElement("span", { className: "text-nowrap" }, column.title),
|
|
2443
2444
|
React.createElement("div", null,
|
|
2444
2445
|
React.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: () => {
|
|
@@ -2459,8 +2460,28 @@ 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));
|
|
2469
|
+
// Auto-sort undefined and null to end of list
|
|
2470
|
+
if ((aVal === undefined || aVal === null)
|
|
2471
|
+
|| (bVal === undefined || bVal === null)) {
|
|
2472
|
+
// At least one was undefined
|
|
2473
|
+
if ((aVal === undefined || aVal === null)
|
|
2474
|
+
&& (bVal === undefined || bVal === null)) {
|
|
2475
|
+
// Both undefined
|
|
2476
|
+
return tiebreaker;
|
|
2477
|
+
}
|
|
2478
|
+
if (aVal === undefined || aVal === null) {
|
|
2479
|
+
// First was undefined
|
|
2480
|
+
return 1;
|
|
2481
|
+
}
|
|
2482
|
+
// Second was undefined
|
|
2483
|
+
return -1;
|
|
2484
|
+
}
|
|
2464
2485
|
// Sort differently based on the data type
|
|
2465
2486
|
// > Boolean
|
|
2466
2487
|
if (paramType === ParamType$1.Boolean) {
|
|
@@ -2470,7 +2491,7 @@ const IntelliTable = (props) => {
|
|
|
2470
2491
|
if (!aVal && bVal) {
|
|
2471
2492
|
return (descending ? 1 : -1);
|
|
2472
2493
|
}
|
|
2473
|
-
return
|
|
2494
|
+
return tiebreaker;
|
|
2474
2495
|
}
|
|
2475
2496
|
// > Number
|
|
2476
2497
|
if (paramType === ParamType$1.Int
|
|
@@ -2487,7 +2508,7 @@ const IntelliTable = (props) => {
|
|
|
2487
2508
|
if (aVal > bVal) {
|
|
2488
2509
|
return (descending ? -1 : 1);
|
|
2489
2510
|
}
|
|
2490
|
-
return
|
|
2511
|
+
return tiebreaker;
|
|
2491
2512
|
}
|
|
2492
2513
|
// > JSON
|
|
2493
2514
|
if (paramType === ParamType$1.JSON) {
|
|
@@ -2502,7 +2523,7 @@ const IntelliTable = (props) => {
|
|
|
2502
2523
|
: (aSize - bSize));
|
|
2503
2524
|
}
|
|
2504
2525
|
// No sort
|
|
2505
|
-
return
|
|
2526
|
+
return tiebreaker;
|
|
2506
2527
|
});
|
|
2507
2528
|
}
|
|
2508
2529
|
// Table body
|
|
@@ -2999,7 +3020,6 @@ const LogReviewer = (props) => {
|
|
|
2999
3020
|
});
|
|
3000
3021
|
// Check which year/month combos we need to load
|
|
3001
3022
|
const toLoad = listMonthsToLoad(newDateFilterState);
|
|
3002
|
-
console.log('Filter update:', newDateFilterState, toLoad, logMap);
|
|
3003
3023
|
// If nothing to load, finished
|
|
3004
3024
|
if (toLoad.length === 0) {
|
|
3005
3025
|
return;
|
|
@@ -3199,6 +3219,10 @@ const LogReviewer = (props) => {
|
|
|
3199
3219
|
const description = genHumanReadableName(tag);
|
|
3200
3220
|
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) => {
|
|
3201
3221
|
tagFilterState[tag] = checked;
|
|
3222
|
+
dispatch({
|
|
3223
|
+
type: ActionType.UpdateTagFilterState,
|
|
3224
|
+
tagFilterState,
|
|
3225
|
+
});
|
|
3202
3226
|
} }));
|
|
3203
3227
|
})));
|
|
3204
3228
|
}
|
|
@@ -3232,7 +3256,7 @@ const LogReviewer = (props) => {
|
|
|
3232
3256
|
React.createElement(ButtonInputGroup, { label: "Action", className: "mb-2" }, Object.keys(LogAction$1)
|
|
3233
3257
|
.map((action, i) => {
|
|
3234
3258
|
const description = genHumanReadableName(action);
|
|
3235
|
-
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) => {
|
|
3259
|
+
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) => {
|
|
3236
3260
|
actionErrorFilterState.action[action] = checked;
|
|
3237
3261
|
dispatch({
|
|
3238
3262
|
type: ActionType.UpdateActionErrorFilterState,
|
|
@@ -3246,7 +3270,7 @@ const LogReviewer = (props) => {
|
|
|
3246
3270
|
.map((target, i) => {
|
|
3247
3271
|
var _a;
|
|
3248
3272
|
const description = genHumanReadableName(target);
|
|
3249
|
-
return (React.createElement(CheckboxButton, { id: `LogReviewer-target-${target}-checkbox`, text: description, ariaLabel: `include logs with target "${description}" in results`, onChanged: (checked) => {
|
|
3273
|
+
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) => {
|
|
3250
3274
|
actionErrorFilterState.target[target] = checked;
|
|
3251
3275
|
dispatch({
|
|
3252
3276
|
type: ActionType.UpdateActionErrorFilterState,
|