react-asc 25.18.0 → 25.19.0
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 +15 -16
- package/index.es.js +411 -2151
- package/index.js +396 -2136
- package/lib/components/AutoComplete/AutoComplete.d.ts +0 -1
- package/lib/components/Button/ButtonContext.d.ts +0 -1
- package/lib/components/Card/CardBody.d.ts +1 -1
- package/lib/components/Card/CardFooter.d.ts +1 -1
- package/lib/components/Card/CardImage.d.ts +1 -1
- package/lib/components/Card/CardSubtitle.d.ts +1 -1
- package/lib/components/Card/CardText.d.ts +1 -1
- package/lib/components/DatePicker/DatePicker.d.ts +0 -1
- package/lib/components/DateSelect/DateSelect.d.ts +0 -1
- package/lib/components/DateSelect/DaySelect.d.ts +0 -1
- package/lib/components/DateSelect/MonthSelect.d.ts +0 -1
- package/lib/components/DateSelect/YearSelect.d.ts +0 -1
- package/lib/components/Form/FormError.d.ts +0 -1
- package/lib/components/Form/FormHint/FormHint.d.ts +1 -1
- package/lib/components/Form/FormLabel/FormLabel.d.ts +1 -1
- package/lib/components/Form/form.interfaces.d.ts +0 -1
- package/lib/components/Form/form.models.d.ts +1 -1
- package/lib/components/Link/Link.d.ts +1 -1
- package/lib/components/List/ListItemAction.d.ts +1 -1
- package/lib/components/LoadingIndicator/LoadingIndicator.d.ts +1 -1
- package/lib/components/Menu/MenuDivider.d.ts +0 -1
- package/lib/components/Menu/MenuItem.d.ts +0 -1
- package/lib/components/NumberSelect/NumberSelect.d.ts +0 -1
- package/lib/components/Portal/Portal.d.ts +0 -1
- package/lib/components/SpeedDial/SpeedDialActions.d.ts +1 -1
- package/lib/components/Stepper/StepConnector/StepConnector.d.ts +0 -1
- package/lib/components/Stepper/StepperActions/StepperActions.d.ts +0 -1
- package/lib/components/Table/TableBody.d.ts +1 -1
- package/lib/components/Table/TableHead.d.ts +1 -1
- package/lib/components/Table/TableRow.d.ts +1 -1
- package/lib/components/TimeSelect/HourSelect.d.ts +0 -1
- package/lib/components/TimeSelect/MilliSecondSelect.d.ts +0 -1
- package/lib/components/TimeSelect/MinuteSelect.d.ts +0 -1
- package/lib/components/TimeSelect/SecondSelect.d.ts +0 -1
- package/lib/components/TimeSelect/TimeSelect.d.ts +0 -1
- package/lib/components/TreeView/TreeView.d.ts +1 -1
- package/lib/components/component.interfaces.d.ts +0 -1
- package/lib/hooks/useHover.d.ts +0 -1
- package/lib/icons/CaretDownSolidIcon.d.ts +0 -1
- package/lib/icons/CheckSolidIcon.d.ts +0 -1
- package/lib/icons/CheckSquareRegularIcon.d.ts +0 -1
- package/lib/icons/ChevronDownSolidIcon.d.ts +0 -1
- package/lib/icons/ChevronLeftSolidIcon.d.ts +0 -1
- package/lib/icons/ChevronRightSolidIcon.d.ts +0 -1
- package/lib/icons/ChevronUpSolidIcon.d.ts +0 -1
- package/lib/icons/CircleSolidIcon.d.ts +0 -1
- package/lib/icons/HomeSolidIcon.d.ts +0 -1
- package/lib/icons/PlusSolidIcon.d.ts +0 -1
- package/lib/icons/SpinnerSolidIcon.d.ts +0 -1
- package/lib/icons/SquareRegularIcon.d.ts +0 -1
- package/lib/icons/TimesCircleSolidIcon.d.ts +0 -1
- package/lib/icons/TimesSolidIcon.d.ts +0 -1
- package/package.json +7 -7
- package/readme.md +2 -2
package/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx, jsxs, Fragment
|
|
2
|
-
import React, { useEffect, useRef, useState, useMemo, createContext, useContext, forwardRef, useCallback, useImperativeHandle, Fragment as Fragment$
|
|
1
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
+
import React, { useEffect, useRef, useState, useMemo, createContext, useContext, Children, cloneElement, forwardRef, useCallback, useImperativeHandle, Fragment as Fragment$1, Component, createRef } from 'react';
|
|
3
3
|
import reactDom, { createPortal } from 'react-dom';
|
|
4
4
|
import { createPopper } from '@popperjs/core';
|
|
5
5
|
import saveAs from 'file-saver';
|
|
@@ -287,7 +287,7 @@ const TimesCircleSolidIcon = () => (jsx("svg", { "aria-hidden": "true", focusabl
|
|
|
287
287
|
|
|
288
288
|
const TimesSolidIcon = () => (jsx("svg", { "aria-hidden": "true", focusable: "false", role: "img", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 352 512", children: jsx("path", { fill: "currentColor", d: "M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z" }) }));
|
|
289
289
|
|
|
290
|
-
const Portal
|
|
290
|
+
const Portal = ({ children, target = document.body, className }) => {
|
|
291
291
|
const containerEl = useMemo(() => document.createElement('div'), []);
|
|
292
292
|
useEffect(() => {
|
|
293
293
|
className && className.split(' ').forEach(cssClass => containerEl.classList.add(cssClass));
|
|
@@ -318,7 +318,7 @@ const Backdrop = (props) => {
|
|
|
318
318
|
const getStyles = () => {
|
|
319
319
|
return Object.assign({ height: '100%', width: '100%', position: 'absolute' }, style);
|
|
320
320
|
};
|
|
321
|
-
return (jsx(Portal
|
|
321
|
+
return (jsx(Portal, { className: "backdrop-root", target: target, children: jsx("div", { className: getCssClasses(), onClick: handleClick, style: getStyles(), ...rest }) }));
|
|
322
322
|
};
|
|
323
323
|
|
|
324
324
|
var css_248z$12 = ".Icon-module_icon__lFKCA {\n align-items: center;\n justify-content: center;\n display: flex;\n width: 20px;\n height: 20px;\n}\n.Icon-module_icon__lFKCA svg {\n width: inherit;\n height: inherit;\n}\n.Icon-module_icon__lFKCA.Icon-module_primary__3fID- {\n color: var(--primary);\n}\n.Icon-module_icon__lFKCA.Icon-module_accent__aZXGb {\n color: var(--accent);\n}\n.Icon-module_icon__lFKCA.Icon-module_secondary__HKKop {\n color: var(--secondary);\n}\n.Icon-module_icon__lFKCA.Icon-module_light__-ApMm {\n color: var(--light);\n}\n.Icon-module_icon__lFKCA.Icon-module_dark__DpCIK {\n color: var(--dark);\n}";
|
|
@@ -338,7 +338,7 @@ const Icon = (props) => {
|
|
|
338
338
|
};
|
|
339
339
|
|
|
340
340
|
var css_248z$11 = ".LoadingIndicator-module_loadingIndicatorContainer__GS9OG {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 100%;\n}\n.LoadingIndicator-module_loadingIndicatorContainer__GS9OG.LoadingIndicator-module_isFixed__WCFNG {\n position: fixed;\n top: 0;\n left: 0;\n}\n\n.LoadingIndicator-module_loadingIndicator__EC9sx {\n animation-name: LoadingIndicator-module_spinAnimation__LeY4Z;\n animation-duration: 5000ms;\n animation-iteration-count: infinite;\n animation-timing-function: linear;\n width: 24px;\n height: 24px;\n}\n\n@keyframes LoadingIndicator-module_spinAnimation__LeY4Z {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}";
|
|
341
|
-
var styles$11 = {"loadingIndicatorContainer":"LoadingIndicator-module_loadingIndicatorContainer__GS9OG","isFixed":"LoadingIndicator-module_isFixed__WCFNG","loadingIndicator":"LoadingIndicator-module_loadingIndicator__EC9sx"
|
|
341
|
+
var styles$11 = {"loadingIndicatorContainer":"LoadingIndicator-module_loadingIndicatorContainer__GS9OG","isFixed":"LoadingIndicator-module_isFixed__WCFNG","loadingIndicator":"LoadingIndicator-module_loadingIndicator__EC9sx"};
|
|
342
342
|
styleInject(css_248z$11);
|
|
343
343
|
|
|
344
344
|
const LoadingIndicator = ({ ...rest }) => {
|
|
@@ -362,6 +362,10 @@ const LoadingIndicatorContainer = ({ children, isFixed }) => {
|
|
|
362
362
|
|
|
363
363
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
364
364
|
|
|
365
|
+
function unwrapExports (x) {
|
|
366
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
367
|
+
}
|
|
368
|
+
|
|
365
369
|
function createCommonjsModule(fn, module) {
|
|
366
370
|
return module = { exports: {} }, fn(module, module.exports), module.exports;
|
|
367
371
|
}
|
|
@@ -411,7 +415,9 @@ class LoadingIndicatorService {
|
|
|
411
415
|
this.root?.unmount();
|
|
412
416
|
document.body.removeChild(this.container);
|
|
413
417
|
this.container = undefined;
|
|
414
|
-
|
|
418
|
+
if (this.handler) {
|
|
419
|
+
clearTimeout(this.handler);
|
|
420
|
+
}
|
|
415
421
|
}
|
|
416
422
|
}
|
|
417
423
|
}
|
|
@@ -454,7 +460,7 @@ const IconButton = (props) => {
|
|
|
454
460
|
className && cssClasses.push(className);
|
|
455
461
|
return cssClasses.filter(css => css).join(' ');
|
|
456
462
|
};
|
|
457
|
-
return (jsxs("button", { type: "button", className: getCssClasses(), disabled: isDisabled, ...rest, children: [isLoading && (jsx(LoadingIndicatorContainer, { children: jsx(LoadingIndicator, {}) })), !isLoading && (jsxs(Fragment
|
|
463
|
+
return (jsxs("button", { type: "button", className: getCssClasses(), disabled: isDisabled, ...rest, children: [isLoading && (jsx(LoadingIndicatorContainer, { children: jsx(LoadingIndicator, {}) })), !isLoading && (jsxs(Fragment, { children: [icon && jsx(Icon, { children: icon }), children] }))] }));
|
|
458
464
|
};
|
|
459
465
|
|
|
460
466
|
var css_248z$$ = ".List-module_list__gpZ41 {\n width: 100%;\n display: flex;\n flex-direction: column;\n padding-left: 0;\n margin-bottom: 0;\n margin-top: 0;\n background-color: var(--white);\n}";
|
|
@@ -555,7 +561,7 @@ const ListItemTextPrimary = ({ children }) => (jsx("div", { className: "list-ite
|
|
|
555
561
|
const ListItemTextSecondary = ({ children }) => (jsx("div", { className: "list-item-text-secondary text-muted", style: { fontSize: '0.875rem' }, children: children }));
|
|
556
562
|
|
|
557
563
|
var css_248z$V = ".AutoComplete-module_selectContainer__1kA85 {\n position: relative;\n}\n\n.AutoComplete-module_select__NNYOi {\n width: 100%;\n padding: 0.375rem 0.75rem;\n font-size: 1rem;\n font-weight: 400;\n line-height: 1.5;\n color: #212529;\n background-color: #fff;\n background-clip: padding-box;\n border: 1px solid #ced4da;\n appearance: none;\n border-radius: 0.25rem;\n box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.0745098039);\n transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;\n min-height: calc(1.5em + 0.75rem + 2px);\n height: auto;\n display: flex;\n}\n.AutoComplete-module_select__NNYOi:hover {\n cursor: pointer;\n}\n.AutoComplete-module_select__NNYOi:focus:not(.AutoComplete-module_select__NNYOi.AutoComplete-module_disabled__CbGP4) {\n color: #212529;\n background-color: #fff;\n border-color: #86b7fe;\n outline: 0;\n box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.0745098039), 0 0 0 0.25rem rgba(13, 110, 253, 0.2509803922);\n}\n.AutoComplete-module_select__NNYOi:disabled, .AutoComplete-module_select__NNYOi:read-only {\n background-color: #e9ecef;\n}\n.AutoComplete-module_select__NNYOi:disabled:hover {\n cursor: not-allowed;\n}\n.AutoComplete-module_select__NNYOi:read-only:hover {\n cursor: inherit;\n}\n\n.AutoComplete-module_selectMenu__Gu81L {\n background-color: var(--light);\n position: absolute;\n box-shadow: var(--shadow);\n border-radius: var(--borderRadius);\n width: 100%;\n top: 38px;\n z-index: 1050;\n max-height: 280px;\n overflow: auto;\n}";
|
|
558
|
-
var styles$V = {"selectContainer":"AutoComplete-module_selectContainer__1kA85","select":"AutoComplete-module_select__NNYOi","
|
|
564
|
+
var styles$V = {"selectContainer":"AutoComplete-module_selectContainer__1kA85","select":"AutoComplete-module_select__NNYOi","selectMenu":"AutoComplete-module_selectMenu__Gu81L"};
|
|
559
565
|
styleInject(css_248z$V);
|
|
560
566
|
|
|
561
567
|
// preset value
|
|
@@ -628,7 +634,7 @@ const AutoComplete = (props) => {
|
|
|
628
634
|
setModel('');
|
|
629
635
|
setSearchText('');
|
|
630
636
|
};
|
|
631
|
-
return (jsxs("div", { ref: selectConainter, className: styles$V.selectContainer, children: [jsxs("div", { className: "d-flex", children: [jsx("input", { type: "text", className: getCssClass(), id: id, name: name, tabIndex: 0, readOnly: readOnly, disabled: disabled, onChange: handleOnChange, onFocus: handleOnFocus, placeholder: placeholder, value: model }), showClearButton && model?.length > 0 && jsx(IconButton, { icon: jsx(TimesSolidIcon, {}), onClick: handleClickReset })] }), isShow && (jsxs(Fragment
|
|
637
|
+
return (jsxs("div", { ref: selectConainter, className: styles$V.selectContainer, children: [jsxs("div", { className: "d-flex", children: [jsx("input", { type: "text", className: getCssClass(), id: id, name: name, tabIndex: 0, readOnly: readOnly, disabled: disabled, onChange: handleOnChange, onFocus: handleOnFocus, placeholder: placeholder, value: model }), showClearButton && model?.length > 0 && jsx(IconButton, { icon: jsx(TimesSolidIcon, {}), onClick: handleClickReset })] }), isShow && (jsxs(Fragment, { children: [jsx("div", { className: styles$V.selectMenu, children: jsx(List, { children: _options &&
|
|
632
638
|
_options.map((option, index) => (jsx(ListItem, { id: `list-item-${index}`, onClick: () => handleOnClick(option), disabled: !option.value, children: jsx(ListItemText, { primary: option.label ? option.label : option.value }) }, option.value))) }) }), jsx(Backdrop, { isTransparent: true, onClick: () => hide() })] }))] }));
|
|
633
639
|
};
|
|
634
640
|
|
|
@@ -665,7 +671,7 @@ const Breadcrumb = (props) => {
|
|
|
665
671
|
const ConditionalWrapper = ({ condition, wrapper, children }) => condition ? wrapper(children) : children;
|
|
666
672
|
|
|
667
673
|
var css_248z$S = ".BreadcrumbItem-module_breadcrumbItem__zsUq- {\n display: flex;\n align-items: center;\n}\n.BreadcrumbItem-module_breadcrumbItem__zsUq- + .BreadcrumbItem-module_breadcrumbItem__zsUq- {\n padding-left: 0.5rem;\n}\n.BreadcrumbItem-module_breadcrumbItem__zsUq- + .BreadcrumbItem-module_breadcrumbItem__zsUq-::before {\n float: left;\n padding-right: 0.5rem;\n color: #6c757d;\n content: \"/\";\n}\n.BreadcrumbItem-module_breadcrumbItem__zsUq- a:not([href]):not([class]) {\n color: var(--primary);\n}\n.BreadcrumbItem-module_breadcrumbItem__zsUq-:hover {\n cursor: pointer;\n}\n.BreadcrumbItem-module_breadcrumbItem__zsUq-.BreadcrumbItem-module_active__Kn1dA:hover {\n cursor: unset;\n}";
|
|
668
|
-
var styles$S = {"breadcrumbItem":"BreadcrumbItem-module_breadcrumbItem__zsUq-"
|
|
674
|
+
var styles$S = {"breadcrumbItem":"BreadcrumbItem-module_breadcrumbItem__zsUq-"};
|
|
669
675
|
styleInject(css_248z$S);
|
|
670
676
|
|
|
671
677
|
const BreadcrumbItem = (props) => {
|
|
@@ -1005,1822 +1011,307 @@ const CssTransition = (props) => {
|
|
|
1005
1011
|
cssState?.leaveEnd && cssClasses.push(`${className}-leave-end`);
|
|
1006
1012
|
return cssClasses.filter((css) => css).join(' ');
|
|
1007
1013
|
};
|
|
1008
|
-
return (jsx(Fragment
|
|
1014
|
+
return (jsx(Fragment, { children: isRenderChild &&
|
|
1009
1015
|
jsx("div", { ref: transitionConainter, className: getCssClasses(), children: children }) }));
|
|
1010
1016
|
};
|
|
1011
1017
|
|
|
1012
|
-
|
|
1013
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
1014
|
-
*
|
|
1015
|
-
* This source code is licensed under the MIT license found in the
|
|
1016
|
-
* LICENSE file in the root directory of this source tree.
|
|
1017
|
-
*/
|
|
1018
|
-
|
|
1018
|
+
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
|
|
1019
1019
|
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1020
|
+
const copyProperty = (to, from, property, ignoreNonConfigurable) => {
|
|
1021
|
+
// `Function#length` should reflect the parameters of `to` not `from` since we keep its body.
|
|
1022
|
+
// `Function#prototype` is non-writable and non-configurable so can never be modified.
|
|
1023
|
+
if (property === 'length' || property === 'prototype') {
|
|
1024
|
+
return;
|
|
1025
|
+
}
|
|
1023
1026
|
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
+
// `Function#arguments` and `Function#caller` should not be copied. They were reported to be present in `Reflect.ownKeys` for some devices in React Native (#41), so we explicitly ignore them here.
|
|
1028
|
+
if (property === 'arguments' || property === 'caller') {
|
|
1029
|
+
return;
|
|
1030
|
+
}
|
|
1027
1031
|
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
if (secret === ReactPropTypesSecret_1) {
|
|
1031
|
-
// It is still safe when called from React.
|
|
1032
|
-
return;
|
|
1033
|
-
}
|
|
1034
|
-
var err = new Error(
|
|
1035
|
-
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
|
1036
|
-
'Use PropTypes.checkPropTypes() to call them. ' +
|
|
1037
|
-
'Read more at http://fb.me/use-check-prop-types'
|
|
1038
|
-
);
|
|
1039
|
-
err.name = 'Invariant Violation';
|
|
1040
|
-
throw err;
|
|
1041
|
-
} shim.isRequired = shim;
|
|
1042
|
-
function getShim() {
|
|
1043
|
-
return shim;
|
|
1044
|
-
} // Important!
|
|
1045
|
-
// Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
|
|
1046
|
-
var ReactPropTypes = {
|
|
1047
|
-
array: shim,
|
|
1048
|
-
bigint: shim,
|
|
1049
|
-
bool: shim,
|
|
1050
|
-
func: shim,
|
|
1051
|
-
number: shim,
|
|
1052
|
-
object: shim,
|
|
1053
|
-
string: shim,
|
|
1054
|
-
symbol: shim,
|
|
1055
|
-
|
|
1056
|
-
any: shim,
|
|
1057
|
-
arrayOf: getShim,
|
|
1058
|
-
element: shim,
|
|
1059
|
-
elementType: shim,
|
|
1060
|
-
instanceOf: getShim,
|
|
1061
|
-
node: shim,
|
|
1062
|
-
objectOf: getShim,
|
|
1063
|
-
oneOf: getShim,
|
|
1064
|
-
oneOfType: getShim,
|
|
1065
|
-
shape: getShim,
|
|
1066
|
-
exact: getShim,
|
|
1067
|
-
|
|
1068
|
-
checkPropTypes: emptyFunctionWithReset,
|
|
1069
|
-
resetWarningCache: emptyFunction
|
|
1070
|
-
};
|
|
1032
|
+
const toDescriptor = Object.getOwnPropertyDescriptor(to, property);
|
|
1033
|
+
const fromDescriptor = Object.getOwnPropertyDescriptor(from, property);
|
|
1071
1034
|
|
|
1072
|
-
|
|
1035
|
+
if (!canCopyProperty(toDescriptor, fromDescriptor) && ignoreNonConfigurable) {
|
|
1036
|
+
return;
|
|
1037
|
+
}
|
|
1073
1038
|
|
|
1074
|
-
|
|
1039
|
+
Object.defineProperty(to, property, fromDescriptor);
|
|
1075
1040
|
};
|
|
1076
1041
|
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
|
|
1089
|
-
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
|
|
1090
|
-
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
|
|
1091
|
-
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
|
|
1092
|
-
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
|
|
1093
|
-
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
|
|
1094
|
-
// (unstable) APIs that have been removed. Can we remove the symbols?
|
|
1095
|
-
|
|
1096
|
-
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
|
|
1097
|
-
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
|
|
1098
|
-
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
|
|
1099
|
-
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
|
|
1100
|
-
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
|
|
1101
|
-
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
|
|
1102
|
-
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
|
|
1103
|
-
var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
|
|
1104
|
-
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
|
|
1105
|
-
var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
|
|
1106
|
-
var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
|
|
1107
|
-
|
|
1108
|
-
function isValidElementType(type) {
|
|
1109
|
-
return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
1110
|
-
type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
|
|
1111
|
-
}
|
|
1112
|
-
|
|
1113
|
-
function typeOf(object) {
|
|
1114
|
-
if (typeof object === 'object' && object !== null) {
|
|
1115
|
-
var $$typeof = object.$$typeof;
|
|
1116
|
-
|
|
1117
|
-
switch ($$typeof) {
|
|
1118
|
-
case REACT_ELEMENT_TYPE:
|
|
1119
|
-
var type = object.type;
|
|
1120
|
-
|
|
1121
|
-
switch (type) {
|
|
1122
|
-
case REACT_ASYNC_MODE_TYPE:
|
|
1123
|
-
case REACT_CONCURRENT_MODE_TYPE:
|
|
1124
|
-
case REACT_FRAGMENT_TYPE:
|
|
1125
|
-
case REACT_PROFILER_TYPE:
|
|
1126
|
-
case REACT_STRICT_MODE_TYPE:
|
|
1127
|
-
case REACT_SUSPENSE_TYPE:
|
|
1128
|
-
return type;
|
|
1129
|
-
|
|
1130
|
-
default:
|
|
1131
|
-
var $$typeofType = type && type.$$typeof;
|
|
1132
|
-
|
|
1133
|
-
switch ($$typeofType) {
|
|
1134
|
-
case REACT_CONTEXT_TYPE:
|
|
1135
|
-
case REACT_FORWARD_REF_TYPE:
|
|
1136
|
-
case REACT_LAZY_TYPE:
|
|
1137
|
-
case REACT_MEMO_TYPE:
|
|
1138
|
-
case REACT_PROVIDER_TYPE:
|
|
1139
|
-
return $$typeofType;
|
|
1140
|
-
|
|
1141
|
-
default:
|
|
1142
|
-
return $$typeof;
|
|
1143
|
-
}
|
|
1144
|
-
|
|
1145
|
-
}
|
|
1146
|
-
|
|
1147
|
-
case REACT_PORTAL_TYPE:
|
|
1148
|
-
return $$typeof;
|
|
1149
|
-
}
|
|
1150
|
-
}
|
|
1151
|
-
|
|
1152
|
-
return undefined;
|
|
1153
|
-
} // AsyncMode is deprecated along with isAsyncMode
|
|
1154
|
-
|
|
1155
|
-
var AsyncMode = REACT_ASYNC_MODE_TYPE;
|
|
1156
|
-
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
|
|
1157
|
-
var ContextConsumer = REACT_CONTEXT_TYPE;
|
|
1158
|
-
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
1159
|
-
var Element = REACT_ELEMENT_TYPE;
|
|
1160
|
-
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
1161
|
-
var Fragment = REACT_FRAGMENT_TYPE;
|
|
1162
|
-
var Lazy = REACT_LAZY_TYPE;
|
|
1163
|
-
var Memo = REACT_MEMO_TYPE;
|
|
1164
|
-
var Portal = REACT_PORTAL_TYPE;
|
|
1165
|
-
var Profiler = REACT_PROFILER_TYPE;
|
|
1166
|
-
var StrictMode = REACT_STRICT_MODE_TYPE;
|
|
1167
|
-
var Suspense = REACT_SUSPENSE_TYPE;
|
|
1168
|
-
var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
|
|
1169
|
-
|
|
1170
|
-
function isAsyncMode(object) {
|
|
1171
|
-
{
|
|
1172
|
-
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
|
1173
|
-
hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
|
|
1174
|
-
|
|
1175
|
-
console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
|
|
1176
|
-
}
|
|
1177
|
-
}
|
|
1178
|
-
|
|
1179
|
-
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
|
|
1180
|
-
}
|
|
1181
|
-
function isConcurrentMode(object) {
|
|
1182
|
-
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
|
|
1183
|
-
}
|
|
1184
|
-
function isContextConsumer(object) {
|
|
1185
|
-
return typeOf(object) === REACT_CONTEXT_TYPE;
|
|
1186
|
-
}
|
|
1187
|
-
function isContextProvider(object) {
|
|
1188
|
-
return typeOf(object) === REACT_PROVIDER_TYPE;
|
|
1189
|
-
}
|
|
1190
|
-
function isElement(object) {
|
|
1191
|
-
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
1192
|
-
}
|
|
1193
|
-
function isForwardRef(object) {
|
|
1194
|
-
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
|
1195
|
-
}
|
|
1196
|
-
function isFragment(object) {
|
|
1197
|
-
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
|
1198
|
-
}
|
|
1199
|
-
function isLazy(object) {
|
|
1200
|
-
return typeOf(object) === REACT_LAZY_TYPE;
|
|
1201
|
-
}
|
|
1202
|
-
function isMemo(object) {
|
|
1203
|
-
return typeOf(object) === REACT_MEMO_TYPE;
|
|
1204
|
-
}
|
|
1205
|
-
function isPortal(object) {
|
|
1206
|
-
return typeOf(object) === REACT_PORTAL_TYPE;
|
|
1207
|
-
}
|
|
1208
|
-
function isProfiler(object) {
|
|
1209
|
-
return typeOf(object) === REACT_PROFILER_TYPE;
|
|
1210
|
-
}
|
|
1211
|
-
function isStrictMode(object) {
|
|
1212
|
-
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
|
1213
|
-
}
|
|
1214
|
-
function isSuspense(object) {
|
|
1215
|
-
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
|
1216
|
-
}
|
|
1217
|
-
|
|
1218
|
-
exports.AsyncMode = AsyncMode;
|
|
1219
|
-
exports.ConcurrentMode = ConcurrentMode;
|
|
1220
|
-
exports.ContextConsumer = ContextConsumer;
|
|
1221
|
-
exports.ContextProvider = ContextProvider;
|
|
1222
|
-
exports.Element = Element;
|
|
1223
|
-
exports.ForwardRef = ForwardRef;
|
|
1224
|
-
exports.Fragment = Fragment;
|
|
1225
|
-
exports.Lazy = Lazy;
|
|
1226
|
-
exports.Memo = Memo;
|
|
1227
|
-
exports.Portal = Portal;
|
|
1228
|
-
exports.Profiler = Profiler;
|
|
1229
|
-
exports.StrictMode = StrictMode;
|
|
1230
|
-
exports.Suspense = Suspense;
|
|
1231
|
-
exports.isAsyncMode = isAsyncMode;
|
|
1232
|
-
exports.isConcurrentMode = isConcurrentMode;
|
|
1233
|
-
exports.isContextConsumer = isContextConsumer;
|
|
1234
|
-
exports.isContextProvider = isContextProvider;
|
|
1235
|
-
exports.isElement = isElement;
|
|
1236
|
-
exports.isForwardRef = isForwardRef;
|
|
1237
|
-
exports.isFragment = isFragment;
|
|
1238
|
-
exports.isLazy = isLazy;
|
|
1239
|
-
exports.isMemo = isMemo;
|
|
1240
|
-
exports.isPortal = isPortal;
|
|
1241
|
-
exports.isProfiler = isProfiler;
|
|
1242
|
-
exports.isStrictMode = isStrictMode;
|
|
1243
|
-
exports.isSuspense = isSuspense;
|
|
1244
|
-
exports.isValidElementType = isValidElementType;
|
|
1245
|
-
exports.typeOf = typeOf;
|
|
1246
|
-
})();
|
|
1247
|
-
}
|
|
1248
|
-
});
|
|
1249
|
-
reactIs_development.AsyncMode;
|
|
1250
|
-
reactIs_development.ConcurrentMode;
|
|
1251
|
-
reactIs_development.ContextConsumer;
|
|
1252
|
-
reactIs_development.ContextProvider;
|
|
1253
|
-
reactIs_development.Element;
|
|
1254
|
-
reactIs_development.ForwardRef;
|
|
1255
|
-
reactIs_development.Fragment;
|
|
1256
|
-
reactIs_development.Lazy;
|
|
1257
|
-
reactIs_development.Memo;
|
|
1258
|
-
reactIs_development.Portal;
|
|
1259
|
-
reactIs_development.Profiler;
|
|
1260
|
-
reactIs_development.StrictMode;
|
|
1261
|
-
reactIs_development.Suspense;
|
|
1262
|
-
reactIs_development.isAsyncMode;
|
|
1263
|
-
reactIs_development.isConcurrentMode;
|
|
1264
|
-
reactIs_development.isContextConsumer;
|
|
1265
|
-
reactIs_development.isContextProvider;
|
|
1266
|
-
reactIs_development.isElement;
|
|
1267
|
-
reactIs_development.isForwardRef;
|
|
1268
|
-
reactIs_development.isFragment;
|
|
1269
|
-
reactIs_development.isLazy;
|
|
1270
|
-
reactIs_development.isMemo;
|
|
1271
|
-
reactIs_development.isPortal;
|
|
1272
|
-
reactIs_development.isProfiler;
|
|
1273
|
-
reactIs_development.isStrictMode;
|
|
1274
|
-
reactIs_development.isSuspense;
|
|
1275
|
-
reactIs_development.isValidElementType;
|
|
1276
|
-
reactIs_development.typeOf;
|
|
1277
|
-
|
|
1278
|
-
/** @license React v16.13.1
|
|
1279
|
-
* react-is.production.min.js
|
|
1280
|
-
*
|
|
1281
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
1282
|
-
*
|
|
1283
|
-
* This source code is licensed under the MIT license found in the
|
|
1284
|
-
* LICENSE file in the root directory of this source tree.
|
|
1285
|
-
*/
|
|
1042
|
+
// `Object.defineProperty()` throws if the property exists, is not configurable and either:
|
|
1043
|
+
// - one its descriptors is changed
|
|
1044
|
+
// - it is non-writable and its value is changed
|
|
1045
|
+
const canCopyProperty = function (toDescriptor, fromDescriptor) {
|
|
1046
|
+
return toDescriptor === undefined || toDescriptor.configurable || (
|
|
1047
|
+
toDescriptor.writable === fromDescriptor.writable &&
|
|
1048
|
+
toDescriptor.enumerable === fromDescriptor.enumerable &&
|
|
1049
|
+
toDescriptor.configurable === fromDescriptor.configurable &&
|
|
1050
|
+
(toDescriptor.writable || toDescriptor.value === fromDescriptor.value)
|
|
1051
|
+
);
|
|
1052
|
+
};
|
|
1286
1053
|
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
var isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r$1||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};var typeOf=z;
|
|
1293
|
-
|
|
1294
|
-
var reactIs_production_min = {
|
|
1295
|
-
AsyncMode: AsyncMode,
|
|
1296
|
-
ConcurrentMode: ConcurrentMode,
|
|
1297
|
-
ContextConsumer: ContextConsumer,
|
|
1298
|
-
ContextProvider: ContextProvider,
|
|
1299
|
-
Element: Element,
|
|
1300
|
-
ForwardRef: ForwardRef,
|
|
1301
|
-
Fragment: Fragment,
|
|
1302
|
-
Lazy: Lazy,
|
|
1303
|
-
Memo: Memo,
|
|
1304
|
-
Portal: Portal,
|
|
1305
|
-
Profiler: Profiler,
|
|
1306
|
-
StrictMode: StrictMode,
|
|
1307
|
-
Suspense: Suspense,
|
|
1308
|
-
isAsyncMode: isAsyncMode,
|
|
1309
|
-
isConcurrentMode: isConcurrentMode,
|
|
1310
|
-
isContextConsumer: isContextConsumer,
|
|
1311
|
-
isContextProvider: isContextProvider,
|
|
1312
|
-
isElement: isElement,
|
|
1313
|
-
isForwardRef: isForwardRef,
|
|
1314
|
-
isFragment: isFragment,
|
|
1315
|
-
isLazy: isLazy,
|
|
1316
|
-
isMemo: isMemo,
|
|
1317
|
-
isPortal: isPortal,
|
|
1318
|
-
isProfiler: isProfiler,
|
|
1319
|
-
isStrictMode: isStrictMode,
|
|
1320
|
-
isSuspense: isSuspense,
|
|
1321
|
-
isValidElementType: isValidElementType,
|
|
1322
|
-
typeOf: typeOf
|
|
1323
|
-
};
|
|
1324
|
-
|
|
1325
|
-
var reactIs = createCommonjsModule(function (module) {
|
|
1054
|
+
const changePrototype = (to, from) => {
|
|
1055
|
+
const fromPrototype = Object.getPrototypeOf(from);
|
|
1056
|
+
if (fromPrototype === Object.getPrototypeOf(to)) {
|
|
1057
|
+
return;
|
|
1058
|
+
}
|
|
1326
1059
|
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
} else {
|
|
1330
|
-
module.exports = reactIs_development;
|
|
1331
|
-
}
|
|
1332
|
-
});
|
|
1060
|
+
Object.setPrototypeOf(to, fromPrototype);
|
|
1061
|
+
};
|
|
1333
1062
|
|
|
1334
|
-
|
|
1335
|
-
object-assign
|
|
1336
|
-
(c) Sindre Sorhus
|
|
1337
|
-
@license MIT
|
|
1338
|
-
*/
|
|
1063
|
+
const wrappedToString = (withName, fromBody) => `/* Wrapped ${withName}*/\n${fromBody}`;
|
|
1339
1064
|
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
|
|
1343
|
-
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
1065
|
+
const toStringDescriptor = Object.getOwnPropertyDescriptor(Function.prototype, 'toString');
|
|
1066
|
+
const toStringName = Object.getOwnPropertyDescriptor(Function.prototype.toString, 'name');
|
|
1344
1067
|
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1068
|
+
// We call `from.toString()` early (not lazily) to ensure `from` can be garbage collected.
|
|
1069
|
+
// We use `bind()` instead of a closure for the same reason.
|
|
1070
|
+
// Calling `from.toString()` early also allows caching it in case `to.toString()` is called several times.
|
|
1071
|
+
const changeToString = (to, from, name) => {
|
|
1072
|
+
const withName = name === '' ? '' : `with ${name.trim()}() `;
|
|
1073
|
+
const newToString = wrappedToString.bind(null, withName, from.toString());
|
|
1074
|
+
// Ensure `to.toString.toString` is non-enumerable and has the same `same`
|
|
1075
|
+
Object.defineProperty(newToString, 'name', toStringName);
|
|
1076
|
+
Object.defineProperty(to, 'toString', {...toStringDescriptor, value: newToString});
|
|
1077
|
+
};
|
|
1349
1078
|
|
|
1350
|
-
|
|
1351
|
-
}
|
|
1079
|
+
const mimicFn = (to, from, {ignoreNonConfigurable = false} = {}) => {
|
|
1080
|
+
const {name} = to;
|
|
1352
1081
|
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
if (!Object.assign) {
|
|
1356
|
-
return false;
|
|
1357
|
-
}
|
|
1358
|
-
|
|
1359
|
-
// Detect buggy property enumeration order in older V8 versions.
|
|
1360
|
-
|
|
1361
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=4118
|
|
1362
|
-
var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
|
|
1363
|
-
test1[5] = 'de';
|
|
1364
|
-
if (Object.getOwnPropertyNames(test1)[0] === '5') {
|
|
1365
|
-
return false;
|
|
1366
|
-
}
|
|
1367
|
-
|
|
1368
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
1369
|
-
var test2 = {};
|
|
1370
|
-
for (var i = 0; i < 10; i++) {
|
|
1371
|
-
test2['_' + String.fromCharCode(i)] = i;
|
|
1372
|
-
}
|
|
1373
|
-
var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
|
|
1374
|
-
return test2[n];
|
|
1375
|
-
});
|
|
1376
|
-
if (order2.join('') !== '0123456789') {
|
|
1377
|
-
return false;
|
|
1378
|
-
}
|
|
1379
|
-
|
|
1380
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
1381
|
-
var test3 = {};
|
|
1382
|
-
'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
|
|
1383
|
-
test3[letter] = letter;
|
|
1384
|
-
});
|
|
1385
|
-
if (Object.keys(Object.assign({}, test3)).join('') !==
|
|
1386
|
-
'abcdefghijklmnopqrst') {
|
|
1387
|
-
return false;
|
|
1388
|
-
}
|
|
1389
|
-
|
|
1390
|
-
return true;
|
|
1391
|
-
} catch (err) {
|
|
1392
|
-
// We don't expect any of the above to throw, but better to be safe.
|
|
1393
|
-
return false;
|
|
1082
|
+
for (const property of Reflect.ownKeys(from)) {
|
|
1083
|
+
copyProperty(to, from, property, ignoreNonConfigurable);
|
|
1394
1084
|
}
|
|
1395
|
-
}
|
|
1396
1085
|
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
var to = toObject(target);
|
|
1400
|
-
var symbols;
|
|
1401
|
-
|
|
1402
|
-
for (var s = 1; s < arguments.length; s++) {
|
|
1403
|
-
from = Object(arguments[s]);
|
|
1404
|
-
|
|
1405
|
-
for (var key in from) {
|
|
1406
|
-
if (hasOwnProperty$1.call(from, key)) {
|
|
1407
|
-
to[key] = from[key];
|
|
1408
|
-
}
|
|
1409
|
-
}
|
|
1410
|
-
|
|
1411
|
-
if (getOwnPropertySymbols) {
|
|
1412
|
-
symbols = getOwnPropertySymbols(from);
|
|
1413
|
-
for (var i = 0; i < symbols.length; i++) {
|
|
1414
|
-
if (propIsEnumerable.call(from, symbols[i])) {
|
|
1415
|
-
to[symbols[i]] = from[symbols[i]];
|
|
1416
|
-
}
|
|
1417
|
-
}
|
|
1418
|
-
}
|
|
1419
|
-
}
|
|
1086
|
+
changePrototype(to, from);
|
|
1087
|
+
changeToString(to, from, name);
|
|
1420
1088
|
|
|
1421
1089
|
return to;
|
|
1422
1090
|
};
|
|
1423
1091
|
|
|
1424
|
-
var
|
|
1425
|
-
|
|
1426
|
-
var printWarning$1 = function() {};
|
|
1427
|
-
|
|
1428
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
1429
|
-
var ReactPropTypesSecret = ReactPropTypesSecret_1;
|
|
1430
|
-
var loggedTypeFailures = {};
|
|
1431
|
-
var has = has$1;
|
|
1092
|
+
var mimicFn_1 = mimicFn;
|
|
1432
1093
|
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
if (typeof console !== 'undefined') {
|
|
1436
|
-
console.error(message);
|
|
1437
|
-
}
|
|
1438
|
-
try {
|
|
1439
|
-
// --- Welcome to debugging React ---
|
|
1440
|
-
// This error was thrown as a convenience so that you can use this stack
|
|
1441
|
-
// to find the callsite that caused this warning to fire.
|
|
1442
|
-
throw new Error(message);
|
|
1443
|
-
} catch (x) { /**/ }
|
|
1444
|
-
};
|
|
1445
|
-
}
|
|
1094
|
+
var pDefer = () => {
|
|
1095
|
+
const ret = {};
|
|
1446
1096
|
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
* @param {object} typeSpecs Map of name to a ReactPropType
|
|
1452
|
-
* @param {object} values Runtime values that need to be type-checked
|
|
1453
|
-
* @param {string} location e.g. "prop", "context", "child context"
|
|
1454
|
-
* @param {string} componentName Name of the component for error messages.
|
|
1455
|
-
* @param {?Function} getStack Returns the component stack.
|
|
1456
|
-
* @private
|
|
1457
|
-
*/
|
|
1458
|
-
function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
|
|
1459
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
1460
|
-
for (var typeSpecName in typeSpecs) {
|
|
1461
|
-
if (has(typeSpecs, typeSpecName)) {
|
|
1462
|
-
var error;
|
|
1463
|
-
// Prop type validation may throw. In case they do, we don't want to
|
|
1464
|
-
// fail the render phase where it didn't fail before. So we log it.
|
|
1465
|
-
// After these have been cleaned up, we'll let them throw.
|
|
1466
|
-
try {
|
|
1467
|
-
// This is intentionally an invariant that gets caught. It's the same
|
|
1468
|
-
// behavior as without this statement except with a better message.
|
|
1469
|
-
if (typeof typeSpecs[typeSpecName] !== 'function') {
|
|
1470
|
-
var err = Error(
|
|
1471
|
-
(componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
|
|
1472
|
-
'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +
|
|
1473
|
-
'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
|
|
1474
|
-
);
|
|
1475
|
-
err.name = 'Invariant Violation';
|
|
1476
|
-
throw err;
|
|
1477
|
-
}
|
|
1478
|
-
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
|
|
1479
|
-
} catch (ex) {
|
|
1480
|
-
error = ex;
|
|
1481
|
-
}
|
|
1482
|
-
if (error && !(error instanceof Error)) {
|
|
1483
|
-
printWarning$1(
|
|
1484
|
-
(componentName || 'React class') + ': type specification of ' +
|
|
1485
|
-
location + ' `' + typeSpecName + '` is invalid; the type checker ' +
|
|
1486
|
-
'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
|
|
1487
|
-
'You may have forgotten to pass an argument to the type checker ' +
|
|
1488
|
-
'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
|
|
1489
|
-
'shape all require an argument).'
|
|
1490
|
-
);
|
|
1491
|
-
}
|
|
1492
|
-
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
|
1493
|
-
// Only monitor this failure once because there tends to be a lot of the
|
|
1494
|
-
// same error.
|
|
1495
|
-
loggedTypeFailures[error.message] = true;
|
|
1496
|
-
|
|
1497
|
-
var stack = getStack ? getStack() : '';
|
|
1498
|
-
|
|
1499
|
-
printWarning$1(
|
|
1500
|
-
'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
|
|
1501
|
-
);
|
|
1502
|
-
}
|
|
1503
|
-
}
|
|
1504
|
-
}
|
|
1505
|
-
}
|
|
1506
|
-
}
|
|
1097
|
+
ret.promise = new Promise((resolve, reject) => {
|
|
1098
|
+
ret.resolve = resolve;
|
|
1099
|
+
ret.reject = reject;
|
|
1100
|
+
});
|
|
1507
1101
|
|
|
1508
|
-
|
|
1509
|
-
* Resets warning cache when testing.
|
|
1510
|
-
*
|
|
1511
|
-
* @private
|
|
1512
|
-
*/
|
|
1513
|
-
checkPropTypes.resetWarningCache = function() {
|
|
1514
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
1515
|
-
loggedTypeFailures = {};
|
|
1516
|
-
}
|
|
1102
|
+
return ret;
|
|
1517
1103
|
};
|
|
1518
1104
|
|
|
1519
|
-
var
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
|
|
1543
|
-
/* global Symbol */
|
|
1544
|
-
var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
|
1545
|
-
var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
|
|
1546
|
-
|
|
1547
|
-
/**
|
|
1548
|
-
* Returns the iterator method function contained on the iterable object.
|
|
1549
|
-
*
|
|
1550
|
-
* Be sure to invoke the function with the iterable as context:
|
|
1551
|
-
*
|
|
1552
|
-
* var iteratorFn = getIteratorFn(myIterable);
|
|
1553
|
-
* if (iteratorFn) {
|
|
1554
|
-
* var iterator = iteratorFn.call(myIterable);
|
|
1555
|
-
* ...
|
|
1556
|
-
* }
|
|
1557
|
-
*
|
|
1558
|
-
* @param {?object} maybeIterable
|
|
1559
|
-
* @return {?function}
|
|
1560
|
-
*/
|
|
1561
|
-
function getIteratorFn(maybeIterable) {
|
|
1562
|
-
var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
|
|
1563
|
-
if (typeof iteratorFn === 'function') {
|
|
1564
|
-
return iteratorFn;
|
|
1565
|
-
}
|
|
1566
|
-
}
|
|
1567
|
-
|
|
1568
|
-
/**
|
|
1569
|
-
* Collection of methods that allow declaration and validation of props that are
|
|
1570
|
-
* supplied to React components. Example usage:
|
|
1571
|
-
*
|
|
1572
|
-
* var Props = require('ReactPropTypes');
|
|
1573
|
-
* var MyArticle = React.createClass({
|
|
1574
|
-
* propTypes: {
|
|
1575
|
-
* // An optional string prop named "description".
|
|
1576
|
-
* description: Props.string,
|
|
1577
|
-
*
|
|
1578
|
-
* // A required enum prop named "category".
|
|
1579
|
-
* category: Props.oneOf(['News','Photos']).isRequired,
|
|
1580
|
-
*
|
|
1581
|
-
* // A prop named "dialog" that requires an instance of Dialog.
|
|
1582
|
-
* dialog: Props.instanceOf(Dialog).isRequired
|
|
1583
|
-
* },
|
|
1584
|
-
* render: function() { ... }
|
|
1585
|
-
* });
|
|
1586
|
-
*
|
|
1587
|
-
* A more formal specification of how these methods are used:
|
|
1588
|
-
*
|
|
1589
|
-
* type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
|
|
1590
|
-
* decl := ReactPropTypes.{type}(.isRequired)?
|
|
1591
|
-
*
|
|
1592
|
-
* Each and every declaration produces a function with the same signature. This
|
|
1593
|
-
* allows the creation of custom validation functions. For example:
|
|
1594
|
-
*
|
|
1595
|
-
* var MyLink = React.createClass({
|
|
1596
|
-
* propTypes: {
|
|
1597
|
-
* // An optional string or URI prop named "href".
|
|
1598
|
-
* href: function(props, propName, componentName) {
|
|
1599
|
-
* var propValue = props[propName];
|
|
1600
|
-
* if (propValue != null && typeof propValue !== 'string' &&
|
|
1601
|
-
* !(propValue instanceof URI)) {
|
|
1602
|
-
* return new Error(
|
|
1603
|
-
* 'Expected a string or an URI for ' + propName + ' in ' +
|
|
1604
|
-
* componentName
|
|
1605
|
-
* );
|
|
1606
|
-
* }
|
|
1607
|
-
* }
|
|
1608
|
-
* },
|
|
1609
|
-
* render: function() {...}
|
|
1610
|
-
* });
|
|
1611
|
-
*
|
|
1612
|
-
* @internal
|
|
1613
|
-
*/
|
|
1614
|
-
|
|
1615
|
-
var ANONYMOUS = '<<anonymous>>';
|
|
1616
|
-
|
|
1617
|
-
// Important!
|
|
1618
|
-
// Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
|
|
1619
|
-
var ReactPropTypes = {
|
|
1620
|
-
array: createPrimitiveTypeChecker('array'),
|
|
1621
|
-
bigint: createPrimitiveTypeChecker('bigint'),
|
|
1622
|
-
bool: createPrimitiveTypeChecker('boolean'),
|
|
1623
|
-
func: createPrimitiveTypeChecker('function'),
|
|
1624
|
-
number: createPrimitiveTypeChecker('number'),
|
|
1625
|
-
object: createPrimitiveTypeChecker('object'),
|
|
1626
|
-
string: createPrimitiveTypeChecker('string'),
|
|
1627
|
-
symbol: createPrimitiveTypeChecker('symbol'),
|
|
1628
|
-
|
|
1629
|
-
any: createAnyTypeChecker(),
|
|
1630
|
-
arrayOf: createArrayOfTypeChecker,
|
|
1631
|
-
element: createElementTypeChecker(),
|
|
1632
|
-
elementType: createElementTypeTypeChecker(),
|
|
1633
|
-
instanceOf: createInstanceTypeChecker,
|
|
1634
|
-
node: createNodeChecker(),
|
|
1635
|
-
objectOf: createObjectOfTypeChecker,
|
|
1636
|
-
oneOf: createEnumTypeChecker,
|
|
1637
|
-
oneOfType: createUnionTypeChecker,
|
|
1638
|
-
shape: createShapeTypeChecker,
|
|
1639
|
-
exact: createStrictShapeTypeChecker,
|
|
1640
|
-
};
|
|
1641
|
-
|
|
1642
|
-
/**
|
|
1643
|
-
* inlined Object.is polyfill to avoid requiring consumers ship their own
|
|
1644
|
-
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
|
|
1645
|
-
*/
|
|
1646
|
-
/*eslint-disable no-self-compare*/
|
|
1647
|
-
function is(x, y) {
|
|
1648
|
-
// SameValue algorithm
|
|
1649
|
-
if (x === y) {
|
|
1650
|
-
// Steps 1-5, 7-10
|
|
1651
|
-
// Steps 6.b-6.e: +0 != -0
|
|
1652
|
-
return x !== 0 || 1 / x === 1 / y;
|
|
1653
|
-
} else {
|
|
1654
|
-
// Step 6.a: NaN == NaN
|
|
1655
|
-
return x !== x && y !== y;
|
|
1656
|
-
}
|
|
1657
|
-
}
|
|
1658
|
-
/*eslint-enable no-self-compare*/
|
|
1659
|
-
|
|
1660
|
-
/**
|
|
1661
|
-
* We use an Error-like object for backward compatibility as people may call
|
|
1662
|
-
* PropTypes directly and inspect their output. However, we don't use real
|
|
1663
|
-
* Errors anymore. We don't inspect their stack anyway, and creating them
|
|
1664
|
-
* is prohibitively expensive if they are created too often, such as what
|
|
1665
|
-
* happens in oneOfType() for any type before the one that matched.
|
|
1666
|
-
*/
|
|
1667
|
-
function PropTypeError(message, data) {
|
|
1668
|
-
this.message = message;
|
|
1669
|
-
this.data = data && typeof data === 'object' ? data: {};
|
|
1670
|
-
this.stack = '';
|
|
1671
|
-
}
|
|
1672
|
-
// Make `instanceof Error` still work for returned errors.
|
|
1673
|
-
PropTypeError.prototype = Error.prototype;
|
|
1674
|
-
|
|
1675
|
-
function createChainableTypeChecker(validate) {
|
|
1676
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
1677
|
-
var manualPropTypeCallCache = {};
|
|
1678
|
-
var manualPropTypeWarningCount = 0;
|
|
1679
|
-
}
|
|
1680
|
-
function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
|
|
1681
|
-
componentName = componentName || ANONYMOUS;
|
|
1682
|
-
propFullName = propFullName || propName;
|
|
1683
|
-
|
|
1684
|
-
if (secret !== ReactPropTypesSecret_1) {
|
|
1685
|
-
if (throwOnDirectAccess) {
|
|
1686
|
-
// New behavior only for users of `prop-types` package
|
|
1687
|
-
var err = new Error(
|
|
1688
|
-
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
|
1689
|
-
'Use `PropTypes.checkPropTypes()` to call them. ' +
|
|
1690
|
-
'Read more at http://fb.me/use-check-prop-types'
|
|
1691
|
-
);
|
|
1692
|
-
err.name = 'Invariant Violation';
|
|
1693
|
-
throw err;
|
|
1694
|
-
} else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
|
|
1695
|
-
// Old behavior for people using React.PropTypes
|
|
1696
|
-
var cacheKey = componentName + ':' + propName;
|
|
1697
|
-
if (
|
|
1698
|
-
!manualPropTypeCallCache[cacheKey] &&
|
|
1699
|
-
// Avoid spamming the console because they are often not actionable except for lib authors
|
|
1700
|
-
manualPropTypeWarningCount < 3
|
|
1701
|
-
) {
|
|
1702
|
-
printWarning(
|
|
1703
|
-
'You are manually calling a React.PropTypes validation ' +
|
|
1704
|
-
'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
|
|
1705
|
-
'and will throw in the standalone `prop-types` package. ' +
|
|
1706
|
-
'You may be seeing this warning due to a third-party PropTypes ' +
|
|
1707
|
-
'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
|
|
1708
|
-
);
|
|
1709
|
-
manualPropTypeCallCache[cacheKey] = true;
|
|
1710
|
-
manualPropTypeWarningCount++;
|
|
1711
|
-
}
|
|
1712
|
-
}
|
|
1713
|
-
}
|
|
1714
|
-
if (props[propName] == null) {
|
|
1715
|
-
if (isRequired) {
|
|
1716
|
-
if (props[propName] === null) {
|
|
1717
|
-
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
|
|
1718
|
-
}
|
|
1719
|
-
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
|
|
1720
|
-
}
|
|
1721
|
-
return null;
|
|
1722
|
-
} else {
|
|
1723
|
-
return validate(props, propName, componentName, location, propFullName);
|
|
1724
|
-
}
|
|
1725
|
-
}
|
|
1726
|
-
|
|
1727
|
-
var chainedCheckType = checkType.bind(null, false);
|
|
1728
|
-
chainedCheckType.isRequired = checkType.bind(null, true);
|
|
1729
|
-
|
|
1730
|
-
return chainedCheckType;
|
|
1731
|
-
}
|
|
1732
|
-
|
|
1733
|
-
function createPrimitiveTypeChecker(expectedType) {
|
|
1734
|
-
function validate(props, propName, componentName, location, propFullName, secret) {
|
|
1735
|
-
var propValue = props[propName];
|
|
1736
|
-
var propType = getPropType(propValue);
|
|
1737
|
-
if (propType !== expectedType) {
|
|
1738
|
-
// `propValue` being instance of, say, date/regexp, pass the 'object'
|
|
1739
|
-
// check, but we can offer a more precise error message here rather than
|
|
1740
|
-
// 'of type `object`'.
|
|
1741
|
-
var preciseType = getPreciseType(propValue);
|
|
1742
|
-
|
|
1743
|
-
return new PropTypeError(
|
|
1744
|
-
'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),
|
|
1745
|
-
{expectedType: expectedType}
|
|
1746
|
-
);
|
|
1747
|
-
}
|
|
1748
|
-
return null;
|
|
1749
|
-
}
|
|
1750
|
-
return createChainableTypeChecker(validate);
|
|
1751
|
-
}
|
|
1752
|
-
|
|
1753
|
-
function createAnyTypeChecker() {
|
|
1754
|
-
return createChainableTypeChecker(emptyFunctionThatReturnsNull);
|
|
1755
|
-
}
|
|
1756
|
-
|
|
1757
|
-
function createArrayOfTypeChecker(typeChecker) {
|
|
1758
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
1759
|
-
if (typeof typeChecker !== 'function') {
|
|
1760
|
-
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
|
|
1761
|
-
}
|
|
1762
|
-
var propValue = props[propName];
|
|
1763
|
-
if (!Array.isArray(propValue)) {
|
|
1764
|
-
var propType = getPropType(propValue);
|
|
1765
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
|
|
1766
|
-
}
|
|
1767
|
-
for (var i = 0; i < propValue.length; i++) {
|
|
1768
|
-
var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret_1);
|
|
1769
|
-
if (error instanceof Error) {
|
|
1770
|
-
return error;
|
|
1771
|
-
}
|
|
1772
|
-
}
|
|
1773
|
-
return null;
|
|
1774
|
-
}
|
|
1775
|
-
return createChainableTypeChecker(validate);
|
|
1776
|
-
}
|
|
1777
|
-
|
|
1778
|
-
function createElementTypeChecker() {
|
|
1779
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
1780
|
-
var propValue = props[propName];
|
|
1781
|
-
if (!isValidElement(propValue)) {
|
|
1782
|
-
var propType = getPropType(propValue);
|
|
1783
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
|
|
1784
|
-
}
|
|
1785
|
-
return null;
|
|
1786
|
-
}
|
|
1787
|
-
return createChainableTypeChecker(validate);
|
|
1788
|
-
}
|
|
1789
|
-
|
|
1790
|
-
function createElementTypeTypeChecker() {
|
|
1791
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
1792
|
-
var propValue = props[propName];
|
|
1793
|
-
if (!reactIs.isValidElementType(propValue)) {
|
|
1794
|
-
var propType = getPropType(propValue);
|
|
1795
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
|
|
1796
|
-
}
|
|
1797
|
-
return null;
|
|
1798
|
-
}
|
|
1799
|
-
return createChainableTypeChecker(validate);
|
|
1800
|
-
}
|
|
1801
|
-
|
|
1802
|
-
function createInstanceTypeChecker(expectedClass) {
|
|
1803
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
1804
|
-
if (!(props[propName] instanceof expectedClass)) {
|
|
1805
|
-
var expectedClassName = expectedClass.name || ANONYMOUS;
|
|
1806
|
-
var actualClassName = getClassName(props[propName]);
|
|
1807
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
|
|
1808
|
-
}
|
|
1809
|
-
return null;
|
|
1810
|
-
}
|
|
1811
|
-
return createChainableTypeChecker(validate);
|
|
1812
|
-
}
|
|
1813
|
-
|
|
1814
|
-
function createEnumTypeChecker(expectedValues) {
|
|
1815
|
-
if (!Array.isArray(expectedValues)) {
|
|
1816
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
1817
|
-
if (arguments.length > 1) {
|
|
1818
|
-
printWarning(
|
|
1819
|
-
'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
|
|
1820
|
-
'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
|
|
1821
|
-
);
|
|
1822
|
-
} else {
|
|
1823
|
-
printWarning('Invalid argument supplied to oneOf, expected an array.');
|
|
1824
|
-
}
|
|
1825
|
-
}
|
|
1826
|
-
return emptyFunctionThatReturnsNull;
|
|
1827
|
-
}
|
|
1828
|
-
|
|
1829
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
1830
|
-
var propValue = props[propName];
|
|
1831
|
-
for (var i = 0; i < expectedValues.length; i++) {
|
|
1832
|
-
if (is(propValue, expectedValues[i])) {
|
|
1833
|
-
return null;
|
|
1834
|
-
}
|
|
1835
|
-
}
|
|
1836
|
-
|
|
1837
|
-
var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
|
|
1838
|
-
var type = getPreciseType(value);
|
|
1839
|
-
if (type === 'symbol') {
|
|
1840
|
-
return String(value);
|
|
1841
|
-
}
|
|
1842
|
-
return value;
|
|
1843
|
-
});
|
|
1844
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
|
|
1845
|
-
}
|
|
1846
|
-
return createChainableTypeChecker(validate);
|
|
1847
|
-
}
|
|
1848
|
-
|
|
1849
|
-
function createObjectOfTypeChecker(typeChecker) {
|
|
1850
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
1851
|
-
if (typeof typeChecker !== 'function') {
|
|
1852
|
-
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
|
|
1853
|
-
}
|
|
1854
|
-
var propValue = props[propName];
|
|
1855
|
-
var propType = getPropType(propValue);
|
|
1856
|
-
if (propType !== 'object') {
|
|
1857
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
|
|
1858
|
-
}
|
|
1859
|
-
for (var key in propValue) {
|
|
1860
|
-
if (has$1(propValue, key)) {
|
|
1861
|
-
var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1);
|
|
1862
|
-
if (error instanceof Error) {
|
|
1863
|
-
return error;
|
|
1864
|
-
}
|
|
1865
|
-
}
|
|
1866
|
-
}
|
|
1867
|
-
return null;
|
|
1868
|
-
}
|
|
1869
|
-
return createChainableTypeChecker(validate);
|
|
1870
|
-
}
|
|
1871
|
-
|
|
1872
|
-
function createUnionTypeChecker(arrayOfTypeCheckers) {
|
|
1873
|
-
if (!Array.isArray(arrayOfTypeCheckers)) {
|
|
1874
|
-
process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
|
|
1875
|
-
return emptyFunctionThatReturnsNull;
|
|
1876
|
-
}
|
|
1877
|
-
|
|
1878
|
-
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
1879
|
-
var checker = arrayOfTypeCheckers[i];
|
|
1880
|
-
if (typeof checker !== 'function') {
|
|
1881
|
-
printWarning(
|
|
1882
|
-
'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
|
|
1883
|
-
'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
|
|
1884
|
-
);
|
|
1885
|
-
return emptyFunctionThatReturnsNull;
|
|
1886
|
-
}
|
|
1887
|
-
}
|
|
1888
|
-
|
|
1889
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
1890
|
-
var expectedTypes = [];
|
|
1891
|
-
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
1892
|
-
var checker = arrayOfTypeCheckers[i];
|
|
1893
|
-
var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret_1);
|
|
1894
|
-
if (checkerResult == null) {
|
|
1895
|
-
return null;
|
|
1896
|
-
}
|
|
1897
|
-
if (checkerResult.data && has$1(checkerResult.data, 'expectedType')) {
|
|
1898
|
-
expectedTypes.push(checkerResult.data.expectedType);
|
|
1105
|
+
var dist$1 = createCommonjsModule(function (module, exports) {
|
|
1106
|
+
var __awaiter = (commonjsGlobal && commonjsGlobal.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
1107
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
1108
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
1109
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
1110
|
+
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
|
1111
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
1112
|
+
});
|
|
1113
|
+
};
|
|
1114
|
+
var __importDefault = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
|
|
1115
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
1116
|
+
};
|
|
1117
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1118
|
+
const p_defer_1 = __importDefault(pDefer);
|
|
1119
|
+
function mapAgeCleaner(map, property = 'maxAge') {
|
|
1120
|
+
let processingKey;
|
|
1121
|
+
let processingTimer;
|
|
1122
|
+
let processingDeferred;
|
|
1123
|
+
const cleanup = () => __awaiter(this, void 0, void 0, function* () {
|
|
1124
|
+
if (processingKey !== undefined) {
|
|
1125
|
+
// If we are already processing an item, we can safely exit
|
|
1126
|
+
return;
|
|
1899
1127
|
}
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
1909
|
-
if (!isNode(props[propName])) {
|
|
1910
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
|
|
1911
|
-
}
|
|
1912
|
-
return null;
|
|
1913
|
-
}
|
|
1914
|
-
return createChainableTypeChecker(validate);
|
|
1915
|
-
}
|
|
1916
|
-
|
|
1917
|
-
function invalidValidatorError(componentName, location, propFullName, key, type) {
|
|
1918
|
-
return new PropTypeError(
|
|
1919
|
-
(componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +
|
|
1920
|
-
'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'
|
|
1921
|
-
);
|
|
1922
|
-
}
|
|
1923
|
-
|
|
1924
|
-
function createShapeTypeChecker(shapeTypes) {
|
|
1925
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
1926
|
-
var propValue = props[propName];
|
|
1927
|
-
var propType = getPropType(propValue);
|
|
1928
|
-
if (propType !== 'object') {
|
|
1929
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
|
1930
|
-
}
|
|
1931
|
-
for (var key in shapeTypes) {
|
|
1932
|
-
var checker = shapeTypes[key];
|
|
1933
|
-
if (typeof checker !== 'function') {
|
|
1934
|
-
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
|
1935
|
-
}
|
|
1936
|
-
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1);
|
|
1937
|
-
if (error) {
|
|
1938
|
-
return error;
|
|
1939
|
-
}
|
|
1940
|
-
}
|
|
1941
|
-
return null;
|
|
1942
|
-
}
|
|
1943
|
-
return createChainableTypeChecker(validate);
|
|
1944
|
-
}
|
|
1945
|
-
|
|
1946
|
-
function createStrictShapeTypeChecker(shapeTypes) {
|
|
1947
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
1948
|
-
var propValue = props[propName];
|
|
1949
|
-
var propType = getPropType(propValue);
|
|
1950
|
-
if (propType !== 'object') {
|
|
1951
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
|
1952
|
-
}
|
|
1953
|
-
// We need to check all keys in case some are required but missing from props.
|
|
1954
|
-
var allKeys = objectAssign({}, props[propName], shapeTypes);
|
|
1955
|
-
for (var key in allKeys) {
|
|
1956
|
-
var checker = shapeTypes[key];
|
|
1957
|
-
if (has$1(shapeTypes, key) && typeof checker !== 'function') {
|
|
1958
|
-
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
|
1959
|
-
}
|
|
1960
|
-
if (!checker) {
|
|
1961
|
-
return new PropTypeError(
|
|
1962
|
-
'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
|
|
1963
|
-
'\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
|
|
1964
|
-
'\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
|
|
1965
|
-
);
|
|
1966
|
-
}
|
|
1967
|
-
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1);
|
|
1968
|
-
if (error) {
|
|
1969
|
-
return error;
|
|
1970
|
-
}
|
|
1971
|
-
}
|
|
1972
|
-
return null;
|
|
1973
|
-
}
|
|
1974
|
-
|
|
1975
|
-
return createChainableTypeChecker(validate);
|
|
1976
|
-
}
|
|
1977
|
-
|
|
1978
|
-
function isNode(propValue) {
|
|
1979
|
-
switch (typeof propValue) {
|
|
1980
|
-
case 'number':
|
|
1981
|
-
case 'string':
|
|
1982
|
-
case 'undefined':
|
|
1983
|
-
return true;
|
|
1984
|
-
case 'boolean':
|
|
1985
|
-
return !propValue;
|
|
1986
|
-
case 'object':
|
|
1987
|
-
if (Array.isArray(propValue)) {
|
|
1988
|
-
return propValue.every(isNode);
|
|
1989
|
-
}
|
|
1990
|
-
if (propValue === null || isValidElement(propValue)) {
|
|
1991
|
-
return true;
|
|
1992
|
-
}
|
|
1993
|
-
|
|
1994
|
-
var iteratorFn = getIteratorFn(propValue);
|
|
1995
|
-
if (iteratorFn) {
|
|
1996
|
-
var iterator = iteratorFn.call(propValue);
|
|
1997
|
-
var step;
|
|
1998
|
-
if (iteratorFn !== propValue.entries) {
|
|
1999
|
-
while (!(step = iterator.next()).done) {
|
|
2000
|
-
if (!isNode(step.value)) {
|
|
2001
|
-
return false;
|
|
2002
|
-
}
|
|
1128
|
+
const setupTimer = (item) => __awaiter(this, void 0, void 0, function* () {
|
|
1129
|
+
processingDeferred = p_defer_1.default();
|
|
1130
|
+
const delay = item[1][property] - Date.now();
|
|
1131
|
+
if (delay <= 0) {
|
|
1132
|
+
// Remove the item immediately if the delay is equal to or below 0
|
|
1133
|
+
map.delete(item[0]);
|
|
1134
|
+
processingDeferred.resolve();
|
|
1135
|
+
return;
|
|
2003
1136
|
}
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
if (
|
|
2010
|
-
|
|
1137
|
+
// Keep track of the current processed key
|
|
1138
|
+
processingKey = item[0];
|
|
1139
|
+
processingTimer = setTimeout(() => {
|
|
1140
|
+
// Remove the item when the timeout fires
|
|
1141
|
+
map.delete(item[0]);
|
|
1142
|
+
if (processingDeferred) {
|
|
1143
|
+
processingDeferred.resolve();
|
|
2011
1144
|
}
|
|
2012
|
-
|
|
1145
|
+
}, delay);
|
|
1146
|
+
// tslint:disable-next-line:strict-type-predicates
|
|
1147
|
+
if (typeof processingTimer.unref === 'function') {
|
|
1148
|
+
// Don't hold up the process from exiting
|
|
1149
|
+
processingTimer.unref();
|
|
1150
|
+
}
|
|
1151
|
+
return processingDeferred.promise;
|
|
1152
|
+
});
|
|
1153
|
+
try {
|
|
1154
|
+
for (const entry of map) {
|
|
1155
|
+
yield setupTimer(entry);
|
|
2013
1156
|
}
|
|
2014
|
-
}
|
|
2015
|
-
} else {
|
|
2016
|
-
return false;
|
|
2017
1157
|
}
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
}
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
if (Array.isArray(propValue)) {
|
|
2053
|
-
return 'array';
|
|
2054
|
-
}
|
|
2055
|
-
if (propValue instanceof RegExp) {
|
|
2056
|
-
// Old webkits (at least until Android 4.0) return 'function' rather than
|
|
2057
|
-
// 'object' for typeof a RegExp. We'll normalize this here so that /bla/
|
|
2058
|
-
// passes PropTypes.object.
|
|
2059
|
-
return 'object';
|
|
2060
|
-
}
|
|
2061
|
-
if (isSymbol(propType, propValue)) {
|
|
2062
|
-
return 'symbol';
|
|
2063
|
-
}
|
|
2064
|
-
return propType;
|
|
2065
|
-
}
|
|
2066
|
-
|
|
2067
|
-
// This handles more types than `getPropType`. Only used for error messages.
|
|
2068
|
-
// See `createPrimitiveTypeChecker`.
|
|
2069
|
-
function getPreciseType(propValue) {
|
|
2070
|
-
if (typeof propValue === 'undefined' || propValue === null) {
|
|
2071
|
-
return '' + propValue;
|
|
2072
|
-
}
|
|
2073
|
-
var propType = getPropType(propValue);
|
|
2074
|
-
if (propType === 'object') {
|
|
2075
|
-
if (propValue instanceof Date) {
|
|
2076
|
-
return 'date';
|
|
2077
|
-
} else if (propValue instanceof RegExp) {
|
|
2078
|
-
return 'regexp';
|
|
2079
|
-
}
|
|
2080
|
-
}
|
|
2081
|
-
return propType;
|
|
2082
|
-
}
|
|
2083
|
-
|
|
2084
|
-
// Returns a string that is postfixed to a warning about an invalid type.
|
|
2085
|
-
// For example, "undefined" or "of type array"
|
|
2086
|
-
function getPostfixForTypeWarning(value) {
|
|
2087
|
-
var type = getPreciseType(value);
|
|
2088
|
-
switch (type) {
|
|
2089
|
-
case 'array':
|
|
2090
|
-
case 'object':
|
|
2091
|
-
return 'an ' + type;
|
|
2092
|
-
case 'boolean':
|
|
2093
|
-
case 'date':
|
|
2094
|
-
case 'regexp':
|
|
2095
|
-
return 'a ' + type;
|
|
2096
|
-
default:
|
|
2097
|
-
return type;
|
|
2098
|
-
}
|
|
2099
|
-
}
|
|
2100
|
-
|
|
2101
|
-
// Returns class name of the object, if any.
|
|
2102
|
-
function getClassName(propValue) {
|
|
2103
|
-
if (!propValue.constructor || !propValue.constructor.name) {
|
|
2104
|
-
return ANONYMOUS;
|
|
2105
|
-
}
|
|
2106
|
-
return propValue.constructor.name;
|
|
2107
|
-
}
|
|
2108
|
-
|
|
2109
|
-
ReactPropTypes.checkPropTypes = checkPropTypes_1;
|
|
2110
|
-
ReactPropTypes.resetWarningCache = checkPropTypes_1.resetWarningCache;
|
|
2111
|
-
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
2112
|
-
|
|
2113
|
-
return ReactPropTypes;
|
|
2114
|
-
};
|
|
2115
|
-
|
|
2116
|
-
var propTypes = createCommonjsModule(function (module) {
|
|
2117
|
-
/**
|
|
2118
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
2119
|
-
*
|
|
2120
|
-
* This source code is licensed under the MIT license found in the
|
|
2121
|
-
* LICENSE file in the root directory of this source tree.
|
|
2122
|
-
*/
|
|
2123
|
-
|
|
2124
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
2125
|
-
var ReactIs = reactIs;
|
|
2126
|
-
|
|
2127
|
-
// By explicitly using `prop-types` you are opting into new development behavior.
|
|
2128
|
-
// http://fb.me/prop-types-in-prod
|
|
2129
|
-
var throwOnDirectAccess = true;
|
|
2130
|
-
module.exports = factoryWithTypeCheckers(ReactIs.isElement, throwOnDirectAccess);
|
|
2131
|
-
} else {
|
|
2132
|
-
// By explicitly using `prop-types` you are opting into new production behavior.
|
|
2133
|
-
// http://fb.me/prop-types-in-prod
|
|
2134
|
-
module.exports = factoryWithThrowingShims();
|
|
1158
|
+
catch (_a) {
|
|
1159
|
+
// Do nothing if an error occurs, this means the timer was cleaned up and we should stop processing
|
|
1160
|
+
}
|
|
1161
|
+
processingKey = undefined;
|
|
1162
|
+
});
|
|
1163
|
+
const reset = () => {
|
|
1164
|
+
processingKey = undefined;
|
|
1165
|
+
if (processingTimer !== undefined) {
|
|
1166
|
+
clearTimeout(processingTimer);
|
|
1167
|
+
processingTimer = undefined;
|
|
1168
|
+
}
|
|
1169
|
+
if (processingDeferred !== undefined) { // tslint:disable-line:early-exit
|
|
1170
|
+
processingDeferred.reject(undefined);
|
|
1171
|
+
processingDeferred = undefined;
|
|
1172
|
+
}
|
|
1173
|
+
};
|
|
1174
|
+
const originalSet = map.set.bind(map);
|
|
1175
|
+
map.set = (key, value) => {
|
|
1176
|
+
if (map.has(key)) {
|
|
1177
|
+
// If the key already exist, remove it so we can add it back at the end of the map.
|
|
1178
|
+
map.delete(key);
|
|
1179
|
+
}
|
|
1180
|
+
// Call the original `map.set`
|
|
1181
|
+
const result = originalSet(key, value);
|
|
1182
|
+
// If we are already processing a key and the key added is the current processed key, stop processing it
|
|
1183
|
+
if (processingKey && processingKey === key) {
|
|
1184
|
+
reset();
|
|
1185
|
+
}
|
|
1186
|
+
// Always run the cleanup method in case it wasn't started yet
|
|
1187
|
+
cleanup(); // tslint:disable-line:no-floating-promises
|
|
1188
|
+
return result;
|
|
1189
|
+
};
|
|
1190
|
+
cleanup(); // tslint:disable-line:no-floating-promises
|
|
1191
|
+
return map;
|
|
2135
1192
|
}
|
|
1193
|
+
exports.default = mapAgeCleaner;
|
|
1194
|
+
// Add support for CJS
|
|
1195
|
+
module.exports = mapAgeCleaner;
|
|
1196
|
+
module.exports.default = mapAgeCleaner;
|
|
2136
1197
|
});
|
|
2137
1198
|
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
|
|
2141
|
-
|
|
2142
|
-
/**
|
|
2143
|
-
* lodash (Custom Build) <https://lodash.com/>
|
|
2144
|
-
* Build: `lodash modularize exports="npm" -o ./`
|
|
2145
|
-
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
|
2146
|
-
* Released under MIT license <https://lodash.com/license>
|
|
2147
|
-
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
2148
|
-
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
2149
|
-
*/
|
|
2150
|
-
|
|
2151
|
-
/** Used as the `TypeError` message for "Functions" methods. */
|
|
2152
|
-
var FUNC_ERROR_TEXT = 'Expected a function';
|
|
2153
|
-
|
|
2154
|
-
/** Used to stand-in for `undefined` hash values. */
|
|
2155
|
-
var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
|
2156
|
-
|
|
2157
|
-
/** `Object#toString` result references. */
|
|
2158
|
-
var funcTag = '[object Function]',
|
|
2159
|
-
genTag = '[object GeneratorFunction]';
|
|
2160
|
-
|
|
2161
|
-
/**
|
|
2162
|
-
* Used to match `RegExp`
|
|
2163
|
-
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
|
|
2164
|
-
*/
|
|
2165
|
-
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
2166
|
-
|
|
2167
|
-
/** Used to detect host constructors (Safari). */
|
|
2168
|
-
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
2169
|
-
|
|
2170
|
-
/** Detect free variable `global` from Node.js. */
|
|
2171
|
-
var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
|
2172
|
-
|
|
2173
|
-
/** Detect free variable `self`. */
|
|
2174
|
-
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
|
2175
|
-
|
|
2176
|
-
/** Used as a reference to the global object. */
|
|
2177
|
-
var root = freeGlobal || freeSelf || Function('return this')();
|
|
2178
|
-
|
|
2179
|
-
/**
|
|
2180
|
-
* Gets the value at `key` of `object`.
|
|
2181
|
-
*
|
|
2182
|
-
* @private
|
|
2183
|
-
* @param {Object} [object] The object to query.
|
|
2184
|
-
* @param {string} key The key of the property to get.
|
|
2185
|
-
* @returns {*} Returns the property value.
|
|
2186
|
-
*/
|
|
2187
|
-
function getValue$2(object, key) {
|
|
2188
|
-
return object == null ? undefined : object[key];
|
|
2189
|
-
}
|
|
2190
|
-
|
|
2191
|
-
/**
|
|
2192
|
-
* Checks if `value` is a host object in IE < 9.
|
|
2193
|
-
*
|
|
2194
|
-
* @private
|
|
2195
|
-
* @param {*} value The value to check.
|
|
2196
|
-
* @returns {boolean} Returns `true` if `value` is a host object, else `false`.
|
|
2197
|
-
*/
|
|
2198
|
-
function isHostObject(value) {
|
|
2199
|
-
// Many host objects are `Object` objects that can coerce to strings
|
|
2200
|
-
// despite having improperly defined `toString` methods.
|
|
2201
|
-
var result = false;
|
|
2202
|
-
if (value != null && typeof value.toString != 'function') {
|
|
2203
|
-
try {
|
|
2204
|
-
result = !!(value + '');
|
|
2205
|
-
} catch (e) {}
|
|
2206
|
-
}
|
|
2207
|
-
return result;
|
|
2208
|
-
}
|
|
2209
|
-
|
|
2210
|
-
/** Used for built-in method references. */
|
|
2211
|
-
var arrayProto = Array.prototype,
|
|
2212
|
-
funcProto = Function.prototype,
|
|
2213
|
-
objectProto = Object.prototype;
|
|
2214
|
-
|
|
2215
|
-
/** Used to detect overreaching core-js shims. */
|
|
2216
|
-
var coreJsData = root['__core-js_shared__'];
|
|
2217
|
-
|
|
2218
|
-
/** Used to detect methods masquerading as native. */
|
|
2219
|
-
var maskSrcKey = (function() {
|
|
2220
|
-
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
|
|
2221
|
-
return uid ? ('Symbol(src)_1.' + uid) : '';
|
|
2222
|
-
}());
|
|
2223
|
-
|
|
2224
|
-
/** Used to resolve the decompiled source of functions. */
|
|
2225
|
-
var funcToString = funcProto.toString;
|
|
2226
|
-
|
|
2227
|
-
/** Used to check objects for own properties. */
|
|
2228
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
1199
|
+
unwrapExports(dist$1);
|
|
2229
1200
|
|
|
1201
|
+
const decoratorInstanceMap = new WeakMap();
|
|
1202
|
+
const cacheStore = new WeakMap();
|
|
2230
1203
|
/**
|
|
2231
|
-
|
|
2232
|
-
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
2233
|
-
* of values.
|
|
2234
|
-
*/
|
|
2235
|
-
var objectToString = objectProto.toString;
|
|
1204
|
+
[Memoize](https://en.wikipedia.org/wiki/Memoization) functions - An optimization used to speed up consecutive function calls by caching the result of calls with identical input.
|
|
2236
1205
|
|
|
2237
|
-
|
|
2238
|
-
var reIsNative = RegExp('^' +
|
|
2239
|
-
funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
|
|
2240
|
-
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
|
|
2241
|
-
);
|
|
1206
|
+
@param fn - Function to be memoized.
|
|
2242
1207
|
|
|
2243
|
-
|
|
2244
|
-
|
|
1208
|
+
@example
|
|
1209
|
+
```
|
|
1210
|
+
import mem = require('mem');
|
|
2245
1211
|
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
1212
|
+
let i = 0;
|
|
1213
|
+
const counter = () => ++i;
|
|
1214
|
+
const memoized = mem(counter);
|
|
2249
1215
|
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
*
|
|
2253
|
-
* @private
|
|
2254
|
-
* @constructor
|
|
2255
|
-
* @param {Array} [entries] The key-value pairs to cache.
|
|
2256
|
-
*/
|
|
2257
|
-
function Hash(entries) {
|
|
2258
|
-
var index = -1,
|
|
2259
|
-
length = entries ? entries.length : 0;
|
|
2260
|
-
|
|
2261
|
-
this.clear();
|
|
2262
|
-
while (++index < length) {
|
|
2263
|
-
var entry = entries[index];
|
|
2264
|
-
this.set(entry[0], entry[1]);
|
|
2265
|
-
}
|
|
2266
|
-
}
|
|
1216
|
+
memoized('foo');
|
|
1217
|
+
//=> 1
|
|
2267
1218
|
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
* @private
|
|
2272
|
-
* @name clear
|
|
2273
|
-
* @memberOf Hash
|
|
2274
|
-
*/
|
|
2275
|
-
function hashClear() {
|
|
2276
|
-
this.__data__ = nativeCreate ? nativeCreate(null) : {};
|
|
2277
|
-
}
|
|
1219
|
+
// Cached as it's the same arguments
|
|
1220
|
+
memoized('foo');
|
|
1221
|
+
//=> 1
|
|
2278
1222
|
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
* @private
|
|
2283
|
-
* @name delete
|
|
2284
|
-
* @memberOf Hash
|
|
2285
|
-
* @param {Object} hash The hash to modify.
|
|
2286
|
-
* @param {string} key The key of the value to remove.
|
|
2287
|
-
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
2288
|
-
*/
|
|
2289
|
-
function hashDelete(key) {
|
|
2290
|
-
return this.has(key) && delete this.__data__[key];
|
|
2291
|
-
}
|
|
2292
|
-
|
|
2293
|
-
/**
|
|
2294
|
-
* Gets the hash value for `key`.
|
|
2295
|
-
*
|
|
2296
|
-
* @private
|
|
2297
|
-
* @name get
|
|
2298
|
-
* @memberOf Hash
|
|
2299
|
-
* @param {string} key The key of the value to get.
|
|
2300
|
-
* @returns {*} Returns the entry value.
|
|
2301
|
-
*/
|
|
2302
|
-
function hashGet(key) {
|
|
2303
|
-
var data = this.__data__;
|
|
2304
|
-
if (nativeCreate) {
|
|
2305
|
-
var result = data[key];
|
|
2306
|
-
return result === HASH_UNDEFINED ? undefined : result;
|
|
2307
|
-
}
|
|
2308
|
-
return hasOwnProperty.call(data, key) ? data[key] : undefined;
|
|
2309
|
-
}
|
|
2310
|
-
|
|
2311
|
-
/**
|
|
2312
|
-
* Checks if a hash value for `key` exists.
|
|
2313
|
-
*
|
|
2314
|
-
* @private
|
|
2315
|
-
* @name has
|
|
2316
|
-
* @memberOf Hash
|
|
2317
|
-
* @param {string} key The key of the entry to check.
|
|
2318
|
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
2319
|
-
*/
|
|
2320
|
-
function hashHas(key) {
|
|
2321
|
-
var data = this.__data__;
|
|
2322
|
-
return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
|
|
2323
|
-
}
|
|
2324
|
-
|
|
2325
|
-
/**
|
|
2326
|
-
* Sets the hash `key` to `value`.
|
|
2327
|
-
*
|
|
2328
|
-
* @private
|
|
2329
|
-
* @name set
|
|
2330
|
-
* @memberOf Hash
|
|
2331
|
-
* @param {string} key The key of the value to set.
|
|
2332
|
-
* @param {*} value The value to set.
|
|
2333
|
-
* @returns {Object} Returns the hash instance.
|
|
2334
|
-
*/
|
|
2335
|
-
function hashSet(key, value) {
|
|
2336
|
-
var data = this.__data__;
|
|
2337
|
-
data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
|
|
2338
|
-
return this;
|
|
2339
|
-
}
|
|
2340
|
-
|
|
2341
|
-
// Add methods to `Hash`.
|
|
2342
|
-
Hash.prototype.clear = hashClear;
|
|
2343
|
-
Hash.prototype['delete'] = hashDelete;
|
|
2344
|
-
Hash.prototype.get = hashGet;
|
|
2345
|
-
Hash.prototype.has = hashHas;
|
|
2346
|
-
Hash.prototype.set = hashSet;
|
|
2347
|
-
|
|
2348
|
-
/**
|
|
2349
|
-
* Creates an list cache object.
|
|
2350
|
-
*
|
|
2351
|
-
* @private
|
|
2352
|
-
* @constructor
|
|
2353
|
-
* @param {Array} [entries] The key-value pairs to cache.
|
|
2354
|
-
*/
|
|
2355
|
-
function ListCache(entries) {
|
|
2356
|
-
var index = -1,
|
|
2357
|
-
length = entries ? entries.length : 0;
|
|
2358
|
-
|
|
2359
|
-
this.clear();
|
|
2360
|
-
while (++index < length) {
|
|
2361
|
-
var entry = entries[index];
|
|
2362
|
-
this.set(entry[0], entry[1]);
|
|
2363
|
-
}
|
|
2364
|
-
}
|
|
2365
|
-
|
|
2366
|
-
/**
|
|
2367
|
-
* Removes all key-value entries from the list cache.
|
|
2368
|
-
*
|
|
2369
|
-
* @private
|
|
2370
|
-
* @name clear
|
|
2371
|
-
* @memberOf ListCache
|
|
2372
|
-
*/
|
|
2373
|
-
function listCacheClear() {
|
|
2374
|
-
this.__data__ = [];
|
|
2375
|
-
}
|
|
2376
|
-
|
|
2377
|
-
/**
|
|
2378
|
-
* Removes `key` and its value from the list cache.
|
|
2379
|
-
*
|
|
2380
|
-
* @private
|
|
2381
|
-
* @name delete
|
|
2382
|
-
* @memberOf ListCache
|
|
2383
|
-
* @param {string} key The key of the value to remove.
|
|
2384
|
-
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
2385
|
-
*/
|
|
2386
|
-
function listCacheDelete(key) {
|
|
2387
|
-
var data = this.__data__,
|
|
2388
|
-
index = assocIndexOf(data, key);
|
|
2389
|
-
|
|
2390
|
-
if (index < 0) {
|
|
2391
|
-
return false;
|
|
2392
|
-
}
|
|
2393
|
-
var lastIndex = data.length - 1;
|
|
2394
|
-
if (index == lastIndex) {
|
|
2395
|
-
data.pop();
|
|
2396
|
-
} else {
|
|
2397
|
-
splice.call(data, index, 1);
|
|
2398
|
-
}
|
|
2399
|
-
return true;
|
|
2400
|
-
}
|
|
2401
|
-
|
|
2402
|
-
/**
|
|
2403
|
-
* Gets the list cache value for `key`.
|
|
2404
|
-
*
|
|
2405
|
-
* @private
|
|
2406
|
-
* @name get
|
|
2407
|
-
* @memberOf ListCache
|
|
2408
|
-
* @param {string} key The key of the value to get.
|
|
2409
|
-
* @returns {*} Returns the entry value.
|
|
2410
|
-
*/
|
|
2411
|
-
function listCacheGet(key) {
|
|
2412
|
-
var data = this.__data__,
|
|
2413
|
-
index = assocIndexOf(data, key);
|
|
2414
|
-
|
|
2415
|
-
return index < 0 ? undefined : data[index][1];
|
|
2416
|
-
}
|
|
2417
|
-
|
|
2418
|
-
/**
|
|
2419
|
-
* Checks if a list cache value for `key` exists.
|
|
2420
|
-
*
|
|
2421
|
-
* @private
|
|
2422
|
-
* @name has
|
|
2423
|
-
* @memberOf ListCache
|
|
2424
|
-
* @param {string} key The key of the entry to check.
|
|
2425
|
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
2426
|
-
*/
|
|
2427
|
-
function listCacheHas(key) {
|
|
2428
|
-
return assocIndexOf(this.__data__, key) > -1;
|
|
2429
|
-
}
|
|
2430
|
-
|
|
2431
|
-
/**
|
|
2432
|
-
* Sets the list cache `key` to `value`.
|
|
2433
|
-
*
|
|
2434
|
-
* @private
|
|
2435
|
-
* @name set
|
|
2436
|
-
* @memberOf ListCache
|
|
2437
|
-
* @param {string} key The key of the value to set.
|
|
2438
|
-
* @param {*} value The value to set.
|
|
2439
|
-
* @returns {Object} Returns the list cache instance.
|
|
2440
|
-
*/
|
|
2441
|
-
function listCacheSet(key, value) {
|
|
2442
|
-
var data = this.__data__,
|
|
2443
|
-
index = assocIndexOf(data, key);
|
|
2444
|
-
|
|
2445
|
-
if (index < 0) {
|
|
2446
|
-
data.push([key, value]);
|
|
2447
|
-
} else {
|
|
2448
|
-
data[index][1] = value;
|
|
2449
|
-
}
|
|
2450
|
-
return this;
|
|
2451
|
-
}
|
|
2452
|
-
|
|
2453
|
-
// Add methods to `ListCache`.
|
|
2454
|
-
ListCache.prototype.clear = listCacheClear;
|
|
2455
|
-
ListCache.prototype['delete'] = listCacheDelete;
|
|
2456
|
-
ListCache.prototype.get = listCacheGet;
|
|
2457
|
-
ListCache.prototype.has = listCacheHas;
|
|
2458
|
-
ListCache.prototype.set = listCacheSet;
|
|
2459
|
-
|
|
2460
|
-
/**
|
|
2461
|
-
* Creates a map cache object to store key-value pairs.
|
|
2462
|
-
*
|
|
2463
|
-
* @private
|
|
2464
|
-
* @constructor
|
|
2465
|
-
* @param {Array} [entries] The key-value pairs to cache.
|
|
2466
|
-
*/
|
|
2467
|
-
function MapCache(entries) {
|
|
2468
|
-
var index = -1,
|
|
2469
|
-
length = entries ? entries.length : 0;
|
|
2470
|
-
|
|
2471
|
-
this.clear();
|
|
2472
|
-
while (++index < length) {
|
|
2473
|
-
var entry = entries[index];
|
|
2474
|
-
this.set(entry[0], entry[1]);
|
|
2475
|
-
}
|
|
2476
|
-
}
|
|
2477
|
-
|
|
2478
|
-
/**
|
|
2479
|
-
* Removes all key-value entries from the map.
|
|
2480
|
-
*
|
|
2481
|
-
* @private
|
|
2482
|
-
* @name clear
|
|
2483
|
-
* @memberOf MapCache
|
|
2484
|
-
*/
|
|
2485
|
-
function mapCacheClear() {
|
|
2486
|
-
this.__data__ = {
|
|
2487
|
-
'hash': new Hash,
|
|
2488
|
-
'map': new (Map$1 || ListCache),
|
|
2489
|
-
'string': new Hash
|
|
2490
|
-
};
|
|
2491
|
-
}
|
|
2492
|
-
|
|
2493
|
-
/**
|
|
2494
|
-
* Removes `key` and its value from the map.
|
|
2495
|
-
*
|
|
2496
|
-
* @private
|
|
2497
|
-
* @name delete
|
|
2498
|
-
* @memberOf MapCache
|
|
2499
|
-
* @param {string} key The key of the value to remove.
|
|
2500
|
-
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
2501
|
-
*/
|
|
2502
|
-
function mapCacheDelete(key) {
|
|
2503
|
-
return getMapData(this, key)['delete'](key);
|
|
2504
|
-
}
|
|
1223
|
+
// Not cached anymore as the arguments changed
|
|
1224
|
+
memoized('bar');
|
|
1225
|
+
//=> 2
|
|
2505
1226
|
|
|
1227
|
+
memoized('bar');
|
|
1228
|
+
//=> 2
|
|
1229
|
+
```
|
|
1230
|
+
*/
|
|
1231
|
+
const mem = (fn, { cacheKey, cache = new Map(), maxAge } = {}) => {
|
|
1232
|
+
if (typeof maxAge === 'number') {
|
|
1233
|
+
// TODO: Drop after https://github.com/SamVerschueren/map-age-cleaner/issues/5
|
|
1234
|
+
// @ts-expect-error
|
|
1235
|
+
dist$1(cache);
|
|
1236
|
+
}
|
|
1237
|
+
const memoized = function (...arguments_) {
|
|
1238
|
+
const key = cacheKey ? cacheKey(arguments_) : arguments_[0];
|
|
1239
|
+
const cacheItem = cache.get(key);
|
|
1240
|
+
if (cacheItem) {
|
|
1241
|
+
return cacheItem.data;
|
|
1242
|
+
}
|
|
1243
|
+
const result = fn.apply(this, arguments_);
|
|
1244
|
+
cache.set(key, {
|
|
1245
|
+
data: result,
|
|
1246
|
+
maxAge: maxAge ? Date.now() + maxAge : Number.POSITIVE_INFINITY
|
|
1247
|
+
});
|
|
1248
|
+
return result;
|
|
1249
|
+
};
|
|
1250
|
+
mimicFn_1(memoized, fn, {
|
|
1251
|
+
ignoreNonConfigurable: true
|
|
1252
|
+
});
|
|
1253
|
+
cacheStore.set(memoized, cache);
|
|
1254
|
+
return memoized;
|
|
1255
|
+
};
|
|
2506
1256
|
/**
|
|
2507
|
-
|
|
2508
|
-
*
|
|
2509
|
-
* @private
|
|
2510
|
-
* @name get
|
|
2511
|
-
* @memberOf MapCache
|
|
2512
|
-
* @param {string} key The key of the value to get.
|
|
2513
|
-
* @returns {*} Returns the entry value.
|
|
2514
|
-
*/
|
|
2515
|
-
function mapCacheGet(key) {
|
|
2516
|
-
return getMapData(this, key).get(key);
|
|
2517
|
-
}
|
|
1257
|
+
@returns A [decorator](https://github.com/tc39/proposal-decorators) to memoize class methods or static class methods.
|
|
2518
1258
|
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
* @private
|
|
2523
|
-
* @name has
|
|
2524
|
-
* @memberOf MapCache
|
|
2525
|
-
* @param {string} key The key of the entry to check.
|
|
2526
|
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
2527
|
-
*/
|
|
2528
|
-
function mapCacheHas(key) {
|
|
2529
|
-
return getMapData(this, key).has(key);
|
|
2530
|
-
}
|
|
1259
|
+
@example
|
|
1260
|
+
```
|
|
1261
|
+
import mem = require('mem');
|
|
2531
1262
|
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
*
|
|
2535
|
-
* @private
|
|
2536
|
-
* @name set
|
|
2537
|
-
* @memberOf MapCache
|
|
2538
|
-
* @param {string} key The key of the value to set.
|
|
2539
|
-
* @param {*} value The value to set.
|
|
2540
|
-
* @returns {Object} Returns the map cache instance.
|
|
2541
|
-
*/
|
|
2542
|
-
function mapCacheSet(key, value) {
|
|
2543
|
-
getMapData(this, key).set(key, value);
|
|
2544
|
-
return this;
|
|
2545
|
-
}
|
|
1263
|
+
class Example {
|
|
1264
|
+
index = 0
|
|
2546
1265
|
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
MapCache.prototype.get = mapCacheGet;
|
|
2551
|
-
MapCache.prototype.has = mapCacheHas;
|
|
2552
|
-
MapCache.prototype.set = mapCacheSet;
|
|
2553
|
-
|
|
2554
|
-
/**
|
|
2555
|
-
* Gets the index at which the `key` is found in `array` of key-value pairs.
|
|
2556
|
-
*
|
|
2557
|
-
* @private
|
|
2558
|
-
* @param {Array} array The array to inspect.
|
|
2559
|
-
* @param {*} key The key to search for.
|
|
2560
|
-
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
2561
|
-
*/
|
|
2562
|
-
function assocIndexOf(array, key) {
|
|
2563
|
-
var length = array.length;
|
|
2564
|
-
while (length--) {
|
|
2565
|
-
if (eq(array[length][0], key)) {
|
|
2566
|
-
return length;
|
|
1266
|
+
@mem.decorator()
|
|
1267
|
+
counter() {
|
|
1268
|
+
return ++this.index;
|
|
2567
1269
|
}
|
|
2568
|
-
}
|
|
2569
|
-
return -1;
|
|
2570
|
-
}
|
|
2571
|
-
|
|
2572
|
-
/**
|
|
2573
|
-
* The base implementation of `_.isNative` without bad shim checks.
|
|
2574
|
-
*
|
|
2575
|
-
* @private
|
|
2576
|
-
* @param {*} value The value to check.
|
|
2577
|
-
* @returns {boolean} Returns `true` if `value` is a native function,
|
|
2578
|
-
* else `false`.
|
|
2579
|
-
*/
|
|
2580
|
-
function baseIsNative(value) {
|
|
2581
|
-
if (!isObject(value) || isMasked(value)) {
|
|
2582
|
-
return false;
|
|
2583
|
-
}
|
|
2584
|
-
var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
|
|
2585
|
-
return pattern.test(toSource(value));
|
|
2586
1270
|
}
|
|
2587
1271
|
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
*
|
|
2591
|
-
* @private
|
|
2592
|
-
* @param {Object} map The map to query.
|
|
2593
|
-
* @param {string} key The reference key.
|
|
2594
|
-
* @returns {*} Returns the map data.
|
|
2595
|
-
*/
|
|
2596
|
-
function getMapData(map, key) {
|
|
2597
|
-
var data = map.__data__;
|
|
2598
|
-
return isKeyable(key)
|
|
2599
|
-
? data[typeof key == 'string' ? 'string' : 'hash']
|
|
2600
|
-
: data.map;
|
|
2601
|
-
}
|
|
2602
|
-
|
|
2603
|
-
/**
|
|
2604
|
-
* Gets the native function at `key` of `object`.
|
|
2605
|
-
*
|
|
2606
|
-
* @private
|
|
2607
|
-
* @param {Object} object The object to query.
|
|
2608
|
-
* @param {string} key The key of the method to get.
|
|
2609
|
-
* @returns {*} Returns the function if it's native, else `undefined`.
|
|
2610
|
-
*/
|
|
2611
|
-
function getNative(object, key) {
|
|
2612
|
-
var value = getValue$2(object, key);
|
|
2613
|
-
return baseIsNative(value) ? value : undefined;
|
|
2614
|
-
}
|
|
2615
|
-
|
|
2616
|
-
/**
|
|
2617
|
-
* Checks if `value` is suitable for use as unique object key.
|
|
2618
|
-
*
|
|
2619
|
-
* @private
|
|
2620
|
-
* @param {*} value The value to check.
|
|
2621
|
-
* @returns {boolean} Returns `true` if `value` is suitable, else `false`.
|
|
2622
|
-
*/
|
|
2623
|
-
function isKeyable(value) {
|
|
2624
|
-
var type = typeof value;
|
|
2625
|
-
return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
|
|
2626
|
-
? (value !== '__proto__')
|
|
2627
|
-
: (value === null);
|
|
2628
|
-
}
|
|
2629
|
-
|
|
2630
|
-
/**
|
|
2631
|
-
* Checks if `func` has its source masked.
|
|
2632
|
-
*
|
|
2633
|
-
* @private
|
|
2634
|
-
* @param {Function} func The function to check.
|
|
2635
|
-
* @returns {boolean} Returns `true` if `func` is masked, else `false`.
|
|
2636
|
-
*/
|
|
2637
|
-
function isMasked(func) {
|
|
2638
|
-
return !!maskSrcKey && (maskSrcKey in func);
|
|
2639
|
-
}
|
|
2640
|
-
|
|
2641
|
-
/**
|
|
2642
|
-
* Converts `func` to its source code.
|
|
2643
|
-
*
|
|
2644
|
-
* @private
|
|
2645
|
-
* @param {Function} func The function to process.
|
|
2646
|
-
* @returns {string} Returns the source code.
|
|
2647
|
-
*/
|
|
2648
|
-
function toSource(func) {
|
|
2649
|
-
if (func != null) {
|
|
2650
|
-
try {
|
|
2651
|
-
return funcToString.call(func);
|
|
2652
|
-
} catch (e) {}
|
|
2653
|
-
try {
|
|
2654
|
-
return (func + '');
|
|
2655
|
-
} catch (e) {}
|
|
2656
|
-
}
|
|
2657
|
-
return '';
|
|
2658
|
-
}
|
|
2659
|
-
|
|
2660
|
-
/**
|
|
2661
|
-
* Creates a function that memoizes the result of `func`. If `resolver` is
|
|
2662
|
-
* provided, it determines the cache key for storing the result based on the
|
|
2663
|
-
* arguments provided to the memoized function. By default, the first argument
|
|
2664
|
-
* provided to the memoized function is used as the map cache key. The `func`
|
|
2665
|
-
* is invoked with the `this` binding of the memoized function.
|
|
2666
|
-
*
|
|
2667
|
-
* **Note:** The cache is exposed as the `cache` property on the memoized
|
|
2668
|
-
* function. Its creation may be customized by replacing the `_.memoize.Cache`
|
|
2669
|
-
* constructor with one whose instances implement the
|
|
2670
|
-
* [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
|
|
2671
|
-
* method interface of `delete`, `get`, `has`, and `set`.
|
|
2672
|
-
*
|
|
2673
|
-
* @static
|
|
2674
|
-
* @memberOf _
|
|
2675
|
-
* @since 0.1.0
|
|
2676
|
-
* @category Function
|
|
2677
|
-
* @param {Function} func The function to have its output memoized.
|
|
2678
|
-
* @param {Function} [resolver] The function to resolve the cache key.
|
|
2679
|
-
* @returns {Function} Returns the new memoized function.
|
|
2680
|
-
* @example
|
|
2681
|
-
*
|
|
2682
|
-
* var object = { 'a': 1, 'b': 2 };
|
|
2683
|
-
* var other = { 'c': 3, 'd': 4 };
|
|
2684
|
-
*
|
|
2685
|
-
* var values = _.memoize(_.values);
|
|
2686
|
-
* values(object);
|
|
2687
|
-
* // => [1, 2]
|
|
2688
|
-
*
|
|
2689
|
-
* values(other);
|
|
2690
|
-
* // => [3, 4]
|
|
2691
|
-
*
|
|
2692
|
-
* object.a = 2;
|
|
2693
|
-
* values(object);
|
|
2694
|
-
* // => [1, 2]
|
|
2695
|
-
*
|
|
2696
|
-
* // Modify the result cache.
|
|
2697
|
-
* values.cache.set(object, ['a', 'b']);
|
|
2698
|
-
* values(object);
|
|
2699
|
-
* // => ['a', 'b']
|
|
2700
|
-
*
|
|
2701
|
-
* // Replace `_.memoize.Cache`.
|
|
2702
|
-
* _.memoize.Cache = WeakMap;
|
|
2703
|
-
*/
|
|
2704
|
-
function memoize(func, resolver) {
|
|
2705
|
-
if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {
|
|
2706
|
-
throw new TypeError(FUNC_ERROR_TEXT);
|
|
2707
|
-
}
|
|
2708
|
-
var memoized = function() {
|
|
2709
|
-
var args = arguments,
|
|
2710
|
-
key = resolver ? resolver.apply(this, args) : args[0],
|
|
2711
|
-
cache = memoized.cache;
|
|
1272
|
+
class ExampleWithOptions {
|
|
1273
|
+
index = 0
|
|
2712
1274
|
|
|
2713
|
-
|
|
2714
|
-
|
|
1275
|
+
@mem.decorator({maxAge: 1000})
|
|
1276
|
+
counter() {
|
|
1277
|
+
return ++this.index;
|
|
2715
1278
|
}
|
|
2716
|
-
var result = func.apply(this, args);
|
|
2717
|
-
memoized.cache = cache.set(key, result);
|
|
2718
|
-
return result;
|
|
2719
|
-
};
|
|
2720
|
-
memoized.cache = new (memoize.Cache || MapCache);
|
|
2721
|
-
return memoized;
|
|
2722
|
-
}
|
|
2723
|
-
|
|
2724
|
-
// Assign cache to `_.memoize`.
|
|
2725
|
-
memoize.Cache = MapCache;
|
|
2726
|
-
|
|
2727
|
-
/**
|
|
2728
|
-
* Performs a
|
|
2729
|
-
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
2730
|
-
* comparison between two values to determine if they are equivalent.
|
|
2731
|
-
*
|
|
2732
|
-
* @static
|
|
2733
|
-
* @memberOf _
|
|
2734
|
-
* @since 4.0.0
|
|
2735
|
-
* @category Lang
|
|
2736
|
-
* @param {*} value The value to compare.
|
|
2737
|
-
* @param {*} other The other value to compare.
|
|
2738
|
-
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
2739
|
-
* @example
|
|
2740
|
-
*
|
|
2741
|
-
* var object = { 'a': 1 };
|
|
2742
|
-
* var other = { 'a': 1 };
|
|
2743
|
-
*
|
|
2744
|
-
* _.eq(object, object);
|
|
2745
|
-
* // => true
|
|
2746
|
-
*
|
|
2747
|
-
* _.eq(object, other);
|
|
2748
|
-
* // => false
|
|
2749
|
-
*
|
|
2750
|
-
* _.eq('a', 'a');
|
|
2751
|
-
* // => true
|
|
2752
|
-
*
|
|
2753
|
-
* _.eq('a', Object('a'));
|
|
2754
|
-
* // => false
|
|
2755
|
-
*
|
|
2756
|
-
* _.eq(NaN, NaN);
|
|
2757
|
-
* // => true
|
|
2758
|
-
*/
|
|
2759
|
-
function eq(value, other) {
|
|
2760
|
-
return value === other || (value !== value && other !== other);
|
|
2761
|
-
}
|
|
2762
|
-
|
|
2763
|
-
/**
|
|
2764
|
-
* Checks if `value` is classified as a `Function` object.
|
|
2765
|
-
*
|
|
2766
|
-
* @static
|
|
2767
|
-
* @memberOf _
|
|
2768
|
-
* @since 0.1.0
|
|
2769
|
-
* @category Lang
|
|
2770
|
-
* @param {*} value The value to check.
|
|
2771
|
-
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
|
|
2772
|
-
* @example
|
|
2773
|
-
*
|
|
2774
|
-
* _.isFunction(_);
|
|
2775
|
-
* // => true
|
|
2776
|
-
*
|
|
2777
|
-
* _.isFunction(/abc/);
|
|
2778
|
-
* // => false
|
|
2779
|
-
*/
|
|
2780
|
-
function isFunction(value) {
|
|
2781
|
-
// The use of `Object#toString` avoids issues with the `typeof` operator
|
|
2782
|
-
// in Safari 8-9 which returns 'object' for typed array and other constructors.
|
|
2783
|
-
var tag = isObject(value) ? objectToString.call(value) : '';
|
|
2784
|
-
return tag == funcTag || tag == genTag;
|
|
2785
1279
|
}
|
|
2786
|
-
|
|
1280
|
+
```
|
|
1281
|
+
*/
|
|
1282
|
+
mem.decorator = (options = {}) => (target, propertyKey, descriptor) => {
|
|
1283
|
+
const input = target[propertyKey];
|
|
1284
|
+
if (typeof input !== 'function') {
|
|
1285
|
+
throw new TypeError('The decorated value must be a function');
|
|
1286
|
+
}
|
|
1287
|
+
delete descriptor.value;
|
|
1288
|
+
delete descriptor.writable;
|
|
1289
|
+
descriptor.get = function () {
|
|
1290
|
+
if (!decoratorInstanceMap.has(this)) {
|
|
1291
|
+
const value = mem(input, options);
|
|
1292
|
+
decoratorInstanceMap.set(this, value);
|
|
1293
|
+
return value;
|
|
1294
|
+
}
|
|
1295
|
+
return decoratorInstanceMap.get(this);
|
|
1296
|
+
};
|
|
1297
|
+
};
|
|
2787
1298
|
/**
|
|
2788
|
-
|
|
2789
|
-
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
|
2790
|
-
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
|
2791
|
-
*
|
|
2792
|
-
* @static
|
|
2793
|
-
* @memberOf _
|
|
2794
|
-
* @since 0.1.0
|
|
2795
|
-
* @category Lang
|
|
2796
|
-
* @param {*} value The value to check.
|
|
2797
|
-
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
|
2798
|
-
* @example
|
|
2799
|
-
*
|
|
2800
|
-
* _.isObject({});
|
|
2801
|
-
* // => true
|
|
2802
|
-
*
|
|
2803
|
-
* _.isObject([1, 2, 3]);
|
|
2804
|
-
* // => true
|
|
2805
|
-
*
|
|
2806
|
-
* _.isObject(_.noop);
|
|
2807
|
-
* // => true
|
|
2808
|
-
*
|
|
2809
|
-
* _.isObject(null);
|
|
2810
|
-
* // => false
|
|
2811
|
-
*/
|
|
2812
|
-
function isObject(value) {
|
|
2813
|
-
var type = typeof value;
|
|
2814
|
-
return !!value && (type == 'object' || type == 'function');
|
|
2815
|
-
}
|
|
1299
|
+
Clear all cached data of a memoized function.
|
|
2816
1300
|
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
1301
|
+
@param fn - Memoized function.
|
|
1302
|
+
*/
|
|
1303
|
+
mem.clear = (fn) => {
|
|
1304
|
+
const cache = cacheStore.get(fn);
|
|
1305
|
+
if (!cache) {
|
|
1306
|
+
throw new TypeError('Can\'t clear a function that was not memoized!');
|
|
1307
|
+
}
|
|
1308
|
+
if (typeof cache.clear !== 'function') {
|
|
1309
|
+
throw new TypeError('The cache Map can\'t be cleared!');
|
|
1310
|
+
}
|
|
1311
|
+
cache.clear();
|
|
1312
|
+
};
|
|
1313
|
+
var dist = mem;
|
|
2820
1314
|
|
|
2821
|
-
function resolver(options) {
|
|
2822
|
-
return JSON.stringify(options);
|
|
2823
|
-
}
|
|
2824
1315
|
function isString(el) {
|
|
2825
1316
|
return typeof el === 'string';
|
|
2826
1317
|
}
|
|
@@ -2876,11 +1367,11 @@ function getUserLocalesInternal(_a) {
|
|
|
2876
1367
|
}
|
|
2877
1368
|
return languageList.filter(isString).map(normalizeLocale).filter(isUnique);
|
|
2878
1369
|
}
|
|
2879
|
-
var getUserLocales =
|
|
1370
|
+
var getUserLocales = dist(getUserLocalesInternal, { cacheKey: JSON.stringify });
|
|
2880
1371
|
function getUserLocaleInternal(options) {
|
|
2881
1372
|
return getUserLocales(options)[0] || null;
|
|
2882
1373
|
}
|
|
2883
|
-
var getUserLocale =
|
|
1374
|
+
var getUserLocale = dist(getUserLocaleInternal, { cacheKey: JSON.stringify });
|
|
2884
1375
|
|
|
2885
1376
|
/**
|
|
2886
1377
|
* Utils
|
|
@@ -3230,21 +1721,14 @@ function getDaysInMonth(date) {
|
|
|
3230
1721
|
return getDate(getMonthEnd(date));
|
|
3231
1722
|
}
|
|
3232
1723
|
|
|
3233
|
-
var _a$1;
|
|
3234
1724
|
var CALENDAR_TYPES = {
|
|
3235
1725
|
GREGORY: 'gregory',
|
|
3236
1726
|
HEBREW: 'hebrew',
|
|
3237
1727
|
ISLAMIC: 'islamic',
|
|
3238
1728
|
ISO_8601: 'iso8601',
|
|
3239
1729
|
};
|
|
3240
|
-
var
|
|
3241
|
-
|
|
3242
|
-
HEBREW: 'Hebrew',
|
|
3243
|
-
ISO_8601: 'ISO 8601',
|
|
3244
|
-
US: 'US',
|
|
3245
|
-
};
|
|
3246
|
-
var CALENDAR_TYPE_LOCALES = (_a$1 = {},
|
|
3247
|
-
_a$1[CALENDAR_TYPES.GREGORY] = [
|
|
1730
|
+
var CALENDAR_TYPE_LOCALES = {
|
|
1731
|
+
gregory: [
|
|
3248
1732
|
'en-CA',
|
|
3249
1733
|
'en-US',
|
|
3250
1734
|
'es-AR',
|
|
@@ -3265,8 +1749,8 @@ var CALENDAR_TYPE_LOCALES = (_a$1 = {},
|
|
|
3265
1749
|
'es-VE',
|
|
3266
1750
|
'pt-BR',
|
|
3267
1751
|
],
|
|
3268
|
-
|
|
3269
|
-
|
|
1752
|
+
hebrew: ['he', 'he-IL'],
|
|
1753
|
+
islamic: [
|
|
3270
1754
|
// ar-LB, ar-MA intentionally missing
|
|
3271
1755
|
'ar',
|
|
3272
1756
|
'ar-AE',
|
|
@@ -3288,7 +1772,7 @@ var CALENDAR_TYPE_LOCALES = (_a$1 = {},
|
|
|
3288
1772
|
'ps',
|
|
3289
1773
|
'ps-AR',
|
|
3290
1774
|
],
|
|
3291
|
-
|
|
1775
|
+
};
|
|
3292
1776
|
var WEEKDAYS = [0, 1, 2, 3, 4, 5, 6];
|
|
3293
1777
|
|
|
3294
1778
|
var formatterCache = new Map();
|
|
@@ -3619,8 +2103,7 @@ function getValueRange(rangeType, date1, date2) {
|
|
|
3619
2103
|
return [getBegin(rangeType, rawNextValue[0]), getEnd(rangeType, rawNextValue[1])];
|
|
3620
2104
|
}
|
|
3621
2105
|
function toYearLabel(locale, formatYear$1, dates) {
|
|
3622
|
-
|
|
3623
|
-
return dates.map(function (date) { return formatYear$1(locale, date); }).join(' – ');
|
|
2106
|
+
return dates.map(function (date) { return (formatYear$1 || formatYear)(locale, date); }).join(' – ');
|
|
3624
2107
|
}
|
|
3625
2108
|
/**
|
|
3626
2109
|
* @callback FormatYear
|
|
@@ -3751,18 +2234,9 @@ function Navigation(_a) {
|
|
|
3751
2234
|
}
|
|
3752
2235
|
function renderButton() {
|
|
3753
2236
|
var labelClassName = "".concat(className$6, "__label");
|
|
3754
|
-
return (
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
React.createElement("span", { className: "".concat(labelClassName, "__divider") }, " \u2013 "),
|
|
3758
|
-
React.createElement("span", { className: "".concat(labelClassName, "__labelText ").concat(labelClassName, "__labelText--to") }, renderLabel(nextActiveStartDate)))) : null));
|
|
3759
|
-
}
|
|
3760
|
-
return (React.createElement("div", { className: className$6 },
|
|
3761
|
-
prev2Label !== null && shouldShowPrevNext2Buttons ? (React.createElement("button", { "aria-label": prev2AriaLabel, className: "".concat(className$6, "__arrow ").concat(className$6, "__prev2-button"), disabled: prev2ButtonDisabled, onClick: onClickPrevious2, type: "button" }, prev2Label)) : null,
|
|
3762
|
-
prevLabel !== null && (React.createElement("button", { "aria-label": prevAriaLabel, className: "".concat(className$6, "__arrow ").concat(className$6, "__prev-button"), disabled: prevButtonDisabled, onClick: onClickPrevious, type: "button" }, prevLabel)),
|
|
3763
|
-
renderButton(),
|
|
3764
|
-
nextLabel !== null && (React.createElement("button", { "aria-label": nextAriaLabel, className: "".concat(className$6, "__arrow ").concat(className$6, "__next-button"), disabled: nextButtonDisabled, onClick: onClickNext, type: "button" }, nextLabel)),
|
|
3765
|
-
next2Label !== null && shouldShowPrevNext2Buttons ? (React.createElement("button", { "aria-label": next2AriaLabel, className: "".concat(className$6, "__arrow ").concat(className$6, "__next2-button"), disabled: next2ButtonDisabled, onClick: onClickNext2, type: "button" }, next2Label)) : null));
|
|
2237
|
+
return (jsxs("button", { "aria-label": navigationAriaLabel, "aria-live": navigationAriaLive, className: labelClassName, disabled: !drillUpAvailable, onClick: drillUp, style: { flexGrow: 1 }, type: "button", children: [jsx("span", { className: "".concat(labelClassName, "__labelText ").concat(labelClassName, "__labelText--from"), children: renderLabel(activeStartDate) }), showDoubleView ? (jsxs(Fragment, { children: [jsx("span", { className: "".concat(labelClassName, "__divider"), children: " \u2013 " }), jsx("span", { className: "".concat(labelClassName, "__labelText ").concat(labelClassName, "__labelText--to"), children: renderLabel(nextActiveStartDate) })] })) : null] }));
|
|
2238
|
+
}
|
|
2239
|
+
return (jsxs("div", { className: className$6, children: [prev2Label !== null && shouldShowPrevNext2Buttons ? (jsx("button", { "aria-label": prev2AriaLabel, className: "".concat(className$6, "__arrow ").concat(className$6, "__prev2-button"), disabled: prev2ButtonDisabled, onClick: onClickPrevious2, type: "button", children: prev2Label })) : null, prevLabel !== null && (jsx("button", { "aria-label": prevAriaLabel, className: "".concat(className$6, "__arrow ").concat(className$6, "__prev-button"), disabled: prevButtonDisabled, onClick: onClickPrevious, type: "button", children: prevLabel })), renderButton(), nextLabel !== null && (jsx("button", { "aria-label": nextAriaLabel, className: "".concat(className$6, "__arrow ").concat(className$6, "__next-button"), disabled: nextButtonDisabled, onClick: onClickNext, type: "button", children: nextLabel })), next2Label !== null && shouldShowPrevNext2Buttons ? (jsx("button", { "aria-label": next2AriaLabel, className: "".concat(className$6, "__arrow ").concat(className$6, "__next2-button"), disabled: next2ButtonDisabled, onClick: onClickNext2, type: "button", children: next2Label })) : null] }));
|
|
3766
2240
|
}
|
|
3767
2241
|
|
|
3768
2242
|
var __assign$e = (undefined && undefined.__assign) || function () {
|
|
@@ -3792,40 +2266,20 @@ function toPercent(num) {
|
|
|
3792
2266
|
}
|
|
3793
2267
|
function Flex(_a) {
|
|
3794
2268
|
var children = _a.children, className = _a.className, count = _a.count, direction = _a.direction, offset = _a.offset, style = _a.style, wrap = _a.wrap, otherProps = __rest$a(_a, ["children", "className", "count", "direction", "offset", "style", "wrap"]);
|
|
3795
|
-
return (
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
2269
|
+
return (jsx("div", __assign$e({ className: className, style: __assign$e({ display: 'flex', flexDirection: direction, flexWrap: wrap ? 'wrap' : 'nowrap' }, style) }, otherProps, { children: Children.map(children, function (child, index) {
|
|
2270
|
+
var marginInlineStart = offset && index === 0 ? toPercent((100 * offset) / count) : null;
|
|
2271
|
+
return cloneElement(child, __assign$e(__assign$e({}, child.props), { style: {
|
|
2272
|
+
flexBasis: toPercent(100 / count),
|
|
2273
|
+
flexShrink: 0,
|
|
2274
|
+
flexGrow: 0,
|
|
2275
|
+
overflow: 'hidden',
|
|
2276
|
+
marginLeft: marginInlineStart,
|
|
2277
|
+
marginInlineStart: marginInlineStart,
|
|
2278
|
+
marginInlineEnd: 0,
|
|
2279
|
+
} }));
|
|
2280
|
+
}) })));
|
|
3807
2281
|
}
|
|
3808
2282
|
|
|
3809
|
-
var isProduction = process.env.NODE_ENV === 'production';
|
|
3810
|
-
function warning(condition, message) {
|
|
3811
|
-
if (!isProduction) {
|
|
3812
|
-
if (condition) {
|
|
3813
|
-
return;
|
|
3814
|
-
}
|
|
3815
|
-
|
|
3816
|
-
var text = "Warning: " + message;
|
|
3817
|
-
|
|
3818
|
-
if (typeof console !== 'undefined') {
|
|
3819
|
-
console.warn(text);
|
|
3820
|
-
}
|
|
3821
|
-
|
|
3822
|
-
try {
|
|
3823
|
-
throw Error(text);
|
|
3824
|
-
} catch (x) {}
|
|
3825
|
-
}
|
|
3826
|
-
}
|
|
3827
|
-
|
|
3828
|
-
var _a;
|
|
3829
2283
|
/**
|
|
3830
2284
|
* Returns a value no smaller than min and no larger than max.
|
|
3831
2285
|
*
|
|
@@ -3930,25 +2384,6 @@ function getTileClasses(args) {
|
|
|
3930
2384
|
}
|
|
3931
2385
|
return classes;
|
|
3932
2386
|
}
|
|
3933
|
-
var calendarTypeMap = (_a = {},
|
|
3934
|
-
_a[DEPRECATED_CALENDAR_TYPES.ARABIC] = CALENDAR_TYPES.ISLAMIC,
|
|
3935
|
-
_a[DEPRECATED_CALENDAR_TYPES.HEBREW] = CALENDAR_TYPES.HEBREW,
|
|
3936
|
-
_a[DEPRECATED_CALENDAR_TYPES.ISO_8601] = CALENDAR_TYPES.ISO_8601,
|
|
3937
|
-
_a[DEPRECATED_CALENDAR_TYPES.US] = CALENDAR_TYPES.GREGORY,
|
|
3938
|
-
_a);
|
|
3939
|
-
function isDeprecatedCalendarType(calendarType) {
|
|
3940
|
-
return calendarType !== undefined && calendarType in DEPRECATED_CALENDAR_TYPES;
|
|
3941
|
-
}
|
|
3942
|
-
var warned = false;
|
|
3943
|
-
function mapCalendarType(calendarTypeOrDeprecatedCalendarType) {
|
|
3944
|
-
if (isDeprecatedCalendarType(calendarTypeOrDeprecatedCalendarType)) {
|
|
3945
|
-
var calendarType = calendarTypeMap[calendarTypeOrDeprecatedCalendarType];
|
|
3946
|
-
warning(warned, "Specifying calendarType=\"".concat(calendarTypeOrDeprecatedCalendarType, "\" is deprecated. Use calendarType=\"").concat(calendarType, "\" instead."));
|
|
3947
|
-
warned = true;
|
|
3948
|
-
return calendarType;
|
|
3949
|
-
}
|
|
3950
|
-
return calendarTypeOrDeprecatedCalendarType;
|
|
3951
|
-
}
|
|
3952
2387
|
|
|
3953
2388
|
function TileGroup(_a) {
|
|
3954
2389
|
var className = _a.className, _b = _a.count, count = _b === void 0 ? 3 : _b, dateTransform = _a.dateTransform, dateType = _a.dateType, end = _a.end, hover = _a.hover, offset = _a.offset, renderTile = _a.renderTile, start = _a.start, _c = _a.step, step = _c === void 0 ? 1 : _c, value = _a.value, valueType = _a.valueType;
|
|
@@ -3966,7 +2401,7 @@ function TileGroup(_a) {
|
|
|
3966
2401
|
date: date,
|
|
3967
2402
|
}));
|
|
3968
2403
|
}
|
|
3969
|
-
return (
|
|
2404
|
+
return (jsx(Flex, { className: className, count: count, offset: offset, wrap: true, children: tiles }));
|
|
3970
2405
|
}
|
|
3971
2406
|
|
|
3972
2407
|
function Tile(props) {
|
|
@@ -3979,11 +2414,9 @@ function Tile(props) {
|
|
|
3979
2414
|
var args = { activeStartDate: activeStartDate, date: date, view: view };
|
|
3980
2415
|
return typeof tileContentProps === 'function' ? tileContentProps(args) : tileContentProps;
|
|
3981
2416
|
}, [activeStartDate, date, tileContentProps, view]);
|
|
3982
|
-
return (
|
|
2417
|
+
return (jsxs("button", { className: clsx(classes, tileClassName), disabled: (minDate && minDateTransform(minDate) > date) ||
|
|
3983
2418
|
(maxDate && maxDateTransform(maxDate) < date) ||
|
|
3984
|
-
(tileDisabled
|
|
3985
|
-
formatAbbr ? React.createElement("abbr", { "aria-label": formatAbbr(locale, date) }, children) : children,
|
|
3986
|
-
tileContent));
|
|
2419
|
+
(tileDisabled === null || tileDisabled === void 0 ? void 0 : tileDisabled({ activeStartDate: activeStartDate, date: date, view: view })), onClick: onClick ? function (event) { return onClick(date, event); } : undefined, onFocus: onMouseOver ? function () { return onMouseOver(date); } : undefined, onMouseOver: onMouseOver ? function () { return onMouseOver(date); } : undefined, style: style, type: "button", children: [formatAbbr ? jsx("abbr", { "aria-label": formatAbbr(locale, date), children: children }) : children, tileContent] }));
|
|
3987
2420
|
}
|
|
3988
2421
|
|
|
3989
2422
|
var __assign$d = (undefined && undefined.__assign) || function () {
|
|
@@ -4008,20 +2441,21 @@ var __rest$9 = (undefined && undefined.__rest) || function (s, e) {
|
|
|
4008
2441
|
}
|
|
4009
2442
|
return t;
|
|
4010
2443
|
};
|
|
4011
|
-
var __spreadArray$3 = (undefined && undefined.__spreadArray) || function (to, from, pack) {
|
|
4012
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
4013
|
-
if (ar || !(i in from)) {
|
|
4014
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
4015
|
-
ar[i] = from[i];
|
|
4016
|
-
}
|
|
4017
|
-
}
|
|
4018
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
4019
|
-
};
|
|
4020
2444
|
var className$5 = 'react-calendar__century-view__decades__decade';
|
|
4021
2445
|
function Decade(_a) {
|
|
4022
|
-
var _b = _a.classes, classes = _b === void 0 ? [] : _b, _c = _a.formatYear, formatYear$1 = _c === void 0 ? formatYear : _c, otherProps = __rest$9(_a, ["classes", "formatYear"]);
|
|
2446
|
+
var _b = _a.classes, classes = _b === void 0 ? [] : _b, currentCentury = _a.currentCentury, _c = _a.formatYear, formatYear$1 = _c === void 0 ? formatYear : _c, otherProps = __rest$9(_a, ["classes", "currentCentury", "formatYear"]);
|
|
4023
2447
|
var date = otherProps.date, locale = otherProps.locale;
|
|
4024
|
-
|
|
2448
|
+
var classesProps = [];
|
|
2449
|
+
if (classes) {
|
|
2450
|
+
classesProps.push.apply(classesProps, classes);
|
|
2451
|
+
}
|
|
2452
|
+
{
|
|
2453
|
+
classesProps.push(className$5);
|
|
2454
|
+
}
|
|
2455
|
+
if (getCenturyStart(date).getFullYear() !== currentCentury) {
|
|
2456
|
+
classesProps.push("".concat(className$5, "--neighboringCentury"));
|
|
2457
|
+
}
|
|
2458
|
+
return (jsx(Tile, __assign$d({}, otherProps, { classes: classesProps, maxDateTransform: getDecadeEnd, minDateTransform: getDecadeStart, view: "century", children: getDecadeLabel(locale, formatYear$1, date) })));
|
|
4025
2459
|
}
|
|
4026
2460
|
|
|
4027
2461
|
var __assign$c = (undefined && undefined.__assign) || function () {
|
|
@@ -4047,121 +2481,15 @@ var __rest$8 = (undefined && undefined.__rest) || function (s, e) {
|
|
|
4047
2481
|
return t;
|
|
4048
2482
|
};
|
|
4049
2483
|
function Decades(props) {
|
|
4050
|
-
var activeStartDate = props.activeStartDate, hover = props.hover, value = props.value, valueType = props.valueType, otherProps = __rest$8(props, ["activeStartDate", "hover", "value", "valueType"]);
|
|
2484
|
+
var activeStartDate = props.activeStartDate, hover = props.hover, showNeighboringCentury = props.showNeighboringCentury, value = props.value, valueType = props.valueType, otherProps = __rest$8(props, ["activeStartDate", "hover", "showNeighboringCentury", "value", "valueType"]);
|
|
4051
2485
|
var start = getBeginOfCenturyYear(activeStartDate);
|
|
4052
|
-
var end = start + 99;
|
|
4053
|
-
return (
|
|
2486
|
+
var end = start + (showNeighboringCentury ? 119 : 99);
|
|
2487
|
+
return (jsx(TileGroup, { className: "react-calendar__century-view__decades", dateTransform: getDecadeStart, dateType: "decade", end: end, hover: hover, renderTile: function (_a) {
|
|
4054
2488
|
var date = _a.date, otherTileProps = __rest$8(_a, ["date"]);
|
|
4055
|
-
return (
|
|
2489
|
+
return (jsx(Decade, __assign$c({}, otherProps, otherTileProps, { activeStartDate: activeStartDate, currentCentury: start, date: date }), date.getTime()));
|
|
4056
2490
|
}, start: start, step: 10, value: value, valueType: valueType }));
|
|
4057
2491
|
}
|
|
4058
2492
|
|
|
4059
|
-
var __spreadArray$2 = (undefined && undefined.__spreadArray) || function (to, from, pack) {
|
|
4060
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
4061
|
-
if (ar || !(i in from)) {
|
|
4062
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
4063
|
-
ar[i] = from[i];
|
|
4064
|
-
}
|
|
4065
|
-
}
|
|
4066
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
4067
|
-
};
|
|
4068
|
-
var calendarTypes = Object.values(CALENDAR_TYPES);
|
|
4069
|
-
var deprecatedCalendarTypes = Object.values(DEPRECATED_CALENDAR_TYPES);
|
|
4070
|
-
var allViews$1 = ['century', 'decade', 'year', 'month'];
|
|
4071
|
-
var isCalendarType = PropTypes.oneOf(__spreadArray$2(__spreadArray$2([], calendarTypes, true), deprecatedCalendarTypes, true));
|
|
4072
|
-
var isClassName = PropTypes.oneOfType([
|
|
4073
|
-
PropTypes.string,
|
|
4074
|
-
PropTypes.arrayOf(PropTypes.string),
|
|
4075
|
-
]);
|
|
4076
|
-
var isMinDate = function isMinDate(props, propName, componentName) {
|
|
4077
|
-
var _a = props, _b = propName, minDate = _a[_b];
|
|
4078
|
-
if (!minDate) {
|
|
4079
|
-
return null;
|
|
4080
|
-
}
|
|
4081
|
-
if (!(minDate instanceof Date)) {
|
|
4082
|
-
return new Error("Invalid prop `".concat(propName, "` of type `").concat(typeof minDate, "` supplied to `").concat(componentName, "`, expected instance of `Date`."));
|
|
4083
|
-
}
|
|
4084
|
-
var maxDate = props.maxDate;
|
|
4085
|
-
if (maxDate && minDate > maxDate) {
|
|
4086
|
-
return new Error("Invalid prop `".concat(propName, "` of type `").concat(typeof minDate, "` supplied to `").concat(componentName, "`, minDate cannot be larger than maxDate."));
|
|
4087
|
-
}
|
|
4088
|
-
return null;
|
|
4089
|
-
};
|
|
4090
|
-
var isMaxDate = function isMaxDate(props, propName, componentName) {
|
|
4091
|
-
var _a = props, _b = propName, maxDate = _a[_b];
|
|
4092
|
-
if (!maxDate) {
|
|
4093
|
-
return null;
|
|
4094
|
-
}
|
|
4095
|
-
if (!(maxDate instanceof Date)) {
|
|
4096
|
-
return new Error("Invalid prop `".concat(propName, "` of type `").concat(typeof maxDate, "` supplied to `").concat(componentName, "`, expected instance of `Date`."));
|
|
4097
|
-
}
|
|
4098
|
-
var minDate = props.minDate;
|
|
4099
|
-
if (minDate && maxDate < minDate) {
|
|
4100
|
-
return new Error("Invalid prop `".concat(propName, "` of type `").concat(typeof maxDate, "` supplied to `").concat(componentName, "`, maxDate cannot be smaller than minDate."));
|
|
4101
|
-
}
|
|
4102
|
-
return null;
|
|
4103
|
-
};
|
|
4104
|
-
var isRef = PropTypes.oneOfType([
|
|
4105
|
-
PropTypes.func,
|
|
4106
|
-
PropTypes.exact({
|
|
4107
|
-
current: PropTypes.any,
|
|
4108
|
-
}),
|
|
4109
|
-
]);
|
|
4110
|
-
var isRange = PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.oneOf([null])]).isRequired);
|
|
4111
|
-
var isValue$1 = PropTypes.oneOfType([
|
|
4112
|
-
PropTypes.instanceOf(Date),
|
|
4113
|
-
PropTypes.oneOf([null]),
|
|
4114
|
-
isRange,
|
|
4115
|
-
]);
|
|
4116
|
-
PropTypes.arrayOf(PropTypes.oneOf(allViews$1));
|
|
4117
|
-
var isView = function isView(props, propName, componentName) {
|
|
4118
|
-
var _a = props, _b = propName, view = _a[_b];
|
|
4119
|
-
if (view !== undefined && (typeof view !== 'string' || allViews$1.indexOf(view) === -1)) {
|
|
4120
|
-
return new Error("Invalid prop `".concat(propName, "` of value `").concat(view, "` supplied to `").concat(componentName, "`, expected one of [").concat(allViews$1
|
|
4121
|
-
.map(function (a) { return "\"".concat(a, "\""); })
|
|
4122
|
-
.join(', '), "]."));
|
|
4123
|
-
}
|
|
4124
|
-
// Everything is fine
|
|
4125
|
-
return null;
|
|
4126
|
-
};
|
|
4127
|
-
isView.isRequired = function isViewIsRequired(props, propName, componentName, location, propFullName) {
|
|
4128
|
-
var _a = props, _b = propName, view = _a[_b];
|
|
4129
|
-
if (!view) {
|
|
4130
|
-
return new Error("The prop `".concat(propName, "` is marked as required in `").concat(componentName, "`, but its value is `").concat(view, "`."));
|
|
4131
|
-
}
|
|
4132
|
-
return isView(props, propName, componentName);
|
|
4133
|
-
};
|
|
4134
|
-
var rangeOf = function (type) {
|
|
4135
|
-
return PropTypes.arrayOf(type);
|
|
4136
|
-
};
|
|
4137
|
-
var tileGroupProps = {
|
|
4138
|
-
activeStartDate: PropTypes.instanceOf(Date).isRequired,
|
|
4139
|
-
hover: PropTypes.instanceOf(Date),
|
|
4140
|
-
locale: PropTypes.string,
|
|
4141
|
-
maxDate: isMaxDate,
|
|
4142
|
-
minDate: isMinDate,
|
|
4143
|
-
onClick: PropTypes.func,
|
|
4144
|
-
onMouseOver: PropTypes.func,
|
|
4145
|
-
tileClassName: PropTypes.oneOfType([PropTypes.func, isClassName]),
|
|
4146
|
-
tileContent: PropTypes.oneOfType([PropTypes.func, PropTypes.node]),
|
|
4147
|
-
value: isValue$1,
|
|
4148
|
-
valueType: PropTypes.oneOf(['century', 'decade', 'year', 'month', 'day']).isRequired,
|
|
4149
|
-
};
|
|
4150
|
-
({
|
|
4151
|
-
activeStartDate: PropTypes.instanceOf(Date).isRequired,
|
|
4152
|
-
classes: PropTypes.arrayOf(PropTypes.string.isRequired).isRequired,
|
|
4153
|
-
date: PropTypes.instanceOf(Date).isRequired,
|
|
4154
|
-
locale: PropTypes.string,
|
|
4155
|
-
maxDate: isMaxDate,
|
|
4156
|
-
minDate: isMinDate,
|
|
4157
|
-
onClick: PropTypes.func,
|
|
4158
|
-
onMouseOver: PropTypes.func,
|
|
4159
|
-
style: PropTypes.objectOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])),
|
|
4160
|
-
tileClassName: PropTypes.oneOfType([PropTypes.func, isClassName]),
|
|
4161
|
-
tileContent: PropTypes.oneOfType([PropTypes.func, PropTypes.node]),
|
|
4162
|
-
tileDisabled: PropTypes.func,
|
|
4163
|
-
});
|
|
4164
|
-
|
|
4165
2493
|
var __assign$b = (undefined && undefined.__assign) || function () {
|
|
4166
2494
|
__assign$b = Object.assign || function(t) {
|
|
4167
2495
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -4173,14 +2501,15 @@ var __assign$b = (undefined && undefined.__assign) || function () {
|
|
|
4173
2501
|
};
|
|
4174
2502
|
return __assign$b.apply(this, arguments);
|
|
4175
2503
|
};
|
|
4176
|
-
|
|
2504
|
+
/**
|
|
2505
|
+
* Displays a given century.
|
|
2506
|
+
*/
|
|
2507
|
+
function CenturyView(props) {
|
|
4177
2508
|
function renderDecades() {
|
|
4178
|
-
return
|
|
2509
|
+
return jsx(Decades, __assign$b({}, props));
|
|
4179
2510
|
}
|
|
4180
|
-
return
|
|
4181
|
-
}
|
|
4182
|
-
CenturyView.propTypes = __assign$b({}, tileGroupProps);
|
|
4183
|
-
var CenturyView$1 = CenturyView;
|
|
2511
|
+
return jsx("div", { className: "react-calendar__century-view", children: renderDecades() });
|
|
2512
|
+
}
|
|
4184
2513
|
|
|
4185
2514
|
var __assign$a = (undefined && undefined.__assign) || function () {
|
|
4186
2515
|
__assign$a = Object.assign || function(t) {
|
|
@@ -4204,20 +2533,21 @@ var __rest$7 = (undefined && undefined.__rest) || function (s, e) {
|
|
|
4204
2533
|
}
|
|
4205
2534
|
return t;
|
|
4206
2535
|
};
|
|
4207
|
-
var __spreadArray$1 = (undefined && undefined.__spreadArray) || function (to, from, pack) {
|
|
4208
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
4209
|
-
if (ar || !(i in from)) {
|
|
4210
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
4211
|
-
ar[i] = from[i];
|
|
4212
|
-
}
|
|
4213
|
-
}
|
|
4214
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
4215
|
-
};
|
|
4216
2536
|
var className$4 = 'react-calendar__decade-view__years__year';
|
|
4217
2537
|
function Year(_a) {
|
|
4218
|
-
var _b = _a.classes, classes = _b === void 0 ? [] : _b, _c = _a.formatYear, formatYear$1 = _c === void 0 ? formatYear : _c, otherProps = __rest$7(_a, ["classes", "formatYear"]);
|
|
2538
|
+
var _b = _a.classes, classes = _b === void 0 ? [] : _b, currentDecade = _a.currentDecade, _c = _a.formatYear, formatYear$1 = _c === void 0 ? formatYear : _c, otherProps = __rest$7(_a, ["classes", "currentDecade", "formatYear"]);
|
|
4219
2539
|
var date = otherProps.date, locale = otherProps.locale;
|
|
4220
|
-
|
|
2540
|
+
var classesProps = [];
|
|
2541
|
+
if (classes) {
|
|
2542
|
+
classesProps.push.apply(classesProps, classes);
|
|
2543
|
+
}
|
|
2544
|
+
{
|
|
2545
|
+
classesProps.push(className$4);
|
|
2546
|
+
}
|
|
2547
|
+
if (getDecadeStart(date).getFullYear() !== currentDecade) {
|
|
2548
|
+
classesProps.push("".concat(className$4, "--neighboringDecade"));
|
|
2549
|
+
}
|
|
2550
|
+
return (jsx(Tile, __assign$a({}, otherProps, { classes: classesProps, maxDateTransform: getYearEnd, minDateTransform: getYearStart, view: "decade", children: formatYear$1(locale, date) })));
|
|
4221
2551
|
}
|
|
4222
2552
|
|
|
4223
2553
|
var __assign$9 = (undefined && undefined.__assign) || function () {
|
|
@@ -4243,12 +2573,12 @@ var __rest$6 = (undefined && undefined.__rest) || function (s, e) {
|
|
|
4243
2573
|
return t;
|
|
4244
2574
|
};
|
|
4245
2575
|
function Years(props) {
|
|
4246
|
-
var activeStartDate = props.activeStartDate, hover = props.hover, value = props.value, valueType = props.valueType, otherProps = __rest$6(props, ["activeStartDate", "hover", "value", "valueType"]);
|
|
2576
|
+
var activeStartDate = props.activeStartDate, hover = props.hover, showNeighboringDecade = props.showNeighboringDecade, value = props.value, valueType = props.valueType, otherProps = __rest$6(props, ["activeStartDate", "hover", "showNeighboringDecade", "value", "valueType"]);
|
|
4247
2577
|
var start = getBeginOfDecadeYear(activeStartDate);
|
|
4248
|
-
var end = start + 9;
|
|
4249
|
-
return (
|
|
2578
|
+
var end = start + (showNeighboringDecade ? 11 : 9);
|
|
2579
|
+
return (jsx(TileGroup, { className: "react-calendar__decade-view__years", dateTransform: getYearStart, dateType: "year", end: end, hover: hover, renderTile: function (_a) {
|
|
4250
2580
|
var date = _a.date, otherTileProps = __rest$6(_a, ["date"]);
|
|
4251
|
-
return (
|
|
2581
|
+
return (jsx(Year, __assign$9({}, otherProps, otherTileProps, { activeStartDate: activeStartDate, currentDecade: start, date: date }), date.getTime()));
|
|
4252
2582
|
}, start: start, value: value, valueType: valueType }));
|
|
4253
2583
|
}
|
|
4254
2584
|
|
|
@@ -4263,14 +2593,15 @@ var __assign$8 = (undefined && undefined.__assign) || function () {
|
|
|
4263
2593
|
};
|
|
4264
2594
|
return __assign$8.apply(this, arguments);
|
|
4265
2595
|
};
|
|
4266
|
-
|
|
2596
|
+
/**
|
|
2597
|
+
* Displays a given decade.
|
|
2598
|
+
*/
|
|
2599
|
+
function DecadeView(props) {
|
|
4267
2600
|
function renderYears() {
|
|
4268
|
-
return
|
|
2601
|
+
return jsx(Years, __assign$8({}, props));
|
|
4269
2602
|
}
|
|
4270
|
-
return
|
|
4271
|
-
}
|
|
4272
|
-
DecadeView.propTypes = __assign$8({}, tileGroupProps);
|
|
4273
|
-
var DecadeView$1 = DecadeView;
|
|
2603
|
+
return jsx("div", { className: "react-calendar__decade-view", children: renderYears() });
|
|
2604
|
+
}
|
|
4274
2605
|
|
|
4275
2606
|
var __assign$7 = (undefined && undefined.__assign) || function () {
|
|
4276
2607
|
__assign$7 = Object.assign || function(t) {
|
|
@@ -4307,7 +2638,7 @@ var className$3 = 'react-calendar__year-view__months__month';
|
|
|
4307
2638
|
function Month(_a) {
|
|
4308
2639
|
var _b = _a.classes, classes = _b === void 0 ? [] : _b, _c = _a.formatMonth, formatMonth$1 = _c === void 0 ? formatMonth : _c, _d = _a.formatMonthYear, formatMonthYear$1 = _d === void 0 ? formatMonthYear : _d, otherProps = __rest$5(_a, ["classes", "formatMonth", "formatMonthYear"]);
|
|
4309
2640
|
var date = otherProps.date, locale = otherProps.locale;
|
|
4310
|
-
return (
|
|
2641
|
+
return (jsx(Tile, __assign$7({}, otherProps, { classes: __spreadArray(__spreadArray([], classes, true), [className$3], false), formatAbbr: formatMonthYear$1, maxDateTransform: getMonthEnd, minDateTransform: getMonthStart, view: "year", children: formatMonth$1(locale, date) })));
|
|
4311
2642
|
}
|
|
4312
2643
|
|
|
4313
2644
|
var __assign$6 = (undefined && undefined.__assign) || function () {
|
|
@@ -4337,13 +2668,13 @@ function Months(props) {
|
|
|
4337
2668
|
var start = 0;
|
|
4338
2669
|
var end = 11;
|
|
4339
2670
|
var year = getYear(activeStartDate);
|
|
4340
|
-
return (
|
|
2671
|
+
return (jsx(TileGroup, { className: "react-calendar__year-view__months", dateTransform: function (monthIndex) {
|
|
4341
2672
|
var date = new Date();
|
|
4342
2673
|
date.setFullYear(year, monthIndex, 1);
|
|
4343
2674
|
return getMonthStart(date);
|
|
4344
2675
|
}, dateType: "month", end: end, hover: hover, renderTile: function (_a) {
|
|
4345
2676
|
var date = _a.date, otherTileProps = __rest$4(_a, ["date"]);
|
|
4346
|
-
return (
|
|
2677
|
+
return (jsx(Month, __assign$6({}, otherProps, otherTileProps, { activeStartDate: activeStartDate, date: date }), date.getTime()));
|
|
4347
2678
|
}, start: start, value: value, valueType: valueType }));
|
|
4348
2679
|
}
|
|
4349
2680
|
|
|
@@ -4358,14 +2689,15 @@ var __assign$5 = (undefined && undefined.__assign) || function () {
|
|
|
4358
2689
|
};
|
|
4359
2690
|
return __assign$5.apply(this, arguments);
|
|
4360
2691
|
};
|
|
4361
|
-
|
|
2692
|
+
/**
|
|
2693
|
+
* Displays a given year.
|
|
2694
|
+
*/
|
|
2695
|
+
function YearView(props) {
|
|
4362
2696
|
function renderMonths() {
|
|
4363
|
-
return
|
|
2697
|
+
return jsx(Months, __assign$5({}, props));
|
|
4364
2698
|
}
|
|
4365
|
-
return
|
|
4366
|
-
}
|
|
4367
|
-
YearView.propTypes = __assign$5({}, tileGroupProps);
|
|
4368
|
-
var YearView$1 = YearView;
|
|
2699
|
+
return jsx("div", { className: "react-calendar__year-view", children: renderMonths() });
|
|
2700
|
+
}
|
|
4369
2701
|
|
|
4370
2702
|
var __assign$4 = (undefined && undefined.__assign) || function () {
|
|
4371
2703
|
__assign$4 = Object.assign || function(t) {
|
|
@@ -4391,14 +2723,13 @@ var __rest$3 = (undefined && undefined.__rest) || function (s, e) {
|
|
|
4391
2723
|
};
|
|
4392
2724
|
var className$2 = 'react-calendar__month-view__days__day';
|
|
4393
2725
|
function Day(_a) {
|
|
4394
|
-
var
|
|
4395
|
-
var calendarType = mapCalendarType(calendarTypeOrDeprecatedCalendarType);
|
|
2726
|
+
var calendarType = _a.calendarType, _b = _a.classes, classes = _b === void 0 ? [] : _b, currentMonthIndex = _a.currentMonthIndex, _c = _a.formatDay, formatDay$1 = _c === void 0 ? formatDay : _c, _d = _a.formatLongDate, formatLongDate$1 = _d === void 0 ? formatLongDate : _d, otherProps = __rest$3(_a, ["calendarType", "classes", "currentMonthIndex", "formatDay", "formatLongDate"]);
|
|
4396
2727
|
var date = otherProps.date, locale = otherProps.locale;
|
|
4397
2728
|
var classesProps = [];
|
|
4398
2729
|
if (classes) {
|
|
4399
2730
|
classesProps.push.apply(classesProps, classes);
|
|
4400
2731
|
}
|
|
4401
|
-
|
|
2732
|
+
{
|
|
4402
2733
|
classesProps.push(className$2);
|
|
4403
2734
|
}
|
|
4404
2735
|
if (isWeekend(date, calendarType)) {
|
|
@@ -4407,7 +2738,7 @@ function Day(_a) {
|
|
|
4407
2738
|
if (date.getMonth() !== currentMonthIndex) {
|
|
4408
2739
|
classesProps.push("".concat(className$2, "--neighboringMonth"));
|
|
4409
2740
|
}
|
|
4410
|
-
return (
|
|
2741
|
+
return (jsx(Tile, __assign$4({}, otherProps, { classes: classesProps, formatAbbr: formatLongDate$1, maxDateTransform: getDayEnd, minDateTransform: getDayStart, view: "month", children: formatDay$1(locale, date) })));
|
|
4411
2742
|
}
|
|
4412
2743
|
|
|
4413
2744
|
var __assign$3 = (undefined && undefined.__assign) || function () {
|
|
@@ -4433,8 +2764,7 @@ var __rest$2 = (undefined && undefined.__rest) || function (s, e) {
|
|
|
4433
2764
|
return t;
|
|
4434
2765
|
};
|
|
4435
2766
|
function Days(props) {
|
|
4436
|
-
var activeStartDate = props.activeStartDate,
|
|
4437
|
-
var calendarType = mapCalendarType(calendarTypeOrDeprecatedCalendarType);
|
|
2767
|
+
var activeStartDate = props.activeStartDate, calendarType = props.calendarType, hover = props.hover, showFixedNumberOfWeeks = props.showFixedNumberOfWeeks, showNeighboringMonth = props.showNeighboringMonth, value = props.value, valueType = props.valueType, otherProps = __rest$2(props, ["activeStartDate", "calendarType", "hover", "showFixedNumberOfWeeks", "showNeighboringMonth", "value", "valueType"]);
|
|
4438
2768
|
var year = getYear(activeStartDate);
|
|
4439
2769
|
var monthIndex = getMonth(activeStartDate);
|
|
4440
2770
|
var hasFixedNumberOfWeeks = showFixedNumberOfWeeks || showNeighboringMonth;
|
|
@@ -4466,21 +2796,20 @@ function Days(props) {
|
|
|
4466
2796
|
}
|
|
4467
2797
|
return daysInMonth;
|
|
4468
2798
|
})();
|
|
4469
|
-
return (
|
|
2799
|
+
return (jsx(TileGroup, { className: "react-calendar__month-view__days", count: 7, dateTransform: function (day) {
|
|
4470
2800
|
var date = new Date();
|
|
4471
2801
|
date.setFullYear(year, monthIndex, day);
|
|
4472
2802
|
return getDayStart(date);
|
|
4473
2803
|
}, dateType: "day", hover: hover, end: end, renderTile: function (_a) {
|
|
4474
2804
|
var date = _a.date, otherTileProps = __rest$2(_a, ["date"]);
|
|
4475
|
-
return (
|
|
2805
|
+
return (jsx(Day, __assign$3({}, otherProps, otherTileProps, { activeStartDate: activeStartDate, calendarType: calendarType, currentMonthIndex: monthIndex, date: date }), date.getTime()));
|
|
4476
2806
|
}, offset: offset, start: start, value: value, valueType: valueType }));
|
|
4477
2807
|
}
|
|
4478
2808
|
|
|
4479
2809
|
var className$1 = 'react-calendar__month-view__weekdays';
|
|
4480
2810
|
var weekdayClassName = "".concat(className$1, "__weekday");
|
|
4481
2811
|
function Weekdays(props) {
|
|
4482
|
-
var
|
|
4483
|
-
var calendarType = mapCalendarType(calendarTypeOrDeprecatedCalendarType);
|
|
2812
|
+
var calendarType = props.calendarType, _a = props.formatShortWeekday, formatShortWeekday$1 = _a === void 0 ? formatShortWeekday : _a, _b = props.formatWeekday, formatWeekday$1 = _b === void 0 ? formatWeekday : _b, locale = props.locale, onMouseLeave = props.onMouseLeave;
|
|
4484
2813
|
var anyDate = new Date();
|
|
4485
2814
|
var beginOfMonth = getMonthStart(anyDate);
|
|
4486
2815
|
var year = getYear(beginOfMonth);
|
|
@@ -4489,10 +2818,9 @@ function Weekdays(props) {
|
|
|
4489
2818
|
for (var weekday = 1; weekday <= 7; weekday += 1) {
|
|
4490
2819
|
var weekdayDate = new Date(year, monthIndex, weekday - getDayOfWeek(beginOfMonth, calendarType));
|
|
4491
2820
|
var abbr = formatWeekday$1(locale, weekdayDate);
|
|
4492
|
-
weekdays.push(
|
|
4493
|
-
React.createElement("abbr", { "aria-label": abbr, title: abbr }, formatShortWeekday$1(locale, weekdayDate).replace('.', ''))));
|
|
2821
|
+
weekdays.push(jsx("div", { className: clsx(weekdayClassName, isCurrentDayOfWeek(weekdayDate) && "".concat(weekdayClassName, "--current"), isWeekend(weekdayDate, calendarType) && "".concat(weekdayClassName, "--weekend")), children: jsx("abbr", { "aria-label": abbr, title: abbr, children: formatShortWeekday$1(locale, weekdayDate).replace('.', '') }) }, weekday));
|
|
4494
2822
|
}
|
|
4495
|
-
return (
|
|
2823
|
+
return (jsx(Flex, { className: className$1, count: 7, onFocus: onMouseLeave, onMouseOver: onMouseLeave, children: weekdays }));
|
|
4496
2824
|
}
|
|
4497
2825
|
|
|
4498
2826
|
var __assign$2 = (undefined && undefined.__assign) || function () {
|
|
@@ -4520,20 +2848,20 @@ var __rest$1 = (undefined && undefined.__rest) || function (s, e) {
|
|
|
4520
2848
|
var className = 'react-calendar__tile';
|
|
4521
2849
|
function WeekNumber(props) {
|
|
4522
2850
|
var onClickWeekNumber = props.onClickWeekNumber, weekNumber = props.weekNumber;
|
|
4523
|
-
var children =
|
|
2851
|
+
var children = jsx("span", { children: weekNumber });
|
|
4524
2852
|
if (onClickWeekNumber) {
|
|
4525
2853
|
var date_1 = props.date, onClickWeekNumber_1 = props.onClickWeekNumber, weekNumber_1 = props.weekNumber, otherProps = __rest$1(props, ["date", "onClickWeekNumber", "weekNumber"]);
|
|
4526
|
-
return (
|
|
2854
|
+
return (jsx("button", __assign$2({}, otherProps, { className: className, onClick: function (event) { return onClickWeekNumber_1(weekNumber_1, date_1, event); }, type: "button", children: children })));
|
|
2855
|
+
// biome-ignore lint/style/noUselessElse: TypeScript is unhappy if we remove this else
|
|
4527
2856
|
}
|
|
4528
2857
|
else {
|
|
4529
2858
|
props.date; props.onClickWeekNumber; props.weekNumber; var otherProps = __rest$1(props, ["date", "onClickWeekNumber", "weekNumber"]);
|
|
4530
|
-
return (
|
|
2859
|
+
return (jsx("div", __assign$2({}, otherProps, { className: className, children: children })));
|
|
4531
2860
|
}
|
|
4532
2861
|
}
|
|
4533
2862
|
|
|
4534
2863
|
function WeekNumbers(props) {
|
|
4535
|
-
var activeStartDate = props.activeStartDate,
|
|
4536
|
-
var calendarType = mapCalendarType(calendarTypeOrDeprecatedCalendarType);
|
|
2864
|
+
var activeStartDate = props.activeStartDate, calendarType = props.calendarType, onClickWeekNumber = props.onClickWeekNumber, onMouseLeave = props.onMouseLeave, showFixedNumberOfWeeks = props.showFixedNumberOfWeeks;
|
|
4537
2865
|
var numberOfWeeks = (function () {
|
|
4538
2866
|
if (showFixedNumberOfWeeks) {
|
|
4539
2867
|
return 6;
|
|
@@ -4554,13 +2882,13 @@ function WeekNumbers(props) {
|
|
|
4554
2882
|
return result;
|
|
4555
2883
|
})();
|
|
4556
2884
|
var weekNumbers = dates.map(function (date) { return getWeekNumber(date, calendarType); });
|
|
4557
|
-
return (
|
|
4558
|
-
|
|
4559
|
-
|
|
4560
|
-
|
|
4561
|
-
|
|
4562
|
-
|
|
4563
|
-
|
|
2885
|
+
return (jsx(Flex, { className: "react-calendar__month-view__weekNumbers", count: numberOfWeeks, direction: "column", onFocus: onMouseLeave, onMouseOver: onMouseLeave, style: { flexBasis: 'calc(100% * (1 / 8)', flexShrink: 0 }, children: weekNumbers.map(function (weekNumber, weekIndex) {
|
|
2886
|
+
var date = dates[weekIndex];
|
|
2887
|
+
if (!date) {
|
|
2888
|
+
throw new Error('date is not defined');
|
|
2889
|
+
}
|
|
2890
|
+
return (jsx(WeekNumber, { date: date, onClickWeekNumber: onClickWeekNumber, weekNumber: weekNumber }, weekNumber));
|
|
2891
|
+
}) }));
|
|
4564
2892
|
}
|
|
4565
2893
|
|
|
4566
2894
|
var __assign$1 = (undefined && undefined.__assign) || function () {
|
|
@@ -4596,37 +2924,33 @@ function getCalendarTypeFromLocale(locale) {
|
|
|
4596
2924
|
}
|
|
4597
2925
|
return CALENDAR_TYPES.ISO_8601;
|
|
4598
2926
|
}
|
|
4599
|
-
|
|
2927
|
+
/**
|
|
2928
|
+
* Displays a given month.
|
|
2929
|
+
*/
|
|
2930
|
+
function MonthView(props) {
|
|
4600
2931
|
var activeStartDate = props.activeStartDate, locale = props.locale, onMouseLeave = props.onMouseLeave, showFixedNumberOfWeeks = props.showFixedNumberOfWeeks;
|
|
4601
2932
|
var _a = props.calendarType, calendarType = _a === void 0 ? getCalendarTypeFromLocale(locale) : _a, formatShortWeekday = props.formatShortWeekday, formatWeekday = props.formatWeekday, onClickWeekNumber = props.onClickWeekNumber, showWeekNumbers = props.showWeekNumbers, childProps = __rest(props, ["calendarType", "formatShortWeekday", "formatWeekday", "onClickWeekNumber", "showWeekNumbers"]);
|
|
4602
2933
|
function renderWeekdays() {
|
|
4603
|
-
return (
|
|
2934
|
+
return (jsx(Weekdays, { calendarType: calendarType, formatShortWeekday: formatShortWeekday, formatWeekday: formatWeekday, locale: locale, onMouseLeave: onMouseLeave }));
|
|
4604
2935
|
}
|
|
4605
2936
|
function renderWeekNumbers() {
|
|
4606
2937
|
if (!showWeekNumbers) {
|
|
4607
2938
|
return null;
|
|
4608
2939
|
}
|
|
4609
|
-
return (
|
|
2940
|
+
return (jsx(WeekNumbers, { activeStartDate: activeStartDate, calendarType: calendarType, onClickWeekNumber: onClickWeekNumber, onMouseLeave: onMouseLeave, showFixedNumberOfWeeks: showFixedNumberOfWeeks }));
|
|
4610
2941
|
}
|
|
4611
2942
|
function renderDays() {
|
|
4612
|
-
return
|
|
2943
|
+
return jsx(Days, __assign$1({ calendarType: calendarType }, childProps));
|
|
4613
2944
|
}
|
|
4614
2945
|
var className = 'react-calendar__month-view';
|
|
4615
|
-
return (
|
|
4616
|
-
React.createElement("div", { style: {
|
|
2946
|
+
return (jsx("div", { className: clsx(className, showWeekNumbers ? "".concat(className, "--weekNumbers") : ''), children: jsxs("div", { style: {
|
|
4617
2947
|
display: 'flex',
|
|
4618
2948
|
alignItems: 'flex-end',
|
|
4619
|
-
}
|
|
4620
|
-
|
|
4621
|
-
|
|
4622
|
-
|
|
4623
|
-
|
|
4624
|
-
} },
|
|
4625
|
-
renderWeekdays(),
|
|
4626
|
-
renderDays()))));
|
|
4627
|
-
};
|
|
4628
|
-
MonthView.propTypes = __assign$1(__assign$1({}, tileGroupProps), { calendarType: isCalendarType, formatDay: PropTypes.func, formatLongDate: PropTypes.func, formatShortWeekday: PropTypes.func, formatWeekday: PropTypes.func, onClickWeekNumber: PropTypes.func, onMouseLeave: PropTypes.func, showFixedNumberOfWeeks: PropTypes.bool, showNeighboringMonth: PropTypes.bool, showWeekNumbers: PropTypes.bool });
|
|
4629
|
-
var MonthView$1 = MonthView;
|
|
2949
|
+
}, children: [renderWeekNumbers(), jsxs("div", { style: {
|
|
2950
|
+
flexGrow: 1,
|
|
2951
|
+
width: '100%',
|
|
2952
|
+
}, children: [renderWeekdays(), renderDays()] })] }) }));
|
|
2953
|
+
}
|
|
4630
2954
|
|
|
4631
2955
|
var __assign = (undefined && undefined.__assign) || function () {
|
|
4632
2956
|
__assign = Object.assign || function(t) {
|
|
@@ -4691,7 +3015,7 @@ function getValue$1(value, index) {
|
|
|
4691
3015
|
return null;
|
|
4692
3016
|
}
|
|
4693
3017
|
var valueDate = toDate(rawValue);
|
|
4694
|
-
if (isNaN(valueDate.getTime())) {
|
|
3018
|
+
if (Number.isNaN(valueDate.getTime())) {
|
|
4695
3019
|
throw new Error("Invalid date: ".concat(value));
|
|
4696
3020
|
}
|
|
4697
3021
|
return valueDate;
|
|
@@ -4754,7 +3078,7 @@ function areDatesEqual(date1, date2) {
|
|
|
4754
3078
|
return date1 instanceof Date && date2 instanceof Date && date1.getTime() === date2.getTime();
|
|
4755
3079
|
}
|
|
4756
3080
|
var Calendar = forwardRef(function Calendar(props, ref) {
|
|
4757
|
-
var activeStartDateProps = props.activeStartDate, allowPartialRange = props.allowPartialRange, calendarType = props.calendarType, className = props.className, defaultActiveStartDate = props.defaultActiveStartDate, defaultValue = props.defaultValue, defaultView = props.defaultView, formatDay = props.formatDay, formatLongDate = props.formatLongDate, formatMonth = props.formatMonth, formatMonthYear = props.formatMonthYear, formatShortWeekday = props.formatShortWeekday, formatWeekday = props.formatWeekday, formatYear = props.formatYear, _a = props.goToRangeStartOnSelect, goToRangeStartOnSelect = _a === void 0 ? true : _a, inputRef = props.inputRef, locale = props.locale, _b = props.maxDate, maxDate = _b === void 0 ? defaultMaxDate : _b, _c = props.maxDetail, maxDetail = _c === void 0 ? 'month' : _c, _d = props.minDate, minDate = _d === void 0 ? defaultMinDate : _d, _e = props.minDetail, minDetail = _e === void 0 ? 'century' : _e, navigationAriaLabel = props.navigationAriaLabel, navigationAriaLive = props.navigationAriaLive, navigationLabel = props.navigationLabel, next2AriaLabel = props.next2AriaLabel, next2Label = props.next2Label, nextAriaLabel = props.nextAriaLabel, nextLabel = props.nextLabel, onActiveStartDateChange = props.onActiveStartDateChange, onChangeProps = props.onChange, onClickDay = props.onClickDay, onClickDecade = props.onClickDecade, onClickMonth = props.onClickMonth, onClickWeekNumber = props.onClickWeekNumber, onClickYear = props.onClickYear, onDrillDown = props.onDrillDown, onDrillUp = props.onDrillUp, onViewChange = props.onViewChange, prev2AriaLabel = props.prev2AriaLabel, prev2Label = props.prev2Label, prevAriaLabel = props.prevAriaLabel, prevLabel = props.prevLabel, _f = props.returnValue, returnValue = _f === void 0 ? 'start' : _f, selectRange = props.selectRange, showDoubleView = props.showDoubleView, showFixedNumberOfWeeks = props.showFixedNumberOfWeeks, _g = props.showNavigation, showNavigation = _g === void 0 ? true : _g, _h = props.showNeighboringMonth, showNeighboringMonth = _h === void 0 ? true : _h, showWeekNumbers = props.showWeekNumbers, tileClassName = props.tileClassName, tileContent = props.tileContent, tileDisabled = props.tileDisabled, valueProps = props.value, viewProps = props.view;
|
|
3081
|
+
var activeStartDateProps = props.activeStartDate, allowPartialRange = props.allowPartialRange, calendarType = props.calendarType, className = props.className, defaultActiveStartDate = props.defaultActiveStartDate, defaultValue = props.defaultValue, defaultView = props.defaultView, formatDay = props.formatDay, formatLongDate = props.formatLongDate, formatMonth = props.formatMonth, formatMonthYear = props.formatMonthYear, formatShortWeekday = props.formatShortWeekday, formatWeekday = props.formatWeekday, formatYear = props.formatYear, _a = props.goToRangeStartOnSelect, goToRangeStartOnSelect = _a === void 0 ? true : _a, inputRef = props.inputRef, locale = props.locale, _b = props.maxDate, maxDate = _b === void 0 ? defaultMaxDate : _b, _c = props.maxDetail, maxDetail = _c === void 0 ? 'month' : _c, _d = props.minDate, minDate = _d === void 0 ? defaultMinDate : _d, _e = props.minDetail, minDetail = _e === void 0 ? 'century' : _e, navigationAriaLabel = props.navigationAriaLabel, navigationAriaLive = props.navigationAriaLive, navigationLabel = props.navigationLabel, next2AriaLabel = props.next2AriaLabel, next2Label = props.next2Label, nextAriaLabel = props.nextAriaLabel, nextLabel = props.nextLabel, onActiveStartDateChange = props.onActiveStartDateChange, onChangeProps = props.onChange, onClickDay = props.onClickDay, onClickDecade = props.onClickDecade, onClickMonth = props.onClickMonth, onClickWeekNumber = props.onClickWeekNumber, onClickYear = props.onClickYear, onDrillDown = props.onDrillDown, onDrillUp = props.onDrillUp, onViewChange = props.onViewChange, prev2AriaLabel = props.prev2AriaLabel, prev2Label = props.prev2Label, prevAriaLabel = props.prevAriaLabel, prevLabel = props.prevLabel, _f = props.returnValue, returnValue = _f === void 0 ? 'start' : _f, selectRange = props.selectRange, showDoubleView = props.showDoubleView, showFixedNumberOfWeeks = props.showFixedNumberOfWeeks, _g = props.showNavigation, showNavigation = _g === void 0 ? true : _g, showNeighboringCentury = props.showNeighboringCentury, showNeighboringDecade = props.showNeighboringDecade, _h = props.showNeighboringMonth, showNeighboringMonth = _h === void 0 ? true : _h, showWeekNumbers = props.showWeekNumbers, tileClassName = props.tileClassName, tileContent = props.tileContent, tileDisabled = props.tileDisabled, valueProps = props.value, viewProps = props.view;
|
|
4758
3082
|
var _j = useState(defaultActiveStartDate), activeStartDateState = _j[0], setActiveStartDateState = _j[1];
|
|
4759
3083
|
var _k = useState(null), hoverState = _k[0], setHoverState = _k[1];
|
|
4760
3084
|
var _l = useState(Array.isArray(defaultValue)
|
|
@@ -5048,16 +3372,16 @@ var Calendar = forwardRef(function Calendar(props, ref) {
|
|
|
5048
3372
|
};
|
|
5049
3373
|
switch (view) {
|
|
5050
3374
|
case 'century': {
|
|
5051
|
-
return
|
|
3375
|
+
return (jsx(CenturyView, __assign({ formatYear: formatYear, showNeighboringCentury: showNeighboringCentury }, commonProps)));
|
|
5052
3376
|
}
|
|
5053
3377
|
case 'decade': {
|
|
5054
|
-
return
|
|
3378
|
+
return (jsx(DecadeView, __assign({ formatYear: formatYear, showNeighboringDecade: showNeighboringDecade }, commonProps)));
|
|
5055
3379
|
}
|
|
5056
3380
|
case 'year': {
|
|
5057
|
-
return (
|
|
3381
|
+
return (jsx(YearView, __assign({ formatMonth: formatMonth, formatMonthYear: formatMonthYear }, commonProps)));
|
|
5058
3382
|
}
|
|
5059
3383
|
case 'month': {
|
|
5060
|
-
return (
|
|
3384
|
+
return (jsx(MonthView, __assign({ calendarType: calendarType, formatDay: formatDay, formatLongDate: formatLongDate, formatShortWeekday: formatShortWeekday, formatWeekday: formatWeekday, onClickWeekNumber: onClickWeekNumber, onMouseLeave: selectRange ? onMouseLeave : undefined, showFixedNumberOfWeeks: typeof showFixedNumberOfWeeks !== 'undefined'
|
|
5061
3385
|
? showFixedNumberOfWeeks
|
|
5062
3386
|
: showDoubleView, showNeighboringMonth: showNeighboringMonth, showWeekNumbers: showWeekNumbers }, commonProps)));
|
|
5063
3387
|
}
|
|
@@ -5069,75 +3393,11 @@ var Calendar = forwardRef(function Calendar(props, ref) {
|
|
|
5069
3393
|
if (!showNavigation) {
|
|
5070
3394
|
return null;
|
|
5071
3395
|
}
|
|
5072
|
-
return (
|
|
3396
|
+
return (jsx(Navigation, { activeStartDate: activeStartDate, drillUp: drillUp, formatMonthYear: formatMonthYear, formatYear: formatYear, locale: locale, maxDate: maxDate, minDate: minDate, navigationAriaLabel: navigationAriaLabel, navigationAriaLive: navigationAriaLive, navigationLabel: navigationLabel, next2AriaLabel: next2AriaLabel, next2Label: next2Label, nextAriaLabel: nextAriaLabel, nextLabel: nextLabel, prev2AriaLabel: prev2AriaLabel, prev2Label: prev2Label, prevAriaLabel: prevAriaLabel, prevLabel: prevLabel, setActiveStartDate: setActiveStartDate, showDoubleView: showDoubleView, view: view, views: views }));
|
|
5073
3397
|
}
|
|
5074
3398
|
var valueArray = Array.isArray(value) ? value : [value];
|
|
5075
|
-
return (
|
|
5076
|
-
renderNavigation(),
|
|
5077
|
-
React.createElement("div", { className: "".concat(baseClassName, "__viewContainer"), onBlur: selectRange ? onMouseLeave : undefined, onMouseLeave: selectRange ? onMouseLeave : undefined },
|
|
5078
|
-
renderContent(),
|
|
5079
|
-
showDoubleView ? renderContent(true) : null)));
|
|
3399
|
+
return (jsxs("div", { className: clsx(baseClassName, selectRange && valueArray.length === 1 && "".concat(baseClassName, "--selectRange"), showDoubleView && "".concat(baseClassName, "--doubleView"), className), ref: inputRef, children: [renderNavigation(), jsxs("div", { className: "".concat(baseClassName, "__viewContainer"), onBlur: selectRange ? onMouseLeave : undefined, onMouseLeave: selectRange ? onMouseLeave : undefined, children: [renderContent(), showDoubleView ? renderContent(true) : null] })] }));
|
|
5080
3400
|
});
|
|
5081
|
-
var isActiveStartDate = PropTypes.instanceOf(Date);
|
|
5082
|
-
var isValue = PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(Date)]);
|
|
5083
|
-
var isValueOrValueArray = PropTypes.oneOfType([isValue, rangeOf(isValue)]);
|
|
5084
|
-
Calendar.propTypes = {
|
|
5085
|
-
activeStartDate: isActiveStartDate,
|
|
5086
|
-
allowPartialRange: PropTypes.bool,
|
|
5087
|
-
calendarType: isCalendarType,
|
|
5088
|
-
className: isClassName,
|
|
5089
|
-
defaultActiveStartDate: isActiveStartDate,
|
|
5090
|
-
defaultValue: isValueOrValueArray,
|
|
5091
|
-
defaultView: isView,
|
|
5092
|
-
formatDay: PropTypes.func,
|
|
5093
|
-
formatLongDate: PropTypes.func,
|
|
5094
|
-
formatMonth: PropTypes.func,
|
|
5095
|
-
formatMonthYear: PropTypes.func,
|
|
5096
|
-
formatShortWeekday: PropTypes.func,
|
|
5097
|
-
formatWeekday: PropTypes.func,
|
|
5098
|
-
formatYear: PropTypes.func,
|
|
5099
|
-
goToRangeStartOnSelect: PropTypes.bool,
|
|
5100
|
-
inputRef: isRef,
|
|
5101
|
-
locale: PropTypes.string,
|
|
5102
|
-
maxDate: isMaxDate,
|
|
5103
|
-
maxDetail: PropTypes.oneOf(allViews),
|
|
5104
|
-
minDate: isMinDate,
|
|
5105
|
-
minDetail: PropTypes.oneOf(allViews),
|
|
5106
|
-
navigationAriaLabel: PropTypes.string,
|
|
5107
|
-
navigationAriaLive: PropTypes.oneOf(['off', 'polite', 'assertive']),
|
|
5108
|
-
navigationLabel: PropTypes.func,
|
|
5109
|
-
next2AriaLabel: PropTypes.string,
|
|
5110
|
-
next2Label: PropTypes.node,
|
|
5111
|
-
nextAriaLabel: PropTypes.string,
|
|
5112
|
-
nextLabel: PropTypes.node,
|
|
5113
|
-
onActiveStartDateChange: PropTypes.func,
|
|
5114
|
-
onChange: PropTypes.func,
|
|
5115
|
-
onClickDay: PropTypes.func,
|
|
5116
|
-
onClickDecade: PropTypes.func,
|
|
5117
|
-
onClickMonth: PropTypes.func,
|
|
5118
|
-
onClickWeekNumber: PropTypes.func,
|
|
5119
|
-
onClickYear: PropTypes.func,
|
|
5120
|
-
onDrillDown: PropTypes.func,
|
|
5121
|
-
onDrillUp: PropTypes.func,
|
|
5122
|
-
onViewChange: PropTypes.func,
|
|
5123
|
-
prev2AriaLabel: PropTypes.string,
|
|
5124
|
-
prev2Label: PropTypes.node,
|
|
5125
|
-
prevAriaLabel: PropTypes.string,
|
|
5126
|
-
prevLabel: PropTypes.node,
|
|
5127
|
-
returnValue: PropTypes.oneOf(['start', 'end', 'range']),
|
|
5128
|
-
selectRange: PropTypes.bool,
|
|
5129
|
-
showDoubleView: PropTypes.bool,
|
|
5130
|
-
showFixedNumberOfWeeks: PropTypes.bool,
|
|
5131
|
-
showNavigation: PropTypes.bool,
|
|
5132
|
-
showNeighboringMonth: PropTypes.bool,
|
|
5133
|
-
showWeekNumbers: PropTypes.bool,
|
|
5134
|
-
tileClassName: PropTypes.oneOfType([PropTypes.func, isClassName]),
|
|
5135
|
-
tileContent: PropTypes.oneOfType([PropTypes.func, PropTypes.node]),
|
|
5136
|
-
tileDisabled: PropTypes.func,
|
|
5137
|
-
value: isValueOrValueArray,
|
|
5138
|
-
view: isView,
|
|
5139
|
-
};
|
|
5140
|
-
var Calendar$1 = Calendar;
|
|
5141
3401
|
|
|
5142
3402
|
var css_248z$G = ".DatePicker-module_datePicker__mTJ3f {\n width: 100%;\n}";
|
|
5143
3403
|
var styles$G = {"datePicker":"DatePicker-module_datePicker__mTJ3f"};
|
|
@@ -5152,7 +3412,7 @@ const DatePicker = (props) => {
|
|
|
5152
3412
|
setCurrDate(value);
|
|
5153
3413
|
onChange && onChange(value);
|
|
5154
3414
|
};
|
|
5155
|
-
return (jsx(Calendar
|
|
3415
|
+
return (jsx(Calendar, { className: styles$G.datePicker, value: currDate, minDate: minDate, maxDate: maxDate, selectRange: selectRange, onChange: handleOnChange, ...rest }));
|
|
5156
3416
|
};
|
|
5157
3417
|
|
|
5158
3418
|
var css_248z$F = ".Form-module_form__h9CkF > div {\n margin-bottom: 10px;\n}\n.Form-module_form__h9CkF :last-child {\n margin-bottom: 0;\n}";
|
|
@@ -5165,7 +3425,7 @@ styleInject(css_248z$E);
|
|
|
5165
3425
|
|
|
5166
3426
|
const FormError = (props) => {
|
|
5167
3427
|
const { className = styles$E.isInvalid, errors = [] } = props;
|
|
5168
|
-
return (jsx(Fragment$
|
|
3428
|
+
return (jsx(Fragment$1, { children: errors && (jsx("div", { className: className, children: errors.map(e => (jsx("div", { children: e.message }, e.validator))) })) }));
|
|
5169
3429
|
};
|
|
5170
3430
|
|
|
5171
3431
|
const FormGroup = (props) => {
|
|
@@ -5344,7 +3604,7 @@ const Select = (props) => {
|
|
|
5344
3604
|
}
|
|
5345
3605
|
}
|
|
5346
3606
|
};
|
|
5347
|
-
return (jsxs("div", { ref: selectConainter, className: styles$D.selectContainer, children: [jsx("div", { id: id, className: getCssClass(), onClick: () => show(), tabIndex: 0, onKeyDown: (e) => handleOnKeyDown(e), children: jsxs(Fragment
|
|
3607
|
+
return (jsxs("div", { ref: selectConainter, className: styles$D.selectContainer, children: [jsx("div", { id: id, className: getCssClass(), onClick: () => show(), tabIndex: 0, onKeyDown: (e) => handleOnKeyDown(e), children: jsxs(Fragment, { children: [!multiple && renderSingleViewModel(), multiple && jsx("div", { className: styles$D.chipContainer, children: renderMultipleViewModel() }), jsx(Icon, { className: "ml-auto", children: jsx(ChevronDownSolidIcon, {}) })] }) }), isShow && (jsxs(Portal, { className: "backdrop-root", children: [jsx("div", { ref: selectMenu, className: styles$D.selectMenu, style: {
|
|
5348
3608
|
left: selectConainter.current?.getBoundingClientRect().x,
|
|
5349
3609
|
top: selectConainter.current?.getBoundingClientRect().y,
|
|
5350
3610
|
width: selectConainter.current?.getBoundingClientRect().width,
|
|
@@ -5353,7 +3613,7 @@ const Select = (props) => {
|
|
|
5353
3613
|
};
|
|
5354
3614
|
|
|
5355
3615
|
var css_248z$C = ".Textarea-module_textarea__L5zqa {\n display: block;\n width: 100%;\n padding: 0.375rem 0.75rem;\n font-size: 1rem;\n font-weight: 400;\n line-height: 1.5;\n background-clip: padding-box;\n border: 2px solid var(--input-border-color);\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n border-radius: var(--borderRadius);\n resize: vertical;\n color: #212529;\n background-color: #fff;\n background-clip: padding-box;\n appearance: none;\n border-radius: 0.25rem;\n box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.0745098039);\n transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;\n border: 1px solid #ced4da;\n}\n.Textarea-module_textarea__L5zqa:focus:not(.Textarea-module_textarea__L5zqa.Textarea-module_disabled__OqqOF) {\n outline: none !important;\n border-color: var(--primary);\n}\n.Textarea-module_textarea__L5zqa.Textarea-module_isInvalid__JI01W {\n border-color: #dc3545;\n box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.2509803922);\n}";
|
|
5356
|
-
var styles$C = {"textarea":"Textarea-module_textarea__L5zqa","
|
|
3616
|
+
var styles$C = {"textarea":"Textarea-module_textarea__L5zqa","isInvalid":"Textarea-module_isInvalid__JI01W"};
|
|
5357
3617
|
styleInject(css_248z$C);
|
|
5358
3618
|
|
|
5359
3619
|
const Textarea = (props) => {
|
|
@@ -5369,7 +3629,7 @@ const Textarea = (props) => {
|
|
|
5369
3629
|
};
|
|
5370
3630
|
|
|
5371
3631
|
var css_248z$B = ".FormInput-module_formInput__VXZip {\n display: block;\n width: 100%;\n padding: 0.375rem 0.75rem;\n font-size: 1rem;\n font-weight: 400;\n line-height: 1.5;\n color: #212529;\n background-color: #fff;\n background-clip: padding-box;\n border: 1px solid #ced4da;\n -webkit-appearance: none;\n appearance: none;\n border-radius: 0.25rem;\n box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);\n transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;\n}\n.FormInput-module_formInput__VXZip:focus:not(.FormInput-module_formInput__VXZip.FormInput-module_disabled__EjdD9) {\n color: #212529;\n background-color: #fff;\n border-color: #86b7fe;\n outline: 0;\n box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);\n}\n.FormInput-module_formInput__VXZip.FormInput-module_isInvalid__vQDuz {\n border-color: #dc3545;\n box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.2509803922);\n}";
|
|
5372
|
-
var styles$B = {"formInput":"FormInput-module_formInput__VXZip","
|
|
3632
|
+
var styles$B = {"formInput":"FormInput-module_formInput__VXZip","isInvalid":"FormInput-module_isInvalid__vQDuz"};
|
|
5373
3633
|
styleInject(css_248z$B);
|
|
5374
3634
|
|
|
5375
3635
|
const FormInput = (props) => {
|
|
@@ -5389,14 +3649,14 @@ const FormInput = (props) => {
|
|
|
5389
3649
|
const handleOnChange = (value, type, name) => {
|
|
5390
3650
|
onChange && onChange({ value: value, type: type, name: name });
|
|
5391
3651
|
};
|
|
5392
|
-
return (jsxs(Fragment
|
|
3652
|
+
return (jsxs(Fragment, { children: [(type === 'text' ||
|
|
5393
3653
|
type === 'date' ||
|
|
5394
3654
|
type === 'datetime-local' ||
|
|
5395
3655
|
type === 'email' ||
|
|
5396
3656
|
type === 'number' ||
|
|
5397
3657
|
type === 'password' ||
|
|
5398
3658
|
type === 'color' ||
|
|
5399
|
-
type === 'time') && (jsx("input", { id: name, name: name, type: type, className: getCssClasses(), value: value, autoFocus: autoFocus, onInput: (e) => handleOnInput(e.target.value, type, name), onChange: (e) => handleOnChange((e?.target).value, type, name), onBlur: onBlur, placeholder: placeholder, readOnly: readonly, disabled: disabled, onKeyDown: onKeyDown })), type === 'file' && (jsx(FileInput, { id: name, name: name, className: className + (!isValid ? ' is-invalid' : ''), value: value, autoFocus: autoFocus, readOnly: readonly, disabled: disabled, onChange: (e) => handleOnChange(e.target.value, type, name), children: "choose a file" })), type === 'textarea' && (jsx(Textarea, { id: name, name: name, className: className, error: !isValid, value: value, disabled: disabled, autoFocus: autoFocus, onInput: (e) => handleOnInput(e.target.value, type, name), onChange: (e) => handleOnChange(e.target.value, type, name), placeholder: placeholder, rows: textareaOptions?.rows, style: textareaOptions?.resize !== false ? undefined : { resize: 'none' } })), type === 'select' && (jsx(Select, { id: name, name: name, className: className + (!isValid ? ' is-invalid' : ''), value: value, disabled: disabled, multiple: selectOptions?.multiple, onChange: (e) => handleOnChange(e, type, name), options: options })), type === 'autocomplete' && (jsx(AutoComplete, { id: name, name: name, className: className + (!isValid ? ' is-invalid' : ''), value: value, disabled: disabled, openOnFocus: autoCompleteOptions?.openOnFocus, onChange: (e) => handleOnChange(e, type, name), onSelect: (e) => handleOnChange(e.value, type, name), options: options })), type === 'checkbox' && (jsx(Checkbox, { id: name, name: name, label: label, disabled: disabled, className: !isValid ? ' is-invalid' : '', onChange: (e) => handleOnChange((e?.target).checked, type, name), checked: value })), type === 'radio' && (jsx(Fragment
|
|
3659
|
+
type === 'time') && (jsx("input", { id: name, name: name, type: type, className: getCssClasses(), value: value, autoFocus: autoFocus, onInput: (e) => handleOnInput(e.target.value, type, name), onChange: (e) => handleOnChange((e?.target).value, type, name), onBlur: onBlur, placeholder: placeholder, readOnly: readonly, disabled: disabled, onKeyDown: onKeyDown })), type === 'file' && (jsx(FileInput, { id: name, name: name, className: className + (!isValid ? ' is-invalid' : ''), value: value, autoFocus: autoFocus, readOnly: readonly, disabled: disabled, onChange: (e) => handleOnChange(e.target.value, type, name), children: "choose a file" })), type === 'textarea' && (jsx(Textarea, { id: name, name: name, className: className, error: !isValid, value: value, disabled: disabled, autoFocus: autoFocus, onInput: (e) => handleOnInput(e.target.value, type, name), onChange: (e) => handleOnChange(e.target.value, type, name), placeholder: placeholder, rows: textareaOptions?.rows, style: textareaOptions?.resize !== false ? undefined : { resize: 'none' } })), type === 'select' && (jsx(Select, { id: name, name: name, className: className + (!isValid ? ' is-invalid' : ''), value: value, disabled: disabled, multiple: selectOptions?.multiple, onChange: (e) => handleOnChange(e, type, name), options: options })), type === 'autocomplete' && (jsx(AutoComplete, { id: name, name: name, className: className + (!isValid ? ' is-invalid' : ''), value: value, disabled: disabled, openOnFocus: autoCompleteOptions?.openOnFocus, onChange: (e) => handleOnChange(e, type, name), onSelect: (e) => handleOnChange(e.value, type, name), options: options })), type === 'checkbox' && (jsx(Checkbox, { id: name, name: name, label: label, disabled: disabled, className: !isValid ? ' is-invalid' : '', onChange: (e) => handleOnChange((e?.target).checked, type, name), checked: value })), type === 'radio' && (jsx(Fragment, { children: options.map(option => (jsxs("div", { className: "form-check", children: [jsx("input", { id: option.id ? option.id : option.value, name: name, type: "radio", className: "form-check-input", onChange: (e) => handleOnChange((e?.target).value, type, name), value: option.value, checked: value === option.value, onKeyDown: onKeyDown }), jsx("label", { className: "form-check-label", htmlFor: option.id, children: option.label })] }, option.id))) }))] }));
|
|
5400
3660
|
};
|
|
5401
3661
|
|
|
5402
3662
|
var css_248z$A = ".FormLabel-module_formLabel__TXcHc {\n display: inline-block;\n margin-bottom: 0.5rem;\n}";
|
|
@@ -5423,9 +3683,9 @@ const EmailValidator = (value) => {
|
|
|
5423
3683
|
|
|
5424
3684
|
const IsEqualValidator = (valueA, valueB) => valueA === valueB;
|
|
5425
3685
|
|
|
5426
|
-
const MaxValidator = (val, valueB) => (val && val.length <= valueB) || false;
|
|
3686
|
+
const MaxValidator = (val, valueB) => (val && val.toString().length <= valueB) || false;
|
|
5427
3687
|
|
|
5428
|
-
const MinValidator = (val, minLength) => (val && val.length >= minLength) || false;
|
|
3688
|
+
const MinValidator = (val, minLength) => (val && val.toString().length >= minLength) || false;
|
|
5429
3689
|
|
|
5430
3690
|
class Form extends Component {
|
|
5431
3691
|
constructor(props) {
|
|
@@ -5807,7 +4067,7 @@ const Drawer = (props) => {
|
|
|
5807
4067
|
const handleClickBackdrop = () => {
|
|
5808
4068
|
onClickBackdrop && onClickBackdrop();
|
|
5809
4069
|
};
|
|
5810
|
-
return (jsxs(Portal
|
|
4070
|
+
return (jsxs(Portal, { className: 'drawer-root', target: target, children: [jsx(DrawerContent, { className: className, position: position, permanent: permanent, shadow: shadow, ...rest, children: children }), !permanent && jsx(Backdrop, { onClick: handleClickBackdrop })] }));
|
|
5811
4071
|
};
|
|
5812
4072
|
const DrawerContent = (props) => {
|
|
5813
4073
|
const { children, className, position = 'left', permanent = false, shadow, ...rest } = props;
|
|
@@ -5964,7 +4224,7 @@ const MenuBody = (props) => {
|
|
|
5964
4224
|
useOnDestroy(() => {
|
|
5965
4225
|
popperInstance?.destroy();
|
|
5966
4226
|
});
|
|
5967
|
-
return (jsxs(Portal
|
|
4227
|
+
return (jsxs(Portal, { className: "menu-root", children: [jsx("div", { ref: menuBodyRef, className: getCssClasses(), children: jsx(List, { children: children }) }), jsx(Backdrop, { isTransparent: true, onClick: handleClickBackdrop })] }));
|
|
5968
4228
|
};
|
|
5969
4229
|
|
|
5970
4230
|
const Menu = (props) => {
|
|
@@ -6070,7 +4330,7 @@ const Modal = (props) => {
|
|
|
6070
4330
|
const handleClickBackdrop = () => {
|
|
6071
4331
|
onBackdropClick && onBackdropClick();
|
|
6072
4332
|
};
|
|
6073
|
-
return (jsxs(Fragment
|
|
4333
|
+
return (jsxs(Fragment, { children: [jsx(Portal, { className: "modal-root", target: target, children: jsx("div", { className: styles$p.modal, children: jsx("div", { className: getCssClass(), children: jsxs("div", { className: styles$p.modalContent, children: [header && (jsx(ModalHeader, { isDismissable: isDismissable, onClose: () => onHeaderCloseClick && onHeaderCloseClick(), children: header })), jsx(ModalBody, { children: children }), footer && jsx(ModalFooter, { children: footer })] }) }) }) }), jsx(Backdrop, { onClick: handleClickBackdrop, style: { zIndex: 1040 } })] }));
|
|
6074
4334
|
};
|
|
6075
4335
|
|
|
6076
4336
|
var MODALTYPE;
|
|
@@ -6126,7 +4386,7 @@ const GlobalModal = ({ title, description, formControls, onOk, onChange, onCance
|
|
|
6126
4386
|
}
|
|
6127
4387
|
button.handler && button.handler();
|
|
6128
4388
|
};
|
|
6129
|
-
return (jsxs(Modal, { size: size, fullScreen: fullScreen, header: title, onHeaderCloseClick: onCancel, onBackdropClick: onBackdropClick, isDismissable: isDismissable, footer: jsx(Fragment
|
|
4389
|
+
return (jsxs(Modal, { size: size, fullScreen: fullScreen, header: title, onHeaderCloseClick: onCancel, onBackdropClick: onBackdropClick, isDismissable: isDismissable, footer: jsx(Fragment, { children: buttons.map((button, index) => (jsx(Button, { variant: button.variant, color: button.color, autoFocus: button.autoFocus, shadow: button.shadow, onClick: () => handleClickButton(button), children: button.label }, index))) }), children: [description && jsx("div", { children: description }), modalType === MODALTYPE.FORM && (jsx(Fragment, { children: jsx(Form, { ref: myForm, controls: myControls, validateOnBlur: true, onSubmit: onSubmit, onChange: onChange }) }))] }));
|
|
6130
4390
|
};
|
|
6131
4391
|
|
|
6132
4392
|
class ModalService {
|
|
@@ -6280,13 +4540,13 @@ const Tooltip = (props) => {
|
|
|
6280
4540
|
placement && cssClasses.push(styles$l[`placement-${placement}`]);
|
|
6281
4541
|
return cssClasses.filter(css => css).join(' ');
|
|
6282
4542
|
};
|
|
6283
|
-
return (jsxs(Fragment
|
|
4543
|
+
return (jsxs(Fragment, { children: [jsx("div", { ref: refChild, className: styles$l.tooltipContainer, onMouseOver: handleMouseOver, onMouseLeave: handleMouseLeave, onFocus: handleFocus, onBlur: handleBlur, children: children }), open && text &&
|
|
6284
4544
|
jsxs("div", { className: styles$l.tooltip, ref: refTooltip, children: [jsxs("div", { className: 'd-flex align-items-center', children: [text, showClose &&
|
|
6285
4545
|
jsx(Icon, { className: 'ml-1', onClick: handleClickClose, children: jsx(TimesSolidIcon, {}) })] }), jsx("div", { className: getArrowStyles(), "data-popper-arrow": true })] })] }));
|
|
6286
4546
|
};
|
|
6287
4547
|
|
|
6288
4548
|
var css_248z$k = ":root {\n --progress-height: 0.5rem;\n --progress-bg: #e9ecef;\n --progress-box-shadow: var(--shadow);\n --progress-bar-color: #fff;\n --progress-bar-bg: var(--primary);\n --progress-bar-transition: width 0.6s ease;\n}\n\n.ProgressBar-module_progressBarContainer__vtbBw {\n display: flex;\n height: var(--progress-height);\n overflow: hidden;\n background-color: var(--progress-bg);\n}\n\n.ProgressBar-module_progressBar__hr8I8 {\n display: flex;\n flex-direction: column;\n justify-content: center;\n overflow: hidden;\n color: var(--progress-bar-color);\n text-align: center;\n white-space: nowrap;\n transition: var(--progress-bar-transition);\n background-color: var(--progress-bar-bg);\n}\n.ProgressBar-module_progressBar__hr8I8.ProgressBar-module_indeterminate__WcQdD {\n width: 100%;\n height: 100%;\n animation: ProgressBar-module_indeterminateAnimation__SlBFt 1s infinite linear;\n transform-origin: 0% 50%;\n}\n\n@keyframes ProgressBar-module_indeterminateAnimation__SlBFt {\n 0% {\n transform: translateX(0) scaleX(0);\n }\n 40% {\n transform: translateX(0) scaleX(0.4);\n }\n 100% {\n transform: translateX(100%) scaleX(0.5);\n }\n}";
|
|
6289
|
-
var styles$k = {"progressBarContainer":"ProgressBar-module_progressBarContainer__vtbBw","progressBar":"ProgressBar-module_progressBar__hr8I8","indeterminate":"ProgressBar-module_indeterminate__WcQdD"
|
|
4549
|
+
var styles$k = {"progressBarContainer":"ProgressBar-module_progressBarContainer__vtbBw","progressBar":"ProgressBar-module_progressBar__hr8I8","indeterminate":"ProgressBar-module_indeterminate__WcQdD"};
|
|
6290
4550
|
styleInject(css_248z$k);
|
|
6291
4551
|
|
|
6292
4552
|
const ProgressBar = (props) => {
|
|
@@ -6390,12 +4650,12 @@ const Sidebar = (props) => {
|
|
|
6390
4650
|
const handleClickSubItem = (itemPath, subItemPath, e) => {
|
|
6391
4651
|
navigate(e, `${itemPath}/${subItemPath}`);
|
|
6392
4652
|
};
|
|
6393
|
-
return (jsx("nav", { className: getCssClasses(), ...rest, children: jsx(List, { children: menuItems.map(item => (jsxs(React.Fragment, { children: [jsxs(ListItem, { active: isMenuItemActive(item.path), onClick: (e) => handleClickItem(item, e), children: [jsx(ListItemText, { primary: jsxs(Fragment
|
|
4653
|
+
return (jsx("nav", { className: getCssClasses(), ...rest, children: jsx(List, { children: menuItems.map(item => (jsxs(React.Fragment, { children: [jsxs(ListItem, { active: isMenuItemActive(item.path), onClick: (e) => handleClickItem(item, e), children: [jsx(ListItemText, { primary: jsxs(Fragment, { children: [item.label, item.items && item.items.length > 0 && (jsxs("small", { className: "ml-2", children: ["(", item.items.length, ")"] }))] }) }), item.items && item.items.length > 0 &&
|
|
6394
4654
|
jsx(ListItemAction, { children: item.isCollapsed ? jsx(ChevronDownSolidIcon, {}) : jsx(ChevronUpSolidIcon, {}) })] }), !item.isCollapsed && item.items && item.items.length > 0 && (jsx(List, { className: "list-level-1", children: item.items.map(subItem => (jsx(ListItem, { className: "list-item-level-1", active: isMenuItemActive(subItem.path), onClick: (e) => handleClickSubItem(item.path, subItem.path, e), children: subItem.label }, subItem.id))) }, `${item.id}-sub`))] }, item.id))) }) }));
|
|
6395
4655
|
};
|
|
6396
4656
|
|
|
6397
4657
|
var css_248z$j = "@keyframes SkeletonAvatar-module_skeleton-loading__eM-ZU {\n 0% {\n background-color: hsl(200, 20%, 80%);\n }\n 100% {\n background-color: hsl(200, 20%, 95%);\n }\n}\n.SkeletonAvatar-module_skeletonAvatar__03QnJ {\n width: 30px;\n height: 30px;\n border-radius: 50%;\n background-color: var(--secondary);\n animation: SkeletonAvatar-module_skeleton-loading__eM-ZU 1s linear infinite alternate;\n}";
|
|
6398
|
-
var styles$j = {"skeletonAvatar":"SkeletonAvatar-module_skeletonAvatar__03QnJ"
|
|
4658
|
+
var styles$j = {"skeletonAvatar":"SkeletonAvatar-module_skeletonAvatar__03QnJ"};
|
|
6399
4659
|
styleInject(css_248z$j);
|
|
6400
4660
|
|
|
6401
4661
|
const SkeletonAvatar = (props) => {
|
|
@@ -6410,7 +4670,7 @@ const SkeletonAvatar = (props) => {
|
|
|
6410
4670
|
};
|
|
6411
4671
|
|
|
6412
4672
|
var css_248z$i = "@keyframes SkeletonText-module_skeleton-loading__EYFfJ {\n 0% {\n background-color: hsl(200, 20%, 80%);\n }\n 100% {\n background-color: hsl(200, 20%, 95%);\n }\n}\n.SkeletonText-module_skeletonText__E5NCO {\n width: 100%;\n height: 0.7rem;\n margin-bottom: 0.5rem;\n border-radius: 0.25rem;\n animation: SkeletonText-module_skeleton-loading__EYFfJ 1s linear infinite alternate;\n}";
|
|
6413
|
-
var styles$i = {"skeletonText":"SkeletonText-module_skeletonText__E5NCO"
|
|
4673
|
+
var styles$i = {"skeletonText":"SkeletonText-module_skeletonText__E5NCO"};
|
|
6414
4674
|
styleInject(css_248z$i);
|
|
6415
4675
|
|
|
6416
4676
|
const SkeletonText = (props) => {
|
|
@@ -6425,7 +4685,7 @@ const SkeletonText = (props) => {
|
|
|
6425
4685
|
};
|
|
6426
4686
|
|
|
6427
4687
|
var css_248z$h = "@keyframes SkeletonFooter-module_skeleton-loading__OEErv {\n 0% {\n background-color: hsl(200, 20%, 80%);\n }\n 100% {\n background-color: hsl(200, 20%, 95%);\n }\n}\n.SkeletonFooter-module_skeletonFooter__u2Gxc {\n width: 30%;\n height: 0.7rem;\n border-radius: 0.25rem;\n animation: SkeletonFooter-module_skeleton-loading__OEErv 1s linear infinite alternate;\n}";
|
|
6428
|
-
var styles$h = {"skeletonFooter":"SkeletonFooter-module_skeletonFooter__u2Gxc"
|
|
4688
|
+
var styles$h = {"skeletonFooter":"SkeletonFooter-module_skeletonFooter__u2Gxc"};
|
|
6429
4689
|
styleInject(css_248z$h);
|
|
6430
4690
|
|
|
6431
4691
|
const SkeletonFooter = (props) => {
|
|
@@ -6440,7 +4700,7 @@ const SkeletonFooter = (props) => {
|
|
|
6440
4700
|
};
|
|
6441
4701
|
|
|
6442
4702
|
var css_248z$g = "@keyframes SkeletonImage-module_skeleton-loading__04lJ7 {\n 0% {\n background-color: hsl(200, 20%, 80%);\n }\n 100% {\n background-color: hsl(200, 20%, 95%);\n }\n}\n.SkeletonImage-module_skeletonImage__2EwDG {\n height: 10rem;\n margin: 0.5rem 0;\n border-radius: 0.75rem;\n animation: SkeletonImage-module_skeleton-loading__04lJ7 1s linear infinite alternate;\n}\n\n.SkeletonImage-module_div__tqqrB {\n width: 100%;\n height: 100%;\n object-fit: cover;\n margin: auto;\n border-radius: 0.75rem;\n border-color: none;\n}";
|
|
6443
|
-
var styles$g = {"skeletonImage":"SkeletonImage-module_skeletonImage__2EwDG"
|
|
4703
|
+
var styles$g = {"skeletonImage":"SkeletonImage-module_skeletonImage__2EwDG"};
|
|
6444
4704
|
styleInject(css_248z$g);
|
|
6445
4705
|
|
|
6446
4706
|
const SkeletonImage = (props) => {
|
|
@@ -6662,7 +4922,7 @@ const Stepper = (props) => {
|
|
|
6662
4922
|
setActiveIndex(index);
|
|
6663
4923
|
};
|
|
6664
4924
|
const renderSteps = (child, index) => {
|
|
6665
|
-
return (jsx(Fragment
|
|
4925
|
+
return (jsx(Fragment, { children: React.isValidElement(child) &&
|
|
6666
4926
|
cloneElement(child, {
|
|
6667
4927
|
index: index,
|
|
6668
4928
|
isActive: activeIndex >= index,
|
|
@@ -6719,9 +4979,9 @@ const Stepper = (props) => {
|
|
|
6719
4979
|
isHorizontal && cssClasses.push(styles$9['isHorizontal']);
|
|
6720
4980
|
return cssClasses.filter(css => css).join(' ');
|
|
6721
4981
|
};
|
|
6722
|
-
return (jsx(Fragment
|
|
6723
|
-
jsxs(Fragment
|
|
6724
|
-
jsx("div", { className: getCssClasses(), children: steps.map((child, index) => (jsxs(Fragment$
|
|
4982
|
+
return (jsx(Fragment, { children: steps &&
|
|
4983
|
+
jsxs(Fragment, { children: [showSteps &&
|
|
4984
|
+
jsx("div", { className: getCssClasses(), children: steps.map((child, index) => (jsxs(Fragment$1, { children: [renderSteps(child, index), index !== steps.length - 1 && jsx(StepConnector, { isActive: activeIndex > index })] }, child.props.value))) }), steps && steps.map((step, index) => jsx(Fragment$1, { children: index === activeIndex &&
|
|
6725
4985
|
jsx(StepPanel, { children: step.props.children }) }, step.props.value)), jsx(StepperActions, { className: "mt-3", isFirstStep: activeIndex === 0, isStepOptional: isStepOptional(activeIndex), isCompleted: isLastStep(), onBack: handleBack, onSkip: handleSkip, onNext: handleNext, onReset: handleReset, showDoneButton: showDoneButton, showResetButton: showResetButton }), steps && showDots &&
|
|
6726
4986
|
jsx("div", { className: 'd-flex mt-2 align-items-center justify-content-center', children: steps.map((step, index) => jsx(Dot, { isActive: activeIndex >= index }, index)) })] }) }));
|
|
6727
4987
|
};
|
|
@@ -6747,7 +5007,7 @@ const Typography = ({ children, as = 'span', wrap, ...rest }) => {
|
|
|
6747
5007
|
};
|
|
6748
5008
|
|
|
6749
5009
|
var css_248z$6 = ".Step-module_stepWrapper__IQwq1 {\n display: flex;\n align-items: center;\n padding-left: 8px;\n padding-right: 8px;\n transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n}\n.Step-module_stepWrapper__IQwq1.Step-module_hasLabel__LZNvd:not(.Step-module_disabled__JnxUP):hover {\n cursor: pointer;\n background-color: rgba(0, 0, 0, 0.04);\n border-radius: var(--borderRadius);\n}\n\n.Step-module_step__k42go {\n width: 40px;\n height: 40px;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n}\n.Step-module_step__k42go:not(.Step-module_hasLabel__LZNvd):not(.Step-module_disabled__JnxUP):hover {\n border-radius: 100%;\n cursor: pointer;\n background-color: rgba(0, 0, 0, 0.04);\n}\n.Step-module_step__k42go.Step-module_hasLabel__LZNvd svg {\n width: 18px !important;\n height: 18px !important;\n}\n\n.Step-module_stepIconCircle__hnxIV svg {\n width: 24px;\n height: 24px;\n}\n\n.Step-module_stepValue__B0-xv {\n position: absolute;\n color: var(--secondary-contrast-text);\n}\n.Step-module_stepValue__B0-xv .Step-module_isActive__3GGcl {\n color: var(--primary-contrast-text);\n}";
|
|
6750
|
-
var styles$6 = {"stepWrapper":"Step-module_stepWrapper__IQwq1","hasLabel":"Step-module_hasLabel__LZNvd","disabled":"Step-module_disabled__JnxUP","step":"Step-module_step__k42go","stepIconCircle":"Step-module_stepIconCircle__hnxIV","stepValue":"Step-module_stepValue__B0-xv"
|
|
5010
|
+
var styles$6 = {"stepWrapper":"Step-module_stepWrapper__IQwq1","hasLabel":"Step-module_hasLabel__LZNvd","disabled":"Step-module_disabled__JnxUP","step":"Step-module_step__k42go","stepIconCircle":"Step-module_stepIconCircle__hnxIV","stepValue":"Step-module_stepValue__B0-xv"};
|
|
6751
5011
|
styleInject(css_248z$6);
|
|
6752
5012
|
|
|
6753
5013
|
const Step = (props) => {
|
|
@@ -7285,11 +5545,11 @@ Array.prototype.distinct = function (comparator) {
|
|
|
7285
5545
|
};
|
|
7286
5546
|
|
|
7287
5547
|
var dayjs_min = createCommonjsModule(function (module, exports) {
|
|
7288
|
-
!function(t,e){module.exports=e();}(commonjsGlobal,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",c="month",f="quarter",h="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return "["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),s=n-i<0,u=e.clone().add(r+(s?-1:1),c);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:c,y:h,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",D={};D[g]=M;var p="$isDayjsObject",S=function(t){return t instanceof _||!(!t||!t[p])},w=function t(e,n,r){var i;if(!e)return g;if("string"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split("-");if(!i&&u.length>1)return t(u[0])}else {var a=e.name;D[a]=e,i=a;}return !r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null
|
|
5548
|
+
!function(t,e){module.exports=e();}(commonjsGlobal,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",c="month",f="quarter",h="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return "["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),s=n-i<0,u=e.clone().add(r+(s?-1:1),c);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:c,y:h,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",D={};D[g]=M;var p="$isDayjsObject",S=function(t){return t instanceof _||!(!t||!t[p])},w=function t(e,n,r){var i;if(!e)return g;if("string"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split("-");if(!i&&u.length>1)return t(u[0])}else {var a=e.name;D[a]=e,i=a;}return !r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,true),this.parse(t),this.$x=this.$x||t.x||{},this[p]=true;}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init();},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},m.$utils=function(){return b},m.isValid=function(){return !(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<O(t)},m.$g=function(t,e,n){return b.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!b.u(e)||e,f=b.p(t),l=function(t,e){var i=b.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return b.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v="set"+(this.$u?"UTC":"");switch(f){case h:return r?l(1,0):l(31,11);case c:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+"Hours",0);case u:return $(v+"Minutes",1);case s:return $(v+"Seconds",2);case i:return $(v+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,false)},m.$set=function(t,e){var n,o=b.p(t),f="set"+(this.$u?"UTC":""),l=(n={},n[a]=f+"Date",n[d]=f+"Date",n[c]=f+"Month",n[h]=f+"FullYear",n[u]=f+"Hours",n[s]=f+"Minutes",n[i]=f+"Seconds",n[r]=f+"Milliseconds",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===c||o===h){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d;}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[b.p(t)]()},m.add=function(r,f){var d,l=this;r=Number(r);var $=b.p(f),y=function(t){var e=O(l);return b.w(e.date(e.date()+Math.round(t*r)),l)};if($===c)return this.set(c,this.$M+r);if($===h)return this.set(h,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return b.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=b.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,c=n.months,f=n.meridiem,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},d=function(t){return b.s(s%12||12,t,"0")},$=f||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(y,(function(t,r){return r||function(t){switch(t){case "YY":return String(e.$y).slice(-2);case "YYYY":return b.s(e.$y,4,"0");case "M":return a+1;case "MM":return b.s(a+1,2,"0");case "MMM":return h(n.monthsShort,a,c,3);case "MMMM":return h(c,a);case "D":return e.$D;case "DD":return b.s(e.$D,2,"0");case "d":return String(e.$W);case "dd":return h(n.weekdaysMin,e.$W,o,2);case "ddd":return h(n.weekdaysShort,e.$W,o,3);case "dddd":return o[e.$W];case "H":return String(s);case "HH":return b.s(s,2,"0");case "h":return d(1);case "hh":return d(2);case "a":return $(s,u,true);case "A":return $(s,u,false);case "m":return String(u);case "mm":return b.s(u,2,"0");case "s":return String(e.$s);case "ss":return b.s(e.$s,2,"0");case "SSS":return b.s(e.$ms,3,"0");case "Z":return i}return null}(t)||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=this,M=b.p(d),m=O(r),v=(m.utcOffset()-this.utcOffset())*e,g=this-m,D=function(){return b.m(y,m)};switch(M){case h:$=D()/12;break;case c:$=D();break;case f:$=D()/3;break;case o:$=(g-v)/6048e5;break;case a:$=(g-v)/864e5;break;case u:$=g/n;break;case s:$=g/e;break;case i:$=g/t;break;default:$=g;}return l?$:b.a($)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=w(t,e,true);return r&&(n.$L=r),n},m.clone=function(){return b.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),k=_.prototype;return O.prototype=k,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",c],["$y",h],["$D",d]].forEach((function(t){k[t[1]]=function(e){return this.$g(e,t[0],t[1])};})),O.extend=function(t,e){return t.$i||(t(e,_,O),t.$i=true),O},O.locale=w,O.isDayjs=S,O.unix=function(t){return O(1e3*t)},O.en=D[g],O.Ls=D,O.p={},O}));
|
|
7289
5549
|
});
|
|
7290
5550
|
|
|
7291
5551
|
var localizedFormat = createCommonjsModule(function (module, exports) {
|
|
7292
|
-
!function(e,t){module.exports=t();}(commonjsGlobal,(function(){var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(t,o,n){var r=o.prototype,i=r.format;n.en.formats=e,r.format=function(t){void 0===t&&(t="YYYY-MM-DDTHH:mm:ssZ");var o=this.$locale().formats,n=function(t,o){return t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var i=r&&r.toUpperCase();return n||o[r]||e[r]||o[i].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,o){return t||o.slice(1)}))}))}(t,void 0===o?{}:o);return i.call(this,n)};}}));
|
|
5552
|
+
!function(e,t){module.exports=t();}(commonjsGlobal,(function(){var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(t,o,n){var r=o.prototype,i=r.format;n.en.formats=e,r.format=function(t){ void 0===t&&(t="YYYY-MM-DDTHH:mm:ssZ");var o=this.$locale().formats,n=function(t,o){return t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var i=r&&r.toUpperCase();return n||o[r]||e[r]||o[i].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,o){return t||o.slice(1)}))}))}(t,void 0===o?{}:o);return i.call(this,n)};}}));
|
|
7293
5553
|
});
|
|
7294
5554
|
|
|
7295
5555
|
dayjs_min.extend(localizedFormat);
|
|
@@ -7322,4 +5582,4 @@ String.prototype.capitalize = function () {
|
|
|
7322
5582
|
return this.charAt(0).toUpperCase() + this.slice(1);
|
|
7323
5583
|
};
|
|
7324
5584
|
|
|
7325
|
-
export { Alert, AppBar, AppBarTitle, AutoComplete, Backdrop, Badge, Breadcrumb, BreadcrumbItem, Button, ButtonContext, ButtonGroup, Card, CardBody, CardFooter, CardImage, CardSubtitle, CardText, CardTitle, CaretDownSolidIcon, CheckSolidIcon, CheckSquareRegularIcon, Checkbox, ChevronDownSolidIcon, ChevronLeftSolidIcon, ChevronRightSolidIcon, ChevronUpSolidIcon, Chip, CircleSolidIcon, Color, Column, ConditionalWrapper, CssTransition, DATEMODE, DatePicker, DateSelect, DaySelect, Dot, Drawer, EmailValidator, ExpansionPanel, ExpansionPanelContent, ExpansionPanelHeader, FileInput, FileService, FloatingActionButton, Form, FormControl, FormError, FormGroup, FormHint, FormInput, FormLabel, GlobalModal, HomeSolidIcon, HourSelect, Icon, IconButton, IsEmptyValidator, IsEqualValidator, Link, List, ListItem, ListItemAction, ListItemAvatar, ListItemAvatarSize, ListItemIcon, ListItemText, LoadingIndicator, LoadingIndicatorContainer, LogType, MODALBUTTONTYPE, MODALTYPE, MaxValidator, Menu, MenuBody, MenuDivider, MenuItem, MenuToggle, MilliSecondSelect, MinValidator, MinuteSelect, Modal, ModalBody, ModalFooter, ModalHeader, MonthSelect, NumberSelect, POSITION, PlusSolidIcon, Portal
|
|
5585
|
+
export { Alert, AppBar, AppBarTitle, AutoComplete, Backdrop, Badge, Breadcrumb, BreadcrumbItem, Button, ButtonContext, ButtonGroup, Card, CardBody, CardFooter, CardImage, CardSubtitle, CardText, CardTitle, CaretDownSolidIcon, CheckSolidIcon, CheckSquareRegularIcon, Checkbox, ChevronDownSolidIcon, ChevronLeftSolidIcon, ChevronRightSolidIcon, ChevronUpSolidIcon, Chip, CircleSolidIcon, Color, Column, ConditionalWrapper, CssTransition, DATEMODE, DatePicker, DateSelect, DaySelect, Dot, Drawer, EmailValidator, ExpansionPanel, ExpansionPanelContent, ExpansionPanelHeader, FileInput, FileService, FloatingActionButton, Form, FormControl, FormError, FormGroup, FormHint, FormInput, FormLabel, GlobalModal, HomeSolidIcon, HourSelect, Icon, IconButton, IsEmptyValidator, IsEqualValidator, Link, List, ListItem, ListItemAction, ListItemAvatar, ListItemAvatarSize, ListItemIcon, ListItemText, LoadingIndicator, LoadingIndicatorContainer, LogType, MODALBUTTONTYPE, MODALTYPE, MaxValidator, Menu, MenuBody, MenuDivider, MenuItem, MenuToggle, MilliSecondSelect, MinValidator, MinuteSelect, Modal, ModalBody, ModalFooter, ModalHeader, MonthSelect, NumberSelect, POSITION, PlusSolidIcon, Portal, ProgressBar, Row, SIZE, STATUS, ScreenSize, SecondSelect, Select, Sidebar, SkeletonAvatar, SkeletonFooter, SkeletonImage, SkeletonText, Snackbar, SpeedDial, SpeedDialAction, SpeedDialIcon, SpinnerSolidIcon, SquareRegularIcon, Step, Stepper, StepperActions, TIMEMODE, Tab, TabPanel, Table, TableBody, TableCell, TableHead, TableRow, Tabs, Textarea, TimeSelect, TimesCircleSolidIcon, TimesSolidIcon, Tooltip, TooltipPlacement, TreeItem, TreeView, Typography, VARIANT, YearSelect, clipboardService, fileService, loadingIndicatorService, localService, loggerService, modalService, snackbarService, useButtonContext, useConstructor, useCssClasses, useDebounce, useHover, useMobileDetect, useOnDestroy, usePrevious, useScreenSizeDetect, useWindowSize };
|