@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,100 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["t"],
|
|
4
|
-
_excluded2 = ["t"],
|
|
5
|
-
_excluded3 = ["t"],
|
|
6
|
-
_excluded4 = ["t"];
|
|
7
|
-
import React from "react";
|
|
8
|
-
import classnames from "classnames";
|
|
9
|
-
import { withT } from "@bigbinary/neeto-commons-frontend/react-utils";
|
|
10
|
-
import { ExternalLink, Undo } from "@bigbinary/neeto-icons";
|
|
11
|
-
import { Button, Typography } from "@bigbinary/neetoui";
|
|
12
|
-
import { useTranslation } from "react-i18next";
|
|
13
|
-
import AlertBlock from "./AlertBlock";
|
|
14
|
-
import "./publish-block.scss";
|
|
15
|
-
var ViewDraftButton = withT(function (_ref) {
|
|
16
|
-
var t = _ref.t,
|
|
17
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
18
|
-
return /*#__PURE__*/React.createElement(Button, _extends({
|
|
19
|
-
"data-cy": "view-draft-button",
|
|
20
|
-
"data-testid": "view-draft-button",
|
|
21
|
-
icon: ExternalLink,
|
|
22
|
-
style: "secondary",
|
|
23
|
-
target: "_blank",
|
|
24
|
-
tooltipProps: {
|
|
25
|
-
content: t("neetoMolecules.publishBlock.viewDraftVersion"),
|
|
26
|
-
position: "top"
|
|
27
|
-
}
|
|
28
|
-
}, props));
|
|
29
|
-
});
|
|
30
|
-
var ResetDraftButton = withT(function (_ref2) {
|
|
31
|
-
var t = _ref2.t,
|
|
32
|
-
props = _objectWithoutProperties(_ref2, _excluded2);
|
|
33
|
-
return /*#__PURE__*/React.createElement(Button, _extends({
|
|
34
|
-
"data-cy": "draft-button",
|
|
35
|
-
"data-testid": "draft-button",
|
|
36
|
-
icon: Undo,
|
|
37
|
-
style: "secondary",
|
|
38
|
-
tooltipProps: {
|
|
39
|
-
content: t("neetoMolecules.publishBlock.deleteDraftVersion"),
|
|
40
|
-
position: "top"
|
|
41
|
-
}
|
|
42
|
-
}, props));
|
|
43
|
-
});
|
|
44
|
-
var PublishButton = withT(function (_ref3) {
|
|
45
|
-
var t = _ref3.t,
|
|
46
|
-
props = _objectWithoutProperties(_ref3, _excluded3);
|
|
47
|
-
return /*#__PURE__*/React.createElement(Button, _extends({
|
|
48
|
-
"data-cy": "publish-button",
|
|
49
|
-
"data-testid": "publish-button",
|
|
50
|
-
label: t("neetoMolecules.common.actions.publish")
|
|
51
|
-
}, props));
|
|
52
|
-
});
|
|
53
|
-
var PublishPreviewButton = withT(function (_ref4) {
|
|
54
|
-
var t = _ref4.t,
|
|
55
|
-
props = _objectWithoutProperties(_ref4, _excluded4);
|
|
56
|
-
return /*#__PURE__*/React.createElement(Button, _extends({
|
|
57
|
-
"data-cy": "publish-preview-button",
|
|
58
|
-
"data-testid": "publish-preview-button",
|
|
59
|
-
icon: ExternalLink,
|
|
60
|
-
target: "_blank",
|
|
61
|
-
className: classnames({
|
|
62
|
-
"pointer-events-none": props.disabled
|
|
63
|
-
}, props.className),
|
|
64
|
-
tooltipProps: {
|
|
65
|
-
content: t("neetoMolecules.publishBlock.viewPublishedVersion"),
|
|
66
|
-
position: "top"
|
|
67
|
-
}
|
|
68
|
-
}, props));
|
|
69
|
-
});
|
|
70
|
-
var PublishBlock = function PublishBlock(_ref5) {
|
|
71
|
-
var renderDraftButtons = _ref5.renderDraftButtons,
|
|
72
|
-
renderPublishButtons = _ref5.renderPublishButtons;
|
|
73
|
-
var _useTranslation = useTranslation(),
|
|
74
|
-
t = _useTranslation.t;
|
|
75
|
-
var draftBlockButtons = renderDraftButtons({
|
|
76
|
-
ViewDraftButton: ViewDraftButton,
|
|
77
|
-
ResetDraftButton: ResetDraftButton
|
|
78
|
-
});
|
|
79
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
80
|
-
className: "neeto-molecules-publish-block",
|
|
81
|
-
"data-testid": "neeto-molecules-publish-block"
|
|
82
|
-
}, draftBlockButtons && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
83
|
-
className: "flex items-center gap-2"
|
|
84
|
-
}, /*#__PURE__*/React.createElement(Typography, {
|
|
85
|
-
className: "neeto-ui-text-gray-700",
|
|
86
|
-
lineHeight: "normal",
|
|
87
|
-
style: "body2"
|
|
88
|
-
}, t("neetoMolecules.common.actions.draft")), /*#__PURE__*/React.createElement("div", {
|
|
89
|
-
className: "space-x-1"
|
|
90
|
-
}, draftBlockButtons)), /*#__PURE__*/React.createElement("div", {
|
|
91
|
-
className: "neeto-ui-bg-gray-300 h-full w-px"
|
|
92
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
93
|
-
className: "neeto-molecules-publish-block__action-btn"
|
|
94
|
-
}, renderPublishButtons({
|
|
95
|
-
PublishButton: PublishButton,
|
|
96
|
-
PublishPreviewButton: PublishPreviewButton
|
|
97
|
-
})));
|
|
98
|
-
};
|
|
99
|
-
PublishBlock.Alert = AlertBlock;
|
|
100
|
-
export default PublishBlock;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
.neeto-molecules-publish-block {
|
|
2
|
-
display: flex;
|
|
3
|
-
align-items: center;
|
|
4
|
-
justify-content: flex-end;
|
|
5
|
-
gap: 12px;
|
|
6
|
-
|
|
7
|
-
&__action-btn {
|
|
8
|
-
display: inline-flex;
|
|
9
|
-
flex-direction: row;
|
|
10
|
-
align-items: center;
|
|
11
|
-
justify-content: center;
|
|
12
|
-
gap: 1px;
|
|
13
|
-
|
|
14
|
-
> .neeto-ui-btn {
|
|
15
|
-
&:first-child {
|
|
16
|
-
border-top-right-radius: 0;
|
|
17
|
-
border-bottom-right-radius: 0;
|
|
18
|
-
}
|
|
19
|
-
&:last-child {
|
|
20
|
-
border-top-left-radius: 0;
|
|
21
|
-
border-bottom-left-radius: 0;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
package/dist/Rename/DummySpan.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import React, { useEffect } from "react";
|
|
2
|
-
var DummySpan = function DummySpan(_ref) {
|
|
3
|
-
var name = _ref.name,
|
|
4
|
-
placeholderRef = _ref.placeholderRef,
|
|
5
|
-
setInputWidth = _ref.setInputWidth;
|
|
6
|
-
useEffect(function () {
|
|
7
|
-
var _placeholderRef$curre;
|
|
8
|
-
//To handle the input width on initial render.
|
|
9
|
-
var placeholderSpanWidth = (_placeholderRef$curre = placeholderRef.current) === null || _placeholderRef$curre === void 0 ? void 0 : _placeholderRef$curre.offsetWidth;
|
|
10
|
-
setInputWidth(placeholderSpanWidth);
|
|
11
|
-
}, [name]);
|
|
12
|
-
return (
|
|
13
|
-
/*#__PURE__*/
|
|
14
|
-
// Dummy element to calculate the width to be set for the input. Do not remove.
|
|
15
|
-
React.createElement("div", {
|
|
16
|
-
className: "dummy-span pointer-events-none invisible absolute",
|
|
17
|
-
ref: placeholderRef
|
|
18
|
-
}, name.split(" ").join("."))
|
|
19
|
-
);
|
|
20
|
-
};
|
|
21
|
-
export default DummySpan;
|
package/dist/Rename/constants.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export var MIN_WIDTH = 150;
|
package/dist/Rename/index.js
DELETED
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
-
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
|
-
import React, { useState, useRef, Fragment } from "react";
|
|
5
|
-
import classnames from "classnames";
|
|
6
|
-
import { isNotEmpty, noop } from "@bigbinary/neeto-commons-frontend/pure";
|
|
7
|
-
import { useOnClickOutside, useStateWithDependency, useHotKeys } from "@bigbinary/neeto-commons-frontend/react-utils";
|
|
8
|
-
import { Check, Close } from "@bigbinary/neeto-icons";
|
|
9
|
-
import { Input, Button, Typography } from "@bigbinary/neetoui";
|
|
10
|
-
import { isEmpty } from "ramda";
|
|
11
|
-
import { useTranslation } from "react-i18next";
|
|
12
|
-
import { Link } from "react-router-dom";
|
|
13
|
-
import MoreDropdown from "../MoreDropdown";
|
|
14
|
-
import { MIN_WIDTH } from "./constants";
|
|
15
|
-
import DummySpan from "./DummySpan";
|
|
16
|
-
import "./rename.scss";
|
|
17
|
-
import { mergeRefs } from "./utils";
|
|
18
|
-
var Rename = function Rename(_ref) {
|
|
19
|
-
var value = _ref.value,
|
|
20
|
-
_ref$onRename = _ref.onRename,
|
|
21
|
-
onRename = _ref$onRename === void 0 ? noop : _ref$onRename,
|
|
22
|
-
_ref$isOpen = _ref.isOpen,
|
|
23
|
-
isOpen = _ref$isOpen === void 0 ? false : _ref$isOpen,
|
|
24
|
-
_ref$isLoading = _ref.isLoading,
|
|
25
|
-
isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading,
|
|
26
|
-
_ref$placeholder = _ref.placeholder,
|
|
27
|
-
placeholder = _ref$placeholder === void 0 ? "" : _ref$placeholder,
|
|
28
|
-
_ref$hideMenu = _ref.hideMenu,
|
|
29
|
-
hideMenu = _ref$hideMenu === void 0 ? false : _ref$hideMenu,
|
|
30
|
-
_ref$disabled = _ref.disabled,
|
|
31
|
-
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
32
|
-
_ref$dropdownItems = _ref.dropdownItems,
|
|
33
|
-
dropdownItems = _ref$dropdownItems === void 0 ? [] : _ref$dropdownItems,
|
|
34
|
-
_ref$breadcrumbs = _ref.breadcrumbs,
|
|
35
|
-
breadcrumbs = _ref$breadcrumbs === void 0 ? [] : _ref$breadcrumbs,
|
|
36
|
-
_ref$textProps = _ref.textProps,
|
|
37
|
-
textProps = _ref$textProps === void 0 ? {} : _ref$textProps,
|
|
38
|
-
_ref$inputProps = _ref.inputProps,
|
|
39
|
-
inputProps = _ref$inputProps === void 0 ? {} : _ref$inputProps,
|
|
40
|
-
_ref$submitButtonProp = _ref.submitButtonProps,
|
|
41
|
-
submitButtonProps = _ref$submitButtonProp === void 0 ? {} : _ref$submitButtonProp,
|
|
42
|
-
_ref$cancelButtonProp = _ref.cancelButtonProps,
|
|
43
|
-
cancelButtonProps = _ref$cancelButtonProp === void 0 ? {} : _ref$cancelButtonProp,
|
|
44
|
-
_ref$className = _ref.className,
|
|
45
|
-
className = _ref$className === void 0 ? "" : _ref$className,
|
|
46
|
-
_ref$allowEmptySubmis = _ref.allowEmptySubmission,
|
|
47
|
-
allowEmptySubmission = _ref$allowEmptySubmis === void 0 ? false : _ref$allowEmptySubmis,
|
|
48
|
-
_ref$defaultName = _ref.defaultName,
|
|
49
|
-
defaultName = _ref$defaultName === void 0 ? "" : _ref$defaultName,
|
|
50
|
-
formatText = _ref.formatText;
|
|
51
|
-
var _useTranslation = useTranslation(),
|
|
52
|
-
t = _useTranslation.t;
|
|
53
|
-
var _useStateWithDependen = useStateWithDependency(value !== null && value !== void 0 ? value : ""),
|
|
54
|
-
_useStateWithDependen2 = _slicedToArray(_useStateWithDependen, 2),
|
|
55
|
-
name = _useStateWithDependen2[0],
|
|
56
|
-
setName = _useStateWithDependen2[1];
|
|
57
|
-
var _useState = useState(isOpen),
|
|
58
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
59
|
-
editMode = _useState2[0],
|
|
60
|
-
setEditMode = _useState2[1];
|
|
61
|
-
var _useState3 = useState(MIN_WIDTH),
|
|
62
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
63
|
-
inputWidth = _useState4[0],
|
|
64
|
-
setInputWidth = _useState4[1];
|
|
65
|
-
var renameRef = useRef(null);
|
|
66
|
-
var placeholderRef = useRef(null);
|
|
67
|
-
useOnClickOutside(renameRef, function () {
|
|
68
|
-
return editMode && handleClose();
|
|
69
|
-
});
|
|
70
|
-
var handleRename = function handleRename(event, name) {
|
|
71
|
-
event.stopPropagation();
|
|
72
|
-
var newName = allowEmptySubmission && isEmpty(name) ? defaultName : name;
|
|
73
|
-
setName(newName);
|
|
74
|
-
onRename(newName);
|
|
75
|
-
setEditMode(false);
|
|
76
|
-
};
|
|
77
|
-
var handleClose = function handleClose(event) {
|
|
78
|
-
event === null || event === void 0 ? void 0 : event.stopPropagation();
|
|
79
|
-
setName(value);
|
|
80
|
-
setEditMode(false);
|
|
81
|
-
};
|
|
82
|
-
var handleRenameButton = function handleRenameButton(event) {
|
|
83
|
-
event.stopPropagation();
|
|
84
|
-
setEditMode(true);
|
|
85
|
-
};
|
|
86
|
-
var handleDisplayText = function handleDisplayText(event) {
|
|
87
|
-
event.stopPropagation();
|
|
88
|
-
!disabled && setEditMode(!editMode);
|
|
89
|
-
};
|
|
90
|
-
var closeRef = useHotKeys("escape", handleClose, {
|
|
91
|
-
mode: "scoped",
|
|
92
|
-
enabled: editMode
|
|
93
|
-
});
|
|
94
|
-
var submitRef = useHotKeys(["command+return", "return"], function (event) {
|
|
95
|
-
if (isEmpty(name) && !allowEmptySubmission) return;
|
|
96
|
-
handleRename(event, name);
|
|
97
|
-
}, {
|
|
98
|
-
mode: "scoped",
|
|
99
|
-
enabled: editMode
|
|
100
|
-
});
|
|
101
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
102
|
-
ref: renameRef,
|
|
103
|
-
className: classnames("flex min-w-0 max-w-md flex-row items-center", className)
|
|
104
|
-
}, breadcrumbs.map(function (_ref2) {
|
|
105
|
-
var text = _ref2.text,
|
|
106
|
-
link = _ref2.link;
|
|
107
|
-
return /*#__PURE__*/React.createElement(Fragment, {
|
|
108
|
-
key: text
|
|
109
|
-
}, /*#__PURE__*/React.createElement(Link, _extends({
|
|
110
|
-
className: "neeto-molecules-rename__text neeto-molecules-rename__breadcrumb-text",
|
|
111
|
-
"data-testid": "neeto-molecules-value-display",
|
|
112
|
-
to: link
|
|
113
|
-
}, textProps), text), /*#__PURE__*/React.createElement(Typography, {
|
|
114
|
-
className: "neeto-molecules-rename__breadcrumb-text neeto-molecules-breadcrumb__divider",
|
|
115
|
-
component: "span"
|
|
116
|
-
}, "/"));
|
|
117
|
-
}), /*#__PURE__*/React.createElement(DummySpan, {
|
|
118
|
-
name: name,
|
|
119
|
-
placeholderRef: placeholderRef,
|
|
120
|
-
setInputWidth: setInputWidth
|
|
121
|
-
}), editMode ? /*#__PURE__*/React.createElement("div", {
|
|
122
|
-
className: "flex min-w-0 max-w-full flex-grow"
|
|
123
|
-
}, /*#__PURE__*/React.createElement(Input, _extends({
|
|
124
|
-
autoFocus: true,
|
|
125
|
-
className: "neeto-molecules-rename__input flex-grow",
|
|
126
|
-
"data-cy": "form-rename-text-field",
|
|
127
|
-
"data-testid": "neeto-molecules-name-input",
|
|
128
|
-
onClick: function onClick(event) {
|
|
129
|
-
return event.stopPropagation();
|
|
130
|
-
},
|
|
131
|
-
placeholder: placeholder,
|
|
132
|
-
ref: mergeRefs(closeRef, submitRef),
|
|
133
|
-
style: {
|
|
134
|
-
width: inputWidth
|
|
135
|
-
},
|
|
136
|
-
value: name,
|
|
137
|
-
suffix: /*#__PURE__*/React.createElement("div", {
|
|
138
|
-
className: "flex items-center justify-end"
|
|
139
|
-
}, /*#__PURE__*/React.createElement(Button, _extends({
|
|
140
|
-
className: "neeto-ui-rounded-none",
|
|
141
|
-
"data-cy": "form-rename-submit-button",
|
|
142
|
-
"data-testid": "neeto-molecules-rename-button",
|
|
143
|
-
icon: Check,
|
|
144
|
-
loading: isLoading,
|
|
145
|
-
style: "text",
|
|
146
|
-
disabled: !allowEmptySubmission && isEmpty(name) || isLoading,
|
|
147
|
-
onClick: function onClick(event) {
|
|
148
|
-
return handleRename(event, name);
|
|
149
|
-
}
|
|
150
|
-
}, submitButtonProps)), /*#__PURE__*/React.createElement(Button, _extends({
|
|
151
|
-
className: "neeto-ui-rounded-none",
|
|
152
|
-
"data-cy": "form-rename-close-button",
|
|
153
|
-
"data-testid": "neeto-molecules-cancel-button",
|
|
154
|
-
disabled: isLoading,
|
|
155
|
-
icon: Close,
|
|
156
|
-
style: "text",
|
|
157
|
-
onClick: handleClose
|
|
158
|
-
}, cancelButtonProps))),
|
|
159
|
-
onChange: function onChange(event) {
|
|
160
|
-
return setName(event.target.value);
|
|
161
|
-
}
|
|
162
|
-
}, inputProps))) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Typography, _extends({
|
|
163
|
-
component: "p",
|
|
164
|
-
"data-cy": "form-title",
|
|
165
|
-
"data-testid": "neeto-molecules-value-display",
|
|
166
|
-
style: "body2",
|
|
167
|
-
className: classnames("neeto-molecules-rename__text neeto-molecules-rename__display-text w-full truncate", {
|
|
168
|
-
"cursor-pointer": !disabled,
|
|
169
|
-
"pointer-events-none cursor-text": disabled
|
|
170
|
-
}),
|
|
171
|
-
onClick: handleDisplayText
|
|
172
|
-
}, textProps), typeof formatText === "function" ? formatText(name) : name), !hideMenu && (isNotEmpty(dropdownItems) || !disabled) && /*#__PURE__*/React.createElement(MoreDropdown, {
|
|
173
|
-
dropdownButtonProps: {
|
|
174
|
-
"data-testid": "neeto-molecules-menu-button"
|
|
175
|
-
},
|
|
176
|
-
dropdownProps: {
|
|
177
|
-
position: "bottom-start",
|
|
178
|
-
onClick: function onClick(event) {
|
|
179
|
-
return event.stopPropagation();
|
|
180
|
-
}
|
|
181
|
-
},
|
|
182
|
-
menuItems: [{
|
|
183
|
-
"data-cy": "form-rename-button",
|
|
184
|
-
onClick: handleRenameButton,
|
|
185
|
-
label: t("neetoMolecules.common.actions.rename"),
|
|
186
|
-
isVisible: !disabled,
|
|
187
|
-
key: "edit-name-menu"
|
|
188
|
-
}].concat(_toConsumableArray(dropdownItems))
|
|
189
|
-
})));
|
|
190
|
-
};
|
|
191
|
-
export default Rename;
|
package/dist/Rename/rename.scss
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
.neeto-molecules-rename__input {
|
|
2
|
-
position: relative;
|
|
3
|
-
width: max-content;
|
|
4
|
-
margin-left: 4px;
|
|
5
|
-
height: 32px;
|
|
6
|
-
max-width: 100%;
|
|
7
|
-
transition: width 0.2s ease-in-out;
|
|
8
|
-
|
|
9
|
-
.neeto-ui-input {
|
|
10
|
-
border-color: transparent;
|
|
11
|
-
|
|
12
|
-
&:focus-within {
|
|
13
|
-
border-color: rgb(var(--neeto-ui-primary-500));
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.neeto-ui-input__suffix {
|
|
17
|
-
margin-right: 0 !important;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
input {
|
|
21
|
-
min-width: 150px;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.neeto-molecules-rename__text {
|
|
27
|
-
padding: 8px 5px;
|
|
28
|
-
margin: 0 1px;
|
|
29
|
-
cursor: pointer;
|
|
30
|
-
max-height: 32px;
|
|
31
|
-
max-width: 448px;
|
|
32
|
-
font-weight: 400;
|
|
33
|
-
line-height: 1;
|
|
34
|
-
letter-spacing: 0.005em;
|
|
35
|
-
transition: var(--neeto-ui-transition);
|
|
36
|
-
font-size: var(--neeto-ui-text-sm);
|
|
37
|
-
border-radius: var(--neeto-ui-rounded);
|
|
38
|
-
background-color: rgb(var(--neeto-ui-white));
|
|
39
|
-
border: thin solid rgb(var(--neeto-ui-white));
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.neeto-molecules-rename__breadcrumb-text {
|
|
43
|
-
color: rgb(var(--neeto-ui-gray-500));
|
|
44
|
-
&:hover {
|
|
45
|
-
color: rgb(var(--neeto-ui-gray-800));
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.neeto-molecules-rename__display-text {
|
|
50
|
-
color: rgb(var(--neeto-ui-gray-800));
|
|
51
|
-
&:hover {
|
|
52
|
-
border: thin solid rgb(var(--neeto-ui-gray-300));
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.neeto-molecules-breadcrumb__divider {
|
|
57
|
-
padding: 0;
|
|
58
|
-
max-height: 32px;
|
|
59
|
-
font-weight: 400;
|
|
60
|
-
line-height: 16px;
|
|
61
|
-
letter-spacing: 0.005em;
|
|
62
|
-
pointer-events: none;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.dummy-span {
|
|
66
|
-
padding: 5px 8px;
|
|
67
|
-
font-weight: 400;
|
|
68
|
-
font-size: 14px;
|
|
69
|
-
}
|
package/dist/Rename/utils.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export var mergeRefs = function mergeRefs() {
|
|
2
|
-
for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
3
|
-
refs[_key] = arguments[_key];
|
|
4
|
-
}
|
|
5
|
-
return function (node) {
|
|
6
|
-
return refs.forEach(function (ref) {
|
|
7
|
-
return typeof ref === "function" ? ref(node) : ref.current = node;
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
var _RESPONSIVE_DEVICES_M;
|
|
3
|
-
import { t } from "i18next";
|
|
4
|
-
import { Computer, Tablet, Mobile } from "@bigbinary/neeto-icons";
|
|
5
|
-
export var RESPONSIVE_DEVICES = {
|
|
6
|
-
DESKTOP: "desktop",
|
|
7
|
-
TABLET: "tablet",
|
|
8
|
-
MOBILE: "mobile"
|
|
9
|
-
};
|
|
10
|
-
export var RESPONSIVE_DEVICES_MAP = (_RESPONSIVE_DEVICES_M = {}, _defineProperty(_RESPONSIVE_DEVICES_M, RESPONSIVE_DEVICES.DESKTOP, {
|
|
11
|
-
icon: Computer,
|
|
12
|
-
label: t("neetoMolecules.responsiveDevicePicker.desktop")
|
|
13
|
-
}), _defineProperty(_RESPONSIVE_DEVICES_M, RESPONSIVE_DEVICES.TABLET, {
|
|
14
|
-
icon: Tablet,
|
|
15
|
-
label: t("neetoMolecules.responsiveDevicePicker.tablet")
|
|
16
|
-
}), _defineProperty(_RESPONSIVE_DEVICES_M, RESPONSIVE_DEVICES.MOBILE, {
|
|
17
|
-
icon: Mobile,
|
|
18
|
-
label: t("neetoMolecules.responsiveDevicePicker.mobile")
|
|
19
|
-
}), _RESPONSIVE_DEVICES_M);
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["className", "selectedDevice", "onDeviceChange"];
|
|
5
|
-
import React from "react";
|
|
6
|
-
import classnames from "classnames";
|
|
7
|
-
import { Button } from "@bigbinary/neetoui";
|
|
8
|
-
import { RESPONSIVE_DEVICES_MAP } from "./constants";
|
|
9
|
-
var ResponsiveDevicePicker = function ResponsiveDevicePicker(_ref) {
|
|
10
|
-
var _ref$className = _ref.className,
|
|
11
|
-
className = _ref$className === void 0 ? "" : _ref$className,
|
|
12
|
-
selectedDevice = _ref.selectedDevice,
|
|
13
|
-
onDeviceChange = _ref.onDeviceChange,
|
|
14
|
-
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
15
|
-
return /*#__PURE__*/React.createElement("div", _extends({
|
|
16
|
-
className: classnames("flex items-center justify-center gap-2", className)
|
|
17
|
-
}, otherProps), Object.entries(RESPONSIVE_DEVICES_MAP).map(function (_ref2) {
|
|
18
|
-
var _ref3 = _slicedToArray(_ref2, 2),
|
|
19
|
-
key = _ref3[0],
|
|
20
|
-
_ref3$ = _ref3[1],
|
|
21
|
-
icon = _ref3$.icon,
|
|
22
|
-
label = _ref3$.label;
|
|
23
|
-
return /*#__PURE__*/React.createElement(Button, {
|
|
24
|
-
"data-testid": "".concat(label.toLowerCase(), "-device-button"),
|
|
25
|
-
icon: icon,
|
|
26
|
-
key: key,
|
|
27
|
-
size: "small",
|
|
28
|
-
style: key === selectedDevice ? "primary" : "secondary",
|
|
29
|
-
title: label,
|
|
30
|
-
onClick: function onClick() {
|
|
31
|
-
return onDeviceChange(key);
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
}));
|
|
35
|
-
};
|
|
36
|
-
export default ResponsiveDevicePicker;
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { isPresent } from "@bigbinary/neeto-commons-frontend/pure";
|
|
3
|
-
import { joinHyphenCase } from "@bigbinary/neeto-commons-frontend/utils";
|
|
4
|
-
import { Typography } from "@bigbinary/neetoui";
|
|
5
|
-
import { useTranslation } from "react-i18next";
|
|
6
|
-
import { DAYS } from "./constants";
|
|
7
|
-
import { sortPeriodsByKey } from "./utils";
|
|
8
|
-
var DisplayAvailability = function DisplayAvailability(_ref) {
|
|
9
|
-
var periods = _ref.periods;
|
|
10
|
-
var _useTranslation = useTranslation(),
|
|
11
|
-
t = _useTranslation.t;
|
|
12
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
13
|
-
className: "w-full space-y-4"
|
|
14
|
-
}, DAYS.map(function (day) {
|
|
15
|
-
var _sortPeriodsByKey;
|
|
16
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
17
|
-
className: "neeto-ui-rounded-md neeto-ui-shadow-s neeto-ui-border-gray-300 flex w-full items-start justify-start border py-4 px-12",
|
|
18
|
-
key: day
|
|
19
|
-
}, /*#__PURE__*/React.createElement(Typography, {
|
|
20
|
-
className: "mt-0.5 w-16",
|
|
21
|
-
"data-cy": joinHyphenCase(day, "day-text"),
|
|
22
|
-
style: "h5",
|
|
23
|
-
weight: "semibold"
|
|
24
|
-
}, t("neetoMolecules.schedule.days.".concat(day))), /*#__PURE__*/React.createElement("div", {
|
|
25
|
-
className: "flex w-9/12 flex-col items-center space-y-4"
|
|
26
|
-
}, isPresent(periods[day]) ? (_sortPeriodsByKey = sortPeriodsByKey({
|
|
27
|
-
periods: periods[day],
|
|
28
|
-
key: "startTime",
|
|
29
|
-
order: "asc"
|
|
30
|
-
})) === null || _sortPeriodsByKey === void 0 ? void 0 : _sortPeriodsByKey.map(function (period) {
|
|
31
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
32
|
-
className: "flex items-center space-x-4",
|
|
33
|
-
key: period.id
|
|
34
|
-
}, /*#__PURE__*/React.createElement(Typography, {
|
|
35
|
-
className: "w-24 text-right",
|
|
36
|
-
lineHeight: "relaxed",
|
|
37
|
-
style: "h5",
|
|
38
|
-
weight: "semibold",
|
|
39
|
-
"data-cy": joinHyphenCase(day, period.startTime, "start-time-text")
|
|
40
|
-
}, period.startTime), /*#__PURE__*/React.createElement(Typography, {
|
|
41
|
-
className: "neeto-ui-text-gray-600",
|
|
42
|
-
component: "span"
|
|
43
|
-
}, "-"), /*#__PURE__*/React.createElement(Typography, {
|
|
44
|
-
className: "w-24 text-left",
|
|
45
|
-
lineHeight: "relaxed",
|
|
46
|
-
style: "h5",
|
|
47
|
-
weight: "semibold",
|
|
48
|
-
"data-cy": joinHyphenCase(day, period.endTime, "start-time-text")
|
|
49
|
-
}, period.endTime));
|
|
50
|
-
}) : /*#__PURE__*/React.createElement(Typography, {
|
|
51
|
-
className: "mx-8 mt-0.5",
|
|
52
|
-
"data-cy": joinHyphenCase(day, "unavailable-time-text"),
|
|
53
|
-
lineHeight: "relaxed",
|
|
54
|
-
style: "h5"
|
|
55
|
-
}, t("neetoMolecules.schedule.unavailable"))));
|
|
56
|
-
}));
|
|
57
|
-
};
|
|
58
|
-
export default DisplayAvailability;
|
package/dist/Schedule/Fields.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import React, { useEffect, useImperativeHandle } from "react";
|
|
2
|
-
import { FieldArray, useFormikContext } from "formik";
|
|
3
|
-
import { DAYS } from "./constants";
|
|
4
|
-
import Form from "./Form";
|
|
5
|
-
var Fields = function Fields(_ref) {
|
|
6
|
-
var handleCopy = _ref.handleCopy,
|
|
7
|
-
handleValuesChanged = _ref.handleValuesChanged,
|
|
8
|
-
scheduleRef = _ref.scheduleRef;
|
|
9
|
-
var _useFormikContext = useFormikContext(),
|
|
10
|
-
values = _useFormikContext.values,
|
|
11
|
-
setFieldValue = _useFormikContext.setFieldValue,
|
|
12
|
-
resetForm = _useFormikContext.resetForm,
|
|
13
|
-
errors = _useFormikContext.errors;
|
|
14
|
-
useEffect(function () {
|
|
15
|
-
return handleValuesChanged(values);
|
|
16
|
-
}, [values]);
|
|
17
|
-
useImperativeHandle(scheduleRef, function () {
|
|
18
|
-
return {
|
|
19
|
-
resetForm: resetForm,
|
|
20
|
-
errors: errors
|
|
21
|
-
};
|
|
22
|
-
});
|
|
23
|
-
return /*#__PURE__*/React.createElement(FieldArray, {
|
|
24
|
-
name: "wdays",
|
|
25
|
-
render: function render() {
|
|
26
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
27
|
-
className: "space-y-4"
|
|
28
|
-
}, values.wdays.map(function (item, index) {
|
|
29
|
-
return /*#__PURE__*/React.createElement(Form, {
|
|
30
|
-
day: DAYS.find(function (day) {
|
|
31
|
-
return day === item.wday;
|
|
32
|
-
}),
|
|
33
|
-
handleCopy: handleCopy,
|
|
34
|
-
index: index,
|
|
35
|
-
key: item.wday,
|
|
36
|
-
setFieldValue: setFieldValue,
|
|
37
|
-
values: values
|
|
38
|
-
});
|
|
39
|
-
}));
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
};
|
|
43
|
-
export default Fields;
|