@bigbinary/neeto-molecules 1.11.4 → 1.11.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Breadcrumbs.js +7 -8
- package/dist/Breadcrumbs.js.map +1 -1
- package/dist/BrowserSupport.js +41 -138
- package/dist/BrowserSupport.js.map +1 -1
- package/dist/Builder.js +65 -319
- package/dist/Builder.js.map +1 -1
- package/dist/CalendarView.js +38 -321
- package/dist/CalendarView.js.map +1 -1
- package/dist/Codeblock.js +14 -207
- package/dist/Codeblock.js.map +1 -1
- package/dist/Columns-702d539a.js +206 -0
- package/dist/Columns-702d539a.js.map +1 -0
- package/dist/Columns.js +16 -342
- package/dist/Columns.js.map +1 -1
- package/dist/ConfirmationModal.js +10 -10
- package/dist/ConfirmationModal.js.map +1 -1
- package/dist/Container.js +4 -1186
- package/dist/Container.js.map +1 -1
- package/dist/CopyToClipboardButton.js +7 -144
- package/dist/CopyToClipboardButton.js.map +1 -1
- package/dist/Currency.js +4 -46
- package/dist/Currency.js.map +1 -1
- package/dist/CustomDomain.js +30 -635
- package/dist/CustomDomain.js.map +1 -1
- package/dist/CustomDomainDashboard.js +41 -2198
- package/dist/CustomDomainDashboard.js.map +1 -1
- package/dist/DateFormat.js +4 -18
- package/dist/DateFormat.js.map +1 -1
- package/dist/DateRangeFilter.js +7 -61
- package/dist/DateRangeFilter.js.map +1 -1
- package/dist/DocumentEditor.js +12 -121
- package/dist/DocumentEditor.js.map +1 -1
- package/dist/DownloadMobileAppCallout.js +4 -4
- package/dist/DownloadMobileAppCallout.js.map +1 -1
- package/dist/DynamicVariables.js +11 -94
- package/dist/DynamicVariables.js.map +1 -1
- package/dist/EmailForm.js +46 -1711
- package/dist/EmailForm.js.map +1 -1
- package/dist/EmailPreview.js +28 -1209
- package/dist/EmailPreview.js.map +1 -1
- package/dist/EmojiPicker.js +5 -73
- package/dist/EmojiPicker.js.map +1 -1
- package/dist/EmojiReactions.js +13 -67
- package/dist/EmojiReactions.js.map +1 -1
- package/dist/ErrorPage.js +1 -15
- package/dist/ErrorPage.js.map +1 -1
- package/dist/FloatingActionMenu.js +74 -1401
- package/dist/FloatingActionMenu.js.map +1 -1
- package/dist/Header.js +26 -72
- package/dist/Header.js.map +1 -1
- package/dist/HelpPopover.js +14 -96
- package/dist/HelpPopover.js.map +1 -1
- package/dist/IconPicker.js +26 -123
- package/dist/IconPicker.js.map +1 -1
- package/dist/ImageWithFallback.js +8 -144
- package/dist/ImageWithFallback.js.map +1 -1
- package/dist/InlineInput.js +16 -522
- package/dist/InlineInput.js.map +1 -1
- package/dist/IntegrationCard.js +30 -229
- package/dist/IntegrationCard.js.map +1 -1
- package/dist/IntegrationDisconnectAlert.js +4 -46
- package/dist/IntegrationDisconnectAlert.js.map +1 -1
- package/dist/IntegrationWalkthroughModal.js +7 -7
- package/dist/IntegrationWalkthroughModal.js.map +1 -1
- package/dist/IpRestriction.js +16 -196
- package/dist/IpRestriction.js.map +1 -1
- package/dist/KeyboardShortcuts.js +24 -119
- package/dist/KeyboardShortcuts.js.map +1 -1
- package/dist/LoginPage.js +22 -445
- package/dist/LoginPage.js.map +1 -1
- package/dist/MenuBar.js +29 -1293
- package/dist/MenuBar.js.map +1 -1
- package/dist/Metadata.js +27 -82
- package/dist/Metadata.js.map +1 -1
- package/dist/MoreDropdown.js +15 -97
- package/dist/MoreDropdown.js.map +1 -1
- package/dist/NavigationHeader.js +39 -709
- package/dist/NavigationHeader.js.map +1 -1
- package/dist/NeetoWidget.js +15 -234
- package/dist/NeetoWidget.js.map +1 -1
- package/dist/Onboarding.js +16 -1212
- package/dist/Onboarding.js.map +1 -1
- package/dist/PageLoader.js +5 -48
- package/dist/PageLoader.js.map +1 -1
- package/dist/PhoneNumber.js +22 -156
- package/dist/PhoneNumber.js.map +1 -1
- package/dist/ProductEmbed.js +83 -172
- package/dist/ProductEmbed.js.map +1 -1
- package/dist/PublishBlock.js +15 -58
- package/dist/PublishBlock.js.map +1 -1
- package/dist/PublishYourItem.js +9 -1190
- package/dist/PublishYourItem.js.map +1 -1
- package/dist/Rename.js +30 -330
- package/dist/Rename.js.map +1 -1
- package/dist/ResponsiveDevicePicker.js +7 -143
- package/dist/ResponsiveDevicePicker.js.map +1 -1
- package/dist/Schedule.js +62 -331
- package/dist/Schedule.js.map +1 -1
- package/dist/Scrollable.js +6 -89
- package/dist/Scrollable.js.map +1 -1
- package/dist/Search.js +7 -143
- package/dist/Search.js.map +1 -1
- package/dist/Security.js +37 -1573
- package/dist/Security.js.map +1 -1
- package/dist/SendToFields.js +41 -124
- package/dist/SendToFields.js.map +1 -1
- package/dist/Settings.js +32 -488
- package/dist/Settings.js.map +1 -1
- package/dist/ShareViaEmail.js +51 -1746
- package/dist/ShareViaEmail.js.map +1 -1
- package/dist/ShareViaLink.js +60 -314
- package/dist/ShareViaLink.js.map +1 -1
- package/dist/Sidebar.js +143 -406
- package/dist/Sidebar.js.map +1 -1
- package/dist/SubHeader.js +27 -105
- package/dist/SubHeader.js.map +1 -1
- package/dist/SuffixedInput.js +15 -120
- package/dist/SuffixedInput.js.map +1 -1
- package/dist/TableWrapper.js +7 -8
- package/dist/TableWrapper.js.map +1 -1
- package/dist/Taxonomy.js +74 -1780
- package/dist/Taxonomy.js.map +1 -1
- package/dist/ThemeSidebar.js +144 -767
- package/dist/ThemeSidebar.js.map +1 -1
- package/dist/TimeFormat.js +8 -44
- package/dist/TimeFormat.js.map +1 -1
- package/dist/TimezoneMismatchModal.js +11 -65
- package/dist/TimezoneMismatchModal.js.map +1 -1
- package/dist/ToggleFeatureCard.js +20 -157
- package/dist/ToggleFeatureCard.js.map +1 -1
- package/dist/cjs/Breadcrumbs.js +2 -3
- package/dist/cjs/Breadcrumbs.js.map +1 -1
- package/dist/cjs/BrowserSupport.js +8 -105
- package/dist/cjs/BrowserSupport.js.map +1 -1
- package/dist/cjs/Builder.js +16 -270
- package/dist/cjs/Builder.js.map +1 -1
- package/dist/cjs/CalendarView.js +23 -308
- package/dist/cjs/CalendarView.js.map +1 -1
- package/dist/cjs/Codeblock.js +12 -206
- package/dist/cjs/Codeblock.js.map +1 -1
- package/dist/cjs/Columns-069368e2.js +216 -0
- package/dist/cjs/Columns-069368e2.js.map +1 -0
- package/dist/cjs/Columns.js +23 -350
- package/dist/cjs/Columns.js.map +1 -1
- package/dist/cjs/Container.js +4 -1186
- package/dist/cjs/Container.js.map +1 -1
- package/dist/cjs/CopyToClipboardButton.js +10 -147
- package/dist/cjs/CopyToClipboardButton.js.map +1 -1
- package/dist/cjs/Currency.js +4 -46
- package/dist/cjs/Currency.js.map +1 -1
- package/dist/cjs/CustomDomain.js +23 -651
- package/dist/cjs/CustomDomain.js.map +1 -1
- package/dist/cjs/CustomDomainDashboard.js +44 -2227
- package/dist/cjs/CustomDomainDashboard.js.map +1 -1
- package/dist/cjs/DateFormat.js +3 -17
- package/dist/cjs/DateFormat.js.map +1 -1
- package/dist/cjs/DateRangeFilter.js +2 -56
- package/dist/cjs/DateRangeFilter.js.map +1 -1
- package/dist/cjs/DocumentEditor.js +14 -123
- package/dist/cjs/DocumentEditor.js.map +1 -1
- package/dist/cjs/DynamicVariables.js +8 -91
- package/dist/cjs/DynamicVariables.js.map +1 -1
- package/dist/cjs/EmailForm.js +23 -1689
- package/dist/cjs/EmailForm.js.map +1 -1
- package/dist/cjs/EmailPreview.js +8 -1189
- package/dist/cjs/EmailPreview.js.map +1 -1
- package/dist/cjs/EmojiPicker.js +4 -72
- package/dist/cjs/EmojiPicker.js.map +1 -1
- package/dist/cjs/EmojiReactions.js +5 -59
- package/dist/cjs/EmojiReactions.js.map +1 -1
- package/dist/cjs/ErrorPage.js +2 -16
- package/dist/cjs/ErrorPage.js.map +1 -1
- package/dist/cjs/FloatingActionMenu.js +49 -1377
- package/dist/cjs/FloatingActionMenu.js.map +1 -1
- package/dist/cjs/Header.js +19 -67
- package/dist/cjs/Header.js.map +1 -1
- package/dist/cjs/HelpPopover.js +11 -93
- package/dist/cjs/HelpPopover.js.map +1 -1
- package/dist/cjs/IconPicker.js +10 -107
- package/dist/cjs/IconPicker.js.map +1 -1
- package/dist/cjs/ImageWithFallback.js +11 -147
- package/dist/cjs/ImageWithFallback.js.map +1 -1
- package/dist/cjs/InlineInput.js +20 -526
- package/dist/cjs/InlineInput.js.map +1 -1
- package/dist/cjs/IntegrationCard.js +8 -207
- package/dist/cjs/IntegrationCard.js.map +1 -1
- package/dist/cjs/IntegrationDisconnectAlert.js +4 -46
- package/dist/cjs/IntegrationDisconnectAlert.js.map +1 -1
- package/dist/cjs/IpRestriction.js +7 -187
- package/dist/cjs/IpRestriction.js.map +1 -1
- package/dist/cjs/KeyboardShortcuts.js +9 -104
- package/dist/cjs/KeyboardShortcuts.js.map +1 -1
- package/dist/cjs/LoginPage.js +12 -435
- package/dist/cjs/LoginPage.js.map +1 -1
- package/dist/cjs/MenuBar.js +24 -1288
- package/dist/cjs/MenuBar.js.map +1 -1
- package/dist/cjs/Metadata.js +6 -61
- package/dist/cjs/Metadata.js.map +1 -1
- package/dist/cjs/MoreDropdown.js +14 -96
- package/dist/cjs/MoreDropdown.js.map +1 -1
- package/dist/cjs/NavigationHeader.js +21 -695
- package/dist/cjs/NavigationHeader.js.map +1 -1
- package/dist/cjs/NeetoWidget.js +18 -238
- package/dist/cjs/NeetoWidget.js.map +1 -1
- package/dist/cjs/Onboarding.js +15 -1211
- package/dist/cjs/Onboarding.js.map +1 -1
- package/dist/cjs/PageLoader.js +8 -51
- package/dist/cjs/PageLoader.js.map +1 -1
- package/dist/cjs/PhoneNumber.js +22 -156
- package/dist/cjs/PhoneNumber.js.map +1 -1
- package/dist/cjs/ProductEmbed.js +28 -118
- package/dist/cjs/ProductEmbed.js.map +1 -1
- package/dist/cjs/PublishBlock.js +13 -56
- package/dist/cjs/PublishBlock.js.map +1 -1
- package/dist/cjs/PublishYourItem.js +3 -1184
- package/dist/cjs/PublishYourItem.js.map +1 -1
- package/dist/cjs/Rename.js +23 -323
- package/dist/cjs/Rename.js.map +1 -1
- package/dist/cjs/ResponsiveDevicePicker.js +8 -144
- package/dist/cjs/ResponsiveDevicePicker.js.map +1 -1
- package/dist/cjs/Schedule.js +18 -287
- package/dist/cjs/Schedule.js.map +1 -1
- package/dist/cjs/Scrollable.js +8 -91
- package/dist/cjs/Scrollable.js.map +1 -1
- package/dist/cjs/Search.js +8 -144
- package/dist/cjs/Search.js.map +1 -1
- package/dist/cjs/Security.js +27 -1565
- package/dist/cjs/Security.js.map +1 -1
- package/dist/cjs/SendToFields.js +12 -95
- package/dist/cjs/SendToFields.js.map +1 -1
- package/dist/cjs/Settings.js +18 -476
- package/dist/cjs/Settings.js.map +1 -1
- package/dist/cjs/ShareViaEmail.js +20 -1716
- package/dist/cjs/ShareViaEmail.js.map +1 -1
- package/dist/cjs/ShareViaLink.js +13 -268
- package/dist/cjs/ShareViaLink.js.map +1 -1
- package/dist/cjs/Sidebar.js +52 -316
- package/dist/cjs/Sidebar.js.map +1 -1
- package/dist/cjs/SubHeader.js +18 -97
- package/dist/cjs/SubHeader.js.map +1 -1
- package/dist/cjs/SuffixedInput.js +14 -120
- package/dist/cjs/SuffixedInput.js.map +1 -1
- package/dist/cjs/TableWrapper.js +6 -7
- package/dist/cjs/TableWrapper.js.map +1 -1
- package/dist/cjs/Taxonomy.js +36 -1746
- package/dist/cjs/Taxonomy.js.map +1 -1
- package/dist/cjs/ThemeSidebar.js +34 -657
- package/dist/cjs/ThemeSidebar.js.map +1 -1
- package/dist/cjs/TimeFormat.js +8 -49
- package/dist/cjs/TimeFormat.js.map +1 -1
- package/dist/cjs/TimezoneMismatchModal.js +2 -56
- package/dist/cjs/TimezoneMismatchModal.js.map +1 -1
- package/dist/cjs/ToggleFeatureCard.js +15 -152
- package/dist/cjs/ToggleFeatureCard.js.map +1 -1
- package/dist/cjs/defineProperty-886ed289.js +47 -0
- package/dist/cjs/defineProperty-886ed289.js.map +1 -0
- package/dist/cjs/extends-1b35a664.js +19 -0
- package/dist/cjs/extends-1b35a664.js.map +1 -0
- package/dist/cjs/index-248c4f4c.js +1186 -0
- package/dist/cjs/index-248c4f4c.js.map +1 -0
- package/dist/cjs/index-73f9c602.js +454 -0
- package/dist/cjs/index-73f9c602.js.map +1 -0
- package/dist/cjs/index-c55ad2bc.js +375 -0
- package/dist/cjs/index-c55ad2bc.js.map +1 -0
- package/dist/cjs/inject-css-80a5faa3.js +6 -0
- package/dist/cjs/inject-css-80a5faa3.js.map +1 -0
- package/dist/cjs/objectWithoutProperties-2fed2d7d.js +33 -0
- package/dist/cjs/objectWithoutProperties-2fed2d7d.js.map +1 -0
- package/dist/cjs/slicedToArray-f320d9e7.js +61 -0
- package/dist/cjs/slicedToArray-f320d9e7.js.map +1 -0
- package/dist/cjs/toConsumableArray-9abb3858.js +22 -0
- package/dist/cjs/toConsumableArray-9abb3858.js.map +1 -0
- package/dist/defineProperty-549061a7.js +43 -0
- package/dist/defineProperty-549061a7.js.map +1 -0
- package/dist/extends-093996c9.js +17 -0
- package/dist/extends-093996c9.js.map +1 -0
- package/dist/index-372a8b29.js +422 -0
- package/dist/index-372a8b29.js.map +1 -0
- package/dist/index-9720867c.js +372 -0
- package/dist/index-9720867c.js.map +1 -0
- package/dist/index-e5588516.js +1184 -0
- package/dist/index-e5588516.js.map +1 -0
- package/dist/inject-css-c86de496.js +4 -0
- package/dist/inject-css-c86de496.js.map +1 -0
- package/dist/objectWithoutProperties-a0edb288.js +31 -0
- package/dist/objectWithoutProperties-a0edb288.js.map +1 -0
- package/dist/slicedToArray-b4278ecd.js +57 -0
- package/dist/slicedToArray-b4278ecd.js.map +1 -0
- package/dist/toConsumableArray-1cc38429.js +20 -0
- package/dist/toConsumableArray-1cc38429.js.map +1 -0
- package/package.json +1 -3
|
@@ -1,1741 +1,52 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var slicedToArray = require('./slicedToArray-f320d9e7.js');
|
|
3
4
|
var React = require('react');
|
|
4
5
|
var neetoCist = require('@bigbinary/neeto-cist');
|
|
5
6
|
var useDebounce = require('@bigbinary/neeto-commons-frontend/react-utils/useDebounce');
|
|
6
7
|
var neetoui = require('@bigbinary/neetoui');
|
|
7
8
|
var reactI18next = require('react-i18next');
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
9
|
+
var Container = require('./Container.js');
|
|
10
|
+
var PageLoader = require('./PageLoader.js');
|
|
11
|
+
var SubHeader = require('./SubHeader.js');
|
|
12
|
+
var index = require('./index-73f9c602.js');
|
|
13
|
+
var _extends = require('./extends-1b35a664.js');
|
|
13
14
|
var constants = require('@bigbinary/neeto-commons-frontend/constants');
|
|
14
15
|
var withT = require('@bigbinary/neeto-commons-frontend/react-utils/withT');
|
|
15
16
|
var general = require('@bigbinary/neeto-commons-frontend/utils/general');
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
17
|
+
var Header$2 = require('./Header.js');
|
|
18
|
+
require('classnames');
|
|
19
|
+
require('./index-248c4f4c.js');
|
|
20
|
+
require('./inject-css-80a5faa3.js');
|
|
21
|
+
require('./objectWithoutProperties-2fed2d7d.js');
|
|
22
|
+
require('ramda');
|
|
23
|
+
require('./defineProperty-886ed289.js');
|
|
24
|
+
require('@bigbinary/neeto-icons');
|
|
25
|
+
require('./Columns-069368e2.js');
|
|
26
|
+
require('i18next');
|
|
27
|
+
require('zustand');
|
|
28
|
+
require('zustand/middleware');
|
|
29
|
+
require('@bigbinary/neeto-filters-frontend');
|
|
30
|
+
require('formik');
|
|
31
|
+
require('@bigbinary/neetoui/formik');
|
|
32
|
+
require('./CopyToClipboardButton.js');
|
|
33
|
+
require('./MoreDropdown.js');
|
|
34
|
+
require('yup');
|
|
35
|
+
require('@bigbinary/neeto-commons-frontend/react-utils/useMutationWithInvalidation');
|
|
36
|
+
require('react-query');
|
|
37
|
+
require('axios');
|
|
38
|
+
require('./Breadcrumbs.js');
|
|
39
|
+
require('react-router-dom');
|
|
40
|
+
require('./Search.js');
|
|
41
|
+
require('@bigbinary/neeto-commons-frontend/react-utils/useFuncDebounce');
|
|
42
|
+
require('@bigbinary/neeto-commons-frontend/react-utils/useQueryParams');
|
|
43
|
+
require('@bigbinary/neeto-commons-frontend/react-utils/useUpdateEffect');
|
|
26
44
|
|
|
27
45
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
28
46
|
|
|
29
|
-
function _interopNamespace(e) {
|
|
30
|
-
if (e && e.__esModule) return e;
|
|
31
|
-
var n = Object.create(null);
|
|
32
|
-
if (e) {
|
|
33
|
-
Object.keys(e).forEach(function (k) {
|
|
34
|
-
if (k !== 'default') {
|
|
35
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
36
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
37
|
-
enumerable: true,
|
|
38
|
-
get: function () { return e[k]; }
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
n["default"] = e;
|
|
44
|
-
return Object.freeze(n);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
47
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
48
|
-
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
49
48
|
var useDebounce__default = /*#__PURE__*/_interopDefaultLegacy(useDebounce);
|
|
50
|
-
var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
|
|
51
|
-
var ManageColumns__default = /*#__PURE__*/_interopDefaultLegacy(ManageColumns);
|
|
52
49
|
var withT__default = /*#__PURE__*/_interopDefaultLegacy(withT);
|
|
53
|
-
var Breadcrumbs__default = /*#__PURE__*/_interopDefaultLegacy(Breadcrumbs);
|
|
54
|
-
var Search__default = /*#__PURE__*/_interopDefaultLegacy(Search);
|
|
55
|
-
var CopyToClipboardButton__default = /*#__PURE__*/_interopDefaultLegacy(CopyToClipboardButton);
|
|
56
|
-
var Yup__namespace = /*#__PURE__*/_interopNamespace(Yup);
|
|
57
|
-
var useMutationWithInvalidation__default = /*#__PURE__*/_interopDefaultLegacy(useMutationWithInvalidation);
|
|
58
|
-
var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios);
|
|
59
|
-
|
|
60
|
-
function _arrayWithHoles(arr) {
|
|
61
|
-
if (Array.isArray(arr)) return arr;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
function _iterableToArrayLimit(r, l) {
|
|
65
|
-
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
66
|
-
if (null != t) {
|
|
67
|
-
var e,
|
|
68
|
-
n,
|
|
69
|
-
i,
|
|
70
|
-
u,
|
|
71
|
-
a = [],
|
|
72
|
-
f = !0,
|
|
73
|
-
o = !1;
|
|
74
|
-
try {
|
|
75
|
-
if (i = (t = t.call(r)).next, 0 === l) {
|
|
76
|
-
if (Object(t) !== t) return;
|
|
77
|
-
f = !1;
|
|
78
|
-
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
79
|
-
} catch (r) {
|
|
80
|
-
o = !0, n = r;
|
|
81
|
-
} finally {
|
|
82
|
-
try {
|
|
83
|
-
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
|
|
84
|
-
} finally {
|
|
85
|
-
if (o) throw n;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
return a;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
function _arrayLikeToArray(arr, len) {
|
|
93
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
94
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
95
|
-
return arr2;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
99
|
-
if (!o) return;
|
|
100
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
101
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
102
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
103
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
104
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
function _nonIterableRest() {
|
|
108
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
function _slicedToArray(arr, i) {
|
|
112
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
var propTypes = {exports: {}};
|
|
116
|
-
|
|
117
|
-
var reactIs = {exports: {}};
|
|
118
|
-
|
|
119
|
-
var reactIs_production_min = {};
|
|
120
|
-
|
|
121
|
-
/** @license React v16.13.1
|
|
122
|
-
* react-is.production.min.js
|
|
123
|
-
*
|
|
124
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
125
|
-
*
|
|
126
|
-
* This source code is licensed under the MIT license found in the
|
|
127
|
-
* LICENSE file in the root directory of this source tree.
|
|
128
|
-
*/
|
|
129
|
-
|
|
130
|
-
var hasRequiredReactIs_production_min;
|
|
131
|
-
|
|
132
|
-
function requireReactIs_production_min () {
|
|
133
|
-
if (hasRequiredReactIs_production_min) return reactIs_production_min;
|
|
134
|
-
hasRequiredReactIs_production_min = 1;
|
|
135
|
-
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?
|
|
136
|
-
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;
|
|
137
|
-
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;
|
|
138
|
-
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};
|
|
139
|
-
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};
|
|
140
|
-
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;
|
|
141
|
-
return reactIs_production_min;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
var reactIs_development = {};
|
|
145
|
-
|
|
146
|
-
/** @license React v16.13.1
|
|
147
|
-
* react-is.development.js
|
|
148
|
-
*
|
|
149
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
150
|
-
*
|
|
151
|
-
* This source code is licensed under the MIT license found in the
|
|
152
|
-
* LICENSE file in the root directory of this source tree.
|
|
153
|
-
*/
|
|
154
|
-
|
|
155
|
-
var hasRequiredReactIs_development;
|
|
156
|
-
|
|
157
|
-
function requireReactIs_development () {
|
|
158
|
-
if (hasRequiredReactIs_development) return reactIs_development;
|
|
159
|
-
hasRequiredReactIs_development = 1;
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
if (process.env.NODE_ENV !== "production") {
|
|
164
|
-
(function() {
|
|
165
|
-
|
|
166
|
-
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
|
|
167
|
-
// nor polyfill, then a plain number is used for performance.
|
|
168
|
-
var hasSymbol = typeof Symbol === 'function' && Symbol.for;
|
|
169
|
-
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
|
|
170
|
-
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
|
|
171
|
-
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
|
|
172
|
-
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
|
|
173
|
-
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
|
|
174
|
-
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
|
|
175
|
-
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
|
|
176
|
-
// (unstable) APIs that have been removed. Can we remove the symbols?
|
|
177
|
-
|
|
178
|
-
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
|
|
179
|
-
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
|
|
180
|
-
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
|
|
181
|
-
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
|
|
182
|
-
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
|
|
183
|
-
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
|
|
184
|
-
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
|
|
185
|
-
var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
|
|
186
|
-
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
|
|
187
|
-
var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
|
|
188
|
-
var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
|
|
189
|
-
|
|
190
|
-
function isValidElementType(type) {
|
|
191
|
-
return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
192
|
-
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);
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
function typeOf(object) {
|
|
196
|
-
if (typeof object === 'object' && object !== null) {
|
|
197
|
-
var $$typeof = object.$$typeof;
|
|
198
|
-
|
|
199
|
-
switch ($$typeof) {
|
|
200
|
-
case REACT_ELEMENT_TYPE:
|
|
201
|
-
var type = object.type;
|
|
202
|
-
|
|
203
|
-
switch (type) {
|
|
204
|
-
case REACT_ASYNC_MODE_TYPE:
|
|
205
|
-
case REACT_CONCURRENT_MODE_TYPE:
|
|
206
|
-
case REACT_FRAGMENT_TYPE:
|
|
207
|
-
case REACT_PROFILER_TYPE:
|
|
208
|
-
case REACT_STRICT_MODE_TYPE:
|
|
209
|
-
case REACT_SUSPENSE_TYPE:
|
|
210
|
-
return type;
|
|
211
|
-
|
|
212
|
-
default:
|
|
213
|
-
var $$typeofType = type && type.$$typeof;
|
|
214
|
-
|
|
215
|
-
switch ($$typeofType) {
|
|
216
|
-
case REACT_CONTEXT_TYPE:
|
|
217
|
-
case REACT_FORWARD_REF_TYPE:
|
|
218
|
-
case REACT_LAZY_TYPE:
|
|
219
|
-
case REACT_MEMO_TYPE:
|
|
220
|
-
case REACT_PROVIDER_TYPE:
|
|
221
|
-
return $$typeofType;
|
|
222
|
-
|
|
223
|
-
default:
|
|
224
|
-
return $$typeof;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
case REACT_PORTAL_TYPE:
|
|
230
|
-
return $$typeof;
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
return undefined;
|
|
235
|
-
} // AsyncMode is deprecated along with isAsyncMode
|
|
236
|
-
|
|
237
|
-
var AsyncMode = REACT_ASYNC_MODE_TYPE;
|
|
238
|
-
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
|
|
239
|
-
var ContextConsumer = REACT_CONTEXT_TYPE;
|
|
240
|
-
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
241
|
-
var Element = REACT_ELEMENT_TYPE;
|
|
242
|
-
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
243
|
-
var Fragment = REACT_FRAGMENT_TYPE;
|
|
244
|
-
var Lazy = REACT_LAZY_TYPE;
|
|
245
|
-
var Memo = REACT_MEMO_TYPE;
|
|
246
|
-
var Portal = REACT_PORTAL_TYPE;
|
|
247
|
-
var Profiler = REACT_PROFILER_TYPE;
|
|
248
|
-
var StrictMode = REACT_STRICT_MODE_TYPE;
|
|
249
|
-
var Suspense = REACT_SUSPENSE_TYPE;
|
|
250
|
-
var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
|
|
251
|
-
|
|
252
|
-
function isAsyncMode(object) {
|
|
253
|
-
{
|
|
254
|
-
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
|
255
|
-
hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
|
|
256
|
-
|
|
257
|
-
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.');
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
|
|
262
|
-
}
|
|
263
|
-
function isConcurrentMode(object) {
|
|
264
|
-
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
|
|
265
|
-
}
|
|
266
|
-
function isContextConsumer(object) {
|
|
267
|
-
return typeOf(object) === REACT_CONTEXT_TYPE;
|
|
268
|
-
}
|
|
269
|
-
function isContextProvider(object) {
|
|
270
|
-
return typeOf(object) === REACT_PROVIDER_TYPE;
|
|
271
|
-
}
|
|
272
|
-
function isElement(object) {
|
|
273
|
-
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
274
|
-
}
|
|
275
|
-
function isForwardRef(object) {
|
|
276
|
-
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
|
277
|
-
}
|
|
278
|
-
function isFragment(object) {
|
|
279
|
-
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
|
280
|
-
}
|
|
281
|
-
function isLazy(object) {
|
|
282
|
-
return typeOf(object) === REACT_LAZY_TYPE;
|
|
283
|
-
}
|
|
284
|
-
function isMemo(object) {
|
|
285
|
-
return typeOf(object) === REACT_MEMO_TYPE;
|
|
286
|
-
}
|
|
287
|
-
function isPortal(object) {
|
|
288
|
-
return typeOf(object) === REACT_PORTAL_TYPE;
|
|
289
|
-
}
|
|
290
|
-
function isProfiler(object) {
|
|
291
|
-
return typeOf(object) === REACT_PROFILER_TYPE;
|
|
292
|
-
}
|
|
293
|
-
function isStrictMode(object) {
|
|
294
|
-
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
|
295
|
-
}
|
|
296
|
-
function isSuspense(object) {
|
|
297
|
-
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
reactIs_development.AsyncMode = AsyncMode;
|
|
301
|
-
reactIs_development.ConcurrentMode = ConcurrentMode;
|
|
302
|
-
reactIs_development.ContextConsumer = ContextConsumer;
|
|
303
|
-
reactIs_development.ContextProvider = ContextProvider;
|
|
304
|
-
reactIs_development.Element = Element;
|
|
305
|
-
reactIs_development.ForwardRef = ForwardRef;
|
|
306
|
-
reactIs_development.Fragment = Fragment;
|
|
307
|
-
reactIs_development.Lazy = Lazy;
|
|
308
|
-
reactIs_development.Memo = Memo;
|
|
309
|
-
reactIs_development.Portal = Portal;
|
|
310
|
-
reactIs_development.Profiler = Profiler;
|
|
311
|
-
reactIs_development.StrictMode = StrictMode;
|
|
312
|
-
reactIs_development.Suspense = Suspense;
|
|
313
|
-
reactIs_development.isAsyncMode = isAsyncMode;
|
|
314
|
-
reactIs_development.isConcurrentMode = isConcurrentMode;
|
|
315
|
-
reactIs_development.isContextConsumer = isContextConsumer;
|
|
316
|
-
reactIs_development.isContextProvider = isContextProvider;
|
|
317
|
-
reactIs_development.isElement = isElement;
|
|
318
|
-
reactIs_development.isForwardRef = isForwardRef;
|
|
319
|
-
reactIs_development.isFragment = isFragment;
|
|
320
|
-
reactIs_development.isLazy = isLazy;
|
|
321
|
-
reactIs_development.isMemo = isMemo;
|
|
322
|
-
reactIs_development.isPortal = isPortal;
|
|
323
|
-
reactIs_development.isProfiler = isProfiler;
|
|
324
|
-
reactIs_development.isStrictMode = isStrictMode;
|
|
325
|
-
reactIs_development.isSuspense = isSuspense;
|
|
326
|
-
reactIs_development.isValidElementType = isValidElementType;
|
|
327
|
-
reactIs_development.typeOf = typeOf;
|
|
328
|
-
})();
|
|
329
|
-
}
|
|
330
|
-
return reactIs_development;
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
var hasRequiredReactIs;
|
|
334
|
-
|
|
335
|
-
function requireReactIs () {
|
|
336
|
-
if (hasRequiredReactIs) return reactIs.exports;
|
|
337
|
-
hasRequiredReactIs = 1;
|
|
338
|
-
(function (module) {
|
|
339
|
-
|
|
340
|
-
if (process.env.NODE_ENV === 'production') {
|
|
341
|
-
module.exports = requireReactIs_production_min();
|
|
342
|
-
} else {
|
|
343
|
-
module.exports = requireReactIs_development();
|
|
344
|
-
}
|
|
345
|
-
} (reactIs));
|
|
346
|
-
return reactIs.exports;
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
/*
|
|
350
|
-
object-assign
|
|
351
|
-
(c) Sindre Sorhus
|
|
352
|
-
@license MIT
|
|
353
|
-
*/
|
|
354
|
-
|
|
355
|
-
var objectAssign;
|
|
356
|
-
var hasRequiredObjectAssign;
|
|
357
|
-
|
|
358
|
-
function requireObjectAssign () {
|
|
359
|
-
if (hasRequiredObjectAssign) return objectAssign;
|
|
360
|
-
hasRequiredObjectAssign = 1;
|
|
361
|
-
/* eslint-disable no-unused-vars */
|
|
362
|
-
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
363
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
364
|
-
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
365
|
-
|
|
366
|
-
function toObject(val) {
|
|
367
|
-
if (val === null || val === undefined) {
|
|
368
|
-
throw new TypeError('Object.assign cannot be called with null or undefined');
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
return Object(val);
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
function shouldUseNative() {
|
|
375
|
-
try {
|
|
376
|
-
if (!Object.assign) {
|
|
377
|
-
return false;
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
// Detect buggy property enumeration order in older V8 versions.
|
|
381
|
-
|
|
382
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=4118
|
|
383
|
-
var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
|
|
384
|
-
test1[5] = 'de';
|
|
385
|
-
if (Object.getOwnPropertyNames(test1)[0] === '5') {
|
|
386
|
-
return false;
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
390
|
-
var test2 = {};
|
|
391
|
-
for (var i = 0; i < 10; i++) {
|
|
392
|
-
test2['_' + String.fromCharCode(i)] = i;
|
|
393
|
-
}
|
|
394
|
-
var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
|
|
395
|
-
return test2[n];
|
|
396
|
-
});
|
|
397
|
-
if (order2.join('') !== '0123456789') {
|
|
398
|
-
return false;
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
402
|
-
var test3 = {};
|
|
403
|
-
'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
|
|
404
|
-
test3[letter] = letter;
|
|
405
|
-
});
|
|
406
|
-
if (Object.keys(Object.assign({}, test3)).join('') !==
|
|
407
|
-
'abcdefghijklmnopqrst') {
|
|
408
|
-
return false;
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
return true;
|
|
412
|
-
} catch (err) {
|
|
413
|
-
// We don't expect any of the above to throw, but better to be safe.
|
|
414
|
-
return false;
|
|
415
|
-
}
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
objectAssign = shouldUseNative() ? Object.assign : function (target, source) {
|
|
419
|
-
var from;
|
|
420
|
-
var to = toObject(target);
|
|
421
|
-
var symbols;
|
|
422
|
-
|
|
423
|
-
for (var s = 1; s < arguments.length; s++) {
|
|
424
|
-
from = Object(arguments[s]);
|
|
425
|
-
|
|
426
|
-
for (var key in from) {
|
|
427
|
-
if (hasOwnProperty.call(from, key)) {
|
|
428
|
-
to[key] = from[key];
|
|
429
|
-
}
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
if (getOwnPropertySymbols) {
|
|
433
|
-
symbols = getOwnPropertySymbols(from);
|
|
434
|
-
for (var i = 0; i < symbols.length; i++) {
|
|
435
|
-
if (propIsEnumerable.call(from, symbols[i])) {
|
|
436
|
-
to[symbols[i]] = from[symbols[i]];
|
|
437
|
-
}
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
return to;
|
|
443
|
-
};
|
|
444
|
-
return objectAssign;
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
/**
|
|
448
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
449
|
-
*
|
|
450
|
-
* This source code is licensed under the MIT license found in the
|
|
451
|
-
* LICENSE file in the root directory of this source tree.
|
|
452
|
-
*/
|
|
453
|
-
|
|
454
|
-
var ReactPropTypesSecret_1;
|
|
455
|
-
var hasRequiredReactPropTypesSecret;
|
|
456
|
-
|
|
457
|
-
function requireReactPropTypesSecret () {
|
|
458
|
-
if (hasRequiredReactPropTypesSecret) return ReactPropTypesSecret_1;
|
|
459
|
-
hasRequiredReactPropTypesSecret = 1;
|
|
460
|
-
|
|
461
|
-
var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
|
462
|
-
|
|
463
|
-
ReactPropTypesSecret_1 = ReactPropTypesSecret;
|
|
464
|
-
return ReactPropTypesSecret_1;
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
var has;
|
|
468
|
-
var hasRequiredHas;
|
|
469
|
-
|
|
470
|
-
function requireHas () {
|
|
471
|
-
if (hasRequiredHas) return has;
|
|
472
|
-
hasRequiredHas = 1;
|
|
473
|
-
has = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
474
|
-
return has;
|
|
475
|
-
}
|
|
476
|
-
|
|
477
|
-
/**
|
|
478
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
479
|
-
*
|
|
480
|
-
* This source code is licensed under the MIT license found in the
|
|
481
|
-
* LICENSE file in the root directory of this source tree.
|
|
482
|
-
*/
|
|
483
|
-
|
|
484
|
-
var checkPropTypes_1;
|
|
485
|
-
var hasRequiredCheckPropTypes;
|
|
486
|
-
|
|
487
|
-
function requireCheckPropTypes () {
|
|
488
|
-
if (hasRequiredCheckPropTypes) return checkPropTypes_1;
|
|
489
|
-
hasRequiredCheckPropTypes = 1;
|
|
490
|
-
|
|
491
|
-
var printWarning = function() {};
|
|
492
|
-
|
|
493
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
494
|
-
var ReactPropTypesSecret = requireReactPropTypesSecret();
|
|
495
|
-
var loggedTypeFailures = {};
|
|
496
|
-
var has = requireHas();
|
|
497
|
-
|
|
498
|
-
printWarning = function(text) {
|
|
499
|
-
var message = 'Warning: ' + text;
|
|
500
|
-
if (typeof console !== 'undefined') {
|
|
501
|
-
console.error(message);
|
|
502
|
-
}
|
|
503
|
-
try {
|
|
504
|
-
// --- Welcome to debugging React ---
|
|
505
|
-
// This error was thrown as a convenience so that you can use this stack
|
|
506
|
-
// to find the callsite that caused this warning to fire.
|
|
507
|
-
throw new Error(message);
|
|
508
|
-
} catch (x) { /**/ }
|
|
509
|
-
};
|
|
510
|
-
}
|
|
511
|
-
|
|
512
|
-
/**
|
|
513
|
-
* Assert that the values match with the type specs.
|
|
514
|
-
* Error messages are memorized and will only be shown once.
|
|
515
|
-
*
|
|
516
|
-
* @param {object} typeSpecs Map of name to a ReactPropType
|
|
517
|
-
* @param {object} values Runtime values that need to be type-checked
|
|
518
|
-
* @param {string} location e.g. "prop", "context", "child context"
|
|
519
|
-
* @param {string} componentName Name of the component for error messages.
|
|
520
|
-
* @param {?Function} getStack Returns the component stack.
|
|
521
|
-
* @private
|
|
522
|
-
*/
|
|
523
|
-
function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
|
|
524
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
525
|
-
for (var typeSpecName in typeSpecs) {
|
|
526
|
-
if (has(typeSpecs, typeSpecName)) {
|
|
527
|
-
var error;
|
|
528
|
-
// Prop type validation may throw. In case they do, we don't want to
|
|
529
|
-
// fail the render phase where it didn't fail before. So we log it.
|
|
530
|
-
// After these have been cleaned up, we'll let them throw.
|
|
531
|
-
try {
|
|
532
|
-
// This is intentionally an invariant that gets caught. It's the same
|
|
533
|
-
// behavior as without this statement except with a better message.
|
|
534
|
-
if (typeof typeSpecs[typeSpecName] !== 'function') {
|
|
535
|
-
var err = Error(
|
|
536
|
-
(componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
|
|
537
|
-
'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +
|
|
538
|
-
'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
|
|
539
|
-
);
|
|
540
|
-
err.name = 'Invariant Violation';
|
|
541
|
-
throw err;
|
|
542
|
-
}
|
|
543
|
-
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
|
|
544
|
-
} catch (ex) {
|
|
545
|
-
error = ex;
|
|
546
|
-
}
|
|
547
|
-
if (error && !(error instanceof Error)) {
|
|
548
|
-
printWarning(
|
|
549
|
-
(componentName || 'React class') + ': type specification of ' +
|
|
550
|
-
location + ' `' + typeSpecName + '` is invalid; the type checker ' +
|
|
551
|
-
'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
|
|
552
|
-
'You may have forgotten to pass an argument to the type checker ' +
|
|
553
|
-
'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
|
|
554
|
-
'shape all require an argument).'
|
|
555
|
-
);
|
|
556
|
-
}
|
|
557
|
-
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
|
558
|
-
// Only monitor this failure once because there tends to be a lot of the
|
|
559
|
-
// same error.
|
|
560
|
-
loggedTypeFailures[error.message] = true;
|
|
561
|
-
|
|
562
|
-
var stack = getStack ? getStack() : '';
|
|
563
|
-
|
|
564
|
-
printWarning(
|
|
565
|
-
'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
|
|
566
|
-
);
|
|
567
|
-
}
|
|
568
|
-
}
|
|
569
|
-
}
|
|
570
|
-
}
|
|
571
|
-
}
|
|
572
|
-
|
|
573
|
-
/**
|
|
574
|
-
* Resets warning cache when testing.
|
|
575
|
-
*
|
|
576
|
-
* @private
|
|
577
|
-
*/
|
|
578
|
-
checkPropTypes.resetWarningCache = function() {
|
|
579
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
580
|
-
loggedTypeFailures = {};
|
|
581
|
-
}
|
|
582
|
-
};
|
|
583
|
-
|
|
584
|
-
checkPropTypes_1 = checkPropTypes;
|
|
585
|
-
return checkPropTypes_1;
|
|
586
|
-
}
|
|
587
|
-
|
|
588
|
-
/**
|
|
589
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
590
|
-
*
|
|
591
|
-
* This source code is licensed under the MIT license found in the
|
|
592
|
-
* LICENSE file in the root directory of this source tree.
|
|
593
|
-
*/
|
|
594
|
-
|
|
595
|
-
var factoryWithTypeCheckers;
|
|
596
|
-
var hasRequiredFactoryWithTypeCheckers;
|
|
597
|
-
|
|
598
|
-
function requireFactoryWithTypeCheckers () {
|
|
599
|
-
if (hasRequiredFactoryWithTypeCheckers) return factoryWithTypeCheckers;
|
|
600
|
-
hasRequiredFactoryWithTypeCheckers = 1;
|
|
601
|
-
|
|
602
|
-
var ReactIs = requireReactIs();
|
|
603
|
-
var assign = requireObjectAssign();
|
|
604
|
-
|
|
605
|
-
var ReactPropTypesSecret = requireReactPropTypesSecret();
|
|
606
|
-
var has = requireHas();
|
|
607
|
-
var checkPropTypes = requireCheckPropTypes();
|
|
608
|
-
|
|
609
|
-
var printWarning = function() {};
|
|
610
|
-
|
|
611
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
612
|
-
printWarning = function(text) {
|
|
613
|
-
var message = 'Warning: ' + text;
|
|
614
|
-
if (typeof console !== 'undefined') {
|
|
615
|
-
console.error(message);
|
|
616
|
-
}
|
|
617
|
-
try {
|
|
618
|
-
// --- Welcome to debugging React ---
|
|
619
|
-
// This error was thrown as a convenience so that you can use this stack
|
|
620
|
-
// to find the callsite that caused this warning to fire.
|
|
621
|
-
throw new Error(message);
|
|
622
|
-
} catch (x) {}
|
|
623
|
-
};
|
|
624
|
-
}
|
|
625
|
-
|
|
626
|
-
function emptyFunctionThatReturnsNull() {
|
|
627
|
-
return null;
|
|
628
|
-
}
|
|
629
|
-
|
|
630
|
-
factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
|
|
631
|
-
/* global Symbol */
|
|
632
|
-
var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
|
633
|
-
var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
|
|
634
|
-
|
|
635
|
-
/**
|
|
636
|
-
* Returns the iterator method function contained on the iterable object.
|
|
637
|
-
*
|
|
638
|
-
* Be sure to invoke the function with the iterable as context:
|
|
639
|
-
*
|
|
640
|
-
* var iteratorFn = getIteratorFn(myIterable);
|
|
641
|
-
* if (iteratorFn) {
|
|
642
|
-
* var iterator = iteratorFn.call(myIterable);
|
|
643
|
-
* ...
|
|
644
|
-
* }
|
|
645
|
-
*
|
|
646
|
-
* @param {?object} maybeIterable
|
|
647
|
-
* @return {?function}
|
|
648
|
-
*/
|
|
649
|
-
function getIteratorFn(maybeIterable) {
|
|
650
|
-
var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
|
|
651
|
-
if (typeof iteratorFn === 'function') {
|
|
652
|
-
return iteratorFn;
|
|
653
|
-
}
|
|
654
|
-
}
|
|
655
|
-
|
|
656
|
-
/**
|
|
657
|
-
* Collection of methods that allow declaration and validation of props that are
|
|
658
|
-
* supplied to React components. Example usage:
|
|
659
|
-
*
|
|
660
|
-
* var Props = require('ReactPropTypes');
|
|
661
|
-
* var MyArticle = React.createClass({
|
|
662
|
-
* propTypes: {
|
|
663
|
-
* // An optional string prop named "description".
|
|
664
|
-
* description: Props.string,
|
|
665
|
-
*
|
|
666
|
-
* // A required enum prop named "category".
|
|
667
|
-
* category: Props.oneOf(['News','Photos']).isRequired,
|
|
668
|
-
*
|
|
669
|
-
* // A prop named "dialog" that requires an instance of Dialog.
|
|
670
|
-
* dialog: Props.instanceOf(Dialog).isRequired
|
|
671
|
-
* },
|
|
672
|
-
* render: function() { ... }
|
|
673
|
-
* });
|
|
674
|
-
*
|
|
675
|
-
* A more formal specification of how these methods are used:
|
|
676
|
-
*
|
|
677
|
-
* type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
|
|
678
|
-
* decl := ReactPropTypes.{type}(.isRequired)?
|
|
679
|
-
*
|
|
680
|
-
* Each and every declaration produces a function with the same signature. This
|
|
681
|
-
* allows the creation of custom validation functions. For example:
|
|
682
|
-
*
|
|
683
|
-
* var MyLink = React.createClass({
|
|
684
|
-
* propTypes: {
|
|
685
|
-
* // An optional string or URI prop named "href".
|
|
686
|
-
* href: function(props, propName, componentName) {
|
|
687
|
-
* var propValue = props[propName];
|
|
688
|
-
* if (propValue != null && typeof propValue !== 'string' &&
|
|
689
|
-
* !(propValue instanceof URI)) {
|
|
690
|
-
* return new Error(
|
|
691
|
-
* 'Expected a string or an URI for ' + propName + ' in ' +
|
|
692
|
-
* componentName
|
|
693
|
-
* );
|
|
694
|
-
* }
|
|
695
|
-
* }
|
|
696
|
-
* },
|
|
697
|
-
* render: function() {...}
|
|
698
|
-
* });
|
|
699
|
-
*
|
|
700
|
-
* @internal
|
|
701
|
-
*/
|
|
702
|
-
|
|
703
|
-
var ANONYMOUS = '<<anonymous>>';
|
|
704
|
-
|
|
705
|
-
// Important!
|
|
706
|
-
// Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
|
|
707
|
-
var ReactPropTypes = {
|
|
708
|
-
array: createPrimitiveTypeChecker('array'),
|
|
709
|
-
bigint: createPrimitiveTypeChecker('bigint'),
|
|
710
|
-
bool: createPrimitiveTypeChecker('boolean'),
|
|
711
|
-
func: createPrimitiveTypeChecker('function'),
|
|
712
|
-
number: createPrimitiveTypeChecker('number'),
|
|
713
|
-
object: createPrimitiveTypeChecker('object'),
|
|
714
|
-
string: createPrimitiveTypeChecker('string'),
|
|
715
|
-
symbol: createPrimitiveTypeChecker('symbol'),
|
|
716
|
-
|
|
717
|
-
any: createAnyTypeChecker(),
|
|
718
|
-
arrayOf: createArrayOfTypeChecker,
|
|
719
|
-
element: createElementTypeChecker(),
|
|
720
|
-
elementType: createElementTypeTypeChecker(),
|
|
721
|
-
instanceOf: createInstanceTypeChecker,
|
|
722
|
-
node: createNodeChecker(),
|
|
723
|
-
objectOf: createObjectOfTypeChecker,
|
|
724
|
-
oneOf: createEnumTypeChecker,
|
|
725
|
-
oneOfType: createUnionTypeChecker,
|
|
726
|
-
shape: createShapeTypeChecker,
|
|
727
|
-
exact: createStrictShapeTypeChecker,
|
|
728
|
-
};
|
|
729
|
-
|
|
730
|
-
/**
|
|
731
|
-
* inlined Object.is polyfill to avoid requiring consumers ship their own
|
|
732
|
-
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
|
|
733
|
-
*/
|
|
734
|
-
/*eslint-disable no-self-compare*/
|
|
735
|
-
function is(x, y) {
|
|
736
|
-
// SameValue algorithm
|
|
737
|
-
if (x === y) {
|
|
738
|
-
// Steps 1-5, 7-10
|
|
739
|
-
// Steps 6.b-6.e: +0 != -0
|
|
740
|
-
return x !== 0 || 1 / x === 1 / y;
|
|
741
|
-
} else {
|
|
742
|
-
// Step 6.a: NaN == NaN
|
|
743
|
-
return x !== x && y !== y;
|
|
744
|
-
}
|
|
745
|
-
}
|
|
746
|
-
/*eslint-enable no-self-compare*/
|
|
747
|
-
|
|
748
|
-
/**
|
|
749
|
-
* We use an Error-like object for backward compatibility as people may call
|
|
750
|
-
* PropTypes directly and inspect their output. However, we don't use real
|
|
751
|
-
* Errors anymore. We don't inspect their stack anyway, and creating them
|
|
752
|
-
* is prohibitively expensive if they are created too often, such as what
|
|
753
|
-
* happens in oneOfType() for any type before the one that matched.
|
|
754
|
-
*/
|
|
755
|
-
function PropTypeError(message, data) {
|
|
756
|
-
this.message = message;
|
|
757
|
-
this.data = data && typeof data === 'object' ? data: {};
|
|
758
|
-
this.stack = '';
|
|
759
|
-
}
|
|
760
|
-
// Make `instanceof Error` still work for returned errors.
|
|
761
|
-
PropTypeError.prototype = Error.prototype;
|
|
762
|
-
|
|
763
|
-
function createChainableTypeChecker(validate) {
|
|
764
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
765
|
-
var manualPropTypeCallCache = {};
|
|
766
|
-
var manualPropTypeWarningCount = 0;
|
|
767
|
-
}
|
|
768
|
-
function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
|
|
769
|
-
componentName = componentName || ANONYMOUS;
|
|
770
|
-
propFullName = propFullName || propName;
|
|
771
|
-
|
|
772
|
-
if (secret !== ReactPropTypesSecret) {
|
|
773
|
-
if (throwOnDirectAccess) {
|
|
774
|
-
// New behavior only for users of `prop-types` package
|
|
775
|
-
var err = new Error(
|
|
776
|
-
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
|
777
|
-
'Use `PropTypes.checkPropTypes()` to call them. ' +
|
|
778
|
-
'Read more at http://fb.me/use-check-prop-types'
|
|
779
|
-
);
|
|
780
|
-
err.name = 'Invariant Violation';
|
|
781
|
-
throw err;
|
|
782
|
-
} else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
|
|
783
|
-
// Old behavior for people using React.PropTypes
|
|
784
|
-
var cacheKey = componentName + ':' + propName;
|
|
785
|
-
if (
|
|
786
|
-
!manualPropTypeCallCache[cacheKey] &&
|
|
787
|
-
// Avoid spamming the console because they are often not actionable except for lib authors
|
|
788
|
-
manualPropTypeWarningCount < 3
|
|
789
|
-
) {
|
|
790
|
-
printWarning(
|
|
791
|
-
'You are manually calling a React.PropTypes validation ' +
|
|
792
|
-
'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
|
|
793
|
-
'and will throw in the standalone `prop-types` package. ' +
|
|
794
|
-
'You may be seeing this warning due to a third-party PropTypes ' +
|
|
795
|
-
'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
|
|
796
|
-
);
|
|
797
|
-
manualPropTypeCallCache[cacheKey] = true;
|
|
798
|
-
manualPropTypeWarningCount++;
|
|
799
|
-
}
|
|
800
|
-
}
|
|
801
|
-
}
|
|
802
|
-
if (props[propName] == null) {
|
|
803
|
-
if (isRequired) {
|
|
804
|
-
if (props[propName] === null) {
|
|
805
|
-
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
|
|
806
|
-
}
|
|
807
|
-
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
|
|
808
|
-
}
|
|
809
|
-
return null;
|
|
810
|
-
} else {
|
|
811
|
-
return validate(props, propName, componentName, location, propFullName);
|
|
812
|
-
}
|
|
813
|
-
}
|
|
814
|
-
|
|
815
|
-
var chainedCheckType = checkType.bind(null, false);
|
|
816
|
-
chainedCheckType.isRequired = checkType.bind(null, true);
|
|
817
|
-
|
|
818
|
-
return chainedCheckType;
|
|
819
|
-
}
|
|
820
|
-
|
|
821
|
-
function createPrimitiveTypeChecker(expectedType) {
|
|
822
|
-
function validate(props, propName, componentName, location, propFullName, secret) {
|
|
823
|
-
var propValue = props[propName];
|
|
824
|
-
var propType = getPropType(propValue);
|
|
825
|
-
if (propType !== expectedType) {
|
|
826
|
-
// `propValue` being instance of, say, date/regexp, pass the 'object'
|
|
827
|
-
// check, but we can offer a more precise error message here rather than
|
|
828
|
-
// 'of type `object`'.
|
|
829
|
-
var preciseType = getPreciseType(propValue);
|
|
830
|
-
|
|
831
|
-
return new PropTypeError(
|
|
832
|
-
'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),
|
|
833
|
-
{expectedType: expectedType}
|
|
834
|
-
);
|
|
835
|
-
}
|
|
836
|
-
return null;
|
|
837
|
-
}
|
|
838
|
-
return createChainableTypeChecker(validate);
|
|
839
|
-
}
|
|
840
|
-
|
|
841
|
-
function createAnyTypeChecker() {
|
|
842
|
-
return createChainableTypeChecker(emptyFunctionThatReturnsNull);
|
|
843
|
-
}
|
|
844
|
-
|
|
845
|
-
function createArrayOfTypeChecker(typeChecker) {
|
|
846
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
847
|
-
if (typeof typeChecker !== 'function') {
|
|
848
|
-
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
|
|
849
|
-
}
|
|
850
|
-
var propValue = props[propName];
|
|
851
|
-
if (!Array.isArray(propValue)) {
|
|
852
|
-
var propType = getPropType(propValue);
|
|
853
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
|
|
854
|
-
}
|
|
855
|
-
for (var i = 0; i < propValue.length; i++) {
|
|
856
|
-
var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
|
|
857
|
-
if (error instanceof Error) {
|
|
858
|
-
return error;
|
|
859
|
-
}
|
|
860
|
-
}
|
|
861
|
-
return null;
|
|
862
|
-
}
|
|
863
|
-
return createChainableTypeChecker(validate);
|
|
864
|
-
}
|
|
865
|
-
|
|
866
|
-
function createElementTypeChecker() {
|
|
867
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
868
|
-
var propValue = props[propName];
|
|
869
|
-
if (!isValidElement(propValue)) {
|
|
870
|
-
var propType = getPropType(propValue);
|
|
871
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
|
|
872
|
-
}
|
|
873
|
-
return null;
|
|
874
|
-
}
|
|
875
|
-
return createChainableTypeChecker(validate);
|
|
876
|
-
}
|
|
877
|
-
|
|
878
|
-
function createElementTypeTypeChecker() {
|
|
879
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
880
|
-
var propValue = props[propName];
|
|
881
|
-
if (!ReactIs.isValidElementType(propValue)) {
|
|
882
|
-
var propType = getPropType(propValue);
|
|
883
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
|
|
884
|
-
}
|
|
885
|
-
return null;
|
|
886
|
-
}
|
|
887
|
-
return createChainableTypeChecker(validate);
|
|
888
|
-
}
|
|
889
|
-
|
|
890
|
-
function createInstanceTypeChecker(expectedClass) {
|
|
891
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
892
|
-
if (!(props[propName] instanceof expectedClass)) {
|
|
893
|
-
var expectedClassName = expectedClass.name || ANONYMOUS;
|
|
894
|
-
var actualClassName = getClassName(props[propName]);
|
|
895
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
|
|
896
|
-
}
|
|
897
|
-
return null;
|
|
898
|
-
}
|
|
899
|
-
return createChainableTypeChecker(validate);
|
|
900
|
-
}
|
|
901
|
-
|
|
902
|
-
function createEnumTypeChecker(expectedValues) {
|
|
903
|
-
if (!Array.isArray(expectedValues)) {
|
|
904
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
905
|
-
if (arguments.length > 1) {
|
|
906
|
-
printWarning(
|
|
907
|
-
'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
|
|
908
|
-
'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
|
|
909
|
-
);
|
|
910
|
-
} else {
|
|
911
|
-
printWarning('Invalid argument supplied to oneOf, expected an array.');
|
|
912
|
-
}
|
|
913
|
-
}
|
|
914
|
-
return emptyFunctionThatReturnsNull;
|
|
915
|
-
}
|
|
916
|
-
|
|
917
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
918
|
-
var propValue = props[propName];
|
|
919
|
-
for (var i = 0; i < expectedValues.length; i++) {
|
|
920
|
-
if (is(propValue, expectedValues[i])) {
|
|
921
|
-
return null;
|
|
922
|
-
}
|
|
923
|
-
}
|
|
924
|
-
|
|
925
|
-
var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
|
|
926
|
-
var type = getPreciseType(value);
|
|
927
|
-
if (type === 'symbol') {
|
|
928
|
-
return String(value);
|
|
929
|
-
}
|
|
930
|
-
return value;
|
|
931
|
-
});
|
|
932
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
|
|
933
|
-
}
|
|
934
|
-
return createChainableTypeChecker(validate);
|
|
935
|
-
}
|
|
936
|
-
|
|
937
|
-
function createObjectOfTypeChecker(typeChecker) {
|
|
938
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
939
|
-
if (typeof typeChecker !== 'function') {
|
|
940
|
-
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
|
|
941
|
-
}
|
|
942
|
-
var propValue = props[propName];
|
|
943
|
-
var propType = getPropType(propValue);
|
|
944
|
-
if (propType !== 'object') {
|
|
945
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
|
|
946
|
-
}
|
|
947
|
-
for (var key in propValue) {
|
|
948
|
-
if (has(propValue, key)) {
|
|
949
|
-
var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
|
950
|
-
if (error instanceof Error) {
|
|
951
|
-
return error;
|
|
952
|
-
}
|
|
953
|
-
}
|
|
954
|
-
}
|
|
955
|
-
return null;
|
|
956
|
-
}
|
|
957
|
-
return createChainableTypeChecker(validate);
|
|
958
|
-
}
|
|
959
|
-
|
|
960
|
-
function createUnionTypeChecker(arrayOfTypeCheckers) {
|
|
961
|
-
if (!Array.isArray(arrayOfTypeCheckers)) {
|
|
962
|
-
process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
|
|
963
|
-
return emptyFunctionThatReturnsNull;
|
|
964
|
-
}
|
|
965
|
-
|
|
966
|
-
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
967
|
-
var checker = arrayOfTypeCheckers[i];
|
|
968
|
-
if (typeof checker !== 'function') {
|
|
969
|
-
printWarning(
|
|
970
|
-
'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
|
|
971
|
-
'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
|
|
972
|
-
);
|
|
973
|
-
return emptyFunctionThatReturnsNull;
|
|
974
|
-
}
|
|
975
|
-
}
|
|
976
|
-
|
|
977
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
978
|
-
var expectedTypes = [];
|
|
979
|
-
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
980
|
-
var checker = arrayOfTypeCheckers[i];
|
|
981
|
-
var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
|
|
982
|
-
if (checkerResult == null) {
|
|
983
|
-
return null;
|
|
984
|
-
}
|
|
985
|
-
if (checkerResult.data && has(checkerResult.data, 'expectedType')) {
|
|
986
|
-
expectedTypes.push(checkerResult.data.expectedType);
|
|
987
|
-
}
|
|
988
|
-
}
|
|
989
|
-
var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';
|
|
990
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
|
|
991
|
-
}
|
|
992
|
-
return createChainableTypeChecker(validate);
|
|
993
|
-
}
|
|
994
|
-
|
|
995
|
-
function createNodeChecker() {
|
|
996
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
997
|
-
if (!isNode(props[propName])) {
|
|
998
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
|
|
999
|
-
}
|
|
1000
|
-
return null;
|
|
1001
|
-
}
|
|
1002
|
-
return createChainableTypeChecker(validate);
|
|
1003
|
-
}
|
|
1004
|
-
|
|
1005
|
-
function invalidValidatorError(componentName, location, propFullName, key, type) {
|
|
1006
|
-
return new PropTypeError(
|
|
1007
|
-
(componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +
|
|
1008
|
-
'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'
|
|
1009
|
-
);
|
|
1010
|
-
}
|
|
1011
|
-
|
|
1012
|
-
function createShapeTypeChecker(shapeTypes) {
|
|
1013
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
1014
|
-
var propValue = props[propName];
|
|
1015
|
-
var propType = getPropType(propValue);
|
|
1016
|
-
if (propType !== 'object') {
|
|
1017
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
|
1018
|
-
}
|
|
1019
|
-
for (var key in shapeTypes) {
|
|
1020
|
-
var checker = shapeTypes[key];
|
|
1021
|
-
if (typeof checker !== 'function') {
|
|
1022
|
-
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
|
1023
|
-
}
|
|
1024
|
-
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
|
1025
|
-
if (error) {
|
|
1026
|
-
return error;
|
|
1027
|
-
}
|
|
1028
|
-
}
|
|
1029
|
-
return null;
|
|
1030
|
-
}
|
|
1031
|
-
return createChainableTypeChecker(validate);
|
|
1032
|
-
}
|
|
1033
|
-
|
|
1034
|
-
function createStrictShapeTypeChecker(shapeTypes) {
|
|
1035
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
1036
|
-
var propValue = props[propName];
|
|
1037
|
-
var propType = getPropType(propValue);
|
|
1038
|
-
if (propType !== 'object') {
|
|
1039
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
|
1040
|
-
}
|
|
1041
|
-
// We need to check all keys in case some are required but missing from props.
|
|
1042
|
-
var allKeys = assign({}, props[propName], shapeTypes);
|
|
1043
|
-
for (var key in allKeys) {
|
|
1044
|
-
var checker = shapeTypes[key];
|
|
1045
|
-
if (has(shapeTypes, key) && typeof checker !== 'function') {
|
|
1046
|
-
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
|
1047
|
-
}
|
|
1048
|
-
if (!checker) {
|
|
1049
|
-
return new PropTypeError(
|
|
1050
|
-
'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
|
|
1051
|
-
'\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
|
|
1052
|
-
'\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
|
|
1053
|
-
);
|
|
1054
|
-
}
|
|
1055
|
-
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
|
1056
|
-
if (error) {
|
|
1057
|
-
return error;
|
|
1058
|
-
}
|
|
1059
|
-
}
|
|
1060
|
-
return null;
|
|
1061
|
-
}
|
|
1062
|
-
|
|
1063
|
-
return createChainableTypeChecker(validate);
|
|
1064
|
-
}
|
|
1065
|
-
|
|
1066
|
-
function isNode(propValue) {
|
|
1067
|
-
switch (typeof propValue) {
|
|
1068
|
-
case 'number':
|
|
1069
|
-
case 'string':
|
|
1070
|
-
case 'undefined':
|
|
1071
|
-
return true;
|
|
1072
|
-
case 'boolean':
|
|
1073
|
-
return !propValue;
|
|
1074
|
-
case 'object':
|
|
1075
|
-
if (Array.isArray(propValue)) {
|
|
1076
|
-
return propValue.every(isNode);
|
|
1077
|
-
}
|
|
1078
|
-
if (propValue === null || isValidElement(propValue)) {
|
|
1079
|
-
return true;
|
|
1080
|
-
}
|
|
1081
|
-
|
|
1082
|
-
var iteratorFn = getIteratorFn(propValue);
|
|
1083
|
-
if (iteratorFn) {
|
|
1084
|
-
var iterator = iteratorFn.call(propValue);
|
|
1085
|
-
var step;
|
|
1086
|
-
if (iteratorFn !== propValue.entries) {
|
|
1087
|
-
while (!(step = iterator.next()).done) {
|
|
1088
|
-
if (!isNode(step.value)) {
|
|
1089
|
-
return false;
|
|
1090
|
-
}
|
|
1091
|
-
}
|
|
1092
|
-
} else {
|
|
1093
|
-
// Iterator will provide entry [k,v] tuples rather than values.
|
|
1094
|
-
while (!(step = iterator.next()).done) {
|
|
1095
|
-
var entry = step.value;
|
|
1096
|
-
if (entry) {
|
|
1097
|
-
if (!isNode(entry[1])) {
|
|
1098
|
-
return false;
|
|
1099
|
-
}
|
|
1100
|
-
}
|
|
1101
|
-
}
|
|
1102
|
-
}
|
|
1103
|
-
} else {
|
|
1104
|
-
return false;
|
|
1105
|
-
}
|
|
1106
|
-
|
|
1107
|
-
return true;
|
|
1108
|
-
default:
|
|
1109
|
-
return false;
|
|
1110
|
-
}
|
|
1111
|
-
}
|
|
1112
|
-
|
|
1113
|
-
function isSymbol(propType, propValue) {
|
|
1114
|
-
// Native Symbol.
|
|
1115
|
-
if (propType === 'symbol') {
|
|
1116
|
-
return true;
|
|
1117
|
-
}
|
|
1118
|
-
|
|
1119
|
-
// falsy value can't be a Symbol
|
|
1120
|
-
if (!propValue) {
|
|
1121
|
-
return false;
|
|
1122
|
-
}
|
|
1123
|
-
|
|
1124
|
-
// 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
|
|
1125
|
-
if (propValue['@@toStringTag'] === 'Symbol') {
|
|
1126
|
-
return true;
|
|
1127
|
-
}
|
|
1128
|
-
|
|
1129
|
-
// Fallback for non-spec compliant Symbols which are polyfilled.
|
|
1130
|
-
if (typeof Symbol === 'function' && propValue instanceof Symbol) {
|
|
1131
|
-
return true;
|
|
1132
|
-
}
|
|
1133
|
-
|
|
1134
|
-
return false;
|
|
1135
|
-
}
|
|
1136
|
-
|
|
1137
|
-
// Equivalent of `typeof` but with special handling for array and regexp.
|
|
1138
|
-
function getPropType(propValue) {
|
|
1139
|
-
var propType = typeof propValue;
|
|
1140
|
-
if (Array.isArray(propValue)) {
|
|
1141
|
-
return 'array';
|
|
1142
|
-
}
|
|
1143
|
-
if (propValue instanceof RegExp) {
|
|
1144
|
-
// Old webkits (at least until Android 4.0) return 'function' rather than
|
|
1145
|
-
// 'object' for typeof a RegExp. We'll normalize this here so that /bla/
|
|
1146
|
-
// passes PropTypes.object.
|
|
1147
|
-
return 'object';
|
|
1148
|
-
}
|
|
1149
|
-
if (isSymbol(propType, propValue)) {
|
|
1150
|
-
return 'symbol';
|
|
1151
|
-
}
|
|
1152
|
-
return propType;
|
|
1153
|
-
}
|
|
1154
|
-
|
|
1155
|
-
// This handles more types than `getPropType`. Only used for error messages.
|
|
1156
|
-
// See `createPrimitiveTypeChecker`.
|
|
1157
|
-
function getPreciseType(propValue) {
|
|
1158
|
-
if (typeof propValue === 'undefined' || propValue === null) {
|
|
1159
|
-
return '' + propValue;
|
|
1160
|
-
}
|
|
1161
|
-
var propType = getPropType(propValue);
|
|
1162
|
-
if (propType === 'object') {
|
|
1163
|
-
if (propValue instanceof Date) {
|
|
1164
|
-
return 'date';
|
|
1165
|
-
} else if (propValue instanceof RegExp) {
|
|
1166
|
-
return 'regexp';
|
|
1167
|
-
}
|
|
1168
|
-
}
|
|
1169
|
-
return propType;
|
|
1170
|
-
}
|
|
1171
|
-
|
|
1172
|
-
// Returns a string that is postfixed to a warning about an invalid type.
|
|
1173
|
-
// For example, "undefined" or "of type array"
|
|
1174
|
-
function getPostfixForTypeWarning(value) {
|
|
1175
|
-
var type = getPreciseType(value);
|
|
1176
|
-
switch (type) {
|
|
1177
|
-
case 'array':
|
|
1178
|
-
case 'object':
|
|
1179
|
-
return 'an ' + type;
|
|
1180
|
-
case 'boolean':
|
|
1181
|
-
case 'date':
|
|
1182
|
-
case 'regexp':
|
|
1183
|
-
return 'a ' + type;
|
|
1184
|
-
default:
|
|
1185
|
-
return type;
|
|
1186
|
-
}
|
|
1187
|
-
}
|
|
1188
|
-
|
|
1189
|
-
// Returns class name of the object, if any.
|
|
1190
|
-
function getClassName(propValue) {
|
|
1191
|
-
if (!propValue.constructor || !propValue.constructor.name) {
|
|
1192
|
-
return ANONYMOUS;
|
|
1193
|
-
}
|
|
1194
|
-
return propValue.constructor.name;
|
|
1195
|
-
}
|
|
1196
|
-
|
|
1197
|
-
ReactPropTypes.checkPropTypes = checkPropTypes;
|
|
1198
|
-
ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
|
|
1199
|
-
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
1200
|
-
|
|
1201
|
-
return ReactPropTypes;
|
|
1202
|
-
};
|
|
1203
|
-
return factoryWithTypeCheckers;
|
|
1204
|
-
}
|
|
1205
|
-
|
|
1206
|
-
/**
|
|
1207
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
1208
|
-
*
|
|
1209
|
-
* This source code is licensed under the MIT license found in the
|
|
1210
|
-
* LICENSE file in the root directory of this source tree.
|
|
1211
|
-
*/
|
|
1212
|
-
|
|
1213
|
-
var factoryWithThrowingShims;
|
|
1214
|
-
var hasRequiredFactoryWithThrowingShims;
|
|
1215
|
-
|
|
1216
|
-
function requireFactoryWithThrowingShims () {
|
|
1217
|
-
if (hasRequiredFactoryWithThrowingShims) return factoryWithThrowingShims;
|
|
1218
|
-
hasRequiredFactoryWithThrowingShims = 1;
|
|
1219
|
-
|
|
1220
|
-
var ReactPropTypesSecret = requireReactPropTypesSecret();
|
|
1221
|
-
|
|
1222
|
-
function emptyFunction() {}
|
|
1223
|
-
function emptyFunctionWithReset() {}
|
|
1224
|
-
emptyFunctionWithReset.resetWarningCache = emptyFunction;
|
|
1225
|
-
|
|
1226
|
-
factoryWithThrowingShims = function() {
|
|
1227
|
-
function shim(props, propName, componentName, location, propFullName, secret) {
|
|
1228
|
-
if (secret === ReactPropTypesSecret) {
|
|
1229
|
-
// It is still safe when called from React.
|
|
1230
|
-
return;
|
|
1231
|
-
}
|
|
1232
|
-
var err = new Error(
|
|
1233
|
-
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
|
1234
|
-
'Use PropTypes.checkPropTypes() to call them. ' +
|
|
1235
|
-
'Read more at http://fb.me/use-check-prop-types'
|
|
1236
|
-
);
|
|
1237
|
-
err.name = 'Invariant Violation';
|
|
1238
|
-
throw err;
|
|
1239
|
-
} shim.isRequired = shim;
|
|
1240
|
-
function getShim() {
|
|
1241
|
-
return shim;
|
|
1242
|
-
} // Important!
|
|
1243
|
-
// Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
|
|
1244
|
-
var ReactPropTypes = {
|
|
1245
|
-
array: shim,
|
|
1246
|
-
bigint: shim,
|
|
1247
|
-
bool: shim,
|
|
1248
|
-
func: shim,
|
|
1249
|
-
number: shim,
|
|
1250
|
-
object: shim,
|
|
1251
|
-
string: shim,
|
|
1252
|
-
symbol: shim,
|
|
1253
|
-
|
|
1254
|
-
any: shim,
|
|
1255
|
-
arrayOf: getShim,
|
|
1256
|
-
element: shim,
|
|
1257
|
-
elementType: shim,
|
|
1258
|
-
instanceOf: getShim,
|
|
1259
|
-
node: shim,
|
|
1260
|
-
objectOf: getShim,
|
|
1261
|
-
oneOf: getShim,
|
|
1262
|
-
oneOfType: getShim,
|
|
1263
|
-
shape: getShim,
|
|
1264
|
-
exact: getShim,
|
|
1265
|
-
|
|
1266
|
-
checkPropTypes: emptyFunctionWithReset,
|
|
1267
|
-
resetWarningCache: emptyFunction
|
|
1268
|
-
};
|
|
1269
|
-
|
|
1270
|
-
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
1271
|
-
|
|
1272
|
-
return ReactPropTypes;
|
|
1273
|
-
};
|
|
1274
|
-
return factoryWithThrowingShims;
|
|
1275
|
-
}
|
|
1276
|
-
|
|
1277
|
-
/**
|
|
1278
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
1279
|
-
*
|
|
1280
|
-
* This source code is licensed under the MIT license found in the
|
|
1281
|
-
* LICENSE file in the root directory of this source tree.
|
|
1282
|
-
*/
|
|
1283
|
-
|
|
1284
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
1285
|
-
var ReactIs = requireReactIs();
|
|
1286
|
-
|
|
1287
|
-
// By explicitly using `prop-types` you are opting into new development behavior.
|
|
1288
|
-
// http://fb.me/prop-types-in-prod
|
|
1289
|
-
var throwOnDirectAccess = true;
|
|
1290
|
-
propTypes.exports = requireFactoryWithTypeCheckers()(ReactIs.isElement, throwOnDirectAccess);
|
|
1291
|
-
} else {
|
|
1292
|
-
// By explicitly using `prop-types` you are opting into new production behavior.
|
|
1293
|
-
// http://fb.me/prop-types-in-prod
|
|
1294
|
-
propTypes.exports = requireFactoryWithThrowingShims()();
|
|
1295
|
-
}
|
|
1296
|
-
|
|
1297
|
-
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}}
|
|
1298
|
-
|
|
1299
|
-
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}}";
|
|
1300
|
-
n(css$3,{});
|
|
1301
|
-
|
|
1302
|
-
var Container = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
1303
|
-
var _ref$isHeaderFixed = _ref.isHeaderFixed,
|
|
1304
|
-
isHeaderFixed = _ref$isHeaderFixed === void 0 ? false : _ref$isHeaderFixed,
|
|
1305
|
-
children = _ref.children;
|
|
1306
|
-
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1307
|
-
ref: ref,
|
|
1308
|
-
className: classnames__default["default"]("neeto-molecules-container", {
|
|
1309
|
-
"neeto-molecules-container--header-fixed": isHeaderFixed
|
|
1310
|
-
})
|
|
1311
|
-
}, children);
|
|
1312
|
-
});
|
|
1313
|
-
Container.displayName = "Container";
|
|
1314
|
-
Container.propTypes = {
|
|
1315
|
-
/**
|
|
1316
|
-
* Decides whether the `Header` component should be stickied at the top on scroll.
|
|
1317
|
-
*/
|
|
1318
|
-
isHeaderFixed: propTypes.exports.bool
|
|
1319
|
-
};
|
|
1320
|
-
|
|
1321
|
-
function _extends$1() {
|
|
1322
|
-
_extends$1 = Object.assign ? Object.assign.bind() : function (target) {
|
|
1323
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
1324
|
-
var source = arguments[i];
|
|
1325
|
-
for (var key in source) {
|
|
1326
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
1327
|
-
target[key] = source[key];
|
|
1328
|
-
}
|
|
1329
|
-
}
|
|
1330
|
-
}
|
|
1331
|
-
return target;
|
|
1332
|
-
};
|
|
1333
|
-
return _extends$1.apply(this, arguments);
|
|
1334
|
-
}
|
|
1335
|
-
|
|
1336
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
1337
|
-
if (source == null) return {};
|
|
1338
|
-
var target = {};
|
|
1339
|
-
var sourceKeys = Object.keys(source);
|
|
1340
|
-
var key, i;
|
|
1341
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
1342
|
-
key = sourceKeys[i];
|
|
1343
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
1344
|
-
target[key] = source[key];
|
|
1345
|
-
}
|
|
1346
|
-
return target;
|
|
1347
|
-
}
|
|
1348
|
-
|
|
1349
|
-
function _objectWithoutProperties(source, excluded) {
|
|
1350
|
-
if (source == null) return {};
|
|
1351
|
-
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
1352
|
-
var key, i;
|
|
1353
|
-
if (Object.getOwnPropertySymbols) {
|
|
1354
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
1355
|
-
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
1356
|
-
key = sourceSymbolKeys[i];
|
|
1357
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
1358
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
1359
|
-
target[key] = source[key];
|
|
1360
|
-
}
|
|
1361
|
-
}
|
|
1362
|
-
return target;
|
|
1363
|
-
}
|
|
1364
|
-
|
|
1365
|
-
var _path, _path2, _g, _defs;
|
|
1366
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
1367
|
-
var SvgNeeto = function SvgNeeto(props) {
|
|
1368
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
|
1369
|
-
width: 50,
|
|
1370
|
-
height: 50,
|
|
1371
|
-
viewBox: "0 0 415 415",
|
|
1372
|
-
fill: "none",
|
|
1373
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
1374
|
-
}, props), _path || (_path = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1375
|
-
d: "M414.989 207.495C414.989 92.899 322.091 0 207.495 0H0v414.989h414.989V207.495Z",
|
|
1376
|
-
fill: "#0043AC"
|
|
1377
|
-
})), /*#__PURE__*/React__namespace.createElement("mask", {
|
|
1378
|
-
id: "neeto_svg__a",
|
|
1379
|
-
style: {
|
|
1380
|
-
maskType: "alpha"
|
|
1381
|
-
},
|
|
1382
|
-
maskUnits: "userSpaceOnUse",
|
|
1383
|
-
x: 0,
|
|
1384
|
-
y: 0,
|
|
1385
|
-
width: 415,
|
|
1386
|
-
height: 415
|
|
1387
|
-
}, _path2 || (_path2 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1388
|
-
d: "M414.989 207.495C414.989 92.899 322.091 0 207.495 0H0v414.989h414.989V207.495Z",
|
|
1389
|
-
fill: "#0043AC"
|
|
1390
|
-
}))), _g || (_g = /*#__PURE__*/React__namespace.createElement("g", {
|
|
1391
|
-
mask: "url(#neeto_svg__a)"
|
|
1392
|
-
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
1393
|
-
d: "M233.747 348.74c88.579 101.145 172.015 116.411 202.661 111.401v32.491H-8.032V230.487c43.685-2.726 153.2 17.108 241.779 118.253Z",
|
|
1394
|
-
fill: "url(#neeto_svg__b)"
|
|
1395
|
-
}))), _defs || (_defs = /*#__PURE__*/React__namespace.createElement("defs", null, /*#__PURE__*/React__namespace.createElement("radialGradient", {
|
|
1396
|
-
id: "neeto_svg__b",
|
|
1397
|
-
cx: 0,
|
|
1398
|
-
cy: 0,
|
|
1399
|
-
r: 1,
|
|
1400
|
-
gradientUnits: "userSpaceOnUse",
|
|
1401
|
-
gradientTransform: "rotate(47.118 -220.556 214.818) scale(427.964 725.049)"
|
|
1402
|
-
}, /*#__PURE__*/React__namespace.createElement("stop", {
|
|
1403
|
-
stopColor: "#0043AC"
|
|
1404
|
-
}), /*#__PURE__*/React__namespace.createElement("stop", {
|
|
1405
|
-
offset: 1,
|
|
1406
|
-
stopColor: "#3DB1CA",
|
|
1407
|
-
stopOpacity: 0.8
|
|
1408
|
-
})))));
|
|
1409
|
-
};
|
|
1410
|
-
|
|
1411
|
-
var css$2 = ".neeto-molecules-pageloader__wrapper{height:100%;position:relative;width:100%}.neeto-molecules-pageloader__wrapper .neeto-molecules-pageloader{height:100%;left:0;position:absolute;top:0;width:100%}.neeto-molecules-pageloader__wrapper .neeto-molecules-pageloader__content{height:66px;margin-bottom:16px;overflow:hidden;padding:8px;position:relative;width:66px}.neeto-molecules-pageloader__wrapper .neeto-molecules-pageloader__text{color:rgb(var(--neeto-ui-gray-800));font-size:1.25rem;line-height:1.75rem;margin-bottom:4rem;text-align:center}.neeto-molecules-pageloader__spinner{display:flex;gap:2px;height:25px;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.neeto-molecules-pageloader__spinner>div{animation:neeto-ui-stretch-delay 1.2s ease-in-out infinite;background-color:#fff;border-radius:2px;display:inline-flex;height:100%;width:2px}.neeto-molecules-pageloader__spinner .neeto-molecules-pageloader__rect2{animation-delay:-1.1s}.neeto-molecules-pageloader__spinner .neeto-molecules-pageloader__rect3{animation-delay:-1s}.neeto-molecules-pageloader__spinner .neeto-molecules-pageloader__rect4{animation-delay:-.9s}.neeto-molecules-pageloader__spinner .neeto-molecules-pageloader__rect5{animation-delay:-.8s}@keyframes neeto-ui-stretch-delay{0%,40%,to{transform:scaleY(.4);-webkit-transform:scaleY(.4)}20%{transform:scaleY(1);-webkit-transform:scaleY(1)}}";
|
|
1412
|
-
n(css$2,{});
|
|
1413
|
-
|
|
1414
|
-
var _excluded$5 = ["text"];
|
|
1415
|
-
var PageLoader = function PageLoader(_ref) {
|
|
1416
|
-
var _ref$text = _ref.text,
|
|
1417
|
-
text = _ref$text === void 0 ? "" : _ref$text,
|
|
1418
|
-
otherProps = _objectWithoutProperties(_ref, _excluded$5);
|
|
1419
|
-
return /*#__PURE__*/React__default["default"].createElement("div", _extends$1({
|
|
1420
|
-
className: "neeto-molecules-pageloader__wrapper"
|
|
1421
|
-
}, otherProps), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1422
|
-
className: "neeto-molecules-pageloader neeto-ui-flex neeto-ui-flex-col neeto-ui-items-center neeto-ui-justify-center"
|
|
1423
|
-
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1424
|
-
className: "neeto-molecules-pageloader__content neeto-ui-flex neeto-ui-flex-shrink-0 neeto-ui-items-center neeto-ui-justify-center",
|
|
1425
|
-
"data-cy": "neeto-molecules-pageloader"
|
|
1426
|
-
}, /*#__PURE__*/React__default["default"].createElement(SvgNeeto, {
|
|
1427
|
-
className: "neeto-molecules-pageloader__logo",
|
|
1428
|
-
size: 50
|
|
1429
|
-
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1430
|
-
className: "neeto-molecules-pageloader__spinner"
|
|
1431
|
-
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1432
|
-
className: "neeto-molecules-pageloader__rect1"
|
|
1433
|
-
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1434
|
-
className: "neeto-molecules-pageloader__rect2"
|
|
1435
|
-
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1436
|
-
className: "neeto-molecules-pageloader__rect3"
|
|
1437
|
-
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1438
|
-
className: "neeto-molecules-pageloader__rect4"
|
|
1439
|
-
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1440
|
-
className: "neeto-molecules-pageloader__rect5"
|
|
1441
|
-
}))), text && /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
1442
|
-
style: "h5",
|
|
1443
|
-
weight: "semibold"
|
|
1444
|
-
}, text)));
|
|
1445
|
-
};
|
|
1446
|
-
var PageLoader$1 = /*#__PURE__*/React__default["default"].memo(PageLoader);
|
|
1447
|
-
|
|
1448
|
-
function _typeof(o) {
|
|
1449
|
-
"@babel/helpers - typeof";
|
|
1450
|
-
|
|
1451
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
1452
|
-
return typeof o;
|
|
1453
|
-
} : function (o) {
|
|
1454
|
-
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
1455
|
-
}, _typeof(o);
|
|
1456
|
-
}
|
|
1457
|
-
|
|
1458
|
-
function _toPrimitive(input, hint) {
|
|
1459
|
-
if (_typeof(input) !== "object" || input === null) return input;
|
|
1460
|
-
var prim = input[Symbol.toPrimitive];
|
|
1461
|
-
if (prim !== undefined) {
|
|
1462
|
-
var res = prim.call(input, hint || "default");
|
|
1463
|
-
if (_typeof(res) !== "object") return res;
|
|
1464
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1465
|
-
}
|
|
1466
|
-
return (hint === "string" ? String : Number)(input);
|
|
1467
|
-
}
|
|
1468
|
-
|
|
1469
|
-
function _toPropertyKey(arg) {
|
|
1470
|
-
var key = _toPrimitive(arg, "string");
|
|
1471
|
-
return _typeof(key) === "symbol" ? key : String(key);
|
|
1472
|
-
}
|
|
1473
|
-
|
|
1474
|
-
function _defineProperty(obj, key, value) {
|
|
1475
|
-
key = _toPropertyKey(key);
|
|
1476
|
-
if (key in obj) {
|
|
1477
|
-
Object.defineProperty(obj, key, {
|
|
1478
|
-
value: value,
|
|
1479
|
-
enumerable: true,
|
|
1480
|
-
configurable: true,
|
|
1481
|
-
writable: true
|
|
1482
|
-
});
|
|
1483
|
-
} else {
|
|
1484
|
-
obj[key] = value;
|
|
1485
|
-
}
|
|
1486
|
-
return obj;
|
|
1487
|
-
}
|
|
1488
|
-
|
|
1489
|
-
var _excluded$4 = ["buttonProps", "columnData", "localStorageKey", "fixedColumns"];
|
|
1490
|
-
function ownKeys$5(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; }
|
|
1491
|
-
function _objectSpread$5(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$5(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$5(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1492
|
-
var Columns = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
1493
|
-
var _ref$buttonProps = _ref.buttonProps,
|
|
1494
|
-
buttonProps = _ref$buttonProps === void 0 ? {} : _ref$buttonProps,
|
|
1495
|
-
columnData = _ref.columnData,
|
|
1496
|
-
localStorageKey = _ref.localStorageKey,
|
|
1497
|
-
fixedColumns = _ref.fixedColumns,
|
|
1498
|
-
props = _objectWithoutProperties(_ref, _excluded$4);
|
|
1499
|
-
var _useTranslation = reactI18next.useTranslation(),
|
|
1500
|
-
t = _useTranslation.t;
|
|
1501
|
-
var columnDataIndex = React.useMemo(function () {
|
|
1502
|
-
return ramda.pluck("dataIndex", (columnData || []).filter(function (column) {
|
|
1503
|
-
return !(fixedColumns !== null && fixedColumns !== void 0 && fixedColumns.includes(column.dataIndex));
|
|
1504
|
-
}));
|
|
1505
|
-
}, [columnData, fixedColumns]);
|
|
1506
|
-
var _useHiddenColumns = ManageColumns.useHiddenColumns(localStorageKey),
|
|
1507
|
-
hideColumn = _useHiddenColumns.hideColumn,
|
|
1508
|
-
showColumn = _useHiddenColumns.showColumn;
|
|
1509
|
-
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1510
|
-
className: "neeto-molecules-subheader__columns"
|
|
1511
|
-
}, /*#__PURE__*/React__default["default"].createElement(ManageColumns__default["default"], _extends$1({
|
|
1512
|
-
isSearchable: true,
|
|
1513
|
-
className: "neeto-ui-dropdown--manage-columns",
|
|
1514
|
-
actionBlock: /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1515
|
-
className: "grid grid-cols-2 gap-2 px-4 py-3"
|
|
1516
|
-
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
1517
|
-
className: "col-span-1 justify-center",
|
|
1518
|
-
label: "Hide all",
|
|
1519
|
-
style: "secondary",
|
|
1520
|
-
onClick: function onClick() {
|
|
1521
|
-
return hideColumn(columnDataIndex);
|
|
1522
|
-
}
|
|
1523
|
-
}), /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
1524
|
-
className: "col-span-1 justify-center",
|
|
1525
|
-
label: "Show all",
|
|
1526
|
-
style: "secondary",
|
|
1527
|
-
onClick: function onClick() {
|
|
1528
|
-
return showColumn(columnDataIndex);
|
|
1529
|
-
}
|
|
1530
|
-
})),
|
|
1531
|
-
buttonProps: _objectSpread$5({
|
|
1532
|
-
icon: neetoIcons.Column,
|
|
1533
|
-
label: null,
|
|
1534
|
-
tooltipProps: {
|
|
1535
|
-
content: t("neetoMolecules.columns.columns"),
|
|
1536
|
-
position: "bottom"
|
|
1537
|
-
},
|
|
1538
|
-
"data-testid": "columns-button",
|
|
1539
|
-
"data-cy": "columns-dropdown-button"
|
|
1540
|
-
}, buttonProps)
|
|
1541
|
-
}, _objectSpread$5(_objectSpread$5({
|
|
1542
|
-
columnData: columnData,
|
|
1543
|
-
localStorageKey: localStorageKey
|
|
1544
|
-
}, props), {}, {
|
|
1545
|
-
ref: ref
|
|
1546
|
-
}))));
|
|
1547
|
-
});
|
|
1548
|
-
Columns.displayName = "Columns";
|
|
1549
|
-
|
|
1550
|
-
var DownloadButton = function DownloadButton(_ref) {
|
|
1551
|
-
var count = _ref.count,
|
|
1552
|
-
onClick = _ref.onClick,
|
|
1553
|
-
_ref$dataCy = _ref["data-cy"],
|
|
1554
|
-
dataCy = _ref$dataCy === void 0 ? "download-button" : _ref$dataCy;
|
|
1555
|
-
var _useTranslation = reactI18next.useTranslation(),
|
|
1556
|
-
t = _useTranslation.t;
|
|
1557
|
-
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1558
|
-
className: "neeto-molecules-subheader__download"
|
|
1559
|
-
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
1560
|
-
"data-cy": dataCy,
|
|
1561
|
-
"data-testid": "download-button",
|
|
1562
|
-
icon: neetoIcons.Download,
|
|
1563
|
-
style: "text",
|
|
1564
|
-
tooltipProps: {
|
|
1565
|
-
content: t("neetoMolecules.common.download"),
|
|
1566
|
-
position: "bottom"
|
|
1567
|
-
},
|
|
1568
|
-
onClick: onClick
|
|
1569
|
-
}), count && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
1570
|
-
className: "neeto-molecules-subheader__download-count"
|
|
1571
|
-
}, count));
|
|
1572
|
-
};
|
|
1573
|
-
|
|
1574
|
-
var _excluded$3 = ["buttonProps"];
|
|
1575
|
-
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; }
|
|
1576
|
-
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; }
|
|
1577
|
-
var FilterButton = function FilterButton(_ref) {
|
|
1578
|
-
var buttonProps = _ref.buttonProps,
|
|
1579
|
-
props = _objectWithoutProperties(_ref, _excluded$3);
|
|
1580
|
-
var _useTranslation = reactI18next.useTranslation(),
|
|
1581
|
-
t = _useTranslation.t;
|
|
1582
|
-
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1583
|
-
className: "neeto-molecules-subheader__filter"
|
|
1584
|
-
}, /*#__PURE__*/React__default["default"].createElement(neetoFiltersFrontend.Filters, _extends$1({
|
|
1585
|
-
buttonProps: _objectSpread$4({
|
|
1586
|
-
"data-testid": "filter-button",
|
|
1587
|
-
icon: neetoIcons.Filter,
|
|
1588
|
-
style: "text",
|
|
1589
|
-
tooltipProps: {
|
|
1590
|
-
content: t("neetoMolecules.common.filter"),
|
|
1591
|
-
position: "bottom"
|
|
1592
|
-
},
|
|
1593
|
-
label: null
|
|
1594
|
-
}, buttonProps)
|
|
1595
|
-
}, props)));
|
|
1596
|
-
};
|
|
1597
|
-
|
|
1598
|
-
var RightBlock = function RightBlock(_ref) {
|
|
1599
|
-
var downloadButtonProps = _ref.downloadButtonProps,
|
|
1600
|
-
columnsButtonProps = _ref.columnsButtonProps,
|
|
1601
|
-
filterProps = _ref.filterProps,
|
|
1602
|
-
dataProps = _ref.dataProps;
|
|
1603
|
-
var showIcons = neetoCist.isNotPresent(dataProps === null || dataProps === void 0 ? void 0 : dataProps.totalCount) ? true : (dataProps === null || dataProps === void 0 ? void 0 : dataProps.totalCount) > 0;
|
|
1604
|
-
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1605
|
-
"data-testid": "subheader-rightblock-buttons-container",
|
|
1606
|
-
className: classnames__default["default"]("neeto-molecules-subheader__right-actions", {
|
|
1607
|
-
hidden: ramda.not(showIcons)
|
|
1608
|
-
})
|
|
1609
|
-
}, downloadButtonProps && /*#__PURE__*/React__default["default"].createElement(DownloadButton, downloadButtonProps), columnsButtonProps && /*#__PURE__*/React__default["default"].createElement(Columns, columnsButtonProps), filterProps && /*#__PURE__*/React__default["default"].createElement(FilterButton, filterProps));
|
|
1610
|
-
};
|
|
1611
|
-
|
|
1612
|
-
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}";
|
|
1613
|
-
n(css$1,{});
|
|
1614
|
-
|
|
1615
|
-
var SubHeader = function SubHeader(_ref) {
|
|
1616
|
-
var _ref$className = _ref.className,
|
|
1617
|
-
className = _ref$className === void 0 ? "" : _ref$className,
|
|
1618
|
-
leftActionBlock = _ref.leftActionBlock,
|
|
1619
|
-
rightActionBlock = _ref.rightActionBlock,
|
|
1620
|
-
_ref$dataCy = _ref["data-cy"],
|
|
1621
|
-
dataCy = _ref$dataCy === void 0 ? "subheader" : _ref$dataCy;
|
|
1622
|
-
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1623
|
-
className: classnames__default["default"](["neeto-molecules-subheader", className]),
|
|
1624
|
-
"data-cy": dataCy,
|
|
1625
|
-
"data-testid": "subheader"
|
|
1626
|
-
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1627
|
-
className: "neeto-molecules-subheader__left-wrapper",
|
|
1628
|
-
"data-cy": "subheader-left-wrapper"
|
|
1629
|
-
}, leftActionBlock && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1630
|
-
className: "neeto-molecules-subheader__left",
|
|
1631
|
-
"data-cy": "subheader-left"
|
|
1632
|
-
}, leftActionBlock)), rightActionBlock && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1633
|
-
className: "neeto-molecules-subheader__right",
|
|
1634
|
-
"data-cy": "subheader-right"
|
|
1635
|
-
}, rightActionBlock));
|
|
1636
|
-
};
|
|
1637
|
-
SubHeader.RightBlock = RightBlock;
|
|
1638
|
-
|
|
1639
|
-
var DeleteAlert = function DeleteAlert(_ref) {
|
|
1640
|
-
var onClose = _ref.onClose,
|
|
1641
|
-
onSubmit = _ref.onSubmit,
|
|
1642
|
-
isOpen = _ref.isOpen,
|
|
1643
|
-
isSubmitting = _ref.isSubmitting,
|
|
1644
|
-
hostname = _ref.hostname;
|
|
1645
|
-
var _useTranslation = reactI18next.useTranslation(),
|
|
1646
|
-
t = _useTranslation.t;
|
|
1647
|
-
return /*#__PURE__*/React__default["default"].createElement(neetoui.Alert, {
|
|
1648
|
-
cancelButtonLabel: t("neetoMolecules.common.actions.cancel"),
|
|
1649
|
-
isOpen: isOpen,
|
|
1650
|
-
isSubmitting: isSubmitting,
|
|
1651
|
-
submitButtonLabel: t("neetoMolecules.common.actions.delete"),
|
|
1652
|
-
title: t("neetoMolecules.customDomain.delete"),
|
|
1653
|
-
message: /*#__PURE__*/React__default["default"].createElement(reactI18next.Trans, {
|
|
1654
|
-
i18nKey: "neetoMolecules.customDomain.alertMessage",
|
|
1655
|
-
values: {
|
|
1656
|
-
hostname: hostname
|
|
1657
|
-
}
|
|
1658
|
-
}),
|
|
1659
|
-
onClose: onClose,
|
|
1660
|
-
onSubmit: onSubmit
|
|
1661
|
-
});
|
|
1662
|
-
};
|
|
1663
|
-
|
|
1664
|
-
var SIZES = {
|
|
1665
|
-
nano: "nano",
|
|
1666
|
-
small: "small",
|
|
1667
|
-
large: "large"
|
|
1668
|
-
};
|
|
1669
|
-
var DROPDOWN_BUTTON_SIZES = {
|
|
1670
|
-
nano: "small",
|
|
1671
|
-
small: "medium",
|
|
1672
|
-
large: "large"
|
|
1673
|
-
};
|
|
1674
|
-
|
|
1675
|
-
var Dropdown = function Dropdown(props) {
|
|
1676
|
-
return /*#__PURE__*/React__default["default"].createElement(neetoui.Dropdown, _extends$1({
|
|
1677
|
-
buttonSize: DROPDOWN_BUTTON_SIZES[props.size],
|
|
1678
|
-
buttonStyle: "secondary",
|
|
1679
|
-
icon: neetoIcons.MenuHorizontal,
|
|
1680
|
-
position: "bottom-start",
|
|
1681
|
-
strategy: "fixed"
|
|
1682
|
-
}, props));
|
|
1683
|
-
};
|
|
1684
|
-
|
|
1685
|
-
var css = ":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}}";
|
|
1686
|
-
n(css,{});
|
|
1687
|
-
|
|
1688
|
-
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; }
|
|
1689
|
-
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; }
|
|
1690
|
-
var Header$2 = function Header(_ref) {
|
|
1691
|
-
var title = _ref.title,
|
|
1692
|
-
searchProps = _ref.searchProps,
|
|
1693
|
-
_ref$className = _ref.className,
|
|
1694
|
-
className = _ref$className === void 0 ? "" : _ref$className,
|
|
1695
|
-
actionBlock = _ref.actionBlock,
|
|
1696
|
-
_ref$breadcrumbs = _ref.breadcrumbs,
|
|
1697
|
-
breadcrumbs = _ref$breadcrumbs === void 0 ? [] : _ref$breadcrumbs,
|
|
1698
|
-
_ref$renderDropdown = _ref.renderDropdown,
|
|
1699
|
-
renderDropdown = _ref$renderDropdown === void 0 ? neetoCist.noop : _ref$renderDropdown,
|
|
1700
|
-
_ref$size = _ref.size,
|
|
1701
|
-
size = _ref$size === void 0 ? "large" : _ref$size,
|
|
1702
|
-
_ref$dataTestid = _ref["data-testid"],
|
|
1703
|
-
dataTestId = _ref$dataTestid === void 0 ? "neeto-molecules-header" : _ref$dataTestid;
|
|
1704
|
-
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1705
|
-
"data-cy": "neeto-molecules-header",
|
|
1706
|
-
"data-testid": dataTestId,
|
|
1707
|
-
className: classnames__default["default"](["neeto-molecules-header", {
|
|
1708
|
-
"neeto-molecules-header--has-breadcrumbs": neetoCist.isNotEmpty(breadcrumbs),
|
|
1709
|
-
"neeto-molecules-header--large": size === SIZES.large,
|
|
1710
|
-
"neeto-molecules-header--small": size === SIZES.small,
|
|
1711
|
-
"neeto-molecules-header--nano": size === SIZES.nano
|
|
1712
|
-
}, className])
|
|
1713
|
-
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1714
|
-
className: "neeto-molecules-header__left"
|
|
1715
|
-
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1716
|
-
className: "neeto-molecules-header__left-data-wrap"
|
|
1717
|
-
}, neetoCist.isNotEmpty(breadcrumbs) && /*#__PURE__*/React__default["default"].createElement(Breadcrumbs__default["default"], {
|
|
1718
|
-
breadcrumbs: breadcrumbs
|
|
1719
|
-
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1720
|
-
className: "neeto-molecules-header__page-title"
|
|
1721
|
-
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
1722
|
-
"data-cy": "main-header",
|
|
1723
|
-
"data-test-id": "main-header",
|
|
1724
|
-
lineHeight: "tight",
|
|
1725
|
-
style: "h2",
|
|
1726
|
-
weight: "semibold"
|
|
1727
|
-
}, title), renderDropdown(function (props) {
|
|
1728
|
-
return /*#__PURE__*/React__default["default"].createElement(Dropdown, _objectSpread$3({
|
|
1729
|
-
size: size
|
|
1730
|
-
}, props));
|
|
1731
|
-
})))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1732
|
-
className: "neeto-molecules-header__right"
|
|
1733
|
-
}, searchProps && /*#__PURE__*/React__default["default"].createElement(Search__default["default"], _extends$1({
|
|
1734
|
-
className: classnames__default["default"](["neeto-molecules-header__search-input", searchProps.className])
|
|
1735
|
-
}, searchProps)), actionBlock && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1736
|
-
className: "neeto-molecules-header__action-block"
|
|
1737
|
-
}, actionBlock)));
|
|
1738
|
-
};
|
|
1739
50
|
|
|
1740
51
|
var Header = withT__default["default"](function (_ref) {
|
|
1741
52
|
var t = _ref.t,
|
|
@@ -1743,7 +54,7 @@ var Header = withT__default["default"](function (_ref) {
|
|
|
1743
54
|
searchTerm = _ref.searchTerm,
|
|
1744
55
|
setSearchTerm = _ref.setSearchTerm,
|
|
1745
56
|
headerProps = _ref.headerProps;
|
|
1746
|
-
return /*#__PURE__*/React__default["default"].createElement(Header$2, _extends
|
|
57
|
+
return /*#__PURE__*/React__default["default"].createElement(Header$2, _extends._extends({
|
|
1747
58
|
"data-testid": "custom-domain-header",
|
|
1748
59
|
title: t("neetoMolecules.customDomain.customDomain", constants.PLURAL),
|
|
1749
60
|
actionBlock: /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
@@ -1764,524 +75,30 @@ var Header = withT__default["default"](function (_ref) {
|
|
|
1764
75
|
});
|
|
1765
76
|
var Header$1 = /*#__PURE__*/React__default["default"].memo(Header);
|
|
1766
77
|
|
|
1767
|
-
var HOSTNAME_REGEX = /^(?!-)[a-zA-Z0-9][a-zA-Z0-9-]{1,61}[a-zA-Z0-9](?:\.[a-zA-Z]{2,})+/;
|
|
1768
|
-
var INITIAL_VALUES = {
|
|
1769
|
-
hostname: ""
|
|
1770
|
-
};
|
|
1771
|
-
|
|
1772
|
-
var MENU_ITEM_TYPES = {
|
|
1773
|
-
menuItem: "menuItem",
|
|
1774
|
-
divider: "divider"
|
|
1775
|
-
};
|
|
1776
|
-
var DEFAULT_TOOLTIP_PROPS = {
|
|
1777
|
-
disabled: true,
|
|
1778
|
-
position: "bottom"
|
|
1779
|
-
};
|
|
1780
|
-
|
|
1781
|
-
var _excluded$2 = ["label", "key"],
|
|
1782
|
-
_excluded2 = ["isVisible", "key"];
|
|
1783
|
-
var MenuItem$1 = neetoui.Dropdown.MenuItem,
|
|
1784
|
-
Menu$1 = neetoui.Dropdown.Menu;
|
|
1785
|
-
var Submenu = function Submenu(_ref) {
|
|
1786
|
-
var label = _ref.label,
|
|
1787
|
-
key = _ref.key,
|
|
1788
|
-
menuItemProps = _objectWithoutProperties(_ref, _excluded$2);
|
|
1789
|
-
return /*#__PURE__*/React__default["default"].createElement(neetoui.Dropdown, _extends$1({
|
|
1790
|
-
customTarget: /*#__PURE__*/React__default["default"].createElement(MenuItem$1.Button, null, label),
|
|
1791
|
-
key: key,
|
|
1792
|
-
position: "left",
|
|
1793
|
-
trigger: "hover"
|
|
1794
|
-
}, menuItemProps.dropdownProps), /*#__PURE__*/React__default["default"].createElement(Menu$1, null, menuItemProps.menuItems.map(function (_ref2) {
|
|
1795
|
-
var _ref2$isVisible = _ref2.isVisible,
|
|
1796
|
-
isVisible = _ref2$isVisible === void 0 ? true : _ref2$isVisible,
|
|
1797
|
-
key = _ref2.key,
|
|
1798
|
-
menuItemProps = _objectWithoutProperties(_ref2, _excluded2);
|
|
1799
|
-
if (!isVisible) return null;
|
|
1800
|
-
return /*#__PURE__*/React__default["default"].createElement(MoreDropdownMenuItem, _extends$1({
|
|
1801
|
-
key: key
|
|
1802
|
-
}, menuItemProps));
|
|
1803
|
-
})));
|
|
1804
|
-
};
|
|
1805
|
-
|
|
1806
|
-
var _excluded$1 = ["onClick", "label", "type", "hasSubItems"];
|
|
1807
|
-
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; }
|
|
1808
|
-
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; }
|
|
1809
|
-
var MenuItem = neetoui.Dropdown.MenuItem,
|
|
1810
|
-
Divider = neetoui.Dropdown.Divider;
|
|
1811
|
-
var MoreDropdownMenuItem = function MoreDropdownMenuItem(_ref) {
|
|
1812
|
-
var onClick = _ref.onClick,
|
|
1813
|
-
label = _ref.label,
|
|
1814
|
-
_ref$type = _ref.type,
|
|
1815
|
-
type = _ref$type === void 0 ? MENU_ITEM_TYPES.menuItem : _ref$type,
|
|
1816
|
-
_ref$hasSubItems = _ref.hasSubItems,
|
|
1817
|
-
hasSubItems = _ref$hasSubItems === void 0 ? false : _ref$hasSubItems,
|
|
1818
|
-
menuItemProps = _objectWithoutProperties(_ref, _excluded$1);
|
|
1819
|
-
if (type === MENU_ITEM_TYPES.divider) {
|
|
1820
|
-
return /*#__PURE__*/React__default["default"].createElement(Divider, null);
|
|
1821
|
-
}
|
|
1822
|
-
if (hasSubItems) {
|
|
1823
|
-
return /*#__PURE__*/React__default["default"].createElement(Submenu, _objectSpread$2({
|
|
1824
|
-
label: label
|
|
1825
|
-
}, menuItemProps));
|
|
1826
|
-
}
|
|
1827
|
-
return /*#__PURE__*/React__default["default"].createElement(MenuItem.Button, _objectSpread$2({
|
|
1828
|
-
onClick: onClick
|
|
1829
|
-
}, menuItemProps), label);
|
|
1830
|
-
};
|
|
1831
|
-
|
|
1832
|
-
var _excluded = ["isVisible", "key"];
|
|
1833
|
-
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; }
|
|
1834
|
-
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; }
|
|
1835
|
-
var Menu = neetoui.Dropdown.Menu;
|
|
1836
|
-
var MoreDropdown = function MoreDropdown(_ref) {
|
|
1837
|
-
var _ref$dropdownButtonPr = _ref.dropdownButtonProps,
|
|
1838
|
-
dropdownButtonProps = _ref$dropdownButtonPr === void 0 ? {} : _ref$dropdownButtonPr,
|
|
1839
|
-
_ref$isVertical = _ref.isVertical,
|
|
1840
|
-
isVertical = _ref$isVertical === void 0 ? false : _ref$isVertical,
|
|
1841
|
-
_ref$isDisabled = _ref.isDisabled,
|
|
1842
|
-
isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
|
|
1843
|
-
_ref$dropdownProps = _ref.dropdownProps,
|
|
1844
|
-
dropdownProps = _ref$dropdownProps === void 0 ? {} : _ref$dropdownProps,
|
|
1845
|
-
menuTopChildren = _ref.menuTopChildren,
|
|
1846
|
-
menuBottomChildren = _ref.menuBottomChildren,
|
|
1847
|
-
_ref$menuItems = _ref.menuItems,
|
|
1848
|
-
menuItems = _ref$menuItems === void 0 ? [] : _ref$menuItems;
|
|
1849
|
-
var _useTranslation = reactI18next.useTranslation(),
|
|
1850
|
-
t = _useTranslation.t;
|
|
1851
|
-
var tooltipProps = ramda.mergeRight(DEFAULT_TOOLTIP_PROPS, dropdownButtonProps.tooltipProps);
|
|
1852
|
-
var targetIcon = isVertical ? neetoIcons.MenuVertical : neetoIcons.MenuHorizontal;
|
|
1853
|
-
var isDropdownDisabled = isDisabled || dropdownProps.disabled;
|
|
1854
|
-
if (isDropdownDisabled && !tooltipProps.disabled) {
|
|
1855
|
-
return /*#__PURE__*/React__default["default"].createElement(neetoui.Tooltip, tooltipProps, /*#__PURE__*/React__default["default"].createElement("span", null, /*#__PURE__*/React__default["default"].createElement(neetoui.Button, _extends$1({
|
|
1856
|
-
disabled: true,
|
|
1857
|
-
"data-cy": "more-dropdown-button",
|
|
1858
|
-
"data-testid": "nui-dropdown-button",
|
|
1859
|
-
icon: targetIcon,
|
|
1860
|
-
iconPosition: "right",
|
|
1861
|
-
size: "medium",
|
|
1862
|
-
style: "text"
|
|
1863
|
-
}, dropdownButtonProps))));
|
|
1864
|
-
}
|
|
1865
|
-
return /*#__PURE__*/React__default["default"].createElement(neetoui.Dropdown, _extends$1({
|
|
1866
|
-
autoWidth: true,
|
|
1867
|
-
className: "flex",
|
|
1868
|
-
disabled: isDisabled,
|
|
1869
|
-
icon: targetIcon,
|
|
1870
|
-
buttonProps: _objectSpread$1({
|
|
1871
|
-
className: "min-h-0 flex-shrink-0",
|
|
1872
|
-
style: "text",
|
|
1873
|
-
tooltipProps: {
|
|
1874
|
-
content: t("neetoMolecules.moreDropdown.tooltip"),
|
|
1875
|
-
position: "top"
|
|
1876
|
-
}
|
|
1877
|
-
}, dropdownButtonProps)
|
|
1878
|
-
}, dropdownProps), /*#__PURE__*/React__default["default"].createElement(Menu, null, menuTopChildren, menuItems.map(function (_ref2) {
|
|
1879
|
-
var _ref2$isVisible = _ref2.isVisible,
|
|
1880
|
-
isVisible = _ref2$isVisible === void 0 ? true : _ref2$isVisible,
|
|
1881
|
-
key = _ref2.key,
|
|
1882
|
-
menuItemProps = _objectWithoutProperties(_ref2, _excluded);
|
|
1883
|
-
if (!isVisible) return null;
|
|
1884
|
-
return /*#__PURE__*/React__default["default"].createElement(MoreDropdownMenuItem, _extends$1({
|
|
1885
|
-
key: key
|
|
1886
|
-
}, menuItemProps));
|
|
1887
|
-
}), menuBottomChildren));
|
|
1888
|
-
};
|
|
1889
|
-
|
|
1890
|
-
var TagBlock = function TagBlock(_ref) {
|
|
1891
|
-
var status = _ref.status,
|
|
1892
|
-
_ref$stacked = _ref.stacked,
|
|
1893
|
-
stacked = _ref$stacked === void 0 ? false : _ref$stacked;
|
|
1894
|
-
var _useTranslation = reactI18next.useTranslation(),
|
|
1895
|
-
t = _useTranslation.t;
|
|
1896
|
-
var isDomainValidated = status === "active" || status === "pending_cname_validation";
|
|
1897
|
-
var camelCasedStatus = neetoCist.snakeToCamelCase(status || "");
|
|
1898
|
-
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1899
|
-
className: classnames__default["default"]("flex gap-2", {
|
|
1900
|
-
"flex-col items-start": stacked
|
|
1901
|
-
})
|
|
1902
|
-
}, status === "failed" ? /*#__PURE__*/React__default["default"].createElement(neetoui.Tag, {
|
|
1903
|
-
indicatorStyle: "danger",
|
|
1904
|
-
label: t("neetoMolecules.customDomain.status.".concat(camelCasedStatus)),
|
|
1905
|
-
style: "secondary"
|
|
1906
|
-
}) : /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(neetoui.Tag, {
|
|
1907
|
-
"data-cy": "".concat(general.hyphenize(status), "-tag-container"),
|
|
1908
|
-
indicatorStyle: isDomainValidated ? "success" : "warning",
|
|
1909
|
-
style: "secondary",
|
|
1910
|
-
label: t("neetoMolecules.customDomain.status.domain.".concat(camelCasedStatus))
|
|
1911
|
-
}), isDomainValidated && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1912
|
-
className: classnames__default["default"]("flex items-center justify-between gap-2", {
|
|
1913
|
-
"w-full": stacked
|
|
1914
|
-
})
|
|
1915
|
-
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Tag, {
|
|
1916
|
-
"data-cy": "".concat(general.hyphenize(status), "-tag-container"),
|
|
1917
|
-
indicatorStyle: status === "active" ? "success" : "warning",
|
|
1918
|
-
style: "secondary",
|
|
1919
|
-
label: t("neetoMolecules.customDomain.status.cname.".concat(camelCasedStatus))
|
|
1920
|
-
}))));
|
|
1921
|
-
};
|
|
1922
|
-
var TagBlock$1 = /*#__PURE__*/React__default["default"].memo(TagBlock);
|
|
1923
|
-
|
|
1924
|
-
var renderColumnData = function renderColumnData(enableManagePane, enableDeleteAlert) {
|
|
1925
|
-
return [{
|
|
1926
|
-
title: i18next.t("neetoMolecules.customDomain.customDomain", constants.SINGULAR),
|
|
1927
|
-
dataIndex: "hostname",
|
|
1928
|
-
key: "hostname",
|
|
1929
|
-
width: "60%",
|
|
1930
|
-
render: function render(hostName, customDomain) {
|
|
1931
|
-
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1932
|
-
className: "flex items-center justify-between gap-x-3"
|
|
1933
|
-
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
1934
|
-
style: "body2"
|
|
1935
|
-
}, hostName), /*#__PURE__*/React__default["default"].createElement(MoreDropdown, {
|
|
1936
|
-
dropdownButtonProps: {
|
|
1937
|
-
"data-testid": "nui-dropdown-icon-".concat(customDomain.id)
|
|
1938
|
-
},
|
|
1939
|
-
dropdownProps: {
|
|
1940
|
-
position: "bottom-end",
|
|
1941
|
-
strategy: "fixed",
|
|
1942
|
-
autoWidth: true
|
|
1943
|
-
},
|
|
1944
|
-
menuItems: [{
|
|
1945
|
-
label: i18next.t("neetoMolecules.common.actions.edit"),
|
|
1946
|
-
onClick: function onClick() {
|
|
1947
|
-
return enableManagePane(customDomain);
|
|
1948
|
-
},
|
|
1949
|
-
key: "edit-custom-domain-button"
|
|
1950
|
-
}, {
|
|
1951
|
-
label: i18next.t("neetoMolecules.common.actions.delete"),
|
|
1952
|
-
onClick: function onClick() {
|
|
1953
|
-
return enableDeleteAlert(customDomain);
|
|
1954
|
-
},
|
|
1955
|
-
key: "delete-custom-domain"
|
|
1956
|
-
}]
|
|
1957
|
-
}));
|
|
1958
|
-
}
|
|
1959
|
-
}, {
|
|
1960
|
-
title: i18next.t("neetoMolecules.common.status"),
|
|
1961
|
-
dataIndex: "status",
|
|
1962
|
-
key: "status",
|
|
1963
|
-
render: function render(status) {
|
|
1964
|
-
return /*#__PURE__*/React__default["default"].createElement(TagBlock$1, {
|
|
1965
|
-
status: status
|
|
1966
|
-
});
|
|
1967
|
-
},
|
|
1968
|
-
width: "40%"
|
|
1969
|
-
}];
|
|
1970
|
-
};
|
|
1971
|
-
var recordData = function recordData(customDomain) {
|
|
1972
|
-
var status = customDomain.status,
|
|
1973
|
-
hostname = customDomain.hostname,
|
|
1974
|
-
dnsTarget = customDomain.dnsTarget,
|
|
1975
|
-
cnameValidationParams = customDomain.cnameValidationParams;
|
|
1976
|
-
var isDomainValidated = status === "active" || status === "pending_cname_validation";
|
|
1977
|
-
var recordName = isDomainValidated ? hostname : cnameValidationParams === null || cnameValidationParams === void 0 ? void 0 : cnameValidationParams.name;
|
|
1978
|
-
var recordValue = isDomainValidated ? dnsTarget : cnameValidationParams === null || cnameValidationParams === void 0 ? void 0 : cnameValidationParams.value;
|
|
1979
|
-
var recordType = isDomainValidated ? i18next.t("neetoMolecules.customDomain.cname") : i18next.t("neetoMolecules.customDomain.domainValidationCname");
|
|
1980
|
-
var recordDescription = isDomainValidated ? i18next.t("neetoMolecules.customDomain.validation.desc", {
|
|
1981
|
-
record: recordType
|
|
1982
|
-
}) : i18next.t("neetoMolecules.customDomain.validation.desc", {
|
|
1983
|
-
record: recordType,
|
|
1984
|
-
proxyMessage: i18next.t("neetoMolecules.customDomain.validation.proxyMessage")
|
|
1985
|
-
});
|
|
1986
|
-
var recordNameLabel = i18next.t("neetoMolecules.customDomain.validation.record", {
|
|
1987
|
-
record: recordType,
|
|
1988
|
-
type: i18next.t("neetoMolecules.common.name")
|
|
1989
|
-
});
|
|
1990
|
-
var recordValueLabel = i18next.t("neetoMolecules.customDomain.validation.record", {
|
|
1991
|
-
record: recordType,
|
|
1992
|
-
type: i18next.t("neetoMolecules.common.value")
|
|
1993
|
-
});
|
|
1994
|
-
return {
|
|
1995
|
-
recordName: recordName,
|
|
1996
|
-
recordValue: recordValue,
|
|
1997
|
-
recordDescription: recordDescription,
|
|
1998
|
-
recordNameLabel: recordNameLabel,
|
|
1999
|
-
recordValueLabel: recordValueLabel
|
|
2000
|
-
};
|
|
2001
|
-
};
|
|
2002
|
-
|
|
2003
|
-
var Record = function Record(_ref) {
|
|
2004
|
-
var customDomain = _ref.customDomain;
|
|
2005
|
-
var _recordData = recordData(customDomain),
|
|
2006
|
-
recordName = _recordData.recordName,
|
|
2007
|
-
recordValue = _recordData.recordValue,
|
|
2008
|
-
recordDescription = _recordData.recordDescription,
|
|
2009
|
-
recordNameLabel = _recordData.recordNameLabel,
|
|
2010
|
-
recordValueLabel = _recordData.recordValueLabel;
|
|
2011
|
-
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2012
|
-
className: "mt-6 grid gap-4"
|
|
2013
|
-
}, customDomain.status !== "active" && /*#__PURE__*/React__default["default"].createElement(neetoui.Callout, {
|
|
2014
|
-
icon: neetoIcons.Info,
|
|
2015
|
-
style: "info"
|
|
2016
|
-
}, recordDescription), /*#__PURE__*/React__default["default"].createElement(neetoui.Input, {
|
|
2017
|
-
disabled: true,
|
|
2018
|
-
"data-cy": general.joinHyphenCase(recordNameLabel),
|
|
2019
|
-
label: recordNameLabel,
|
|
2020
|
-
value: recordName,
|
|
2021
|
-
suffix: /*#__PURE__*/React__default["default"].createElement(CopyToClipboardButton__default["default"], {
|
|
2022
|
-
size: "small",
|
|
2023
|
-
style: "text",
|
|
2024
|
-
value: recordName
|
|
2025
|
-
})
|
|
2026
|
-
}), /*#__PURE__*/React__default["default"].createElement(neetoui.Input, {
|
|
2027
|
-
disabled: true,
|
|
2028
|
-
"data-cy": general.joinHyphenCase(recordValueLabel),
|
|
2029
|
-
label: recordValueLabel,
|
|
2030
|
-
value: recordValue,
|
|
2031
|
-
suffix: /*#__PURE__*/React__default["default"].createElement(CopyToClipboardButton__default["default"], {
|
|
2032
|
-
size: "small",
|
|
2033
|
-
style: "text",
|
|
2034
|
-
value: recordValue
|
|
2035
|
-
})
|
|
2036
|
-
}));
|
|
2037
|
-
};
|
|
2038
|
-
var Record$1 = /*#__PURE__*/React__default["default"].memo(Record);
|
|
2039
|
-
|
|
2040
|
-
var StatusInfo = function StatusInfo() {
|
|
2041
|
-
var helpUrl = "https://help.".concat(globalProps.appName.toLowerCase(), ".com/articles/custom-domains");
|
|
2042
|
-
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2043
|
-
className: "space-y-6"
|
|
2044
|
-
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2045
|
-
className: "neeto-ui-rounded neeto-ui-bg-gray-100 neeto-ui-text-gray-700 space-y-3 p-4"
|
|
2046
|
-
}, /*#__PURE__*/React__default["default"].createElement(reactI18next.Trans, {
|
|
2047
|
-
i18nKey: "neetoMolecules.customDomain.messageBlock.dnsStatus",
|
|
2048
|
-
components: {
|
|
2049
|
-
a: /*#__PURE__*/React__default["default"].createElement("a", {
|
|
2050
|
-
className: "neeto-ui-btn--style-link",
|
|
2051
|
-
href: helpUrl,
|
|
2052
|
-
rel: "noreferrer",
|
|
2053
|
-
target: "_blank"
|
|
2054
|
-
})
|
|
2055
|
-
}
|
|
2056
|
-
})));
|
|
2057
|
-
};
|
|
2058
|
-
var StatusInfo$1 = /*#__PURE__*/React__default["default"].memo(StatusInfo);
|
|
2059
|
-
|
|
2060
|
-
var getCustomDomainValidationSchema = function getCustomDomainValidationSchema() {
|
|
2061
|
-
return Yup__namespace.object().shape({
|
|
2062
|
-
hostname: Yup__namespace.string().required(i18next.t("neetoMolecules.customDomain.formikValidation.required")).matches(HOSTNAME_REGEX, i18next.t("neetoMolecules.customDomain.formikValidation.valid"))
|
|
2063
|
-
});
|
|
2064
|
-
};
|
|
2065
|
-
|
|
2066
|
-
var getUrlwithId = function getUrlwithId(url, id) {
|
|
2067
|
-
return id ? "".concat(url, "/").concat(id) : url;
|
|
2068
|
-
};
|
|
2069
|
-
var fetchCustomDomains = function fetchCustomDomains(_ref) {
|
|
2070
|
-
var url = _ref.url,
|
|
2071
|
-
params = _ref.params;
|
|
2072
|
-
return axios__default["default"].get(url, {
|
|
2073
|
-
params: params
|
|
2074
|
-
});
|
|
2075
|
-
};
|
|
2076
|
-
var updateCustomDomain = function updateCustomDomain(url, id) {
|
|
2077
|
-
return axios__default["default"].patch(getUrlwithId(url, id));
|
|
2078
|
-
};
|
|
2079
|
-
var createCustomDomain = function createCustomDomain(url, payload) {
|
|
2080
|
-
return axios__default["default"].post(url, payload);
|
|
2081
|
-
};
|
|
2082
|
-
var deleteCustomDomain = function deleteCustomDomain(url, id) {
|
|
2083
|
-
return axios__default["default"]["delete"](getUrlwithId(url, id));
|
|
2084
|
-
};
|
|
2085
|
-
var validateDomain = function validateDomain(url, id) {
|
|
2086
|
-
return axios__default["default"].patch("".concat(getUrlwithId(url, id), "/validate_domain"));
|
|
2087
|
-
};
|
|
2088
|
-
var validateCname = function validateCname(url, id) {
|
|
2089
|
-
return axios__default["default"].patch("".concat(getUrlwithId(url, id), "/validate_cname"));
|
|
2090
|
-
};
|
|
2091
|
-
var customDomainApi = {
|
|
2092
|
-
createCustomDomain: createCustomDomain,
|
|
2093
|
-
deleteCustomDomain: deleteCustomDomain,
|
|
2094
|
-
validateDomain: validateDomain,
|
|
2095
|
-
fetchCustomDomains: fetchCustomDomains,
|
|
2096
|
-
validateCname: validateCname,
|
|
2097
|
-
updateCustomDomain: updateCustomDomain
|
|
2098
|
-
};
|
|
2099
|
-
|
|
2100
|
-
var DOMAIN_QUERY_KEY = "custom-domain";
|
|
2101
|
-
|
|
2102
|
-
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; }
|
|
2103
|
-
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; }
|
|
2104
|
-
var useCreateCustomDomain = function useCreateCustomDomain(url) {
|
|
2105
|
-
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
2106
|
-
return useMutationWithInvalidation__default["default"](function (payload) {
|
|
2107
|
-
return customDomainApi.createCustomDomain(url, payload);
|
|
2108
|
-
}, _objectSpread({
|
|
2109
|
-
keysToInvalidate: [DOMAIN_QUERY_KEY]
|
|
2110
|
-
}, options));
|
|
2111
|
-
};
|
|
2112
|
-
var useDeleteCustomDomain = function useDeleteCustomDomain(url) {
|
|
2113
|
-
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
2114
|
-
return useMutationWithInvalidation__default["default"](function (id) {
|
|
2115
|
-
return customDomainApi.deleteCustomDomain(url, id);
|
|
2116
|
-
}, _objectSpread({
|
|
2117
|
-
keysToInvalidate: [DOMAIN_QUERY_KEY]
|
|
2118
|
-
}, options));
|
|
2119
|
-
};
|
|
2120
|
-
var useFetchCustomDomains = function useFetchCustomDomains(params) {
|
|
2121
|
-
return reactQuery.useQuery([DOMAIN_QUERY_KEY, _objectSpread({}, params)], function () {
|
|
2122
|
-
return customDomainApi.fetchCustomDomains(params);
|
|
2123
|
-
});
|
|
2124
|
-
};
|
|
2125
|
-
var useValidateDomain = function useValidateDomain(url) {
|
|
2126
|
-
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
2127
|
-
return useMutationWithInvalidation__default["default"](function (id) {
|
|
2128
|
-
return customDomainApi.validateDomain(url, id);
|
|
2129
|
-
}, _objectSpread({
|
|
2130
|
-
keysToInvalidate: [DOMAIN_QUERY_KEY]
|
|
2131
|
-
}, options));
|
|
2132
|
-
};
|
|
2133
|
-
var useValidateCname = function useValidateCname(url) {
|
|
2134
|
-
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
2135
|
-
return useMutationWithInvalidation__default["default"](function (id) {
|
|
2136
|
-
return customDomainApi.validateCname(url, id);
|
|
2137
|
-
}, _objectSpread({
|
|
2138
|
-
keysToInvalidate: [DOMAIN_QUERY_KEY]
|
|
2139
|
-
}, options));
|
|
2140
|
-
};
|
|
2141
|
-
var useUpdateCustomDomain = function useUpdateCustomDomain(url) {
|
|
2142
|
-
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
2143
|
-
return useMutationWithInvalidation__default["default"](function (id) {
|
|
2144
|
-
return customDomainApi.updateCustomDomain(url, id);
|
|
2145
|
-
}, _objectSpread({
|
|
2146
|
-
keysToInvalidate: [DOMAIN_QUERY_KEY]
|
|
2147
|
-
}, options));
|
|
2148
|
-
};
|
|
2149
|
-
|
|
2150
|
-
var Manage = function Manage(_ref) {
|
|
2151
|
-
var isOpen = _ref.isOpen,
|
|
2152
|
-
onClose = _ref.onClose,
|
|
2153
|
-
customDomain = _ref.customDomain,
|
|
2154
|
-
setCustomDomain = _ref.setCustomDomain,
|
|
2155
|
-
url = _ref.url,
|
|
2156
|
-
hasOne = _ref.hasOne;
|
|
2157
|
-
var _useTranslation = reactI18next.useTranslation(),
|
|
2158
|
-
t = _useTranslation.t;
|
|
2159
|
-
var initialFocusRef = React.useRef(null);
|
|
2160
|
-
var customDomainId = hasOne ? null : customDomain === null || customDomain === void 0 ? void 0 : customDomain.id;
|
|
2161
|
-
var _useCreateCustomDomai = useCreateCustomDomain(url),
|
|
2162
|
-
createCustomDomain = _useCreateCustomDomai.mutate,
|
|
2163
|
-
isCreating = _useCreateCustomDomai.isLoading;
|
|
2164
|
-
var _useValidateDomain = useValidateDomain(url),
|
|
2165
|
-
validateDomain = _useValidateDomain.mutate,
|
|
2166
|
-
isValidating = _useValidateDomain.isLoading;
|
|
2167
|
-
var _useValidateCname = useValidateCname(url),
|
|
2168
|
-
validateCname = _useValidateCname.mutate,
|
|
2169
|
-
isCnameValidating = _useValidateCname.isLoading;
|
|
2170
|
-
var _useUpdateCustomDomai = useUpdateCustomDomain(url),
|
|
2171
|
-
updateCustomDomain = _useUpdateCustomDomai.mutate,
|
|
2172
|
-
isUpdating = _useUpdateCustomDomai.isLoading;
|
|
2173
|
-
var handleSubmit = function handleSubmit(values) {
|
|
2174
|
-
return createCustomDomain(values, {
|
|
2175
|
-
onSuccess: function onSuccess(values) {
|
|
2176
|
-
return setCustomDomain(values);
|
|
2177
|
-
}
|
|
2178
|
-
});
|
|
2179
|
-
};
|
|
2180
|
-
var handleValidateDomain = function handleValidateDomain() {
|
|
2181
|
-
return validateDomain(customDomainId, {
|
|
2182
|
-
onSuccess: function onSuccess(values) {
|
|
2183
|
-
return setCustomDomain(values);
|
|
2184
|
-
}
|
|
2185
|
-
});
|
|
2186
|
-
};
|
|
2187
|
-
var handleValidateCname = function handleValidateCname() {
|
|
2188
|
-
validateCname(customDomainId, {
|
|
2189
|
-
onSuccess: function onSuccess(data) {
|
|
2190
|
-
return setCustomDomain(data);
|
|
2191
|
-
}
|
|
2192
|
-
});
|
|
2193
|
-
};
|
|
2194
|
-
var handleUpdateCname = function handleUpdateCname() {
|
|
2195
|
-
updateCustomDomain(customDomainId, {
|
|
2196
|
-
onSuccess: function onSuccess(data) {
|
|
2197
|
-
return setCustomDomain(data);
|
|
2198
|
-
}
|
|
2199
|
-
});
|
|
2200
|
-
};
|
|
2201
|
-
return /*#__PURE__*/React__default["default"].createElement(neetoui.Pane, {
|
|
2202
|
-
initialFocusRef: initialFocusRef,
|
|
2203
|
-
isOpen: isOpen,
|
|
2204
|
-
onClose: onClose
|
|
2205
|
-
}, /*#__PURE__*/React__default["default"].createElement(formik.Formik, {
|
|
2206
|
-
enableReinitialize: true,
|
|
2207
|
-
initialValues: customDomain || INITIAL_VALUES,
|
|
2208
|
-
validationSchema: getCustomDomainValidationSchema(),
|
|
2209
|
-
onSubmit: handleSubmit
|
|
2210
|
-
}, function (_ref2) {
|
|
2211
|
-
var dirty = _ref2.dirty;
|
|
2212
|
-
return /*#__PURE__*/React__default["default"].createElement(formik.Form, null, /*#__PURE__*/React__default["default"].createElement(neetoui.Pane.Header, null, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
2213
|
-
"data-cy": "add-custom-domain-pane-heading",
|
|
2214
|
-
style: "h2",
|
|
2215
|
-
weight: "semibold"
|
|
2216
|
-
}, neetoCist.isNotEmpty(customDomain) ? t("neetoMolecules.customDomain.edit") : t("neetoMolecules.customDomain.addNew"))), /*#__PURE__*/React__default["default"].createElement(neetoui.Pane.Body, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2217
|
-
className: "w-full space-y-6"
|
|
2218
|
-
}, neetoCist.isNotEmpty(customDomain) && /*#__PURE__*/React__default["default"].createElement(TagBlock$1, {
|
|
2219
|
-
stacked: true,
|
|
2220
|
-
handleValidateCname: handleValidateCname,
|
|
2221
|
-
isCnameRecordsAdded: customDomain.addedCnameAt,
|
|
2222
|
-
status: customDomain.status
|
|
2223
|
-
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2224
|
-
className: "space-y-2"
|
|
2225
|
-
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Label, {
|
|
2226
|
-
required: true,
|
|
2227
|
-
htmlFor: "hostname"
|
|
2228
|
-
}, neetoCist.isNotEmpty(customDomain) ? t("neetoMolecules.customDomain.customDomain", constants.SINGULAR) : t("neetoMolecules.customDomain.label")), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2229
|
-
className: "flex items-start gap-2"
|
|
2230
|
-
}, /*#__PURE__*/React__default["default"].createElement(formik$1.Input, {
|
|
2231
|
-
"data-cy": "custom-domain-input-field",
|
|
2232
|
-
disabled: neetoCist.isNotEmpty(customDomain),
|
|
2233
|
-
name: "hostname",
|
|
2234
|
-
placeholder: t("neetoMolecules.customDomain.placeholder"),
|
|
2235
|
-
ref: initialFocusRef
|
|
2236
|
-
}), !neetoCist.isNotEmpty(customDomain) && /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
2237
|
-
"data-cy": "submit-custom-domain-button",
|
|
2238
|
-
"data-testid": "submit-custom-domain-button",
|
|
2239
|
-
disabled: !dirty || isCreating,
|
|
2240
|
-
icon: neetoIcons.Check,
|
|
2241
|
-
loading: isCreating,
|
|
2242
|
-
style: "primary",
|
|
2243
|
-
type: "submit"
|
|
2244
|
-
}))), neetoCist.isNotEmpty(customDomain) && /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(Record$1, {
|
|
2245
|
-
customDomain: customDomain
|
|
2246
|
-
}), customDomain.status === "pending_domain_validation" && /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
2247
|
-
"data-cy": "validate-domain-button",
|
|
2248
|
-
disabled: isValidating,
|
|
2249
|
-
loading: isValidating,
|
|
2250
|
-
label: t("neetoMolecules.customDomain.validation.buttonLabel.domain"),
|
|
2251
|
-
onClick: handleValidateDomain
|
|
2252
|
-
}), customDomain.status === "pending_cname_validation" && /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
2253
|
-
"data-cy": "validate-cname-record-button",
|
|
2254
|
-
loading: isCnameValidating || isUpdating,
|
|
2255
|
-
label: t("neetoMolecules.customDomain.validation.buttonLabel.cnameAdded"),
|
|
2256
|
-
onClick: handleUpdateCname
|
|
2257
|
-
}), /*#__PURE__*/React__default["default"].createElement(StatusInfo$1, null)))));
|
|
2258
|
-
}));
|
|
2259
|
-
};
|
|
2260
|
-
|
|
2261
78
|
var CustomDomainDashboard = function CustomDomainDashboard(_ref) {
|
|
2262
79
|
var _data$customDomains;
|
|
2263
80
|
var headerProps = _ref.headerProps,
|
|
2264
81
|
url = _ref.url;
|
|
2265
82
|
var _useState = React.useState(""),
|
|
2266
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
83
|
+
_useState2 = slicedToArray._slicedToArray(_useState, 2),
|
|
2267
84
|
searchTerm = _useState2[0],
|
|
2268
85
|
setSearchTerm = _useState2[1];
|
|
2269
86
|
var _useState3 = React.useState(false),
|
|
2270
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
87
|
+
_useState4 = slicedToArray._slicedToArray(_useState3, 2),
|
|
2271
88
|
isPaneOpen = _useState4[0],
|
|
2272
89
|
setIsPaneOpen = _useState4[1];
|
|
2273
90
|
var _useState5 = React.useState({}),
|
|
2274
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
91
|
+
_useState6 = slicedToArray._slicedToArray(_useState5, 2),
|
|
2275
92
|
customDomain = _useState6[0],
|
|
2276
93
|
setCustomDomain = _useState6[1];
|
|
2277
94
|
var _useState7 = React.useState(false),
|
|
2278
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
95
|
+
_useState8 = slicedToArray._slicedToArray(_useState7, 2),
|
|
2279
96
|
isAlertOpen = _useState8[0],
|
|
2280
97
|
setIsAlertOpen = _useState8[1];
|
|
2281
98
|
var _useTranslation = reactI18next.useTranslation(),
|
|
2282
99
|
t = _useTranslation.t;
|
|
2283
100
|
var debouncedSearchTerm = useDebounce__default["default"](searchTerm, 500);
|
|
2284
|
-
var _useFetchCustomDomain = useFetchCustomDomains({
|
|
101
|
+
var _useFetchCustomDomain = index.useFetchCustomDomains({
|
|
2285
102
|
url: url,
|
|
2286
103
|
params: {
|
|
2287
104
|
searchTerm: debouncedSearchTerm
|
|
@@ -2289,7 +106,7 @@ var CustomDomainDashboard = function CustomDomainDashboard(_ref) {
|
|
|
2289
106
|
}),
|
|
2290
107
|
data = _useFetchCustomDomain.data,
|
|
2291
108
|
isLoading = _useFetchCustomDomain.isLoading;
|
|
2292
|
-
var _useDeleteCustomDomai = useDeleteCustomDomain(url, {
|
|
109
|
+
var _useDeleteCustomDomai = index.useDeleteCustomDomain(url, {
|
|
2293
110
|
onSettled: function onSettled() {
|
|
2294
111
|
setIsAlertOpen(false);
|
|
2295
112
|
setCustomDomain({});
|
|
@@ -2320,7 +137,7 @@ var CustomDomainDashboard = function CustomDomainDashboard(_ref) {
|
|
|
2320
137
|
setSearchTerm: setSearchTerm
|
|
2321
138
|
}), isLoading && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2322
139
|
className: "h-screen w-full"
|
|
2323
|
-
}, /*#__PURE__*/React__default["default"].createElement(PageLoader
|
|
140
|
+
}, /*#__PURE__*/React__default["default"].createElement(PageLoader, null)), !isLoading && (neetoCist.isNotEmpty(data === null || data === void 0 ? void 0 : data.customDomains) ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2324
141
|
className: "w-full flex-grow"
|
|
2325
142
|
}, /*#__PURE__*/React__default["default"].createElement(SubHeader, {
|
|
2326
143
|
leftActionBlock: /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
@@ -2333,7 +150,7 @@ var CustomDomainDashboard = function CustomDomainDashboard(_ref) {
|
|
|
2333
150
|
allowRowClick: false,
|
|
2334
151
|
rowData: data === null || data === void 0 ? void 0 : data.customDomains,
|
|
2335
152
|
rowSelection: false,
|
|
2336
|
-
columnData: renderColumnData(enableManagePane, enableDeleteAlert)
|
|
153
|
+
columnData: index.renderColumnData(enableManagePane, enableDeleteAlert)
|
|
2337
154
|
}))) : /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2338
155
|
className: "flex h-full w-full flex-grow items-center justify-center"
|
|
2339
156
|
}, /*#__PURE__*/React__default["default"].createElement(neetoui.NoData, {
|
|
@@ -2344,14 +161,14 @@ var CustomDomainDashboard = function CustomDomainDashboard(_ref) {
|
|
|
2344
161
|
return setIsPaneOpen(true);
|
|
2345
162
|
}
|
|
2346
163
|
}
|
|
2347
|
-
})))), /*#__PURE__*/React__default["default"].createElement(Manage, {
|
|
164
|
+
})))), /*#__PURE__*/React__default["default"].createElement(index.Manage, {
|
|
2348
165
|
customDomain: customDomain,
|
|
2349
166
|
setCustomDomain: setCustomDomain,
|
|
2350
167
|
url: url,
|
|
2351
168
|
hasOne: false,
|
|
2352
169
|
isOpen: isPaneOpen,
|
|
2353
170
|
onClose: disableManagePane
|
|
2354
|
-
}), /*#__PURE__*/React__default["default"].createElement(DeleteAlert, {
|
|
171
|
+
}), /*#__PURE__*/React__default["default"].createElement(index.DeleteAlert, {
|
|
2355
172
|
hostname: customDomain === null || customDomain === void 0 ? void 0 : customDomain.hostname,
|
|
2356
173
|
isOpen: isAlertOpen,
|
|
2357
174
|
isSubmitting: isDeleting,
|