@bigbinary/neeto-molecules 1.1.10 → 1.1.11
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/AutoSaveInput/autosaveinput.scss +15 -0
- package/dist/AutoSaveInput/constants.js +13 -0
- package/dist/AutoSaveInput/index.js +124 -0
- package/dist/AutoSaveInput/utils.js +10 -0
- package/dist/Breadcrumbs/breadcrumbs.scss +33 -0
- package/dist/Breadcrumbs/index.js +31 -0
- package/dist/BrowserSupport/Callout.js +15 -0
- package/dist/BrowserSupport/ContactUs.js +21 -0
- package/dist/BrowserSupport/DownloadLink.js +17 -0
- package/dist/BrowserSupport/PartialSupportedBrowserVersion.js +17 -0
- package/dist/BrowserSupport/UnknownBrowser.js +13 -0
- package/dist/BrowserSupport/UnsupportedBrowser.js +24 -0
- package/dist/BrowserSupport/UnsupportedBrowserMessage.js +22 -0
- package/dist/BrowserSupport/UnsupportedBrowserVersion.js +27 -0
- package/dist/BrowserSupport/UnsupportedVersionMessage.js +30 -0
- package/dist/BrowserSupport/browsersupport.scss +71 -0
- package/dist/BrowserSupport/constants.js +63 -0
- package/dist/BrowserSupport/index.js +58 -0
- package/dist/BrowserSupport/utils.js +32 -0
- package/dist/CalendarView/CustomDatePicker.js +87 -0
- package/dist/CalendarView/Header.js +53 -0
- package/dist/CalendarView/constants.js +19 -0
- package/dist/CalendarView/index.js +83 -0
- package/dist/CalendarView/utils.js +50 -0
- package/dist/Codeblock/index.js +30 -0
- package/dist/{Columns.js → Columns/index.js} +13 -130
- package/dist/Columns/utils.js +20 -0
- package/dist/ConfirmationModal/constants.js +3 -0
- package/dist/{ConfirmationModal.js → ConfirmationModal/index.js} +7 -23
- package/dist/ConfirmationModal/utils.js +10 -0
- package/dist/Container/container.scss +21 -0
- package/dist/Container/index.js +23 -0
- package/dist/CopyToClipboardButton/constants.js +13 -0
- package/dist/CopyToClipboardButton/copyToClipboard.scss +22 -0
- package/dist/CopyToClipboardButton/index.js +59 -0
- package/dist/CustomDomain/index.js +98 -0
- package/dist/CustomDomainDashboard/DeleteAlert.js +28 -0
- package/dist/CustomDomainDashboard/Header.js +32 -0
- package/dist/CustomDomainDashboard/Manage/Record.js +42 -0
- package/dist/CustomDomainDashboard/Manage/StatusInfo.js +21 -0
- package/dist/CustomDomainDashboard/Manage/TagBlock.js +36 -0
- package/dist/CustomDomainDashboard/Manage/constants.js +4 -0
- package/dist/CustomDomainDashboard/Manage/index.js +124 -0
- package/dist/CustomDomainDashboard/Manage/utils.js +8 -0
- package/dist/CustomDomainDashboard/api.js +35 -0
- package/dist/CustomDomainDashboard/constants.js +2 -0
- package/dist/CustomDomainDashboard/index.js +118 -0
- package/dist/CustomDomainDashboard/useCustomDomainApi.js +71 -0
- package/dist/CustomDomainDashboard/utils.js +84 -0
- package/dist/{DateFormat.js → DateFormat/index.js} +8 -25
- package/dist/DateRangeFilter/index.js +60 -0
- package/dist/DateRangeFilter/utils.js +113 -0
- package/dist/DynamicVariables/dynamic-variables.scss +34 -0
- package/dist/DynamicVariables/index.js +59 -0
- package/dist/DynamicVariables/utils.js +37 -0
- package/dist/EmailForm/EmailForm.js +97 -0
- package/dist/EmailForm/EmailFormProvider.js +45 -0
- package/dist/EmailForm/EmailPreview.js +129 -0
- package/dist/EmailForm/ReplyToField.js +55 -0
- package/dist/EmailForm/SendToField.js +27 -0
- package/dist/EmailForm/SubjectField.js +64 -0
- package/dist/EmailForm/constants.js +33 -0
- package/dist/EmailForm/contexts/EmailForm.js +7 -0
- package/dist/EmailForm/index.js +4 -0
- package/dist/EmailForm/utils.js +10 -0
- package/dist/EmailPreview/index.js +2 -0
- package/dist/{ErrorPage.js → ErrorPage/constants.js} +36 -175
- package/dist/ErrorPage/index.js +78 -0
- package/dist/Header/Breadcrumbs.js +31 -0
- package/dist/Header/Dropdown.js +12 -0
- package/dist/Header/constants.js +6 -0
- package/dist/Header/header.scss +121 -0
- package/dist/Header/index.js +61 -0
- package/dist/IconPicker/Icon.js +34 -0
- package/dist/IconPicker/NoResults.js +12 -0
- package/dist/IconPicker/constants.js +8 -0
- package/dist/IconPicker/icon-picker.scss +1 -0
- package/dist/IconPicker/index.js +164 -0
- package/dist/ImageWithFallback/ImagePlaceholder.js +16 -0
- package/dist/ImageWithFallback/index.js +31 -0
- package/dist/IntegrationCard/Dropdown.js +45 -0
- package/dist/IntegrationCard/Status.js +25 -0
- package/dist/IntegrationCard/index.js +128 -0
- package/dist/IntegrationDisconnectAlert/index.js +36 -0
- package/dist/{IntegrationWalkthroughModal.js → IntegrationWalkthroughModal/index.js} +6 -8
- package/dist/IpRestriction/AllowedIpRanges.js +72 -0
- package/dist/IpRestriction/CurrentIp.js +26 -0
- package/dist/IpRestriction/FormRow.js +77 -0
- package/dist/IpRestriction/Row.js +86 -0
- package/dist/IpRestriction/apis/allowed_ip_ranges.js +28 -0
- package/dist/IpRestriction/apis/current_ip.js +11 -0
- package/dist/IpRestriction/apis/ip_restriction.js +16 -0
- package/dist/IpRestriction/constants.js +11 -0
- package/dist/IpRestriction/hooks/reactQuery/useAllowedIpRanges.js +34 -0
- package/dist/IpRestriction/hooks/reactQuery/useCurrentIp.js +10 -0
- package/dist/IpRestriction/hooks/reactQuery/useIpRestrictions.js +18 -0
- package/dist/IpRestriction/index.js +102 -0
- package/dist/IpRestriction/utils.js +67 -0
- package/dist/KeyboardShortcuts/Pane/HotKey.js +44 -0
- package/dist/KeyboardShortcuts/Pane/HotKeyList.js +42 -0
- package/dist/KeyboardShortcuts/Pane/constants.js +25 -0
- package/dist/KeyboardShortcuts/Pane/index.js +61 -0
- package/dist/KeyboardShortcuts/Pane/keyboard-shortcuts.scss +5 -0
- package/dist/KeyboardShortcuts/Pane/utils.js +66 -0
- package/dist/KeyboardShortcuts/hooks/useKeyboardShortcutsPaneState.js +31 -0
- package/dist/KeyboardShortcuts/index.js +9 -0
- package/dist/LoginPage/Form.js +57 -0
- package/dist/LoginPage/constants.js +12 -0
- package/dist/LoginPage/index.js +103 -0
- package/dist/MenuBar/AddNew.js +25 -0
- package/dist/MenuBar/Block.js +60 -0
- package/dist/MenuBar/Item.js +32 -0
- package/dist/MenuBar/Search.js +39 -0
- package/dist/MenuBar/SubTitle.js +23 -0
- package/dist/MenuBar/index.js +46 -0
- package/dist/MenuBar/menubar.scss +154 -0
- package/dist/Metadata/Block.js +30 -0
- package/dist/Metadata/DetailsBlock.js +86 -0
- package/dist/Metadata/constants.js +9 -0
- package/dist/Metadata/index.js +29 -0
- package/dist/Metadata/metadata.scss +15 -0
- package/dist/MoreDropdown/constants.js +25 -0
- package/dist/{MoreDropdown.js → MoreDropdown/index.js} +9 -102
- package/dist/NavigationHeader/LeftBlock.js +32 -0
- package/dist/NavigationHeader/Navigation.js +24 -0
- package/dist/NavigationHeader/RightBlock.js +68 -0
- package/dist/NavigationHeader/constants.js +11 -0
- package/dist/NavigationHeader/index.js +19 -0
- package/dist/NavigationHeader/navigation-header.scss +3 -0
- package/dist/NeetoWidget/CodeBlock.js +57 -0
- package/dist/NeetoWidget/CodeSnippet.js +119 -0
- package/dist/NeetoWidget/EmbedCode.js +281 -0
- package/dist/NeetoWidget/Main.js +19 -0
- package/dist/NeetoWidget/SelectionSwitches/TooltipSwitch.js +25 -0
- package/dist/NeetoWidget/SelectionSwitches/index.js +44 -0
- package/dist/NeetoWidget/SyntaxHighlighter.js +17 -0
- package/dist/NeetoWidget/api.js +20 -0
- package/dist/NeetoWidget/constants.js +62 -0
- package/dist/NeetoWidget/hooks/useForceUpdate.js +14 -0
- package/dist/NeetoWidget/index.js +7 -0
- package/dist/NeetoWidget/mutations.js +9 -0
- package/dist/NeetoWidget/queries.js +32 -0
- package/dist/NeetoWidget/utils.js +83 -0
- package/dist/PageLoader/index.js +81 -0
- package/dist/PageLoader/page-loader.scss +95 -0
- package/dist/PhoneNumber/CountryPicker/SingleValue.js +21 -0
- package/dist/PhoneNumber/CountryPicker/constants.js +26 -0
- package/dist/PhoneNumber/CountryPicker/index.js +59 -0
- package/dist/PhoneNumber/FormikPhoneNumberInput.js +21 -0
- package/dist/PhoneNumber/PhoneNumber.js +30 -0
- package/dist/PhoneNumber/PhoneNumberInput.js +79 -0
- package/dist/PhoneNumber/index.js +5 -0
- package/dist/PhoneNumber/utils.js +55 -0
- package/dist/PublishBlock/AlertBlock.js +14 -0
- package/dist/PublishBlock/index.js +100 -0
- package/dist/PublishBlock/publish-block.scss +25 -0
- package/dist/Rename/DummySpan.js +21 -0
- package/dist/Rename/constants.js +1 -0
- package/dist/Rename/index.js +191 -0
- package/dist/Rename/rename.scss +69 -0
- package/dist/Rename/utils.js +10 -0
- package/dist/ResponsiveDevicePicker/constants.js +19 -0
- package/dist/ResponsiveDevicePicker/index.js +36 -0
- package/dist/Schedule/DisplayAvailability.js +58 -0
- package/dist/Schedule/Fields.js +43 -0
- package/dist/Schedule/Form/ScheduleRow.js +125 -0
- package/dist/Schedule/Form/constants.js +20 -0
- package/dist/Schedule/Form/index.js +144 -0
- package/dist/Schedule/Form/utils.js +63 -0
- package/dist/Schedule/Header.js +76 -0
- package/dist/Schedule/ScheduleContext.js +8 -0
- package/dist/Schedule/constants.js +8 -0
- package/dist/Schedule/dayjsExtended/constants.js +1 -0
- package/dist/Schedule/dayjsExtended/index.js +14 -0
- package/dist/Schedule/dayjsExtended/range.js +73 -0
- package/dist/Schedule/index.js +80 -0
- package/dist/Schedule/utils.js +152 -0
- package/dist/Scrollable/constants.js +8 -0
- package/dist/Scrollable/index.js +26 -0
- package/dist/Scrollable/scrollable.scss +32 -0
- package/dist/Security/AllowedKeywords/Add.js +38 -0
- package/dist/Security/AllowedKeywords/index.js +38 -0
- package/dist/Security/PasswordBlock.js +31 -0
- package/dist/Security/RadioBlock.js +38 -0
- package/dist/Security/api.js +12 -0
- package/dist/Security/constants.js +58 -0
- package/dist/Security/index.js +68 -0
- package/dist/Security/useSecurityApi.js +22 -0
- package/dist/Security/utils.js +31 -0
- package/dist/SendToFields/FilePicker.js +34 -0
- package/dist/SendToFields/constants.js +6 -0
- package/dist/SendToFields/index.js +102 -0
- package/dist/SendToFields/utils.js +54 -0
- package/dist/Settings/Category.js +30 -0
- package/dist/Settings/Item.js +38 -0
- package/dist/Settings/index.js +37 -0
- package/dist/Settings/utils.js +4 -0
- package/dist/ShareViaEmail/EmailBodyEditor.js +22 -0
- package/dist/ShareViaEmail/FilePicker.js +43 -0
- package/dist/ShareViaEmail/Form.js +101 -0
- package/dist/ShareViaEmail/FormikDatePicker.js +24 -0
- package/dist/ShareViaEmail/constants.js +14 -0
- package/dist/ShareViaEmail/index.js +89 -0
- package/dist/ShareViaEmail/utils.js +72 -0
- package/dist/ShareViaLink/EditURL.js +74 -0
- package/dist/ShareViaLink/Link.js +105 -0
- package/dist/ShareViaLink/QRCode.js +41 -0
- package/dist/ShareViaLink/RegenerateURL.js +47 -0
- package/dist/ShareViaLink/SocialMedia.js +52 -0
- package/dist/ShareViaLink/constants.js +25 -0
- package/dist/ShareViaLink/edit-url.scss +8 -0
- package/dist/ShareViaLink/index.js +46 -0
- package/dist/ShareViaLink/utils.js +47 -0
- package/dist/Sidebar/AppSwitcher/AppLink.js +45 -0
- package/dist/Sidebar/AppSwitcher/Backdrop.js +13 -0
- package/dist/Sidebar/AppSwitcher/Body.js +65 -0
- package/dist/Sidebar/AppSwitcher/Portal.js +27 -0
- package/dist/Sidebar/AppSwitcher/appswitcher.scss +164 -0
- package/dist/Sidebar/AppSwitcher/index.js +47 -0
- package/dist/Sidebar/AppSwitcher/utils.js +25 -0
- package/dist/Sidebar/Chevron.js +14 -0
- package/dist/Sidebar/FeaturedTooltip.js +19 -0
- package/dist/Sidebar/Footer/AppSwitcherButton.js +48 -0
- package/dist/Sidebar/Footer/ProfileButton.js +30 -0
- package/dist/Sidebar/Footer/index.js +56 -0
- package/dist/Sidebar/Footer/utils.js +39 -0
- package/dist/Sidebar/Header.js +33 -0
- package/dist/Sidebar/HelpSection/HelpSectionMenu.js +52 -0
- package/dist/Sidebar/HelpSection/index.js +32 -0
- package/dist/Sidebar/Links.js +112 -0
- package/dist/Sidebar/NavIconWrapper.js +20 -0
- package/dist/Sidebar/ProfileSection/LinkSection.js +36 -0
- package/dist/Sidebar/ProfileSection/ProfileMenu.js +48 -0
- package/dist/Sidebar/ProfileSection/index.js +42 -0
- package/dist/Sidebar/constants.js +40 -0
- package/dist/Sidebar/index.js +94 -0
- package/dist/Sidebar/sidebar.scss +379 -0
- package/dist/Sidebar/utils.js +18 -0
- package/dist/SubHeader/RightBlock/Columns.js +35 -0
- package/dist/SubHeader/RightBlock/Download.js +28 -0
- package/dist/SubHeader/RightBlock/Filter.js +31 -0
- package/dist/SubHeader/RightBlock/index.js +21 -0
- package/dist/SubHeader/RightBlock/utils.js +13 -0
- package/dist/SubHeader/index.js +28 -0
- package/dist/SubHeader/subheader.scss +78 -0
- package/dist/TableWrapper/index.js +18 -0
- package/dist/ThemeSidebar/Customize/Logo.js +39 -0
- package/dist/ThemeSidebar/Customize/Properties.js +170 -0
- package/dist/ThemeSidebar/Customize/index.js +66 -0
- package/dist/ThemeSidebar/Themes/ThemeCard.js +135 -0
- package/dist/ThemeSidebar/Themes/index.js +110 -0
- package/dist/ThemeSidebar/TitleBar.js +62 -0
- package/dist/ThemeSidebar/constants.js +127 -0
- package/dist/ThemeSidebar/fields/AlignmentBlock.js +50 -0
- package/dist/ThemeSidebar/fields/Card.js +19 -0
- package/dist/ThemeSidebar/fields/ColorBlock.js +19 -0
- package/dist/ThemeSidebar/fields/FontPickerBlock.js +35 -0
- package/dist/ThemeSidebar/fields/ImageBlock/ImageUploader.js +67 -0
- package/dist/ThemeSidebar/fields/ImageBlock/ProgressBar.js +22 -0
- package/dist/ThemeSidebar/fields/ImageBlock/index.js +55 -0
- package/dist/ThemeSidebar/fields/SelectBlock.js +24 -0
- package/dist/ThemeSidebar/fields/SliderBlock.js +30 -0
- package/dist/ThemeSidebar/fields/SwitchBlock.js +17 -0
- package/dist/ThemeSidebar/fields/TextBlock.js +13 -0
- package/dist/ThemeSidebar/fields/slider.scss +199 -0
- package/dist/ThemeSidebar/hooks/useDirectUploadDropzone.js +149 -0
- package/dist/ThemeSidebar/index.js +118 -0
- package/dist/ThemeSidebar/themeSidebar.scss +45 -0
- package/dist/ThemeSidebar/utils.js +169 -0
- package/dist/TimeFormat/index.js +3 -0
- package/dist/TimezoneMismatchModal/apis/time_zone.js +9 -0
- package/dist/TimezoneMismatchModal/index.js +83 -0
- package/dist/TimezoneMismatchModal/useTimeZoneApi.js +10 -0
- package/dist/TimezoneMismatchModal/utils.js +12 -0
- package/dist/ToggleFeatureCard/ToolTipSwitch.js +31 -0
- package/dist/ToggleFeatureCard/constants.js +5 -0
- package/dist/ToggleFeatureCard/hooks/useScrollIntoView.js +11 -0
- package/dist/ToggleFeatureCard/index.js +148 -0
- package/dist/ToggleFeatureCard/toggleFeatureCard.scss +4 -0
- package/package.json +27 -34
- package/dist/AutoSaveInput.cjs.js +0 -724
- package/dist/AutoSaveInput.cjs.js.map +0 -1
- package/dist/AutoSaveInput.js +0 -718
- package/dist/AutoSaveInput.js.map +0 -1
- package/dist/Breadcrumbs.cjs.js +0 -44
- package/dist/Breadcrumbs.cjs.js.map +0 -1
- package/dist/Breadcrumbs.js +0 -38
- package/dist/Breadcrumbs.js.map +0 -1
- package/dist/BrowserSupport.cjs.js +0 -1731
- package/dist/BrowserSupport.cjs.js.map +0 -1
- package/dist/BrowserSupport.js +0 -1725
- package/dist/BrowserSupport.js.map +0 -1
- package/dist/CalendarView.cjs.js +0 -610
- package/dist/CalendarView.cjs.js.map +0 -1
- package/dist/CalendarView.js +0 -598
- package/dist/CalendarView.js.map +0 -1
- package/dist/Codeblock.cjs.js +0 -302
- package/dist/Codeblock.cjs.js.map +0 -1
- package/dist/Codeblock.js +0 -296
- package/dist/Codeblock.js.map +0 -1
- package/dist/Columns.cjs.js +0 -248
- package/dist/Columns.cjs.js.map +0 -1
- package/dist/Columns.js.map +0 -1
- package/dist/ConfirmationModal.cjs.js +0 -87
- package/dist/ConfirmationModal.cjs.js.map +0 -1
- package/dist/ConfirmationModal.js.map +0 -1
- package/dist/Container.cjs.js +0 -1277
- package/dist/Container.cjs.js.map +0 -1
- package/dist/Container.js +0 -1271
- package/dist/Container.js.map +0 -1
- package/dist/CopyToClipboardButton.cjs.js +0 -275
- package/dist/CopyToClipboardButton.cjs.js.map +0 -1
- package/dist/CopyToClipboardButton.js +0 -269
- package/dist/CopyToClipboardButton.js.map +0 -1
- package/dist/CustomDomain.cjs.js +0 -774
- package/dist/CustomDomain.cjs.js.map +0 -1
- package/dist/CustomDomain.js +0 -747
- package/dist/CustomDomain.js.map +0 -1
- package/dist/CustomDomainDashboard.cjs.js +0 -2370
- package/dist/CustomDomainDashboard.cjs.js.map +0 -1
- package/dist/CustomDomainDashboard.js +0 -2342
- package/dist/CustomDomainDashboard.js.map +0 -1
- package/dist/DateFormat.cjs.js +0 -51
- package/dist/DateFormat.cjs.js.map +0 -1
- package/dist/DateFormat.js.map +0 -1
- package/dist/DateRangeFilter.cjs.js +0 -236
- package/dist/DateRangeFilter.cjs.js.map +0 -1
- package/dist/DateRangeFilter.js +0 -229
- package/dist/DateRangeFilter.js.map +0 -1
- package/dist/DynamicVariables.cjs.js +0 -189
- package/dist/DynamicVariables.cjs.js.map +0 -1
- package/dist/DynamicVariables.js +0 -183
- package/dist/DynamicVariables.js.map +0 -1
- package/dist/EmailForm.cjs.js +0 -4295
- package/dist/EmailForm.cjs.js.map +0 -1
- package/dist/EmailForm.js +0 -4265
- package/dist/EmailForm.js.map +0 -1
- package/dist/EmailPreview.cjs.js +0 -1419
- package/dist/EmailPreview.cjs.js.map +0 -1
- package/dist/EmailPreview.js +0 -1413
- package/dist/EmailPreview.js.map +0 -1
- package/dist/ErrorPage.cjs.js +0 -226
- package/dist/ErrorPage.cjs.js.map +0 -1
- package/dist/ErrorPage.js.map +0 -1
- package/dist/Header.cjs.js +0 -188
- package/dist/Header.cjs.js.map +0 -1
- package/dist/Header.js +0 -182
- package/dist/Header.js.map +0 -1
- package/dist/IconPicker.cjs.js +0 -1308
- package/dist/IconPicker.cjs.js.map +0 -1
- package/dist/IconPicker.js +0 -1302
- package/dist/IconPicker.js.map +0 -1
- package/dist/ImageWithFallback.cjs.js +0 -247
- package/dist/ImageWithFallback.cjs.js.map +0 -1
- package/dist/ImageWithFallback.js +0 -241
- package/dist/ImageWithFallback.js.map +0 -1
- package/dist/IntegrationCard.cjs.js +0 -409
- package/dist/IntegrationCard.cjs.js.map +0 -1
- package/dist/IntegrationCard.js +0 -403
- package/dist/IntegrationCard.js.map +0 -1
- package/dist/IntegrationDisconnectAlert.cjs.js +0 -89
- package/dist/IntegrationDisconnectAlert.cjs.js.map +0 -1
- package/dist/IntegrationDisconnectAlert.js +0 -80
- package/dist/IntegrationDisconnectAlert.js.map +0 -1
- package/dist/IntegrationWalkthroughModal.cjs.js +0 -50
- package/dist/IntegrationWalkthroughModal.cjs.js.map +0 -1
- package/dist/IntegrationWalkthroughModal.js.map +0 -1
- package/dist/IpRestriction.cjs.js +0 -3931
- package/dist/IpRestriction.cjs.js.map +0 -1
- package/dist/IpRestriction.js +0 -3905
- package/dist/IpRestriction.js.map +0 -1
- package/dist/KeyboardShortcuts.cjs.js +0 -2263
- package/dist/KeyboardShortcuts.cjs.js.map +0 -1
- package/dist/KeyboardShortcuts.js +0 -2256
- package/dist/KeyboardShortcuts.js.map +0 -1
- package/dist/LoginPage.cjs.js +0 -618
- package/dist/LoginPage.cjs.js.map +0 -1
- package/dist/LoginPage.js +0 -593
- package/dist/LoginPage.js.map +0 -1
- package/dist/MenuBar.cjs.js +0 -34273
- package/dist/MenuBar.cjs.js.map +0 -1
- package/dist/MenuBar.js +0 -34267
- package/dist/MenuBar.js.map +0 -1
- package/dist/Metadata.cjs.js +0 -272
- package/dist/Metadata.cjs.js.map +0 -1
- package/dist/Metadata.js +0 -266
- package/dist/Metadata.js.map +0 -1
- package/dist/MoreDropdown.cjs.js +0 -168
- package/dist/MoreDropdown.cjs.js.map +0 -1
- package/dist/MoreDropdown.js.map +0 -1
- package/dist/NavigationHeader.cjs.js +0 -756
- package/dist/NavigationHeader.cjs.js.map +0 -1
- package/dist/NavigationHeader.js +0 -750
- package/dist/NavigationHeader.js.map +0 -1
- package/dist/NeetoWidget.cjs.js +0 -3375
- package/dist/NeetoWidget.cjs.js.map +0 -1
- package/dist/NeetoWidget.js +0 -3348
- package/dist/NeetoWidget.js.map +0 -1
- package/dist/PageLoader.cjs.js +0 -158
- package/dist/PageLoader.cjs.js.map +0 -1
- package/dist/PageLoader.js +0 -134
- package/dist/PageLoader.js.map +0 -1
- package/dist/PhoneNumber.cjs.js +0 -7021
- package/dist/PhoneNumber.cjs.js.map +0 -1
- package/dist/PhoneNumber.js +0 -6989
- package/dist/PhoneNumber.js.map +0 -1
- package/dist/PublishBlock.cjs.js +0 -224
- package/dist/PublishBlock.cjs.js.map +0 -1
- package/dist/PublishBlock.js +0 -218
- package/dist/PublishBlock.js.map +0 -1
- package/dist/Rename.cjs.js +0 -516
- package/dist/Rename.cjs.js.map +0 -1
- package/dist/Rename.js +0 -510
- package/dist/Rename.js.map +0 -1
- package/dist/ResponsiveDevicePicker.cjs.js +0 -260
- package/dist/ResponsiveDevicePicker.cjs.js.map +0 -1
- package/dist/ResponsiveDevicePicker.js +0 -254
- package/dist/ResponsiveDevicePicker.js.map +0 -1
- package/dist/Schedule.cjs.js +0 -1077
- package/dist/Schedule.cjs.js.map +0 -1
- package/dist/Schedule.js +0 -1046
- package/dist/Schedule.js.map +0 -1
- package/dist/Scrollable.cjs.js +0 -188
- package/dist/Scrollable.cjs.js.map +0 -1
- package/dist/Scrollable.js +0 -182
- package/dist/Scrollable.js.map +0 -1
- package/dist/Security.cjs.js +0 -1921
- package/dist/Security.cjs.js.map +0 -1
- package/dist/Security.js +0 -1895
- package/dist/Security.js.map +0 -1
- package/dist/SendToFields.cjs.js +0 -2524
- package/dist/SendToFields.cjs.js.map +0 -1
- package/dist/SendToFields.js +0 -2517
- package/dist/SendToFields.js.map +0 -1
- package/dist/Settings.cjs.js +0 -501
- package/dist/Settings.cjs.js.map +0 -1
- package/dist/Settings.js +0 -495
- package/dist/Settings.js.map +0 -1
- package/dist/ShareViaEmail.cjs.js +0 -4272
- package/dist/ShareViaEmail.cjs.js.map +0 -1
- package/dist/ShareViaEmail.js +0 -4246
- package/dist/ShareViaEmail.js.map +0 -1
- package/dist/ShareViaLink.cjs.js +0 -1512
- package/dist/ShareViaLink.cjs.js.map +0 -1
- package/dist/ShareViaLink.js +0 -1486
- package/dist/ShareViaLink.js.map +0 -1
- package/dist/Sidebar.cjs.js +0 -34985
- package/dist/Sidebar.cjs.js.map +0 -1
- package/dist/Sidebar.js +0 -34959
- package/dist/Sidebar.js.map +0 -1
- package/dist/SubHeader.cjs.js +0 -283
- package/dist/SubHeader.cjs.js.map +0 -1
- package/dist/SubHeader.js +0 -276
- package/dist/SubHeader.js.map +0 -1
- package/dist/TableWrapper.cjs.js +0 -87
- package/dist/TableWrapper.cjs.js.map +0 -1
- package/dist/TableWrapper.js +0 -81
- package/dist/TableWrapper.js.map +0 -1
- package/dist/ThemeSidebar.cjs.js +0 -13705
- package/dist/ThemeSidebar.cjs.js.map +0 -1
- package/dist/ThemeSidebar.js +0 -13680
- package/dist/ThemeSidebar.js.map +0 -1
- package/dist/TimeFormat.cjs.js +0 -53
- package/dist/TimeFormat.cjs.js.map +0 -1
- package/dist/TimeFormat.js +0 -47
- package/dist/TimeFormat.js.map +0 -1
- package/dist/TimezoneMismatchModal.cjs.js +0 -176
- package/dist/TimezoneMismatchModal.cjs.js.map +0 -1
- package/dist/TimezoneMismatchModal.js +0 -168
- package/dist/TimezoneMismatchModal.js.map +0 -1
- package/dist/ToggleFeatureCard.cjs.js +0 -389
- package/dist/ToggleFeatureCard.cjs.js.map +0 -1
- package/dist/ToggleFeatureCard.js +0 -383
- package/dist/ToggleFeatureCard.js.map +0 -1
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
.neeto-molecules-scrollable {
|
|
2
|
+
flex-grow: 1;
|
|
3
|
+
overflow-y: auto;
|
|
4
|
+
|
|
5
|
+
&.neeto-molecules-scrollable--nano {
|
|
6
|
+
height: calc(
|
|
7
|
+
100vh - var(--neeto-molecules-main-header-with-breadcrumbs-height) -
|
|
8
|
+
var(--neeto-molecules-sub-header-height) -
|
|
9
|
+
var(--neeto-molecules-sub-header-bottom-margin)
|
|
10
|
+
);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
&.neeto-molecules-scrollable--small {
|
|
14
|
+
height: calc(
|
|
15
|
+
100vh - var(--neeto-molecules-main-header-height) -
|
|
16
|
+
var(--neeto-molecules-sub-header-height) -
|
|
17
|
+
var(--neeto-molecules-sub-header-bottom-margin)
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&.neeto-molecules-scrollable--medium {
|
|
22
|
+
height: calc(100vh - var(--neeto-molecules-main-header-with-breadcrumbs-height));
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&.neeto-molecules-scrollable--large {
|
|
26
|
+
height: calc(100vh - var(--neeto-molecules-main-header-height));
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&.neeto-molecules-scrollable--viewport {
|
|
30
|
+
height: 100vh;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import classNames from "classnames";
|
|
3
|
+
import { useFormikContext } from "formik";
|
|
4
|
+
import { Delete } from "@bigbinary/neeto-icons";
|
|
5
|
+
import { Button } from "@bigbinary/neetoui";
|
|
6
|
+
import { Input } from "@bigbinary/neetoui/formik";
|
|
7
|
+
import { remove } from "ramda";
|
|
8
|
+
import { useTranslation } from "react-i18next";
|
|
9
|
+
var Add = function Add() {
|
|
10
|
+
var _useTranslation = useTranslation(),
|
|
11
|
+
t = _useTranslation.t;
|
|
12
|
+
var _useFormikContext = useFormikContext(),
|
|
13
|
+
setFieldValue = _useFormikContext.setFieldValue,
|
|
14
|
+
allowedKeywords = _useFormikContext.values.allowedKeywords;
|
|
15
|
+
var removeKeyword = function removeKeyword(index) {
|
|
16
|
+
return setFieldValue("allowedKeywords", remove(index, 1, allowedKeywords));
|
|
17
|
+
};
|
|
18
|
+
if (!allowedKeywords) return null;
|
|
19
|
+
return allowedKeywords.map(function (_, index) {
|
|
20
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
21
|
+
className: classNames("flex w-full items-start justify-between gap-x-2"),
|
|
22
|
+
key: index
|
|
23
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
24
|
+
autoFocus: true,
|
|
25
|
+
"data-cy": "keyword-input-field-".concat(index),
|
|
26
|
+
name: "allowedKeywords[".concat(index, "]"),
|
|
27
|
+
placeholder: t("neetoMolecules.security.placeholders.enterKeyword")
|
|
28
|
+
}), /*#__PURE__*/React.createElement(Button, {
|
|
29
|
+
"data-cy": "keyword-remove-button-".concat(index),
|
|
30
|
+
icon: Delete,
|
|
31
|
+
style: "text",
|
|
32
|
+
onClick: function onClick() {
|
|
33
|
+
return removeKeyword(index);
|
|
34
|
+
}
|
|
35
|
+
}));
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
export default Add;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { ErrorMessage, useFormikContext } from "formik";
|
|
4
|
+
import { globalProps } from "@bigbinary/neeto-commons-frontend/initializers";
|
|
5
|
+
import { Button, Label } from "@bigbinary/neetoui";
|
|
6
|
+
import { isEmpty } from "ramda";
|
|
7
|
+
import { useTranslation } from "react-i18next";
|
|
8
|
+
import Add from "./Add";
|
|
9
|
+
import { OTP_ENABLED, APP_NAME } from "../constants";
|
|
10
|
+
var AllowedKeywords = function AllowedKeywords() {
|
|
11
|
+
var _useTranslation = useTranslation(),
|
|
12
|
+
t = _useTranslation.t;
|
|
13
|
+
var _useFormikContext = useFormikContext(),
|
|
14
|
+
setFieldValue = _useFormikContext.setFieldValue,
|
|
15
|
+
_useFormikContext$val = _useFormikContext.values,
|
|
16
|
+
allowedKeywords = _useFormikContext$val.allowedKeywords,
|
|
17
|
+
authKind = _useFormikContext$val.authKind;
|
|
18
|
+
if (authKind !== OTP_ENABLED) return null;
|
|
19
|
+
var appName = APP_NAME[globalProps.appName];
|
|
20
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
21
|
+
className: "flex-col space-y-2 py-2"
|
|
22
|
+
}, appName && /*#__PURE__*/React.createElement(Label, null, t("neetoMolecules.security.labels.keywordForm.".concat(appName))), /*#__PURE__*/React.createElement("div", {
|
|
23
|
+
className: "neeto-ui-bg-pastel-blue neeto-ui-rounded-sm w-full space-y-4 p-6"
|
|
24
|
+
}, /*#__PURE__*/React.createElement(Add, null), /*#__PURE__*/React.createElement(Button, {
|
|
25
|
+
"data-cy": "add-allowed-keyword-button",
|
|
26
|
+
"data-testid": "add-allowed-keyword-button",
|
|
27
|
+
label: t("neetoMolecules.security.labels.addKeyWord"),
|
|
28
|
+
style: "link",
|
|
29
|
+
onClick: function onClick() {
|
|
30
|
+
return setFieldValue("allowedKeywords", [].concat(_toConsumableArray(allowedKeywords), [""]));
|
|
31
|
+
}
|
|
32
|
+
})), isEmpty(allowedKeywords) && /*#__PURE__*/React.createElement(ErrorMessage, {
|
|
33
|
+
className: "neeto-ui-text-error-600",
|
|
34
|
+
component: "div",
|
|
35
|
+
name: "allowedKeywords"
|
|
36
|
+
}));
|
|
37
|
+
};
|
|
38
|
+
export default AllowedKeywords;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { useFormikContext } from "formik";
|
|
3
|
+
import { Input } from "@bigbinary/neetoui/formik";
|
|
4
|
+
import { useTranslation } from "react-i18next";
|
|
5
|
+
import { PASSWORD_ENABLED } from "./constants";
|
|
6
|
+
var Password = function Password() {
|
|
7
|
+
var _useTranslation = useTranslation(),
|
|
8
|
+
t = _useTranslation.t;
|
|
9
|
+
var _useFormikContext = useFormikContext(),
|
|
10
|
+
authKind = _useFormikContext.values.authKind,
|
|
11
|
+
getFieldProps = _useFormikContext.getFieldProps;
|
|
12
|
+
if (authKind !== PASSWORD_ENABLED) return null;
|
|
13
|
+
var _getFieldProps = getFieldProps("password"),
|
|
14
|
+
onPasswordChange = _getFieldProps.onChange;
|
|
15
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
16
|
+
className: "space-y-4 pb-2"
|
|
17
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
18
|
+
autoFocus: true,
|
|
19
|
+
unlimitedChars: true,
|
|
20
|
+
className: "w-7/12",
|
|
21
|
+
"data-testid": "password-block",
|
|
22
|
+
label: t("neetoMolecules.security.labels.password"),
|
|
23
|
+
name: "password",
|
|
24
|
+
placeholder: t("neetoMolecules.security.placeholders.enterPassword"),
|
|
25
|
+
onChange: function onChange(e) {
|
|
26
|
+
e.target.value = e.target.value.trim();
|
|
27
|
+
onPasswordChange(e);
|
|
28
|
+
}
|
|
29
|
+
}));
|
|
30
|
+
};
|
|
31
|
+
export default Password;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { useFormikContext } from "formik";
|
|
4
|
+
import { Radio } from "@bigbinary/neetoui/formik";
|
|
5
|
+
import { OTP_ENABLED } from "./constants";
|
|
6
|
+
var RadioBlock = function RadioBlock(_ref) {
|
|
7
|
+
var radioItems = _ref.radioItems;
|
|
8
|
+
var _useFormikContext = useFormikContext(),
|
|
9
|
+
_useFormikContext$val = _useFormikContext.values.allowedKeywords,
|
|
10
|
+
allowedKeywords = _useFormikContext$val === void 0 ? [] : _useFormikContext$val,
|
|
11
|
+
setFieldValue = _useFormikContext.setFieldValue;
|
|
12
|
+
var handleRadioChange = function handleRadioChange(_ref2) {
|
|
13
|
+
var value = _ref2.event.target.value,
|
|
14
|
+
allowedKeywords = _ref2.allowedKeywords;
|
|
15
|
+
var allowedKeywordsValue = value === OTP_ENABLED ? [].concat(_toConsumableArray(allowedKeywords), [""]) : [];
|
|
16
|
+
setFieldValue("allowedKeywords", allowedKeywordsValue);
|
|
17
|
+
setFieldValue("authKind", value);
|
|
18
|
+
};
|
|
19
|
+
return /*#__PURE__*/React.createElement(Radio, {
|
|
20
|
+
stacked: true,
|
|
21
|
+
name: "authKind",
|
|
22
|
+
onChange: function onChange(event) {
|
|
23
|
+
return handleRadioChange({
|
|
24
|
+
event: event,
|
|
25
|
+
allowedKeywords: allowedKeywords
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
}, radioItems.map(function (_ref3) {
|
|
29
|
+
var label = _ref3.label,
|
|
30
|
+
value = _ref3.value;
|
|
31
|
+
return /*#__PURE__*/React.createElement(Radio.Item, {
|
|
32
|
+
key: value,
|
|
33
|
+
label: label,
|
|
34
|
+
value: value
|
|
35
|
+
});
|
|
36
|
+
}));
|
|
37
|
+
};
|
|
38
|
+
export default RadioBlock;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import axios from "axios";
|
|
2
|
+
var fetch = function fetch(url) {
|
|
3
|
+
return axios.get(url);
|
|
4
|
+
};
|
|
5
|
+
var update = function update(url, payload) {
|
|
6
|
+
return axios.put(url, payload);
|
|
7
|
+
};
|
|
8
|
+
var settingsApi = {
|
|
9
|
+
fetch: fetch,
|
|
10
|
+
update: update
|
|
11
|
+
};
|
|
12
|
+
export default settingsApi;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { t } from "i18next";
|
|
2
|
+
import { identity } from "ramda";
|
|
3
|
+
import * as yup from "yup";
|
|
4
|
+
import { findKeywordDuplicates } from "./utils";
|
|
5
|
+
var NOT_SECURED = "no_auth";
|
|
6
|
+
var SESSION_AUTH = "session_auth";
|
|
7
|
+
yup.addMethod(yup.array, "unique", function (message) {
|
|
8
|
+
var mapper = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : identity;
|
|
9
|
+
return this.test("unique", message, function (list, _ref) {
|
|
10
|
+
var authKind = _ref.parent.authKind;
|
|
11
|
+
return authKind === OTP_ENABLED && (list === null || list === void 0 ? void 0 : list.length) === new Set(list === null || list === void 0 ? void 0 : list.map(mapper)).size ? true : findKeywordDuplicates(list, message, this.createError);
|
|
12
|
+
});
|
|
13
|
+
});
|
|
14
|
+
export var QUERY_KEYS = {
|
|
15
|
+
SETTINGS_LIST: "settings-list",
|
|
16
|
+
GETTING_STARTED: "getting-started",
|
|
17
|
+
INTEGRATION_SETTINGS: "integration_settings",
|
|
18
|
+
THEMES_SETTINGS: "themes_setting"
|
|
19
|
+
};
|
|
20
|
+
export var SETTINGS_STALE_TIME = 900000; // 15 mins
|
|
21
|
+
export var PASSWORD_ENABLED = "basic_auth";
|
|
22
|
+
export var OTP_ENABLED = "otp_auth";
|
|
23
|
+
export var APP_NAME = {
|
|
24
|
+
neetoKB: "KB",
|
|
25
|
+
neetoCourse: "Course"
|
|
26
|
+
};
|
|
27
|
+
export var AUTH_KINDS = [{
|
|
28
|
+
label: t("neetoMolecules.security.labels.notSecured"),
|
|
29
|
+
value: NOT_SECURED
|
|
30
|
+
}, {
|
|
31
|
+
label: t("neetoMolecules.security.labels.passwordEnabled"),
|
|
32
|
+
value: PASSWORD_ENABLED
|
|
33
|
+
}, {
|
|
34
|
+
label: t("neetoMolecules.security.labels.otpEnabled"),
|
|
35
|
+
value: OTP_ENABLED
|
|
36
|
+
}, {
|
|
37
|
+
label: t("neetoMolecules.security.labels.private"),
|
|
38
|
+
value: SESSION_AUTH
|
|
39
|
+
}];
|
|
40
|
+
export var SECURITY_SETTINGS_VALIDATION_SCHEMA = yup.object({
|
|
41
|
+
password: yup.string().when("authKind", {
|
|
42
|
+
is: PASSWORD_ENABLED,
|
|
43
|
+
then: yup.string().required(t("neetoMolecules.security.validation.required", {
|
|
44
|
+
what: t("neetoMolecules.security.labels.password")
|
|
45
|
+
})).min(4, t("neetoMolecules.security.validation.min", {
|
|
46
|
+
entity: t("neetoMolecules.security.labels.password"),
|
|
47
|
+
min: 4
|
|
48
|
+
}))
|
|
49
|
+
}),
|
|
50
|
+
allowedKeywords: yup.array().when("authKind", {
|
|
51
|
+
is: OTP_ENABLED,
|
|
52
|
+
then: yup.array().of(yup.string().trim().required(t("neetoMolecules.security.validation.required", {
|
|
53
|
+
what: t("neetoMolecules.security.labels.keyword")
|
|
54
|
+
}))).unique(t("neetoMolecules.security.placeholders.exists", {
|
|
55
|
+
what: t("neetoMolecules.security.labels.keyword")
|
|
56
|
+
}))
|
|
57
|
+
})
|
|
58
|
+
});
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { toLabelAndValue } from "@bigbinary/neeto-commons-frontend/pure";
|
|
3
|
+
import { Form, ActionBlock } from "@bigbinary/neetoui/formik";
|
|
4
|
+
import Container from "../Container";
|
|
5
|
+
import Header from "../Header";
|
|
6
|
+
import PageLoader from "../PageLoader";
|
|
7
|
+
import Scrollable from "../Scrollable";
|
|
8
|
+
import AllowedKeywords from "./AllowedKeywords";
|
|
9
|
+
import { SECURITY_SETTINGS_VALIDATION_SCHEMA } from "./constants";
|
|
10
|
+
import Password from "./PasswordBlock";
|
|
11
|
+
import RadioBlock from "./RadioBlock";
|
|
12
|
+
import { useFetchSettings, useUpdateSetting } from "./useSecurityApi";
|
|
13
|
+
import { buildSecuritySettings } from "./utils";
|
|
14
|
+
var Security = function Security(_ref) {
|
|
15
|
+
var url = _ref.url,
|
|
16
|
+
breadcrumbs = _ref.breadcrumbs,
|
|
17
|
+
title = _ref.title,
|
|
18
|
+
radioItems = _ref.radioItems;
|
|
19
|
+
var _useFetchSettings = useFetchSettings(url),
|
|
20
|
+
_useFetchSettings$dat = _useFetchSettings.data,
|
|
21
|
+
settings = _useFetchSettings$dat === void 0 ? {} : _useFetchSettings$dat,
|
|
22
|
+
isLoading = _useFetchSettings.isLoading;
|
|
23
|
+
var _useUpdateSetting = useUpdateSetting(url),
|
|
24
|
+
updateSettings = _useUpdateSetting.mutate;
|
|
25
|
+
var handleSubmit = function handleSubmit(values, _ref2) {
|
|
26
|
+
var setSubmitting = _ref2.setSubmitting;
|
|
27
|
+
updateSettings(values, {
|
|
28
|
+
onSettled: function onSettled() {
|
|
29
|
+
return setSubmitting(false);
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
if (isLoading) return /*#__PURE__*/React.createElement(PageLoader, null);
|
|
34
|
+
return /*#__PURE__*/React.createElement(Container, {
|
|
35
|
+
isHeaderFixed: true
|
|
36
|
+
}, /*#__PURE__*/React.createElement(Header, {
|
|
37
|
+
"data-cy": "general-settings-heading",
|
|
38
|
+
breadcrumbs: breadcrumbs,
|
|
39
|
+
title: title
|
|
40
|
+
}), /*#__PURE__*/React.createElement(Scrollable, {
|
|
41
|
+
className: "w-full pb-6"
|
|
42
|
+
}, /*#__PURE__*/React.createElement(Form, {
|
|
43
|
+
className: "mx-auto w-full max-w-3xl space-y-6 md:px-0 lg:px-6",
|
|
44
|
+
formikProps: {
|
|
45
|
+
initialValues: buildSecuritySettings(settings),
|
|
46
|
+
validationSchema: SECURITY_SETTINGS_VALIDATION_SCHEMA,
|
|
47
|
+
onSubmit: handleSubmit,
|
|
48
|
+
enableReinitialize: true
|
|
49
|
+
}
|
|
50
|
+
}, function (_ref3) {
|
|
51
|
+
var dirty = _ref3.dirty,
|
|
52
|
+
isSubmitting = _ref3.isSubmitting;
|
|
53
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(RadioBlock, {
|
|
54
|
+
radioItems: radioItems
|
|
55
|
+
}), /*#__PURE__*/React.createElement(Password, null), /*#__PURE__*/React.createElement(AllowedKeywords, null), /*#__PURE__*/React.createElement(ActionBlock, {
|
|
56
|
+
cancelButtonProps: {
|
|
57
|
+
disabled: false,
|
|
58
|
+
className: "ml-3"
|
|
59
|
+
},
|
|
60
|
+
className: "mt-6 w-full justify-start",
|
|
61
|
+
submitButtonProps: {
|
|
62
|
+
loading: isSubmitting,
|
|
63
|
+
disabled: !dirty || isSubmitting
|
|
64
|
+
}
|
|
65
|
+
}));
|
|
66
|
+
})));
|
|
67
|
+
};
|
|
68
|
+
export default Security;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { useMutationWithInvalidation } from "@bigbinary/neeto-commons-frontend/react-utils";
|
|
2
|
+
import { useQuery } from "react-query";
|
|
3
|
+
import settingsApi from "./api";
|
|
4
|
+
import { QUERY_KEYS, SETTINGS_STALE_TIME } from "./constants";
|
|
5
|
+
var SETTINGS_LIST = QUERY_KEYS.SETTINGS_LIST,
|
|
6
|
+
GETTING_STARTED = QUERY_KEYS.GETTING_STARTED,
|
|
7
|
+
THEMES_SETTINGS = QUERY_KEYS.THEMES_SETTINGS;
|
|
8
|
+
var useFetchSettings = function useFetchSettings(url) {
|
|
9
|
+
return useQuery(SETTINGS_LIST, function () {
|
|
10
|
+
return settingsApi.fetch(url);
|
|
11
|
+
}, {
|
|
12
|
+
staleTime: SETTINGS_STALE_TIME
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
var useUpdateSetting = function useUpdateSetting(url) {
|
|
16
|
+
return useMutationWithInvalidation(function (payload) {
|
|
17
|
+
return settingsApi.update(url, payload);
|
|
18
|
+
}, {
|
|
19
|
+
keysToInvalidate: [SETTINGS_LIST, GETTING_STARTED, THEMES_SETTINGS]
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
export { useFetchSettings, useUpdateSetting };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
+
import { isEmpty } from "ramda";
|
|
5
|
+
import * as yup from "yup";
|
|
6
|
+
export var buildSecuritySettings = function buildSecuritySettings(settings) {
|
|
7
|
+
return _objectSpread(_objectSpread({}, settings.setting), {}, {
|
|
8
|
+
addEmail: false
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
export var findKeywordDuplicates = function findKeywordDuplicates(list, message, createError) {
|
|
12
|
+
var duplicates = {};
|
|
13
|
+
list === null || list === void 0 ? void 0 : list.forEach(function (value, index) {
|
|
14
|
+
if (duplicates[value]) {
|
|
15
|
+
duplicates[value].push(index);
|
|
16
|
+
} else {
|
|
17
|
+
duplicates[value] = [index];
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
var errors = Object.values(duplicates).map(function (index) {
|
|
21
|
+
return index.length > 1 && new yup.ValidationError(message, list[index.at(-1)], "setting.allowedKeywords[".concat(index.at(-1), "]"));
|
|
22
|
+
});
|
|
23
|
+
if (isEmpty(errors)) {
|
|
24
|
+
return true;
|
|
25
|
+
}
|
|
26
|
+
return createError({
|
|
27
|
+
message: function message() {
|
|
28
|
+
return errors;
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React, { useRef } from "react";
|
|
2
|
+
var FilePicker = function FilePicker(_ref) {
|
|
3
|
+
var _ref$types = _ref.types,
|
|
4
|
+
types = _ref$types === void 0 ? [] : _ref$types,
|
|
5
|
+
onChange = _ref.onChange,
|
|
6
|
+
children = _ref.children;
|
|
7
|
+
var inputRef = useRef();
|
|
8
|
+
var accept = types.reduce(function (acc, ext) {
|
|
9
|
+
return "".concat(acc, ", ").concat(ext);
|
|
10
|
+
}, "");
|
|
11
|
+
var handleInputChange = function handleInputChange(_ref2) {
|
|
12
|
+
var target = _ref2.target;
|
|
13
|
+
if (!target.files) return;
|
|
14
|
+
onChange(target.files);
|
|
15
|
+
|
|
16
|
+
// This will trigger handleClick when same file is uploaded again.
|
|
17
|
+
inputRef.current.value = "";
|
|
18
|
+
handleClick();
|
|
19
|
+
};
|
|
20
|
+
var handleClick = function handleClick() {
|
|
21
|
+
if (!inputRef.current) return;
|
|
22
|
+
inputRef.current.click();
|
|
23
|
+
};
|
|
24
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
25
|
+
onClick: handleClick
|
|
26
|
+
}, children), /*#__PURE__*/React.createElement("input", {
|
|
27
|
+
accept: accept,
|
|
28
|
+
className: "hidden",
|
|
29
|
+
ref: inputRef,
|
|
30
|
+
type: "file",
|
|
31
|
+
onChange: handleInputChange
|
|
32
|
+
}));
|
|
33
|
+
};
|
|
34
|
+
export default FilePicker;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
3
|
+
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
4
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
5
|
+
import React, { useRef } from "react";
|
|
6
|
+
import { useFormikContext } from "formik";
|
|
7
|
+
import { Upload } from "@bigbinary/neeto-icons";
|
|
8
|
+
import { Button, Toastr } from "@bigbinary/neetoui";
|
|
9
|
+
import { MultiEmailInput } from "@bigbinary/neetoui/formik";
|
|
10
|
+
import { useTranslation } from "react-i18next";
|
|
11
|
+
import { SIZES, ALLOWED_FILE_PICKER_TYPES } from "./constants";
|
|
12
|
+
import FilePicker from "./FilePicker";
|
|
13
|
+
import { parseCsvEmails } from "./utils";
|
|
14
|
+
var SendToFields = function SendToFields(_ref) {
|
|
15
|
+
var emailInputProps = _ref.emailInputProps,
|
|
16
|
+
ccInputProps = _ref.ccInputProps,
|
|
17
|
+
bccInputProps = _ref.bccInputProps,
|
|
18
|
+
_ref$showUploadCsvBut = _ref.showUploadCsvButton,
|
|
19
|
+
showUploadCsvButton = _ref$showUploadCsvBut === void 0 ? false : _ref$showUploadCsvBut,
|
|
20
|
+
_ref$showCcBccButton = _ref.showCcBccButton,
|
|
21
|
+
showCcBccButton = _ref$showCcBccButton === void 0 ? false : _ref$showCcBccButton;
|
|
22
|
+
var sendToFieldRef = useRef();
|
|
23
|
+
var _useFormikContext = useFormikContext(),
|
|
24
|
+
_useFormikContext$val = _useFormikContext.values,
|
|
25
|
+
showCopyEmails = _useFormikContext$val.showCopyEmails,
|
|
26
|
+
existingSendToEmails = _useFormikContext$val[emailInputProps.name || "sendTo"],
|
|
27
|
+
setFieldValue = _useFormikContext.setFieldValue;
|
|
28
|
+
var _useTranslation = useTranslation(),
|
|
29
|
+
t = _useTranslation.t;
|
|
30
|
+
var handleCSVFile = /*#__PURE__*/function () {
|
|
31
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(files) {
|
|
32
|
+
var _sendToFieldRef$curre, onSuccess;
|
|
33
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
34
|
+
while (1) switch (_context.prev = _context.next) {
|
|
35
|
+
case 0:
|
|
36
|
+
_context.prev = 0;
|
|
37
|
+
onSuccess = function onSuccess(values) {
|
|
38
|
+
return setFieldValue(emailInputProps.name || "sendTo", [].concat(_toConsumableArray(existingSendToEmails), _toConsumableArray(values)));
|
|
39
|
+
};
|
|
40
|
+
_context.next = 4;
|
|
41
|
+
return parseCsvEmails(files[0], onSuccess);
|
|
42
|
+
case 4:
|
|
43
|
+
(_sendToFieldRef$curre = sendToFieldRef.current) === null || _sendToFieldRef$curre === void 0 ? void 0 : _sendToFieldRef$curre.focus();
|
|
44
|
+
_context.next = 10;
|
|
45
|
+
break;
|
|
46
|
+
case 7:
|
|
47
|
+
_context.prev = 7;
|
|
48
|
+
_context.t0 = _context["catch"](0);
|
|
49
|
+
Toastr.error(_context.t0);
|
|
50
|
+
case 10:
|
|
51
|
+
case "end":
|
|
52
|
+
return _context.stop();
|
|
53
|
+
}
|
|
54
|
+
}, _callee, null, [[0, 7]]);
|
|
55
|
+
}));
|
|
56
|
+
return function handleCSVFile(_x) {
|
|
57
|
+
return _ref2.apply(this, arguments);
|
|
58
|
+
};
|
|
59
|
+
}();
|
|
60
|
+
var handelCcBccButtonClick = function handelCcBccButtonClick(e) {
|
|
61
|
+
e.stopPropagation();
|
|
62
|
+
setFieldValue("showCopyEmails", !showCopyEmails);
|
|
63
|
+
};
|
|
64
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
65
|
+
className: "relative w-full flex-col gap-2"
|
|
66
|
+
}, showUploadCsvButton && /*#__PURE__*/React.createElement("div", {
|
|
67
|
+
className: "absolute top-0 right-1"
|
|
68
|
+
}, /*#__PURE__*/React.createElement(FilePicker, {
|
|
69
|
+
types: ALLOWED_FILE_PICKER_TYPES,
|
|
70
|
+
onChange: handleCSVFile
|
|
71
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
72
|
+
"data-cy": "upload-csv-button",
|
|
73
|
+
icon: Upload,
|
|
74
|
+
label: t("neetoMolecules.emailForm.uploadCSV"),
|
|
75
|
+
size: "small",
|
|
76
|
+
style: "link",
|
|
77
|
+
tooltipProps: {
|
|
78
|
+
content: t("neetoMolecules.sendToFields.uploadCsvTooltip"),
|
|
79
|
+
position: "right"
|
|
80
|
+
}
|
|
81
|
+
}))), /*#__PURE__*/React.createElement(MultiEmailInput, _extends({
|
|
82
|
+
"data-testid": "emails",
|
|
83
|
+
name: "sendTo",
|
|
84
|
+
ref: sendToFieldRef
|
|
85
|
+
}, emailInputProps, {
|
|
86
|
+
suffix: showCcBccButton && /*#__PURE__*/React.createElement(Button, {
|
|
87
|
+
"data-cy": "cc-bcc-button",
|
|
88
|
+
"data-testid": "cc-bcc-button",
|
|
89
|
+
label: t("neetoMolecules.emailForm.labels.ccBcc"),
|
|
90
|
+
size: "small",
|
|
91
|
+
style: "link",
|
|
92
|
+
onClick: handelCcBccButtonClick
|
|
93
|
+
})
|
|
94
|
+
})), showCopyEmails && /*#__PURE__*/React.createElement("div", {
|
|
95
|
+
className: "mt-5 flex w-full flex-col gap-6"
|
|
96
|
+
}, /*#__PURE__*/React.createElement(MultiEmailInput, _extends({
|
|
97
|
+
name: "sendToBcc"
|
|
98
|
+
}, ccInputProps)), /*#__PURE__*/React.createElement(MultiEmailInput, _extends({
|
|
99
|
+
name: "sendToCc"
|
|
100
|
+
}, bccInputProps))));
|
|
101
|
+
};
|
|
102
|
+
export default SendToFields;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
3
|
+
import { t } from "i18next";
|
|
4
|
+
import { Toastr } from "@bigbinary/neetoui";
|
|
5
|
+
import Papa from "papaparse";
|
|
6
|
+
import { prop } from "ramda";
|
|
7
|
+
import { string } from "yup";
|
|
8
|
+
var isValidEmail = function isValidEmail(email) {
|
|
9
|
+
return string().email().isValidSync(email);
|
|
10
|
+
};
|
|
11
|
+
export var createEmailOptions = function createEmailOptions() {
|
|
12
|
+
var emails = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
13
|
+
return emails.map(function (email) {
|
|
14
|
+
return {
|
|
15
|
+
label: email,
|
|
16
|
+
value: email,
|
|
17
|
+
valid: isValidEmail(email)
|
|
18
|
+
};
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
export var parseCsvEmails = /*#__PURE__*/function () {
|
|
22
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(file, onSuccess) {
|
|
23
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
24
|
+
while (1) switch (_context.prev = _context.next) {
|
|
25
|
+
case 0:
|
|
26
|
+
Papa.parse(file, {
|
|
27
|
+
header: true,
|
|
28
|
+
skipEmptyLines: true,
|
|
29
|
+
transformHeader: function transformHeader(h) {
|
|
30
|
+
return h.toLowerCase().replace(/\W/g, "");
|
|
31
|
+
},
|
|
32
|
+
complete: function complete(results) {
|
|
33
|
+
var _results$meta$fields;
|
|
34
|
+
var isEmailFieldPresent = (_results$meta$fields = results.meta.fields) === null || _results$meta$fields === void 0 ? void 0 : _results$meta$fields.includes("email");
|
|
35
|
+
if (isEmailFieldPresent) {
|
|
36
|
+
var emails = results.data.filter(prop("email")).map(function (item) {
|
|
37
|
+
return item.email.trim();
|
|
38
|
+
});
|
|
39
|
+
onSuccess(createEmailOptions(emails));
|
|
40
|
+
} else {
|
|
41
|
+
Toastr.error(t("neetoMolecules.sendToFields.errors.invalidCsv"));
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
case 1:
|
|
46
|
+
case "end":
|
|
47
|
+
return _context.stop();
|
|
48
|
+
}
|
|
49
|
+
}, _callee);
|
|
50
|
+
}));
|
|
51
|
+
return function parseCsvEmails(_x, _x2) {
|
|
52
|
+
return _ref.apply(this, arguments);
|
|
53
|
+
};
|
|
54
|
+
}();
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { isNotEmpty } from "@bigbinary/neeto-commons-frontend/pure";
|
|
4
|
+
import { Typography } from "@bigbinary/neetoui";
|
|
5
|
+
import IntegrationCard from "../IntegrationCard";
|
|
6
|
+
import Item from "./Item";
|
|
7
|
+
var Category = function Category(_ref) {
|
|
8
|
+
var items = _ref.items,
|
|
9
|
+
label = _ref.label,
|
|
10
|
+
id = _ref.id,
|
|
11
|
+
isIntegration = _ref.isIntegration;
|
|
12
|
+
var SettingsCard = isIntegration ? IntegrationCard : Item;
|
|
13
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
14
|
+
className: "flex flex-col py-6",
|
|
15
|
+
id: id
|
|
16
|
+
}, isNotEmpty(items) && /*#__PURE__*/React.createElement(Typography, {
|
|
17
|
+
className: "mb-6",
|
|
18
|
+
component: "h2",
|
|
19
|
+
"data-cy": "settings-category-heading",
|
|
20
|
+
style: "h2",
|
|
21
|
+
weight: "semibold"
|
|
22
|
+
}, label), /*#__PURE__*/React.createElement("div", {
|
|
23
|
+
className: "grid grid-cols-1 gap-3 lg:grid-cols-2 lg:gap-6 xl:grid-cols-3 2xl:grid-cols-4"
|
|
24
|
+
}, items.map(function (item) {
|
|
25
|
+
return /*#__PURE__*/React.createElement(SettingsCard, _extends({
|
|
26
|
+
key: item.label
|
|
27
|
+
}, item));
|
|
28
|
+
})));
|
|
29
|
+
};
|
|
30
|
+
export default Category;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["label", "description", "icon", "path", "dataCy", "className"];
|
|
4
|
+
import React, { memo } from "react";
|
|
5
|
+
import classnames from "classnames";
|
|
6
|
+
import { joinHyphenCase } from "@bigbinary/neeto-commons-frontend/utils";
|
|
7
|
+
import { Typography } from "@bigbinary/neetoui";
|
|
8
|
+
import { withRouter, Link } from "react-router-dom";
|
|
9
|
+
var Item = function Item(_ref) {
|
|
10
|
+
var label = _ref.label,
|
|
11
|
+
description = _ref.description,
|
|
12
|
+
_ref$icon = _ref.icon,
|
|
13
|
+
Icon = _ref$icon === void 0 ? null : _ref$icon,
|
|
14
|
+
path = _ref.path,
|
|
15
|
+
dataCy = _ref.dataCy,
|
|
16
|
+
_ref$className = _ref.className,
|
|
17
|
+
className = _ref$className === void 0 ? "" : _ref$className,
|
|
18
|
+
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
19
|
+
return /*#__PURE__*/React.createElement(Link, _extends({
|
|
20
|
+
"data-cy": dataCy,
|
|
21
|
+
to: path,
|
|
22
|
+
className: classnames("outline-none neeto-ui-border-gray-300 neeto-ui-shadow-xs hover:neeto-ui-border-gray-500 focus:neeto-ui-border-gray-500 neeto-ui-rounded-lg flex cursor-pointer flex-col border p-6 no-underline transition-colors", className)
|
|
23
|
+
}, otherProps), /*#__PURE__*/React.createElement("div", {
|
|
24
|
+
"data-testid": "settings-item-".concat(joinHyphenCase(label))
|
|
25
|
+
}, Icon && /*#__PURE__*/React.createElement(Icon, {
|
|
26
|
+
className: "neeto-ui-text-gray-600 mb-4",
|
|
27
|
+
size: 32
|
|
28
|
+
}), /*#__PURE__*/React.createElement(Typography, {
|
|
29
|
+
className: "mb-2",
|
|
30
|
+
"data-cy": "settings-item-heading",
|
|
31
|
+
style: "h4",
|
|
32
|
+
weight: "semibold"
|
|
33
|
+
}, label), /*#__PURE__*/React.createElement(Typography, {
|
|
34
|
+
"data-cy": "settings-item-description",
|
|
35
|
+
style: "body2"
|
|
36
|
+
}, description)));
|
|
37
|
+
};
|
|
38
|
+
export default /*#__PURE__*/memo(withRouter(Item));
|