@bigbinary/neeto-molecules 1.1.9 → 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 +28 -35
- 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 -2244
- package/dist/KeyboardShortcuts.cjs.js.map +0 -1
- package/dist/KeyboardShortcuts.js +0 -2237
- 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,86 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
+
import React, { useState } from "react";
|
|
3
|
+
import { truncate } from "@bigbinary/neeto-commons-frontend/pure";
|
|
4
|
+
import { Typography, Alert, Tooltip } from "@bigbinary/neetoui";
|
|
5
|
+
import { useTranslation, Trans } from "react-i18next";
|
|
6
|
+
import MoreDropdown from "../MoreDropdown";
|
|
7
|
+
import { TRUNCATE_LENGTH } from "./constants";
|
|
8
|
+
import { useDestroyAllowedIpRanges } from "./hooks/reactQuery/useAllowedIpRanges";
|
|
9
|
+
var Row = function Row(_ref) {
|
|
10
|
+
var data = _ref.data,
|
|
11
|
+
setEditingRow = _ref.setEditingRow;
|
|
12
|
+
var _useState = useState(false),
|
|
13
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
14
|
+
isDeleteIpRangeAlertOpen = _useState2[0],
|
|
15
|
+
setIsDeleteIpRangeAlertOpen = _useState2[1];
|
|
16
|
+
var _useDestroyAllowedIpR = useDestroyAllowedIpRanges(),
|
|
17
|
+
destroyAllowedIpRange = _useDestroyAllowedIpR.mutate;
|
|
18
|
+
var _useTranslation = useTranslation(),
|
|
19
|
+
t = _useTranslation.t;
|
|
20
|
+
var handleDelete = function handleDelete() {
|
|
21
|
+
destroyAllowedIpRange(data.id);
|
|
22
|
+
setIsDeleteIpRangeAlertOpen(false);
|
|
23
|
+
};
|
|
24
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
25
|
+
className: "neeto-ui-bg-white neeto-ui-rounded-lg grid grid-cols-12 items-center gap-4 p-3",
|
|
26
|
+
"data-cy": "ip-range-row"
|
|
27
|
+
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
28
|
+
content: data.ipStart,
|
|
29
|
+
disabled: data.ipStart.length < TRUNCATE_LENGTH,
|
|
30
|
+
position: "top"
|
|
31
|
+
}, /*#__PURE__*/React.createElement(Typography, {
|
|
32
|
+
className: "col-span-5",
|
|
33
|
+
"data-cy": "ip-range-start-value",
|
|
34
|
+
style: "body2"
|
|
35
|
+
}, truncate(data.ipStart, TRUNCATE_LENGTH))), /*#__PURE__*/React.createElement(Tooltip, {
|
|
36
|
+
content: data.ipEnd,
|
|
37
|
+
disabled: data.ipEnd.length < TRUNCATE_LENGTH,
|
|
38
|
+
position: "top"
|
|
39
|
+
}, /*#__PURE__*/React.createElement(Typography, {
|
|
40
|
+
className: "col-span-5",
|
|
41
|
+
"data-cy": "ip-range-end-value",
|
|
42
|
+
style: "body2"
|
|
43
|
+
}, truncate(data.ipEnd, TRUNCATE_LENGTH))), /*#__PURE__*/React.createElement("div", {
|
|
44
|
+
className: "col-span-2 flex justify-center"
|
|
45
|
+
}, /*#__PURE__*/React.createElement(MoreDropdown, {
|
|
46
|
+
dropdownButtonProps: {
|
|
47
|
+
"data-testid": "ip-range-actions-dropdown"
|
|
48
|
+
},
|
|
49
|
+
dropdownProps: {
|
|
50
|
+
position: "bottom-end"
|
|
51
|
+
},
|
|
52
|
+
menuItems: [{
|
|
53
|
+
"data-cy": "ip-range-edit-button",
|
|
54
|
+
key: "ip-range-edit-button",
|
|
55
|
+
label: t("neetoMolecules.common.actions.edit"),
|
|
56
|
+
onClick: function onClick() {
|
|
57
|
+
return setEditingRow(data.id);
|
|
58
|
+
}
|
|
59
|
+
}, {
|
|
60
|
+
"data-cy": "ip-range-delete-button",
|
|
61
|
+
key: "ip-range-delete-button",
|
|
62
|
+
label: t("neetoMolecules.common.actions.delete"),
|
|
63
|
+
onClick: function onClick() {
|
|
64
|
+
return setIsDeleteIpRangeAlertOpen(true);
|
|
65
|
+
}
|
|
66
|
+
}]
|
|
67
|
+
}), /*#__PURE__*/React.createElement(Alert, {
|
|
68
|
+
isOpen: isDeleteIpRangeAlertOpen,
|
|
69
|
+
submitButtonLabel: t("neetoMolecules.common.actions.delete"),
|
|
70
|
+
message: /*#__PURE__*/React.createElement(Trans, {
|
|
71
|
+
i18nKey: "neetoMolecules.ipRestriction.allowedIpRangeConfirmation",
|
|
72
|
+
values: {
|
|
73
|
+
ipStart: data.ipStart,
|
|
74
|
+
ipEnd: data.ipEnd
|
|
75
|
+
}
|
|
76
|
+
}),
|
|
77
|
+
title: t("neetoMolecules.common.deleteAlert.title", {
|
|
78
|
+
entity: t("neetoMolecules.ipRestriction.allowedIpRangeConfirmationTitle")
|
|
79
|
+
}),
|
|
80
|
+
onClose: function onClose() {
|
|
81
|
+
return setIsDeleteIpRangeAlertOpen(false);
|
|
82
|
+
},
|
|
83
|
+
onSubmit: handleDelete
|
|
84
|
+
})));
|
|
85
|
+
};
|
|
86
|
+
export default /*#__PURE__*/React.memo(Row);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import axios from "axios";
|
|
2
|
+
import { IP_RESTRICTIONS_ENGINE_BASE_URL } from "../constants";
|
|
3
|
+
var allowedIpRangesUrl = "".concat(IP_RESTRICTIONS_ENGINE_BASE_URL, "/allowed_ips");
|
|
4
|
+
var fetch = function fetch() {
|
|
5
|
+
return axios.get(allowedIpRangesUrl);
|
|
6
|
+
};
|
|
7
|
+
var create = function create(payload) {
|
|
8
|
+
return axios.post(allowedIpRangesUrl, {
|
|
9
|
+
allowedIpRange: payload
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
var destroy = function destroy(id) {
|
|
13
|
+
return axios["delete"]("".concat(allowedIpRangesUrl, "/").concat(id));
|
|
14
|
+
};
|
|
15
|
+
var update = function update(_ref) {
|
|
16
|
+
var id = _ref.id,
|
|
17
|
+
payload = _ref.payload;
|
|
18
|
+
return axios.patch("".concat(allowedIpRangesUrl, "/").concat(id), {
|
|
19
|
+
allowedIpRange: payload
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
var allowedIpRangesApi = {
|
|
23
|
+
fetch: fetch,
|
|
24
|
+
create: create,
|
|
25
|
+
destroy: destroy,
|
|
26
|
+
update: update
|
|
27
|
+
};
|
|
28
|
+
export default allowedIpRangesApi;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import axios from "axios";
|
|
2
|
+
import { IP_RESTRICTIONS_ENGINE_BASE_URL } from "../constants";
|
|
3
|
+
var show = function show(params) {
|
|
4
|
+
return axios.get("".concat(IP_RESTRICTIONS_ENGINE_BASE_URL, "/current_ip"), {
|
|
5
|
+
params: params
|
|
6
|
+
});
|
|
7
|
+
};
|
|
8
|
+
var currentIpApi = {
|
|
9
|
+
show: show
|
|
10
|
+
};
|
|
11
|
+
export default currentIpApi;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import axios from "axios";
|
|
2
|
+
import { IP_RESTRICTIONS_ENGINE_BASE_URL } from "../constants";
|
|
3
|
+
var ipRestrictionUrl = "".concat(IP_RESTRICTIONS_ENGINE_BASE_URL, "/ip_restriction");
|
|
4
|
+
var update = function update(params) {
|
|
5
|
+
return axios.patch(ipRestrictionUrl, {
|
|
6
|
+
ipRestriction: params
|
|
7
|
+
});
|
|
8
|
+
};
|
|
9
|
+
var show = function show() {
|
|
10
|
+
return axios.get(ipRestrictionUrl);
|
|
11
|
+
};
|
|
12
|
+
var ipRestrictionApi = {
|
|
13
|
+
update: update,
|
|
14
|
+
show: show
|
|
15
|
+
};
|
|
16
|
+
export default ipRestrictionApi;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export var IP_RESTRICTIONS_ENGINE_BASE_URL = "ip_restrictions/api/v1";
|
|
2
|
+
export var INITIAL_VALUES = {
|
|
3
|
+
ipStart: "",
|
|
4
|
+
ipEnd: ""
|
|
5
|
+
};
|
|
6
|
+
export var QUERY_KEYS = {
|
|
7
|
+
IP_RESTRICTION: "IP_RESTRICTION",
|
|
8
|
+
ALLOWED_IP_RANGES: "ALLOWED_IP_RANGES",
|
|
9
|
+
CURRENT_IP: "CURRENT_IP"
|
|
10
|
+
};
|
|
11
|
+
export var TRUNCATE_LENGTH = 18;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { useQuery, useQueryClient, useMutation } from "react-query";
|
|
2
|
+
import allowedIpRangesApi from "../../apis/allowed_ip_ranges";
|
|
3
|
+
import { QUERY_KEYS } from "../../constants";
|
|
4
|
+
var ALLOWED_IP_RANGES = QUERY_KEYS.ALLOWED_IP_RANGES;
|
|
5
|
+
var useFetchAllowedIpRanges = function useFetchAllowedIpRanges() {
|
|
6
|
+
return useQuery([ALLOWED_IP_RANGES], function () {
|
|
7
|
+
return allowedIpRangesApi.fetch();
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
var useCreateAllowedIpRanges = function useCreateAllowedIpRanges() {
|
|
11
|
+
var queryClient = useQueryClient();
|
|
12
|
+
return useMutation(allowedIpRangesApi.create, {
|
|
13
|
+
onSuccess: function onSuccess() {
|
|
14
|
+
return queryClient.invalidateQueries(ALLOWED_IP_RANGES);
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
var useDestroyAllowedIpRanges = function useDestroyAllowedIpRanges() {
|
|
19
|
+
var queryClient = useQueryClient();
|
|
20
|
+
return useMutation(allowedIpRangesApi.destroy, {
|
|
21
|
+
onSuccess: function onSuccess() {
|
|
22
|
+
queryClient.invalidateQueries(ALLOWED_IP_RANGES);
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
var useUpdateAllowedIpRanges = function useUpdateAllowedIpRanges() {
|
|
27
|
+
var queryClient = useQueryClient();
|
|
28
|
+
return useMutation(allowedIpRangesApi.update, {
|
|
29
|
+
onSuccess: function onSuccess() {
|
|
30
|
+
queryClient.invalidateQueries(ALLOWED_IP_RANGES);
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
export { useFetchAllowedIpRanges, useCreateAllowedIpRanges, useDestroyAllowedIpRanges, useUpdateAllowedIpRanges };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { useQuery } from "react-query";
|
|
2
|
+
import currentIpApi from "../../apis/current_ip";
|
|
3
|
+
import { QUERY_KEYS } from "../../constants";
|
|
4
|
+
var CURRENT_IP = QUERY_KEYS.CURRENT_IP;
|
|
5
|
+
var useShowCurrentIp = function useShowCurrentIp() {
|
|
6
|
+
return useQuery([CURRENT_IP], function () {
|
|
7
|
+
return currentIpApi.show();
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
export { useShowCurrentIp };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { useMutation, useQuery, useQueryClient } from "react-query";
|
|
2
|
+
import ipRestrictionApi from "../../apis/ip_restriction";
|
|
3
|
+
import { QUERY_KEYS } from "../../constants";
|
|
4
|
+
var IP_RESTRICTION = QUERY_KEYS.IP_RESTRICTION;
|
|
5
|
+
var useShowIpRestriction = function useShowIpRestriction() {
|
|
6
|
+
return useQuery([IP_RESTRICTION], function () {
|
|
7
|
+
return ipRestrictionApi.show();
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
var useUpdateIpRestriction = function useUpdateIpRestriction() {
|
|
11
|
+
var queryClient = useQueryClient();
|
|
12
|
+
return useMutation(ipRestrictionApi.update, {
|
|
13
|
+
onSuccess: function onSuccess() {
|
|
14
|
+
return queryClient.invalidateQueries(IP_RESTRICTION);
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
export { useShowIpRestriction, useUpdateIpRestriction };
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
+
import React, { useState } from "react";
|
|
3
|
+
import { useStateWithDependency } from "@bigbinary/neeto-commons-frontend/react-utils";
|
|
4
|
+
import { Warning } from "@bigbinary/neeto-icons";
|
|
5
|
+
import { Typography, Button, Alert, Callout, Checkbox } from "@bigbinary/neetoui";
|
|
6
|
+
import { Trans, useTranslation } from "react-i18next";
|
|
7
|
+
import PageLoader from "../PageLoader";
|
|
8
|
+
import AllowedIpRanges from "./AllowedIpRanges";
|
|
9
|
+
import CurrentIp from "./CurrentIp";
|
|
10
|
+
import { useShowIpRestriction, useUpdateIpRestriction } from "./hooks/reactQuery/useIpRestrictions";
|
|
11
|
+
var IpRestriction = function IpRestriction() {
|
|
12
|
+
var _useTranslation = useTranslation(),
|
|
13
|
+
t = _useTranslation.t;
|
|
14
|
+
var _useShowIpRestriction = useShowIpRestriction(),
|
|
15
|
+
data = _useShowIpRestriction.data,
|
|
16
|
+
isFetching = _useShowIpRestriction.isLoading;
|
|
17
|
+
var _useState = useState(false),
|
|
18
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
19
|
+
isAlertOpen = _useState2[0],
|
|
20
|
+
setIsAlertOpen = _useState2[1];
|
|
21
|
+
var _useStateWithDependen = useStateWithDependency((data === null || data === void 0 ? void 0 : data.isIpRestrictionEnabled) || false, [data]),
|
|
22
|
+
_useStateWithDependen2 = _slicedToArray(_useStateWithDependen, 2),
|
|
23
|
+
isIpRestrictionVisible = _useStateWithDependen2[0],
|
|
24
|
+
setIsIpRestrictionVisible = _useStateWithDependen2[1];
|
|
25
|
+
var _useUpdateIpRestricti = useUpdateIpRestriction(),
|
|
26
|
+
updateIpRestriction = _useUpdateIpRestricti.mutate,
|
|
27
|
+
isUpdating = _useUpdateIpRestricti.isLoading;
|
|
28
|
+
if (isFetching) {
|
|
29
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
30
|
+
className: "h-screen"
|
|
31
|
+
}, /*#__PURE__*/React.createElement(PageLoader, null));
|
|
32
|
+
}
|
|
33
|
+
var updateIpRestrictionStatus = function updateIpRestrictionStatus() {
|
|
34
|
+
return updateIpRestriction({
|
|
35
|
+
isIpRestrictionEnabled: isIpRestrictionVisible
|
|
36
|
+
}, {
|
|
37
|
+
onSuccess: function onSuccess() {
|
|
38
|
+
return setIsAlertOpen(false);
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
var handleOnChange = function handleOnChange() {
|
|
43
|
+
if (data.isIpRestrictionEnabled) {
|
|
44
|
+
updateIpRestriction({
|
|
45
|
+
isIpRestrictionEnabled: false
|
|
46
|
+
}, {
|
|
47
|
+
onSuccess: function onSuccess() {
|
|
48
|
+
return setIsIpRestrictionVisible(false);
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
} else {
|
|
52
|
+
setIsIpRestrictionVisible(function (previousState) {
|
|
53
|
+
return !previousState;
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
58
|
+
className: "neeto-ui-bg-white neeto-ui-border-gray-200 neeto-ui-rounded-lg mx-auto mb-4 w-full overflow-hidden border sm:max-w-screen-sm md:max-w-screen-md lg:max-w-3xl",
|
|
59
|
+
"data-cy": "ip-restrictions-card"
|
|
60
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
61
|
+
className: "space-y-2 p-6"
|
|
62
|
+
}, /*#__PURE__*/React.createElement(Checkbox, {
|
|
63
|
+
checked: isIpRestrictionVisible,
|
|
64
|
+
className: "flex-grow-0",
|
|
65
|
+
"data-cy": "enable-ip-restriction-checkbox",
|
|
66
|
+
disabled: isFetching || isUpdating,
|
|
67
|
+
label: /*#__PURE__*/React.createElement(Typography, {
|
|
68
|
+
style: "h3"
|
|
69
|
+
}, t("neetoMolecules.ipRestriction.switchLabel")),
|
|
70
|
+
onChange: handleOnChange
|
|
71
|
+
}), /*#__PURE__*/React.createElement(Typography, {
|
|
72
|
+
"data-cy": "ip-restriction-description",
|
|
73
|
+
style: "body2"
|
|
74
|
+
}, t("neetoMolecules.ipRestriction.description"))), isIpRestrictionVisible && /*#__PURE__*/React.createElement("div", {
|
|
75
|
+
className: "neeto-ui-bg-gray-100 w-full space-y-6 p-6"
|
|
76
|
+
}, /*#__PURE__*/React.createElement(CurrentIp, null), /*#__PURE__*/React.createElement(AllowedIpRanges, null), /*#__PURE__*/React.createElement(Callout, {
|
|
77
|
+
icon: Warning,
|
|
78
|
+
style: "warning"
|
|
79
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
80
|
+
className: "leading-2 block whitespace-pre-wrap py-1"
|
|
81
|
+
}, /*#__PURE__*/React.createElement(Trans, {
|
|
82
|
+
i18nKey: "neetoMolecules.ipRestriction.warningMessage"
|
|
83
|
+
}))), /*#__PURE__*/React.createElement(Button, {
|
|
84
|
+
label: t("neetoMolecules.common.actions.saveChanges"),
|
|
85
|
+
onClick: function onClick() {
|
|
86
|
+
return setIsAlertOpen(true);
|
|
87
|
+
}
|
|
88
|
+
}), /*#__PURE__*/React.createElement(Alert, {
|
|
89
|
+
isOpen: isAlertOpen,
|
|
90
|
+
isSubmitting: isUpdating,
|
|
91
|
+
title: t("neetoMolecules.ipRestriction.enableAlert.title"),
|
|
92
|
+
message: /*#__PURE__*/React.createElement(Trans, {
|
|
93
|
+
i18nKey: "neetoMolecules.ipRestriction.enableAlert.message"
|
|
94
|
+
}),
|
|
95
|
+
submitButtonLabel: t("neetoMolecules.ipRestriction.enableAlert.submitButtonLabel"),
|
|
96
|
+
onClose: function onClose() {
|
|
97
|
+
return setIsAlertOpen(false);
|
|
98
|
+
},
|
|
99
|
+
onSubmit: updateIpRestrictionStatus
|
|
100
|
+
})));
|
|
101
|
+
};
|
|
102
|
+
export default /*#__PURE__*/React.memo(IpRestriction);
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { t } from "i18next";
|
|
2
|
+
import { IPv4, IPv6, Validator } from "ip-num";
|
|
3
|
+
import { isNil, isNotNil } from "ramda";
|
|
4
|
+
import * as yup from "yup";
|
|
5
|
+
var isValidIPv4String = function isValidIPv4String(ip) {
|
|
6
|
+
return isNotNil(ip) && Validator.isValidIPv4String(ip)[0];
|
|
7
|
+
};
|
|
8
|
+
var isValidIPv6String = function isValidIPv6String(ip) {
|
|
9
|
+
return isNotNil(ip) && Validator.isValidIPv6String(ip)[0];
|
|
10
|
+
};
|
|
11
|
+
var isValidIpString = function isValidIpString(ip) {
|
|
12
|
+
return isValidIPv4String(ip) || isValidIPv6String(ip);
|
|
13
|
+
};
|
|
14
|
+
var areIpAddressesInSameFormat = function areIpAddressesInSameFormat(ipStart, ipEnd) {
|
|
15
|
+
return isValidIPv4String(ipStart) && isValidIPv4String(ipEnd) || isValidIPv6String(ipStart) && isValidIPv6String(ipEnd);
|
|
16
|
+
};
|
|
17
|
+
var isValidIPv4Range = function isValidIPv4Range(ipStart, ipEnd) {
|
|
18
|
+
var ipStartAddr = IPv4.fromDecimalDottedString(ipStart);
|
|
19
|
+
var ipEndAddr = IPv4.fromDecimalDottedString(ipEnd);
|
|
20
|
+
return ipStartAddr.isLessThanOrEquals(ipEndAddr);
|
|
21
|
+
};
|
|
22
|
+
var isValidIPv6Range = function isValidIPv6Range(ipStart, ipEnd) {
|
|
23
|
+
var ipStartAddr = IPv6.fromString(ipStart);
|
|
24
|
+
var ipEndAddr = IPv6.fromString(ipEnd);
|
|
25
|
+
return ipStartAddr.isLessThanOrEquals(ipEndAddr);
|
|
26
|
+
};
|
|
27
|
+
var isValidIPRange = function isValidIPRange(ipStart, ipEnd) {
|
|
28
|
+
if (isValidIPv4String(ipStart) && isValidIPv4String(ipEnd)) {
|
|
29
|
+
return isValidIPv4Range(ipStart, ipEnd);
|
|
30
|
+
}
|
|
31
|
+
if (isValidIPv6String(ipStart) && isValidIPv6String(ipEnd)) {
|
|
32
|
+
return isValidIPv6Range(ipStart, ipEnd);
|
|
33
|
+
}
|
|
34
|
+
return false;
|
|
35
|
+
};
|
|
36
|
+
yup.addMethod(yup.string, "validIp", function (errorMessage) {
|
|
37
|
+
return this.test("valid-ip", errorMessage, function (value) {
|
|
38
|
+
if (isNil(value)) {
|
|
39
|
+
return this;
|
|
40
|
+
}
|
|
41
|
+
var isValidIp = isValidIpString(value);
|
|
42
|
+
return isValidIp || this.createError({
|
|
43
|
+
path: this.path,
|
|
44
|
+
message: errorMessage
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
export var getIpRestrictionValidationSchema = function getIpRestrictionValidationSchema() {
|
|
49
|
+
return yup.object().shape({
|
|
50
|
+
ipStart: yup.string().validIp(t("neetoMolecules.ipRestriction.validations.invalidIp")).required(t("neetoMolecules.ipRestriction.validations.ipStartRequired")),
|
|
51
|
+
ipEnd: yup.string().validIp(t("neetoMolecules.ipRestriction.validations.invalidIp")).when("ipStart", function (ipStart, schema) {
|
|
52
|
+
return schema.test({
|
|
53
|
+
test: function test(ipEnd) {
|
|
54
|
+
return areIpAddressesInSameFormat(ipStart, ipEnd);
|
|
55
|
+
},
|
|
56
|
+
message: t("neetoMolecules.ipRestriction.validations.eitherIpv4OrIpv6")
|
|
57
|
+
});
|
|
58
|
+
}).when("ipStart", function (ipStart, schema) {
|
|
59
|
+
return schema.test({
|
|
60
|
+
test: function test(ipEnd) {
|
|
61
|
+
return isValidIPRange(ipStart, ipEnd);
|
|
62
|
+
},
|
|
63
|
+
message: t("neetoMolecules.ipRestriction.validations.ipEndGreaterThanIpStart")
|
|
64
|
+
});
|
|
65
|
+
}).required(t("neetoMolecules.ipRestriction.validations.ipEndRequired"))
|
|
66
|
+
});
|
|
67
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
// eslint-disable-next-line @bigbinary/neeto/use-webpack-alias
|
|
4
|
+
import { Kbd, Typography } from "@bigbinary/neetoui";
|
|
5
|
+
import { convertHotkeyToUsersPlatform, shortenHotKey, getTooltipProps } from "./utils";
|
|
6
|
+
var HotKey = function HotKey(_ref) {
|
|
7
|
+
var description = _ref.description,
|
|
8
|
+
sequence = _ref.sequence;
|
|
9
|
+
var hotkey = shortenHotKey(convertHotkeyToUsersPlatform(sequence));
|
|
10
|
+
var isSequentialHotkey = hotkey.includes(" ");
|
|
11
|
+
var isSimultaneousHotkey = hotkey.includes("+");
|
|
12
|
+
var isSingleKeyHotkey = !isSequentialHotkey && !isSimultaneousHotkey;
|
|
13
|
+
var sequences = [];
|
|
14
|
+
if (isSingleKeyHotkey) {
|
|
15
|
+
sequences = [hotkey];
|
|
16
|
+
} else if (isSequentialHotkey) {
|
|
17
|
+
sequences = hotkey.split(" ");
|
|
18
|
+
} else if (isSimultaneousHotkey) {
|
|
19
|
+
sequences = hotkey.split("+");
|
|
20
|
+
}
|
|
21
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
22
|
+
className: "my-3 w-full"
|
|
23
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
24
|
+
className: "flex items-center justify-between gap-3",
|
|
25
|
+
"data-cy": "hotkey-item",
|
|
26
|
+
"data-testid": "hotkey-item"
|
|
27
|
+
}, /*#__PURE__*/React.createElement(Typography, {
|
|
28
|
+
className: "neeto-ui-text-gray-800 min-w-0 flex-grow break-words",
|
|
29
|
+
lineHeight: "normal",
|
|
30
|
+
style: "body2"
|
|
31
|
+
}, description), /*#__PURE__*/React.createElement("div", {
|
|
32
|
+
className: "flex flex-shrink-0 items-center gap-1"
|
|
33
|
+
}, sequences.map(function (keyName, idx) {
|
|
34
|
+
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
35
|
+
key: idx
|
|
36
|
+
}, /*#__PURE__*/React.createElement(Kbd, {
|
|
37
|
+
keyName: keyName,
|
|
38
|
+
tooltipProps: getTooltipProps(keyName)
|
|
39
|
+
}), isSequentialHotkey && idx + 1 !== sequences.length && /*#__PURE__*/React.createElement(Kbd, {
|
|
40
|
+
keyName: "then"
|
|
41
|
+
}));
|
|
42
|
+
}))));
|
|
43
|
+
};
|
|
44
|
+
export default /*#__PURE__*/React.memo(HotKey);
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
+
import React from "react";
|
|
3
|
+
|
|
4
|
+
// eslint-disable-next-line @bigbinary/neeto/use-webpack-alias
|
|
5
|
+
import { Button, Typography } from "@bigbinary/neetoui";
|
|
6
|
+
import { useTranslation } from "react-i18next";
|
|
7
|
+
import { FULL_SHORTCUTS_LINK_PROP_NAME } from "./constants";
|
|
8
|
+
import HotKey from "./HotKey";
|
|
9
|
+
var HotKeyList = function HotKeyList(_ref) {
|
|
10
|
+
var hotkeys = _ref.hotkeys;
|
|
11
|
+
var _useTranslation = useTranslation(),
|
|
12
|
+
t = _useTranslation.t;
|
|
13
|
+
return Object.keys(hotkeys).map(function (categoryName) {
|
|
14
|
+
var categoryValues = hotkeys[categoryName];
|
|
15
|
+
var fullShortcutsLink = categoryValues[FULL_SHORTCUTS_LINK_PROP_NAME];
|
|
16
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
17
|
+
className: "mt-4 px-4",
|
|
18
|
+
key: categoryName
|
|
19
|
+
}, /*#__PURE__*/React.createElement(Typography, {
|
|
20
|
+
style: "h6",
|
|
21
|
+
textTransform: "uppercase",
|
|
22
|
+
weight: "bold"
|
|
23
|
+
}, categoryName), Object.entries(categoryValues).map(function (_ref2) {
|
|
24
|
+
var _ref3 = _slicedToArray(_ref2, 2),
|
|
25
|
+
_ref3$ = _ref3[1],
|
|
26
|
+
sequence = _ref3$.sequence,
|
|
27
|
+
description = _ref3$.description;
|
|
28
|
+
return sequence && /*#__PURE__*/React.createElement(HotKey, {
|
|
29
|
+
description: description,
|
|
30
|
+
key: sequence,
|
|
31
|
+
sequence: sequence
|
|
32
|
+
});
|
|
33
|
+
}), fullShortcutsLink && /*#__PURE__*/React.createElement(Button, {
|
|
34
|
+
className: "mb-3",
|
|
35
|
+
href: fullShortcutsLink,
|
|
36
|
+
style: "link",
|
|
37
|
+
target: "_blank",
|
|
38
|
+
label: t("neetoMolecules.keyboardShortcuts.viewFullListOfShortcuts")
|
|
39
|
+
}));
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
export default /*#__PURE__*/React.memo(HotKeyList);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export var KEY_SHORTFORM_MAP = {
|
|
2
|
+
command: "⌘",
|
|
3
|
+
escape: "esc",
|
|
4
|
+
control: "ctrl",
|
|
5
|
+
option: "opt",
|
|
6
|
+
"return": "enter"
|
|
7
|
+
};
|
|
8
|
+
export var MAC_TO_WINDOWS_KEYS_MAP = {
|
|
9
|
+
option: "alt",
|
|
10
|
+
command: "ctrl",
|
|
11
|
+
"return": "enter",
|
|
12
|
+
"delete": "backspace"
|
|
13
|
+
};
|
|
14
|
+
export var OS = {
|
|
15
|
+
mac: "OS X",
|
|
16
|
+
windows: "Windows"
|
|
17
|
+
};
|
|
18
|
+
export var FULL_SHORTCUTS_LINK_PROP_NAME = "fullShortcutsLink";
|
|
19
|
+
export var TOOLTIP_CONTENT = {
|
|
20
|
+
"⌘": "command",
|
|
21
|
+
esc: "escape",
|
|
22
|
+
ctrl: "control",
|
|
23
|
+
opt: "option",
|
|
24
|
+
backspace: "delete"
|
|
25
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
+
/* eslint-disable @bigbinary/neeto/use-webpack-alias */
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { useHotKeys } from "@bigbinary/neeto-commons-frontend/react-utils";
|
|
5
|
+
import { Close } from "@bigbinary/neeto-icons";
|
|
6
|
+
import { Typography, Button } from "@bigbinary/neetoui";
|
|
7
|
+
import { manager } from "@bigbinary/neetoui/managers";
|
|
8
|
+
import classnames from "classnames";
|
|
9
|
+
import { useTranslation } from "react-i18next";
|
|
10
|
+
import HotKeyList from "./HotKeyList";
|
|
11
|
+
import "./keyboard-shortcuts.scss";
|
|
12
|
+
import { getGlobalShortcuts } from "./utils";
|
|
13
|
+
import useKeyboardShortcutsPaneState from "../hooks/useKeyboardShortcutsPaneState";
|
|
14
|
+
var KeyboardShortcutsPane = function KeyboardShortcutsPane(_ref) {
|
|
15
|
+
var _ref$productShortcuts = _ref.productShortcuts,
|
|
16
|
+
productShortcuts = _ref$productShortcuts === void 0 ? {} : _ref$productShortcuts;
|
|
17
|
+
var _useKeyboardShortcuts = useKeyboardShortcutsPaneState(),
|
|
18
|
+
_useKeyboardShortcuts2 = _slicedToArray(_useKeyboardShortcuts, 2),
|
|
19
|
+
isOpen = _useKeyboardShortcuts2[0],
|
|
20
|
+
setIsOpen = _useKeyboardShortcuts2[1];
|
|
21
|
+
var hasOverlays = manager.hasOverlays();
|
|
22
|
+
// eslint-disable-next-line @bigbinary/neeto/no-dangling-constants
|
|
23
|
+
var GLOBAL_SHORTCUTS = getGlobalShortcuts();
|
|
24
|
+
var _useTranslation = useTranslation(),
|
|
25
|
+
t = _useTranslation.t;
|
|
26
|
+
var shortcuts = GLOBAL_SHORTCUTS[t("neetoMolecules.keyboardShortcuts.global.categoryName")];
|
|
27
|
+
useHotKeys(shortcuts.openKeyboardShortcutsPane.sequence, function () {
|
|
28
|
+
return setIsOpen(function (prevIsOpen) {
|
|
29
|
+
return !prevIsOpen;
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
useHotKeys(shortcuts.close.sequence, function () {
|
|
33
|
+
return setIsOpen(false);
|
|
34
|
+
});
|
|
35
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
36
|
+
"data-cy": "keyboard-shortcuts-pane",
|
|
37
|
+
className: classnames("neeto-molecules-keyboard-shortcuts-pane neeto-ui-border-gray-300 transition-width neeto-ui-bg-white ml-auto h-screen overflow-hidden border-l duration-300 ease-in-out", {
|
|
38
|
+
"w-80": isOpen,
|
|
39
|
+
"w-0": !isOpen,
|
|
40
|
+
absolute: hasOverlays,
|
|
41
|
+
"right-0": hasOverlays
|
|
42
|
+
})
|
|
43
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
44
|
+
className: "h-full w-80 overflow-y-auto"
|
|
45
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
46
|
+
className: "neeto-ui-border-gray-300 my-2 flex items-center justify-between border-b px-4 pb-2"
|
|
47
|
+
}, /*#__PURE__*/React.createElement(Typography, {
|
|
48
|
+
style: "h4"
|
|
49
|
+
}, t("neetoMolecules.keyboardShortcuts.title")), /*#__PURE__*/React.createElement(Button, {
|
|
50
|
+
icon: Close,
|
|
51
|
+
style: "text",
|
|
52
|
+
onClick: function onClick() {
|
|
53
|
+
return setIsOpen(false);
|
|
54
|
+
}
|
|
55
|
+
})), /*#__PURE__*/React.createElement(HotKeyList, {
|
|
56
|
+
hotkeys: GLOBAL_SHORTCUTS
|
|
57
|
+
}), /*#__PURE__*/React.createElement(HotKeyList, {
|
|
58
|
+
hotkeys: productShortcuts
|
|
59
|
+
})));
|
|
60
|
+
};
|
|
61
|
+
export default KeyboardShortcutsPane;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
+
import i18next from "i18next";
|
|
4
|
+
import platform from "platform";
|
|
5
|
+
import { toPairs } from "ramda";
|
|
6
|
+
import { KEY_SHORTFORM_MAP, MAC_TO_WINDOWS_KEYS_MAP, OS, TOOLTIP_CONTENT } from "./constants";
|
|
7
|
+
var isMultipleHotkey = function isMultipleHotkey(hotkey) {
|
|
8
|
+
return Array.isArray(hotkey);
|
|
9
|
+
};
|
|
10
|
+
var replaceKeys = function replaceKeys(hotkey, keyName, replaceWith) {
|
|
11
|
+
return isMultipleHotkey(hotkey) ? hotkey.map(function (item) {
|
|
12
|
+
return item.replaceAll(keyName, replaceWith);
|
|
13
|
+
}) : hotkey.replaceAll(keyName, replaceWith);
|
|
14
|
+
};
|
|
15
|
+
var convertHotKeyToWindows = function convertHotKeyToWindows(hotkey) {
|
|
16
|
+
toPairs(MAC_TO_WINDOWS_KEYS_MAP).forEach(function (_ref) {
|
|
17
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
18
|
+
macKey = _ref2[0],
|
|
19
|
+
windowsKey = _ref2[1];
|
|
20
|
+
hotkey = replaceKeys(hotkey, macKey, windowsKey);
|
|
21
|
+
});
|
|
22
|
+
return hotkey;
|
|
23
|
+
};
|
|
24
|
+
export var convertHotkeyToUsersPlatform = function convertHotkeyToUsersPlatform(hotkey) {
|
|
25
|
+
var _platformInfo$os, _platformInfo$os$fami;
|
|
26
|
+
var platformInfo = platform.parse(navigator.userAgent);
|
|
27
|
+
var isOSX = (_platformInfo$os = platformInfo.os) === null || _platformInfo$os === void 0 ? void 0 : (_platformInfo$os$fami = _platformInfo$os.family) === null || _platformInfo$os$fami === void 0 ? void 0 : _platformInfo$os$fami.includes(OS.mac);
|
|
28
|
+
if (isOSX) return hotkey;
|
|
29
|
+
return convertHotKeyToWindows(hotkey);
|
|
30
|
+
};
|
|
31
|
+
export var shortenHotKey = function shortenHotKey(hotkey) {
|
|
32
|
+
var result = hotkey;
|
|
33
|
+
Object.entries(KEY_SHORTFORM_MAP).forEach(function (_ref3) {
|
|
34
|
+
var _ref4 = _slicedToArray(_ref3, 2),
|
|
35
|
+
longform = _ref4[0],
|
|
36
|
+
shortform = _ref4[1];
|
|
37
|
+
result = result.replaceAll(longform, shortform);
|
|
38
|
+
});
|
|
39
|
+
return result;
|
|
40
|
+
};
|
|
41
|
+
export var getGlobalShortcuts = function getGlobalShortcuts() {
|
|
42
|
+
return _defineProperty({}, i18next.t("neetoMolecules.keyboardShortcuts.global.categoryName"), {
|
|
43
|
+
openKeyboardShortcutsPane: {
|
|
44
|
+
sequence: "shift+/",
|
|
45
|
+
description: i18next.t("neetoMolecules.keyboardShortcuts.global.openKeyboardShortcutsPane")
|
|
46
|
+
},
|
|
47
|
+
close: {
|
|
48
|
+
sequence: "esc",
|
|
49
|
+
description: i18next.t("neetoMolecules.keyboardShortcuts.global.close")
|
|
50
|
+
},
|
|
51
|
+
submitForm: {
|
|
52
|
+
sequence: "command+return",
|
|
53
|
+
description: i18next.t("neetoMolecules.keyboardShortcuts.global.submitForm")
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
};
|
|
57
|
+
export var getTooltipProps = function getTooltipProps(key) {
|
|
58
|
+
if (TOOLTIP_CONTENT[key]) {
|
|
59
|
+
return {
|
|
60
|
+
position: "top",
|
|
61
|
+
content: TOOLTIP_CONTENT[key],
|
|
62
|
+
followCursor: "horizontal"
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
return null;
|
|
66
|
+
};
|