@bigbinary/neeto-molecules 1.1.16 → 1.1.17
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 +2291 -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
package/dist/Sidebar/Links.js
DELETED
|
@@ -1,112 +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
|
-
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
5
|
-
var _excluded = ["label", "to", "icon", "items"],
|
|
6
|
-
_excluded2 = ["label", "to", "count", "dataCy"];
|
|
7
|
-
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; }
|
|
8
|
-
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; }
|
|
9
|
-
import React, { useState } from "react";
|
|
10
|
-
import classnames from "classnames";
|
|
11
|
-
import { globalProps } from "@bigbinary/neeto-commons-frontend/initializers";
|
|
12
|
-
import { isNotPresent } from "@bigbinary/neeto-commons-frontend/pure";
|
|
13
|
-
import { Down } from "@bigbinary/neeto-icons";
|
|
14
|
-
import { Typography } from "@bigbinary/neetoui";
|
|
15
|
-
import { __, curry, includes, is, not } from "ramda";
|
|
16
|
-
import { NavLink, useLocation } from "react-router-dom";
|
|
17
|
-
import { isSubRouteActive } from "./utils";
|
|
18
|
-
var Links = function Links(_ref) {
|
|
19
|
-
var navLinks = _ref.navLinks;
|
|
20
|
-
var location = useLocation();
|
|
21
|
-
var _useState = useState(true),
|
|
22
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
23
|
-
isActiveLinkExpanded = _useState2[0],
|
|
24
|
-
setIsActiveLinkExpanded = _useState2[1];
|
|
25
|
-
var filterByPermissions = curry(function (_ref2) {
|
|
26
|
-
var permissions = _ref2.permissions;
|
|
27
|
-
if (permissions) {
|
|
28
|
-
return is(Array, permissions) ? permissions.some(includes(__, globalProps.permissions)) : globalProps.permissions.includes(permissions);
|
|
29
|
-
}
|
|
30
|
-
return true;
|
|
31
|
-
});
|
|
32
|
-
var handleNavLinkClick = function handleNavLinkClick(event, isActive, items) {
|
|
33
|
-
if (isNotPresent(items)) return;
|
|
34
|
-
if (isActive()) {
|
|
35
|
-
setIsActiveLinkExpanded(not);
|
|
36
|
-
event.preventDefault();
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
setIsActiveLinkExpanded(true);
|
|
40
|
-
};
|
|
41
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
42
|
-
className: "neeto-molecules-sidebar__links neeto-molecules-sidebar__no-shrinkable"
|
|
43
|
-
}, navLinks.filter(filterByPermissions).map(function (_ref3, mainIndex) {
|
|
44
|
-
var label = _ref3.label,
|
|
45
|
-
to = _ref3.to,
|
|
46
|
-
icon = _ref3.icon,
|
|
47
|
-
items = _ref3.items,
|
|
48
|
-
otherProps = _objectWithoutProperties(_ref3, _excluded);
|
|
49
|
-
var IconSVG = icon;
|
|
50
|
-
var url = new URL(to, window.location.href);
|
|
51
|
-
var isActive = function isActive() {
|
|
52
|
-
return is(Function, otherProps.isActive) ? otherProps.isActive() : location.pathname.startsWith(url.pathname);
|
|
53
|
-
};
|
|
54
|
-
var isMenuExpanded = isActive() && isActiveLinkExpanded;
|
|
55
|
-
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
56
|
-
key: mainIndex
|
|
57
|
-
}, /*#__PURE__*/React.createElement(NavLink, _extends({
|
|
58
|
-
activeClassName: "active",
|
|
59
|
-
className: "neeto-ui-flex neeto-ui-items-center neeto-ui-no-underline neeto-ui-select-none neeto-molecules-sidebar__link",
|
|
60
|
-
onClick: function onClick(event) {
|
|
61
|
-
return handleNavLinkClick(event, isActive, items);
|
|
62
|
-
}
|
|
63
|
-
}, _objectSpread({
|
|
64
|
-
isActive: isActive,
|
|
65
|
-
to: to
|
|
66
|
-
}, otherProps)), icon && /*#__PURE__*/React.createElement("span", {
|
|
67
|
-
className: "neeto-molecules-sidebar__link-icon",
|
|
68
|
-
"data-testid": label
|
|
69
|
-
}, /*#__PURE__*/React.createElement(IconSVG, null)), /*#__PURE__*/React.createElement(Typography, {
|
|
70
|
-
className: "neeto-molecules-sidebar__link-label",
|
|
71
|
-
component: "span",
|
|
72
|
-
style: "body2",
|
|
73
|
-
weight: "normal"
|
|
74
|
-
}, label), items && /*#__PURE__*/React.createElement("span", {
|
|
75
|
-
className: classnames("neeto-molecules-sidebar__link-icon neeto-molecules-sidebar__link-icon--caret", {
|
|
76
|
-
"neeto-molecules-sidebar__link-icon--rotate": isMenuExpanded
|
|
77
|
-
})
|
|
78
|
-
}, /*#__PURE__*/React.createElement(Down, {
|
|
79
|
-
size: 16
|
|
80
|
-
}))), items && isMenuExpanded && /*#__PURE__*/React.createElement("div", {
|
|
81
|
-
className: "neeto-molecules-sidebar__sublink-wrapper",
|
|
82
|
-
"data-cy": "sidebar-sub-link-wrapper"
|
|
83
|
-
}, items.filter(filterByPermissions).map(function (_ref4, subIndex) {
|
|
84
|
-
var subLabel = _ref4.label,
|
|
85
|
-
subRoute = _ref4.to,
|
|
86
|
-
count = _ref4.count,
|
|
87
|
-
dataCy = _ref4.dataCy,
|
|
88
|
-
otherProps = _objectWithoutProperties(_ref4, _excluded2);
|
|
89
|
-
return /*#__PURE__*/React.createElement(NavLink, _extends({
|
|
90
|
-
activeClassName: "active",
|
|
91
|
-
className: "neeto-molecules-sidebar__sublink neeto-ui-flex neeto-ui-items-center neeto-ui-select-none",
|
|
92
|
-
"data-cy": "".concat(dataCy, "-sub-link"),
|
|
93
|
-
isActive: function isActive() {
|
|
94
|
-
return isSubRouteActive(subRoute, location);
|
|
95
|
-
},
|
|
96
|
-
key: subIndex,
|
|
97
|
-
to: subRoute
|
|
98
|
-
}, otherProps), /*#__PURE__*/React.createElement(Typography, {
|
|
99
|
-
className: "neeto-molecules-sidebar__link-sub-label neeto-ui-flex-grow",
|
|
100
|
-
component: "span",
|
|
101
|
-
"data-cy": "".concat(dataCy, "-sub-link-label"),
|
|
102
|
-
style: "body2"
|
|
103
|
-
}, subLabel), /*#__PURE__*/React.createElement(Typography, {
|
|
104
|
-
className: "neeto-molecules-sidebar__link-sub-count neeto-ui-flex-shrink-0",
|
|
105
|
-
component: "span",
|
|
106
|
-
"data-cy": "".concat(dataCy, "-sub-link-count"),
|
|
107
|
-
style: "body2"
|
|
108
|
-
}, count > 999 ? "999+" : count));
|
|
109
|
-
})));
|
|
110
|
-
}));
|
|
111
|
-
};
|
|
112
|
-
export default Links;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Tooltip } from "@bigbinary/neetoui";
|
|
3
|
-
import FeaturedTooltip from "./FeaturedTooltip";
|
|
4
|
-
var NavIconWrapper = function NavIconWrapper(_ref) {
|
|
5
|
-
var description = _ref.description,
|
|
6
|
-
label = _ref.label,
|
|
7
|
-
children = _ref.children;
|
|
8
|
-
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
9
|
-
className: "sidebar-featured-tooltip__content",
|
|
10
|
-
content: /*#__PURE__*/React.createElement(FeaturedTooltip, {
|
|
11
|
-
description: description,
|
|
12
|
-
label: label
|
|
13
|
-
}),
|
|
14
|
-
delay: [400, 40],
|
|
15
|
-
distance: "20rem",
|
|
16
|
-
duration: [200, 200],
|
|
17
|
-
position: "right"
|
|
18
|
-
}, children);
|
|
19
|
-
};
|
|
20
|
-
export default NavIconWrapper;
|
|
@@ -1,36 +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 = ["onClick", "label", "icon"];
|
|
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 from "react";
|
|
8
|
-
import { Button } from "@bigbinary/neetoui";
|
|
9
|
-
import "../sidebar.scss";
|
|
10
|
-
var LinkSection = function LinkSection(_ref) {
|
|
11
|
-
var links = _ref.links;
|
|
12
|
-
return /*#__PURE__*/React.createElement("ul", {
|
|
13
|
-
className: "neeto-molecules-profile-sublist"
|
|
14
|
-
}, links.map(function (_ref2, idx) {
|
|
15
|
-
var onClick = _ref2.onClick,
|
|
16
|
-
label = _ref2.label,
|
|
17
|
-
_ref2$icon = _ref2.icon,
|
|
18
|
-
icon = _ref2$icon === void 0 ? null : _ref2$icon,
|
|
19
|
-
otherProps = _objectWithoutProperties(_ref2, _excluded);
|
|
20
|
-
return /*#__PURE__*/React.createElement("li", {
|
|
21
|
-
className: "neeto-molecules-profile-sublist__item",
|
|
22
|
-
key: idx
|
|
23
|
-
}, /*#__PURE__*/React.createElement(Button, _extends({
|
|
24
|
-
fullWidth: true,
|
|
25
|
-
className: "neeto-molecules-profile-sublist__item-btn",
|
|
26
|
-
iconPosition: "left",
|
|
27
|
-
iconSize: 18,
|
|
28
|
-
style: "text"
|
|
29
|
-
}, _objectSpread({
|
|
30
|
-
icon: icon,
|
|
31
|
-
label: label,
|
|
32
|
-
onClick: onClick
|
|
33
|
-
}, otherProps))));
|
|
34
|
-
}));
|
|
35
|
-
};
|
|
36
|
-
export default LinkSection;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import classnames from "classnames";
|
|
4
|
-
import { truncate } from "@bigbinary/neeto-commons-frontend/pure";
|
|
5
|
-
import { Avatar, Typography } from "@bigbinary/neetoui";
|
|
6
|
-
import LinkSection from "./LinkSection";
|
|
7
|
-
import "../sidebar.scss";
|
|
8
|
-
var ProfileMenu = function ProfileMenu(_ref) {
|
|
9
|
-
var profileInfo = _ref.profileInfo,
|
|
10
|
-
extraTopLinks = _ref.extraTopLinks;
|
|
11
|
-
var name = profileInfo.name,
|
|
12
|
-
email = profileInfo.email,
|
|
13
|
-
topLinks = profileInfo.topLinks,
|
|
14
|
-
bottomLinks = profileInfo.bottomLinks,
|
|
15
|
-
customContent = profileInfo.customContent;
|
|
16
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
17
|
-
className: "neeto-ui-flex neeto-ui-flex-col neeto-molecules-profile-popup",
|
|
18
|
-
"data-cy": "profile-popup",
|
|
19
|
-
"data-testid": "profile-popup"
|
|
20
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
21
|
-
className: classnames("neeto-ui-relative neeto-ui-flex neeto-ui-items-center neeto-ui-p-3 neeto-ui-bg-primary-100 neeto-molecules-profile-popup__top-section")
|
|
22
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
23
|
-
className: "top-0 left-0"
|
|
24
|
-
}, /*#__PURE__*/React.createElement(Avatar, {
|
|
25
|
-
size: "large",
|
|
26
|
-
user: profileInfo
|
|
27
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
28
|
-
className: "neeto-ui-flex neeto-ui-flex-col neeto-ui-flex-grow neeto-ui-min-w-0 neeto-ui-pl-3"
|
|
29
|
-
}, /*#__PURE__*/React.createElement(Typography, {
|
|
30
|
-
className: "neeto-ui-m-0",
|
|
31
|
-
component: "h2",
|
|
32
|
-
lineHeight: "tight",
|
|
33
|
-
style: "h5",
|
|
34
|
-
title: name,
|
|
35
|
-
weight: "semibold"
|
|
36
|
-
}, truncate(name, 18)), email && /*#__PURE__*/React.createElement(Typography, {
|
|
37
|
-
className: "neeto-ui-w-full neeto-ui-truncate neeto-ui-text-gray-700",
|
|
38
|
-
lineHeight: "tight",
|
|
39
|
-
style: "body3"
|
|
40
|
-
}, email))), /*#__PURE__*/React.createElement("div", {
|
|
41
|
-
className: "neeto-molecules-sidebar__profile-wrapper-custom-content"
|
|
42
|
-
}, customContent), topLinks && /*#__PURE__*/React.createElement(LinkSection, {
|
|
43
|
-
links: [].concat(_toConsumableArray(extraTopLinks), _toConsumableArray(topLinks))
|
|
44
|
-
}), bottomLinks && /*#__PURE__*/React.createElement(LinkSection, {
|
|
45
|
-
links: bottomLinks
|
|
46
|
-
}));
|
|
47
|
-
};
|
|
48
|
-
export default ProfileMenu;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
-
import React, { forwardRef, useState } from "react";
|
|
3
|
-
import { truncate } from "@bigbinary/neeto-commons-frontend/pure";
|
|
4
|
-
import { useFetchNeetoApps } from "@bigbinary/neeto-commons-frontend/react-utils";
|
|
5
|
-
import { Avatar, Typography, Spinner } from "@bigbinary/neetoui";
|
|
6
|
-
import "../sidebar.scss";
|
|
7
|
-
var ProfileSection = function ProfileSection(_ref, ref) {
|
|
8
|
-
var profileInfo = _ref.profileInfo;
|
|
9
|
-
var _useState = useState(false),
|
|
10
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
11
|
-
hasHovered = _useState2[0],
|
|
12
|
-
setHasHovered = _useState2[1];
|
|
13
|
-
var _useFetchNeetoApps = useFetchNeetoApps(),
|
|
14
|
-
refetchNeetoApps = _useFetchNeetoApps.refetch,
|
|
15
|
-
isLoading = _useFetchNeetoApps.isLoading,
|
|
16
|
-
isStale = _useFetchNeetoApps.isStale;
|
|
17
|
-
return /*#__PURE__*/React.createElement("button", {
|
|
18
|
-
className: "neeto-molecules-sidebar__link neeto-molecules-sidebar__link--button neeto-ui-shadow-none neeto-ui-flex neeto-ui-items-center neeto-ui-no-underline neeto-ui-select-none",
|
|
19
|
-
"data-cy": "profile-section",
|
|
20
|
-
"data-testid": "profile-section",
|
|
21
|
-
ref: ref,
|
|
22
|
-
onMouseEnter: function onMouseEnter() {
|
|
23
|
-
if (!hasHovered && isStale) {
|
|
24
|
-
refetchNeetoApps();
|
|
25
|
-
setHasHovered(true);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}, isLoading && hasHovered ? /*#__PURE__*/React.createElement("span", {
|
|
29
|
-
"data-testid": "profile-avatar-loader"
|
|
30
|
-
}, /*#__PURE__*/React.createElement(Spinner, null)) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Avatar, {
|
|
31
|
-
className: "neeto-ui-flex-shrink-0 neeto-molecules-sidebar__profile-avatar",
|
|
32
|
-
"data-testid": "profile-avatar",
|
|
33
|
-
size: "small",
|
|
34
|
-
user: profileInfo
|
|
35
|
-
}), /*#__PURE__*/React.createElement(Typography, {
|
|
36
|
-
className: "neeto-molecules-sidebar__link-label",
|
|
37
|
-
component: "span",
|
|
38
|
-
style: "body2",
|
|
39
|
-
weight: "normal"
|
|
40
|
-
}, truncate(profileInfo.name, 18))));
|
|
41
|
-
};
|
|
42
|
-
export default /*#__PURE__*/forwardRef(ProfileSection);
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { t } from "i18next";
|
|
2
|
-
import { Book, Keyboard, Gift, ChatEmpty } from "@bigbinary/neeto-icons";
|
|
3
|
-
import { toLower } from "ramda";
|
|
4
|
-
export var MY_PROFILE_URL = "/auth/profile/edit";
|
|
5
|
-
export var MY_ORGANIZATION_URL = "/auth/organization/edit";
|
|
6
|
-
export var CHANGELOG_WIDGET_TRIGGER_ID = "neetochangelog-trigger";
|
|
7
|
-
export var PRODUCT_LOGO_WIDTH = 40;
|
|
8
|
-
export var PRODUCT_LOGO_HEIGHT = 40;
|
|
9
|
-
export var DEFAULT_HELP_LINK_PROPS = {
|
|
10
|
-
liveChatProps: {
|
|
11
|
-
label: t("neetoMolecules.sidebar.helpLinks.liveChat"),
|
|
12
|
-
icon: ChatEmpty,
|
|
13
|
-
"data-cy": "help-link-live-chat-button",
|
|
14
|
-
onClick: function onClick() {
|
|
15
|
-
var _window$NeetoChat, _window$NeetoChat$con, _window$NeetoChat2, _window$NeetoChat2$co;
|
|
16
|
-
(_window$NeetoChat = window.NeetoChat) === null || _window$NeetoChat === void 0 ? void 0 : (_window$NeetoChat$con = _window$NeetoChat.contextualHelp) === null || _window$NeetoChat$con === void 0 ? void 0 : _window$NeetoChat$con.maximizeWidget();
|
|
17
|
-
(_window$NeetoChat2 = window.NeetoChat) === null || _window$NeetoChat2 === void 0 ? void 0 : (_window$NeetoChat2$co = _window$NeetoChat2.contextualHelp) === null || _window$NeetoChat2$co === void 0 ? void 0 : _window$NeetoChat2$co.openWidget();
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
helpCenterProps: {
|
|
21
|
-
label: t("neetoMolecules.sidebar.helpLinks.helpArticles"),
|
|
22
|
-
icon: Book,
|
|
23
|
-
"data-cy": "help-link-help-center-button",
|
|
24
|
-
href: "https://help.".concat(toLower(globalProps.appName), ".com/"),
|
|
25
|
-
target: "_blank"
|
|
26
|
-
},
|
|
27
|
-
changelogProps: {
|
|
28
|
-
id: CHANGELOG_WIDGET_TRIGGER_ID,
|
|
29
|
-
label: t("neetoMolecules.sidebar.helpLinks.whatsNew"),
|
|
30
|
-
icon: Gift,
|
|
31
|
-
"data-cy": "help-link-changelog-button"
|
|
32
|
-
},
|
|
33
|
-
keyboardShortcutProps: {
|
|
34
|
-
label: t("neetoMolecules.sidebar.helpLinks.keyboardShortcuts"),
|
|
35
|
-
icon: Keyboard,
|
|
36
|
-
"data-cy": "help-link-keyboard-shortcut-button"
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
export var QUERY_CACHE_KEY = "queryCache";
|
|
40
|
-
export var NEETO_APPS_QUERY_KEY = "neeto-apps-list";
|
package/dist/Sidebar/index.js
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
-
import React, { useEffect, useState } from "react";
|
|
3
|
-
import classnames from "classnames";
|
|
4
|
-
import { globalProps } from "@bigbinary/neeto-commons-frontend/initializers";
|
|
5
|
-
import { useLocalStorage } from "@bigbinary/neeto-commons-frontend/react-utils";
|
|
6
|
-
import { Button } from "@bigbinary/neetoui";
|
|
7
|
-
import { not } from "ramda";
|
|
8
|
-
import { useTranslation } from "react-i18next";
|
|
9
|
-
import { useLocation } from "react-router-dom";
|
|
10
|
-
import AppSwitcher from "./AppSwitcher";
|
|
11
|
-
import Chevron from "./Chevron";
|
|
12
|
-
import Footer from "./Footer";
|
|
13
|
-
import Header from "./Header";
|
|
14
|
-
import Links from "./Links";
|
|
15
|
-
import "./sidebar.scss";
|
|
16
|
-
import { getSidebarStateLocalStorageKey } from "./utils";
|
|
17
|
-
var Sidebar = function Sidebar(_ref) {
|
|
18
|
-
var navLinks = _ref.navLinks,
|
|
19
|
-
customLogo = _ref.customLogo,
|
|
20
|
-
_ref$profileInfoOverr = _ref.profileInfoOverrides,
|
|
21
|
-
profileInfoOverrides = _ref$profileInfoOverr === void 0 ? {} : _ref$profileInfoOverr,
|
|
22
|
-
_ref$helpLinkOverride = _ref.helpLinkOverrides,
|
|
23
|
-
helpLinkOverrides = _ref$helpLinkOverride === void 0 ? {} : _ref$helpLinkOverride,
|
|
24
|
-
_ref$extraTopLinks = _ref.extraTopLinks,
|
|
25
|
-
extraTopLinks = _ref$extraTopLinks === void 0 ? [] : _ref$extraTopLinks,
|
|
26
|
-
_ref$showAppSwitcher = _ref.showAppSwitcher,
|
|
27
|
-
showAppSwitcher = _ref$showAppSwitcher === void 0 ? true : _ref$showAppSwitcher;
|
|
28
|
-
var _useState = useState(false),
|
|
29
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
30
|
-
isAppSwitcherOpen = _useState2[0],
|
|
31
|
-
setIsAppSwitcherOpen = _useState2[1];
|
|
32
|
-
var _useLocalStorage = useLocalStorage(getSidebarStateLocalStorageKey(), false),
|
|
33
|
-
_useLocalStorage2 = _slicedToArray(_useLocalStorage, 2),
|
|
34
|
-
isSidebarCollapsed = _useLocalStorage2[0],
|
|
35
|
-
setIsSidebarCollapsed = _useLocalStorage2[1];
|
|
36
|
-
var location = useLocation();
|
|
37
|
-
var _useTranslation = useTranslation(),
|
|
38
|
-
t = _useTranslation.t;
|
|
39
|
-
useEffect(function () {
|
|
40
|
-
isAppSwitcherOpen && setIsAppSwitcherOpen(false);
|
|
41
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
42
|
-
}, [location]);
|
|
43
|
-
var productName = globalProps.appName.substr(5).toLowerCase();
|
|
44
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
45
|
-
"data-testid": "sidebar-container",
|
|
46
|
-
className: classnames("neeto-molecules-sidebar__wrapper", {
|
|
47
|
-
"neeto-molecules-sidebar__wrapper--collapsed": isSidebarCollapsed
|
|
48
|
-
})
|
|
49
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
50
|
-
className: "neeto-molecules-sidebar neeto-ui-flex neeto-ui-flex-col neeto-ui-flex-shrink-0 neeto-ui-overflow-y-auto neeto-ui-overflow-x-hidden",
|
|
51
|
-
"data-cy": "sidebar-wrapper",
|
|
52
|
-
"data-testid": "sidebar"
|
|
53
|
-
}, /*#__PURE__*/React.createElement(Header, {
|
|
54
|
-
customLogo: customLogo
|
|
55
|
-
}), /*#__PURE__*/React.createElement(Links, {
|
|
56
|
-
navLinks: navLinks
|
|
57
|
-
}), /*#__PURE__*/React.createElement(Footer, {
|
|
58
|
-
extraTopLinks: extraTopLinks,
|
|
59
|
-
helpLinkOverrides: helpLinkOverrides,
|
|
60
|
-
profileInfoOverrides: profileInfoOverrides,
|
|
61
|
-
showAppSwitcher: showAppSwitcher,
|
|
62
|
-
onAppSwitcherToggle: function onAppSwitcherToggle() {
|
|
63
|
-
return setIsAppSwitcherOpen(not);
|
|
64
|
-
}
|
|
65
|
-
})), isSidebarCollapsed && /*#__PURE__*/React.createElement("div", {
|
|
66
|
-
className: "neeto-molecules-sidebar__toggler-hover-area"
|
|
67
|
-
}), /*#__PURE__*/React.createElement(Button, {
|
|
68
|
-
className: "neeto-molecules-sidebar__toggler",
|
|
69
|
-
"data-cy": "neeto-molecules-sidebar-toggler",
|
|
70
|
-
"data-testid": "sidebar-toggleButton",
|
|
71
|
-
style: "text",
|
|
72
|
-
icon: function icon() {
|
|
73
|
-
return /*#__PURE__*/React.createElement(Chevron, {
|
|
74
|
-
style: {
|
|
75
|
-
color: "rgb(var(--neeto-".concat(productName, "-primary))")
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
},
|
|
79
|
-
tooltipProps: {
|
|
80
|
-
content: isSidebarCollapsed ? t("neetoMolecules.sidebar.showMenu") : t("neetoMolecules.sidebar.hideMenu"),
|
|
81
|
-
position: "bottom"
|
|
82
|
-
},
|
|
83
|
-
onClick: function onClick() {
|
|
84
|
-
setIsSidebarCollapsed(!isSidebarCollapsed);
|
|
85
|
-
}
|
|
86
|
-
})), showAppSwitcher && /*#__PURE__*/React.createElement(AppSwitcher, {
|
|
87
|
-
isSidebarCollapsed: isSidebarCollapsed,
|
|
88
|
-
isOpen: isAppSwitcherOpen,
|
|
89
|
-
onClose: function onClose() {
|
|
90
|
-
return setIsAppSwitcherOpen(false);
|
|
91
|
-
}
|
|
92
|
-
}));
|
|
93
|
-
};
|
|
94
|
-
export default Sidebar;
|