dce-reactkit 3.6.27 → 3.7.1-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/esm/index.js CHANGED
@@ -1,8 +1,9 @@
1
1
  import * as React from 'react';
2
2
  import React__default, { useState, useRef, useEffect, useReducer, forwardRef, useContext, useLayoutEffect, createContext, useMemo, useCallback, Component, Fragment } from 'react';
3
- import { faExclamationTriangle, faHourglassEnd, faCircle, faDotCircle, faCheckSquare, faHourglass, faClipboard, faChevronDown, faChevronRight, faCloudDownloadAlt, faMinus, faCheckCircle, faXmarkCircle, faSort, faSortDown, faSortUp, faCalendar, faTag, faHammer, faList, faTimes, faSave, faTrash, faCog, faPlus, faCaretDown } from '@fortawesome/free-solid-svg-icons';
3
+ import { faExclamationTriangle, faHourglassEnd, faCircle, faDotCircle, faCheckSquare, faHourglass, faClipboard, faChevronDown, faChevronRight, faCloudDownloadAlt, faMinus, faCheckCircle, faXmarkCircle, faSort, faSortDown, faSortUp, faCalendar, faTag, faHammer, faList, faTimes, faSave, faTrash, faCog, faPlus } from '@fortawesome/free-solid-svg-icons';
4
4
  import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
5
5
  import { faCircle as faCircle$1, faSquareMinus, faSquare } from '@fortawesome/free-regular-svg-icons';
6
+ import { Tooltip as Tooltip$1 } from 'bootstrap';
6
7
 
7
8
  /******************************************************************************
8
9
  Copyright (c) Microsoft Corporation.
@@ -386,7 +387,7 @@ const getModalButtonTypeToLabelAndVariant = () => {
386
387
  /*------------------------------------------------------------------------*/
387
388
  /* -------------------------------- Style ------------------------------- */
388
389
  /*------------------------------------------------------------------------*/
389
- const style$b = `
390
+ const style$a = `
390
391
  .Modal-backdrop {
391
392
  position: fixed;
392
393
  top: 0;
@@ -555,7 +556,7 @@ const Modal = (props) => {
555
556
  left: 0,
556
557
  right: 0,
557
558
  } },
558
- React__default.createElement("style", null, style$b),
559
+ React__default.createElement("style", null, style$a),
559
560
  React__default.createElement("div", { className: `Modal-backdrop ${backdropAnimationClass}`, style: {
560
561
  zIndex: 5000000003,
561
562
  }, onClick: () => __awaiter(void 0, void 0, void 0, function* () {
@@ -1055,7 +1056,7 @@ const showSessionExpiredMessage = () => __awaiter(void 0, void 0, void 0, functi
1055
1056
  /*------------------------------------------------------------------------*/
1056
1057
  /* -------------------------------- Style ------------------------------- */
1057
1058
  /*------------------------------------------------------------------------*/
1058
- const style$a = `
1059
+ const style$9 = `
1059
1060
  .AppWrapper-leave-to-url-notice {
1060
1061
  opacity: 0;
1061
1062
 
@@ -1193,7 +1194,7 @@ const AppWrapper = (props) => {
1193
1194
  /* --------------- Main UI -------------- */
1194
1195
  /*----------------------------------------*/
1195
1196
  return (React__default.createElement(React__default.Fragment, null,
1196
- React__default.createElement("style", null, style$a),
1197
+ React__default.createElement("style", null, style$9),
1197
1198
  modal,
1198
1199
  body));
1199
1200
  };
@@ -1205,7 +1206,7 @@ const AppWrapper = (props) => {
1205
1206
  /*------------------------------------------------------------------------*/
1206
1207
  /* -------------------------------- Style ------------------------------- */
1207
1208
  /*------------------------------------------------------------------------*/
1208
- const style$9 = `
1209
+ const style$8 = `
1209
1210
  /* Container fades in */
1210
1211
  .LoadingSpinner-container {
1211
1212
  animation-name: LoadingSpinner-container-fade-in;
@@ -1283,7 +1284,7 @@ const LoadingSpinner = () => {
1283
1284
  /*------------------------------------------------------------------------*/
1284
1285
  // Add all four blips to a container
1285
1286
  return (React__default.createElement("div", { className: "text-center LoadingSpinner LoadingSpinner-container" },
1286
- React__default.createElement("style", null, style$9),
1287
+ React__default.createElement("style", null, style$8),
1287
1288
  React__default.createElement(FontAwesomeIcon, { icon: faCircle, className: "LoadingSpinner-blip-1 me-1" }),
1288
1289
  React__default.createElement(FontAwesomeIcon, { icon: faCircle, className: "LoadingSpinner-blip-2 me-1" }),
1289
1290
  React__default.createElement(FontAwesomeIcon, { icon: faCircle, className: "LoadingSpinner-blip-3 me-1" }),
@@ -1297,7 +1298,7 @@ const LoadingSpinner = () => {
1297
1298
  /*------------------------------------------------------------------------*/
1298
1299
  /* -------------------------------- Style ------------------------------- */
1299
1300
  /*------------------------------------------------------------------------*/
1300
- const style$8 = `
1301
+ const style$7 = `
1301
1302
  /* Tab Box */
1302
1303
  .TabBox-box {
1303
1304
  /* Light Border */
@@ -1377,7 +1378,7 @@ const TabBox = (props) => {
1377
1378
  /*----------------------------------------*/
1378
1379
  // Full UI
1379
1380
  return (React__default.createElement("div", { className: `TabBox-container ${noBottomMargin ? '' : 'mb-2'}` },
1380
- React__default.createElement("style", null, style$8),
1381
+ React__default.createElement("style", null, style$7),
1381
1382
  React__default.createElement("div", { className: "TabBox-title-container" },
1382
1383
  React__default.createElement("div", { className: "TabBox-title" }, title)),
1383
1384
  React__default.createElement("div", { className: `TabBox-box ps-2 pt-2 pe-2 ${noBottomPadding ? '' : 'pb-2'}` },
@@ -1706,7 +1707,7 @@ const SimpleDateChooser = (props) => {
1706
1707
  /*------------------------------------------------------------------------*/
1707
1708
  /* -------------------------------- Style ------------------------------- */
1708
1709
  /*------------------------------------------------------------------------*/
1709
- const style$7 = `
1710
+ const style$6 = `
1710
1711
  .Drawer-container {
1711
1712
  margin-left: 1rem;
1712
1713
  margin-right: 1rem;
@@ -1740,7 +1741,7 @@ const Drawer = (props) => {
1740
1741
  return (React__default.createElement("div", { className: "Drawer-container", style: {
1741
1742
  backgroundColor: (customBackgroundColor !== null && customBackgroundColor !== void 0 ? customBackgroundColor : undefined),
1742
1743
  } },
1743
- React__default.createElement("style", null, style$7),
1744
+ React__default.createElement("style", null, style$6),
1744
1745
  children));
1745
1746
  };
1746
1747
 
@@ -1751,7 +1752,7 @@ const Drawer = (props) => {
1751
1752
  /*------------------------------------------------------------------------*/
1752
1753
  /* -------------------------------- Style ------------------------------- */
1753
1754
  /*------------------------------------------------------------------------*/
1754
- const style$6 = `
1755
+ const style$5 = `
1755
1756
  .PopSuccessMark-outer-container {
1756
1757
  position: relative;
1757
1758
  display: inline-block;
@@ -1856,7 +1857,7 @@ const PopSuccessMark = (props) => {
1856
1857
  width: `${sizeRem}rem`,
1857
1858
  height: `${sizeRem}rem`,
1858
1859
  }, "aria-label": "checkmark indicating success" },
1859
- React__default.createElement("style", null, style$6),
1860
+ React__default.createElement("style", null, style$5),
1860
1861
  React__default.createElement("div", { className: `PopSuccessMark-check-stroke-1 bg-${checkVariant}`, style: {
1861
1862
  borderRadius: `${sizeRem / 5}rem`,
1862
1863
  } }),
@@ -1872,7 +1873,7 @@ const PopSuccessMark = (props) => {
1872
1873
  /*------------------------------------------------------------------------*/
1873
1874
  /* -------------------------------- Style ------------------------------- */
1874
1875
  /*------------------------------------------------------------------------*/
1875
- const style$5 = `
1876
+ const style$4 = `
1876
1877
  .PopFailureMark-outer-container {
1877
1878
  position: relative;
1878
1879
  display: inline-block;
@@ -1976,7 +1977,7 @@ const PopFailureMark = (props) => {
1976
1977
  width: `${sizeRem}rem`,
1977
1978
  height: `${sizeRem}rem`,
1978
1979
  }, "aria-label": "mark indicating failure" },
1979
- React__default.createElement("style", null, style$5),
1980
+ React__default.createElement("style", null, style$4),
1980
1981
  React__default.createElement("div", { className: `PopFailureMark-x-stroke-1 bg-${xVariant}`, style: {
1981
1982
  borderRadius: `${sizeRem / 5}rem`,
1982
1983
  } }),
@@ -1992,7 +1993,7 @@ const PopFailureMark = (props) => {
1992
1993
  /*------------------------------------------------------------------------*/
1993
1994
  /* -------------------------------- Style ------------------------------- */
1994
1995
  /*------------------------------------------------------------------------*/
1995
- const style$4 = `
1996
+ const style$3 = `
1996
1997
  .PopPendingMark-outer-container {
1997
1998
  position: relative;
1998
1999
  display: inline-block;
@@ -2065,7 +2066,7 @@ const PopPendingMark = (props) => {
2065
2066
  width: `${sizeRem}rem`,
2066
2067
  height: `${sizeRem}rem`,
2067
2068
  }, "aria-label": "mark indicating that the item is pending" },
2068
- React__default.createElement("style", null, style$4),
2069
+ React__default.createElement("style", null, style$3),
2069
2070
  React__default.createElement("div", null,
2070
2071
  React__default.createElement(FontAwesomeIcon, { icon: faHourglass, className: `PopPendingMark-hourglass text-${hourglassVariant}`, style: {
2071
2072
  fontSize: `${sizeRem * 0.6}rem`,
@@ -2078,27 +2079,27 @@ const PopPendingMark = (props) => {
2078
2079
  */
2079
2080
  /* ------------- Actions ------------ */
2080
2081
  // Types of actions
2081
- var ActionType$9;
2082
+ var ActionType$8;
2082
2083
  (function (ActionType) {
2083
2084
  // Indicate that the text was recently copied
2084
2085
  ActionType["IndicateRecentlyCopied"] = "indicate-recently-copied";
2085
2086
  // Clear the status
2086
2087
  ActionType["ClearRecentlyCopiedStatus"] = "clear-recently-copied-status";
2087
- })(ActionType$9 || (ActionType$9 = {}));
2088
+ })(ActionType$8 || (ActionType$8 = {}));
2088
2089
  /**
2089
2090
  * Reducer that executes actions
2090
2091
  * @author Gabe Abrams
2091
2092
  * @param state current state
2092
2093
  * @param action action to execute
2093
2094
  */
2094
- const reducer$a = (state, action) => {
2095
+ const reducer$9 = (state, action) => {
2095
2096
  switch (action.type) {
2096
- case ActionType$9.IndicateRecentlyCopied: {
2097
+ case ActionType$8.IndicateRecentlyCopied: {
2097
2098
  return {
2098
2099
  recentlyCopied: true,
2099
2100
  };
2100
2101
  }
2101
- case ActionType$9.ClearRecentlyCopiedStatus: {
2102
+ case ActionType$8.ClearRecentlyCopiedStatus: {
2102
2103
  return {
2103
2104
  recentlyCopied: false,
2104
2105
  };
@@ -2124,7 +2125,7 @@ const CopiableBox = (props) => {
2124
2125
  recentlyCopied: false,
2125
2126
  };
2126
2127
  // Initialize state
2127
- const [state, dispatch] = useReducer(reducer$a, initialState);
2128
+ const [state, dispatch] = useReducer(reducer$9, initialState);
2128
2129
  // Destructure common state
2129
2130
  const { recentlyCopied, } = state;
2130
2131
  /*------------------------------------------------------------------------*/
@@ -2144,13 +2145,13 @@ const CopiableBox = (props) => {
2144
2145
  }
2145
2146
  // Show copied notice
2146
2147
  dispatch({
2147
- type: ActionType$9.IndicateRecentlyCopied,
2148
+ type: ActionType$8.IndicateRecentlyCopied,
2148
2149
  });
2149
2150
  // Wait a moment
2150
2151
  yield waitMs(4000);
2151
2152
  // Hide copied notice
2152
2153
  dispatch({
2153
- type: ActionType$9.ClearRecentlyCopiedStatus,
2154
+ type: ActionType$8.ClearRecentlyCopiedStatus,
2154
2155
  });
2155
2156
  });
2156
2157
  /*------------------------------------------------------------------------*/
@@ -2206,20 +2207,20 @@ const CopiableBox = (props) => {
2206
2207
  */
2207
2208
  /* ------------- Actions ------------ */
2208
2209
  // Types of actions
2209
- var ActionType$8;
2210
+ var ActionType$7;
2210
2211
  (function (ActionType) {
2211
2212
  // Toggle whether a child are being shown
2212
2213
  ActionType["ToggleChild"] = "toggle-child";
2213
- })(ActionType$8 || (ActionType$8 = {}));
2214
+ })(ActionType$7 || (ActionType$7 = {}));
2214
2215
  /**
2215
2216
  * Reducer that executes actions
2216
2217
  * @author Gabe Abrams
2217
2218
  * @param state current state
2218
2219
  * @param action action to execute
2219
2220
  */
2220
- const reducer$9 = (state, action) => {
2221
+ const reducer$8 = (state, action) => {
2221
2222
  switch (action.type) {
2222
- case ActionType$8.ToggleChild: {
2223
+ case ActionType$7.ToggleChild: {
2223
2224
  return Object.assign(Object.assign({}, state), { childExpanded: Object.assign(Object.assign({}, state.childExpanded), { [String(action.id)]: !state.childExpanded[String(action.id)] }) });
2224
2225
  }
2225
2226
  default: {
@@ -2248,7 +2249,7 @@ const NestableItemList = (props) => {
2248
2249
  childExpanded: initChildExpanded,
2249
2250
  };
2250
2251
  // Initialize state
2251
- const [state, dispatch] = useReducer(reducer$9, initialState);
2252
+ const [state, dispatch] = useReducer(reducer$8, initialState);
2252
2253
  // Destructure common state
2253
2254
  const { childExpanded, } = state;
2254
2255
  /*------------------------------------------------------------------------*/
@@ -2338,7 +2339,7 @@ const NestableItemList = (props) => {
2338
2339
  backgroundColor: 'transparent',
2339
2340
  }, type: "button", onClick: () => {
2340
2341
  dispatch({
2341
- type: ActionType$8.ToggleChild,
2342
+ type: ActionType$7.ToggleChild,
2342
2343
  id: item.id,
2343
2344
  });
2344
2345
  }, "aria-label": `${childExpanded[item.id] ? 'Hide' : 'Show'} items in ${item.name}` },
@@ -2622,7 +2623,7 @@ var SortType;
2622
2623
  })(SortType || (SortType = {}));
2623
2624
  /* ------------- Actions ------------ */
2624
2625
  // Types of actions
2625
- var ActionType$7;
2626
+ var ActionType$6;
2626
2627
  (function (ActionType) {
2627
2628
  // Toggle sort column param
2628
2629
  ActionType["ToggleSortColumn"] = "toggle-sort-column";
@@ -2634,16 +2635,16 @@ var ActionType$7;
2634
2635
  ActionType["ShowAllColumns"] = "show-all-columns";
2635
2636
  // Hide all columns
2636
2637
  ActionType["HideAllColumns"] = "hide-all-columns";
2637
- })(ActionType$7 || (ActionType$7 = {}));
2638
+ })(ActionType$6 || (ActionType$6 = {}));
2638
2639
  /**
2639
2640
  * Reducer that executes actions
2640
2641
  * @author Gabe Abrams
2641
2642
  * @param state current state
2642
2643
  * @param action action to execute
2643
2644
  */
2644
- const reducer$8 = (state, action) => {
2645
+ const reducer$7 = (state, action) => {
2645
2646
  switch (action.type) {
2646
- case ActionType$7.ToggleSortColumn: {
2647
+ case ActionType$6.ToggleSortColumn: {
2647
2648
  if (action.param !== state.sortColumnParam) {
2648
2649
  // Different column param
2649
2650
  return Object.assign(Object.assign({}, state), { sortColumnParam: action.param, sortType: SortType.Ascending });
@@ -2655,22 +2656,22 @@ const reducer$8 = (state, action) => {
2655
2656
  // Stop sorting by column
2656
2657
  return Object.assign(Object.assign({}, state), { sortColumnParam: undefined, sortType: SortType.Ascending });
2657
2658
  }
2658
- case ActionType$7.UpdateColumnVisibility: {
2659
+ case ActionType$6.UpdateColumnVisibility: {
2659
2660
  const { columnVisibilityMap } = state;
2660
2661
  columnVisibilityMap[action.param] = action.visible;
2661
2662
  return Object.assign(Object.assign({}, state), { columnVisibilityMap });
2662
2663
  }
2663
- case ActionType$7.ToggleColVisCusModalVisibility: {
2664
+ case ActionType$6.ToggleColVisCusModalVisibility: {
2664
2665
  return Object.assign(Object.assign({}, state), { columnVisibilityCustomizationModalVisible: !state.columnVisibilityCustomizationModalVisible });
2665
2666
  }
2666
- case ActionType$7.ShowAllColumns: {
2667
+ case ActionType$6.ShowAllColumns: {
2667
2668
  const { columnVisibilityMap } = state;
2668
2669
  Object.keys(columnVisibilityMap).forEach((param) => {
2669
2670
  columnVisibilityMap[param] = true;
2670
2671
  });
2671
2672
  return Object.assign(Object.assign({}, state), { columnVisibilityMap });
2672
2673
  }
2673
- case ActionType$7.HideAllColumns: {
2674
+ case ActionType$6.HideAllColumns: {
2674
2675
  const { columnVisibilityMap } = state;
2675
2676
  Object.keys(columnVisibilityMap).forEach((param) => {
2676
2677
  columnVisibilityMap[param] = false;
@@ -2717,7 +2718,7 @@ const IntelliTable = (props) => {
2717
2718
  columnVisibilityCustomizationModalVisible: false,
2718
2719
  };
2719
2720
  // Initialize state
2720
- const [state, dispatch] = useReducer(reducer$8, initialState);
2721
+ const [state, dispatch] = useReducer(reducer$7, initialState);
2721
2722
  // Destructure common state
2722
2723
  const { sortColumnParam, sortType, columnVisibilityMap, columnVisibilityCustomizationModalVisible, } = state;
2723
2724
  /*------------------------------------------------------------------------*/
@@ -2740,13 +2741,13 @@ const IntelliTable = (props) => {
2740
2741
  return alert('Choose at least one column', 'To continue, you have to choose at least one column to show');
2741
2742
  }
2742
2743
  dispatch({
2743
- type: ActionType$7.ToggleColVisCusModalVisibility,
2744
+ type: ActionType$6.ToggleColVisCusModalVisibility,
2744
2745
  });
2745
2746
  }, okayVariant: Variant$1.Light },
2746
2747
  columns.map((column) => {
2747
2748
  return (React__default.createElement(CheckboxButton, { key: column.param, id: `IntelliTable-${id}-toggle-visibility-${column.param}`, className: "mb-2", text: column.title, onChanged: (checked) => {
2748
2749
  dispatch({
2749
- type: ActionType$7.UpdateColumnVisibility,
2750
+ type: ActionType$6.UpdateColumnVisibility,
2750
2751
  param: column.param,
2751
2752
  visible: checked,
2752
2753
  });
@@ -2755,12 +2756,12 @@ const IntelliTable = (props) => {
2755
2756
  React__default.createElement("div", { className: "mt-3" }, "Or you can:"),
2756
2757
  React__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: () => {
2757
2758
  dispatch({
2758
- type: ActionType$7.ShowAllColumns,
2759
+ type: ActionType$6.ShowAllColumns,
2759
2760
  });
2760
2761
  } }, "Select All"),
2761
2762
  React__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: () => {
2762
2763
  dispatch({
2763
- type: ActionType$7.HideAllColumns,
2764
+ type: ActionType$6.HideAllColumns,
2764
2765
  });
2765
2766
  } }, "Deselect All")));
2766
2767
  }
@@ -2811,7 +2812,7 @@ const IntelliTable = (props) => {
2811
2812
  React__default.createElement("div", null,
2812
2813
  React__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: () => {
2813
2814
  dispatch({
2814
- type: ActionType$7.ToggleSortColumn,
2815
+ type: ActionType$6.ToggleSortColumn,
2815
2816
  param: column.param,
2816
2817
  });
2817
2818
  } },
@@ -3000,7 +3001,7 @@ const IntelliTable = (props) => {
3000
3001
  React__default.createElement(CSVDownloadButton, { "aria-label": `download data as csv for ${title}`, id: `IntelliTable-${id}-download-as-csv`, filename: filename, csv: csv }),
3001
3002
  React__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: () => {
3002
3003
  dispatch({
3003
- type: ActionType$7.ToggleColVisCusModalVisibility,
3004
+ type: ActionType$6.ToggleColVisCusModalVisibility,
3004
3005
  });
3005
3006
  } },
3006
3007
  "Show/Hide Cols",
@@ -3032,7 +3033,7 @@ var FilterDrawer;
3032
3033
  /*------------------------------------------------------------------------*/
3033
3034
  /* -------------------------------- Style ------------------------------- */
3034
3035
  /*------------------------------------------------------------------------*/
3035
- const style$3 = `
3036
+ const style$2 = `
3036
3037
  .LogReviewer-outer-container {
3037
3038
  /* Full Screen */
3038
3039
  display: inline-block;
@@ -3366,7 +3367,7 @@ const genHumanReadableName = (machineReadableName) => {
3366
3367
  };
3367
3368
  /* ------------- Actions ------------ */
3368
3369
  // Types of actions
3369
- var ActionType$6;
3370
+ var ActionType$5;
3370
3371
  (function (ActionType) {
3371
3372
  // Show the loading bar
3372
3373
  ActionType["StartLoading"] = "start-loading";
@@ -3388,45 +3389,45 @@ var ActionType$6;
3388
3389
  ActionType["UpdateActionErrorFilterState"] = "update-action-error-filter-state";
3389
3390
  // Update the advanced filter state
3390
3391
  ActionType["UpdateAdvancedFilterState"] = "update-advanced-filter-state";
3391
- })(ActionType$6 || (ActionType$6 = {}));
3392
+ })(ActionType$5 || (ActionType$5 = {}));
3392
3393
  /**
3393
3394
  * Reducer that executes actions
3394
3395
  * @author Gabe Abrams
3395
3396
  * @param state current state
3396
3397
  * @param action action to execute
3397
3398
  */
3398
- const reducer$7 = (state, action) => {
3399
+ const reducer$6 = (state, action) => {
3399
3400
  switch (action.type) {
3400
- case ActionType$6.StartLoading: {
3401
+ case ActionType$5.StartLoading: {
3401
3402
  return Object.assign(Object.assign({}, state), { loading: true });
3402
3403
  }
3403
- case ActionType$6.FinishLoading: {
3404
+ case ActionType$5.FinishLoading: {
3404
3405
  return Object.assign(Object.assign({}, state), { loading: false, logMap: action.logMap });
3405
3406
  }
3406
- case ActionType$6.ToggleFilterDrawer: {
3407
+ case ActionType$5.ToggleFilterDrawer: {
3407
3408
  return Object.assign(Object.assign({}, state), { expandedFilterDrawer: (state.expandedFilterDrawer === action.filterDrawer
3408
3409
  ? undefined // hide
3409
3410
  : action.filterDrawer) });
3410
3411
  }
3411
- case ActionType$6.HideFilterDrawer: {
3412
+ case ActionType$5.HideFilterDrawer: {
3412
3413
  return Object.assign(Object.assign({}, state), { expandedFilterDrawer: undefined });
3413
3414
  }
3414
- case ActionType$6.ResetFilters: {
3415
+ case ActionType$5.ResetFilters: {
3415
3416
  return Object.assign(Object.assign({}, state), { dateFilterState: action.initDateFilterState, contextFilterState: action.initContextFilterState, tagFilterState: action.initTagFilterState, actionErrorFilterState: action.initActionErrorFilterState, advancedFilterState: action.initAdvancedFilterState });
3416
3417
  }
3417
- case ActionType$6.UpdateDateFilterState: {
3418
+ case ActionType$5.UpdateDateFilterState: {
3418
3419
  return Object.assign(Object.assign({}, state), { dateFilterState: action.dateFilterState });
3419
3420
  }
3420
- case ActionType$6.UpdateContextFilterState: {
3421
+ case ActionType$5.UpdateContextFilterState: {
3421
3422
  return Object.assign(Object.assign({}, state), { contextFilterState: action.contextFilterState });
3422
3423
  }
3423
- case ActionType$6.UpdateTagFilterState: {
3424
+ case ActionType$5.UpdateTagFilterState: {
3424
3425
  return Object.assign(Object.assign({}, state), { tagFilterState: action.tagFilterState });
3425
3426
  }
3426
- case ActionType$6.UpdateActionErrorFilterState: {
3427
+ case ActionType$5.UpdateActionErrorFilterState: {
3427
3428
  return Object.assign(Object.assign({}, state), { actionErrorFilterState: action.actionErrorFilterState });
3428
3429
  }
3429
- case ActionType$6.UpdateAdvancedFilterState: {
3430
+ case ActionType$5.UpdateAdvancedFilterState: {
3430
3431
  return Object.assign(Object.assign({}, state), { advancedFilterState: action.advancedFilterState });
3431
3432
  }
3432
3433
  default: {
@@ -3555,7 +3556,7 @@ const LogReviewer = (props) => {
3555
3556
  advancedFilterState: initAdvancedFilterState,
3556
3557
  };
3557
3558
  // Initialize state
3558
- const [state, dispatch] = useReducer(reducer$7, initialState);
3559
+ const [state, dispatch] = useReducer(reducer$6, initialState);
3559
3560
  // Destructure common state
3560
3561
  const { loading, logMap, expandedFilterDrawer, dateFilterState, contextFilterState, tagFilterState, actionErrorFilterState, advancedFilterState, } = state;
3561
3562
  /*------------------------------------------------------------------------*/
@@ -3605,7 +3606,7 @@ const LogReviewer = (props) => {
3605
3606
  const handleDateRangeUpdated = (newDateFilterState) => __awaiter(void 0, void 0, void 0, function* () {
3606
3607
  // Update state
3607
3608
  dispatch({
3608
- type: ActionType$6.UpdateDateFilterState,
3609
+ type: ActionType$5.UpdateDateFilterState,
3609
3610
  dateFilterState: newDateFilterState,
3610
3611
  });
3611
3612
  // Check which year/month combos we need to load
@@ -3616,7 +3617,7 @@ const LogReviewer = (props) => {
3616
3617
  }
3617
3618
  // Start loading
3618
3619
  dispatch({
3619
- type: ActionType$6.StartLoading,
3620
+ type: ActionType$5.StartLoading,
3620
3621
  });
3621
3622
  // Load required months
3622
3623
  try {
@@ -3640,7 +3641,7 @@ const LogReviewer = (props) => {
3640
3641
  }
3641
3642
  // Finish loading
3642
3643
  dispatch({
3643
- type: ActionType$6.FinishLoading,
3644
+ type: ActionType$5.FinishLoading,
3644
3645
  logMap,
3645
3646
  });
3646
3647
  });
@@ -3679,7 +3680,7 @@ const LogReviewer = (props) => {
3679
3680
  React__default.createElement("div", { className: "LogReviewer-filter-toggle-buttons alert alert-secondary p-2 m-0" },
3680
3681
  React__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: () => {
3681
3682
  dispatch({
3682
- type: ActionType$6.ToggleFilterDrawer,
3683
+ type: ActionType$5.ToggleFilterDrawer,
3683
3684
  filterDrawer: FilterDrawer.Date,
3684
3685
  });
3685
3686
  } },
@@ -3687,7 +3688,7 @@ const LogReviewer = (props) => {
3687
3688
  "Date"),
3688
3689
  React__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: () => {
3689
3690
  dispatch({
3690
- type: ActionType$6.ToggleFilterDrawer,
3691
+ type: ActionType$5.ToggleFilterDrawer,
3691
3692
  filterDrawer: FilterDrawer.Context,
3692
3693
  });
3693
3694
  } },
@@ -3695,7 +3696,7 @@ const LogReviewer = (props) => {
3695
3696
  "Context"),
3696
3697
  (LogMetadata.Tag && Object.keys(LogMetadata.Tag).length > 0) && (React__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: () => {
3697
3698
  dispatch({
3698
- type: ActionType$6.ToggleFilterDrawer,
3699
+ type: ActionType$5.ToggleFilterDrawer,
3699
3700
  filterDrawer: FilterDrawer.Tag,
3700
3701
  });
3701
3702
  } },
@@ -3703,7 +3704,7 @@ const LogReviewer = (props) => {
3703
3704
  "Tag")),
3704
3705
  React__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: () => {
3705
3706
  dispatch({
3706
- type: ActionType$6.ToggleFilterDrawer,
3707
+ type: ActionType$5.ToggleFilterDrawer,
3707
3708
  filterDrawer: FilterDrawer.Action,
3708
3709
  });
3709
3710
  } },
@@ -3711,7 +3712,7 @@ const LogReviewer = (props) => {
3711
3712
  "Action"),
3712
3713
  React__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: () => {
3713
3714
  dispatch({
3714
- type: ActionType$6.ToggleFilterDrawer,
3715
+ type: ActionType$5.ToggleFilterDrawer,
3715
3716
  filterDrawer: FilterDrawer.Advanced,
3716
3717
  });
3717
3718
  } },
@@ -3719,7 +3720,7 @@ const LogReviewer = (props) => {
3719
3720
  "Advanced"),
3720
3721
  React__default.createElement("button", { type: "button", id: "LogReviewer-reset-filters-button", className: "btn btn-light", "aria-label": "reset filters", onClick: () => {
3721
3722
  dispatch({
3722
- type: ActionType$6.ResetFilters,
3723
+ type: ActionType$5.ResetFilters,
3723
3724
  initActionErrorFilterState,
3724
3725
  initAdvancedFilterState,
3725
3726
  initContextFilterState,
@@ -3841,7 +3842,7 @@ const LogReviewer = (props) => {
3841
3842
  }
3842
3843
  });
3843
3844
  dispatch({
3844
- type: ActionType$6.UpdateContextFilterState,
3845
+ type: ActionType$5.UpdateContextFilterState,
3845
3846
  contextFilterState,
3846
3847
  });
3847
3848
  } }));
@@ -3856,7 +3857,7 @@ const LogReviewer = (props) => {
3856
3857
  return (React__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: tagFilterState[tag], onChanged: (checked) => {
3857
3858
  tagFilterState[tag] = checked;
3858
3859
  dispatch({
3859
- type: ActionType$6.UpdateTagFilterState,
3860
+ type: ActionType$5.UpdateTagFilterState,
3860
3861
  tagFilterState,
3861
3862
  });
3862
3863
  } }));
@@ -3869,21 +3870,21 @@ const LogReviewer = (props) => {
3869
3870
  React__default.createElement(RadioButton, { id: "LogReviewer-type-all", text: "All Logs", onSelected: () => {
3870
3871
  actionErrorFilterState.type = undefined;
3871
3872
  dispatch({
3872
- type: ActionType$6.UpdateActionErrorFilterState,
3873
+ type: ActionType$5.UpdateActionErrorFilterState,
3873
3874
  actionErrorFilterState,
3874
3875
  });
3875
3876
  }, ariaLabel: "show logs of all types", selected: actionErrorFilterState.type === undefined }),
3876
3877
  React__default.createElement(RadioButton, { id: "LogReviewer-type-action-only", text: "Action Logs Only", onSelected: () => {
3877
3878
  actionErrorFilterState.type = LogType$1.Action;
3878
3879
  dispatch({
3879
- type: ActionType$6.UpdateActionErrorFilterState,
3880
+ type: ActionType$5.UpdateActionErrorFilterState,
3880
3881
  actionErrorFilterState,
3881
3882
  });
3882
3883
  }, ariaLabel: "only show action logs", selected: actionErrorFilterState.type === LogType$1.Action }),
3883
3884
  React__default.createElement(RadioButton, { id: "LogReviewer-type-error-only", text: "Action Error Only", onSelected: () => {
3884
3885
  actionErrorFilterState.type = LogType$1.Error;
3885
3886
  dispatch({
3886
- type: ActionType$6.UpdateActionErrorFilterState,
3887
+ type: ActionType$5.UpdateActionErrorFilterState,
3887
3888
  actionErrorFilterState,
3888
3889
  });
3889
3890
  }, ariaLabel: "only show error logs", selected: actionErrorFilterState.type === LogType$1.Error, noMarginOnRight: true })),
@@ -3895,7 +3896,7 @@ const LogReviewer = (props) => {
3895
3896
  return (React__default.createElement(CheckboxButton, { key: action, id: `LogReviewer-action-${action}-checkbox`, text: description, ariaLabel: `include logs with action type "${description}" in results`, noMarginOnRight: true, checked: actionErrorFilterState.action[action], onChanged: (checked) => {
3896
3897
  actionErrorFilterState.action[action] = checked;
3897
3898
  dispatch({
3898
- type: ActionType$6.UpdateActionErrorFilterState,
3899
+ type: ActionType$5.UpdateActionErrorFilterState,
3899
3900
  actionErrorFilterState,
3900
3901
  });
3901
3902
  } }));
@@ -3906,7 +3907,7 @@ const LogReviewer = (props) => {
3906
3907
  return (React__default.createElement(CheckboxButton, { key: target, id: `LogReviewer-target-${target}-checkbox`, text: description, ariaLabel: `include logs with target "${description}" in results`, checked: actionErrorFilterState.target[target], noMarginOnRight: true, onChanged: (checked) => {
3907
3908
  actionErrorFilterState.target[target] = checked;
3908
3909
  dispatch({
3909
- type: ActionType$6.UpdateActionErrorFilterState,
3910
+ type: ActionType$5.UpdateActionErrorFilterState,
3910
3911
  actionErrorFilterState,
3911
3912
  });
3912
3913
  } }));
@@ -3918,7 +3919,7 @@ const LogReviewer = (props) => {
3918
3919
  React__default.createElement("input", { type: "text", className: "form-control", "aria-label": "query for error message", value: actionErrorFilterState.errorMessage, placeholder: "e.g. undefined is not a function", onChange: (e) => {
3919
3920
  actionErrorFilterState.errorMessage = e.target.value;
3920
3921
  dispatch({
3921
- type: ActionType$6.UpdateActionErrorFilterState,
3922
+ type: ActionType$5.UpdateActionErrorFilterState,
3922
3923
  actionErrorFilterState,
3923
3924
  });
3924
3925
  } })),
@@ -3929,7 +3930,7 @@ const LogReviewer = (props) => {
3929
3930
  .trim()
3930
3931
  .toUpperCase());
3931
3932
  dispatch({
3932
- type: ActionType$6.UpdateActionErrorFilterState,
3933
+ type: ActionType$5.UpdateActionErrorFilterState,
3933
3934
  actionErrorFilterState,
3934
3935
  });
3935
3936
  } }))))));
@@ -3943,7 +3944,7 @@ const LogReviewer = (props) => {
3943
3944
  React__default.createElement("input", { type: "text", className: "form-control", "aria-label": "query for user first name", value: advancedFilterState.userFirstName, placeholder: "e.g. Divardo", onChange: (e) => {
3944
3945
  advancedFilterState.userFirstName = e.target.value;
3945
3946
  dispatch({
3946
- type: ActionType$6.UpdateAdvancedFilterState,
3947
+ type: ActionType$5.UpdateAdvancedFilterState,
3947
3948
  advancedFilterState,
3948
3949
  });
3949
3950
  } })),
@@ -3952,7 +3953,7 @@ const LogReviewer = (props) => {
3952
3953
  React__default.createElement("input", { type: "text", className: "form-control", "aria-label": "query for user last name", value: advancedFilterState.userLastName, placeholder: "e.g. Calicci", onChange: (e) => {
3953
3954
  advancedFilterState.userLastName = e.target.value;
3954
3955
  dispatch({
3955
- type: ActionType$6.UpdateAdvancedFilterState,
3956
+ type: ActionType$5.UpdateAdvancedFilterState,
3956
3957
  advancedFilterState,
3957
3958
  });
3958
3959
  } })),
@@ -3962,7 +3963,7 @@ const LogReviewer = (props) => {
3962
3963
  advancedFilterState.userEmail = ((e.target.value)
3963
3964
  .trim());
3964
3965
  dispatch({
3965
- type: ActionType$6.UpdateAdvancedFilterState,
3966
+ type: ActionType$5.UpdateAdvancedFilterState,
3966
3967
  advancedFilterState,
3967
3968
  });
3968
3969
  } })),
@@ -3976,7 +3977,7 @@ const LogReviewer = (props) => {
3976
3977
  .trim());
3977
3978
  }
3978
3979
  dispatch({
3979
- type: ActionType$6.UpdateAdvancedFilterState,
3980
+ type: ActionType$5.UpdateAdvancedFilterState,
3980
3981
  advancedFilterState,
3981
3982
  });
3982
3983
  } })),
@@ -3984,21 +3985,21 @@ const LogReviewer = (props) => {
3984
3985
  React__default.createElement(CheckboxButton, { text: "Students", onChanged: (checked) => {
3985
3986
  advancedFilterState.includeLearners = checked;
3986
3987
  dispatch({
3987
- type: ActionType$6.UpdateAdvancedFilterState,
3988
+ type: ActionType$5.UpdateAdvancedFilterState,
3988
3989
  advancedFilterState,
3989
3990
  });
3990
3991
  }, checked: advancedFilterState.includeLearners, ariaLabel: "show logs from students" }),
3991
3992
  React__default.createElement(CheckboxButton, { text: "Teaching Team Members", onChanged: (checked) => {
3992
3993
  advancedFilterState.includeTTMs = checked;
3993
3994
  dispatch({
3994
- type: ActionType$6.UpdateAdvancedFilterState,
3995
+ type: ActionType$5.UpdateAdvancedFilterState,
3995
3996
  advancedFilterState,
3996
3997
  });
3997
3998
  }, checked: advancedFilterState.includeTTMs, ariaLabel: "show logs from teaching team members" }),
3998
3999
  React__default.createElement(CheckboxButton, { text: "Admins", onChanged: (checked) => {
3999
4000
  advancedFilterState.includeAdmins = checked;
4000
4001
  dispatch({
4001
- type: ActionType$6.UpdateAdvancedFilterState,
4002
+ type: ActionType$5.UpdateAdvancedFilterState,
4002
4003
  advancedFilterState,
4003
4004
  });
4004
4005
  }, checked: advancedFilterState.includeAdmins, ariaLabel: "show logs from admins" }))),
@@ -4008,7 +4009,7 @@ const LogReviewer = (props) => {
4008
4009
  React__default.createElement("input", { type: "text", className: "form-control", "aria-label": "query for course name", value: advancedFilterState.courseName, placeholder: "e.g. GLC 200", onChange: (e) => {
4009
4010
  advancedFilterState.courseName = e.target.value;
4010
4011
  dispatch({
4011
- type: ActionType$6.UpdateAdvancedFilterState,
4012
+ type: ActionType$5.UpdateAdvancedFilterState,
4012
4013
  advancedFilterState,
4013
4014
  });
4014
4015
  } })),
@@ -4022,7 +4023,7 @@ const LogReviewer = (props) => {
4022
4023
  .trim());
4023
4024
  }
4024
4025
  dispatch({
4025
- type: ActionType$6.UpdateAdvancedFilterState,
4026
+ type: ActionType$5.UpdateAdvancedFilterState,
4026
4027
  advancedFilterState,
4027
4028
  });
4028
4029
  } }))),
@@ -4031,21 +4032,21 @@ const LogReviewer = (props) => {
4031
4032
  React__default.createElement(RadioButton, { text: "All Devices", ariaLabel: "show logs from all devices", selected: advancedFilterState.isMobile === undefined, onSelected: () => {
4032
4033
  advancedFilterState.isMobile = undefined;
4033
4034
  dispatch({
4034
- type: ActionType$6.UpdateAdvancedFilterState,
4035
+ type: ActionType$5.UpdateAdvancedFilterState,
4035
4036
  advancedFilterState,
4036
4037
  });
4037
4038
  } }),
4038
4039
  React__default.createElement(RadioButton, { text: "Mobile Only", ariaLabel: "show logs from mobile devices", selected: advancedFilterState.isMobile === true, onSelected: () => {
4039
4040
  advancedFilterState.isMobile = true;
4040
4041
  dispatch({
4041
- type: ActionType$6.UpdateAdvancedFilterState,
4042
+ type: ActionType$5.UpdateAdvancedFilterState,
4042
4043
  advancedFilterState,
4043
4044
  });
4044
4045
  } }),
4045
4046
  React__default.createElement(RadioButton, { text: "Desktop Only", ariaLabel: "show logs from desktop devices", selected: advancedFilterState.isMobile === false, onSelected: () => {
4046
4047
  advancedFilterState.isMobile = false;
4047
4048
  dispatch({
4048
- type: ActionType$6.UpdateAdvancedFilterState,
4049
+ type: ActionType$5.UpdateAdvancedFilterState,
4049
4050
  advancedFilterState,
4050
4051
  });
4051
4052
  }, noMarginOnRight: true }))),
@@ -4054,21 +4055,21 @@ const LogReviewer = (props) => {
4054
4055
  React__default.createElement(RadioButton, { text: "Both", ariaLabel: "show logs from all sources", selected: advancedFilterState.source === undefined, onSelected: () => {
4055
4056
  advancedFilterState.source = undefined;
4056
4057
  dispatch({
4057
- type: ActionType$6.UpdateAdvancedFilterState,
4058
+ type: ActionType$5.UpdateAdvancedFilterState,
4058
4059
  advancedFilterState,
4059
4060
  });
4060
4061
  } }),
4061
4062
  React__default.createElement(RadioButton, { text: "Client Only", ariaLabel: "show logs from client source", selected: advancedFilterState.source === LogSource$1.Client, onSelected: () => {
4062
4063
  advancedFilterState.source = LogSource$1.Client;
4063
4064
  dispatch({
4064
- type: ActionType$6.UpdateAdvancedFilterState,
4065
+ type: ActionType$5.UpdateAdvancedFilterState,
4065
4066
  advancedFilterState,
4066
4067
  });
4067
4068
  } }),
4068
4069
  React__default.createElement(RadioButton, { text: "Server Only", ariaLabel: "show logs from server source", selected: advancedFilterState.source === LogSource$1.Server, onSelected: () => {
4069
4070
  advancedFilterState.source = LogSource$1.Server;
4070
4071
  dispatch({
4071
- type: ActionType$6.UpdateAdvancedFilterState,
4072
+ type: ActionType$5.UpdateAdvancedFilterState,
4072
4073
  advancedFilterState,
4073
4074
  });
4074
4075
  }, noMarginOnRight: true })),
@@ -4079,7 +4080,7 @@ const LogReviewer = (props) => {
4079
4080
  advancedFilterState.courseName = ((e.target.value)
4080
4081
  .trim());
4081
4082
  dispatch({
4082
- type: ActionType$6.UpdateAdvancedFilterState,
4083
+ type: ActionType$5.UpdateAdvancedFilterState,
4083
4084
  advancedFilterState,
4084
4085
  });
4085
4086
  } })),
@@ -4089,7 +4090,7 @@ const LogReviewer = (props) => {
4089
4090
  advancedFilterState.courseName = ((e.target.value)
4090
4091
  .trim());
4091
4092
  dispatch({
4092
- type: ActionType$6.UpdateAdvancedFilterState,
4093
+ type: ActionType$5.UpdateAdvancedFilterState,
4093
4094
  advancedFilterState,
4094
4095
  });
4095
4096
  } })))))));
@@ -4368,7 +4369,7 @@ const LogReviewer = (props) => {
4368
4369
  }
4369
4370
  /* ---------- Wrap in Modal --------- */
4370
4371
  return (React__default.createElement("div", { className: "LogReviewer-outer-container" },
4371
- React__default.createElement("style", null, style$3),
4372
+ React__default.createElement("style", null, style$2),
4372
4373
  React__default.createElement("div", { className: "LogReviewer-inner-container" },
4373
4374
  React__default.createElement("div", { className: "LogReviewer-header" },
4374
4375
  React__default.createElement("div", { className: "LogReviewer-header-title" },
@@ -39694,11 +39695,11 @@ var CreatableSelect$1 = CreatableSelect;
39694
39695
  */
39695
39696
  /* ------------- Actions ------------ */
39696
39697
  // Types of actions
39697
- var ActionType$5;
39698
+ var ActionType$4;
39698
39699
  (function (ActionType) {
39699
39700
  // Update the input value
39700
39701
  ActionType["SetInputValue"] = "SetInputValue";
39701
- })(ActionType$5 || (ActionType$5 = {}));
39702
+ })(ActionType$4 || (ActionType$4 = {}));
39702
39703
  /**
39703
39704
  * Reducer that executes actions
39704
39705
  * @author Yuen Ler Chow
@@ -39706,9 +39707,9 @@ var ActionType$5;
39706
39707
  * @param action action to execute
39707
39708
  * @returns updated state
39708
39709
  */
39709
- const reducer$6 = (state, action) => {
39710
+ const reducer$5 = (state, action) => {
39710
39711
  switch (action.type) {
39711
- case ActionType$5.SetInputValue: {
39712
+ case ActionType$4.SetInputValue: {
39712
39713
  return Object.assign(Object.assign({}, state), { inputValue: action.value });
39713
39714
  }
39714
39715
  default: {
@@ -39728,7 +39729,7 @@ const CreatableMultiselect = (props) => {
39728
39729
  inputValue: '',
39729
39730
  };
39730
39731
  // Initialize state
39731
- const [state, dispatch] = useReducer(reducer$6, initialState);
39732
+ const [state, dispatch] = useReducer(reducer$5, initialState);
39732
39733
  // Destructure common state
39733
39734
  const { inputValue } = state;
39734
39735
  /*------------------------------------------------------------------------*/
@@ -39805,7 +39806,7 @@ const CreatableMultiselect = (props) => {
39805
39806
  }
39806
39807
  // Reset text field to empty because the values have been added
39807
39808
  dispatch({
39808
- type: ActionType$5.SetInputValue,
39809
+ type: ActionType$4.SetInputValue,
39809
39810
  value: '',
39810
39811
  });
39811
39812
  };
@@ -39844,7 +39845,7 @@ const CreatableMultiselect = (props) => {
39844
39845
  else {
39845
39846
  // simply update the input value to the new input value
39846
39847
  dispatch({
39847
- type: ActionType$5.SetInputValue,
39848
+ type: ActionType$4.SetInputValue,
39848
39849
  value: newValue,
39849
39850
  });
39850
39851
  }
@@ -39889,20 +39890,20 @@ const CreatableMultiselect = (props) => {
39889
39890
  /*------------------------------------------------------------------------*/
39890
39891
  /* -------------------------------- Style ------------------------------- */
39891
39892
  /*------------------------------------------------------------------------*/
39892
- const style$2 = `
39893
+ const style$1 = `
39893
39894
  .AddOrEditDBEntry-input-label {
39894
39895
  min-width: 7rem;
39895
39896
  }
39896
39897
  `;
39897
39898
  /* ------------- Actions ------------ */
39898
39899
  // Types of actions
39899
- var ActionType$4;
39900
+ var ActionType$3;
39900
39901
  (function (ActionType) {
39901
39902
  // Update the DBEntry
39902
39903
  ActionType["UpdateDBEntry"] = "UpdateDBEntry";
39903
39904
  // Start the save spinner
39904
39905
  ActionType["StartSave"] = "StartSave";
39905
- })(ActionType$4 || (ActionType$4 = {}));
39906
+ })(ActionType$3 || (ActionType$3 = {}));
39906
39907
  /**
39907
39908
  * Reducer that executes actions
39908
39909
  * @author Yuen Ler Chow
@@ -39910,12 +39911,12 @@ var ActionType$4;
39910
39911
  * @param action action to execute
39911
39912
  * @returns updated state
39912
39913
  */
39913
- const reducer$5 = (state, action) => {
39914
+ const reducer$4 = (state, action) => {
39914
39915
  switch (action.type) {
39915
- case ActionType$4.UpdateDBEntry: {
39916
+ case ActionType$3.UpdateDBEntry: {
39916
39917
  return Object.assign(Object.assign({}, state), { entry: action.dbEntry });
39917
39918
  }
39918
- case ActionType$4.StartSave: {
39919
+ case ActionType$3.StartSave: {
39919
39920
  return Object.assign(Object.assign({}, state), { saving: true });
39920
39921
  }
39921
39922
  default: {
@@ -39940,7 +39941,7 @@ const AddOrEditDBEntry = (props) => {
39940
39941
  saving: false,
39941
39942
  };
39942
39943
  // Initialize state
39943
- const [state, dispatch] = useReducer(reducer$5, initialState);
39944
+ const [state, dispatch] = useReducer(reducer$4, initialState);
39944
39945
  // Destructure common state
39945
39946
  const { entry, saving, } = state;
39946
39947
  /*------------------------------------------------------------------------*/
@@ -39952,7 +39953,7 @@ const AddOrEditDBEntry = (props) => {
39952
39953
  */
39953
39954
  const save = () => __awaiter(void 0, void 0, void 0, function* () {
39954
39955
  // Start the save loading indicator
39955
- dispatch({ type: ActionType$4.StartSave });
39956
+ dispatch({ type: ActionType$3.StartSave });
39956
39957
  // add all default values to the entry
39957
39958
  entryFields.forEach((field) => {
39958
39959
  if (field.defaultValue && !entry[field.objectKey]) {
@@ -40135,7 +40136,7 @@ const AddOrEditDBEntry = (props) => {
40135
40136
  return (React__default.createElement(RadioButton, { key: choice.value, text: choice.title, selected: entry[field.objectKey] === choice.value, onSelected: () => {
40136
40137
  entry[field.objectKey] = choice.value;
40137
40138
  dispatch({
40138
- type: ActionType$4.UpdateDBEntry,
40139
+ type: ActionType$3.UpdateDBEntry,
40139
40140
  dbEntry: entry,
40140
40141
  });
40141
40142
  }, ariaLabel: choice.title }));
@@ -40147,7 +40148,7 @@ const AddOrEditDBEntry = (props) => {
40147
40148
  React__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) => {
40148
40149
  entry[field.objectKey] = (e.target.value);
40149
40150
  dispatch({
40150
- type: ActionType$4.UpdateDBEntry,
40151
+ type: ActionType$3.UpdateDBEntry,
40151
40152
  dbEntry: entry,
40152
40153
  });
40153
40154
  } }))));
@@ -40160,7 +40161,7 @@ const AddOrEditDBEntry = (props) => {
40160
40161
  entry[field.objectKey] = (e.target.value
40161
40162
  .replace(/[^0-9]/g, ''));
40162
40163
  dispatch({
40163
- type: ActionType$4.UpdateDBEntry,
40164
+ type: ActionType$3.UpdateDBEntry,
40164
40165
  dbEntry: entry,
40165
40166
  });
40166
40167
  } }))));
@@ -40190,7 +40191,7 @@ const AddOrEditDBEntry = (props) => {
40190
40191
  }
40191
40192
  // Save
40192
40193
  dispatch({
40193
- type: ActionType$4.UpdateDBEntry,
40194
+ type: ActionType$3.UpdateDBEntry,
40194
40195
  dbEntry: entry,
40195
40196
  });
40196
40197
  }, ariaLabel: choice.title }));
@@ -40205,7 +40206,7 @@ const AddOrEditDBEntry = (props) => {
40205
40206
  // Update entry and save
40206
40207
  entry[field.objectKey] = values;
40207
40208
  dispatch({
40208
- type: ActionType$4.UpdateDBEntry,
40209
+ type: ActionType$3.UpdateDBEntry,
40209
40210
  dbEntry: entry,
40210
40211
  });
40211
40212
  } })))));
@@ -40218,7 +40219,7 @@ const AddOrEditDBEntry = (props) => {
40218
40219
  React__default.createElement(CreatableMultiselect, { disabled: disabled, type: DBEntryFieldType$1.NumberArray, values: entry[field.objectKey] || [], onChange: (values) => {
40219
40220
  entry[field.objectKey] = values;
40220
40221
  dispatch({
40221
- type: ActionType$4.UpdateDBEntry,
40222
+ type: ActionType$3.UpdateDBEntry,
40222
40223
  dbEntry: entry,
40223
40224
  });
40224
40225
  } })))));
@@ -40267,7 +40268,7 @@ const AddOrEditDBEntry = (props) => {
40267
40268
  /* --------------- Main UI -------------- */
40268
40269
  /*----------------------------------------*/
40269
40270
  return (React__default.createElement("div", { className: "alert alert-light text-black" },
40270
- React__default.createElement("style", null, style$2),
40271
+ React__default.createElement("style", null, style$1),
40271
40272
  body));
40272
40273
  };
40273
40274
 
@@ -40292,7 +40293,7 @@ const generateEndpointPath = (collectionName, adminsOnly) => {
40292
40293
  */
40293
40294
  /* ------------- Actions ------------ */
40294
40295
  // Types of actions
40295
- var ActionType$3;
40296
+ var ActionType$2;
40296
40297
  (function (ActionType) {
40297
40298
  // Show adder
40298
40299
  ActionType["ShowAdder"] = "ShowAdder";
@@ -40306,7 +40307,7 @@ var ActionType$3;
40306
40307
  ActionType["StartDelete"] = "StartDelete";
40307
40308
  // Finish deletion process
40308
40309
  ActionType["FinishDelete"] = "FinishDelete";
40309
- })(ActionType$3 || (ActionType$3 = {}));
40310
+ })(ActionType$2 || (ActionType$2 = {}));
40310
40311
  /**
40311
40312
  * Reducer that executes actions
40312
40313
  * @author Yuen Ler Chow
@@ -40314,18 +40315,18 @@ var ActionType$3;
40314
40315
  * @param action action to execute
40315
40316
  * @returns updated state
40316
40317
  */
40317
- const reducer$4 = (state, action) => {
40318
+ const reducer$3 = (state, action) => {
40318
40319
  switch (action.type) {
40319
- case ActionType$3.FinishLoading: {
40320
+ case ActionType$2.FinishLoading: {
40320
40321
  return Object.assign(Object.assign({}, state), { loading: false, dbEntries: action.dbEntries });
40321
40322
  }
40322
- case ActionType$3.ShowAdder: {
40323
+ case ActionType$2.ShowAdder: {
40323
40324
  return Object.assign(Object.assign({}, state), { adding: true, dbEntryToEdit: undefined });
40324
40325
  }
40325
- case ActionType$3.ShowEditor: {
40326
+ case ActionType$2.ShowEditor: {
40326
40327
  return Object.assign(Object.assign({}, state), { adding: false, dbEntryToEdit: action.dbEntry });
40327
40328
  }
40328
- case ActionType$3.FinishAdd: {
40329
+ case ActionType$2.FinishAdd: {
40329
40330
  // Handle cancel
40330
40331
  const finishedEntry = action.dbEntry;
40331
40332
  if (!finishedEntry) {
@@ -40349,10 +40350,10 @@ const reducer$4 = (state, action) => {
40349
40350
  // Update the state
40350
40351
  return Object.assign(Object.assign({}, state), { adding: false, dbEntryToEdit: undefined, dbEntries: updatedDbEntries });
40351
40352
  }
40352
- case ActionType$3.StartDelete: {
40353
+ case ActionType$2.StartDelete: {
40353
40354
  return Object.assign(Object.assign({}, state), { loading: true });
40354
40355
  }
40355
- case ActionType$3.FinishDelete: {
40356
+ case ActionType$2.FinishDelete: {
40356
40357
  return Object.assign(Object.assign({}, state), { loading: false,
40357
40358
  // Remove the deleted entry from the list
40358
40359
  dbEntries: state.dbEntries.filter((entry) => {
@@ -40378,7 +40379,7 @@ const DBEntryManagerPanel = (props) => {
40378
40379
  loading: true,
40379
40380
  };
40380
40381
  // Initialize state
40381
- const [state, dispatch] = useReducer(reducer$4, initialState);
40382
+ const [state, dispatch] = useReducer(reducer$3, initialState);
40382
40383
  // Destructure common state
40383
40384
  const { adding, dbEntryToEdit, dbEntries, loading, } = state;
40384
40385
  /*------------------------------------------------------------------------*/
@@ -40404,7 +40405,7 @@ const DBEntryManagerPanel = (props) => {
40404
40405
  try {
40405
40406
  // Start loader
40406
40407
  dispatch({
40407
- type: ActionType$3.StartDelete,
40408
+ type: ActionType$2.StartDelete,
40408
40409
  });
40409
40410
  // Perform deletion
40410
40411
  yield visitServerEndpoint({
@@ -40413,7 +40414,7 @@ const DBEntryManagerPanel = (props) => {
40413
40414
  });
40414
40415
  // Finish loader
40415
40416
  dispatch({
40416
- type: ActionType$3.FinishDelete,
40417
+ type: ActionType$2.FinishDelete,
40417
40418
  dbEntry: entry,
40418
40419
  idPropName,
40419
40420
  });
@@ -40442,7 +40443,7 @@ const DBEntryManagerPanel = (props) => {
40442
40443
  });
40443
40444
  // Save loaded data
40444
40445
  dispatch({
40445
- type: ActionType$3.FinishLoading,
40446
+ type: ActionType$2.FinishLoading,
40446
40447
  dbEntries: data,
40447
40448
  });
40448
40449
  }
@@ -40485,7 +40486,7 @@ const DBEntryManagerPanel = (props) => {
40485
40486
  React__default.createElement("span", { className: "d-none d-md-inline ms-1" }, "Remove")),
40486
40487
  !disableEdit && (React__default.createElement("button", { type: "button", id: `DBEntryManagerPanel-edit-with-id-${entry[idPropName]}`, className: "btn btn-primary", "aria-label": `edit db entry: ${entry[titlePropName]}`, onClick: () => {
40487
40488
  dispatch({
40488
- type: ActionType$3.ShowEditor,
40489
+ type: ActionType$2.ShowEditor,
40489
40490
  dbEntry: entry,
40490
40491
  });
40491
40492
  } },
@@ -40495,7 +40496,7 @@ const DBEntryManagerPanel = (props) => {
40495
40496
  React__default.createElement("div", { className: "d-grid" },
40496
40497
  React__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: () => {
40497
40498
  dispatch({
40498
- type: ActionType$3.ShowAdder,
40499
+ type: ActionType$2.ShowAdder,
40499
40500
  });
40500
40501
  } },
40501
40502
  React__default.createElement(FontAwesomeIcon, { icon: faPlus, className: "me-2" }),
@@ -40507,7 +40508,7 @@ const DBEntryManagerPanel = (props) => {
40507
40508
  if (!loading && (adding || dbEntryToEdit)) {
40508
40509
  body = (React__default.createElement(AddOrEditDBEntry, { saveEndpointPath: endpoint, validateEntry: validateEntry, modifyEntry: modifyEntry, entryFields: entryFields, dbEntryToEdit: dbEntryToEdit, idPropName: idPropName, entries: dbEntries, itemName: itemName, onFinished: (entry) => {
40509
40510
  dispatch({
40510
- type: ActionType$3.FinishAdd,
40511
+ type: ActionType$2.FinishAdd,
40511
40512
  dbEntry: entry,
40512
40513
  idPropName,
40513
40514
  });
@@ -40524,228 +40525,6 @@ const DBEntryManagerPanel = (props) => {
40524
40525
  * @author Gabe Abrams
40525
40526
  */
40526
40527
  /*------------------------------------------------------------------------*/
40527
- /* ------------------------------ Constants ----------------------------- */
40528
- /*------------------------------------------------------------------------*/
40529
- // Tooltip widths
40530
- const TOOLTIP_WIDTH_THIN_REM = 5;
40531
- const TOOLTIP_WIDTH_NORMAL_REM = 7;
40532
- const TOOLTIP_WIDTH_WIDE_REM = 10;
40533
- // Tooltip border radius
40534
- const TOOLTIP_BORDER_RADIUS_REM = 0.3;
40535
- /*------------------------------------------------------------------------*/
40536
- /* -------------------------------- Style ------------------------------- */
40537
- /*------------------------------------------------------------------------*/
40538
- const style$1 = `
40539
- /* Container for contents and tooltip */
40540
- .Tooltip-outer-container {
40541
- position: relative;
40542
- }
40543
-
40544
- /* Container for just tooltip */
40545
- .Tooltip-tooltip-container {
40546
- /* Position in middle but take no space */
40547
- /* (so layout of page is unaffected) */
40548
- position: absolute;
40549
- display: inline-block;
40550
- top: 0;
40551
- left: 50%;
40552
- height: 0;
40553
- width: 0;
40554
- overflow: visible;
40555
- }
40556
-
40557
- /* Tooltip */
40558
- .Tooltip-tooltip {
40559
- /* Position above item */
40560
- display: inline-block;
40561
- position: absolute;
40562
- top: -2.3rem;
40563
- height: 1.8rem;
40564
- z-index: 1;
40565
-
40566
- /* Use standard black font */
40567
- font-size: 1rem;
40568
- color: black;
40569
-
40570
- /* Non-interactive */
40571
- pointer-events: none;
40572
- }
40573
-
40574
- /* Tooltip box (the rectangle surrounding the text) */
40575
- .Tooltip-box,
40576
- .Tooltip-box-shadow,
40577
- .Tooltip-box-highlight {
40578
- /* Fill all space with rectangle */
40579
- position: absolute;
40580
- left: 0;
40581
- top: 0;
40582
- display: inline-block;
40583
- width: 100%;
40584
- height: 100%;
40585
-
40586
- /* Rounded border */
40587
- border: 0.15rem solid black;
40588
- border-radius: ${TOOLTIP_BORDER_RADIUS_REM}rem;
40589
- }
40590
-
40591
- /* Tooltip highlight (the bright background to the text) */
40592
- .Tooltip-box-highlight {
40593
- /* Bootstrap warning variant background */
40594
- background-color: rgb(255, 193, 7);
40595
- border-radius: ${TOOLTIP_BORDER_RADIUS_REM}rem;
40596
-
40597
- /* Place on top */
40598
- z-index: -1;
40599
- }
40600
-
40601
- /* Tooltip box (the black rectangle) */
40602
- .Tooltip-box {
40603
- /* Plain black background */
40604
- background-color: black;
40605
-
40606
- /* Place in middle */
40607
- z-index: -2;
40608
- }
40609
-
40610
- /* Tooltip box shadow (the white shadow beneath the box) */
40611
- .Tooltip-box-shadow {
40612
- /* White shadow */
40613
- box-shadow: 0 0 0.3rem white;
40614
-
40615
- /* Place beneath */
40616
- z-index: -3;
40617
- }
40618
-
40619
- /* Tooltip contents (the text and icon) */
40620
- .Tooltip-contents {
40621
- /* Center text, don't allow overflow */
40622
- white-space: nowrap;
40623
- overflow: hidden;
40624
- text-align: center;
40625
- text-overflow: ellipsis;
40626
- display: flex;
40627
- align-items: center;
40628
- justify-content: center;
40629
-
40630
- /* Space within parent */
40631
- z-index: 1;
40632
- padding-left: 0.2rem;
40633
- padding-right: 0.2rem;
40634
- height: 100%;
40635
- }
40636
-
40637
- /* Tooltip text */
40638
- .Tooltip-text {
40639
- /* Center text, add ellipsis */
40640
- overflow: hidden;
40641
- text-align: center;
40642
- text-overflow: ellipsis;
40643
- }
40644
-
40645
- /* Classes to switch between tooltip visible/hidden */
40646
- .Tooltip-tooltip-visible-true {
40647
- opacity: 1;
40648
- }
40649
- .Tooltip-tooltip-visible-false {
40650
- opacity: 0;
40651
- }
40652
-
40653
- /* Classes to switch between tooltip sizes */
40654
- .Tooltip-size-thin {
40655
- width: ${TOOLTIP_WIDTH_THIN_REM}rem;
40656
- left: calc(50% - ${TOOLTIP_WIDTH_THIN_REM / 2}rem);
40657
- }
40658
- .Tooltip-size-normal {
40659
- width: ${TOOLTIP_WIDTH_NORMAL_REM}rem;
40660
- left: calc(50% - ${TOOLTIP_WIDTH_NORMAL_REM / 2}rem);
40661
- }
40662
- .Tooltip-size-wide {
40663
- width: ${TOOLTIP_WIDTH_WIDE_REM}rem;
40664
- left: calc(50% - ${TOOLTIP_WIDTH_WIDE_REM / 2}rem);
40665
- }
40666
-
40667
- /* Arrow (beneath tooltip) */
40668
- .Tooltip-arrow,
40669
- .Tooltip-arrow-shadow {
40670
- /* Position beneath tooltip */
40671
- position: absolute;
40672
- top: -1.5rem;
40673
- font-size: 1.5rem;
40674
- left: calc(50% - 0.5rem);
40675
- width: 0;
40676
- display: inline-block;
40677
-
40678
- /* Non-interactive */
40679
- pointer-events: none;
40680
- }
40681
-
40682
- /* Arrow itself */
40683
- .Tooltip-arrow {
40684
- color: black;
40685
- z-index: 4;
40686
- }
40687
-
40688
- /* Arrow shadow */
40689
- .Tooltip-arrow-shadow {
40690
- z-index: -1;
40691
-
40692
- /* Blur a white version of the caret as a shadow */
40693
- color: white;
40694
- filter: blur(0.2rem);
40695
- }
40696
-
40697
- /* Classes to switch between arrow visible/hidden */
40698
- .Tooltip-arrow-visible-true {
40699
- opacity: 1;
40700
- }
40701
- .Tooltip-arrow-visible-false {
40702
- opacity: 0;
40703
- }
40704
- `;
40705
- /* ------------- Actions ------------ */
40706
- // Types of actions
40707
- var ActionType$2;
40708
- (function (ActionType) {
40709
- // Make the tooltip visible
40710
- ActionType["Show"] = "Show";
40711
- // Make the tooltip invisible
40712
- ActionType["Hide"] = "Hide";
40713
- // Set nudge pixels
40714
- ActionType["SetNudgePx"] = "SetNudgePx";
40715
- // Set whether bottom left corner should be square
40716
- ActionType["SetSquareBottomLeft"] = "SetSquareBottomLeft";
40717
- // Set whether bottom right corner should be square
40718
- ActionType["SetSquareBottomRight"] = "SetSquareBottomRight";
40719
- })(ActionType$2 || (ActionType$2 = {}));
40720
- /**
40721
- * Reducer that executes actions
40722
- * @author Gabe Abrams
40723
- * @param state current state
40724
- * @param action action to execute
40725
- */
40726
- const reducer$3 = (state, action) => {
40727
- switch (action.type) {
40728
- case ActionType$2.Show: {
40729
- return Object.assign(Object.assign({}, state), { isVisible: true });
40730
- }
40731
- case ActionType$2.Hide: {
40732
- return Object.assign(Object.assign({}, state), { isVisible: false, nudgePx: 0 });
40733
- }
40734
- case ActionType$2.SetNudgePx: {
40735
- return Object.assign(Object.assign({}, state), { nudgePx: action.nudgePx });
40736
- }
40737
- case ActionType$2.SetSquareBottomLeft: {
40738
- return Object.assign(Object.assign({}, state), { squareBottomLeft: action.squareBottomLeft });
40739
- }
40740
- case ActionType$2.SetSquareBottomRight: {
40741
- return Object.assign(Object.assign({}, state), { squareBottomRight: action.squareBottomRight });
40742
- }
40743
- default: {
40744
- return state;
40745
- }
40746
- }
40747
- };
40748
- /*------------------------------------------------------------------------*/
40749
40528
  /* ------------------------------ Component ----------------------------- */
40750
40529
  /*------------------------------------------------------------------------*/
40751
40530
  const Tooltip = (props) => {
@@ -40754,21 +40533,10 @@ const Tooltip = (props) => {
40754
40533
  /*------------------------------------------------------------------------*/
40755
40534
  /* -------------- Props ------------- */
40756
40535
  // Destructure all props
40757
- const { icon, text, children, wide, thin, containerIsDisplayBlock, } = props;
40758
- /* -------------- State ------------- */
40759
- // Initial state
40760
- const initialState = {
40761
- isVisible: false,
40762
- nudgePx: 0,
40763
- };
40764
- // Initialize state
40765
- const [state, dispatch] = useReducer(reducer$3, initialState);
40766
- // Destructure common state
40767
- const { isVisible, nudgePx, squareBottomLeft, squareBottomRight, } = state;
40536
+ const { text, children, } = props;
40768
40537
  /* -------------- Refs -------------- */
40769
- // Initialize refs
40770
- const tooltipContainer = useRef(null);
40771
- const arrowElement = useRef(null);
40538
+ // Child ref
40539
+ const childRef = useRef(undefined);
40772
40540
  /*------------------------------------------------------------------------*/
40773
40541
  /* ------------------------- Lifecycle Functions ------------------------ */
40774
40542
  /*------------------------------------------------------------------------*/
@@ -40777,109 +40545,29 @@ const Tooltip = (props) => {
40777
40545
  * @author Gabe Abrams
40778
40546
  */
40779
40547
  useEffect(() => {
40780
- // Update tooltip container position
40781
- if (tooltipContainer.current && isVisible) {
40782
- // Get the tooltip container location
40783
- const tooltipContainerRect = (tooltipContainer
40784
- .current
40785
- .getBoundingClientRect());
40786
- // Get the window width
40787
- const windowWidth = window.innerWidth;
40788
- // Calculate new nudge value
40789
- let newNudgePx;
40790
- if (tooltipContainerRect.left < 0) {
40791
- // Tooltip is off the left side of the screen
40792
- newNudgePx = -1 * tooltipContainerRect.left;
40793
- }
40794
- else if (tooltipContainerRect.right > windowWidth) {
40795
- // Tooltip is off the right side of the screen
40796
- newNudgePx = -1 * (tooltipContainerRect.right - windowWidth);
40797
- }
40798
- else {
40799
- // Tooltip is in the middle of the screen
40800
- newNudgePx = 0;
40801
- }
40802
- // Update state
40803
- dispatch({
40804
- type: ActionType$2.SetNudgePx,
40805
- nudgePx: newNudgePx,
40806
- });
40807
- }
40808
- // Update border rounding
40809
- if (arrowElement.current && isVisible) {
40810
- // Get the arrow location
40811
- const arrowRect = (arrowElement
40812
- .current
40813
- .getBoundingClientRect());
40814
- // REM in pixels given font size
40815
- const remInPixels = Number.parseInt(getComputedStyle(document.documentElement).fontSize, 10);
40816
- // Set bottom left corner rounding
40817
- dispatch({
40818
- type: ActionType$2.SetSquareBottomLeft,
40819
- squareBottomLeft: (arrowRect.left < (TOOLTIP_BORDER_RADIUS_REM * remInPixels)),
40820
- });
40821
- // Set bottom right corner rounding
40822
- dispatch({
40823
- type: ActionType$2.SetSquareBottomRight,
40824
- squareBottomRight: (arrowRect.right
40825
- > window.innerWidth - (TOOLTIP_BORDER_RADIUS_REM * remInPixels)),
40826
- });
40548
+ // Skip if no child
40549
+ if (!childRef.current) {
40550
+ return;
40827
40551
  }
40828
- }, [isVisible]);
40552
+ // Initialize tooltip
40553
+ const t = new Tooltip$1(childRef.current, {
40554
+ title: text,
40555
+ placement: 'top',
40556
+ trigger: 'hover',
40557
+ });
40558
+ // Clean up tooltip
40559
+ return () => {
40560
+ t.dispose();
40561
+ };
40562
+ }, [text]);
40829
40563
  /*------------------------------------------------------------------------*/
40830
40564
  /* ------------------------------- Render ------------------------------- */
40831
40565
  /*------------------------------------------------------------------------*/
40832
40566
  /*----------------------------------------*/
40833
40567
  /* --------------- Main UI -------------- */
40834
40568
  /*----------------------------------------*/
40835
- // Determine size
40836
- let size = 'normal';
40837
- if (wide) {
40838
- size = 'wide';
40839
- }
40840
- else if (thin) {
40841
- size = 'thin';
40842
- }
40843
- // Render
40844
- return (React__default.createElement("div", { className: `Tooltip-outer-container ${containerIsDisplayBlock ? 'd-block' : 'd-inline-block'}}`, "aria-label": text, onMouseEnter: () => {
40845
- dispatch({
40846
- type: ActionType$2.Show,
40847
- });
40848
- }, onMouseLeave: () => {
40849
- dispatch({
40850
- type: ActionType$2.Hide,
40851
- });
40852
- }, onFocus: () => {
40853
- dispatch({
40854
- type: ActionType$2.Show,
40855
- });
40856
- }, onBlur: () => {
40857
- dispatch({
40858
- type: ActionType$2.Hide,
40859
- });
40860
- } },
40861
- React__default.createElement("style", null, style$1),
40862
- children,
40863
- React__default.createElement("div", { className: `Tooltip-arrow Tooltip-arrow-visible-${isVisible ? 'true' : 'false'}`, ref: arrowElement },
40864
- React__default.createElement(FontAwesomeIcon, { icon: faCaretDown })),
40865
- React__default.createElement("div", { className: `Tooltip-arrow-shadow Tooltip-arrow-visible-${isVisible ? 'true' : 'false'}` },
40866
- React__default.createElement(FontAwesomeIcon, { icon: faCaretDown })),
40867
- React__default.createElement("div", { className: "Tooltip-tooltip-container" },
40868
- React__default.createElement("div", { className: `Tooltip-tooltip Tooltip-tooltip-visible-${isVisible ? 'true' : 'false'} Tooltip-size-${size}`, role: "tooltip", ref: tooltipContainer, style: {
40869
- transform: `translateX(${nudgePx}px)`,
40870
- } },
40871
- React__default.createElement("div", { className: "Tooltip-box-highlight" }),
40872
- React__default.createElement("div", { className: "Tooltip-box", style: {
40873
- borderBottomLeftRadius: squareBottomLeft ? 0 : undefined,
40874
- borderBottomRightRadius: squareBottomRight ? 0 : undefined,
40875
- } }),
40876
- React__default.createElement("div", { className: "Tooltip-box-shadow", style: {
40877
- borderBottomLeftRadius: squareBottomLeft ? 0 : undefined,
40878
- borderBottomRightRadius: squareBottomRight ? 0 : undefined,
40879
- } }),
40880
- React__default.createElement("div", { className: "Tooltip-contents" },
40881
- icon && (React__default.createElement(FontAwesomeIcon, { icon: icon, className: "me-1" })),
40882
- React__default.createElement("span", { className: "Tooltip-text" }, text))))));
40569
+ // Clone child and add ref
40570
+ return React__default.cloneElement(children, { ref: childRef });
40883
40571
  };
40884
40572
 
40885
40573
  /**
@@ -42564,7 +42252,7 @@ const genRouteHandler = (opts) => {
42564
42252
  * @author Gabe Abrams
42565
42253
  */
42566
42254
  const logServerEvent = (logOpts) => __awaiter(void 0, void 0, void 0, function* () {
42567
- var _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
42255
+ var _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
42568
42256
  // NOTE: internally, we slip through an opts.overrideAsClientEvent boolean
42569
42257
  // that indicates that this is actually a client event, but we don't
42570
42258
  // include that in the LogFunction type because this is internal and
@@ -42648,7 +42336,7 @@ const genRouteHandler = (opts) => {
42648
42336
  catch (err) {
42649
42337
  // Print because we cannot store the error
42650
42338
  // eslint-disable-next-line no-console
42651
- console.error('Could not log the following:', opts);
42339
+ console.error('Could not log the following:', logOpts, 'due to this error:', ((_q = err) !== null && _q !== void 0 ? _q : {}).message, ((_r = err) !== null && _r !== void 0 ? _r : {}).stack);
42652
42340
  // Create a dummy log to return
42653
42341
  const dummyMainInfo = {
42654
42342
  id: '-1',