@bigbinary/neeto-molecules 1.11.4 → 1.11.5
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 +72 -1399
- 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 +48 -1376
- 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
package/dist/Taxonomy.js
CHANGED
|
@@ -1,1618 +1,46 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { _ as _slicedToArray } from './slicedToArray-b4278ecd.js';
|
|
2
|
+
import React__default, { useRef, useState, useEffect } from 'react';
|
|
3
|
+
import { t } from 'i18next';
|
|
4
|
+
import { capitalize, isNotEmpty } from '@bigbinary/neeto-cist';
|
|
4
5
|
import { globalProps, taxonomies } from '@bigbinary/neeto-commons-frontend/initializers';
|
|
5
6
|
import withTitle from '@bigbinary/neeto-commons-frontend/react-utils/withTitle';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
7
|
+
import { Typography, Pane, Toastr, Dropdown, Table, Alert, NoData } from '@bigbinary/neetoui';
|
|
8
|
+
import { toPairs, fromPairs, keys, pick, prop } from 'ramda';
|
|
8
9
|
import { useTranslation, Trans } from 'react-i18next';
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import ManageColumns, { useHiddenColumns } from '@bigbinary/neeto-molecules/Columns';
|
|
14
|
-
import { Filters } from '@bigbinary/neeto-filters-frontend';
|
|
10
|
+
import Container from './Container.js';
|
|
11
|
+
import Header from './Header.js';
|
|
12
|
+
import SubHeader from './SubHeader.js';
|
|
13
|
+
import TableWrapper from './TableWrapper.js';
|
|
15
14
|
import { Form, Input, ActionBlock } from '@bigbinary/neetoui/formik';
|
|
16
15
|
import * as yup from 'yup';
|
|
17
16
|
import { useMutation } from 'react-query';
|
|
18
17
|
import axios from 'axios';
|
|
19
18
|
import { BASE_API_V1_URL } from '@bigbinary/neeto-commons-frontend/constants';
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
} catch (r) {
|
|
41
|
-
o = !0, n = r;
|
|
42
|
-
} finally {
|
|
43
|
-
try {
|
|
44
|
-
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
|
|
45
|
-
} finally {
|
|
46
|
-
if (o) throw n;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
return a;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
function _arrayLikeToArray(arr, len) {
|
|
54
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
55
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
56
|
-
return arr2;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
60
|
-
if (!o) return;
|
|
61
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
62
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
63
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
64
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
65
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
function _nonIterableRest() {
|
|
69
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
function _slicedToArray(arr, i) {
|
|
73
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
var propTypes = {exports: {}};
|
|
77
|
-
|
|
78
|
-
var reactIs = {exports: {}};
|
|
79
|
-
|
|
80
|
-
var reactIs_production_min = {};
|
|
81
|
-
|
|
82
|
-
/** @license React v16.13.1
|
|
83
|
-
* react-is.production.min.js
|
|
84
|
-
*
|
|
85
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
86
|
-
*
|
|
87
|
-
* This source code is licensed under the MIT license found in the
|
|
88
|
-
* LICENSE file in the root directory of this source tree.
|
|
89
|
-
*/
|
|
90
|
-
|
|
91
|
-
var hasRequiredReactIs_production_min;
|
|
92
|
-
|
|
93
|
-
function requireReactIs_production_min () {
|
|
94
|
-
if (hasRequiredReactIs_production_min) return reactIs_production_min;
|
|
95
|
-
hasRequiredReactIs_production_min = 1;
|
|
96
|
-
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?
|
|
97
|
-
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;
|
|
98
|
-
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;
|
|
99
|
-
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};
|
|
100
|
-
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};
|
|
101
|
-
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;
|
|
102
|
-
return reactIs_production_min;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
var reactIs_development = {};
|
|
106
|
-
|
|
107
|
-
/** @license React v16.13.1
|
|
108
|
-
* react-is.development.js
|
|
109
|
-
*
|
|
110
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
111
|
-
*
|
|
112
|
-
* This source code is licensed under the MIT license found in the
|
|
113
|
-
* LICENSE file in the root directory of this source tree.
|
|
114
|
-
*/
|
|
115
|
-
|
|
116
|
-
var hasRequiredReactIs_development;
|
|
117
|
-
|
|
118
|
-
function requireReactIs_development () {
|
|
119
|
-
if (hasRequiredReactIs_development) return reactIs_development;
|
|
120
|
-
hasRequiredReactIs_development = 1;
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
if (process.env.NODE_ENV !== "production") {
|
|
125
|
-
(function() {
|
|
126
|
-
|
|
127
|
-
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
|
|
128
|
-
// nor polyfill, then a plain number is used for performance.
|
|
129
|
-
var hasSymbol = typeof Symbol === 'function' && Symbol.for;
|
|
130
|
-
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
|
|
131
|
-
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
|
|
132
|
-
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
|
|
133
|
-
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
|
|
134
|
-
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
|
|
135
|
-
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
|
|
136
|
-
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
|
|
137
|
-
// (unstable) APIs that have been removed. Can we remove the symbols?
|
|
138
|
-
|
|
139
|
-
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
|
|
140
|
-
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
|
|
141
|
-
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
|
|
142
|
-
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
|
|
143
|
-
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
|
|
144
|
-
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
|
|
145
|
-
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
|
|
146
|
-
var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
|
|
147
|
-
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
|
|
148
|
-
var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
|
|
149
|
-
var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
|
|
150
|
-
|
|
151
|
-
function isValidElementType(type) {
|
|
152
|
-
return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
153
|
-
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);
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
function typeOf(object) {
|
|
157
|
-
if (typeof object === 'object' && object !== null) {
|
|
158
|
-
var $$typeof = object.$$typeof;
|
|
159
|
-
|
|
160
|
-
switch ($$typeof) {
|
|
161
|
-
case REACT_ELEMENT_TYPE:
|
|
162
|
-
var type = object.type;
|
|
163
|
-
|
|
164
|
-
switch (type) {
|
|
165
|
-
case REACT_ASYNC_MODE_TYPE:
|
|
166
|
-
case REACT_CONCURRENT_MODE_TYPE:
|
|
167
|
-
case REACT_FRAGMENT_TYPE:
|
|
168
|
-
case REACT_PROFILER_TYPE:
|
|
169
|
-
case REACT_STRICT_MODE_TYPE:
|
|
170
|
-
case REACT_SUSPENSE_TYPE:
|
|
171
|
-
return type;
|
|
172
|
-
|
|
173
|
-
default:
|
|
174
|
-
var $$typeofType = type && type.$$typeof;
|
|
175
|
-
|
|
176
|
-
switch ($$typeofType) {
|
|
177
|
-
case REACT_CONTEXT_TYPE:
|
|
178
|
-
case REACT_FORWARD_REF_TYPE:
|
|
179
|
-
case REACT_LAZY_TYPE:
|
|
180
|
-
case REACT_MEMO_TYPE:
|
|
181
|
-
case REACT_PROVIDER_TYPE:
|
|
182
|
-
return $$typeofType;
|
|
183
|
-
|
|
184
|
-
default:
|
|
185
|
-
return $$typeof;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
case REACT_PORTAL_TYPE:
|
|
191
|
-
return $$typeof;
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
return undefined;
|
|
196
|
-
} // AsyncMode is deprecated along with isAsyncMode
|
|
197
|
-
|
|
198
|
-
var AsyncMode = REACT_ASYNC_MODE_TYPE;
|
|
199
|
-
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
|
|
200
|
-
var ContextConsumer = REACT_CONTEXT_TYPE;
|
|
201
|
-
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
202
|
-
var Element = REACT_ELEMENT_TYPE;
|
|
203
|
-
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
204
|
-
var Fragment = REACT_FRAGMENT_TYPE;
|
|
205
|
-
var Lazy = REACT_LAZY_TYPE;
|
|
206
|
-
var Memo = REACT_MEMO_TYPE;
|
|
207
|
-
var Portal = REACT_PORTAL_TYPE;
|
|
208
|
-
var Profiler = REACT_PROFILER_TYPE;
|
|
209
|
-
var StrictMode = REACT_STRICT_MODE_TYPE;
|
|
210
|
-
var Suspense = REACT_SUSPENSE_TYPE;
|
|
211
|
-
var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
|
|
212
|
-
|
|
213
|
-
function isAsyncMode(object) {
|
|
214
|
-
{
|
|
215
|
-
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
|
216
|
-
hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
|
|
217
|
-
|
|
218
|
-
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.');
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
|
|
223
|
-
}
|
|
224
|
-
function isConcurrentMode(object) {
|
|
225
|
-
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
|
|
226
|
-
}
|
|
227
|
-
function isContextConsumer(object) {
|
|
228
|
-
return typeOf(object) === REACT_CONTEXT_TYPE;
|
|
229
|
-
}
|
|
230
|
-
function isContextProvider(object) {
|
|
231
|
-
return typeOf(object) === REACT_PROVIDER_TYPE;
|
|
232
|
-
}
|
|
233
|
-
function isElement(object) {
|
|
234
|
-
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
235
|
-
}
|
|
236
|
-
function isForwardRef(object) {
|
|
237
|
-
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
|
238
|
-
}
|
|
239
|
-
function isFragment(object) {
|
|
240
|
-
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
|
241
|
-
}
|
|
242
|
-
function isLazy(object) {
|
|
243
|
-
return typeOf(object) === REACT_LAZY_TYPE;
|
|
244
|
-
}
|
|
245
|
-
function isMemo(object) {
|
|
246
|
-
return typeOf(object) === REACT_MEMO_TYPE;
|
|
247
|
-
}
|
|
248
|
-
function isPortal(object) {
|
|
249
|
-
return typeOf(object) === REACT_PORTAL_TYPE;
|
|
250
|
-
}
|
|
251
|
-
function isProfiler(object) {
|
|
252
|
-
return typeOf(object) === REACT_PROFILER_TYPE;
|
|
253
|
-
}
|
|
254
|
-
function isStrictMode(object) {
|
|
255
|
-
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
|
256
|
-
}
|
|
257
|
-
function isSuspense(object) {
|
|
258
|
-
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
reactIs_development.AsyncMode = AsyncMode;
|
|
262
|
-
reactIs_development.ConcurrentMode = ConcurrentMode;
|
|
263
|
-
reactIs_development.ContextConsumer = ContextConsumer;
|
|
264
|
-
reactIs_development.ContextProvider = ContextProvider;
|
|
265
|
-
reactIs_development.Element = Element;
|
|
266
|
-
reactIs_development.ForwardRef = ForwardRef;
|
|
267
|
-
reactIs_development.Fragment = Fragment;
|
|
268
|
-
reactIs_development.Lazy = Lazy;
|
|
269
|
-
reactIs_development.Memo = Memo;
|
|
270
|
-
reactIs_development.Portal = Portal;
|
|
271
|
-
reactIs_development.Profiler = Profiler;
|
|
272
|
-
reactIs_development.StrictMode = StrictMode;
|
|
273
|
-
reactIs_development.Suspense = Suspense;
|
|
274
|
-
reactIs_development.isAsyncMode = isAsyncMode;
|
|
275
|
-
reactIs_development.isConcurrentMode = isConcurrentMode;
|
|
276
|
-
reactIs_development.isContextConsumer = isContextConsumer;
|
|
277
|
-
reactIs_development.isContextProvider = isContextProvider;
|
|
278
|
-
reactIs_development.isElement = isElement;
|
|
279
|
-
reactIs_development.isForwardRef = isForwardRef;
|
|
280
|
-
reactIs_development.isFragment = isFragment;
|
|
281
|
-
reactIs_development.isLazy = isLazy;
|
|
282
|
-
reactIs_development.isMemo = isMemo;
|
|
283
|
-
reactIs_development.isPortal = isPortal;
|
|
284
|
-
reactIs_development.isProfiler = isProfiler;
|
|
285
|
-
reactIs_development.isStrictMode = isStrictMode;
|
|
286
|
-
reactIs_development.isSuspense = isSuspense;
|
|
287
|
-
reactIs_development.isValidElementType = isValidElementType;
|
|
288
|
-
reactIs_development.typeOf = typeOf;
|
|
289
|
-
})();
|
|
290
|
-
}
|
|
291
|
-
return reactIs_development;
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
var hasRequiredReactIs;
|
|
295
|
-
|
|
296
|
-
function requireReactIs () {
|
|
297
|
-
if (hasRequiredReactIs) return reactIs.exports;
|
|
298
|
-
hasRequiredReactIs = 1;
|
|
299
|
-
(function (module) {
|
|
300
|
-
|
|
301
|
-
if (process.env.NODE_ENV === 'production') {
|
|
302
|
-
module.exports = requireReactIs_production_min();
|
|
303
|
-
} else {
|
|
304
|
-
module.exports = requireReactIs_development();
|
|
305
|
-
}
|
|
306
|
-
} (reactIs));
|
|
307
|
-
return reactIs.exports;
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
/*
|
|
311
|
-
object-assign
|
|
312
|
-
(c) Sindre Sorhus
|
|
313
|
-
@license MIT
|
|
314
|
-
*/
|
|
315
|
-
|
|
316
|
-
var objectAssign;
|
|
317
|
-
var hasRequiredObjectAssign;
|
|
318
|
-
|
|
319
|
-
function requireObjectAssign () {
|
|
320
|
-
if (hasRequiredObjectAssign) return objectAssign;
|
|
321
|
-
hasRequiredObjectAssign = 1;
|
|
322
|
-
/* eslint-disable no-unused-vars */
|
|
323
|
-
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
324
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
325
|
-
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
326
|
-
|
|
327
|
-
function toObject(val) {
|
|
328
|
-
if (val === null || val === undefined) {
|
|
329
|
-
throw new TypeError('Object.assign cannot be called with null or undefined');
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
return Object(val);
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
function shouldUseNative() {
|
|
336
|
-
try {
|
|
337
|
-
if (!Object.assign) {
|
|
338
|
-
return false;
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
// Detect buggy property enumeration order in older V8 versions.
|
|
342
|
-
|
|
343
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=4118
|
|
344
|
-
var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
|
|
345
|
-
test1[5] = 'de';
|
|
346
|
-
if (Object.getOwnPropertyNames(test1)[0] === '5') {
|
|
347
|
-
return false;
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
351
|
-
var test2 = {};
|
|
352
|
-
for (var i = 0; i < 10; i++) {
|
|
353
|
-
test2['_' + String.fromCharCode(i)] = i;
|
|
354
|
-
}
|
|
355
|
-
var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
|
|
356
|
-
return test2[n];
|
|
357
|
-
});
|
|
358
|
-
if (order2.join('') !== '0123456789') {
|
|
359
|
-
return false;
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
363
|
-
var test3 = {};
|
|
364
|
-
'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
|
|
365
|
-
test3[letter] = letter;
|
|
366
|
-
});
|
|
367
|
-
if (Object.keys(Object.assign({}, test3)).join('') !==
|
|
368
|
-
'abcdefghijklmnopqrst') {
|
|
369
|
-
return false;
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
return true;
|
|
373
|
-
} catch (err) {
|
|
374
|
-
// We don't expect any of the above to throw, but better to be safe.
|
|
375
|
-
return false;
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
objectAssign = shouldUseNative() ? Object.assign : function (target, source) {
|
|
380
|
-
var from;
|
|
381
|
-
var to = toObject(target);
|
|
382
|
-
var symbols;
|
|
383
|
-
|
|
384
|
-
for (var s = 1; s < arguments.length; s++) {
|
|
385
|
-
from = Object(arguments[s]);
|
|
386
|
-
|
|
387
|
-
for (var key in from) {
|
|
388
|
-
if (hasOwnProperty.call(from, key)) {
|
|
389
|
-
to[key] = from[key];
|
|
390
|
-
}
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
if (getOwnPropertySymbols) {
|
|
394
|
-
symbols = getOwnPropertySymbols(from);
|
|
395
|
-
for (var i = 0; i < symbols.length; i++) {
|
|
396
|
-
if (propIsEnumerable.call(from, symbols[i])) {
|
|
397
|
-
to[symbols[i]] = from[symbols[i]];
|
|
398
|
-
}
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
return to;
|
|
404
|
-
};
|
|
405
|
-
return objectAssign;
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
/**
|
|
409
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
410
|
-
*
|
|
411
|
-
* This source code is licensed under the MIT license found in the
|
|
412
|
-
* LICENSE file in the root directory of this source tree.
|
|
413
|
-
*/
|
|
414
|
-
|
|
415
|
-
var ReactPropTypesSecret_1;
|
|
416
|
-
var hasRequiredReactPropTypesSecret;
|
|
417
|
-
|
|
418
|
-
function requireReactPropTypesSecret () {
|
|
419
|
-
if (hasRequiredReactPropTypesSecret) return ReactPropTypesSecret_1;
|
|
420
|
-
hasRequiredReactPropTypesSecret = 1;
|
|
421
|
-
|
|
422
|
-
var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
|
423
|
-
|
|
424
|
-
ReactPropTypesSecret_1 = ReactPropTypesSecret;
|
|
425
|
-
return ReactPropTypesSecret_1;
|
|
426
|
-
}
|
|
427
|
-
|
|
428
|
-
var has;
|
|
429
|
-
var hasRequiredHas;
|
|
430
|
-
|
|
431
|
-
function requireHas () {
|
|
432
|
-
if (hasRequiredHas) return has;
|
|
433
|
-
hasRequiredHas = 1;
|
|
434
|
-
has = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
435
|
-
return has;
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
/**
|
|
439
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
440
|
-
*
|
|
441
|
-
* This source code is licensed under the MIT license found in the
|
|
442
|
-
* LICENSE file in the root directory of this source tree.
|
|
443
|
-
*/
|
|
444
|
-
|
|
445
|
-
var checkPropTypes_1;
|
|
446
|
-
var hasRequiredCheckPropTypes;
|
|
447
|
-
|
|
448
|
-
function requireCheckPropTypes () {
|
|
449
|
-
if (hasRequiredCheckPropTypes) return checkPropTypes_1;
|
|
450
|
-
hasRequiredCheckPropTypes = 1;
|
|
451
|
-
|
|
452
|
-
var printWarning = function() {};
|
|
453
|
-
|
|
454
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
455
|
-
var ReactPropTypesSecret = requireReactPropTypesSecret();
|
|
456
|
-
var loggedTypeFailures = {};
|
|
457
|
-
var has = requireHas();
|
|
458
|
-
|
|
459
|
-
printWarning = function(text) {
|
|
460
|
-
var message = 'Warning: ' + text;
|
|
461
|
-
if (typeof console !== 'undefined') {
|
|
462
|
-
console.error(message);
|
|
463
|
-
}
|
|
464
|
-
try {
|
|
465
|
-
// --- Welcome to debugging React ---
|
|
466
|
-
// This error was thrown as a convenience so that you can use this stack
|
|
467
|
-
// to find the callsite that caused this warning to fire.
|
|
468
|
-
throw new Error(message);
|
|
469
|
-
} catch (x) { /**/ }
|
|
470
|
-
};
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
/**
|
|
474
|
-
* Assert that the values match with the type specs.
|
|
475
|
-
* Error messages are memorized and will only be shown once.
|
|
476
|
-
*
|
|
477
|
-
* @param {object} typeSpecs Map of name to a ReactPropType
|
|
478
|
-
* @param {object} values Runtime values that need to be type-checked
|
|
479
|
-
* @param {string} location e.g. "prop", "context", "child context"
|
|
480
|
-
* @param {string} componentName Name of the component for error messages.
|
|
481
|
-
* @param {?Function} getStack Returns the component stack.
|
|
482
|
-
* @private
|
|
483
|
-
*/
|
|
484
|
-
function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
|
|
485
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
486
|
-
for (var typeSpecName in typeSpecs) {
|
|
487
|
-
if (has(typeSpecs, typeSpecName)) {
|
|
488
|
-
var error;
|
|
489
|
-
// Prop type validation may throw. In case they do, we don't want to
|
|
490
|
-
// fail the render phase where it didn't fail before. So we log it.
|
|
491
|
-
// After these have been cleaned up, we'll let them throw.
|
|
492
|
-
try {
|
|
493
|
-
// This is intentionally an invariant that gets caught. It's the same
|
|
494
|
-
// behavior as without this statement except with a better message.
|
|
495
|
-
if (typeof typeSpecs[typeSpecName] !== 'function') {
|
|
496
|
-
var err = Error(
|
|
497
|
-
(componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
|
|
498
|
-
'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +
|
|
499
|
-
'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
|
|
500
|
-
);
|
|
501
|
-
err.name = 'Invariant Violation';
|
|
502
|
-
throw err;
|
|
503
|
-
}
|
|
504
|
-
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
|
|
505
|
-
} catch (ex) {
|
|
506
|
-
error = ex;
|
|
507
|
-
}
|
|
508
|
-
if (error && !(error instanceof Error)) {
|
|
509
|
-
printWarning(
|
|
510
|
-
(componentName || 'React class') + ': type specification of ' +
|
|
511
|
-
location + ' `' + typeSpecName + '` is invalid; the type checker ' +
|
|
512
|
-
'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
|
|
513
|
-
'You may have forgotten to pass an argument to the type checker ' +
|
|
514
|
-
'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
|
|
515
|
-
'shape all require an argument).'
|
|
516
|
-
);
|
|
517
|
-
}
|
|
518
|
-
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
|
519
|
-
// Only monitor this failure once because there tends to be a lot of the
|
|
520
|
-
// same error.
|
|
521
|
-
loggedTypeFailures[error.message] = true;
|
|
522
|
-
|
|
523
|
-
var stack = getStack ? getStack() : '';
|
|
524
|
-
|
|
525
|
-
printWarning(
|
|
526
|
-
'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
|
|
527
|
-
);
|
|
528
|
-
}
|
|
529
|
-
}
|
|
530
|
-
}
|
|
531
|
-
}
|
|
532
|
-
}
|
|
533
|
-
|
|
534
|
-
/**
|
|
535
|
-
* Resets warning cache when testing.
|
|
536
|
-
*
|
|
537
|
-
* @private
|
|
538
|
-
*/
|
|
539
|
-
checkPropTypes.resetWarningCache = function() {
|
|
540
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
541
|
-
loggedTypeFailures = {};
|
|
542
|
-
}
|
|
543
|
-
};
|
|
544
|
-
|
|
545
|
-
checkPropTypes_1 = checkPropTypes;
|
|
546
|
-
return checkPropTypes_1;
|
|
547
|
-
}
|
|
548
|
-
|
|
549
|
-
/**
|
|
550
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
551
|
-
*
|
|
552
|
-
* This source code is licensed under the MIT license found in the
|
|
553
|
-
* LICENSE file in the root directory of this source tree.
|
|
554
|
-
*/
|
|
555
|
-
|
|
556
|
-
var factoryWithTypeCheckers;
|
|
557
|
-
var hasRequiredFactoryWithTypeCheckers;
|
|
558
|
-
|
|
559
|
-
function requireFactoryWithTypeCheckers () {
|
|
560
|
-
if (hasRequiredFactoryWithTypeCheckers) return factoryWithTypeCheckers;
|
|
561
|
-
hasRequiredFactoryWithTypeCheckers = 1;
|
|
562
|
-
|
|
563
|
-
var ReactIs = requireReactIs();
|
|
564
|
-
var assign = requireObjectAssign();
|
|
565
|
-
|
|
566
|
-
var ReactPropTypesSecret = requireReactPropTypesSecret();
|
|
567
|
-
var has = requireHas();
|
|
568
|
-
var checkPropTypes = requireCheckPropTypes();
|
|
569
|
-
|
|
570
|
-
var printWarning = function() {};
|
|
571
|
-
|
|
572
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
573
|
-
printWarning = function(text) {
|
|
574
|
-
var message = 'Warning: ' + text;
|
|
575
|
-
if (typeof console !== 'undefined') {
|
|
576
|
-
console.error(message);
|
|
577
|
-
}
|
|
578
|
-
try {
|
|
579
|
-
// --- Welcome to debugging React ---
|
|
580
|
-
// This error was thrown as a convenience so that you can use this stack
|
|
581
|
-
// to find the callsite that caused this warning to fire.
|
|
582
|
-
throw new Error(message);
|
|
583
|
-
} catch (x) {}
|
|
584
|
-
};
|
|
585
|
-
}
|
|
586
|
-
|
|
587
|
-
function emptyFunctionThatReturnsNull() {
|
|
588
|
-
return null;
|
|
589
|
-
}
|
|
590
|
-
|
|
591
|
-
factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
|
|
592
|
-
/* global Symbol */
|
|
593
|
-
var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
|
594
|
-
var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
|
|
595
|
-
|
|
596
|
-
/**
|
|
597
|
-
* Returns the iterator method function contained on the iterable object.
|
|
598
|
-
*
|
|
599
|
-
* Be sure to invoke the function with the iterable as context:
|
|
600
|
-
*
|
|
601
|
-
* var iteratorFn = getIteratorFn(myIterable);
|
|
602
|
-
* if (iteratorFn) {
|
|
603
|
-
* var iterator = iteratorFn.call(myIterable);
|
|
604
|
-
* ...
|
|
605
|
-
* }
|
|
606
|
-
*
|
|
607
|
-
* @param {?object} maybeIterable
|
|
608
|
-
* @return {?function}
|
|
609
|
-
*/
|
|
610
|
-
function getIteratorFn(maybeIterable) {
|
|
611
|
-
var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
|
|
612
|
-
if (typeof iteratorFn === 'function') {
|
|
613
|
-
return iteratorFn;
|
|
614
|
-
}
|
|
615
|
-
}
|
|
616
|
-
|
|
617
|
-
/**
|
|
618
|
-
* Collection of methods that allow declaration and validation of props that are
|
|
619
|
-
* supplied to React components. Example usage:
|
|
620
|
-
*
|
|
621
|
-
* var Props = require('ReactPropTypes');
|
|
622
|
-
* var MyArticle = React.createClass({
|
|
623
|
-
* propTypes: {
|
|
624
|
-
* // An optional string prop named "description".
|
|
625
|
-
* description: Props.string,
|
|
626
|
-
*
|
|
627
|
-
* // A required enum prop named "category".
|
|
628
|
-
* category: Props.oneOf(['News','Photos']).isRequired,
|
|
629
|
-
*
|
|
630
|
-
* // A prop named "dialog" that requires an instance of Dialog.
|
|
631
|
-
* dialog: Props.instanceOf(Dialog).isRequired
|
|
632
|
-
* },
|
|
633
|
-
* render: function() { ... }
|
|
634
|
-
* });
|
|
635
|
-
*
|
|
636
|
-
* A more formal specification of how these methods are used:
|
|
637
|
-
*
|
|
638
|
-
* type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
|
|
639
|
-
* decl := ReactPropTypes.{type}(.isRequired)?
|
|
640
|
-
*
|
|
641
|
-
* Each and every declaration produces a function with the same signature. This
|
|
642
|
-
* allows the creation of custom validation functions. For example:
|
|
643
|
-
*
|
|
644
|
-
* var MyLink = React.createClass({
|
|
645
|
-
* propTypes: {
|
|
646
|
-
* // An optional string or URI prop named "href".
|
|
647
|
-
* href: function(props, propName, componentName) {
|
|
648
|
-
* var propValue = props[propName];
|
|
649
|
-
* if (propValue != null && typeof propValue !== 'string' &&
|
|
650
|
-
* !(propValue instanceof URI)) {
|
|
651
|
-
* return new Error(
|
|
652
|
-
* 'Expected a string or an URI for ' + propName + ' in ' +
|
|
653
|
-
* componentName
|
|
654
|
-
* );
|
|
655
|
-
* }
|
|
656
|
-
* }
|
|
657
|
-
* },
|
|
658
|
-
* render: function() {...}
|
|
659
|
-
* });
|
|
660
|
-
*
|
|
661
|
-
* @internal
|
|
662
|
-
*/
|
|
663
|
-
|
|
664
|
-
var ANONYMOUS = '<<anonymous>>';
|
|
665
|
-
|
|
666
|
-
// Important!
|
|
667
|
-
// Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
|
|
668
|
-
var ReactPropTypes = {
|
|
669
|
-
array: createPrimitiveTypeChecker('array'),
|
|
670
|
-
bigint: createPrimitiveTypeChecker('bigint'),
|
|
671
|
-
bool: createPrimitiveTypeChecker('boolean'),
|
|
672
|
-
func: createPrimitiveTypeChecker('function'),
|
|
673
|
-
number: createPrimitiveTypeChecker('number'),
|
|
674
|
-
object: createPrimitiveTypeChecker('object'),
|
|
675
|
-
string: createPrimitiveTypeChecker('string'),
|
|
676
|
-
symbol: createPrimitiveTypeChecker('symbol'),
|
|
677
|
-
|
|
678
|
-
any: createAnyTypeChecker(),
|
|
679
|
-
arrayOf: createArrayOfTypeChecker,
|
|
680
|
-
element: createElementTypeChecker(),
|
|
681
|
-
elementType: createElementTypeTypeChecker(),
|
|
682
|
-
instanceOf: createInstanceTypeChecker,
|
|
683
|
-
node: createNodeChecker(),
|
|
684
|
-
objectOf: createObjectOfTypeChecker,
|
|
685
|
-
oneOf: createEnumTypeChecker,
|
|
686
|
-
oneOfType: createUnionTypeChecker,
|
|
687
|
-
shape: createShapeTypeChecker,
|
|
688
|
-
exact: createStrictShapeTypeChecker,
|
|
689
|
-
};
|
|
690
|
-
|
|
691
|
-
/**
|
|
692
|
-
* inlined Object.is polyfill to avoid requiring consumers ship their own
|
|
693
|
-
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
|
|
694
|
-
*/
|
|
695
|
-
/*eslint-disable no-self-compare*/
|
|
696
|
-
function is(x, y) {
|
|
697
|
-
// SameValue algorithm
|
|
698
|
-
if (x === y) {
|
|
699
|
-
// Steps 1-5, 7-10
|
|
700
|
-
// Steps 6.b-6.e: +0 != -0
|
|
701
|
-
return x !== 0 || 1 / x === 1 / y;
|
|
702
|
-
} else {
|
|
703
|
-
// Step 6.a: NaN == NaN
|
|
704
|
-
return x !== x && y !== y;
|
|
705
|
-
}
|
|
706
|
-
}
|
|
707
|
-
/*eslint-enable no-self-compare*/
|
|
708
|
-
|
|
709
|
-
/**
|
|
710
|
-
* We use an Error-like object for backward compatibility as people may call
|
|
711
|
-
* PropTypes directly and inspect their output. However, we don't use real
|
|
712
|
-
* Errors anymore. We don't inspect their stack anyway, and creating them
|
|
713
|
-
* is prohibitively expensive if they are created too often, such as what
|
|
714
|
-
* happens in oneOfType() for any type before the one that matched.
|
|
715
|
-
*/
|
|
716
|
-
function PropTypeError(message, data) {
|
|
717
|
-
this.message = message;
|
|
718
|
-
this.data = data && typeof data === 'object' ? data: {};
|
|
719
|
-
this.stack = '';
|
|
720
|
-
}
|
|
721
|
-
// Make `instanceof Error` still work for returned errors.
|
|
722
|
-
PropTypeError.prototype = Error.prototype;
|
|
723
|
-
|
|
724
|
-
function createChainableTypeChecker(validate) {
|
|
725
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
726
|
-
var manualPropTypeCallCache = {};
|
|
727
|
-
var manualPropTypeWarningCount = 0;
|
|
728
|
-
}
|
|
729
|
-
function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
|
|
730
|
-
componentName = componentName || ANONYMOUS;
|
|
731
|
-
propFullName = propFullName || propName;
|
|
732
|
-
|
|
733
|
-
if (secret !== ReactPropTypesSecret) {
|
|
734
|
-
if (throwOnDirectAccess) {
|
|
735
|
-
// New behavior only for users of `prop-types` package
|
|
736
|
-
var err = new Error(
|
|
737
|
-
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
|
738
|
-
'Use `PropTypes.checkPropTypes()` to call them. ' +
|
|
739
|
-
'Read more at http://fb.me/use-check-prop-types'
|
|
740
|
-
);
|
|
741
|
-
err.name = 'Invariant Violation';
|
|
742
|
-
throw err;
|
|
743
|
-
} else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
|
|
744
|
-
// Old behavior for people using React.PropTypes
|
|
745
|
-
var cacheKey = componentName + ':' + propName;
|
|
746
|
-
if (
|
|
747
|
-
!manualPropTypeCallCache[cacheKey] &&
|
|
748
|
-
// Avoid spamming the console because they are often not actionable except for lib authors
|
|
749
|
-
manualPropTypeWarningCount < 3
|
|
750
|
-
) {
|
|
751
|
-
printWarning(
|
|
752
|
-
'You are manually calling a React.PropTypes validation ' +
|
|
753
|
-
'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
|
|
754
|
-
'and will throw in the standalone `prop-types` package. ' +
|
|
755
|
-
'You may be seeing this warning due to a third-party PropTypes ' +
|
|
756
|
-
'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
|
|
757
|
-
);
|
|
758
|
-
manualPropTypeCallCache[cacheKey] = true;
|
|
759
|
-
manualPropTypeWarningCount++;
|
|
760
|
-
}
|
|
761
|
-
}
|
|
762
|
-
}
|
|
763
|
-
if (props[propName] == null) {
|
|
764
|
-
if (isRequired) {
|
|
765
|
-
if (props[propName] === null) {
|
|
766
|
-
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
|
|
767
|
-
}
|
|
768
|
-
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
|
|
769
|
-
}
|
|
770
|
-
return null;
|
|
771
|
-
} else {
|
|
772
|
-
return validate(props, propName, componentName, location, propFullName);
|
|
773
|
-
}
|
|
774
|
-
}
|
|
775
|
-
|
|
776
|
-
var chainedCheckType = checkType.bind(null, false);
|
|
777
|
-
chainedCheckType.isRequired = checkType.bind(null, true);
|
|
778
|
-
|
|
779
|
-
return chainedCheckType;
|
|
780
|
-
}
|
|
781
|
-
|
|
782
|
-
function createPrimitiveTypeChecker(expectedType) {
|
|
783
|
-
function validate(props, propName, componentName, location, propFullName, secret) {
|
|
784
|
-
var propValue = props[propName];
|
|
785
|
-
var propType = getPropType(propValue);
|
|
786
|
-
if (propType !== expectedType) {
|
|
787
|
-
// `propValue` being instance of, say, date/regexp, pass the 'object'
|
|
788
|
-
// check, but we can offer a more precise error message here rather than
|
|
789
|
-
// 'of type `object`'.
|
|
790
|
-
var preciseType = getPreciseType(propValue);
|
|
791
|
-
|
|
792
|
-
return new PropTypeError(
|
|
793
|
-
'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),
|
|
794
|
-
{expectedType: expectedType}
|
|
795
|
-
);
|
|
796
|
-
}
|
|
797
|
-
return null;
|
|
798
|
-
}
|
|
799
|
-
return createChainableTypeChecker(validate);
|
|
800
|
-
}
|
|
801
|
-
|
|
802
|
-
function createAnyTypeChecker() {
|
|
803
|
-
return createChainableTypeChecker(emptyFunctionThatReturnsNull);
|
|
804
|
-
}
|
|
805
|
-
|
|
806
|
-
function createArrayOfTypeChecker(typeChecker) {
|
|
807
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
808
|
-
if (typeof typeChecker !== 'function') {
|
|
809
|
-
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
|
|
810
|
-
}
|
|
811
|
-
var propValue = props[propName];
|
|
812
|
-
if (!Array.isArray(propValue)) {
|
|
813
|
-
var propType = getPropType(propValue);
|
|
814
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
|
|
815
|
-
}
|
|
816
|
-
for (var i = 0; i < propValue.length; i++) {
|
|
817
|
-
var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
|
|
818
|
-
if (error instanceof Error) {
|
|
819
|
-
return error;
|
|
820
|
-
}
|
|
821
|
-
}
|
|
822
|
-
return null;
|
|
823
|
-
}
|
|
824
|
-
return createChainableTypeChecker(validate);
|
|
825
|
-
}
|
|
826
|
-
|
|
827
|
-
function createElementTypeChecker() {
|
|
828
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
829
|
-
var propValue = props[propName];
|
|
830
|
-
if (!isValidElement(propValue)) {
|
|
831
|
-
var propType = getPropType(propValue);
|
|
832
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
|
|
833
|
-
}
|
|
834
|
-
return null;
|
|
835
|
-
}
|
|
836
|
-
return createChainableTypeChecker(validate);
|
|
837
|
-
}
|
|
838
|
-
|
|
839
|
-
function createElementTypeTypeChecker() {
|
|
840
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
841
|
-
var propValue = props[propName];
|
|
842
|
-
if (!ReactIs.isValidElementType(propValue)) {
|
|
843
|
-
var propType = getPropType(propValue);
|
|
844
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
|
|
845
|
-
}
|
|
846
|
-
return null;
|
|
847
|
-
}
|
|
848
|
-
return createChainableTypeChecker(validate);
|
|
849
|
-
}
|
|
850
|
-
|
|
851
|
-
function createInstanceTypeChecker(expectedClass) {
|
|
852
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
853
|
-
if (!(props[propName] instanceof expectedClass)) {
|
|
854
|
-
var expectedClassName = expectedClass.name || ANONYMOUS;
|
|
855
|
-
var actualClassName = getClassName(props[propName]);
|
|
856
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
|
|
857
|
-
}
|
|
858
|
-
return null;
|
|
859
|
-
}
|
|
860
|
-
return createChainableTypeChecker(validate);
|
|
861
|
-
}
|
|
862
|
-
|
|
863
|
-
function createEnumTypeChecker(expectedValues) {
|
|
864
|
-
if (!Array.isArray(expectedValues)) {
|
|
865
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
866
|
-
if (arguments.length > 1) {
|
|
867
|
-
printWarning(
|
|
868
|
-
'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
|
|
869
|
-
'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
|
|
870
|
-
);
|
|
871
|
-
} else {
|
|
872
|
-
printWarning('Invalid argument supplied to oneOf, expected an array.');
|
|
873
|
-
}
|
|
874
|
-
}
|
|
875
|
-
return emptyFunctionThatReturnsNull;
|
|
876
|
-
}
|
|
877
|
-
|
|
878
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
879
|
-
var propValue = props[propName];
|
|
880
|
-
for (var i = 0; i < expectedValues.length; i++) {
|
|
881
|
-
if (is(propValue, expectedValues[i])) {
|
|
882
|
-
return null;
|
|
883
|
-
}
|
|
884
|
-
}
|
|
885
|
-
|
|
886
|
-
var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
|
|
887
|
-
var type = getPreciseType(value);
|
|
888
|
-
if (type === 'symbol') {
|
|
889
|
-
return String(value);
|
|
890
|
-
}
|
|
891
|
-
return value;
|
|
892
|
-
});
|
|
893
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
|
|
894
|
-
}
|
|
895
|
-
return createChainableTypeChecker(validate);
|
|
896
|
-
}
|
|
897
|
-
|
|
898
|
-
function createObjectOfTypeChecker(typeChecker) {
|
|
899
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
900
|
-
if (typeof typeChecker !== 'function') {
|
|
901
|
-
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
|
|
902
|
-
}
|
|
903
|
-
var propValue = props[propName];
|
|
904
|
-
var propType = getPropType(propValue);
|
|
905
|
-
if (propType !== 'object') {
|
|
906
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
|
|
907
|
-
}
|
|
908
|
-
for (var key in propValue) {
|
|
909
|
-
if (has(propValue, key)) {
|
|
910
|
-
var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
|
911
|
-
if (error instanceof Error) {
|
|
912
|
-
return error;
|
|
913
|
-
}
|
|
914
|
-
}
|
|
915
|
-
}
|
|
916
|
-
return null;
|
|
917
|
-
}
|
|
918
|
-
return createChainableTypeChecker(validate);
|
|
919
|
-
}
|
|
920
|
-
|
|
921
|
-
function createUnionTypeChecker(arrayOfTypeCheckers) {
|
|
922
|
-
if (!Array.isArray(arrayOfTypeCheckers)) {
|
|
923
|
-
process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
|
|
924
|
-
return emptyFunctionThatReturnsNull;
|
|
925
|
-
}
|
|
926
|
-
|
|
927
|
-
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
928
|
-
var checker = arrayOfTypeCheckers[i];
|
|
929
|
-
if (typeof checker !== 'function') {
|
|
930
|
-
printWarning(
|
|
931
|
-
'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
|
|
932
|
-
'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
|
|
933
|
-
);
|
|
934
|
-
return emptyFunctionThatReturnsNull;
|
|
935
|
-
}
|
|
936
|
-
}
|
|
937
|
-
|
|
938
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
939
|
-
var expectedTypes = [];
|
|
940
|
-
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
941
|
-
var checker = arrayOfTypeCheckers[i];
|
|
942
|
-
var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
|
|
943
|
-
if (checkerResult == null) {
|
|
944
|
-
return null;
|
|
945
|
-
}
|
|
946
|
-
if (checkerResult.data && has(checkerResult.data, 'expectedType')) {
|
|
947
|
-
expectedTypes.push(checkerResult.data.expectedType);
|
|
948
|
-
}
|
|
949
|
-
}
|
|
950
|
-
var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';
|
|
951
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
|
|
952
|
-
}
|
|
953
|
-
return createChainableTypeChecker(validate);
|
|
954
|
-
}
|
|
955
|
-
|
|
956
|
-
function createNodeChecker() {
|
|
957
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
958
|
-
if (!isNode(props[propName])) {
|
|
959
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
|
|
960
|
-
}
|
|
961
|
-
return null;
|
|
962
|
-
}
|
|
963
|
-
return createChainableTypeChecker(validate);
|
|
964
|
-
}
|
|
965
|
-
|
|
966
|
-
function invalidValidatorError(componentName, location, propFullName, key, type) {
|
|
967
|
-
return new PropTypeError(
|
|
968
|
-
(componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +
|
|
969
|
-
'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'
|
|
970
|
-
);
|
|
971
|
-
}
|
|
972
|
-
|
|
973
|
-
function createShapeTypeChecker(shapeTypes) {
|
|
974
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
975
|
-
var propValue = props[propName];
|
|
976
|
-
var propType = getPropType(propValue);
|
|
977
|
-
if (propType !== 'object') {
|
|
978
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
|
979
|
-
}
|
|
980
|
-
for (var key in shapeTypes) {
|
|
981
|
-
var checker = shapeTypes[key];
|
|
982
|
-
if (typeof checker !== 'function') {
|
|
983
|
-
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
|
984
|
-
}
|
|
985
|
-
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
|
986
|
-
if (error) {
|
|
987
|
-
return error;
|
|
988
|
-
}
|
|
989
|
-
}
|
|
990
|
-
return null;
|
|
991
|
-
}
|
|
992
|
-
return createChainableTypeChecker(validate);
|
|
993
|
-
}
|
|
994
|
-
|
|
995
|
-
function createStrictShapeTypeChecker(shapeTypes) {
|
|
996
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
997
|
-
var propValue = props[propName];
|
|
998
|
-
var propType = getPropType(propValue);
|
|
999
|
-
if (propType !== 'object') {
|
|
1000
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
|
1001
|
-
}
|
|
1002
|
-
// We need to check all keys in case some are required but missing from props.
|
|
1003
|
-
var allKeys = assign({}, props[propName], shapeTypes);
|
|
1004
|
-
for (var key in allKeys) {
|
|
1005
|
-
var checker = shapeTypes[key];
|
|
1006
|
-
if (has(shapeTypes, key) && typeof checker !== 'function') {
|
|
1007
|
-
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
|
1008
|
-
}
|
|
1009
|
-
if (!checker) {
|
|
1010
|
-
return new PropTypeError(
|
|
1011
|
-
'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
|
|
1012
|
-
'\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
|
|
1013
|
-
'\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
|
|
1014
|
-
);
|
|
1015
|
-
}
|
|
1016
|
-
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
|
1017
|
-
if (error) {
|
|
1018
|
-
return error;
|
|
1019
|
-
}
|
|
1020
|
-
}
|
|
1021
|
-
return null;
|
|
1022
|
-
}
|
|
1023
|
-
|
|
1024
|
-
return createChainableTypeChecker(validate);
|
|
1025
|
-
}
|
|
1026
|
-
|
|
1027
|
-
function isNode(propValue) {
|
|
1028
|
-
switch (typeof propValue) {
|
|
1029
|
-
case 'number':
|
|
1030
|
-
case 'string':
|
|
1031
|
-
case 'undefined':
|
|
1032
|
-
return true;
|
|
1033
|
-
case 'boolean':
|
|
1034
|
-
return !propValue;
|
|
1035
|
-
case 'object':
|
|
1036
|
-
if (Array.isArray(propValue)) {
|
|
1037
|
-
return propValue.every(isNode);
|
|
1038
|
-
}
|
|
1039
|
-
if (propValue === null || isValidElement(propValue)) {
|
|
1040
|
-
return true;
|
|
1041
|
-
}
|
|
1042
|
-
|
|
1043
|
-
var iteratorFn = getIteratorFn(propValue);
|
|
1044
|
-
if (iteratorFn) {
|
|
1045
|
-
var iterator = iteratorFn.call(propValue);
|
|
1046
|
-
var step;
|
|
1047
|
-
if (iteratorFn !== propValue.entries) {
|
|
1048
|
-
while (!(step = iterator.next()).done) {
|
|
1049
|
-
if (!isNode(step.value)) {
|
|
1050
|
-
return false;
|
|
1051
|
-
}
|
|
1052
|
-
}
|
|
1053
|
-
} else {
|
|
1054
|
-
// Iterator will provide entry [k,v] tuples rather than values.
|
|
1055
|
-
while (!(step = iterator.next()).done) {
|
|
1056
|
-
var entry = step.value;
|
|
1057
|
-
if (entry) {
|
|
1058
|
-
if (!isNode(entry[1])) {
|
|
1059
|
-
return false;
|
|
1060
|
-
}
|
|
1061
|
-
}
|
|
1062
|
-
}
|
|
1063
|
-
}
|
|
1064
|
-
} else {
|
|
1065
|
-
return false;
|
|
1066
|
-
}
|
|
1067
|
-
|
|
1068
|
-
return true;
|
|
1069
|
-
default:
|
|
1070
|
-
return false;
|
|
1071
|
-
}
|
|
1072
|
-
}
|
|
1073
|
-
|
|
1074
|
-
function isSymbol(propType, propValue) {
|
|
1075
|
-
// Native Symbol.
|
|
1076
|
-
if (propType === 'symbol') {
|
|
1077
|
-
return true;
|
|
1078
|
-
}
|
|
1079
|
-
|
|
1080
|
-
// falsy value can't be a Symbol
|
|
1081
|
-
if (!propValue) {
|
|
1082
|
-
return false;
|
|
1083
|
-
}
|
|
1084
|
-
|
|
1085
|
-
// 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
|
|
1086
|
-
if (propValue['@@toStringTag'] === 'Symbol') {
|
|
1087
|
-
return true;
|
|
1088
|
-
}
|
|
1089
|
-
|
|
1090
|
-
// Fallback for non-spec compliant Symbols which are polyfilled.
|
|
1091
|
-
if (typeof Symbol === 'function' && propValue instanceof Symbol) {
|
|
1092
|
-
return true;
|
|
1093
|
-
}
|
|
1094
|
-
|
|
1095
|
-
return false;
|
|
1096
|
-
}
|
|
1097
|
-
|
|
1098
|
-
// Equivalent of `typeof` but with special handling for array and regexp.
|
|
1099
|
-
function getPropType(propValue) {
|
|
1100
|
-
var propType = typeof propValue;
|
|
1101
|
-
if (Array.isArray(propValue)) {
|
|
1102
|
-
return 'array';
|
|
1103
|
-
}
|
|
1104
|
-
if (propValue instanceof RegExp) {
|
|
1105
|
-
// Old webkits (at least until Android 4.0) return 'function' rather than
|
|
1106
|
-
// 'object' for typeof a RegExp. We'll normalize this here so that /bla/
|
|
1107
|
-
// passes PropTypes.object.
|
|
1108
|
-
return 'object';
|
|
1109
|
-
}
|
|
1110
|
-
if (isSymbol(propType, propValue)) {
|
|
1111
|
-
return 'symbol';
|
|
1112
|
-
}
|
|
1113
|
-
return propType;
|
|
1114
|
-
}
|
|
1115
|
-
|
|
1116
|
-
// This handles more types than `getPropType`. Only used for error messages.
|
|
1117
|
-
// See `createPrimitiveTypeChecker`.
|
|
1118
|
-
function getPreciseType(propValue) {
|
|
1119
|
-
if (typeof propValue === 'undefined' || propValue === null) {
|
|
1120
|
-
return '' + propValue;
|
|
1121
|
-
}
|
|
1122
|
-
var propType = getPropType(propValue);
|
|
1123
|
-
if (propType === 'object') {
|
|
1124
|
-
if (propValue instanceof Date) {
|
|
1125
|
-
return 'date';
|
|
1126
|
-
} else if (propValue instanceof RegExp) {
|
|
1127
|
-
return 'regexp';
|
|
1128
|
-
}
|
|
1129
|
-
}
|
|
1130
|
-
return propType;
|
|
1131
|
-
}
|
|
1132
|
-
|
|
1133
|
-
// Returns a string that is postfixed to a warning about an invalid type.
|
|
1134
|
-
// For example, "undefined" or "of type array"
|
|
1135
|
-
function getPostfixForTypeWarning(value) {
|
|
1136
|
-
var type = getPreciseType(value);
|
|
1137
|
-
switch (type) {
|
|
1138
|
-
case 'array':
|
|
1139
|
-
case 'object':
|
|
1140
|
-
return 'an ' + type;
|
|
1141
|
-
case 'boolean':
|
|
1142
|
-
case 'date':
|
|
1143
|
-
case 'regexp':
|
|
1144
|
-
return 'a ' + type;
|
|
1145
|
-
default:
|
|
1146
|
-
return type;
|
|
1147
|
-
}
|
|
1148
|
-
}
|
|
1149
|
-
|
|
1150
|
-
// Returns class name of the object, if any.
|
|
1151
|
-
function getClassName(propValue) {
|
|
1152
|
-
if (!propValue.constructor || !propValue.constructor.name) {
|
|
1153
|
-
return ANONYMOUS;
|
|
1154
|
-
}
|
|
1155
|
-
return propValue.constructor.name;
|
|
1156
|
-
}
|
|
1157
|
-
|
|
1158
|
-
ReactPropTypes.checkPropTypes = checkPropTypes;
|
|
1159
|
-
ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
|
|
1160
|
-
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
1161
|
-
|
|
1162
|
-
return ReactPropTypes;
|
|
1163
|
-
};
|
|
1164
|
-
return factoryWithTypeCheckers;
|
|
1165
|
-
}
|
|
1166
|
-
|
|
1167
|
-
/**
|
|
1168
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
1169
|
-
*
|
|
1170
|
-
* This source code is licensed under the MIT license found in the
|
|
1171
|
-
* LICENSE file in the root directory of this source tree.
|
|
1172
|
-
*/
|
|
1173
|
-
|
|
1174
|
-
var factoryWithThrowingShims;
|
|
1175
|
-
var hasRequiredFactoryWithThrowingShims;
|
|
1176
|
-
|
|
1177
|
-
function requireFactoryWithThrowingShims () {
|
|
1178
|
-
if (hasRequiredFactoryWithThrowingShims) return factoryWithThrowingShims;
|
|
1179
|
-
hasRequiredFactoryWithThrowingShims = 1;
|
|
1180
|
-
|
|
1181
|
-
var ReactPropTypesSecret = requireReactPropTypesSecret();
|
|
1182
|
-
|
|
1183
|
-
function emptyFunction() {}
|
|
1184
|
-
function emptyFunctionWithReset() {}
|
|
1185
|
-
emptyFunctionWithReset.resetWarningCache = emptyFunction;
|
|
1186
|
-
|
|
1187
|
-
factoryWithThrowingShims = function() {
|
|
1188
|
-
function shim(props, propName, componentName, location, propFullName, secret) {
|
|
1189
|
-
if (secret === ReactPropTypesSecret) {
|
|
1190
|
-
// It is still safe when called from React.
|
|
1191
|
-
return;
|
|
1192
|
-
}
|
|
1193
|
-
var err = new Error(
|
|
1194
|
-
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
|
1195
|
-
'Use PropTypes.checkPropTypes() to call them. ' +
|
|
1196
|
-
'Read more at http://fb.me/use-check-prop-types'
|
|
1197
|
-
);
|
|
1198
|
-
err.name = 'Invariant Violation';
|
|
1199
|
-
throw err;
|
|
1200
|
-
} shim.isRequired = shim;
|
|
1201
|
-
function getShim() {
|
|
1202
|
-
return shim;
|
|
1203
|
-
} // Important!
|
|
1204
|
-
// Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
|
|
1205
|
-
var ReactPropTypes = {
|
|
1206
|
-
array: shim,
|
|
1207
|
-
bigint: shim,
|
|
1208
|
-
bool: shim,
|
|
1209
|
-
func: shim,
|
|
1210
|
-
number: shim,
|
|
1211
|
-
object: shim,
|
|
1212
|
-
string: shim,
|
|
1213
|
-
symbol: shim,
|
|
1214
|
-
|
|
1215
|
-
any: shim,
|
|
1216
|
-
arrayOf: getShim,
|
|
1217
|
-
element: shim,
|
|
1218
|
-
elementType: shim,
|
|
1219
|
-
instanceOf: getShim,
|
|
1220
|
-
node: shim,
|
|
1221
|
-
objectOf: getShim,
|
|
1222
|
-
oneOf: getShim,
|
|
1223
|
-
oneOfType: getShim,
|
|
1224
|
-
shape: getShim,
|
|
1225
|
-
exact: getShim,
|
|
1226
|
-
|
|
1227
|
-
checkPropTypes: emptyFunctionWithReset,
|
|
1228
|
-
resetWarningCache: emptyFunction
|
|
1229
|
-
};
|
|
1230
|
-
|
|
1231
|
-
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
1232
|
-
|
|
1233
|
-
return ReactPropTypes;
|
|
1234
|
-
};
|
|
1235
|
-
return factoryWithThrowingShims;
|
|
1236
|
-
}
|
|
1237
|
-
|
|
1238
|
-
/**
|
|
1239
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
1240
|
-
*
|
|
1241
|
-
* This source code is licensed under the MIT license found in the
|
|
1242
|
-
* LICENSE file in the root directory of this source tree.
|
|
1243
|
-
*/
|
|
1244
|
-
|
|
1245
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
1246
|
-
var ReactIs = requireReactIs();
|
|
1247
|
-
|
|
1248
|
-
// By explicitly using `prop-types` you are opting into new development behavior.
|
|
1249
|
-
// http://fb.me/prop-types-in-prod
|
|
1250
|
-
var throwOnDirectAccess = true;
|
|
1251
|
-
propTypes.exports = requireFactoryWithTypeCheckers()(ReactIs.isElement, throwOnDirectAccess);
|
|
1252
|
-
} else {
|
|
1253
|
-
// By explicitly using `prop-types` you are opting into new production behavior.
|
|
1254
|
-
// http://fb.me/prop-types-in-prod
|
|
1255
|
-
propTypes.exports = requireFactoryWithThrowingShims()();
|
|
1256
|
-
}
|
|
1257
|
-
|
|
1258
|
-
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}}
|
|
1259
|
-
|
|
1260
|
-
var css$3 = ".neeto-molecules-container{align-items:flex-start;display:flex;flex-direction:column;flex-grow:1;height:100vh;justify-content:flex-start;overflow-y:auto;padding:0 40px}@media screen and (max-width:768px){.neeto-molecules-container{padding:0 20px}}.neeto-molecules-container--header-fixed{padding:0}.neeto-molecules-container--header-fixed>.neeto-molecules-header,.neeto-molecules-container--header-fixed>.neeto-molecules-scrollable,.neeto-molecules-container--header-fixed>.neeto-molecules-subheader{padding-left:40px;padding-right:40px}@media screen and (max-width:768px){.neeto-molecules-container--header-fixed>.neeto-molecules-header,.neeto-molecules-container--header-fixed>.neeto-molecules-scrollable,.neeto-molecules-container--header-fixed>.neeto-molecules-subheader{padding-left:20px;padding-right:20px}}";
|
|
1261
|
-
n(css$3,{});
|
|
1262
|
-
|
|
1263
|
-
var Container = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
1264
|
-
var _ref$isHeaderFixed = _ref.isHeaderFixed,
|
|
1265
|
-
isHeaderFixed = _ref$isHeaderFixed === void 0 ? false : _ref$isHeaderFixed,
|
|
1266
|
-
children = _ref.children;
|
|
1267
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
1268
|
-
ref: ref,
|
|
1269
|
-
className: classnames("neeto-molecules-container", {
|
|
1270
|
-
"neeto-molecules-container--header-fixed": isHeaderFixed
|
|
1271
|
-
})
|
|
1272
|
-
}, children);
|
|
1273
|
-
});
|
|
1274
|
-
Container.displayName = "Container";
|
|
1275
|
-
Container.propTypes = {
|
|
1276
|
-
/**
|
|
1277
|
-
* Decides whether the `Header` component should be stickied at the top on scroll.
|
|
1278
|
-
*/
|
|
1279
|
-
isHeaderFixed: propTypes.exports.bool
|
|
1280
|
-
};
|
|
1281
|
-
|
|
1282
|
-
function _extends() {
|
|
1283
|
-
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
1284
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
1285
|
-
var source = arguments[i];
|
|
1286
|
-
for (var key in source) {
|
|
1287
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
1288
|
-
target[key] = source[key];
|
|
1289
|
-
}
|
|
1290
|
-
}
|
|
1291
|
-
}
|
|
1292
|
-
return target;
|
|
1293
|
-
};
|
|
1294
|
-
return _extends.apply(this, arguments);
|
|
1295
|
-
}
|
|
1296
|
-
|
|
1297
|
-
function _typeof(o) {
|
|
1298
|
-
"@babel/helpers - typeof";
|
|
1299
|
-
|
|
1300
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
1301
|
-
return typeof o;
|
|
1302
|
-
} : function (o) {
|
|
1303
|
-
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
1304
|
-
}, _typeof(o);
|
|
1305
|
-
}
|
|
1306
|
-
|
|
1307
|
-
function _toPrimitive(input, hint) {
|
|
1308
|
-
if (_typeof(input) !== "object" || input === null) return input;
|
|
1309
|
-
var prim = input[Symbol.toPrimitive];
|
|
1310
|
-
if (prim !== undefined) {
|
|
1311
|
-
var res = prim.call(input, hint || "default");
|
|
1312
|
-
if (_typeof(res) !== "object") return res;
|
|
1313
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1314
|
-
}
|
|
1315
|
-
return (hint === "string" ? String : Number)(input);
|
|
1316
|
-
}
|
|
1317
|
-
|
|
1318
|
-
function _toPropertyKey(arg) {
|
|
1319
|
-
var key = _toPrimitive(arg, "string");
|
|
1320
|
-
return _typeof(key) === "symbol" ? key : String(key);
|
|
1321
|
-
}
|
|
1322
|
-
|
|
1323
|
-
function _defineProperty(obj, key, value) {
|
|
1324
|
-
key = _toPropertyKey(key);
|
|
1325
|
-
if (key in obj) {
|
|
1326
|
-
Object.defineProperty(obj, key, {
|
|
1327
|
-
value: value,
|
|
1328
|
-
enumerable: true,
|
|
1329
|
-
configurable: true,
|
|
1330
|
-
writable: true
|
|
1331
|
-
});
|
|
1332
|
-
} else {
|
|
1333
|
-
obj[key] = value;
|
|
1334
|
-
}
|
|
1335
|
-
return obj;
|
|
1336
|
-
}
|
|
1337
|
-
|
|
1338
|
-
var SIZES = {
|
|
1339
|
-
nano: "nano",
|
|
1340
|
-
small: "small",
|
|
1341
|
-
large: "large"
|
|
1342
|
-
};
|
|
1343
|
-
var DROPDOWN_BUTTON_SIZES = {
|
|
1344
|
-
nano: "small",
|
|
1345
|
-
small: "medium",
|
|
1346
|
-
large: "large"
|
|
1347
|
-
};
|
|
1348
|
-
|
|
1349
|
-
var Dropdown = function Dropdown(props) {
|
|
1350
|
-
return /*#__PURE__*/React.createElement(Dropdown$1, _extends({
|
|
1351
|
-
buttonSize: DROPDOWN_BUTTON_SIZES[props.size],
|
|
1352
|
-
buttonStyle: "secondary",
|
|
1353
|
-
icon: MenuHorizontal,
|
|
1354
|
-
position: "bottom-start",
|
|
1355
|
-
strategy: "fixed"
|
|
1356
|
-
}, props));
|
|
1357
|
-
};
|
|
1358
|
-
|
|
1359
|
-
var css$2 = ":root{--neeto-molecules-main-header-height:98px;--neeto-molecules-main-header-with-breadcrumbs-height:170px}.neeto-molecules-header{align-items:flex-start;background:rgb(var(--neeto-ui-white));display:flex;flex-direction:row;flex-shrink:0;gap:16px;justify-content:space-between;min-height:98px;min-height:var(--neeto-molecules-main-header-height);padding:40px 0 24px;width:100%}@media screen and (max-width:1024px){.neeto-molecules-header{flex-wrap:wrap}}.neeto-molecules-header .neeto-molecules-header__toggle-menubar-btn{margin-right:8px}.neeto-molecules-header .neeto-molecules-header__left{align-items:flex-start;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:flex-start}.neeto-molecules-header .neeto-molecules-header__left-data-wrap{display:flex;flex-wrap:wrap}.neeto-molecules-header .neeto-molecules-header__page-title{align-items:center;display:flex;flex-direction:row;gap:12px;margin-top:-12px;width:100%}@media screen and (max-width:1024px){.neeto-molecules-header .neeto-molecules-header__page-title{margin-top:-10px}}@media screen and (max-width:768px){.neeto-molecules-header .neeto-molecules-header__page-title{margin-top:-8px}}@media screen and (max-width:576px){.neeto-molecules-header .neeto-molecules-header__page-title{margin-top:-4px}}.neeto-molecules-header .neeto-molecules-header__page-title h2{font-size:calc(1.375rem + 1.5vw);line-height:var(--neeto-ui-leading-tight)}@media (min-width:1200px){.neeto-molecules-header .neeto-molecules-header__page-title h2{font-size:2.5rem}}.neeto-molecules-header .neeto-molecules-header__right{align-items:center;display:flex;gap:12px;justify-content:flex-end}@media screen and (max-width:768px){.neeto-molecules-header .neeto-molecules-header__right{flex-wrap:wrap;justify-content:flex-start}}.neeto-molecules-header .neeto-molecules-header__right .neeto-ui-btn{flex-shrink:0}.neeto-molecules-header .neeto-molecules-header__right .neeto-molecules-header__search-input{flex-grow:0;min-width:104px}.neeto-molecules-header .neeto-molecules-header__right .neeto-molecules-header__action-block{align-items:center;display:flex;flex-shrink:0;gap:12px;justify-content:flex-end}@media screen and (max-width:360px){.neeto-molecules-header .neeto-molecules-header__right .neeto-molecules-header__action-block{flex-shrink:1;flex-wrap:wrap;justify-content:flex-start}}.neeto-molecules-header--has-breadcrumbs{min-height:170px;min-height:var(--neeto-molecules-main-header-with-breadcrumbs-height)}.neeto-molecules-header--has-breadcrumbs .neeto-molecules-header__page-title{margin-top:0}.neeto-molecules-header--nano,.neeto-molecules-header--small{flex-shrink:0;min-height:0}.neeto-molecules-header--nano .neeto-molecules-breadcrumbs-wrap,.neeto-molecules-header--small .neeto-molecules-breadcrumbs-wrap{margin:0 0 16px}.neeto-molecules-header--small .neeto-molecules-header__page-title{margin-top:-4px}.neeto-molecules-header--small .neeto-molecules-header__page-title h2{font-size:calc(1.325rem + .9vw)}@media (min-width:1200px){.neeto-molecules-header--small .neeto-molecules-header__page-title h2{font-size:2rem}}.neeto-molecules-header--nano .neeto-molecules-header__page-title{margin-top:0}.neeto-molecules-header--nano .neeto-molecules-header__page-title h2{font-size:calc(1.275rem + .3vw)}@media (min-width:1200px){.neeto-molecules-header--nano .neeto-molecules-header__page-title h2{font-size:1.5rem}}";
|
|
1360
|
-
n(css$2,{});
|
|
1361
|
-
|
|
1362
|
-
function ownKeys$4(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; }
|
|
1363
|
-
function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$4(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$4(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1364
|
-
var Header = function Header(_ref) {
|
|
1365
|
-
var title = _ref.title,
|
|
1366
|
-
searchProps = _ref.searchProps,
|
|
1367
|
-
_ref$className = _ref.className,
|
|
1368
|
-
className = _ref$className === void 0 ? "" : _ref$className,
|
|
1369
|
-
actionBlock = _ref.actionBlock,
|
|
1370
|
-
_ref$breadcrumbs = _ref.breadcrumbs,
|
|
1371
|
-
breadcrumbs = _ref$breadcrumbs === void 0 ? [] : _ref$breadcrumbs,
|
|
1372
|
-
_ref$renderDropdown = _ref.renderDropdown,
|
|
1373
|
-
renderDropdown = _ref$renderDropdown === void 0 ? noop : _ref$renderDropdown,
|
|
1374
|
-
_ref$size = _ref.size,
|
|
1375
|
-
size = _ref$size === void 0 ? "large" : _ref$size,
|
|
1376
|
-
_ref$dataTestid = _ref["data-testid"],
|
|
1377
|
-
dataTestId = _ref$dataTestid === void 0 ? "neeto-molecules-header" : _ref$dataTestid;
|
|
1378
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
1379
|
-
"data-cy": "neeto-molecules-header",
|
|
1380
|
-
"data-testid": dataTestId,
|
|
1381
|
-
className: classnames(["neeto-molecules-header", {
|
|
1382
|
-
"neeto-molecules-header--has-breadcrumbs": isNotEmpty(breadcrumbs),
|
|
1383
|
-
"neeto-molecules-header--large": size === SIZES.large,
|
|
1384
|
-
"neeto-molecules-header--small": size === SIZES.small,
|
|
1385
|
-
"neeto-molecules-header--nano": size === SIZES.nano
|
|
1386
|
-
}, className])
|
|
1387
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
1388
|
-
className: "neeto-molecules-header__left"
|
|
1389
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
1390
|
-
className: "neeto-molecules-header__left-data-wrap"
|
|
1391
|
-
}, isNotEmpty(breadcrumbs) && /*#__PURE__*/React.createElement(Breadcrumbs, {
|
|
1392
|
-
breadcrumbs: breadcrumbs
|
|
1393
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
1394
|
-
className: "neeto-molecules-header__page-title"
|
|
1395
|
-
}, /*#__PURE__*/React.createElement(Typography, {
|
|
1396
|
-
"data-cy": "main-header",
|
|
1397
|
-
"data-test-id": "main-header",
|
|
1398
|
-
lineHeight: "tight",
|
|
1399
|
-
style: "h2",
|
|
1400
|
-
weight: "semibold"
|
|
1401
|
-
}, title), renderDropdown(function (props) {
|
|
1402
|
-
return /*#__PURE__*/React.createElement(Dropdown, _objectSpread$4({
|
|
1403
|
-
size: size
|
|
1404
|
-
}, props));
|
|
1405
|
-
})))), /*#__PURE__*/React.createElement("div", {
|
|
1406
|
-
className: "neeto-molecules-header__right"
|
|
1407
|
-
}, searchProps && /*#__PURE__*/React.createElement(Search, _extends({
|
|
1408
|
-
className: classnames(["neeto-molecules-header__search-input", searchProps.className])
|
|
1409
|
-
}, searchProps)), actionBlock && /*#__PURE__*/React.createElement("div", {
|
|
1410
|
-
className: "neeto-molecules-header__action-block"
|
|
1411
|
-
}, actionBlock)));
|
|
1412
|
-
};
|
|
1413
|
-
|
|
1414
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
1415
|
-
if (source == null) return {};
|
|
1416
|
-
var target = {};
|
|
1417
|
-
var sourceKeys = Object.keys(source);
|
|
1418
|
-
var key, i;
|
|
1419
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
1420
|
-
key = sourceKeys[i];
|
|
1421
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
1422
|
-
target[key] = source[key];
|
|
1423
|
-
}
|
|
1424
|
-
return target;
|
|
1425
|
-
}
|
|
1426
|
-
|
|
1427
|
-
function _objectWithoutProperties(source, excluded) {
|
|
1428
|
-
if (source == null) return {};
|
|
1429
|
-
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
1430
|
-
var key, i;
|
|
1431
|
-
if (Object.getOwnPropertySymbols) {
|
|
1432
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
1433
|
-
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
1434
|
-
key = sourceSymbolKeys[i];
|
|
1435
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
1436
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
1437
|
-
target[key] = source[key];
|
|
1438
|
-
}
|
|
1439
|
-
}
|
|
1440
|
-
return target;
|
|
1441
|
-
}
|
|
1442
|
-
|
|
1443
|
-
var _excluded$4 = ["buttonProps", "columnData", "localStorageKey", "fixedColumns"];
|
|
1444
|
-
function ownKeys$3(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; }
|
|
1445
|
-
function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1446
|
-
var Columns = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
1447
|
-
var _ref$buttonProps = _ref.buttonProps,
|
|
1448
|
-
buttonProps = _ref$buttonProps === void 0 ? {} : _ref$buttonProps,
|
|
1449
|
-
columnData = _ref.columnData,
|
|
1450
|
-
localStorageKey = _ref.localStorageKey,
|
|
1451
|
-
fixedColumns = _ref.fixedColumns,
|
|
1452
|
-
props = _objectWithoutProperties(_ref, _excluded$4);
|
|
1453
|
-
var _useTranslation = useTranslation(),
|
|
1454
|
-
t = _useTranslation.t;
|
|
1455
|
-
var columnDataIndex = useMemo(function () {
|
|
1456
|
-
return pluck("dataIndex", (columnData || []).filter(function (column) {
|
|
1457
|
-
return !(fixedColumns !== null && fixedColumns !== void 0 && fixedColumns.includes(column.dataIndex));
|
|
1458
|
-
}));
|
|
1459
|
-
}, [columnData, fixedColumns]);
|
|
1460
|
-
var _useHiddenColumns = useHiddenColumns(localStorageKey),
|
|
1461
|
-
hideColumn = _useHiddenColumns.hideColumn,
|
|
1462
|
-
showColumn = _useHiddenColumns.showColumn;
|
|
1463
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
1464
|
-
className: "neeto-molecules-subheader__columns"
|
|
1465
|
-
}, /*#__PURE__*/React.createElement(ManageColumns, _extends({
|
|
1466
|
-
isSearchable: true,
|
|
1467
|
-
className: "neeto-ui-dropdown--manage-columns",
|
|
1468
|
-
actionBlock: /*#__PURE__*/React.createElement("div", {
|
|
1469
|
-
className: "grid grid-cols-2 gap-2 px-4 py-3"
|
|
1470
|
-
}, /*#__PURE__*/React.createElement(Button, {
|
|
1471
|
-
className: "col-span-1 justify-center",
|
|
1472
|
-
label: "Hide all",
|
|
1473
|
-
style: "secondary",
|
|
1474
|
-
onClick: function onClick() {
|
|
1475
|
-
return hideColumn(columnDataIndex);
|
|
1476
|
-
}
|
|
1477
|
-
}), /*#__PURE__*/React.createElement(Button, {
|
|
1478
|
-
className: "col-span-1 justify-center",
|
|
1479
|
-
label: "Show all",
|
|
1480
|
-
style: "secondary",
|
|
1481
|
-
onClick: function onClick() {
|
|
1482
|
-
return showColumn(columnDataIndex);
|
|
1483
|
-
}
|
|
1484
|
-
})),
|
|
1485
|
-
buttonProps: _objectSpread$3({
|
|
1486
|
-
icon: Column,
|
|
1487
|
-
label: null,
|
|
1488
|
-
tooltipProps: {
|
|
1489
|
-
content: t("neetoMolecules.columns.columns"),
|
|
1490
|
-
position: "bottom"
|
|
1491
|
-
},
|
|
1492
|
-
"data-testid": "columns-button",
|
|
1493
|
-
"data-cy": "columns-dropdown-button"
|
|
1494
|
-
}, buttonProps)
|
|
1495
|
-
}, _objectSpread$3(_objectSpread$3({
|
|
1496
|
-
columnData: columnData,
|
|
1497
|
-
localStorageKey: localStorageKey
|
|
1498
|
-
}, props), {}, {
|
|
1499
|
-
ref: ref
|
|
1500
|
-
}))));
|
|
1501
|
-
});
|
|
1502
|
-
Columns.displayName = "Columns";
|
|
1503
|
-
|
|
1504
|
-
var DownloadButton = function DownloadButton(_ref) {
|
|
1505
|
-
var count = _ref.count,
|
|
1506
|
-
onClick = _ref.onClick,
|
|
1507
|
-
_ref$dataCy = _ref["data-cy"],
|
|
1508
|
-
dataCy = _ref$dataCy === void 0 ? "download-button" : _ref$dataCy;
|
|
1509
|
-
var _useTranslation = useTranslation(),
|
|
1510
|
-
t = _useTranslation.t;
|
|
1511
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
1512
|
-
className: "neeto-molecules-subheader__download"
|
|
1513
|
-
}, /*#__PURE__*/React.createElement(Button, {
|
|
1514
|
-
"data-cy": dataCy,
|
|
1515
|
-
"data-testid": "download-button",
|
|
1516
|
-
icon: Download,
|
|
1517
|
-
style: "text",
|
|
1518
|
-
tooltipProps: {
|
|
1519
|
-
content: t("neetoMolecules.common.download"),
|
|
1520
|
-
position: "bottom"
|
|
1521
|
-
},
|
|
1522
|
-
onClick: onClick
|
|
1523
|
-
}), count && /*#__PURE__*/React.createElement("span", {
|
|
1524
|
-
className: "neeto-molecules-subheader__download-count"
|
|
1525
|
-
}, count));
|
|
1526
|
-
};
|
|
1527
|
-
|
|
1528
|
-
var _excluded$3 = ["buttonProps"];
|
|
1529
|
-
function ownKeys$2(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; }
|
|
1530
|
-
function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1531
|
-
var FilterButton = function FilterButton(_ref) {
|
|
1532
|
-
var buttonProps = _ref.buttonProps,
|
|
1533
|
-
props = _objectWithoutProperties(_ref, _excluded$3);
|
|
1534
|
-
var _useTranslation = useTranslation(),
|
|
1535
|
-
t = _useTranslation.t;
|
|
1536
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
1537
|
-
className: "neeto-molecules-subheader__filter"
|
|
1538
|
-
}, /*#__PURE__*/React.createElement(Filters, _extends({
|
|
1539
|
-
buttonProps: _objectSpread$2({
|
|
1540
|
-
"data-testid": "filter-button",
|
|
1541
|
-
icon: Filter,
|
|
1542
|
-
style: "text",
|
|
1543
|
-
tooltipProps: {
|
|
1544
|
-
content: t("neetoMolecules.common.filter"),
|
|
1545
|
-
position: "bottom"
|
|
1546
|
-
},
|
|
1547
|
-
label: null
|
|
1548
|
-
}, buttonProps)
|
|
1549
|
-
}, props)));
|
|
1550
|
-
};
|
|
1551
|
-
|
|
1552
|
-
var RightBlock = function RightBlock(_ref) {
|
|
1553
|
-
var downloadButtonProps = _ref.downloadButtonProps,
|
|
1554
|
-
columnsButtonProps = _ref.columnsButtonProps,
|
|
1555
|
-
filterProps = _ref.filterProps,
|
|
1556
|
-
dataProps = _ref.dataProps;
|
|
1557
|
-
var showIcons = isNotPresent(dataProps === null || dataProps === void 0 ? void 0 : dataProps.totalCount) ? true : (dataProps === null || dataProps === void 0 ? void 0 : dataProps.totalCount) > 0;
|
|
1558
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
1559
|
-
"data-testid": "subheader-rightblock-buttons-container",
|
|
1560
|
-
className: classnames("neeto-molecules-subheader__right-actions", {
|
|
1561
|
-
hidden: not(showIcons)
|
|
1562
|
-
})
|
|
1563
|
-
}, downloadButtonProps && /*#__PURE__*/React.createElement(DownloadButton, downloadButtonProps), columnsButtonProps && /*#__PURE__*/React.createElement(Columns, columnsButtonProps), filterProps && /*#__PURE__*/React.createElement(FilterButton, filterProps));
|
|
1564
|
-
};
|
|
1565
|
-
|
|
1566
|
-
var css$1 = ":root{--neeto-molecules-sub-header-height:37px;--neeto-molecules-sub-header-bottom-margin:20px}.neeto-molecules-subheader{align-items:center;background-color:rgb(var(--neeto-ui-white));display:flex;flex-direction:row;flex-shrink:0;gap:16px;justify-content:space-between;margin-bottom:20px;margin-bottom:var(--neeto-molecules-sub-header-bottom-margin);min-height:37px;min-height:var(--neeto-molecules-sub-header-height);width:100%}@media screen and (max-width:768px){.neeto-molecules-subheader{flex-wrap:wrap}}.neeto-molecules-subheader .neeto-molecules-subheader__left-wrapper{display:flex;flex-grow:1}.neeto-molecules-subheader .neeto-molecules-subheader__left-wrapper .neeto-molecules-subheader__left{align-items:center;display:flex;flex-direction:row;justify-content:flex-start}.neeto-molecules-subheader .neeto-molecules-subheader__left-wrapper .neeto-molecules-subheader__left .neeto-molecules-input__prefix{color:rgb(var(--neeto-ui-gray-400))}@media screen and (max-width:360px){.neeto-molecules-subheader .neeto-molecules-subheader__left-wrapper .neeto-molecules-subheader__left h4{font-size:14px}}.neeto-molecules-subheader .neeto-molecules-subheader__left-wrapper .neeto-ui-btn{flex-shrink:0}.neeto-molecules-subheader .neeto-molecules-subheader__right{align-items:center;display:flex;flex-direction:row;gap:12px;justify-content:flex-end}@media screen and (max-width:768px){.neeto-molecules-subheader .neeto-molecules-subheader__right{margin-left:auto}}.neeto-molecules-subheader .neeto-molecules-subheader__right-actions{align-items:center;display:flex;flex-direction:row;gap:8px;justify-content:flex-end}.neeto-molecules-subheader .neeto-molecules-subheader__right-actions>:not([hidden])~:not([hidden]){border-left:thin solid rgb(var(--neeto-ui-gray-300));padding-left:8px}.neeto-molecules-subheader__download{position:relative}.neeto-molecules-subheader__download-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:inline-flex;font-size:10px;justify-content:center;min-height:16px;min-width:16px;position:absolute;right:-2px;text-align:center;top:-2px;z-index:1}.neeto-molecules-subheader__columns .neeto-ui-dropdown__popup{max-height:calc(100vh - var(--neeto-molecules-main-header-with-breadcrumbs-height) - 57px);max-height:calc(100vh - var(--neeto-molecules-main-header-with-breadcrumbs-height) - var(--neeto-molecules-sub-header-height) - var(--neeto-molecules-sub-header-bottom-margin));min-width:320px}";
|
|
1567
|
-
n(css$1,{});
|
|
1568
|
-
|
|
1569
|
-
var SubHeader = function SubHeader(_ref) {
|
|
1570
|
-
var _ref$className = _ref.className,
|
|
1571
|
-
className = _ref$className === void 0 ? "" : _ref$className,
|
|
1572
|
-
leftActionBlock = _ref.leftActionBlock,
|
|
1573
|
-
rightActionBlock = _ref.rightActionBlock,
|
|
1574
|
-
_ref$dataCy = _ref["data-cy"],
|
|
1575
|
-
dataCy = _ref$dataCy === void 0 ? "subheader" : _ref$dataCy;
|
|
1576
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
1577
|
-
className: classnames(["neeto-molecules-subheader", className]),
|
|
1578
|
-
"data-cy": dataCy,
|
|
1579
|
-
"data-testid": "subheader"
|
|
1580
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
1581
|
-
className: "neeto-molecules-subheader__left-wrapper",
|
|
1582
|
-
"data-cy": "subheader-left-wrapper"
|
|
1583
|
-
}, leftActionBlock && /*#__PURE__*/React.createElement("div", {
|
|
1584
|
-
className: "neeto-molecules-subheader__left",
|
|
1585
|
-
"data-cy": "subheader-left"
|
|
1586
|
-
}, leftActionBlock)), rightActionBlock && /*#__PURE__*/React.createElement("div", {
|
|
1587
|
-
className: "neeto-molecules-subheader__right",
|
|
1588
|
-
"data-cy": "subheader-right"
|
|
1589
|
-
}, rightActionBlock));
|
|
1590
|
-
};
|
|
1591
|
-
SubHeader.RightBlock = RightBlock;
|
|
1592
|
-
|
|
1593
|
-
var css = ".neeto-molecules-tablewrapper-pagination--height{padding:0 0 48px}";
|
|
1594
|
-
n(css,{});
|
|
1595
|
-
|
|
1596
|
-
var TableWrapper = function TableWrapper(_ref) {
|
|
1597
|
-
var children = _ref.children,
|
|
1598
|
-
_ref$className = _ref.className,
|
|
1599
|
-
className = _ref$className === void 0 ? "" : _ref$className,
|
|
1600
|
-
_ref$hasPagination = _ref.hasPagination,
|
|
1601
|
-
hasPagination = _ref$hasPagination === void 0 ? false : _ref$hasPagination;
|
|
1602
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
1603
|
-
"data-testid": "table-wrapper",
|
|
1604
|
-
className: classnames("flex min-h-0 w-full flex-grow flex-col pb-6", className)
|
|
1605
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
1606
|
-
className: classnames("min-h-0 flex-grow", {
|
|
1607
|
-
"neeto-molecules-tablewrapper-pagination--height": hasPagination
|
|
1608
|
-
})
|
|
1609
|
-
}, children));
|
|
1610
|
-
};
|
|
19
|
+
import { _ as _toConsumableArray } from './toConsumableArray-1cc38429.js';
|
|
20
|
+
import MoreDropdown from './MoreDropdown.js';
|
|
21
|
+
import 'classnames';
|
|
22
|
+
import './index-e5588516.js';
|
|
23
|
+
import './inject-css-c86de496.js';
|
|
24
|
+
import './extends-093996c9.js';
|
|
25
|
+
import './defineProperty-549061a7.js';
|
|
26
|
+
import './Breadcrumbs.js';
|
|
27
|
+
import 'react-router-dom';
|
|
28
|
+
import './Search.js';
|
|
29
|
+
import './objectWithoutProperties-a0edb288.js';
|
|
30
|
+
import '@bigbinary/neeto-commons-frontend/react-utils/useFuncDebounce';
|
|
31
|
+
import '@bigbinary/neeto-commons-frontend/react-utils/useQueryParams';
|
|
32
|
+
import '@bigbinary/neeto-commons-frontend/react-utils/useUpdateEffect';
|
|
33
|
+
import '@bigbinary/neeto-commons-frontend/utils/general';
|
|
34
|
+
import '@bigbinary/neeto-icons';
|
|
35
|
+
import './Columns-702d539a.js';
|
|
36
|
+
import 'zustand';
|
|
37
|
+
import 'zustand/middleware';
|
|
38
|
+
import '@bigbinary/neeto-filters-frontend';
|
|
1611
39
|
|
|
1612
40
|
var LABEL_REJECT_CHARS_REGEX = /[^a-zA-Z\d\s_-]+/;
|
|
1613
41
|
var VALIDATION_SCHEMA = yup.object().shape({
|
|
1614
|
-
singularLabel: yup.string().trim().required(t
|
|
1615
|
-
pluralLabel: yup.string().trim().required(t
|
|
42
|
+
singularLabel: yup.string().trim().required(t("neetoMolecules.taxonomy.editPane.validations.singularLabelRequired")),
|
|
43
|
+
pluralLabel: yup.string().trim().required(t("neetoMolecules.taxonomy.editPane.validations.pluralLabelRequired"))
|
|
1616
44
|
});
|
|
1617
45
|
|
|
1618
46
|
var update = function update(_ref) {
|
|
@@ -1637,140 +65,6 @@ var useBulkDestroyTaxonomies = function useBulkDestroyTaxonomies(options) {
|
|
|
1637
65
|
return useMutation(taxonomiesApi.bulkDestroy, options);
|
|
1638
66
|
};
|
|
1639
67
|
|
|
1640
|
-
function _arrayWithoutHoles(arr) {
|
|
1641
|
-
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
1642
|
-
}
|
|
1643
|
-
|
|
1644
|
-
function _iterableToArray(iter) {
|
|
1645
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
1646
|
-
}
|
|
1647
|
-
|
|
1648
|
-
function _nonIterableSpread() {
|
|
1649
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1650
|
-
}
|
|
1651
|
-
|
|
1652
|
-
function _toConsumableArray(arr) {
|
|
1653
|
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
1654
|
-
}
|
|
1655
|
-
|
|
1656
|
-
var MENU_ITEM_TYPES = {
|
|
1657
|
-
menuItem: "menuItem",
|
|
1658
|
-
divider: "divider"
|
|
1659
|
-
};
|
|
1660
|
-
var DEFAULT_TOOLTIP_PROPS = {
|
|
1661
|
-
disabled: true,
|
|
1662
|
-
position: "bottom"
|
|
1663
|
-
};
|
|
1664
|
-
|
|
1665
|
-
var _excluded$2 = ["label", "key"],
|
|
1666
|
-
_excluded2 = ["isVisible", "key"];
|
|
1667
|
-
var MenuItem$1 = Dropdown$1.MenuItem,
|
|
1668
|
-
Menu$1 = Dropdown$1.Menu;
|
|
1669
|
-
var Submenu = function Submenu(_ref) {
|
|
1670
|
-
var label = _ref.label,
|
|
1671
|
-
key = _ref.key,
|
|
1672
|
-
menuItemProps = _objectWithoutProperties(_ref, _excluded$2);
|
|
1673
|
-
return /*#__PURE__*/React.createElement(Dropdown$1, _extends({
|
|
1674
|
-
customTarget: /*#__PURE__*/React.createElement(MenuItem$1.Button, null, label),
|
|
1675
|
-
key: key,
|
|
1676
|
-
position: "left",
|
|
1677
|
-
trigger: "hover"
|
|
1678
|
-
}, menuItemProps.dropdownProps), /*#__PURE__*/React.createElement(Menu$1, null, menuItemProps.menuItems.map(function (_ref2) {
|
|
1679
|
-
var _ref2$isVisible = _ref2.isVisible,
|
|
1680
|
-
isVisible = _ref2$isVisible === void 0 ? true : _ref2$isVisible,
|
|
1681
|
-
key = _ref2.key,
|
|
1682
|
-
menuItemProps = _objectWithoutProperties(_ref2, _excluded2);
|
|
1683
|
-
if (!isVisible) return null;
|
|
1684
|
-
return /*#__PURE__*/React.createElement(MoreDropdownMenuItem, _extends({
|
|
1685
|
-
key: key
|
|
1686
|
-
}, menuItemProps));
|
|
1687
|
-
})));
|
|
1688
|
-
};
|
|
1689
|
-
|
|
1690
|
-
var _excluded$1 = ["onClick", "label", "type", "hasSubItems"];
|
|
1691
|
-
function ownKeys$1(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; }
|
|
1692
|
-
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1693
|
-
var MenuItem = Dropdown$1.MenuItem,
|
|
1694
|
-
Divider = Dropdown$1.Divider;
|
|
1695
|
-
var MoreDropdownMenuItem = function MoreDropdownMenuItem(_ref) {
|
|
1696
|
-
var onClick = _ref.onClick,
|
|
1697
|
-
label = _ref.label,
|
|
1698
|
-
_ref$type = _ref.type,
|
|
1699
|
-
type = _ref$type === void 0 ? MENU_ITEM_TYPES.menuItem : _ref$type,
|
|
1700
|
-
_ref$hasSubItems = _ref.hasSubItems,
|
|
1701
|
-
hasSubItems = _ref$hasSubItems === void 0 ? false : _ref$hasSubItems,
|
|
1702
|
-
menuItemProps = _objectWithoutProperties(_ref, _excluded$1);
|
|
1703
|
-
if (type === MENU_ITEM_TYPES.divider) {
|
|
1704
|
-
return /*#__PURE__*/React.createElement(Divider, null);
|
|
1705
|
-
}
|
|
1706
|
-
if (hasSubItems) {
|
|
1707
|
-
return /*#__PURE__*/React.createElement(Submenu, _objectSpread$1({
|
|
1708
|
-
label: label
|
|
1709
|
-
}, menuItemProps));
|
|
1710
|
-
}
|
|
1711
|
-
return /*#__PURE__*/React.createElement(MenuItem.Button, _objectSpread$1({
|
|
1712
|
-
onClick: onClick
|
|
1713
|
-
}, menuItemProps), label);
|
|
1714
|
-
};
|
|
1715
|
-
|
|
1716
|
-
var _excluded = ["isVisible", "key"];
|
|
1717
|
-
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; }
|
|
1718
|
-
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; }
|
|
1719
|
-
var Menu = Dropdown$1.Menu;
|
|
1720
|
-
var MoreDropdown = function MoreDropdown(_ref) {
|
|
1721
|
-
var _ref$dropdownButtonPr = _ref.dropdownButtonProps,
|
|
1722
|
-
dropdownButtonProps = _ref$dropdownButtonPr === void 0 ? {} : _ref$dropdownButtonPr,
|
|
1723
|
-
_ref$isVertical = _ref.isVertical,
|
|
1724
|
-
isVertical = _ref$isVertical === void 0 ? false : _ref$isVertical,
|
|
1725
|
-
_ref$isDisabled = _ref.isDisabled,
|
|
1726
|
-
isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
|
|
1727
|
-
_ref$dropdownProps = _ref.dropdownProps,
|
|
1728
|
-
dropdownProps = _ref$dropdownProps === void 0 ? {} : _ref$dropdownProps,
|
|
1729
|
-
menuTopChildren = _ref.menuTopChildren,
|
|
1730
|
-
menuBottomChildren = _ref.menuBottomChildren,
|
|
1731
|
-
_ref$menuItems = _ref.menuItems,
|
|
1732
|
-
menuItems = _ref$menuItems === void 0 ? [] : _ref$menuItems;
|
|
1733
|
-
var _useTranslation = useTranslation(),
|
|
1734
|
-
t = _useTranslation.t;
|
|
1735
|
-
var tooltipProps = mergeRight(DEFAULT_TOOLTIP_PROPS, dropdownButtonProps.tooltipProps);
|
|
1736
|
-
var targetIcon = isVertical ? MenuVertical : MenuHorizontal;
|
|
1737
|
-
var isDropdownDisabled = isDisabled || dropdownProps.disabled;
|
|
1738
|
-
if (isDropdownDisabled && !tooltipProps.disabled) {
|
|
1739
|
-
return /*#__PURE__*/React.createElement(Tooltip, tooltipProps, /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(Button, _extends({
|
|
1740
|
-
disabled: true,
|
|
1741
|
-
"data-cy": "more-dropdown-button",
|
|
1742
|
-
"data-testid": "nui-dropdown-button",
|
|
1743
|
-
icon: targetIcon,
|
|
1744
|
-
iconPosition: "right",
|
|
1745
|
-
size: "medium",
|
|
1746
|
-
style: "text"
|
|
1747
|
-
}, dropdownButtonProps))));
|
|
1748
|
-
}
|
|
1749
|
-
return /*#__PURE__*/React.createElement(Dropdown$1, _extends({
|
|
1750
|
-
autoWidth: true,
|
|
1751
|
-
className: "flex",
|
|
1752
|
-
disabled: isDisabled,
|
|
1753
|
-
icon: targetIcon,
|
|
1754
|
-
buttonProps: _objectSpread({
|
|
1755
|
-
className: "min-h-0 flex-shrink-0",
|
|
1756
|
-
style: "text",
|
|
1757
|
-
tooltipProps: {
|
|
1758
|
-
content: t("neetoMolecules.moreDropdown.tooltip"),
|
|
1759
|
-
position: "top"
|
|
1760
|
-
}
|
|
1761
|
-
}, dropdownButtonProps)
|
|
1762
|
-
}, dropdownProps), /*#__PURE__*/React.createElement(Menu, null, menuTopChildren, menuItems.map(function (_ref2) {
|
|
1763
|
-
var _ref2$isVisible = _ref2.isVisible,
|
|
1764
|
-
isVisible = _ref2$isVisible === void 0 ? true : _ref2$isVisible,
|
|
1765
|
-
key = _ref2.key,
|
|
1766
|
-
menuItemProps = _objectWithoutProperties(_ref2, _excluded);
|
|
1767
|
-
if (!isVisible) return null;
|
|
1768
|
-
return /*#__PURE__*/React.createElement(MoreDropdownMenuItem, _extends({
|
|
1769
|
-
key: key
|
|
1770
|
-
}, menuItemProps));
|
|
1771
|
-
}), menuBottomChildren));
|
|
1772
|
-
};
|
|
1773
|
-
|
|
1774
68
|
var formatLabel = function formatLabel(label) {
|
|
1775
69
|
return capitalize(label.trim());
|
|
1776
70
|
};
|
|
@@ -1788,30 +82,30 @@ var formatDataForTable = function formatDataForTable(taxonomies) {
|
|
|
1788
82
|
};
|
|
1789
83
|
var getColumnData = function getColumnData(handleEdit, setCurrentKeys, setIsResetModalOpen) {
|
|
1790
84
|
return [{
|
|
1791
|
-
title: t
|
|
85
|
+
title: t("neetoMolecules.taxonomy.defaultLabel"),
|
|
1792
86
|
dataIndex: "default",
|
|
1793
87
|
key: "defaultLabel",
|
|
1794
88
|
width: 400,
|
|
1795
89
|
render: function render(_, values) {
|
|
1796
90
|
var menuItems = [{
|
|
1797
91
|
key: "edit",
|
|
1798
|
-
label: t
|
|
92
|
+
label: t("neetoMolecules.common.actions.edit"),
|
|
1799
93
|
onClick: function onClick() {
|
|
1800
94
|
return handleEdit(values);
|
|
1801
95
|
}
|
|
1802
96
|
}, {
|
|
1803
97
|
key: "reset",
|
|
1804
|
-
label: t
|
|
98
|
+
label: t("neetoMolecules.common.actions.resetToDefaults"),
|
|
1805
99
|
onClick: function onClick() {
|
|
1806
100
|
setCurrentKeys([values.keyName]);
|
|
1807
101
|
setIsResetModalOpen(true);
|
|
1808
102
|
}
|
|
1809
103
|
}];
|
|
1810
|
-
return /*#__PURE__*/
|
|
104
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
1811
105
|
className: "flex items-center justify-between gap-x-3"
|
|
1812
|
-
}, /*#__PURE__*/
|
|
106
|
+
}, /*#__PURE__*/React__default.createElement(Typography, {
|
|
1813
107
|
style: "body2"
|
|
1814
|
-
}, t
|
|
108
|
+
}, t("taxonomyDefaultLabels.".concat(values.keyName, ".singular"))), /*#__PURE__*/React__default.createElement(MoreDropdown, {
|
|
1815
109
|
dropdownProps: {
|
|
1816
110
|
strategy: "fixed"
|
|
1817
111
|
},
|
|
@@ -1822,12 +116,12 @@ var getColumnData = function getColumnData(handleEdit, setCurrentKeys, setIsRese
|
|
|
1822
116
|
}));
|
|
1823
117
|
}
|
|
1824
118
|
}, {
|
|
1825
|
-
title: t
|
|
119
|
+
title: t("neetoMolecules.taxonomy.singularLabel"),
|
|
1826
120
|
dataIndex: "singularLabel",
|
|
1827
121
|
key: "singularLabel",
|
|
1828
122
|
width: 300
|
|
1829
123
|
}, {
|
|
1830
|
-
title: t
|
|
124
|
+
title: t("neetoMolecules.taxonomy.pluralLabel"),
|
|
1831
125
|
dataIndex: "pluralLabel",
|
|
1832
126
|
key: "pluralLabel",
|
|
1833
127
|
width: 300
|
|
@@ -1838,7 +132,7 @@ var getFilteredTaxonomies = function getFilteredTaxonomies(matchString, taxonomi
|
|
|
1838
132
|
var _ref4 = _slicedToArray(_ref3, 2),
|
|
1839
133
|
key = _ref4[0],
|
|
1840
134
|
value = _ref4[1];
|
|
1841
|
-
var defaultLabel = t
|
|
135
|
+
var defaultLabel = t("taxonomyDefaultLabels.".concat(key, ".singular"));
|
|
1842
136
|
var valuesToSearch = [defaultLabel].concat(_toConsumableArray(Object.values(value)));
|
|
1843
137
|
return valuesToSearch.some(function (str) {
|
|
1844
138
|
return str.toLowerCase().includes(matchString.toLowerCase());
|
|
@@ -1884,25 +178,25 @@ var EditPane = function EditPane(_ref) {
|
|
|
1884
178
|
payload: payload
|
|
1885
179
|
}, options);
|
|
1886
180
|
};
|
|
1887
|
-
return /*#__PURE__*/
|
|
181
|
+
return /*#__PURE__*/React__default.createElement(Pane, {
|
|
1888
182
|
initialFocusRef: initialFocusRef,
|
|
1889
183
|
isOpen: isOpen,
|
|
1890
184
|
onClose: onClose,
|
|
1891
185
|
"data-testid": "taxonomy-edit-pane"
|
|
1892
|
-
}, /*#__PURE__*/
|
|
186
|
+
}, /*#__PURE__*/React__default.createElement(Pane.Header, null, /*#__PURE__*/React__default.createElement(Typography, {
|
|
1893
187
|
style: "h2",
|
|
1894
188
|
weight: "semibold"
|
|
1895
189
|
}, t("neetoMolecules.taxonomy.editPane.title", {
|
|
1896
190
|
entity: t("taxonomyDefaultLabels.".concat(initialValues.keyName, ".singular")).toLocaleLowerCase()
|
|
1897
|
-
}))), /*#__PURE__*/
|
|
191
|
+
}))), /*#__PURE__*/React__default.createElement(Form, {
|
|
1898
192
|
formikProps: {
|
|
1899
193
|
initialValues: initialValues,
|
|
1900
194
|
validationSchema: VALIDATION_SCHEMA,
|
|
1901
195
|
onSubmit: handleSubmit
|
|
1902
196
|
}
|
|
1903
|
-
}, /*#__PURE__*/
|
|
197
|
+
}, /*#__PURE__*/React__default.createElement(Pane.Body, null, /*#__PURE__*/React__default.createElement("div", {
|
|
1904
198
|
className: "w-full space-y-6"
|
|
1905
|
-
}, /*#__PURE__*/
|
|
199
|
+
}, /*#__PURE__*/React__default.createElement(Input, {
|
|
1906
200
|
required: true,
|
|
1907
201
|
className: "w-full",
|
|
1908
202
|
"data-cy": "taxonomy-singular-input-field",
|
|
@@ -1911,7 +205,7 @@ var EditPane = function EditPane(_ref) {
|
|
|
1911
205
|
name: "singularLabel",
|
|
1912
206
|
ref: initialFocusRef,
|
|
1913
207
|
rejectCharsRegex: LABEL_REJECT_CHARS_REGEX
|
|
1914
|
-
}), /*#__PURE__*/
|
|
208
|
+
}), /*#__PURE__*/React__default.createElement(Input, {
|
|
1915
209
|
required: true,
|
|
1916
210
|
className: "w-full",
|
|
1917
211
|
"data-cy": "taxonomy-plural-input-field",
|
|
@@ -1919,7 +213,7 @@ var EditPane = function EditPane(_ref) {
|
|
|
1919
213
|
label: t("neetoMolecules.taxonomy.pluralLabel"),
|
|
1920
214
|
name: "pluralLabel",
|
|
1921
215
|
rejectCharsRegex: LABEL_REJECT_CHARS_REGEX
|
|
1922
|
-
}))), /*#__PURE__*/
|
|
216
|
+
}))), /*#__PURE__*/React__default.createElement(Pane.Footer, null, /*#__PURE__*/React__default.createElement(ActionBlock, {
|
|
1923
217
|
cancelButtonProps: {
|
|
1924
218
|
onClick: onClose,
|
|
1925
219
|
disabled: false
|
|
@@ -1934,37 +228,37 @@ var LeftActionBlock = function LeftActionBlock(_ref) {
|
|
|
1934
228
|
setIsResetModalOpen = _ref.setIsResetModalOpen,
|
|
1935
229
|
setCurrentKeys = _ref.setCurrentKeys,
|
|
1936
230
|
selectedRowIds = _ref.selectedRowIds;
|
|
1937
|
-
var Menu = Dropdown
|
|
1938
|
-
MenuItem = Dropdown
|
|
1939
|
-
return !!totalCount && /*#__PURE__*/
|
|
231
|
+
var Menu = Dropdown.Menu,
|
|
232
|
+
MenuItem = Dropdown.MenuItem;
|
|
233
|
+
return !!totalCount && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, selectedCount > 0 ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Typography, {
|
|
1940
234
|
className: "mr-4 font-semibold",
|
|
1941
235
|
component: "h4",
|
|
1942
236
|
"data-cy": "item-count"
|
|
1943
|
-
}, /*#__PURE__*/
|
|
237
|
+
}, /*#__PURE__*/React__default.createElement(Trans, {
|
|
1944
238
|
i18nKey: "neetoMolecules.taxonomy.actionBlock.selectedTaxonomy",
|
|
1945
239
|
values: {
|
|
1946
240
|
count: selectedCount,
|
|
1947
241
|
totalCount: totalCount
|
|
1948
242
|
},
|
|
1949
243
|
components: {
|
|
1950
|
-
span: /*#__PURE__*/
|
|
244
|
+
span: /*#__PURE__*/React__default.createElement("span", {
|
|
1951
245
|
className: "neeto-ui-text-gray-600"
|
|
1952
246
|
})
|
|
1953
247
|
}
|
|
1954
|
-
})), /*#__PURE__*/
|
|
248
|
+
})), /*#__PURE__*/React__default.createElement(Dropdown, {
|
|
1955
249
|
buttonStyle: "secondary",
|
|
1956
|
-
label: t
|
|
1957
|
-
}, /*#__PURE__*/
|
|
250
|
+
label: t("neetoMolecules.taxonomy.actionBlock.takeAction")
|
|
251
|
+
}, /*#__PURE__*/React__default.createElement(Menu, null, /*#__PURE__*/React__default.createElement(MenuItem.Button, {
|
|
1958
252
|
style: "secondary",
|
|
1959
253
|
onClick: function onClick() {
|
|
1960
254
|
setCurrentKeys(selectedRowIds);
|
|
1961
255
|
setIsResetModalOpen(true);
|
|
1962
256
|
}
|
|
1963
|
-
}, t
|
|
257
|
+
}, t("neetoMolecules.common.actions.resetToDefaults"))))) : /*#__PURE__*/React__default.createElement(Typography, {
|
|
1964
258
|
className: "mr-4 font-semibold",
|
|
1965
259
|
component: "h4",
|
|
1966
260
|
"data-cy": "item-count"
|
|
1967
|
-
}, t
|
|
261
|
+
}, t("neetoMolecules.taxonomy.actionBlock.taxonomyWithCount", {
|
|
1968
262
|
count: totalCount
|
|
1969
263
|
})));
|
|
1970
264
|
};
|
|
@@ -2045,24 +339,24 @@ var Taxonomy = function Taxonomy(_ref) {
|
|
|
2045
339
|
return window.removeEventListener("resize", handleResize);
|
|
2046
340
|
};
|
|
2047
341
|
}, []);
|
|
2048
|
-
return /*#__PURE__*/
|
|
342
|
+
return /*#__PURE__*/React__default.createElement(Container, null, /*#__PURE__*/React__default.createElement(Header, {
|
|
2049
343
|
breadcrumbs: breadcrumbs,
|
|
2050
344
|
size: isMobileScreen ? "small" : "large",
|
|
2051
|
-
title: t
|
|
345
|
+
title: t("neetoMolecules.taxonomy.title"),
|
|
2052
346
|
searchProps: {
|
|
2053
347
|
onChange: handleSearch,
|
|
2054
348
|
value: searchString,
|
|
2055
|
-
placeholder: t
|
|
349
|
+
placeholder: t("neetoMolecules.taxonomy.searchTaxonomy")
|
|
2056
350
|
}
|
|
2057
|
-
}), /*#__PURE__*/
|
|
2058
|
-
leftActionBlock: /*#__PURE__*/
|
|
351
|
+
}), /*#__PURE__*/React__default.createElement(SubHeader, {
|
|
352
|
+
leftActionBlock: /*#__PURE__*/React__default.createElement(LeftActionBlock, {
|
|
2059
353
|
selectedRowIds: selectedRowIds,
|
|
2060
354
|
setCurrentKeys: setCurrentKeys,
|
|
2061
355
|
setIsResetModalOpen: setIsResetModalOpen,
|
|
2062
356
|
selectedCount: selectedRowIds.length,
|
|
2063
357
|
totalCount: Object.entries(filteredTaxonomies).length
|
|
2064
358
|
})
|
|
2065
|
-
}), isNotEmpty(filteredTaxonomies) ? /*#__PURE__*/
|
|
359
|
+
}), isNotEmpty(filteredTaxonomies) ? /*#__PURE__*/React__default.createElement(TableWrapper, null, /*#__PURE__*/React__default.createElement(Table, {
|
|
2066
360
|
fixedHeight: true,
|
|
2067
361
|
rowSelection: true,
|
|
2068
362
|
allowRowClick: false,
|
|
@@ -2075,34 +369,34 @@ var Taxonomy = function Taxonomy(_ref) {
|
|
|
2075
369
|
tableLayout: "fixed",
|
|
2076
370
|
columnData: getColumnData(handleEdit, setCurrentKeys, setIsResetModalOpen),
|
|
2077
371
|
onRowSelect: handleRowSelect
|
|
2078
|
-
}), /*#__PURE__*/
|
|
372
|
+
}), /*#__PURE__*/React__default.createElement(EditPane, {
|
|
2079
373
|
initialValues: initialValues,
|
|
2080
374
|
isOpen: isEditTaxonomyPaneOpen,
|
|
2081
375
|
onClose: function onClose() {
|
|
2082
376
|
return setIsEditTaxonomyPaneOpen(false);
|
|
2083
377
|
}
|
|
2084
|
-
}), /*#__PURE__*/
|
|
378
|
+
}), /*#__PURE__*/React__default.createElement(Alert, {
|
|
2085
379
|
isOpen: isResetModalOpen,
|
|
2086
|
-
submitButtonLabel: t
|
|
2087
|
-
title: t
|
|
2088
|
-
message: /*#__PURE__*/
|
|
380
|
+
submitButtonLabel: t("neetoMolecules.common.actions.proceed"),
|
|
381
|
+
title: t("neetoMolecules.taxonomy.resetAlert.title"),
|
|
382
|
+
message: /*#__PURE__*/React__default.createElement(Trans, {
|
|
2089
383
|
i18nKey: "neetoMolecules.taxonomy.resetAlert.message",
|
|
2090
384
|
values: {
|
|
2091
385
|
count: currentKeys.length,
|
|
2092
|
-
what: t
|
|
386
|
+
what: t("taxonomyDefaultLabels.".concat(currentKeys[0], ".singular"))
|
|
2093
387
|
}
|
|
2094
388
|
}),
|
|
2095
389
|
onClose: function onClose() {
|
|
2096
390
|
return setIsResetModalOpen(false);
|
|
2097
391
|
},
|
|
2098
392
|
onSubmit: handleDelete
|
|
2099
|
-
})) : /*#__PURE__*/
|
|
393
|
+
})) : /*#__PURE__*/React__default.createElement("div", {
|
|
2100
394
|
className: "flex h-full w-full items-center justify-center"
|
|
2101
|
-
}, /*#__PURE__*/
|
|
2102
|
-
title: t
|
|
395
|
+
}, /*#__PURE__*/React__default.createElement(NoData, {
|
|
396
|
+
title: t("neetoMolecules.taxonomy.noData")
|
|
2103
397
|
})));
|
|
2104
398
|
};
|
|
2105
|
-
var index = withTitle(Taxonomy, t
|
|
399
|
+
var index = withTitle(Taxonomy, t("neetoMolecules.taxonomy.browserTitle"));
|
|
2106
400
|
|
|
2107
401
|
export { index as default };
|
|
2108
402
|
//# sourceMappingURL=Taxonomy.js.map
|