@bigbinary/neeto-molecules 1.1.10 → 1.1.12
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 +75 -0
- package/dist/IpRestriction/CurrentIp.js +26 -0
- package/dist/IpRestriction/FormRow.js +84 -0
- package/dist/IpRestriction/Row.js +91 -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 +20 -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 +85 -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/Search/index.js +52 -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 -34
- package/src/translations/en.json +5 -1
- package/types/Search.d.ts +19 -0
- 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,59 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
5
|
+
var _excluded = ["className", "icon", "label", "value", "style"];
|
|
6
|
+
import React, { useState, useEffect, useRef } from "react";
|
|
7
|
+
import classnames from "classnames";
|
|
8
|
+
import { copyToClipboard } from "@bigbinary/neeto-commons-frontend/utils";
|
|
9
|
+
import { Copy, Check } from "@bigbinary/neeto-icons";
|
|
10
|
+
import { Button } from "@bigbinary/neetoui";
|
|
11
|
+
import { TOOLTIP_CONFIG, TIME_OUT, BUTTON_STYLES } from "./constants";
|
|
12
|
+
import "./copyToClipboard.scss";
|
|
13
|
+
var CopyToClipboardButton = function CopyToClipboardButton(_ref) {
|
|
14
|
+
var _classnames;
|
|
15
|
+
var className = _ref.className,
|
|
16
|
+
_ref$icon = _ref.icon,
|
|
17
|
+
icon = _ref$icon === void 0 ? Copy : _ref$icon,
|
|
18
|
+
_ref$label = _ref.label,
|
|
19
|
+
label = _ref$label === void 0 ? "" : _ref$label,
|
|
20
|
+
value = _ref.value,
|
|
21
|
+
style = _ref.style,
|
|
22
|
+
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
23
|
+
var _useState = useState(false),
|
|
24
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
25
|
+
isChecked = _useState2[0],
|
|
26
|
+
setIsChecked = _useState2[1];
|
|
27
|
+
var ref = useRef();
|
|
28
|
+
var onHandleClick = function onHandleClick(event) {
|
|
29
|
+
event.preventDefault();
|
|
30
|
+
copyToClipboard(value, {
|
|
31
|
+
showToastr: false
|
|
32
|
+
});
|
|
33
|
+
setIsChecked(true);
|
|
34
|
+
setTimeout(function () {
|
|
35
|
+
setIsChecked(false);
|
|
36
|
+
}, TIME_OUT); // Reset copied state after 2 seconds
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
useEffect(function () {
|
|
40
|
+
if (ref.current) {
|
|
41
|
+
var buttonWidth = ref.current.clientWidth;
|
|
42
|
+
ref.current.style.minWidth = "".concat(buttonWidth, "px");
|
|
43
|
+
}
|
|
44
|
+
}, []);
|
|
45
|
+
var tooltipProps = label ? null : TOOLTIP_CONFIG;
|
|
46
|
+
var buttonLabel = isChecked && label ? "Copied" : label;
|
|
47
|
+
var buttonIcon = isChecked ? Check : icon;
|
|
48
|
+
return /*#__PURE__*/React.createElement(Button, _extends({
|
|
49
|
+
ref: ref,
|
|
50
|
+
style: style,
|
|
51
|
+
tooltipProps: tooltipProps,
|
|
52
|
+
"data-testid": "copy-button",
|
|
53
|
+
icon: buttonIcon,
|
|
54
|
+
label: buttonLabel,
|
|
55
|
+
className: classnames("neeto-molecules-copy-button", (_classnames = {}, _defineProperty(_classnames, className, className), _defineProperty(_classnames, "neeto-molecules-copy-button--active", isChecked), _classnames)),
|
|
56
|
+
onClick: onHandleClick
|
|
57
|
+
}, otherProps));
|
|
58
|
+
};
|
|
59
|
+
export default CopyToClipboardButton;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
+
import React, { useState } from "react";
|
|
3
|
+
import { SINGULAR } from "@bigbinary/neeto-commons-frontend/constants";
|
|
4
|
+
import { isNotEmpty, noop } from "@bigbinary/neeto-commons-frontend/pure";
|
|
5
|
+
import { CustomDomain as NeetoUICustomDomainIcon } from "@bigbinary/neeto-icons";
|
|
6
|
+
import { Button, Tag, Spinner } from "@bigbinary/neetoui";
|
|
7
|
+
import { useTranslation } from "react-i18next";
|
|
8
|
+
import DeleteAlert from "../CustomDomainDashboard/DeleteAlert";
|
|
9
|
+
import ManageDomain from "../CustomDomainDashboard/Manage";
|
|
10
|
+
import { useFetchCustomDomains, useDeleteCustomDomain } from "../CustomDomainDashboard/useCustomDomainApi";
|
|
11
|
+
import MoreDropdown from "../MoreDropdown";
|
|
12
|
+
var CustomDomain = function CustomDomain(_ref) {
|
|
13
|
+
var url = _ref.url,
|
|
14
|
+
iconOnly = _ref.iconOnly;
|
|
15
|
+
var _useState = useState(false),
|
|
16
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
17
|
+
isPaneOpen = _useState2[0],
|
|
18
|
+
setIsPaneOpen = _useState2[1];
|
|
19
|
+
var _useState3 = useState(false),
|
|
20
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
21
|
+
isAlertOpen = _useState4[0],
|
|
22
|
+
setIsAlertOpen = _useState4[1];
|
|
23
|
+
var _useTranslation = useTranslation(),
|
|
24
|
+
t = _useTranslation.t;
|
|
25
|
+
var _useFetchCustomDomain = useFetchCustomDomains({
|
|
26
|
+
url: url
|
|
27
|
+
}),
|
|
28
|
+
customDomain = _useFetchCustomDomain.data,
|
|
29
|
+
isLoading = _useFetchCustomDomain.isLoading;
|
|
30
|
+
var _useDeleteCustomDomai = useDeleteCustomDomain(url, {
|
|
31
|
+
onSettled: function onSettled() {
|
|
32
|
+
return setIsAlertOpen(false);
|
|
33
|
+
}
|
|
34
|
+
}),
|
|
35
|
+
deleteCustomDomain = _useDeleteCustomDomai.mutate,
|
|
36
|
+
isDeleting = _useDeleteCustomDomai.isLoading;
|
|
37
|
+
var actions = [{
|
|
38
|
+
key: "edit",
|
|
39
|
+
label: t("neetoMolecules.common.actions.edit"),
|
|
40
|
+
onClick: function onClick() {
|
|
41
|
+
return setIsPaneOpen(true);
|
|
42
|
+
}
|
|
43
|
+
}, {
|
|
44
|
+
key: "delete",
|
|
45
|
+
label: t("neetoMolecules.common.actions.delete"),
|
|
46
|
+
onClick: function onClick() {
|
|
47
|
+
return setIsAlertOpen(true);
|
|
48
|
+
}
|
|
49
|
+
}];
|
|
50
|
+
if (isLoading) return /*#__PURE__*/React.createElement(Spinner, null);
|
|
51
|
+
return /*#__PURE__*/React.createElement("div", null, isNotEmpty(customDomain) ? /*#__PURE__*/React.createElement("div", {
|
|
52
|
+
className: "flex flex-row items-center"
|
|
53
|
+
}, /*#__PURE__*/React.createElement(Tag, {
|
|
54
|
+
label: customDomain === null || customDomain === void 0 ? void 0 : customDomain.hostname,
|
|
55
|
+
style: customDomain.status === "active" ? "success" : "warning"
|
|
56
|
+
}), /*#__PURE__*/React.createElement(MoreDropdown, {
|
|
57
|
+
dropdownProps: {
|
|
58
|
+
autoWidth: true
|
|
59
|
+
},
|
|
60
|
+
menuItems: actions,
|
|
61
|
+
dropdownButtonProps: {
|
|
62
|
+
"data-testid": "nui-dropdown-icon",
|
|
63
|
+
strategy: "fixed"
|
|
64
|
+
}
|
|
65
|
+
})) : /*#__PURE__*/React.createElement(Button, {
|
|
66
|
+
icon: iconOnly && NeetoUICustomDomainIcon,
|
|
67
|
+
style: "text",
|
|
68
|
+
label: iconOnly ? "" : t("neetoMolecules.common.actions.add", {
|
|
69
|
+
entity: t("neetoMolecules.customDomain.customDomain", SINGULAR).toLowerCase()
|
|
70
|
+
}),
|
|
71
|
+
tooltipProps: iconOnly && {
|
|
72
|
+
content: t("neetoMolecules.customDomain.customDomain", SINGULAR)
|
|
73
|
+
},
|
|
74
|
+
onClick: function onClick() {
|
|
75
|
+
return setIsPaneOpen(true);
|
|
76
|
+
}
|
|
77
|
+
}), /*#__PURE__*/React.createElement(ManageDomain, {
|
|
78
|
+
hasOne: true,
|
|
79
|
+
customDomain: customDomain,
|
|
80
|
+
url: url,
|
|
81
|
+
isOpen: isPaneOpen,
|
|
82
|
+
setCustomDomain: noop,
|
|
83
|
+
onClose: function onClose() {
|
|
84
|
+
return setIsPaneOpen(false);
|
|
85
|
+
}
|
|
86
|
+
}), /*#__PURE__*/React.createElement(DeleteAlert, {
|
|
87
|
+
hostname: customDomain === null || customDomain === void 0 ? void 0 : customDomain.hostname,
|
|
88
|
+
isOpen: isAlertOpen,
|
|
89
|
+
isSubmitting: isDeleting,
|
|
90
|
+
onClose: function onClose() {
|
|
91
|
+
return setIsAlertOpen(false);
|
|
92
|
+
},
|
|
93
|
+
onSubmit: function onSubmit() {
|
|
94
|
+
return deleteCustomDomain();
|
|
95
|
+
}
|
|
96
|
+
}));
|
|
97
|
+
};
|
|
98
|
+
export default CustomDomain;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Alert } from "@bigbinary/neetoui";
|
|
3
|
+
import { useTranslation, Trans } from "react-i18next";
|
|
4
|
+
var DeleteAlert = function DeleteAlert(_ref) {
|
|
5
|
+
var onClose = _ref.onClose,
|
|
6
|
+
onSubmit = _ref.onSubmit,
|
|
7
|
+
isOpen = _ref.isOpen,
|
|
8
|
+
isSubmitting = _ref.isSubmitting,
|
|
9
|
+
hostname = _ref.hostname;
|
|
10
|
+
var _useTranslation = useTranslation(),
|
|
11
|
+
t = _useTranslation.t;
|
|
12
|
+
return /*#__PURE__*/React.createElement(Alert, {
|
|
13
|
+
cancelButtonLabel: t("neetoMolecules.common.actions.cancel"),
|
|
14
|
+
isOpen: isOpen,
|
|
15
|
+
isSubmitting: isSubmitting,
|
|
16
|
+
submitButtonLabel: t("neetoMolecules.common.actions.delete"),
|
|
17
|
+
title: t("neetoMolecules.customDomain.delete"),
|
|
18
|
+
message: /*#__PURE__*/React.createElement(Trans, {
|
|
19
|
+
i18nKey: "neetoMolecules.customDomain.alertMessage",
|
|
20
|
+
values: {
|
|
21
|
+
hostname: hostname
|
|
22
|
+
}
|
|
23
|
+
}),
|
|
24
|
+
onClose: onClose,
|
|
25
|
+
onSubmit: onSubmit
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
export default DeleteAlert;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { PLURAL } from "@bigbinary/neeto-commons-frontend/constants";
|
|
4
|
+
import { withT } from "@bigbinary/neeto-commons-frontend/react-utils";
|
|
5
|
+
import { withEventTargetValue } from "@bigbinary/neeto-commons-frontend/utils";
|
|
6
|
+
import { Button } from "@bigbinary/neetoui";
|
|
7
|
+
import NeetoHeader from "../Header";
|
|
8
|
+
var Header = withT(function (_ref) {
|
|
9
|
+
var t = _ref.t,
|
|
10
|
+
setIsPaneOpen = _ref.setIsPaneOpen,
|
|
11
|
+
searchTerm = _ref.searchTerm,
|
|
12
|
+
setSearchTerm = _ref.setSearchTerm,
|
|
13
|
+
headerProps = _ref.headerProps;
|
|
14
|
+
return /*#__PURE__*/React.createElement(NeetoHeader, _extends({
|
|
15
|
+
"data-testid": "custom-domain-header",
|
|
16
|
+
title: t("neetoMolecules.customDomain.customDomain", PLURAL),
|
|
17
|
+
actionBlock: /*#__PURE__*/React.createElement(Button, {
|
|
18
|
+
"data-cy": "add-new-custom-domain-button",
|
|
19
|
+
label: t("neetoMolecules.customDomain.addNew"),
|
|
20
|
+
onClick: function onClick() {
|
|
21
|
+
return setIsPaneOpen(true);
|
|
22
|
+
}
|
|
23
|
+
}),
|
|
24
|
+
searchProps: {
|
|
25
|
+
value: searchTerm,
|
|
26
|
+
onChange: withEventTargetValue(setSearchTerm),
|
|
27
|
+
placeholder: t("neetoMolecules.customDomain.search"),
|
|
28
|
+
"data-cy": "custom-domain-search-field"
|
|
29
|
+
}
|
|
30
|
+
}, headerProps));
|
|
31
|
+
});
|
|
32
|
+
export default /*#__PURE__*/React.memo(Header);
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { joinHyphenCase } from "@bigbinary/neeto-commons-frontend/utils";
|
|
3
|
+
import { Info } from "@bigbinary/neeto-icons";
|
|
4
|
+
import { Input, Callout } from "@bigbinary/neetoui";
|
|
5
|
+
import CopyToClipboardButton from "../../CopyToClipboardButton";
|
|
6
|
+
import { recordData } from "../utils";
|
|
7
|
+
var Record = function Record(_ref) {
|
|
8
|
+
var customDomain = _ref.customDomain;
|
|
9
|
+
var _recordData = recordData(customDomain),
|
|
10
|
+
recordName = _recordData.recordName,
|
|
11
|
+
recordValue = _recordData.recordValue,
|
|
12
|
+
recordDescription = _recordData.recordDescription,
|
|
13
|
+
recordNameLabel = _recordData.recordNameLabel,
|
|
14
|
+
recordValueLabel = _recordData.recordValueLabel;
|
|
15
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
16
|
+
className: "mt-6 grid gap-4"
|
|
17
|
+
}, customDomain.status !== "active" && /*#__PURE__*/React.createElement(Callout, {
|
|
18
|
+
icon: Info,
|
|
19
|
+
style: "info"
|
|
20
|
+
}, recordDescription), /*#__PURE__*/React.createElement(Input, {
|
|
21
|
+
disabled: true,
|
|
22
|
+
"data-cy": joinHyphenCase(recordNameLabel),
|
|
23
|
+
label: recordNameLabel,
|
|
24
|
+
value: recordName,
|
|
25
|
+
suffix: /*#__PURE__*/React.createElement(CopyToClipboardButton, {
|
|
26
|
+
size: "small",
|
|
27
|
+
style: "text",
|
|
28
|
+
value: recordName
|
|
29
|
+
})
|
|
30
|
+
}), /*#__PURE__*/React.createElement(Input, {
|
|
31
|
+
disabled: true,
|
|
32
|
+
"data-cy": joinHyphenCase(recordValueLabel),
|
|
33
|
+
label: recordValueLabel,
|
|
34
|
+
value: recordValue,
|
|
35
|
+
suffix: /*#__PURE__*/React.createElement(CopyToClipboardButton, {
|
|
36
|
+
size: "small",
|
|
37
|
+
style: "text",
|
|
38
|
+
value: recordValue
|
|
39
|
+
})
|
|
40
|
+
}));
|
|
41
|
+
};
|
|
42
|
+
export default /*#__PURE__*/React.memo(Record);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Trans } from "react-i18next";
|
|
3
|
+
var StatusInfo = function StatusInfo() {
|
|
4
|
+
var helpUrl = "https://help.".concat(globalProps.appName.toLowerCase(), ".com/articles/custom-domains");
|
|
5
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
6
|
+
className: "space-y-6"
|
|
7
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
8
|
+
className: "neeto-ui-rounded neeto-ui-bg-gray-100 neeto-ui-text-gray-700 space-y-3 p-4"
|
|
9
|
+
}, /*#__PURE__*/React.createElement(Trans, {
|
|
10
|
+
i18nKey: "neetoMolecules.customDomain.messageBlock.dnsStatus",
|
|
11
|
+
components: {
|
|
12
|
+
a: /*#__PURE__*/React.createElement("a", {
|
|
13
|
+
className: "neeto-ui-btn--style-link",
|
|
14
|
+
href: helpUrl,
|
|
15
|
+
rel: "noreferrer",
|
|
16
|
+
target: "_blank"
|
|
17
|
+
})
|
|
18
|
+
}
|
|
19
|
+
})));
|
|
20
|
+
};
|
|
21
|
+
export default /*#__PURE__*/React.memo(StatusInfo);
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import classnames from "classnames";
|
|
3
|
+
import { snakeToCamelCase } from "@bigbinary/neeto-commons-frontend/pure";
|
|
4
|
+
import { Tag } from "@bigbinary/neetoui";
|
|
5
|
+
import { useTranslation } from "react-i18next";
|
|
6
|
+
var TagBlock = function TagBlock(_ref) {
|
|
7
|
+
var status = _ref.status,
|
|
8
|
+
_ref$stacked = _ref.stacked,
|
|
9
|
+
stacked = _ref$stacked === void 0 ? false : _ref$stacked;
|
|
10
|
+
var _useTranslation = useTranslation(),
|
|
11
|
+
t = _useTranslation.t;
|
|
12
|
+
var isDomainValidated = status === "active" || status === "pending_cname_validation";
|
|
13
|
+
var camelCasedStatus = snakeToCamelCase(status || "");
|
|
14
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
15
|
+
className: classnames("flex gap-2", {
|
|
16
|
+
"flex-col items-start": stacked
|
|
17
|
+
})
|
|
18
|
+
}, status === "failed" ? /*#__PURE__*/React.createElement(Tag, {
|
|
19
|
+
indicatorStyle: "danger",
|
|
20
|
+
label: t("neetoMolecules.customDomain.status.".concat(camelCasedStatus)),
|
|
21
|
+
style: "secondary"
|
|
22
|
+
}) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Tag, {
|
|
23
|
+
indicatorStyle: isDomainValidated ? "success" : "warning",
|
|
24
|
+
style: "secondary",
|
|
25
|
+
label: t("neetoMolecules.customDomain.status.domain.".concat(camelCasedStatus))
|
|
26
|
+
}), isDomainValidated && /*#__PURE__*/React.createElement("div", {
|
|
27
|
+
className: classnames("flex items-center justify-between gap-2", {
|
|
28
|
+
"w-full": stacked
|
|
29
|
+
})
|
|
30
|
+
}, /*#__PURE__*/React.createElement(Tag, {
|
|
31
|
+
indicatorStyle: status === "active" ? "success" : "warning",
|
|
32
|
+
style: "secondary",
|
|
33
|
+
label: t("neetoMolecules.customDomain.status.cname.".concat(camelCasedStatus))
|
|
34
|
+
}))));
|
|
35
|
+
};
|
|
36
|
+
export default /*#__PURE__*/React.memo(TagBlock);
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import React, { useRef } from "react";
|
|
2
|
+
import { Form, Formik } from "formik";
|
|
3
|
+
import { SINGULAR } from "@bigbinary/neeto-commons-frontend/constants";
|
|
4
|
+
import { isNotEmpty } from "@bigbinary/neeto-commons-frontend/pure";
|
|
5
|
+
import { Check } from "@bigbinary/neeto-icons";
|
|
6
|
+
import { Label, Pane, Typography, Button } from "@bigbinary/neetoui";
|
|
7
|
+
import { Input } from "@bigbinary/neetoui/formik";
|
|
8
|
+
import { useTranslation } from "react-i18next";
|
|
9
|
+
import { INITIAL_VALUES } from "./constants";
|
|
10
|
+
import Record from "./Record";
|
|
11
|
+
import StatusInfo from "./StatusInfo";
|
|
12
|
+
import TagBlock from "./TagBlock";
|
|
13
|
+
import { getCustomDomainValidationSchema } from "./utils";
|
|
14
|
+
import { useCreateCustomDomain, useValidateDomain, useValidateCname, useUpdateCustomDomain } from "../useCustomDomainApi";
|
|
15
|
+
var Manage = function Manage(_ref) {
|
|
16
|
+
var isOpen = _ref.isOpen,
|
|
17
|
+
onClose = _ref.onClose,
|
|
18
|
+
customDomain = _ref.customDomain,
|
|
19
|
+
setCustomDomain = _ref.setCustomDomain,
|
|
20
|
+
url = _ref.url,
|
|
21
|
+
hasOne = _ref.hasOne;
|
|
22
|
+
var _useTranslation = useTranslation(),
|
|
23
|
+
t = _useTranslation.t;
|
|
24
|
+
var initialFocusRef = useRef(null);
|
|
25
|
+
var customDomainId = hasOne ? null : customDomain === null || customDomain === void 0 ? void 0 : customDomain.id;
|
|
26
|
+
var _useCreateCustomDomai = useCreateCustomDomain(url),
|
|
27
|
+
createCustomDomain = _useCreateCustomDomai.mutate,
|
|
28
|
+
isCreating = _useCreateCustomDomai.isLoading;
|
|
29
|
+
var _useValidateDomain = useValidateDomain(url),
|
|
30
|
+
validateDomain = _useValidateDomain.mutate,
|
|
31
|
+
isValidating = _useValidateDomain.isLoading;
|
|
32
|
+
var _useValidateCname = useValidateCname(url),
|
|
33
|
+
validateCname = _useValidateCname.mutate,
|
|
34
|
+
isCnameValidating = _useValidateCname.isLoading;
|
|
35
|
+
var _useUpdateCustomDomai = useUpdateCustomDomain(url),
|
|
36
|
+
updateCustomDomain = _useUpdateCustomDomai.mutate,
|
|
37
|
+
isUpdating = _useUpdateCustomDomai.isLoading;
|
|
38
|
+
var handleSubmit = function handleSubmit(values) {
|
|
39
|
+
return createCustomDomain(values, {
|
|
40
|
+
onSuccess: function onSuccess(values) {
|
|
41
|
+
return setCustomDomain(values);
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
var handleValidateDomain = function handleValidateDomain() {
|
|
46
|
+
return validateDomain(customDomainId, {
|
|
47
|
+
onSuccess: function onSuccess(values) {
|
|
48
|
+
return setCustomDomain(values);
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
var handleValidateCname = function handleValidateCname() {
|
|
53
|
+
validateCname(customDomainId, {
|
|
54
|
+
onSuccess: function onSuccess(data) {
|
|
55
|
+
return setCustomDomain(data);
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
var handleUpdateCname = function handleUpdateCname() {
|
|
60
|
+
updateCustomDomain(customDomainId, {
|
|
61
|
+
onSuccess: function onSuccess(data) {
|
|
62
|
+
return setCustomDomain(data);
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
return /*#__PURE__*/React.createElement(Pane, {
|
|
67
|
+
initialFocusRef: initialFocusRef,
|
|
68
|
+
isOpen: isOpen,
|
|
69
|
+
onClose: onClose
|
|
70
|
+
}, /*#__PURE__*/React.createElement(Formik, {
|
|
71
|
+
enableReinitialize: true,
|
|
72
|
+
initialValues: customDomain || INITIAL_VALUES,
|
|
73
|
+
validationSchema: getCustomDomainValidationSchema(),
|
|
74
|
+
onSubmit: handleSubmit
|
|
75
|
+
}, function (_ref2) {
|
|
76
|
+
var dirty = _ref2.dirty;
|
|
77
|
+
return /*#__PURE__*/React.createElement(Form, null, /*#__PURE__*/React.createElement(Pane.Header, null, /*#__PURE__*/React.createElement(Typography, {
|
|
78
|
+
"data-cy": "add-custom-domain-pane-heading",
|
|
79
|
+
style: "h2",
|
|
80
|
+
weight: "semibold"
|
|
81
|
+
}, isNotEmpty(customDomain) ? t("neetoMolecules.customDomain.edit") : t("neetoMolecules.customDomain.addNew"))), /*#__PURE__*/React.createElement(Pane.Body, null, /*#__PURE__*/React.createElement("div", {
|
|
82
|
+
className: "w-full space-y-6"
|
|
83
|
+
}, isNotEmpty(customDomain) && /*#__PURE__*/React.createElement(TagBlock, {
|
|
84
|
+
stacked: true,
|
|
85
|
+
handleValidateCname: handleValidateCname,
|
|
86
|
+
isCnameRecordsAdded: customDomain.addedCnameAt,
|
|
87
|
+
status: customDomain.status
|
|
88
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
89
|
+
className: "space-y-2"
|
|
90
|
+
}, /*#__PURE__*/React.createElement(Label, {
|
|
91
|
+
htmlFor: "hostname"
|
|
92
|
+
}, isNotEmpty(customDomain) ? t("neetoMolecules.customDomain.customDomain", SINGULAR) : t("neetoMolecules.customDomain.label")), /*#__PURE__*/React.createElement("div", {
|
|
93
|
+
className: "flex items-start gap-2"
|
|
94
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
95
|
+
"data-cy": "custom-domain-input-field",
|
|
96
|
+
disabled: isNotEmpty(customDomain),
|
|
97
|
+
name: "hostname",
|
|
98
|
+
placeholder: t("neetoMolecules.customDomain.placeholder"),
|
|
99
|
+
ref: initialFocusRef
|
|
100
|
+
}), !isNotEmpty(customDomain) && /*#__PURE__*/React.createElement(Button, {
|
|
101
|
+
"data-cy": "submit-custom-domain-button",
|
|
102
|
+
"data-testid": "submit-custom-domain-button",
|
|
103
|
+
disabled: !dirty || isCreating,
|
|
104
|
+
icon: Check,
|
|
105
|
+
loading: isCreating,
|
|
106
|
+
style: "primary",
|
|
107
|
+
type: "submit"
|
|
108
|
+
}))), isNotEmpty(customDomain) && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Record, {
|
|
109
|
+
customDomain: customDomain
|
|
110
|
+
}), customDomain.status === "pending_domain_validation" && /*#__PURE__*/React.createElement(Button, {
|
|
111
|
+
"data-cy": "validate-domain-button",
|
|
112
|
+
disabled: isValidating,
|
|
113
|
+
loading: isValidating,
|
|
114
|
+
label: t("neetoMolecules.customDomain.validation.buttonLabel.domain"),
|
|
115
|
+
onClick: handleValidateDomain
|
|
116
|
+
}), customDomain.status === "pending_cname_validation" && /*#__PURE__*/React.createElement(Button, {
|
|
117
|
+
"data-cy": "validate-cname-record-button",
|
|
118
|
+
loading: isCnameValidating || isUpdating,
|
|
119
|
+
label: t("neetoMolecules.customDomain.validation.buttonLabel.cnameAdded"),
|
|
120
|
+
onClick: handleUpdateCname
|
|
121
|
+
}), /*#__PURE__*/React.createElement(StatusInfo, null)))));
|
|
122
|
+
}));
|
|
123
|
+
};
|
|
124
|
+
export default Manage;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { t } from "i18next";
|
|
2
|
+
import * as Yup from "yup";
|
|
3
|
+
import { HOSTNAME_REGEX } from "./constants";
|
|
4
|
+
export var getCustomDomainValidationSchema = function getCustomDomainValidationSchema() {
|
|
5
|
+
return Yup.object().shape({
|
|
6
|
+
hostname: Yup.string().required(t("neetoMolecules.customDomain.formikValidation.required")).matches(HOSTNAME_REGEX, t("neetoMolecules.customDomain.formikValidation.valid"))
|
|
7
|
+
});
|
|
8
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import axios from "axios";
|
|
2
|
+
var getUrlwithId = function getUrlwithId(url, id) {
|
|
3
|
+
return id ? "".concat(url, "/").concat(id) : url;
|
|
4
|
+
};
|
|
5
|
+
var fetchCustomDomains = function fetchCustomDomains(_ref) {
|
|
6
|
+
var url = _ref.url,
|
|
7
|
+
params = _ref.params;
|
|
8
|
+
return axios.get(url, {
|
|
9
|
+
params: params
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
var updateCustomDomain = function updateCustomDomain(url, id) {
|
|
13
|
+
return axios.patch(getUrlwithId(url, id));
|
|
14
|
+
};
|
|
15
|
+
var createCustomDomain = function createCustomDomain(url, payload) {
|
|
16
|
+
return axios.post(url, payload);
|
|
17
|
+
};
|
|
18
|
+
var deleteCustomDomain = function deleteCustomDomain(url, id) {
|
|
19
|
+
return axios["delete"](getUrlwithId(url, id));
|
|
20
|
+
};
|
|
21
|
+
var validateDomain = function validateDomain(url, id) {
|
|
22
|
+
return axios.patch("".concat(getUrlwithId(url, id), "/validate_domain"));
|
|
23
|
+
};
|
|
24
|
+
var validateCname = function validateCname(url, id) {
|
|
25
|
+
return axios.patch("".concat(getUrlwithId(url, id), "/validate_cname"));
|
|
26
|
+
};
|
|
27
|
+
var customDomainApi = {
|
|
28
|
+
createCustomDomain: createCustomDomain,
|
|
29
|
+
deleteCustomDomain: deleteCustomDomain,
|
|
30
|
+
validateDomain: validateDomain,
|
|
31
|
+
fetchCustomDomains: fetchCustomDomains,
|
|
32
|
+
validateCname: validateCname,
|
|
33
|
+
updateCustomDomain: updateCustomDomain
|
|
34
|
+
};
|
|
35
|
+
export default customDomainApi;
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
+
import React, { useState } from "react";
|
|
3
|
+
import { isNotEmpty } from "@bigbinary/neeto-commons-frontend/pure";
|
|
4
|
+
import { useDebounce } from "@bigbinary/neeto-commons-frontend/react-utils";
|
|
5
|
+
import { Table, Typography, NoData } from "@bigbinary/neetoui";
|
|
6
|
+
import { useTranslation } from "react-i18next";
|
|
7
|
+
import Container from "../Container";
|
|
8
|
+
import PageLoader from "../PageLoader";
|
|
9
|
+
import SubHeader from "../SubHeader";
|
|
10
|
+
import DeleteAlert from "./DeleteAlert";
|
|
11
|
+
import Header from "./Header";
|
|
12
|
+
import ManageDomain from "./Manage";
|
|
13
|
+
import { useFetchCustomDomains, useDeleteCustomDomain } from "./useCustomDomainApi";
|
|
14
|
+
import { renderColumnData } from "./utils";
|
|
15
|
+
var CustomDomainDashboard = function CustomDomainDashboard(_ref) {
|
|
16
|
+
var _data$customDomains;
|
|
17
|
+
var headerProps = _ref.headerProps,
|
|
18
|
+
url = _ref.url;
|
|
19
|
+
var _useState = useState(""),
|
|
20
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
21
|
+
searchTerm = _useState2[0],
|
|
22
|
+
setSearchTerm = _useState2[1];
|
|
23
|
+
var _useState3 = useState(false),
|
|
24
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
25
|
+
isPaneOpen = _useState4[0],
|
|
26
|
+
setIsPaneOpen = _useState4[1];
|
|
27
|
+
var _useState5 = useState({}),
|
|
28
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
29
|
+
customDomain = _useState6[0],
|
|
30
|
+
setCustomDomain = _useState6[1];
|
|
31
|
+
var _useState7 = useState(false),
|
|
32
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
33
|
+
isAlertOpen = _useState8[0],
|
|
34
|
+
setIsAlertOpen = _useState8[1];
|
|
35
|
+
var _useTranslation = useTranslation(),
|
|
36
|
+
t = _useTranslation.t;
|
|
37
|
+
var debouncedSearchTerm = useDebounce(searchTerm, 500);
|
|
38
|
+
var _useFetchCustomDomain = useFetchCustomDomains({
|
|
39
|
+
url: url,
|
|
40
|
+
params: {
|
|
41
|
+
search: debouncedSearchTerm
|
|
42
|
+
}
|
|
43
|
+
}),
|
|
44
|
+
data = _useFetchCustomDomain.data,
|
|
45
|
+
isLoading = _useFetchCustomDomain.isLoading;
|
|
46
|
+
var _useDeleteCustomDomai = useDeleteCustomDomain(url, {
|
|
47
|
+
onSettled: function onSettled() {
|
|
48
|
+
setIsAlertOpen(false);
|
|
49
|
+
setCustomDomain({});
|
|
50
|
+
}
|
|
51
|
+
}),
|
|
52
|
+
deleteCustomDomain = _useDeleteCustomDomai.mutate,
|
|
53
|
+
isDeleting = _useDeleteCustomDomai.isLoading;
|
|
54
|
+
var enableManagePane = function enableManagePane(customDomain) {
|
|
55
|
+
setCustomDomain(customDomain);
|
|
56
|
+
setIsPaneOpen(true);
|
|
57
|
+
};
|
|
58
|
+
var enableDeleteAlert = function enableDeleteAlert(customDomain) {
|
|
59
|
+
setCustomDomain(customDomain);
|
|
60
|
+
setIsAlertOpen(true);
|
|
61
|
+
};
|
|
62
|
+
var disableManagePane = function disableManagePane() {
|
|
63
|
+
setIsPaneOpen(false);
|
|
64
|
+
setCustomDomain({});
|
|
65
|
+
};
|
|
66
|
+
var disableDeleteAlert = function disableDeleteAlert() {
|
|
67
|
+
setIsAlertOpen(false);
|
|
68
|
+
setCustomDomain({});
|
|
69
|
+
};
|
|
70
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Container, null, /*#__PURE__*/React.createElement(Header, {
|
|
71
|
+
headerProps: headerProps,
|
|
72
|
+
searchTerm: searchTerm,
|
|
73
|
+
setIsPaneOpen: setIsPaneOpen,
|
|
74
|
+
setSearchTerm: setSearchTerm
|
|
75
|
+
}), isLoading && /*#__PURE__*/React.createElement("div", {
|
|
76
|
+
className: "h-screen w-full"
|
|
77
|
+
}, /*#__PURE__*/React.createElement(PageLoader, null)), !isLoading && (isNotEmpty(data === null || data === void 0 ? void 0 : data.customDomains) ? /*#__PURE__*/React.createElement("div", {
|
|
78
|
+
className: "w-full flex-grow"
|
|
79
|
+
}, /*#__PURE__*/React.createElement(SubHeader, {
|
|
80
|
+
leftActionBlock: /*#__PURE__*/React.createElement(Typography, {
|
|
81
|
+
className: "neeto-ui-gray-800 font-semibold",
|
|
82
|
+
component: "h4"
|
|
83
|
+
}, t("neetoMolecules.customDomain.customDomainWithCount", {
|
|
84
|
+
count: data === null || data === void 0 ? void 0 : (_data$customDomains = data.customDomains) === null || _data$customDomains === void 0 ? void 0 : _data$customDomains.length
|
|
85
|
+
}))
|
|
86
|
+
}), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Table, {
|
|
87
|
+
allowRowClick: false,
|
|
88
|
+
rowData: data === null || data === void 0 ? void 0 : data.customDomains,
|
|
89
|
+
rowSelection: false,
|
|
90
|
+
columnData: renderColumnData(enableManagePane, enableDeleteAlert)
|
|
91
|
+
}))) : /*#__PURE__*/React.createElement("div", {
|
|
92
|
+
className: "flex h-full w-full flex-grow items-center justify-center"
|
|
93
|
+
}, /*#__PURE__*/React.createElement(NoData, {
|
|
94
|
+
title: t("neetoMolecules.customDomain.notFound"),
|
|
95
|
+
primaryButtonProps: {
|
|
96
|
+
label: t("neetoMolecules.customDomain.addNew"),
|
|
97
|
+
onClick: function onClick() {
|
|
98
|
+
return setIsPaneOpen(true);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
})))), /*#__PURE__*/React.createElement(ManageDomain, {
|
|
102
|
+
customDomain: customDomain,
|
|
103
|
+
hasOne: false,
|
|
104
|
+
isOpen: isPaneOpen,
|
|
105
|
+
setCustomDomain: setCustomDomain,
|
|
106
|
+
url: url,
|
|
107
|
+
onClose: disableManagePane
|
|
108
|
+
}), /*#__PURE__*/React.createElement(DeleteAlert, {
|
|
109
|
+
hostname: customDomain === null || customDomain === void 0 ? void 0 : customDomain.hostname,
|
|
110
|
+
isOpen: isAlertOpen,
|
|
111
|
+
isSubmitting: isDeleting,
|
|
112
|
+
onClose: disableDeleteAlert,
|
|
113
|
+
onSubmit: function onSubmit() {
|
|
114
|
+
return deleteCustomDomain(customDomain === null || customDomain === void 0 ? void 0 : customDomain.id);
|
|
115
|
+
}
|
|
116
|
+
}));
|
|
117
|
+
};
|
|
118
|
+
export default CustomDomainDashboard;
|