@popsure/dirty-swan 0.55.3 → 0.56.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/dist/cjs/index.d.ts +2 -2
  2. package/dist/cjs/index.js +2688 -882
  3. package/dist/cjs/index.js.map +1 -1
  4. package/dist/cjs/lib/components/modal/fullScreenModal/index.d.ts +3 -0
  5. package/dist/cjs/lib/components/modal/index.d.ts +2 -1
  6. package/dist/cjs/lib/components/modal/index.stories.d.ts +4 -0
  7. package/dist/cjs/lib/hooks/useEscapeKey.d.ts +1 -0
  8. package/dist/cjs/lib/hooks/useFocusWithin.d.ts +1 -0
  9. package/dist/cjs/lib/index.d.ts +4 -2
  10. package/dist/esm/{Calendar-3239814b.js → Calendar-d39056f4.js} +9 -9
  11. package/dist/esm/{Calendar-3239814b.js.map → Calendar-d39056f4.js.map} +1 -1
  12. package/dist/esm/{TableSection-a1be2bd3.js → TableSection-24337bc7.js} +1 -1
  13. package/dist/esm/{TableSection-a1be2bd3.js.map → TableSection-24337bc7.js.map} +1 -1
  14. package/dist/esm/components/accordion/index.js +1 -1
  15. package/dist/esm/components/accordion/index.stories.js +1 -1
  16. package/dist/esm/components/autocompleteAddress/index.test.js +1 -1
  17. package/dist/esm/components/badge/index.test.js +1 -1
  18. package/dist/esm/components/button/index.js +4 -4
  19. package/dist/esm/components/button/index.js.map +1 -1
  20. package/dist/esm/components/button/index.test.js +1 -1
  21. package/dist/esm/components/comparisonTable/components/AccordionItem/AccordionItem.js +1 -1
  22. package/dist/esm/components/comparisonTable/components/AccordionItem/index.js +1 -1
  23. package/dist/esm/components/comparisonTable/components/Row/index.js +2 -2
  24. package/dist/esm/components/comparisonTable/components/Row/index.js.map +1 -1
  25. package/dist/esm/components/comparisonTable/components/TableButton/index.test.js +2 -2
  26. package/dist/esm/components/comparisonTable/components/TableRowHeader/index.test.js +2 -2
  27. package/dist/esm/components/comparisonTable/index.js +2 -2
  28. package/dist/esm/components/comparisonTable/index.stories.js +2 -2
  29. package/dist/esm/components/dateSelector/components/Calendar.js +1 -1
  30. package/dist/esm/components/dateSelector/index.js +1 -1
  31. package/dist/esm/components/dateSelector/index.stories.js +1 -1
  32. package/dist/esm/components/dateSelector/index.test.js +2 -2
  33. package/dist/esm/components/informationBox/index.test.js +1 -1
  34. package/dist/esm/components/input/autoSuggestInput/index.js +8 -998
  35. package/dist/esm/components/input/autoSuggestInput/index.js.map +1 -1
  36. package/dist/esm/components/input/autoSuggestInput/index.stories.js +1 -0
  37. package/dist/esm/components/input/autoSuggestInput/index.stories.js.map +1 -1
  38. package/dist/esm/components/input/autoSuggestMultiSelect/index.js +1 -0
  39. package/dist/esm/components/input/autoSuggestMultiSelect/index.js.map +1 -1
  40. package/dist/esm/components/input/autoSuggestMultiSelect/index.stories.js +1 -0
  41. package/dist/esm/components/input/autoSuggestMultiSelect/index.stories.js.map +1 -1
  42. package/dist/esm/components/input/checkbox/index.test.js +1 -1
  43. package/dist/esm/components/input/currency/index.test.js +1 -1
  44. package/dist/esm/components/input/index.js +2 -2
  45. package/dist/esm/components/input/index.js.map +1 -1
  46. package/dist/esm/components/input/radio/index.test.js +1 -1
  47. package/dist/esm/components/input/toggle/index.test.js +1 -1
  48. package/dist/esm/components/modal/bottomModal/index.js +2 -0
  49. package/dist/esm/components/modal/bottomModal/index.js.map +1 -1
  50. package/dist/esm/components/modal/bottomOrRegularModal/index.js +2 -0
  51. package/dist/esm/components/modal/bottomOrRegularModal/index.js.map +1 -1
  52. package/dist/esm/components/modal/fullScreenModal/index.js +33 -0
  53. package/dist/esm/components/modal/fullScreenModal/index.js.map +1 -0
  54. package/dist/esm/components/modal/genericModal/index.js +1751 -13
  55. package/dist/esm/components/modal/genericModal/index.js.map +1 -1
  56. package/dist/esm/components/modal/index.stories.js +20 -7
  57. package/dist/esm/components/modal/index.stories.js.map +1 -1
  58. package/dist/esm/components/modal/regularModal/index.js +2 -0
  59. package/dist/esm/components/modal/regularModal/index.js.map +1 -1
  60. package/dist/esm/components/multiDropzone/index.js +3 -3
  61. package/dist/esm/components/multiDropzone/index.js.map +1 -1
  62. package/dist/esm/components/multiDropzone/index.stories.js +1 -1
  63. package/dist/esm/components/multiDropzone/index.test.js +3 -3
  64. package/dist/esm/components/segmentedControl/index.test.js +1 -1
  65. package/dist/esm/components/signaturePad/index.js +2 -2
  66. package/dist/esm/components/signaturePad/index.js.map +1 -1
  67. package/dist/esm/components/spinner/index.test.js +1 -1
  68. package/dist/esm/components/table/Table.js +4 -2
  69. package/dist/esm/components/table/Table.js.map +1 -1
  70. package/dist/esm/components/table/Table.stories.js +4 -2
  71. package/dist/esm/components/table/Table.stories.js.map +1 -1
  72. package/dist/esm/components/table/Table.test.js +5 -3
  73. package/dist/esm/components/table/Table.test.js.map +1 -1
  74. package/dist/esm/components/table/components/TableCell/BaseCell/BaseCell.js +1 -1
  75. package/dist/esm/components/table/components/TableCell/BaseCell/BaseCell.stories.js +1 -1
  76. package/dist/esm/components/table/components/TableCell/TableCell.js +3 -3
  77. package/dist/esm/components/table/components/TableCell/TableCell.js.map +1 -1
  78. package/dist/esm/components/table/components/TableCell/TableCell.test.js +2 -2
  79. package/dist/esm/components/table/components/TableContents/TableContents.js +2 -2
  80. package/dist/esm/components/table/components/TableContents/TableContents.test.js +3 -3
  81. package/dist/esm/components/table/components/TableControls/TableControls.test.js +1 -1
  82. package/dist/esm/components/table/components/TableSection/TableSection.js +2 -2
  83. package/dist/esm/components/table/components/TableSection/TableSection.test.js +3 -3
  84. package/dist/esm/components/toast/index.js +1 -1
  85. package/dist/esm/components/toast/index.stories.js +1 -1
  86. package/dist/esm/components/toast/index.test.js +2 -2
  87. package/dist/esm/{customRender-d03c10b6.js → customRender-be47569b.js} +4 -4
  88. package/dist/esm/{customRender-d03c10b6.js.map → customRender-be47569b.js.map} +1 -1
  89. package/dist/esm/index-171a0108.js +997 -0
  90. package/dist/esm/index-171a0108.js.map +1 -0
  91. package/dist/esm/{index-3aa7e697.js → index-4b19aafb.js} +4 -4
  92. package/dist/esm/{index-3aa7e697.js.map → index-4b19aafb.js.map} +1 -1
  93. package/dist/esm/{index-6f567b0b.js → index-86558de6.js} +2 -2
  94. package/dist/esm/{index-6f567b0b.js.map → index-86558de6.js.map} +1 -1
  95. package/dist/esm/{index-3d286178.js → index-af1860d8.js} +3 -3
  96. package/dist/esm/{index-3d286178.js.map → index-af1860d8.js.map} +1 -1
  97. package/dist/esm/{index-a0ef2ab4.js → index-e27b50cf.js} +4 -4
  98. package/dist/esm/{index-a0ef2ab4.js.map → index-e27b50cf.js.map} +1 -1
  99. package/dist/esm/index.d.ts +2 -2
  100. package/dist/esm/index.js +36 -6
  101. package/dist/esm/index.js.map +1 -1
  102. package/dist/esm/lib/components/modal/fullScreenModal/index.d.ts +3 -0
  103. package/dist/esm/lib/components/modal/index.d.ts +2 -1
  104. package/dist/esm/lib/components/modal/index.stories.d.ts +4 -0
  105. package/dist/esm/lib/hooks/useEscapeKey.d.ts +1 -0
  106. package/dist/esm/lib/hooks/useFocusWithin.d.ts +1 -0
  107. package/dist/esm/lib/index.d.ts +4 -2
  108. package/dist/esm/util/testUtils/customRender.js +1 -1
  109. package/package.json +2 -1
  110. package/src/index.tsx +4 -1
  111. package/src/lib/components/modal/fullScreenModal/index.tsx +24 -0
  112. package/src/lib/components/modal/fullScreenModal/style.module.scss +49 -0
  113. package/src/lib/components/modal/genericModal/index.tsx +71 -78
  114. package/src/lib/components/modal/hooks/useOnClose.ts +10 -8
  115. package/src/lib/components/modal/index.stories.tsx +54 -6
  116. package/src/lib/components/modal/index.ts +2 -1
  117. package/src/lib/hooks/useEscapeKey.ts +18 -0
  118. package/src/lib/hooks/useFocusWithin.ts +22 -0
  119. package/src/lib/index.tsx +6 -0
@@ -1,1005 +1,15 @@
1
1
  import { a as __assign } from '../../../tslib.es6-a39f91fc.js';
2
2
  import { jsx, jsxs } from 'react/jsx-runtime';
3
3
  import { c as classNames } from '../../../index-6ea95111.js';
4
- import require$$0__default from 'react';
5
- import { o as objectAssign$1 } from '../../../index-dd80248b.js';
4
+ import React__default from 'react';
5
+ import { p as propTypes } from '../../../index-171a0108.js';
6
6
  import { s as styleInject } from '../../../style-inject.es-1f59c1d0.js';
7
7
  import { Input } from '../index.js';
8
+ import '../../../index-dd80248b.js';
8
9
  import '../../../index-69a46657.js';
9
10
 
10
11
  var Autosuggest = {};
11
12
 
12
- var propTypes = {exports: {}};
13
-
14
- var reactIs = {exports: {}};
15
-
16
- var reactIs_production_min = {};
17
-
18
- /** @license React v16.13.1
19
- * react-is.production.min.js
20
- *
21
- * Copyright (c) Facebook, Inc. and its affiliates.
22
- *
23
- * This source code is licensed under the MIT license found in the
24
- * LICENSE file in the root directory of this source tree.
25
- */
26
- 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?
27
- 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;
28
- 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}reactIs_production_min.AsyncMode=l;reactIs_production_min.ConcurrentMode=m;reactIs_production_min.ContextConsumer=k;reactIs_production_min.ContextProvider=h;reactIs_production_min.Element=c;reactIs_production_min.ForwardRef=n;reactIs_production_min.Fragment=e;reactIs_production_min.Lazy=t;reactIs_production_min.Memo=r;reactIs_production_min.Portal=d;
29
- reactIs_production_min.Profiler=g;reactIs_production_min.StrictMode=f;reactIs_production_min.Suspense=p;reactIs_production_min.isAsyncMode=function(a){return A(a)||z(a)===l};reactIs_production_min.isConcurrentMode=A;reactIs_production_min.isContextConsumer=function(a){return z(a)===k};reactIs_production_min.isContextProvider=function(a){return z(a)===h};reactIs_production_min.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===c};reactIs_production_min.isForwardRef=function(a){return z(a)===n};reactIs_production_min.isFragment=function(a){return z(a)===e};reactIs_production_min.isLazy=function(a){return z(a)===t};
30
- reactIs_production_min.isMemo=function(a){return z(a)===r};reactIs_production_min.isPortal=function(a){return z(a)===d};reactIs_production_min.isProfiler=function(a){return z(a)===g};reactIs_production_min.isStrictMode=function(a){return z(a)===f};reactIs_production_min.isSuspense=function(a){return z(a)===p};
31
- reactIs_production_min.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)};reactIs_production_min.typeOf=z;
32
-
33
- var reactIs_development = {};
34
-
35
- /** @license React v16.13.1
36
- * react-is.development.js
37
- *
38
- * Copyright (c) Facebook, Inc. and its affiliates.
39
- *
40
- * This source code is licensed under the MIT license found in the
41
- * LICENSE file in the root directory of this source tree.
42
- */
43
-
44
-
45
-
46
- if (process.env.NODE_ENV !== "production") {
47
- (function() {
48
-
49
- // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
50
- // nor polyfill, then a plain number is used for performance.
51
- var hasSymbol = typeof Symbol === 'function' && Symbol.for;
52
- var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
53
- var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
54
- var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
55
- var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
56
- var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
57
- var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
58
- var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
59
- // (unstable) APIs that have been removed. Can we remove the symbols?
60
-
61
- var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
62
- var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
63
- var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
64
- var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
65
- var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
66
- var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
67
- var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
68
- var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
69
- var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
70
- var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
71
- var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
72
-
73
- function isValidElementType(type) {
74
- return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
75
- 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);
76
- }
77
-
78
- function typeOf(object) {
79
- if (typeof object === 'object' && object !== null) {
80
- var $$typeof = object.$$typeof;
81
-
82
- switch ($$typeof) {
83
- case REACT_ELEMENT_TYPE:
84
- var type = object.type;
85
-
86
- switch (type) {
87
- case REACT_ASYNC_MODE_TYPE:
88
- case REACT_CONCURRENT_MODE_TYPE:
89
- case REACT_FRAGMENT_TYPE:
90
- case REACT_PROFILER_TYPE:
91
- case REACT_STRICT_MODE_TYPE:
92
- case REACT_SUSPENSE_TYPE:
93
- return type;
94
-
95
- default:
96
- var $$typeofType = type && type.$$typeof;
97
-
98
- switch ($$typeofType) {
99
- case REACT_CONTEXT_TYPE:
100
- case REACT_FORWARD_REF_TYPE:
101
- case REACT_LAZY_TYPE:
102
- case REACT_MEMO_TYPE:
103
- case REACT_PROVIDER_TYPE:
104
- return $$typeofType;
105
-
106
- default:
107
- return $$typeof;
108
- }
109
-
110
- }
111
-
112
- case REACT_PORTAL_TYPE:
113
- return $$typeof;
114
- }
115
- }
116
-
117
- return undefined;
118
- } // AsyncMode is deprecated along with isAsyncMode
119
-
120
- var AsyncMode = REACT_ASYNC_MODE_TYPE;
121
- var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
122
- var ContextConsumer = REACT_CONTEXT_TYPE;
123
- var ContextProvider = REACT_PROVIDER_TYPE;
124
- var Element = REACT_ELEMENT_TYPE;
125
- var ForwardRef = REACT_FORWARD_REF_TYPE;
126
- var Fragment = REACT_FRAGMENT_TYPE;
127
- var Lazy = REACT_LAZY_TYPE;
128
- var Memo = REACT_MEMO_TYPE;
129
- var Portal = REACT_PORTAL_TYPE;
130
- var Profiler = REACT_PROFILER_TYPE;
131
- var StrictMode = REACT_STRICT_MODE_TYPE;
132
- var Suspense = REACT_SUSPENSE_TYPE;
133
- var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
134
-
135
- function isAsyncMode(object) {
136
- {
137
- if (!hasWarnedAboutDeprecatedIsAsyncMode) {
138
- hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
139
-
140
- 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.');
141
- }
142
- }
143
-
144
- return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
145
- }
146
- function isConcurrentMode(object) {
147
- return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
148
- }
149
- function isContextConsumer(object) {
150
- return typeOf(object) === REACT_CONTEXT_TYPE;
151
- }
152
- function isContextProvider(object) {
153
- return typeOf(object) === REACT_PROVIDER_TYPE;
154
- }
155
- function isElement(object) {
156
- return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
157
- }
158
- function isForwardRef(object) {
159
- return typeOf(object) === REACT_FORWARD_REF_TYPE;
160
- }
161
- function isFragment(object) {
162
- return typeOf(object) === REACT_FRAGMENT_TYPE;
163
- }
164
- function isLazy(object) {
165
- return typeOf(object) === REACT_LAZY_TYPE;
166
- }
167
- function isMemo(object) {
168
- return typeOf(object) === REACT_MEMO_TYPE;
169
- }
170
- function isPortal(object) {
171
- return typeOf(object) === REACT_PORTAL_TYPE;
172
- }
173
- function isProfiler(object) {
174
- return typeOf(object) === REACT_PROFILER_TYPE;
175
- }
176
- function isStrictMode(object) {
177
- return typeOf(object) === REACT_STRICT_MODE_TYPE;
178
- }
179
- function isSuspense(object) {
180
- return typeOf(object) === REACT_SUSPENSE_TYPE;
181
- }
182
-
183
- reactIs_development.AsyncMode = AsyncMode;
184
- reactIs_development.ConcurrentMode = ConcurrentMode;
185
- reactIs_development.ContextConsumer = ContextConsumer;
186
- reactIs_development.ContextProvider = ContextProvider;
187
- reactIs_development.Element = Element;
188
- reactIs_development.ForwardRef = ForwardRef;
189
- reactIs_development.Fragment = Fragment;
190
- reactIs_development.Lazy = Lazy;
191
- reactIs_development.Memo = Memo;
192
- reactIs_development.Portal = Portal;
193
- reactIs_development.Profiler = Profiler;
194
- reactIs_development.StrictMode = StrictMode;
195
- reactIs_development.Suspense = Suspense;
196
- reactIs_development.isAsyncMode = isAsyncMode;
197
- reactIs_development.isConcurrentMode = isConcurrentMode;
198
- reactIs_development.isContextConsumer = isContextConsumer;
199
- reactIs_development.isContextProvider = isContextProvider;
200
- reactIs_development.isElement = isElement;
201
- reactIs_development.isForwardRef = isForwardRef;
202
- reactIs_development.isFragment = isFragment;
203
- reactIs_development.isLazy = isLazy;
204
- reactIs_development.isMemo = isMemo;
205
- reactIs_development.isPortal = isPortal;
206
- reactIs_development.isProfiler = isProfiler;
207
- reactIs_development.isStrictMode = isStrictMode;
208
- reactIs_development.isSuspense = isSuspense;
209
- reactIs_development.isValidElementType = isValidElementType;
210
- reactIs_development.typeOf = typeOf;
211
- })();
212
- }
213
-
214
- if (process.env.NODE_ENV === 'production') {
215
- reactIs.exports = reactIs_production_min;
216
- } else {
217
- reactIs.exports = reactIs_development;
218
- }
219
-
220
- /**
221
- * Copyright (c) 2013-present, Facebook, Inc.
222
- *
223
- * This source code is licensed under the MIT license found in the
224
- * LICENSE file in the root directory of this source tree.
225
- */
226
-
227
- var ReactPropTypesSecret$3 = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
228
-
229
- var ReactPropTypesSecret_1 = ReactPropTypesSecret$3;
230
-
231
- /**
232
- * Copyright (c) 2013-present, Facebook, Inc.
233
- *
234
- * This source code is licensed under the MIT license found in the
235
- * LICENSE file in the root directory of this source tree.
236
- */
237
-
238
- var printWarning$1 = function() {};
239
-
240
- if (process.env.NODE_ENV !== 'production') {
241
- var ReactPropTypesSecret$2 = ReactPropTypesSecret_1;
242
- var loggedTypeFailures = {};
243
- var has$1 = Function.call.bind(Object.prototype.hasOwnProperty);
244
-
245
- printWarning$1 = function(text) {
246
- var message = 'Warning: ' + text;
247
- if (typeof console !== 'undefined') {
248
- console.error(message);
249
- }
250
- try {
251
- // --- Welcome to debugging React ---
252
- // This error was thrown as a convenience so that you can use this stack
253
- // to find the callsite that caused this warning to fire.
254
- throw new Error(message);
255
- } catch (x) {}
256
- };
257
- }
258
-
259
- /**
260
- * Assert that the values match with the type specs.
261
- * Error messages are memorized and will only be shown once.
262
- *
263
- * @param {object} typeSpecs Map of name to a ReactPropType
264
- * @param {object} values Runtime values that need to be type-checked
265
- * @param {string} location e.g. "prop", "context", "child context"
266
- * @param {string} componentName Name of the component for error messages.
267
- * @param {?Function} getStack Returns the component stack.
268
- * @private
269
- */
270
- function checkPropTypes$1(typeSpecs, values, location, componentName, getStack) {
271
- if (process.env.NODE_ENV !== 'production') {
272
- for (var typeSpecName in typeSpecs) {
273
- if (has$1(typeSpecs, typeSpecName)) {
274
- var error;
275
- // Prop type validation may throw. In case they do, we don't want to
276
- // fail the render phase where it didn't fail before. So we log it.
277
- // After these have been cleaned up, we'll let them throw.
278
- try {
279
- // This is intentionally an invariant that gets caught. It's the same
280
- // behavior as without this statement except with a better message.
281
- if (typeof typeSpecs[typeSpecName] !== 'function') {
282
- var err = Error(
283
- (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
284
- 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.'
285
- );
286
- err.name = 'Invariant Violation';
287
- throw err;
288
- }
289
- error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret$2);
290
- } catch (ex) {
291
- error = ex;
292
- }
293
- if (error && !(error instanceof Error)) {
294
- printWarning$1(
295
- (componentName || 'React class') + ': type specification of ' +
296
- location + ' `' + typeSpecName + '` is invalid; the type checker ' +
297
- 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
298
- 'You may have forgotten to pass an argument to the type checker ' +
299
- 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
300
- 'shape all require an argument).'
301
- );
302
- }
303
- if (error instanceof Error && !(error.message in loggedTypeFailures)) {
304
- // Only monitor this failure once because there tends to be a lot of the
305
- // same error.
306
- loggedTypeFailures[error.message] = true;
307
-
308
- var stack = getStack ? getStack() : '';
309
-
310
- printWarning$1(
311
- 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
312
- );
313
- }
314
- }
315
- }
316
- }
317
- }
318
-
319
- /**
320
- * Resets warning cache when testing.
321
- *
322
- * @private
323
- */
324
- checkPropTypes$1.resetWarningCache = function() {
325
- if (process.env.NODE_ENV !== 'production') {
326
- loggedTypeFailures = {};
327
- }
328
- };
329
-
330
- var checkPropTypes_1 = checkPropTypes$1;
331
-
332
- /**
333
- * Copyright (c) 2013-present, Facebook, Inc.
334
- *
335
- * This source code is licensed under the MIT license found in the
336
- * LICENSE file in the root directory of this source tree.
337
- */
338
-
339
- var ReactIs$1 = reactIs.exports;
340
- var assign = objectAssign$1;
341
-
342
- var ReactPropTypesSecret$1 = ReactPropTypesSecret_1;
343
- var checkPropTypes = checkPropTypes_1;
344
-
345
- var has = Function.call.bind(Object.prototype.hasOwnProperty);
346
- var printWarning = function() {};
347
-
348
- if (process.env.NODE_ENV !== 'production') {
349
- printWarning = function(text) {
350
- var message = 'Warning: ' + text;
351
- if (typeof console !== 'undefined') {
352
- console.error(message);
353
- }
354
- try {
355
- // --- Welcome to debugging React ---
356
- // This error was thrown as a convenience so that you can use this stack
357
- // to find the callsite that caused this warning to fire.
358
- throw new Error(message);
359
- } catch (x) {}
360
- };
361
- }
362
-
363
- function emptyFunctionThatReturnsNull() {
364
- return null;
365
- }
366
-
367
- var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
368
- /* global Symbol */
369
- var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
370
- var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
371
-
372
- /**
373
- * Returns the iterator method function contained on the iterable object.
374
- *
375
- * Be sure to invoke the function with the iterable as context:
376
- *
377
- * var iteratorFn = getIteratorFn(myIterable);
378
- * if (iteratorFn) {
379
- * var iterator = iteratorFn.call(myIterable);
380
- * ...
381
- * }
382
- *
383
- * @param {?object} maybeIterable
384
- * @return {?function}
385
- */
386
- function getIteratorFn(maybeIterable) {
387
- var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
388
- if (typeof iteratorFn === 'function') {
389
- return iteratorFn;
390
- }
391
- }
392
-
393
- /**
394
- * Collection of methods that allow declaration and validation of props that are
395
- * supplied to React components. Example usage:
396
- *
397
- * var Props = require('ReactPropTypes');
398
- * var MyArticle = React.createClass({
399
- * propTypes: {
400
- * // An optional string prop named "description".
401
- * description: Props.string,
402
- *
403
- * // A required enum prop named "category".
404
- * category: Props.oneOf(['News','Photos']).isRequired,
405
- *
406
- * // A prop named "dialog" that requires an instance of Dialog.
407
- * dialog: Props.instanceOf(Dialog).isRequired
408
- * },
409
- * render: function() { ... }
410
- * });
411
- *
412
- * A more formal specification of how these methods are used:
413
- *
414
- * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
415
- * decl := ReactPropTypes.{type}(.isRequired)?
416
- *
417
- * Each and every declaration produces a function with the same signature. This
418
- * allows the creation of custom validation functions. For example:
419
- *
420
- * var MyLink = React.createClass({
421
- * propTypes: {
422
- * // An optional string or URI prop named "href".
423
- * href: function(props, propName, componentName) {
424
- * var propValue = props[propName];
425
- * if (propValue != null && typeof propValue !== 'string' &&
426
- * !(propValue instanceof URI)) {
427
- * return new Error(
428
- * 'Expected a string or an URI for ' + propName + ' in ' +
429
- * componentName
430
- * );
431
- * }
432
- * }
433
- * },
434
- * render: function() {...}
435
- * });
436
- *
437
- * @internal
438
- */
439
-
440
- var ANONYMOUS = '<<anonymous>>';
441
-
442
- // Important!
443
- // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
444
- var ReactPropTypes = {
445
- array: createPrimitiveTypeChecker('array'),
446
- bool: createPrimitiveTypeChecker('boolean'),
447
- func: createPrimitiveTypeChecker('function'),
448
- number: createPrimitiveTypeChecker('number'),
449
- object: createPrimitiveTypeChecker('object'),
450
- string: createPrimitiveTypeChecker('string'),
451
- symbol: createPrimitiveTypeChecker('symbol'),
452
-
453
- any: createAnyTypeChecker(),
454
- arrayOf: createArrayOfTypeChecker,
455
- element: createElementTypeChecker(),
456
- elementType: createElementTypeTypeChecker(),
457
- instanceOf: createInstanceTypeChecker,
458
- node: createNodeChecker(),
459
- objectOf: createObjectOfTypeChecker,
460
- oneOf: createEnumTypeChecker,
461
- oneOfType: createUnionTypeChecker,
462
- shape: createShapeTypeChecker,
463
- exact: createStrictShapeTypeChecker,
464
- };
465
-
466
- /**
467
- * inlined Object.is polyfill to avoid requiring consumers ship their own
468
- * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
469
- */
470
- /*eslint-disable no-self-compare*/
471
- function is(x, y) {
472
- // SameValue algorithm
473
- if (x === y) {
474
- // Steps 1-5, 7-10
475
- // Steps 6.b-6.e: +0 != -0
476
- return x !== 0 || 1 / x === 1 / y;
477
- } else {
478
- // Step 6.a: NaN == NaN
479
- return x !== x && y !== y;
480
- }
481
- }
482
- /*eslint-enable no-self-compare*/
483
-
484
- /**
485
- * We use an Error-like object for backward compatibility as people may call
486
- * PropTypes directly and inspect their output. However, we don't use real
487
- * Errors anymore. We don't inspect their stack anyway, and creating them
488
- * is prohibitively expensive if they are created too often, such as what
489
- * happens in oneOfType() for any type before the one that matched.
490
- */
491
- function PropTypeError(message) {
492
- this.message = message;
493
- this.stack = '';
494
- }
495
- // Make `instanceof Error` still work for returned errors.
496
- PropTypeError.prototype = Error.prototype;
497
-
498
- function createChainableTypeChecker(validate) {
499
- if (process.env.NODE_ENV !== 'production') {
500
- var manualPropTypeCallCache = {};
501
- var manualPropTypeWarningCount = 0;
502
- }
503
- function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
504
- componentName = componentName || ANONYMOUS;
505
- propFullName = propFullName || propName;
506
-
507
- if (secret !== ReactPropTypesSecret$1) {
508
- if (throwOnDirectAccess) {
509
- // New behavior only for users of `prop-types` package
510
- var err = new Error(
511
- 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
512
- 'Use `PropTypes.checkPropTypes()` to call them. ' +
513
- 'Read more at http://fb.me/use-check-prop-types'
514
- );
515
- err.name = 'Invariant Violation';
516
- throw err;
517
- } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
518
- // Old behavior for people using React.PropTypes
519
- var cacheKey = componentName + ':' + propName;
520
- if (
521
- !manualPropTypeCallCache[cacheKey] &&
522
- // Avoid spamming the console because they are often not actionable except for lib authors
523
- manualPropTypeWarningCount < 3
524
- ) {
525
- printWarning(
526
- 'You are manually calling a React.PropTypes validation ' +
527
- 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
528
- 'and will throw in the standalone `prop-types` package. ' +
529
- 'You may be seeing this warning due to a third-party PropTypes ' +
530
- 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
531
- );
532
- manualPropTypeCallCache[cacheKey] = true;
533
- manualPropTypeWarningCount++;
534
- }
535
- }
536
- }
537
- if (props[propName] == null) {
538
- if (isRequired) {
539
- if (props[propName] === null) {
540
- return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
541
- }
542
- return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
543
- }
544
- return null;
545
- } else {
546
- return validate(props, propName, componentName, location, propFullName);
547
- }
548
- }
549
-
550
- var chainedCheckType = checkType.bind(null, false);
551
- chainedCheckType.isRequired = checkType.bind(null, true);
552
-
553
- return chainedCheckType;
554
- }
555
-
556
- function createPrimitiveTypeChecker(expectedType) {
557
- function validate(props, propName, componentName, location, propFullName, secret) {
558
- var propValue = props[propName];
559
- var propType = getPropType(propValue);
560
- if (propType !== expectedType) {
561
- // `propValue` being instance of, say, date/regexp, pass the 'object'
562
- // check, but we can offer a more precise error message here rather than
563
- // 'of type `object`'.
564
- var preciseType = getPreciseType(propValue);
565
-
566
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
567
- }
568
- return null;
569
- }
570
- return createChainableTypeChecker(validate);
571
- }
572
-
573
- function createAnyTypeChecker() {
574
- return createChainableTypeChecker(emptyFunctionThatReturnsNull);
575
- }
576
-
577
- function createArrayOfTypeChecker(typeChecker) {
578
- function validate(props, propName, componentName, location, propFullName) {
579
- if (typeof typeChecker !== 'function') {
580
- return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
581
- }
582
- var propValue = props[propName];
583
- if (!Array.isArray(propValue)) {
584
- var propType = getPropType(propValue);
585
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
586
- }
587
- for (var i = 0; i < propValue.length; i++) {
588
- var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret$1);
589
- if (error instanceof Error) {
590
- return error;
591
- }
592
- }
593
- return null;
594
- }
595
- return createChainableTypeChecker(validate);
596
- }
597
-
598
- function createElementTypeChecker() {
599
- function validate(props, propName, componentName, location, propFullName) {
600
- var propValue = props[propName];
601
- if (!isValidElement(propValue)) {
602
- var propType = getPropType(propValue);
603
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
604
- }
605
- return null;
606
- }
607
- return createChainableTypeChecker(validate);
608
- }
609
-
610
- function createElementTypeTypeChecker() {
611
- function validate(props, propName, componentName, location, propFullName) {
612
- var propValue = props[propName];
613
- if (!ReactIs$1.isValidElementType(propValue)) {
614
- var propType = getPropType(propValue);
615
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
616
- }
617
- return null;
618
- }
619
- return createChainableTypeChecker(validate);
620
- }
621
-
622
- function createInstanceTypeChecker(expectedClass) {
623
- function validate(props, propName, componentName, location, propFullName) {
624
- if (!(props[propName] instanceof expectedClass)) {
625
- var expectedClassName = expectedClass.name || ANONYMOUS;
626
- var actualClassName = getClassName(props[propName]);
627
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
628
- }
629
- return null;
630
- }
631
- return createChainableTypeChecker(validate);
632
- }
633
-
634
- function createEnumTypeChecker(expectedValues) {
635
- if (!Array.isArray(expectedValues)) {
636
- if (process.env.NODE_ENV !== 'production') {
637
- if (arguments.length > 1) {
638
- printWarning(
639
- 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
640
- 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
641
- );
642
- } else {
643
- printWarning('Invalid argument supplied to oneOf, expected an array.');
644
- }
645
- }
646
- return emptyFunctionThatReturnsNull;
647
- }
648
-
649
- function validate(props, propName, componentName, location, propFullName) {
650
- var propValue = props[propName];
651
- for (var i = 0; i < expectedValues.length; i++) {
652
- if (is(propValue, expectedValues[i])) {
653
- return null;
654
- }
655
- }
656
-
657
- var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
658
- var type = getPreciseType(value);
659
- if (type === 'symbol') {
660
- return String(value);
661
- }
662
- return value;
663
- });
664
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
665
- }
666
- return createChainableTypeChecker(validate);
667
- }
668
-
669
- function createObjectOfTypeChecker(typeChecker) {
670
- function validate(props, propName, componentName, location, propFullName) {
671
- if (typeof typeChecker !== 'function') {
672
- return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
673
- }
674
- var propValue = props[propName];
675
- var propType = getPropType(propValue);
676
- if (propType !== 'object') {
677
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
678
- }
679
- for (var key in propValue) {
680
- if (has(propValue, key)) {
681
- var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret$1);
682
- if (error instanceof Error) {
683
- return error;
684
- }
685
- }
686
- }
687
- return null;
688
- }
689
- return createChainableTypeChecker(validate);
690
- }
691
-
692
- function createUnionTypeChecker(arrayOfTypeCheckers) {
693
- if (!Array.isArray(arrayOfTypeCheckers)) {
694
- process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
695
- return emptyFunctionThatReturnsNull;
696
- }
697
-
698
- for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
699
- var checker = arrayOfTypeCheckers[i];
700
- if (typeof checker !== 'function') {
701
- printWarning(
702
- 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
703
- 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
704
- );
705
- return emptyFunctionThatReturnsNull;
706
- }
707
- }
708
-
709
- function validate(props, propName, componentName, location, propFullName) {
710
- for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
711
- var checker = arrayOfTypeCheckers[i];
712
- if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret$1) == null) {
713
- return null;
714
- }
715
- }
716
-
717
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
718
- }
719
- return createChainableTypeChecker(validate);
720
- }
721
-
722
- function createNodeChecker() {
723
- function validate(props, propName, componentName, location, propFullName) {
724
- if (!isNode(props[propName])) {
725
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
726
- }
727
- return null;
728
- }
729
- return createChainableTypeChecker(validate);
730
- }
731
-
732
- function createShapeTypeChecker(shapeTypes) {
733
- function validate(props, propName, componentName, location, propFullName) {
734
- var propValue = props[propName];
735
- var propType = getPropType(propValue);
736
- if (propType !== 'object') {
737
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
738
- }
739
- for (var key in shapeTypes) {
740
- var checker = shapeTypes[key];
741
- if (!checker) {
742
- continue;
743
- }
744
- var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret$1);
745
- if (error) {
746
- return error;
747
- }
748
- }
749
- return null;
750
- }
751
- return createChainableTypeChecker(validate);
752
- }
753
-
754
- function createStrictShapeTypeChecker(shapeTypes) {
755
- function validate(props, propName, componentName, location, propFullName) {
756
- var propValue = props[propName];
757
- var propType = getPropType(propValue);
758
- if (propType !== 'object') {
759
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
760
- }
761
- // We need to check all keys in case some are required but missing from
762
- // props.
763
- var allKeys = assign({}, props[propName], shapeTypes);
764
- for (var key in allKeys) {
765
- var checker = shapeTypes[key];
766
- if (!checker) {
767
- return new PropTypeError(
768
- 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
769
- '\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
770
- '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
771
- );
772
- }
773
- var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret$1);
774
- if (error) {
775
- return error;
776
- }
777
- }
778
- return null;
779
- }
780
-
781
- return createChainableTypeChecker(validate);
782
- }
783
-
784
- function isNode(propValue) {
785
- switch (typeof propValue) {
786
- case 'number':
787
- case 'string':
788
- case 'undefined':
789
- return true;
790
- case 'boolean':
791
- return !propValue;
792
- case 'object':
793
- if (Array.isArray(propValue)) {
794
- return propValue.every(isNode);
795
- }
796
- if (propValue === null || isValidElement(propValue)) {
797
- return true;
798
- }
799
-
800
- var iteratorFn = getIteratorFn(propValue);
801
- if (iteratorFn) {
802
- var iterator = iteratorFn.call(propValue);
803
- var step;
804
- if (iteratorFn !== propValue.entries) {
805
- while (!(step = iterator.next()).done) {
806
- if (!isNode(step.value)) {
807
- return false;
808
- }
809
- }
810
- } else {
811
- // Iterator will provide entry [k,v] tuples rather than values.
812
- while (!(step = iterator.next()).done) {
813
- var entry = step.value;
814
- if (entry) {
815
- if (!isNode(entry[1])) {
816
- return false;
817
- }
818
- }
819
- }
820
- }
821
- } else {
822
- return false;
823
- }
824
-
825
- return true;
826
- default:
827
- return false;
828
- }
829
- }
830
-
831
- function isSymbol(propType, propValue) {
832
- // Native Symbol.
833
- if (propType === 'symbol') {
834
- return true;
835
- }
836
-
837
- // falsy value can't be a Symbol
838
- if (!propValue) {
839
- return false;
840
- }
841
-
842
- // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
843
- if (propValue['@@toStringTag'] === 'Symbol') {
844
- return true;
845
- }
846
-
847
- // Fallback for non-spec compliant Symbols which are polyfilled.
848
- if (typeof Symbol === 'function' && propValue instanceof Symbol) {
849
- return true;
850
- }
851
-
852
- return false;
853
- }
854
-
855
- // Equivalent of `typeof` but with special handling for array and regexp.
856
- function getPropType(propValue) {
857
- var propType = typeof propValue;
858
- if (Array.isArray(propValue)) {
859
- return 'array';
860
- }
861
- if (propValue instanceof RegExp) {
862
- // Old webkits (at least until Android 4.0) return 'function' rather than
863
- // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
864
- // passes PropTypes.object.
865
- return 'object';
866
- }
867
- if (isSymbol(propType, propValue)) {
868
- return 'symbol';
869
- }
870
- return propType;
871
- }
872
-
873
- // This handles more types than `getPropType`. Only used for error messages.
874
- // See `createPrimitiveTypeChecker`.
875
- function getPreciseType(propValue) {
876
- if (typeof propValue === 'undefined' || propValue === null) {
877
- return '' + propValue;
878
- }
879
- var propType = getPropType(propValue);
880
- if (propType === 'object') {
881
- if (propValue instanceof Date) {
882
- return 'date';
883
- } else if (propValue instanceof RegExp) {
884
- return 'regexp';
885
- }
886
- }
887
- return propType;
888
- }
889
-
890
- // Returns a string that is postfixed to a warning about an invalid type.
891
- // For example, "undefined" or "of type array"
892
- function getPostfixForTypeWarning(value) {
893
- var type = getPreciseType(value);
894
- switch (type) {
895
- case 'array':
896
- case 'object':
897
- return 'an ' + type;
898
- case 'boolean':
899
- case 'date':
900
- case 'regexp':
901
- return 'a ' + type;
902
- default:
903
- return type;
904
- }
905
- }
906
-
907
- // Returns class name of the object, if any.
908
- function getClassName(propValue) {
909
- if (!propValue.constructor || !propValue.constructor.name) {
910
- return ANONYMOUS;
911
- }
912
- return propValue.constructor.name;
913
- }
914
-
915
- ReactPropTypes.checkPropTypes = checkPropTypes;
916
- ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
917
- ReactPropTypes.PropTypes = ReactPropTypes;
918
-
919
- return ReactPropTypes;
920
- };
921
-
922
- /**
923
- * Copyright (c) 2013-present, Facebook, Inc.
924
- *
925
- * This source code is licensed under the MIT license found in the
926
- * LICENSE file in the root directory of this source tree.
927
- */
928
-
929
- var ReactPropTypesSecret = ReactPropTypesSecret_1;
930
-
931
- function emptyFunction() {}
932
- function emptyFunctionWithReset() {}
933
- emptyFunctionWithReset.resetWarningCache = emptyFunction;
934
-
935
- var factoryWithThrowingShims = function() {
936
- function shim(props, propName, componentName, location, propFullName, secret) {
937
- if (secret === ReactPropTypesSecret) {
938
- // It is still safe when called from React.
939
- return;
940
- }
941
- var err = new Error(
942
- 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
943
- 'Use PropTypes.checkPropTypes() to call them. ' +
944
- 'Read more at http://fb.me/use-check-prop-types'
945
- );
946
- err.name = 'Invariant Violation';
947
- throw err;
948
- } shim.isRequired = shim;
949
- function getShim() {
950
- return shim;
951
- } // Important!
952
- // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
953
- var ReactPropTypes = {
954
- array: shim,
955
- bool: shim,
956
- func: shim,
957
- number: shim,
958
- object: shim,
959
- string: shim,
960
- symbol: shim,
961
-
962
- any: shim,
963
- arrayOf: getShim,
964
- element: shim,
965
- elementType: shim,
966
- instanceOf: getShim,
967
- node: shim,
968
- objectOf: getShim,
969
- oneOf: getShim,
970
- oneOfType: getShim,
971
- shape: getShim,
972
- exact: getShim,
973
-
974
- checkPropTypes: emptyFunctionWithReset,
975
- resetWarningCache: emptyFunction
976
- };
977
-
978
- ReactPropTypes.PropTypes = ReactPropTypes;
979
-
980
- return ReactPropTypes;
981
- };
982
-
983
- /**
984
- * Copyright (c) 2013-present, Facebook, Inc.
985
- *
986
- * This source code is licensed under the MIT license found in the
987
- * LICENSE file in the root directory of this source tree.
988
- */
989
-
990
- if (process.env.NODE_ENV !== 'production') {
991
- var ReactIs = reactIs.exports;
992
-
993
- // By explicitly using `prop-types` you are opting into new development behavior.
994
- // http://fb.me/prop-types-in-prod
995
- var throwOnDirectAccess = true;
996
- propTypes.exports = factoryWithTypeCheckers(ReactIs.isElement, throwOnDirectAccess);
997
- } else {
998
- // By explicitly using `prop-types` you are opting into new production behavior.
999
- // http://fb.me/prop-types-in-prod
1000
- propTypes.exports = factoryWithThrowingShims();
1001
- }
1002
-
1003
13
  function shallowEqualArrays(arrA, arrB) {
1004
14
  if (arrA === arrB) {
1005
15
  return true;
@@ -1296,7 +306,7 @@ Object.defineProperty(exports, "__esModule", {
1296
306
  });
1297
307
  exports["default"] = void 0;
1298
308
 
1299
- var _react = _interopRequireWildcard(require$$0__default);
309
+ var _react = _interopRequireWildcard(React__default);
1300
310
 
1301
311
  var _propTypes = _interopRequireDefault(propTypes.exports);
1302
312
 
@@ -1390,7 +400,7 @@ Object.defineProperty(exports, "__esModule", {
1390
400
  });
1391
401
  exports["default"] = void 0;
1392
402
 
1393
- var _react = _interopRequireWildcard(require$$0__default);
403
+ var _react = _interopRequireWildcard(React__default);
1394
404
 
1395
405
  var _propTypes = _interopRequireDefault(propTypes.exports);
1396
406
 
@@ -1575,7 +585,7 @@ Object.defineProperty(exports, "__esModule", {
1575
585
  });
1576
586
  exports["default"] = void 0;
1577
587
 
1578
- var _react = _interopRequireWildcard(require$$0__default);
588
+ var _react = _interopRequireWildcard(React__default);
1579
589
 
1580
590
  var _propTypes = _interopRequireDefault(propTypes.exports);
1581
591
 
@@ -1730,7 +740,7 @@ Object.defineProperty(exports, "__esModule", {
1730
740
  });
1731
741
  exports["default"] = void 0;
1732
742
 
1733
- var _react = _interopRequireWildcard(require$$0__default);
743
+ var _react = _interopRequireWildcard(React__default);
1734
744
 
1735
745
  var _propTypes = _interopRequireDefault(propTypes.exports);
1736
746
 
@@ -2271,7 +1281,7 @@ Object.defineProperty(exports, "__esModule", {
2271
1281
  });
2272
1282
  exports["default"] = void 0;
2273
1283
 
2274
- var _react = _interopRequireWildcard(require$$0__default);
1284
+ var _react = _interopRequireWildcard(React__default);
2275
1285
 
2276
1286
  var _propTypes = _interopRequireDefault(propTypes.exports);
2277
1287