@bigbinary/neeto-molecules 1.11.4 → 1.11.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Breadcrumbs.js +7 -8
- package/dist/Breadcrumbs.js.map +1 -1
- package/dist/BrowserSupport.js +41 -138
- package/dist/BrowserSupport.js.map +1 -1
- package/dist/Builder.js +65 -319
- package/dist/Builder.js.map +1 -1
- package/dist/CalendarView.js +38 -321
- package/dist/CalendarView.js.map +1 -1
- package/dist/Codeblock.js +14 -207
- package/dist/Codeblock.js.map +1 -1
- package/dist/Columns-702d539a.js +206 -0
- package/dist/Columns-702d539a.js.map +1 -0
- package/dist/Columns.js +16 -342
- package/dist/Columns.js.map +1 -1
- package/dist/ConfirmationModal.js +10 -10
- package/dist/ConfirmationModal.js.map +1 -1
- package/dist/Container.js +4 -1186
- package/dist/Container.js.map +1 -1
- package/dist/CopyToClipboardButton.js +7 -144
- package/dist/CopyToClipboardButton.js.map +1 -1
- package/dist/Currency.js +4 -46
- package/dist/Currency.js.map +1 -1
- package/dist/CustomDomain.js +30 -635
- package/dist/CustomDomain.js.map +1 -1
- package/dist/CustomDomainDashboard.js +41 -2198
- package/dist/CustomDomainDashboard.js.map +1 -1
- package/dist/DateFormat.js +4 -18
- package/dist/DateFormat.js.map +1 -1
- package/dist/DateRangeFilter.js +7 -61
- package/dist/DateRangeFilter.js.map +1 -1
- package/dist/DocumentEditor.js +12 -121
- package/dist/DocumentEditor.js.map +1 -1
- package/dist/DownloadMobileAppCallout.js +4 -4
- package/dist/DownloadMobileAppCallout.js.map +1 -1
- package/dist/DynamicVariables.js +11 -94
- package/dist/DynamicVariables.js.map +1 -1
- package/dist/EmailForm.js +46 -1711
- package/dist/EmailForm.js.map +1 -1
- package/dist/EmailPreview.js +28 -1209
- package/dist/EmailPreview.js.map +1 -1
- package/dist/EmojiPicker.js +5 -73
- package/dist/EmojiPicker.js.map +1 -1
- package/dist/EmojiReactions.js +13 -67
- package/dist/EmojiReactions.js.map +1 -1
- package/dist/ErrorPage.js +1 -15
- package/dist/ErrorPage.js.map +1 -1
- package/dist/FloatingActionMenu.js +74 -1401
- package/dist/FloatingActionMenu.js.map +1 -1
- package/dist/Header.js +26 -72
- package/dist/Header.js.map +1 -1
- package/dist/HelpPopover.js +14 -96
- package/dist/HelpPopover.js.map +1 -1
- package/dist/IconPicker.js +26 -123
- package/dist/IconPicker.js.map +1 -1
- package/dist/ImageWithFallback.js +8 -144
- package/dist/ImageWithFallback.js.map +1 -1
- package/dist/InlineInput.js +16 -522
- package/dist/InlineInput.js.map +1 -1
- package/dist/IntegrationCard.js +30 -229
- package/dist/IntegrationCard.js.map +1 -1
- package/dist/IntegrationDisconnectAlert.js +4 -46
- package/dist/IntegrationDisconnectAlert.js.map +1 -1
- package/dist/IntegrationWalkthroughModal.js +7 -7
- package/dist/IntegrationWalkthroughModal.js.map +1 -1
- package/dist/IpRestriction.js +16 -196
- package/dist/IpRestriction.js.map +1 -1
- package/dist/KeyboardShortcuts.js +24 -119
- package/dist/KeyboardShortcuts.js.map +1 -1
- package/dist/LoginPage.js +22 -445
- package/dist/LoginPage.js.map +1 -1
- package/dist/MenuBar.js +29 -1293
- package/dist/MenuBar.js.map +1 -1
- package/dist/Metadata.js +27 -82
- package/dist/Metadata.js.map +1 -1
- package/dist/MoreDropdown.js +15 -97
- package/dist/MoreDropdown.js.map +1 -1
- package/dist/NavigationHeader.js +39 -709
- package/dist/NavigationHeader.js.map +1 -1
- package/dist/NeetoWidget.js +15 -234
- package/dist/NeetoWidget.js.map +1 -1
- package/dist/Onboarding.js +16 -1212
- package/dist/Onboarding.js.map +1 -1
- package/dist/PageLoader.js +5 -48
- package/dist/PageLoader.js.map +1 -1
- package/dist/PhoneNumber.js +22 -156
- package/dist/PhoneNumber.js.map +1 -1
- package/dist/ProductEmbed.js +83 -172
- package/dist/ProductEmbed.js.map +1 -1
- package/dist/PublishBlock.js +15 -58
- package/dist/PublishBlock.js.map +1 -1
- package/dist/PublishYourItem.js +9 -1190
- package/dist/PublishYourItem.js.map +1 -1
- package/dist/Rename.js +30 -330
- package/dist/Rename.js.map +1 -1
- package/dist/ResponsiveDevicePicker.js +7 -143
- package/dist/ResponsiveDevicePicker.js.map +1 -1
- package/dist/Schedule.js +62 -331
- package/dist/Schedule.js.map +1 -1
- package/dist/Scrollable.js +6 -89
- package/dist/Scrollable.js.map +1 -1
- package/dist/Search.js +7 -143
- package/dist/Search.js.map +1 -1
- package/dist/Security.js +37 -1573
- package/dist/Security.js.map +1 -1
- package/dist/SendToFields.js +41 -124
- package/dist/SendToFields.js.map +1 -1
- package/dist/Settings.js +32 -488
- package/dist/Settings.js.map +1 -1
- package/dist/ShareViaEmail.js +51 -1746
- package/dist/ShareViaEmail.js.map +1 -1
- package/dist/ShareViaLink.js +60 -314
- package/dist/ShareViaLink.js.map +1 -1
- package/dist/Sidebar.js +143 -406
- package/dist/Sidebar.js.map +1 -1
- package/dist/SubHeader.js +27 -105
- package/dist/SubHeader.js.map +1 -1
- package/dist/SuffixedInput.js +15 -120
- package/dist/SuffixedInput.js.map +1 -1
- package/dist/TableWrapper.js +7 -8
- package/dist/TableWrapper.js.map +1 -1
- package/dist/Taxonomy.js +74 -1780
- package/dist/Taxonomy.js.map +1 -1
- package/dist/ThemeSidebar.js +144 -767
- package/dist/ThemeSidebar.js.map +1 -1
- package/dist/TimeFormat.js +8 -44
- package/dist/TimeFormat.js.map +1 -1
- package/dist/TimezoneMismatchModal.js +11 -65
- package/dist/TimezoneMismatchModal.js.map +1 -1
- package/dist/ToggleFeatureCard.js +20 -157
- package/dist/ToggleFeatureCard.js.map +1 -1
- package/dist/cjs/Breadcrumbs.js +2 -3
- package/dist/cjs/Breadcrumbs.js.map +1 -1
- package/dist/cjs/BrowserSupport.js +8 -105
- package/dist/cjs/BrowserSupport.js.map +1 -1
- package/dist/cjs/Builder.js +16 -270
- package/dist/cjs/Builder.js.map +1 -1
- package/dist/cjs/CalendarView.js +23 -308
- package/dist/cjs/CalendarView.js.map +1 -1
- package/dist/cjs/Codeblock.js +12 -206
- package/dist/cjs/Codeblock.js.map +1 -1
- package/dist/cjs/Columns-069368e2.js +216 -0
- package/dist/cjs/Columns-069368e2.js.map +1 -0
- package/dist/cjs/Columns.js +23 -350
- package/dist/cjs/Columns.js.map +1 -1
- package/dist/cjs/Container.js +4 -1186
- package/dist/cjs/Container.js.map +1 -1
- package/dist/cjs/CopyToClipboardButton.js +10 -147
- package/dist/cjs/CopyToClipboardButton.js.map +1 -1
- package/dist/cjs/Currency.js +4 -46
- package/dist/cjs/Currency.js.map +1 -1
- package/dist/cjs/CustomDomain.js +23 -651
- package/dist/cjs/CustomDomain.js.map +1 -1
- package/dist/cjs/CustomDomainDashboard.js +44 -2227
- package/dist/cjs/CustomDomainDashboard.js.map +1 -1
- package/dist/cjs/DateFormat.js +3 -17
- package/dist/cjs/DateFormat.js.map +1 -1
- package/dist/cjs/DateRangeFilter.js +2 -56
- package/dist/cjs/DateRangeFilter.js.map +1 -1
- package/dist/cjs/DocumentEditor.js +14 -123
- package/dist/cjs/DocumentEditor.js.map +1 -1
- package/dist/cjs/DynamicVariables.js +8 -91
- package/dist/cjs/DynamicVariables.js.map +1 -1
- package/dist/cjs/EmailForm.js +23 -1689
- package/dist/cjs/EmailForm.js.map +1 -1
- package/dist/cjs/EmailPreview.js +8 -1189
- package/dist/cjs/EmailPreview.js.map +1 -1
- package/dist/cjs/EmojiPicker.js +4 -72
- package/dist/cjs/EmojiPicker.js.map +1 -1
- package/dist/cjs/EmojiReactions.js +5 -59
- package/dist/cjs/EmojiReactions.js.map +1 -1
- package/dist/cjs/ErrorPage.js +2 -16
- package/dist/cjs/ErrorPage.js.map +1 -1
- package/dist/cjs/FloatingActionMenu.js +49 -1377
- package/dist/cjs/FloatingActionMenu.js.map +1 -1
- package/dist/cjs/Header.js +19 -67
- package/dist/cjs/Header.js.map +1 -1
- package/dist/cjs/HelpPopover.js +11 -93
- package/dist/cjs/HelpPopover.js.map +1 -1
- package/dist/cjs/IconPicker.js +10 -107
- package/dist/cjs/IconPicker.js.map +1 -1
- package/dist/cjs/ImageWithFallback.js +11 -147
- package/dist/cjs/ImageWithFallback.js.map +1 -1
- package/dist/cjs/InlineInput.js +20 -526
- package/dist/cjs/InlineInput.js.map +1 -1
- package/dist/cjs/IntegrationCard.js +8 -207
- package/dist/cjs/IntegrationCard.js.map +1 -1
- package/dist/cjs/IntegrationDisconnectAlert.js +4 -46
- package/dist/cjs/IntegrationDisconnectAlert.js.map +1 -1
- package/dist/cjs/IpRestriction.js +7 -187
- package/dist/cjs/IpRestriction.js.map +1 -1
- package/dist/cjs/KeyboardShortcuts.js +9 -104
- package/dist/cjs/KeyboardShortcuts.js.map +1 -1
- package/dist/cjs/LoginPage.js +12 -435
- package/dist/cjs/LoginPage.js.map +1 -1
- package/dist/cjs/MenuBar.js +24 -1288
- package/dist/cjs/MenuBar.js.map +1 -1
- package/dist/cjs/Metadata.js +6 -61
- package/dist/cjs/Metadata.js.map +1 -1
- package/dist/cjs/MoreDropdown.js +14 -96
- package/dist/cjs/MoreDropdown.js.map +1 -1
- package/dist/cjs/NavigationHeader.js +21 -695
- package/dist/cjs/NavigationHeader.js.map +1 -1
- package/dist/cjs/NeetoWidget.js +18 -238
- package/dist/cjs/NeetoWidget.js.map +1 -1
- package/dist/cjs/Onboarding.js +15 -1211
- package/dist/cjs/Onboarding.js.map +1 -1
- package/dist/cjs/PageLoader.js +8 -51
- package/dist/cjs/PageLoader.js.map +1 -1
- package/dist/cjs/PhoneNumber.js +22 -156
- package/dist/cjs/PhoneNumber.js.map +1 -1
- package/dist/cjs/ProductEmbed.js +28 -118
- package/dist/cjs/ProductEmbed.js.map +1 -1
- package/dist/cjs/PublishBlock.js +13 -56
- package/dist/cjs/PublishBlock.js.map +1 -1
- package/dist/cjs/PublishYourItem.js +3 -1184
- package/dist/cjs/PublishYourItem.js.map +1 -1
- package/dist/cjs/Rename.js +23 -323
- package/dist/cjs/Rename.js.map +1 -1
- package/dist/cjs/ResponsiveDevicePicker.js +8 -144
- package/dist/cjs/ResponsiveDevicePicker.js.map +1 -1
- package/dist/cjs/Schedule.js +18 -287
- package/dist/cjs/Schedule.js.map +1 -1
- package/dist/cjs/Scrollable.js +8 -91
- package/dist/cjs/Scrollable.js.map +1 -1
- package/dist/cjs/Search.js +8 -144
- package/dist/cjs/Search.js.map +1 -1
- package/dist/cjs/Security.js +27 -1565
- package/dist/cjs/Security.js.map +1 -1
- package/dist/cjs/SendToFields.js +12 -95
- package/dist/cjs/SendToFields.js.map +1 -1
- package/dist/cjs/Settings.js +18 -476
- package/dist/cjs/Settings.js.map +1 -1
- package/dist/cjs/ShareViaEmail.js +20 -1716
- package/dist/cjs/ShareViaEmail.js.map +1 -1
- package/dist/cjs/ShareViaLink.js +13 -268
- package/dist/cjs/ShareViaLink.js.map +1 -1
- package/dist/cjs/Sidebar.js +52 -316
- package/dist/cjs/Sidebar.js.map +1 -1
- package/dist/cjs/SubHeader.js +18 -97
- package/dist/cjs/SubHeader.js.map +1 -1
- package/dist/cjs/SuffixedInput.js +14 -120
- package/dist/cjs/SuffixedInput.js.map +1 -1
- package/dist/cjs/TableWrapper.js +6 -7
- package/dist/cjs/TableWrapper.js.map +1 -1
- package/dist/cjs/Taxonomy.js +36 -1746
- package/dist/cjs/Taxonomy.js.map +1 -1
- package/dist/cjs/ThemeSidebar.js +34 -657
- package/dist/cjs/ThemeSidebar.js.map +1 -1
- package/dist/cjs/TimeFormat.js +8 -49
- package/dist/cjs/TimeFormat.js.map +1 -1
- package/dist/cjs/TimezoneMismatchModal.js +2 -56
- package/dist/cjs/TimezoneMismatchModal.js.map +1 -1
- package/dist/cjs/ToggleFeatureCard.js +15 -152
- package/dist/cjs/ToggleFeatureCard.js.map +1 -1
- package/dist/cjs/defineProperty-886ed289.js +47 -0
- package/dist/cjs/defineProperty-886ed289.js.map +1 -0
- package/dist/cjs/extends-1b35a664.js +19 -0
- package/dist/cjs/extends-1b35a664.js.map +1 -0
- package/dist/cjs/index-248c4f4c.js +1186 -0
- package/dist/cjs/index-248c4f4c.js.map +1 -0
- package/dist/cjs/index-73f9c602.js +454 -0
- package/dist/cjs/index-73f9c602.js.map +1 -0
- package/dist/cjs/index-c55ad2bc.js +375 -0
- package/dist/cjs/index-c55ad2bc.js.map +1 -0
- package/dist/cjs/inject-css-80a5faa3.js +6 -0
- package/dist/cjs/inject-css-80a5faa3.js.map +1 -0
- package/dist/cjs/objectWithoutProperties-2fed2d7d.js +33 -0
- package/dist/cjs/objectWithoutProperties-2fed2d7d.js.map +1 -0
- package/dist/cjs/slicedToArray-f320d9e7.js +61 -0
- package/dist/cjs/slicedToArray-f320d9e7.js.map +1 -0
- package/dist/cjs/toConsumableArray-9abb3858.js +22 -0
- package/dist/cjs/toConsumableArray-9abb3858.js.map +1 -0
- package/dist/defineProperty-549061a7.js +43 -0
- package/dist/defineProperty-549061a7.js.map +1 -0
- package/dist/extends-093996c9.js +17 -0
- package/dist/extends-093996c9.js.map +1 -0
- package/dist/index-372a8b29.js +422 -0
- package/dist/index-372a8b29.js.map +1 -0
- package/dist/index-9720867c.js +372 -0
- package/dist/index-9720867c.js.map +1 -0
- package/dist/index-e5588516.js +1184 -0
- package/dist/index-e5588516.js.map +1 -0
- package/dist/inject-css-c86de496.js +4 -0
- package/dist/inject-css-c86de496.js.map +1 -0
- package/dist/objectWithoutProperties-a0edb288.js +31 -0
- package/dist/objectWithoutProperties-a0edb288.js.map +1 -0
- package/dist/slicedToArray-b4278ecd.js +57 -0
- package/dist/slicedToArray-b4278ecd.js.map +1 -0
- package/dist/toConsumableArray-1cc38429.js +20 -0
- package/dist/toConsumableArray-1cc38429.js.map +1 -0
- package/package.json +1 -3
|
@@ -1,19 +1,32 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var _extends = require('./extends-1b35a664.js');
|
|
4
|
+
var objectWithoutProperties = require('./objectWithoutProperties-2fed2d7d.js');
|
|
3
5
|
var React = require('react');
|
|
6
|
+
var index = require('./index-248c4f4c.js');
|
|
7
|
+
var defineProperty = require('./defineProperty-886ed289.js');
|
|
8
|
+
var toConsumableArray = require('./toConsumableArray-9abb3858.js');
|
|
9
|
+
var slicedToArray = require('./slicedToArray-f320d9e7.js');
|
|
4
10
|
var neetoCist = require('@bigbinary/neeto-cist');
|
|
5
11
|
var useFetchNeetoApps = require('@bigbinary/neeto-commons-frontend/react-utils/useFetchNeetoApps');
|
|
6
|
-
var KeyboardShortcuts = require('@bigbinary/neeto-molecules/KeyboardShortcuts');
|
|
7
12
|
var neetoTeamMembersFrontend = require('@bigbinary/neeto-team-members-frontend');
|
|
8
13
|
var neetoui = require('@bigbinary/neetoui');
|
|
14
|
+
var KeyboardShortcuts = require('./KeyboardShortcuts.js');
|
|
9
15
|
var neetoIcons = require('@bigbinary/neeto-icons');
|
|
10
16
|
var reactI18next = require('react-i18next');
|
|
17
|
+
var injectCss = require('./inject-css-80a5faa3.js');
|
|
11
18
|
var classnames = require('classnames');
|
|
12
19
|
var AppIcons = require('@bigbinary/neeto-icons/app-icons');
|
|
13
20
|
var i18next = require('i18next');
|
|
14
21
|
var ramda = require('ramda');
|
|
15
22
|
var axios = require('@bigbinary/neeto-commons-frontend/utils/axios');
|
|
16
23
|
var general = require('@bigbinary/neeto-commons-frontend/utils/general');
|
|
24
|
+
require('@bigbinary/neeto-commons-frontend/react-utils/withImmutableActions');
|
|
25
|
+
require('zustand');
|
|
26
|
+
require('zustand/shallow');
|
|
27
|
+
require('@bigbinary/neetoui/managers');
|
|
28
|
+
require('@bigbinary/neeto-hotkeys');
|
|
29
|
+
require('platform');
|
|
17
30
|
|
|
18
31
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
19
32
|
|
|
@@ -37,1352 +50,11 @@ function _interopNamespace(e) {
|
|
|
37
50
|
|
|
38
51
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
39
52
|
var useFetchNeetoApps__default = /*#__PURE__*/_interopDefaultLegacy(useFetchNeetoApps);
|
|
40
|
-
var KeyboardShortcuts__default = /*#__PURE__*/_interopDefaultLegacy(KeyboardShortcuts);
|
|
41
53
|
var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
|
|
42
54
|
var AppIcons__namespace = /*#__PURE__*/_interopNamespace(AppIcons);
|
|
43
55
|
|
|
44
|
-
function _extends() {
|
|
45
|
-
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
46
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
47
|
-
var source = arguments[i];
|
|
48
|
-
for (var key in source) {
|
|
49
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
50
|
-
target[key] = source[key];
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
return target;
|
|
55
|
-
};
|
|
56
|
-
return _extends.apply(this, arguments);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
60
|
-
if (source == null) return {};
|
|
61
|
-
var target = {};
|
|
62
|
-
var sourceKeys = Object.keys(source);
|
|
63
|
-
var key, i;
|
|
64
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
65
|
-
key = sourceKeys[i];
|
|
66
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
67
|
-
target[key] = source[key];
|
|
68
|
-
}
|
|
69
|
-
return target;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
function _objectWithoutProperties(source, excluded) {
|
|
73
|
-
if (source == null) return {};
|
|
74
|
-
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
75
|
-
var key, i;
|
|
76
|
-
if (Object.getOwnPropertySymbols) {
|
|
77
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
78
|
-
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
79
|
-
key = sourceSymbolKeys[i];
|
|
80
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
81
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
82
|
-
target[key] = source[key];
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
return target;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
var propTypes = {exports: {}};
|
|
89
|
-
|
|
90
|
-
var reactIs = {exports: {}};
|
|
91
|
-
|
|
92
|
-
var reactIs_production_min = {};
|
|
93
|
-
|
|
94
|
-
/** @license React v16.13.1
|
|
95
|
-
* react-is.production.min.js
|
|
96
|
-
*
|
|
97
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
98
|
-
*
|
|
99
|
-
* This source code is licensed under the MIT license found in the
|
|
100
|
-
* LICENSE file in the root directory of this source tree.
|
|
101
|
-
*/
|
|
102
|
-
|
|
103
|
-
var hasRequiredReactIs_production_min;
|
|
104
|
-
|
|
105
|
-
function requireReactIs_production_min () {
|
|
106
|
-
if (hasRequiredReactIs_production_min) return reactIs_production_min;
|
|
107
|
-
hasRequiredReactIs_production_min = 1;
|
|
108
|
-
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?
|
|
109
|
-
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;
|
|
110
|
-
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;
|
|
111
|
-
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};
|
|
112
|
-
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};
|
|
113
|
-
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;
|
|
114
|
-
return reactIs_production_min;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
var reactIs_development = {};
|
|
118
|
-
|
|
119
|
-
/** @license React v16.13.1
|
|
120
|
-
* react-is.development.js
|
|
121
|
-
*
|
|
122
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
123
|
-
*
|
|
124
|
-
* This source code is licensed under the MIT license found in the
|
|
125
|
-
* LICENSE file in the root directory of this source tree.
|
|
126
|
-
*/
|
|
127
|
-
|
|
128
|
-
var hasRequiredReactIs_development;
|
|
129
|
-
|
|
130
|
-
function requireReactIs_development () {
|
|
131
|
-
if (hasRequiredReactIs_development) return reactIs_development;
|
|
132
|
-
hasRequiredReactIs_development = 1;
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
if (process.env.NODE_ENV !== "production") {
|
|
137
|
-
(function() {
|
|
138
|
-
|
|
139
|
-
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
|
|
140
|
-
// nor polyfill, then a plain number is used for performance.
|
|
141
|
-
var hasSymbol = typeof Symbol === 'function' && Symbol.for;
|
|
142
|
-
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
|
|
143
|
-
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
|
|
144
|
-
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
|
|
145
|
-
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
|
|
146
|
-
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
|
|
147
|
-
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
|
|
148
|
-
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
|
|
149
|
-
// (unstable) APIs that have been removed. Can we remove the symbols?
|
|
150
|
-
|
|
151
|
-
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
|
|
152
|
-
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
|
|
153
|
-
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
|
|
154
|
-
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
|
|
155
|
-
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
|
|
156
|
-
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
|
|
157
|
-
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
|
|
158
|
-
var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
|
|
159
|
-
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
|
|
160
|
-
var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
|
|
161
|
-
var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
|
|
162
|
-
|
|
163
|
-
function isValidElementType(type) {
|
|
164
|
-
return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
165
|
-
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);
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
function typeOf(object) {
|
|
169
|
-
if (typeof object === 'object' && object !== null) {
|
|
170
|
-
var $$typeof = object.$$typeof;
|
|
171
|
-
|
|
172
|
-
switch ($$typeof) {
|
|
173
|
-
case REACT_ELEMENT_TYPE:
|
|
174
|
-
var type = object.type;
|
|
175
|
-
|
|
176
|
-
switch (type) {
|
|
177
|
-
case REACT_ASYNC_MODE_TYPE:
|
|
178
|
-
case REACT_CONCURRENT_MODE_TYPE:
|
|
179
|
-
case REACT_FRAGMENT_TYPE:
|
|
180
|
-
case REACT_PROFILER_TYPE:
|
|
181
|
-
case REACT_STRICT_MODE_TYPE:
|
|
182
|
-
case REACT_SUSPENSE_TYPE:
|
|
183
|
-
return type;
|
|
184
|
-
|
|
185
|
-
default:
|
|
186
|
-
var $$typeofType = type && type.$$typeof;
|
|
187
|
-
|
|
188
|
-
switch ($$typeofType) {
|
|
189
|
-
case REACT_CONTEXT_TYPE:
|
|
190
|
-
case REACT_FORWARD_REF_TYPE:
|
|
191
|
-
case REACT_LAZY_TYPE:
|
|
192
|
-
case REACT_MEMO_TYPE:
|
|
193
|
-
case REACT_PROVIDER_TYPE:
|
|
194
|
-
return $$typeofType;
|
|
195
|
-
|
|
196
|
-
default:
|
|
197
|
-
return $$typeof;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
case REACT_PORTAL_TYPE:
|
|
203
|
-
return $$typeof;
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
return undefined;
|
|
208
|
-
} // AsyncMode is deprecated along with isAsyncMode
|
|
209
|
-
|
|
210
|
-
var AsyncMode = REACT_ASYNC_MODE_TYPE;
|
|
211
|
-
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
|
|
212
|
-
var ContextConsumer = REACT_CONTEXT_TYPE;
|
|
213
|
-
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
214
|
-
var Element = REACT_ELEMENT_TYPE;
|
|
215
|
-
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
216
|
-
var Fragment = REACT_FRAGMENT_TYPE;
|
|
217
|
-
var Lazy = REACT_LAZY_TYPE;
|
|
218
|
-
var Memo = REACT_MEMO_TYPE;
|
|
219
|
-
var Portal = REACT_PORTAL_TYPE;
|
|
220
|
-
var Profiler = REACT_PROFILER_TYPE;
|
|
221
|
-
var StrictMode = REACT_STRICT_MODE_TYPE;
|
|
222
|
-
var Suspense = REACT_SUSPENSE_TYPE;
|
|
223
|
-
var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
|
|
224
|
-
|
|
225
|
-
function isAsyncMode(object) {
|
|
226
|
-
{
|
|
227
|
-
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
|
228
|
-
hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
|
|
229
|
-
|
|
230
|
-
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.');
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
|
|
235
|
-
}
|
|
236
|
-
function isConcurrentMode(object) {
|
|
237
|
-
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
|
|
238
|
-
}
|
|
239
|
-
function isContextConsumer(object) {
|
|
240
|
-
return typeOf(object) === REACT_CONTEXT_TYPE;
|
|
241
|
-
}
|
|
242
|
-
function isContextProvider(object) {
|
|
243
|
-
return typeOf(object) === REACT_PROVIDER_TYPE;
|
|
244
|
-
}
|
|
245
|
-
function isElement(object) {
|
|
246
|
-
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
247
|
-
}
|
|
248
|
-
function isForwardRef(object) {
|
|
249
|
-
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
|
250
|
-
}
|
|
251
|
-
function isFragment(object) {
|
|
252
|
-
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
|
253
|
-
}
|
|
254
|
-
function isLazy(object) {
|
|
255
|
-
return typeOf(object) === REACT_LAZY_TYPE;
|
|
256
|
-
}
|
|
257
|
-
function isMemo(object) {
|
|
258
|
-
return typeOf(object) === REACT_MEMO_TYPE;
|
|
259
|
-
}
|
|
260
|
-
function isPortal(object) {
|
|
261
|
-
return typeOf(object) === REACT_PORTAL_TYPE;
|
|
262
|
-
}
|
|
263
|
-
function isProfiler(object) {
|
|
264
|
-
return typeOf(object) === REACT_PROFILER_TYPE;
|
|
265
|
-
}
|
|
266
|
-
function isStrictMode(object) {
|
|
267
|
-
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
|
268
|
-
}
|
|
269
|
-
function isSuspense(object) {
|
|
270
|
-
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
reactIs_development.AsyncMode = AsyncMode;
|
|
274
|
-
reactIs_development.ConcurrentMode = ConcurrentMode;
|
|
275
|
-
reactIs_development.ContextConsumer = ContextConsumer;
|
|
276
|
-
reactIs_development.ContextProvider = ContextProvider;
|
|
277
|
-
reactIs_development.Element = Element;
|
|
278
|
-
reactIs_development.ForwardRef = ForwardRef;
|
|
279
|
-
reactIs_development.Fragment = Fragment;
|
|
280
|
-
reactIs_development.Lazy = Lazy;
|
|
281
|
-
reactIs_development.Memo = Memo;
|
|
282
|
-
reactIs_development.Portal = Portal;
|
|
283
|
-
reactIs_development.Profiler = Profiler;
|
|
284
|
-
reactIs_development.StrictMode = StrictMode;
|
|
285
|
-
reactIs_development.Suspense = Suspense;
|
|
286
|
-
reactIs_development.isAsyncMode = isAsyncMode;
|
|
287
|
-
reactIs_development.isConcurrentMode = isConcurrentMode;
|
|
288
|
-
reactIs_development.isContextConsumer = isContextConsumer;
|
|
289
|
-
reactIs_development.isContextProvider = isContextProvider;
|
|
290
|
-
reactIs_development.isElement = isElement;
|
|
291
|
-
reactIs_development.isForwardRef = isForwardRef;
|
|
292
|
-
reactIs_development.isFragment = isFragment;
|
|
293
|
-
reactIs_development.isLazy = isLazy;
|
|
294
|
-
reactIs_development.isMemo = isMemo;
|
|
295
|
-
reactIs_development.isPortal = isPortal;
|
|
296
|
-
reactIs_development.isProfiler = isProfiler;
|
|
297
|
-
reactIs_development.isStrictMode = isStrictMode;
|
|
298
|
-
reactIs_development.isSuspense = isSuspense;
|
|
299
|
-
reactIs_development.isValidElementType = isValidElementType;
|
|
300
|
-
reactIs_development.typeOf = typeOf;
|
|
301
|
-
})();
|
|
302
|
-
}
|
|
303
|
-
return reactIs_development;
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
var hasRequiredReactIs;
|
|
307
|
-
|
|
308
|
-
function requireReactIs () {
|
|
309
|
-
if (hasRequiredReactIs) return reactIs.exports;
|
|
310
|
-
hasRequiredReactIs = 1;
|
|
311
|
-
(function (module) {
|
|
312
|
-
|
|
313
|
-
if (process.env.NODE_ENV === 'production') {
|
|
314
|
-
module.exports = requireReactIs_production_min();
|
|
315
|
-
} else {
|
|
316
|
-
module.exports = requireReactIs_development();
|
|
317
|
-
}
|
|
318
|
-
} (reactIs));
|
|
319
|
-
return reactIs.exports;
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
/*
|
|
323
|
-
object-assign
|
|
324
|
-
(c) Sindre Sorhus
|
|
325
|
-
@license MIT
|
|
326
|
-
*/
|
|
327
|
-
|
|
328
|
-
var objectAssign;
|
|
329
|
-
var hasRequiredObjectAssign;
|
|
330
|
-
|
|
331
|
-
function requireObjectAssign () {
|
|
332
|
-
if (hasRequiredObjectAssign) return objectAssign;
|
|
333
|
-
hasRequiredObjectAssign = 1;
|
|
334
|
-
/* eslint-disable no-unused-vars */
|
|
335
|
-
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
336
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
337
|
-
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
338
|
-
|
|
339
|
-
function toObject(val) {
|
|
340
|
-
if (val === null || val === undefined) {
|
|
341
|
-
throw new TypeError('Object.assign cannot be called with null or undefined');
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
return Object(val);
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
function shouldUseNative() {
|
|
348
|
-
try {
|
|
349
|
-
if (!Object.assign) {
|
|
350
|
-
return false;
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
// Detect buggy property enumeration order in older V8 versions.
|
|
354
|
-
|
|
355
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=4118
|
|
356
|
-
var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
|
|
357
|
-
test1[5] = 'de';
|
|
358
|
-
if (Object.getOwnPropertyNames(test1)[0] === '5') {
|
|
359
|
-
return false;
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
363
|
-
var test2 = {};
|
|
364
|
-
for (var i = 0; i < 10; i++) {
|
|
365
|
-
test2['_' + String.fromCharCode(i)] = i;
|
|
366
|
-
}
|
|
367
|
-
var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
|
|
368
|
-
return test2[n];
|
|
369
|
-
});
|
|
370
|
-
if (order2.join('') !== '0123456789') {
|
|
371
|
-
return false;
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
375
|
-
var test3 = {};
|
|
376
|
-
'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
|
|
377
|
-
test3[letter] = letter;
|
|
378
|
-
});
|
|
379
|
-
if (Object.keys(Object.assign({}, test3)).join('') !==
|
|
380
|
-
'abcdefghijklmnopqrst') {
|
|
381
|
-
return false;
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
return true;
|
|
385
|
-
} catch (err) {
|
|
386
|
-
// We don't expect any of the above to throw, but better to be safe.
|
|
387
|
-
return false;
|
|
388
|
-
}
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
objectAssign = shouldUseNative() ? Object.assign : function (target, source) {
|
|
392
|
-
var from;
|
|
393
|
-
var to = toObject(target);
|
|
394
|
-
var symbols;
|
|
395
|
-
|
|
396
|
-
for (var s = 1; s < arguments.length; s++) {
|
|
397
|
-
from = Object(arguments[s]);
|
|
398
|
-
|
|
399
|
-
for (var key in from) {
|
|
400
|
-
if (hasOwnProperty.call(from, key)) {
|
|
401
|
-
to[key] = from[key];
|
|
402
|
-
}
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
if (getOwnPropertySymbols) {
|
|
406
|
-
symbols = getOwnPropertySymbols(from);
|
|
407
|
-
for (var i = 0; i < symbols.length; i++) {
|
|
408
|
-
if (propIsEnumerable.call(from, symbols[i])) {
|
|
409
|
-
to[symbols[i]] = from[symbols[i]];
|
|
410
|
-
}
|
|
411
|
-
}
|
|
412
|
-
}
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
return to;
|
|
416
|
-
};
|
|
417
|
-
return objectAssign;
|
|
418
|
-
}
|
|
419
|
-
|
|
420
|
-
/**
|
|
421
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
422
|
-
*
|
|
423
|
-
* This source code is licensed under the MIT license found in the
|
|
424
|
-
* LICENSE file in the root directory of this source tree.
|
|
425
|
-
*/
|
|
426
|
-
|
|
427
|
-
var ReactPropTypesSecret_1;
|
|
428
|
-
var hasRequiredReactPropTypesSecret;
|
|
429
|
-
|
|
430
|
-
function requireReactPropTypesSecret () {
|
|
431
|
-
if (hasRequiredReactPropTypesSecret) return ReactPropTypesSecret_1;
|
|
432
|
-
hasRequiredReactPropTypesSecret = 1;
|
|
433
|
-
|
|
434
|
-
var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
|
435
|
-
|
|
436
|
-
ReactPropTypesSecret_1 = ReactPropTypesSecret;
|
|
437
|
-
return ReactPropTypesSecret_1;
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
var has;
|
|
441
|
-
var hasRequiredHas;
|
|
442
|
-
|
|
443
|
-
function requireHas () {
|
|
444
|
-
if (hasRequiredHas) return has;
|
|
445
|
-
hasRequiredHas = 1;
|
|
446
|
-
has = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
447
|
-
return has;
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
/**
|
|
451
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
452
|
-
*
|
|
453
|
-
* This source code is licensed under the MIT license found in the
|
|
454
|
-
* LICENSE file in the root directory of this source tree.
|
|
455
|
-
*/
|
|
456
|
-
|
|
457
|
-
var checkPropTypes_1;
|
|
458
|
-
var hasRequiredCheckPropTypes;
|
|
459
|
-
|
|
460
|
-
function requireCheckPropTypes () {
|
|
461
|
-
if (hasRequiredCheckPropTypes) return checkPropTypes_1;
|
|
462
|
-
hasRequiredCheckPropTypes = 1;
|
|
463
|
-
|
|
464
|
-
var printWarning = function() {};
|
|
465
|
-
|
|
466
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
467
|
-
var ReactPropTypesSecret = requireReactPropTypesSecret();
|
|
468
|
-
var loggedTypeFailures = {};
|
|
469
|
-
var has = requireHas();
|
|
470
|
-
|
|
471
|
-
printWarning = function(text) {
|
|
472
|
-
var message = 'Warning: ' + text;
|
|
473
|
-
if (typeof console !== 'undefined') {
|
|
474
|
-
console.error(message);
|
|
475
|
-
}
|
|
476
|
-
try {
|
|
477
|
-
// --- Welcome to debugging React ---
|
|
478
|
-
// This error was thrown as a convenience so that you can use this stack
|
|
479
|
-
// to find the callsite that caused this warning to fire.
|
|
480
|
-
throw new Error(message);
|
|
481
|
-
} catch (x) { /**/ }
|
|
482
|
-
};
|
|
483
|
-
}
|
|
484
|
-
|
|
485
|
-
/**
|
|
486
|
-
* Assert that the values match with the type specs.
|
|
487
|
-
* Error messages are memorized and will only be shown once.
|
|
488
|
-
*
|
|
489
|
-
* @param {object} typeSpecs Map of name to a ReactPropType
|
|
490
|
-
* @param {object} values Runtime values that need to be type-checked
|
|
491
|
-
* @param {string} location e.g. "prop", "context", "child context"
|
|
492
|
-
* @param {string} componentName Name of the component for error messages.
|
|
493
|
-
* @param {?Function} getStack Returns the component stack.
|
|
494
|
-
* @private
|
|
495
|
-
*/
|
|
496
|
-
function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
|
|
497
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
498
|
-
for (var typeSpecName in typeSpecs) {
|
|
499
|
-
if (has(typeSpecs, typeSpecName)) {
|
|
500
|
-
var error;
|
|
501
|
-
// Prop type validation may throw. In case they do, we don't want to
|
|
502
|
-
// fail the render phase where it didn't fail before. So we log it.
|
|
503
|
-
// After these have been cleaned up, we'll let them throw.
|
|
504
|
-
try {
|
|
505
|
-
// This is intentionally an invariant that gets caught. It's the same
|
|
506
|
-
// behavior as without this statement except with a better message.
|
|
507
|
-
if (typeof typeSpecs[typeSpecName] !== 'function') {
|
|
508
|
-
var err = Error(
|
|
509
|
-
(componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
|
|
510
|
-
'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +
|
|
511
|
-
'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
|
|
512
|
-
);
|
|
513
|
-
err.name = 'Invariant Violation';
|
|
514
|
-
throw err;
|
|
515
|
-
}
|
|
516
|
-
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
|
|
517
|
-
} catch (ex) {
|
|
518
|
-
error = ex;
|
|
519
|
-
}
|
|
520
|
-
if (error && !(error instanceof Error)) {
|
|
521
|
-
printWarning(
|
|
522
|
-
(componentName || 'React class') + ': type specification of ' +
|
|
523
|
-
location + ' `' + typeSpecName + '` is invalid; the type checker ' +
|
|
524
|
-
'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
|
|
525
|
-
'You may have forgotten to pass an argument to the type checker ' +
|
|
526
|
-
'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
|
|
527
|
-
'shape all require an argument).'
|
|
528
|
-
);
|
|
529
|
-
}
|
|
530
|
-
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
|
531
|
-
// Only monitor this failure once because there tends to be a lot of the
|
|
532
|
-
// same error.
|
|
533
|
-
loggedTypeFailures[error.message] = true;
|
|
534
|
-
|
|
535
|
-
var stack = getStack ? getStack() : '';
|
|
536
|
-
|
|
537
|
-
printWarning(
|
|
538
|
-
'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
|
|
539
|
-
);
|
|
540
|
-
}
|
|
541
|
-
}
|
|
542
|
-
}
|
|
543
|
-
}
|
|
544
|
-
}
|
|
545
|
-
|
|
546
|
-
/**
|
|
547
|
-
* Resets warning cache when testing.
|
|
548
|
-
*
|
|
549
|
-
* @private
|
|
550
|
-
*/
|
|
551
|
-
checkPropTypes.resetWarningCache = function() {
|
|
552
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
553
|
-
loggedTypeFailures = {};
|
|
554
|
-
}
|
|
555
|
-
};
|
|
556
|
-
|
|
557
|
-
checkPropTypes_1 = checkPropTypes;
|
|
558
|
-
return checkPropTypes_1;
|
|
559
|
-
}
|
|
560
|
-
|
|
561
|
-
/**
|
|
562
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
563
|
-
*
|
|
564
|
-
* This source code is licensed under the MIT license found in the
|
|
565
|
-
* LICENSE file in the root directory of this source tree.
|
|
566
|
-
*/
|
|
567
|
-
|
|
568
|
-
var factoryWithTypeCheckers;
|
|
569
|
-
var hasRequiredFactoryWithTypeCheckers;
|
|
570
|
-
|
|
571
|
-
function requireFactoryWithTypeCheckers () {
|
|
572
|
-
if (hasRequiredFactoryWithTypeCheckers) return factoryWithTypeCheckers;
|
|
573
|
-
hasRequiredFactoryWithTypeCheckers = 1;
|
|
574
|
-
|
|
575
|
-
var ReactIs = requireReactIs();
|
|
576
|
-
var assign = requireObjectAssign();
|
|
577
|
-
|
|
578
|
-
var ReactPropTypesSecret = requireReactPropTypesSecret();
|
|
579
|
-
var has = requireHas();
|
|
580
|
-
var checkPropTypes = requireCheckPropTypes();
|
|
581
|
-
|
|
582
|
-
var printWarning = function() {};
|
|
583
|
-
|
|
584
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
585
|
-
printWarning = function(text) {
|
|
586
|
-
var message = 'Warning: ' + text;
|
|
587
|
-
if (typeof console !== 'undefined') {
|
|
588
|
-
console.error(message);
|
|
589
|
-
}
|
|
590
|
-
try {
|
|
591
|
-
// --- Welcome to debugging React ---
|
|
592
|
-
// This error was thrown as a convenience so that you can use this stack
|
|
593
|
-
// to find the callsite that caused this warning to fire.
|
|
594
|
-
throw new Error(message);
|
|
595
|
-
} catch (x) {}
|
|
596
|
-
};
|
|
597
|
-
}
|
|
598
|
-
|
|
599
|
-
function emptyFunctionThatReturnsNull() {
|
|
600
|
-
return null;
|
|
601
|
-
}
|
|
602
|
-
|
|
603
|
-
factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
|
|
604
|
-
/* global Symbol */
|
|
605
|
-
var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
|
606
|
-
var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
|
|
607
|
-
|
|
608
|
-
/**
|
|
609
|
-
* Returns the iterator method function contained on the iterable object.
|
|
610
|
-
*
|
|
611
|
-
* Be sure to invoke the function with the iterable as context:
|
|
612
|
-
*
|
|
613
|
-
* var iteratorFn = getIteratorFn(myIterable);
|
|
614
|
-
* if (iteratorFn) {
|
|
615
|
-
* var iterator = iteratorFn.call(myIterable);
|
|
616
|
-
* ...
|
|
617
|
-
* }
|
|
618
|
-
*
|
|
619
|
-
* @param {?object} maybeIterable
|
|
620
|
-
* @return {?function}
|
|
621
|
-
*/
|
|
622
|
-
function getIteratorFn(maybeIterable) {
|
|
623
|
-
var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
|
|
624
|
-
if (typeof iteratorFn === 'function') {
|
|
625
|
-
return iteratorFn;
|
|
626
|
-
}
|
|
627
|
-
}
|
|
628
|
-
|
|
629
|
-
/**
|
|
630
|
-
* Collection of methods that allow declaration and validation of props that are
|
|
631
|
-
* supplied to React components. Example usage:
|
|
632
|
-
*
|
|
633
|
-
* var Props = require('ReactPropTypes');
|
|
634
|
-
* var MyArticle = React.createClass({
|
|
635
|
-
* propTypes: {
|
|
636
|
-
* // An optional string prop named "description".
|
|
637
|
-
* description: Props.string,
|
|
638
|
-
*
|
|
639
|
-
* // A required enum prop named "category".
|
|
640
|
-
* category: Props.oneOf(['News','Photos']).isRequired,
|
|
641
|
-
*
|
|
642
|
-
* // A prop named "dialog" that requires an instance of Dialog.
|
|
643
|
-
* dialog: Props.instanceOf(Dialog).isRequired
|
|
644
|
-
* },
|
|
645
|
-
* render: function() { ... }
|
|
646
|
-
* });
|
|
647
|
-
*
|
|
648
|
-
* A more formal specification of how these methods are used:
|
|
649
|
-
*
|
|
650
|
-
* type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
|
|
651
|
-
* decl := ReactPropTypes.{type}(.isRequired)?
|
|
652
|
-
*
|
|
653
|
-
* Each and every declaration produces a function with the same signature. This
|
|
654
|
-
* allows the creation of custom validation functions. For example:
|
|
655
|
-
*
|
|
656
|
-
* var MyLink = React.createClass({
|
|
657
|
-
* propTypes: {
|
|
658
|
-
* // An optional string or URI prop named "href".
|
|
659
|
-
* href: function(props, propName, componentName) {
|
|
660
|
-
* var propValue = props[propName];
|
|
661
|
-
* if (propValue != null && typeof propValue !== 'string' &&
|
|
662
|
-
* !(propValue instanceof URI)) {
|
|
663
|
-
* return new Error(
|
|
664
|
-
* 'Expected a string or an URI for ' + propName + ' in ' +
|
|
665
|
-
* componentName
|
|
666
|
-
* );
|
|
667
|
-
* }
|
|
668
|
-
* }
|
|
669
|
-
* },
|
|
670
|
-
* render: function() {...}
|
|
671
|
-
* });
|
|
672
|
-
*
|
|
673
|
-
* @internal
|
|
674
|
-
*/
|
|
675
|
-
|
|
676
|
-
var ANONYMOUS = '<<anonymous>>';
|
|
677
|
-
|
|
678
|
-
// Important!
|
|
679
|
-
// Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
|
|
680
|
-
var ReactPropTypes = {
|
|
681
|
-
array: createPrimitiveTypeChecker('array'),
|
|
682
|
-
bigint: createPrimitiveTypeChecker('bigint'),
|
|
683
|
-
bool: createPrimitiveTypeChecker('boolean'),
|
|
684
|
-
func: createPrimitiveTypeChecker('function'),
|
|
685
|
-
number: createPrimitiveTypeChecker('number'),
|
|
686
|
-
object: createPrimitiveTypeChecker('object'),
|
|
687
|
-
string: createPrimitiveTypeChecker('string'),
|
|
688
|
-
symbol: createPrimitiveTypeChecker('symbol'),
|
|
689
|
-
|
|
690
|
-
any: createAnyTypeChecker(),
|
|
691
|
-
arrayOf: createArrayOfTypeChecker,
|
|
692
|
-
element: createElementTypeChecker(),
|
|
693
|
-
elementType: createElementTypeTypeChecker(),
|
|
694
|
-
instanceOf: createInstanceTypeChecker,
|
|
695
|
-
node: createNodeChecker(),
|
|
696
|
-
objectOf: createObjectOfTypeChecker,
|
|
697
|
-
oneOf: createEnumTypeChecker,
|
|
698
|
-
oneOfType: createUnionTypeChecker,
|
|
699
|
-
shape: createShapeTypeChecker,
|
|
700
|
-
exact: createStrictShapeTypeChecker,
|
|
701
|
-
};
|
|
702
|
-
|
|
703
|
-
/**
|
|
704
|
-
* inlined Object.is polyfill to avoid requiring consumers ship their own
|
|
705
|
-
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
|
|
706
|
-
*/
|
|
707
|
-
/*eslint-disable no-self-compare*/
|
|
708
|
-
function is(x, y) {
|
|
709
|
-
// SameValue algorithm
|
|
710
|
-
if (x === y) {
|
|
711
|
-
// Steps 1-5, 7-10
|
|
712
|
-
// Steps 6.b-6.e: +0 != -0
|
|
713
|
-
return x !== 0 || 1 / x === 1 / y;
|
|
714
|
-
} else {
|
|
715
|
-
// Step 6.a: NaN == NaN
|
|
716
|
-
return x !== x && y !== y;
|
|
717
|
-
}
|
|
718
|
-
}
|
|
719
|
-
/*eslint-enable no-self-compare*/
|
|
720
|
-
|
|
721
|
-
/**
|
|
722
|
-
* We use an Error-like object for backward compatibility as people may call
|
|
723
|
-
* PropTypes directly and inspect their output. However, we don't use real
|
|
724
|
-
* Errors anymore. We don't inspect their stack anyway, and creating them
|
|
725
|
-
* is prohibitively expensive if they are created too often, such as what
|
|
726
|
-
* happens in oneOfType() for any type before the one that matched.
|
|
727
|
-
*/
|
|
728
|
-
function PropTypeError(message, data) {
|
|
729
|
-
this.message = message;
|
|
730
|
-
this.data = data && typeof data === 'object' ? data: {};
|
|
731
|
-
this.stack = '';
|
|
732
|
-
}
|
|
733
|
-
// Make `instanceof Error` still work for returned errors.
|
|
734
|
-
PropTypeError.prototype = Error.prototype;
|
|
735
|
-
|
|
736
|
-
function createChainableTypeChecker(validate) {
|
|
737
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
738
|
-
var manualPropTypeCallCache = {};
|
|
739
|
-
var manualPropTypeWarningCount = 0;
|
|
740
|
-
}
|
|
741
|
-
function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
|
|
742
|
-
componentName = componentName || ANONYMOUS;
|
|
743
|
-
propFullName = propFullName || propName;
|
|
744
|
-
|
|
745
|
-
if (secret !== ReactPropTypesSecret) {
|
|
746
|
-
if (throwOnDirectAccess) {
|
|
747
|
-
// New behavior only for users of `prop-types` package
|
|
748
|
-
var err = new Error(
|
|
749
|
-
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
|
750
|
-
'Use `PropTypes.checkPropTypes()` to call them. ' +
|
|
751
|
-
'Read more at http://fb.me/use-check-prop-types'
|
|
752
|
-
);
|
|
753
|
-
err.name = 'Invariant Violation';
|
|
754
|
-
throw err;
|
|
755
|
-
} else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
|
|
756
|
-
// Old behavior for people using React.PropTypes
|
|
757
|
-
var cacheKey = componentName + ':' + propName;
|
|
758
|
-
if (
|
|
759
|
-
!manualPropTypeCallCache[cacheKey] &&
|
|
760
|
-
// Avoid spamming the console because they are often not actionable except for lib authors
|
|
761
|
-
manualPropTypeWarningCount < 3
|
|
762
|
-
) {
|
|
763
|
-
printWarning(
|
|
764
|
-
'You are manually calling a React.PropTypes validation ' +
|
|
765
|
-
'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
|
|
766
|
-
'and will throw in the standalone `prop-types` package. ' +
|
|
767
|
-
'You may be seeing this warning due to a third-party PropTypes ' +
|
|
768
|
-
'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
|
|
769
|
-
);
|
|
770
|
-
manualPropTypeCallCache[cacheKey] = true;
|
|
771
|
-
manualPropTypeWarningCount++;
|
|
772
|
-
}
|
|
773
|
-
}
|
|
774
|
-
}
|
|
775
|
-
if (props[propName] == null) {
|
|
776
|
-
if (isRequired) {
|
|
777
|
-
if (props[propName] === null) {
|
|
778
|
-
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
|
|
779
|
-
}
|
|
780
|
-
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
|
|
781
|
-
}
|
|
782
|
-
return null;
|
|
783
|
-
} else {
|
|
784
|
-
return validate(props, propName, componentName, location, propFullName);
|
|
785
|
-
}
|
|
786
|
-
}
|
|
787
|
-
|
|
788
|
-
var chainedCheckType = checkType.bind(null, false);
|
|
789
|
-
chainedCheckType.isRequired = checkType.bind(null, true);
|
|
790
|
-
|
|
791
|
-
return chainedCheckType;
|
|
792
|
-
}
|
|
793
|
-
|
|
794
|
-
function createPrimitiveTypeChecker(expectedType) {
|
|
795
|
-
function validate(props, propName, componentName, location, propFullName, secret) {
|
|
796
|
-
var propValue = props[propName];
|
|
797
|
-
var propType = getPropType(propValue);
|
|
798
|
-
if (propType !== expectedType) {
|
|
799
|
-
// `propValue` being instance of, say, date/regexp, pass the 'object'
|
|
800
|
-
// check, but we can offer a more precise error message here rather than
|
|
801
|
-
// 'of type `object`'.
|
|
802
|
-
var preciseType = getPreciseType(propValue);
|
|
803
|
-
|
|
804
|
-
return new PropTypeError(
|
|
805
|
-
'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),
|
|
806
|
-
{expectedType: expectedType}
|
|
807
|
-
);
|
|
808
|
-
}
|
|
809
|
-
return null;
|
|
810
|
-
}
|
|
811
|
-
return createChainableTypeChecker(validate);
|
|
812
|
-
}
|
|
813
|
-
|
|
814
|
-
function createAnyTypeChecker() {
|
|
815
|
-
return createChainableTypeChecker(emptyFunctionThatReturnsNull);
|
|
816
|
-
}
|
|
817
|
-
|
|
818
|
-
function createArrayOfTypeChecker(typeChecker) {
|
|
819
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
820
|
-
if (typeof typeChecker !== 'function') {
|
|
821
|
-
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
|
|
822
|
-
}
|
|
823
|
-
var propValue = props[propName];
|
|
824
|
-
if (!Array.isArray(propValue)) {
|
|
825
|
-
var propType = getPropType(propValue);
|
|
826
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
|
|
827
|
-
}
|
|
828
|
-
for (var i = 0; i < propValue.length; i++) {
|
|
829
|
-
var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
|
|
830
|
-
if (error instanceof Error) {
|
|
831
|
-
return error;
|
|
832
|
-
}
|
|
833
|
-
}
|
|
834
|
-
return null;
|
|
835
|
-
}
|
|
836
|
-
return createChainableTypeChecker(validate);
|
|
837
|
-
}
|
|
838
|
-
|
|
839
|
-
function createElementTypeChecker() {
|
|
840
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
841
|
-
var propValue = props[propName];
|
|
842
|
-
if (!isValidElement(propValue)) {
|
|
843
|
-
var propType = getPropType(propValue);
|
|
844
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
|
|
845
|
-
}
|
|
846
|
-
return null;
|
|
847
|
-
}
|
|
848
|
-
return createChainableTypeChecker(validate);
|
|
849
|
-
}
|
|
850
|
-
|
|
851
|
-
function createElementTypeTypeChecker() {
|
|
852
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
853
|
-
var propValue = props[propName];
|
|
854
|
-
if (!ReactIs.isValidElementType(propValue)) {
|
|
855
|
-
var propType = getPropType(propValue);
|
|
856
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
|
|
857
|
-
}
|
|
858
|
-
return null;
|
|
859
|
-
}
|
|
860
|
-
return createChainableTypeChecker(validate);
|
|
861
|
-
}
|
|
862
|
-
|
|
863
|
-
function createInstanceTypeChecker(expectedClass) {
|
|
864
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
865
|
-
if (!(props[propName] instanceof expectedClass)) {
|
|
866
|
-
var expectedClassName = expectedClass.name || ANONYMOUS;
|
|
867
|
-
var actualClassName = getClassName(props[propName]);
|
|
868
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
|
|
869
|
-
}
|
|
870
|
-
return null;
|
|
871
|
-
}
|
|
872
|
-
return createChainableTypeChecker(validate);
|
|
873
|
-
}
|
|
874
|
-
|
|
875
|
-
function createEnumTypeChecker(expectedValues) {
|
|
876
|
-
if (!Array.isArray(expectedValues)) {
|
|
877
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
878
|
-
if (arguments.length > 1) {
|
|
879
|
-
printWarning(
|
|
880
|
-
'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
|
|
881
|
-
'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
|
|
882
|
-
);
|
|
883
|
-
} else {
|
|
884
|
-
printWarning('Invalid argument supplied to oneOf, expected an array.');
|
|
885
|
-
}
|
|
886
|
-
}
|
|
887
|
-
return emptyFunctionThatReturnsNull;
|
|
888
|
-
}
|
|
889
|
-
|
|
890
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
891
|
-
var propValue = props[propName];
|
|
892
|
-
for (var i = 0; i < expectedValues.length; i++) {
|
|
893
|
-
if (is(propValue, expectedValues[i])) {
|
|
894
|
-
return null;
|
|
895
|
-
}
|
|
896
|
-
}
|
|
897
|
-
|
|
898
|
-
var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
|
|
899
|
-
var type = getPreciseType(value);
|
|
900
|
-
if (type === 'symbol') {
|
|
901
|
-
return String(value);
|
|
902
|
-
}
|
|
903
|
-
return value;
|
|
904
|
-
});
|
|
905
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
|
|
906
|
-
}
|
|
907
|
-
return createChainableTypeChecker(validate);
|
|
908
|
-
}
|
|
909
|
-
|
|
910
|
-
function createObjectOfTypeChecker(typeChecker) {
|
|
911
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
912
|
-
if (typeof typeChecker !== 'function') {
|
|
913
|
-
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
|
|
914
|
-
}
|
|
915
|
-
var propValue = props[propName];
|
|
916
|
-
var propType = getPropType(propValue);
|
|
917
|
-
if (propType !== 'object') {
|
|
918
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
|
|
919
|
-
}
|
|
920
|
-
for (var key in propValue) {
|
|
921
|
-
if (has(propValue, key)) {
|
|
922
|
-
var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
|
923
|
-
if (error instanceof Error) {
|
|
924
|
-
return error;
|
|
925
|
-
}
|
|
926
|
-
}
|
|
927
|
-
}
|
|
928
|
-
return null;
|
|
929
|
-
}
|
|
930
|
-
return createChainableTypeChecker(validate);
|
|
931
|
-
}
|
|
932
|
-
|
|
933
|
-
function createUnionTypeChecker(arrayOfTypeCheckers) {
|
|
934
|
-
if (!Array.isArray(arrayOfTypeCheckers)) {
|
|
935
|
-
process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
|
|
936
|
-
return emptyFunctionThatReturnsNull;
|
|
937
|
-
}
|
|
938
|
-
|
|
939
|
-
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
940
|
-
var checker = arrayOfTypeCheckers[i];
|
|
941
|
-
if (typeof checker !== 'function') {
|
|
942
|
-
printWarning(
|
|
943
|
-
'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
|
|
944
|
-
'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
|
|
945
|
-
);
|
|
946
|
-
return emptyFunctionThatReturnsNull;
|
|
947
|
-
}
|
|
948
|
-
}
|
|
949
|
-
|
|
950
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
951
|
-
var expectedTypes = [];
|
|
952
|
-
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
953
|
-
var checker = arrayOfTypeCheckers[i];
|
|
954
|
-
var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
|
|
955
|
-
if (checkerResult == null) {
|
|
956
|
-
return null;
|
|
957
|
-
}
|
|
958
|
-
if (checkerResult.data && has(checkerResult.data, 'expectedType')) {
|
|
959
|
-
expectedTypes.push(checkerResult.data.expectedType);
|
|
960
|
-
}
|
|
961
|
-
}
|
|
962
|
-
var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';
|
|
963
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
|
|
964
|
-
}
|
|
965
|
-
return createChainableTypeChecker(validate);
|
|
966
|
-
}
|
|
967
|
-
|
|
968
|
-
function createNodeChecker() {
|
|
969
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
970
|
-
if (!isNode(props[propName])) {
|
|
971
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
|
|
972
|
-
}
|
|
973
|
-
return null;
|
|
974
|
-
}
|
|
975
|
-
return createChainableTypeChecker(validate);
|
|
976
|
-
}
|
|
977
|
-
|
|
978
|
-
function invalidValidatorError(componentName, location, propFullName, key, type) {
|
|
979
|
-
return new PropTypeError(
|
|
980
|
-
(componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +
|
|
981
|
-
'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'
|
|
982
|
-
);
|
|
983
|
-
}
|
|
984
|
-
|
|
985
|
-
function createShapeTypeChecker(shapeTypes) {
|
|
986
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
987
|
-
var propValue = props[propName];
|
|
988
|
-
var propType = getPropType(propValue);
|
|
989
|
-
if (propType !== 'object') {
|
|
990
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
|
991
|
-
}
|
|
992
|
-
for (var key in shapeTypes) {
|
|
993
|
-
var checker = shapeTypes[key];
|
|
994
|
-
if (typeof checker !== 'function') {
|
|
995
|
-
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
|
996
|
-
}
|
|
997
|
-
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
|
998
|
-
if (error) {
|
|
999
|
-
return error;
|
|
1000
|
-
}
|
|
1001
|
-
}
|
|
1002
|
-
return null;
|
|
1003
|
-
}
|
|
1004
|
-
return createChainableTypeChecker(validate);
|
|
1005
|
-
}
|
|
1006
|
-
|
|
1007
|
-
function createStrictShapeTypeChecker(shapeTypes) {
|
|
1008
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
1009
|
-
var propValue = props[propName];
|
|
1010
|
-
var propType = getPropType(propValue);
|
|
1011
|
-
if (propType !== 'object') {
|
|
1012
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
|
1013
|
-
}
|
|
1014
|
-
// We need to check all keys in case some are required but missing from props.
|
|
1015
|
-
var allKeys = assign({}, props[propName], shapeTypes);
|
|
1016
|
-
for (var key in allKeys) {
|
|
1017
|
-
var checker = shapeTypes[key];
|
|
1018
|
-
if (has(shapeTypes, key) && typeof checker !== 'function') {
|
|
1019
|
-
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
|
1020
|
-
}
|
|
1021
|
-
if (!checker) {
|
|
1022
|
-
return new PropTypeError(
|
|
1023
|
-
'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
|
|
1024
|
-
'\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
|
|
1025
|
-
'\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
|
|
1026
|
-
);
|
|
1027
|
-
}
|
|
1028
|
-
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
|
1029
|
-
if (error) {
|
|
1030
|
-
return error;
|
|
1031
|
-
}
|
|
1032
|
-
}
|
|
1033
|
-
return null;
|
|
1034
|
-
}
|
|
1035
|
-
|
|
1036
|
-
return createChainableTypeChecker(validate);
|
|
1037
|
-
}
|
|
1038
|
-
|
|
1039
|
-
function isNode(propValue) {
|
|
1040
|
-
switch (typeof propValue) {
|
|
1041
|
-
case 'number':
|
|
1042
|
-
case 'string':
|
|
1043
|
-
case 'undefined':
|
|
1044
|
-
return true;
|
|
1045
|
-
case 'boolean':
|
|
1046
|
-
return !propValue;
|
|
1047
|
-
case 'object':
|
|
1048
|
-
if (Array.isArray(propValue)) {
|
|
1049
|
-
return propValue.every(isNode);
|
|
1050
|
-
}
|
|
1051
|
-
if (propValue === null || isValidElement(propValue)) {
|
|
1052
|
-
return true;
|
|
1053
|
-
}
|
|
1054
|
-
|
|
1055
|
-
var iteratorFn = getIteratorFn(propValue);
|
|
1056
|
-
if (iteratorFn) {
|
|
1057
|
-
var iterator = iteratorFn.call(propValue);
|
|
1058
|
-
var step;
|
|
1059
|
-
if (iteratorFn !== propValue.entries) {
|
|
1060
|
-
while (!(step = iterator.next()).done) {
|
|
1061
|
-
if (!isNode(step.value)) {
|
|
1062
|
-
return false;
|
|
1063
|
-
}
|
|
1064
|
-
}
|
|
1065
|
-
} else {
|
|
1066
|
-
// Iterator will provide entry [k,v] tuples rather than values.
|
|
1067
|
-
while (!(step = iterator.next()).done) {
|
|
1068
|
-
var entry = step.value;
|
|
1069
|
-
if (entry) {
|
|
1070
|
-
if (!isNode(entry[1])) {
|
|
1071
|
-
return false;
|
|
1072
|
-
}
|
|
1073
|
-
}
|
|
1074
|
-
}
|
|
1075
|
-
}
|
|
1076
|
-
} else {
|
|
1077
|
-
return false;
|
|
1078
|
-
}
|
|
1079
|
-
|
|
1080
|
-
return true;
|
|
1081
|
-
default:
|
|
1082
|
-
return false;
|
|
1083
|
-
}
|
|
1084
|
-
}
|
|
1085
|
-
|
|
1086
|
-
function isSymbol(propType, propValue) {
|
|
1087
|
-
// Native Symbol.
|
|
1088
|
-
if (propType === 'symbol') {
|
|
1089
|
-
return true;
|
|
1090
|
-
}
|
|
1091
|
-
|
|
1092
|
-
// falsy value can't be a Symbol
|
|
1093
|
-
if (!propValue) {
|
|
1094
|
-
return false;
|
|
1095
|
-
}
|
|
1096
|
-
|
|
1097
|
-
// 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
|
|
1098
|
-
if (propValue['@@toStringTag'] === 'Symbol') {
|
|
1099
|
-
return true;
|
|
1100
|
-
}
|
|
1101
|
-
|
|
1102
|
-
// Fallback for non-spec compliant Symbols which are polyfilled.
|
|
1103
|
-
if (typeof Symbol === 'function' && propValue instanceof Symbol) {
|
|
1104
|
-
return true;
|
|
1105
|
-
}
|
|
1106
|
-
|
|
1107
|
-
return false;
|
|
1108
|
-
}
|
|
1109
|
-
|
|
1110
|
-
// Equivalent of `typeof` but with special handling for array and regexp.
|
|
1111
|
-
function getPropType(propValue) {
|
|
1112
|
-
var propType = typeof propValue;
|
|
1113
|
-
if (Array.isArray(propValue)) {
|
|
1114
|
-
return 'array';
|
|
1115
|
-
}
|
|
1116
|
-
if (propValue instanceof RegExp) {
|
|
1117
|
-
// Old webkits (at least until Android 4.0) return 'function' rather than
|
|
1118
|
-
// 'object' for typeof a RegExp. We'll normalize this here so that /bla/
|
|
1119
|
-
// passes PropTypes.object.
|
|
1120
|
-
return 'object';
|
|
1121
|
-
}
|
|
1122
|
-
if (isSymbol(propType, propValue)) {
|
|
1123
|
-
return 'symbol';
|
|
1124
|
-
}
|
|
1125
|
-
return propType;
|
|
1126
|
-
}
|
|
1127
|
-
|
|
1128
|
-
// This handles more types than `getPropType`. Only used for error messages.
|
|
1129
|
-
// See `createPrimitiveTypeChecker`.
|
|
1130
|
-
function getPreciseType(propValue) {
|
|
1131
|
-
if (typeof propValue === 'undefined' || propValue === null) {
|
|
1132
|
-
return '' + propValue;
|
|
1133
|
-
}
|
|
1134
|
-
var propType = getPropType(propValue);
|
|
1135
|
-
if (propType === 'object') {
|
|
1136
|
-
if (propValue instanceof Date) {
|
|
1137
|
-
return 'date';
|
|
1138
|
-
} else if (propValue instanceof RegExp) {
|
|
1139
|
-
return 'regexp';
|
|
1140
|
-
}
|
|
1141
|
-
}
|
|
1142
|
-
return propType;
|
|
1143
|
-
}
|
|
1144
|
-
|
|
1145
|
-
// Returns a string that is postfixed to a warning about an invalid type.
|
|
1146
|
-
// For example, "undefined" or "of type array"
|
|
1147
|
-
function getPostfixForTypeWarning(value) {
|
|
1148
|
-
var type = getPreciseType(value);
|
|
1149
|
-
switch (type) {
|
|
1150
|
-
case 'array':
|
|
1151
|
-
case 'object':
|
|
1152
|
-
return 'an ' + type;
|
|
1153
|
-
case 'boolean':
|
|
1154
|
-
case 'date':
|
|
1155
|
-
case 'regexp':
|
|
1156
|
-
return 'a ' + type;
|
|
1157
|
-
default:
|
|
1158
|
-
return type;
|
|
1159
|
-
}
|
|
1160
|
-
}
|
|
1161
|
-
|
|
1162
|
-
// Returns class name of the object, if any.
|
|
1163
|
-
function getClassName(propValue) {
|
|
1164
|
-
if (!propValue.constructor || !propValue.constructor.name) {
|
|
1165
|
-
return ANONYMOUS;
|
|
1166
|
-
}
|
|
1167
|
-
return propValue.constructor.name;
|
|
1168
|
-
}
|
|
1169
|
-
|
|
1170
|
-
ReactPropTypes.checkPropTypes = checkPropTypes;
|
|
1171
|
-
ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
|
|
1172
|
-
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
1173
|
-
|
|
1174
|
-
return ReactPropTypes;
|
|
1175
|
-
};
|
|
1176
|
-
return factoryWithTypeCheckers;
|
|
1177
|
-
}
|
|
1178
|
-
|
|
1179
|
-
/**
|
|
1180
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
1181
|
-
*
|
|
1182
|
-
* This source code is licensed under the MIT license found in the
|
|
1183
|
-
* LICENSE file in the root directory of this source tree.
|
|
1184
|
-
*/
|
|
1185
|
-
|
|
1186
|
-
var factoryWithThrowingShims;
|
|
1187
|
-
var hasRequiredFactoryWithThrowingShims;
|
|
1188
|
-
|
|
1189
|
-
function requireFactoryWithThrowingShims () {
|
|
1190
|
-
if (hasRequiredFactoryWithThrowingShims) return factoryWithThrowingShims;
|
|
1191
|
-
hasRequiredFactoryWithThrowingShims = 1;
|
|
1192
|
-
|
|
1193
|
-
var ReactPropTypesSecret = requireReactPropTypesSecret();
|
|
1194
|
-
|
|
1195
|
-
function emptyFunction() {}
|
|
1196
|
-
function emptyFunctionWithReset() {}
|
|
1197
|
-
emptyFunctionWithReset.resetWarningCache = emptyFunction;
|
|
1198
|
-
|
|
1199
|
-
factoryWithThrowingShims = function() {
|
|
1200
|
-
function shim(props, propName, componentName, location, propFullName, secret) {
|
|
1201
|
-
if (secret === ReactPropTypesSecret) {
|
|
1202
|
-
// It is still safe when called from React.
|
|
1203
|
-
return;
|
|
1204
|
-
}
|
|
1205
|
-
var err = new Error(
|
|
1206
|
-
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
|
1207
|
-
'Use PropTypes.checkPropTypes() to call them. ' +
|
|
1208
|
-
'Read more at http://fb.me/use-check-prop-types'
|
|
1209
|
-
);
|
|
1210
|
-
err.name = 'Invariant Violation';
|
|
1211
|
-
throw err;
|
|
1212
|
-
} shim.isRequired = shim;
|
|
1213
|
-
function getShim() {
|
|
1214
|
-
return shim;
|
|
1215
|
-
} // Important!
|
|
1216
|
-
// Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
|
|
1217
|
-
var ReactPropTypes = {
|
|
1218
|
-
array: shim,
|
|
1219
|
-
bigint: shim,
|
|
1220
|
-
bool: shim,
|
|
1221
|
-
func: shim,
|
|
1222
|
-
number: shim,
|
|
1223
|
-
object: shim,
|
|
1224
|
-
string: shim,
|
|
1225
|
-
symbol: shim,
|
|
1226
|
-
|
|
1227
|
-
any: shim,
|
|
1228
|
-
arrayOf: getShim,
|
|
1229
|
-
element: shim,
|
|
1230
|
-
elementType: shim,
|
|
1231
|
-
instanceOf: getShim,
|
|
1232
|
-
node: shim,
|
|
1233
|
-
objectOf: getShim,
|
|
1234
|
-
oneOf: getShim,
|
|
1235
|
-
oneOfType: getShim,
|
|
1236
|
-
shape: getShim,
|
|
1237
|
-
exact: getShim,
|
|
1238
|
-
|
|
1239
|
-
checkPropTypes: emptyFunctionWithReset,
|
|
1240
|
-
resetWarningCache: emptyFunction
|
|
1241
|
-
};
|
|
1242
|
-
|
|
1243
|
-
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
1244
|
-
|
|
1245
|
-
return ReactPropTypes;
|
|
1246
|
-
};
|
|
1247
|
-
return factoryWithThrowingShims;
|
|
1248
|
-
}
|
|
1249
|
-
|
|
1250
|
-
/**
|
|
1251
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
1252
|
-
*
|
|
1253
|
-
* This source code is licensed under the MIT license found in the
|
|
1254
|
-
* LICENSE file in the root directory of this source tree.
|
|
1255
|
-
*/
|
|
1256
|
-
|
|
1257
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
1258
|
-
var ReactIs = requireReactIs();
|
|
1259
|
-
|
|
1260
|
-
// By explicitly using `prop-types` you are opting into new development behavior.
|
|
1261
|
-
// http://fb.me/prop-types-in-prod
|
|
1262
|
-
var throwOnDirectAccess = true;
|
|
1263
|
-
propTypes.exports = requireFactoryWithTypeCheckers()(ReactIs.isElement, throwOnDirectAccess);
|
|
1264
|
-
} else {
|
|
1265
|
-
// By explicitly using `prop-types` you are opting into new production behavior.
|
|
1266
|
-
// http://fb.me/prop-types-in-prod
|
|
1267
|
-
propTypes.exports = requireFactoryWithThrowingShims()();
|
|
1268
|
-
}
|
|
1269
|
-
|
|
1270
|
-
function _typeof(o) {
|
|
1271
|
-
"@babel/helpers - typeof";
|
|
1272
|
-
|
|
1273
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
1274
|
-
return typeof o;
|
|
1275
|
-
} : function (o) {
|
|
1276
|
-
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
1277
|
-
}, _typeof(o);
|
|
1278
|
-
}
|
|
1279
|
-
|
|
1280
|
-
function _toPrimitive(input, hint) {
|
|
1281
|
-
if (_typeof(input) !== "object" || input === null) return input;
|
|
1282
|
-
var prim = input[Symbol.toPrimitive];
|
|
1283
|
-
if (prim !== undefined) {
|
|
1284
|
-
var res = prim.call(input, hint || "default");
|
|
1285
|
-
if (_typeof(res) !== "object") return res;
|
|
1286
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1287
|
-
}
|
|
1288
|
-
return (hint === "string" ? String : Number)(input);
|
|
1289
|
-
}
|
|
1290
|
-
|
|
1291
|
-
function _toPropertyKey(arg) {
|
|
1292
|
-
var key = _toPrimitive(arg, "string");
|
|
1293
|
-
return _typeof(key) === "symbol" ? key : String(key);
|
|
1294
|
-
}
|
|
1295
|
-
|
|
1296
|
-
function _defineProperty(obj, key, value) {
|
|
1297
|
-
key = _toPropertyKey(key);
|
|
1298
|
-
if (key in obj) {
|
|
1299
|
-
Object.defineProperty(obj, key, {
|
|
1300
|
-
value: value,
|
|
1301
|
-
enumerable: true,
|
|
1302
|
-
configurable: true,
|
|
1303
|
-
writable: true
|
|
1304
|
-
});
|
|
1305
|
-
} else {
|
|
1306
|
-
obj[key] = value;
|
|
1307
|
-
}
|
|
1308
|
-
return obj;
|
|
1309
|
-
}
|
|
1310
|
-
|
|
1311
|
-
function _arrayLikeToArray(arr, len) {
|
|
1312
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
1313
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
1314
|
-
return arr2;
|
|
1315
|
-
}
|
|
1316
|
-
|
|
1317
|
-
function _arrayWithoutHoles(arr) {
|
|
1318
|
-
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
1319
|
-
}
|
|
1320
|
-
|
|
1321
|
-
function _iterableToArray(iter) {
|
|
1322
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
1323
|
-
}
|
|
1324
|
-
|
|
1325
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
1326
|
-
if (!o) return;
|
|
1327
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
1328
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
1329
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
1330
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
1331
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
1332
|
-
}
|
|
1333
|
-
|
|
1334
|
-
function _nonIterableSpread() {
|
|
1335
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1336
|
-
}
|
|
1337
|
-
|
|
1338
|
-
function _toConsumableArray(arr) {
|
|
1339
|
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
1340
|
-
}
|
|
1341
|
-
|
|
1342
|
-
function _arrayWithHoles(arr) {
|
|
1343
|
-
if (Array.isArray(arr)) return arr;
|
|
1344
|
-
}
|
|
1345
|
-
|
|
1346
|
-
function _iterableToArrayLimit(r, l) {
|
|
1347
|
-
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
1348
|
-
if (null != t) {
|
|
1349
|
-
var e,
|
|
1350
|
-
n,
|
|
1351
|
-
i,
|
|
1352
|
-
u,
|
|
1353
|
-
a = [],
|
|
1354
|
-
f = !0,
|
|
1355
|
-
o = !1;
|
|
1356
|
-
try {
|
|
1357
|
-
if (i = (t = t.call(r)).next, 0 === l) {
|
|
1358
|
-
if (Object(t) !== t) return;
|
|
1359
|
-
f = !1;
|
|
1360
|
-
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
1361
|
-
} catch (r) {
|
|
1362
|
-
o = !0, n = r;
|
|
1363
|
-
} finally {
|
|
1364
|
-
try {
|
|
1365
|
-
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
|
|
1366
|
-
} finally {
|
|
1367
|
-
if (o) throw n;
|
|
1368
|
-
}
|
|
1369
|
-
}
|
|
1370
|
-
return a;
|
|
1371
|
-
}
|
|
1372
|
-
}
|
|
1373
|
-
|
|
1374
|
-
function _nonIterableRest() {
|
|
1375
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1376
|
-
}
|
|
1377
|
-
|
|
1378
|
-
function _slicedToArray(arr, i) {
|
|
1379
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
1380
|
-
}
|
|
1381
|
-
|
|
1382
|
-
var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r.prepend?"prepend":"append",d=!0===r.singleTag,i="string"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c();}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n));}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a="prepend"===s?"afterbegin":"beforeend";return i.insertAdjacentElement(a,e),e}}
|
|
1383
|
-
|
|
1384
56
|
var css$1 = ".neeto-molecules-app-switcher__wrapper{align-items:flex-start;background-color:rgb(var(--neeto-ui-white));display:flex;flex-direction:column;justify-content:flex-start;max-width:100%;overflow-y:auto;padding:40px;position:relative;transition:all .3s;width:100%}@media only screen and (max-width:992px){.neeto-molecules-app-switcher__wrapper{padding:32px}}@media screen and (max-width:768px){.neeto-molecules-app-switcher__wrapper{padding:16px}}.neeto-molecules-app-switcher__grid{grid-gap:24px;display:grid;gap:24px;grid-template-columns:repeat(auto-fill,minmax(288px,1fr))}@media only screen and (max-width:992px){.neeto-molecules-app-switcher__grid{grid-template-columns:repeat(auto-fill,minmax(248px,1fr))}}@media only screen and (max-width:640px){.neeto-molecules-app-switcher__grid{grid-template-columns:repeat(auto-fill,minmax(100%,1fr))}}.neeto-molecules-app-switcher__header{align-items:center;display:flex;gap:32px;justify-content:space-between;margin-bottom:32px;position:relative;width:100%}@media only screen and (max-width:768px){.neeto-molecules-app-switcher__header{align-items:flex-start;flex-direction:column-reverse;gap:24px}}@media only screen and (max-width:640px){.neeto-molecules-app-switcher__header h1{font-size:24px}}.neeto-molecules-app-switcher__close-btn{position:absolute;right:12px;top:12px}.neeto-molecules-app-switcher__search-wrapper{flex-grow:1}@media only screen and (min-width:992px){.neeto-molecules-app-switcher__search-wrapper{flex-grow:0;width:296px}}.neeto-molecules-app-switcher__body{display:flex;flex-direction:column;font-size:var(--neeto-ui-text-sm);gap:12px;margin-bottom:24px;width:100%}.neeto-molecules-app-switcher-link{align-items:center;background-color:rgb(var(--neeto-ui-gray-100));border-color:rgb(var(--neeto-ui-gray-100));border-radius:var(--neeto-ui-rounded-lg);border-style:solid;border-width:2px;cursor:pointer;display:flex;gap:12px;max-width:100%;padding:12px 16px;text-decoration:none;transition:background-color .3s ease-in-out;width:100%}.neeto-molecules-app-switcher-link:focus,.neeto-molecules-app-switcher-link:focus-visible{outline:none}.neeto-molecules-app-switcher-link:focus-visible{background-color:rgb(var(--neeto-ui-gray-200))}.neeto-molecules-app-switcher-link:not(.neeto-molecules-app-switcher-link--active):hover{background-color:rgb(var(--neeto-ui-gray-200))}.neeto-molecules-app-switcher-link--active{background:rgb(var(--neeto-ui-primary-100));border-color:rgb(var(--neeto-ui-primary-600))}.neeto-molecules-app-switcher-link__icon-holder{align-items:center;border-radius:var(--neeto-ui-rounded-lg);display:flex;flex-shrink:0;height:42px;justify-content:center;width:42px}.neeto-molecules-app-switcher-link__content{flex-grow:1}.neeto-molecules-app-switcher-link__content span{display:block}";
|
|
1385
|
-
n(css$1,{});
|
|
57
|
+
injectCss.n(css$1,{});
|
|
1386
58
|
|
|
1387
59
|
var AppLink = function AppLink(_ref) {
|
|
1388
60
|
var name = _ref.name,
|
|
@@ -1397,7 +69,7 @@ var AppLink = function AppLink(_ref) {
|
|
|
1397
69
|
rel: "noreferrer",
|
|
1398
70
|
target: "_blank",
|
|
1399
71
|
className: classnames__default["default"]("neeto-molecules-app-switcher-link", {
|
|
1400
|
-
"neeto-molecules-app-switcher-link--active":
|
|
72
|
+
"neeto-molecules-app-switcher-link--active": globalProps.appName.includes(name)
|
|
1401
73
|
})
|
|
1402
74
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1403
75
|
className: classnames__default["default"]("neeto-molecules-app-switcher-link__icon-holder", {
|
|
@@ -1427,7 +99,7 @@ var Body = function Body() {
|
|
|
1427
99
|
var _useTranslation = reactI18next.useTranslation(),
|
|
1428
100
|
t = _useTranslation.t;
|
|
1429
101
|
var _useState = React.useState(""),
|
|
1430
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
102
|
+
_useState2 = slicedToArray._slicedToArray(_useState, 2),
|
|
1431
103
|
searchTerm = _useState2[0],
|
|
1432
104
|
setSearchTerm = _useState2[1];
|
|
1433
105
|
var _useFetchNeetoApps = useFetchNeetoApps__default["default"]({
|
|
@@ -1462,7 +134,7 @@ var Body = function Body() {
|
|
|
1462
134
|
}, (filteredApps === null || filteredApps === void 0 ? void 0 : filteredApps.length) > 0 ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1463
135
|
className: "neeto-molecules-app-switcher__grid"
|
|
1464
136
|
}, filteredApps.map(function (app) {
|
|
1465
|
-
return /*#__PURE__*/React__default["default"].createElement(AppLink$1, _extends({
|
|
137
|
+
return /*#__PURE__*/React__default["default"].createElement(AppLink$1, _extends._extends({
|
|
1466
138
|
key: app.name
|
|
1467
139
|
}, app));
|
|
1468
140
|
})) : /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
@@ -1483,12 +155,12 @@ var AppSwitcher = function AppSwitcher() {
|
|
|
1483
155
|
var _excluded$2 = ["showLoading"];
|
|
1484
156
|
var ProductSwitcherIcon = function ProductSwitcherIcon(_ref) {
|
|
1485
157
|
var showLoading = _ref.showLoading,
|
|
1486
|
-
otherProps = _objectWithoutProperties(_ref, _excluded$2);
|
|
158
|
+
otherProps = objectWithoutProperties._objectWithoutProperties(_ref, _excluded$2);
|
|
1487
159
|
return showLoading ? /*#__PURE__*/React__default["default"].createElement("span", {
|
|
1488
160
|
"data-testid": "app-switcher-button-loader"
|
|
1489
|
-
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Spinner, _extends({
|
|
161
|
+
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Spinner, _extends._extends({
|
|
1490
162
|
size: 18
|
|
1491
|
-
}, otherProps))) : /*#__PURE__*/React__default["default"].createElement(neetoIcons.AppSwitcher, _extends({
|
|
163
|
+
}, otherProps))) : /*#__PURE__*/React__default["default"].createElement(neetoIcons.AppSwitcher, _extends._extends({
|
|
1492
164
|
size: 18
|
|
1493
165
|
}, otherProps));
|
|
1494
166
|
};
|
|
@@ -1498,7 +170,7 @@ var AppSwitcherMenu = function AppSwitcherMenu() {
|
|
|
1498
170
|
var Menu = neetoui.Dropdown.Menu,
|
|
1499
171
|
MenuItem = neetoui.Dropdown.MenuItem;
|
|
1500
172
|
var _useState = React.useState(false),
|
|
1501
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
173
|
+
_useState2 = slicedToArray._slicedToArray(_useState, 2),
|
|
1502
174
|
hasHovered = _useState2[0],
|
|
1503
175
|
setHasHovered = _useState2[1];
|
|
1504
176
|
var _useFetchNeetoApps = useFetchNeetoApps__default["default"]({
|
|
@@ -1551,8 +223,8 @@ var LinkSection = function LinkSection(_ref) {
|
|
|
1551
223
|
var label = _ref2.label,
|
|
1552
224
|
Icon = _ref2.icon,
|
|
1553
225
|
changesCount = _ref2.changesCount,
|
|
1554
|
-
otherProps = _objectWithoutProperties(_ref2, _excluded$1);
|
|
1555
|
-
return /*#__PURE__*/React__default["default"].createElement(MenuItem.Button, _extends({
|
|
226
|
+
otherProps = objectWithoutProperties._objectWithoutProperties(_ref2, _excluded$1);
|
|
227
|
+
return /*#__PURE__*/React__default["default"].createElement(MenuItem.Button, _extends._extends({
|
|
1556
228
|
className: "neeto-molecules-menu-sublist__item-btn",
|
|
1557
229
|
"data-cy": "floating-action-menu-link-section",
|
|
1558
230
|
key: idx,
|
|
@@ -1713,7 +385,7 @@ var getProfileInfo = function getProfileInfo(profileInfoOverrides) {
|
|
|
1713
385
|
};
|
|
1714
386
|
|
|
1715
387
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1716
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
388
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { defineProperty._defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1717
389
|
var ProfileButton = function ProfileButton(_ref) {
|
|
1718
390
|
var helpLinkOverrides = _ref.helpLinkOverrides,
|
|
1719
391
|
profileInfoOverrides = _ref.profileInfoOverrides,
|
|
@@ -1721,21 +393,21 @@ var ProfileButton = function ProfileButton(_ref) {
|
|
|
1721
393
|
bottomLinks = _ref.bottomLinks,
|
|
1722
394
|
topLinks = _ref.topLinks,
|
|
1723
395
|
customContent = _ref.customContent;
|
|
1724
|
-
var _KeyboardShortcuts$us =
|
|
1725
|
-
_KeyboardShortcuts$us2 = _slicedToArray(_KeyboardShortcuts$us, 2),
|
|
396
|
+
var _KeyboardShortcuts$us = KeyboardShortcuts.usePaneState(),
|
|
397
|
+
_KeyboardShortcuts$us2 = slicedToArray._slicedToArray(_KeyboardShortcuts$us, 2),
|
|
1726
398
|
setIsOpen = _KeyboardShortcuts$us2[1];
|
|
1727
399
|
var _Profile$usePaneState = neetoTeamMembersFrontend.Profile.usePaneState(),
|
|
1728
|
-
_Profile$usePaneState2 = _slicedToArray(_Profile$usePaneState, 2),
|
|
400
|
+
_Profile$usePaneState2 = slicedToArray._slicedToArray(_Profile$usePaneState, 2),
|
|
1729
401
|
setIsProfilePaneOpen = _Profile$usePaneState2[1];
|
|
1730
402
|
var _useFetchNeetoApps = useFetchNeetoApps__default["default"]({
|
|
1731
403
|
enabled: false
|
|
1732
404
|
}),
|
|
1733
405
|
data = _useFetchNeetoApps.data;
|
|
1734
406
|
var profileInfo = getProfileInfo(profileInfoOverrides);
|
|
1735
|
-
var newTopLinks = globalProps.appName !== "neetoAuth" ? [].concat(_toConsumableArray(getDefaultTopLinks(data === null || data === void 0 ? void 0 : data.isOwner, setIsProfilePaneOpen)), _toConsumableArray(topLinks)) : topLinks;
|
|
1736
|
-
var newBottomLinks = [].concat(_toConsumableArray(getDefaultBottomLinks()), _toConsumableArray(bottomLinks));
|
|
407
|
+
var newTopLinks = globalProps.appName !== "neetoAuth" ? [].concat(toConsumableArray._toConsumableArray(getDefaultTopLinks(data === null || data === void 0 ? void 0 : data.isOwner, setIsProfilePaneOpen)), toConsumableArray._toConsumableArray(topLinks)) : topLinks;
|
|
408
|
+
var newBottomLinks = [].concat(toConsumableArray._toConsumableArray(getDefaultBottomLinks()), toConsumableArray._toConsumableArray(bottomLinks));
|
|
1737
409
|
var _useState = React.useState(null),
|
|
1738
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
410
|
+
_useState2 = slicedToArray._slicedToArray(_useState, 2),
|
|
1739
411
|
changesCount = _useState2[0],
|
|
1740
412
|
setChangesCount = _useState2[1];
|
|
1741
413
|
React.useEffect(function () {
|
|
@@ -1809,7 +481,7 @@ var ProfileButton = function ProfileButton(_ref) {
|
|
|
1809
481
|
};
|
|
1810
482
|
|
|
1811
483
|
var css = ":root{--neeto-molecules-floating-menu-z-index:99999}.neeto-molecules-floating-action-menu__container{align-items:center;background-color:rgb(var(--neeto-ui-white));border-bottom-right-radius:30px;border-top-right-radius:30px;bottom:20px;box-shadow:0 1px 1px 0 rgba(60,64,67,.3),0 1px 3px 1px rgba(60,64,67,.15);display:flex;justify-content:center;left:0;padding:6px;position:fixed;z-index:99999;z-index:var(--neeto-molecules-floating-menu-z-index)}.neeto-molecules-floating-action-button__dropdown{box-shadow:0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12),0 5px 5px -3px rgba(0,0,0,.2)!important;flex-shrink:0;max-height:none!important;max-width:none;width:220px;z-index:99999;z-index:var(--neeto-molecules-floating-menu-z-index)}.neeto-molecules-floating-action-button__dropdown ul{padding-top:0!important}.neeto-molecules-app-switcher-menu-popup__dropdown{max-height:none!important;max-width:none}.neeto-molecules-menu__notif-count{position:absolute;right:3px;top:3px;z-index:1}.neeto-molecules-menu-list__item-btn-count,.neeto-molecules-menu__notif-count{align-items:center;background-color:rgb(var(--neeto-ui-primary-500));border-radius:var(--neeto-ui-rounded-full);color:rgb(var(--neeto-ui-white));display:flex;flex-shrink:0;font-size:var(--neeto-ui-text-xxs);height:15px;justify-content:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:15px}.neeto-ui-dropdown__popup .neeto-molecules-app-switcher-menu-popup-wrapper{border:1px solid rgb(var(--neeto-ui-gray-400));border-radius:var(--neeto-ui-rounded)!important;box-shadow:0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12),0 5px 5px -3px rgba(0,0,0,.2)!important;min-width:240px}.neeto-ui-dropdown__popup .neeto-molecules-app-switcher-menu-popup-wrapper .tippy-content{padding:0}.neeto-ui-dropdown__popup .neeto-molecules-app-switcher-menu-popup-wrapper .tippy-svg-arrow{display:none!important}.neeto-molecules-profile-popup__top-section{border-top-left-radius:var(--neeto-ui-rounded);border-top-right-radius:var(--neeto-ui-rounded)}.neeto-molecules-menu-sublist__item-btn{font-weight:500!important;height:40px}.neeto-molecules-menu-sublist__item-btn.active{background-color:rgb(var(--neeto-ui-gray-800));color:rgb(var(--neeto-ui-white))}.neeto-molecules-menu-sublist__item-btn-icon svg path{vector-effect:non-scaling-stroke}.neeto-molecules-menu-sublist__item-btn span{align-items:center;display:flex;gap:8px}.neeto-molecules-app-switcher-menu-popup-wrapper{height:95vh;overflow-y:auto;width:calc(100vw - 400px)}.neeto-molecules-floating-action-button__profile-wrapper-custom-content:hover{background-color:rgb(var(--neeto-ui-white))!important}";
|
|
1812
|
-
n(css,{});
|
|
484
|
+
injectCss.n(css,{});
|
|
1813
485
|
|
|
1814
486
|
var _excluded = ["profileInfoOverrides", "helpLinkOverrides", "topLinks", "bottomLinks", "showAppSwitcher", "customContent"];
|
|
1815
487
|
var FloatingActionMenu = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
@@ -1824,8 +496,8 @@ var FloatingActionMenu = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1824
496
|
_ref$showAppSwitcher = _ref.showAppSwitcher,
|
|
1825
497
|
showAppSwitcher = _ref$showAppSwitcher === void 0 ? true : _ref$showAppSwitcher,
|
|
1826
498
|
customContent = _ref.customContent,
|
|
1827
|
-
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
1828
|
-
return /*#__PURE__*/React__default["default"].createElement("div", _extends({
|
|
499
|
+
otherProps = objectWithoutProperties._objectWithoutProperties(_ref, _excluded);
|
|
500
|
+
return /*#__PURE__*/React__default["default"].createElement("div", _extends._extends({
|
|
1829
501
|
ref: ref,
|
|
1830
502
|
className: "neeto-molecules-floating-action-menu__container neeto-ui-border-gray-300 border border-l-0",
|
|
1831
503
|
"data-cy": "floating-action-menu-container",
|
|
@@ -1844,39 +516,39 @@ FloatingActionMenu.propTypes = {
|
|
|
1844
516
|
/**
|
|
1845
517
|
* To specify the profile info to be rendered in the menu
|
|
1846
518
|
*/
|
|
1847
|
-
profileInfoOverrides: propTypes.exports.shape({
|
|
1848
|
-
name: propTypes.exports.string,
|
|
1849
|
-
email: propTypes.exports.string,
|
|
1850
|
-
imageUrl: propTypes.exports.string
|
|
519
|
+
profileInfoOverrides: index.propTypes.exports.shape({
|
|
520
|
+
name: index.propTypes.exports.string,
|
|
521
|
+
email: index.propTypes.exports.string,
|
|
522
|
+
imageUrl: index.propTypes.exports.string
|
|
1851
523
|
}),
|
|
1852
524
|
/**
|
|
1853
525
|
* Custom content to be rendered in the menu between the top and bottom links if any
|
|
1854
526
|
*/
|
|
1855
|
-
customContent: propTypes.exports.element,
|
|
527
|
+
customContent: index.propTypes.exports.element,
|
|
1856
528
|
/**
|
|
1857
529
|
* Any extra links to be rendered at the top of the menu.
|
|
1858
530
|
*/
|
|
1859
|
-
topLinks: propTypes.exports.arrayOf(propTypes.exports.shape({
|
|
1860
|
-
onClick: propTypes.exports.func,
|
|
1861
|
-
label: propTypes.exports.string,
|
|
1862
|
-
icon: propTypes.exports.oneOfType([propTypes.exports.element, propTypes.exports.func])
|
|
531
|
+
topLinks: index.propTypes.exports.arrayOf(index.propTypes.exports.shape({
|
|
532
|
+
onClick: index.propTypes.exports.func,
|
|
533
|
+
label: index.propTypes.exports.string,
|
|
534
|
+
icon: index.propTypes.exports.oneOfType([index.propTypes.exports.element, index.propTypes.exports.func])
|
|
1863
535
|
})),
|
|
1864
536
|
/**
|
|
1865
537
|
* Any extra links to be rendered at the bottom of the menu.
|
|
1866
538
|
*/
|
|
1867
|
-
bottomLinks: propTypes.exports.arrayOf(propTypes.exports.shape({
|
|
1868
|
-
onClick: propTypes.exports.func,
|
|
1869
|
-
label: propTypes.exports.string,
|
|
1870
|
-
icon: propTypes.exports.oneOfType([propTypes.exports.element, propTypes.exports.func])
|
|
539
|
+
bottomLinks: index.propTypes.exports.arrayOf(index.propTypes.exports.shape({
|
|
540
|
+
onClick: index.propTypes.exports.func,
|
|
541
|
+
label: index.propTypes.exports.string,
|
|
542
|
+
icon: index.propTypes.exports.oneOfType([index.propTypes.exports.element, index.propTypes.exports.func])
|
|
1871
543
|
})),
|
|
1872
544
|
/**
|
|
1873
545
|
* To override the values in the help links section in the menu.
|
|
1874
546
|
*/
|
|
1875
|
-
helpLinkOverrides: propTypes.exports.object,
|
|
547
|
+
helpLinkOverrides: index.propTypes.exports.object,
|
|
1876
548
|
/**
|
|
1877
549
|
* To display the app switcher menu option.
|
|
1878
550
|
*/
|
|
1879
|
-
showAppSwitcher: propTypes.exports.bool
|
|
551
|
+
showAppSwitcher: index.propTypes.exports.bool
|
|
1880
552
|
};
|
|
1881
553
|
|
|
1882
554
|
module.exports = FloatingActionMenu;
|