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/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["ToggleColumnVisibility"] = "toggle-column-visibility";
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.ToggleColumnVisibility: {
2335
+ case ActionType$1.UpdateColumnVisibility: {
2336
2336
  const { columnVisibilityMap } = state;
2337
- columnVisibilityMap[action.param] = !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.ToggleColumnVisibility,
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 0;
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 0;
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 0;
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 0;
2526
+ return tiebreaker;
2522
2527
  });
2523
2528
  }
2524
2529
  // Table body
@@ -3015,7 +3020,6 @@ const LogReviewer = (props) => {
3015
3020
  });
3016
3021
  // Check which year/month combos we need to load
3017
3022
  const toLoad = listMonthsToLoad(newDateFilterState);
3018
- console.log('Filter update:', newDateFilterState, toLoad, logMap);
3019
3023
  // If nothing to load, finished
3020
3024
  if (toLoad.length === 0) {
3021
3025
  return;
@@ -3215,6 +3219,10 @@ const LogReviewer = (props) => {
3215
3219
  const description = genHumanReadableName(tag);
3216
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) => {
3217
3221
  tagFilterState[tag] = checked;
3222
+ dispatch({
3223
+ type: ActionType.UpdateTagFilterState,
3224
+ tagFilterState,
3225
+ });
3218
3226
  } }));
3219
3227
  })));
3220
3228
  }
@@ -3248,7 +3256,7 @@ const LogReviewer = (props) => {
3248
3256
  React.createElement(ButtonInputGroup, { label: "Action", className: "mb-2" }, Object.keys(LogAction$1)
3249
3257
  .map((action, i) => {
3250
3258
  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) => {
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) => {
3252
3260
  actionErrorFilterState.action[action] = checked;
3253
3261
  dispatch({
3254
3262
  type: ActionType.UpdateActionErrorFilterState,
@@ -3262,7 +3270,7 @@ const LogReviewer = (props) => {
3262
3270
  .map((target, i) => {
3263
3271
  var _a;
3264
3272
  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) => {
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) => {
3266
3274
  actionErrorFilterState.target[target] = checked;
3267
3275
  dispatch({
3268
3276
  type: ActionType.UpdateActionErrorFilterState,