dce-reactkit 3.5.4 → 3.5.6

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,19 @@
1
+ /**
2
+ * Container that automatically scrolls when new items are added,
3
+ * lets the user scroll up to see old items, but resumes
4
+ * autoscroll when the user scrolls back to the bottom
5
+ * @author Gabe Abrams
6
+ */
7
+ import React from 'react';
8
+ import Variant from '../types/Variant';
9
+ type Props = {
10
+ itemsName?: string;
11
+ items: AutoScrollItem[];
12
+ jumpToBottomButtonVariant?: Variant;
13
+ };
14
+ type AutoScrollItem = {
15
+ id: string | number;
16
+ item: React.ReactNode;
17
+ };
18
+ declare const ScrollLockToBottom: React.FC<Props>;
19
+ export default ScrollLockToBottom;
@@ -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,9 @@
1
+ /**
2
+ * Convert a string to hyphenated lowercase format with no space or
3
+ * non-alphanumeric characters
4
+ * @author Gabe Abrams
5
+ * @param str the string to convert
6
+ * @returns the idified string
7
+ */
8
+ declare const idify: (str: string) => string;
9
+ export default idify;
@@ -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';
@@ -18,6 +18,8 @@ import IntelliTable from './components/IntelliTable';
18
18
  import CSVDownloadButton from './components/CSVDownloadButton';
19
19
  import DBEntryManagerPanel from './components/DBEntryManagerPanel';
20
20
  import Tooltip from './components/Tooltip';
21
+ import ToggleSwitch from './components/ToggleSwitch';
22
+ import ScrollLockToBottom from './components/ScrollLockToBottomContainer';
21
23
  import ErrorWithCode from './errors/ErrorWithCode';
22
24
  import MINUTE_IN_MS from './constants/MINUTE_IN_MS';
23
25
  import HOUR_IN_MS from './constants/HOUR_IN_MS';
@@ -62,6 +64,7 @@ import genCommaList from './helpers/genCommaList';
62
64
  import validateEmail from './helpers/validators/validateEmail';
63
65
  import validatePhoneNumber from './helpers/validators/validatePhoneNumber';
64
66
  import validateString from './helpers/validators/validateString';
67
+ import idify from './helpers/idify';
65
68
  import ModalButtonType from './types/ModalButtonType';
66
69
  import ModalSize from './types/ModalSize';
67
70
  import ModalType from './types/ModalType';
@@ -80,4 +83,4 @@ import PickableItem from './components/ItemPicker/types/PickableItem';
80
83
  import DBEntry from './components/DBEntryManagerPanel/types/DBEntry';
81
84
  import DBEntryField from './components/DBEntryManagerPanel/types/DBEntryField';
82
85
  import DBEntryFieldType from './components/DBEntryManagerPanel/types/DBEntryFieldType';
83
- export { AppWrapper, LoadingSpinner, ErrorBox, Modal, TabBox, RadioButton, CheckboxButton, ButtonInputGroup, SimpleDateChooser, Drawer, PopSuccessMark, PopFailureMark, PopPendingMark, CopiableBox, ItemPicker, LogReviewer, IntelliTable, CSVDownloadButton, DBEntryManagerPanel, Tooltip, 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, };
86
+ export { AppWrapper, LoadingSpinner, ErrorBox, Modal, TabBox, RadioButton, CheckboxButton, ButtonInputGroup, SimpleDateChooser, Drawer, PopSuccessMark, PopFailureMark, PopPendingMark, CopiableBox, ItemPicker, LogReviewer, IntelliTable, CSVDownloadButton, DBEntryManagerPanel, Tooltip, ToggleSwitch, ScrollLockToBottom, 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, idify, 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, };