@bigbinary/neeto-molecules 1.11.3 → 1.11.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Breadcrumbs.js +7 -8
- package/dist/Breadcrumbs.js.map +1 -1
- package/dist/BrowserSupport.js +41 -138
- package/dist/BrowserSupport.js.map +1 -1
- package/dist/Builder.js +65 -319
- package/dist/Builder.js.map +1 -1
- package/dist/CalendarView.js +38 -321
- package/dist/CalendarView.js.map +1 -1
- package/dist/Codeblock.js +14 -207
- package/dist/Codeblock.js.map +1 -1
- package/dist/Columns-702d539a.js +206 -0
- package/dist/Columns-702d539a.js.map +1 -0
- package/dist/Columns.js +16 -342
- package/dist/Columns.js.map +1 -1
- package/dist/ConfirmationModal.js +10 -10
- package/dist/ConfirmationModal.js.map +1 -1
- package/dist/Container.js +4 -1186
- package/dist/Container.js.map +1 -1
- package/dist/CopyToClipboardButton.js +7 -144
- package/dist/CopyToClipboardButton.js.map +1 -1
- package/dist/Currency.js +4 -46
- package/dist/Currency.js.map +1 -1
- package/dist/CustomDomain.js +30 -635
- package/dist/CustomDomain.js.map +1 -1
- package/dist/CustomDomainDashboard.js +41 -2198
- package/dist/CustomDomainDashboard.js.map +1 -1
- package/dist/DateFormat.js +4 -18
- package/dist/DateFormat.js.map +1 -1
- package/dist/DateRangeFilter.js +7 -61
- package/dist/DateRangeFilter.js.map +1 -1
- package/dist/DocumentEditor.js +12 -121
- package/dist/DocumentEditor.js.map +1 -1
- package/dist/DownloadMobileAppCallout.js +4 -4
- package/dist/DownloadMobileAppCallout.js.map +1 -1
- package/dist/DynamicVariables.js +11 -94
- package/dist/DynamicVariables.js.map +1 -1
- package/dist/EmailForm.js +46 -1711
- package/dist/EmailForm.js.map +1 -1
- package/dist/EmailPreview.js +28 -1209
- package/dist/EmailPreview.js.map +1 -1
- package/dist/EmojiPicker.js +5 -73
- package/dist/EmojiPicker.js.map +1 -1
- package/dist/EmojiReactions.js +13 -67
- package/dist/EmojiReactions.js.map +1 -1
- package/dist/ErrorPage.js +1 -15
- package/dist/ErrorPage.js.map +1 -1
- package/dist/FloatingActionMenu.js +72 -1399
- package/dist/FloatingActionMenu.js.map +1 -1
- package/dist/Header.js +26 -72
- package/dist/Header.js.map +1 -1
- package/dist/HelpPopover.js +14 -96
- package/dist/HelpPopover.js.map +1 -1
- package/dist/IconPicker.js +26 -123
- package/dist/IconPicker.js.map +1 -1
- package/dist/ImageWithFallback.js +8 -144
- package/dist/ImageWithFallback.js.map +1 -1
- package/dist/InlineInput.js +16 -522
- package/dist/InlineInput.js.map +1 -1
- package/dist/IntegrationCard.js +30 -229
- package/dist/IntegrationCard.js.map +1 -1
- package/dist/IntegrationDisconnectAlert.js +4 -46
- package/dist/IntegrationDisconnectAlert.js.map +1 -1
- package/dist/IntegrationWalkthroughModal.js +7 -7
- package/dist/IntegrationWalkthroughModal.js.map +1 -1
- package/dist/IpRestriction.js +16 -196
- package/dist/IpRestriction.js.map +1 -1
- package/dist/KeyboardShortcuts.js +24 -119
- package/dist/KeyboardShortcuts.js.map +1 -1
- package/dist/LoginPage.js +22 -445
- package/dist/LoginPage.js.map +1 -1
- package/dist/MenuBar.js +29 -1293
- package/dist/MenuBar.js.map +1 -1
- package/dist/Metadata.js +27 -82
- package/dist/Metadata.js.map +1 -1
- package/dist/MoreDropdown.js +15 -97
- package/dist/MoreDropdown.js.map +1 -1
- package/dist/NavigationHeader.js +39 -709
- package/dist/NavigationHeader.js.map +1 -1
- package/dist/NeetoWidget.js +15 -234
- package/dist/NeetoWidget.js.map +1 -1
- package/dist/Onboarding.js +16 -1212
- package/dist/Onboarding.js.map +1 -1
- package/dist/PageLoader.js +5 -48
- package/dist/PageLoader.js.map +1 -1
- package/dist/PhoneNumber.js +22 -156
- package/dist/PhoneNumber.js.map +1 -1
- package/dist/ProductEmbed.js +83 -172
- package/dist/ProductEmbed.js.map +1 -1
- package/dist/PublishBlock.js +15 -58
- package/dist/PublishBlock.js.map +1 -1
- package/dist/PublishYourItem.js +9 -1190
- package/dist/PublishYourItem.js.map +1 -1
- package/dist/Rename.js +30 -330
- package/dist/Rename.js.map +1 -1
- package/dist/ResponsiveDevicePicker.js +7 -143
- package/dist/ResponsiveDevicePicker.js.map +1 -1
- package/dist/Schedule.js +62 -331
- package/dist/Schedule.js.map +1 -1
- package/dist/Scrollable.js +6 -89
- package/dist/Scrollable.js.map +1 -1
- package/dist/Search.js +7 -143
- package/dist/Search.js.map +1 -1
- package/dist/Security.js +37 -1573
- package/dist/Security.js.map +1 -1
- package/dist/SendToFields.js +41 -124
- package/dist/SendToFields.js.map +1 -1
- package/dist/Settings.js +32 -488
- package/dist/Settings.js.map +1 -1
- package/dist/ShareViaEmail.js +51 -1746
- package/dist/ShareViaEmail.js.map +1 -1
- package/dist/ShareViaLink.js +83 -331
- package/dist/ShareViaLink.js.map +1 -1
- package/dist/Sidebar.js +143 -406
- package/dist/Sidebar.js.map +1 -1
- package/dist/SubHeader.js +27 -105
- package/dist/SubHeader.js.map +1 -1
- package/dist/SuffixedInput.js +15 -120
- package/dist/SuffixedInput.js.map +1 -1
- package/dist/TableWrapper.js +7 -8
- package/dist/TableWrapper.js.map +1 -1
- package/dist/Taxonomy.js +74 -1780
- package/dist/Taxonomy.js.map +1 -1
- package/dist/ThemeSidebar.js +144 -767
- package/dist/ThemeSidebar.js.map +1 -1
- package/dist/TimeFormat.js +8 -44
- package/dist/TimeFormat.js.map +1 -1
- package/dist/TimezoneMismatchModal.js +11 -65
- package/dist/TimezoneMismatchModal.js.map +1 -1
- package/dist/ToggleFeatureCard.js +20 -157
- package/dist/ToggleFeatureCard.js.map +1 -1
- package/dist/cjs/Breadcrumbs.js +2 -3
- package/dist/cjs/Breadcrumbs.js.map +1 -1
- package/dist/cjs/BrowserSupport.js +8 -105
- package/dist/cjs/BrowserSupport.js.map +1 -1
- package/dist/cjs/Builder.js +16 -270
- package/dist/cjs/Builder.js.map +1 -1
- package/dist/cjs/CalendarView.js +23 -308
- package/dist/cjs/CalendarView.js.map +1 -1
- package/dist/cjs/Codeblock.js +12 -206
- package/dist/cjs/Codeblock.js.map +1 -1
- package/dist/cjs/Columns-069368e2.js +216 -0
- package/dist/cjs/Columns-069368e2.js.map +1 -0
- package/dist/cjs/Columns.js +23 -350
- package/dist/cjs/Columns.js.map +1 -1
- package/dist/cjs/Container.js +4 -1186
- package/dist/cjs/Container.js.map +1 -1
- package/dist/cjs/CopyToClipboardButton.js +10 -147
- package/dist/cjs/CopyToClipboardButton.js.map +1 -1
- package/dist/cjs/Currency.js +4 -46
- package/dist/cjs/Currency.js.map +1 -1
- package/dist/cjs/CustomDomain.js +23 -651
- package/dist/cjs/CustomDomain.js.map +1 -1
- package/dist/cjs/CustomDomainDashboard.js +44 -2227
- package/dist/cjs/CustomDomainDashboard.js.map +1 -1
- package/dist/cjs/DateFormat.js +3 -17
- package/dist/cjs/DateFormat.js.map +1 -1
- package/dist/cjs/DateRangeFilter.js +2 -56
- package/dist/cjs/DateRangeFilter.js.map +1 -1
- package/dist/cjs/DocumentEditor.js +14 -123
- package/dist/cjs/DocumentEditor.js.map +1 -1
- package/dist/cjs/DynamicVariables.js +8 -91
- package/dist/cjs/DynamicVariables.js.map +1 -1
- package/dist/cjs/EmailForm.js +23 -1689
- package/dist/cjs/EmailForm.js.map +1 -1
- package/dist/cjs/EmailPreview.js +8 -1189
- package/dist/cjs/EmailPreview.js.map +1 -1
- package/dist/cjs/EmojiPicker.js +4 -72
- package/dist/cjs/EmojiPicker.js.map +1 -1
- package/dist/cjs/EmojiReactions.js +5 -59
- package/dist/cjs/EmojiReactions.js.map +1 -1
- package/dist/cjs/ErrorPage.js +2 -16
- package/dist/cjs/ErrorPage.js.map +1 -1
- package/dist/cjs/FloatingActionMenu.js +48 -1376
- package/dist/cjs/FloatingActionMenu.js.map +1 -1
- package/dist/cjs/Header.js +19 -67
- package/dist/cjs/Header.js.map +1 -1
- package/dist/cjs/HelpPopover.js +11 -93
- package/dist/cjs/HelpPopover.js.map +1 -1
- package/dist/cjs/IconPicker.js +10 -107
- package/dist/cjs/IconPicker.js.map +1 -1
- package/dist/cjs/ImageWithFallback.js +11 -147
- package/dist/cjs/ImageWithFallback.js.map +1 -1
- package/dist/cjs/InlineInput.js +20 -526
- package/dist/cjs/InlineInput.js.map +1 -1
- package/dist/cjs/IntegrationCard.js +8 -207
- package/dist/cjs/IntegrationCard.js.map +1 -1
- package/dist/cjs/IntegrationDisconnectAlert.js +4 -46
- package/dist/cjs/IntegrationDisconnectAlert.js.map +1 -1
- package/dist/cjs/IpRestriction.js +7 -187
- package/dist/cjs/IpRestriction.js.map +1 -1
- package/dist/cjs/KeyboardShortcuts.js +9 -104
- package/dist/cjs/KeyboardShortcuts.js.map +1 -1
- package/dist/cjs/LoginPage.js +12 -435
- package/dist/cjs/LoginPage.js.map +1 -1
- package/dist/cjs/MenuBar.js +24 -1288
- package/dist/cjs/MenuBar.js.map +1 -1
- package/dist/cjs/Metadata.js +6 -61
- package/dist/cjs/Metadata.js.map +1 -1
- package/dist/cjs/MoreDropdown.js +14 -96
- package/dist/cjs/MoreDropdown.js.map +1 -1
- package/dist/cjs/NavigationHeader.js +21 -695
- package/dist/cjs/NavigationHeader.js.map +1 -1
- package/dist/cjs/NeetoWidget.js +18 -238
- package/dist/cjs/NeetoWidget.js.map +1 -1
- package/dist/cjs/Onboarding.js +15 -1211
- package/dist/cjs/Onboarding.js.map +1 -1
- package/dist/cjs/PageLoader.js +8 -51
- package/dist/cjs/PageLoader.js.map +1 -1
- package/dist/cjs/PhoneNumber.js +22 -156
- package/dist/cjs/PhoneNumber.js.map +1 -1
- package/dist/cjs/ProductEmbed.js +28 -118
- package/dist/cjs/ProductEmbed.js.map +1 -1
- package/dist/cjs/PublishBlock.js +13 -56
- package/dist/cjs/PublishBlock.js.map +1 -1
- package/dist/cjs/PublishYourItem.js +3 -1184
- package/dist/cjs/PublishYourItem.js.map +1 -1
- package/dist/cjs/Rename.js +23 -323
- package/dist/cjs/Rename.js.map +1 -1
- package/dist/cjs/ResponsiveDevicePicker.js +8 -144
- package/dist/cjs/ResponsiveDevicePicker.js.map +1 -1
- package/dist/cjs/Schedule.js +18 -287
- package/dist/cjs/Schedule.js.map +1 -1
- package/dist/cjs/Scrollable.js +8 -91
- package/dist/cjs/Scrollable.js.map +1 -1
- package/dist/cjs/Search.js +8 -144
- package/dist/cjs/Search.js.map +1 -1
- package/dist/cjs/Security.js +27 -1565
- package/dist/cjs/Security.js.map +1 -1
- package/dist/cjs/SendToFields.js +12 -95
- package/dist/cjs/SendToFields.js.map +1 -1
- package/dist/cjs/Settings.js +18 -476
- package/dist/cjs/Settings.js.map +1 -1
- package/dist/cjs/ShareViaEmail.js +20 -1716
- package/dist/cjs/ShareViaEmail.js.map +1 -1
- package/dist/cjs/ShareViaLink.js +36 -285
- 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
|
@@ -5,17 +5,25 @@ var neetoIcons = require('@bigbinary/neeto-icons');
|
|
|
5
5
|
var neetoui = require('@bigbinary/neetoui');
|
|
6
6
|
var formik$1 = require('@bigbinary/neetoui/formik');
|
|
7
7
|
var reactI18next = require('react-i18next');
|
|
8
|
+
var EmailPreview = require('./EmailPreview.js');
|
|
8
9
|
var classnames = require('classnames');
|
|
9
|
-
var neetoCist = require('@bigbinary/neeto-cist');
|
|
10
|
-
var withT = require('@bigbinary/neeto-commons-frontend/react-utils/withT');
|
|
11
|
-
var neetoEditor = require('@bigbinary/neeto-editor');
|
|
12
10
|
var formik = require('formik');
|
|
13
|
-
var
|
|
11
|
+
var SendToFields = require('./SendToFields.js');
|
|
12
|
+
var toConsumableArray = require('./toConsumableArray-9abb3858.js');
|
|
13
|
+
var neetoEditor = require('@bigbinary/neeto-editor');
|
|
14
|
+
var _extends = require('./extends-1b35a664.js');
|
|
15
|
+
var slicedToArray = require('./slicedToArray-f320d9e7.js');
|
|
16
|
+
var objectWithoutProperties = require('./objectWithoutProperties-2fed2d7d.js');
|
|
17
|
+
var defineProperty = require('./defineProperty-886ed289.js');
|
|
18
|
+
var dayjs = require('dayjs');
|
|
14
19
|
var i18next = require('i18next');
|
|
15
|
-
|
|
20
|
+
require('@bigbinary/neeto-cist');
|
|
21
|
+
require('papaparse');
|
|
16
22
|
var ramda = require('ramda');
|
|
17
23
|
var yup = require('yup');
|
|
18
|
-
|
|
24
|
+
require('@bigbinary/neeto-commons-frontend/react-utils/withT');
|
|
25
|
+
require('./index-248c4f4c.js');
|
|
26
|
+
require('react-dropzone');
|
|
19
27
|
|
|
20
28
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
21
29
|
|
|
@@ -39,1642 +47,8 @@ function _interopNamespace(e) {
|
|
|
39
47
|
|
|
40
48
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
41
49
|
var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
|
|
42
|
-
var withT__default = /*#__PURE__*/_interopDefaultLegacy(withT);
|
|
43
|
-
var Papa__default = /*#__PURE__*/_interopDefaultLegacy(Papa);
|
|
44
|
-
var yup__namespace = /*#__PURE__*/_interopNamespace(yup);
|
|
45
50
|
var dayjs__default = /*#__PURE__*/_interopDefaultLegacy(dayjs);
|
|
46
|
-
|
|
47
|
-
var propTypes = {exports: {}};
|
|
48
|
-
|
|
49
|
-
var reactIs = {exports: {}};
|
|
50
|
-
|
|
51
|
-
var reactIs_production_min = {};
|
|
52
|
-
|
|
53
|
-
/** @license React v16.13.1
|
|
54
|
-
* react-is.production.min.js
|
|
55
|
-
*
|
|
56
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
57
|
-
*
|
|
58
|
-
* This source code is licensed under the MIT license found in the
|
|
59
|
-
* LICENSE file in the root directory of this source tree.
|
|
60
|
-
*/
|
|
61
|
-
|
|
62
|
-
var hasRequiredReactIs_production_min;
|
|
63
|
-
|
|
64
|
-
function requireReactIs_production_min () {
|
|
65
|
-
if (hasRequiredReactIs_production_min) return reactIs_production_min;
|
|
66
|
-
hasRequiredReactIs_production_min = 1;
|
|
67
|
-
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?
|
|
68
|
-
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;
|
|
69
|
-
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;
|
|
70
|
-
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};
|
|
71
|
-
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};
|
|
72
|
-
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;
|
|
73
|
-
return reactIs_production_min;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
var reactIs_development = {};
|
|
77
|
-
|
|
78
|
-
/** @license React v16.13.1
|
|
79
|
-
* react-is.development.js
|
|
80
|
-
*
|
|
81
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
82
|
-
*
|
|
83
|
-
* This source code is licensed under the MIT license found in the
|
|
84
|
-
* LICENSE file in the root directory of this source tree.
|
|
85
|
-
*/
|
|
86
|
-
|
|
87
|
-
var hasRequiredReactIs_development;
|
|
88
|
-
|
|
89
|
-
function requireReactIs_development () {
|
|
90
|
-
if (hasRequiredReactIs_development) return reactIs_development;
|
|
91
|
-
hasRequiredReactIs_development = 1;
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
if (process.env.NODE_ENV !== "production") {
|
|
96
|
-
(function() {
|
|
97
|
-
|
|
98
|
-
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
|
|
99
|
-
// nor polyfill, then a plain number is used for performance.
|
|
100
|
-
var hasSymbol = typeof Symbol === 'function' && Symbol.for;
|
|
101
|
-
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
|
|
102
|
-
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
|
|
103
|
-
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
|
|
104
|
-
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
|
|
105
|
-
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
|
|
106
|
-
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
|
|
107
|
-
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
|
|
108
|
-
// (unstable) APIs that have been removed. Can we remove the symbols?
|
|
109
|
-
|
|
110
|
-
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
|
|
111
|
-
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
|
|
112
|
-
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
|
|
113
|
-
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
|
|
114
|
-
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
|
|
115
|
-
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
|
|
116
|
-
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
|
|
117
|
-
var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
|
|
118
|
-
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
|
|
119
|
-
var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
|
|
120
|
-
var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
|
|
121
|
-
|
|
122
|
-
function isValidElementType(type) {
|
|
123
|
-
return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
124
|
-
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);
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
function typeOf(object) {
|
|
128
|
-
if (typeof object === 'object' && object !== null) {
|
|
129
|
-
var $$typeof = object.$$typeof;
|
|
130
|
-
|
|
131
|
-
switch ($$typeof) {
|
|
132
|
-
case REACT_ELEMENT_TYPE:
|
|
133
|
-
var type = object.type;
|
|
134
|
-
|
|
135
|
-
switch (type) {
|
|
136
|
-
case REACT_ASYNC_MODE_TYPE:
|
|
137
|
-
case REACT_CONCURRENT_MODE_TYPE:
|
|
138
|
-
case REACT_FRAGMENT_TYPE:
|
|
139
|
-
case REACT_PROFILER_TYPE:
|
|
140
|
-
case REACT_STRICT_MODE_TYPE:
|
|
141
|
-
case REACT_SUSPENSE_TYPE:
|
|
142
|
-
return type;
|
|
143
|
-
|
|
144
|
-
default:
|
|
145
|
-
var $$typeofType = type && type.$$typeof;
|
|
146
|
-
|
|
147
|
-
switch ($$typeofType) {
|
|
148
|
-
case REACT_CONTEXT_TYPE:
|
|
149
|
-
case REACT_FORWARD_REF_TYPE:
|
|
150
|
-
case REACT_LAZY_TYPE:
|
|
151
|
-
case REACT_MEMO_TYPE:
|
|
152
|
-
case REACT_PROVIDER_TYPE:
|
|
153
|
-
return $$typeofType;
|
|
154
|
-
|
|
155
|
-
default:
|
|
156
|
-
return $$typeof;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
case REACT_PORTAL_TYPE:
|
|
162
|
-
return $$typeof;
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
return undefined;
|
|
167
|
-
} // AsyncMode is deprecated along with isAsyncMode
|
|
168
|
-
|
|
169
|
-
var AsyncMode = REACT_ASYNC_MODE_TYPE;
|
|
170
|
-
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
|
|
171
|
-
var ContextConsumer = REACT_CONTEXT_TYPE;
|
|
172
|
-
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
173
|
-
var Element = REACT_ELEMENT_TYPE;
|
|
174
|
-
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
175
|
-
var Fragment = REACT_FRAGMENT_TYPE;
|
|
176
|
-
var Lazy = REACT_LAZY_TYPE;
|
|
177
|
-
var Memo = REACT_MEMO_TYPE;
|
|
178
|
-
var Portal = REACT_PORTAL_TYPE;
|
|
179
|
-
var Profiler = REACT_PROFILER_TYPE;
|
|
180
|
-
var StrictMode = REACT_STRICT_MODE_TYPE;
|
|
181
|
-
var Suspense = REACT_SUSPENSE_TYPE;
|
|
182
|
-
var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
|
|
183
|
-
|
|
184
|
-
function isAsyncMode(object) {
|
|
185
|
-
{
|
|
186
|
-
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
|
187
|
-
hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
|
|
188
|
-
|
|
189
|
-
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.');
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
|
|
194
|
-
}
|
|
195
|
-
function isConcurrentMode(object) {
|
|
196
|
-
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
|
|
197
|
-
}
|
|
198
|
-
function isContextConsumer(object) {
|
|
199
|
-
return typeOf(object) === REACT_CONTEXT_TYPE;
|
|
200
|
-
}
|
|
201
|
-
function isContextProvider(object) {
|
|
202
|
-
return typeOf(object) === REACT_PROVIDER_TYPE;
|
|
203
|
-
}
|
|
204
|
-
function isElement(object) {
|
|
205
|
-
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
206
|
-
}
|
|
207
|
-
function isForwardRef(object) {
|
|
208
|
-
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
|
209
|
-
}
|
|
210
|
-
function isFragment(object) {
|
|
211
|
-
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
|
212
|
-
}
|
|
213
|
-
function isLazy(object) {
|
|
214
|
-
return typeOf(object) === REACT_LAZY_TYPE;
|
|
215
|
-
}
|
|
216
|
-
function isMemo(object) {
|
|
217
|
-
return typeOf(object) === REACT_MEMO_TYPE;
|
|
218
|
-
}
|
|
219
|
-
function isPortal(object) {
|
|
220
|
-
return typeOf(object) === REACT_PORTAL_TYPE;
|
|
221
|
-
}
|
|
222
|
-
function isProfiler(object) {
|
|
223
|
-
return typeOf(object) === REACT_PROFILER_TYPE;
|
|
224
|
-
}
|
|
225
|
-
function isStrictMode(object) {
|
|
226
|
-
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
|
227
|
-
}
|
|
228
|
-
function isSuspense(object) {
|
|
229
|
-
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
reactIs_development.AsyncMode = AsyncMode;
|
|
233
|
-
reactIs_development.ConcurrentMode = ConcurrentMode;
|
|
234
|
-
reactIs_development.ContextConsumer = ContextConsumer;
|
|
235
|
-
reactIs_development.ContextProvider = ContextProvider;
|
|
236
|
-
reactIs_development.Element = Element;
|
|
237
|
-
reactIs_development.ForwardRef = ForwardRef;
|
|
238
|
-
reactIs_development.Fragment = Fragment;
|
|
239
|
-
reactIs_development.Lazy = Lazy;
|
|
240
|
-
reactIs_development.Memo = Memo;
|
|
241
|
-
reactIs_development.Portal = Portal;
|
|
242
|
-
reactIs_development.Profiler = Profiler;
|
|
243
|
-
reactIs_development.StrictMode = StrictMode;
|
|
244
|
-
reactIs_development.Suspense = Suspense;
|
|
245
|
-
reactIs_development.isAsyncMode = isAsyncMode;
|
|
246
|
-
reactIs_development.isConcurrentMode = isConcurrentMode;
|
|
247
|
-
reactIs_development.isContextConsumer = isContextConsumer;
|
|
248
|
-
reactIs_development.isContextProvider = isContextProvider;
|
|
249
|
-
reactIs_development.isElement = isElement;
|
|
250
|
-
reactIs_development.isForwardRef = isForwardRef;
|
|
251
|
-
reactIs_development.isFragment = isFragment;
|
|
252
|
-
reactIs_development.isLazy = isLazy;
|
|
253
|
-
reactIs_development.isMemo = isMemo;
|
|
254
|
-
reactIs_development.isPortal = isPortal;
|
|
255
|
-
reactIs_development.isProfiler = isProfiler;
|
|
256
|
-
reactIs_development.isStrictMode = isStrictMode;
|
|
257
|
-
reactIs_development.isSuspense = isSuspense;
|
|
258
|
-
reactIs_development.isValidElementType = isValidElementType;
|
|
259
|
-
reactIs_development.typeOf = typeOf;
|
|
260
|
-
})();
|
|
261
|
-
}
|
|
262
|
-
return reactIs_development;
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
var hasRequiredReactIs;
|
|
266
|
-
|
|
267
|
-
function requireReactIs () {
|
|
268
|
-
if (hasRequiredReactIs) return reactIs.exports;
|
|
269
|
-
hasRequiredReactIs = 1;
|
|
270
|
-
(function (module) {
|
|
271
|
-
|
|
272
|
-
if (process.env.NODE_ENV === 'production') {
|
|
273
|
-
module.exports = requireReactIs_production_min();
|
|
274
|
-
} else {
|
|
275
|
-
module.exports = requireReactIs_development();
|
|
276
|
-
}
|
|
277
|
-
} (reactIs));
|
|
278
|
-
return reactIs.exports;
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
/*
|
|
282
|
-
object-assign
|
|
283
|
-
(c) Sindre Sorhus
|
|
284
|
-
@license MIT
|
|
285
|
-
*/
|
|
286
|
-
|
|
287
|
-
var objectAssign;
|
|
288
|
-
var hasRequiredObjectAssign;
|
|
289
|
-
|
|
290
|
-
function requireObjectAssign () {
|
|
291
|
-
if (hasRequiredObjectAssign) return objectAssign;
|
|
292
|
-
hasRequiredObjectAssign = 1;
|
|
293
|
-
/* eslint-disable no-unused-vars */
|
|
294
|
-
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
295
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
296
|
-
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
297
|
-
|
|
298
|
-
function toObject(val) {
|
|
299
|
-
if (val === null || val === undefined) {
|
|
300
|
-
throw new TypeError('Object.assign cannot be called with null or undefined');
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
return Object(val);
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
function shouldUseNative() {
|
|
307
|
-
try {
|
|
308
|
-
if (!Object.assign) {
|
|
309
|
-
return false;
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
// Detect buggy property enumeration order in older V8 versions.
|
|
313
|
-
|
|
314
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=4118
|
|
315
|
-
var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
|
|
316
|
-
test1[5] = 'de';
|
|
317
|
-
if (Object.getOwnPropertyNames(test1)[0] === '5') {
|
|
318
|
-
return false;
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
322
|
-
var test2 = {};
|
|
323
|
-
for (var i = 0; i < 10; i++) {
|
|
324
|
-
test2['_' + String.fromCharCode(i)] = i;
|
|
325
|
-
}
|
|
326
|
-
var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
|
|
327
|
-
return test2[n];
|
|
328
|
-
});
|
|
329
|
-
if (order2.join('') !== '0123456789') {
|
|
330
|
-
return false;
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
334
|
-
var test3 = {};
|
|
335
|
-
'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
|
|
336
|
-
test3[letter] = letter;
|
|
337
|
-
});
|
|
338
|
-
if (Object.keys(Object.assign({}, test3)).join('') !==
|
|
339
|
-
'abcdefghijklmnopqrst') {
|
|
340
|
-
return false;
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
return true;
|
|
344
|
-
} catch (err) {
|
|
345
|
-
// We don't expect any of the above to throw, but better to be safe.
|
|
346
|
-
return false;
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
objectAssign = shouldUseNative() ? Object.assign : function (target, source) {
|
|
351
|
-
var from;
|
|
352
|
-
var to = toObject(target);
|
|
353
|
-
var symbols;
|
|
354
|
-
|
|
355
|
-
for (var s = 1; s < arguments.length; s++) {
|
|
356
|
-
from = Object(arguments[s]);
|
|
357
|
-
|
|
358
|
-
for (var key in from) {
|
|
359
|
-
if (hasOwnProperty.call(from, key)) {
|
|
360
|
-
to[key] = from[key];
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
if (getOwnPropertySymbols) {
|
|
365
|
-
symbols = getOwnPropertySymbols(from);
|
|
366
|
-
for (var i = 0; i < symbols.length; i++) {
|
|
367
|
-
if (propIsEnumerable.call(from, symbols[i])) {
|
|
368
|
-
to[symbols[i]] = from[symbols[i]];
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
return to;
|
|
375
|
-
};
|
|
376
|
-
return objectAssign;
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
/**
|
|
380
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
381
|
-
*
|
|
382
|
-
* This source code is licensed under the MIT license found in the
|
|
383
|
-
* LICENSE file in the root directory of this source tree.
|
|
384
|
-
*/
|
|
385
|
-
|
|
386
|
-
var ReactPropTypesSecret_1;
|
|
387
|
-
var hasRequiredReactPropTypesSecret;
|
|
388
|
-
|
|
389
|
-
function requireReactPropTypesSecret () {
|
|
390
|
-
if (hasRequiredReactPropTypesSecret) return ReactPropTypesSecret_1;
|
|
391
|
-
hasRequiredReactPropTypesSecret = 1;
|
|
392
|
-
|
|
393
|
-
var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
|
394
|
-
|
|
395
|
-
ReactPropTypesSecret_1 = ReactPropTypesSecret;
|
|
396
|
-
return ReactPropTypesSecret_1;
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
var has;
|
|
400
|
-
var hasRequiredHas;
|
|
401
|
-
|
|
402
|
-
function requireHas () {
|
|
403
|
-
if (hasRequiredHas) return has;
|
|
404
|
-
hasRequiredHas = 1;
|
|
405
|
-
has = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
406
|
-
return has;
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
/**
|
|
410
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
411
|
-
*
|
|
412
|
-
* This source code is licensed under the MIT license found in the
|
|
413
|
-
* LICENSE file in the root directory of this source tree.
|
|
414
|
-
*/
|
|
415
|
-
|
|
416
|
-
var checkPropTypes_1;
|
|
417
|
-
var hasRequiredCheckPropTypes;
|
|
418
|
-
|
|
419
|
-
function requireCheckPropTypes () {
|
|
420
|
-
if (hasRequiredCheckPropTypes) return checkPropTypes_1;
|
|
421
|
-
hasRequiredCheckPropTypes = 1;
|
|
422
|
-
|
|
423
|
-
var printWarning = function() {};
|
|
424
|
-
|
|
425
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
426
|
-
var ReactPropTypesSecret = requireReactPropTypesSecret();
|
|
427
|
-
var loggedTypeFailures = {};
|
|
428
|
-
var has = requireHas();
|
|
429
|
-
|
|
430
|
-
printWarning = function(text) {
|
|
431
|
-
var message = 'Warning: ' + text;
|
|
432
|
-
if (typeof console !== 'undefined') {
|
|
433
|
-
console.error(message);
|
|
434
|
-
}
|
|
435
|
-
try {
|
|
436
|
-
// --- Welcome to debugging React ---
|
|
437
|
-
// This error was thrown as a convenience so that you can use this stack
|
|
438
|
-
// to find the callsite that caused this warning to fire.
|
|
439
|
-
throw new Error(message);
|
|
440
|
-
} catch (x) { /**/ }
|
|
441
|
-
};
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
/**
|
|
445
|
-
* Assert that the values match with the type specs.
|
|
446
|
-
* Error messages are memorized and will only be shown once.
|
|
447
|
-
*
|
|
448
|
-
* @param {object} typeSpecs Map of name to a ReactPropType
|
|
449
|
-
* @param {object} values Runtime values that need to be type-checked
|
|
450
|
-
* @param {string} location e.g. "prop", "context", "child context"
|
|
451
|
-
* @param {string} componentName Name of the component for error messages.
|
|
452
|
-
* @param {?Function} getStack Returns the component stack.
|
|
453
|
-
* @private
|
|
454
|
-
*/
|
|
455
|
-
function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
|
|
456
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
457
|
-
for (var typeSpecName in typeSpecs) {
|
|
458
|
-
if (has(typeSpecs, typeSpecName)) {
|
|
459
|
-
var error;
|
|
460
|
-
// Prop type validation may throw. In case they do, we don't want to
|
|
461
|
-
// fail the render phase where it didn't fail before. So we log it.
|
|
462
|
-
// After these have been cleaned up, we'll let them throw.
|
|
463
|
-
try {
|
|
464
|
-
// This is intentionally an invariant that gets caught. It's the same
|
|
465
|
-
// behavior as without this statement except with a better message.
|
|
466
|
-
if (typeof typeSpecs[typeSpecName] !== 'function') {
|
|
467
|
-
var err = Error(
|
|
468
|
-
(componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
|
|
469
|
-
'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +
|
|
470
|
-
'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
|
|
471
|
-
);
|
|
472
|
-
err.name = 'Invariant Violation';
|
|
473
|
-
throw err;
|
|
474
|
-
}
|
|
475
|
-
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
|
|
476
|
-
} catch (ex) {
|
|
477
|
-
error = ex;
|
|
478
|
-
}
|
|
479
|
-
if (error && !(error instanceof Error)) {
|
|
480
|
-
printWarning(
|
|
481
|
-
(componentName || 'React class') + ': type specification of ' +
|
|
482
|
-
location + ' `' + typeSpecName + '` is invalid; the type checker ' +
|
|
483
|
-
'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
|
|
484
|
-
'You may have forgotten to pass an argument to the type checker ' +
|
|
485
|
-
'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
|
|
486
|
-
'shape all require an argument).'
|
|
487
|
-
);
|
|
488
|
-
}
|
|
489
|
-
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
|
490
|
-
// Only monitor this failure once because there tends to be a lot of the
|
|
491
|
-
// same error.
|
|
492
|
-
loggedTypeFailures[error.message] = true;
|
|
493
|
-
|
|
494
|
-
var stack = getStack ? getStack() : '';
|
|
495
|
-
|
|
496
|
-
printWarning(
|
|
497
|
-
'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
|
|
498
|
-
);
|
|
499
|
-
}
|
|
500
|
-
}
|
|
501
|
-
}
|
|
502
|
-
}
|
|
503
|
-
}
|
|
504
|
-
|
|
505
|
-
/**
|
|
506
|
-
* Resets warning cache when testing.
|
|
507
|
-
*
|
|
508
|
-
* @private
|
|
509
|
-
*/
|
|
510
|
-
checkPropTypes.resetWarningCache = function() {
|
|
511
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
512
|
-
loggedTypeFailures = {};
|
|
513
|
-
}
|
|
514
|
-
};
|
|
515
|
-
|
|
516
|
-
checkPropTypes_1 = checkPropTypes;
|
|
517
|
-
return checkPropTypes_1;
|
|
518
|
-
}
|
|
519
|
-
|
|
520
|
-
/**
|
|
521
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
522
|
-
*
|
|
523
|
-
* This source code is licensed under the MIT license found in the
|
|
524
|
-
* LICENSE file in the root directory of this source tree.
|
|
525
|
-
*/
|
|
526
|
-
|
|
527
|
-
var factoryWithTypeCheckers;
|
|
528
|
-
var hasRequiredFactoryWithTypeCheckers;
|
|
529
|
-
|
|
530
|
-
function requireFactoryWithTypeCheckers () {
|
|
531
|
-
if (hasRequiredFactoryWithTypeCheckers) return factoryWithTypeCheckers;
|
|
532
|
-
hasRequiredFactoryWithTypeCheckers = 1;
|
|
533
|
-
|
|
534
|
-
var ReactIs = requireReactIs();
|
|
535
|
-
var assign = requireObjectAssign();
|
|
536
|
-
|
|
537
|
-
var ReactPropTypesSecret = requireReactPropTypesSecret();
|
|
538
|
-
var has = requireHas();
|
|
539
|
-
var checkPropTypes = requireCheckPropTypes();
|
|
540
|
-
|
|
541
|
-
var printWarning = function() {};
|
|
542
|
-
|
|
543
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
544
|
-
printWarning = function(text) {
|
|
545
|
-
var message = 'Warning: ' + text;
|
|
546
|
-
if (typeof console !== 'undefined') {
|
|
547
|
-
console.error(message);
|
|
548
|
-
}
|
|
549
|
-
try {
|
|
550
|
-
// --- Welcome to debugging React ---
|
|
551
|
-
// This error was thrown as a convenience so that you can use this stack
|
|
552
|
-
// to find the callsite that caused this warning to fire.
|
|
553
|
-
throw new Error(message);
|
|
554
|
-
} catch (x) {}
|
|
555
|
-
};
|
|
556
|
-
}
|
|
557
|
-
|
|
558
|
-
function emptyFunctionThatReturnsNull() {
|
|
559
|
-
return null;
|
|
560
|
-
}
|
|
561
|
-
|
|
562
|
-
factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
|
|
563
|
-
/* global Symbol */
|
|
564
|
-
var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
|
565
|
-
var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
|
|
566
|
-
|
|
567
|
-
/**
|
|
568
|
-
* Returns the iterator method function contained on the iterable object.
|
|
569
|
-
*
|
|
570
|
-
* Be sure to invoke the function with the iterable as context:
|
|
571
|
-
*
|
|
572
|
-
* var iteratorFn = getIteratorFn(myIterable);
|
|
573
|
-
* if (iteratorFn) {
|
|
574
|
-
* var iterator = iteratorFn.call(myIterable);
|
|
575
|
-
* ...
|
|
576
|
-
* }
|
|
577
|
-
*
|
|
578
|
-
* @param {?object} maybeIterable
|
|
579
|
-
* @return {?function}
|
|
580
|
-
*/
|
|
581
|
-
function getIteratorFn(maybeIterable) {
|
|
582
|
-
var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
|
|
583
|
-
if (typeof iteratorFn === 'function') {
|
|
584
|
-
return iteratorFn;
|
|
585
|
-
}
|
|
586
|
-
}
|
|
587
|
-
|
|
588
|
-
/**
|
|
589
|
-
* Collection of methods that allow declaration and validation of props that are
|
|
590
|
-
* supplied to React components. Example usage:
|
|
591
|
-
*
|
|
592
|
-
* var Props = require('ReactPropTypes');
|
|
593
|
-
* var MyArticle = React.createClass({
|
|
594
|
-
* propTypes: {
|
|
595
|
-
* // An optional string prop named "description".
|
|
596
|
-
* description: Props.string,
|
|
597
|
-
*
|
|
598
|
-
* // A required enum prop named "category".
|
|
599
|
-
* category: Props.oneOf(['News','Photos']).isRequired,
|
|
600
|
-
*
|
|
601
|
-
* // A prop named "dialog" that requires an instance of Dialog.
|
|
602
|
-
* dialog: Props.instanceOf(Dialog).isRequired
|
|
603
|
-
* },
|
|
604
|
-
* render: function() { ... }
|
|
605
|
-
* });
|
|
606
|
-
*
|
|
607
|
-
* A more formal specification of how these methods are used:
|
|
608
|
-
*
|
|
609
|
-
* type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
|
|
610
|
-
* decl := ReactPropTypes.{type}(.isRequired)?
|
|
611
|
-
*
|
|
612
|
-
* Each and every declaration produces a function with the same signature. This
|
|
613
|
-
* allows the creation of custom validation functions. For example:
|
|
614
|
-
*
|
|
615
|
-
* var MyLink = React.createClass({
|
|
616
|
-
* propTypes: {
|
|
617
|
-
* // An optional string or URI prop named "href".
|
|
618
|
-
* href: function(props, propName, componentName) {
|
|
619
|
-
* var propValue = props[propName];
|
|
620
|
-
* if (propValue != null && typeof propValue !== 'string' &&
|
|
621
|
-
* !(propValue instanceof URI)) {
|
|
622
|
-
* return new Error(
|
|
623
|
-
* 'Expected a string or an URI for ' + propName + ' in ' +
|
|
624
|
-
* componentName
|
|
625
|
-
* );
|
|
626
|
-
* }
|
|
627
|
-
* }
|
|
628
|
-
* },
|
|
629
|
-
* render: function() {...}
|
|
630
|
-
* });
|
|
631
|
-
*
|
|
632
|
-
* @internal
|
|
633
|
-
*/
|
|
634
|
-
|
|
635
|
-
var ANONYMOUS = '<<anonymous>>';
|
|
636
|
-
|
|
637
|
-
// Important!
|
|
638
|
-
// Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
|
|
639
|
-
var ReactPropTypes = {
|
|
640
|
-
array: createPrimitiveTypeChecker('array'),
|
|
641
|
-
bigint: createPrimitiveTypeChecker('bigint'),
|
|
642
|
-
bool: createPrimitiveTypeChecker('boolean'),
|
|
643
|
-
func: createPrimitiveTypeChecker('function'),
|
|
644
|
-
number: createPrimitiveTypeChecker('number'),
|
|
645
|
-
object: createPrimitiveTypeChecker('object'),
|
|
646
|
-
string: createPrimitiveTypeChecker('string'),
|
|
647
|
-
symbol: createPrimitiveTypeChecker('symbol'),
|
|
648
|
-
|
|
649
|
-
any: createAnyTypeChecker(),
|
|
650
|
-
arrayOf: createArrayOfTypeChecker,
|
|
651
|
-
element: createElementTypeChecker(),
|
|
652
|
-
elementType: createElementTypeTypeChecker(),
|
|
653
|
-
instanceOf: createInstanceTypeChecker,
|
|
654
|
-
node: createNodeChecker(),
|
|
655
|
-
objectOf: createObjectOfTypeChecker,
|
|
656
|
-
oneOf: createEnumTypeChecker,
|
|
657
|
-
oneOfType: createUnionTypeChecker,
|
|
658
|
-
shape: createShapeTypeChecker,
|
|
659
|
-
exact: createStrictShapeTypeChecker,
|
|
660
|
-
};
|
|
661
|
-
|
|
662
|
-
/**
|
|
663
|
-
* inlined Object.is polyfill to avoid requiring consumers ship their own
|
|
664
|
-
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
|
|
665
|
-
*/
|
|
666
|
-
/*eslint-disable no-self-compare*/
|
|
667
|
-
function is(x, y) {
|
|
668
|
-
// SameValue algorithm
|
|
669
|
-
if (x === y) {
|
|
670
|
-
// Steps 1-5, 7-10
|
|
671
|
-
// Steps 6.b-6.e: +0 != -0
|
|
672
|
-
return x !== 0 || 1 / x === 1 / y;
|
|
673
|
-
} else {
|
|
674
|
-
// Step 6.a: NaN == NaN
|
|
675
|
-
return x !== x && y !== y;
|
|
676
|
-
}
|
|
677
|
-
}
|
|
678
|
-
/*eslint-enable no-self-compare*/
|
|
679
|
-
|
|
680
|
-
/**
|
|
681
|
-
* We use an Error-like object for backward compatibility as people may call
|
|
682
|
-
* PropTypes directly and inspect their output. However, we don't use real
|
|
683
|
-
* Errors anymore. We don't inspect their stack anyway, and creating them
|
|
684
|
-
* is prohibitively expensive if they are created too often, such as what
|
|
685
|
-
* happens in oneOfType() for any type before the one that matched.
|
|
686
|
-
*/
|
|
687
|
-
function PropTypeError(message, data) {
|
|
688
|
-
this.message = message;
|
|
689
|
-
this.data = data && typeof data === 'object' ? data: {};
|
|
690
|
-
this.stack = '';
|
|
691
|
-
}
|
|
692
|
-
// Make `instanceof Error` still work for returned errors.
|
|
693
|
-
PropTypeError.prototype = Error.prototype;
|
|
694
|
-
|
|
695
|
-
function createChainableTypeChecker(validate) {
|
|
696
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
697
|
-
var manualPropTypeCallCache = {};
|
|
698
|
-
var manualPropTypeWarningCount = 0;
|
|
699
|
-
}
|
|
700
|
-
function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
|
|
701
|
-
componentName = componentName || ANONYMOUS;
|
|
702
|
-
propFullName = propFullName || propName;
|
|
703
|
-
|
|
704
|
-
if (secret !== ReactPropTypesSecret) {
|
|
705
|
-
if (throwOnDirectAccess) {
|
|
706
|
-
// New behavior only for users of `prop-types` package
|
|
707
|
-
var err = new Error(
|
|
708
|
-
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
|
709
|
-
'Use `PropTypes.checkPropTypes()` to call them. ' +
|
|
710
|
-
'Read more at http://fb.me/use-check-prop-types'
|
|
711
|
-
);
|
|
712
|
-
err.name = 'Invariant Violation';
|
|
713
|
-
throw err;
|
|
714
|
-
} else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
|
|
715
|
-
// Old behavior for people using React.PropTypes
|
|
716
|
-
var cacheKey = componentName + ':' + propName;
|
|
717
|
-
if (
|
|
718
|
-
!manualPropTypeCallCache[cacheKey] &&
|
|
719
|
-
// Avoid spamming the console because they are often not actionable except for lib authors
|
|
720
|
-
manualPropTypeWarningCount < 3
|
|
721
|
-
) {
|
|
722
|
-
printWarning(
|
|
723
|
-
'You are manually calling a React.PropTypes validation ' +
|
|
724
|
-
'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
|
|
725
|
-
'and will throw in the standalone `prop-types` package. ' +
|
|
726
|
-
'You may be seeing this warning due to a third-party PropTypes ' +
|
|
727
|
-
'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
|
|
728
|
-
);
|
|
729
|
-
manualPropTypeCallCache[cacheKey] = true;
|
|
730
|
-
manualPropTypeWarningCount++;
|
|
731
|
-
}
|
|
732
|
-
}
|
|
733
|
-
}
|
|
734
|
-
if (props[propName] == null) {
|
|
735
|
-
if (isRequired) {
|
|
736
|
-
if (props[propName] === null) {
|
|
737
|
-
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
|
|
738
|
-
}
|
|
739
|
-
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
|
|
740
|
-
}
|
|
741
|
-
return null;
|
|
742
|
-
} else {
|
|
743
|
-
return validate(props, propName, componentName, location, propFullName);
|
|
744
|
-
}
|
|
745
|
-
}
|
|
746
|
-
|
|
747
|
-
var chainedCheckType = checkType.bind(null, false);
|
|
748
|
-
chainedCheckType.isRequired = checkType.bind(null, true);
|
|
749
|
-
|
|
750
|
-
return chainedCheckType;
|
|
751
|
-
}
|
|
752
|
-
|
|
753
|
-
function createPrimitiveTypeChecker(expectedType) {
|
|
754
|
-
function validate(props, propName, componentName, location, propFullName, secret) {
|
|
755
|
-
var propValue = props[propName];
|
|
756
|
-
var propType = getPropType(propValue);
|
|
757
|
-
if (propType !== expectedType) {
|
|
758
|
-
// `propValue` being instance of, say, date/regexp, pass the 'object'
|
|
759
|
-
// check, but we can offer a more precise error message here rather than
|
|
760
|
-
// 'of type `object`'.
|
|
761
|
-
var preciseType = getPreciseType(propValue);
|
|
762
|
-
|
|
763
|
-
return new PropTypeError(
|
|
764
|
-
'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),
|
|
765
|
-
{expectedType: expectedType}
|
|
766
|
-
);
|
|
767
|
-
}
|
|
768
|
-
return null;
|
|
769
|
-
}
|
|
770
|
-
return createChainableTypeChecker(validate);
|
|
771
|
-
}
|
|
772
|
-
|
|
773
|
-
function createAnyTypeChecker() {
|
|
774
|
-
return createChainableTypeChecker(emptyFunctionThatReturnsNull);
|
|
775
|
-
}
|
|
776
|
-
|
|
777
|
-
function createArrayOfTypeChecker(typeChecker) {
|
|
778
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
779
|
-
if (typeof typeChecker !== 'function') {
|
|
780
|
-
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
|
|
781
|
-
}
|
|
782
|
-
var propValue = props[propName];
|
|
783
|
-
if (!Array.isArray(propValue)) {
|
|
784
|
-
var propType = getPropType(propValue);
|
|
785
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
|
|
786
|
-
}
|
|
787
|
-
for (var i = 0; i < propValue.length; i++) {
|
|
788
|
-
var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
|
|
789
|
-
if (error instanceof Error) {
|
|
790
|
-
return error;
|
|
791
|
-
}
|
|
792
|
-
}
|
|
793
|
-
return null;
|
|
794
|
-
}
|
|
795
|
-
return createChainableTypeChecker(validate);
|
|
796
|
-
}
|
|
797
|
-
|
|
798
|
-
function createElementTypeChecker() {
|
|
799
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
800
|
-
var propValue = props[propName];
|
|
801
|
-
if (!isValidElement(propValue)) {
|
|
802
|
-
var propType = getPropType(propValue);
|
|
803
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
|
|
804
|
-
}
|
|
805
|
-
return null;
|
|
806
|
-
}
|
|
807
|
-
return createChainableTypeChecker(validate);
|
|
808
|
-
}
|
|
809
|
-
|
|
810
|
-
function createElementTypeTypeChecker() {
|
|
811
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
812
|
-
var propValue = props[propName];
|
|
813
|
-
if (!ReactIs.isValidElementType(propValue)) {
|
|
814
|
-
var propType = getPropType(propValue);
|
|
815
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
|
|
816
|
-
}
|
|
817
|
-
return null;
|
|
818
|
-
}
|
|
819
|
-
return createChainableTypeChecker(validate);
|
|
820
|
-
}
|
|
821
|
-
|
|
822
|
-
function createInstanceTypeChecker(expectedClass) {
|
|
823
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
824
|
-
if (!(props[propName] instanceof expectedClass)) {
|
|
825
|
-
var expectedClassName = expectedClass.name || ANONYMOUS;
|
|
826
|
-
var actualClassName = getClassName(props[propName]);
|
|
827
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
|
|
828
|
-
}
|
|
829
|
-
return null;
|
|
830
|
-
}
|
|
831
|
-
return createChainableTypeChecker(validate);
|
|
832
|
-
}
|
|
833
|
-
|
|
834
|
-
function createEnumTypeChecker(expectedValues) {
|
|
835
|
-
if (!Array.isArray(expectedValues)) {
|
|
836
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
837
|
-
if (arguments.length > 1) {
|
|
838
|
-
printWarning(
|
|
839
|
-
'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
|
|
840
|
-
'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
|
|
841
|
-
);
|
|
842
|
-
} else {
|
|
843
|
-
printWarning('Invalid argument supplied to oneOf, expected an array.');
|
|
844
|
-
}
|
|
845
|
-
}
|
|
846
|
-
return emptyFunctionThatReturnsNull;
|
|
847
|
-
}
|
|
848
|
-
|
|
849
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
850
|
-
var propValue = props[propName];
|
|
851
|
-
for (var i = 0; i < expectedValues.length; i++) {
|
|
852
|
-
if (is(propValue, expectedValues[i])) {
|
|
853
|
-
return null;
|
|
854
|
-
}
|
|
855
|
-
}
|
|
856
|
-
|
|
857
|
-
var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
|
|
858
|
-
var type = getPreciseType(value);
|
|
859
|
-
if (type === 'symbol') {
|
|
860
|
-
return String(value);
|
|
861
|
-
}
|
|
862
|
-
return value;
|
|
863
|
-
});
|
|
864
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
|
|
865
|
-
}
|
|
866
|
-
return createChainableTypeChecker(validate);
|
|
867
|
-
}
|
|
868
|
-
|
|
869
|
-
function createObjectOfTypeChecker(typeChecker) {
|
|
870
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
871
|
-
if (typeof typeChecker !== 'function') {
|
|
872
|
-
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
|
|
873
|
-
}
|
|
874
|
-
var propValue = props[propName];
|
|
875
|
-
var propType = getPropType(propValue);
|
|
876
|
-
if (propType !== 'object') {
|
|
877
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
|
|
878
|
-
}
|
|
879
|
-
for (var key in propValue) {
|
|
880
|
-
if (has(propValue, key)) {
|
|
881
|
-
var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
|
882
|
-
if (error instanceof Error) {
|
|
883
|
-
return error;
|
|
884
|
-
}
|
|
885
|
-
}
|
|
886
|
-
}
|
|
887
|
-
return null;
|
|
888
|
-
}
|
|
889
|
-
return createChainableTypeChecker(validate);
|
|
890
|
-
}
|
|
891
|
-
|
|
892
|
-
function createUnionTypeChecker(arrayOfTypeCheckers) {
|
|
893
|
-
if (!Array.isArray(arrayOfTypeCheckers)) {
|
|
894
|
-
process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
|
|
895
|
-
return emptyFunctionThatReturnsNull;
|
|
896
|
-
}
|
|
897
|
-
|
|
898
|
-
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
899
|
-
var checker = arrayOfTypeCheckers[i];
|
|
900
|
-
if (typeof checker !== 'function') {
|
|
901
|
-
printWarning(
|
|
902
|
-
'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
|
|
903
|
-
'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
|
|
904
|
-
);
|
|
905
|
-
return emptyFunctionThatReturnsNull;
|
|
906
|
-
}
|
|
907
|
-
}
|
|
908
|
-
|
|
909
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
910
|
-
var expectedTypes = [];
|
|
911
|
-
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
912
|
-
var checker = arrayOfTypeCheckers[i];
|
|
913
|
-
var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
|
|
914
|
-
if (checkerResult == null) {
|
|
915
|
-
return null;
|
|
916
|
-
}
|
|
917
|
-
if (checkerResult.data && has(checkerResult.data, 'expectedType')) {
|
|
918
|
-
expectedTypes.push(checkerResult.data.expectedType);
|
|
919
|
-
}
|
|
920
|
-
}
|
|
921
|
-
var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';
|
|
922
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
|
|
923
|
-
}
|
|
924
|
-
return createChainableTypeChecker(validate);
|
|
925
|
-
}
|
|
926
|
-
|
|
927
|
-
function createNodeChecker() {
|
|
928
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
929
|
-
if (!isNode(props[propName])) {
|
|
930
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
|
|
931
|
-
}
|
|
932
|
-
return null;
|
|
933
|
-
}
|
|
934
|
-
return createChainableTypeChecker(validate);
|
|
935
|
-
}
|
|
936
|
-
|
|
937
|
-
function invalidValidatorError(componentName, location, propFullName, key, type) {
|
|
938
|
-
return new PropTypeError(
|
|
939
|
-
(componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +
|
|
940
|
-
'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'
|
|
941
|
-
);
|
|
942
|
-
}
|
|
943
|
-
|
|
944
|
-
function createShapeTypeChecker(shapeTypes) {
|
|
945
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
946
|
-
var propValue = props[propName];
|
|
947
|
-
var propType = getPropType(propValue);
|
|
948
|
-
if (propType !== 'object') {
|
|
949
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
|
950
|
-
}
|
|
951
|
-
for (var key in shapeTypes) {
|
|
952
|
-
var checker = shapeTypes[key];
|
|
953
|
-
if (typeof checker !== 'function') {
|
|
954
|
-
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
|
955
|
-
}
|
|
956
|
-
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
|
957
|
-
if (error) {
|
|
958
|
-
return error;
|
|
959
|
-
}
|
|
960
|
-
}
|
|
961
|
-
return null;
|
|
962
|
-
}
|
|
963
|
-
return createChainableTypeChecker(validate);
|
|
964
|
-
}
|
|
965
|
-
|
|
966
|
-
function createStrictShapeTypeChecker(shapeTypes) {
|
|
967
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
968
|
-
var propValue = props[propName];
|
|
969
|
-
var propType = getPropType(propValue);
|
|
970
|
-
if (propType !== 'object') {
|
|
971
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
|
972
|
-
}
|
|
973
|
-
// We need to check all keys in case some are required but missing from props.
|
|
974
|
-
var allKeys = assign({}, props[propName], shapeTypes);
|
|
975
|
-
for (var key in allKeys) {
|
|
976
|
-
var checker = shapeTypes[key];
|
|
977
|
-
if (has(shapeTypes, key) && typeof checker !== 'function') {
|
|
978
|
-
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
|
979
|
-
}
|
|
980
|
-
if (!checker) {
|
|
981
|
-
return new PropTypeError(
|
|
982
|
-
'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
|
|
983
|
-
'\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
|
|
984
|
-
'\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
|
|
985
|
-
);
|
|
986
|
-
}
|
|
987
|
-
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
|
988
|
-
if (error) {
|
|
989
|
-
return error;
|
|
990
|
-
}
|
|
991
|
-
}
|
|
992
|
-
return null;
|
|
993
|
-
}
|
|
994
|
-
|
|
995
|
-
return createChainableTypeChecker(validate);
|
|
996
|
-
}
|
|
997
|
-
|
|
998
|
-
function isNode(propValue) {
|
|
999
|
-
switch (typeof propValue) {
|
|
1000
|
-
case 'number':
|
|
1001
|
-
case 'string':
|
|
1002
|
-
case 'undefined':
|
|
1003
|
-
return true;
|
|
1004
|
-
case 'boolean':
|
|
1005
|
-
return !propValue;
|
|
1006
|
-
case 'object':
|
|
1007
|
-
if (Array.isArray(propValue)) {
|
|
1008
|
-
return propValue.every(isNode);
|
|
1009
|
-
}
|
|
1010
|
-
if (propValue === null || isValidElement(propValue)) {
|
|
1011
|
-
return true;
|
|
1012
|
-
}
|
|
1013
|
-
|
|
1014
|
-
var iteratorFn = getIteratorFn(propValue);
|
|
1015
|
-
if (iteratorFn) {
|
|
1016
|
-
var iterator = iteratorFn.call(propValue);
|
|
1017
|
-
var step;
|
|
1018
|
-
if (iteratorFn !== propValue.entries) {
|
|
1019
|
-
while (!(step = iterator.next()).done) {
|
|
1020
|
-
if (!isNode(step.value)) {
|
|
1021
|
-
return false;
|
|
1022
|
-
}
|
|
1023
|
-
}
|
|
1024
|
-
} else {
|
|
1025
|
-
// Iterator will provide entry [k,v] tuples rather than values.
|
|
1026
|
-
while (!(step = iterator.next()).done) {
|
|
1027
|
-
var entry = step.value;
|
|
1028
|
-
if (entry) {
|
|
1029
|
-
if (!isNode(entry[1])) {
|
|
1030
|
-
return false;
|
|
1031
|
-
}
|
|
1032
|
-
}
|
|
1033
|
-
}
|
|
1034
|
-
}
|
|
1035
|
-
} else {
|
|
1036
|
-
return false;
|
|
1037
|
-
}
|
|
1038
|
-
|
|
1039
|
-
return true;
|
|
1040
|
-
default:
|
|
1041
|
-
return false;
|
|
1042
|
-
}
|
|
1043
|
-
}
|
|
1044
|
-
|
|
1045
|
-
function isSymbol(propType, propValue) {
|
|
1046
|
-
// Native Symbol.
|
|
1047
|
-
if (propType === 'symbol') {
|
|
1048
|
-
return true;
|
|
1049
|
-
}
|
|
1050
|
-
|
|
1051
|
-
// falsy value can't be a Symbol
|
|
1052
|
-
if (!propValue) {
|
|
1053
|
-
return false;
|
|
1054
|
-
}
|
|
1055
|
-
|
|
1056
|
-
// 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
|
|
1057
|
-
if (propValue['@@toStringTag'] === 'Symbol') {
|
|
1058
|
-
return true;
|
|
1059
|
-
}
|
|
1060
|
-
|
|
1061
|
-
// Fallback for non-spec compliant Symbols which are polyfilled.
|
|
1062
|
-
if (typeof Symbol === 'function' && propValue instanceof Symbol) {
|
|
1063
|
-
return true;
|
|
1064
|
-
}
|
|
1065
|
-
|
|
1066
|
-
return false;
|
|
1067
|
-
}
|
|
1068
|
-
|
|
1069
|
-
// Equivalent of `typeof` but with special handling for array and regexp.
|
|
1070
|
-
function getPropType(propValue) {
|
|
1071
|
-
var propType = typeof propValue;
|
|
1072
|
-
if (Array.isArray(propValue)) {
|
|
1073
|
-
return 'array';
|
|
1074
|
-
}
|
|
1075
|
-
if (propValue instanceof RegExp) {
|
|
1076
|
-
// Old webkits (at least until Android 4.0) return 'function' rather than
|
|
1077
|
-
// 'object' for typeof a RegExp. We'll normalize this here so that /bla/
|
|
1078
|
-
// passes PropTypes.object.
|
|
1079
|
-
return 'object';
|
|
1080
|
-
}
|
|
1081
|
-
if (isSymbol(propType, propValue)) {
|
|
1082
|
-
return 'symbol';
|
|
1083
|
-
}
|
|
1084
|
-
return propType;
|
|
1085
|
-
}
|
|
1086
|
-
|
|
1087
|
-
// This handles more types than `getPropType`. Only used for error messages.
|
|
1088
|
-
// See `createPrimitiveTypeChecker`.
|
|
1089
|
-
function getPreciseType(propValue) {
|
|
1090
|
-
if (typeof propValue === 'undefined' || propValue === null) {
|
|
1091
|
-
return '' + propValue;
|
|
1092
|
-
}
|
|
1093
|
-
var propType = getPropType(propValue);
|
|
1094
|
-
if (propType === 'object') {
|
|
1095
|
-
if (propValue instanceof Date) {
|
|
1096
|
-
return 'date';
|
|
1097
|
-
} else if (propValue instanceof RegExp) {
|
|
1098
|
-
return 'regexp';
|
|
1099
|
-
}
|
|
1100
|
-
}
|
|
1101
|
-
return propType;
|
|
1102
|
-
}
|
|
1103
|
-
|
|
1104
|
-
// Returns a string that is postfixed to a warning about an invalid type.
|
|
1105
|
-
// For example, "undefined" or "of type array"
|
|
1106
|
-
function getPostfixForTypeWarning(value) {
|
|
1107
|
-
var type = getPreciseType(value);
|
|
1108
|
-
switch (type) {
|
|
1109
|
-
case 'array':
|
|
1110
|
-
case 'object':
|
|
1111
|
-
return 'an ' + type;
|
|
1112
|
-
case 'boolean':
|
|
1113
|
-
case 'date':
|
|
1114
|
-
case 'regexp':
|
|
1115
|
-
return 'a ' + type;
|
|
1116
|
-
default:
|
|
1117
|
-
return type;
|
|
1118
|
-
}
|
|
1119
|
-
}
|
|
1120
|
-
|
|
1121
|
-
// Returns class name of the object, if any.
|
|
1122
|
-
function getClassName(propValue) {
|
|
1123
|
-
if (!propValue.constructor || !propValue.constructor.name) {
|
|
1124
|
-
return ANONYMOUS;
|
|
1125
|
-
}
|
|
1126
|
-
return propValue.constructor.name;
|
|
1127
|
-
}
|
|
1128
|
-
|
|
1129
|
-
ReactPropTypes.checkPropTypes = checkPropTypes;
|
|
1130
|
-
ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
|
|
1131
|
-
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
1132
|
-
|
|
1133
|
-
return ReactPropTypes;
|
|
1134
|
-
};
|
|
1135
|
-
return factoryWithTypeCheckers;
|
|
1136
|
-
}
|
|
1137
|
-
|
|
1138
|
-
/**
|
|
1139
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
1140
|
-
*
|
|
1141
|
-
* This source code is licensed under the MIT license found in the
|
|
1142
|
-
* LICENSE file in the root directory of this source tree.
|
|
1143
|
-
*/
|
|
1144
|
-
|
|
1145
|
-
var factoryWithThrowingShims;
|
|
1146
|
-
var hasRequiredFactoryWithThrowingShims;
|
|
1147
|
-
|
|
1148
|
-
function requireFactoryWithThrowingShims () {
|
|
1149
|
-
if (hasRequiredFactoryWithThrowingShims) return factoryWithThrowingShims;
|
|
1150
|
-
hasRequiredFactoryWithThrowingShims = 1;
|
|
1151
|
-
|
|
1152
|
-
var ReactPropTypesSecret = requireReactPropTypesSecret();
|
|
1153
|
-
|
|
1154
|
-
function emptyFunction() {}
|
|
1155
|
-
function emptyFunctionWithReset() {}
|
|
1156
|
-
emptyFunctionWithReset.resetWarningCache = emptyFunction;
|
|
1157
|
-
|
|
1158
|
-
factoryWithThrowingShims = function() {
|
|
1159
|
-
function shim(props, propName, componentName, location, propFullName, secret) {
|
|
1160
|
-
if (secret === ReactPropTypesSecret) {
|
|
1161
|
-
// It is still safe when called from React.
|
|
1162
|
-
return;
|
|
1163
|
-
}
|
|
1164
|
-
var err = new Error(
|
|
1165
|
-
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
|
1166
|
-
'Use PropTypes.checkPropTypes() to call them. ' +
|
|
1167
|
-
'Read more at http://fb.me/use-check-prop-types'
|
|
1168
|
-
);
|
|
1169
|
-
err.name = 'Invariant Violation';
|
|
1170
|
-
throw err;
|
|
1171
|
-
} shim.isRequired = shim;
|
|
1172
|
-
function getShim() {
|
|
1173
|
-
return shim;
|
|
1174
|
-
} // Important!
|
|
1175
|
-
// Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
|
|
1176
|
-
var ReactPropTypes = {
|
|
1177
|
-
array: shim,
|
|
1178
|
-
bigint: shim,
|
|
1179
|
-
bool: shim,
|
|
1180
|
-
func: shim,
|
|
1181
|
-
number: shim,
|
|
1182
|
-
object: shim,
|
|
1183
|
-
string: shim,
|
|
1184
|
-
symbol: shim,
|
|
1185
|
-
|
|
1186
|
-
any: shim,
|
|
1187
|
-
arrayOf: getShim,
|
|
1188
|
-
element: shim,
|
|
1189
|
-
elementType: shim,
|
|
1190
|
-
instanceOf: getShim,
|
|
1191
|
-
node: shim,
|
|
1192
|
-
objectOf: getShim,
|
|
1193
|
-
oneOf: getShim,
|
|
1194
|
-
oneOfType: getShim,
|
|
1195
|
-
shape: getShim,
|
|
1196
|
-
exact: getShim,
|
|
1197
|
-
|
|
1198
|
-
checkPropTypes: emptyFunctionWithReset,
|
|
1199
|
-
resetWarningCache: emptyFunction
|
|
1200
|
-
};
|
|
1201
|
-
|
|
1202
|
-
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
1203
|
-
|
|
1204
|
-
return ReactPropTypes;
|
|
1205
|
-
};
|
|
1206
|
-
return factoryWithThrowingShims;
|
|
1207
|
-
}
|
|
1208
|
-
|
|
1209
|
-
/**
|
|
1210
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
1211
|
-
*
|
|
1212
|
-
* This source code is licensed under the MIT license found in the
|
|
1213
|
-
* LICENSE file in the root directory of this source tree.
|
|
1214
|
-
*/
|
|
1215
|
-
|
|
1216
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
1217
|
-
var ReactIs = requireReactIs();
|
|
1218
|
-
|
|
1219
|
-
// By explicitly using `prop-types` you are opting into new development behavior.
|
|
1220
|
-
// http://fb.me/prop-types-in-prod
|
|
1221
|
-
var throwOnDirectAccess = true;
|
|
1222
|
-
propTypes.exports = requireFactoryWithTypeCheckers()(ReactIs.isElement, throwOnDirectAccess);
|
|
1223
|
-
} else {
|
|
1224
|
-
// By explicitly using `prop-types` you are opting into new production behavior.
|
|
1225
|
-
// http://fb.me/prop-types-in-prod
|
|
1226
|
-
propTypes.exports = requireFactoryWithThrowingShims()();
|
|
1227
|
-
}
|
|
1228
|
-
|
|
1229
|
-
var MemoizedEditorContent = /*#__PURE__*/React__default["default"].memo(neetoEditor.EditorContent);
|
|
1230
|
-
var EmailPreview = withT__default["default"](function (_ref) {
|
|
1231
|
-
var t = _ref.t,
|
|
1232
|
-
_ref$to = _ref.to,
|
|
1233
|
-
to = _ref$to === void 0 ? [] : _ref$to,
|
|
1234
|
-
from = _ref.from,
|
|
1235
|
-
subject = _ref.subject,
|
|
1236
|
-
body = _ref.body,
|
|
1237
|
-
productName = _ref.productName,
|
|
1238
|
-
actionButtonText = _ref.actionButtonText,
|
|
1239
|
-
logo = _ref.logo,
|
|
1240
|
-
_ref$className = _ref.className,
|
|
1241
|
-
className = _ref$className === void 0 ? "" : _ref$className;
|
|
1242
|
-
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1243
|
-
"data-cy": "email-preview-card",
|
|
1244
|
-
"data-testid": "email-preview",
|
|
1245
|
-
className: classnames__default["default"]("neeto-ui-border-gray-300 neeto-ui-shadow-m neeto-ui-bg-white flex flex-1 flex-col border", className)
|
|
1246
|
-
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1247
|
-
className: "neeto-ui-border-gray-300 space-y-3 divide-y divide-gray-200 border-b p-6"
|
|
1248
|
-
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1249
|
-
className: "flex gap-2",
|
|
1250
|
-
"data-cy": "email-send-to-preview",
|
|
1251
|
-
"data-testid": "email-to-block"
|
|
1252
|
-
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
1253
|
-
className: "neeto-ui-text-gray-500",
|
|
1254
|
-
lineHeight: "normal",
|
|
1255
|
-
style: "body2"
|
|
1256
|
-
}, t("neetoMolecules.emailPreview.to"), ":"), neetoCist.isPresent(to) ? /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
1257
|
-
className: "neeto-ui-text-gray-800 min-w-0 flex-grow break-words",
|
|
1258
|
-
lineHeight: "normal",
|
|
1259
|
-
style: "body2"
|
|
1260
|
-
}, to.join(", ")) : /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1261
|
-
className: "neeto-ui-bg-gray-300 neeto-ui-rounded-full mt-2 h-2 w-40"
|
|
1262
|
-
})), from && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1263
|
-
className: "flex items-center gap-2 pt-3"
|
|
1264
|
-
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
1265
|
-
className: "neeto-ui-text-gray-500",
|
|
1266
|
-
lineHeight: "normal",
|
|
1267
|
-
style: "body2"
|
|
1268
|
-
}, t("neetoMolecules.emailPreview.from"), ":"), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
1269
|
-
className: "neeto-ui-text-gray-800 min-w-0 flex-grow break-words",
|
|
1270
|
-
"data-cy": "email-send-from-preview",
|
|
1271
|
-
lineHeight: "normal",
|
|
1272
|
-
style: "body2"
|
|
1273
|
-
}, from)), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1274
|
-
className: "flex items-center gap-2 pt-3"
|
|
1275
|
-
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
1276
|
-
className: "neeto-ui-text-gray-500",
|
|
1277
|
-
lineHeight: "normal",
|
|
1278
|
-
style: "body2"
|
|
1279
|
-
}, t("neetoMolecules.emailPreview.subject"), ":"), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
1280
|
-
className: "neeto-ui-text-gray-800 min-w-0 flex-grow break-words",
|
|
1281
|
-
"data-cy": "email-subject-preview",
|
|
1282
|
-
lineHeight: "normal",
|
|
1283
|
-
style: "body2"
|
|
1284
|
-
}, subject || /*#__PURE__*/React__default["default"].createElement("span", {
|
|
1285
|
-
className: "neeto-ui-bg-gray-300 neeto-ui-rounded-full h-2 w-40"
|
|
1286
|
-
})))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1287
|
-
className: "neeto-ui-text-gray-800 flex flex-1 flex-col justify-between space-y-6 p-6 pr-10 text-base leading-relaxed",
|
|
1288
|
-
"data-cy": "email-body-preview-container"
|
|
1289
|
-
}, body ? /*#__PURE__*/React__default["default"].createElement(MemoizedEditorContent, {
|
|
1290
|
-
content: body
|
|
1291
|
-
}) : /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1292
|
-
className: "space-y-4"
|
|
1293
|
-
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1294
|
-
className: "neeto-ui-bg-gray-300 neeto-ui-rounded-full h-2 w-48 max-w-full md:w-80"
|
|
1295
|
-
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1296
|
-
className: "neeto-ui-bg-gray-300 neeto-ui-rounded-full h-2 w-40 max-w-full md:w-72"
|
|
1297
|
-
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1298
|
-
className: "neeto-ui-bg-gray-300 neeto-ui-rounded-full h-2 w-48 max-w-full md:w-80"
|
|
1299
|
-
})), actionButtonText && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1300
|
-
className: "mt-6 flex w-full items-center justify-center"
|
|
1301
|
-
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
1302
|
-
className: "pointer-events-none",
|
|
1303
|
-
label: actionButtonText
|
|
1304
|
-
})), logo && /*#__PURE__*/React__default["default"].createElement("img", {
|
|
1305
|
-
alt: t("neetoMolecules.emailPreview.logoAltText"),
|
|
1306
|
-
className: "h-20 w-36 object-cover",
|
|
1307
|
-
"data-cy": "company-logo-preview",
|
|
1308
|
-
src: logo
|
|
1309
|
-
})), productName && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1310
|
-
className: "neeto-ui-bg-gray-100 mt-auto p-2",
|
|
1311
|
-
"data-testid": "product-name-block"
|
|
1312
|
-
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
1313
|
-
className: "neeto-ui-text-gray-600 text-center leading-6",
|
|
1314
|
-
style: "body3"
|
|
1315
|
-
}, t("neetoMolecules.emailPreview.poweredBy"), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
1316
|
-
className: "neeto-ui-text-gray-800 font-medium"
|
|
1317
|
-
}, productName))));
|
|
1318
|
-
});
|
|
1319
|
-
EmailPreview.propTypes = {
|
|
1320
|
-
/**
|
|
1321
|
-
* The value of the send-to field.
|
|
1322
|
-
*/
|
|
1323
|
-
to: propTypes.exports.arrayOf(propTypes.exports.string),
|
|
1324
|
-
/**
|
|
1325
|
-
* The value of the send-from field.
|
|
1326
|
-
*/
|
|
1327
|
-
from: propTypes.exports.string,
|
|
1328
|
-
/**
|
|
1329
|
-
* The subject of the email.
|
|
1330
|
-
*/
|
|
1331
|
-
subject: propTypes.exports.string,
|
|
1332
|
-
/**
|
|
1333
|
-
* The body of the email.
|
|
1334
|
-
*/
|
|
1335
|
-
body: propTypes.exports.string,
|
|
1336
|
-
/**
|
|
1337
|
-
* The name of the neeto product to be previewed.
|
|
1338
|
-
*/
|
|
1339
|
-
productName: propTypes.exports.string,
|
|
1340
|
-
/**
|
|
1341
|
-
* The text to be shown in the action button.
|
|
1342
|
-
*/
|
|
1343
|
-
actionButtonText: propTypes.exports.string,
|
|
1344
|
-
/**
|
|
1345
|
-
* Source link for the company logo.
|
|
1346
|
-
*/
|
|
1347
|
-
logo: propTypes.exports.string
|
|
1348
|
-
};
|
|
1349
|
-
|
|
1350
|
-
function _extends() {
|
|
1351
|
-
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
1352
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
1353
|
-
var source = arguments[i];
|
|
1354
|
-
for (var key in source) {
|
|
1355
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
1356
|
-
target[key] = source[key];
|
|
1357
|
-
}
|
|
1358
|
-
}
|
|
1359
|
-
}
|
|
1360
|
-
return target;
|
|
1361
|
-
};
|
|
1362
|
-
return _extends.apply(this, arguments);
|
|
1363
|
-
}
|
|
1364
|
-
|
|
1365
|
-
function _arrayLikeToArray(arr, len) {
|
|
1366
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
1367
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
1368
|
-
return arr2;
|
|
1369
|
-
}
|
|
1370
|
-
|
|
1371
|
-
function _arrayWithoutHoles(arr) {
|
|
1372
|
-
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
1373
|
-
}
|
|
1374
|
-
|
|
1375
|
-
function _iterableToArray(iter) {
|
|
1376
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
1377
|
-
}
|
|
1378
|
-
|
|
1379
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
1380
|
-
if (!o) return;
|
|
1381
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
1382
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
1383
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
1384
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
1385
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
1386
|
-
}
|
|
1387
|
-
|
|
1388
|
-
function _nonIterableSpread() {
|
|
1389
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1390
|
-
}
|
|
1391
|
-
|
|
1392
|
-
function _toConsumableArray(arr) {
|
|
1393
|
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
1394
|
-
}
|
|
1395
|
-
|
|
1396
|
-
function _arrayWithHoles(arr) {
|
|
1397
|
-
if (Array.isArray(arr)) return arr;
|
|
1398
|
-
}
|
|
1399
|
-
|
|
1400
|
-
function _iterableToArrayLimit(r, l) {
|
|
1401
|
-
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
1402
|
-
if (null != t) {
|
|
1403
|
-
var e,
|
|
1404
|
-
n,
|
|
1405
|
-
i,
|
|
1406
|
-
u,
|
|
1407
|
-
a = [],
|
|
1408
|
-
f = !0,
|
|
1409
|
-
o = !1;
|
|
1410
|
-
try {
|
|
1411
|
-
if (i = (t = t.call(r)).next, 0 === l) {
|
|
1412
|
-
if (Object(t) !== t) return;
|
|
1413
|
-
f = !1;
|
|
1414
|
-
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
1415
|
-
} catch (r) {
|
|
1416
|
-
o = !0, n = r;
|
|
1417
|
-
} finally {
|
|
1418
|
-
try {
|
|
1419
|
-
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
|
|
1420
|
-
} finally {
|
|
1421
|
-
if (o) throw n;
|
|
1422
|
-
}
|
|
1423
|
-
}
|
|
1424
|
-
return a;
|
|
1425
|
-
}
|
|
1426
|
-
}
|
|
1427
|
-
|
|
1428
|
-
function _nonIterableRest() {
|
|
1429
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1430
|
-
}
|
|
1431
|
-
|
|
1432
|
-
function _slicedToArray(arr, i) {
|
|
1433
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
1434
|
-
}
|
|
1435
|
-
|
|
1436
|
-
var ALLOWED_FILE_TYPES = [".csv"];
|
|
1437
|
-
var ONE_MEGABYTE_IN_BYTES = 1024 * 1024;
|
|
1438
|
-
var DOWNLOAD_SAMPLE_EMAIL_CSV_FILE = "https://d2v7kzglnr2dnh.cloudfront.net/others/sample-bulk-email.csv";
|
|
1439
|
-
|
|
1440
|
-
var Requirements = withT__default["default"](function (_ref) {
|
|
1441
|
-
var t = _ref.t,
|
|
1442
|
-
fileSize = _ref.fileSize;
|
|
1443
|
-
return /*#__PURE__*/React__default["default"].createElement(neetoui.Callout, {
|
|
1444
|
-
className: "flex flex-col items-center py-6",
|
|
1445
|
-
style: "info"
|
|
1446
|
-
}, /*#__PURE__*/React__default["default"].createElement("ul", {
|
|
1447
|
-
className: "list-outside list-disc space-y-1 font-normal leading-normal"
|
|
1448
|
-
}, fileSize && /*#__PURE__*/React__default["default"].createElement("li", null, t("neetoMolecules.shareViaLink.requirements.fileTypeAndSize", {
|
|
1449
|
-
limit: fileSize
|
|
1450
|
-
})), /*#__PURE__*/React__default["default"].createElement("li", null, /*#__PURE__*/React__default["default"].createElement(reactI18next.Trans, {
|
|
1451
|
-
components: {
|
|
1452
|
-
strong: /*#__PURE__*/React__default["default"].createElement("strong", {
|
|
1453
|
-
className: "font-semibold"
|
|
1454
|
-
})
|
|
1455
|
-
},
|
|
1456
|
-
i18nKey: "neetoMolecules.shareViaLink.requirements.shouldContainColumns"
|
|
1457
|
-
}))), /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
1458
|
-
href: DOWNLOAD_SAMPLE_EMAIL_CSV_FILE,
|
|
1459
|
-
icon: neetoIcons.Download,
|
|
1460
|
-
iconPosition: "left",
|
|
1461
|
-
label: t("neetoMolecules.shareViaLink.bulkUploadPane.downloadSampleCSV"),
|
|
1462
|
-
style: "link"
|
|
1463
|
-
}));
|
|
1464
|
-
});
|
|
1465
|
-
var Requirements$1 = /*#__PURE__*/React__default["default"].memo(Requirements);
|
|
1466
|
-
|
|
1467
|
-
var BulkUploadPane = function BulkUploadPane(_ref) {
|
|
1468
|
-
var _fileRejections$;
|
|
1469
|
-
var isOpen = _ref.isOpen,
|
|
1470
|
-
fileType = _ref.fileType,
|
|
1471
|
-
fileSize = _ref.fileSize,
|
|
1472
|
-
onClose = _ref.onClose,
|
|
1473
|
-
handleFileSubmit = _ref.handleFileSubmit;
|
|
1474
|
-
var _useDropzone = reactDropzone.useDropzone({
|
|
1475
|
-
accept: fileType,
|
|
1476
|
-
maxFiles: 1,
|
|
1477
|
-
maxSize: fileSize * ONE_MEGABYTE_IN_BYTES,
|
|
1478
|
-
onDrop: function onDrop(files) {
|
|
1479
|
-
return files[0] && handleFileSubmit(files[0]);
|
|
1480
|
-
}
|
|
1481
|
-
}),
|
|
1482
|
-
getRootProps = _useDropzone.getRootProps,
|
|
1483
|
-
getInputProps = _useDropzone.getInputProps,
|
|
1484
|
-
isDragActive = _useDropzone.isDragActive,
|
|
1485
|
-
fileRejections = _useDropzone.fileRejections;
|
|
1486
|
-
var errors = (_fileRejections$ = fileRejections[0]) === null || _fileRejections$ === void 0 ? void 0 : _fileRejections$.errors.map(function (_ref2) {
|
|
1487
|
-
var message = _ref2.message,
|
|
1488
|
-
code = _ref2.code;
|
|
1489
|
-
return /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
1490
|
-
className: "neeto-ui-text-error-500 items",
|
|
1491
|
-
"data-cy": "file-input-error-message",
|
|
1492
|
-
key: code,
|
|
1493
|
-
style: "body3"
|
|
1494
|
-
}, message);
|
|
1495
|
-
});
|
|
1496
|
-
var _useTranslation = reactI18next.useTranslation(),
|
|
1497
|
-
t = _useTranslation.t;
|
|
1498
|
-
return /*#__PURE__*/React__default["default"].createElement(neetoui.Pane, {
|
|
1499
|
-
"data-testid": "bulk-upload-pane",
|
|
1500
|
-
isOpen: isOpen,
|
|
1501
|
-
onClose: onClose
|
|
1502
|
-
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1503
|
-
tabIndex: 0
|
|
1504
|
-
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Pane.Header, null, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
1505
|
-
"data-testid": "bulk-upload-header",
|
|
1506
|
-
style: "h2",
|
|
1507
|
-
weight: "semibold"
|
|
1508
|
-
}, t("neetoMolecules.shareViaLink.bulkUpload"))), /*#__PURE__*/React__default["default"].createElement(neetoui.Pane.Body, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1509
|
-
className: "w-full space-y-4"
|
|
1510
|
-
}, /*#__PURE__*/React__default["default"].createElement(Requirements$1, {
|
|
1511
|
-
fileSize: fileSize
|
|
1512
|
-
}), /*#__PURE__*/React__default["default"].createElement("div", getRootProps({
|
|
1513
|
-
className: classnames__default["default"]("flex flex-col p-2 border neeto-ui-border-primary-500 border-dashed neeto-ui-rounded-md transition duration-500 ease-in-out hover:neeto-ui-bg-gray-100 cursor-pointer items-center", {
|
|
1514
|
-
"neeto-ui-border-gray-100": isDragActive,
|
|
1515
|
-
"neeto-ui-border-error neeto-ui-bg-pastel-red hover:neeto-ui-bg-pastel-red": fileRejections.length
|
|
1516
|
-
})
|
|
1517
|
-
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1518
|
-
className: "flex flex-col items-center space-y-3 p-4"
|
|
1519
|
-
}, /*#__PURE__*/React__default["default"].createElement(neetoIcons.Upload, {
|
|
1520
|
-
className: "neeto-ui-text-primary-500",
|
|
1521
|
-
size: 32
|
|
1522
|
-
}), /*#__PURE__*/React__default["default"].createElement("input", _extends({}, getInputProps(), {
|
|
1523
|
-
"data-cy": "csv-upload-input",
|
|
1524
|
-
"data-testid": "csv-upload-input"
|
|
1525
|
-
})), isDragActive ? /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
1526
|
-
style: "body2"
|
|
1527
|
-
}, t("neetoMolecules.shareViaLink.bulkUploadPane.dropFileHere")) : /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1528
|
-
className: "flex flex-col items-center space-y-1"
|
|
1529
|
-
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1530
|
-
className: "flex w-full items-center justify-center gap-x-1"
|
|
1531
|
-
}, /*#__PURE__*/React__default["default"].createElement(reactI18next.Trans, {
|
|
1532
|
-
i18nKey: "neetoMolecules.shareViaLink.bulkUploadPane.dragNDrop",
|
|
1533
|
-
components: {
|
|
1534
|
-
Button: /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
1535
|
-
style: "link"
|
|
1536
|
-
})
|
|
1537
|
-
}
|
|
1538
|
-
})), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
1539
|
-
className: "neeto-ui-text-gray-700",
|
|
1540
|
-
style: "body3"
|
|
1541
|
-
}, fileType && /*#__PURE__*/React__default["default"].createElement(reactI18next.Trans, {
|
|
1542
|
-
i18nKey: "neetoMolecules.shareViaLink.bulkUploadPane.supportedFormat",
|
|
1543
|
-
values: {
|
|
1544
|
-
fileType: fileType
|
|
1545
|
-
},
|
|
1546
|
-
components: {
|
|
1547
|
-
code: /*#__PURE__*/React__default["default"].createElement("code", {
|
|
1548
|
-
className: "neeto-ui-typography neeto-ui-text-body3 neeto-ui-bg-white m-0 border-l-0 p-0"
|
|
1549
|
-
})
|
|
1550
|
-
}
|
|
1551
|
-
}), " ", fileSize && t("neetoMolecules.shareViaLink.bulkUploadPane.supportedSize", {
|
|
1552
|
-
fileSize: fileSize
|
|
1553
|
-
})))), errors))), /*#__PURE__*/React__default["default"].createElement(neetoui.Pane.Footer, {
|
|
1554
|
-
className: "flex items-center space-x-2"
|
|
1555
|
-
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
1556
|
-
"data-cy": "bulk-upload-cancel-button",
|
|
1557
|
-
"data-testid": "bulk-upload-cancel-button",
|
|
1558
|
-
label: t("neetoMolecules.common.actions.cancel"),
|
|
1559
|
-
style: "text",
|
|
1560
|
-
type: "reset",
|
|
1561
|
-
onClick: onClose
|
|
1562
|
-
}))));
|
|
1563
|
-
};
|
|
1564
|
-
|
|
1565
|
-
var isValidEmail = function isValidEmail(email) {
|
|
1566
|
-
return yup.string().email().isValidSync(email);
|
|
1567
|
-
};
|
|
1568
|
-
var createEmailOptions = function createEmailOptions() {
|
|
1569
|
-
var emails = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
1570
|
-
return emails.map(function (email) {
|
|
1571
|
-
return {
|
|
1572
|
-
label: email,
|
|
1573
|
-
value: email,
|
|
1574
|
-
valid: isValidEmail(email)
|
|
1575
|
-
};
|
|
1576
|
-
});
|
|
1577
|
-
};
|
|
1578
|
-
var parseCsvEmails = function parseCsvEmails(file, onSuccess) {
|
|
1579
|
-
Papa__default["default"].parse(file, {
|
|
1580
|
-
header: true,
|
|
1581
|
-
skipEmptyLines: true,
|
|
1582
|
-
transformHeader: function transformHeader(h) {
|
|
1583
|
-
return h.toLowerCase().replace(/\W/g, "");
|
|
1584
|
-
},
|
|
1585
|
-
complete: function complete(results) {
|
|
1586
|
-
var _results$meta$fields;
|
|
1587
|
-
var isEmailFieldPresent = (_results$meta$fields = results.meta.fields) === null || _results$meta$fields === void 0 ? void 0 : _results$meta$fields.includes("email");
|
|
1588
|
-
if (isEmailFieldPresent) {
|
|
1589
|
-
var emails = results.data.filter(ramda.prop("email")).map(function (item) {
|
|
1590
|
-
return item.email.trim();
|
|
1591
|
-
});
|
|
1592
|
-
onSuccess(createEmailOptions(emails));
|
|
1593
|
-
} else {
|
|
1594
|
-
neetoui.Toastr.error(i18next.t("neetoMolecules.sendToFields.errors.invalidCsv"));
|
|
1595
|
-
}
|
|
1596
|
-
}
|
|
1597
|
-
});
|
|
1598
|
-
};
|
|
1599
|
-
|
|
1600
|
-
var SendToFields = function SendToFields(_ref) {
|
|
1601
|
-
var emailInputProps = _ref.emailInputProps,
|
|
1602
|
-
ccInputProps = _ref.ccInputProps,
|
|
1603
|
-
bccInputProps = _ref.bccInputProps,
|
|
1604
|
-
_ref$showUploadCsvBut = _ref.showUploadCsvButton,
|
|
1605
|
-
showUploadCsvButton = _ref$showUploadCsvBut === void 0 ? false : _ref$showUploadCsvBut,
|
|
1606
|
-
_ref$showCcBccButton = _ref.showCcBccButton,
|
|
1607
|
-
showCcBccButton = _ref$showCcBccButton === void 0 ? false : _ref$showCcBccButton;
|
|
1608
|
-
var _useState = React.useState(false),
|
|
1609
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
1610
|
-
isBulkUploadPaneOpen = _useState2[0],
|
|
1611
|
-
setIsBulkUploadPaneOpen = _useState2[1];
|
|
1612
|
-
var sendToFieldRef = React.useRef();
|
|
1613
|
-
var _useFormikContext = formik.useFormikContext(),
|
|
1614
|
-
_useFormikContext$val = _useFormikContext.values,
|
|
1615
|
-
showCopyEmails = _useFormikContext$val.showCopyEmails,
|
|
1616
|
-
existingSendToEmails = _useFormikContext$val[emailInputProps.name || "sendTo"],
|
|
1617
|
-
setFieldValue = _useFormikContext.setFieldValue;
|
|
1618
|
-
var _useTranslation = reactI18next.useTranslation(),
|
|
1619
|
-
t = _useTranslation.t;
|
|
1620
|
-
var handleCSVFile = function handleCSVFile(file) {
|
|
1621
|
-
try {
|
|
1622
|
-
var _sendToFieldRef$curre;
|
|
1623
|
-
var onSuccess = function onSuccess(values) {
|
|
1624
|
-
return setFieldValue(emailInputProps.name || "sendTo", [].concat(_toConsumableArray(existingSendToEmails), _toConsumableArray(values)));
|
|
1625
|
-
};
|
|
1626
|
-
parseCsvEmails(file, onSuccess);
|
|
1627
|
-
setIsBulkUploadPaneOpen(false);
|
|
1628
|
-
(_sendToFieldRef$curre = sendToFieldRef.current) === null || _sendToFieldRef$curre === void 0 ? void 0 : _sendToFieldRef$curre.focus();
|
|
1629
|
-
} catch (error) {
|
|
1630
|
-
neetoui.Toastr.error(error);
|
|
1631
|
-
}
|
|
1632
|
-
};
|
|
1633
|
-
var handelCcBccButtonClick = function handelCcBccButtonClick(e) {
|
|
1634
|
-
e.stopPropagation();
|
|
1635
|
-
setFieldValue("showCopyEmails", !showCopyEmails);
|
|
1636
|
-
};
|
|
1637
|
-
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1638
|
-
className: "relative w-full flex-col gap-2"
|
|
1639
|
-
}, showUploadCsvButton && /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
1640
|
-
className: "absolute top-0 right-1",
|
|
1641
|
-
"data-testid": "bulk-upload-button",
|
|
1642
|
-
icon: neetoIcons.Upload,
|
|
1643
|
-
label: t("neetoMolecules.shareViaLink.bulkUpload"),
|
|
1644
|
-
size: "small",
|
|
1645
|
-
style: "link",
|
|
1646
|
-
onClick: function onClick() {
|
|
1647
|
-
return setIsBulkUploadPaneOpen(true);
|
|
1648
|
-
}
|
|
1649
|
-
}), /*#__PURE__*/React__default["default"].createElement(formik$1.MultiEmailInput, _extends({
|
|
1650
|
-
"data-testid": "emails",
|
|
1651
|
-
name: "sendTo",
|
|
1652
|
-
ref: sendToFieldRef
|
|
1653
|
-
}, emailInputProps, {
|
|
1654
|
-
suffix: showCcBccButton && /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
1655
|
-
"data-cy": "cc-bcc-button",
|
|
1656
|
-
"data-testid": "cc-bcc-button",
|
|
1657
|
-
label: t("neetoMolecules.emailForm.labels.ccBcc"),
|
|
1658
|
-
size: "small",
|
|
1659
|
-
style: "link",
|
|
1660
|
-
onClick: handelCcBccButtonClick
|
|
1661
|
-
})
|
|
1662
|
-
})), showCopyEmails && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1663
|
-
className: "mt-5 flex w-full flex-col gap-6"
|
|
1664
|
-
}, /*#__PURE__*/React__default["default"].createElement(formik$1.MultiEmailInput, _extends({
|
|
1665
|
-
name: "sendToBcc"
|
|
1666
|
-
}, ccInputProps)), /*#__PURE__*/React__default["default"].createElement(formik$1.MultiEmailInput, _extends({
|
|
1667
|
-
name: "sendToCc"
|
|
1668
|
-
}, bccInputProps))), /*#__PURE__*/React__default["default"].createElement(BulkUploadPane, {
|
|
1669
|
-
fileSize: globalProps.endUserUploadedFileSizeLimitInMb,
|
|
1670
|
-
fileType: ALLOWED_FILE_TYPES,
|
|
1671
|
-
handleFileSubmit: handleCSVFile,
|
|
1672
|
-
isOpen: isBulkUploadPaneOpen,
|
|
1673
|
-
onClose: function onClose() {
|
|
1674
|
-
return setIsBulkUploadPaneOpen(false);
|
|
1675
|
-
}
|
|
1676
|
-
}));
|
|
1677
|
-
};
|
|
51
|
+
var yup__namespace = /*#__PURE__*/_interopNamespace(yup);
|
|
1678
52
|
|
|
1679
53
|
var INITIAL_VALUES = {
|
|
1680
54
|
sendFromEmail: "",
|
|
@@ -1702,50 +76,21 @@ var EmailBody = function EmailBody(_ref, ref) {
|
|
|
1702
76
|
label: t("neetoMolecules.shareViaEmail.emailBody"),
|
|
1703
77
|
name: "emailBody",
|
|
1704
78
|
ref: ref,
|
|
1705
|
-
addons: showVideoEmbedInEditor ? [].concat(_toConsumableArray(EDITOR_ADDONS), ["video-embed"]) : EDITOR_ADDONS
|
|
79
|
+
addons: showVideoEmbedInEditor ? [].concat(toConsumableArray._toConsumableArray(EDITOR_ADDONS), ["video-embed"]) : EDITOR_ADDONS
|
|
1706
80
|
});
|
|
1707
81
|
};
|
|
1708
82
|
var EmailBody$1 = /*#__PURE__*/React.forwardRef(EmailBody);
|
|
1709
83
|
|
|
1710
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
1711
|
-
if (source == null) return {};
|
|
1712
|
-
var target = {};
|
|
1713
|
-
var sourceKeys = Object.keys(source);
|
|
1714
|
-
var key, i;
|
|
1715
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
1716
|
-
key = sourceKeys[i];
|
|
1717
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
1718
|
-
target[key] = source[key];
|
|
1719
|
-
}
|
|
1720
|
-
return target;
|
|
1721
|
-
}
|
|
1722
|
-
|
|
1723
|
-
function _objectWithoutProperties(source, excluded) {
|
|
1724
|
-
if (source == null) return {};
|
|
1725
|
-
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
1726
|
-
var key, i;
|
|
1727
|
-
if (Object.getOwnPropertySymbols) {
|
|
1728
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
1729
|
-
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
1730
|
-
key = sourceSymbolKeys[i];
|
|
1731
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
1732
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
1733
|
-
target[key] = source[key];
|
|
1734
|
-
}
|
|
1735
|
-
}
|
|
1736
|
-
return target;
|
|
1737
|
-
}
|
|
1738
|
-
|
|
1739
84
|
var _excluded = ["name"];
|
|
1740
85
|
var FormikDatePicker = function FormikDatePicker(_ref) {
|
|
1741
86
|
var name = _ref.name,
|
|
1742
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
87
|
+
props = objectWithoutProperties._objectWithoutProperties(_ref, _excluded);
|
|
1743
88
|
var _useField = formik.useField(name),
|
|
1744
|
-
_useField2 = _slicedToArray(_useField, 3),
|
|
89
|
+
_useField2 = slicedToArray._slicedToArray(_useField, 3),
|
|
1745
90
|
field = _useField2[0],
|
|
1746
91
|
meta = _useField2[1],
|
|
1747
92
|
setValue = _useField2[2].setValue;
|
|
1748
|
-
return /*#__PURE__*/React__default["default"].createElement(neetoui.DatePicker, _extends({}, field, meta, {
|
|
93
|
+
return /*#__PURE__*/React__default["default"].createElement(neetoui.DatePicker, _extends._extends({}, field, meta, {
|
|
1749
94
|
onChange: function onChange(date) {
|
|
1750
95
|
return setValue(date || undefined);
|
|
1751
96
|
}
|
|
@@ -1754,49 +99,8 @@ var FormikDatePicker = function FormikDatePicker(_ref) {
|
|
|
1754
99
|
}));
|
|
1755
100
|
};
|
|
1756
101
|
|
|
1757
|
-
function _typeof(o) {
|
|
1758
|
-
"@babel/helpers - typeof";
|
|
1759
|
-
|
|
1760
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
1761
|
-
return typeof o;
|
|
1762
|
-
} : function (o) {
|
|
1763
|
-
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
1764
|
-
}, _typeof(o);
|
|
1765
|
-
}
|
|
1766
|
-
|
|
1767
|
-
function _toPrimitive(input, hint) {
|
|
1768
|
-
if (_typeof(input) !== "object" || input === null) return input;
|
|
1769
|
-
var prim = input[Symbol.toPrimitive];
|
|
1770
|
-
if (prim !== undefined) {
|
|
1771
|
-
var res = prim.call(input, hint || "default");
|
|
1772
|
-
if (_typeof(res) !== "object") return res;
|
|
1773
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1774
|
-
}
|
|
1775
|
-
return (hint === "string" ? String : Number)(input);
|
|
1776
|
-
}
|
|
1777
|
-
|
|
1778
|
-
function _toPropertyKey(arg) {
|
|
1779
|
-
var key = _toPrimitive(arg, "string");
|
|
1780
|
-
return _typeof(key) === "symbol" ? key : String(key);
|
|
1781
|
-
}
|
|
1782
|
-
|
|
1783
|
-
function _defineProperty(obj, key, value) {
|
|
1784
|
-
key = _toPropertyKey(key);
|
|
1785
|
-
if (key in obj) {
|
|
1786
|
-
Object.defineProperty(obj, key, {
|
|
1787
|
-
value: value,
|
|
1788
|
-
enumerable: true,
|
|
1789
|
-
configurable: true,
|
|
1790
|
-
writable: true
|
|
1791
|
-
});
|
|
1792
|
-
} else {
|
|
1793
|
-
obj[key] = value;
|
|
1794
|
-
}
|
|
1795
|
-
return obj;
|
|
1796
|
-
}
|
|
1797
|
-
|
|
1798
102
|
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; }
|
|
1799
|
-
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; }
|
|
103
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { defineProperty._defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1800
104
|
var isPastDate = function isPastDate(date) {
|
|
1801
105
|
return dayjs__default["default"](date).isBefore(dayjs__default["default"]().subtract(1, "days"));
|
|
1802
106
|
};
|