@abgov/react-components 3.4.0-beta.2 → 3.4.0-beta.23
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/experimental/badge/badge.component.d.ts +10 -0
- package/experimental/common.d.ts +3 -0
- package/experimental/form/form.actions.component.d.ts +3 -0
- package/experimental/form/form.component.d.ts +10 -0
- package/experimental/form/form.item.component.d.ts +7 -0
- package/experimental/{experimental/form → form}/formFieldValidator.d.ts +0 -0
- package/experimental/icons/icon.component.d.ts +12 -0
- package/experimental/icons/iconButton.component.d.ts +13 -0
- package/experimental/icons/index.d.ts +2 -0
- package/experimental/index.d.ts +8 -0
- package/experimental/{experimental/input → input}/input.component.d.ts +0 -0
- package/experimental/modal/modal.component.d.ts +18 -0
- package/experimental/react-components.esm.js +1741 -1777
- package/experimental/react-components.umd.js +1744 -1782
- package/experimental/scrollable/scrollable.component.d.ts +12 -0
- package/experimental/transitions/index.d.ts +2 -0
- package/experimental/transitions/transition.d.ts +9 -0
- package/experimental/transitions/transitionSequence.d.ts +9 -0
- package/index.d.ts +13 -6
- package/lib/_common/errorState.d.ts +5 -0
- package/{experimental/experimental → lib}/element-loader/element-loader.d.ts +1 -1
- package/{experimental/experimental → lib}/page-loader/page-loader.d.ts +0 -0
- package/lib/radio-group/radio-group.d.ts +6 -31
- package/lib/radio-group/radio.d.ts +13 -0
- package/{experimental/experimental → lib}/skeleton/skeleton-element.d.ts +0 -0
- package/{experimental/experimental → lib}/skeleton/skeleton-grid-column.d.ts +0 -0
- package/{experimental/experimental → lib}/skeleton/skeleton-image-content.d.ts +0 -0
- package/{experimental/experimental → lib}/skeleton/skeleton-titled-content.d.ts +0 -0
- package/package.json +1 -1
- package/react-components.esm.js +310 -779
- package/react-components.umd.js +308 -783
- package/experimental/experimental/badge/badge.component.d.ts +0 -8
- package/experimental/experimental/form/container/form.button.component.d.ts +0 -7
- package/experimental/experimental/form/container/form.container.component.d.ts +0 -7
- package/experimental/experimental/form/container/form.item.component.d.ts +0 -18
- package/experimental/experimental/form/form.component.d.ts +0 -32
- package/experimental/experimental/icons.d.ts +0 -8
- package/experimental/experimental/index.d.ts +0 -11
- package/experimental/experimental/modal/modal.component.d.ts +0 -40
- package/experimental/experimental/scrollable/scrollable.component.d.ts +0 -13
- package/lib/radio-group/radio/radio.d.ts +0 -17
- package/lib/radio-group/radio-group.context.d.ts +0 -6
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
export declare type GoABadgeType = 'information' | 'success' | 'warning' | 'emergency' | 'dark' | 'midtone' | 'light' | 'inactive';
|
|
3
|
+
interface GoABadgeProps {
|
|
4
|
+
type: GoABadgeType;
|
|
5
|
+
icon?: ReactNode;
|
|
6
|
+
content?: string;
|
|
7
|
+
testId?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const GoABadge: FC<GoABadgeProps>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import { GoAFormItem } from './form.item.component';
|
|
3
|
+
import { GoAFormActions } from './form.actions.component';
|
|
4
|
+
import './form.scss';
|
|
5
|
+
export declare const GoAForm: FC;
|
|
6
|
+
declare const _default: {
|
|
7
|
+
GoAForm: React.FC<{}>;
|
|
8
|
+
};
|
|
9
|
+
export default _default;
|
|
10
|
+
export { GoAFormItem, GoAFormActions };
|
|
File without changes
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TestProps } from '../common';
|
|
3
|
+
import './icons.css';
|
|
4
|
+
export declare type IconType = 'close' | 'barChart' | 'build' | 'checkmarkCircle' | 'closeCircle' | 'create' | 'download' | 'eyeOff' | 'eye' | 'file' | 'fitness' | 'helpCircle' | 'home' | 'hourGlass' | 'logout' | 'megaphone' | 'menu' | 'options' | 'pencil' | 'pauseCircle' | 'personCircle' | 'playCircle' | 'pulse' | 'receipt' | 'trash' | 'settings';
|
|
5
|
+
export declare type IconSize = 'small' | 'medium' | 'large';
|
|
6
|
+
export declare type IconVariant = 'simple' | 'goa';
|
|
7
|
+
interface Props extends TestProps {
|
|
8
|
+
type: IconType;
|
|
9
|
+
size?: IconSize;
|
|
10
|
+
}
|
|
11
|
+
export declare function GoAIcon({ type, size }: Props): JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TestProps } from '../common';
|
|
3
|
+
import { IconSize, IconType, IconVariant } from './icon.component';
|
|
4
|
+
import './icons.css';
|
|
5
|
+
interface Props extends TestProps {
|
|
6
|
+
type: IconType;
|
|
7
|
+
size?: IconSize;
|
|
8
|
+
variant?: IconVariant;
|
|
9
|
+
title?: string;
|
|
10
|
+
onClick: () => void;
|
|
11
|
+
}
|
|
12
|
+
export declare function GoAIconButton({ type, variant, onClick, size, title, testId }: Props & TestProps): JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { GoABadge } from './badge/badge.component';
|
|
2
|
+
import { GoAIcon, GoAIconButton } from './icons';
|
|
3
|
+
import { GoAInput } from './input/input.component';
|
|
4
|
+
import { GoAModal, GoAModalActions, GoAModalContent, GoAModalTitle } from './modal/modal.component';
|
|
5
|
+
import { GoAScrollable } from './scrollable/scrollable.component';
|
|
6
|
+
import { GoAFormItem, GoAFormActions, GoAForm } from './form/form.component';
|
|
7
|
+
import { GoATransition, GoATransitionSequence } from './transitions';
|
|
8
|
+
export { GoABadge, GoAForm, GoAFormActions, GoAFormItem, GoAIcon, GoAIconButton, GoAInput, GoAModal, GoAModalActions, GoAModalContent, GoAModalTitle, GoAScrollable, GoATransition, GoATransitionSequence };
|
|
File without changes
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { TestProps } from '../common';
|
|
3
|
+
import './modal.css';
|
|
4
|
+
/**
|
|
5
|
+
* Modal - Main Component
|
|
6
|
+
*/
|
|
7
|
+
interface ModalProps {
|
|
8
|
+
isOpen?: boolean;
|
|
9
|
+
onClose?: () => void;
|
|
10
|
+
}
|
|
11
|
+
interface ModalTestProps extends TestProps {
|
|
12
|
+
backgroundTestId?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const GoAModal: FC<ModalProps & ModalTestProps>;
|
|
15
|
+
export default GoAModal;
|
|
16
|
+
export declare const GoAModalActions: FC;
|
|
17
|
+
export declare const GoAModalContent: FC<TestProps>;
|
|
18
|
+
export declare const GoAModalTitle: FC<TestProps>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { useState, useEffect } from 'react';
|
|
2
2
|
import classnames from 'classnames';
|
|
3
3
|
|
|
4
4
|
function styleInject(css, ref) {
|
|
@@ -28,17 +28,19 @@ function styleInject(css, ref) {
|
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
var css_248z = "/* Palette */\n/* Semantic usages */\n.goa-badge-icon {\n
|
|
31
|
+
var css_248z = "/* Palette */\n/* Semantic usages */\n.goa-badge-icon {\n font-size: 14px; }\n\n.badge-module_goa-badge__3F6Ve {\n display: inline-flex;\n align-items: center;\n border-radius: 4px;\n padding: 0 0.5rem;\n gap: 2px; }\n\n.badge-module_goa-badge-content__3UN-3 {\n font-size: 14px;\n font-weight: 400; }\n\n.badge-module_goa-badge__3F6Ve.badge-module_badge-information__2r_Eq {\n background-color: #f1f1f1;\n color: #005DAA; }\n\n.badge-module_goa-badge__3F6Ve.badge-module_badge-success__18wcm {\n background-color: #00853f;\n color: #fff; }\n\n.badge-module_goa-badge__3F6Ve.badge-module_badge-warning__20BNM {\n background-color: #feba35;\n color: #333; }\n\n.badge-module_goa-badge__3F6Ve.badge-module_badge-emergency__E4mHn {\n background-color: #ec040b;\n color: #fff; }\n\n.badge-module_goa-badge__3F6Ve.badge-module_badge-dark__1thw- {\n background-color: #333;\n color: #fff; }\n\n.badge-module_goa-badge__3F6Ve.badge-module_badge-midtone__1Gt4T {\n background-color: #767676;\n color: #fff; }\n\n.badge-module_goa-badge__3F6Ve.badge-module_badge-light__B8ZMt {\n background-color: #fff;\n color: #333; }\n\n.badge-module_goa-badge__3F6Ve.badge-module_badge-inactive__35PEw {\n background-color: #fff;\n color: #333; }\n";
|
|
32
32
|
var styles = {"goa-badge":"badge-module_goa-badge__3F6Ve","goa-badge-content":"badge-module_goa-badge-content__3UN-3","badge-information":"badge-module_badge-information__2r_Eq","badge-success":"badge-module_badge-success__18wcm","badge-warning":"badge-module_badge-warning__20BNM","badge-emergency":"badge-module_badge-emergency__E4mHn","badge-dark":"badge-module_badge-dark__1thw-","badge-midtone":"badge-module_badge-midtone__1Gt4T","badge-light":"badge-module_badge-light__B8ZMt","badge-inactive":"badge-module_badge-inactive__35PEw"};
|
|
33
33
|
styleInject(css_248z);
|
|
34
34
|
|
|
35
35
|
var GoABadge = function GoABadge(_ref) {
|
|
36
36
|
var type = _ref.type,
|
|
37
37
|
content = _ref.content,
|
|
38
|
-
icon = _ref.icon
|
|
38
|
+
icon = _ref.icon,
|
|
39
|
+
testId = _ref.testId;
|
|
39
40
|
return /*#__PURE__*/React.createElement("div", {
|
|
41
|
+
"data-testid": testId,
|
|
40
42
|
className: classnames(styles['goa-badge'], styles["badge-".concat(type)])
|
|
41
|
-
}, icon, /*#__PURE__*/React.createElement("
|
|
43
|
+
}, icon, /*#__PURE__*/React.createElement("div", {
|
|
42
44
|
className: classnames(styles['goa-badge-content'])
|
|
43
45
|
}, content));
|
|
44
46
|
};
|
|
@@ -46,1680 +48,1705 @@ GoABadge.defaultProps = {
|
|
|
46
48
|
type: 'information'
|
|
47
49
|
};
|
|
48
50
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/** @license React v16.13.1
|
|
54
|
-
* react-is.production.min.js
|
|
55
|
-
*
|
|
56
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
57
|
-
*
|
|
58
|
-
* This source code is licensed under the MIT license found in the
|
|
59
|
-
* LICENSE file in the root directory of this source tree.
|
|
60
|
-
*/
|
|
61
|
-
var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?
|
|
62
|
-
Symbol.for("react.suspense_list"):60120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.block"):60121,w=b?Symbol.for("react.fundamental"):60117,x=b?Symbol.for("react.responder"):60118,y=b?Symbol.for("react.scope"):60119;
|
|
63
|
-
function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}var AsyncMode=l;var ConcurrentMode=m;var ContextConsumer=k;var ContextProvider=h;var Element=c;var ForwardRef=n;var Fragment=e;var Lazy=t;var Memo=r;var Portal=d;
|
|
64
|
-
var Profiler=g;var StrictMode=f;var Suspense=p;var isAsyncMode=function(a){return A(a)||z(a)===l};var isConcurrentMode=A;var isContextConsumer=function(a){return z(a)===k};var isContextProvider=function(a){return z(a)===h};var isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===c};var isForwardRef=function(a){return z(a)===n};var isFragment=function(a){return z(a)===e};var isLazy=function(a){return z(a)===t};
|
|
65
|
-
var isMemo=function(a){return z(a)===r};var isPortal=function(a){return z(a)===d};var isProfiler=function(a){return z(a)===g};var isStrictMode=function(a){return z(a)===f};var isSuspense=function(a){return z(a)===p};
|
|
66
|
-
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||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};var typeOf=z;
|
|
67
|
-
|
|
68
|
-
var reactIs_production_min = {
|
|
69
|
-
AsyncMode: AsyncMode,
|
|
70
|
-
ConcurrentMode: ConcurrentMode,
|
|
71
|
-
ContextConsumer: ContextConsumer,
|
|
72
|
-
ContextProvider: ContextProvider,
|
|
73
|
-
Element: Element,
|
|
74
|
-
ForwardRef: ForwardRef,
|
|
75
|
-
Fragment: Fragment,
|
|
76
|
-
Lazy: Lazy,
|
|
77
|
-
Memo: Memo,
|
|
78
|
-
Portal: Portal,
|
|
79
|
-
Profiler: Profiler,
|
|
80
|
-
StrictMode: StrictMode,
|
|
81
|
-
Suspense: Suspense,
|
|
82
|
-
isAsyncMode: isAsyncMode,
|
|
83
|
-
isConcurrentMode: isConcurrentMode,
|
|
84
|
-
isContextConsumer: isContextConsumer,
|
|
85
|
-
isContextProvider: isContextProvider,
|
|
86
|
-
isElement: isElement,
|
|
87
|
-
isForwardRef: isForwardRef,
|
|
88
|
-
isFragment: isFragment,
|
|
89
|
-
isLazy: isLazy,
|
|
90
|
-
isMemo: isMemo,
|
|
91
|
-
isPortal: isPortal,
|
|
92
|
-
isProfiler: isProfiler,
|
|
93
|
-
isStrictMode: isStrictMode,
|
|
94
|
-
isSuspense: isSuspense,
|
|
95
|
-
isValidElementType: isValidElementType,
|
|
96
|
-
typeOf: typeOf
|
|
97
|
-
};
|
|
98
|
-
|
|
99
|
-
var reactIs_development = createCommonjsModule(function (module, exports) {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
if (process.env.NODE_ENV !== "production") {
|
|
104
|
-
(function() {
|
|
105
|
-
|
|
106
|
-
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
|
|
107
|
-
// nor polyfill, then a plain number is used for performance.
|
|
108
|
-
var hasSymbol = typeof Symbol === 'function' && Symbol.for;
|
|
109
|
-
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
|
|
110
|
-
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
|
|
111
|
-
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
|
|
112
|
-
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
|
|
113
|
-
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
|
|
114
|
-
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
|
|
115
|
-
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
|
|
116
|
-
// (unstable) APIs that have been removed. Can we remove the symbols?
|
|
117
|
-
|
|
118
|
-
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
|
|
119
|
-
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
|
|
120
|
-
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
|
|
121
|
-
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
|
|
122
|
-
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
|
|
123
|
-
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
|
|
124
|
-
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
|
|
125
|
-
var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
|
|
126
|
-
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
|
|
127
|
-
var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
|
|
128
|
-
var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
|
|
129
|
-
|
|
130
|
-
function isValidElementType(type) {
|
|
131
|
-
return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
132
|
-
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);
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
function typeOf(object) {
|
|
136
|
-
if (typeof object === 'object' && object !== null) {
|
|
137
|
-
var $$typeof = object.$$typeof;
|
|
138
|
-
|
|
139
|
-
switch ($$typeof) {
|
|
140
|
-
case REACT_ELEMENT_TYPE:
|
|
141
|
-
var type = object.type;
|
|
142
|
-
|
|
143
|
-
switch (type) {
|
|
144
|
-
case REACT_ASYNC_MODE_TYPE:
|
|
145
|
-
case REACT_CONCURRENT_MODE_TYPE:
|
|
146
|
-
case REACT_FRAGMENT_TYPE:
|
|
147
|
-
case REACT_PROFILER_TYPE:
|
|
148
|
-
case REACT_STRICT_MODE_TYPE:
|
|
149
|
-
case REACT_SUSPENSE_TYPE:
|
|
150
|
-
return type;
|
|
151
|
-
|
|
152
|
-
default:
|
|
153
|
-
var $$typeofType = type && type.$$typeof;
|
|
154
|
-
|
|
155
|
-
switch ($$typeofType) {
|
|
156
|
-
case REACT_CONTEXT_TYPE:
|
|
157
|
-
case REACT_FORWARD_REF_TYPE:
|
|
158
|
-
case REACT_LAZY_TYPE:
|
|
159
|
-
case REACT_MEMO_TYPE:
|
|
160
|
-
case REACT_PROVIDER_TYPE:
|
|
161
|
-
return $$typeofType;
|
|
162
|
-
|
|
163
|
-
default:
|
|
164
|
-
return $$typeof;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
case REACT_PORTAL_TYPE:
|
|
170
|
-
return $$typeof;
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
return undefined;
|
|
175
|
-
} // AsyncMode is deprecated along with isAsyncMode
|
|
176
|
-
|
|
177
|
-
var AsyncMode = REACT_ASYNC_MODE_TYPE;
|
|
178
|
-
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
|
|
179
|
-
var ContextConsumer = REACT_CONTEXT_TYPE;
|
|
180
|
-
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
181
|
-
var Element = REACT_ELEMENT_TYPE;
|
|
182
|
-
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
183
|
-
var Fragment = REACT_FRAGMENT_TYPE;
|
|
184
|
-
var Lazy = REACT_LAZY_TYPE;
|
|
185
|
-
var Memo = REACT_MEMO_TYPE;
|
|
186
|
-
var Portal = REACT_PORTAL_TYPE;
|
|
187
|
-
var Profiler = REACT_PROFILER_TYPE;
|
|
188
|
-
var StrictMode = REACT_STRICT_MODE_TYPE;
|
|
189
|
-
var Suspense = REACT_SUSPENSE_TYPE;
|
|
190
|
-
var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
|
|
191
|
-
|
|
192
|
-
function isAsyncMode(object) {
|
|
193
|
-
{
|
|
194
|
-
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
|
195
|
-
hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
|
|
196
|
-
|
|
197
|
-
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.');
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
|
|
202
|
-
}
|
|
203
|
-
function isConcurrentMode(object) {
|
|
204
|
-
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
|
|
205
|
-
}
|
|
206
|
-
function isContextConsumer(object) {
|
|
207
|
-
return typeOf(object) === REACT_CONTEXT_TYPE;
|
|
208
|
-
}
|
|
209
|
-
function isContextProvider(object) {
|
|
210
|
-
return typeOf(object) === REACT_PROVIDER_TYPE;
|
|
211
|
-
}
|
|
212
|
-
function isElement(object) {
|
|
213
|
-
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
214
|
-
}
|
|
215
|
-
function isForwardRef(object) {
|
|
216
|
-
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
|
217
|
-
}
|
|
218
|
-
function isFragment(object) {
|
|
219
|
-
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
|
220
|
-
}
|
|
221
|
-
function isLazy(object) {
|
|
222
|
-
return typeOf(object) === REACT_LAZY_TYPE;
|
|
223
|
-
}
|
|
224
|
-
function isMemo(object) {
|
|
225
|
-
return typeOf(object) === REACT_MEMO_TYPE;
|
|
226
|
-
}
|
|
227
|
-
function isPortal(object) {
|
|
228
|
-
return typeOf(object) === REACT_PORTAL_TYPE;
|
|
229
|
-
}
|
|
230
|
-
function isProfiler(object) {
|
|
231
|
-
return typeOf(object) === REACT_PROFILER_TYPE;
|
|
232
|
-
}
|
|
233
|
-
function isStrictMode(object) {
|
|
234
|
-
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
|
235
|
-
}
|
|
236
|
-
function isSuspense(object) {
|
|
237
|
-
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
exports.AsyncMode = AsyncMode;
|
|
241
|
-
exports.ConcurrentMode = ConcurrentMode;
|
|
242
|
-
exports.ContextConsumer = ContextConsumer;
|
|
243
|
-
exports.ContextProvider = ContextProvider;
|
|
244
|
-
exports.Element = Element;
|
|
245
|
-
exports.ForwardRef = ForwardRef;
|
|
246
|
-
exports.Fragment = Fragment;
|
|
247
|
-
exports.Lazy = Lazy;
|
|
248
|
-
exports.Memo = Memo;
|
|
249
|
-
exports.Portal = Portal;
|
|
250
|
-
exports.Profiler = Profiler;
|
|
251
|
-
exports.StrictMode = StrictMode;
|
|
252
|
-
exports.Suspense = Suspense;
|
|
253
|
-
exports.isAsyncMode = isAsyncMode;
|
|
254
|
-
exports.isConcurrentMode = isConcurrentMode;
|
|
255
|
-
exports.isContextConsumer = isContextConsumer;
|
|
256
|
-
exports.isContextProvider = isContextProvider;
|
|
257
|
-
exports.isElement = isElement;
|
|
258
|
-
exports.isForwardRef = isForwardRef;
|
|
259
|
-
exports.isFragment = isFragment;
|
|
260
|
-
exports.isLazy = isLazy;
|
|
261
|
-
exports.isMemo = isMemo;
|
|
262
|
-
exports.isPortal = isPortal;
|
|
263
|
-
exports.isProfiler = isProfiler;
|
|
264
|
-
exports.isStrictMode = isStrictMode;
|
|
265
|
-
exports.isSuspense = isSuspense;
|
|
266
|
-
exports.isValidElementType = isValidElementType;
|
|
267
|
-
exports.typeOf = typeOf;
|
|
268
|
-
})();
|
|
269
|
-
}
|
|
270
|
-
});
|
|
271
|
-
var reactIs_development_1 = reactIs_development.AsyncMode;
|
|
272
|
-
var reactIs_development_2 = reactIs_development.ConcurrentMode;
|
|
273
|
-
var reactIs_development_3 = reactIs_development.ContextConsumer;
|
|
274
|
-
var reactIs_development_4 = reactIs_development.ContextProvider;
|
|
275
|
-
var reactIs_development_5 = reactIs_development.Element;
|
|
276
|
-
var reactIs_development_6 = reactIs_development.ForwardRef;
|
|
277
|
-
var reactIs_development_7 = reactIs_development.Fragment;
|
|
278
|
-
var reactIs_development_8 = reactIs_development.Lazy;
|
|
279
|
-
var reactIs_development_9 = reactIs_development.Memo;
|
|
280
|
-
var reactIs_development_10 = reactIs_development.Portal;
|
|
281
|
-
var reactIs_development_11 = reactIs_development.Profiler;
|
|
282
|
-
var reactIs_development_12 = reactIs_development.StrictMode;
|
|
283
|
-
var reactIs_development_13 = reactIs_development.Suspense;
|
|
284
|
-
var reactIs_development_14 = reactIs_development.isAsyncMode;
|
|
285
|
-
var reactIs_development_15 = reactIs_development.isConcurrentMode;
|
|
286
|
-
var reactIs_development_16 = reactIs_development.isContextConsumer;
|
|
287
|
-
var reactIs_development_17 = reactIs_development.isContextProvider;
|
|
288
|
-
var reactIs_development_18 = reactIs_development.isElement;
|
|
289
|
-
var reactIs_development_19 = reactIs_development.isForwardRef;
|
|
290
|
-
var reactIs_development_20 = reactIs_development.isFragment;
|
|
291
|
-
var reactIs_development_21 = reactIs_development.isLazy;
|
|
292
|
-
var reactIs_development_22 = reactIs_development.isMemo;
|
|
293
|
-
var reactIs_development_23 = reactIs_development.isPortal;
|
|
294
|
-
var reactIs_development_24 = reactIs_development.isProfiler;
|
|
295
|
-
var reactIs_development_25 = reactIs_development.isStrictMode;
|
|
296
|
-
var reactIs_development_26 = reactIs_development.isSuspense;
|
|
297
|
-
var reactIs_development_27 = reactIs_development.isValidElementType;
|
|
298
|
-
var reactIs_development_28 = reactIs_development.typeOf;
|
|
299
|
-
|
|
300
|
-
var reactIs = createCommonjsModule(function (module) {
|
|
301
|
-
|
|
302
|
-
if (process.env.NODE_ENV === 'production') {
|
|
303
|
-
module.exports = reactIs_production_min;
|
|
304
|
-
} else {
|
|
305
|
-
module.exports = reactIs_development;
|
|
306
|
-
}
|
|
307
|
-
});
|
|
308
|
-
|
|
309
|
-
/*
|
|
310
|
-
object-assign
|
|
311
|
-
(c) Sindre Sorhus
|
|
312
|
-
@license MIT
|
|
313
|
-
*/
|
|
314
|
-
/* eslint-disable no-unused-vars */
|
|
315
|
-
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
316
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
317
|
-
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
318
|
-
|
|
319
|
-
function toObject(val) {
|
|
320
|
-
if (val === null || val === undefined) {
|
|
321
|
-
throw new TypeError('Object.assign cannot be called with null or undefined');
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
return Object(val);
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
function shouldUseNative() {
|
|
328
|
-
try {
|
|
329
|
-
if (!Object.assign) {
|
|
330
|
-
return false;
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
// Detect buggy property enumeration order in older V8 versions.
|
|
334
|
-
|
|
335
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=4118
|
|
336
|
-
var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
|
|
337
|
-
test1[5] = 'de';
|
|
338
|
-
if (Object.getOwnPropertyNames(test1)[0] === '5') {
|
|
339
|
-
return false;
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
343
|
-
var test2 = {};
|
|
344
|
-
for (var i = 0; i < 10; i++) {
|
|
345
|
-
test2['_' + String.fromCharCode(i)] = i;
|
|
346
|
-
}
|
|
347
|
-
var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
|
|
348
|
-
return test2[n];
|
|
349
|
-
});
|
|
350
|
-
if (order2.join('') !== '0123456789') {
|
|
351
|
-
return false;
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
355
|
-
var test3 = {};
|
|
356
|
-
'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
|
|
357
|
-
test3[letter] = letter;
|
|
358
|
-
});
|
|
359
|
-
if (Object.keys(Object.assign({}, test3)).join('') !==
|
|
360
|
-
'abcdefghijklmnopqrst') {
|
|
361
|
-
return false;
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
return true;
|
|
365
|
-
} catch (err) {
|
|
366
|
-
// We don't expect any of the above to throw, but better to be safe.
|
|
367
|
-
return false;
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
var objectAssign = shouldUseNative() ? Object.assign : function (target, source) {
|
|
372
|
-
var from;
|
|
373
|
-
var to = toObject(target);
|
|
374
|
-
var symbols;
|
|
375
|
-
|
|
376
|
-
for (var s = 1; s < arguments.length; s++) {
|
|
377
|
-
from = Object(arguments[s]);
|
|
378
|
-
|
|
379
|
-
for (var key in from) {
|
|
380
|
-
if (hasOwnProperty.call(from, key)) {
|
|
381
|
-
to[key] = from[key];
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
if (getOwnPropertySymbols) {
|
|
386
|
-
symbols = getOwnPropertySymbols(from);
|
|
387
|
-
for (var i = 0; i < symbols.length; i++) {
|
|
388
|
-
if (propIsEnumerable.call(from, symbols[i])) {
|
|
389
|
-
to[symbols[i]] = from[symbols[i]];
|
|
390
|
-
}
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
}
|
|
51
|
+
var css_248z$1 = ".goa-icon {\n display: inline-block;\n}\n\n.goa-icon-button {\n cursor: pointer;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n}\n\n/* GoA */\n.goa-icon-button-goa {\n padding: 0.25rem;\n border: 2px solid var(--color-button-tertiary);\n border-radius: 0.5rem;\n color: var(--color-primary);\n fill: var(--color-primary);\n}\n\n.goa-icon-button-goa:hover {\n background-color: var(--color-button-tertiary);\n}\n\n/* Simple */\n.goa-icon-button-simple {\n padding: 0.4rem;\n border-radius: 999px;\n transition: background 200ms ease-in;\n}\n\n.goa-icon-button-simple:hover {\n background: rgba(0, 0, 0, 0.1);\n}\n";
|
|
52
|
+
styleInject(css_248z$1);
|
|
394
53
|
|
|
395
|
-
|
|
54
|
+
var Icons = {
|
|
55
|
+
barChart: /*#__PURE__*/React.createElement("svg", {
|
|
56
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
57
|
+
className: "ionicon",
|
|
58
|
+
viewBox: "0 0 512 512"
|
|
59
|
+
}, /*#__PURE__*/React.createElement("title", null, "Bar Chart"), /*#__PURE__*/React.createElement("path", {
|
|
60
|
+
d: "M32 32v432a16 16 0 0016 16h432",
|
|
61
|
+
fill: "none",
|
|
62
|
+
stroke: "currentColor",
|
|
63
|
+
strokeLinecap: "round",
|
|
64
|
+
strokeLinejoin: "round",
|
|
65
|
+
strokeWidth: "32"
|
|
66
|
+
}), /*#__PURE__*/React.createElement("rect", {
|
|
67
|
+
x: "96",
|
|
68
|
+
y: "224",
|
|
69
|
+
width: "80",
|
|
70
|
+
height: "192",
|
|
71
|
+
rx: "20",
|
|
72
|
+
ry: "20",
|
|
73
|
+
fill: "none",
|
|
74
|
+
stroke: "currentColor",
|
|
75
|
+
strokeLinecap: "round",
|
|
76
|
+
strokeLinejoin: "round",
|
|
77
|
+
strokeWidth: "32"
|
|
78
|
+
}), /*#__PURE__*/React.createElement("rect", {
|
|
79
|
+
x: "240",
|
|
80
|
+
y: "176",
|
|
81
|
+
width: "80",
|
|
82
|
+
height: "240",
|
|
83
|
+
rx: "20",
|
|
84
|
+
ry: "20",
|
|
85
|
+
fill: "none",
|
|
86
|
+
stroke: "currentColor",
|
|
87
|
+
strokeLinecap: "round",
|
|
88
|
+
strokeLinejoin: "round",
|
|
89
|
+
strokeWidth: "32"
|
|
90
|
+
}), /*#__PURE__*/React.createElement("rect", {
|
|
91
|
+
x: "383.64",
|
|
92
|
+
y: "112",
|
|
93
|
+
width: "80",
|
|
94
|
+
height: "304",
|
|
95
|
+
rx: "20",
|
|
96
|
+
ry: "20",
|
|
97
|
+
fill: "none",
|
|
98
|
+
stroke: "currentColor",
|
|
99
|
+
strokeLinecap: "round",
|
|
100
|
+
strokeLinejoin: "round",
|
|
101
|
+
strokeWidth: "32"
|
|
102
|
+
})),
|
|
103
|
+
build: /*#__PURE__*/React.createElement("svg", {
|
|
104
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
105
|
+
className: "ionicon",
|
|
106
|
+
viewBox: "0 0 512 512"
|
|
107
|
+
}, /*#__PURE__*/React.createElement("title", null, "Build"), /*#__PURE__*/React.createElement("path", {
|
|
108
|
+
d: "M393.87 190a32.1 32.1 0 01-45.25 0l-26.57-26.57a32.09 32.09 0 010-45.26L382.19 58a1 1 0 00-.3-1.64c-38.82-16.64-89.15-8.16-121.11 23.57-30.58 30.35-32.32 76-21.12 115.84a31.93 31.93 0 01-9.06 32.08L64 380a48.17 48.17 0 1068 68l153.86-167a31.93 31.93 0 0131.6-9.13c39.54 10.59 84.54 8.6 114.72-21.19 32.49-32 39.5-88.56 23.75-120.93a1 1 0 00-1.6-.26z",
|
|
109
|
+
fill: "none",
|
|
110
|
+
stroke: "currentColor",
|
|
111
|
+
strokeLinecap: "round",
|
|
112
|
+
strokeMiterlimit: "10",
|
|
113
|
+
strokeWidth: "32"
|
|
114
|
+
}), /*#__PURE__*/React.createElement("circle", {
|
|
115
|
+
cx: "96",
|
|
116
|
+
cy: "416",
|
|
117
|
+
r: "16"
|
|
118
|
+
})),
|
|
119
|
+
checkmarkCircle: /*#__PURE__*/React.createElement("svg", {
|
|
120
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
121
|
+
className: "ionicon",
|
|
122
|
+
viewBox: "0 0 512 512"
|
|
123
|
+
}, /*#__PURE__*/React.createElement("title", null, "Checkmark Circle"), /*#__PURE__*/React.createElement("path", {
|
|
124
|
+
d: "M448 256c0-106-86-192-192-192S64 150 64 256s86 192 192 192 192-86 192-192z",
|
|
125
|
+
fill: "none",
|
|
126
|
+
stroke: "currentColor",
|
|
127
|
+
strokeMiterlimit: "10",
|
|
128
|
+
strokeWidth: "32"
|
|
129
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
130
|
+
fill: "none",
|
|
131
|
+
stroke: "currentColor",
|
|
132
|
+
strokeLinecap: "round",
|
|
133
|
+
strokeLinejoin: "round",
|
|
134
|
+
strokeWidth: "32",
|
|
135
|
+
d: "M352 176L217.6 336 160 272"
|
|
136
|
+
})),
|
|
137
|
+
close: /*#__PURE__*/React.createElement("svg", {
|
|
138
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
139
|
+
className: "ionicon",
|
|
140
|
+
viewBox: "0 0 512 512"
|
|
141
|
+
}, /*#__PURE__*/React.createElement("title", null, "Close"), /*#__PURE__*/React.createElement("path", {
|
|
142
|
+
fill: "none",
|
|
143
|
+
stroke: "currentColor",
|
|
144
|
+
strokeLinecap: "round",
|
|
145
|
+
strokeLinejoin: "round",
|
|
146
|
+
strokeWidth: "32",
|
|
147
|
+
d: "M368 368L144 144M368 144L144 368"
|
|
148
|
+
})),
|
|
149
|
+
closeCircle: /*#__PURE__*/React.createElement("svg", {
|
|
150
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
151
|
+
className: "ionicon",
|
|
152
|
+
viewBox: "0 0 512 512"
|
|
153
|
+
}, /*#__PURE__*/React.createElement("title", null, "Close Circle"), /*#__PURE__*/React.createElement("path", {
|
|
154
|
+
d: "M448 256c0-106-86-192-192-192S64 150 64 256s86 192 192 192 192-86 192-192z",
|
|
155
|
+
fill: "none",
|
|
156
|
+
stroke: "currentColor",
|
|
157
|
+
strokeMiterlimit: "10",
|
|
158
|
+
strokeWidth: "32"
|
|
159
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
160
|
+
fill: "none",
|
|
161
|
+
stroke: "currentColor",
|
|
162
|
+
strokeLinecap: "round",
|
|
163
|
+
strokeLinejoin: "round",
|
|
164
|
+
strokeWidth: "32",
|
|
165
|
+
d: "M320 320L192 192M192 320l128-128"
|
|
166
|
+
})),
|
|
167
|
+
create: /*#__PURE__*/React.createElement("svg", {
|
|
168
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
169
|
+
className: "ionicon",
|
|
170
|
+
viewBox: "0 0 512 512"
|
|
171
|
+
}, /*#__PURE__*/React.createElement("title", null, "Create"), /*#__PURE__*/React.createElement("path", {
|
|
172
|
+
d: "M384 224v184a40 40 0 01-40 40H104a40 40 0 01-40-40V168a40 40 0 0140-40h167.48",
|
|
173
|
+
fill: "none",
|
|
174
|
+
stroke: "currentColor",
|
|
175
|
+
strokeLinecap: "round",
|
|
176
|
+
strokeLinejoin: "round",
|
|
177
|
+
strokeWidth: "32"
|
|
178
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
179
|
+
d: "M459.94 53.25a16.06 16.06 0 00-23.22-.56L424.35 65a8 8 0 000 11.31l11.34 11.32a8 8 0 0011.34 0l12.06-12c6.1-6.09 6.67-16.01.85-22.38zM399.34 90L218.82 270.2a9 9 0 00-2.31 3.93L208.16 299a3.91 3.91 0 004.86 4.86l24.85-8.35a9 9 0 003.93-2.31L422 112.66a9 9 0 000-12.66l-9.95-10a9 9 0 00-12.71 0z"
|
|
180
|
+
})),
|
|
181
|
+
download: /*#__PURE__*/React.createElement("svg", {
|
|
182
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
183
|
+
className: "ionicon",
|
|
184
|
+
viewBox: "0 0 512 512"
|
|
185
|
+
}, /*#__PURE__*/React.createElement("title", null, "Download"), /*#__PURE__*/React.createElement("path", {
|
|
186
|
+
d: "M336 176h40a40 40 0 0140 40v208a40 40 0 01-40 40H136a40 40 0 01-40-40V216a40 40 0 0140-40h40",
|
|
187
|
+
fill: "none",
|
|
188
|
+
stroke: "currentColor",
|
|
189
|
+
strokeLinecap: "round",
|
|
190
|
+
strokeLinejoin: "round",
|
|
191
|
+
strokeWidth: "32"
|
|
192
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
193
|
+
fill: "none",
|
|
194
|
+
stroke: "currentColor",
|
|
195
|
+
strokeLinecap: "round",
|
|
196
|
+
strokeLinejoin: "round",
|
|
197
|
+
strokeWidth: "32",
|
|
198
|
+
d: "M176 272l80 80 80-80M256 48v288"
|
|
199
|
+
})),
|
|
200
|
+
pencil: /*#__PURE__*/React.createElement("svg", {
|
|
201
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
202
|
+
className: "ionicon",
|
|
203
|
+
viewBox: "0 0 512 512"
|
|
204
|
+
}, /*#__PURE__*/React.createElement("title", null, "Pencil"), /*#__PURE__*/React.createElement("path", {
|
|
205
|
+
fill: "none",
|
|
206
|
+
stroke: "currentColor",
|
|
207
|
+
strokeLinecap: "round",
|
|
208
|
+
strokeLinejoin: "round",
|
|
209
|
+
strokeWidth: "32",
|
|
210
|
+
d: "M364.13 125.25L87 403l-23 45 44.99-23 277.76-277.13-22.62-22.62zM420.69 68.69l-22.62 22.62 22.62 22.63 22.62-22.63a16 16 0 000-22.62h0a16 16 0 00-22.62 0z"
|
|
211
|
+
})),
|
|
212
|
+
eye: /*#__PURE__*/React.createElement("svg", {
|
|
213
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
214
|
+
className: "ionicon",
|
|
215
|
+
viewBox: "0 0 512 512"
|
|
216
|
+
}, /*#__PURE__*/React.createElement("title", null, "Eye"), /*#__PURE__*/React.createElement("path", {
|
|
217
|
+
d: "M255.66 112c-77.94 0-157.89 45.11-220.83 135.33a16 16 0 00-.27 17.77C82.92 340.8 161.8 400 255.66 400c92.84 0 173.34-59.38 221.79-135.25a16.14 16.14 0 000-17.47C428.89 172.28 347.8 112 255.66 112z",
|
|
218
|
+
fill: "none",
|
|
219
|
+
stroke: "currentColor",
|
|
220
|
+
strokeLinecap: "round",
|
|
221
|
+
strokeLinejoin: "round",
|
|
222
|
+
strokeWidth: "32"
|
|
223
|
+
}), /*#__PURE__*/React.createElement("circle", {
|
|
224
|
+
cx: "256",
|
|
225
|
+
cy: "256",
|
|
226
|
+
r: "80",
|
|
227
|
+
fill: "none",
|
|
228
|
+
stroke: "currentColor",
|
|
229
|
+
strokeMiterlimit: "10",
|
|
230
|
+
strokeWidth: "32"
|
|
231
|
+
})),
|
|
232
|
+
eyeOff: /*#__PURE__*/React.createElement("svg", {
|
|
233
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
234
|
+
className: "ionicon",
|
|
235
|
+
viewBox: "0 0 512 512"
|
|
236
|
+
}, /*#__PURE__*/React.createElement("title", null, "Eye Off"), /*#__PURE__*/React.createElement("path", {
|
|
237
|
+
d: "M432 448a15.92 15.92 0 01-11.31-4.69l-352-352a16 16 0 0122.62-22.62l352 352A16 16 0 01432 448zM255.66 384c-41.49 0-81.5-12.28-118.92-36.5-34.07-22-64.74-53.51-88.7-91v-.08c19.94-28.57 41.78-52.73 65.24-72.21a2 2 0 00.14-2.94L93.5 161.38a2 2 0 00-2.71-.12c-24.92 21-48.05 46.76-69.08 76.92a31.92 31.92 0 00-.64 35.54c26.41 41.33 60.4 76.14 98.28 100.65C162 402 207.9 416 255.66 416a239.13 239.13 0 0075.8-12.58 2 2 0 00.77-3.31l-21.58-21.58a4 4 0 00-3.83-1 204.8 204.8 0 01-51.16 6.47zM490.84 238.6c-26.46-40.92-60.79-75.68-99.27-100.53C349 110.55 302 96 255.66 96a227.34 227.34 0 00-74.89 12.83 2 2 0 00-.75 3.31l21.55 21.55a4 4 0 003.88 1 192.82 192.82 0 0150.21-6.69c40.69 0 80.58 12.43 118.55 37 34.71 22.4 65.74 53.88 89.76 91a.13.13 0 010 .16 310.72 310.72 0 01-64.12 72.73 2 2 0 00-.15 2.95l19.9 19.89a2 2 0 002.7.13 343.49 343.49 0 0068.64-78.48 32.2 32.2 0 00-.1-34.78z"
|
|
238
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
239
|
+
d: "M256 160a95.88 95.88 0 00-21.37 2.4 2 2 0 00-1 3.38l112.59 112.56a2 2 0 003.38-1A96 96 0 00256 160zM165.78 233.66a2 2 0 00-3.38 1 96 96 0 00115 115 2 2 0 001-3.38z"
|
|
240
|
+
})),
|
|
241
|
+
file: /*#__PURE__*/React.createElement("svg", {
|
|
242
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
243
|
+
className: "ionicon",
|
|
244
|
+
viewBox: "0 0 512 512"
|
|
245
|
+
}, /*#__PURE__*/React.createElement("title", null, "Document"), /*#__PURE__*/React.createElement("path", {
|
|
246
|
+
d: "M416 221.25V416a48 48 0 01-48 48H144a48 48 0 01-48-48V96a48 48 0 0148-48h98.75a32 32 0 0122.62 9.37l141.26 141.26a32 32 0 019.37 22.62z",
|
|
247
|
+
fill: "none",
|
|
248
|
+
stroke: "currentColor",
|
|
249
|
+
strokeLinejoin: "round",
|
|
250
|
+
strokeWidth: "32"
|
|
251
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
252
|
+
d: "M256 56v120a32 32 0 0032 32h120",
|
|
253
|
+
fill: "none",
|
|
254
|
+
stroke: "currentColor",
|
|
255
|
+
strokeLinecap: "round",
|
|
256
|
+
strokeLinejoin: "round",
|
|
257
|
+
strokeWidth: "32"
|
|
258
|
+
})),
|
|
259
|
+
fitness: /*#__PURE__*/React.createElement("svg", {
|
|
260
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
261
|
+
className: "ionicon",
|
|
262
|
+
viewBox: "0 0 512 512"
|
|
263
|
+
}, /*#__PURE__*/React.createElement("title", null, "Fitness"), /*#__PURE__*/React.createElement("path", {
|
|
264
|
+
d: "M352.92 80C288 80 256 144 256 144s-32-64-96.92-64c-52.76 0-94.54 44.14-95.08 96.81-1.1 109.33 86.73 187.08 183 252.42a16 16 0 0018 0c96.26-65.34 184.09-143.09 183-252.42-.54-52.67-42.32-96.81-95.08-96.81z",
|
|
265
|
+
fill: "none",
|
|
266
|
+
stroke: "currentColor",
|
|
267
|
+
strokeLinecap: "round",
|
|
268
|
+
strokeLinejoin: "round",
|
|
269
|
+
strokeWidth: "32"
|
|
270
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
271
|
+
fill: "none",
|
|
272
|
+
stroke: "currentColor",
|
|
273
|
+
strokeLinecap: "round",
|
|
274
|
+
strokeLinejoin: "round",
|
|
275
|
+
strokeWidth: "32",
|
|
276
|
+
d: "M48 256h112l48-96 48 160 48-96 32 64h128"
|
|
277
|
+
})),
|
|
278
|
+
helpCircle: /*#__PURE__*/React.createElement("svg", {
|
|
279
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
280
|
+
className: "ionicon",
|
|
281
|
+
viewBox: "0 0 512 512"
|
|
282
|
+
}, /*#__PURE__*/React.createElement("title", null, "Help Circle"), /*#__PURE__*/React.createElement("path", {
|
|
283
|
+
d: "M256 80a176 176 0 10176 176A176 176 0 00256 80z",
|
|
284
|
+
fill: "none",
|
|
285
|
+
stroke: "currentColor",
|
|
286
|
+
strokeMiterlimit: "10",
|
|
287
|
+
strokeWidth: "32"
|
|
288
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
289
|
+
d: "M200 202.29s.84-17.5 19.57-32.57C230.68 160.77 244 158.18 256 158c10.93-.14 20.69 1.67 26.53 4.45 10 4.76 29.47 16.38 29.47 41.09 0 26-17 37.81-36.37 50.8S251 281.43 251 296",
|
|
290
|
+
fill: "none",
|
|
291
|
+
stroke: "currentColor",
|
|
292
|
+
strokeLinecap: "round",
|
|
293
|
+
strokeMiterlimit: "10",
|
|
294
|
+
strokeWidth: "28"
|
|
295
|
+
}), /*#__PURE__*/React.createElement("circle", {
|
|
296
|
+
cx: "250",
|
|
297
|
+
cy: "348",
|
|
298
|
+
r: "20"
|
|
299
|
+
})),
|
|
300
|
+
home: /*#__PURE__*/React.createElement("svg", {
|
|
301
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
302
|
+
className: "ionicon",
|
|
303
|
+
viewBox: "0 0 512 512"
|
|
304
|
+
}, /*#__PURE__*/React.createElement("title", null, "Home"), /*#__PURE__*/React.createElement("path", {
|
|
305
|
+
d: "M80 212v236a16 16 0 0016 16h96V328a24 24 0 0124-24h80a24 24 0 0124 24v136h96a16 16 0 0016-16V212",
|
|
306
|
+
fill: "none",
|
|
307
|
+
stroke: "currentColor",
|
|
308
|
+
strokeLinecap: "round",
|
|
309
|
+
strokeLinejoin: "round",
|
|
310
|
+
strokeWidth: "32"
|
|
311
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
312
|
+
d: "M480 256L266.89 52c-5-5.28-16.69-5.34-21.78 0L32 256M400 179V64h-48v69",
|
|
313
|
+
fill: "none",
|
|
314
|
+
stroke: "currentColor",
|
|
315
|
+
strokeLinecap: "round",
|
|
316
|
+
strokeLinejoin: "round",
|
|
317
|
+
strokeWidth: "32"
|
|
318
|
+
})),
|
|
319
|
+
hourGlass: /*#__PURE__*/React.createElement("svg", {
|
|
320
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
321
|
+
className: "ionicon",
|
|
322
|
+
viewBox: "0 0 512 512"
|
|
323
|
+
}, /*#__PURE__*/React.createElement("title", null, "Hourglass"), /*#__PURE__*/React.createElement("path", {
|
|
324
|
+
d: "M145.61 464h220.78c19.8 0 35.55-16.29 33.42-35.06C386.06 308 304 310 304 256s83.11-51 95.8-172.94c2-18.78-13.61-35.06-33.41-35.06H145.61c-19.8 0-35.37 16.28-33.41 35.06C124.89 205 208 201 208 256s-82.06 52-95.8 172.94c-2.14 18.77 13.61 35.06 33.41 35.06z",
|
|
325
|
+
fill: "none",
|
|
326
|
+
stroke: "currentColor",
|
|
327
|
+
strokeLinecap: "round",
|
|
328
|
+
strokeLinejoin: "round",
|
|
329
|
+
strokeWidth: "32"
|
|
330
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
331
|
+
d: "M343.3 432H169.13c-15.6 0-20-18-9.06-29.16C186.55 376 240 356.78 240 326V224c0-19.85-38-35-61.51-67.2-3.88-5.31-3.49-12.8 6.37-12.8h142.73c8.41 0 10.23 7.43 6.4 12.75C310.82 189 272 204.05 272 224v102c0 30.53 55.71 47 80.4 76.87 9.95 12.04 6.47 29.13-9.1 29.13z"
|
|
332
|
+
})),
|
|
333
|
+
logout: /*#__PURE__*/React.createElement("svg", {
|
|
334
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
335
|
+
className: "ionicon",
|
|
336
|
+
viewBox: "0 0 512 512"
|
|
337
|
+
}, /*#__PURE__*/React.createElement("title", null, "Log Out"), /*#__PURE__*/React.createElement("path", {
|
|
338
|
+
d: "M304 336v40a40 40 0 01-40 40H104a40 40 0 01-40-40V136a40 40 0 0140-40h152c22.09 0 48 17.91 48 40v40M368 336l80-80-80-80M176 256h256",
|
|
339
|
+
fill: "none",
|
|
340
|
+
stroke: "currentColor",
|
|
341
|
+
strokeLinecap: "round",
|
|
342
|
+
strokeLinejoin: "round",
|
|
343
|
+
strokeWidth: "32"
|
|
344
|
+
})),
|
|
345
|
+
megaphone: /*#__PURE__*/React.createElement("svg", {
|
|
346
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
347
|
+
className: "ionicon",
|
|
348
|
+
viewBox: "0 0 512 512"
|
|
349
|
+
}, /*#__PURE__*/React.createElement("title", null, "Megaphone"), /*#__PURE__*/React.createElement("path", {
|
|
350
|
+
d: "M407.94 52.22S321.3 160 240 160H80a16 16 0 00-16 16v96a16 16 0 0016 16h160c81.3 0 167.94 108.23 167.94 108.23 6.06 8 24.06 2.52 24.06-9.83V62c0-12.31-17-18.82-24.06-9.78zM64 256s-16-6-16-32 16-32 16-32M448 246s16-4.33 16-22-16-22-16-22M256 160v128M112 160v128",
|
|
351
|
+
fill: "none",
|
|
352
|
+
stroke: "currentColor",
|
|
353
|
+
strokeLinecap: "round",
|
|
354
|
+
strokeLinejoin: "round",
|
|
355
|
+
strokeWidth: "32"
|
|
356
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
357
|
+
d: "M144 288v168a8 8 0 008 8h53a16 16 0 0015.29-20.73C211.91 416.39 192 386.08 192 336h16a16 16 0 0016-16v-16a16 16 0 00-16-16h-16",
|
|
358
|
+
fill: "none",
|
|
359
|
+
stroke: "currentColor",
|
|
360
|
+
strokeLinecap: "round",
|
|
361
|
+
strokeLinejoin: "round",
|
|
362
|
+
strokeWidth: "32"
|
|
363
|
+
})),
|
|
364
|
+
menu: /*#__PURE__*/React.createElement("svg", {
|
|
365
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
366
|
+
className: "ionicon",
|
|
367
|
+
viewBox: "0 0 512 512"
|
|
368
|
+
}, /*#__PURE__*/React.createElement("title", null, "Menu"), /*#__PURE__*/React.createElement("path", {
|
|
369
|
+
fill: "none",
|
|
370
|
+
stroke: "currentColor",
|
|
371
|
+
strokeLinecap: "round",
|
|
372
|
+
strokeMiterlimit: "10",
|
|
373
|
+
strokeWidth: "32",
|
|
374
|
+
d: "M80 160h352M80 256h352M80 352h352"
|
|
375
|
+
})),
|
|
376
|
+
options: /*#__PURE__*/React.createElement("svg", {
|
|
377
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
378
|
+
className: "ionicon",
|
|
379
|
+
viewBox: "0 0 512 512"
|
|
380
|
+
}, /*#__PURE__*/React.createElement("title", null, "Options"), /*#__PURE__*/React.createElement("path", {
|
|
381
|
+
fill: "none",
|
|
382
|
+
stroke: "currentColor",
|
|
383
|
+
strokeLinecap: "round",
|
|
384
|
+
strokeLinejoin: "round",
|
|
385
|
+
strokeWidth: "32",
|
|
386
|
+
d: "M368 128h80M64 128h240M368 384h80M64 384h240M208 256h240M64 256h80"
|
|
387
|
+
}), /*#__PURE__*/React.createElement("circle", {
|
|
388
|
+
cx: "336",
|
|
389
|
+
cy: "128",
|
|
390
|
+
r: "32",
|
|
391
|
+
fill: "none",
|
|
392
|
+
stroke: "currentColor",
|
|
393
|
+
strokeLinecap: "round",
|
|
394
|
+
strokeLinejoin: "round",
|
|
395
|
+
strokeWidth: "32"
|
|
396
|
+
}), /*#__PURE__*/React.createElement("circle", {
|
|
397
|
+
cx: "176",
|
|
398
|
+
cy: "256",
|
|
399
|
+
r: "32",
|
|
400
|
+
fill: "none",
|
|
401
|
+
stroke: "currentColor",
|
|
402
|
+
strokeLinecap: "round",
|
|
403
|
+
strokeLinejoin: "round",
|
|
404
|
+
strokeWidth: "32"
|
|
405
|
+
}), /*#__PURE__*/React.createElement("circle", {
|
|
406
|
+
cx: "336",
|
|
407
|
+
cy: "384",
|
|
408
|
+
r: "32",
|
|
409
|
+
fill: "none",
|
|
410
|
+
stroke: "currentColor",
|
|
411
|
+
strokeLinecap: "round",
|
|
412
|
+
strokeLinejoin: "round",
|
|
413
|
+
strokeWidth: "32"
|
|
414
|
+
})),
|
|
415
|
+
pauseCircle: /*#__PURE__*/React.createElement("svg", {
|
|
416
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
417
|
+
className: "ionicon",
|
|
418
|
+
viewBox: "0 0 512 512"
|
|
419
|
+
}, /*#__PURE__*/React.createElement("title", null, "Pause Circle"), /*#__PURE__*/React.createElement("path", {
|
|
420
|
+
d: "M448 256c0-106-86-192-192-192S64 150 64 256s86 192 192 192 192-86 192-192z",
|
|
421
|
+
fill: "none",
|
|
422
|
+
stroke: "currentColor",
|
|
423
|
+
strokeMiterlimit: "10",
|
|
424
|
+
strokeWidth: "32"
|
|
425
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
426
|
+
fill: "none",
|
|
427
|
+
stroke: "currentColor",
|
|
428
|
+
strokeLinecap: "round",
|
|
429
|
+
strokeMiterlimit: "10",
|
|
430
|
+
strokeWidth: "32",
|
|
431
|
+
d: "M208 192v128M304 192v128"
|
|
432
|
+
})),
|
|
433
|
+
personCircle: /*#__PURE__*/React.createElement("svg", {
|
|
434
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
435
|
+
className: "ionicon",
|
|
436
|
+
viewBox: "0 0 512 512"
|
|
437
|
+
}, /*#__PURE__*/React.createElement("title", null, "Person Circle"), /*#__PURE__*/React.createElement("path", {
|
|
438
|
+
d: "M258.9 48C141.92 46.42 46.42 141.92 48 258.9c1.56 112.19 92.91 203.54 205.1 205.1 117 1.6 212.48-93.9 210.88-210.88C462.44 140.91 371.09 49.56 258.9 48zm126.42 327.25a4 4 0 01-6.14-.32 124.27 124.27 0 00-32.35-29.59C321.37 329 289.11 320 256 320s-65.37 9-90.83 25.34a124.24 124.24 0 00-32.35 29.58 4 4 0 01-6.14.32A175.32 175.32 0 0180 259c-1.63-97.31 78.22-178.76 175.57-179S432 158.81 432 256a175.32 175.32 0 01-46.68 119.25z"
|
|
439
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
440
|
+
d: "M256 144c-19.72 0-37.55 7.39-50.22 20.82s-19 32-17.57 51.93C191.11 256 221.52 288 256 288s64.83-32 67.79-71.24c1.48-19.74-4.8-38.14-17.68-51.82C293.39 151.44 275.59 144 256 144z"
|
|
441
|
+
})),
|
|
442
|
+
playCircle: /*#__PURE__*/React.createElement("svg", {
|
|
443
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
444
|
+
className: "ionicon",
|
|
445
|
+
viewBox: "0 0 512 512"
|
|
446
|
+
}, /*#__PURE__*/React.createElement("title", null, "Play Circle"), /*#__PURE__*/React.createElement("path", {
|
|
447
|
+
d: "M448 256c0-106-86-192-192-192S64 150 64 256s86 192 192 192 192-86 192-192z",
|
|
448
|
+
fill: "none",
|
|
449
|
+
stroke: "currentColor",
|
|
450
|
+
strokeMiterlimit: "10",
|
|
451
|
+
strokeWidth: "32"
|
|
452
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
453
|
+
d: "M216.32 334.44l114.45-69.14a10.89 10.89 0 000-18.6l-114.45-69.14a10.78 10.78 0 00-16.32 9.31v138.26a10.78 10.78 0 0016.32 9.31z"
|
|
454
|
+
})),
|
|
455
|
+
pulse: /*#__PURE__*/React.createElement("svg", {
|
|
456
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
457
|
+
className: "ionicon",
|
|
458
|
+
viewBox: "0 0 512 512"
|
|
459
|
+
}, /*#__PURE__*/React.createElement("title", null, "Pulse"), /*#__PURE__*/React.createElement("path", {
|
|
460
|
+
fill: "none",
|
|
461
|
+
stroke: "currentColor",
|
|
462
|
+
strokeLinecap: "round",
|
|
463
|
+
strokeLinejoin: "round",
|
|
464
|
+
strokeWidth: "32",
|
|
465
|
+
d: "M48 320h64l64-256 64 384 64-224 32 96h64"
|
|
466
|
+
}), /*#__PURE__*/React.createElement("circle", {
|
|
467
|
+
cx: "432",
|
|
468
|
+
cy: "320",
|
|
469
|
+
r: "32",
|
|
470
|
+
fill: "none",
|
|
471
|
+
stroke: "currentColor",
|
|
472
|
+
strokeLinecap: "round",
|
|
473
|
+
strokeLinejoin: "round",
|
|
474
|
+
strokeWidth: "32"
|
|
475
|
+
})),
|
|
476
|
+
receipt: /*#__PURE__*/React.createElement("svg", {
|
|
477
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
478
|
+
className: "ionicon",
|
|
479
|
+
viewBox: "0 0 512 512"
|
|
480
|
+
}, /*#__PURE__*/React.createElement("title", null, "Receipt"), /*#__PURE__*/React.createElement("path", {
|
|
481
|
+
fill: "none",
|
|
482
|
+
stroke: "currentColor",
|
|
483
|
+
strokeLinejoin: "round",
|
|
484
|
+
strokeWidth: "32",
|
|
485
|
+
d: "M160 336V48l32 16 32-16 31.94 16 32.37-16L320 64l31.79-16 31.93 16L416 48l32.01 16L480 48v224"
|
|
486
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
487
|
+
d: "M480 272v112a80 80 0 01-80 80h0a80 80 0 01-80-80v-48H48a15.86 15.86 0 00-16 16c0 64 6.74 112 80 112h288",
|
|
488
|
+
fill: "none",
|
|
489
|
+
stroke: "currentColor",
|
|
490
|
+
strokeLinejoin: "round",
|
|
491
|
+
strokeWidth: "32"
|
|
492
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
493
|
+
fill: "none",
|
|
494
|
+
stroke: "currentColor",
|
|
495
|
+
strokeLinecap: "round",
|
|
496
|
+
strokeLinejoin: "round",
|
|
497
|
+
strokeWidth: "32",
|
|
498
|
+
d: "M224 144h192M288 224h128"
|
|
499
|
+
})),
|
|
500
|
+
settings: /*#__PURE__*/React.createElement("svg", {
|
|
501
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
502
|
+
className: "ionicon",
|
|
503
|
+
viewBox: "0 0 512 512"
|
|
504
|
+
}, /*#__PURE__*/React.createElement("title", null, "Settings"), /*#__PURE__*/React.createElement("path", {
|
|
505
|
+
d: "M262.29 192.31a64 64 0 1057.4 57.4 64.13 64.13 0 00-57.4-57.4zM416.39 256a154.34 154.34 0 01-1.53 20.79l45.21 35.46a10.81 10.81 0 012.45 13.75l-42.77 74a10.81 10.81 0 01-13.14 4.59l-44.9-18.08a16.11 16.11 0 00-15.17 1.75A164.48 164.48 0 01325 400.8a15.94 15.94 0 00-8.82 12.14l-6.73 47.89a11.08 11.08 0 01-10.68 9.17h-85.54a11.11 11.11 0 01-10.69-8.87l-6.72-47.82a16.07 16.07 0 00-9-12.22 155.3 155.3 0 01-21.46-12.57 16 16 0 00-15.11-1.71l-44.89 18.07a10.81 10.81 0 01-13.14-4.58l-42.77-74a10.8 10.8 0 012.45-13.75l38.21-30a16.05 16.05 0 006-14.08c-.36-4.17-.58-8.33-.58-12.5s.21-8.27.58-12.35a16 16 0 00-6.07-13.94l-38.19-30A10.81 10.81 0 0149.48 186l42.77-74a10.81 10.81 0 0113.14-4.59l44.9 18.08a16.11 16.11 0 0015.17-1.75A164.48 164.48 0 01187 111.2a15.94 15.94 0 008.82-12.14l6.73-47.89A11.08 11.08 0 01213.23 42h85.54a11.11 11.11 0 0110.69 8.87l6.72 47.82a16.07 16.07 0 009 12.22 155.3 155.3 0 0121.46 12.57 16 16 0 0015.11 1.71l44.89-18.07a10.81 10.81 0 0113.14 4.58l42.77 74a10.8 10.8 0 01-2.45 13.75l-38.21 30a16.05 16.05 0 00-6.05 14.08c.33 4.14.55 8.3.55 12.47z",
|
|
506
|
+
fill: "none",
|
|
507
|
+
stroke: "currentColor",
|
|
508
|
+
strokeLinecap: "round",
|
|
509
|
+
strokeLinejoin: "round",
|
|
510
|
+
strokeWidth: "32"
|
|
511
|
+
})),
|
|
512
|
+
trash: /*#__PURE__*/React.createElement("svg", {
|
|
513
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
514
|
+
className: "ionicon",
|
|
515
|
+
viewBox: "0 0 512 512"
|
|
516
|
+
}, /*#__PURE__*/React.createElement("title", null, "Trash"), /*#__PURE__*/React.createElement("path", {
|
|
517
|
+
d: "M112 112l20 320c.95 18.49 14.4 32 32 32h184c17.67 0 30.87-13.51 32-32l20-320",
|
|
518
|
+
fill: "none",
|
|
519
|
+
stroke: "currentColor",
|
|
520
|
+
strokeLinecap: "round",
|
|
521
|
+
strokeLinejoin: "round",
|
|
522
|
+
strokeWidth: "32"
|
|
523
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
524
|
+
stroke: "currentColor",
|
|
525
|
+
strokeLinecap: "round",
|
|
526
|
+
strokeMiterlimit: "10",
|
|
527
|
+
strokeWidth: "32",
|
|
528
|
+
d: "M80 112h352"
|
|
529
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
530
|
+
d: "M192 112V72h0a23.93 23.93 0 0124-24h80a23.93 23.93 0 0124 24h0v40M256 176v224M184 176l8 224M328 176l-8 224",
|
|
531
|
+
fill: "none",
|
|
532
|
+
stroke: "currentColor",
|
|
533
|
+
strokeLinecap: "round",
|
|
534
|
+
strokeLinejoin: "round",
|
|
535
|
+
strokeWidth: "32"
|
|
536
|
+
}))
|
|
396
537
|
};
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
|
406
|
-
|
|
407
|
-
var ReactPropTypesSecret_1 = ReactPropTypesSecret;
|
|
408
|
-
|
|
409
|
-
var printWarning = function() {};
|
|
410
|
-
|
|
411
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
412
|
-
var ReactPropTypesSecret$1 = ReactPropTypesSecret_1;
|
|
413
|
-
var loggedTypeFailures = {};
|
|
414
|
-
var has = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
415
|
-
|
|
416
|
-
printWarning = function(text) {
|
|
417
|
-
var message = 'Warning: ' + text;
|
|
418
|
-
if (typeof console !== 'undefined') {
|
|
419
|
-
console.error(message);
|
|
420
|
-
}
|
|
421
|
-
try {
|
|
422
|
-
// --- Welcome to debugging React ---
|
|
423
|
-
// This error was thrown as a convenience so that you can use this stack
|
|
424
|
-
// to find the callsite that caused this warning to fire.
|
|
425
|
-
throw new Error(message);
|
|
426
|
-
} catch (x) {}
|
|
538
|
+
function GoAIcon(_ref) {
|
|
539
|
+
var type = _ref.type,
|
|
540
|
+
_ref$size = _ref.size,
|
|
541
|
+
size = _ref$size === void 0 ? 'small' : _ref$size;
|
|
542
|
+
var pxSize = getSize(size);
|
|
543
|
+
var styles = {
|
|
544
|
+
width: "".concat(pxSize, "px"),
|
|
545
|
+
height: "".concat(pxSize, "px")
|
|
427
546
|
};
|
|
547
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
548
|
+
className: "goa-icon",
|
|
549
|
+
style: styles,
|
|
550
|
+
"data-testid": "icon-".concat(type)
|
|
551
|
+
}, Icons[type]);
|
|
428
552
|
}
|
|
429
553
|
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
* @param {object} typeSpecs Map of name to a ReactPropType
|
|
435
|
-
* @param {object} values Runtime values that need to be type-checked
|
|
436
|
-
* @param {string} location e.g. "prop", "context", "child context"
|
|
437
|
-
* @param {string} componentName Name of the component for error messages.
|
|
438
|
-
* @param {?Function} getStack Returns the component stack.
|
|
439
|
-
* @private
|
|
440
|
-
*/
|
|
441
|
-
function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
|
|
442
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
443
|
-
for (var typeSpecName in typeSpecs) {
|
|
444
|
-
if (has(typeSpecs, typeSpecName)) {
|
|
445
|
-
var error;
|
|
446
|
-
// Prop type validation may throw. In case they do, we don't want to
|
|
447
|
-
// fail the render phase where it didn't fail before. So we log it.
|
|
448
|
-
// After these have been cleaned up, we'll let them throw.
|
|
449
|
-
try {
|
|
450
|
-
// This is intentionally an invariant that gets caught. It's the same
|
|
451
|
-
// behavior as without this statement except with a better message.
|
|
452
|
-
if (typeof typeSpecs[typeSpecName] !== 'function') {
|
|
453
|
-
var err = Error(
|
|
454
|
-
(componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
|
|
455
|
-
'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.'
|
|
456
|
-
);
|
|
457
|
-
err.name = 'Invariant Violation';
|
|
458
|
-
throw err;
|
|
459
|
-
}
|
|
460
|
-
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret$1);
|
|
461
|
-
} catch (ex) {
|
|
462
|
-
error = ex;
|
|
463
|
-
}
|
|
464
|
-
if (error && !(error instanceof Error)) {
|
|
465
|
-
printWarning(
|
|
466
|
-
(componentName || 'React class') + ': type specification of ' +
|
|
467
|
-
location + ' `' + typeSpecName + '` is invalid; the type checker ' +
|
|
468
|
-
'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
|
|
469
|
-
'You may have forgotten to pass an argument to the type checker ' +
|
|
470
|
-
'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
|
|
471
|
-
'shape all require an argument).'
|
|
472
|
-
);
|
|
473
|
-
}
|
|
474
|
-
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
|
475
|
-
// Only monitor this failure once because there tends to be a lot of the
|
|
476
|
-
// same error.
|
|
477
|
-
loggedTypeFailures[error.message] = true;
|
|
554
|
+
function getSize(size) {
|
|
555
|
+
switch (size) {
|
|
556
|
+
case 'small':
|
|
557
|
+
return 24;
|
|
478
558
|
|
|
479
|
-
|
|
559
|
+
case 'medium':
|
|
560
|
+
return 32;
|
|
480
561
|
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
);
|
|
484
|
-
}
|
|
485
|
-
}
|
|
486
|
-
}
|
|
562
|
+
case 'large':
|
|
563
|
+
return 48;
|
|
487
564
|
}
|
|
488
565
|
}
|
|
489
566
|
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
var message = 'Warning: ' + text;
|
|
509
|
-
if (typeof console !== 'undefined') {
|
|
510
|
-
console.error(message);
|
|
511
|
-
}
|
|
512
|
-
try {
|
|
513
|
-
// --- Welcome to debugging React ---
|
|
514
|
-
// This error was thrown as a convenience so that you can use this stack
|
|
515
|
-
// to find the callsite that caused this warning to fire.
|
|
516
|
-
throw new Error(message);
|
|
517
|
-
} catch (x) {}
|
|
518
|
-
};
|
|
567
|
+
function GoAIconButton(_ref) {
|
|
568
|
+
var type = _ref.type,
|
|
569
|
+
_ref$variant = _ref.variant,
|
|
570
|
+
variant = _ref$variant === void 0 ? 'goa' : _ref$variant,
|
|
571
|
+
onClick = _ref.onClick,
|
|
572
|
+
_ref$size = _ref.size,
|
|
573
|
+
size = _ref$size === void 0 ? 'small' : _ref$size,
|
|
574
|
+
title = _ref.title,
|
|
575
|
+
testId = _ref.testId;
|
|
576
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
577
|
+
title: title,
|
|
578
|
+
className: "goa-icon-button goa-icon-button-".concat(variant),
|
|
579
|
+
"data-testid": testId,
|
|
580
|
+
onClick: onClick
|
|
581
|
+
}, /*#__PURE__*/React.createElement(GoAIcon, {
|
|
582
|
+
type: type,
|
|
583
|
+
size: size
|
|
584
|
+
}));
|
|
519
585
|
}
|
|
520
586
|
|
|
521
|
-
function
|
|
522
|
-
return
|
|
587
|
+
function _slicedToArray(arr, i) {
|
|
588
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
523
589
|
}
|
|
524
590
|
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
|
|
529
|
-
|
|
530
|
-
/**
|
|
531
|
-
* Returns the iterator method function contained on the iterable object.
|
|
532
|
-
*
|
|
533
|
-
* Be sure to invoke the function with the iterable as context:
|
|
534
|
-
*
|
|
535
|
-
* var iteratorFn = getIteratorFn(myIterable);
|
|
536
|
-
* if (iteratorFn) {
|
|
537
|
-
* var iterator = iteratorFn.call(myIterable);
|
|
538
|
-
* ...
|
|
539
|
-
* }
|
|
540
|
-
*
|
|
541
|
-
* @param {?object} maybeIterable
|
|
542
|
-
* @return {?function}
|
|
543
|
-
*/
|
|
544
|
-
function getIteratorFn(maybeIterable) {
|
|
545
|
-
var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
|
|
546
|
-
if (typeof iteratorFn === 'function') {
|
|
547
|
-
return iteratorFn;
|
|
548
|
-
}
|
|
549
|
-
}
|
|
550
|
-
|
|
551
|
-
/**
|
|
552
|
-
* Collection of methods that allow declaration and validation of props that are
|
|
553
|
-
* supplied to React components. Example usage:
|
|
554
|
-
*
|
|
555
|
-
* var Props = require('ReactPropTypes');
|
|
556
|
-
* var MyArticle = React.createClass({
|
|
557
|
-
* propTypes: {
|
|
558
|
-
* // An optional string prop named "description".
|
|
559
|
-
* description: Props.string,
|
|
560
|
-
*
|
|
561
|
-
* // A required enum prop named "category".
|
|
562
|
-
* category: Props.oneOf(['News','Photos']).isRequired,
|
|
563
|
-
*
|
|
564
|
-
* // A prop named "dialog" that requires an instance of Dialog.
|
|
565
|
-
* dialog: Props.instanceOf(Dialog).isRequired
|
|
566
|
-
* },
|
|
567
|
-
* render: function() { ... }
|
|
568
|
-
* });
|
|
569
|
-
*
|
|
570
|
-
* A more formal specification of how these methods are used:
|
|
571
|
-
*
|
|
572
|
-
* type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
|
|
573
|
-
* decl := ReactPropTypes.{type}(.isRequired)?
|
|
574
|
-
*
|
|
575
|
-
* Each and every declaration produces a function with the same signature. This
|
|
576
|
-
* allows the creation of custom validation functions. For example:
|
|
577
|
-
*
|
|
578
|
-
* var MyLink = React.createClass({
|
|
579
|
-
* propTypes: {
|
|
580
|
-
* // An optional string or URI prop named "href".
|
|
581
|
-
* href: function(props, propName, componentName) {
|
|
582
|
-
* var propValue = props[propName];
|
|
583
|
-
* if (propValue != null && typeof propValue !== 'string' &&
|
|
584
|
-
* !(propValue instanceof URI)) {
|
|
585
|
-
* return new Error(
|
|
586
|
-
* 'Expected a string or an URI for ' + propName + ' in ' +
|
|
587
|
-
* componentName
|
|
588
|
-
* );
|
|
589
|
-
* }
|
|
590
|
-
* }
|
|
591
|
-
* },
|
|
592
|
-
* render: function() {...}
|
|
593
|
-
* });
|
|
594
|
-
*
|
|
595
|
-
* @internal
|
|
596
|
-
*/
|
|
597
|
-
|
|
598
|
-
var ANONYMOUS = '<<anonymous>>';
|
|
599
|
-
|
|
600
|
-
// Important!
|
|
601
|
-
// Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
|
|
602
|
-
var ReactPropTypes = {
|
|
603
|
-
array: createPrimitiveTypeChecker('array'),
|
|
604
|
-
bool: createPrimitiveTypeChecker('boolean'),
|
|
605
|
-
func: createPrimitiveTypeChecker('function'),
|
|
606
|
-
number: createPrimitiveTypeChecker('number'),
|
|
607
|
-
object: createPrimitiveTypeChecker('object'),
|
|
608
|
-
string: createPrimitiveTypeChecker('string'),
|
|
609
|
-
symbol: createPrimitiveTypeChecker('symbol'),
|
|
591
|
+
function _arrayWithHoles(arr) {
|
|
592
|
+
if (Array.isArray(arr)) return arr;
|
|
593
|
+
}
|
|
610
594
|
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
objectOf: createObjectOfTypeChecker,
|
|
618
|
-
oneOf: createEnumTypeChecker,
|
|
619
|
-
oneOfType: createUnionTypeChecker,
|
|
620
|
-
shape: createShapeTypeChecker,
|
|
621
|
-
exact: createStrictShapeTypeChecker,
|
|
622
|
-
};
|
|
595
|
+
function _iterableToArrayLimit(arr, i) {
|
|
596
|
+
if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
|
|
597
|
+
var _arr = [];
|
|
598
|
+
var _n = true;
|
|
599
|
+
var _d = false;
|
|
600
|
+
var _e = undefined;
|
|
623
601
|
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
602
|
+
try {
|
|
603
|
+
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
|
|
604
|
+
_arr.push(_s.value);
|
|
605
|
+
|
|
606
|
+
if (i && _arr.length === i) break;
|
|
607
|
+
}
|
|
608
|
+
} catch (err) {
|
|
609
|
+
_d = true;
|
|
610
|
+
_e = err;
|
|
611
|
+
} finally {
|
|
612
|
+
try {
|
|
613
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
|
614
|
+
} finally {
|
|
615
|
+
if (_d) throw _e;
|
|
638
616
|
}
|
|
639
617
|
}
|
|
640
|
-
/*eslint-enable no-self-compare*/
|
|
641
618
|
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
* PropTypes directly and inspect their output. However, we don't use real
|
|
645
|
-
* Errors anymore. We don't inspect their stack anyway, and creating them
|
|
646
|
-
* is prohibitively expensive if they are created too often, such as what
|
|
647
|
-
* happens in oneOfType() for any type before the one that matched.
|
|
648
|
-
*/
|
|
649
|
-
function PropTypeError(message) {
|
|
650
|
-
this.message = message;
|
|
651
|
-
this.stack = '';
|
|
652
|
-
}
|
|
653
|
-
// Make `instanceof Error` still work for returned errors.
|
|
654
|
-
PropTypeError.prototype = Error.prototype;
|
|
619
|
+
return _arr;
|
|
620
|
+
}
|
|
655
621
|
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
622
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
623
|
+
if (!o) return;
|
|
624
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
625
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
626
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
627
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
628
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
629
|
+
}
|
|
664
630
|
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
// New behavior only for users of `prop-types` package
|
|
668
|
-
var err = new Error(
|
|
669
|
-
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
|
670
|
-
'Use `PropTypes.checkPropTypes()` to call them. ' +
|
|
671
|
-
'Read more at http://fb.me/use-check-prop-types'
|
|
672
|
-
);
|
|
673
|
-
err.name = 'Invariant Violation';
|
|
674
|
-
throw err;
|
|
675
|
-
} else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
|
|
676
|
-
// Old behavior for people using React.PropTypes
|
|
677
|
-
var cacheKey = componentName + ':' + propName;
|
|
678
|
-
if (
|
|
679
|
-
!manualPropTypeCallCache[cacheKey] &&
|
|
680
|
-
// Avoid spamming the console because they are often not actionable except for lib authors
|
|
681
|
-
manualPropTypeWarningCount < 3
|
|
682
|
-
) {
|
|
683
|
-
printWarning$1(
|
|
684
|
-
'You are manually calling a React.PropTypes validation ' +
|
|
685
|
-
'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
|
|
686
|
-
'and will throw in the standalone `prop-types` package. ' +
|
|
687
|
-
'You may be seeing this warning due to a third-party PropTypes ' +
|
|
688
|
-
'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
|
|
689
|
-
);
|
|
690
|
-
manualPropTypeCallCache[cacheKey] = true;
|
|
691
|
-
manualPropTypeWarningCount++;
|
|
692
|
-
}
|
|
693
|
-
}
|
|
694
|
-
}
|
|
695
|
-
if (props[propName] == null) {
|
|
696
|
-
if (isRequired) {
|
|
697
|
-
if (props[propName] === null) {
|
|
698
|
-
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
|
|
699
|
-
}
|
|
700
|
-
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
|
|
701
|
-
}
|
|
702
|
-
return null;
|
|
703
|
-
} else {
|
|
704
|
-
return validate(props, propName, componentName, location, propFullName);
|
|
705
|
-
}
|
|
706
|
-
}
|
|
631
|
+
function _arrayLikeToArray(arr, len) {
|
|
632
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
707
633
|
|
|
708
|
-
|
|
709
|
-
chainedCheckType.isRequired = checkType.bind(null, true);
|
|
634
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
710
635
|
|
|
711
|
-
|
|
712
|
-
|
|
636
|
+
return arr2;
|
|
637
|
+
}
|
|
713
638
|
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
var propType = getPropType(propValue);
|
|
718
|
-
if (propType !== expectedType) {
|
|
719
|
-
// `propValue` being instance of, say, date/regexp, pass the 'object'
|
|
720
|
-
// check, but we can offer a more precise error message here rather than
|
|
721
|
-
// 'of type `object`'.
|
|
722
|
-
var preciseType = getPreciseType(propValue);
|
|
639
|
+
function _nonIterableRest() {
|
|
640
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
641
|
+
}
|
|
723
642
|
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
}
|
|
728
|
-
return createChainableTypeChecker(validate);
|
|
729
|
-
}
|
|
643
|
+
function createCommonjsModule(fn, module) {
|
|
644
|
+
return module = { exports: {} }, fn(module, module.exports), module.exports;
|
|
645
|
+
}
|
|
730
646
|
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
647
|
+
/** @license React v16.13.1
|
|
648
|
+
* react-is.production.min.js
|
|
649
|
+
*
|
|
650
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
651
|
+
*
|
|
652
|
+
* This source code is licensed under the MIT license found in the
|
|
653
|
+
* LICENSE file in the root directory of this source tree.
|
|
654
|
+
*/
|
|
655
|
+
var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?
|
|
656
|
+
Symbol.for("react.suspense_list"):60120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.block"):60121,w=b?Symbol.for("react.fundamental"):60117,x=b?Symbol.for("react.responder"):60118,y=b?Symbol.for("react.scope"):60119;
|
|
657
|
+
function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}var AsyncMode=l;var ConcurrentMode=m;var ContextConsumer=k;var ContextProvider=h;var Element=c;var ForwardRef=n;var Fragment=e;var Lazy=t;var Memo=r;var Portal=d;
|
|
658
|
+
var Profiler=g;var StrictMode=f;var Suspense=p;var isAsyncMode=function(a){return A(a)||z(a)===l};var isConcurrentMode=A;var isContextConsumer=function(a){return z(a)===k};var isContextProvider=function(a){return z(a)===h};var isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===c};var isForwardRef=function(a){return z(a)===n};var isFragment=function(a){return z(a)===e};var isLazy=function(a){return z(a)===t};
|
|
659
|
+
var isMemo=function(a){return z(a)===r};var isPortal=function(a){return z(a)===d};var isProfiler=function(a){return z(a)===g};var isStrictMode=function(a){return z(a)===f};var isSuspense=function(a){return z(a)===p};
|
|
660
|
+
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||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};var typeOf=z;
|
|
734
661
|
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
662
|
+
var reactIs_production_min = {
|
|
663
|
+
AsyncMode: AsyncMode,
|
|
664
|
+
ConcurrentMode: ConcurrentMode,
|
|
665
|
+
ContextConsumer: ContextConsumer,
|
|
666
|
+
ContextProvider: ContextProvider,
|
|
667
|
+
Element: Element,
|
|
668
|
+
ForwardRef: ForwardRef,
|
|
669
|
+
Fragment: Fragment,
|
|
670
|
+
Lazy: Lazy,
|
|
671
|
+
Memo: Memo,
|
|
672
|
+
Portal: Portal,
|
|
673
|
+
Profiler: Profiler,
|
|
674
|
+
StrictMode: StrictMode,
|
|
675
|
+
Suspense: Suspense,
|
|
676
|
+
isAsyncMode: isAsyncMode,
|
|
677
|
+
isConcurrentMode: isConcurrentMode,
|
|
678
|
+
isContextConsumer: isContextConsumer,
|
|
679
|
+
isContextProvider: isContextProvider,
|
|
680
|
+
isElement: isElement,
|
|
681
|
+
isForwardRef: isForwardRef,
|
|
682
|
+
isFragment: isFragment,
|
|
683
|
+
isLazy: isLazy,
|
|
684
|
+
isMemo: isMemo,
|
|
685
|
+
isPortal: isPortal,
|
|
686
|
+
isProfiler: isProfiler,
|
|
687
|
+
isStrictMode: isStrictMode,
|
|
688
|
+
isSuspense: isSuspense,
|
|
689
|
+
isValidElementType: isValidElementType,
|
|
690
|
+
typeOf: typeOf
|
|
691
|
+
};
|
|
692
|
+
|
|
693
|
+
var reactIs_development = createCommonjsModule(function (module, exports) {
|
|
694
|
+
|
|
695
|
+
|
|
696
|
+
|
|
697
|
+
if (process.env.NODE_ENV !== "production") {
|
|
698
|
+
(function() {
|
|
699
|
+
|
|
700
|
+
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
|
|
701
|
+
// nor polyfill, then a plain number is used for performance.
|
|
702
|
+
var hasSymbol = typeof Symbol === 'function' && Symbol.for;
|
|
703
|
+
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
|
|
704
|
+
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
|
|
705
|
+
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
|
|
706
|
+
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
|
|
707
|
+
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
|
|
708
|
+
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
|
|
709
|
+
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
|
|
710
|
+
// (unstable) APIs that have been removed. Can we remove the symbols?
|
|
711
|
+
|
|
712
|
+
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
|
|
713
|
+
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
|
|
714
|
+
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
|
|
715
|
+
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
|
|
716
|
+
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
|
|
717
|
+
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
|
|
718
|
+
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
|
|
719
|
+
var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
|
|
720
|
+
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
|
|
721
|
+
var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
|
|
722
|
+
var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
|
|
723
|
+
|
|
724
|
+
function isValidElementType(type) {
|
|
725
|
+
return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
726
|
+
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);
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
function typeOf(object) {
|
|
730
|
+
if (typeof object === 'object' && object !== null) {
|
|
731
|
+
var $$typeof = object.$$typeof;
|
|
755
732
|
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
if (!isValidElement(propValue)) {
|
|
760
|
-
var propType = getPropType(propValue);
|
|
761
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
|
|
762
|
-
}
|
|
763
|
-
return null;
|
|
764
|
-
}
|
|
765
|
-
return createChainableTypeChecker(validate);
|
|
766
|
-
}
|
|
733
|
+
switch ($$typeof) {
|
|
734
|
+
case REACT_ELEMENT_TYPE:
|
|
735
|
+
var type = object.type;
|
|
767
736
|
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
}
|
|
777
|
-
return createChainableTypeChecker(validate);
|
|
778
|
-
}
|
|
737
|
+
switch (type) {
|
|
738
|
+
case REACT_ASYNC_MODE_TYPE:
|
|
739
|
+
case REACT_CONCURRENT_MODE_TYPE:
|
|
740
|
+
case REACT_FRAGMENT_TYPE:
|
|
741
|
+
case REACT_PROFILER_TYPE:
|
|
742
|
+
case REACT_STRICT_MODE_TYPE:
|
|
743
|
+
case REACT_SUSPENSE_TYPE:
|
|
744
|
+
return type;
|
|
779
745
|
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
if (!(props[propName] instanceof expectedClass)) {
|
|
783
|
-
var expectedClassName = expectedClass.name || ANONYMOUS;
|
|
784
|
-
var actualClassName = getClassName(props[propName]);
|
|
785
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
|
|
786
|
-
}
|
|
787
|
-
return null;
|
|
788
|
-
}
|
|
789
|
-
return createChainableTypeChecker(validate);
|
|
790
|
-
}
|
|
746
|
+
default:
|
|
747
|
+
var $$typeofType = type && type.$$typeof;
|
|
791
748
|
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
);
|
|
800
|
-
} else {
|
|
801
|
-
printWarning$1('Invalid argument supplied to oneOf, expected an array.');
|
|
802
|
-
}
|
|
803
|
-
}
|
|
804
|
-
return emptyFunctionThatReturnsNull;
|
|
805
|
-
}
|
|
749
|
+
switch ($$typeofType) {
|
|
750
|
+
case REACT_CONTEXT_TYPE:
|
|
751
|
+
case REACT_FORWARD_REF_TYPE:
|
|
752
|
+
case REACT_LAZY_TYPE:
|
|
753
|
+
case REACT_MEMO_TYPE:
|
|
754
|
+
case REACT_PROVIDER_TYPE:
|
|
755
|
+
return $$typeofType;
|
|
806
756
|
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
if (is(propValue, expectedValues[i])) {
|
|
811
|
-
return null;
|
|
812
|
-
}
|
|
813
|
-
}
|
|
757
|
+
default:
|
|
758
|
+
return $$typeof;
|
|
759
|
+
}
|
|
814
760
|
|
|
815
|
-
var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
|
|
816
|
-
var type = getPreciseType(value);
|
|
817
|
-
if (type === 'symbol') {
|
|
818
|
-
return String(value);
|
|
819
761
|
}
|
|
820
|
-
return value;
|
|
821
|
-
});
|
|
822
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
|
|
823
|
-
}
|
|
824
|
-
return createChainableTypeChecker(validate);
|
|
825
|
-
}
|
|
826
762
|
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
if (typeof typeChecker !== 'function') {
|
|
830
|
-
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
|
|
831
|
-
}
|
|
832
|
-
var propValue = props[propName];
|
|
833
|
-
var propType = getPropType(propValue);
|
|
834
|
-
if (propType !== 'object') {
|
|
835
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
|
|
836
|
-
}
|
|
837
|
-
for (var key in propValue) {
|
|
838
|
-
if (has$1(propValue, key)) {
|
|
839
|
-
var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1);
|
|
840
|
-
if (error instanceof Error) {
|
|
841
|
-
return error;
|
|
842
|
-
}
|
|
843
|
-
}
|
|
844
|
-
}
|
|
845
|
-
return null;
|
|
763
|
+
case REACT_PORTAL_TYPE:
|
|
764
|
+
return $$typeof;
|
|
846
765
|
}
|
|
847
|
-
return createChainableTypeChecker(validate);
|
|
848
766
|
}
|
|
849
767
|
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
process.env.NODE_ENV !== 'production' ? printWarning$1('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
|
|
853
|
-
return emptyFunctionThatReturnsNull;
|
|
854
|
-
}
|
|
768
|
+
return undefined;
|
|
769
|
+
} // AsyncMode is deprecated along with isAsyncMode
|
|
855
770
|
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
771
|
+
var AsyncMode = REACT_ASYNC_MODE_TYPE;
|
|
772
|
+
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
|
|
773
|
+
var ContextConsumer = REACT_CONTEXT_TYPE;
|
|
774
|
+
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
775
|
+
var Element = REACT_ELEMENT_TYPE;
|
|
776
|
+
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
777
|
+
var Fragment = REACT_FRAGMENT_TYPE;
|
|
778
|
+
var Lazy = REACT_LAZY_TYPE;
|
|
779
|
+
var Memo = REACT_MEMO_TYPE;
|
|
780
|
+
var Portal = REACT_PORTAL_TYPE;
|
|
781
|
+
var Profiler = REACT_PROFILER_TYPE;
|
|
782
|
+
var StrictMode = REACT_STRICT_MODE_TYPE;
|
|
783
|
+
var Suspense = REACT_SUSPENSE_TYPE;
|
|
784
|
+
var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
|
|
866
785
|
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
return null;
|
|
872
|
-
}
|
|
873
|
-
}
|
|
786
|
+
function isAsyncMode(object) {
|
|
787
|
+
{
|
|
788
|
+
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
|
789
|
+
hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
|
|
874
790
|
|
|
875
|
-
|
|
791
|
+
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.');
|
|
876
792
|
}
|
|
877
|
-
return createChainableTypeChecker(validate);
|
|
878
793
|
}
|
|
879
794
|
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
795
|
+
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
|
|
796
|
+
}
|
|
797
|
+
function isConcurrentMode(object) {
|
|
798
|
+
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
|
|
799
|
+
}
|
|
800
|
+
function isContextConsumer(object) {
|
|
801
|
+
return typeOf(object) === REACT_CONTEXT_TYPE;
|
|
802
|
+
}
|
|
803
|
+
function isContextProvider(object) {
|
|
804
|
+
return typeOf(object) === REACT_PROVIDER_TYPE;
|
|
805
|
+
}
|
|
806
|
+
function isElement(object) {
|
|
807
|
+
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
808
|
+
}
|
|
809
|
+
function isForwardRef(object) {
|
|
810
|
+
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
|
811
|
+
}
|
|
812
|
+
function isFragment(object) {
|
|
813
|
+
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
|
814
|
+
}
|
|
815
|
+
function isLazy(object) {
|
|
816
|
+
return typeOf(object) === REACT_LAZY_TYPE;
|
|
817
|
+
}
|
|
818
|
+
function isMemo(object) {
|
|
819
|
+
return typeOf(object) === REACT_MEMO_TYPE;
|
|
820
|
+
}
|
|
821
|
+
function isPortal(object) {
|
|
822
|
+
return typeOf(object) === REACT_PORTAL_TYPE;
|
|
823
|
+
}
|
|
824
|
+
function isProfiler(object) {
|
|
825
|
+
return typeOf(object) === REACT_PROFILER_TYPE;
|
|
826
|
+
}
|
|
827
|
+
function isStrictMode(object) {
|
|
828
|
+
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
|
829
|
+
}
|
|
830
|
+
function isSuspense(object) {
|
|
831
|
+
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
|
832
|
+
}
|
|
889
833
|
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
834
|
+
exports.AsyncMode = AsyncMode;
|
|
835
|
+
exports.ConcurrentMode = ConcurrentMode;
|
|
836
|
+
exports.ContextConsumer = ContextConsumer;
|
|
837
|
+
exports.ContextProvider = ContextProvider;
|
|
838
|
+
exports.Element = Element;
|
|
839
|
+
exports.ForwardRef = ForwardRef;
|
|
840
|
+
exports.Fragment = Fragment;
|
|
841
|
+
exports.Lazy = Lazy;
|
|
842
|
+
exports.Memo = Memo;
|
|
843
|
+
exports.Portal = Portal;
|
|
844
|
+
exports.Profiler = Profiler;
|
|
845
|
+
exports.StrictMode = StrictMode;
|
|
846
|
+
exports.Suspense = Suspense;
|
|
847
|
+
exports.isAsyncMode = isAsyncMode;
|
|
848
|
+
exports.isConcurrentMode = isConcurrentMode;
|
|
849
|
+
exports.isContextConsumer = isContextConsumer;
|
|
850
|
+
exports.isContextProvider = isContextProvider;
|
|
851
|
+
exports.isElement = isElement;
|
|
852
|
+
exports.isForwardRef = isForwardRef;
|
|
853
|
+
exports.isFragment = isFragment;
|
|
854
|
+
exports.isLazy = isLazy;
|
|
855
|
+
exports.isMemo = isMemo;
|
|
856
|
+
exports.isPortal = isPortal;
|
|
857
|
+
exports.isProfiler = isProfiler;
|
|
858
|
+
exports.isStrictMode = isStrictMode;
|
|
859
|
+
exports.isSuspense = isSuspense;
|
|
860
|
+
exports.isValidElementType = isValidElementType;
|
|
861
|
+
exports.typeOf = typeOf;
|
|
862
|
+
})();
|
|
863
|
+
}
|
|
864
|
+
});
|
|
865
|
+
var reactIs_development_1 = reactIs_development.AsyncMode;
|
|
866
|
+
var reactIs_development_2 = reactIs_development.ConcurrentMode;
|
|
867
|
+
var reactIs_development_3 = reactIs_development.ContextConsumer;
|
|
868
|
+
var reactIs_development_4 = reactIs_development.ContextProvider;
|
|
869
|
+
var reactIs_development_5 = reactIs_development.Element;
|
|
870
|
+
var reactIs_development_6 = reactIs_development.ForwardRef;
|
|
871
|
+
var reactIs_development_7 = reactIs_development.Fragment;
|
|
872
|
+
var reactIs_development_8 = reactIs_development.Lazy;
|
|
873
|
+
var reactIs_development_9 = reactIs_development.Memo;
|
|
874
|
+
var reactIs_development_10 = reactIs_development.Portal;
|
|
875
|
+
var reactIs_development_11 = reactIs_development.Profiler;
|
|
876
|
+
var reactIs_development_12 = reactIs_development.StrictMode;
|
|
877
|
+
var reactIs_development_13 = reactIs_development.Suspense;
|
|
878
|
+
var reactIs_development_14 = reactIs_development.isAsyncMode;
|
|
879
|
+
var reactIs_development_15 = reactIs_development.isConcurrentMode;
|
|
880
|
+
var reactIs_development_16 = reactIs_development.isContextConsumer;
|
|
881
|
+
var reactIs_development_17 = reactIs_development.isContextProvider;
|
|
882
|
+
var reactIs_development_18 = reactIs_development.isElement;
|
|
883
|
+
var reactIs_development_19 = reactIs_development.isForwardRef;
|
|
884
|
+
var reactIs_development_20 = reactIs_development.isFragment;
|
|
885
|
+
var reactIs_development_21 = reactIs_development.isLazy;
|
|
886
|
+
var reactIs_development_22 = reactIs_development.isMemo;
|
|
887
|
+
var reactIs_development_23 = reactIs_development.isPortal;
|
|
888
|
+
var reactIs_development_24 = reactIs_development.isProfiler;
|
|
889
|
+
var reactIs_development_25 = reactIs_development.isStrictMode;
|
|
890
|
+
var reactIs_development_26 = reactIs_development.isSuspense;
|
|
891
|
+
var reactIs_development_27 = reactIs_development.isValidElementType;
|
|
892
|
+
var reactIs_development_28 = reactIs_development.typeOf;
|
|
911
893
|
|
|
912
|
-
|
|
913
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
914
|
-
var propValue = props[propName];
|
|
915
|
-
var propType = getPropType(propValue);
|
|
916
|
-
if (propType !== 'object') {
|
|
917
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
|
918
|
-
}
|
|
919
|
-
// We need to check all keys in case some are required but missing from
|
|
920
|
-
// props.
|
|
921
|
-
var allKeys = objectAssign({}, props[propName], shapeTypes);
|
|
922
|
-
for (var key in allKeys) {
|
|
923
|
-
var checker = shapeTypes[key];
|
|
924
|
-
if (!checker) {
|
|
925
|
-
return new PropTypeError(
|
|
926
|
-
'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
|
|
927
|
-
'\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
|
|
928
|
-
'\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
|
|
929
|
-
);
|
|
930
|
-
}
|
|
931
|
-
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1);
|
|
932
|
-
if (error) {
|
|
933
|
-
return error;
|
|
934
|
-
}
|
|
935
|
-
}
|
|
936
|
-
return null;
|
|
937
|
-
}
|
|
894
|
+
var reactIs = createCommonjsModule(function (module) {
|
|
938
895
|
|
|
939
|
-
|
|
940
|
-
|
|
896
|
+
if (process.env.NODE_ENV === 'production') {
|
|
897
|
+
module.exports = reactIs_production_min;
|
|
898
|
+
} else {
|
|
899
|
+
module.exports = reactIs_development;
|
|
900
|
+
}
|
|
901
|
+
});
|
|
941
902
|
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
if (Array.isArray(propValue)) {
|
|
952
|
-
return propValue.every(isNode);
|
|
953
|
-
}
|
|
954
|
-
if (propValue === null || isValidElement(propValue)) {
|
|
955
|
-
return true;
|
|
956
|
-
}
|
|
903
|
+
/*
|
|
904
|
+
object-assign
|
|
905
|
+
(c) Sindre Sorhus
|
|
906
|
+
@license MIT
|
|
907
|
+
*/
|
|
908
|
+
/* eslint-disable no-unused-vars */
|
|
909
|
+
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
910
|
+
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
911
|
+
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
957
912
|
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
if (iteratorFn !== propValue.entries) {
|
|
963
|
-
while (!(step = iterator.next()).done) {
|
|
964
|
-
if (!isNode(step.value)) {
|
|
965
|
-
return false;
|
|
966
|
-
}
|
|
967
|
-
}
|
|
968
|
-
} else {
|
|
969
|
-
// Iterator will provide entry [k,v] tuples rather than values.
|
|
970
|
-
while (!(step = iterator.next()).done) {
|
|
971
|
-
var entry = step.value;
|
|
972
|
-
if (entry) {
|
|
973
|
-
if (!isNode(entry[1])) {
|
|
974
|
-
return false;
|
|
975
|
-
}
|
|
976
|
-
}
|
|
977
|
-
}
|
|
978
|
-
}
|
|
979
|
-
} else {
|
|
980
|
-
return false;
|
|
981
|
-
}
|
|
913
|
+
function toObject(val) {
|
|
914
|
+
if (val === null || val === undefined) {
|
|
915
|
+
throw new TypeError('Object.assign cannot be called with null or undefined');
|
|
916
|
+
}
|
|
982
917
|
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
return false;
|
|
986
|
-
}
|
|
987
|
-
}
|
|
918
|
+
return Object(val);
|
|
919
|
+
}
|
|
988
920
|
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
921
|
+
function shouldUseNative() {
|
|
922
|
+
try {
|
|
923
|
+
if (!Object.assign) {
|
|
924
|
+
return false;
|
|
925
|
+
}
|
|
994
926
|
|
|
995
|
-
|
|
996
|
-
if (!propValue) {
|
|
997
|
-
return false;
|
|
998
|
-
}
|
|
927
|
+
// Detect buggy property enumeration order in older V8 versions.
|
|
999
928
|
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
929
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=4118
|
|
930
|
+
var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
|
|
931
|
+
test1[5] = 'de';
|
|
932
|
+
if (Object.getOwnPropertyNames(test1)[0] === '5') {
|
|
933
|
+
return false;
|
|
934
|
+
}
|
|
1004
935
|
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
936
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
937
|
+
var test2 = {};
|
|
938
|
+
for (var i = 0; i < 10; i++) {
|
|
939
|
+
test2['_' + String.fromCharCode(i)] = i;
|
|
940
|
+
}
|
|
941
|
+
var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
|
|
942
|
+
return test2[n];
|
|
943
|
+
});
|
|
944
|
+
if (order2.join('') !== '0123456789') {
|
|
945
|
+
return false;
|
|
946
|
+
}
|
|
1009
947
|
|
|
1010
|
-
|
|
1011
|
-
|
|
948
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
949
|
+
var test3 = {};
|
|
950
|
+
'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
|
|
951
|
+
test3[letter] = letter;
|
|
952
|
+
});
|
|
953
|
+
if (Object.keys(Object.assign({}, test3)).join('') !==
|
|
954
|
+
'abcdefghijklmnopqrst') {
|
|
955
|
+
return false;
|
|
956
|
+
}
|
|
1012
957
|
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
if (propValue instanceof RegExp) {
|
|
1020
|
-
// Old webkits (at least until Android 4.0) return 'function' rather than
|
|
1021
|
-
// 'object' for typeof a RegExp. We'll normalize this here so that /bla/
|
|
1022
|
-
// passes PropTypes.object.
|
|
1023
|
-
return 'object';
|
|
1024
|
-
}
|
|
1025
|
-
if (isSymbol(propType, propValue)) {
|
|
1026
|
-
return 'symbol';
|
|
1027
|
-
}
|
|
1028
|
-
return propType;
|
|
1029
|
-
}
|
|
958
|
+
return true;
|
|
959
|
+
} catch (err) {
|
|
960
|
+
// We don't expect any of the above to throw, but better to be safe.
|
|
961
|
+
return false;
|
|
962
|
+
}
|
|
963
|
+
}
|
|
1030
964
|
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
return '' + propValue;
|
|
1036
|
-
}
|
|
1037
|
-
var propType = getPropType(propValue);
|
|
1038
|
-
if (propType === 'object') {
|
|
1039
|
-
if (propValue instanceof Date) {
|
|
1040
|
-
return 'date';
|
|
1041
|
-
} else if (propValue instanceof RegExp) {
|
|
1042
|
-
return 'regexp';
|
|
1043
|
-
}
|
|
1044
|
-
}
|
|
1045
|
-
return propType;
|
|
1046
|
-
}
|
|
965
|
+
var objectAssign = shouldUseNative() ? Object.assign : function (target, source) {
|
|
966
|
+
var from;
|
|
967
|
+
var to = toObject(target);
|
|
968
|
+
var symbols;
|
|
1047
969
|
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
function getPostfixForTypeWarning(value) {
|
|
1051
|
-
var type = getPreciseType(value);
|
|
1052
|
-
switch (type) {
|
|
1053
|
-
case 'array':
|
|
1054
|
-
case 'object':
|
|
1055
|
-
return 'an ' + type;
|
|
1056
|
-
case 'boolean':
|
|
1057
|
-
case 'date':
|
|
1058
|
-
case 'regexp':
|
|
1059
|
-
return 'a ' + type;
|
|
1060
|
-
default:
|
|
1061
|
-
return type;
|
|
1062
|
-
}
|
|
1063
|
-
}
|
|
970
|
+
for (var s = 1; s < arguments.length; s++) {
|
|
971
|
+
from = Object(arguments[s]);
|
|
1064
972
|
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
return propValue.constructor.name;
|
|
1071
|
-
}
|
|
973
|
+
for (var key in from) {
|
|
974
|
+
if (hasOwnProperty.call(from, key)) {
|
|
975
|
+
to[key] = from[key];
|
|
976
|
+
}
|
|
977
|
+
}
|
|
1072
978
|
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
979
|
+
if (getOwnPropertySymbols) {
|
|
980
|
+
symbols = getOwnPropertySymbols(from);
|
|
981
|
+
for (var i = 0; i < symbols.length; i++) {
|
|
982
|
+
if (propIsEnumerable.call(from, symbols[i])) {
|
|
983
|
+
to[symbols[i]] = from[symbols[i]];
|
|
984
|
+
}
|
|
985
|
+
}
|
|
986
|
+
}
|
|
987
|
+
}
|
|
1076
988
|
|
|
1077
|
-
|
|
989
|
+
return to;
|
|
1078
990
|
};
|
|
1079
991
|
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
992
|
+
/**
|
|
993
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
994
|
+
*
|
|
995
|
+
* This source code is licensed under the MIT license found in the
|
|
996
|
+
* LICENSE file in the root directory of this source tree.
|
|
997
|
+
*/
|
|
1083
998
|
|
|
1084
|
-
var
|
|
1085
|
-
function shim(props, propName, componentName, location, propFullName, secret) {
|
|
1086
|
-
if (secret === ReactPropTypesSecret_1) {
|
|
1087
|
-
// It is still safe when called from React.
|
|
1088
|
-
return;
|
|
1089
|
-
}
|
|
1090
|
-
var err = new Error(
|
|
1091
|
-
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
|
1092
|
-
'Use PropTypes.checkPropTypes() to call them. ' +
|
|
1093
|
-
'Read more at http://fb.me/use-check-prop-types'
|
|
1094
|
-
);
|
|
1095
|
-
err.name = 'Invariant Violation';
|
|
1096
|
-
throw err;
|
|
1097
|
-
} shim.isRequired = shim;
|
|
1098
|
-
function getShim() {
|
|
1099
|
-
return shim;
|
|
1100
|
-
} // Important!
|
|
1101
|
-
// Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
|
|
1102
|
-
var ReactPropTypes = {
|
|
1103
|
-
array: shim,
|
|
1104
|
-
bool: shim,
|
|
1105
|
-
func: shim,
|
|
1106
|
-
number: shim,
|
|
1107
|
-
object: shim,
|
|
1108
|
-
string: shim,
|
|
1109
|
-
symbol: shim,
|
|
999
|
+
var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
|
1110
1000
|
|
|
1111
|
-
|
|
1112
|
-
arrayOf: getShim,
|
|
1113
|
-
element: shim,
|
|
1114
|
-
elementType: shim,
|
|
1115
|
-
instanceOf: getShim,
|
|
1116
|
-
node: shim,
|
|
1117
|
-
objectOf: getShim,
|
|
1118
|
-
oneOf: getShim,
|
|
1119
|
-
oneOfType: getShim,
|
|
1120
|
-
shape: getShim,
|
|
1121
|
-
exact: getShim,
|
|
1001
|
+
var ReactPropTypesSecret_1 = ReactPropTypesSecret;
|
|
1122
1002
|
|
|
1123
|
-
|
|
1124
|
-
|
|
1003
|
+
var printWarning = function() {};
|
|
1004
|
+
|
|
1005
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1006
|
+
var ReactPropTypesSecret$1 = ReactPropTypesSecret_1;
|
|
1007
|
+
var loggedTypeFailures = {};
|
|
1008
|
+
var has = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
1009
|
+
|
|
1010
|
+
printWarning = function(text) {
|
|
1011
|
+
var message = 'Warning: ' + text;
|
|
1012
|
+
if (typeof console !== 'undefined') {
|
|
1013
|
+
console.error(message);
|
|
1014
|
+
}
|
|
1015
|
+
try {
|
|
1016
|
+
// --- Welcome to debugging React ---
|
|
1017
|
+
// This error was thrown as a convenience so that you can use this stack
|
|
1018
|
+
// to find the callsite that caused this warning to fire.
|
|
1019
|
+
throw new Error(message);
|
|
1020
|
+
} catch (x) {}
|
|
1125
1021
|
};
|
|
1022
|
+
}
|
|
1126
1023
|
|
|
1127
|
-
|
|
1024
|
+
/**
|
|
1025
|
+
* Assert that the values match with the type specs.
|
|
1026
|
+
* Error messages are memorized and will only be shown once.
|
|
1027
|
+
*
|
|
1028
|
+
* @param {object} typeSpecs Map of name to a ReactPropType
|
|
1029
|
+
* @param {object} values Runtime values that need to be type-checked
|
|
1030
|
+
* @param {string} location e.g. "prop", "context", "child context"
|
|
1031
|
+
* @param {string} componentName Name of the component for error messages.
|
|
1032
|
+
* @param {?Function} getStack Returns the component stack.
|
|
1033
|
+
* @private
|
|
1034
|
+
*/
|
|
1035
|
+
function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
|
|
1036
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1037
|
+
for (var typeSpecName in typeSpecs) {
|
|
1038
|
+
if (has(typeSpecs, typeSpecName)) {
|
|
1039
|
+
var error;
|
|
1040
|
+
// Prop type validation may throw. In case they do, we don't want to
|
|
1041
|
+
// fail the render phase where it didn't fail before. So we log it.
|
|
1042
|
+
// After these have been cleaned up, we'll let them throw.
|
|
1043
|
+
try {
|
|
1044
|
+
// This is intentionally an invariant that gets caught. It's the same
|
|
1045
|
+
// behavior as without this statement except with a better message.
|
|
1046
|
+
if (typeof typeSpecs[typeSpecName] !== 'function') {
|
|
1047
|
+
var err = Error(
|
|
1048
|
+
(componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
|
|
1049
|
+
'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.'
|
|
1050
|
+
);
|
|
1051
|
+
err.name = 'Invariant Violation';
|
|
1052
|
+
throw err;
|
|
1053
|
+
}
|
|
1054
|
+
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret$1);
|
|
1055
|
+
} catch (ex) {
|
|
1056
|
+
error = ex;
|
|
1057
|
+
}
|
|
1058
|
+
if (error && !(error instanceof Error)) {
|
|
1059
|
+
printWarning(
|
|
1060
|
+
(componentName || 'React class') + ': type specification of ' +
|
|
1061
|
+
location + ' `' + typeSpecName + '` is invalid; the type checker ' +
|
|
1062
|
+
'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
|
|
1063
|
+
'You may have forgotten to pass an argument to the type checker ' +
|
|
1064
|
+
'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
|
|
1065
|
+
'shape all require an argument).'
|
|
1066
|
+
);
|
|
1067
|
+
}
|
|
1068
|
+
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
|
1069
|
+
// Only monitor this failure once because there tends to be a lot of the
|
|
1070
|
+
// same error.
|
|
1071
|
+
loggedTypeFailures[error.message] = true;
|
|
1128
1072
|
|
|
1129
|
-
|
|
1130
|
-
|
|
1073
|
+
var stack = getStack ? getStack() : '';
|
|
1074
|
+
|
|
1075
|
+
printWarning(
|
|
1076
|
+
'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
|
|
1077
|
+
);
|
|
1078
|
+
}
|
|
1079
|
+
}
|
|
1080
|
+
}
|
|
1081
|
+
}
|
|
1082
|
+
}
|
|
1131
1083
|
|
|
1132
|
-
var propTypes = createCommonjsModule(function (module) {
|
|
1133
1084
|
/**
|
|
1134
|
-
*
|
|
1085
|
+
* Resets warning cache when testing.
|
|
1135
1086
|
*
|
|
1136
|
-
*
|
|
1137
|
-
* LICENSE file in the root directory of this source tree.
|
|
1087
|
+
* @private
|
|
1138
1088
|
*/
|
|
1089
|
+
checkPropTypes.resetWarningCache = function() {
|
|
1090
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1091
|
+
loggedTypeFailures = {};
|
|
1092
|
+
}
|
|
1093
|
+
};
|
|
1094
|
+
|
|
1095
|
+
var checkPropTypes_1 = checkPropTypes;
|
|
1096
|
+
|
|
1097
|
+
var has$1 = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
1098
|
+
var printWarning$1 = function() {};
|
|
1139
1099
|
|
|
1140
1100
|
if (process.env.NODE_ENV !== 'production') {
|
|
1141
|
-
|
|
1101
|
+
printWarning$1 = function(text) {
|
|
1102
|
+
var message = 'Warning: ' + text;
|
|
1103
|
+
if (typeof console !== 'undefined') {
|
|
1104
|
+
console.error(message);
|
|
1105
|
+
}
|
|
1106
|
+
try {
|
|
1107
|
+
// --- Welcome to debugging React ---
|
|
1108
|
+
// This error was thrown as a convenience so that you can use this stack
|
|
1109
|
+
// to find the callsite that caused this warning to fire.
|
|
1110
|
+
throw new Error(message);
|
|
1111
|
+
} catch (x) {}
|
|
1112
|
+
};
|
|
1113
|
+
}
|
|
1142
1114
|
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
var throwOnDirectAccess = true;
|
|
1146
|
-
module.exports = factoryWithTypeCheckers(ReactIs.isElement, throwOnDirectAccess);
|
|
1147
|
-
} else {
|
|
1148
|
-
// By explicitly using `prop-types` you are opting into new production behavior.
|
|
1149
|
-
// http://fb.me/prop-types-in-prod
|
|
1150
|
-
module.exports = factoryWithThrowingShims();
|
|
1115
|
+
function emptyFunctionThatReturnsNull() {
|
|
1116
|
+
return null;
|
|
1151
1117
|
}
|
|
1152
|
-
});
|
|
1153
1118
|
|
|
1154
|
-
var
|
|
1155
|
-
|
|
1119
|
+
var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
|
|
1120
|
+
/* global Symbol */
|
|
1121
|
+
var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
|
1122
|
+
var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
|
|
1156
1123
|
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1124
|
+
/**
|
|
1125
|
+
* Returns the iterator method function contained on the iterable object.
|
|
1126
|
+
*
|
|
1127
|
+
* Be sure to invoke the function with the iterable as context:
|
|
1128
|
+
*
|
|
1129
|
+
* var iteratorFn = getIteratorFn(myIterable);
|
|
1130
|
+
* if (iteratorFn) {
|
|
1131
|
+
* var iterator = iteratorFn.call(myIterable);
|
|
1132
|
+
* ...
|
|
1133
|
+
* }
|
|
1134
|
+
*
|
|
1135
|
+
* @param {?object} maybeIterable
|
|
1136
|
+
* @return {?function}
|
|
1137
|
+
*/
|
|
1138
|
+
function getIteratorFn(maybeIterable) {
|
|
1139
|
+
var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
|
|
1140
|
+
if (typeof iteratorFn === 'function') {
|
|
1141
|
+
return iteratorFn;
|
|
1142
|
+
}
|
|
1143
|
+
}
|
|
1144
|
+
|
|
1145
|
+
/**
|
|
1146
|
+
* Collection of methods that allow declaration and validation of props that are
|
|
1147
|
+
* supplied to React components. Example usage:
|
|
1148
|
+
*
|
|
1149
|
+
* var Props = require('ReactPropTypes');
|
|
1150
|
+
* var MyArticle = React.createClass({
|
|
1151
|
+
* propTypes: {
|
|
1152
|
+
* // An optional string prop named "description".
|
|
1153
|
+
* description: Props.string,
|
|
1154
|
+
*
|
|
1155
|
+
* // A required enum prop named "category".
|
|
1156
|
+
* category: Props.oneOf(['News','Photos']).isRequired,
|
|
1157
|
+
*
|
|
1158
|
+
* // A prop named "dialog" that requires an instance of Dialog.
|
|
1159
|
+
* dialog: Props.instanceOf(Dialog).isRequired
|
|
1160
|
+
* },
|
|
1161
|
+
* render: function() { ... }
|
|
1162
|
+
* });
|
|
1163
|
+
*
|
|
1164
|
+
* A more formal specification of how these methods are used:
|
|
1165
|
+
*
|
|
1166
|
+
* type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
|
|
1167
|
+
* decl := ReactPropTypes.{type}(.isRequired)?
|
|
1168
|
+
*
|
|
1169
|
+
* Each and every declaration produces a function with the same signature. This
|
|
1170
|
+
* allows the creation of custom validation functions. For example:
|
|
1171
|
+
*
|
|
1172
|
+
* var MyLink = React.createClass({
|
|
1173
|
+
* propTypes: {
|
|
1174
|
+
* // An optional string or URI prop named "href".
|
|
1175
|
+
* href: function(props, propName, componentName) {
|
|
1176
|
+
* var propValue = props[propName];
|
|
1177
|
+
* if (propValue != null && typeof propValue !== 'string' &&
|
|
1178
|
+
* !(propValue instanceof URI)) {
|
|
1179
|
+
* return new Error(
|
|
1180
|
+
* 'Expected a string or an URI for ' + propName + ' in ' +
|
|
1181
|
+
* componentName
|
|
1182
|
+
* );
|
|
1183
|
+
* }
|
|
1184
|
+
* }
|
|
1185
|
+
* },
|
|
1186
|
+
* render: function() {...}
|
|
1187
|
+
* });
|
|
1188
|
+
*
|
|
1189
|
+
* @internal
|
|
1190
|
+
*/
|
|
1191
|
+
|
|
1192
|
+
var ANONYMOUS = '<<anonymous>>';
|
|
1193
|
+
|
|
1194
|
+
// Important!
|
|
1195
|
+
// Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
|
|
1196
|
+
var ReactPropTypes = {
|
|
1197
|
+
array: createPrimitiveTypeChecker('array'),
|
|
1198
|
+
bool: createPrimitiveTypeChecker('boolean'),
|
|
1199
|
+
func: createPrimitiveTypeChecker('function'),
|
|
1200
|
+
number: createPrimitiveTypeChecker('number'),
|
|
1201
|
+
object: createPrimitiveTypeChecker('object'),
|
|
1202
|
+
string: createPrimitiveTypeChecker('string'),
|
|
1203
|
+
symbol: createPrimitiveTypeChecker('symbol'),
|
|
1168
1204
|
|
|
1169
|
-
|
|
1170
|
-
|
|
1205
|
+
any: createAnyTypeChecker(),
|
|
1206
|
+
arrayOf: createArrayOfTypeChecker,
|
|
1207
|
+
element: createElementTypeChecker(),
|
|
1208
|
+
elementType: createElementTypeTypeChecker(),
|
|
1209
|
+
instanceOf: createInstanceTypeChecker,
|
|
1210
|
+
node: createNodeChecker(),
|
|
1211
|
+
objectOf: createObjectOfTypeChecker,
|
|
1212
|
+
oneOf: createEnumTypeChecker,
|
|
1213
|
+
oneOfType: createUnionTypeChecker,
|
|
1214
|
+
shape: createShapeTypeChecker,
|
|
1215
|
+
exact: createStrictShapeTypeChecker,
|
|
1171
1216
|
};
|
|
1217
|
+
|
|
1172
1218
|
/**
|
|
1173
|
-
*
|
|
1174
|
-
*
|
|
1175
|
-
* @param total Maximum value.
|
|
1176
|
-
* @param pathRadius Radius of the SVG path.
|
|
1177
|
-
* @param elementRadius Radius of the SVG container.
|
|
1178
|
-
* @param isSemicircle Whether the element should be a semicircle.
|
|
1219
|
+
* inlined Object.is polyfill to avoid requiring consumers ship their own
|
|
1220
|
+
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
|
|
1179
1221
|
*/
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
var arcSweep = percentage <= 180 ? 0 : 1;
|
|
1193
|
-
return "M ".concat(start, " A ").concat(pathRadius, " ").concat(pathRadius, " 0 ").concat(arcSweep, " 0 ").concat(end);
|
|
1222
|
+
/*eslint-disable no-self-compare*/
|
|
1223
|
+
function is(x, y) {
|
|
1224
|
+
// SameValue algorithm
|
|
1225
|
+
if (x === y) {
|
|
1226
|
+
// Steps 1-5, 7-10
|
|
1227
|
+
// Steps 6.b-6.e: +0 != -0
|
|
1228
|
+
return x !== 0 || 1 / x === 1 / y;
|
|
1229
|
+
} else {
|
|
1230
|
+
// Step 6.a: NaN == NaN
|
|
1231
|
+
return x !== x && y !== y;
|
|
1232
|
+
}
|
|
1194
1233
|
}
|
|
1234
|
+
/*eslint-enable no-self-compare*/
|
|
1195
1235
|
|
|
1196
|
-
var DEGREE_IN_RADIANS = Math.PI / 180;
|
|
1197
1236
|
/**
|
|
1198
|
-
*
|
|
1199
|
-
*
|
|
1200
|
-
*
|
|
1201
|
-
*
|
|
1237
|
+
* We use an Error-like object for backward compatibility as people may call
|
|
1238
|
+
* PropTypes directly and inspect their output. However, we don't use real
|
|
1239
|
+
* Errors anymore. We don't inspect their stack anyway, and creating them
|
|
1240
|
+
* is prohibitively expensive if they are created too often, such as what
|
|
1241
|
+
* happens in oneOfType() for any type before the one that matched.
|
|
1202
1242
|
*/
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
var x = elementRadius + pathRadius * Math.cos(angleInRadians);
|
|
1207
|
-
var y = elementRadius + pathRadius * Math.sin(angleInRadians);
|
|
1208
|
-
return x + ' ' + y;
|
|
1243
|
+
function PropTypeError(message) {
|
|
1244
|
+
this.message = message;
|
|
1245
|
+
this.stack = '';
|
|
1209
1246
|
}
|
|
1247
|
+
// Make `instanceof Error` still work for returned errors.
|
|
1248
|
+
PropTypeError.prototype = Error.prototype;
|
|
1210
1249
|
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
cx: "".concat(radius),
|
|
1220
|
-
cy: "".concat(radius),
|
|
1221
|
-
stroke: "".concat(baseColour),
|
|
1222
|
-
strokeWidth: "7",
|
|
1223
|
-
r: "".concat(radius - 7 / 2)
|
|
1224
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
1225
|
-
d: getArc(75, 100, radius - 7 / 2, radius, false),
|
|
1226
|
-
strokeWidth: "7",
|
|
1227
|
-
stroke: "".concat(spinnerColour),
|
|
1228
|
-
strokeLinecap: "round"
|
|
1229
|
-
}));
|
|
1230
|
-
};
|
|
1231
|
-
GoAElementLoader.propTypes = {
|
|
1232
|
-
visible: propTypes.bool,
|
|
1233
|
-
baseColour: propTypes.string,
|
|
1234
|
-
spinnerColour: propTypes.string,
|
|
1235
|
-
size: propTypes.number
|
|
1236
|
-
};
|
|
1237
|
-
|
|
1238
|
-
function _defineProperty(obj, key, value) {
|
|
1239
|
-
if (key in obj) {
|
|
1240
|
-
Object.defineProperty(obj, key, {
|
|
1241
|
-
value: value,
|
|
1242
|
-
enumerable: true,
|
|
1243
|
-
configurable: true,
|
|
1244
|
-
writable: true
|
|
1245
|
-
});
|
|
1246
|
-
} else {
|
|
1247
|
-
obj[key] = value;
|
|
1248
|
-
}
|
|
1250
|
+
function createChainableTypeChecker(validate) {
|
|
1251
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1252
|
+
var manualPropTypeCallCache = {};
|
|
1253
|
+
var manualPropTypeWarningCount = 0;
|
|
1254
|
+
}
|
|
1255
|
+
function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
|
|
1256
|
+
componentName = componentName || ANONYMOUS;
|
|
1257
|
+
propFullName = propFullName || propName;
|
|
1249
1258
|
|
|
1250
|
-
|
|
1251
|
-
|
|
1259
|
+
if (secret !== ReactPropTypesSecret_1) {
|
|
1260
|
+
if (throwOnDirectAccess) {
|
|
1261
|
+
// New behavior only for users of `prop-types` package
|
|
1262
|
+
var err = new Error(
|
|
1263
|
+
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
|
1264
|
+
'Use `PropTypes.checkPropTypes()` to call them. ' +
|
|
1265
|
+
'Read more at http://fb.me/use-check-prop-types'
|
|
1266
|
+
);
|
|
1267
|
+
err.name = 'Invariant Violation';
|
|
1268
|
+
throw err;
|
|
1269
|
+
} else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
|
|
1270
|
+
// Old behavior for people using React.PropTypes
|
|
1271
|
+
var cacheKey = componentName + ':' + propName;
|
|
1272
|
+
if (
|
|
1273
|
+
!manualPropTypeCallCache[cacheKey] &&
|
|
1274
|
+
// Avoid spamming the console because they are often not actionable except for lib authors
|
|
1275
|
+
manualPropTypeWarningCount < 3
|
|
1276
|
+
) {
|
|
1277
|
+
printWarning$1(
|
|
1278
|
+
'You are manually calling a React.PropTypes validation ' +
|
|
1279
|
+
'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
|
|
1280
|
+
'and will throw in the standalone `prop-types` package. ' +
|
|
1281
|
+
'You may be seeing this warning due to a third-party PropTypes ' +
|
|
1282
|
+
'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
|
|
1283
|
+
);
|
|
1284
|
+
manualPropTypeCallCache[cacheKey] = true;
|
|
1285
|
+
manualPropTypeWarningCount++;
|
|
1286
|
+
}
|
|
1287
|
+
}
|
|
1288
|
+
}
|
|
1289
|
+
if (props[propName] == null) {
|
|
1290
|
+
if (isRequired) {
|
|
1291
|
+
if (props[propName] === null) {
|
|
1292
|
+
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
|
|
1293
|
+
}
|
|
1294
|
+
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
|
|
1295
|
+
}
|
|
1296
|
+
return null;
|
|
1297
|
+
} else {
|
|
1298
|
+
return validate(props, propName, componentName, location, propFullName);
|
|
1299
|
+
}
|
|
1300
|
+
}
|
|
1252
1301
|
|
|
1253
|
-
|
|
1254
|
-
|
|
1302
|
+
var chainedCheckType = checkType.bind(null, false);
|
|
1303
|
+
chainedCheckType.isRequired = checkType.bind(null, true);
|
|
1255
1304
|
|
|
1256
|
-
|
|
1257
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
|
1258
|
-
if (enumerableOnly) symbols = symbols.filter(function (sym) {
|
|
1259
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
1260
|
-
});
|
|
1261
|
-
keys.push.apply(keys, symbols);
|
|
1305
|
+
return chainedCheckType;
|
|
1262
1306
|
}
|
|
1263
1307
|
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1308
|
+
function createPrimitiveTypeChecker(expectedType) {
|
|
1309
|
+
function validate(props, propName, componentName, location, propFullName, secret) {
|
|
1310
|
+
var propValue = props[propName];
|
|
1311
|
+
var propType = getPropType(propValue);
|
|
1312
|
+
if (propType !== expectedType) {
|
|
1313
|
+
// `propValue` being instance of, say, date/regexp, pass the 'object'
|
|
1314
|
+
// check, but we can offer a more precise error message here rather than
|
|
1315
|
+
// 'of type `object`'.
|
|
1316
|
+
var preciseType = getPreciseType(propValue);
|
|
1270
1317
|
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
});
|
|
1275
|
-
} else if (Object.getOwnPropertyDescriptors) {
|
|
1276
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
1277
|
-
} else {
|
|
1278
|
-
ownKeys(Object(source)).forEach(function (key) {
|
|
1279
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
1280
|
-
});
|
|
1318
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
|
|
1319
|
+
}
|
|
1320
|
+
return null;
|
|
1281
1321
|
}
|
|
1322
|
+
return createChainableTypeChecker(validate);
|
|
1282
1323
|
}
|
|
1283
1324
|
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
1288
|
-
if (source == null) return {};
|
|
1289
|
-
var target = {};
|
|
1290
|
-
var sourceKeys = Object.keys(source);
|
|
1291
|
-
var key, i;
|
|
1292
|
-
|
|
1293
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
1294
|
-
key = sourceKeys[i];
|
|
1295
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
1296
|
-
target[key] = source[key];
|
|
1325
|
+
function createAnyTypeChecker() {
|
|
1326
|
+
return createChainableTypeChecker(emptyFunctionThatReturnsNull);
|
|
1297
1327
|
}
|
|
1298
1328
|
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
target[key] = source[key];
|
|
1329
|
+
function createArrayOfTypeChecker(typeChecker) {
|
|
1330
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
1331
|
+
if (typeof typeChecker !== 'function') {
|
|
1332
|
+
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
|
|
1333
|
+
}
|
|
1334
|
+
var propValue = props[propName];
|
|
1335
|
+
if (!Array.isArray(propValue)) {
|
|
1336
|
+
var propType = getPropType(propValue);
|
|
1337
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
|
|
1338
|
+
}
|
|
1339
|
+
for (var i = 0; i < propValue.length; i++) {
|
|
1340
|
+
var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret_1);
|
|
1341
|
+
if (error instanceof Error) {
|
|
1342
|
+
return error;
|
|
1343
|
+
}
|
|
1344
|
+
}
|
|
1345
|
+
return null;
|
|
1317
1346
|
}
|
|
1347
|
+
return createChainableTypeChecker(validate);
|
|
1318
1348
|
}
|
|
1319
1349
|
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
1329
|
-
}
|
|
1330
|
-
|
|
1331
|
-
function _arrayWithoutHoles(arr) {
|
|
1332
|
-
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
1333
|
-
}
|
|
1334
|
-
|
|
1335
|
-
function _arrayWithHoles(arr) {
|
|
1336
|
-
if (Array.isArray(arr)) return arr;
|
|
1337
|
-
}
|
|
1338
|
-
|
|
1339
|
-
function _iterableToArray(iter) {
|
|
1340
|
-
if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
|
|
1341
|
-
}
|
|
1342
|
-
|
|
1343
|
-
function _iterableToArrayLimit(arr, i) {
|
|
1344
|
-
if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
|
|
1345
|
-
var _arr = [];
|
|
1346
|
-
var _n = true;
|
|
1347
|
-
var _d = false;
|
|
1348
|
-
var _e = undefined;
|
|
1349
|
-
|
|
1350
|
-
try {
|
|
1351
|
-
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
|
|
1352
|
-
_arr.push(_s.value);
|
|
1353
|
-
|
|
1354
|
-
if (i && _arr.length === i) break;
|
|
1355
|
-
}
|
|
1356
|
-
} catch (err) {
|
|
1357
|
-
_d = true;
|
|
1358
|
-
_e = err;
|
|
1359
|
-
} finally {
|
|
1360
|
-
try {
|
|
1361
|
-
if (!_n && _i["return"] != null) _i["return"]();
|
|
1362
|
-
} finally {
|
|
1363
|
-
if (_d) throw _e;
|
|
1350
|
+
function createElementTypeChecker() {
|
|
1351
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
1352
|
+
var propValue = props[propName];
|
|
1353
|
+
if (!isValidElement(propValue)) {
|
|
1354
|
+
var propType = getPropType(propValue);
|
|
1355
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
|
|
1356
|
+
}
|
|
1357
|
+
return null;
|
|
1364
1358
|
}
|
|
1359
|
+
return createChainableTypeChecker(validate);
|
|
1365
1360
|
}
|
|
1366
1361
|
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
}
|
|
1362
|
+
function createElementTypeTypeChecker() {
|
|
1363
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
1364
|
+
var propValue = props[propName];
|
|
1365
|
+
if (!reactIs.isValidElementType(propValue)) {
|
|
1366
|
+
var propType = getPropType(propValue);
|
|
1367
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
|
|
1368
|
+
}
|
|
1369
|
+
return null;
|
|
1370
|
+
}
|
|
1371
|
+
return createChainableTypeChecker(validate);
|
|
1372
|
+
}
|
|
1378
1373
|
|
|
1379
|
-
function
|
|
1380
|
-
|
|
1374
|
+
function createInstanceTypeChecker(expectedClass) {
|
|
1375
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
1376
|
+
if (!(props[propName] instanceof expectedClass)) {
|
|
1377
|
+
var expectedClassName = expectedClass.name || ANONYMOUS;
|
|
1378
|
+
var actualClassName = getClassName(props[propName]);
|
|
1379
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
|
|
1380
|
+
}
|
|
1381
|
+
return null;
|
|
1382
|
+
}
|
|
1383
|
+
return createChainableTypeChecker(validate);
|
|
1384
|
+
}
|
|
1381
1385
|
|
|
1382
|
-
|
|
1386
|
+
function createEnumTypeChecker(expectedValues) {
|
|
1387
|
+
if (!Array.isArray(expectedValues)) {
|
|
1388
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1389
|
+
if (arguments.length > 1) {
|
|
1390
|
+
printWarning$1(
|
|
1391
|
+
'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
|
|
1392
|
+
'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
|
|
1393
|
+
);
|
|
1394
|
+
} else {
|
|
1395
|
+
printWarning$1('Invalid argument supplied to oneOf, expected an array.');
|
|
1396
|
+
}
|
|
1397
|
+
}
|
|
1398
|
+
return emptyFunctionThatReturnsNull;
|
|
1399
|
+
}
|
|
1383
1400
|
|
|
1384
|
-
|
|
1385
|
-
|
|
1401
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
1402
|
+
var propValue = props[propName];
|
|
1403
|
+
for (var i = 0; i < expectedValues.length; i++) {
|
|
1404
|
+
if (is(propValue, expectedValues[i])) {
|
|
1405
|
+
return null;
|
|
1406
|
+
}
|
|
1407
|
+
}
|
|
1386
1408
|
|
|
1387
|
-
function
|
|
1388
|
-
|
|
1389
|
-
|
|
1409
|
+
var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
|
|
1410
|
+
var type = getPreciseType(value);
|
|
1411
|
+
if (type === 'symbol') {
|
|
1412
|
+
return String(value);
|
|
1413
|
+
}
|
|
1414
|
+
return value;
|
|
1415
|
+
});
|
|
1416
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
|
|
1417
|
+
}
|
|
1418
|
+
return createChainableTypeChecker(validate);
|
|
1419
|
+
}
|
|
1390
1420
|
|
|
1391
|
-
function
|
|
1392
|
-
|
|
1393
|
-
|
|
1421
|
+
function createObjectOfTypeChecker(typeChecker) {
|
|
1422
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
1423
|
+
if (typeof typeChecker !== 'function') {
|
|
1424
|
+
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
|
|
1425
|
+
}
|
|
1426
|
+
var propValue = props[propName];
|
|
1427
|
+
var propType = getPropType(propValue);
|
|
1428
|
+
if (propType !== 'object') {
|
|
1429
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
|
|
1430
|
+
}
|
|
1431
|
+
for (var key in propValue) {
|
|
1432
|
+
if (has$1(propValue, key)) {
|
|
1433
|
+
var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1);
|
|
1434
|
+
if (error instanceof Error) {
|
|
1435
|
+
return error;
|
|
1436
|
+
}
|
|
1437
|
+
}
|
|
1438
|
+
}
|
|
1439
|
+
return null;
|
|
1440
|
+
}
|
|
1441
|
+
return createChainableTypeChecker(validate);
|
|
1442
|
+
}
|
|
1394
1443
|
|
|
1395
|
-
|
|
1396
|
-
|
|
1444
|
+
function createUnionTypeChecker(arrayOfTypeCheckers) {
|
|
1445
|
+
if (!Array.isArray(arrayOfTypeCheckers)) {
|
|
1446
|
+
process.env.NODE_ENV !== 'production' ? printWarning$1('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
|
|
1447
|
+
return emptyFunctionThatReturnsNull;
|
|
1448
|
+
}
|
|
1397
1449
|
|
|
1398
|
-
var
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
errors = _useContext.errors,
|
|
1409
|
-
navigator = _useContext.navigator,
|
|
1410
|
-
setFieldValue = _useContext.setFieldValue,
|
|
1411
|
-
registerInput = _useContext.registerInput;
|
|
1450
|
+
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
1451
|
+
var checker = arrayOfTypeCheckers[i];
|
|
1452
|
+
if (typeof checker !== 'function') {
|
|
1453
|
+
printWarning$1(
|
|
1454
|
+
'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
|
|
1455
|
+
'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
|
|
1456
|
+
);
|
|
1457
|
+
return emptyFunctionThatReturnsNull;
|
|
1458
|
+
}
|
|
1459
|
+
}
|
|
1412
1460
|
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1461
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
1462
|
+
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
1463
|
+
var checker = arrayOfTypeCheckers[i];
|
|
1464
|
+
if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret_1) == null) {
|
|
1465
|
+
return null;
|
|
1466
|
+
}
|
|
1467
|
+
}
|
|
1419
1468
|
|
|
1420
|
-
|
|
1421
|
-
if (typeof val === 'string') {
|
|
1422
|
-
setFieldValue(name, val);
|
|
1423
|
-
} else {
|
|
1424
|
-
setFieldValue(name, val.target.value);
|
|
1469
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
|
|
1425
1470
|
}
|
|
1471
|
+
return createChainableTypeChecker(validate);
|
|
1472
|
+
}
|
|
1426
1473
|
|
|
1427
|
-
|
|
1428
|
-
|
|
1474
|
+
function createNodeChecker() {
|
|
1475
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
1476
|
+
if (!isNode(props[propName])) {
|
|
1477
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
|
|
1478
|
+
}
|
|
1479
|
+
return null;
|
|
1429
1480
|
}
|
|
1430
|
-
|
|
1481
|
+
return createChainableTypeChecker(validate);
|
|
1482
|
+
}
|
|
1431
1483
|
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
return React.cloneElement(child, {
|
|
1439
|
-
onChange: handleChange,
|
|
1440
|
-
message: message.toString(),
|
|
1441
|
-
id: name,
|
|
1442
|
-
navigator: navigateTo
|
|
1443
|
-
});
|
|
1444
|
-
} else {
|
|
1445
|
-
return child;
|
|
1484
|
+
function createShapeTypeChecker(shapeTypes) {
|
|
1485
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
1486
|
+
var propValue = props[propName];
|
|
1487
|
+
var propType = getPropType(propValue);
|
|
1488
|
+
if (propType !== 'object') {
|
|
1489
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
|
1446
1490
|
}
|
|
1447
|
-
|
|
1491
|
+
for (var key in shapeTypes) {
|
|
1492
|
+
var checker = shapeTypes[key];
|
|
1493
|
+
if (!checker) {
|
|
1494
|
+
continue;
|
|
1495
|
+
}
|
|
1496
|
+
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1);
|
|
1497
|
+
if (error) {
|
|
1498
|
+
return error;
|
|
1499
|
+
}
|
|
1500
|
+
}
|
|
1501
|
+
return null;
|
|
1502
|
+
}
|
|
1503
|
+
return createChainableTypeChecker(validate);
|
|
1448
1504
|
}
|
|
1449
1505
|
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
};
|
|
1506
|
+
function createStrictShapeTypeChecker(shapeTypes) {
|
|
1507
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
1508
|
+
var propValue = props[propName];
|
|
1509
|
+
var propType = getPropType(propValue);
|
|
1510
|
+
if (propType !== 'object') {
|
|
1511
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
|
1512
|
+
}
|
|
1513
|
+
// We need to check all keys in case some are required but missing from
|
|
1514
|
+
// props.
|
|
1515
|
+
var allKeys = objectAssign({}, props[propName], shapeTypes);
|
|
1516
|
+
for (var key in allKeys) {
|
|
1517
|
+
var checker = shapeTypes[key];
|
|
1518
|
+
if (!checker) {
|
|
1519
|
+
return new PropTypeError(
|
|
1520
|
+
'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
|
|
1521
|
+
'\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
|
|
1522
|
+
'\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
|
|
1523
|
+
);
|
|
1524
|
+
}
|
|
1525
|
+
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1);
|
|
1526
|
+
if (error) {
|
|
1527
|
+
return error;
|
|
1528
|
+
}
|
|
1529
|
+
}
|
|
1530
|
+
return null;
|
|
1531
|
+
}
|
|
1460
1532
|
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
children = _ref$children === void 0 ? null : _ref$children;
|
|
1464
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
1465
|
-
className: "goa-form-button"
|
|
1466
|
-
}, children);
|
|
1467
|
-
};
|
|
1533
|
+
return createChainableTypeChecker(validate);
|
|
1534
|
+
}
|
|
1468
1535
|
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1536
|
+
function isNode(propValue) {
|
|
1537
|
+
switch (typeof propValue) {
|
|
1538
|
+
case 'number':
|
|
1539
|
+
case 'string':
|
|
1540
|
+
case 'undefined':
|
|
1541
|
+
return true;
|
|
1542
|
+
case 'boolean':
|
|
1543
|
+
return !propValue;
|
|
1544
|
+
case 'object':
|
|
1545
|
+
if (Array.isArray(propValue)) {
|
|
1546
|
+
return propValue.every(isNode);
|
|
1547
|
+
}
|
|
1548
|
+
if (propValue === null || isValidElement(propValue)) {
|
|
1549
|
+
return true;
|
|
1550
|
+
}
|
|
1476
1551
|
|
|
1477
|
-
var
|
|
1478
|
-
|
|
1552
|
+
var iteratorFn = getIteratorFn(propValue);
|
|
1553
|
+
if (iteratorFn) {
|
|
1554
|
+
var iterator = iteratorFn.call(propValue);
|
|
1555
|
+
var step;
|
|
1556
|
+
if (iteratorFn !== propValue.entries) {
|
|
1557
|
+
while (!(step = iterator.next()).done) {
|
|
1558
|
+
if (!isNode(step.value)) {
|
|
1559
|
+
return false;
|
|
1560
|
+
}
|
|
1561
|
+
}
|
|
1562
|
+
} else {
|
|
1563
|
+
// Iterator will provide entry [k,v] tuples rather than values.
|
|
1564
|
+
while (!(step = iterator.next()).done) {
|
|
1565
|
+
var entry = step.value;
|
|
1566
|
+
if (entry) {
|
|
1567
|
+
if (!isNode(entry[1])) {
|
|
1568
|
+
return false;
|
|
1569
|
+
}
|
|
1570
|
+
}
|
|
1571
|
+
}
|
|
1572
|
+
}
|
|
1573
|
+
} else {
|
|
1574
|
+
return false;
|
|
1575
|
+
}
|
|
1479
1576
|
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
_ref$title = _ref.title,
|
|
1486
|
-
title = _ref$title === void 0 ? null : _ref$title,
|
|
1487
|
-
_ref$children = _ref.children,
|
|
1488
|
-
children = _ref$children === void 0 ? null : _ref$children,
|
|
1489
|
-
_ref$onClick = _ref.onClick,
|
|
1490
|
-
onClick = _ref$onClick === void 0 ? null : _ref$onClick,
|
|
1491
|
-
props = _objectWithoutProperties(_ref, ["buttonType", "buttonSize", "title", "children", "onClick"]);
|
|
1492
|
-
|
|
1493
|
-
var btnTypeClass = buttonType === 'primary' ? '' : "goa--".concat(buttonType);
|
|
1494
|
-
var btnSize = buttonSize === 'small' ? 'btn-small' : '';
|
|
1495
|
-
return /*#__PURE__*/React.createElement("button", Object.assign({
|
|
1496
|
-
className: "goa-button ".concat(btnSize, " ").concat(btnTypeClass),
|
|
1497
|
-
title: title,
|
|
1498
|
-
onClick: onClick
|
|
1499
|
-
}, props), children);
|
|
1500
|
-
};
|
|
1501
|
-
GoAButton.propTypes = {
|
|
1502
|
-
buttonSize: propTypes.string,
|
|
1503
|
-
buttonType: propTypes.string,
|
|
1504
|
-
title: propTypes.string,
|
|
1505
|
-
children: propTypes.node,
|
|
1506
|
-
onClick: propTypes.func
|
|
1507
|
-
};
|
|
1577
|
+
return true;
|
|
1578
|
+
default:
|
|
1579
|
+
return false;
|
|
1580
|
+
}
|
|
1581
|
+
}
|
|
1508
1582
|
|
|
1509
|
-
|
|
1510
|
-
|
|
1583
|
+
function isSymbol(propType, propValue) {
|
|
1584
|
+
// Native Symbol.
|
|
1585
|
+
if (propType === 'symbol') {
|
|
1586
|
+
return true;
|
|
1587
|
+
}
|
|
1511
1588
|
|
|
1512
|
-
|
|
1513
|
-
|
|
1589
|
+
// falsy value can't be a Symbol
|
|
1590
|
+
if (!propValue) {
|
|
1591
|
+
return false;
|
|
1592
|
+
}
|
|
1514
1593
|
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
content = _ref.content,
|
|
1520
|
-
_ref$children = _ref.children,
|
|
1521
|
-
children = _ref$children === void 0 ? null : _ref$children,
|
|
1522
|
-
props = _objectWithoutProperties(_ref, ["title", "type", "content", "children"]);
|
|
1523
|
-
|
|
1524
|
-
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
1525
|
-
className: "goa-callout goa--".concat(type)
|
|
1526
|
-
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("h3", {
|
|
1527
|
-
"data-testid": "callout-title"
|
|
1528
|
-
}, title), /*#__PURE__*/React.createElement("div", {
|
|
1529
|
-
className: "messages",
|
|
1530
|
-
"data-testid": "callout-content"
|
|
1531
|
-
}, content || children))));
|
|
1532
|
-
};
|
|
1533
|
-
GoACallout.propTypes = {
|
|
1534
|
-
title: propTypes.string,
|
|
1535
|
-
type: propTypes.string.isRequired,
|
|
1536
|
-
content: propTypes.string
|
|
1537
|
-
};
|
|
1594
|
+
// 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
|
|
1595
|
+
if (propValue['@@toStringTag'] === 'Symbol') {
|
|
1596
|
+
return true;
|
|
1597
|
+
}
|
|
1538
1598
|
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
navigator: {}
|
|
1544
|
-
};
|
|
1545
|
-
var FormContext;
|
|
1599
|
+
// Fallback for non-spec compliant Symbols which are polyfilled.
|
|
1600
|
+
if (typeof Symbol === 'function' && propValue instanceof Symbol) {
|
|
1601
|
+
return true;
|
|
1602
|
+
}
|
|
1546
1603
|
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
var GoAForm = function GoAForm(_ref) {
|
|
1550
|
-
var _ref$formTitle = _ref.formTitle,
|
|
1551
|
-
formTitle = _ref$formTitle === void 0 ? '' : _ref$formTitle,
|
|
1552
|
-
_ref$formDescription = _ref.formDescription,
|
|
1553
|
-
formDescription = _ref$formDescription === void 0 ? '' : _ref$formDescription,
|
|
1554
|
-
onFormSubmit = _ref.onFormSubmit,
|
|
1555
|
-
_ref$children = _ref.children,
|
|
1556
|
-
children = _ref$children === void 0 ? null : _ref$children,
|
|
1557
|
-
props = _objectWithoutProperties(_ref, ["formTitle", "formDescription", "onFormSubmit", "children"]);
|
|
1558
|
-
|
|
1559
|
-
var _useState = useState(initState),
|
|
1560
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
1561
|
-
formState = _useState2[0],
|
|
1562
|
-
setFormState = _useState2[1];
|
|
1604
|
+
return false;
|
|
1605
|
+
}
|
|
1563
1606
|
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1607
|
+
// Equivalent of `typeof` but with special handling for array and regexp.
|
|
1608
|
+
function getPropType(propValue) {
|
|
1609
|
+
var propType = typeof propValue;
|
|
1610
|
+
if (Array.isArray(propValue)) {
|
|
1611
|
+
return 'array';
|
|
1612
|
+
}
|
|
1613
|
+
if (propValue instanceof RegExp) {
|
|
1614
|
+
// Old webkits (at least until Android 4.0) return 'function' rather than
|
|
1615
|
+
// 'object' for typeof a RegExp. We'll normalize this here so that /bla/
|
|
1616
|
+
// passes PropTypes.object.
|
|
1617
|
+
return 'object';
|
|
1618
|
+
}
|
|
1619
|
+
if (isSymbol(propType, propValue)) {
|
|
1620
|
+
return 'symbol';
|
|
1621
|
+
}
|
|
1622
|
+
return propType;
|
|
1623
|
+
}
|
|
1568
1624
|
|
|
1569
|
-
|
|
1570
|
-
|
|
1625
|
+
// This handles more types than `getPropType`. Only used for error messages.
|
|
1626
|
+
// See `createPrimitiveTypeChecker`.
|
|
1627
|
+
function getPreciseType(propValue) {
|
|
1628
|
+
if (typeof propValue === 'undefined' || propValue === null) {
|
|
1629
|
+
return '' + propValue;
|
|
1630
|
+
}
|
|
1631
|
+
var propType = getPropType(propValue);
|
|
1632
|
+
if (propType === 'object') {
|
|
1633
|
+
if (propValue instanceof Date) {
|
|
1634
|
+
return 'date';
|
|
1635
|
+
} else if (propValue instanceof RegExp) {
|
|
1636
|
+
return 'regexp';
|
|
1637
|
+
}
|
|
1638
|
+
}
|
|
1639
|
+
return propType;
|
|
1640
|
+
}
|
|
1571
1641
|
|
|
1572
|
-
|
|
1573
|
-
|
|
1642
|
+
// Returns a string that is postfixed to a warning about an invalid type.
|
|
1643
|
+
// For example, "undefined" or "of type array"
|
|
1644
|
+
function getPostfixForTypeWarning(value) {
|
|
1645
|
+
var type = getPreciseType(value);
|
|
1646
|
+
switch (type) {
|
|
1647
|
+
case 'array':
|
|
1648
|
+
case 'object':
|
|
1649
|
+
return 'an ' + type;
|
|
1650
|
+
case 'boolean':
|
|
1651
|
+
case 'date':
|
|
1652
|
+
case 'regexp':
|
|
1653
|
+
return 'a ' + type;
|
|
1654
|
+
default:
|
|
1655
|
+
return type;
|
|
1574
1656
|
}
|
|
1575
|
-
}
|
|
1576
|
-
|
|
1577
|
-
var validate = function validate() {
|
|
1578
|
-
var validators = formState.validators;
|
|
1579
|
-
setFormState(function (state) {
|
|
1580
|
-
return _objectSpread2(_objectSpread2({}, state), {}, {
|
|
1581
|
-
errors: {}
|
|
1582
|
-
});
|
|
1583
|
-
});
|
|
1584
|
-
var formErrors = Object.entries(validators).reduce(function (errors, _ref2) {
|
|
1585
|
-
var _ref3 = _slicedToArray(_ref2, 2),
|
|
1586
|
-
name = _ref3[0],
|
|
1587
|
-
validators = _ref3[1];
|
|
1588
|
-
|
|
1589
|
-
var data = formState.data;
|
|
1590
|
-
|
|
1591
|
-
if (validators.length > 0) {
|
|
1592
|
-
var messages = validators.reduce(function (result, validator) {
|
|
1593
|
-
var value = data[name];
|
|
1594
|
-
var err = validator(value, data);
|
|
1595
|
-
return [].concat(_toConsumableArray(result), _toConsumableArray(err));
|
|
1596
|
-
}, []);
|
|
1597
|
-
|
|
1598
|
-
if (messages.length > 0) {
|
|
1599
|
-
errors[name] = "".concat(messages, " ").concat(name.toLocaleLowerCase());
|
|
1600
|
-
}
|
|
1657
|
+
}
|
|
1601
1658
|
|
|
1602
|
-
|
|
1659
|
+
// Returns class name of the object, if any.
|
|
1660
|
+
function getClassName(propValue) {
|
|
1661
|
+
if (!propValue.constructor || !propValue.constructor.name) {
|
|
1662
|
+
return ANONYMOUS;
|
|
1663
|
+
}
|
|
1664
|
+
return propValue.constructor.name;
|
|
1665
|
+
}
|
|
1603
1666
|
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
}
|
|
1608
|
-
}
|
|
1667
|
+
ReactPropTypes.checkPropTypes = checkPropTypes_1;
|
|
1668
|
+
ReactPropTypes.resetWarningCache = checkPropTypes_1.resetWarningCache;
|
|
1669
|
+
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
1609
1670
|
|
|
1610
|
-
|
|
1611
|
-
|
|
1671
|
+
return ReactPropTypes;
|
|
1672
|
+
};
|
|
1612
1673
|
|
|
1613
|
-
|
|
1614
|
-
|
|
1674
|
+
function emptyFunction() {}
|
|
1675
|
+
function emptyFunctionWithReset() {}
|
|
1676
|
+
emptyFunctionWithReset.resetWarningCache = emptyFunction;
|
|
1615
1677
|
|
|
1616
|
-
|
|
1617
|
-
|
|
1678
|
+
var factoryWithThrowingShims = function() {
|
|
1679
|
+
function shim(props, propName, componentName, location, propFullName, secret) {
|
|
1680
|
+
if (secret === ReactPropTypesSecret_1) {
|
|
1681
|
+
// It is still safe when called from React.
|
|
1682
|
+
return;
|
|
1618
1683
|
}
|
|
1684
|
+
var err = new Error(
|
|
1685
|
+
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
|
1686
|
+
'Use PropTypes.checkPropTypes() to call them. ' +
|
|
1687
|
+
'Read more at http://fb.me/use-check-prop-types'
|
|
1688
|
+
);
|
|
1689
|
+
err.name = 'Invariant Violation';
|
|
1690
|
+
throw err;
|
|
1691
|
+
} shim.isRequired = shim;
|
|
1692
|
+
function getShim() {
|
|
1693
|
+
return shim;
|
|
1694
|
+
} // Important!
|
|
1695
|
+
// Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
|
|
1696
|
+
var ReactPropTypes = {
|
|
1697
|
+
array: shim,
|
|
1698
|
+
bool: shim,
|
|
1699
|
+
func: shim,
|
|
1700
|
+
number: shim,
|
|
1701
|
+
object: shim,
|
|
1702
|
+
string: shim,
|
|
1703
|
+
symbol: shim,
|
|
1619
1704
|
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1705
|
+
any: shim,
|
|
1706
|
+
arrayOf: getShim,
|
|
1707
|
+
element: shim,
|
|
1708
|
+
elementType: shim,
|
|
1709
|
+
instanceOf: getShim,
|
|
1710
|
+
node: shim,
|
|
1711
|
+
objectOf: getShim,
|
|
1712
|
+
oneOf: getShim,
|
|
1713
|
+
oneOfType: getShim,
|
|
1714
|
+
shape: getShim,
|
|
1715
|
+
exact: getShim,
|
|
1627
1716
|
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
return _objectSpread2(_objectSpread2({}, state), {}, {
|
|
1631
|
-
data: _objectSpread2(_objectSpread2({}, state.data), {}, _defineProperty({}, name, value)),
|
|
1632
|
-
errors: _objectSpread2(_objectSpread2({}, state.errors), {}, _defineProperty({}, name, []))
|
|
1633
|
-
});
|
|
1634
|
-
});
|
|
1717
|
+
checkPropTypes: emptyFunctionWithReset,
|
|
1718
|
+
resetWarningCache: emptyFunction
|
|
1635
1719
|
};
|
|
1636
1720
|
|
|
1637
|
-
|
|
1638
|
-
var name = _ref4.name,
|
|
1639
|
-
validators = _ref4.validators;
|
|
1640
|
-
setFormState(function (state) {
|
|
1641
|
-
return _objectSpread2(_objectSpread2({}, state), {}, {
|
|
1642
|
-
validators: _objectSpread2(_objectSpread2({}, state.validators), {}, _defineProperty({}, name, validators || [])),
|
|
1643
|
-
errors: _objectSpread2(_objectSpread2({}, state.errors), {}, _defineProperty({}, name, []))
|
|
1644
|
-
});
|
|
1645
|
-
});
|
|
1646
|
-
return function () {
|
|
1647
|
-
setFormState(function (state) {
|
|
1648
|
-
var _state = _objectSpread2({}, state),
|
|
1649
|
-
data = _state.data,
|
|
1650
|
-
errors = _state.errors,
|
|
1651
|
-
currentValidators = _state.validators,
|
|
1652
|
-
navigator = _state.navigator;
|
|
1653
|
-
|
|
1654
|
-
delete data[name];
|
|
1655
|
-
delete errors[name];
|
|
1656
|
-
delete currentValidators[name];
|
|
1657
|
-
delete navigator[name];
|
|
1658
|
-
return {
|
|
1659
|
-
data: data,
|
|
1660
|
-
errors: errors,
|
|
1661
|
-
validators: currentValidators,
|
|
1662
|
-
navigator: navigator
|
|
1663
|
-
};
|
|
1664
|
-
});
|
|
1665
|
-
};
|
|
1666
|
-
};
|
|
1721
|
+
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
1667
1722
|
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
data: formState.data,
|
|
1671
|
-
navigator: formState.navigator,
|
|
1672
|
-
setFieldValue: setFieldValue,
|
|
1673
|
-
registerInput: registerInput
|
|
1674
|
-
};
|
|
1723
|
+
return ReactPropTypes;
|
|
1724
|
+
};
|
|
1675
1725
|
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
});
|
|
1684
|
-
}
|
|
1726
|
+
var propTypes = createCommonjsModule(function (module) {
|
|
1727
|
+
/**
|
|
1728
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
1729
|
+
*
|
|
1730
|
+
* This source code is licensed under the MIT license found in the
|
|
1731
|
+
* LICENSE file in the root directory of this source tree.
|
|
1732
|
+
*/
|
|
1685
1733
|
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
type: "emergency",
|
|
1689
|
-
title: "Please fix following errors:"
|
|
1690
|
-
}, /*#__PURE__*/React.createElement("ul", null, formErrors.map(function (error) {
|
|
1691
|
-
return /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement("a", {
|
|
1692
|
-
href: "#".concat(error),
|
|
1693
|
-
onClick: function onClick() {
|
|
1694
|
-
return addNavigator(error);
|
|
1695
|
-
}
|
|
1696
|
-
}, error));
|
|
1697
|
-
})));
|
|
1698
|
-
};
|
|
1734
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1735
|
+
var ReactIs = reactIs;
|
|
1699
1736
|
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
buttonType: "primary",
|
|
1711
|
-
type: "submit"
|
|
1712
|
-
}, "Submit"))) : children));
|
|
1713
|
-
};
|
|
1714
|
-
GoAForm.propTypes = {
|
|
1715
|
-
formTitle: propTypes.string,
|
|
1716
|
-
formDescription: propTypes.string,
|
|
1717
|
-
onSubmit: propTypes.func,
|
|
1718
|
-
children: propTypes.node
|
|
1719
|
-
};
|
|
1737
|
+
// By explicitly using `prop-types` you are opting into new development behavior.
|
|
1738
|
+
// http://fb.me/prop-types-in-prod
|
|
1739
|
+
var throwOnDirectAccess = true;
|
|
1740
|
+
module.exports = factoryWithTypeCheckers(ReactIs.isElement, throwOnDirectAccess);
|
|
1741
|
+
} else {
|
|
1742
|
+
// By explicitly using `prop-types` you are opting into new production behavior.
|
|
1743
|
+
// http://fb.me/prop-types-in-prod
|
|
1744
|
+
module.exports = factoryWithThrowingShims();
|
|
1745
|
+
}
|
|
1746
|
+
});
|
|
1720
1747
|
|
|
1721
|
-
var css_248z$
|
|
1722
|
-
styleInject(css_248z$
|
|
1748
|
+
var css_248z$2 = "/* Palette */\n/* Semantic usages */\n.goa-input {\n position: relative; }\n\n.goa-input-error-message {\n font-size: var(--fs-sm);\n font-weight: 300;\n color: red;\n margin: 0; }\n\n.goa-input-help-text-message {\n font-size: var(--fs-sm);\n font-weight: 200;\n color: #333;\n margin: 0; }\n\n.goa-input-field {\n border: 1px solid #666666;\n border-radius: 4px; }\n\n.goa-input-field-error {\n border: 1px solid #ec040b;\n border-radius: 4px; }\n\n.goa-input-highlight-error {\n border: 4px solid #ec040b;\n border-radius: 4px; }\n";
|
|
1749
|
+
styleInject(css_248z$2);
|
|
1723
1750
|
|
|
1724
1751
|
var GoAInput = function GoAInput(_ref) {
|
|
1725
1752
|
var _ref$validate = _ref.validate,
|
|
@@ -1792,16 +1819,17 @@ GoAInput.propTypes = {
|
|
|
1792
1819
|
onChange: propTypes.func
|
|
1793
1820
|
};
|
|
1794
1821
|
|
|
1795
|
-
var css_248z$
|
|
1796
|
-
styleInject(css_248z$
|
|
1822
|
+
var css_248z$3 = ".goa-scrollable {\n overflow: hidden;\n height: 100%;\n}\n\n.goa-scrollable > div::-webkit-scrollbar {\n width: 6px;\n}\n\n.goa-scrollable > div::-webkit-scrollbar-track {\n background: #f1f1f1;\n}\n\n.goa-scrollable > div::-webkit-scrollbar-thumb {\n background: #888;\n}\n\n.goa-scrollable > div::-webkit-scrollbar-thumb:hover {\n background: #555;\n}\n";
|
|
1823
|
+
styleInject(css_248z$3);
|
|
1797
1824
|
|
|
1798
|
-
function GoAScrollable(_ref) {
|
|
1825
|
+
var GoAScrollable = function GoAScrollable(_ref) {
|
|
1799
1826
|
var vertical = _ref.vertical,
|
|
1800
1827
|
horizontal = _ref.horizontal,
|
|
1801
1828
|
hPadding = _ref.hPadding,
|
|
1802
1829
|
vPadding = _ref.vPadding,
|
|
1803
1830
|
height = _ref.height,
|
|
1804
|
-
children = _ref.children
|
|
1831
|
+
children = _ref.children,
|
|
1832
|
+
testId = _ref.testId;
|
|
1805
1833
|
var style = {
|
|
1806
1834
|
overflowY: vertical ? 'auto' : 'hidden',
|
|
1807
1835
|
overflowX: horizontal ? 'auto' : 'hidden',
|
|
@@ -1811,116 +1839,190 @@ function GoAScrollable(_ref) {
|
|
|
1811
1839
|
return /*#__PURE__*/React.createElement("div", {
|
|
1812
1840
|
className: "goa-scrollable"
|
|
1813
1841
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1814
|
-
style: style
|
|
1842
|
+
style: style,
|
|
1843
|
+
"data-testid": testId
|
|
1815
1844
|
}, children));
|
|
1816
|
-
}
|
|
1817
|
-
|
|
1818
|
-
var css_248z$8 = "/* Root ============================================================================== */\n\n.modal-root {\n position: fixed;\n top: 0;\n left: 0;\n bottom: 0;\n width: 100vw;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n}\n\n/* Modal ============================================================================== */\n\n.modal {\n position: relative;\n background: #fff;\n transition: opacity 150ms ease-in;\n z-index: 1001;\n}\n\n@media (max-width: 639px) {\n .modal {\n width: 100vw;\n height: 100vh;\n }\n}\n\n@media (min-width: 640px) {\n .modal {\n box-shadow: 6px 6px 6px rgba(0, 0, 0, 0.2);\n border-radius: 4px;\n margin: 1rem;\n max-height: 80vh;\n width: 600px;\n }\n}\n@media (min-width: 1024px) {\n .modal {\n width: 65ch;\n }\n}\n\n/* Modal Content ============================================================================== */\n\n.modal-content {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n\n/* Modal Actions ============================================================================== */\n\n.modal-actions {\n text-align: right;\n margin: 1rem;\n}\n\n@media (max-width: 639px) {\n .modal-actions button + button {\n margin-top: 0.5rem;\n }\n .modal-actions button {\n display: block;\n width: 100%;\n }\n}\n\n@media (min-width: 640px) {\n .modal-actions > button {\n margin-right: 0;\n }\n .modal-actions > button + button {\n margin-left: 0.5rem;\n }\n}\n\n/* Modal Title ============================================================================ */\n\n.modal-title {\n font-size: var(--fs-xl);\n padding: 1rem;\n margin-right: 40px; /* close icon spacing */\n}\n\n/* Modal Background ======================================================================= */\n\n.modal-background {\n position: fixed;\n inset: 0;\n opacity: 0;\n background: rgba(0, 0, 0, 0.5);\n z-index: 1000;\n transition: opacity 100ms ease-in;\n}\n\n/* Modal Close ============================================================================ */\n\n.modal-close {\n padding: 0.5rem;\n top: 0.5rem;\n right: 0.5rem;\n position: absolute;\n cursor: pointer;\n height: 20px;\n width: 20px;\n border-radius: 999px;\n transition: background 200ms ease-in;\n}\n\n.modal-close:hover {\n background: rgba(0, 0, 0, 0.1);\n}\n";
|
|
1819
|
-
styleInject(css_248z$8);
|
|
1845
|
+
};
|
|
1820
1846
|
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
onClick = _ref.onClick,
|
|
1824
|
-
_ref$size = _ref.size,
|
|
1825
|
-
size = _ref$size === void 0 ? 24 : _ref$size;
|
|
1826
|
-
return /*#__PURE__*/React.createElement("svg", {
|
|
1827
|
-
className: className,
|
|
1828
|
-
"data-testid": "icon-close",
|
|
1829
|
-
width: size,
|
|
1830
|
-
height: size,
|
|
1831
|
-
onClick: onClick,
|
|
1832
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1833
|
-
viewBox: "0 0 512 512"
|
|
1834
|
-
}, /*#__PURE__*/React.createElement("title", null, "Close"), /*#__PURE__*/React.createElement("path", {
|
|
1835
|
-
fill: "none",
|
|
1836
|
-
stroke: "currentColor",
|
|
1837
|
-
strokeLinecap: "round",
|
|
1838
|
-
strokeLinejoin: "round",
|
|
1839
|
-
strokeWidth: "32",
|
|
1840
|
-
d: "M368 368L144 144M368 144L144 368"
|
|
1841
|
-
}));
|
|
1842
|
-
}
|
|
1847
|
+
var css_248z$4 = "/* Fade in */\n.fade-in-init {\n display: none;\n}\n.fade-in-start {\n display: block;\n opacity: 0;\n transition: opacity 200ms ease-in;\n}\n.fade-in-active {\n opacity: 1;\n}\n\n/* Fade out */\n.fade-out-init {\n display: block;\n}\n.fade-out-start {\n display: block;\n opacity: 1;\n transition: opacity 200ms ease-in;\n}\n.fade-out-active {\n opacity: 0;\n}\n\n/* ======= Slide in/out Up */\n\n/* Slide in up */\n.slide-in-up-init {\n transition: translateY(0);\n display: none;\n}\n.slide-in-up-start {\n display: block;\n transform: translateY(100vh);\n transition: transform 300ms ease-out;\n}\n.slide-in-up-active {\n transform: translateY(0);\n}\n\n/* Slide out up */\n.slide-out-up-init {\n transform: translateY(0);\n display: block;\n}\n.slide-out-up-start {\n transition: transform 300ms ease-in;\n}\n.slide-out-up-active {\n transform: translateY(-100vh);\n}\n\n/* ======= Slide in/out Down */\n\n/* Slide in down */\n.slide-in-down-init {\n transition: translateY(0);\n display: none;\n}\n.slide-in-down-start {\n display: block;\n transform: translateY(-100vh);\n transition: transform 300ms ease-out;\n}\n.slide-in-down-active {\n transform: translateY(0);\n}\n\n/* Slide out down */\n.slide-out-down-init {\n transform: translateY(0);\n display: block;\n}\n.slide-out-down-start {\n transform: translateY(0);\n transition: transform 300ms ease-in;\n}\n.slide-out-down-active {\n transform: translateY(100vh);\n}\n/* ======= Slide in/out Left */\n\n/* Slide in left */\n.slide-in-left-init {\n transition: translateX(0);\n display: none;\n}\n.slide-in-left-start {\n display: block;\n transform: translateX(-100vw);\n transition: transform 300ms ease-out;\n}\n.slide-in-left-active {\n transform: translateX(0);\n}\n\n/* Slide out left */\n.slide-out-left-init {\n transform: translateX(0);\n display: block;\n}\n.slide-out-left-start {\n transform: translateX(0);\n transition: transform 300ms ease-in;\n}\n.slide-out-left-active {\n transform: translateX(-100vw);\n}\n\n/* ======= Slide in/out Right */\n\n/* Slide in left */\n.slide-in-right-init {\n transition: translateX(0);\n display: none;\n}\n.slide-in-right-start {\n display: block;\n transform: translateX(100vw);\n transition: transform 300ms ease-out;\n}\n.slide-in-right-active {\n transform: translateX(0);\n}\n\n/* Slide out right */\n.slide-out-right-init {\n transform: translateX(0);\n display: block;\n}\n.slide-out-right-start {\n transform: translateX(0);\n transition: transform 300ms ease-in;\n}\n.slide-out-right-active {\n transform: translateX(100vw);\n}\n";
|
|
1848
|
+
styleInject(css_248z$4);
|
|
1843
1849
|
|
|
1844
|
-
var
|
|
1845
|
-
var
|
|
1846
|
-
|
|
1847
|
-
|
|
1850
|
+
var GoATransition = function GoATransition(_ref) {
|
|
1851
|
+
var name = _ref.name,
|
|
1852
|
+
active = _ref.active,
|
|
1853
|
+
onComplete = _ref.onComplete,
|
|
1854
|
+
children = _ref.children;
|
|
1848
1855
|
|
|
1849
1856
|
var _useState = useState('init'),
|
|
1850
1857
|
_useState2 = _slicedToArray(_useState, 2),
|
|
1851
1858
|
state = _useState2[0],
|
|
1852
1859
|
setState = _useState2[1];
|
|
1853
1860
|
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1861
|
+
useEffect(function () {
|
|
1862
|
+
if (active) {
|
|
1863
|
+
setState('start');
|
|
1864
|
+
setTimeout(function () {
|
|
1865
|
+
return setState('active');
|
|
1866
|
+
}, 100);
|
|
1867
|
+
setTimeout(function () {
|
|
1868
|
+
onComplete === null || onComplete === void 0 ? void 0 : onComplete();
|
|
1869
|
+
}, 500);
|
|
1870
|
+
} else {
|
|
1871
|
+
setState('init');
|
|
1872
|
+
}
|
|
1873
|
+
}, [active]); // `onComplete` in the dependencies results in an animation stutter
|
|
1874
|
+
|
|
1875
|
+
function getCss() {
|
|
1876
|
+
switch (state) {
|
|
1877
|
+
case 'init':
|
|
1878
|
+
return "".concat(name, "-init");
|
|
1879
|
+
|
|
1880
|
+
case 'start':
|
|
1881
|
+
return "".concat(name, "-start");
|
|
1882
|
+
|
|
1883
|
+
case 'active':
|
|
1884
|
+
return "".concat(name, "-start ").concat(name, "-active");
|
|
1885
|
+
}
|
|
1886
|
+
}
|
|
1887
|
+
|
|
1888
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
1889
|
+
className: getCss()
|
|
1890
|
+
}, children);
|
|
1891
|
+
};
|
|
1892
|
+
|
|
1893
|
+
var GoATransitionSequence = function GoATransitionSequence(props) {
|
|
1894
|
+
function createTransition(props, children) {
|
|
1895
|
+
return /*#__PURE__*/React.createElement(GoATransition, props, children);
|
|
1896
|
+
}
|
|
1897
|
+
|
|
1898
|
+
return props.transitions // create components for the transitions
|
|
1899
|
+
.map(function (state, index) {
|
|
1900
|
+
return createTransition({
|
|
1901
|
+
active: props.transitionIndex % (props.transitions.length + 1) > index,
|
|
1902
|
+
name: state,
|
|
1903
|
+
onComplete: function onComplete() {
|
|
1904
|
+
return props === null || props === void 0 ? void 0 : props.onComplete(index, index === props.transitions.length - 1);
|
|
1905
|
+
}
|
|
1906
|
+
});
|
|
1907
|
+
}) // on `reduce` we need to start with the innermost child
|
|
1908
|
+
.reverse() // create parent/child relationship between components
|
|
1909
|
+
.reduce(function (child, parent) {
|
|
1910
|
+
if (!child) {
|
|
1911
|
+
// the original children (user defined content to be transitioned)
|
|
1912
|
+
return React.cloneElement(parent, {
|
|
1913
|
+
children: props.children
|
|
1914
|
+
});
|
|
1915
|
+
}
|
|
1916
|
+
|
|
1917
|
+
return React.cloneElement(parent, {
|
|
1918
|
+
children: child
|
|
1919
|
+
});
|
|
1920
|
+
}, null);
|
|
1921
|
+
};
|
|
1922
|
+
|
|
1923
|
+
var css_248z$5 = "/* Root ============================================================================== */\n\n.modal-root {\n position: fixed;\n top: 0;\n left: 0;\n bottom: 0;\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n z-index: 1000;\n}\n\n/* Modal ============================================================================== */\n\n.modal {\n position: relative;\n background: #fff;\n z-index: 1002;\n box-shadow: 6px 6px 6px rgba(0, 0, 0, 0.2);\n border-radius: 4px;\n}\n\n@media (max-width: 639px) {\n .modal {\n width: 90%;\n max-height: 90%;\n }\n}\n\n@media (min-width: 640px) {\n .modal {\n margin: 1rem;\n max-height: 80%;\n width: 600px;\n }\n}\n@media (min-width: 1024px) {\n .modal {\n width: 65ch;\n }\n}\n\n/* Modal Content ============================================================================== */\n\n.modal-content {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n\n/* Modal Actions ============================================================================== */\n\n.modal-actions {\n text-align: right;\n margin: 1rem;\n}\n\n@media (max-width: 639px) {\n .modal-actions button + button {\n margin-top: 0.5rem;\n }\n .modal-actions button {\n display: block;\n width: 100%;\n }\n}\n\n@media (min-width: 640px) {\n .modal-actions > button {\n margin-right: 0;\n }\n .modal-actions > button + button {\n margin-left: 0.5rem;\n }\n}\n\n/* Modal Title ============================================================================ */\n\n.modal-title {\n font-size: var(--fs-xl);\n padding: 1rem;\n margin-right: 40px; /* close icon spacing */\n}\n\n/* Modal Background ======================================================================= */\n\n.modal-background {\n position: fixed;\n inset: 0;\n background: rgba(0, 0, 0, 0.5);\n z-index: 1001;\n}\n\n/* Modal Close Icon ======================================================================= */\n\n.modal-close {\n position: absolute;\n top: 0.5rem;\n right: 0.5rem;\n}\n";
|
|
1924
|
+
styleInject(css_248z$5);
|
|
1925
|
+
|
|
1926
|
+
/**
|
|
1927
|
+
* Modal - Main Component
|
|
1928
|
+
*/
|
|
1929
|
+
|
|
1930
|
+
var TRANSITION_INIT = 0;
|
|
1931
|
+
var TRANSITION_VISIBLE = 1;
|
|
1932
|
+
var TRANSITION_HIDDEN = 2;
|
|
1933
|
+
var GoAModal = function GoAModal(_ref) {
|
|
1934
|
+
var children = _ref.children,
|
|
1935
|
+
isOpen = _ref.isOpen,
|
|
1936
|
+
onClose = _ref.onClose,
|
|
1937
|
+
testId = _ref.testId,
|
|
1938
|
+
backgroundTestId = _ref.backgroundTestId;
|
|
1939
|
+
|
|
1940
|
+
var _useState = useState(TRANSITION_INIT),
|
|
1941
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
1942
|
+
transitionIndex = _useState2[0],
|
|
1943
|
+
setTransitionIndex = _useState2[1];
|
|
1858
1944
|
|
|
1859
1945
|
useEffect(function () {
|
|
1860
1946
|
if (isOpen) {
|
|
1861
1947
|
show();
|
|
1862
|
-
}
|
|
1863
|
-
|
|
1864
|
-
if (!isOpen && state === 'visible') {
|
|
1948
|
+
} else if (transitionIndex !== 0) {
|
|
1949
|
+
// don't hide() on the when in the init state
|
|
1865
1950
|
hide();
|
|
1866
1951
|
}
|
|
1867
|
-
}, [isOpen
|
|
1952
|
+
}, [isOpen]);
|
|
1868
1953
|
|
|
1869
1954
|
function show() {
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
var scrollbarWidth = calculateScrollbarWidth();
|
|
1875
|
-
document.body.style.overflow = 'hidden';
|
|
1876
|
-
document.body.style.paddingRight = scrollbarWidth + 'px';
|
|
1877
|
-
}, 0);
|
|
1955
|
+
setTransitionIndex(TRANSITION_VISIBLE);
|
|
1956
|
+
var scrollbarWidth = calculateScrollbarWidth();
|
|
1957
|
+
document.body.style.overflow = 'hidden';
|
|
1958
|
+
document.body.style.paddingRight = scrollbarWidth + 'px';
|
|
1878
1959
|
}
|
|
1879
1960
|
|
|
1880
1961
|
function hide() {
|
|
1881
|
-
|
|
1962
|
+
setTransitionIndex(TRANSITION_HIDDEN); // need to perform on the next render cycle to allow the css transitions to take place
|
|
1882
1963
|
|
|
1883
1964
|
setTimeout(function () {
|
|
1884
|
-
|
|
1885
|
-
setState('hidden');
|
|
1886
|
-
document.body.style.overflow = 'inherit';
|
|
1965
|
+
document.body.style.overflow = '';
|
|
1887
1966
|
document.body.style.paddingRight = '0';
|
|
1888
1967
|
}, 300); // 300ms allows for any close animations to complete
|
|
1968
|
+
} // allows the current state to be easily determined within tests
|
|
1969
|
+
|
|
1970
|
+
|
|
1971
|
+
function getState() {
|
|
1972
|
+
return ['init', 'visible', 'hidden'][transitionIndex];
|
|
1889
1973
|
}
|
|
1890
1974
|
|
|
1891
|
-
return
|
|
1892
|
-
|
|
1975
|
+
return /*#__PURE__*/React.createElement(GoATransitionSequence, {
|
|
1976
|
+
transitions: ['fade-in', 'fade-out'],
|
|
1977
|
+
transitionIndex: transitionIndex,
|
|
1978
|
+
onComplete: function onComplete(_index, done) {
|
|
1979
|
+
return done && setTransitionIndex(0);
|
|
1980
|
+
}
|
|
1981
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1982
|
+
className: "modal-root",
|
|
1983
|
+
"data-testid": testId,
|
|
1984
|
+
"data-state": getState()
|
|
1893
1985
|
}, /*#__PURE__*/React.createElement(Content, {
|
|
1894
|
-
onClick: onClose
|
|
1895
|
-
visible: state === 'visible'
|
|
1986
|
+
onClick: onClose
|
|
1896
1987
|
}, children), /*#__PURE__*/React.createElement(Background, {
|
|
1897
1988
|
onClick: function onClick() {
|
|
1898
1989
|
return onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
1899
1990
|
},
|
|
1900
|
-
|
|
1901
|
-
}));
|
|
1991
|
+
testId: backgroundTestId
|
|
1992
|
+
})));
|
|
1902
1993
|
};
|
|
1903
1994
|
// Public Child Components
|
|
1904
1995
|
// ******************************************************************************
|
|
1996
|
+
// ***************
|
|
1997
|
+
// GoAModalActions
|
|
1998
|
+
// ***************
|
|
1905
1999
|
|
|
1906
2000
|
var GoAModalActions = function GoAModalActions(_ref2) {
|
|
1907
2001
|
var children = _ref2.children;
|
|
1908
2002
|
return /*#__PURE__*/React.createElement("div", {
|
|
1909
|
-
"data-testid": "modal-actions",
|
|
1910
2003
|
className: "modal-actions"
|
|
1911
2004
|
}, children);
|
|
1912
|
-
};
|
|
2005
|
+
}; // ***************
|
|
2006
|
+
// GoAModalContent
|
|
2007
|
+
// ***************
|
|
2008
|
+
|
|
1913
2009
|
var GoAModalContent = function GoAModalContent(_ref3) {
|
|
1914
|
-
var children = _ref3.children
|
|
2010
|
+
var children = _ref3.children,
|
|
2011
|
+
testId = _ref3.testId;
|
|
1915
2012
|
return /*#__PURE__*/React.createElement(GoAScrollable, {
|
|
2013
|
+
testId: testId,
|
|
1916
2014
|
vertical: true,
|
|
1917
2015
|
hPadding: 1
|
|
1918
2016
|
}, children);
|
|
1919
|
-
};
|
|
2017
|
+
}; // *************
|
|
2018
|
+
// GoAModalTitle
|
|
2019
|
+
// *************
|
|
2020
|
+
|
|
1920
2021
|
var GoAModalTitle = function GoAModalTitle(_ref4) {
|
|
1921
|
-
var children = _ref4.children
|
|
2022
|
+
var children = _ref4.children,
|
|
2023
|
+
testId = _ref4.testId;
|
|
1922
2024
|
return /*#__PURE__*/React.createElement("div", {
|
|
1923
|
-
"data-testid":
|
|
2025
|
+
"data-testid": testId,
|
|
1924
2026
|
className: "modal-title"
|
|
1925
2027
|
}, children);
|
|
1926
2028
|
}; // ******************************************************************************
|
|
@@ -1932,41 +2034,34 @@ var GoAModalTitle = function GoAModalTitle(_ref4) {
|
|
|
1932
2034
|
|
|
1933
2035
|
var Content = function Content(_ref5) {
|
|
1934
2036
|
var children = _ref5.children,
|
|
1935
|
-
onClick = _ref5.onClick
|
|
1936
|
-
visible = _ref5.visible;
|
|
1937
|
-
var opacity = visible ? 1 : 0;
|
|
2037
|
+
onClick = _ref5.onClick;
|
|
1938
2038
|
return /*#__PURE__*/React.createElement("div", {
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
opacity: opacity
|
|
1946
|
-
}
|
|
1947
|
-
}, onClick && /*#__PURE__*/React.createElement(GoACloseIcon, {
|
|
1948
|
-
className: "modal-close",
|
|
2039
|
+
className: "modal"
|
|
2040
|
+
}, onClick && /*#__PURE__*/React.createElement("div", {
|
|
2041
|
+
className: "modal-close"
|
|
2042
|
+
}, /*#__PURE__*/React.createElement(GoAIconButton, {
|
|
2043
|
+
type: "close",
|
|
2044
|
+
variant: "simple",
|
|
1949
2045
|
onClick: onClick
|
|
1950
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
1951
|
-
"data-testid": "modal-content",
|
|
2046
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
1952
2047
|
className: "modal-content"
|
|
1953
|
-
}, children)
|
|
2048
|
+
}, children), onClick && /*#__PURE__*/React.createElement("div", {
|
|
2049
|
+
style: {
|
|
2050
|
+
minHeight: '1rem'
|
|
2051
|
+
}
|
|
2052
|
+
}));
|
|
1954
2053
|
}; // ****************
|
|
1955
2054
|
// Background
|
|
1956
2055
|
// ****************
|
|
1957
2056
|
|
|
1958
2057
|
|
|
1959
2058
|
var Background = function Background(_ref6) {
|
|
1960
|
-
var
|
|
1961
|
-
|
|
1962
|
-
var opacity = visible ? 1 : 0;
|
|
2059
|
+
var onClick = _ref6.onClick,
|
|
2060
|
+
testId = _ref6.testId;
|
|
1963
2061
|
return /*#__PURE__*/React.createElement("div", {
|
|
1964
|
-
"data-testid": "modal-background",
|
|
1965
2062
|
className: "modal-background",
|
|
1966
2063
|
onClick: onClick,
|
|
1967
|
-
|
|
1968
|
-
opacity: opacity
|
|
1969
|
-
}
|
|
2064
|
+
"data-testid": testId
|
|
1970
2065
|
});
|
|
1971
2066
|
}; // *******
|
|
1972
2067
|
// Helpers
|
|
@@ -1978,6 +2073,11 @@ var Background = function Background(_ref6) {
|
|
|
1978
2073
|
|
|
1979
2074
|
|
|
1980
2075
|
function calculateScrollbarWidth() {
|
|
2076
|
+
// no scrollbars present
|
|
2077
|
+
if (document.body.clientHeight <= document.documentElement.clientHeight) {
|
|
2078
|
+
return 0;
|
|
2079
|
+
}
|
|
2080
|
+
|
|
1981
2081
|
var outer = document.createElement('div');
|
|
1982
2082
|
outer.style.visibility = 'hidden';
|
|
1983
2083
|
outer.style.overflow = 'scroll';
|
|
@@ -1992,172 +2092,36 @@ function calculateScrollbarWidth() {
|
|
|
1992
2092
|
return scrollbarWidth;
|
|
1993
2093
|
}
|
|
1994
2094
|
|
|
1995
|
-
var
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
var
|
|
2000
|
-
type = _ref$type === void 0 ? 'infinite' : _ref$type,
|
|
2001
|
-
_ref$visible = _ref.visible,
|
|
2002
|
-
visible = _ref$visible === void 0 ? false : _ref$visible,
|
|
2003
|
-
_ref$message = _ref.message,
|
|
2004
|
-
message = _ref$message === void 0 ? 'Loading...' : _ref$message,
|
|
2005
|
-
_ref$value = _ref.value,
|
|
2006
|
-
value = _ref$value === void 0 ? 0 : _ref$value,
|
|
2007
|
-
_ref$pagelock = _ref.pagelock,
|
|
2008
|
-
pagelock = _ref$pagelock === void 0 ? true : _ref$pagelock,
|
|
2009
|
-
_ref$displayType = _ref.displayType,
|
|
2010
|
-
displayType = _ref$displayType === void 0 ? 'large' : _ref$displayType;
|
|
2011
|
-
|
|
2012
|
-
/**
|
|
2013
|
-
* Set defaults
|
|
2014
|
-
*/
|
|
2015
|
-
var progressMaxValue = 283;
|
|
2016
|
-
var strokeDashoffset = 0;
|
|
2017
|
-
/**
|
|
2018
|
-
* Sets the progress if in progress mode.
|
|
2019
|
-
* @param progress
|
|
2020
|
-
* @returns
|
|
2021
|
-
*/
|
|
2022
|
-
|
|
2023
|
-
function setProgress(progress) {
|
|
2024
|
-
if (type !== 'progress') {
|
|
2025
|
-
return;
|
|
2026
|
-
}
|
|
2027
|
-
|
|
2028
|
-
if (progress === 0) {
|
|
2029
|
-
strokeDashoffset = progressMaxValue;
|
|
2030
|
-
return;
|
|
2031
|
-
}
|
|
2032
|
-
|
|
2033
|
-
if (progress >= 100) {
|
|
2034
|
-
return;
|
|
2035
|
-
}
|
|
2036
|
-
|
|
2037
|
-
var value = progressMaxValue - Math.round(progressMaxValue * progress / 100);
|
|
2038
|
-
strokeDashoffset = value;
|
|
2039
|
-
}
|
|
2040
|
-
|
|
2041
|
-
if (visible) {
|
|
2042
|
-
if (pagelock && displayType !== 'small') {
|
|
2043
|
-
document.body.style.height = '100%';
|
|
2044
|
-
document.body.style.overflow = 'hidden';
|
|
2045
|
-
} else {
|
|
2046
|
-
document.body.style.removeProperty('height');
|
|
2047
|
-
document.body.style.removeProperty('overflow');
|
|
2048
|
-
}
|
|
2049
|
-
|
|
2050
|
-
if (type === 'progress') {
|
|
2051
|
-
setProgress(value);
|
|
2052
|
-
}
|
|
2053
|
-
|
|
2054
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
2055
|
-
className: "progress-container--".concat(displayType),
|
|
2056
|
-
onKeyDown: function onKeyDown(event) {
|
|
2057
|
-
event.preventDefault();
|
|
2058
|
-
}
|
|
2059
|
-
}, /*#__PURE__*/React.createElement("svg", {
|
|
2060
|
-
className: "".concat(displayType === 'large' ? 'svg' : "svg--small"),
|
|
2061
|
-
fill: "none",
|
|
2062
|
-
viewBox: "0 0 100 100",
|
|
2063
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
2064
|
-
}, /*#__PURE__*/React.createElement("circle", {
|
|
2065
|
-
className: "base-circle",
|
|
2066
|
-
cx: "50",
|
|
2067
|
-
cy: "50",
|
|
2068
|
-
r: "45"
|
|
2069
|
-
}), /*#__PURE__*/React.createElement("circle", {
|
|
2070
|
-
className: "".concat(type === 'infinite' ? 'progress-circle--infinite' : 'progress-circle'),
|
|
2071
|
-
cx: "50",
|
|
2072
|
-
cy: "50",
|
|
2073
|
-
r: "45",
|
|
2074
|
-
style: {
|
|
2075
|
-
strokeDashoffset: strokeDashoffset
|
|
2076
|
-
}
|
|
2077
|
-
})), /*#__PURE__*/React.createElement("span", {
|
|
2078
|
-
className: "progress-message--".concat(displayType)
|
|
2079
|
-
}, message));
|
|
2080
|
-
} else {
|
|
2081
|
-
document.body.style.removeProperty('height');
|
|
2082
|
-
document.body.style.removeProperty('overflow');
|
|
2083
|
-
return null;
|
|
2084
|
-
}
|
|
2085
|
-
};
|
|
2086
|
-
GoAPageLoader.propTypes = {
|
|
2087
|
-
visible: propTypes.bool,
|
|
2088
|
-
message: propTypes.string,
|
|
2089
|
-
value: propTypes.number,
|
|
2090
|
-
type: propTypes.string,
|
|
2091
|
-
pagelock: propTypes.bool,
|
|
2092
|
-
displayType: propTypes.string
|
|
2093
|
-
};
|
|
2094
|
-
|
|
2095
|
-
var css_248z$a = "@use '../variables/main.css';\n/* Palette */\n/* Semantic usages */\n@-webkit-keyframes pulse {\n 0% {\n opacity: 0.5; }\n 50% {\n opacity: 1; }\n 100% {\n opacity: 0.5; } }\n@keyframes pulse {\n 0% {\n opacity: 0.5; }\n 50% {\n opacity: 1; }\n 100% {\n opacity: 0.5; } }\n\n[data-skeleton] {\n pointer-events: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none; }\n [data-skeleton] * {\n border-color: #ddd !important;\n color: transparent !important; }\n [data-skeleton] p,\n [data-skeleton] a {\n background-color: #ddd !important;\n -webkit-animation: pulse 2s infinite ease-in-out;\n animation: pulse 2s infinite ease-in-out;\n display: inline;\n line-height: 0 !important;\n font-size: 50% !important; }\n [data-skeleton] p::after,\n [data-skeleton] a::after {\n content: '' !important;\n display: block !important;\n margin-bottom: 1rem !important;\n background-size: contain; }\n [data-skeleton] h1,\n [data-skeleton] h2,\n [data-skeleton] h3,\n [data-skeleton] h4,\n [data-skeleton] h5,\n [data-skeleton] h6 {\n background-color: #ddd !important;\n -webkit-animation: pulse 2s infinite ease-in-out;\n animation: pulse 2s infinite ease-in-out;\n margin-bottom: 1rem; }\n [data-skeleton] h1 {\n height: calc(0.6 * var(--fs-3xl)) !important; }\n [data-skeleton] h2 {\n height: calc(0.6 * var(--fs-2xl)) !important; }\n [data-skeleton] h3 {\n height: calc(0.6 * var(--fs-xl)) !important; }\n [data-skeleton] h4 {\n height: calc(0.6 * var(--fs-lg)) !important; }\n [data-skeleton] img {\n background-color: #ddd !important;\n -webkit-animation: pulse 2s infinite ease-in-out;\n animation: pulse 2s infinite ease-in-out; }\n\n/* basic styles */\n.skeleton {\n background-color: #ddd !important;\n -webkit-animation: pulse 2s infinite ease-in-out;\n animation: pulse 2s infinite ease-in-out;\n background: #dcdcdc;\n overflow: hidden;\n margin: 10px 0; }\n\n.skeleton.text {\n width: 100%;\n height: 12px; }\n\n.skeleton.paragraph {\n width: 100%;\n height: 70px; }\n\n.skeleton.title {\n width: 50%;\n height: 20px;\n margin-bottom: 15px; }\n\n.skeleton.avatar {\n width: 100px;\n height: 100px;\n border-radius: 50%; }\n\n.skeleton.thumbnail {\n width: 100px;\n height: 100px; }\n\n/* skeleton image text */\n.skeleton-image-content {\n display: flex;\n flex-direction: row;\n gap: 30px; }\n\n.skeleton-image-content__text {\n flex: 1 1 auto; }\n\n/* skeleton content */\n.skeleton-content {\n display: grid;\n grid-template-columns: 1fr;\n gap: 30px;\n align-items: left; }\n";
|
|
2096
|
-
styleInject(css_248z$a);
|
|
2097
|
-
|
|
2098
|
-
var GoASkeletonElement = function GoASkeletonElement(_ref) {
|
|
2099
|
-
var _ref$type = _ref.type,
|
|
2100
|
-
type = _ref$type === void 0 ? 'text' : _ref$type;
|
|
2101
|
-
var classes = "skeleton ".concat(type);
|
|
2102
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
2103
|
-
className: classes
|
|
2104
|
-
});
|
|
2105
|
-
};
|
|
2106
|
-
|
|
2107
|
-
var GoASkeletonContent = function GoASkeletonContent(_ref) {
|
|
2108
|
-
var _ref$rows = _ref.rows,
|
|
2109
|
-
rows = _ref$rows === void 0 ? 1 : _ref$rows;
|
|
2110
|
-
var elements = [];
|
|
2111
|
-
|
|
2112
|
-
for (var i = 0; i < rows; i++) {
|
|
2113
|
-
elements.push( /*#__PURE__*/React.createElement(GoASkeletonElement, {
|
|
2114
|
-
type: "text"
|
|
2115
|
-
}));
|
|
2116
|
-
}
|
|
2117
|
-
|
|
2095
|
+
var GoAFormItem = function GoAFormItem(_ref) {
|
|
2096
|
+
var children = _ref.children,
|
|
2097
|
+
helpText = _ref.helpText,
|
|
2098
|
+
error = _ref.error;
|
|
2099
|
+
var className = error ? "goa-form-item error" : "goa-form-item";
|
|
2118
2100
|
return /*#__PURE__*/React.createElement("div", {
|
|
2119
|
-
className:
|
|
2120
|
-
}, /*#__PURE__*/React.createElement("div",
|
|
2121
|
-
|
|
2122
|
-
}),
|
|
2101
|
+
className: className
|
|
2102
|
+
}, children, error && /*#__PURE__*/React.createElement("div", {
|
|
2103
|
+
className: "error-msg"
|
|
2104
|
+
}, error), helpText && !error && /*#__PURE__*/React.createElement("div", {
|
|
2105
|
+
id: "helpText",
|
|
2106
|
+
className: "help-msg"
|
|
2107
|
+
}, helpText));
|
|
2123
2108
|
};
|
|
2124
2109
|
|
|
2125
|
-
var
|
|
2126
|
-
var
|
|
2127
|
-
rows = _ref$rows === void 0 ? 1 : _ref$rows;
|
|
2128
|
-
var elements = [];
|
|
2129
|
-
|
|
2130
|
-
for (var i = 0; i < rows; i++) {
|
|
2131
|
-
elements.push( /*#__PURE__*/React.createElement(GoASkeletonElement, {
|
|
2132
|
-
type: "text"
|
|
2133
|
-
}));
|
|
2134
|
-
}
|
|
2135
|
-
|
|
2110
|
+
var GoAFormActions = function GoAFormActions(_ref) {
|
|
2111
|
+
var children = _ref.children;
|
|
2136
2112
|
return /*#__PURE__*/React.createElement("div", {
|
|
2137
|
-
className: "
|
|
2138
|
-
},
|
|
2113
|
+
className: "goa-form-actions"
|
|
2114
|
+
}, children);
|
|
2139
2115
|
};
|
|
2140
2116
|
|
|
2141
|
-
var
|
|
2142
|
-
|
|
2143
|
-
rows = _ref$rows === void 0 ? 1 : _ref$rows;
|
|
2144
|
-
var elements = [];
|
|
2145
|
-
|
|
2146
|
-
for (var i = 0; i < rows; i++) {
|
|
2147
|
-
elements.push( /*#__PURE__*/React.createElement(GoASkeletonElement, {
|
|
2148
|
-
type: "text"
|
|
2149
|
-
}));
|
|
2150
|
-
}
|
|
2117
|
+
var css_248z$6 = "/* Palette */\n/* Semantic usages */\n.goa-form {\n box-sizing: border-box; }\n\n.goa-form *,\n.goa-form *:before,\n.goa-form *:after {\n box-sizing: inherit; }\n\n.goa-form-item {\n margin-bottom: 0.5rem; }\n .goa-form-item label {\n display: block;\n font-weight: bold;\n color: #333; }\n .goa-form-item input,\n .goa-form-item textarea {\n display: block;\n width: 100%;\n padding: 0.5rem;\n border-radius: 4px;\n border: 1px solid var(--color-gray-600); }\n .goa-form-item.error input,\n .goa-form-item.error textarea {\n border-color: var(--color-red-600); }\n .goa-form-item.error .error-msg {\n color: var(--color-red-600); }\n .goa-form-item .help-msg {\n font-size: var(--fs-sm);\n font-weight: 200;\n color: var(--color-gray-600); }\n\n.goa-form-actions {\n margin-top: 2rem; }\n @media (min-width: 640px) {\n .goa-form-actions {\n display: flex;\n justify-content: flex-end;\n align-items: flex-end; }\n .goa-form-actions button {\n min-width: 6rem; }\n .goa-form-actions button + button,\n .goa-form-actions button + .goa-link-button,\n .goa-form-actions .goa-link-button + button,\n .goa-form-actions .goa-link-button + .goa-link-button {\n margin-left: 0.5rem; } }\n .goa-form-actions button {\n margin: 0; }\n";
|
|
2118
|
+
styleInject(css_248z$6);
|
|
2151
2119
|
|
|
2120
|
+
var GoAForm = function GoAForm(_ref) {
|
|
2121
|
+
var children = _ref.children;
|
|
2152
2122
|
return /*#__PURE__*/React.createElement("div", {
|
|
2153
|
-
className: "
|
|
2154
|
-
},
|
|
2155
|
-
type: "thumbnail"
|
|
2156
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
2157
|
-
className: "skeleton-image-content__text"
|
|
2158
|
-
}, /*#__PURE__*/React.createElement(GoASkeletonElement, {
|
|
2159
|
-
type: "title"
|
|
2160
|
-
}), elements));
|
|
2123
|
+
className: "goa-form"
|
|
2124
|
+
}, children);
|
|
2161
2125
|
};
|
|
2162
2126
|
|
|
2163
|
-
export { GoABadge,
|
|
2127
|
+
export { GoABadge, GoAForm, GoAFormActions, GoAFormItem, GoAIcon, GoAIconButton, GoAInput, GoAModal, GoAModalActions, GoAModalContent, GoAModalTitle, GoAScrollable, GoATransition, GoATransitionSequence };
|