dce-reactkit 3.5.2 → 3.5.4

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,7 +1,7 @@
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
3
  import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
4
- import { faExclamationTriangle, 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
+ import { faExclamationTriangle, 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';
5
5
  import { faCircle as faCircle$1, faSquareMinus, faSquare } from '@fortawesome/free-regular-svg-icons';
6
6
 
7
7
  /******************************************************************************
@@ -293,7 +293,7 @@ const ModalButtonTypeToLabelAndVariant = {
293
293
  /*------------------------------------------------------------------------*/
294
294
  /* Style */
295
295
  /*------------------------------------------------------------------------*/
296
- const style$8 = `
296
+ const style$9 = `
297
297
  .Modal-backdrop {
298
298
  position: fixed;
299
299
  top: 0;
@@ -467,7 +467,7 @@ const Modal = (props) => {
467
467
  left: 0,
468
468
  right: 0,
469
469
  } },
470
- React__default.createElement("style", null, style$8),
470
+ React__default.createElement("style", null, style$9),
471
471
  React__default.createElement("div", { className: `Modal-backdrop ${backdropAnimationClass}`, style: {
472
472
  zIndex: 5000000003,
473
473
  }, onClick: () => __awaiter(void 0, void 0, void 0, function* () {
@@ -966,7 +966,7 @@ const AppWrapper = (props) => {
966
966
  /*------------------------------------------------------------------------*/
967
967
  /* Style */
968
968
  /*------------------------------------------------------------------------*/
969
- const style$7 = `
969
+ const style$8 = `
970
970
  /* Container fades in */
971
971
  .LoadingSpinner-container {
972
972
  animation-name: LoadingSpinner-container-fade-in;
@@ -1044,7 +1044,7 @@ const LoadingSpinner = () => {
1044
1044
  /*------------------------------------------------------------------------*/
1045
1045
  // Add all four blips to a container
1046
1046
  return (React__default.createElement("div", { className: "text-center LoadingSpinner LoadingSpinner-container" },
1047
- React__default.createElement("style", null, style$7),
1047
+ React__default.createElement("style", null, style$8),
1048
1048
  React__default.createElement(FontAwesomeIcon, { icon: faCircle, className: "LoadingSpinner-blip-1 me-1" }),
1049
1049
  React__default.createElement(FontAwesomeIcon, { icon: faCircle, className: "LoadingSpinner-blip-2 me-1" }),
1050
1050
  React__default.createElement(FontAwesomeIcon, { icon: faCircle, className: "LoadingSpinner-blip-3 me-1" }),
@@ -1058,7 +1058,7 @@ const LoadingSpinner = () => {
1058
1058
  /*------------------------------------------------------------------------*/
1059
1059
  /* Style */
1060
1060
  /*------------------------------------------------------------------------*/
1061
- const style$6 = `
1061
+ const style$7 = `
1062
1062
  /* Tab Box */
1063
1063
  .TabBox-box {
1064
1064
  /* Light Border */
@@ -1138,7 +1138,7 @@ const TabBox = (props) => {
1138
1138
  /*----------------------------------------*/
1139
1139
  // Full UI
1140
1140
  return (React__default.createElement("div", { className: `TabBox-container ${noBottomMargin ? '' : 'mb-2'}` },
1141
- React__default.createElement("style", null, style$6),
1141
+ React__default.createElement("style", null, style$7),
1142
1142
  React__default.createElement("div", { className: "TabBox-title-container" },
1143
1143
  React__default.createElement("div", { className: "TabBox-title" }, title)),
1144
1144
  React__default.createElement("div", { className: `TabBox-box ps-2 pt-2 pe-2 ${noBottomPadding ? '' : 'pb-2'}` },
@@ -1460,7 +1460,7 @@ const SimpleDateChooser = (props) => {
1460
1460
  /*------------------------------------------------------------------------*/
1461
1461
  /* Style */
1462
1462
  /*------------------------------------------------------------------------*/
1463
- const style$5 = `
1463
+ const style$6 = `
1464
1464
  .Drawer-container {
1465
1465
  margin-left: 1rem;
1466
1466
  margin-right: 1rem;
@@ -1494,7 +1494,7 @@ const Drawer = (props) => {
1494
1494
  return (React__default.createElement("div", { className: "Drawer-container", style: {
1495
1495
  backgroundColor: (customBackgroundColor !== null && customBackgroundColor !== void 0 ? customBackgroundColor : undefined),
1496
1496
  } },
1497
- React__default.createElement("style", null, style$5),
1497
+ React__default.createElement("style", null, style$6),
1498
1498
  children));
1499
1499
  };
1500
1500
 
@@ -1505,7 +1505,7 @@ const Drawer = (props) => {
1505
1505
  /*------------------------------------------------------------------------*/
1506
1506
  /* Style */
1507
1507
  /*------------------------------------------------------------------------*/
1508
- const style$4 = `
1508
+ const style$5 = `
1509
1509
  .PopSuccessMark-outer-container {
1510
1510
  position: relative;
1511
1511
  display: inline-block;
@@ -1610,7 +1610,7 @@ const PopSuccessMark = (props) => {
1610
1610
  width: `${sizeRem}rem`,
1611
1611
  height: `${sizeRem}rem`,
1612
1612
  }, "aria-label": "checkmark indicating success" },
1613
- React__default.createElement("style", null, style$4),
1613
+ React__default.createElement("style", null, style$5),
1614
1614
  React__default.createElement("div", { className: `PopSuccessMark-check-stroke-1 bg-${checkVariant}`, style: {
1615
1615
  borderRadius: `${sizeRem / 5}rem`,
1616
1616
  } }),
@@ -1626,7 +1626,7 @@ const PopSuccessMark = (props) => {
1626
1626
  /*------------------------------------------------------------------------*/
1627
1627
  /* Style */
1628
1628
  /*------------------------------------------------------------------------*/
1629
- const style$3 = `
1629
+ const style$4 = `
1630
1630
  .PopFailureMark-outer-container {
1631
1631
  position: relative;
1632
1632
  display: inline-block;
@@ -1730,7 +1730,7 @@ const PopFailureMark = (props) => {
1730
1730
  width: `${sizeRem}rem`,
1731
1731
  height: `${sizeRem}rem`,
1732
1732
  }, "aria-label": "mark indicating failure" },
1733
- React__default.createElement("style", null, style$3),
1733
+ React__default.createElement("style", null, style$4),
1734
1734
  React__default.createElement("div", { className: `PopFailureMark-x-stroke-1 bg-${xVariant}`, style: {
1735
1735
  borderRadius: `${sizeRem / 5}rem`,
1736
1736
  } }),
@@ -1746,7 +1746,7 @@ const PopFailureMark = (props) => {
1746
1746
  /*------------------------------------------------------------------------*/
1747
1747
  /* Style */
1748
1748
  /*------------------------------------------------------------------------*/
1749
- const style$2 = `
1749
+ const style$3 = `
1750
1750
  .PopPendingMark-outer-container {
1751
1751
  position: relative;
1752
1752
  display: inline-block;
@@ -1819,7 +1819,7 @@ const PopPendingMark = (props) => {
1819
1819
  width: `${sizeRem}rem`,
1820
1820
  height: `${sizeRem}rem`,
1821
1821
  }, "aria-label": "mark indicating that the item is pending" },
1822
- React__default.createElement("style", null, style$2),
1822
+ React__default.createElement("style", null, style$3),
1823
1823
  React__default.createElement("div", null,
1824
1824
  React__default.createElement(FontAwesomeIcon, { icon: faHourglass, className: `PopPendingMark-hourglass text-${hourglassVariant}`, style: {
1825
1825
  fontSize: `${sizeRem * 0.6}rem`,
@@ -1832,27 +1832,27 @@ const PopPendingMark = (props) => {
1832
1832
  */
1833
1833
  /* ------------- Actions ------------ */
1834
1834
  // Types of actions
1835
- var ActionType$6;
1835
+ var ActionType$7;
1836
1836
  (function (ActionType) {
1837
1837
  // Indicate that the text was recently copied
1838
1838
  ActionType["IndicateRecentlyCopied"] = "indicate-recently-copied";
1839
1839
  // Clear the status
1840
1840
  ActionType["ClearRecentlyCopiedStatus"] = "clear-recently-copied-status";
1841
- })(ActionType$6 || (ActionType$6 = {}));
1841
+ })(ActionType$7 || (ActionType$7 = {}));
1842
1842
  /**
1843
1843
  * Reducer that executes actions
1844
1844
  * @author Gabe Abrams
1845
1845
  * @param state current state
1846
1846
  * @param action action to execute
1847
1847
  */
1848
- const reducer$6 = (state, action) => {
1848
+ const reducer$7 = (state, action) => {
1849
1849
  switch (action.type) {
1850
- case ActionType$6.IndicateRecentlyCopied: {
1850
+ case ActionType$7.IndicateRecentlyCopied: {
1851
1851
  return {
1852
1852
  recentlyCopied: true,
1853
1853
  };
1854
1854
  }
1855
- case ActionType$6.ClearRecentlyCopiedStatus: {
1855
+ case ActionType$7.ClearRecentlyCopiedStatus: {
1856
1856
  return {
1857
1857
  recentlyCopied: false,
1858
1858
  };
@@ -1878,7 +1878,7 @@ const CopiableBox = (props) => {
1878
1878
  recentlyCopied: false,
1879
1879
  };
1880
1880
  // Initialize state
1881
- const [state, dispatch] = useReducer(reducer$6, initialState);
1881
+ const [state, dispatch] = useReducer(reducer$7, initialState);
1882
1882
  // Destructure common state
1883
1883
  const { recentlyCopied, } = state;
1884
1884
  /*------------------------------------------------------------------------*/
@@ -1898,13 +1898,13 @@ const CopiableBox = (props) => {
1898
1898
  }
1899
1899
  // Show copied notice
1900
1900
  dispatch({
1901
- type: ActionType$6.IndicateRecentlyCopied,
1901
+ type: ActionType$7.IndicateRecentlyCopied,
1902
1902
  });
1903
1903
  // Wait a moment
1904
1904
  yield waitMs(4000);
1905
1905
  // Hide copied notice
1906
1906
  dispatch({
1907
- type: ActionType$6.ClearRecentlyCopiedStatus,
1907
+ type: ActionType$7.ClearRecentlyCopiedStatus,
1908
1908
  });
1909
1909
  });
1910
1910
  /*------------------------------------------------------------------------*/
@@ -1960,20 +1960,20 @@ const CopiableBox = (props) => {
1960
1960
  */
1961
1961
  /* ------------- Actions ------------ */
1962
1962
  // Types of actions
1963
- var ActionType$5;
1963
+ var ActionType$6;
1964
1964
  (function (ActionType) {
1965
1965
  // Toggle whether a child are being shown
1966
1966
  ActionType["ToggleChild"] = "toggle-child";
1967
- })(ActionType$5 || (ActionType$5 = {}));
1967
+ })(ActionType$6 || (ActionType$6 = {}));
1968
1968
  /**
1969
1969
  * Reducer that executes actions
1970
1970
  * @author Gabe Abrams
1971
1971
  * @param state current state
1972
1972
  * @param action action to execute
1973
1973
  */
1974
- const reducer$5 = (state, action) => {
1974
+ const reducer$6 = (state, action) => {
1975
1975
  switch (action.type) {
1976
- case ActionType$5.ToggleChild: {
1976
+ case ActionType$6.ToggleChild: {
1977
1977
  return Object.assign(Object.assign({}, state), { childExpanded: Object.assign(Object.assign({}, state.childExpanded), { [String(action.id)]: !state.childExpanded[String(action.id)] }) });
1978
1978
  }
1979
1979
  default: {
@@ -2002,7 +2002,7 @@ const NestableItemList = (props) => {
2002
2002
  childExpanded: initChildExpanded,
2003
2003
  };
2004
2004
  // Initialize state
2005
- const [state, dispatch] = useReducer(reducer$5, initialState);
2005
+ const [state, dispatch] = useReducer(reducer$6, initialState);
2006
2006
  // Destructure common state
2007
2007
  const { childExpanded, } = state;
2008
2008
  /*------------------------------------------------------------------------*/
@@ -2092,7 +2092,7 @@ const NestableItemList = (props) => {
2092
2092
  backgroundColor: 'transparent',
2093
2093
  }, type: "button", onClick: () => {
2094
2094
  dispatch({
2095
- type: ActionType$5.ToggleChild,
2095
+ type: ActionType$6.ToggleChild,
2096
2096
  id: item.id,
2097
2097
  });
2098
2098
  }, "aria-label": `${childExpanded[item.id] ? 'Hide' : 'Show'} items in ${item.name}` },
@@ -2368,7 +2368,7 @@ var SortType;
2368
2368
  })(SortType || (SortType = {}));
2369
2369
  /* ------------- Actions ------------ */
2370
2370
  // Types of actions
2371
- var ActionType$4;
2371
+ var ActionType$5;
2372
2372
  (function (ActionType) {
2373
2373
  // Toggle sort column param
2374
2374
  ActionType["ToggleSortColumn"] = "toggle-sort-column";
@@ -2380,16 +2380,16 @@ var ActionType$4;
2380
2380
  ActionType["ShowAllColumns"] = "show-all-columns";
2381
2381
  // Hide all columns
2382
2382
  ActionType["HideAllColumns"] = "hide-all-columns";
2383
- })(ActionType$4 || (ActionType$4 = {}));
2383
+ })(ActionType$5 || (ActionType$5 = {}));
2384
2384
  /**
2385
2385
  * Reducer that executes actions
2386
2386
  * @author Gabe Abrams
2387
2387
  * @param state current state
2388
2388
  * @param action action to execute
2389
2389
  */
2390
- const reducer$4 = (state, action) => {
2390
+ const reducer$5 = (state, action) => {
2391
2391
  switch (action.type) {
2392
- case ActionType$4.ToggleSortColumn: {
2392
+ case ActionType$5.ToggleSortColumn: {
2393
2393
  if (action.param !== state.sortColumnParam) {
2394
2394
  // Different column param
2395
2395
  return Object.assign(Object.assign({}, state), { sortColumnParam: action.param, sortType: SortType.Ascending });
@@ -2401,22 +2401,22 @@ const reducer$4 = (state, action) => {
2401
2401
  // Stop sorting by column
2402
2402
  return Object.assign(Object.assign({}, state), { sortColumnParam: undefined, sortType: SortType.Ascending });
2403
2403
  }
2404
- case ActionType$4.UpdateColumnVisibility: {
2404
+ case ActionType$5.UpdateColumnVisibility: {
2405
2405
  const { columnVisibilityMap } = state;
2406
2406
  columnVisibilityMap[action.param] = action.visible;
2407
2407
  return Object.assign(Object.assign({}, state), { columnVisibilityMap });
2408
2408
  }
2409
- case ActionType$4.ToggleColVisCusModalVisibility: {
2409
+ case ActionType$5.ToggleColVisCusModalVisibility: {
2410
2410
  return Object.assign(Object.assign({}, state), { columnVisibilityCustomizationModalVisible: !state.columnVisibilityCustomizationModalVisible });
2411
2411
  }
2412
- case ActionType$4.ShowAllColumns: {
2412
+ case ActionType$5.ShowAllColumns: {
2413
2413
  const { columnVisibilityMap } = state;
2414
2414
  Object.keys(columnVisibilityMap).forEach((param) => {
2415
2415
  columnVisibilityMap[param] = true;
2416
2416
  });
2417
2417
  return Object.assign(Object.assign({}, state), { columnVisibilityMap });
2418
2418
  }
2419
- case ActionType$4.HideAllColumns: {
2419
+ case ActionType$5.HideAllColumns: {
2420
2420
  const { columnVisibilityMap } = state;
2421
2421
  Object.keys(columnVisibilityMap).forEach((param) => {
2422
2422
  columnVisibilityMap[param] = false;
@@ -2463,7 +2463,7 @@ const IntelliTable = (props) => {
2463
2463
  columnVisibilityCustomizationModalVisible: false,
2464
2464
  };
2465
2465
  // Initialize state
2466
- const [state, dispatch] = useReducer(reducer$4, initialState);
2466
+ const [state, dispatch] = useReducer(reducer$5, initialState);
2467
2467
  // Destructure common state
2468
2468
  const { sortColumnParam, sortType, columnVisibilityMap, columnVisibilityCustomizationModalVisible, } = state;
2469
2469
  /*------------------------------------------------------------------------*/
@@ -2486,13 +2486,13 @@ const IntelliTable = (props) => {
2486
2486
  return alert$1('Choose at least one column', 'To continue, you have to choose at least one column to show');
2487
2487
  }
2488
2488
  dispatch({
2489
- type: ActionType$4.ToggleColVisCusModalVisibility,
2489
+ type: ActionType$5.ToggleColVisCusModalVisibility,
2490
2490
  });
2491
2491
  }, okayVariant: Variant$1.Light },
2492
2492
  columns.map((column) => {
2493
2493
  return (React__default.createElement(CheckboxButton, { key: column.param, id: `IntelliTable-${id}-toggle-visibility-${column.param}`, className: "mb-2", text: column.title, onChanged: (checked) => {
2494
2494
  dispatch({
2495
- type: ActionType$4.UpdateColumnVisibility,
2495
+ type: ActionType$5.UpdateColumnVisibility,
2496
2496
  param: column.param,
2497
2497
  visible: checked,
2498
2498
  });
@@ -2501,12 +2501,12 @@ const IntelliTable = (props) => {
2501
2501
  React__default.createElement("div", { className: "mt-3" }, "Or you can:"),
2502
2502
  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: () => {
2503
2503
  dispatch({
2504
- type: ActionType$4.ShowAllColumns,
2504
+ type: ActionType$5.ShowAllColumns,
2505
2505
  });
2506
2506
  } }, "Select All"),
2507
2507
  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: () => {
2508
2508
  dispatch({
2509
- type: ActionType$4.HideAllColumns,
2509
+ type: ActionType$5.HideAllColumns,
2510
2510
  });
2511
2511
  } }, "Deselect All")));
2512
2512
  }
@@ -2557,7 +2557,7 @@ const IntelliTable = (props) => {
2557
2557
  React__default.createElement("div", null,
2558
2558
  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: () => {
2559
2559
  dispatch({
2560
- type: ActionType$4.ToggleSortColumn,
2560
+ type: ActionType$5.ToggleSortColumn,
2561
2561
  param: column.param,
2562
2562
  });
2563
2563
  } },
@@ -2746,7 +2746,7 @@ const IntelliTable = (props) => {
2746
2746
  React__default.createElement(CSVDownloadButton, { "aria-label": `download data as csv for ${title}`, id: `IntelliTable-${id}-download-as-csv`, filename: filename, csv: csv }),
2747
2747
  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: () => {
2748
2748
  dispatch({
2749
- type: ActionType$4.ToggleColVisCusModalVisibility,
2749
+ type: ActionType$5.ToggleColVisCusModalVisibility,
2750
2750
  });
2751
2751
  } },
2752
2752
  "Show/Hide Cols",
@@ -2778,7 +2778,7 @@ var FilterDrawer;
2778
2778
  /*------------------------------------------------------------------------*/
2779
2779
  /* Style */
2780
2780
  /*------------------------------------------------------------------------*/
2781
- const style$1 = `
2781
+ const style$2 = `
2782
2782
  .LogReviewer-outer-container {
2783
2783
  /* Full Screen */
2784
2784
  display: inline-block;
@@ -3112,7 +3112,7 @@ const genHumanReadableName = (machineReadableName) => {
3112
3112
  };
3113
3113
  /* ------------- Actions ------------ */
3114
3114
  // Types of actions
3115
- var ActionType$3;
3115
+ var ActionType$4;
3116
3116
  (function (ActionType) {
3117
3117
  // Show the loading bar
3118
3118
  ActionType["StartLoading"] = "start-loading";
@@ -3134,45 +3134,45 @@ var ActionType$3;
3134
3134
  ActionType["UpdateActionErrorFilterState"] = "update-action-error-filter-state";
3135
3135
  // Update the advanced filter state
3136
3136
  ActionType["UpdateAdvancedFilterState"] = "update-advanced-filter-state";
3137
- })(ActionType$3 || (ActionType$3 = {}));
3137
+ })(ActionType$4 || (ActionType$4 = {}));
3138
3138
  /**
3139
3139
  * Reducer that executes actions
3140
3140
  * @author Gabe Abrams
3141
3141
  * @param state current state
3142
3142
  * @param action action to execute
3143
3143
  */
3144
- const reducer$3 = (state, action) => {
3144
+ const reducer$4 = (state, action) => {
3145
3145
  switch (action.type) {
3146
- case ActionType$3.StartLoading: {
3146
+ case ActionType$4.StartLoading: {
3147
3147
  return Object.assign(Object.assign({}, state), { loading: true });
3148
3148
  }
3149
- case ActionType$3.FinishLoading: {
3149
+ case ActionType$4.FinishLoading: {
3150
3150
  return Object.assign(Object.assign({}, state), { loading: false, logMap: action.logMap });
3151
3151
  }
3152
- case ActionType$3.ToggleFilterDrawer: {
3152
+ case ActionType$4.ToggleFilterDrawer: {
3153
3153
  return Object.assign(Object.assign({}, state), { expandedFilterDrawer: (state.expandedFilterDrawer === action.filterDrawer
3154
3154
  ? undefined // hide
3155
3155
  : action.filterDrawer) });
3156
3156
  }
3157
- case ActionType$3.HideFilterDrawer: {
3157
+ case ActionType$4.HideFilterDrawer: {
3158
3158
  return Object.assign(Object.assign({}, state), { expandedFilterDrawer: undefined });
3159
3159
  }
3160
- case ActionType$3.ResetFilters: {
3160
+ case ActionType$4.ResetFilters: {
3161
3161
  return Object.assign(Object.assign({}, state), { dateFilterState: action.initDateFilterState, contextFilterState: action.initContextFilterState, tagFilterState: action.initTagFilterState, actionErrorFilterState: action.initActionErrorFilterState, advancedFilterState: action.initAdvancedFilterState });
3162
3162
  }
3163
- case ActionType$3.UpdateDateFilterState: {
3163
+ case ActionType$4.UpdateDateFilterState: {
3164
3164
  return Object.assign(Object.assign({}, state), { dateFilterState: action.dateFilterState });
3165
3165
  }
3166
- case ActionType$3.UpdateContextFilterState: {
3166
+ case ActionType$4.UpdateContextFilterState: {
3167
3167
  return Object.assign(Object.assign({}, state), { contextFilterState: action.contextFilterState });
3168
3168
  }
3169
- case ActionType$3.UpdateTagFilterState: {
3169
+ case ActionType$4.UpdateTagFilterState: {
3170
3170
  return Object.assign(Object.assign({}, state), { tagFilterState: action.tagFilterState });
3171
3171
  }
3172
- case ActionType$3.UpdateActionErrorFilterState: {
3172
+ case ActionType$4.UpdateActionErrorFilterState: {
3173
3173
  return Object.assign(Object.assign({}, state), { actionErrorFilterState: action.actionErrorFilterState });
3174
3174
  }
3175
- case ActionType$3.UpdateAdvancedFilterState: {
3175
+ case ActionType$4.UpdateAdvancedFilterState: {
3176
3176
  return Object.assign(Object.assign({}, state), { advancedFilterState: action.advancedFilterState });
3177
3177
  }
3178
3178
  default: {
@@ -3301,7 +3301,7 @@ const LogReviewer = (props) => {
3301
3301
  advancedFilterState: initAdvancedFilterState,
3302
3302
  };
3303
3303
  // Initialize state
3304
- const [state, dispatch] = useReducer(reducer$3, initialState);
3304
+ const [state, dispatch] = useReducer(reducer$4, initialState);
3305
3305
  // Destructure common state
3306
3306
  const { loading, logMap, expandedFilterDrawer, dateFilterState, contextFilterState, tagFilterState, actionErrorFilterState, advancedFilterState, } = state;
3307
3307
  /*------------------------------------------------------------------------*/
@@ -3352,7 +3352,7 @@ const LogReviewer = (props) => {
3352
3352
  const handleDateRangeUpdated = (newDateFilterState) => __awaiter(void 0, void 0, void 0, function* () {
3353
3353
  // Update state
3354
3354
  dispatch({
3355
- type: ActionType$3.UpdateDateFilterState,
3355
+ type: ActionType$4.UpdateDateFilterState,
3356
3356
  dateFilterState: newDateFilterState,
3357
3357
  });
3358
3358
  // Check which year/month combos we need to load
@@ -3363,7 +3363,7 @@ const LogReviewer = (props) => {
3363
3363
  }
3364
3364
  // Start loading
3365
3365
  dispatch({
3366
- type: ActionType$3.StartLoading,
3366
+ type: ActionType$4.StartLoading,
3367
3367
  });
3368
3368
  // Load required months
3369
3369
  try {
@@ -3387,7 +3387,7 @@ const LogReviewer = (props) => {
3387
3387
  }
3388
3388
  // Finish loading
3389
3389
  dispatch({
3390
- type: ActionType$3.FinishLoading,
3390
+ type: ActionType$4.FinishLoading,
3391
3391
  logMap,
3392
3392
  });
3393
3393
  });
@@ -3426,7 +3426,7 @@ const LogReviewer = (props) => {
3426
3426
  React__default.createElement("div", { className: "LogReviewer-filter-toggle-buttons alert alert-secondary p-2 m-0" },
3427
3427
  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: () => {
3428
3428
  dispatch({
3429
- type: ActionType$3.ToggleFilterDrawer,
3429
+ type: ActionType$4.ToggleFilterDrawer,
3430
3430
  filterDrawer: FilterDrawer.Date,
3431
3431
  });
3432
3432
  } },
@@ -3434,7 +3434,7 @@ const LogReviewer = (props) => {
3434
3434
  "Date"),
3435
3435
  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: () => {
3436
3436
  dispatch({
3437
- type: ActionType$3.ToggleFilterDrawer,
3437
+ type: ActionType$4.ToggleFilterDrawer,
3438
3438
  filterDrawer: FilterDrawer.Context,
3439
3439
  });
3440
3440
  } },
@@ -3442,7 +3442,7 @@ const LogReviewer = (props) => {
3442
3442
  "Context"),
3443
3443
  (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: () => {
3444
3444
  dispatch({
3445
- type: ActionType$3.ToggleFilterDrawer,
3445
+ type: ActionType$4.ToggleFilterDrawer,
3446
3446
  filterDrawer: FilterDrawer.Tag,
3447
3447
  });
3448
3448
  } },
@@ -3450,7 +3450,7 @@ const LogReviewer = (props) => {
3450
3450
  "Tag")),
3451
3451
  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: () => {
3452
3452
  dispatch({
3453
- type: ActionType$3.ToggleFilterDrawer,
3453
+ type: ActionType$4.ToggleFilterDrawer,
3454
3454
  filterDrawer: FilterDrawer.Action,
3455
3455
  });
3456
3456
  } },
@@ -3458,7 +3458,7 @@ const LogReviewer = (props) => {
3458
3458
  "Action"),
3459
3459
  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: () => {
3460
3460
  dispatch({
3461
- type: ActionType$3.ToggleFilterDrawer,
3461
+ type: ActionType$4.ToggleFilterDrawer,
3462
3462
  filterDrawer: FilterDrawer.Advanced,
3463
3463
  });
3464
3464
  } },
@@ -3466,7 +3466,7 @@ const LogReviewer = (props) => {
3466
3466
  "Advanced"),
3467
3467
  React__default.createElement("button", { type: "button", id: "LogReviewer-reset-filters-button", className: "btn btn-light", "aria-label": "reset filters", onClick: () => {
3468
3468
  dispatch({
3469
- type: ActionType$3.ResetFilters,
3469
+ type: ActionType$4.ResetFilters,
3470
3470
  initActionErrorFilterState,
3471
3471
  initAdvancedFilterState,
3472
3472
  initContextFilterState,
@@ -3588,7 +3588,7 @@ const LogReviewer = (props) => {
3588
3588
  }
3589
3589
  });
3590
3590
  dispatch({
3591
- type: ActionType$3.UpdateContextFilterState,
3591
+ type: ActionType$4.UpdateContextFilterState,
3592
3592
  contextFilterState,
3593
3593
  });
3594
3594
  } }));
@@ -3603,7 +3603,7 @@ const LogReviewer = (props) => {
3603
3603
  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) => {
3604
3604
  tagFilterState[tag] = checked;
3605
3605
  dispatch({
3606
- type: ActionType$3.UpdateTagFilterState,
3606
+ type: ActionType$4.UpdateTagFilterState,
3607
3607
  tagFilterState,
3608
3608
  });
3609
3609
  } }));
@@ -3616,21 +3616,21 @@ const LogReviewer = (props) => {
3616
3616
  React__default.createElement(RadioButton, { id: "LogReviewer-type-all", text: "All Logs", onSelected: () => {
3617
3617
  actionErrorFilterState.type = undefined;
3618
3618
  dispatch({
3619
- type: ActionType$3.UpdateActionErrorFilterState,
3619
+ type: ActionType$4.UpdateActionErrorFilterState,
3620
3620
  actionErrorFilterState,
3621
3621
  });
3622
3622
  }, ariaLabel: "show logs of all types", selected: actionErrorFilterState.type === undefined }),
3623
3623
  React__default.createElement(RadioButton, { id: "LogReviewer-type-action-only", text: "Action Logs Only", onSelected: () => {
3624
3624
  actionErrorFilterState.type = LogType$1.Action;
3625
3625
  dispatch({
3626
- type: ActionType$3.UpdateActionErrorFilterState,
3626
+ type: ActionType$4.UpdateActionErrorFilterState,
3627
3627
  actionErrorFilterState,
3628
3628
  });
3629
3629
  }, ariaLabel: "only show action logs", selected: actionErrorFilterState.type === LogType$1.Action }),
3630
3630
  React__default.createElement(RadioButton, { id: "LogReviewer-type-error-only", text: "Action Error Only", onSelected: () => {
3631
3631
  actionErrorFilterState.type = LogType$1.Error;
3632
3632
  dispatch({
3633
- type: ActionType$3.UpdateActionErrorFilterState,
3633
+ type: ActionType$4.UpdateActionErrorFilterState,
3634
3634
  actionErrorFilterState,
3635
3635
  });
3636
3636
  }, ariaLabel: "only show error logs", selected: actionErrorFilterState.type === LogType$1.Error, noMarginOnRight: true })),
@@ -3642,7 +3642,7 @@ const LogReviewer = (props) => {
3642
3642
  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) => {
3643
3643
  actionErrorFilterState.action[action] = checked;
3644
3644
  dispatch({
3645
- type: ActionType$3.UpdateActionErrorFilterState,
3645
+ type: ActionType$4.UpdateActionErrorFilterState,
3646
3646
  actionErrorFilterState,
3647
3647
  });
3648
3648
  } }));
@@ -3653,7 +3653,7 @@ const LogReviewer = (props) => {
3653
3653
  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) => {
3654
3654
  actionErrorFilterState.target[target] = checked;
3655
3655
  dispatch({
3656
- type: ActionType$3.UpdateActionErrorFilterState,
3656
+ type: ActionType$4.UpdateActionErrorFilterState,
3657
3657
  actionErrorFilterState,
3658
3658
  });
3659
3659
  } }));
@@ -3665,7 +3665,7 @@ const LogReviewer = (props) => {
3665
3665
  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) => {
3666
3666
  actionErrorFilterState.errorMessage = e.target.value;
3667
3667
  dispatch({
3668
- type: ActionType$3.UpdateActionErrorFilterState,
3668
+ type: ActionType$4.UpdateActionErrorFilterState,
3669
3669
  actionErrorFilterState,
3670
3670
  });
3671
3671
  } })),
@@ -3676,7 +3676,7 @@ const LogReviewer = (props) => {
3676
3676
  .trim()
3677
3677
  .toUpperCase());
3678
3678
  dispatch({
3679
- type: ActionType$3.UpdateActionErrorFilterState,
3679
+ type: ActionType$4.UpdateActionErrorFilterState,
3680
3680
  actionErrorFilterState,
3681
3681
  });
3682
3682
  } }))))));
@@ -3690,7 +3690,7 @@ const LogReviewer = (props) => {
3690
3690
  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) => {
3691
3691
  advancedFilterState.userFirstName = e.target.value;
3692
3692
  dispatch({
3693
- type: ActionType$3.UpdateAdvancedFilterState,
3693
+ type: ActionType$4.UpdateAdvancedFilterState,
3694
3694
  advancedFilterState,
3695
3695
  });
3696
3696
  } })),
@@ -3699,7 +3699,7 @@ const LogReviewer = (props) => {
3699
3699
  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) => {
3700
3700
  advancedFilterState.userLastName = e.target.value;
3701
3701
  dispatch({
3702
- type: ActionType$3.UpdateAdvancedFilterState,
3702
+ type: ActionType$4.UpdateAdvancedFilterState,
3703
3703
  advancedFilterState,
3704
3704
  });
3705
3705
  } })),
@@ -3709,7 +3709,7 @@ const LogReviewer = (props) => {
3709
3709
  advancedFilterState.userEmail = ((e.target.value)
3710
3710
  .trim());
3711
3711
  dispatch({
3712
- type: ActionType$3.UpdateAdvancedFilterState,
3712
+ type: ActionType$4.UpdateAdvancedFilterState,
3713
3713
  advancedFilterState,
3714
3714
  });
3715
3715
  } })),
@@ -3723,7 +3723,7 @@ const LogReviewer = (props) => {
3723
3723
  .trim());
3724
3724
  }
3725
3725
  dispatch({
3726
- type: ActionType$3.UpdateAdvancedFilterState,
3726
+ type: ActionType$4.UpdateAdvancedFilterState,
3727
3727
  advancedFilterState,
3728
3728
  });
3729
3729
  } })),
@@ -3731,21 +3731,21 @@ const LogReviewer = (props) => {
3731
3731
  React__default.createElement(CheckboxButton, { text: "Students", onChanged: (checked) => {
3732
3732
  advancedFilterState.includeLearners = checked;
3733
3733
  dispatch({
3734
- type: ActionType$3.UpdateAdvancedFilterState,
3734
+ type: ActionType$4.UpdateAdvancedFilterState,
3735
3735
  advancedFilterState,
3736
3736
  });
3737
3737
  }, checked: advancedFilterState.includeLearners, ariaLabel: "show logs from students" }),
3738
3738
  React__default.createElement(CheckboxButton, { text: "Teaching Team Members", onChanged: (checked) => {
3739
3739
  advancedFilterState.includeTTMs = checked;
3740
3740
  dispatch({
3741
- type: ActionType$3.UpdateAdvancedFilterState,
3741
+ type: ActionType$4.UpdateAdvancedFilterState,
3742
3742
  advancedFilterState,
3743
3743
  });
3744
3744
  }, checked: advancedFilterState.includeTTMs, ariaLabel: "show logs from teaching team members" }),
3745
3745
  React__default.createElement(CheckboxButton, { text: "Admins", onChanged: (checked) => {
3746
3746
  advancedFilterState.includeAdmins = checked;
3747
3747
  dispatch({
3748
- type: ActionType$3.UpdateAdvancedFilterState,
3748
+ type: ActionType$4.UpdateAdvancedFilterState,
3749
3749
  advancedFilterState,
3750
3750
  });
3751
3751
  }, checked: advancedFilterState.includeAdmins, ariaLabel: "show logs from admins" }))),
@@ -3755,7 +3755,7 @@ const LogReviewer = (props) => {
3755
3755
  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) => {
3756
3756
  advancedFilterState.courseName = e.target.value;
3757
3757
  dispatch({
3758
- type: ActionType$3.UpdateAdvancedFilterState,
3758
+ type: ActionType$4.UpdateAdvancedFilterState,
3759
3759
  advancedFilterState,
3760
3760
  });
3761
3761
  } })),
@@ -3769,7 +3769,7 @@ const LogReviewer = (props) => {
3769
3769
  .trim());
3770
3770
  }
3771
3771
  dispatch({
3772
- type: ActionType$3.UpdateAdvancedFilterState,
3772
+ type: ActionType$4.UpdateAdvancedFilterState,
3773
3773
  advancedFilterState,
3774
3774
  });
3775
3775
  } }))),
@@ -3778,21 +3778,21 @@ const LogReviewer = (props) => {
3778
3778
  React__default.createElement(RadioButton, { text: "All Devices", ariaLabel: "show logs from all devices", selected: advancedFilterState.isMobile === undefined, onSelected: () => {
3779
3779
  advancedFilterState.isMobile = undefined;
3780
3780
  dispatch({
3781
- type: ActionType$3.UpdateAdvancedFilterState,
3781
+ type: ActionType$4.UpdateAdvancedFilterState,
3782
3782
  advancedFilterState,
3783
3783
  });
3784
3784
  } }),
3785
3785
  React__default.createElement(RadioButton, { text: "Mobile Only", ariaLabel: "show logs from mobile devices", selected: advancedFilterState.isMobile === true, onSelected: () => {
3786
3786
  advancedFilterState.isMobile = true;
3787
3787
  dispatch({
3788
- type: ActionType$3.UpdateAdvancedFilterState,
3788
+ type: ActionType$4.UpdateAdvancedFilterState,
3789
3789
  advancedFilterState,
3790
3790
  });
3791
3791
  } }),
3792
3792
  React__default.createElement(RadioButton, { text: "Desktop Only", ariaLabel: "show logs from desktop devices", selected: advancedFilterState.isMobile === false, onSelected: () => {
3793
3793
  advancedFilterState.isMobile = false;
3794
3794
  dispatch({
3795
- type: ActionType$3.UpdateAdvancedFilterState,
3795
+ type: ActionType$4.UpdateAdvancedFilterState,
3796
3796
  advancedFilterState,
3797
3797
  });
3798
3798
  }, noMarginOnRight: true }))),
@@ -3801,21 +3801,21 @@ const LogReviewer = (props) => {
3801
3801
  React__default.createElement(RadioButton, { text: "Both", ariaLabel: "show logs from all sources", selected: advancedFilterState.source === undefined, onSelected: () => {
3802
3802
  advancedFilterState.source = undefined;
3803
3803
  dispatch({
3804
- type: ActionType$3.UpdateAdvancedFilterState,
3804
+ type: ActionType$4.UpdateAdvancedFilterState,
3805
3805
  advancedFilterState,
3806
3806
  });
3807
3807
  } }),
3808
3808
  React__default.createElement(RadioButton, { text: "Client Only", ariaLabel: "show logs from client source", selected: advancedFilterState.source === LogSource$1.Client, onSelected: () => {
3809
3809
  advancedFilterState.source = LogSource$1.Client;
3810
3810
  dispatch({
3811
- type: ActionType$3.UpdateAdvancedFilterState,
3811
+ type: ActionType$4.UpdateAdvancedFilterState,
3812
3812
  advancedFilterState,
3813
3813
  });
3814
3814
  } }),
3815
3815
  React__default.createElement(RadioButton, { text: "Server Only", ariaLabel: "show logs from server source", selected: advancedFilterState.source === LogSource$1.Server, onSelected: () => {
3816
3816
  advancedFilterState.source = LogSource$1.Server;
3817
3817
  dispatch({
3818
- type: ActionType$3.UpdateAdvancedFilterState,
3818
+ type: ActionType$4.UpdateAdvancedFilterState,
3819
3819
  advancedFilterState,
3820
3820
  });
3821
3821
  }, noMarginOnRight: true })),
@@ -3826,7 +3826,7 @@ const LogReviewer = (props) => {
3826
3826
  advancedFilterState.courseName = ((e.target.value)
3827
3827
  .trim());
3828
3828
  dispatch({
3829
- type: ActionType$3.UpdateAdvancedFilterState,
3829
+ type: ActionType$4.UpdateAdvancedFilterState,
3830
3830
  advancedFilterState,
3831
3831
  });
3832
3832
  } })),
@@ -3836,7 +3836,7 @@ const LogReviewer = (props) => {
3836
3836
  advancedFilterState.courseName = ((e.target.value)
3837
3837
  .trim());
3838
3838
  dispatch({
3839
- type: ActionType$3.UpdateAdvancedFilterState,
3839
+ type: ActionType$4.UpdateAdvancedFilterState,
3840
3840
  advancedFilterState,
3841
3841
  });
3842
3842
  } })))))));
@@ -4115,7 +4115,7 @@ const LogReviewer = (props) => {
4115
4115
  }
4116
4116
  /* ---------- Wrap in Modal --------- */
4117
4117
  return (React__default.createElement("div", { className: "LogReviewer-outer-container" },
4118
- React__default.createElement("style", null, style$1),
4118
+ React__default.createElement("style", null, style$2),
4119
4119
  React__default.createElement("div", { className: "LogReviewer-inner-container" },
4120
4120
  React__default.createElement("div", { className: "LogReviewer-header" },
4121
4121
  React__default.createElement("div", { className: "LogReviewer-header-title" },
@@ -39441,11 +39441,11 @@ var CreatableSelect$1 = CreatableSelect;
39441
39441
  */
39442
39442
  /* ------------- Actions ------------ */
39443
39443
  // Types of actions
39444
- var ActionType$2;
39444
+ var ActionType$3;
39445
39445
  (function (ActionType) {
39446
39446
  // Update the input value
39447
39447
  ActionType["SetInputValue"] = "SetInputValue";
39448
- })(ActionType$2 || (ActionType$2 = {}));
39448
+ })(ActionType$3 || (ActionType$3 = {}));
39449
39449
  /**
39450
39450
  * Reducer that executes actions
39451
39451
  * @author Yuen Ler Chow
@@ -39453,9 +39453,9 @@ var ActionType$2;
39453
39453
  * @param action action to execute
39454
39454
  * @returns updated state
39455
39455
  */
39456
- const reducer$2 = (state, action) => {
39456
+ const reducer$3 = (state, action) => {
39457
39457
  switch (action.type) {
39458
- case ActionType$2.SetInputValue: {
39458
+ case ActionType$3.SetInputValue: {
39459
39459
  return Object.assign(Object.assign({}, state), { inputValue: action.value });
39460
39460
  }
39461
39461
  default: {
@@ -39475,7 +39475,7 @@ const CreatableMultiselect = (props) => {
39475
39475
  inputValue: '',
39476
39476
  };
39477
39477
  // Initialize state
39478
- const [state, dispatch] = useReducer(reducer$2, initialState);
39478
+ const [state, dispatch] = useReducer(reducer$3, initialState);
39479
39479
  // Destructure common state
39480
39480
  const { inputValue } = state;
39481
39481
  /*------------------------------------------------------------------------*/
@@ -39552,7 +39552,7 @@ const CreatableMultiselect = (props) => {
39552
39552
  }
39553
39553
  // Reset text field to empty because the values have been added
39554
39554
  dispatch({
39555
- type: ActionType$2.SetInputValue,
39555
+ type: ActionType$3.SetInputValue,
39556
39556
  value: '',
39557
39557
  });
39558
39558
  };
@@ -39591,7 +39591,7 @@ const CreatableMultiselect = (props) => {
39591
39591
  else {
39592
39592
  // simply update the input value to the new input value
39593
39593
  dispatch({
39594
- type: ActionType$2.SetInputValue,
39594
+ type: ActionType$3.SetInputValue,
39595
39595
  value: newValue,
39596
39596
  });
39597
39597
  }
@@ -39636,20 +39636,20 @@ const CreatableMultiselect = (props) => {
39636
39636
  /*------------------------------------------------------------------------*/
39637
39637
  /* -------------------------------- Style ------------------------------- */
39638
39638
  /*------------------------------------------------------------------------*/
39639
- const style = `
39639
+ const style$1 = `
39640
39640
  .AddOrEditDBEntry-input-label {
39641
39641
  min-width: 7rem;
39642
39642
  }
39643
39643
  `;
39644
39644
  /* ------------- Actions ------------ */
39645
39645
  // Types of actions
39646
- var ActionType$1;
39646
+ var ActionType$2;
39647
39647
  (function (ActionType) {
39648
39648
  // Update the DBEntry
39649
39649
  ActionType["UpdateDBEntry"] = "UpdateDBEntry";
39650
39650
  // Start the save spinner
39651
39651
  ActionType["StartSave"] = "StartSave";
39652
- })(ActionType$1 || (ActionType$1 = {}));
39652
+ })(ActionType$2 || (ActionType$2 = {}));
39653
39653
  /**
39654
39654
  * Reducer that executes actions
39655
39655
  * @author Yuen Ler Chow
@@ -39657,12 +39657,12 @@ var ActionType$1;
39657
39657
  * @param action action to execute
39658
39658
  * @returns updated state
39659
39659
  */
39660
- const reducer$1 = (state, action) => {
39660
+ const reducer$2 = (state, action) => {
39661
39661
  switch (action.type) {
39662
- case ActionType$1.UpdateDBEntry: {
39662
+ case ActionType$2.UpdateDBEntry: {
39663
39663
  return Object.assign(Object.assign({}, state), { entry: action.dbEntry });
39664
39664
  }
39665
- case ActionType$1.StartSave: {
39665
+ case ActionType$2.StartSave: {
39666
39666
  return Object.assign(Object.assign({}, state), { saving: true });
39667
39667
  }
39668
39668
  default: {
@@ -39687,7 +39687,7 @@ const AddOrEditDBEntry = (props) => {
39687
39687
  saving: false,
39688
39688
  };
39689
39689
  // Initialize state
39690
- const [state, dispatch] = useReducer(reducer$1, initialState);
39690
+ const [state, dispatch] = useReducer(reducer$2, initialState);
39691
39691
  // Destructure common state
39692
39692
  const { entry, saving, } = state;
39693
39693
  /*------------------------------------------------------------------------*/
@@ -39699,7 +39699,7 @@ const AddOrEditDBEntry = (props) => {
39699
39699
  */
39700
39700
  const save = () => __awaiter(void 0, void 0, void 0, function* () {
39701
39701
  // Start the save loading indicator
39702
- dispatch({ type: ActionType$1.StartSave });
39702
+ dispatch({ type: ActionType$2.StartSave });
39703
39703
  // add all default values to the entry
39704
39704
  entryFields.forEach((field) => {
39705
39705
  if (field.defaultValue && !entry[field.objectKey]) {
@@ -39882,7 +39882,7 @@ const AddOrEditDBEntry = (props) => {
39882
39882
  return (React__default.createElement(RadioButton, { key: choice.value, text: choice.title, selected: entry[field.objectKey] === choice.value, onSelected: () => {
39883
39883
  entry[field.objectKey] = choice.value;
39884
39884
  dispatch({
39885
- type: ActionType$1.UpdateDBEntry,
39885
+ type: ActionType$2.UpdateDBEntry,
39886
39886
  dbEntry: entry,
39887
39887
  });
39888
39888
  }, ariaLabel: choice.title }));
@@ -39894,7 +39894,7 @@ const AddOrEditDBEntry = (props) => {
39894
39894
  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) => {
39895
39895
  entry[field.objectKey] = (e.target.value);
39896
39896
  dispatch({
39897
- type: ActionType$1.UpdateDBEntry,
39897
+ type: ActionType$2.UpdateDBEntry,
39898
39898
  dbEntry: entry,
39899
39899
  });
39900
39900
  } }))));
@@ -39907,7 +39907,7 @@ const AddOrEditDBEntry = (props) => {
39907
39907
  entry[field.objectKey] = (e.target.value
39908
39908
  .replace(/[^0-9]/g, ''));
39909
39909
  dispatch({
39910
- type: ActionType$1.UpdateDBEntry,
39910
+ type: ActionType$2.UpdateDBEntry,
39911
39911
  dbEntry: entry,
39912
39912
  });
39913
39913
  } }))));
@@ -39937,7 +39937,7 @@ const AddOrEditDBEntry = (props) => {
39937
39937
  }
39938
39938
  // Save
39939
39939
  dispatch({
39940
- type: ActionType$1.UpdateDBEntry,
39940
+ type: ActionType$2.UpdateDBEntry,
39941
39941
  dbEntry: entry,
39942
39942
  });
39943
39943
  }, ariaLabel: choice.title }));
@@ -39952,7 +39952,7 @@ const AddOrEditDBEntry = (props) => {
39952
39952
  // Update entry and save
39953
39953
  entry[field.objectKey] = values;
39954
39954
  dispatch({
39955
- type: ActionType$1.UpdateDBEntry,
39955
+ type: ActionType$2.UpdateDBEntry,
39956
39956
  dbEntry: entry,
39957
39957
  });
39958
39958
  } })))));
@@ -39965,7 +39965,7 @@ const AddOrEditDBEntry = (props) => {
39965
39965
  React__default.createElement(CreatableMultiselect, { disabled: disabled, type: DBEntryFieldType$1.NumberArray, values: entry[field.objectKey] || [], onChange: (values) => {
39966
39966
  entry[field.objectKey] = values;
39967
39967
  dispatch({
39968
- type: ActionType$1.UpdateDBEntry,
39968
+ type: ActionType$2.UpdateDBEntry,
39969
39969
  dbEntry: entry,
39970
39970
  });
39971
39971
  } })))));
@@ -40014,7 +40014,7 @@ const AddOrEditDBEntry = (props) => {
40014
40014
  /* --------------- Main UI -------------- */
40015
40015
  /*----------------------------------------*/
40016
40016
  return (React__default.createElement("div", { className: "alert alert-light text-black" },
40017
- React__default.createElement("style", null, style),
40017
+ React__default.createElement("style", null, style$1),
40018
40018
  body));
40019
40019
  };
40020
40020
 
@@ -40039,7 +40039,7 @@ const generateEndpointPath = (collectionName, adminsOnly) => {
40039
40039
  */
40040
40040
  /* ------------- Actions ------------ */
40041
40041
  // Types of actions
40042
- var ActionType;
40042
+ var ActionType$1;
40043
40043
  (function (ActionType) {
40044
40044
  // Show adder
40045
40045
  ActionType["ShowAdder"] = "ShowAdder";
@@ -40053,7 +40053,7 @@ var ActionType;
40053
40053
  ActionType["StartDelete"] = "StartDelete";
40054
40054
  // Finish deletion process
40055
40055
  ActionType["FinishDelete"] = "FinishDelete";
40056
- })(ActionType || (ActionType = {}));
40056
+ })(ActionType$1 || (ActionType$1 = {}));
40057
40057
  /**
40058
40058
  * Reducer that executes actions
40059
40059
  * @author Yuen Ler Chow
@@ -40061,18 +40061,18 @@ var ActionType;
40061
40061
  * @param action action to execute
40062
40062
  * @returns updated state
40063
40063
  */
40064
- const reducer = (state, action) => {
40064
+ const reducer$1 = (state, action) => {
40065
40065
  switch (action.type) {
40066
- case ActionType.FinishLoading: {
40066
+ case ActionType$1.FinishLoading: {
40067
40067
  return Object.assign(Object.assign({}, state), { loading: false, dbEntries: action.dbEntries });
40068
40068
  }
40069
- case ActionType.ShowAdder: {
40069
+ case ActionType$1.ShowAdder: {
40070
40070
  return Object.assign(Object.assign({}, state), { adding: true, dbEntryToEdit: undefined });
40071
40071
  }
40072
- case ActionType.ShowEditor: {
40072
+ case ActionType$1.ShowEditor: {
40073
40073
  return Object.assign(Object.assign({}, state), { adding: false, dbEntryToEdit: action.dbEntry });
40074
40074
  }
40075
- case ActionType.FinishAdd: {
40075
+ case ActionType$1.FinishAdd: {
40076
40076
  // Handle cancel
40077
40077
  const finishedEntry = action.dbEntry;
40078
40078
  if (!finishedEntry) {
@@ -40096,10 +40096,10 @@ const reducer = (state, action) => {
40096
40096
  // Update the state
40097
40097
  return Object.assign(Object.assign({}, state), { adding: false, dbEntryToEdit: undefined, dbEntries: updatedDbEntries });
40098
40098
  }
40099
- case ActionType.StartDelete: {
40099
+ case ActionType$1.StartDelete: {
40100
40100
  return Object.assign(Object.assign({}, state), { loading: true });
40101
40101
  }
40102
- case ActionType.FinishDelete: {
40102
+ case ActionType$1.FinishDelete: {
40103
40103
  return Object.assign(Object.assign({}, state), { loading: false,
40104
40104
  // Remove the deleted entry from the list
40105
40105
  dbEntries: state.dbEntries.filter((entry) => {
@@ -40125,7 +40125,7 @@ const DBEntryManagerPanel = (props) => {
40125
40125
  loading: true,
40126
40126
  };
40127
40127
  // Initialize state
40128
- const [state, dispatch] = useReducer(reducer, initialState);
40128
+ const [state, dispatch] = useReducer(reducer$1, initialState);
40129
40129
  // Destructure common state
40130
40130
  const { adding, dbEntryToEdit, dbEntries, loading, } = state;
40131
40131
  /*------------------------------------------------------------------------*/
@@ -40151,7 +40151,7 @@ const DBEntryManagerPanel = (props) => {
40151
40151
  try {
40152
40152
  // Start loader
40153
40153
  dispatch({
40154
- type: ActionType.StartDelete,
40154
+ type: ActionType$1.StartDelete,
40155
40155
  });
40156
40156
  // Perform deletion
40157
40157
  yield visitServerEndpoint({
@@ -40160,7 +40160,7 @@ const DBEntryManagerPanel = (props) => {
40160
40160
  });
40161
40161
  // Finish loader
40162
40162
  dispatch({
40163
- type: ActionType.FinishDelete,
40163
+ type: ActionType$1.FinishDelete,
40164
40164
  dbEntry: entry,
40165
40165
  idPropName,
40166
40166
  });
@@ -40189,7 +40189,7 @@ const DBEntryManagerPanel = (props) => {
40189
40189
  });
40190
40190
  // Save loaded data
40191
40191
  dispatch({
40192
- type: ActionType.FinishLoading,
40192
+ type: ActionType$1.FinishLoading,
40193
40193
  dbEntries: data,
40194
40194
  });
40195
40195
  }
@@ -40232,7 +40232,7 @@ const DBEntryManagerPanel = (props) => {
40232
40232
  React__default.createElement("span", { className: "d-none d-md-inline ms-1" }, "Remove")),
40233
40233
  !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: () => {
40234
40234
  dispatch({
40235
- type: ActionType.ShowEditor,
40235
+ type: ActionType$1.ShowEditor,
40236
40236
  dbEntry: entry,
40237
40237
  });
40238
40238
  } },
@@ -40242,7 +40242,7 @@ const DBEntryManagerPanel = (props) => {
40242
40242
  React__default.createElement("div", { className: "d-grid" },
40243
40243
  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: () => {
40244
40244
  dispatch({
40245
- type: ActionType.ShowAdder,
40245
+ type: ActionType$1.ShowAdder,
40246
40246
  });
40247
40247
  } },
40248
40248
  React__default.createElement(FontAwesomeIcon, { icon: faPlus, className: "me-2" }),
@@ -40254,7 +40254,7 @@ const DBEntryManagerPanel = (props) => {
40254
40254
  if (!loading && (adding || dbEntryToEdit)) {
40255
40255
  body = (React__default.createElement(AddOrEditDBEntry, { saveEndpointPath: endpoint, validateEntry: validateEntry, modifyEntry: modifyEntry, entryFields: entryFields, dbEntryToEdit: dbEntryToEdit, idPropName: idPropName, entries: dbEntries, itemName: itemName, onFinished: (entry) => {
40256
40256
  dispatch({
40257
- type: ActionType.FinishAdd,
40257
+ type: ActionType$1.FinishAdd,
40258
40258
  dbEntry: entry,
40259
40259
  idPropName,
40260
40260
  });
@@ -40266,6 +40266,370 @@ const DBEntryManagerPanel = (props) => {
40266
40266
  return (React__default.createElement("div", null, body));
40267
40267
  };
40268
40268
 
40269
+ /**
40270
+ * Simple tooltip component
40271
+ * @author Gabe Abrams
40272
+ */
40273
+ /*------------------------------------------------------------------------*/
40274
+ /* ------------------------------ Constants ----------------------------- */
40275
+ /*------------------------------------------------------------------------*/
40276
+ // Tooltip widths
40277
+ const TOOLTIP_WIDTH_THIN_REM = 5;
40278
+ const TOOLTIP_WIDTH_NORMAL_REM = 7;
40279
+ const TOOLTIP_WIDTH_WIDE_REM = 10;
40280
+ // Tooltip border radius
40281
+ const TOOLTIP_BORDER_RADIUS_REM = 0.3;
40282
+ /*------------------------------------------------------------------------*/
40283
+ /* -------------------------------- Style ------------------------------- */
40284
+ /*------------------------------------------------------------------------*/
40285
+ const style = `
40286
+ /* Container for contents and tooltip */
40287
+ .Tooltip-outer-container {
40288
+ display: inline-block;
40289
+ position: relative;
40290
+ }
40291
+
40292
+ /* Container for just tooltip */
40293
+ .Tooltip-tooltip-container {
40294
+ /* Position in middle but take no space */
40295
+ /* (so layout of page is unaffected) */
40296
+ position: absolute;
40297
+ display: inline-block;
40298
+ top: 0;
40299
+ left: 50%;
40300
+ height: 0;
40301
+ width: 0;
40302
+ overflow: visible;
40303
+ }
40304
+
40305
+ /* Tooltip */
40306
+ .Tooltip-tooltip {
40307
+ /* Position above item */
40308
+ display: inline-block;
40309
+ position: absolute;
40310
+ top: -2.3rem;
40311
+ height: 1.8rem;
40312
+ z-index: 1;
40313
+
40314
+ /* Use standard black font */
40315
+ font-size: 1rem;
40316
+ color: black;
40317
+
40318
+ /* Non-interactive */
40319
+ pointer-events: none;
40320
+ }
40321
+
40322
+ /* Tooltip box (the rectangle surrounding the text) */
40323
+ .Tooltip-box,
40324
+ .Tooltip-box-shadow,
40325
+ .Tooltip-box-highlight {
40326
+ /* Fill all space with rectangle */
40327
+ position: absolute;
40328
+ left: 0;
40329
+ top: 0;
40330
+ display: inline-block;
40331
+ width: 100%;
40332
+ height: 100%;
40333
+
40334
+ /* Rounded border */
40335
+ border: 0.15rem solid black;
40336
+ border-radius: ${TOOLTIP_BORDER_RADIUS_REM}rem;
40337
+ }
40338
+
40339
+ /* Tooltip highlight (the bright background to the text) */
40340
+ .Tooltip-box-highlight {
40341
+ /* Bootstrap warning variant background */
40342
+ background-color: rgb(255, 193, 7);
40343
+ border-radius: ${TOOLTIP_BORDER_RADIUS_REM}rem;
40344
+
40345
+ /* Place on top */
40346
+ z-index: -1;
40347
+ }
40348
+
40349
+ /* Tooltip box (the black rectangle) */
40350
+ .Tooltip-box {
40351
+ /* Plain black background */
40352
+ background-color: black;
40353
+
40354
+ /* Place in middle */
40355
+ z-index: -2;
40356
+ }
40357
+
40358
+ /* Tooltip box shadow (the white shadow beneath the box) */
40359
+ .Tooltip-box-shadow {
40360
+ /* White shadow */
40361
+ box-shadow: 0 0 0.3rem white;
40362
+
40363
+ /* Place beneath */
40364
+ z-index: -3;
40365
+ }
40366
+
40367
+ /* Tooltip contents (the text and icon) */
40368
+ .Tooltip-contents {
40369
+ /* Center text, don't allow overflow */
40370
+ white-space: nowrap;
40371
+ overflow: hidden;
40372
+ text-align: center;
40373
+ text-overflow: ellipsis;
40374
+ display: flex;
40375
+ align-items: center;
40376
+ justify-content: center;
40377
+
40378
+ /* Space within parent */
40379
+ z-index: 1;
40380
+ padding-left: 0.2rem;
40381
+ padding-right: 0.2rem;
40382
+ height: 100%;
40383
+ }
40384
+
40385
+ /* Tooltip text */
40386
+ .Tooltip-text {
40387
+ /* Center text, add ellipsis */
40388
+ overflow: hidden;
40389
+ text-align: center;
40390
+ text-overflow: ellipsis;
40391
+ }
40392
+
40393
+ /* Classes to switch between tooltip visible/hidden */
40394
+ .Tooltip-tooltip-visible-true {
40395
+ opacity: 1;
40396
+ }
40397
+ .Tooltip-tooltip-visible-false {
40398
+ opacity: 0;
40399
+ }
40400
+
40401
+ /* Classes to switch between tooltip sizes */
40402
+ .Tooltip-size-thin {
40403
+ width: ${TOOLTIP_WIDTH_THIN_REM}rem;
40404
+ left: calc(50% - ${TOOLTIP_WIDTH_THIN_REM / 2}rem);
40405
+ }
40406
+ .Tooltip-size-normal {
40407
+ width: ${TOOLTIP_WIDTH_NORMAL_REM}rem;
40408
+ left: calc(50% - ${TOOLTIP_WIDTH_NORMAL_REM / 2}rem);
40409
+ }
40410
+ .Tooltip-size-wide {
40411
+ width: ${TOOLTIP_WIDTH_WIDE_REM}rem;
40412
+ left: calc(50% - ${TOOLTIP_WIDTH_WIDE_REM / 2}rem);
40413
+ }
40414
+
40415
+ /* Arrow (beneath tooltip) */
40416
+ .Tooltip-arrow,
40417
+ .Tooltip-arrow-shadow {
40418
+ /* Position beneath tooltip */
40419
+ position: absolute;
40420
+ top: -1.5rem;
40421
+ font-size: 1.5rem;
40422
+ left: calc(50% - 0.5rem);
40423
+ width: 0;
40424
+ display: inline-block;
40425
+
40426
+ /* Non-interactive */
40427
+ pointer-events: none;
40428
+ }
40429
+
40430
+ /* Arrow itself */
40431
+ .Tooltip-arrow {
40432
+ color: black;
40433
+ z-index: 4;
40434
+ }
40435
+
40436
+ /* Arrow shadow */
40437
+ .Tooltip-arrow-shadow {
40438
+ z-index: -1;
40439
+
40440
+ /* Blur a white version of the caret as a shadow */
40441
+ color: white;
40442
+ filter: blur(0.2rem);
40443
+ }
40444
+
40445
+ /* Classes to switch between arrow visible/hidden */
40446
+ .Tooltip-arrow-visible-true {
40447
+ opacity: 1;
40448
+ }
40449
+ .Tooltip-arrow-visible-false {
40450
+ opacity: 0;
40451
+ }
40452
+ `;
40453
+ /* ------------- Actions ------------ */
40454
+ // Types of actions
40455
+ var ActionType;
40456
+ (function (ActionType) {
40457
+ // Make the tooltip visible
40458
+ ActionType["Show"] = "Show";
40459
+ // Make the tooltip invisible
40460
+ ActionType["Hide"] = "Hide";
40461
+ // Set nudge pixels
40462
+ ActionType["SetNudgePx"] = "SetNudgePx";
40463
+ // Set whether bottom left corner should be square
40464
+ ActionType["SetSquareBottomLeft"] = "SetSquareBottomLeft";
40465
+ // Set whether bottom right corner should be square
40466
+ ActionType["SetSquareBottomRight"] = "SetSquareBottomRight";
40467
+ })(ActionType || (ActionType = {}));
40468
+ /**
40469
+ * Reducer that executes actions
40470
+ * @author Gabe Abrams
40471
+ * @param state current state
40472
+ * @param action action to execute
40473
+ */
40474
+ const reducer = (state, action) => {
40475
+ switch (action.type) {
40476
+ case ActionType.Show: {
40477
+ return Object.assign(Object.assign({}, state), { isVisible: true });
40478
+ }
40479
+ case ActionType.Hide: {
40480
+ return Object.assign(Object.assign({}, state), { isVisible: false, nudgePx: 0 });
40481
+ }
40482
+ case ActionType.SetNudgePx: {
40483
+ return Object.assign(Object.assign({}, state), { nudgePx: action.nudgePx });
40484
+ }
40485
+ case ActionType.SetSquareBottomLeft: {
40486
+ return Object.assign(Object.assign({}, state), { squareBottomLeft: action.squareBottomLeft });
40487
+ }
40488
+ case ActionType.SetSquareBottomRight: {
40489
+ return Object.assign(Object.assign({}, state), { squareBottomRight: action.squareBottomRight });
40490
+ }
40491
+ default: {
40492
+ return state;
40493
+ }
40494
+ }
40495
+ };
40496
+ /*------------------------------------------------------------------------*/
40497
+ /* ------------------------------ Component ----------------------------- */
40498
+ /*------------------------------------------------------------------------*/
40499
+ const Tooltip = (props) => {
40500
+ /*------------------------------------------------------------------------*/
40501
+ /* -------------------------------- Setup ------------------------------- */
40502
+ /*------------------------------------------------------------------------*/
40503
+ /* -------------- Props ------------- */
40504
+ // Destructure all props
40505
+ const { icon, text, children, wide, thin, } = props;
40506
+ /* -------------- State ------------- */
40507
+ // Initial state
40508
+ const initialState = {
40509
+ isVisible: false,
40510
+ nudgePx: 0,
40511
+ };
40512
+ // Initialize state
40513
+ const [state, dispatch] = useReducer(reducer, initialState);
40514
+ // Destructure common state
40515
+ const { isVisible, nudgePx, squareBottomLeft, squareBottomRight, } = state;
40516
+ /* -------------- Refs -------------- */
40517
+ // Initialize refs
40518
+ const tooltipContainer = useRef(null);
40519
+ const arrowElement = useRef(null);
40520
+ /*------------------------------------------------------------------------*/
40521
+ /* ------------------------- Lifecycle Functions ------------------------ */
40522
+ /*------------------------------------------------------------------------*/
40523
+ /**
40524
+ * Update (also called on mount)
40525
+ * @author Gabe Abrams
40526
+ */
40527
+ useEffect(() => {
40528
+ // Update tooltip container position
40529
+ if (tooltipContainer.current && isVisible) {
40530
+ // Get the tooltip container location
40531
+ const tooltipContainerRect = (tooltipContainer
40532
+ .current
40533
+ .getBoundingClientRect());
40534
+ // Get the window width
40535
+ const windowWidth = window.innerWidth;
40536
+ // Calculate new nudge value
40537
+ let newNudgePx;
40538
+ if (tooltipContainerRect.left < 0) {
40539
+ // Tooltip is off the left side of the screen
40540
+ newNudgePx = -1 * tooltipContainerRect.left;
40541
+ }
40542
+ else if (tooltipContainerRect.right > windowWidth) {
40543
+ // Tooltip is off the right side of the screen
40544
+ newNudgePx = -1 * (tooltipContainerRect.right - windowWidth);
40545
+ }
40546
+ else {
40547
+ // Tooltip is in the middle of the screen
40548
+ newNudgePx = 0;
40549
+ }
40550
+ // Update state
40551
+ dispatch({
40552
+ type: ActionType.SetNudgePx,
40553
+ nudgePx: newNudgePx,
40554
+ });
40555
+ }
40556
+ // Update border rounding
40557
+ if (arrowElement.current && isVisible) {
40558
+ // Get the arrow location
40559
+ const arrowRect = (arrowElement
40560
+ .current
40561
+ .getBoundingClientRect());
40562
+ // REM in pixels given font size
40563
+ const remInPixels = Number.parseInt(getComputedStyle(document.documentElement).fontSize, 10);
40564
+ // Set bottom left corner rounding
40565
+ dispatch({
40566
+ type: ActionType.SetSquareBottomLeft,
40567
+ squareBottomLeft: (arrowRect.left < (TOOLTIP_BORDER_RADIUS_REM * remInPixels)),
40568
+ });
40569
+ // Set bottom right corner rounding
40570
+ dispatch({
40571
+ type: ActionType.SetSquareBottomRight,
40572
+ squareBottomRight: (arrowRect.right
40573
+ > window.innerWidth - (TOOLTIP_BORDER_RADIUS_REM * remInPixels)),
40574
+ });
40575
+ }
40576
+ }, [isVisible]);
40577
+ /*------------------------------------------------------------------------*/
40578
+ /* ------------------------------- Render ------------------------------- */
40579
+ /*------------------------------------------------------------------------*/
40580
+ /*----------------------------------------*/
40581
+ /* --------------- Main UI -------------- */
40582
+ /*----------------------------------------*/
40583
+ // Determine size
40584
+ let size = 'normal';
40585
+ if (wide) {
40586
+ size = 'wide';
40587
+ }
40588
+ else if (thin) {
40589
+ size = 'thin';
40590
+ }
40591
+ // Render
40592
+ return (React__default.createElement("div", { className: "Tooltip-outer-container", "aria-label": text, onMouseEnter: () => {
40593
+ dispatch({
40594
+ type: ActionType.Show,
40595
+ });
40596
+ }, onMouseLeave: () => {
40597
+ dispatch({
40598
+ type: ActionType.Hide,
40599
+ });
40600
+ }, onFocus: () => {
40601
+ dispatch({
40602
+ type: ActionType.Show,
40603
+ });
40604
+ }, onBlur: () => {
40605
+ dispatch({
40606
+ type: ActionType.Hide,
40607
+ });
40608
+ } },
40609
+ React__default.createElement("style", null, style),
40610
+ children,
40611
+ React__default.createElement("div", { className: `Tooltip-arrow Tooltip-arrow-visible-${isVisible ? 'true' : 'false'}`, ref: arrowElement },
40612
+ React__default.createElement(FontAwesomeIcon, { icon: faCaretDown })),
40613
+ React__default.createElement("div", { className: `Tooltip-arrow-shadow Tooltip-arrow-visible-${isVisible ? 'true' : 'false'}` },
40614
+ React__default.createElement(FontAwesomeIcon, { icon: faCaretDown })),
40615
+ React__default.createElement("div", { className: "Tooltip-tooltip-container" },
40616
+ React__default.createElement("div", { className: `Tooltip-tooltip Tooltip-tooltip-visible-${isVisible ? 'true' : 'false'} Tooltip-size-${size}`, role: "tooltip", ref: tooltipContainer, style: {
40617
+ transform: `translateX(${nudgePx}px)`,
40618
+ } },
40619
+ React__default.createElement("div", { className: "Tooltip-box-highlight" }),
40620
+ React__default.createElement("div", { className: "Tooltip-box", style: {
40621
+ borderBottomLeftRadius: squareBottomLeft ? 0 : undefined,
40622
+ borderBottomRightRadius: squareBottomRight ? 0 : undefined,
40623
+ } }),
40624
+ React__default.createElement("div", { className: "Tooltip-box-shadow", style: {
40625
+ borderBottomLeftRadius: squareBottomLeft ? 0 : undefined,
40626
+ borderBottomRightRadius: squareBottomRight ? 0 : undefined,
40627
+ } }),
40628
+ React__default.createElement("div", { className: "Tooltip-contents" },
40629
+ icon && (React__default.createElement(FontAwesomeIcon, { icon: icon, className: "me-1" })),
40630
+ React__default.createElement("span", { className: "Tooltip-text" }, text))))));
40631
+ };
40632
+
40269
40633
  /**
40270
40634
  * One minute in ms
40271
40635
  * @author Gabe Abrams
@@ -41736,7 +42100,6 @@ const extractProp = (arr, prop) => {
41736
42100
  });
41737
42101
  };
41738
42102
 
41739
- // Import shared helpers
41740
42103
  /**
41741
42104
  * Compare two arrays of objects by only comparing the values in a specific
41742
42105
  * property (e.g. compare user arrays by comparing their user.id values)
@@ -41763,8 +42126,9 @@ const compareArraysByProp = (a, b, prop) => {
41763
42126
  const matchingIndex = bCloned.findIndex((bItem) => {
41764
42127
  // Compare based on all props
41765
42128
  return props.every((propToCompareBy) => {
41766
- const aVal = extractProp(a[i], propToCompareBy);
41767
- const bVal = extractProp(bItem, propToCompareBy);
42129
+ var _a;
42130
+ const aVal = ((_a = a[i]) !== null && _a !== void 0 ? _a : {})[propToCompareBy];
42131
+ const bVal = (bItem !== null && bItem !== void 0 ? bItem : {})[propToCompareBy];
41768
42132
  return aVal === bVal;
41769
42133
  });
41770
42134
  });
@@ -42145,5 +42509,5 @@ var DayOfWeek;
42145
42509
  })(DayOfWeek || (DayOfWeek = {}));
42146
42510
  var DayOfWeek$1 = DayOfWeek;
42147
42511
 
42148
- export { AppWrapper, ButtonInputGroup, CSVDownloadButton, CheckboxButton, CopiableBox, DAY_IN_MS, DBEntryFieldType$1 as DBEntryFieldType, DBEntryManagerPanel, DayOfWeek$1 as DayOfWeek, Drawer, DynamicWord, ErrorBox, ErrorWithCode, HOUR_IN_MS, IntelliTable, ItemPicker, LoadingSpinner, LogAction$1 as LogAction, LogBuiltInMetadata, LogReviewer, LogSource$1 as LogSource, LogType$1 as LogType, MINUTE_IN_MS, Modal, ModalButtonType$1 as ModalButtonType, ModalSize$1 as ModalSize, ModalType$1 as ModalType, ParamType$1 as ParamType, PopFailureMark, PopPendingMark, PopSuccessMark, RadioButton, ReactKitErrorCode$1 as ReactKitErrorCode, SimpleDateChooser, TabBox, Variant$1 as Variant, abbreviate, addDBEditorEndpoints, alert$1 as alert, avg, canReviewLogs, ceilToNumDecimals, compareArraysByProp, confirm, extractProp, floorToNumDecimals, forceNumIntoBounds, genCSV, genCommaList, genRouteHandler, getHumanReadableDate, getLocalTimeInfo, getMonthName, getOrdinal, getPartOfDay, getTimeInfoInET, handleError, handleSuccess, initClient, initLogCollection, initServer, isMobileOrTablet, logClientEvent, onlyKeepLetters, padDecimalZeros, padZerosLeft, parallelLimit, roundToNumDecimals, showFatalError, startMinWait, stringsToHumanReadableList, stubServerEndpoint, sum, validateEmail, validatePhoneNumber, validateString, visitServerEndpoint, waitMs };
42512
+ export { AppWrapper, ButtonInputGroup, CSVDownloadButton, CheckboxButton, CopiableBox, DAY_IN_MS, DBEntryFieldType$1 as DBEntryFieldType, DBEntryManagerPanel, DayOfWeek$1 as DayOfWeek, Drawer, DynamicWord, ErrorBox, ErrorWithCode, HOUR_IN_MS, IntelliTable, ItemPicker, LoadingSpinner, LogAction$1 as LogAction, LogBuiltInMetadata, LogReviewer, LogSource$1 as LogSource, LogType$1 as LogType, MINUTE_IN_MS, Modal, ModalButtonType$1 as ModalButtonType, ModalSize$1 as ModalSize, ModalType$1 as ModalType, ParamType$1 as ParamType, PopFailureMark, PopPendingMark, PopSuccessMark, RadioButton, ReactKitErrorCode$1 as ReactKitErrorCode, SimpleDateChooser, TabBox, Tooltip, Variant$1 as Variant, abbreviate, addDBEditorEndpoints, alert$1 as alert, avg, canReviewLogs, ceilToNumDecimals, compareArraysByProp, confirm, extractProp, floorToNumDecimals, forceNumIntoBounds, genCSV, genCommaList, genRouteHandler, getHumanReadableDate, getLocalTimeInfo, getMonthName, getOrdinal, getPartOfDay, getTimeInfoInET, handleError, handleSuccess, initClient, initLogCollection, initServer, isMobileOrTablet, logClientEvent, onlyKeepLetters, padDecimalZeros, padZerosLeft, parallelLimit, roundToNumDecimals, showFatalError, startMinWait, stringsToHumanReadableList, stubServerEndpoint, sum, validateEmail, validatePhoneNumber, validateString, visitServerEndpoint, waitMs };
42149
42513
  //# sourceMappingURL=index.js.map