@bigbinary/neeto-molecules 1.1.16 → 1.1.18
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.js +658 -0
- package/dist/AutoSaveInput.js.map +1 -0
- package/dist/Breadcrumbs.js +38 -0
- package/dist/Breadcrumbs.js.map +1 -0
- package/dist/BrowserSupport.js +418 -0
- package/dist/BrowserSupport.js.map +1 -0
- package/dist/Builder.js +662 -0
- package/dist/Builder.js.map +1 -0
- package/dist/CalendarView.js +538 -0
- package/dist/CalendarView.js.map +1 -0
- package/dist/Codeblock.js +236 -0
- package/dist/Codeblock.js.map +1 -0
- package/dist/{Columns/index.js → Columns.js} +130 -13
- package/dist/Columns.js.map +1 -0
- package/dist/{ConfirmationModal/index.js → ConfirmationModal.js} +20 -8
- package/dist/ConfirmationModal.js.map +1 -0
- package/dist/Container.js +1211 -0
- package/dist/Container.js.map +1 -0
- package/dist/CopyToClipboardButton.js +209 -0
- package/dist/CopyToClipboardButton.js.map +1 -0
- package/dist/CustomDomain.js +688 -0
- package/dist/CustomDomain.js.map +1 -0
- package/dist/CustomDomainDashboard.js +2283 -0
- package/dist/CustomDomainDashboard.js.map +1 -0
- package/dist/{DateFormat/index.js → DateFormat.js} +25 -8
- package/dist/DateFormat.js.map +1 -0
- package/dist/DateRangeFilter.js +229 -0
- package/dist/DateRangeFilter.js.map +1 -0
- package/dist/DynamicVariables.js +183 -0
- package/dist/DynamicVariables.js.map +1 -0
- package/dist/EmailForm.js +2292 -0
- package/dist/EmailForm.js.map +1 -0
- package/dist/EmailPreview.js +1353 -0
- package/dist/EmailPreview.js.map +1 -0
- package/dist/{ErrorPage/constants.js → ErrorPage.js} +137 -36
- package/dist/ErrorPage.js.map +1 -0
- package/dist/Header.js +122 -0
- package/dist/Header.js.map +1 -0
- package/dist/IconPicker.js +313 -0
- package/dist/IconPicker.js.map +1 -0
- package/dist/ImageWithFallback.js +181 -0
- package/dist/ImageWithFallback.js.map +1 -0
- package/dist/IntegrationCard.js +343 -0
- package/dist/IntegrationCard.js.map +1 -0
- package/dist/IntegrationDisconnectAlert.js +80 -0
- package/dist/IntegrationDisconnectAlert.js.map +1 -0
- package/dist/{IntegrationWalkthroughModal/index.js → IntegrationWalkthroughModal.js} +8 -6
- package/dist/IntegrationWalkthroughModal.js.map +1 -0
- package/dist/IpRestriction.js +857 -0
- package/dist/IpRestriction.js.map +1 -0
- package/dist/KeyboardShortcuts.js +359 -0
- package/dist/KeyboardShortcuts.js.map +1 -0
- package/dist/LoginPage.js +593 -0
- package/dist/LoginPage.js.map +1 -0
- package/dist/MenuBar.js +1461 -0
- package/dist/MenuBar.js.map +1 -0
- package/dist/Metadata.js +206 -0
- package/dist/Metadata.js.map +1 -0
- package/dist/{MoreDropdown/index.js → MoreDropdown.js} +102 -9
- package/dist/MoreDropdown.js.map +1 -0
- package/dist/NavigationHeader.js +690 -0
- package/dist/NavigationHeader.js.map +1 -0
- package/dist/NeetoWidget.js +1333 -0
- package/dist/NeetoWidget.js.map +1 -0
- package/dist/PageLoader.js +134 -0
- package/dist/PageLoader.js.map +1 -0
- package/dist/PhoneNumber.js +365 -0
- package/dist/PhoneNumber.js.map +1 -0
- package/dist/PublishBlock.js +158 -0
- package/dist/PublishBlock.js.map +1 -0
- package/dist/Rename.js +450 -0
- package/dist/Rename.js.map +1 -0
- package/dist/ResponsiveDevicePicker.js +194 -0
- package/dist/ResponsiveDevicePicker.js.map +1 -0
- package/dist/Schedule.js +1046 -0
- package/dist/Schedule.js.map +1 -0
- package/dist/Scrollable.js +122 -0
- package/dist/Scrollable.js.map +1 -0
- package/dist/Search.js +151 -0
- package/dist/Search.js.map +1 -0
- package/dist/Security.js +1835 -0
- package/dist/Security.js.map +1 -0
- package/dist/SendToFields.js +601 -0
- package/dist/SendToFields.js.map +1 -0
- package/dist/Settings.js +435 -0
- package/dist/Settings.js.map +1 -0
- package/dist/ShareViaEmail.js +2277 -0
- package/dist/ShareViaEmail.js.map +1 -0
- package/dist/ShareViaLink.js +628 -0
- package/dist/ShareViaLink.js.map +1 -0
- package/dist/Sidebar.js +972 -0
- package/dist/Sidebar.js.map +1 -0
- package/dist/SubHeader.js +216 -0
- package/dist/SubHeader.js.map +1 -0
- package/dist/{TableWrapper/index.js → TableWrapper.js} +6 -3
- package/dist/TableWrapper.js.map +1 -0
- package/dist/ThemeSidebar.js +1984 -0
- package/dist/ThemeSidebar.js.map +1 -0
- package/dist/TimeFormat.js +47 -0
- package/dist/TimeFormat.js.map +1 -0
- package/dist/TimezoneMismatchModal.js +168 -0
- package/dist/TimezoneMismatchModal.js.map +1 -0
- package/dist/ToggleFeatureCard.js +323 -0
- package/dist/ToggleFeatureCard.js.map +1 -0
- package/package.json +22 -13
- package/dist/AutoSaveInput/autosaveinput.scss +0 -15
- package/dist/AutoSaveInput/constants.js +0 -13
- package/dist/AutoSaveInput/index.js +0 -124
- package/dist/AutoSaveInput/utils.js +0 -10
- package/dist/Breadcrumbs/breadcrumbs.scss +0 -33
- package/dist/Breadcrumbs/index.js +0 -31
- package/dist/BrowserSupport/Callout.js +0 -15
- package/dist/BrowserSupport/ContactUs.js +0 -21
- package/dist/BrowserSupport/DownloadLink.js +0 -17
- package/dist/BrowserSupport/PartialSupportedBrowserVersion.js +0 -17
- package/dist/BrowserSupport/UnknownBrowser.js +0 -13
- package/dist/BrowserSupport/UnsupportedBrowser.js +0 -24
- package/dist/BrowserSupport/UnsupportedBrowserMessage.js +0 -22
- package/dist/BrowserSupport/UnsupportedBrowserVersion.js +0 -27
- package/dist/BrowserSupport/UnsupportedVersionMessage.js +0 -30
- package/dist/BrowserSupport/browsersupport.scss +0 -71
- package/dist/BrowserSupport/constants.js +0 -63
- package/dist/BrowserSupport/index.js +0 -58
- package/dist/BrowserSupport/utils.js +0 -32
- package/dist/Builder/Body.js +0 -9
- package/dist/Builder/ElementsPanel/ElementsList/Element.js +0 -27
- package/dist/Builder/ElementsPanel/ElementsList/Section.js +0 -28
- package/dist/Builder/ElementsPanel/ElementsList/TitleBar.js +0 -28
- package/dist/Builder/ElementsPanel/ElementsList/index.js +0 -63
- package/dist/Builder/ElementsPanel/SelectedElementsList/SelectedElement.js +0 -73
- package/dist/Builder/ElementsPanel/SelectedElementsList/TitleBar.js +0 -50
- package/dist/Builder/ElementsPanel/SelectedElementsList/index.js +0 -91
- package/dist/Builder/ElementsPanel/index.js +0 -70
- package/dist/Builder/PropertiesPanel/EmptyProperty.js +0 -21
- package/dist/Builder/PropertiesPanel/Skeleton.js +0 -24
- package/dist/Builder/PropertiesPanel/index.js +0 -12
- package/dist/Builder/index.js +0 -3
- package/dist/Builder/styles.scss +0 -84
- package/dist/CalendarView/CustomDatePicker.js +0 -87
- package/dist/CalendarView/Header.js +0 -53
- package/dist/CalendarView/constants.js +0 -19
- package/dist/CalendarView/index.js +0 -83
- package/dist/CalendarView/utils.js +0 -50
- package/dist/Codeblock/index.js +0 -30
- package/dist/Columns/utils.js +0 -20
- package/dist/ConfirmationModal/constants.js +0 -3
- package/dist/ConfirmationModal/utils.js +0 -6
- package/dist/Container/container.scss +0 -21
- package/dist/Container/index.js +0 -23
- package/dist/CopyToClipboardButton/constants.js +0 -13
- package/dist/CopyToClipboardButton/copyToClipboard.scss +0 -22
- package/dist/CopyToClipboardButton/index.js +0 -59
- package/dist/CustomDomain/index.js +0 -98
- package/dist/CustomDomainDashboard/DeleteAlert.js +0 -28
- package/dist/CustomDomainDashboard/Header.js +0 -32
- package/dist/CustomDomainDashboard/Manage/Record.js +0 -42
- package/dist/CustomDomainDashboard/Manage/StatusInfo.js +0 -21
- package/dist/CustomDomainDashboard/Manage/TagBlock.js +0 -36
- package/dist/CustomDomainDashboard/Manage/constants.js +0 -4
- package/dist/CustomDomainDashboard/Manage/index.js +0 -125
- package/dist/CustomDomainDashboard/Manage/utils.js +0 -8
- package/dist/CustomDomainDashboard/api.js +0 -35
- package/dist/CustomDomainDashboard/constants.js +0 -2
- package/dist/CustomDomainDashboard/index.js +0 -118
- package/dist/CustomDomainDashboard/useCustomDomainApi.js +0 -71
- package/dist/CustomDomainDashboard/utils.js +0 -84
- package/dist/DateRangeFilter/index.js +0 -60
- package/dist/DateRangeFilter/utils.js +0 -113
- package/dist/DynamicVariables/dynamic-variables.scss +0 -34
- package/dist/DynamicVariables/index.js +0 -59
- package/dist/DynamicVariables/utils.js +0 -37
- package/dist/EmailForm/EmailForm.js +0 -98
- package/dist/EmailForm/EmailFormProvider.js +0 -45
- package/dist/EmailForm/EmailPreview.js +0 -129
- package/dist/EmailForm/ReplyToField.js +0 -55
- package/dist/EmailForm/SendToField.js +0 -28
- package/dist/EmailForm/SubjectField.js +0 -64
- package/dist/EmailForm/constants.js +0 -33
- package/dist/EmailForm/contexts/EmailForm.js +0 -7
- package/dist/EmailForm/index.js +0 -4
- package/dist/EmailForm/utils.js +0 -10
- package/dist/EmailPreview/index.js +0 -2
- package/dist/ErrorPage/index.js +0 -78
- package/dist/Header/Breadcrumbs.js +0 -31
- package/dist/Header/Dropdown.js +0 -12
- package/dist/Header/constants.js +0 -6
- package/dist/Header/header.scss +0 -121
- package/dist/Header/index.js +0 -61
- package/dist/IconPicker/Icon.js +0 -34
- package/dist/IconPicker/NoResults.js +0 -12
- package/dist/IconPicker/constants.js +0 -8
- package/dist/IconPicker/icon-picker.scss +0 -1
- package/dist/IconPicker/index.js +0 -164
- package/dist/ImageWithFallback/ImagePlaceholder.js +0 -16
- package/dist/ImageWithFallback/index.js +0 -31
- package/dist/IntegrationCard/Dropdown.js +0 -45
- package/dist/IntegrationCard/Status.js +0 -25
- package/dist/IntegrationCard/index.js +0 -128
- package/dist/IntegrationDisconnectAlert/index.js +0 -36
- package/dist/IpRestriction/AllowedIpRanges.js +0 -75
- package/dist/IpRestriction/CurrentIp.js +0 -26
- package/dist/IpRestriction/FormRow.js +0 -84
- package/dist/IpRestriction/Row.js +0 -91
- package/dist/IpRestriction/apis/allowed_ip_ranges.js +0 -28
- package/dist/IpRestriction/apis/current_ip.js +0 -11
- package/dist/IpRestriction/apis/ip_restriction.js +0 -16
- package/dist/IpRestriction/constants.js +0 -20
- package/dist/IpRestriction/hooks/reactQuery/useAllowedIpRanges.js +0 -34
- package/dist/IpRestriction/hooks/reactQuery/useCurrentIp.js +0 -10
- package/dist/IpRestriction/hooks/reactQuery/useIpRestrictions.js +0 -18
- package/dist/IpRestriction/index.js +0 -102
- package/dist/IpRestriction/utils.js +0 -85
- package/dist/KeyboardShortcuts/Pane/HotKey.js +0 -44
- package/dist/KeyboardShortcuts/Pane/HotKeyList.js +0 -42
- package/dist/KeyboardShortcuts/Pane/constants.js +0 -25
- package/dist/KeyboardShortcuts/Pane/index.js +0 -61
- package/dist/KeyboardShortcuts/Pane/keyboard-shortcuts.scss +0 -5
- package/dist/KeyboardShortcuts/Pane/utils.js +0 -66
- package/dist/KeyboardShortcuts/hooks/useKeyboardShortcutsPaneState.js +0 -31
- package/dist/KeyboardShortcuts/index.js +0 -9
- package/dist/LoginPage/Form.js +0 -57
- package/dist/LoginPage/constants.js +0 -12
- package/dist/LoginPage/index.js +0 -103
- package/dist/MenuBar/AddNew.js +0 -25
- package/dist/MenuBar/Block.js +0 -60
- package/dist/MenuBar/Item.js +0 -32
- package/dist/MenuBar/Search.js +0 -39
- package/dist/MenuBar/SubTitle.js +0 -23
- package/dist/MenuBar/index.js +0 -46
- package/dist/MenuBar/menubar.scss +0 -154
- package/dist/Metadata/Block.js +0 -30
- package/dist/Metadata/DetailsBlock.js +0 -86
- package/dist/Metadata/constants.js +0 -9
- package/dist/Metadata/index.js +0 -29
- package/dist/Metadata/metadata.scss +0 -15
- package/dist/MoreDropdown/constants.js +0 -25
- package/dist/NavigationHeader/LeftBlock.js +0 -32
- package/dist/NavigationHeader/Navigation.js +0 -24
- package/dist/NavigationHeader/RightBlock.js +0 -68
- package/dist/NavigationHeader/constants.js +0 -11
- package/dist/NavigationHeader/index.js +0 -19
- package/dist/NavigationHeader/navigation-header.scss +0 -3
- package/dist/NeetoWidget/CodeBlock.js +0 -57
- package/dist/NeetoWidget/CodeSnippet.js +0 -119
- package/dist/NeetoWidget/EmbedCode.js +0 -281
- package/dist/NeetoWidget/Main.js +0 -19
- package/dist/NeetoWidget/SelectionSwitches/TooltipSwitch.js +0 -25
- package/dist/NeetoWidget/SelectionSwitches/index.js +0 -44
- package/dist/NeetoWidget/SyntaxHighlighter.js +0 -17
- package/dist/NeetoWidget/api.js +0 -20
- package/dist/NeetoWidget/constants.js +0 -62
- package/dist/NeetoWidget/hooks/useForceUpdate.js +0 -14
- package/dist/NeetoWidget/index.js +0 -7
- package/dist/NeetoWidget/mutations.js +0 -9
- package/dist/NeetoWidget/queries.js +0 -32
- package/dist/NeetoWidget/utils.js +0 -83
- package/dist/PageLoader/index.js +0 -81
- package/dist/PageLoader/page-loader.scss +0 -95
- package/dist/PhoneNumber/CountryPicker/SingleValue.js +0 -21
- package/dist/PhoneNumber/CountryPicker/constants.js +0 -26
- package/dist/PhoneNumber/CountryPicker/index.js +0 -59
- package/dist/PhoneNumber/FormikPhoneNumberInput.js +0 -21
- package/dist/PhoneNumber/PhoneNumber.js +0 -30
- package/dist/PhoneNumber/PhoneNumberInput.js +0 -79
- package/dist/PhoneNumber/index.js +0 -5
- package/dist/PhoneNumber/utils.js +0 -55
- package/dist/PublishBlock/AlertBlock.js +0 -14
- package/dist/PublishBlock/index.js +0 -100
- package/dist/PublishBlock/publish-block.scss +0 -25
- package/dist/Rename/DummySpan.js +0 -21
- package/dist/Rename/constants.js +0 -1
- package/dist/Rename/index.js +0 -191
- package/dist/Rename/rename.scss +0 -69
- package/dist/Rename/utils.js +0 -10
- package/dist/ResponsiveDevicePicker/constants.js +0 -19
- package/dist/ResponsiveDevicePicker/index.js +0 -36
- package/dist/Schedule/DisplayAvailability.js +0 -58
- package/dist/Schedule/Fields.js +0 -43
- package/dist/Schedule/Form/ScheduleRow.js +0 -125
- package/dist/Schedule/Form/constants.js +0 -20
- package/dist/Schedule/Form/index.js +0 -144
- package/dist/Schedule/Form/utils.js +0 -63
- package/dist/Schedule/Header.js +0 -76
- package/dist/Schedule/ScheduleContext.js +0 -8
- package/dist/Schedule/constants.js +0 -8
- package/dist/Schedule/dayjsExtended/constants.js +0 -1
- package/dist/Schedule/dayjsExtended/index.js +0 -14
- package/dist/Schedule/dayjsExtended/range.js +0 -73
- package/dist/Schedule/index.js +0 -80
- package/dist/Schedule/utils.js +0 -152
- package/dist/Scrollable/constants.js +0 -8
- package/dist/Scrollable/index.js +0 -26
- package/dist/Scrollable/scrollable.scss +0 -32
- package/dist/Search/index.js +0 -52
- package/dist/Security/AllowedKeywords/Add.js +0 -38
- package/dist/Security/AllowedKeywords/index.js +0 -38
- package/dist/Security/PasswordBlock.js +0 -31
- package/dist/Security/RadioBlock.js +0 -38
- package/dist/Security/api.js +0 -12
- package/dist/Security/constants.js +0 -58
- package/dist/Security/index.js +0 -68
- package/dist/Security/useSecurityApi.js +0 -22
- package/dist/Security/utils.js +0 -31
- package/dist/SendToFields/FilePicker.js +0 -34
- package/dist/SendToFields/constants.js +0 -6
- package/dist/SendToFields/index.js +0 -102
- package/dist/SendToFields/utils.js +0 -54
- package/dist/Settings/Category.js +0 -30
- package/dist/Settings/Item.js +0 -38
- package/dist/Settings/index.js +0 -37
- package/dist/Settings/utils.js +0 -4
- package/dist/ShareViaEmail/EmailBodyEditor.js +0 -22
- package/dist/ShareViaEmail/FilePicker.js +0 -43
- package/dist/ShareViaEmail/Form.js +0 -105
- package/dist/ShareViaEmail/FormikDatePicker.js +0 -24
- package/dist/ShareViaEmail/constants.js +0 -14
- package/dist/ShareViaEmail/index.js +0 -92
- package/dist/ShareViaEmail/utils.js +0 -72
- package/dist/ShareViaLink/EditURL.js +0 -74
- package/dist/ShareViaLink/Link.js +0 -105
- package/dist/ShareViaLink/QRCode.js +0 -41
- package/dist/ShareViaLink/RegenerateURL.js +0 -47
- package/dist/ShareViaLink/SocialMedia.js +0 -52
- package/dist/ShareViaLink/constants.js +0 -25
- package/dist/ShareViaLink/edit-url.scss +0 -8
- package/dist/ShareViaLink/index.js +0 -46
- package/dist/ShareViaLink/utils.js +0 -47
- package/dist/Sidebar/AppSwitcher/AppLink.js +0 -45
- package/dist/Sidebar/AppSwitcher/Backdrop.js +0 -13
- package/dist/Sidebar/AppSwitcher/Body.js +0 -65
- package/dist/Sidebar/AppSwitcher/Portal.js +0 -27
- package/dist/Sidebar/AppSwitcher/appswitcher.scss +0 -164
- package/dist/Sidebar/AppSwitcher/index.js +0 -47
- package/dist/Sidebar/AppSwitcher/utils.js +0 -25
- package/dist/Sidebar/Chevron.js +0 -14
- package/dist/Sidebar/FeaturedTooltip.js +0 -19
- package/dist/Sidebar/Footer/AppSwitcherButton.js +0 -48
- package/dist/Sidebar/Footer/ProfileButton.js +0 -30
- package/dist/Sidebar/Footer/index.js +0 -56
- package/dist/Sidebar/Footer/utils.js +0 -39
- package/dist/Sidebar/Header.js +0 -33
- package/dist/Sidebar/HelpSection/HelpSectionMenu.js +0 -52
- package/dist/Sidebar/HelpSection/index.js +0 -32
- package/dist/Sidebar/Links.js +0 -112
- package/dist/Sidebar/NavIconWrapper.js +0 -20
- package/dist/Sidebar/ProfileSection/LinkSection.js +0 -36
- package/dist/Sidebar/ProfileSection/ProfileMenu.js +0 -48
- package/dist/Sidebar/ProfileSection/index.js +0 -42
- package/dist/Sidebar/constants.js +0 -40
- package/dist/Sidebar/index.js +0 -94
- package/dist/Sidebar/sidebar.scss +0 -379
- package/dist/Sidebar/utils.js +0 -18
- package/dist/SubHeader/RightBlock/Columns.js +0 -35
- package/dist/SubHeader/RightBlock/Download.js +0 -28
- package/dist/SubHeader/RightBlock/Filter.js +0 -31
- package/dist/SubHeader/RightBlock/index.js +0 -21
- package/dist/SubHeader/RightBlock/utils.js +0 -13
- package/dist/SubHeader/index.js +0 -28
- package/dist/SubHeader/subheader.scss +0 -78
- package/dist/ThemeSidebar/Customize/Logo.js +0 -39
- package/dist/ThemeSidebar/Customize/Properties.js +0 -170
- package/dist/ThemeSidebar/Customize/index.js +0 -66
- package/dist/ThemeSidebar/Themes/ThemeCard.js +0 -135
- package/dist/ThemeSidebar/Themes/index.js +0 -110
- package/dist/ThemeSidebar/TitleBar.js +0 -62
- package/dist/ThemeSidebar/constants.js +0 -127
- package/dist/ThemeSidebar/fields/AlignmentBlock.js +0 -50
- package/dist/ThemeSidebar/fields/Card.js +0 -19
- package/dist/ThemeSidebar/fields/ColorBlock.js +0 -19
- package/dist/ThemeSidebar/fields/FontPickerBlock.js +0 -35
- package/dist/ThemeSidebar/fields/ImageBlock/ImageUploader.js +0 -67
- package/dist/ThemeSidebar/fields/ImageBlock/ProgressBar.js +0 -22
- package/dist/ThemeSidebar/fields/ImageBlock/index.js +0 -55
- package/dist/ThemeSidebar/fields/SelectBlock.js +0 -24
- package/dist/ThemeSidebar/fields/SliderBlock.js +0 -30
- package/dist/ThemeSidebar/fields/SwitchBlock.js +0 -17
- package/dist/ThemeSidebar/fields/TextBlock.js +0 -13
- package/dist/ThemeSidebar/fields/slider.scss +0 -199
- package/dist/ThemeSidebar/hooks/useDirectUploadDropzone.js +0 -149
- package/dist/ThemeSidebar/index.js +0 -118
- package/dist/ThemeSidebar/themeSidebar.scss +0 -45
- package/dist/ThemeSidebar/utils.js +0 -169
- package/dist/TimeFormat/index.js +0 -3
- package/dist/TimezoneMismatchModal/apis/time_zone.js +0 -9
- package/dist/TimezoneMismatchModal/index.js +0 -83
- package/dist/TimezoneMismatchModal/useTimeZoneApi.js +0 -10
- package/dist/TimezoneMismatchModal/utils.js +0 -12
- package/dist/ToggleFeatureCard/ToolTipSwitch.js +0 -31
- package/dist/ToggleFeatureCard/constants.js +0 -5
- package/dist/ToggleFeatureCard/hooks/useScrollIntoView.js +0 -11
- package/dist/ToggleFeatureCard/index.js +0 -148
- package/dist/ToggleFeatureCard/toggleFeatureCard.scss +0 -4
|
@@ -1,84 +0,0 @@
|
|
|
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,60 +0,0 @@
|
|
|
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;
|
|
@@ -1,113 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,34 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
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;
|
|
@@ -1,37 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,98 +0,0 @@
|
|
|
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
|
-
required: true,
|
|
54
|
-
text: value,
|
|
55
|
-
updateText: function updateText(text) {
|
|
56
|
-
return setFieldValue("subject", text);
|
|
57
|
-
}
|
|
58
|
-
}));
|
|
59
|
-
}), showSendToField && /*#__PURE__*/React.createElement(SendToField, null), showReplyToField && /*#__PURE__*/React.createElement(ReplyToField, {
|
|
60
|
-
replyToOptions: replyToOptions
|
|
61
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
62
|
-
className: "w-full"
|
|
63
|
-
}, /*#__PURE__*/React.createElement(FormikEditor, {
|
|
64
|
-
required: true,
|
|
65
|
-
addons: EDITOR_ADDONS,
|
|
66
|
-
"data-cy": "message-input-field",
|
|
67
|
-
id: "form_message",
|
|
68
|
-
label: t("neetoMolecules.emailForm.labels.message"),
|
|
69
|
-
name: "message",
|
|
70
|
-
variables: messageVariables
|
|
71
|
-
}), /*#__PURE__*/React.createElement(Typography, {
|
|
72
|
-
className: "neeto-ui-text-gray-500 mt-2",
|
|
73
|
-
"data-cy": "message-input-variable-label",
|
|
74
|
-
style: "body3"
|
|
75
|
-
}, /*#__PURE__*/React.createElement(Trans, {
|
|
76
|
-
i18nKey: "neetoMolecules.emailForm.helpText",
|
|
77
|
-
values: {
|
|
78
|
-
type: "message"
|
|
79
|
-
},
|
|
80
|
-
components: {
|
|
81
|
-
span: /*#__PURE__*/React.createElement("span", {
|
|
82
|
-
className: "font-semibold"
|
|
83
|
-
})
|
|
84
|
-
}
|
|
85
|
-
})))), /*#__PURE__*/React.createElement(ActionBlock, {
|
|
86
|
-
className: "mt-6 w-full justify-start",
|
|
87
|
-
cancelButtonProps: {
|
|
88
|
-
disabled: false,
|
|
89
|
-
onClick: handleCancel,
|
|
90
|
-
className: "ml-3"
|
|
91
|
-
},
|
|
92
|
-
submitButtonProps: {
|
|
93
|
-
loading: isLoading,
|
|
94
|
-
disabled: !dirty || isUpdating
|
|
95
|
-
}
|
|
96
|
-
}));
|
|
97
|
-
};
|
|
98
|
-
export default EmailForm;
|
|
@@ -1,45 +0,0 @@
|
|
|
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;
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import classnames from "classnames";
|
|
4
|
-
import { isNotEmpty, isPresent } from "@bigbinary/neeto-commons-frontend/pure";
|
|
5
|
-
import { withT } from "@bigbinary/neeto-commons-frontend/react-utils";
|
|
6
|
-
import { EditorContent } from "@bigbinary/neeto-editor";
|
|
7
|
-
import { Typography, Button } from "@bigbinary/neetoui";
|
|
8
|
-
import PropTypes from "prop-types";
|
|
9
|
-
var MemoizedEditorContent = /*#__PURE__*/React.memo(EditorContent);
|
|
10
|
-
var EmailPreview = withT(function (_ref) {
|
|
11
|
-
var t = _ref.t,
|
|
12
|
-
_ref$to = _ref.to,
|
|
13
|
-
to = _ref$to === void 0 ? [] : _ref$to,
|
|
14
|
-
from = _ref.from,
|
|
15
|
-
subject = _ref.subject,
|
|
16
|
-
body = _ref.body,
|
|
17
|
-
productName = _ref.productName,
|
|
18
|
-
actionButtonText = _ref.actionButtonText,
|
|
19
|
-
logo = _ref.logo,
|
|
20
|
-
_ref$className = _ref.className,
|
|
21
|
-
className = _ref$className === void 0 ? "" : _ref$className;
|
|
22
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
23
|
-
"data-cy": "email-preview-card",
|
|
24
|
-
"data-testid": "email-preview",
|
|
25
|
-
className: classnames("neeto-ui-border-gray-300 neeto-ui-shadow-m neeto-ui-bg-white flex flex-1 flex-col border", _defineProperty({}, className, className))
|
|
26
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
27
|
-
className: "neeto-ui-border-gray-300 space-y-3 divide-y divide-gray-200 border-b p-6"
|
|
28
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
29
|
-
className: "flex gap-2",
|
|
30
|
-
"data-cy": "email-send-to-preview",
|
|
31
|
-
"data-testid": "email-to-block"
|
|
32
|
-
}, /*#__PURE__*/React.createElement(Typography, {
|
|
33
|
-
className: "neeto-ui-text-gray-500",
|
|
34
|
-
lineHeight: "normal",
|
|
35
|
-
style: "body2"
|
|
36
|
-
}, t("neetoMolecules.emailPreview.to"), ":"), isPresent(to) && isNotEmpty(to) ? /*#__PURE__*/React.createElement(Typography, {
|
|
37
|
-
className: "neeto-ui-text-gray-800 min-w-0 flex-grow break-words",
|
|
38
|
-
lineHeight: "normal",
|
|
39
|
-
style: "body2"
|
|
40
|
-
}, to.join(", ")) : /*#__PURE__*/React.createElement("div", {
|
|
41
|
-
className: "neeto-ui-bg-gray-300 neeto-ui-rounded-full mt-2 h-2 w-40"
|
|
42
|
-
})), from && /*#__PURE__*/React.createElement("div", {
|
|
43
|
-
className: "flex items-center gap-2 pt-3"
|
|
44
|
-
}, /*#__PURE__*/React.createElement(Typography, {
|
|
45
|
-
className: "neeto-ui-text-gray-500",
|
|
46
|
-
lineHeight: "normal",
|
|
47
|
-
style: "body2"
|
|
48
|
-
}, t("neetoMolecules.emailPreview.from"), ":"), /*#__PURE__*/React.createElement(Typography, {
|
|
49
|
-
className: "neeto-ui-text-gray-800 min-w-0 flex-grow break-words",
|
|
50
|
-
"data-cy": "email-send-from-preview",
|
|
51
|
-
lineHeight: "normal",
|
|
52
|
-
style: "body2"
|
|
53
|
-
}, from)), /*#__PURE__*/React.createElement("div", {
|
|
54
|
-
className: "flex items-center gap-2 pt-3"
|
|
55
|
-
}, /*#__PURE__*/React.createElement(Typography, {
|
|
56
|
-
className: "neeto-ui-text-gray-500",
|
|
57
|
-
lineHeight: "normal",
|
|
58
|
-
style: "body2"
|
|
59
|
-
}, t("neetoMolecules.emailPreview.subject"), ":"), /*#__PURE__*/React.createElement(Typography, {
|
|
60
|
-
className: "neeto-ui-text-gray-800 min-w-0 flex-grow break-words",
|
|
61
|
-
"data-cy": "email-subject-preview",
|
|
62
|
-
lineHeight: "normal",
|
|
63
|
-
style: "body2"
|
|
64
|
-
}, subject || /*#__PURE__*/React.createElement("span", {
|
|
65
|
-
className: "neeto-ui-bg-gray-300 neeto-ui-rounded-full h-2 w-40"
|
|
66
|
-
})))), /*#__PURE__*/React.createElement("div", {
|
|
67
|
-
className: "neeto-ui-text-gray-800 flex flex-1 flex-col justify-between space-y-6 p-6 pr-10 text-base leading-relaxed",
|
|
68
|
-
"data-cy": "email-body-preview-container"
|
|
69
|
-
}, body ? /*#__PURE__*/React.createElement(MemoizedEditorContent, {
|
|
70
|
-
content: body
|
|
71
|
-
}) : /*#__PURE__*/React.createElement("div", {
|
|
72
|
-
className: "space-y-4"
|
|
73
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
74
|
-
className: "neeto-ui-bg-gray-300 neeto-ui-rounded-full h-2 w-80"
|
|
75
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
76
|
-
className: "neeto-ui-bg-gray-300 neeto-ui-rounded-full h-2 w-72"
|
|
77
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
78
|
-
className: "neeto-ui-bg-gray-300 neeto-ui-rounded-full h-2 w-80"
|
|
79
|
-
})), actionButtonText && /*#__PURE__*/React.createElement("div", {
|
|
80
|
-
className: "mt-6 flex w-full items-center justify-center"
|
|
81
|
-
}, /*#__PURE__*/React.createElement(Button, {
|
|
82
|
-
className: "pointer-events-none",
|
|
83
|
-
label: actionButtonText
|
|
84
|
-
})), logo && /*#__PURE__*/React.createElement("img", {
|
|
85
|
-
alt: t("neetoMolecules.emailPreview.logoAltText"),
|
|
86
|
-
className: "h-20 w-36 object-cover",
|
|
87
|
-
"data-cy": "company-logo-preview",
|
|
88
|
-
src: logo
|
|
89
|
-
})), productName && /*#__PURE__*/React.createElement("div", {
|
|
90
|
-
className: "neeto-ui-bg-gray-100 mt-auto p-2",
|
|
91
|
-
"data-testid": "product-name-block"
|
|
92
|
-
}, /*#__PURE__*/React.createElement(Typography, {
|
|
93
|
-
className: "neeto-ui-text-gray-600 text-center leading-6",
|
|
94
|
-
style: "body3"
|
|
95
|
-
}, t("neetoMolecules.emailPreview.poweredBy"), /*#__PURE__*/React.createElement("span", {
|
|
96
|
-
className: "neeto-ui-text-gray-800 font-medium"
|
|
97
|
-
}, productName))));
|
|
98
|
-
});
|
|
99
|
-
EmailPreview.propTypes = {
|
|
100
|
-
/**
|
|
101
|
-
* The value of the send-to field.
|
|
102
|
-
*/
|
|
103
|
-
to: PropTypes.arrayOf(PropTypes.string),
|
|
104
|
-
/**
|
|
105
|
-
* The value of the send-from field.
|
|
106
|
-
*/
|
|
107
|
-
from: PropTypes.string,
|
|
108
|
-
/**
|
|
109
|
-
* The subject of the email.
|
|
110
|
-
*/
|
|
111
|
-
subject: PropTypes.string,
|
|
112
|
-
/**
|
|
113
|
-
* The body of the email.
|
|
114
|
-
*/
|
|
115
|
-
body: PropTypes.string,
|
|
116
|
-
/**
|
|
117
|
-
* The name of the neeto product to be previewed.
|
|
118
|
-
*/
|
|
119
|
-
productName: PropTypes.string,
|
|
120
|
-
/**
|
|
121
|
-
* The text to be shown in the action button.
|
|
122
|
-
*/
|
|
123
|
-
actionButtonText: PropTypes.string,
|
|
124
|
-
/**
|
|
125
|
-
* Source link for the company logo.
|
|
126
|
-
*/
|
|
127
|
-
logo: PropTypes.string
|
|
128
|
-
};
|
|
129
|
-
export default EmailPreview;
|