dce-reactkit 3.2.2-beta.44 → 3.2.2-beta.47

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 CHANGED
@@ -2345,6 +2345,10 @@ var ActionType$1;
2345
2345
  ActionType["UpdateColumnVisibility"] = "update-column-visibility";
2346
2346
  // Toggle the column visibility customization modal
2347
2347
  ActionType["ToggleColVisCusModalVisibility"] = "toggle-col-vis-cus-modal-visibility";
2348
+ // Show all columns
2349
+ ActionType["ShowAllColumns"] = "show-all-columns";
2350
+ // Hide all columns
2351
+ ActionType["HideAllColumns"] = "hide-all-columns";
2348
2352
  })(ActionType$1 || (ActionType$1 = {}));
2349
2353
  /**
2350
2354
  * Reducer that executes actions
@@ -2374,6 +2378,20 @@ const reducer$1 = (state, action) => {
2374
2378
  case ActionType$1.ToggleColVisCusModalVisibility: {
2375
2379
  return Object.assign(Object.assign({}, state), { columnVisibilityCustomizationModalVisible: !state.columnVisibilityCustomizationModalVisible });
2376
2380
  }
2381
+ case ActionType$1.ShowAllColumns: {
2382
+ const { columnVisibilityMap } = state;
2383
+ Object.keys(columnVisibilityMap).forEach((param) => {
2384
+ columnVisibilityMap[param] = true;
2385
+ });
2386
+ return Object.assign(Object.assign({}, state), { columnVisibilityMap });
2387
+ }
2388
+ case ActionType$1.HideAllColumns: {
2389
+ const { columnVisibilityMap } = state;
2390
+ Object.keys(columnVisibilityMap).forEach((param) => {
2391
+ columnVisibilityMap[param] = false;
2392
+ });
2393
+ return Object.assign(Object.assign({}, state), { columnVisibilityMap });
2394
+ }
2377
2395
  default: {
2378
2396
  return state;
2379
2397
  }
@@ -2429,18 +2447,37 @@ const IntelliTable = (props) => {
2429
2447
  if (columnVisibilityCustomizationModalVisible) {
2430
2448
  // Create modal
2431
2449
  modal = (React__default["default"].createElement(Modal, { type: ModalType$1.Okay, title: "Choose columns to show:", onClose: () => {
2450
+ const noColumnsSelected = (Object.values(columnVisibilityMap)
2451
+ .every((isSelected) => {
2452
+ return !isSelected;
2453
+ }));
2454
+ if (noColumnsSelected) {
2455
+ return alert$1('Choose at least one column', 'To continue, you have to choose at least one column to show');
2456
+ }
2432
2457
  dispatch({
2433
2458
  type: ActionType$1.ToggleColVisCusModalVisibility,
2434
2459
  });
2435
- }, okayVariant: Variant$1.Light }, columns.map((column) => {
2436
- return (React__default["default"].createElement(CheckboxButton, { key: column.param, id: `IntelliTable-${id}-toggle-visibility-${column.param}`, className: "mb-2", text: column.title, onChanged: (checked) => {
2460
+ }, okayVariant: Variant$1.Light },
2461
+ columns.map((column) => {
2462
+ return (React__default["default"].createElement(CheckboxButton, { key: column.param, id: `IntelliTable-${id}-toggle-visibility-${column.param}`, className: "mb-2", text: column.title, onChanged: (checked) => {
2463
+ dispatch({
2464
+ type: ActionType$1.UpdateColumnVisibility,
2465
+ param: column.param,
2466
+ visible: checked,
2467
+ });
2468
+ }, checked: columnVisibilityMap[column.param], ariaLabel: `show "${column.title}" column in the ${title} table`, checkedVariant: Variant$1.Light, uncheckedVariant: Variant$1.Secondary }));
2469
+ }),
2470
+ React__default["default"].createElement("div", { className: "mt-3" }, "Or you can:"),
2471
+ React__default["default"].createElement("button", { type: "button", id: `IntelliTable-${id}-select-all-columns`, className: "btn btn-secondary me-2", "aria-label": `show all columns in the ${title} table`, onClick: () => {
2437
2472
  dispatch({
2438
- type: ActionType$1.UpdateColumnVisibility,
2439
- param: column.param,
2440
- visible: checked,
2473
+ type: ActionType$1.ShowAllColumns,
2441
2474
  });
2442
- }, checked: columnVisibilityMap[column.param], ariaLabel: `show "${column.title}" column`, checkedVariant: Variant$1.Light, uncheckedVariant: Variant$1.Secondary }));
2443
- })));
2475
+ } }, "Select All"),
2476
+ React__default["default"].createElement("button", { type: "button", id: `IntelliTable-${id}-select-none-columns`, className: "btn btn-secondary", "aria-label": `hide all columns in the ${title} table`, onClick: () => {
2477
+ dispatch({
2478
+ type: ActionType$1.HideAllColumns,
2479
+ });
2480
+ } }, "Deselect All")));
2444
2481
  }
2445
2482
  /*----------------------------------------*/
2446
2483
  /* Main UI */
@@ -2666,7 +2703,9 @@ const IntelliTable = (props) => {
2666
2703
  })
2667
2704
  .length);
2668
2705
  // Build CSV
2669
- const csv = genCSV(data, columns);
2706
+ const csv = genCSV(data, columns.filter((column) => {
2707
+ return columnVisibilityMap[column.param];
2708
+ }));
2670
2709
  // Build main UI
2671
2710
  return (React__default["default"].createElement("div", { className: `IntelliTable-container-${id}` },
2672
2711
  modal,
@@ -2792,6 +2831,195 @@ const style = `
2792
2831
  }
2793
2832
  `;
2794
2833
  /*------------------------------------------------------------------------*/
2834
+ /* Constants */
2835
+ /*------------------------------------------------------------------------*/
2836
+ const columns = [
2837
+ {
2838
+ title: 'First Name',
2839
+ param: 'userFirstName',
2840
+ type: ParamType$1.String,
2841
+ },
2842
+ {
2843
+ title: 'Last Name',
2844
+ param: 'userLastName',
2845
+ type: ParamType$1.String,
2846
+ },
2847
+ {
2848
+ title: 'Email',
2849
+ param: 'userEmail',
2850
+ type: ParamType$1.String,
2851
+ },
2852
+ {
2853
+ title: 'Canvas Id',
2854
+ param: 'userId',
2855
+ type: ParamType$1.Int,
2856
+ },
2857
+ {
2858
+ title: 'Student?',
2859
+ param: 'isLearner',
2860
+ type: ParamType$1.Boolean,
2861
+ },
2862
+ {
2863
+ title: 'Teaching Staff?',
2864
+ param: 'isTTM',
2865
+ type: ParamType$1.Boolean,
2866
+ startsHidden: true,
2867
+ },
2868
+ {
2869
+ title: 'Admin?',
2870
+ param: 'isAdmin',
2871
+ type: ParamType$1.Boolean,
2872
+ startsHidden: true,
2873
+ },
2874
+ {
2875
+ title: 'Course Canvas Id',
2876
+ param: 'courseId',
2877
+ type: ParamType$1.Int,
2878
+ startsHidden: true,
2879
+ },
2880
+ {
2881
+ title: 'Course Name',
2882
+ param: 'courseName',
2883
+ type: ParamType$1.String,
2884
+ },
2885
+ {
2886
+ title: 'Browser Name',
2887
+ param: 'browser.name',
2888
+ type: ParamType$1.String,
2889
+ startsHidden: true,
2890
+ },
2891
+ {
2892
+ title: 'Browser Version',
2893
+ param: 'browser.version',
2894
+ type: ParamType$1.String,
2895
+ startsHidden: true,
2896
+ },
2897
+ {
2898
+ title: 'OS',
2899
+ param: 'device.os',
2900
+ type: ParamType$1.String,
2901
+ startsHidden: true,
2902
+ },
2903
+ {
2904
+ title: 'Mobile?',
2905
+ param: 'device.isMobile',
2906
+ type: ParamType$1.Boolean,
2907
+ startsHidden: true,
2908
+ },
2909
+ {
2910
+ title: 'Year',
2911
+ param: 'year',
2912
+ type: ParamType$1.Int,
2913
+ },
2914
+ {
2915
+ title: 'Month',
2916
+ param: 'month',
2917
+ type: ParamType$1.Int,
2918
+ },
2919
+ {
2920
+ title: 'Day',
2921
+ param: 'day',
2922
+ type: ParamType$1.Int,
2923
+ },
2924
+ {
2925
+ title: 'Hour',
2926
+ param: 'hour',
2927
+ type: ParamType$1.Int,
2928
+ },
2929
+ {
2930
+ title: 'Minute',
2931
+ param: 'minute',
2932
+ type: ParamType$1.Int,
2933
+ startsHidden: true,
2934
+ },
2935
+ {
2936
+ title: 'Timestamp',
2937
+ param: 'timestamp',
2938
+ type: ParamType$1.Int,
2939
+ startsHidden: true,
2940
+ },
2941
+ {
2942
+ title: 'Context',
2943
+ param: 'context',
2944
+ type: ParamType$1.String,
2945
+ },
2946
+ {
2947
+ title: 'Subcontext',
2948
+ param: 'subcontext',
2949
+ type: ParamType$1.String,
2950
+ },
2951
+ {
2952
+ title: 'Tags',
2953
+ param: 'tags',
2954
+ type: ParamType$1.JSON,
2955
+ startsHidden: true,
2956
+ },
2957
+ {
2958
+ title: 'Log Level',
2959
+ param: 'level',
2960
+ type: ParamType$1.String,
2961
+ startsHidden: true,
2962
+ },
2963
+ {
2964
+ title: 'Metadata',
2965
+ param: 'metadata',
2966
+ type: ParamType$1.JSON,
2967
+ startsHidden: true,
2968
+ },
2969
+ {
2970
+ title: 'Source',
2971
+ param: 'source',
2972
+ type: ParamType$1.String,
2973
+ },
2974
+ {
2975
+ title: 'Server Route Path',
2976
+ param: 'routePath',
2977
+ type: ParamType$1.String,
2978
+ startsHidden: true,
2979
+ },
2980
+ {
2981
+ title: 'Server Route Template',
2982
+ param: 'routeTemplate',
2983
+ type: ParamType$1.String,
2984
+ startsHidden: true,
2985
+ },
2986
+ {
2987
+ title: 'Type',
2988
+ param: 'type',
2989
+ type: ParamType$1.String,
2990
+ },
2991
+ {
2992
+ title: 'Error Message',
2993
+ param: 'errorMessage',
2994
+ type: ParamType$1.String,
2995
+ startsHidden: true,
2996
+ },
2997
+ {
2998
+ title: 'Error Code',
2999
+ param: 'errorCode',
3000
+ type: ParamType$1.String,
3001
+ startsHidden: true,
3002
+ },
3003
+ {
3004
+ title: 'Error Stack',
3005
+ param: 'errorStack',
3006
+ type: ParamType$1.String,
3007
+ startsHidden: true,
3008
+ },
3009
+ {
3010
+ title: 'Action Target',
3011
+ param: 'target',
3012
+ type: ParamType$1.String,
3013
+ startsHidden: true,
3014
+ },
3015
+ {
3016
+ title: 'Action Type',
3017
+ param: 'action',
3018
+ type: ParamType$1.String,
3019
+ startsHidden: true,
3020
+ },
3021
+ ];
3022
+ /*------------------------------------------------------------------------*/
2795
3023
  /* Static Functions */
2796
3024
  /*------------------------------------------------------------------------*/
2797
3025
  /**
@@ -2903,34 +3131,34 @@ const LogReviewer = (props) => {
2903
3131
  /*------------------------------------------------------------------------*/
2904
3132
  /* Setup */
2905
3133
  /*------------------------------------------------------------------------*/
2906
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
3134
+ var _a, _b, _c, _d, _e, _f;
2907
3135
  /* -------------- Props ------------- */
2908
3136
  // Destructure props
2909
3137
  const { LogMetadata, onClose, } = props;
2910
- // Add built-in LogMetadata
2911
- // > Add "uncategorized" subcontext to each context
2912
- Object.keys((_a = LogMetadata.Context) !== null && _a !== void 0 ? _a : {}).forEach((context) => {
2913
- if (
2914
- // Context exists
2915
- LogMetadata.Context
2916
- // Context has children already
2917
- && typeof LogMetadata.Context[context] !== 'string') {
2918
- LogMetadata.Context[context][LogBuiltInMetadata.Context.Uncategorized] = (LogBuiltInMetadata.Context.Uncategorized);
2919
- }
2920
- });
2921
- // > Add built-in contexts
2922
- LogMetadata.Context = ((_b = LogMetadata.Context) !== null && _b !== void 0 ? _b : {});
2923
- Object.keys(LogBuiltInMetadata.Context).forEach((context) => {
2924
- if (LogMetadata.Context) {
2925
- LogMetadata.Context[context] = context;
2926
- }
3138
+ // Create complete map of contexts
3139
+ const contextMap = {};
3140
+ [
3141
+ ((_a = LogMetadata.Context) !== null && _a !== void 0 ? _a : {}),
3142
+ LogBuiltInMetadata.Context,
3143
+ ].forEach((contextMap) => {
3144
+ Object.keys(contextMap).forEach((context) => {
3145
+ // Add context
3146
+ contextMap[context] = context;
3147
+ // If context has children, add an "uncategorized" subcontext
3148
+ if (typeof contextMap[context] !== 'string') {
3149
+ contextMap[context][LogBuiltInMetadata.Context.Uncategorized] = (LogBuiltInMetadata.Context.Uncategorized);
3150
+ }
3151
+ });
2927
3152
  });
2928
- // > Add built-in targets
2929
- LogMetadata.Target = ((_c = LogMetadata.Target) !== null && _c !== void 0 ? _c : {});
2930
- Object.keys(LogBuiltInMetadata.Target).forEach((target) => {
2931
- if (LogMetadata.Target) {
2932
- LogMetadata.Target[target] = target;
2933
- }
3153
+ // Create complete map of targets
3154
+ const targetMap = {};
3155
+ [
3156
+ ((_b = LogMetadata.Target) !== null && _b !== void 0 ? _b : {}),
3157
+ LogBuiltInMetadata.Target,
3158
+ ].forEach((targetMap) => {
3159
+ Object.keys(targetMap).forEach((target) => {
3160
+ targetMap[target] = target;
3161
+ });
2934
3162
  });
2935
3163
  /* -------------- State ------------- */
2936
3164
  // Create initial date filter state
@@ -2951,7 +3179,7 @@ const LogReviewer = (props) => {
2951
3179
  };
2952
3180
  // Create initial context filter state
2953
3181
  const initContextFilterState = {};
2954
- Object.keys((_d = LogMetadata.Context) !== null && _d !== void 0 ? _d : {}).forEach((context) => {
3182
+ Object.keys((_c = LogMetadata.Context) !== null && _c !== void 0 ? _c : {}).forEach((context) => {
2955
3183
  var _a, _b;
2956
3184
  const contextValue = ((_a = LogMetadata.Context) !== null && _a !== void 0 ? _a : {})[context];
2957
3185
  if (typeof contextValue === 'string') {
@@ -2973,7 +3201,7 @@ const LogReviewer = (props) => {
2973
3201
  });
2974
3202
  // Create initial tag filter state
2975
3203
  const initTagFilterState = {};
2976
- Object.keys((_e = LogMetadata.Tag) !== null && _e !== void 0 ? _e : {}).forEach((tag) => {
3204
+ Object.keys((_d = LogMetadata.Tag) !== null && _d !== void 0 ? _d : {}).forEach((tag) => {
2977
3205
  initTagFilterState[tag] = false;
2978
3206
  });
2979
3207
  // Create advanced filter state
@@ -3000,7 +3228,7 @@ const LogReviewer = (props) => {
3000
3228
  target: {},
3001
3229
  action: {},
3002
3230
  };
3003
- Object.values((_f = LogMetadata.Target) !== null && _f !== void 0 ? _f : {}).forEach((target) => {
3231
+ Object.values((_e = LogMetadata.Target) !== null && _e !== void 0 ? _e : {}).forEach((target) => {
3004
3232
  initActionErrorFilterState.target[target] = true;
3005
3233
  });
3006
3234
  Object.values(LogAction$1).forEach((action) => {
@@ -3194,7 +3422,7 @@ const LogReviewer = (props) => {
3194
3422
  initDateFilterState,
3195
3423
  initTagFilterState,
3196
3424
  });
3197
- } }, "Reset All"))));
3425
+ } }, "Reset"))));
3198
3426
  // Filter drawer
3199
3427
  let filterDrawer;
3200
3428
  if (expandedFilterDrawer) {
@@ -3222,10 +3450,16 @@ const LogReviewer = (props) => {
3222
3450
  }
3223
3451
  else if (expandedFilterDrawer === FilterDrawer.Context) {
3224
3452
  // Create item picker items
3225
- const pickableItems = (Object.keys((_g = LogMetadata.Context) !== null && _g !== void 0 ? _g : {})
3226
- .map((context) => {
3227
- var _a;
3228
- const value = ((_a = LogMetadata.Context) !== null && _a !== void 0 ? _a : {})[context];
3453
+ const builtInPickableItem = {
3454
+ id: '_',
3455
+ name: 'Auto-logged',
3456
+ isGroup: true,
3457
+ children: [],
3458
+ };
3459
+ const pickableItems = [];
3460
+ Object.keys(contextMap)
3461
+ .forEach((context) => {
3462
+ const value = (contextMap)[context];
3229
3463
  if (typeof value === 'string') {
3230
3464
  // No subcategories
3231
3465
  const item = {
@@ -3234,13 +3468,24 @@ const LogReviewer = (props) => {
3234
3468
  isGroup: false,
3235
3469
  checked: !!contextFilterState[context],
3236
3470
  };
3237
- return item;
3471
+ // Add built-in items to its own folder
3472
+ const isBuiltIn = context in LogBuiltInMetadata.Context;
3473
+ if (isBuiltIn) {
3474
+ // Add to built-in pickable item
3475
+ builtInPickableItem.children.push(item);
3476
+ }
3477
+ else {
3478
+ // Add to pickable items list
3479
+ pickableItems.push(item);
3480
+ }
3238
3481
  }
3239
3482
  // Has subcategories
3240
3483
  const children = (Object.keys(value)
3484
+ // Remove parent name
3241
3485
  .filter((subcontext) => {
3242
3486
  return subcontext !== '_';
3243
3487
  })
3488
+ // Create child pickable items
3244
3489
  .map((subcontext) => {
3245
3490
  return {
3246
3491
  id: subcontext,
@@ -3255,19 +3500,32 @@ const LogReviewer = (props) => {
3255
3500
  isGroup: true,
3256
3501
  children,
3257
3502
  };
3258
- return item;
3259
- }));
3503
+ pickableItems.push(item);
3504
+ });
3505
+ // Add built-in contexts to end ofl ist
3506
+ pickableItems.push(builtInPickableItem);
3260
3507
  // Create filter UI
3261
3508
  filterDrawer = (React__default["default"].createElement(ItemPicker, { title: "Context", items: pickableItems, onChanged: (updatedItems) => {
3262
3509
  // Update our state
3263
3510
  updatedItems.forEach((pickableItem) => {
3264
3511
  if (pickableItem.isGroup) {
3265
3512
  // Has subcontexts
3266
- pickableItem.children.forEach((subcontextItem) => {
3267
- if (!subcontextItem.isGroup) {
3268
- contextFilterState[pickableItem.id][subcontextItem.id] = (subcontextItem.checked);
3269
- }
3270
- });
3513
+ if (pickableItem.id === '_') {
3514
+ // Built-in
3515
+ // Treat as if these were top-level contexts
3516
+ pickableItem.children.forEach((subcontextItem) => {
3517
+ contextFilterState[subcontextItem.id] = ('checked' in subcontextItem
3518
+ && subcontextItem.checked);
3519
+ });
3520
+ }
3521
+ else {
3522
+ // Not built-in
3523
+ pickableItem.children.forEach((subcontextItem) => {
3524
+ if (!subcontextItem.isGroup) {
3525
+ contextFilterState[pickableItem.id][subcontextItem.id] = (subcontextItem.checked);
3526
+ }
3527
+ });
3528
+ }
3271
3529
  }
3272
3530
  else {
3273
3531
  // No subcontexts
@@ -3282,17 +3540,19 @@ const LogReviewer = (props) => {
3282
3540
  }
3283
3541
  else if (expandedFilterDrawer === FilterDrawer.Tag) {
3284
3542
  // Create filter UI
3285
- filterDrawer = (React__default["default"].createElement(TabBox, { title: "Tags" }, Object.keys((_h = LogMetadata.Tag) !== null && _h !== void 0 ? _h : {})
3286
- .map((tag, i) => {
3287
- const description = genHumanReadableName(tag);
3288
- 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) => {
3289
- tagFilterState[tag] = checked;
3290
- dispatch({
3291
- type: ActionType.UpdateTagFilterState,
3292
- tagFilterState,
3293
- });
3294
- } }));
3295
- })));
3543
+ filterDrawer = (React__default["default"].createElement(TabBox, { title: "Tags" },
3544
+ React__default["default"].createElement("div", null, "If any are selected, logs must contain at least one but not necessarily all of the selected tags."),
3545
+ Object.keys((_f = LogMetadata.Tag) !== null && _f !== void 0 ? _f : {})
3546
+ .map((tag, i) => {
3547
+ const description = genHumanReadableName(tag);
3548
+ 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) => {
3549
+ tagFilterState[tag] = checked;
3550
+ dispatch({
3551
+ type: ActionType.UpdateTagFilterState,
3552
+ tagFilterState,
3553
+ });
3554
+ } }));
3555
+ })));
3296
3556
  }
3297
3557
  else if (expandedFilterDrawer === FilterDrawer.Action) {
3298
3558
  // Create filter UI
@@ -3333,21 +3593,18 @@ const LogReviewer = (props) => {
3333
3593
  });
3334
3594
  } }));
3335
3595
  })),
3336
- React__default["default"].createElement(ButtonInputGroup, { label: "Target" },
3337
- (Object.keys((_j = LogMetadata.Target) !== null && _j !== void 0 ? _j : {}).length === 0) && (React__default["default"].createElement("div", null, "This app does not have any targets yet.")),
3338
- Object.keys((_k = LogMetadata.Target) !== null && _k !== void 0 ? _k : {})
3339
- .map((target, i) => {
3340
- var _a;
3341
- const description = genHumanReadableName(target);
3342
- return (React__default["default"].createElement(CheckboxButton, { key: target, id: `LogReviewer-target-${target}-checkbox`, text: description, ariaLabel: `include logs with target "${description}" in results`, checked: actionErrorFilterState.target[target], onChanged: (checked) => {
3343
- actionErrorFilterState.target[target] = checked;
3344
- console.log(actionErrorFilterState, target, checked);
3345
- dispatch({
3346
- type: ActionType.UpdateActionErrorFilterState,
3347
- actionErrorFilterState,
3348
- });
3349
- }, noMarginOnRight: i === Object.keys((_a = LogMetadata.Target) !== null && _a !== void 0 ? _a : {}).length - 1 }));
3350
- })))),
3596
+ React__default["default"].createElement(ButtonInputGroup, { label: "Target" }, Object.keys(targetMap)
3597
+ .map((target, i) => {
3598
+ const description = genHumanReadableName(target);
3599
+ return (React__default["default"].createElement(CheckboxButton, { key: target, id: `LogReviewer-target-${target}-checkbox`, text: description, ariaLabel: `include logs with target "${description}" in results`, checked: actionErrorFilterState.target[target], onChanged: (checked) => {
3600
+ actionErrorFilterState.target[target] = checked;
3601
+ console.log(actionErrorFilterState, target, checked);
3602
+ dispatch({
3603
+ type: ActionType.UpdateActionErrorFilterState,
3604
+ actionErrorFilterState,
3605
+ });
3606
+ }, noMarginOnRight: i === Object.keys(targetMap).length - 1 }));
3607
+ })))),
3351
3608
  (actionErrorFilterState.type === undefined
3352
3609
  || actionErrorFilterState.type === LogType$1.Error) && (React__default["default"].createElement(TabBox, { title: "Error Log Details" },
3353
3610
  React__default["default"].createElement("div", { className: "input-group mb-2" },
@@ -3789,193 +4046,6 @@ const LogReviewer = (props) => {
3789
4046
  /*----------------------------------------*/
3790
4047
  /* Data */
3791
4048
  /*----------------------------------------*/
3792
- // Create data table
3793
- const columns = [
3794
- {
3795
- title: 'First Name',
3796
- param: 'userFirstName',
3797
- type: ParamType$1.String,
3798
- },
3799
- {
3800
- title: 'Last Name',
3801
- param: 'userLastName',
3802
- type: ParamType$1.String,
3803
- },
3804
- {
3805
- title: 'Email',
3806
- param: 'userEmail',
3807
- type: ParamType$1.String,
3808
- },
3809
- {
3810
- title: 'Canvas Id',
3811
- param: 'userId',
3812
- type: ParamType$1.Int,
3813
- },
3814
- {
3815
- title: 'Student?',
3816
- param: 'isLearner',
3817
- type: ParamType$1.Boolean,
3818
- },
3819
- {
3820
- title: 'Teaching Staff?',
3821
- param: 'isTTM',
3822
- type: ParamType$1.Boolean,
3823
- startsHidden: true,
3824
- },
3825
- {
3826
- title: 'Admin?',
3827
- param: 'isAdmin',
3828
- type: ParamType$1.Boolean,
3829
- startsHidden: true,
3830
- },
3831
- {
3832
- title: 'Course Canvas Id',
3833
- param: 'courseId',
3834
- type: ParamType$1.Int,
3835
- startsHidden: true,
3836
- },
3837
- {
3838
- title: 'Course Name',
3839
- param: 'courseName',
3840
- type: ParamType$1.String,
3841
- },
3842
- {
3843
- title: 'Browser Name',
3844
- param: 'browser.name',
3845
- type: ParamType$1.String,
3846
- startsHidden: true,
3847
- },
3848
- {
3849
- title: 'Browser Version',
3850
- param: 'browser.version',
3851
- type: ParamType$1.String,
3852
- startsHidden: true,
3853
- },
3854
- {
3855
- title: 'OS',
3856
- param: 'device.os',
3857
- type: ParamType$1.String,
3858
- startsHidden: true,
3859
- },
3860
- {
3861
- title: 'Mobile?',
3862
- param: 'device.isMobile',
3863
- type: ParamType$1.Boolean,
3864
- startsHidden: true,
3865
- },
3866
- {
3867
- title: 'Year',
3868
- param: 'year',
3869
- type: ParamType$1.Int,
3870
- },
3871
- {
3872
- title: 'Month',
3873
- param: 'month',
3874
- type: ParamType$1.Int,
3875
- },
3876
- {
3877
- title: 'Day',
3878
- param: 'day',
3879
- type: ParamType$1.Int,
3880
- },
3881
- {
3882
- title: 'Hour',
3883
- param: 'hour',
3884
- type: ParamType$1.Int,
3885
- },
3886
- {
3887
- title: 'Minute',
3888
- param: 'minute',
3889
- type: ParamType$1.Int,
3890
- startsHidden: true,
3891
- },
3892
- {
3893
- title: 'Timestamp',
3894
- param: 'timestamp',
3895
- type: ParamType$1.Int,
3896
- startsHidden: true,
3897
- },
3898
- {
3899
- title: 'Context',
3900
- param: 'context',
3901
- type: ParamType$1.String,
3902
- },
3903
- {
3904
- title: 'Subcontext',
3905
- param: 'subcontext',
3906
- type: ParamType$1.String,
3907
- },
3908
- {
3909
- title: 'Tags',
3910
- param: 'tags',
3911
- type: ParamType$1.JSON,
3912
- startsHidden: true,
3913
- },
3914
- {
3915
- title: 'Log Level',
3916
- param: 'level',
3917
- type: ParamType$1.String,
3918
- startsHidden: true,
3919
- },
3920
- {
3921
- title: 'Metadata',
3922
- param: 'metadata',
3923
- type: ParamType$1.JSON,
3924
- startsHidden: true,
3925
- },
3926
- {
3927
- title: 'Source',
3928
- param: 'source',
3929
- type: ParamType$1.String,
3930
- },
3931
- {
3932
- title: 'Server Route Path',
3933
- param: 'routePath',
3934
- type: ParamType$1.String,
3935
- startsHidden: true,
3936
- },
3937
- {
3938
- title: 'Server Route Template',
3939
- param: 'routeTemplate',
3940
- type: ParamType$1.String,
3941
- startsHidden: true,
3942
- },
3943
- {
3944
- title: 'Type',
3945
- param: 'type',
3946
- type: ParamType$1.String,
3947
- },
3948
- {
3949
- title: 'Error Message',
3950
- param: 'errorMessage',
3951
- type: ParamType$1.String,
3952
- startsHidden: true,
3953
- },
3954
- {
3955
- title: 'Error Code',
3956
- param: 'errorCode',
3957
- type: ParamType$1.String,
3958
- startsHidden: true,
3959
- },
3960
- {
3961
- title: 'Error Stack',
3962
- param: 'errorStack',
3963
- type: ParamType$1.String,
3964
- startsHidden: true,
3965
- },
3966
- {
3967
- title: 'Action Target',
3968
- param: 'target',
3969
- type: ParamType$1.String,
3970
- startsHidden: true,
3971
- },
3972
- {
3973
- title: 'Action Type',
3974
- param: 'action',
3975
- type: ParamType$1.String,
3976
- startsHidden: true,
3977
- },
3978
- ];
3979
4049
  // Nothing to show notice
3980
4050
  const noLogsNotice = (logs.length === 0
3981
4051
  ? (React__default["default"].createElement("div", { className: "alert alert-warning text-center mt-2" },