dce-reactkit 5.0.1 → 5.0.3

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
@@ -1789,11 +1789,11 @@ var View;
1789
1789
  })(View || (View = {}));
1790
1790
  /* ------------- Actions ------------ */
1791
1791
  // Types of actions
1792
- var ActionType$a;
1792
+ var ActionType$b;
1793
1793
  (function (ActionType) {
1794
1794
  // Fix invalid date so it is now in range
1795
1795
  ActionType["FixInvalidDate"] = "FixInvalidDate";
1796
- })(ActionType$a || (ActionType$a = {}));
1796
+ })(ActionType$b || (ActionType$b = {}));
1797
1797
  /**
1798
1798
  * Reducer that executes actions
1799
1799
  * @author Gardenia Liu
@@ -1801,9 +1801,9 @@ var ActionType$a;
1801
1801
  * @param action action to execute
1802
1802
  * @returns updated state
1803
1803
  */
1804
- const reducer$b = (state, action) => {
1804
+ const reducer$c = (state, action) => {
1805
1805
  switch (action.type) {
1806
- case ActionType$a.FixInvalidDate: {
1806
+ case ActionType$b.FixInvalidDate: {
1807
1807
  return Object.assign(Object.assign({}, state), { view: View.DateChooser });
1808
1808
  }
1809
1809
  default: {
@@ -1930,7 +1930,7 @@ const SimpleDateChooser = (props) => {
1930
1930
  /* -------------------------------- Setup ------------------------------- */
1931
1931
  /*------------------------------------------------------------------------*/
1932
1932
  /* -------------- Props ------------- */
1933
- const { ariaLabel, name, dontAllowPast, dontAllowFuture, numMonthsToShow, onChange, month, day, year, isDisabled = false, } = props;
1933
+ const { ariaLabel, name, dontAllowPast, dontAllowFuture, numMonthsToShow, onChange, month, day, year, isDisabled = false, hideDay, } = props;
1934
1934
  // Get choices
1935
1935
  const choices = getChoices({
1936
1936
  numMonthsToShow,
@@ -1952,7 +1952,7 @@ const SimpleDateChooser = (props) => {
1952
1952
  : View.DateChooser),
1953
1953
  };
1954
1954
  // Initialize state
1955
- const [state, dispatch] = React.useReducer(reducer$b, initialState);
1955
+ const [state, dispatch] = React.useReducer(reducer$c, initialState);
1956
1956
  // Destructure common state
1957
1957
  const { view, } = state;
1958
1958
  /*------------------------------------------------------------------------*/
@@ -1975,7 +1975,7 @@ const SimpleDateChooser = (props) => {
1975
1975
  onChange(today.month, today.day, today.year);
1976
1976
  // Update state
1977
1977
  dispatch({
1978
- type: ActionType$a.FixInvalidDate,
1978
+ type: ActionType$b.FixInvalidDate,
1979
1979
  });
1980
1980
  }
1981
1981
  });
@@ -2016,20 +2016,21 @@ const SimpleDateChooser = (props) => {
2016
2016
  // Change day, month, and year
2017
2017
  onChange(choice.month, choice.days[0], choice.year);
2018
2018
  }, disabled: isDisabled }, monthOptions),
2019
- React__default["default"].createElement("select", { "aria-label": `day for ${ariaLabel}`, className: "custom-select form-select d-inline-block", style: { width: 'auto' }, id: `SimpleDateChooser-${name}-day`, value: day, onChange: (e) => {
2019
+ !hideDay && (React__default["default"].createElement("select", { "aria-label": `day for ${ariaLabel}`, className: "custom-select form-select d-inline-block", style: { width: 'auto' }, id: `SimpleDateChooser-${name}-day`, value: day, onChange: (e) => {
2020
2020
  // Only change the day
2021
2021
  onChange(month, Number.parseInt(e.target.value, 10), year);
2022
- }, disabled: isDisabled }, dayOptions)));
2022
+ }, disabled: isDisabled }, dayOptions))));
2023
2023
  }
2024
2024
  /* --------- DateOutOfRange --------- */
2025
2025
  if (view === View.InvalidDate) {
2026
2026
  body = (React__default["default"].createElement("div", { className: "SimpleDateChooser-inner-container d-inline-block" },
2027
2027
  React__default["default"].createElement("button", { type: "button", className: "btn btn-light", onClick: askToEditInvalidDate, "aria-label": `edit date for ${ariaLabel}` },
2028
2028
  dceCommonkit.getMonthName(month).full,
2029
- ' ',
2030
- day,
2031
- dceCommonkit.getOrdinal(day),
2032
- ",",
2029
+ !hideDay && (React__default["default"].createElement(React__default["default"].Fragment, null,
2030
+ ' ',
2031
+ day,
2032
+ dceCommonkit.getOrdinal(day),
2033
+ ",")),
2033
2034
  ' ',
2034
2035
  year),
2035
2036
  React__default["default"].createElement("button", { type: "button", className: "btn btn-secondary", onClick: askToEditInvalidDate, "aria-label": `edit date for ${ariaLabel}` }, "Edit")));
@@ -2040,6 +2041,30 @@ const SimpleDateChooser = (props) => {
2040
2041
  return (React__default["default"].createElement("span", { className: "SimpleDateChooser-outer-container" }, body));
2041
2042
  };
2042
2043
 
2044
+ /**
2045
+ * A very simple, lightweight month chooser
2046
+ * @author Gabe Abrams
2047
+ */
2048
+ /*------------------------------------------------------------------------*/
2049
+ /* ------------------------------ Component ----------------------------- */
2050
+ /*------------------------------------------------------------------------*/
2051
+ const SimpleMonthChooser = (props) => {
2052
+ /*------------------------------------------------------------------------*/
2053
+ /* -------------------------------- Setup ------------------------------- */
2054
+ /*------------------------------------------------------------------------*/
2055
+ /* -------------- Props ------------- */
2056
+ const { ariaLabel, name, dontAllowPast, dontAllowFuture, numMonthsToShow, onChange, month, year, isDisabled, } = props;
2057
+ /*------------------------------------------------------------------------*/
2058
+ /* ------------------------------- Render ------------------------------- */
2059
+ /*------------------------------------------------------------------------*/
2060
+ /*----------------------------------------*/
2061
+ /* --------------- Main UI -------------- */
2062
+ /*----------------------------------------*/
2063
+ return (React__default["default"].createElement(SimpleDateChooser, { ariaLabel: ariaLabel, name: name, month: month, day: 1, year: year, numMonthsToShow: numMonthsToShow, dontAllowPast: dontAllowPast, dontAllowFuture: dontAllowFuture, isDisabled: isDisabled, hideDay: true, onChange: (newMonth, newDay, newYear) => {
2064
+ onChange(newMonth, newYear);
2065
+ } }));
2066
+ };
2067
+
2043
2068
  /**
2044
2069
  * A very simple, lightweight time chooser
2045
2070
  * @author Gardenia Liu
@@ -2522,27 +2547,27 @@ const PopPendingMark = (props) => {
2522
2547
  */
2523
2548
  /* ------------- Actions ------------ */
2524
2549
  // Types of actions
2525
- var ActionType$9;
2550
+ var ActionType$a;
2526
2551
  (function (ActionType) {
2527
2552
  // Indicate that the text was recently copied
2528
2553
  ActionType["IndicateRecentlyCopied"] = "indicate-recently-copied";
2529
2554
  // Clear the status
2530
2555
  ActionType["ClearRecentlyCopiedStatus"] = "clear-recently-copied-status";
2531
- })(ActionType$9 || (ActionType$9 = {}));
2556
+ })(ActionType$a || (ActionType$a = {}));
2532
2557
  /**
2533
2558
  * Reducer that executes actions
2534
2559
  * @author Gabe Abrams
2535
2560
  * @param state current state
2536
2561
  * @param action action to execute
2537
2562
  */
2538
- const reducer$a = (state, action) => {
2563
+ const reducer$b = (state, action) => {
2539
2564
  switch (action.type) {
2540
- case ActionType$9.IndicateRecentlyCopied: {
2565
+ case ActionType$a.IndicateRecentlyCopied: {
2541
2566
  return {
2542
2567
  recentlyCopied: true,
2543
2568
  };
2544
2569
  }
2545
- case ActionType$9.ClearRecentlyCopiedStatus: {
2570
+ case ActionType$a.ClearRecentlyCopiedStatus: {
2546
2571
  return {
2547
2572
  recentlyCopied: false,
2548
2573
  };
@@ -2568,7 +2593,7 @@ const CopiableBox = (props) => {
2568
2593
  recentlyCopied: false,
2569
2594
  };
2570
2595
  // Initialize state
2571
- const [state, dispatch] = React.useReducer(reducer$a, initialState);
2596
+ const [state, dispatch] = React.useReducer(reducer$b, initialState);
2572
2597
  // Destructure common state
2573
2598
  const { recentlyCopied, } = state;
2574
2599
  /*------------------------------------------------------------------------*/
@@ -2588,13 +2613,13 @@ const CopiableBox = (props) => {
2588
2613
  }
2589
2614
  // Show copied notice
2590
2615
  dispatch({
2591
- type: ActionType$9.IndicateRecentlyCopied,
2616
+ type: ActionType$a.IndicateRecentlyCopied,
2592
2617
  });
2593
2618
  // Wait a moment
2594
2619
  yield dceCommonkit.waitMs(4000);
2595
2620
  // Hide copied notice
2596
2621
  dispatch({
2597
- type: ActionType$9.ClearRecentlyCopiedStatus,
2622
+ type: ActionType$a.ClearRecentlyCopiedStatus,
2598
2623
  });
2599
2624
  });
2600
2625
  /*------------------------------------------------------------------------*/
@@ -2650,20 +2675,20 @@ const CopiableBox = (props) => {
2650
2675
  */
2651
2676
  /* ------------- Actions ------------ */
2652
2677
  // Types of actions
2653
- var ActionType$8;
2678
+ var ActionType$9;
2654
2679
  (function (ActionType) {
2655
2680
  // Toggle whether a child are being shown
2656
2681
  ActionType["ToggleChild"] = "toggle-child";
2657
- })(ActionType$8 || (ActionType$8 = {}));
2682
+ })(ActionType$9 || (ActionType$9 = {}));
2658
2683
  /**
2659
2684
  * Reducer that executes actions
2660
2685
  * @author Gabe Abrams
2661
2686
  * @param state current state
2662
2687
  * @param action action to execute
2663
2688
  */
2664
- const reducer$9 = (state, action) => {
2689
+ const reducer$a = (state, action) => {
2665
2690
  switch (action.type) {
2666
- case ActionType$8.ToggleChild: {
2691
+ case ActionType$9.ToggleChild: {
2667
2692
  return Object.assign(Object.assign({}, state), { childExpanded: Object.assign(Object.assign({}, state.childExpanded), { [String(action.id)]: !state.childExpanded[String(action.id)] }) });
2668
2693
  }
2669
2694
  default: {
@@ -2692,7 +2717,7 @@ const NestableItemList = (props) => {
2692
2717
  childExpanded: initChildExpanded,
2693
2718
  };
2694
2719
  // Initialize state
2695
- const [state, dispatch] = React.useReducer(reducer$9, initialState);
2720
+ const [state, dispatch] = React.useReducer(reducer$a, initialState);
2696
2721
  // Destructure common state
2697
2722
  const { childExpanded, } = state;
2698
2723
  /*------------------------------------------------------------------------*/
@@ -2782,7 +2807,7 @@ const NestableItemList = (props) => {
2782
2807
  backgroundColor: 'transparent',
2783
2808
  }, type: "button", onClick: () => {
2784
2809
  dispatch({
2785
- type: ActionType$8.ToggleChild,
2810
+ type: ActionType$9.ToggleChild,
2786
2811
  id: item.id,
2787
2812
  });
2788
2813
  }, "aria-label": `${childExpanded[item.id] ? 'Hide' : 'Show'} items in ${item.name}` },
@@ -2917,7 +2942,7 @@ var SortType;
2917
2942
  })(SortType || (SortType = {}));
2918
2943
  /* ------------- Actions ------------ */
2919
2944
  // Types of actions
2920
- var ActionType$7;
2945
+ var ActionType$8;
2921
2946
  (function (ActionType) {
2922
2947
  // Toggle sort column param
2923
2948
  ActionType["ToggleSortColumn"] = "toggle-sort-column";
@@ -2929,16 +2954,16 @@ var ActionType$7;
2929
2954
  ActionType["ShowAllColumns"] = "show-all-columns";
2930
2955
  // Hide all columns
2931
2956
  ActionType["HideAllColumns"] = "hide-all-columns";
2932
- })(ActionType$7 || (ActionType$7 = {}));
2957
+ })(ActionType$8 || (ActionType$8 = {}));
2933
2958
  /**
2934
2959
  * Reducer that executes actions
2935
2960
  * @author Gabe Abrams
2936
2961
  * @param state current state
2937
2962
  * @param action action to execute
2938
2963
  */
2939
- const reducer$8 = (state, action) => {
2964
+ const reducer$9 = (state, action) => {
2940
2965
  switch (action.type) {
2941
- case ActionType$7.ToggleSortColumn: {
2966
+ case ActionType$8.ToggleSortColumn: {
2942
2967
  if (action.param !== state.sortColumnParam) {
2943
2968
  // Different column param
2944
2969
  return Object.assign(Object.assign({}, state), { sortColumnParam: action.param, sortType: SortType.Ascending });
@@ -2950,22 +2975,22 @@ const reducer$8 = (state, action) => {
2950
2975
  // Stop sorting by column
2951
2976
  return Object.assign(Object.assign({}, state), { sortColumnParam: undefined, sortType: SortType.Ascending });
2952
2977
  }
2953
- case ActionType$7.UpdateColumnVisibility: {
2978
+ case ActionType$8.UpdateColumnVisibility: {
2954
2979
  const { columnVisibilityMap } = state;
2955
2980
  columnVisibilityMap[action.param] = action.visible;
2956
2981
  return Object.assign(Object.assign({}, state), { columnVisibilityMap });
2957
2982
  }
2958
- case ActionType$7.ToggleColVisCusModalVisibility: {
2983
+ case ActionType$8.ToggleColVisCusModalVisibility: {
2959
2984
  return Object.assign(Object.assign({}, state), { columnVisibilityCustomizationModalVisible: !state.columnVisibilityCustomizationModalVisible });
2960
2985
  }
2961
- case ActionType$7.ShowAllColumns: {
2986
+ case ActionType$8.ShowAllColumns: {
2962
2987
  const { columnVisibilityMap } = state;
2963
2988
  Object.keys(columnVisibilityMap).forEach((param) => {
2964
2989
  columnVisibilityMap[param] = true;
2965
2990
  });
2966
2991
  return Object.assign(Object.assign({}, state), { columnVisibilityMap });
2967
2992
  }
2968
- case ActionType$7.HideAllColumns: {
2993
+ case ActionType$8.HideAllColumns: {
2969
2994
  const { columnVisibilityMap } = state;
2970
2995
  Object.keys(columnVisibilityMap).forEach((param) => {
2971
2996
  columnVisibilityMap[param] = false;
@@ -3012,7 +3037,7 @@ const IntelliTable = (props) => {
3012
3037
  columnVisibilityCustomizationModalVisible: false,
3013
3038
  };
3014
3039
  // Initialize state
3015
- const [state, dispatch] = React.useReducer(reducer$8, initialState);
3040
+ const [state, dispatch] = React.useReducer(reducer$9, initialState);
3016
3041
  // Destructure common state
3017
3042
  const { sortColumnParam, sortType, columnVisibilityMap, columnVisibilityCustomizationModalVisible, } = state;
3018
3043
  /*------------------------------------------------------------------------*/
@@ -3035,13 +3060,13 @@ const IntelliTable = (props) => {
3035
3060
  return alert('Choose at least one column', 'To continue, you have to choose at least one column to show');
3036
3061
  }
3037
3062
  dispatch({
3038
- type: ActionType$7.ToggleColVisCusModalVisibility,
3063
+ type: ActionType$8.ToggleColVisCusModalVisibility,
3039
3064
  });
3040
3065
  }, okayVariant: Variant$1.Light },
3041
3066
  columns.map((column) => {
3042
3067
  return (React__default["default"].createElement(CheckboxButton, { key: column.param, id: `IntelliTable-${id}-toggle-visibility-${column.param}`, className: "mb-2", text: column.title, onChanged: (checked) => {
3043
3068
  dispatch({
3044
- type: ActionType$7.UpdateColumnVisibility,
3069
+ type: ActionType$8.UpdateColumnVisibility,
3045
3070
  param: column.param,
3046
3071
  visible: checked,
3047
3072
  });
@@ -3050,12 +3075,12 @@ const IntelliTable = (props) => {
3050
3075
  React__default["default"].createElement("div", { className: "mt-3" }, "Or you can:"),
3051
3076
  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: () => {
3052
3077
  dispatch({
3053
- type: ActionType$7.ShowAllColumns,
3078
+ type: ActionType$8.ShowAllColumns,
3054
3079
  });
3055
3080
  } }, "Select All"),
3056
3081
  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: () => {
3057
3082
  dispatch({
3058
- type: ActionType$7.HideAllColumns,
3083
+ type: ActionType$8.HideAllColumns,
3059
3084
  });
3060
3085
  } }, "Deselect All")));
3061
3086
  }
@@ -3106,7 +3131,7 @@ const IntelliTable = (props) => {
3106
3131
  React__default["default"].createElement("div", null,
3107
3132
  React__default["default"].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: () => {
3108
3133
  dispatch({
3109
- type: ActionType$7.ToggleSortColumn,
3134
+ type: ActionType$8.ToggleSortColumn,
3110
3135
  param: column.param,
3111
3136
  });
3112
3137
  } },
@@ -3295,7 +3320,7 @@ const IntelliTable = (props) => {
3295
3320
  React__default["default"].createElement(CSVDownloadButton, { "aria-label": `download data as csv for ${title}`, id: `IntelliTable-${id}-download-as-csv`, filename: filename, csv: csv }),
3296
3321
  React__default["default"].createElement("button", { type: "button", className: "btn btn-secondary ms-2", "aria-label": `show panel for customizing which columns show in table ${title}`, id: `IntelliTable-${id}-show-column-customization-modal`, onClick: () => {
3297
3322
  dispatch({
3298
- type: ActionType$7.ToggleColVisCusModalVisibility,
3323
+ type: ActionType$8.ToggleColVisCusModalVisibility,
3299
3324
  });
3300
3325
  } },
3301
3326
  "Show/Hide Cols",
@@ -3718,7 +3743,7 @@ const genHumanReadableName = (machineReadableName) => {
3718
3743
  };
3719
3744
  /* ------------- Actions ------------ */
3720
3745
  // Types of actions
3721
- var ActionType$6;
3746
+ var ActionType$7;
3722
3747
  (function (ActionType) {
3723
3748
  // Show the loading bar
3724
3749
  ActionType["StartLoading"] = "start-loading";
@@ -3748,57 +3773,57 @@ var ActionType$6;
3748
3773
  ActionType["SetPageNumber"] = "set-page-number";
3749
3774
  // Reset user made filter change indicator
3750
3775
  ActionType["ResetUserMadeFilterChange"] = "reset-user-made-filter-change";
3751
- })(ActionType$6 || (ActionType$6 = {}));
3776
+ })(ActionType$7 || (ActionType$7 = {}));
3752
3777
  /**
3753
3778
  * Reducer that executes actions
3754
3779
  * @author Gabe Abrams
3755
3780
  * @param state current state
3756
3781
  * @param action action to execute
3757
3782
  */
3758
- const reducer$7 = (state, action) => {
3783
+ const reducer$8 = (state, action) => {
3759
3784
  switch (action.type) {
3760
- case ActionType$6.StartLoading: {
3785
+ case ActionType$7.StartLoading: {
3761
3786
  return Object.assign(Object.assign({}, state), { loading: true });
3762
3787
  }
3763
- case ActionType$6.FinishLoading: {
3788
+ case ActionType$7.FinishLoading: {
3764
3789
  return Object.assign(Object.assign({}, state), { loading: false, logs: action.logs });
3765
3790
  }
3766
- case ActionType$6.ToggleFilterDrawer: {
3791
+ case ActionType$7.ToggleFilterDrawer: {
3767
3792
  return Object.assign(Object.assign({}, state), { expandedFilterDrawer: (state.expandedFilterDrawer === action.filterDrawer
3768
3793
  ? undefined // hide
3769
3794
  : action.filterDrawer) });
3770
3795
  }
3771
- case ActionType$6.HideFilterDrawer: {
3796
+ case ActionType$7.HideFilterDrawer: {
3772
3797
  return Object.assign(Object.assign({}, state), { expandedFilterDrawer: undefined });
3773
3798
  }
3774
- case ActionType$6.ResetFilters: {
3799
+ case ActionType$7.ResetFilters: {
3775
3800
  return Object.assign(Object.assign({}, state), { pendingDateFilterState: action.initDateFilterState, pendingContextFilterState: action.initContextFilterState, pendingTagFilterState: action.initTagFilterState, pendingActionErrorFilterState: action.initActionErrorFilterState, pendingAdvancedFilterState: action.initAdvancedFilterState, pageNumber: 1 });
3776
3801
  }
3777
- case ActionType$6.UpdateDateFilterState: {
3802
+ case ActionType$7.UpdateDateFilterState: {
3778
3803
  return Object.assign(Object.assign({}, state), { pendingDateFilterState: action.dateFilterState, userMadeFilterChange: true });
3779
3804
  }
3780
- case ActionType$6.UpdateContextFilterState: {
3805
+ case ActionType$7.UpdateContextFilterState: {
3781
3806
  return Object.assign(Object.assign({}, state), { pendingContextFilterState: action.contextFilterState, userMadeFilterChange: true });
3782
3807
  }
3783
- case ActionType$6.UpdateTagFilterState: {
3808
+ case ActionType$7.UpdateTagFilterState: {
3784
3809
  return Object.assign(Object.assign({}, state), { pendingTagFilterState: action.tagFilterState, userMadeFilterChange: true });
3785
3810
  }
3786
- case ActionType$6.UpdateActionErrorFilterState: {
3811
+ case ActionType$7.UpdateActionErrorFilterState: {
3787
3812
  return Object.assign(Object.assign({}, state), { pendingActionErrorFilterState: action.actionErrorFilterState, userMadeFilterChange: true });
3788
3813
  }
3789
- case ActionType$6.UpdateAdvancedFilterState: {
3814
+ case ActionType$7.UpdateAdvancedFilterState: {
3790
3815
  return Object.assign(Object.assign({}, state), { pendingAdvancedFilterState: action.advancedFilterState, userMadeFilterChange: true });
3791
3816
  }
3792
- case ActionType$6.SetHasAnotherPage: {
3817
+ case ActionType$7.SetHasAnotherPage: {
3793
3818
  return Object.assign(Object.assign({}, state), { hasAnotherPage: action.hasAnotherPage });
3794
3819
  }
3795
- case ActionType$6.SetNumPages: {
3820
+ case ActionType$7.SetNumPages: {
3796
3821
  return Object.assign(Object.assign({}, state), { numPages: action.numPages });
3797
3822
  }
3798
- case ActionType$6.SetPageNumber: {
3823
+ case ActionType$7.SetPageNumber: {
3799
3824
  return Object.assign(Object.assign({}, state), { pageNumber: action.pageNumber });
3800
3825
  }
3801
- case ActionType$6.ResetUserMadeFilterChange: {
3826
+ case ActionType$7.ResetUserMadeFilterChange: {
3802
3827
  return Object.assign(Object.assign({}, state), { userMadeFilterChange: false });
3803
3828
  }
3804
3829
  default: {
@@ -3931,7 +3956,7 @@ const LogReviewer = (props) => {
3931
3956
  userMadeFilterChange: false,
3932
3957
  };
3933
3958
  // Initialize state
3934
- const [state, dispatch] = React.useReducer(reducer$7, initialState);
3959
+ const [state, dispatch] = React.useReducer(reducer$8, initialState);
3935
3960
  // Destructure common state
3936
3961
  const { loading, logs, expandedFilterDrawer, pendingDateFilterState, pendingContextFilterState, pendingTagFilterState, pendingActionErrorFilterState, pendingAdvancedFilterState, pageNumber, numPages, userMadeFilterChange, } = state;
3937
3962
  /* -------------- Refs -------------- */
@@ -3957,7 +3982,7 @@ const LogReviewer = (props) => {
3957
3982
  const fetchLogs = (opts) => __awaiter(void 0, void 0, void 0, function* () {
3958
3983
  const { filters, pageNum, filtersChanged, } = opts;
3959
3984
  dispatch({
3960
- type: ActionType$6.StartLoading,
3985
+ type: ActionType$7.StartLoading,
3961
3986
  });
3962
3987
  try {
3963
3988
  // Send filters to the server
@@ -3974,23 +3999,23 @@ const LogReviewer = (props) => {
3974
3999
  });
3975
4000
  fetchedLogs = fetchedLogs.concat(response.items);
3976
4001
  dispatch({
3977
- type: ActionType$6.SetHasAnotherPage,
4002
+ type: ActionType$7.SetHasAnotherPage,
3978
4003
  hasAnotherPage: response.hasAnotherPage,
3979
4004
  });
3980
4005
  if (filtersChanged && response.numPages !== undefined) {
3981
4006
  dispatch({
3982
- type: ActionType$6.SetNumPages,
4007
+ type: ActionType$7.SetNumPages,
3983
4008
  numPages: response.numPages,
3984
4009
  });
3985
4010
  }
3986
4011
  // Update logs in state
3987
4012
  dispatch({
3988
- type: ActionType$6.FinishLoading,
4013
+ type: ActionType$7.FinishLoading,
3989
4014
  logs: fetchedLogs,
3990
4015
  });
3991
4016
  // Update page number
3992
4017
  dispatch({
3993
- type: ActionType$6.SetPageNumber,
4018
+ type: ActionType$7.SetPageNumber,
3994
4019
  pageNumber: pageNum,
3995
4020
  });
3996
4021
  }
@@ -4049,7 +4074,7 @@ const LogReviewer = (props) => {
4049
4074
  React__default["default"].createElement("div", { className: "LogReviewer-filter-toggle-buttons alert alert-secondary p-2 m-0" },
4050
4075
  React__default["default"].createElement("button", { type: "button", id: "LogReviewer-toggle-date-filter-drawer", className: `btn btn-${FilterDrawer.Date === expandedFilterDrawer ? 'warning' : 'light'} me-2`, "aria-label": "toggle date filter drawer", onClick: () => {
4051
4076
  dispatch({
4052
- type: ActionType$6.ToggleFilterDrawer,
4077
+ type: ActionType$7.ToggleFilterDrawer,
4053
4078
  filterDrawer: FilterDrawer.Date,
4054
4079
  });
4055
4080
  } },
@@ -4057,7 +4082,7 @@ const LogReviewer = (props) => {
4057
4082
  "Date"),
4058
4083
  React__default["default"].createElement("button", { type: "button", id: "LogReviewer-toggle-context-filter-drawer", className: `btn btn-${FilterDrawer.Context === expandedFilterDrawer ? 'warning' : 'light'} me-2`, "aria-label": "toggle context filter drawer", onClick: () => {
4059
4084
  dispatch({
4060
- type: ActionType$6.ToggleFilterDrawer,
4085
+ type: ActionType$7.ToggleFilterDrawer,
4061
4086
  filterDrawer: FilterDrawer.Context,
4062
4087
  });
4063
4088
  } },
@@ -4065,7 +4090,7 @@ const LogReviewer = (props) => {
4065
4090
  "Context"),
4066
4091
  (LogMetadata.Tag && Object.keys(LogMetadata.Tag).length > 0) && (React__default["default"].createElement("button", { type: "button", id: "LogReviewer-toggle-tag-filter-drawer", className: `btn btn-${FilterDrawer.Tag === expandedFilterDrawer ? 'warning' : 'light'} me-2`, "aria-label": "toggle tag filter drawer", onClick: () => {
4067
4092
  dispatch({
4068
- type: ActionType$6.ToggleFilterDrawer,
4093
+ type: ActionType$7.ToggleFilterDrawer,
4069
4094
  filterDrawer: FilterDrawer.Tag,
4070
4095
  });
4071
4096
  } },
@@ -4073,7 +4098,7 @@ const LogReviewer = (props) => {
4073
4098
  "Tag")),
4074
4099
  React__default["default"].createElement("button", { type: "button", id: "LogReviewer-toggle-action-filter-drawer", className: `btn btn-${FilterDrawer.Action === expandedFilterDrawer ? 'warning' : 'light'} me-2`, "aria-label": "toggle action and error filter drawer", onClick: () => {
4075
4100
  dispatch({
4076
- type: ActionType$6.ToggleFilterDrawer,
4101
+ type: ActionType$7.ToggleFilterDrawer,
4077
4102
  filterDrawer: FilterDrawer.Action,
4078
4103
  });
4079
4104
  } },
@@ -4081,7 +4106,7 @@ const LogReviewer = (props) => {
4081
4106
  "Action"),
4082
4107
  React__default["default"].createElement("button", { type: "button", id: "LogReviewer-toggle-advanced-filter-drawer", className: `btn btn-${FilterDrawer.Advanced === expandedFilterDrawer ? 'warning' : 'light'} me-2`, "aria-label": "toggle advanced filter drawer", onClick: () => {
4083
4108
  dispatch({
4084
- type: ActionType$6.ToggleFilterDrawer,
4109
+ type: ActionType$7.ToggleFilterDrawer,
4085
4110
  filterDrawer: FilterDrawer.Advanced,
4086
4111
  });
4087
4112
  } },
@@ -4110,7 +4135,7 @@ const LogReviewer = (props) => {
4110
4135
  filtersChanged: true,
4111
4136
  });
4112
4137
  dispatch({
4113
- type: ActionType$6.ResetFilters,
4138
+ type: ActionType$7.ResetFilters,
4114
4139
  initActionErrorFilterState,
4115
4140
  initAdvancedFilterState,
4116
4141
  initContextFilterState,
@@ -4118,7 +4143,7 @@ const LogReviewer = (props) => {
4118
4143
  initTagFilterState,
4119
4144
  });
4120
4145
  dispatch({
4121
- type: ActionType$6.HideFilterDrawer,
4146
+ type: ActionType$7.HideFilterDrawer,
4122
4147
  });
4123
4148
  } },
4124
4149
  React__default["default"].createElement(reactFontawesome.FontAwesomeIcon, { icon: freeSolidSvgIcons.faTimes }),
@@ -4126,11 +4151,11 @@ const LogReviewer = (props) => {
4126
4151
  "Reset"),
4127
4152
  userMadeFilterChange && (React__default["default"].createElement("button", { type: "button", id: "LogReviewer-submit-filters-button", className: "btn btn-primary ms-2", "aria-label": "submit filters", onClick: () => {
4128
4153
  dispatch({
4129
- type: ActionType$6.HideFilterDrawer,
4154
+ type: ActionType$7.HideFilterDrawer,
4130
4155
  });
4131
4156
  // Reset user made filter change indicator
4132
4157
  dispatch({
4133
- type: ActionType$6.ResetUserMadeFilterChange,
4158
+ type: ActionType$7.ResetUserMadeFilterChange,
4134
4159
  });
4135
4160
  // Save active filters
4136
4161
  // Deep clone the pending filter states to avoid any reference issues
@@ -4165,7 +4190,7 @@ const LogReviewer = (props) => {
4165
4190
  React__default["default"].createElement(SimpleDateChooser, { ariaLabel: "filter start date", name: "filter-start-date", year: pendingDateFilterState.startDate.year, month: pendingDateFilterState.startDate.month, day: pendingDateFilterState.startDate.day, dontAllowFuture: true, numMonthsToShow: 36, onChange: (month, day, year) => {
4166
4191
  const newDateFilterState = Object.assign(Object.assign({}, pendingDateFilterState), { startDate: { month, day, year } });
4167
4192
  dispatch({
4168
- type: ActionType$6.UpdateDateFilterState,
4193
+ type: ActionType$7.UpdateDateFilterState,
4169
4194
  dateFilterState: newDateFilterState,
4170
4195
  });
4171
4196
  } }),
@@ -4183,7 +4208,7 @@ const LogReviewer = (props) => {
4183
4208
  }
4184
4209
  const newDateFilterState = Object.assign(Object.assign({}, pendingDateFilterState), { endDate: { month, day, year } });
4185
4210
  dispatch({
4186
- type: ActionType$6.UpdateDateFilterState,
4211
+ type: ActionType$7.UpdateDateFilterState,
4187
4212
  dateFilterState: newDateFilterState,
4188
4213
  });
4189
4214
  } })));
@@ -4276,7 +4301,7 @@ const LogReviewer = (props) => {
4276
4301
  });
4277
4302
  // Update state
4278
4303
  dispatch({
4279
- type: ActionType$6.UpdateContextFilterState,
4304
+ type: ActionType$7.UpdateContextFilterState,
4280
4305
  contextFilterState: newContextFilterState,
4281
4306
  });
4282
4307
  } }));
@@ -4291,7 +4316,7 @@ const LogReviewer = (props) => {
4291
4316
  return (React__default["default"].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: pendingTagFilterState[tag], onChanged: (checked) => {
4292
4317
  const newTagFilterState = Object.assign(Object.assign({}, pendingTagFilterState), { [tag]: checked });
4293
4318
  dispatch({
4294
- type: ActionType$6.UpdateTagFilterState,
4319
+ type: ActionType$7.UpdateTagFilterState,
4295
4320
  tagFilterState: newTagFilterState,
4296
4321
  });
4297
4322
  }, checkedVariant: Variant$1.Light, uncheckedVariant: Variant$1.Light }));
@@ -4304,21 +4329,21 @@ const LogReviewer = (props) => {
4304
4329
  React__default["default"].createElement(RadioButton, { id: "LogReviewer-type-all", text: "All Logs", onSelected: () => {
4305
4330
  const newActionErrorFilterState = Object.assign(Object.assign({}, pendingActionErrorFilterState), { type: undefined });
4306
4331
  dispatch({
4307
- type: ActionType$6.UpdateActionErrorFilterState,
4332
+ type: ActionType$7.UpdateActionErrorFilterState,
4308
4333
  actionErrorFilterState: newActionErrorFilterState,
4309
4334
  });
4310
4335
  }, ariaLabel: "show logs of all types", selected: pendingActionErrorFilterState.type === undefined, unselectedVariant: Variant$1.Light }),
4311
4336
  React__default["default"].createElement(RadioButton, { id: "LogReviewer-type-action-only", text: "Action Logs Only", onSelected: () => {
4312
4337
  const newActionErrorFilterState = Object.assign(Object.assign({}, pendingActionErrorFilterState), { type: dceCommonkit.LogType.Action });
4313
4338
  dispatch({
4314
- type: ActionType$6.UpdateActionErrorFilterState,
4339
+ type: ActionType$7.UpdateActionErrorFilterState,
4315
4340
  actionErrorFilterState: newActionErrorFilterState,
4316
4341
  });
4317
4342
  }, ariaLabel: "only show action logs", selected: pendingActionErrorFilterState.type === dceCommonkit.LogType.Action, unselectedVariant: Variant$1.Light }),
4318
4343
  React__default["default"].createElement(RadioButton, { id: "LogReviewer-type-error-only", text: "Action Error Only", onSelected: () => {
4319
4344
  const newActionErrorFilterState = Object.assign(Object.assign({}, pendingActionErrorFilterState), { type: dceCommonkit.LogType.Error });
4320
4345
  dispatch({
4321
- type: ActionType$6.UpdateActionErrorFilterState,
4346
+ type: ActionType$7.UpdateActionErrorFilterState,
4322
4347
  actionErrorFilterState: newActionErrorFilterState,
4323
4348
  });
4324
4349
  }, ariaLabel: "only show error logs", selected: pendingActionErrorFilterState.type === dceCommonkit.LogType.Error, noMarginOnRight: true, selectedVariant: Variant$1.Light, unselectedVariant: Variant$1.Light })),
@@ -4330,7 +4355,7 @@ const LogReviewer = (props) => {
4330
4355
  return (React__default["default"].createElement(CheckboxButton, { key: action, id: `LogReviewer-action-${action}-checkbox`, text: description, ariaLabel: `include logs with action type "${description}" in results`, noMarginOnRight: true, checked: pendingActionErrorFilterState.action[action], onChanged: (checked) => {
4331
4356
  const newActionErrorFilterState = Object.assign(Object.assign({}, pendingActionErrorFilterState), { action: Object.assign(Object.assign({}, pendingActionErrorFilterState.action), { [action]: checked }) });
4332
4357
  dispatch({
4333
- type: ActionType$6.UpdateActionErrorFilterState,
4358
+ type: ActionType$7.UpdateActionErrorFilterState,
4334
4359
  actionErrorFilterState: newActionErrorFilterState,
4335
4360
  });
4336
4361
  }, checkedVariant: Variant$1.Light, uncheckedVariant: Variant$1.Light }));
@@ -4341,7 +4366,7 @@ const LogReviewer = (props) => {
4341
4366
  return (React__default["default"].createElement(CheckboxButton, { key: target, id: `LogReviewer-target-${target}-checkbox`, text: description, ariaLabel: `include logs with target "${description}" in results`, checked: pendingActionErrorFilterState.target[target], noMarginOnRight: true, onChanged: (checked) => {
4342
4367
  const newActionErrorFilterState = Object.assign(Object.assign({}, pendingActionErrorFilterState), { target: Object.assign(Object.assign({}, pendingActionErrorFilterState.target), { [target]: checked }) });
4343
4368
  dispatch({
4344
- type: ActionType$6.UpdateActionErrorFilterState,
4369
+ type: ActionType$7.UpdateActionErrorFilterState,
4345
4370
  actionErrorFilterState: newActionErrorFilterState,
4346
4371
  });
4347
4372
  }, checkedVariant: Variant$1.Light, uncheckedVariant: Variant$1.Light }));
@@ -4353,7 +4378,7 @@ const LogReviewer = (props) => {
4353
4378
  React__default["default"].createElement("input", { type: "text", className: "form-control", "aria-label": "query for error message", value: pendingActionErrorFilterState.errorMessage, placeholder: "e.g. undefined is not a function", onChange: (e) => {
4354
4379
  const newActionErrorFilterState = Object.assign(Object.assign({}, pendingActionErrorFilterState), { errorMessage: e.target.value });
4355
4380
  dispatch({
4356
- type: ActionType$6.UpdateActionErrorFilterState,
4381
+ type: ActionType$7.UpdateActionErrorFilterState,
4357
4382
  actionErrorFilterState: newActionErrorFilterState,
4358
4383
  });
4359
4384
  } })),
@@ -4364,7 +4389,7 @@ const LogReviewer = (props) => {
4364
4389
  .trim()
4365
4390
  .toUpperCase()) });
4366
4391
  dispatch({
4367
- type: ActionType$6.UpdateActionErrorFilterState,
4392
+ type: ActionType$7.UpdateActionErrorFilterState,
4368
4393
  actionErrorFilterState: newActionErrorFilterState,
4369
4394
  });
4370
4395
  } }))))));
@@ -4378,7 +4403,7 @@ const LogReviewer = (props) => {
4378
4403
  React__default["default"].createElement("input", { type: "text", className: "form-control", "aria-label": "query for user first name", value: pendingAdvancedFilterState.userFirstName, placeholder: "e.g. Divardo", onChange: (e) => {
4379
4404
  const newAdvancedFilterState = Object.assign(Object.assign({}, pendingAdvancedFilterState), { userFirstName: e.target.value });
4380
4405
  dispatch({
4381
- type: ActionType$6.UpdateAdvancedFilterState,
4406
+ type: ActionType$7.UpdateAdvancedFilterState,
4382
4407
  advancedFilterState: newAdvancedFilterState,
4383
4408
  });
4384
4409
  } })),
@@ -4387,7 +4412,7 @@ const LogReviewer = (props) => {
4387
4412
  React__default["default"].createElement("input", { type: "text", className: "form-control", "aria-label": "query for user last name", value: pendingAdvancedFilterState.userLastName, placeholder: "e.g. Calicci", onChange: (e) => {
4388
4413
  const newAdvancedFilterState = Object.assign(Object.assign({}, pendingAdvancedFilterState), { userLastName: e.target.value });
4389
4414
  dispatch({
4390
- type: ActionType$6.UpdateAdvancedFilterState,
4415
+ type: ActionType$7.UpdateAdvancedFilterState,
4391
4416
  advancedFilterState: newAdvancedFilterState,
4392
4417
  });
4393
4418
  } })),
@@ -4397,7 +4422,7 @@ const LogReviewer = (props) => {
4397
4422
  const newAdvancedFilterState = Object.assign(Object.assign({}, pendingAdvancedFilterState), { userEmail: ((e.target.value)
4398
4423
  .trim()) });
4399
4424
  dispatch({
4400
- type: ActionType$6.UpdateAdvancedFilterState,
4425
+ type: ActionType$7.UpdateAdvancedFilterState,
4401
4426
  advancedFilterState: newAdvancedFilterState,
4402
4427
  });
4403
4428
  } })),
@@ -4410,7 +4435,7 @@ const LogReviewer = (props) => {
4410
4435
  const newAdvancedFilterState = Object.assign(Object.assign({}, pendingAdvancedFilterState), { userId: ((e.target.value)
4411
4436
  .trim()) });
4412
4437
  dispatch({
4413
- type: ActionType$6.UpdateAdvancedFilterState,
4438
+ type: ActionType$7.UpdateAdvancedFilterState,
4414
4439
  advancedFilterState: newAdvancedFilterState,
4415
4440
  });
4416
4441
  }
@@ -4419,21 +4444,21 @@ const LogReviewer = (props) => {
4419
4444
  React__default["default"].createElement(CheckboxButton, { text: "Students", onChanged: (checked) => {
4420
4445
  const newAdvancedFilterState = Object.assign(Object.assign({}, pendingAdvancedFilterState), { includeLearners: checked });
4421
4446
  dispatch({
4422
- type: ActionType$6.UpdateAdvancedFilterState,
4447
+ type: ActionType$7.UpdateAdvancedFilterState,
4423
4448
  advancedFilterState: newAdvancedFilterState,
4424
4449
  });
4425
4450
  }, checked: pendingAdvancedFilterState.includeLearners, ariaLabel: "show logs from students", checkedVariant: Variant$1.Light, uncheckedVariant: Variant$1.Light }),
4426
4451
  React__default["default"].createElement(CheckboxButton, { text: "Teaching Team Members", onChanged: (checked) => {
4427
4452
  const newAdvancedFilterState = Object.assign(Object.assign({}, pendingAdvancedFilterState), { includeTTMs: checked });
4428
4453
  dispatch({
4429
- type: ActionType$6.UpdateAdvancedFilterState,
4454
+ type: ActionType$7.UpdateAdvancedFilterState,
4430
4455
  advancedFilterState: newAdvancedFilterState,
4431
4456
  });
4432
4457
  }, checked: pendingAdvancedFilterState.includeTTMs, ariaLabel: "show logs from teaching team members", checkedVariant: Variant$1.Light, uncheckedVariant: Variant$1.Light }),
4433
4458
  React__default["default"].createElement(CheckboxButton, { text: "Admins", onChanged: (checked) => {
4434
4459
  const newAdvancedFilterState = Object.assign(Object.assign({}, pendingAdvancedFilterState), { includeAdmins: checked });
4435
4460
  dispatch({
4436
- type: ActionType$6.UpdateAdvancedFilterState,
4461
+ type: ActionType$7.UpdateAdvancedFilterState,
4437
4462
  advancedFilterState: newAdvancedFilterState,
4438
4463
  });
4439
4464
  }, checked: pendingAdvancedFilterState.includeAdmins, ariaLabel: "show logs from admins", checkedVariant: Variant$1.Light, uncheckedVariant: Variant$1.Light }))),
@@ -4443,7 +4468,7 @@ const LogReviewer = (props) => {
4443
4468
  React__default["default"].createElement("input", { type: "text", className: "form-control", "aria-label": "query for course name", value: pendingAdvancedFilterState.courseName, placeholder: "e.g. GLC 200", onChange: (e) => {
4444
4469
  const newAdvancedFilterState = Object.assign(Object.assign({}, pendingAdvancedFilterState), { courseName: e.target.value });
4445
4470
  dispatch({
4446
- type: ActionType$6.UpdateAdvancedFilterState,
4471
+ type: ActionType$7.UpdateAdvancedFilterState,
4447
4472
  advancedFilterState: newAdvancedFilterState,
4448
4473
  });
4449
4474
  } })),
@@ -4456,7 +4481,7 @@ const LogReviewer = (props) => {
4456
4481
  const newAdvancedFilterState = Object.assign(Object.assign({}, pendingAdvancedFilterState), { courseId: ((e.target.value)
4457
4482
  .trim()) });
4458
4483
  dispatch({
4459
- type: ActionType$6.UpdateAdvancedFilterState,
4484
+ type: ActionType$7.UpdateAdvancedFilterState,
4460
4485
  advancedFilterState: newAdvancedFilterState,
4461
4486
  });
4462
4487
  }
@@ -4466,21 +4491,21 @@ const LogReviewer = (props) => {
4466
4491
  React__default["default"].createElement(RadioButton, { text: "All Devices", ariaLabel: "show logs from all devices", selected: pendingAdvancedFilterState.isMobile === undefined, onSelected: () => {
4467
4492
  const newAdvancedFilterState = Object.assign(Object.assign({}, pendingAdvancedFilterState), { isMobile: undefined });
4468
4493
  dispatch({
4469
- type: ActionType$6.UpdateAdvancedFilterState,
4494
+ type: ActionType$7.UpdateAdvancedFilterState,
4470
4495
  advancedFilterState: newAdvancedFilterState,
4471
4496
  });
4472
4497
  }, selectedVariant: Variant$1.Light, unselectedVariant: Variant$1.Light }),
4473
4498
  React__default["default"].createElement(RadioButton, { text: "Mobile Only", ariaLabel: "show logs from mobile devices", selected: pendingAdvancedFilterState.isMobile === true, onSelected: () => {
4474
4499
  const newAdvancedFilterState = Object.assign(Object.assign({}, pendingAdvancedFilterState), { isMobile: true });
4475
4500
  dispatch({
4476
- type: ActionType$6.UpdateAdvancedFilterState,
4501
+ type: ActionType$7.UpdateAdvancedFilterState,
4477
4502
  advancedFilterState: newAdvancedFilterState,
4478
4503
  });
4479
4504
  }, selectedVariant: Variant$1.Light, unselectedVariant: Variant$1.Light }),
4480
4505
  React__default["default"].createElement(RadioButton, { text: "Desktop Only", ariaLabel: "show logs from desktop devices", selected: pendingAdvancedFilterState.isMobile === false, onSelected: () => {
4481
4506
  const newAdvancedFilterState = Object.assign(Object.assign({}, pendingAdvancedFilterState), { isMobile: false });
4482
4507
  dispatch({
4483
- type: ActionType$6.UpdateAdvancedFilterState,
4508
+ type: ActionType$7.UpdateAdvancedFilterState,
4484
4509
  advancedFilterState: newAdvancedFilterState,
4485
4510
  });
4486
4511
  }, noMarginOnRight: true, selectedVariant: Variant$1.Light, unselectedVariant: Variant$1.Light }))),
@@ -4489,21 +4514,21 @@ const LogReviewer = (props) => {
4489
4514
  React__default["default"].createElement(RadioButton, { text: "Both", ariaLabel: "show logs from all sources", selected: pendingAdvancedFilterState.source === undefined, onSelected: () => {
4490
4515
  const newAdvancedFilterState = Object.assign(Object.assign({}, pendingAdvancedFilterState), { source: undefined });
4491
4516
  dispatch({
4492
- type: ActionType$6.UpdateAdvancedFilterState,
4517
+ type: ActionType$7.UpdateAdvancedFilterState,
4493
4518
  advancedFilterState: newAdvancedFilterState,
4494
4519
  });
4495
4520
  }, selectedVariant: Variant$1.Light, unselectedVariant: Variant$1.Light }),
4496
4521
  React__default["default"].createElement(RadioButton, { text: "Client Only", ariaLabel: "show logs from client source", selected: pendingAdvancedFilterState.source === dceCommonkit.LogSource.Client, onSelected: () => {
4497
4522
  const newAdvancedFilterState = Object.assign(Object.assign({}, pendingAdvancedFilterState), { source: dceCommonkit.LogSource.Client });
4498
4523
  dispatch({
4499
- type: ActionType$6.UpdateAdvancedFilterState,
4524
+ type: ActionType$7.UpdateAdvancedFilterState,
4500
4525
  advancedFilterState: newAdvancedFilterState,
4501
4526
  });
4502
4527
  }, selectedVariant: Variant$1.Light, unselectedVariant: Variant$1.Light }),
4503
4528
  React__default["default"].createElement(RadioButton, { text: "Server Only", ariaLabel: "show logs from server source", selected: pendingAdvancedFilterState.source === dceCommonkit.LogSource.Server, onSelected: () => {
4504
4529
  const newAdvancedFilterState = Object.assign(Object.assign({}, pendingAdvancedFilterState), { source: dceCommonkit.LogSource.Server });
4505
4530
  dispatch({
4506
- type: ActionType$6.UpdateAdvancedFilterState,
4531
+ type: ActionType$7.UpdateAdvancedFilterState,
4507
4532
  advancedFilterState: newAdvancedFilterState,
4508
4533
  });
4509
4534
  }, noMarginOnRight: true, selectedVariant: Variant$1.Light, unselectedVariant: Variant$1.Light })),
@@ -4514,7 +4539,7 @@ const LogReviewer = (props) => {
4514
4539
  const newAdvancedFilterState = Object.assign(Object.assign({}, pendingAdvancedFilterState), { routePath: ((e.target.value)
4515
4540
  .trim()) });
4516
4541
  dispatch({
4517
- type: ActionType$6.UpdateAdvancedFilterState,
4542
+ type: ActionType$7.UpdateAdvancedFilterState,
4518
4543
  advancedFilterState: newAdvancedFilterState,
4519
4544
  });
4520
4545
  } })),
@@ -4524,7 +4549,7 @@ const LogReviewer = (props) => {
4524
4549
  const newAdvancedFilterState = Object.assign(Object.assign({}, pendingAdvancedFilterState), { routeTemplate: ((e.target.value)
4525
4550
  .trim()) });
4526
4551
  dispatch({
4527
- type: ActionType$6.UpdateAdvancedFilterState,
4552
+ type: ActionType$7.UpdateAdvancedFilterState,
4528
4553
  advancedFilterState: newAdvancedFilterState,
4529
4554
  });
4530
4555
  } })))))));
@@ -12621,11 +12646,11 @@ var CreatableSelect$1 = CreatableSelect;
12621
12646
  */
12622
12647
  /* ------------- Actions ------------ */
12623
12648
  // Types of actions
12624
- var ActionType$5;
12649
+ var ActionType$6;
12625
12650
  (function (ActionType) {
12626
12651
  // Update the input value
12627
12652
  ActionType["SetInputValue"] = "SetInputValue";
12628
- })(ActionType$5 || (ActionType$5 = {}));
12653
+ })(ActionType$6 || (ActionType$6 = {}));
12629
12654
  /**
12630
12655
  * Reducer that executes actions
12631
12656
  * @author Yuen Ler Chow
@@ -12633,9 +12658,9 @@ var ActionType$5;
12633
12658
  * @param action action to execute
12634
12659
  * @returns updated state
12635
12660
  */
12636
- const reducer$6 = (state, action) => {
12661
+ const reducer$7 = (state, action) => {
12637
12662
  switch (action.type) {
12638
- case ActionType$5.SetInputValue: {
12663
+ case ActionType$6.SetInputValue: {
12639
12664
  return Object.assign(Object.assign({}, state), { inputValue: action.value });
12640
12665
  }
12641
12666
  default: {
@@ -12655,7 +12680,7 @@ const CreatableMultiselect = (props) => {
12655
12680
  inputValue: '',
12656
12681
  };
12657
12682
  // Initialize state
12658
- const [state, dispatch] = React.useReducer(reducer$6, initialState);
12683
+ const [state, dispatch] = React.useReducer(reducer$7, initialState);
12659
12684
  // Destructure common state
12660
12685
  const { inputValue } = state;
12661
12686
  /*------------------------------------------------------------------------*/
@@ -12732,7 +12757,7 @@ const CreatableMultiselect = (props) => {
12732
12757
  }
12733
12758
  // Reset text field to empty because the values have been added
12734
12759
  dispatch({
12735
- type: ActionType$5.SetInputValue,
12760
+ type: ActionType$6.SetInputValue,
12736
12761
  value: '',
12737
12762
  });
12738
12763
  };
@@ -12771,7 +12796,7 @@ const CreatableMultiselect = (props) => {
12771
12796
  else {
12772
12797
  // simply update the input value to the new input value
12773
12798
  dispatch({
12774
- type: ActionType$5.SetInputValue,
12799
+ type: ActionType$6.SetInputValue,
12775
12800
  value: newValue,
12776
12801
  });
12777
12802
  }
@@ -12823,13 +12848,13 @@ const style$2 = `
12823
12848
  `;
12824
12849
  /* ------------- Actions ------------ */
12825
12850
  // Types of actions
12826
- var ActionType$4;
12851
+ var ActionType$5;
12827
12852
  (function (ActionType) {
12828
12853
  // Update the DBEntry
12829
12854
  ActionType["UpdateDBEntry"] = "UpdateDBEntry";
12830
12855
  // Start the save spinner
12831
12856
  ActionType["StartSave"] = "StartSave";
12832
- })(ActionType$4 || (ActionType$4 = {}));
12857
+ })(ActionType$5 || (ActionType$5 = {}));
12833
12858
  /**
12834
12859
  * Reducer that executes actions
12835
12860
  * @author Yuen Ler Chow
@@ -12837,12 +12862,12 @@ var ActionType$4;
12837
12862
  * @param action action to execute
12838
12863
  * @returns updated state
12839
12864
  */
12840
- const reducer$5 = (state, action) => {
12865
+ const reducer$6 = (state, action) => {
12841
12866
  switch (action.type) {
12842
- case ActionType$4.UpdateDBEntry: {
12867
+ case ActionType$5.UpdateDBEntry: {
12843
12868
  return Object.assign(Object.assign({}, state), { entry: action.dbEntry });
12844
12869
  }
12845
- case ActionType$4.StartSave: {
12870
+ case ActionType$5.StartSave: {
12846
12871
  return Object.assign(Object.assign({}, state), { saving: true });
12847
12872
  }
12848
12873
  default: {
@@ -12867,7 +12892,7 @@ const AddOrEditDBEntry = (props) => {
12867
12892
  saving: false,
12868
12893
  };
12869
12894
  // Initialize state
12870
- const [state, dispatch] = React.useReducer(reducer$5, initialState);
12895
+ const [state, dispatch] = React.useReducer(reducer$6, initialState);
12871
12896
  // Destructure common state
12872
12897
  const { entry, saving, } = state;
12873
12898
  /*------------------------------------------------------------------------*/
@@ -12879,7 +12904,7 @@ const AddOrEditDBEntry = (props) => {
12879
12904
  */
12880
12905
  const save = () => __awaiter(void 0, void 0, void 0, function* () {
12881
12906
  // Start the save loading indicator
12882
- dispatch({ type: ActionType$4.StartSave });
12907
+ dispatch({ type: ActionType$5.StartSave });
12883
12908
  // add all default values to the entry
12884
12909
  entryFields.forEach((field) => {
12885
12910
  if (field.defaultValue && !entry[field.objectKey]) {
@@ -13062,7 +13087,7 @@ const AddOrEditDBEntry = (props) => {
13062
13087
  return (React__default["default"].createElement(RadioButton, { key: choice.value, text: choice.title, selected: entry[field.objectKey] === choice.value, onSelected: () => {
13063
13088
  entry[field.objectKey] = choice.value;
13064
13089
  dispatch({
13065
- type: ActionType$4.UpdateDBEntry,
13090
+ type: ActionType$5.UpdateDBEntry,
13066
13091
  dbEntry: entry,
13067
13092
  });
13068
13093
  }, ariaLabel: choice.title }));
@@ -13074,7 +13099,7 @@ const AddOrEditDBEntry = (props) => {
13074
13099
  React__default["default"].createElement("input", { disabled: disabled, type: "text", className: "form-control", placeholder: field.placeholder, "aria-describedby": "AddOrEditDBEntry-form-name-label", value: entry[field.objectKey] || '', onChange: (e) => {
13075
13100
  entry[field.objectKey] = (e.target.value);
13076
13101
  dispatch({
13077
- type: ActionType$4.UpdateDBEntry,
13102
+ type: ActionType$5.UpdateDBEntry,
13078
13103
  dbEntry: entry,
13079
13104
  });
13080
13105
  } }))));
@@ -13087,7 +13112,7 @@ const AddOrEditDBEntry = (props) => {
13087
13112
  entry[field.objectKey] = (e.target.value
13088
13113
  .replace(/[^0-9]/g, ''));
13089
13114
  dispatch({
13090
- type: ActionType$4.UpdateDBEntry,
13115
+ type: ActionType$5.UpdateDBEntry,
13091
13116
  dbEntry: entry,
13092
13117
  });
13093
13118
  } }))));
@@ -13117,7 +13142,7 @@ const AddOrEditDBEntry = (props) => {
13117
13142
  }
13118
13143
  // Save
13119
13144
  dispatch({
13120
- type: ActionType$4.UpdateDBEntry,
13145
+ type: ActionType$5.UpdateDBEntry,
13121
13146
  dbEntry: entry,
13122
13147
  });
13123
13148
  }, ariaLabel: choice.title }));
@@ -13132,7 +13157,7 @@ const AddOrEditDBEntry = (props) => {
13132
13157
  // Update entry and save
13133
13158
  entry[field.objectKey] = values;
13134
13159
  dispatch({
13135
- type: ActionType$4.UpdateDBEntry,
13160
+ type: ActionType$5.UpdateDBEntry,
13136
13161
  dbEntry: entry,
13137
13162
  });
13138
13163
  } })))));
@@ -13145,7 +13170,7 @@ const AddOrEditDBEntry = (props) => {
13145
13170
  React__default["default"].createElement(CreatableMultiselect, { disabled: disabled, type: DBEntryFieldType$1.NumberArray, values: entry[field.objectKey] || [], onChange: (values) => {
13146
13171
  entry[field.objectKey] = values;
13147
13172
  dispatch({
13148
- type: ActionType$4.UpdateDBEntry,
13173
+ type: ActionType$5.UpdateDBEntry,
13149
13174
  dbEntry: entry,
13150
13175
  });
13151
13176
  } })))));
@@ -13219,7 +13244,7 @@ const generateEndpointPath = (collectionName, adminsOnly = true) => {
13219
13244
  */
13220
13245
  /* ------------- Actions ------------ */
13221
13246
  // Types of actions
13222
- var ActionType$3;
13247
+ var ActionType$4;
13223
13248
  (function (ActionType) {
13224
13249
  // Show adder
13225
13250
  ActionType["ShowAdder"] = "ShowAdder";
@@ -13233,7 +13258,7 @@ var ActionType$3;
13233
13258
  ActionType["StartDelete"] = "StartDelete";
13234
13259
  // Finish deletion process
13235
13260
  ActionType["FinishDelete"] = "FinishDelete";
13236
- })(ActionType$3 || (ActionType$3 = {}));
13261
+ })(ActionType$4 || (ActionType$4 = {}));
13237
13262
  /**
13238
13263
  * Reducer that executes actions
13239
13264
  * @author Yuen Ler Chow
@@ -13241,18 +13266,18 @@ var ActionType$3;
13241
13266
  * @param action action to execute
13242
13267
  * @returns updated state
13243
13268
  */
13244
- const reducer$4 = (state, action) => {
13269
+ const reducer$5 = (state, action) => {
13245
13270
  switch (action.type) {
13246
- case ActionType$3.FinishLoading: {
13271
+ case ActionType$4.FinishLoading: {
13247
13272
  return Object.assign(Object.assign({}, state), { loading: false, dbEntries: action.dbEntries });
13248
13273
  }
13249
- case ActionType$3.ShowAdder: {
13274
+ case ActionType$4.ShowAdder: {
13250
13275
  return Object.assign(Object.assign({}, state), { adding: true, dbEntryToEdit: undefined });
13251
13276
  }
13252
- case ActionType$3.ShowEditor: {
13277
+ case ActionType$4.ShowEditor: {
13253
13278
  return Object.assign(Object.assign({}, state), { adding: false, dbEntryToEdit: action.dbEntry });
13254
13279
  }
13255
- case ActionType$3.FinishAdd: {
13280
+ case ActionType$4.FinishAdd: {
13256
13281
  // Handle cancel
13257
13282
  const finishedEntry = action.dbEntry;
13258
13283
  if (!finishedEntry) {
@@ -13276,10 +13301,10 @@ const reducer$4 = (state, action) => {
13276
13301
  // Update the state
13277
13302
  return Object.assign(Object.assign({}, state), { adding: false, dbEntryToEdit: undefined, dbEntries: updatedDbEntries });
13278
13303
  }
13279
- case ActionType$3.StartDelete: {
13304
+ case ActionType$4.StartDelete: {
13280
13305
  return Object.assign(Object.assign({}, state), { loading: true });
13281
13306
  }
13282
- case ActionType$3.FinishDelete: {
13307
+ case ActionType$4.FinishDelete: {
13283
13308
  return Object.assign(Object.assign({}, state), { loading: false,
13284
13309
  // Remove the deleted entry from the list
13285
13310
  dbEntries: state.dbEntries.filter((entry) => {
@@ -13305,7 +13330,7 @@ const DBEntryManagerPanel = (props) => {
13305
13330
  loading: true,
13306
13331
  };
13307
13332
  // Initialize state
13308
- const [state, dispatch] = React.useReducer(reducer$4, initialState);
13333
+ const [state, dispatch] = React.useReducer(reducer$5, initialState);
13309
13334
  // Destructure common state
13310
13335
  const { adding, dbEntryToEdit, dbEntries, loading, } = state;
13311
13336
  /*------------------------------------------------------------------------*/
@@ -13331,7 +13356,7 @@ const DBEntryManagerPanel = (props) => {
13331
13356
  try {
13332
13357
  // Start loader
13333
13358
  dispatch({
13334
- type: ActionType$3.StartDelete,
13359
+ type: ActionType$4.StartDelete,
13335
13360
  });
13336
13361
  // Perform deletion
13337
13362
  yield visitServerEndpoint({
@@ -13340,7 +13365,7 @@ const DBEntryManagerPanel = (props) => {
13340
13365
  });
13341
13366
  // Finish loader
13342
13367
  dispatch({
13343
- type: ActionType$3.FinishDelete,
13368
+ type: ActionType$4.FinishDelete,
13344
13369
  dbEntry: entry,
13345
13370
  idPropName,
13346
13371
  });
@@ -13369,7 +13394,7 @@ const DBEntryManagerPanel = (props) => {
13369
13394
  });
13370
13395
  // Save loaded data
13371
13396
  dispatch({
13372
- type: ActionType$3.FinishLoading,
13397
+ type: ActionType$4.FinishLoading,
13373
13398
  dbEntries: data,
13374
13399
  });
13375
13400
  }
@@ -13412,7 +13437,7 @@ const DBEntryManagerPanel = (props) => {
13412
13437
  React__default["default"].createElement("span", { className: "d-none d-md-inline ms-1" }, "Remove")),
13413
13438
  !disableEdit && (React__default["default"].createElement("button", { type: "button", id: `DBEntryManagerPanel-edit-with-id-${entry[idPropName]}`, className: "btn btn-primary", "aria-label": `edit db entry: ${entry[titlePropName]}`, onClick: () => {
13414
13439
  dispatch({
13415
- type: ActionType$3.ShowEditor,
13440
+ type: ActionType$4.ShowEditor,
13416
13441
  dbEntry: entry,
13417
13442
  });
13418
13443
  } },
@@ -13422,7 +13447,7 @@ const DBEntryManagerPanel = (props) => {
13422
13447
  React__default["default"].createElement("div", { className: "d-grid" },
13423
13448
  React__default["default"].createElement("button", { type: "button", id: "DBEntryManagerPanel-add-entry", className: "btn btn-lg btn-primary", "aria-label": `add a new ${itemName} entry to the list of entries`, onClick: () => {
13424
13449
  dispatch({
13425
- type: ActionType$3.ShowAdder,
13450
+ type: ActionType$4.ShowAdder,
13426
13451
  });
13427
13452
  } },
13428
13453
  React__default["default"].createElement(reactFontawesome.FontAwesomeIcon, { icon: freeSolidSvgIcons.faPlus, className: "me-2" }),
@@ -13434,7 +13459,7 @@ const DBEntryManagerPanel = (props) => {
13434
13459
  if (!loading && (adding || dbEntryToEdit)) {
13435
13460
  body = (React__default["default"].createElement(AddOrEditDBEntry, { saveEndpointPath: endpoint, validateEntry: validateEntry, modifyEntry: modifyEntry, entryFields: entryFields, dbEntryToEdit: dbEntryToEdit, idPropName: idPropName, entries: dbEntries, itemName: itemName, onFinished: (entry) => {
13436
13461
  dispatch({
13437
- type: ActionType$3.FinishAdd,
13462
+ type: ActionType$4.FinishAdd,
13438
13463
  dbEntry: entry,
13439
13464
  idPropName,
13440
13465
  });
@@ -13610,25 +13635,25 @@ const getItemIds = (items) => {
13610
13635
  };
13611
13636
  /* ------------- Actions ------------ */
13612
13637
  // Types of actions
13613
- var ActionType$2;
13638
+ var ActionType$3;
13614
13639
  (function (ActionType) {
13615
13640
  // Hide the "jump to bottom" button
13616
13641
  ActionType["HideJumpToBottomButton"] = "HideJumpToBottomButton";
13617
13642
  // Show the "jump to bottom" button
13618
13643
  ActionType["ShowJumpToBottomButton"] = "ShowJumpToBottomButton";
13619
- })(ActionType$2 || (ActionType$2 = {}));
13644
+ })(ActionType$3 || (ActionType$3 = {}));
13620
13645
  /**
13621
13646
  * Reducer that executes actions
13622
13647
  * @author Gabe Abrams
13623
13648
  * @param state current state
13624
13649
  * @param action action to execute
13625
13650
  */
13626
- const reducer$3 = (state, action) => {
13651
+ const reducer$4 = (state, action) => {
13627
13652
  switch (action.type) {
13628
- case ActionType$2.HideJumpToBottomButton: {
13653
+ case ActionType$3.HideJumpToBottomButton: {
13629
13654
  return Object.assign(Object.assign({}, state), { jumpToBottomButtonVisible: false });
13630
13655
  }
13631
- case ActionType$2.ShowJumpToBottomButton: {
13656
+ case ActionType$3.ShowJumpToBottomButton: {
13632
13657
  return Object.assign(Object.assign({}, state), { jumpToBottomButtonVisible: true });
13633
13658
  }
13634
13659
  default: {
@@ -13652,7 +13677,7 @@ const AutoscrollToBottomContainer = (props) => {
13652
13677
  jumpToBottomButtonVisible: false,
13653
13678
  };
13654
13679
  // Initialize state
13655
- const [state, dispatch] = React.useReducer(reducer$3, initialState);
13680
+ const [state, dispatch] = React.useReducer(reducer$4, initialState);
13656
13681
  // Destructure common state
13657
13682
  const { jumpToBottomButtonVisible, } = state;
13658
13683
  /* -------------- Refs -------------- */
@@ -13698,7 +13723,7 @@ const AutoscrollToBottomContainer = (props) => {
13698
13723
  }
13699
13724
  // Update state
13700
13725
  dispatch({
13701
- type: ActionType$2.HideJumpToBottomButton,
13726
+ type: ActionType$3.HideJumpToBottomButton,
13702
13727
  });
13703
13728
  // Scroll to bottom
13704
13729
  container.current.scrollTop = (container.current.scrollHeight
@@ -13722,7 +13747,7 @@ const AutoscrollToBottomContainer = (props) => {
13722
13747
  if (isScrolledToBottom()) {
13723
13748
  // Hide button
13724
13749
  dispatch({
13725
- type: ActionType$2.HideJumpToBottomButton,
13750
+ type: ActionType$3.HideJumpToBottomButton,
13726
13751
  });
13727
13752
  }
13728
13753
  };
@@ -13764,7 +13789,7 @@ const AutoscrollToBottomContainer = (props) => {
13764
13789
  else {
13765
13790
  // Not scrolled to bottom. Show "jump to bottom" button.
13766
13791
  dispatch({
13767
- type: ActionType$2.ShowJumpToBottomButton,
13792
+ type: ActionType$3.ShowJumpToBottomButton,
13768
13793
  });
13769
13794
  }
13770
13795
  }, [items]);
@@ -13834,25 +13859,25 @@ const combineClassNames = (classNames) => {
13834
13859
  */
13835
13860
  /* ------------- Actions ------------ */
13836
13861
  // Types of actions
13837
- var ActionType$1;
13862
+ var ActionType$2;
13838
13863
  (function (ActionType) {
13839
13864
  // Start hovering on an option
13840
13865
  ActionType["StartHover"] = "StartHover";
13841
13866
  // Stop hovering on an option
13842
13867
  ActionType["StopHover"] = "StopHover";
13843
- })(ActionType$1 || (ActionType$1 = {}));
13868
+ })(ActionType$2 || (ActionType$2 = {}));
13844
13869
  /**
13845
13870
  * Reducer that executes actions
13846
13871
  * @author Gabe Abrams
13847
13872
  * @param state current state
13848
13873
  * @param action action to execute
13849
13874
  */
13850
- const reducer$2 = (state, action) => {
13875
+ const reducer$3 = (state, action) => {
13851
13876
  switch (action.type) {
13852
- case ActionType$1.StartHover: {
13877
+ case ActionType$2.StartHover: {
13853
13878
  return Object.assign(Object.assign({}, state), { hoveredOptionId: action.hoveredOptionId });
13854
13879
  }
13855
- case ActionType$1.StopHover: {
13880
+ case ActionType$2.StopHover: {
13856
13881
  return Object.assign(Object.assign({}, state), { hoveredOptionId: undefined });
13857
13882
  }
13858
13883
  default: {
@@ -13876,7 +13901,7 @@ const MultiSwitch = (props) => {
13876
13901
  hoveredOptionId: undefined,
13877
13902
  };
13878
13903
  // Initialize state
13879
- const [state, dispatch] = React.useReducer(reducer$2, initialState);
13904
+ const [state, dispatch] = React.useReducer(reducer$3, initialState);
13880
13905
  // Destructure common state
13881
13906
  const { hoveredOptionId, } = state;
13882
13907
  /*------------------------------------------------------------------------*/
@@ -14008,27 +14033,27 @@ const MultiSwitch = (props) => {
14008
14033
  : `click to select option "${option.label}"`), onClick: () => {
14009
14034
  // Remove hover
14010
14035
  dispatch({
14011
- type: ActionType$1.StopHover,
14036
+ type: ActionType$2.StopHover,
14012
14037
  });
14013
14038
  // Notify parent
14014
14039
  onChange(option.id);
14015
14040
  }, onMouseEnter: () => {
14016
14041
  dispatch({
14017
- type: ActionType$1.StartHover,
14042
+ type: ActionType$2.StartHover,
14018
14043
  hoveredOptionId: option.id,
14019
14044
  });
14020
14045
  }, onMouseLeave: () => {
14021
14046
  dispatch({
14022
- type: ActionType$1.StopHover,
14047
+ type: ActionType$2.StopHover,
14023
14048
  });
14024
14049
  }, onFocus: () => {
14025
14050
  dispatch({
14026
- type: ActionType$1.StartHover,
14051
+ type: ActionType$2.StartHover,
14027
14052
  hoveredOptionId: option.id,
14028
14053
  });
14029
14054
  }, onBlur: () => {
14030
14055
  dispatch({
14031
- type: ActionType$1.StopHover,
14056
+ type: ActionType$2.StopHover,
14032
14057
  });
14033
14058
  }, style: {
14034
14059
  pointerEvents: ((option.id === selectedOptionId)
@@ -14067,13 +14092,13 @@ var DropdownItemType$1 = DropdownItemType;
14067
14092
  */
14068
14093
  /* ------------- Actions ------------ */
14069
14094
  // Types of actions
14070
- var ActionType;
14095
+ var ActionType$1;
14071
14096
  (function (ActionType) {
14072
14097
  // Toggle opening the dropdown menu
14073
14098
  ActionType["ToggleDropdown"] = "ToggleDropdown";
14074
14099
  // Close the dropdown menu
14075
14100
  ActionType["CloseDropdown"] = "CloseDropdown";
14076
- })(ActionType || (ActionType = {}));
14101
+ })(ActionType$1 || (ActionType$1 = {}));
14077
14102
  /**
14078
14103
  * Reducer that executes actions
14079
14104
  * @author Alessandra De Lucas
@@ -14081,12 +14106,12 @@ var ActionType;
14081
14106
  * @param state current state
14082
14107
  * @param action action to execute
14083
14108
  */
14084
- const reducer$1 = (state, action) => {
14109
+ const reducer$2 = (state, action) => {
14085
14110
  switch (action.type) {
14086
- case ActionType.ToggleDropdown: {
14111
+ case ActionType$1.ToggleDropdown: {
14087
14112
  return Object.assign(Object.assign({}, state), { isDropdownOpen: !state.isDropdownOpen });
14088
14113
  }
14089
- case ActionType.CloseDropdown: {
14114
+ case ActionType$1.CloseDropdown: {
14090
14115
  return Object.assign(Object.assign({}, state), { isDropdownOpen: false });
14091
14116
  }
14092
14117
  default: {
@@ -14110,7 +14135,7 @@ const Dropdown = (props) => {
14110
14135
  isDropdownOpen: false,
14111
14136
  };
14112
14137
  // Initialize state
14113
- const [state, dispatch] = React.useReducer(reducer$1, initialState);
14138
+ const [state, dispatch] = React.useReducer(reducer$2, initialState);
14114
14139
  // Destructure common state
14115
14140
  const { isDropdownOpen, } = state;
14116
14141
  /* -------------- Refs -------------- */
@@ -14130,7 +14155,7 @@ const Dropdown = (props) => {
14130
14155
  dropdownRef.current
14131
14156
  // Click occurred outside the dropdown
14132
14157
  && !dropdownRef.current.contains(event.target)) {
14133
- dispatch({ type: ActionType.CloseDropdown });
14158
+ dispatch({ type: ActionType$1.CloseDropdown });
14134
14159
  }
14135
14160
  };
14136
14161
  /*------------------------------------------------------------------------*/
@@ -14159,7 +14184,7 @@ const Dropdown = (props) => {
14159
14184
  dropdownButton.variant === Variant$1.Light && 'text-dark',
14160
14185
  ]), type: "button", id: dropdownButton.id, "aria-expanded": isDropdownOpen, "aria-label": dropdownButton.ariaLabel, onClick: () => {
14161
14186
  dispatch({
14162
- type: ActionType.ToggleDropdown,
14187
+ type: ActionType$1.ToggleDropdown,
14163
14188
  });
14164
14189
  } }, dropdownButton.content),
14165
14190
  React__default["default"].createElement("ul", { className: combineClassNames([
@@ -14181,7 +14206,7 @@ const Dropdown = (props) => {
14181
14206
  React__default["default"].createElement("button", { type: "button", "aria-label": item.ariaLabel, className: "dropdown-item", onClick: (e) => {
14182
14207
  e.preventDefault();
14183
14208
  dispatch({
14184
- type: ActionType.CloseDropdown,
14209
+ type: ActionType$1.CloseDropdown,
14185
14210
  });
14186
14211
  item.onClick();
14187
14212
  } }, item.content)));
@@ -14389,6 +14414,150 @@ const ProgressBar = (props) => {
14389
14414
  "\u00A0"))));
14390
14415
  };
14391
14416
 
14417
+ /**
14418
+ * Fake progress bar that approaches completion but never fully finishes.
14419
+ * Built on top of the existing ProgressBar component.
14420
+ *
14421
+ * Two phases:
14422
+ * 1. Fast phase (0–90%): random jumps of 1–5% at randomized intervals,
14423
+ * paced to reach ~90% in roughly estimatedTimeSec seconds.
14424
+ * 2. Slow phase (90–99%): crawls 1% at a time with longer random delays,
14425
+ * never reaching 100% on its own.
14426
+ *
14427
+ * When isFinished becomes true, the bar immediately jumps to 100%.
14428
+ * @author Yuen Ler Chow
14429
+ */
14430
+ /*------------------------------------------------------------------------*/
14431
+ /* ------------------------------ Constants ----------------------------- */
14432
+ /*------------------------------------------------------------------------*/
14433
+ // Percent where the bar switches from fast random jumps to a slow crawl
14434
+ const SLOW_PHASE_START_PERCENT = 90;
14435
+ // Highest percent the bar will reach on its own (before isFinished is true)
14436
+ const MAX_UNFINISHED_PERCENT = 99;
14437
+ // Average step size during the fast phase (uniform random from 1–5)
14438
+ const AVG_FAST_PHASE_STEP = 3;
14439
+ // Minimum delay (ms) between steps during the slow phase
14440
+ const SLOW_PHASE_MIN_DELAY_MS = 2000;
14441
+ // Maximum delay (ms) between steps during the slow phase
14442
+ const SLOW_PHASE_MAX_DELAY_MS = 5000;
14443
+ /* ------------- Actions ------------ */
14444
+ // Types of actions
14445
+ var ActionType;
14446
+ (function (ActionType) {
14447
+ // Advance the progress by a given step
14448
+ ActionType["Advance"] = "Advance";
14449
+ // Set progress to 100% (task complete)
14450
+ ActionType["Complete"] = "Complete";
14451
+ })(ActionType || (ActionType = {}));
14452
+ /**
14453
+ * Reducer that executes actions
14454
+ * @author Yuen Ler Chow
14455
+ * @param state current state
14456
+ * @param action action to execute
14457
+ */
14458
+ const reducer$1 = (state, action) => {
14459
+ switch (action.type) {
14460
+ case ActionType.Advance: {
14461
+ return Object.assign(Object.assign({}, state), { progress: Math.min(100, state.progress + action.step) });
14462
+ }
14463
+ case ActionType.Complete: {
14464
+ return Object.assign(Object.assign({}, state), { progress: 100 });
14465
+ }
14466
+ default: {
14467
+ return state;
14468
+ }
14469
+ }
14470
+ };
14471
+ /*------------------------------------------------------------------------*/
14472
+ /* ------------------------------ Component ----------------------------- */
14473
+ /*------------------------------------------------------------------------*/
14474
+ const FakeProgressBar = (props) => {
14475
+ /*------------------------------------------------------------------------*/
14476
+ /* -------------------------------- Setup ------------------------------- */
14477
+ /*------------------------------------------------------------------------*/
14478
+ /* -------------- Props ------------- */
14479
+ // Destructure props
14480
+ const { isFinished, estimatedTimeSec = 8, striped, variant, bgVariant, showOutline, size, } = props;
14481
+ /* -------------- State ------------- */
14482
+ // Initial state
14483
+ const initialState = {
14484
+ progress: 0,
14485
+ };
14486
+ // Initialize state
14487
+ const [state, dispatch] = React.useReducer(reducer$1, initialState);
14488
+ // Destructure common state
14489
+ const { progress, } = state;
14490
+ // Convert estimate to milliseconds
14491
+ const estimatedMs = estimatedTimeSec * 1000;
14492
+ // Average interval between updates to reach ~90% in the estimated time
14493
+ const avgIntervalMs = (estimatedMs / SLOW_PHASE_START_PERCENT) * AVG_FAST_PHASE_STEP;
14494
+ /*------------------------------------------------------------------------*/
14495
+ /* ------------------------- Lifecycle Functions ------------------------ */
14496
+ /*------------------------------------------------------------------------*/
14497
+ /**
14498
+ * Animate to 100% when isFinished becomes true
14499
+ * @author Yuen Ler Chow
14500
+ */
14501
+ React.useEffect(() => {
14502
+ if (isFinished) {
14503
+ dispatch({
14504
+ type: ActionType.Complete,
14505
+ });
14506
+ }
14507
+ }, [isFinished]);
14508
+ /**
14509
+ * Advance the progress in two phases:
14510
+ * 1) Random jumps up to 90%
14511
+ * 2) Slow crawl from 90% to 99%
14512
+ * @author Yuen Ler Chow
14513
+ */
14514
+ React.useEffect(() => {
14515
+ // Stop if already finished or at max
14516
+ if (isFinished || progress >= MAX_UNFINISHED_PERCENT) {
14517
+ return;
14518
+ }
14519
+ // Determine which phase we are in
14520
+ const inFastPhase = progress < SLOW_PHASE_START_PERCENT;
14521
+ // Default values
14522
+ let delay = avgIntervalMs;
14523
+ let step = 1;
14524
+ if (inFastPhase) {
14525
+ // Randomize delay around the average interval for variability
14526
+ const randomnessMultiplier = 0.5 + (Math.random());
14527
+ delay = avgIntervalMs * randomnessMultiplier;
14528
+ // Randomly move forward by 1-5%, capped at 90%
14529
+ step = Math.min(1 + Math.floor(Math.random() * 5), SLOW_PHASE_START_PERCENT - progress);
14530
+ }
14531
+ else {
14532
+ // Crawl slowly 1% at a time, clamped so we don't exceed 99%
14533
+ delay = SLOW_PHASE_MIN_DELAY_MS + (Math.random() * (SLOW_PHASE_MAX_DELAY_MS - SLOW_PHASE_MIN_DELAY_MS));
14534
+ step = Math.min(1, MAX_UNFINISHED_PERCENT - progress);
14535
+ }
14536
+ // Track whether this effect invocation is still current
14537
+ let cancelled = false;
14538
+ // Wait then dispatch the next progress update
14539
+ (() => __awaiter(void 0, void 0, void 0, function* () {
14540
+ yield dceCommonkit.waitMs(delay);
14541
+ if (!cancelled) {
14542
+ dispatch({
14543
+ type: ActionType.Advance,
14544
+ step,
14545
+ });
14546
+ }
14547
+ }))();
14548
+ return () => {
14549
+ cancelled = true;
14550
+ };
14551
+ }, [progress, avgIntervalMs, isFinished]);
14552
+ /*------------------------------------------------------------------------*/
14553
+ /* ------------------------------- Render ------------------------------- */
14554
+ /*------------------------------------------------------------------------*/
14555
+ /*----------------------------------------*/
14556
+ /* --------------- Main UI -------------- */
14557
+ /*----------------------------------------*/
14558
+ return (React__default["default"].createElement(ProgressBar, { percentProgress: progress, striped: striped, variant: variant, bgVariant: bgVariant, showOutline: showOutline, size: size }));
14559
+ };
14560
+
14392
14561
  // True if user is on mobile or tablet
14393
14562
  let cachedResult;
14394
14563
  /**
@@ -14853,6 +15022,7 @@ exports.Dropdown = Dropdown;
14853
15022
  exports.DropdownItemType = DropdownItemType$1;
14854
15023
  exports.DynamicWord = DynamicWord;
14855
15024
  exports.ErrorBox = ErrorBox;
15025
+ exports.FakeProgressBar = FakeProgressBar;
14856
15026
  exports.IntelliTable = IntelliTable;
14857
15027
  exports.ItemPicker = ItemPicker;
14858
15028
  exports.LoadingSpinner = LoadingSpinner;
@@ -14869,6 +15039,7 @@ exports.ProgressBar = ProgressBar;
14869
15039
  exports.ProgressBarSize = ProgressBarSize$1;
14870
15040
  exports.RadioButton = RadioButton;
14871
15041
  exports.SimpleDateChooser = SimpleDateChooser;
15042
+ exports.SimpleMonthChooser = SimpleMonthChooser;
14872
15043
  exports.SimpleTimeChooser = SimpleTimeChooser;
14873
15044
  exports.TabBox = TabBox;
14874
15045
  exports.ToggleSwitch = ToggleSwitch;