@mackin.com/styleguide 8.0.0-beta.15 → 8.0.0-beta.18
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/index.d.ts +21 -18
- package/index.js +75 -69
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -57,6 +57,7 @@ interface AutocompleteProps<T extends AutocompleteValue> {
|
|
|
57
57
|
getOptions: (value: string) => Promise<T[]>;
|
|
58
58
|
onPick: (value: T) => void;
|
|
59
59
|
onKeyPress?: (e: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
60
|
+
onKeyDown?: (e: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
60
61
|
}
|
|
61
62
|
declare const Autocomplete: <T extends AutocompleteValue>(p: AutocompleteProps<T>) => JSX.Element;
|
|
62
63
|
|
|
@@ -81,15 +82,12 @@ declare const Backdrop: (p: {
|
|
|
81
82
|
children: React__default.ReactNode;
|
|
82
83
|
/** Fade in time. Defaults to 250ms. */
|
|
83
84
|
showTimeMs?: number;
|
|
84
|
-
|
|
85
|
+
__debug?: boolean;
|
|
85
86
|
}) => JSX.Element;
|
|
86
87
|
|
|
87
88
|
declare type ButtonVariant = 'label' | 'circle' | 'icon' | 'link' | 'inlineLink' | 'primary' | 'secondary' | 'omg' | 'primary2' | 'positive' | 'negative';
|
|
88
89
|
interface ButtonProps extends React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement> {
|
|
89
90
|
variant?: ButtonVariant;
|
|
90
|
-
/** Defaults to 'center'. */
|
|
91
|
-
textAlign?: 'left' | 'center' | 'right';
|
|
92
|
-
block?: boolean;
|
|
93
91
|
/** As round as can be. */
|
|
94
92
|
round?: boolean;
|
|
95
93
|
rightIcon?: JSX.Element;
|
|
@@ -103,7 +101,7 @@ interface ButtonProps extends React.DetailedHTMLProps<React.ButtonHTMLAttributes
|
|
|
103
101
|
/** The minimum button size will be set to the themes' formButtonMinWidth. */
|
|
104
102
|
enforceMinWidth?: boolean;
|
|
105
103
|
}
|
|
106
|
-
declare const Button:
|
|
104
|
+
declare const Button: React.ForwardRefExoticComponent<Pick<ButtonProps, "form" | "variant" | "round" | "rightIcon" | "leftIcon" | "iconBlock" | "small" | "readOnly" | "waiting" | "enforceMinWidth" | "key" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "type" | "value" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & React.RefAttributes<HTMLButtonElement>>;
|
|
107
105
|
|
|
108
106
|
interface CalendarProps {
|
|
109
107
|
month: number;
|
|
@@ -159,7 +157,7 @@ interface ConfirmModalProps {
|
|
|
159
157
|
className?: string;
|
|
160
158
|
variant?: 'omg';
|
|
161
159
|
id?: string;
|
|
162
|
-
|
|
160
|
+
__debug?: boolean;
|
|
163
161
|
}
|
|
164
162
|
declare const ConfirmModal: (props: ConfirmModalProps) => JSX.Element;
|
|
165
163
|
|
|
@@ -170,13 +168,13 @@ interface CopyButtonProps {
|
|
|
170
168
|
}
|
|
171
169
|
declare const CopyButton: (props: CopyButtonProps) => JSX.Element;
|
|
172
170
|
|
|
173
|
-
declare const Divider: () => JSX.Element;
|
|
171
|
+
declare const Divider: (p: React.DetailedHTMLProps<React.HTMLAttributes<HTMLHRElement>, HTMLHRElement>) => JSX.Element;
|
|
174
172
|
|
|
175
173
|
declare const ErrorModal: (props: {
|
|
176
174
|
message: string;
|
|
177
175
|
show: boolean;
|
|
178
176
|
id?: string;
|
|
179
|
-
|
|
177
|
+
__debug?: boolean;
|
|
180
178
|
close: () => void;
|
|
181
179
|
}) => JSX.Element;
|
|
182
180
|
|
|
@@ -290,7 +288,7 @@ interface InfoTipProps {
|
|
|
290
288
|
/** Defaults to nav font color. */
|
|
291
289
|
fontColor?: string;
|
|
292
290
|
modalId?: string;
|
|
293
|
-
|
|
291
|
+
__debug?: boolean;
|
|
294
292
|
}
|
|
295
293
|
declare const InfoTip: (props: InfoTipProps) => JSX.Element;
|
|
296
294
|
|
|
@@ -392,6 +390,9 @@ interface TextInputProps extends BaseProps {
|
|
|
392
390
|
}
|
|
393
391
|
declare const TextInput: React.ForwardRefExoticComponent<Pick<TextInputProps, "type" | "value" | "rightControl" | "round" | "wrapperClassName" | "key" | "accept" | "alt" | "autoComplete" | "autoFocus" | "capture" | "checked" | "crossOrigin" | "disabled" | "enterKeyHint" | "form" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "height" | "list" | "maxLength" | "minLength" | "multiple" | "name" | "pattern" | "placeholder" | "readOnly" | "required" | "size" | "src" | "width" | "onChange" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "noTrim" | "onValueChange" | "customError" | "patternErrorMessage"> & React.RefAttributes<HTMLInputElement>>;
|
|
394
392
|
|
|
393
|
+
/** useEffect but ignores the first call on component mount. */
|
|
394
|
+
declare const useIgnoreMount: (effect: React__default.EffectCallback, deps?: React__default.DependencyList | undefined) => void;
|
|
395
|
+
|
|
395
396
|
interface LabelProps {
|
|
396
397
|
text: string | JSX.Element;
|
|
397
398
|
children: React.ReactNode;
|
|
@@ -440,7 +441,7 @@ interface ModalProps {
|
|
|
440
441
|
scrollable?: boolean;
|
|
441
442
|
id?: string;
|
|
442
443
|
className?: string;
|
|
443
|
-
|
|
444
|
+
__debug?: boolean;
|
|
444
445
|
onClick?: () => void;
|
|
445
446
|
}
|
|
446
447
|
declare const Modal: (p: ModalProps) => React__default.ReactPortal | null;
|
|
@@ -448,6 +449,7 @@ declare const Modal: (p: ModalProps) => React__default.ReactPortal | null;
|
|
|
448
449
|
declare const Nav: (props: {
|
|
449
450
|
show: boolean;
|
|
450
451
|
toggle: (show: boolean) => void;
|
|
452
|
+
id?: string | undefined;
|
|
451
453
|
children?: React.ReactNode;
|
|
452
454
|
responsive?: boolean | undefined;
|
|
453
455
|
className?: string | undefined;
|
|
@@ -647,15 +649,16 @@ declare class PagedResult<T> {
|
|
|
647
649
|
}
|
|
648
650
|
|
|
649
651
|
declare type PickerValue = string | number;
|
|
650
|
-
|
|
652
|
+
declare type PickerOption<T> = T | {
|
|
653
|
+
id: T;
|
|
654
|
+
name?: string;
|
|
655
|
+
};
|
|
656
|
+
interface SelectProps extends Omit<React.DetailedHTMLProps<React.SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, 'value' | 'options'> {
|
|
651
657
|
}
|
|
652
658
|
interface PickerProps<T extends PickerValue> extends SelectProps {
|
|
653
659
|
value: T;
|
|
654
|
-
options:
|
|
655
|
-
|
|
656
|
-
name?: string;
|
|
657
|
-
})[];
|
|
658
|
-
onChange: (value: T, event: React.ChangeEvent<HTMLSelectElement>) => void;
|
|
660
|
+
options: PickerOption<T>[];
|
|
661
|
+
onValueChange: (value: T) => void;
|
|
659
662
|
readOnly?: boolean;
|
|
660
663
|
round?: boolean;
|
|
661
664
|
/** If true, bottom padding will be added to account for other inputs having space for error messages. */
|
|
@@ -984,7 +987,7 @@ declare const WaitingIndicator: (p: {
|
|
|
984
987
|
show: boolean;
|
|
985
988
|
minShowTimeMs?: number;
|
|
986
989
|
id?: string;
|
|
987
|
-
|
|
990
|
+
__debug?: boolean;
|
|
988
991
|
}) => JSX.Element;
|
|
989
992
|
|
|
990
|
-
export { Accordian, AccordianProps, Alignment, Autocomplete, AutocompleteProps, AutocompleteValue, Backdrop$1 as Backdrop, Backdrop as Backdrop2, BoundMemoryPager, BoundStaticPager, Button, ButtonProps, Calendar, CalendarProps, Checkbox, CheckboxProps, ConfirmModal, ConfirmModalProps, CopyButton, DateInput, DateInputProps, Divider, ErrorModal, FileUploader, Form, FormColumnRow, FormFlexRow, FormProps, GlobalStyles, Header, Highlight, ICONS, Icon, Image, InfoPanel, InfoTip, InfoTipProps, Input, InputProps, ItemPager, Label, LabelProps, List, ListItem, ListItemProps, ListProps, MackinTheme, Modal, Nav, NumberInput, NumberInputProps, OmniLink, OmniLinkProps, PagedResult, Pager, PagerProps, Picker, PickerProps, Popover, ProgressBar, ProgressBarProps, SearchBox, SearchBoxProps, Slider, TabHeader, TabHeaderProps, TabLocker, Table, Td, TdCurrency, TdNumber, Text, TextArea, TextAreaProps, TextInput, TextInputProps, TextProps, Th, ThSort, ThemeProvider, ToggleButton, ToggleButtonGroup, ToggleButtonGroupProps, ToggleButtonProps, TogglePasswordInput, Tr, WaitingIndicator, calcDynamicThemeProps, defaultTheme, getCurrencyDisplay, getFileSizeDisplay, useAccordianState, useMediaQuery, useThemeSafely };
|
|
993
|
+
export { Accordian, AccordianProps, Alignment, Autocomplete, AutocompleteProps, AutocompleteValue, Backdrop$1 as Backdrop, Backdrop as Backdrop2, BoundMemoryPager, BoundStaticPager, Button, ButtonProps, Calendar, CalendarProps, Checkbox, CheckboxProps, ConfirmModal, ConfirmModalProps, CopyButton, DateInput, DateInputProps, Divider, ErrorModal, FileUploader, Form, FormColumnRow, FormFlexRow, FormProps, GlobalStyles, Header, Highlight, ICONS, Icon, Image, InfoPanel, InfoTip, InfoTipProps, Input, InputProps, ItemPager, Label, LabelProps, List, ListItem, ListItemProps, ListProps, MackinTheme, Modal, Nav, NumberInput, NumberInputProps, OmniLink, OmniLinkProps, PagedResult, Pager, PagerProps, Picker, PickerOption, PickerProps, PickerValue, Popover, ProgressBar, ProgressBarProps, SearchBox, SearchBoxProps, Slider, TabHeader, TabHeaderProps, TabLocker, Table, Td, TdCurrency, TdNumber, Text, TextArea, TextAreaProps, TextInput, TextInputProps, TextProps, Th, ThSort, ThemeProvider, ToggleButton, ToggleButtonGroup, ToggleButtonGroupProps, ToggleButtonProps, TogglePasswordInput, Tr, WaitingIndicator, calcDynamicThemeProps, defaultTheme, getCurrencyDisplay, getFileSizeDisplay, useAccordianState, useIgnoreMount, useMediaQuery, useThemeSafely };
|
package/index.js
CHANGED
|
@@ -229,9 +229,9 @@ const useThemeSafely = () => {
|
|
|
229
229
|
return defaultTheme;
|
|
230
230
|
};
|
|
231
231
|
|
|
232
|
-
const Button = (props) => {
|
|
233
|
-
var _a
|
|
234
|
-
const nativeProps = __rest(props, ["variant", "
|
|
232
|
+
const Button = React__namespace.forwardRef((props, ref) => {
|
|
233
|
+
var _a;
|
|
234
|
+
const nativeProps = __rest(props, ["variant", "round", "rightIcon", "leftIcon", "iconBlock", "small", "readOnly", "waiting", "enforceMinWidth"]);
|
|
235
235
|
const theme = useThemeSafely();
|
|
236
236
|
const buttonStyles = css.css `
|
|
237
237
|
padding-left: ${theme.controls.padding};
|
|
@@ -248,7 +248,6 @@ const Button = (props) => {
|
|
|
248
248
|
font-weight: bold;
|
|
249
249
|
flex-shrink: 0;
|
|
250
250
|
min-width: ${theme.controls.height};
|
|
251
|
-
text-align: ${(_a = props.textAlign) !== null && _a !== void 0 ? _a : 'center'};
|
|
252
251
|
|
|
253
252
|
&:disabled {
|
|
254
253
|
opacity: ${theme.controls.disabledOpacity};
|
|
@@ -387,9 +386,6 @@ const Button = (props) => {
|
|
|
387
386
|
${props.round && `
|
|
388
387
|
border-radius: ${theme.controls.roundRadius};
|
|
389
388
|
`}
|
|
390
|
-
${props.block && `
|
|
391
|
-
width: 100%;
|
|
392
|
-
`}
|
|
393
389
|
${props.iconBlock && `
|
|
394
390
|
display: flex;
|
|
395
391
|
justify-content: space-between;
|
|
@@ -397,11 +393,11 @@ const Button = (props) => {
|
|
|
397
393
|
`}
|
|
398
394
|
`;
|
|
399
395
|
const disabled = props.disabled || props.waiting;
|
|
400
|
-
return (React__namespace.createElement("button", Object.assign({}, nativeProps, { disabled: disabled, className: css.cx('button', styles, props.className), type: (
|
|
396
|
+
return (React__namespace.createElement("button", Object.assign({}, nativeProps, { ref: ref, disabled: disabled, className: css.cx('button', styles, props.className), type: (_a = props.type) !== null && _a !== void 0 ? _a : 'button' }),
|
|
401
397
|
props.leftIcon && React__namespace.createElement("span", { className: css.css({ marginRight: '0.5rem' }) }, props.leftIcon),
|
|
402
398
|
props.waiting ? React__namespace.createElement(Icon, { id: "waiting", spin: true }) : props.children,
|
|
403
399
|
props.rightIcon && React__namespace.createElement("span", { className: css.css({ marginLeft: '0.5rem' }) }, props.rightIcon)));
|
|
404
|
-
};
|
|
400
|
+
});
|
|
405
401
|
|
|
406
402
|
const accordianExpandTimeMs = 250;
|
|
407
403
|
const accordianMaxHeight = 1020;
|
|
@@ -409,7 +405,7 @@ const accordianTimingFunction = 'ease-in-out';
|
|
|
409
405
|
// we need to apply the seperately so stuff doesn't hang over during expand/collapse.
|
|
410
406
|
// if we remove this and just keep overflow:hidden, autocompletes will get cut off in the subpanels.
|
|
411
407
|
const visibleStyle = css.css({
|
|
412
|
-
overflow: 'visible'
|
|
408
|
+
overflow: 'visible !important'
|
|
413
409
|
});
|
|
414
410
|
const Accordian = (props) => {
|
|
415
411
|
var _a, _b, _c, _d;
|
|
@@ -451,12 +447,13 @@ const Accordian = (props) => {
|
|
|
451
447
|
setOpen((_a = props.open) !== null && _a !== void 0 ? _a : false);
|
|
452
448
|
}, [props.open]);
|
|
453
449
|
return (React__namespace.createElement("div", { className: "accordian" },
|
|
454
|
-
React__namespace.createElement(Button, { readOnly: props.disabled,
|
|
450
|
+
React__namespace.createElement(Button, { readOnly: props.disabled, variant: props.variant, className: css.cx(css.css({
|
|
455
451
|
display: 'flex',
|
|
456
452
|
alignItems: 'center',
|
|
457
453
|
justifyContent: 'space-between',
|
|
458
454
|
height: 'auto',
|
|
459
|
-
minHeight: theme.controls.height
|
|
455
|
+
minHeight: theme.controls.height,
|
|
456
|
+
width: ((_d = props.block) !== null && _d !== void 0 ? _d : true) ? '100%' : 'auto'
|
|
460
457
|
}, props.className)), onClick: e => {
|
|
461
458
|
e.stopPropagation();
|
|
462
459
|
if (props.onChange) {
|
|
@@ -908,7 +905,7 @@ const Autocomplete = (p) => {
|
|
|
908
905
|
p.onChange(value);
|
|
909
906
|
onChangeForOptions.current(value);
|
|
910
907
|
}, onKeyDown: e => {
|
|
911
|
-
var _a, _b;
|
|
908
|
+
var _a, _b, _c;
|
|
912
909
|
if (showValues) {
|
|
913
910
|
if (e.key === 'ArrowDown') {
|
|
914
911
|
e.preventDefault();
|
|
@@ -921,6 +918,7 @@ const Autocomplete = (p) => {
|
|
|
921
918
|
(_b = getNextTabElement(-1, -1)) === null || _b === void 0 ? void 0 : _b.focus();
|
|
922
919
|
}
|
|
923
920
|
}
|
|
921
|
+
(_c = p.onKeyDown) === null || _c === void 0 ? void 0 : _c.call(p, e);
|
|
924
922
|
}, onKeyPress: e => { var _a; return (_a = p.onKeyPress) === null || _a === void 0 ? void 0 : _a.call(p, e); } }),
|
|
925
923
|
showValues && (React__namespace.createElement(List, { ref: list, className: css.css({
|
|
926
924
|
position: 'absolute',
|
|
@@ -1108,6 +1106,19 @@ const Backdrop$1 = (props) => {
|
|
|
1108
1106
|
}, ref: backdrop, className: css.cx('backdrop', styles, props.className) }, props.children));
|
|
1109
1107
|
};
|
|
1110
1108
|
|
|
1109
|
+
/** useEffect but ignores the first call on component mount. */
|
|
1110
|
+
const useIgnoreMount = (effect, deps) => {
|
|
1111
|
+
const mounted = React__default['default'].useRef(false);
|
|
1112
|
+
React__default['default'].useEffect(() => {
|
|
1113
|
+
if (!mounted.current) {
|
|
1114
|
+
mounted.current = true;
|
|
1115
|
+
}
|
|
1116
|
+
else {
|
|
1117
|
+
effect();
|
|
1118
|
+
}
|
|
1119
|
+
}, deps);
|
|
1120
|
+
};
|
|
1121
|
+
|
|
1111
1122
|
const useLogger = (componentName, enabled) => {
|
|
1112
1123
|
return (...messages) => {
|
|
1113
1124
|
if (enabled) {
|
|
@@ -1117,19 +1128,20 @@ const useLogger = (componentName, enabled) => {
|
|
|
1117
1128
|
};
|
|
1118
1129
|
};
|
|
1119
1130
|
|
|
1131
|
+
const portalId = 'backdrop';
|
|
1120
1132
|
const BackdropContext = React__default['default'].createContext({
|
|
1121
1133
|
showing: false,
|
|
1122
1134
|
showCount: 0,
|
|
1123
|
-
portalId:
|
|
1124
|
-
setShow: s => {
|
|
1135
|
+
portalId: portalId,
|
|
1136
|
+
setShow: (s, f) => {
|
|
1125
1137
|
/* empty */
|
|
1126
1138
|
}
|
|
1127
1139
|
});
|
|
1128
1140
|
const BackdropContextProvider = (p) => {
|
|
1129
1141
|
var _a;
|
|
1130
1142
|
const [showCount, setShowCount] = React.useState(0);
|
|
1131
|
-
const log = useLogger('BackdropContextProvider', (_a = p.
|
|
1132
|
-
if (p.
|
|
1143
|
+
const log = useLogger('BackdropContextProvider', (_a = p.__debug) !== null && _a !== void 0 ? _a : false);
|
|
1144
|
+
if (p.__debug) {
|
|
1133
1145
|
React.useEffect(() => {
|
|
1134
1146
|
log('mounted');
|
|
1135
1147
|
return () => {
|
|
@@ -1139,35 +1151,33 @@ const BackdropContextProvider = (p) => {
|
|
|
1139
1151
|
React.useEffect(() => {
|
|
1140
1152
|
log('re-rendered');
|
|
1141
1153
|
});
|
|
1142
|
-
|
|
1154
|
+
useIgnoreMount(() => {
|
|
1143
1155
|
log('showCount changed', showCount);
|
|
1144
1156
|
}, [showCount]);
|
|
1145
1157
|
}
|
|
1146
1158
|
return (React__default['default'].createElement(BackdropContext.Provider, { value: {
|
|
1147
|
-
portalId:
|
|
1159
|
+
portalId: portalId,
|
|
1148
1160
|
showing: showCount > 0,
|
|
1149
1161
|
showCount: showCount,
|
|
1150
|
-
setShow: (show) => {
|
|
1162
|
+
setShow: (show, from) => {
|
|
1151
1163
|
if (show) {
|
|
1152
1164
|
setShowCount(s => {
|
|
1153
1165
|
const count = s + 1;
|
|
1154
|
-
log(
|
|
1155
|
-
log('showCount was', showCount);
|
|
1166
|
+
log(`setShow from ${from} ${s} -> ${count}`);
|
|
1156
1167
|
return count;
|
|
1157
1168
|
});
|
|
1158
1169
|
}
|
|
1159
1170
|
else {
|
|
1160
1171
|
setShowCount(s => {
|
|
1161
1172
|
const count = Math.max(0, s - 1);
|
|
1162
|
-
log(
|
|
1163
|
-
log('showCount was', showCount);
|
|
1173
|
+
log(`setShow from ${from} ${s} -> ${count}`);
|
|
1164
1174
|
return count;
|
|
1165
1175
|
});
|
|
1166
1176
|
}
|
|
1167
1177
|
}
|
|
1168
1178
|
} },
|
|
1169
1179
|
p.children,
|
|
1170
|
-
p.
|
|
1180
|
+
p.__debug && (React__default['default'].createElement("p", { className: css.css({
|
|
1171
1181
|
position: 'fixed',
|
|
1172
1182
|
top: 0, right: 0,
|
|
1173
1183
|
backgroundColor: '#ff00004f',
|
|
@@ -1184,8 +1194,8 @@ const BackdropOverlay = (p) => {
|
|
|
1184
1194
|
const context = React.useContext(BackdropContext);
|
|
1185
1195
|
const theme = useThemeSafely();
|
|
1186
1196
|
const showTimeMs = (_a = p.showTimeMs) !== null && _a !== void 0 ? _a : 250;
|
|
1187
|
-
const log = useLogger('BackdropOverlay', (_b = p.
|
|
1188
|
-
if (p.
|
|
1197
|
+
const log = useLogger('BackdropOverlay', (_b = p.__debug) !== null && _b !== void 0 ? _b : false);
|
|
1198
|
+
if (p.__debug) {
|
|
1189
1199
|
React.useEffect(() => {
|
|
1190
1200
|
log('mounted');
|
|
1191
1201
|
return () => {
|
|
@@ -1195,12 +1205,12 @@ const BackdropOverlay = (p) => {
|
|
|
1195
1205
|
React.useEffect(() => {
|
|
1196
1206
|
log('re-rendered');
|
|
1197
1207
|
});
|
|
1198
|
-
|
|
1208
|
+
useIgnoreMount(() => {
|
|
1199
1209
|
log('context.showing changed', context.showing);
|
|
1200
1210
|
}, [context.showing]);
|
|
1201
1211
|
}
|
|
1202
1212
|
return (React__default['default'].createElement("div", { onClick: () => {
|
|
1203
|
-
context === null || context === void 0 ? void 0 : context.setShow(false);
|
|
1213
|
+
context === null || context === void 0 ? void 0 : context.setShow(false, 'BackdropOverlay');
|
|
1204
1214
|
log('onClick', 'setShow', false);
|
|
1205
1215
|
}, id: context === null || context === void 0 ? void 0 : context.portalId, className: css.css({
|
|
1206
1216
|
cursor: 'pointer',
|
|
@@ -1216,12 +1226,12 @@ const BackdropOverlay = (p) => {
|
|
|
1216
1226
|
}) }));
|
|
1217
1227
|
};
|
|
1218
1228
|
const Backdrop = (p) => {
|
|
1219
|
-
return (React__default['default'].createElement(BackdropContextProvider, {
|
|
1229
|
+
return (React__default['default'].createElement(BackdropContextProvider, { __debug: p.__debug },
|
|
1220
1230
|
React__default['default'].createElement("div", { className: css.css({
|
|
1221
1231
|
height: '100%'
|
|
1222
1232
|
}) },
|
|
1223
1233
|
p.children,
|
|
1224
|
-
React__default['default'].createElement(BackdropOverlay, { showTimeMs: p.showTimeMs,
|
|
1234
|
+
React__default['default'].createElement(BackdropOverlay, { showTimeMs: p.showTimeMs, __debug: p.__debug }))));
|
|
1225
1235
|
};
|
|
1226
1236
|
|
|
1227
1237
|
const Calendar = (p) => {
|
|
@@ -1423,12 +1433,13 @@ const Modal = (p) => {
|
|
|
1423
1433
|
const theme = useThemeSafely();
|
|
1424
1434
|
const hasHeader = p.closeButton || p.heading;
|
|
1425
1435
|
const contentRef = React__default['default'].useRef(null);
|
|
1426
|
-
const log = useLogger(`Modal ${(_a = p.id) !== null && _a !== void 0 ? _a : '?'}`, (_b = p.
|
|
1436
|
+
const log = useLogger(`Modal ${(_a = p.id) !== null && _a !== void 0 ? _a : '?'}`, (_b = p.__debug) !== null && _b !== void 0 ? _b : false);
|
|
1427
1437
|
React.useEffect(() => {
|
|
1428
1438
|
log('mounted');
|
|
1429
1439
|
return () => {
|
|
1440
|
+
var _a;
|
|
1430
1441
|
// handle the use of modals that are rendered only as show=true and then unmounted.
|
|
1431
|
-
backdrop.setShow(false);
|
|
1442
|
+
backdrop.setShow(false, (_a = p.id) !== null && _a !== void 0 ? _a : 'Modal');
|
|
1432
1443
|
log('backdrop.setShow', false);
|
|
1433
1444
|
if (backdrop.showCount <= 1 && htmlBodyStyles) {
|
|
1434
1445
|
log('backdrop.showCount', backdrop.showCount, 'removing htmlBodyStyles');
|
|
@@ -1437,10 +1448,11 @@ const Modal = (p) => {
|
|
|
1437
1448
|
log('un-mounted');
|
|
1438
1449
|
};
|
|
1439
1450
|
}, []);
|
|
1440
|
-
|
|
1451
|
+
useIgnoreMount(() => {
|
|
1452
|
+
var _a;
|
|
1441
1453
|
log('show changed', p.show);
|
|
1442
|
-
backdrop.setShow(p.show);
|
|
1443
|
-
log('backdrop.setShow',
|
|
1454
|
+
backdrop.setShow(p.show, (_a = p.id) !== null && _a !== void 0 ? _a : 'Modal');
|
|
1455
|
+
log('backdrop.setShow', p.show);
|
|
1444
1456
|
if (!htmlBodyStyles) {
|
|
1445
1457
|
log('creating singleton htmlBodyStyles');
|
|
1446
1458
|
htmlBodyStyles = css.css({
|
|
@@ -1559,7 +1571,7 @@ const ConfirmModal = (props) => {
|
|
|
1559
1571
|
}
|
|
1560
1572
|
`}
|
|
1561
1573
|
`;
|
|
1562
|
-
return (React__namespace.createElement(Modal, { id: props.id,
|
|
1574
|
+
return (React__namespace.createElement(Modal, { id: props.id, __debug: props.__debug, className: css.cx('confirmModal', modalStyle, props.className), heading: props.header, closeButton: true, show: props.show, onClick: props.onCancel },
|
|
1563
1575
|
React__namespace.createElement("div", { className: css.css({ padding: '1rem' }) },
|
|
1564
1576
|
React__namespace.createElement(Text, { align: "center" }, props.text),
|
|
1565
1577
|
React__namespace.createElement("div", { className: css.css({ textAlign: 'center' }) },
|
|
@@ -1589,12 +1601,12 @@ const CopyButton = (props) => {
|
|
|
1589
1601
|
React__namespace.createElement(Icon, { id: copied ? 'paste' : 'copy' })));
|
|
1590
1602
|
};
|
|
1591
1603
|
|
|
1592
|
-
const Divider = () => {
|
|
1604
|
+
const Divider = (p) => {
|
|
1593
1605
|
const theme = useThemeSafely();
|
|
1594
|
-
return (React__namespace.createElement("hr", { className: css.cx("divider", css.css({
|
|
1606
|
+
return (React__namespace.createElement("hr", Object.assign({}, p, { className: css.cx("divider", css.css({
|
|
1595
1607
|
margin: theme.controls.dividerMargin,
|
|
1596
1608
|
border: theme.controls.dividerBorder
|
|
1597
|
-
})) }));
|
|
1609
|
+
}), p.className) })));
|
|
1598
1610
|
};
|
|
1599
1611
|
|
|
1600
1612
|
const ErrorModal = (props) => {
|
|
@@ -1609,7 +1621,7 @@ const ErrorModal = (props) => {
|
|
|
1609
1621
|
color: ${theme.colors.omgFont};
|
|
1610
1622
|
}
|
|
1611
1623
|
`;
|
|
1612
|
-
return (React__namespace.createElement(Modal, { id: props.id,
|
|
1624
|
+
return (React__namespace.createElement(Modal, { id: props.id, __debug: props.__debug, className: css.cx('errorModal', modalStyles), heading: "Error", closeButton: true, show: props.show, onClick: props.close },
|
|
1613
1625
|
React__namespace.createElement("div", { className: css.css({ padding: '1rem' }) },
|
|
1614
1626
|
React__namespace.createElement(Text, { align: "center" }, message))));
|
|
1615
1627
|
};
|
|
@@ -1889,9 +1901,10 @@ const FileUploader = (p) => {
|
|
|
1889
1901
|
const UploadInfoPanel = (p) => {
|
|
1890
1902
|
return (React__default['default'].createElement(InfoPanel, { variant: p.variant, className: css.css({ zIndex: 1 }) },
|
|
1891
1903
|
p.message,
|
|
1892
|
-
React__default['default'].createElement(Button, {
|
|
1904
|
+
React__default['default'].createElement(Button, { className: css.css({
|
|
1893
1905
|
color: 'inherit',
|
|
1894
|
-
marginTop: '1rem'
|
|
1906
|
+
marginTop: '1rem',
|
|
1907
|
+
width: '100%'
|
|
1895
1908
|
}), onClick: e => {
|
|
1896
1909
|
e.stopPropagation();
|
|
1897
1910
|
p.onClear();
|
|
@@ -2136,7 +2149,7 @@ const InfoTip = (props) => {
|
|
|
2136
2149
|
if (props.variant === 'modal') {
|
|
2137
2150
|
return (React__namespace.createElement(React__namespace.Fragment, null,
|
|
2138
2151
|
button,
|
|
2139
|
-
React__namespace.createElement(Modal, { id: props.modalId,
|
|
2152
|
+
React__namespace.createElement(Modal, { id: props.modalId, __debug: props.__debug, show: showTip, heading: props.modalHeader, onClick: closeTip, className: css.css({
|
|
2140
2153
|
whiteSpace: 'normal'
|
|
2141
2154
|
}), closeButton: true },
|
|
2142
2155
|
React__namespace.createElement("div", { className: css.css({ padding: '1rem' }) }, props.content))));
|
|
@@ -2222,7 +2235,9 @@ const BaseInput = React__namespace.forwardRef((props, ref) => {
|
|
|
2222
2235
|
right: calc(${theme.controls.padding} * 2);
|
|
2223
2236
|
`}
|
|
2224
2237
|
`;
|
|
2225
|
-
return (React__namespace.createElement("div",
|
|
2238
|
+
return (React__namespace.createElement("div", { className: css.css({
|
|
2239
|
+
width: '100%'
|
|
2240
|
+
}) },
|
|
2226
2241
|
React__namespace.createElement("div", { className: css.cx('input', inputWrapperStyles, wrapperClassName) },
|
|
2227
2242
|
inputElement,
|
|
2228
2243
|
props.rightControl && (React__namespace.createElement("div", { className: rightControlStyles }, props.rightControl))),
|
|
@@ -2275,19 +2290,6 @@ const tryClampDecimals = (value, step = 0) => {
|
|
|
2275
2290
|
return parseFloat(value.toFixed(decimals));
|
|
2276
2291
|
};
|
|
2277
2292
|
|
|
2278
|
-
/** useEffect but ignores the first call on component mount. */
|
|
2279
|
-
const useIgnoreMount = (effect, deps) => {
|
|
2280
|
-
const mounted = React__default['default'].useRef(false);
|
|
2281
|
-
React__default['default'].useEffect(() => {
|
|
2282
|
-
if (!mounted.current) {
|
|
2283
|
-
mounted.current = true;
|
|
2284
|
-
}
|
|
2285
|
-
else {
|
|
2286
|
-
effect();
|
|
2287
|
-
}
|
|
2288
|
-
}, deps);
|
|
2289
|
-
};
|
|
2290
|
-
|
|
2291
2293
|
/** Common state handling for displaying validation messages with inputs. */
|
|
2292
2294
|
const useInputValidationMessage = (ref, props) => {
|
|
2293
2295
|
const [validationError, setValidationError] = React__default['default'].useState('');
|
|
@@ -2816,8 +2818,9 @@ const Nav = (props) => {
|
|
|
2816
2818
|
props.toggle(false);
|
|
2817
2819
|
}
|
|
2818
2820
|
}, [backdrop.showing]);
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
+
useIgnoreMount(() => {
|
|
2822
|
+
var _a;
|
|
2823
|
+
backdrop.setShow(props.show, (_a = props.id) !== null && _a !== void 0 ? _a : 'Nav');
|
|
2821
2824
|
}, [props.show]);
|
|
2822
2825
|
React__namespace.useLayoutEffect(() => {
|
|
2823
2826
|
if (nav && nav.current) {
|
|
@@ -3025,7 +3028,7 @@ const OmniLink = (props) => {
|
|
|
3025
3028
|
const Picker = (props) => {
|
|
3026
3029
|
const selectProps = __rest(props
|
|
3027
3030
|
// if we put numbers in, we expect them out
|
|
3028
|
-
, ["value", "options", "
|
|
3031
|
+
, ["value", "options", "onValueChange", "readOnly", "round", "controlAlign"]);
|
|
3029
3032
|
// if we put numbers in, we expect them out
|
|
3030
3033
|
let isNumber = false;
|
|
3031
3034
|
if (props.options && props.options.length) {
|
|
@@ -3095,6 +3098,7 @@ const Picker = (props) => {
|
|
|
3095
3098
|
(_a = selectProps.onMouseDown) === null || _a === void 0 ? void 0 : _a.call(selectProps, e);
|
|
3096
3099
|
}
|
|
3097
3100
|
}, onChange: e => {
|
|
3101
|
+
var _a;
|
|
3098
3102
|
let val = e.target.value;
|
|
3099
3103
|
if (isNumber) {
|
|
3100
3104
|
val = parseInt(val, 10);
|
|
@@ -3102,7 +3106,8 @@ const Picker = (props) => {
|
|
|
3102
3106
|
val = '';
|
|
3103
3107
|
}
|
|
3104
3108
|
}
|
|
3105
|
-
props.
|
|
3109
|
+
props.onValueChange(val);
|
|
3110
|
+
(_a = props.onChange) === null || _a === void 0 ? void 0 : _a.call(props, e);
|
|
3106
3111
|
} }), (props.options || []).map(o => {
|
|
3107
3112
|
var _a;
|
|
3108
3113
|
let val;
|
|
@@ -3189,8 +3194,8 @@ const BoundMemoryPager = (p) => {
|
|
|
3189
3194
|
var _a, _b, _c;
|
|
3190
3195
|
const { pager, showPageText } = p, rest = __rest(p, ["pager", "showPageText"]);
|
|
3191
3196
|
return (React__namespace.createElement(Pager, Object.assign({}, rest, { pageIndex: p.showPageText ? pager.page : undefined, totalPages: p.showPageText ? pager.totalPages : undefined, canGoNext: pager.hasNext, canGoPrevious: pager.hasPrevious, minItem: pager.minItemIndex + 1, maxItem: pager.maxItemIndex + 1, totalItems: pager.totalItems, leftControls: pager.limitOptions.length > 1 && p.onLimit ? (React__namespace.createElement(Label, { text: (_a = p.limitText) !== null && _a !== void 0 ? _a : 'Limit', orientation: "horizontal" },
|
|
3192
|
-
React__namespace.createElement(Picker, { value: pager.limit, options: pager.limitOptions,
|
|
3193
|
-
React__namespace.createElement(Picker, { value: (_c = pager.sort) !== null && _c !== void 0 ? _c : '', options: pager.sortOptions,
|
|
3197
|
+
React__namespace.createElement(Picker, { value: pager.limit, options: pager.limitOptions, onValueChange: v => { var _a; return (_a = p.onLimit) === null || _a === void 0 ? void 0 : _a.call(p, v); } }))) : undefined, rightControls: pager.sortOptions.length > 1 && p.onSort ? (React__namespace.createElement(Label, { text: (_b = p.sortText) !== null && _b !== void 0 ? _b : 'Sort', orientation: "horizontalReverse" },
|
|
3198
|
+
React__namespace.createElement(Picker, { value: (_c = pager.sort) !== null && _c !== void 0 ? _c : '', options: pager.sortOptions, onValueChange: v => { var _a; return (_a = p.onSort) === null || _a === void 0 ? void 0 : _a.call(p, v); } }))) : undefined, page: d => {
|
|
3194
3199
|
p.onPage(d);
|
|
3195
3200
|
} })));
|
|
3196
3201
|
};
|
|
@@ -3201,8 +3206,8 @@ const BoundStaticPager = (p) => {
|
|
|
3201
3206
|
const showLimit = !!(result.limit && p.limitOptions && p.limitOptions.length > 1 && p.onLimit);
|
|
3202
3207
|
const showSort = !!(p.sort !== undefined && p.sortOptions && p.sortOptions.length > 1 && p.onSort);
|
|
3203
3208
|
return (React__namespace.createElement(Pager, Object.assign({}, rest, { pageIndex: p.showPageText ? result.page : undefined, totalPages: p.showPageText ? result.totalPages : undefined, canGoNext: result.hasNext, canGoPrevious: result.hasPrevious, minItem: result.minPageItemIndex + 1, maxItem: result.maxPageItemIndex + 1, totalItems: result.total, leftControls: showLimit ? (React__namespace.createElement(Label, { text: (_a = p.limitText) !== null && _a !== void 0 ? _a : 'Limit', orientation: "horizontal" },
|
|
3204
|
-
React__namespace.createElement(Picker, { value: (_b = result.limit) !== null && _b !== void 0 ? _b : 1, options: (_c = p.limitOptions) !== null && _c !== void 0 ? _c : [1],
|
|
3205
|
-
React__namespace.createElement(Picker, { value: (_e = p.sort) !== null && _e !== void 0 ? _e : '', options: (_f = p.sortOptions) !== null && _f !== void 0 ? _f : [],
|
|
3209
|
+
React__namespace.createElement(Picker, { value: (_b = result.limit) !== null && _b !== void 0 ? _b : 1, options: (_c = p.limitOptions) !== null && _c !== void 0 ? _c : [1], onValueChange: v => { var _a; return (_a = p.onLimit) === null || _a === void 0 ? void 0 : _a.call(p, v); } }))) : undefined, rightControls: showSort ? (React__namespace.createElement(Label, { text: (_d = p.sortText) !== null && _d !== void 0 ? _d : 'Sort', orientation: "horizontalReverse" },
|
|
3210
|
+
React__namespace.createElement(Picker, { value: (_e = p.sort) !== null && _e !== void 0 ? _e : '', options: (_f = p.sortOptions) !== null && _f !== void 0 ? _f : [], onValueChange: v => {
|
|
3206
3211
|
var _a;
|
|
3207
3212
|
(_a = p.onSort) === null || _a === void 0 ? void 0 : _a.call(p, v);
|
|
3208
3213
|
} }))) : undefined, page: d => {
|
|
@@ -4116,8 +4121,8 @@ const WaitingIndicator = (p) => {
|
|
|
4116
4121
|
const [show, setShow] = React.useState(p.show);
|
|
4117
4122
|
const hideTimer = React.useRef(0);
|
|
4118
4123
|
const lastShowStatus = React.useRef(false);
|
|
4119
|
-
const log = useLogger(`WaitingIndicator ${(_a = p.id) !== null && _a !== void 0 ? _a : '?'}`, (_b = p.
|
|
4120
|
-
if (p.
|
|
4124
|
+
const log = useLogger(`WaitingIndicator ${(_a = p.id) !== null && _a !== void 0 ? _a : '?'}`, (_b = p.__debug) !== null && _b !== void 0 ? _b : false);
|
|
4125
|
+
if (p.__debug) {
|
|
4121
4126
|
React.useEffect(() => {
|
|
4122
4127
|
log('mounted');
|
|
4123
4128
|
return () => {
|
|
@@ -4167,7 +4172,7 @@ const WaitingIndicator = (p) => {
|
|
|
4167
4172
|
}
|
|
4168
4173
|
}
|
|
4169
4174
|
}, [p.show]);
|
|
4170
|
-
return (React__default['default'].createElement(Modal, { id: p.id,
|
|
4175
|
+
return (React__default['default'].createElement(Modal, { id: p.id, __debug: p.__debug, className: "waitingIndicator", show: show, noBackground: true },
|
|
4171
4176
|
React__default['default'].createElement("div", { className: css.css({
|
|
4172
4177
|
color: 'white',
|
|
4173
4178
|
fontSize: '3rem'
|
|
@@ -4239,6 +4244,7 @@ exports.defaultTheme = defaultTheme;
|
|
|
4239
4244
|
exports.getCurrencyDisplay = getCurrencyDisplay;
|
|
4240
4245
|
exports.getFileSizeDisplay = getFileSizeDisplay;
|
|
4241
4246
|
exports.useAccordianState = useAccordianState;
|
|
4247
|
+
exports.useIgnoreMount = useIgnoreMount;
|
|
4242
4248
|
exports.useMediaQuery = useMediaQuery;
|
|
4243
4249
|
exports.useThemeSafely = useThemeSafely;
|
|
4244
4250
|
//# sourceMappingURL=index.js.map
|