dce-reactkit 3.5.3 → 3.5.5

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.
@@ -44,6 +44,11 @@ export declare const confirm: (title: string, text: string, opts?: {
44
44
  * @param [errorTitle] title of the error box
45
45
  */
46
46
  export declare const showFatalError: (error: any, errorTitle?: string) => undefined;
47
+ /**
48
+ * Add a handler for when a fatal error occurs
49
+ * @author Gabe Abrams
50
+ */
51
+ export declare const addFatalErrorHandler: (handler: () => void) => void;
47
52
  /**
48
53
  * Show the "session expired" message
49
54
  * @author Gabe Abrams
@@ -0,0 +1,20 @@
1
+ /**
2
+ * A toggle switch that toggles on or off
3
+ * @author Alessandra De Lucas
4
+ * @author Gabe Abrams
5
+ */
6
+ import React from 'react';
7
+ import Variant from '../types/Variant';
8
+ type Props = {
9
+ isOn: boolean;
10
+ /**
11
+ * A handler to call when the switch is toggled
12
+ * @param isOn Updated value for isOn
13
+ */
14
+ onToggle: (isOn: boolean) => void;
15
+ id?: string;
16
+ description: string;
17
+ backgroundVariantWhenOn?: Variant;
18
+ };
19
+ declare const ToggleSwitch: React.FC<Props>;
20
+ export default ToggleSwitch;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Simple tooltip component
3
+ * @author Gabe Abrams
4
+ */
5
+ import React from 'react';
6
+ import { IconProp } from '@fortawesome/fontawesome-svg-core';
7
+ type Props = {
8
+ icon?: IconProp;
9
+ text: string;
10
+ children: React.ReactNode;
11
+ wide?: boolean;
12
+ thin?: boolean;
13
+ };
14
+ declare const Tooltip: React.FC<Props>;
15
+ export default Tooltip;
@@ -1,4 +1,4 @@
1
- import AppWrapper, { alert, confirm, showFatalError } from './components/AppWrapper';
1
+ import AppWrapper, { alert, confirm, showFatalError, addFatalErrorHandler } from './components/AppWrapper';
2
2
  import LoadingSpinner from './components/LoadingSpinner';
3
3
  import ErrorBox from './components/ErrorBox';
4
4
  import Modal from './components/Modal';
@@ -17,6 +17,8 @@ import LogReviewer from './components/LogReviewer';
17
17
  import IntelliTable from './components/IntelliTable';
18
18
  import CSVDownloadButton from './components/CSVDownloadButton';
19
19
  import DBEntryManagerPanel from './components/DBEntryManagerPanel';
20
+ import Tooltip from './components/Tooltip';
21
+ import ToggleSwitch from './components/ToggleSwitch';
20
22
  import ErrorWithCode from './errors/ErrorWithCode';
21
23
  import MINUTE_IN_MS from './constants/MINUTE_IN_MS';
22
24
  import HOUR_IN_MS from './constants/HOUR_IN_MS';
@@ -79,4 +81,4 @@ import PickableItem from './components/ItemPicker/types/PickableItem';
79
81
  import DBEntry from './components/DBEntryManagerPanel/types/DBEntry';
80
82
  import DBEntryField from './components/DBEntryManagerPanel/types/DBEntryField';
81
83
  import DBEntryFieldType from './components/DBEntryManagerPanel/types/DBEntryFieldType';
82
- export { AppWrapper, LoadingSpinner, ErrorBox, Modal, TabBox, RadioButton, CheckboxButton, ButtonInputGroup, SimpleDateChooser, Drawer, PopSuccessMark, PopFailureMark, PopPendingMark, CopiableBox, ItemPicker, LogReviewer, IntelliTable, CSVDownloadButton, DBEntryManagerPanel, alert, confirm, showFatalError, ErrorWithCode, MINUTE_IN_MS, HOUR_IN_MS, DAY_IN_MS, DynamicWord, abbreviate, avg, ceilToNumDecimals, floorToNumDecimals, forceNumIntoBounds, padDecimalZeros, padZerosLeft, roundToNumDecimals, sum, waitMs, getOrdinal, getTimeInfoInET, stubServerEndpoint, startMinWait, getHumanReadableDate, getPartOfDay, stringsToHumanReadableList, onlyKeepLetters, parallelLimit, getMonthName, genCSV, canReviewLogs, isMobileOrTablet, extractProp, compareArraysByProp, genCommaList, validateEmail, validatePhoneNumber, validateString, getLocalTimeInfo, initClient, visitServerEndpoint, logClientEvent, initServer, genRouteHandler, handleError, handleSuccess, initLogCollection, addDBEditorEndpoints, ModalButtonType, ModalSize, ModalType, ReactKitErrorCode, Variant, DayOfWeek, Log, LogType, LogSource, LogAction, LogBuiltInMetadata, LogMetadataType, IntelliTableColumn, PickableItem, DBEntry, DBEntryField, DBEntryFieldType, ParamType, };
84
+ export { AppWrapper, LoadingSpinner, ErrorBox, Modal, TabBox, RadioButton, CheckboxButton, ButtonInputGroup, SimpleDateChooser, Drawer, PopSuccessMark, PopFailureMark, PopPendingMark, CopiableBox, ItemPicker, LogReviewer, IntelliTable, CSVDownloadButton, DBEntryManagerPanel, Tooltip, ToggleSwitch, alert, confirm, showFatalError, ErrorWithCode, MINUTE_IN_MS, HOUR_IN_MS, DAY_IN_MS, DynamicWord, abbreviate, avg, ceilToNumDecimals, floorToNumDecimals, forceNumIntoBounds, padDecimalZeros, padZerosLeft, roundToNumDecimals, sum, waitMs, getOrdinal, getTimeInfoInET, stubServerEndpoint, startMinWait, getHumanReadableDate, getPartOfDay, stringsToHumanReadableList, onlyKeepLetters, parallelLimit, getMonthName, genCSV, canReviewLogs, isMobileOrTablet, extractProp, compareArraysByProp, genCommaList, validateEmail, validatePhoneNumber, validateString, getLocalTimeInfo, initClient, visitServerEndpoint, logClientEvent, addFatalErrorHandler, initServer, genRouteHandler, handleError, handleSuccess, initLogCollection, addDBEditorEndpoints, ModalButtonType, ModalSize, ModalType, ReactKitErrorCode, Variant, DayOfWeek, Log, LogType, LogSource, LogAction, LogBuiltInMetadata, LogMetadataType, IntelliTableColumn, PickableItem, DBEntry, DBEntryField, DBEntryFieldType, ParamType, };