@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,71 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
+
import { useMutation, useQuery, useQueryClient } from "react-query";
|
|
5
|
+
import customDomainApi from "./api";
|
|
6
|
+
import { DEFAULT_STALE_TIME, DOMAIN_QUERY_KEY } from "./constants";
|
|
7
|
+
var useCreateCustomDomain = function useCreateCustomDomain(url) {
|
|
8
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
9
|
+
var queryClient = useQueryClient();
|
|
10
|
+
return useMutation(function (payload) {
|
|
11
|
+
return customDomainApi.createCustomDomain(url, payload);
|
|
12
|
+
}, _objectSpread(_objectSpread({}, options), {}, {
|
|
13
|
+
onSuccess: function onSuccess() {
|
|
14
|
+
return queryClient.invalidateQueries(DOMAIN_QUERY_KEY);
|
|
15
|
+
}
|
|
16
|
+
}));
|
|
17
|
+
};
|
|
18
|
+
var useDeleteCustomDomain = function useDeleteCustomDomain(url) {
|
|
19
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
20
|
+
var queryClient = useQueryClient();
|
|
21
|
+
return useMutation(function (id) {
|
|
22
|
+
return customDomainApi.deleteCustomDomain(url, id);
|
|
23
|
+
}, _objectSpread(_objectSpread({}, options), {}, {
|
|
24
|
+
onSuccess: function onSuccess(result) {
|
|
25
|
+
var _options$onSuccess;
|
|
26
|
+
(_options$onSuccess = options.onSuccess) === null || _options$onSuccess === void 0 ? void 0 : _options$onSuccess.call(options, result);
|
|
27
|
+
queryClient.invalidateQueries(DOMAIN_QUERY_KEY);
|
|
28
|
+
}
|
|
29
|
+
}));
|
|
30
|
+
};
|
|
31
|
+
var useFetchCustomDomains = function useFetchCustomDomains(params) {
|
|
32
|
+
return useQuery([DOMAIN_QUERY_KEY, _objectSpread({}, params)], function () {
|
|
33
|
+
return customDomainApi.fetchCustomDomains(params);
|
|
34
|
+
}, {
|
|
35
|
+
staleTime: DEFAULT_STALE_TIME
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
var useValidateDomain = function useValidateDomain(url) {
|
|
39
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
40
|
+
var queryClient = useQueryClient();
|
|
41
|
+
return useMutation(function (id) {
|
|
42
|
+
return customDomainApi.validateDomain(url, id);
|
|
43
|
+
}, _objectSpread(_objectSpread({}, options), {}, {
|
|
44
|
+
onSuccess: function onSuccess() {
|
|
45
|
+
return queryClient.invalidateQueries(DOMAIN_QUERY_KEY);
|
|
46
|
+
}
|
|
47
|
+
}));
|
|
48
|
+
};
|
|
49
|
+
var useValidateCname = function useValidateCname(url) {
|
|
50
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
51
|
+
var queryClient = useQueryClient();
|
|
52
|
+
return useMutation(function (id) {
|
|
53
|
+
return customDomainApi.validateCname(url, id);
|
|
54
|
+
}, _objectSpread(_objectSpread({}, options), {}, {
|
|
55
|
+
onSuccess: function onSuccess() {
|
|
56
|
+
return queryClient.invalidateQueries(DOMAIN_QUERY_KEY);
|
|
57
|
+
}
|
|
58
|
+
}));
|
|
59
|
+
};
|
|
60
|
+
var useUpdateCustomDomain = function useUpdateCustomDomain(url) {
|
|
61
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
62
|
+
var queryClient = useQueryClient();
|
|
63
|
+
return useMutation(function (id) {
|
|
64
|
+
return customDomainApi.updateCustomDomain(url, id);
|
|
65
|
+
}, _objectSpread(_objectSpread({}, options), {}, {
|
|
66
|
+
onSuccess: function onSuccess() {
|
|
67
|
+
return queryClient.invalidateQueries(DOMAIN_QUERY_KEY);
|
|
68
|
+
}
|
|
69
|
+
}));
|
|
70
|
+
};
|
|
71
|
+
export { useCreateCustomDomain, useDeleteCustomDomain, useValidateDomain, useFetchCustomDomains, useValidateCname, useUpdateCustomDomain };
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { t } from "i18next";
|
|
3
|
+
import { SINGULAR } from "@bigbinary/neeto-commons-frontend/constants";
|
|
4
|
+
import { Typography } from "@bigbinary/neetoui";
|
|
5
|
+
import MoreDropdown from "../MoreDropdown";
|
|
6
|
+
import TagBlock from "./Manage/TagBlock";
|
|
7
|
+
export var renderColumnData = function renderColumnData(enableManagePane, enableDeleteAlert) {
|
|
8
|
+
return [{
|
|
9
|
+
title: t("neetoMolecules.customDomain.customDomain", SINGULAR),
|
|
10
|
+
dataIndex: "hostname",
|
|
11
|
+
key: "hostname",
|
|
12
|
+
width: "60%",
|
|
13
|
+
render: function render(hostName, customDomain) {
|
|
14
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
15
|
+
className: "flex items-center justify-between gap-x-3"
|
|
16
|
+
}, /*#__PURE__*/React.createElement(Typography, {
|
|
17
|
+
style: "body2"
|
|
18
|
+
}, hostName), /*#__PURE__*/React.createElement(MoreDropdown, {
|
|
19
|
+
dropdownButtonProps: {
|
|
20
|
+
"data-testid": "nui-dropdown-icon-".concat(customDomain.id)
|
|
21
|
+
},
|
|
22
|
+
dropdownProps: {
|
|
23
|
+
position: "bottom-end",
|
|
24
|
+
strategy: "fixed",
|
|
25
|
+
autoWidth: true
|
|
26
|
+
},
|
|
27
|
+
menuItems: [{
|
|
28
|
+
label: t("neetoMolecules.common.actions.edit"),
|
|
29
|
+
onClick: function onClick() {
|
|
30
|
+
return enableManagePane(customDomain);
|
|
31
|
+
},
|
|
32
|
+
key: "edit-custom-domain-button"
|
|
33
|
+
}, {
|
|
34
|
+
label: t("neetoMolecules.common.actions.delete"),
|
|
35
|
+
onClick: function onClick() {
|
|
36
|
+
return enableDeleteAlert(customDomain);
|
|
37
|
+
},
|
|
38
|
+
key: "delete-custom-domain"
|
|
39
|
+
}]
|
|
40
|
+
}));
|
|
41
|
+
}
|
|
42
|
+
}, {
|
|
43
|
+
title: t("neetoMolecules.common.status"),
|
|
44
|
+
dataIndex: "status",
|
|
45
|
+
key: "status",
|
|
46
|
+
render: function render(status) {
|
|
47
|
+
return /*#__PURE__*/React.createElement(TagBlock, {
|
|
48
|
+
status: status
|
|
49
|
+
});
|
|
50
|
+
},
|
|
51
|
+
width: "40%"
|
|
52
|
+
}];
|
|
53
|
+
};
|
|
54
|
+
export var recordData = function recordData(customDomain) {
|
|
55
|
+
var status = customDomain.status,
|
|
56
|
+
hostname = customDomain.hostname,
|
|
57
|
+
dnsTarget = customDomain.dnsTarget,
|
|
58
|
+
cnameValidationParams = customDomain.cnameValidationParams;
|
|
59
|
+
var isDomainValidated = status === "active" || status === "pending_cname_validation";
|
|
60
|
+
var recordName = isDomainValidated ? hostname : cnameValidationParams === null || cnameValidationParams === void 0 ? void 0 : cnameValidationParams.name;
|
|
61
|
+
var recordValue = isDomainValidated ? dnsTarget : cnameValidationParams === null || cnameValidationParams === void 0 ? void 0 : cnameValidationParams.value;
|
|
62
|
+
var recordType = isDomainValidated ? t("neetoMolecules.customDomain.cname") : t("neetoMolecules.customDomain.domainValidationCname");
|
|
63
|
+
var recordDescription = isDomainValidated ? t("neetoMolecules.customDomain.validation.desc", {
|
|
64
|
+
record: recordType
|
|
65
|
+
}) : t("neetoMolecules.customDomain.validation.desc", {
|
|
66
|
+
record: recordType,
|
|
67
|
+
proxyMessage: t("neetoMolecules.customDomain.validation.proxyMessage")
|
|
68
|
+
});
|
|
69
|
+
var recordNameLabel = t("neetoMolecules.customDomain.validation.record", {
|
|
70
|
+
record: recordType,
|
|
71
|
+
type: t("neetoMolecules.common.name")
|
|
72
|
+
});
|
|
73
|
+
var recordValueLabel = t("neetoMolecules.customDomain.validation.record", {
|
|
74
|
+
record: recordType,
|
|
75
|
+
type: t("neetoMolecules.common.value")
|
|
76
|
+
});
|
|
77
|
+
return {
|
|
78
|
+
recordName: recordName,
|
|
79
|
+
recordValue: recordValue,
|
|
80
|
+
recordDescription: recordDescription,
|
|
81
|
+
recordNameLabel: recordNameLabel,
|
|
82
|
+
recordValueLabel: recordValueLabel
|
|
83
|
+
};
|
|
84
|
+
};
|
|
@@ -1,25 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
function _extends() {
|
|
9
|
-
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
10
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
11
|
-
var source = arguments[i];
|
|
12
|
-
for (var key in source) {
|
|
13
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
14
|
-
target[key] = source[key];
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
return target;
|
|
19
|
-
};
|
|
20
|
-
return _extends.apply(this, arguments);
|
|
21
|
-
}
|
|
22
|
-
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { capitalize } from "@bigbinary/neeto-commons-frontend/pure";
|
|
4
|
+
import { useTimer } from "@bigbinary/neeto-commons-frontend/react-utils";
|
|
5
|
+
import { timeFormat } from "@bigbinary/neeto-commons-frontend/utils";
|
|
6
|
+
import { Tooltip, Typography } from "@bigbinary/neetoui";
|
|
7
|
+
import { fromPairs, keys } from "ramda";
|
|
23
8
|
var DateFormat = fromPairs(keys(timeFormat).map(function (key) {
|
|
24
9
|
return [capitalize(key), function (_ref) {
|
|
25
10
|
var date = _ref.date,
|
|
@@ -40,6 +25,4 @@ var DateFormat = fromPairs(keys(timeFormat).map(function (key) {
|
|
|
40
25
|
}, tooltipProps), dateDisplay);
|
|
41
26
|
}];
|
|
42
27
|
}));
|
|
43
|
-
|
|
44
|
-
export { DateFormat as default };
|
|
45
|
-
//# sourceMappingURL=DateFormat.js.map
|
|
28
|
+
export default DateFormat;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import dayjs from "dayjs";
|
|
4
|
+
import { globalProps } from "@bigbinary/neeto-commons-frontend/initializers";
|
|
5
|
+
import { Select, DatePicker } from "@bigbinary/neetoui";
|
|
6
|
+
import { prop } from "ramda";
|
|
7
|
+
import { useTranslation } from "react-i18next";
|
|
8
|
+
import { defaultTimePeriodOptions } from "./utils";
|
|
9
|
+
var DateRangeFilter = function DateRangeFilter(_ref) {
|
|
10
|
+
var _timePeriod$value, _timePeriod$value2, _globalProps$user;
|
|
11
|
+
var timePeriodOptions = _ref.timePeriodOptions,
|
|
12
|
+
timePeriod = _ref.timePeriod,
|
|
13
|
+
setTimePeriod = _ref.setTimePeriod;
|
|
14
|
+
var _useTranslation = useTranslation(),
|
|
15
|
+
t = _useTranslation.t;
|
|
16
|
+
var customDurationLabel = t("neetoMolecules.dateRangeFilter.timePeriodOptions.customDuration");
|
|
17
|
+
var isCustom = timePeriod.label === customDurationLabel;
|
|
18
|
+
var startDate = (_timePeriod$value = timePeriod.value) === null || _timePeriod$value === void 0 ? void 0 : _timePeriod$value.startDate;
|
|
19
|
+
var endDate = (_timePeriod$value2 = timePeriod.value) === null || _timePeriod$value2 === void 0 ? void 0 : _timePeriod$value2.endDate;
|
|
20
|
+
var requiredDateFormat = globalProps === null || globalProps === void 0 ? void 0 : (_globalProps$user = globalProps.user) === null || _globalProps$user === void 0 ? void 0 : _globalProps$user.dateFormat;
|
|
21
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
22
|
+
className: "flex",
|
|
23
|
+
"data-testid": "date-range-filter"
|
|
24
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
25
|
+
className: "w-40"
|
|
26
|
+
}, /*#__PURE__*/React.createElement(Select, {
|
|
27
|
+
required: true,
|
|
28
|
+
getOptionValue: prop("label"),
|
|
29
|
+
options: timePeriodOptions || defaultTimePeriodOptions(),
|
|
30
|
+
strategy: "fixed",
|
|
31
|
+
value: timePeriod,
|
|
32
|
+
onChange: function onChange(option) {
|
|
33
|
+
return setTimePeriod(option);
|
|
34
|
+
}
|
|
35
|
+
})), isCustom && /*#__PURE__*/React.createElement("div", {
|
|
36
|
+
className: "w-2/3",
|
|
37
|
+
"data-testid": "date-range-filter-custom-duration-picker"
|
|
38
|
+
}, /*#__PURE__*/React.createElement(DatePicker, {
|
|
39
|
+
autoFocus: true,
|
|
40
|
+
className: "ml-3 w-full",
|
|
41
|
+
dateFormat: requiredDateFormat,
|
|
42
|
+
picker: "date",
|
|
43
|
+
type: "range",
|
|
44
|
+
defaultValue: [startDate ? dayjs(startDate) : null, endDate ? dayjs(endDate) : null],
|
|
45
|
+
onChange: function onChange(_ref2) {
|
|
46
|
+
var _ref3 = _slicedToArray(_ref2, 2),
|
|
47
|
+
startDate = _ref3[0],
|
|
48
|
+
endDate = _ref3[1];
|
|
49
|
+
setTimePeriod({
|
|
50
|
+
label: customDurationLabel,
|
|
51
|
+
value: {
|
|
52
|
+
startDate: startDate,
|
|
53
|
+
endDate: endDate,
|
|
54
|
+
rangeType: "custom"
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
})));
|
|
59
|
+
};
|
|
60
|
+
export default DateRangeFilter;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import dayjs from "dayjs";
|
|
2
|
+
import { t } from "i18next";
|
|
3
|
+
var quarterOfYear = require("dayjs/plugin/quarterOfYear");
|
|
4
|
+
dayjs.extend(quarterOfYear);
|
|
5
|
+
export var defaultTimePeriodOptions = function defaultTimePeriodOptions() {
|
|
6
|
+
var today = dayjs().startOf("day");
|
|
7
|
+
var startOfLastWeek = today.subtract(7, "day").startOf("week");
|
|
8
|
+
var endOfLastWeek = today.subtract(7, "day").endOf("week");
|
|
9
|
+
var lastMonthStart = today.subtract(1, "month").startOf("month");
|
|
10
|
+
var lastMonthEnd = today.subtract(1, "month").endOf("month");
|
|
11
|
+
var thisQuarterStart = dayjs().startOf("quarter");
|
|
12
|
+
var thisQuarterEnd = dayjs().endOf("quarter");
|
|
13
|
+
var lastQuarterStart = dayjs().subtract(1, "quarter").startOf("quarter");
|
|
14
|
+
var lastQuarterEnd = dayjs().subtract(1, "quarter").endOf("quarter");
|
|
15
|
+
var startOfLastYear = dayjs().subtract(1, "year").startOf("year");
|
|
16
|
+
var endOfLastYear = dayjs().subtract(1, "year").endOf("year");
|
|
17
|
+
var startOfYear = dayjs().startOf("year");
|
|
18
|
+
var endOfYear = dayjs().endOf("year");
|
|
19
|
+
var startOf24Hours = dayjs().subtract(24, "hour");
|
|
20
|
+
var now = dayjs();
|
|
21
|
+
var startOfLast7Days = dayjs().subtract(7, "day");
|
|
22
|
+
var startOfWeek = dayjs().startOf("week");
|
|
23
|
+
var startOfLast30Days = dayjs().subtract(30, "day");
|
|
24
|
+
var startOfMonth = today.startOf("month");
|
|
25
|
+
return [{
|
|
26
|
+
label: t("neetoMolecules.dateRangeFilter.timePeriodOptions.allTime"),
|
|
27
|
+
value: {
|
|
28
|
+
startDate: null,
|
|
29
|
+
endDate: null,
|
|
30
|
+
rangeType: "all"
|
|
31
|
+
}
|
|
32
|
+
}, {
|
|
33
|
+
label: t("neetoMolecules.dateRangeFilter.timePeriodOptions.last24Hours"),
|
|
34
|
+
value: {
|
|
35
|
+
startDate: startOf24Hours,
|
|
36
|
+
endDate: now,
|
|
37
|
+
rangeType: "hours"
|
|
38
|
+
}
|
|
39
|
+
}, {
|
|
40
|
+
label: t("neetoMolecules.dateRangeFilter.timePeriodOptions.last7Days"),
|
|
41
|
+
value: {
|
|
42
|
+
startDate: startOfLast7Days,
|
|
43
|
+
endDate: now,
|
|
44
|
+
rangeType: "days"
|
|
45
|
+
}
|
|
46
|
+
}, {
|
|
47
|
+
label: t("neetoMolecules.dateRangeFilter.timePeriodOptions.thisWeek"),
|
|
48
|
+
value: {
|
|
49
|
+
startDate: startOfWeek,
|
|
50
|
+
endDate: now,
|
|
51
|
+
rangeType: "week"
|
|
52
|
+
}
|
|
53
|
+
}, {
|
|
54
|
+
label: t("neetoMolecules.dateRangeFilter.timePeriodOptions.lastWeek"),
|
|
55
|
+
value: {
|
|
56
|
+
startDate: startOfLastWeek,
|
|
57
|
+
endDate: endOfLastWeek,
|
|
58
|
+
rangeType: "week"
|
|
59
|
+
}
|
|
60
|
+
}, {
|
|
61
|
+
label: t("neetoMolecules.dateRangeFilter.timePeriodOptions.last30Days"),
|
|
62
|
+
value: {
|
|
63
|
+
startDate: startOfLast30Days,
|
|
64
|
+
endDate: now,
|
|
65
|
+
rangeType: "days"
|
|
66
|
+
}
|
|
67
|
+
}, {
|
|
68
|
+
label: t("neetoMolecules.dateRangeFilter.timePeriodOptions.thisMonth"),
|
|
69
|
+
value: {
|
|
70
|
+
startDate: startOfMonth,
|
|
71
|
+
endDate: now,
|
|
72
|
+
rangeType: "month"
|
|
73
|
+
}
|
|
74
|
+
}, {
|
|
75
|
+
label: t("neetoMolecules.dateRangeFilter.timePeriodOptions.lastMonth"),
|
|
76
|
+
value: {
|
|
77
|
+
startDate: lastMonthStart,
|
|
78
|
+
endDate: lastMonthEnd,
|
|
79
|
+
rangeType: "month"
|
|
80
|
+
}
|
|
81
|
+
}, {
|
|
82
|
+
label: t("neetoMolecules.dateRangeFilter.timePeriodOptions.thisQuarter"),
|
|
83
|
+
value: {
|
|
84
|
+
startDate: thisQuarterStart,
|
|
85
|
+
endDate: thisQuarterEnd,
|
|
86
|
+
rangeType: "quarter"
|
|
87
|
+
}
|
|
88
|
+
}, {
|
|
89
|
+
label: t("neetoMolecules.dateRangeFilter.timePeriodOptions.lastQuarter"),
|
|
90
|
+
value: {
|
|
91
|
+
startDate: lastQuarterStart,
|
|
92
|
+
endDate: lastQuarterEnd,
|
|
93
|
+
rangeType: "quarter"
|
|
94
|
+
}
|
|
95
|
+
}, {
|
|
96
|
+
label: t("neetoMolecules.dateRangeFilter.timePeriodOptions.thisYear"),
|
|
97
|
+
value: {
|
|
98
|
+
startDate: startOfYear,
|
|
99
|
+
endDate: endOfYear,
|
|
100
|
+
rangeType: "year"
|
|
101
|
+
}
|
|
102
|
+
}, {
|
|
103
|
+
label: t("neetoMolecules.dateRangeFilter.timePeriodOptions.lastYear"),
|
|
104
|
+
value: {
|
|
105
|
+
startDate: startOfLastYear,
|
|
106
|
+
endDate: endOfLastYear,
|
|
107
|
+
rangeType: "year"
|
|
108
|
+
}
|
|
109
|
+
}, {
|
|
110
|
+
label: t("neetoMolecules.dateRangeFilter.timePeriodOptions.customDuration"),
|
|
111
|
+
value: "custom"
|
|
112
|
+
}];
|
|
113
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
.neeto-molecules-dynamic-variables {
|
|
2
|
+
min-width: 184px;
|
|
3
|
+
max-width: 360px;
|
|
4
|
+
padding: 8px;
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
gap: 6px;
|
|
8
|
+
|
|
9
|
+
&__list {
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-wrap: wrap;
|
|
12
|
+
align-items: center;
|
|
13
|
+
gap: 8px;
|
|
14
|
+
|
|
15
|
+
button {
|
|
16
|
+
border: solid 1px rgb(var(--neeto-ui-gray-300));
|
|
17
|
+
border-radius: var(--neeto-ui-rounded-md);
|
|
18
|
+
color: rgb(var(--neeto-ui-black));
|
|
19
|
+
transition: var(--neeto-ui-transition);
|
|
20
|
+
padding: 6px;
|
|
21
|
+
user-select: none;
|
|
22
|
+
text-align: left;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
button:focus-visible,
|
|
26
|
+
button:focus,
|
|
27
|
+
button:hover {
|
|
28
|
+
color: rgb(var(--neeto-ui-primary-800));
|
|
29
|
+
border-color: rgb(var(--neeto-ui-primary-800));
|
|
30
|
+
outline: none;
|
|
31
|
+
box-shadow: none;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
+
var _excluded = ["onVariableClick", "variables", "buttonProps"];
|
|
5
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
7
|
+
import React, { Fragment } from "react";
|
|
8
|
+
import { noop } from "@bigbinary/neeto-commons-frontend/pure";
|
|
9
|
+
import { joinHyphenCase } from "@bigbinary/neeto-commons-frontend/utils";
|
|
10
|
+
import { Braces } from "@bigbinary/neeto-icons";
|
|
11
|
+
import { Dropdown, Typography } from "@bigbinary/neetoui";
|
|
12
|
+
import { isEmpty } from "ramda";
|
|
13
|
+
import "./dynamic-variables.scss";
|
|
14
|
+
import { parseVariables } from "./utils";
|
|
15
|
+
var Menu = Dropdown.Menu;
|
|
16
|
+
var DynamicVariables = function DynamicVariables(_ref) {
|
|
17
|
+
var _ref$onVariableClick = _ref.onVariableClick,
|
|
18
|
+
onVariableClick = _ref$onVariableClick === void 0 ? noop : _ref$onVariableClick,
|
|
19
|
+
_ref$variables = _ref.variables,
|
|
20
|
+
variables = _ref$variables === void 0 ? [] : _ref$variables,
|
|
21
|
+
buttonProps = _ref.buttonProps,
|
|
22
|
+
dropdownProps = _objectWithoutProperties(_ref, _excluded);
|
|
23
|
+
if (isEmpty(variables)) {
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
var parsedVariables = parseVariables(variables);
|
|
27
|
+
return /*#__PURE__*/React.createElement(Dropdown, _extends({
|
|
28
|
+
buttonStyle: "secondary",
|
|
29
|
+
icon: Braces,
|
|
30
|
+
strategy: "fixed",
|
|
31
|
+
buttonProps: _objectSpread({
|
|
32
|
+
"data-testid": "variables-dropdown",
|
|
33
|
+
"data-cy": "dynamic-variables-button"
|
|
34
|
+
}, buttonProps)
|
|
35
|
+
}, dropdownProps), /*#__PURE__*/React.createElement(Menu, null, /*#__PURE__*/React.createElement("div", {
|
|
36
|
+
className: "neeto-molecules-dynamic-variables",
|
|
37
|
+
"data-testid": "variables-list"
|
|
38
|
+
}, parsedVariables.map(function (_ref2) {
|
|
39
|
+
var label = _ref2.label,
|
|
40
|
+
variables = _ref2.variables;
|
|
41
|
+
return /*#__PURE__*/React.createElement(Fragment, {
|
|
42
|
+
key: label
|
|
43
|
+
}, label && /*#__PURE__*/React.createElement(Typography, {
|
|
44
|
+
style: "h6"
|
|
45
|
+
}, label), /*#__PURE__*/React.createElement("div", {
|
|
46
|
+
className: "neeto-molecules-dynamic-variables__list",
|
|
47
|
+
"data-cy": "dynamic-variables-list"
|
|
48
|
+
}, variables.map(function (item) {
|
|
49
|
+
return /*#__PURE__*/React.createElement("button", {
|
|
50
|
+
key: item.label,
|
|
51
|
+
"data-cy": joinHyphenCase("dynamic-variables-list-item", item.label),
|
|
52
|
+
onClick: function onClick() {
|
|
53
|
+
return onVariableClick(item);
|
|
54
|
+
}
|
|
55
|
+
}, item.label);
|
|
56
|
+
})));
|
|
57
|
+
}))));
|
|
58
|
+
};
|
|
59
|
+
export default DynamicVariables;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { findBy } from "@bigbinary/neeto-commons-frontend/pure";
|
|
2
|
+
import { prop, assoc, isEmpty, uniqBy } from "ramda";
|
|
3
|
+
export var parseVariables = function parseVariables() {
|
|
4
|
+
var variableArr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
5
|
+
var uncategorized = [];
|
|
6
|
+
var groupedVariables = [];
|
|
7
|
+
var categorySet = new Set();
|
|
8
|
+
variableArr.forEach(function (variable) {
|
|
9
|
+
var category = variable.category,
|
|
10
|
+
label = variable.label,
|
|
11
|
+
variables = variable.variables;
|
|
12
|
+
if (category && variables) {
|
|
13
|
+
var parsedVariables = variables.map(assoc("category", category));
|
|
14
|
+
if (!categorySet.has(category)) {
|
|
15
|
+
categorySet.add(category);
|
|
16
|
+
groupedVariables.push({
|
|
17
|
+
label: label,
|
|
18
|
+
variables: parsedVariables
|
|
19
|
+
});
|
|
20
|
+
} else {
|
|
21
|
+
var existingGroup = findBy({
|
|
22
|
+
label: label
|
|
23
|
+
}, groupedVariables);
|
|
24
|
+
existingGroup.variables = uniqBy(prop("key"), existingGroup.variables.concat(parsedVariables));
|
|
25
|
+
}
|
|
26
|
+
} else {
|
|
27
|
+
uncategorized.push(variable);
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
if (!isEmpty(uncategorized)) {
|
|
31
|
+
groupedVariables.push({
|
|
32
|
+
label: !isEmpty(groupedVariables) ? "Others" : null,
|
|
33
|
+
variables: uncategorized
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
return groupedVariables;
|
|
37
|
+
};
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
import React, { useContext } from "react";
|
|
3
|
+
import classnames from "classnames";
|
|
4
|
+
import { Field, useFormikContext } from "formik";
|
|
5
|
+
import { FormikEditor } from "@bigbinary/neeto-editor";
|
|
6
|
+
import { Typography } from "@bigbinary/neetoui";
|
|
7
|
+
import { ActionBlock } from "@bigbinary/neetoui/formik";
|
|
8
|
+
import { Trans, useTranslation } from "react-i18next";
|
|
9
|
+
import { EDITOR_ADDONS } from "./constants";
|
|
10
|
+
import { EmailFormContext } from "./contexts/EmailForm";
|
|
11
|
+
import ReplyToField from "./ReplyToField";
|
|
12
|
+
import SendToField from "./SendToField";
|
|
13
|
+
import SubjectField from "./SubjectField";
|
|
14
|
+
var EmailForm = function EmailForm(_ref) {
|
|
15
|
+
var _ref$messageVariables = _ref.messageVariables,
|
|
16
|
+
messageVariables = _ref$messageVariables === void 0 ? [] : _ref$messageVariables,
|
|
17
|
+
_ref$subjectVariables = _ref.subjectVariables,
|
|
18
|
+
subjectVariables = _ref$subjectVariables === void 0 ? [] : _ref$subjectVariables,
|
|
19
|
+
handleCancel = _ref.handleCancel,
|
|
20
|
+
isLoading = _ref.isLoading,
|
|
21
|
+
_ref$replyToOptions = _ref.replyToOptions,
|
|
22
|
+
replyToOptions = _ref$replyToOptions === void 0 ? [] : _ref$replyToOptions,
|
|
23
|
+
_ref$isUpdating = _ref.isUpdating,
|
|
24
|
+
isUpdating = _ref$isUpdating === void 0 ? false : _ref$isUpdating,
|
|
25
|
+
_ref$showFields = _ref.showFields,
|
|
26
|
+
showFields = _ref$showFields === void 0 ? true : _ref$showFields,
|
|
27
|
+
_ref$className = _ref.className,
|
|
28
|
+
className = _ref$className === void 0 ? "" : _ref$className;
|
|
29
|
+
var _useTranslation = useTranslation(),
|
|
30
|
+
t = _useTranslation.t;
|
|
31
|
+
var _useContext = useContext(EmailFormContext),
|
|
32
|
+
showSendToField = _useContext.showSendToField,
|
|
33
|
+
showReplyToField = _useContext.showReplyToField;
|
|
34
|
+
var _useFormikContext = useFormikContext(),
|
|
35
|
+
setFieldValue = _useFormikContext.setFieldValue,
|
|
36
|
+
dirty = _useFormikContext.dirty;
|
|
37
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
38
|
+
"data-testid": "email-form",
|
|
39
|
+
className: classnames("flex flex-1 flex-col items-start gap-2", _defineProperty({}, className, className))
|
|
40
|
+
}, showFields && /*#__PURE__*/React.createElement("div", {
|
|
41
|
+
className: "flex w-full flex-col items-start justify-start gap-6"
|
|
42
|
+
}, /*#__PURE__*/React.createElement(Field, {
|
|
43
|
+
name: "subject"
|
|
44
|
+
}, function (_ref2) {
|
|
45
|
+
var value = _ref2.field.value,
|
|
46
|
+
error = _ref2.meta.error;
|
|
47
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
48
|
+
className: "w-full"
|
|
49
|
+
}, /*#__PURE__*/React.createElement(SubjectField, {
|
|
50
|
+
error: t(error),
|
|
51
|
+
name: "subject",
|
|
52
|
+
subjectVariables: subjectVariables,
|
|
53
|
+
text: value,
|
|
54
|
+
updateText: function updateText(text) {
|
|
55
|
+
return setFieldValue("subject", text);
|
|
56
|
+
}
|
|
57
|
+
}));
|
|
58
|
+
}), showSendToField && /*#__PURE__*/React.createElement(SendToField, null), showReplyToField && /*#__PURE__*/React.createElement(ReplyToField, {
|
|
59
|
+
replyToOptions: replyToOptions
|
|
60
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
61
|
+
className: "w-full"
|
|
62
|
+
}, /*#__PURE__*/React.createElement(FormikEditor, {
|
|
63
|
+
required: true,
|
|
64
|
+
addons: EDITOR_ADDONS,
|
|
65
|
+
"data-cy": "message-input-field",
|
|
66
|
+
id: "form_message",
|
|
67
|
+
label: t("neetoMolecules.emailForm.labels.message"),
|
|
68
|
+
name: "message",
|
|
69
|
+
variables: messageVariables
|
|
70
|
+
}), /*#__PURE__*/React.createElement(Typography, {
|
|
71
|
+
className: "neeto-ui-text-gray-500 mt-2",
|
|
72
|
+
"data-cy": "message-input-variable-label",
|
|
73
|
+
style: "body3"
|
|
74
|
+
}, /*#__PURE__*/React.createElement(Trans, {
|
|
75
|
+
i18nKey: "neetoMolecules.emailForm.helpText",
|
|
76
|
+
values: {
|
|
77
|
+
type: "message"
|
|
78
|
+
},
|
|
79
|
+
components: {
|
|
80
|
+
span: /*#__PURE__*/React.createElement("span", {
|
|
81
|
+
className: "font-semibold"
|
|
82
|
+
})
|
|
83
|
+
}
|
|
84
|
+
})))), /*#__PURE__*/React.createElement(ActionBlock, {
|
|
85
|
+
className: "mt-6 w-full justify-start",
|
|
86
|
+
cancelButtonProps: {
|
|
87
|
+
disabled: false,
|
|
88
|
+
onClick: handleCancel,
|
|
89
|
+
className: "ml-3"
|
|
90
|
+
},
|
|
91
|
+
submitButtonProps: {
|
|
92
|
+
loading: isLoading,
|
|
93
|
+
disabled: !dirty || isUpdating
|
|
94
|
+
}
|
|
95
|
+
}));
|
|
96
|
+
};
|
|
97
|
+
export default EmailForm;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
+
import React from "react";
|
|
5
|
+
import { noop } from "@bigbinary/neeto-commons-frontend/pure";
|
|
6
|
+
import { Form } from "@bigbinary/neetoui/formik";
|
|
7
|
+
import { INITIAL_FORM_VALUES } from "./constants";
|
|
8
|
+
import { EmailFormContext } from "./contexts/EmailForm";
|
|
9
|
+
import { getValidationSchema } from "./utils";
|
|
10
|
+
var EmailFormProvider = function EmailFormProvider(_ref) {
|
|
11
|
+
var _ref$onSubmit = _ref.onSubmit,
|
|
12
|
+
onSubmit = _ref$onSubmit === void 0 ? noop : _ref$onSubmit,
|
|
13
|
+
_ref$initialValues = _ref.initialValues,
|
|
14
|
+
initialValues = _ref$initialValues === void 0 ? INITIAL_FORM_VALUES : _ref$initialValues,
|
|
15
|
+
children = _ref.children,
|
|
16
|
+
formikProps = _ref.formikProps,
|
|
17
|
+
_ref$validationSchema = _ref.validationSchema,
|
|
18
|
+
customValidations = _ref$validationSchema === void 0 ? {} : _ref$validationSchema,
|
|
19
|
+
_ref$showSendToField = _ref.showSendToField,
|
|
20
|
+
showSendToField = _ref$showSendToField === void 0 ? false : _ref$showSendToField,
|
|
21
|
+
_ref$showReplyToField = _ref.showReplyToField,
|
|
22
|
+
showReplyToField = _ref$showReplyToField === void 0 ? false : _ref$showReplyToField;
|
|
23
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
24
|
+
"data-testid": "email-form-provider"
|
|
25
|
+
}, /*#__PURE__*/React.createElement(EmailFormContext.Provider, {
|
|
26
|
+
value: {
|
|
27
|
+
showSendToField: showSendToField,
|
|
28
|
+
showReplyToField: showReplyToField
|
|
29
|
+
}
|
|
30
|
+
}, /*#__PURE__*/React.createElement(Form, {
|
|
31
|
+
formikProps: _objectSpread({
|
|
32
|
+
enableReinitialize: true,
|
|
33
|
+
validationSchema: getValidationSchema({
|
|
34
|
+
showSendToField: showSendToField,
|
|
35
|
+
showReplyToField: showReplyToField,
|
|
36
|
+
customValidations: customValidations
|
|
37
|
+
}),
|
|
38
|
+
initialValues: _objectSpread(_objectSpread({}, initialValues), {}, {
|
|
39
|
+
replyTo: initialValues.replyTo || globalProps.user.email
|
|
40
|
+
}),
|
|
41
|
+
onSubmit: onSubmit
|
|
42
|
+
}, formikProps)
|
|
43
|
+
}, children)));
|
|
44
|
+
};
|
|
45
|
+
export default EmailFormProvider;
|