dce-reactkit 3.2.2-beta.52 → 3.2.2-beta.54

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
@@ -3111,7 +3111,7 @@ const LogReviewer = (props) => {
3111
3111
  /*------------------------------------------------------------------------*/
3112
3112
  /* Setup */
3113
3113
  /*------------------------------------------------------------------------*/
3114
- var _a, _b, _c, _d, _e, _f;
3114
+ var _a, _b, _c, _d;
3115
3115
  /* -------------- Props ------------- */
3116
3116
  // Destructure props
3117
3117
  const { LogMetadata, onClose, } = props;
@@ -3159,7 +3159,7 @@ const LogReviewer = (props) => {
3159
3159
  };
3160
3160
  // Create initial context filter state
3161
3161
  const initContextFilterState = {};
3162
- Object.keys((_c = LogMetadata.Context) !== null && _c !== void 0 ? _c : {}).forEach((context) => {
3162
+ Object.keys(contextMap).forEach((context) => {
3163
3163
  var _a, _b;
3164
3164
  const contextValue = ((_a = LogMetadata.Context) !== null && _a !== void 0 ? _a : {})[context];
3165
3165
  if (typeof contextValue === 'string') {
@@ -3181,7 +3181,7 @@ const LogReviewer = (props) => {
3181
3181
  });
3182
3182
  // Create initial tag filter state
3183
3183
  const initTagFilterState = {};
3184
- Object.keys((_d = LogMetadata.Tag) !== null && _d !== void 0 ? _d : {}).forEach((tag) => {
3184
+ Object.keys((_c = LogMetadata.Tag) !== null && _c !== void 0 ? _c : {}).forEach((tag) => {
3185
3185
  initTagFilterState[tag] = false;
3186
3186
  });
3187
3187
  // Create advanced filter state
@@ -3208,16 +3208,12 @@ const LogReviewer = (props) => {
3208
3208
  target: {},
3209
3209
  action: {},
3210
3210
  };
3211
- Object.values((_e = LogMetadata.Target) !== null && _e !== void 0 ? _e : {}).forEach((target) => {
3211
+ Object.values(targetMap).forEach((target) => {
3212
3212
  initActionErrorFilterState.target[target] = true;
3213
3213
  });
3214
3214
  Object.values(LogAction$1).forEach((action) => {
3215
3215
  initActionErrorFilterState.action[action] = true;
3216
3216
  });
3217
- // Add built-in targets
3218
- Object.values(LogBuiltInMetadata.Target).forEach((target) => {
3219
- initActionErrorFilterState.target[target] = true;
3220
- });
3221
3217
  // Initial state
3222
3218
  const initialState = {
3223
3219
  loading: true,
@@ -3434,7 +3430,7 @@ const LogReviewer = (props) => {
3434
3430
  else if (expandedFilterDrawer === FilterDrawer.Context) {
3435
3431
  // Create item picker items
3436
3432
  const builtInPickableItem = {
3437
- id: '_',
3433
+ id: 'built-in-contexts',
3438
3434
  name: 'Auto-logged',
3439
3435
  isGroup: true,
3440
3436
  children: [],
@@ -3442,7 +3438,7 @@ const LogReviewer = (props) => {
3442
3438
  const pickableItems = [];
3443
3439
  Object.keys(contextMap)
3444
3440
  .forEach((context) => {
3445
- const value = (contextMap)[context];
3441
+ const value = contextMap[context];
3446
3442
  if (typeof value === 'string') {
3447
3443
  // No subcategories
3448
3444
  const item = {
@@ -3461,6 +3457,7 @@ const LogReviewer = (props) => {
3461
3457
  // Add to pickable items list
3462
3458
  pickableItems.push(item);
3463
3459
  }
3460
+ return;
3464
3461
  }
3465
3462
  // Has subcategories
3466
3463
  const children = (Object.keys(value)
@@ -3493,7 +3490,7 @@ const LogReviewer = (props) => {
3493
3490
  updatedItems.forEach((pickableItem) => {
3494
3491
  if (pickableItem.isGroup) {
3495
3492
  // Has subcontexts
3496
- if (pickableItem.id === '_') {
3493
+ if (pickableItem.id === 'built-in-contexts') {
3497
3494
  // Built-in
3498
3495
  // Treat as if these were top-level contexts
3499
3496
  pickableItem.children.forEach((subcontextItem) => {
@@ -3524,18 +3521,19 @@ const LogReviewer = (props) => {
3524
3521
  else if (expandedFilterDrawer === FilterDrawer.Tag) {
3525
3522
  // Create filter UI
3526
3523
  filterDrawer = (React.createElement(TabBox, { title: "Tags" },
3527
- React.createElement("div", null, "If any are selected, logs must contain at least one but not necessarily all of the selected tags."),
3528
- Object.keys((_f = LogMetadata.Tag) !== null && _f !== void 0 ? _f : {})
3529
- .map((tag, i) => {
3524
+ React.createElement("div", null, "If any tags are selected, logs must contain at least one (but not necessarily all) of the selected tags."),
3525
+ React.createElement("div", { className: "d-flex gap-1 flex-wrap" }, Object.keys((_d = LogMetadata.Tag) !== null && _d !== void 0 ? _d : {})
3526
+ .map((tag) => {
3530
3527
  const description = genHumanReadableName(tag);
3531
- 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) => {
3528
+ return (React.createElement(CheckboxButton, { key: tag, id: `LogReviewer-tag-${tag}-checkbox`, text: description, ariaLabel: `require that logs be tagged with "${description}" or any other selected tag`, checked: tagFilterState[tag], onChanged: (checked) => {
3532
3529
  tagFilterState[tag] = checked;
3530
+ console.log(tagFilterState);
3533
3531
  dispatch({
3534
3532
  type: ActionType.UpdateTagFilterState,
3535
3533
  tagFilterState,
3536
3534
  });
3537
3535
  } }));
3538
- })));
3536
+ }))));
3539
3537
  }
3540
3538
  else if (expandedFilterDrawer === FilterDrawer.Action) {
3541
3539
  // Create filter UI
@@ -3570,7 +3568,6 @@ const LogReviewer = (props) => {
3570
3568
  const description = genHumanReadableName(action);
3571
3569
  return (React.createElement(CheckboxButton, { key: action, id: `LogReviewer-action-${action}-checkbox`, text: description, ariaLabel: `include logs with action type "${description}" in results`, noMarginOnRight: true, checked: actionErrorFilterState.action[action], onChanged: (checked) => {
3572
3570
  actionErrorFilterState.action[action] = checked;
3573
- console.log(actionErrorFilterState, action, checked);
3574
3571
  dispatch({
3575
3572
  type: ActionType.UpdateActionErrorFilterState,
3576
3573
  actionErrorFilterState,
@@ -3583,7 +3580,6 @@ const LogReviewer = (props) => {
3583
3580
  const description = genHumanReadableName(target);
3584
3581
  return (React.createElement(CheckboxButton, { key: target, id: `LogReviewer-target-${target}-checkbox`, text: description, ariaLabel: `include logs with target "${description}" in results`, checked: actionErrorFilterState.target[target], noMarginOnRight: true, onChanged: (checked) => {
3585
3582
  actionErrorFilterState.target[target] = checked;
3586
- console.log(actionErrorFilterState, target, checked);
3587
3583
  dispatch({
3588
3584
  type: ActionType.UpdateActionErrorFilterState,
3589
3585
  actionErrorFilterState,
@@ -3616,7 +3612,7 @@ const LogReviewer = (props) => {
3616
3612
  else if (expandedFilterDrawer === FilterDrawer.Advanced) {
3617
3613
  // Create advanced filter ui
3618
3614
  filterDrawer = (React.createElement(React.Fragment, null,
3619
- React.createElement(TabBox, { title: "User Info" },
3615
+ React.createElement(TabBox, { title: "User" },
3620
3616
  React.createElement("div", { className: "input-group mb-2" },
3621
3617
  React.createElement("span", { className: "input-group-text" }, "User First Name"),
3622
3618
  React.createElement("input", { type: "text", className: "form-control", "aria-label": "query for user first name", value: advancedFilterState.userFirstName, placeholder: "e.g. Divardo", onChange: (e) => {
@@ -3681,7 +3677,7 @@ const LogReviewer = (props) => {
3681
3677
  advancedFilterState,
3682
3678
  });
3683
3679
  }, checked: advancedFilterState.includeAdmins, ariaLabel: "show logs from admins" }))),
3684
- React.createElement(TabBox, { title: "Course Info" },
3680
+ React.createElement(TabBox, { title: "Course" },
3685
3681
  React.createElement("div", { className: "input-group mb-2" },
3686
3682
  React.createElement("span", { className: "input-group-text" }, "Course Name"),
3687
3683
  React.createElement("input", { type: "text", className: "form-control", "aria-label": "query for course name", value: advancedFilterState.courseName, placeholder: "e.g. GLC 200", onChange: (e) => {
@@ -3705,7 +3701,7 @@ const LogReviewer = (props) => {
3705
3701
  advancedFilterState,
3706
3702
  });
3707
3703
  } }))),
3708
- React.createElement(TabBox, { title: "Device Info" },
3704
+ React.createElement(TabBox, { title: "Device" },
3709
3705
  React.createElement(ButtonInputGroup, { label: "Device Type" },
3710
3706
  React.createElement(RadioButton, { text: "All Devices", ariaLabel: "show logs from all devices", selected: advancedFilterState.isMobile === undefined, onSelected: () => {
3711
3707
  advancedFilterState.isMobile = undefined;