@bigbinary/neeto-molecules 4.1.0-beta1 → 4.1.1
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/AuditLogs.js +193 -63
- package/dist/AuditLogs.js.map +1 -1
- package/dist/Breadcrumbs.js +40 -24
- package/dist/Breadcrumbs.js.map +1 -1
- package/dist/BrowserSupport.js +17 -8
- package/dist/BrowserSupport.js.map +1 -1
- package/dist/Builder.js +16 -23
- package/dist/Builder.js.map +1 -1
- package/dist/CalendarView.js +35 -11
- package/dist/CalendarView.js.map +1 -1
- package/dist/CardLayout.js +0 -1
- package/dist/CardLayout.js.map +1 -1
- package/dist/{Chevron-Dtxc2piW.js → Chevron-DOz710Ei.js} +23 -20
- package/dist/Chevron-DOz710Ei.js.map +1 -0
- package/dist/Codeblock.js +3 -5
- package/dist/Codeblock.js.map +1 -1
- package/dist/{Columns-CsOYfWFt.js → Columns-D51hN86M.js} +8 -9
- package/dist/Columns-D51hN86M.js.map +1 -0
- package/dist/Columns.js +1 -1
- package/dist/ConfigurePageSidebar.js +3 -3
- package/dist/ConfigurePageSidebar.js.map +1 -1
- package/dist/ConfirmationModal.js +2 -2
- package/dist/ConfirmationModal.js.map +1 -1
- package/dist/CopyToClipboardButton.js +12 -7
- package/dist/CopyToClipboardButton.js.map +1 -1
- package/dist/DeleteArchiveModal.js +5 -7
- package/dist/DeleteArchiveModal.js.map +1 -1
- package/dist/DeviceIncompatibilityMessage.js +0 -1
- package/dist/DeviceIncompatibilityMessage.js.map +1 -1
- package/dist/DocumentEditor.js +3 -3
- package/dist/DocumentEditor.js.map +1 -1
- package/dist/DynamicVariables.js +5 -7
- package/dist/DynamicVariables.js.map +1 -1
- package/dist/EmailForm.js +107 -124
- package/dist/EmailForm.js.map +1 -1
- package/dist/EmailPreview.js +90 -73
- package/dist/EmailPreview.js.map +1 -1
- package/dist/EmojiPicker.js +6 -1
- package/dist/EmojiPicker.js.map +1 -1
- package/dist/EmojiReactions.js +1 -1
- package/dist/EmojiReactions.js.map +1 -1
- package/dist/ErrorPage.js +7 -5
- package/dist/ErrorPage.js.map +1 -1
- package/dist/FileUpload.js +14 -14
- package/dist/FileUpload.js.map +1 -1
- package/dist/FinderModal.js +61 -74
- package/dist/FinderModal.js.map +1 -1
- package/dist/FloatingActionMenu.js +233 -190
- package/dist/FloatingActionMenu.js.map +1 -1
- package/dist/Header.js +2 -4
- package/dist/Header.js.map +1 -1
- package/dist/HelpPopover.js +2 -6
- package/dist/HelpPopover.js.map +1 -1
- package/dist/IconPicker.js +2 -3
- package/dist/IconPicker.js.map +1 -1
- package/dist/InlineInput.js +6 -2
- package/dist/InlineInput.js.map +1 -1
- package/dist/Insights.js +3 -6
- package/dist/Insights.js.map +1 -1
- package/dist/IntegrationCard.js +10 -12
- package/dist/IntegrationCard.js.map +1 -1
- package/dist/IpRestriction.js +11 -13
- package/dist/IpRestriction.js.map +1 -1
- package/dist/KeyboardShortcuts.js +3 -4
- package/dist/KeyboardShortcuts.js.map +1 -1
- package/dist/LoginPage.js +4 -9
- package/dist/LoginPage.js.map +1 -1
- package/dist/MadeWith.js +1 -2
- package/dist/MadeWith.js.map +1 -1
- package/dist/MenuBar.js +10 -8
- package/dist/MenuBar.js.map +1 -1
- package/dist/Metadata.js +5 -8
- package/dist/Metadata.js.map +1 -1
- package/dist/MobilePreviewHeader.js +1 -1
- package/dist/MobilePreviewHeader.js.map +1 -1
- package/dist/MoreDropdown.js +1 -2
- package/dist/MoreDropdown.js.map +1 -1
- package/dist/NavigationHeader.js +4 -8
- package/dist/NavigationHeader.js.map +1 -1
- package/dist/NeetoWidget.js +2 -3
- package/dist/NeetoWidget.js.map +1 -1
- package/dist/Onboarding.js +2 -10
- package/dist/Onboarding.js.map +1 -1
- package/dist/OptionFields.js +6 -22
- package/dist/OptionFields.js.map +1 -1
- package/dist/PageLoader.js +1 -1
- package/dist/PageLoader.js.map +1 -1
- package/dist/PhoneNumber.js +0 -1
- package/dist/PhoneNumber.js.map +1 -1
- package/dist/ProductEmbed.js +35 -36
- package/dist/ProductEmbed.js.map +1 -1
- package/dist/PublishBlock.js +11 -22
- package/dist/PublishBlock.js.map +1 -1
- package/dist/PublishYourItem.js +2 -2
- package/dist/PublishYourItem.js.map +1 -1
- package/dist/Rename.js +18 -17
- package/dist/Rename.js.map +1 -1
- package/dist/Schedule.js +120 -69
- package/dist/Schedule.js.map +1 -1
- package/dist/SendToFields.js +31 -23
- package/dist/SendToFields.js.map +1 -1
- package/dist/SessionEnvironment.js +2 -8
- package/dist/SessionEnvironment.js.map +1 -1
- package/dist/Settings.js +8 -9
- package/dist/Settings.js.map +1 -1
- package/dist/ShareRecordingPane.js +69 -52
- package/dist/ShareRecordingPane.js.map +1 -1
- package/dist/ShareViaEmail.js +6 -9
- package/dist/ShareViaEmail.js.map +1 -1
- package/dist/ShareViaLink.js +6 -22
- package/dist/ShareViaLink.js.map +1 -1
- package/dist/Sidebar.js +24 -20
- package/dist/Sidebar.js.map +1 -1
- package/dist/StatusDropdown.js +7 -10
- package/dist/StatusDropdown.js.map +1 -1
- package/dist/StickyRibbonsContainer.js +3 -3
- package/dist/StickyRibbonsContainer.js.map +1 -1
- package/dist/SubHeader.js +12 -15
- package/dist/SubHeader.js.map +1 -1
- package/dist/Taxonomy.js +4 -6
- package/dist/Taxonomy.js.map +1 -1
- package/dist/ToggleFeatureCard.js +18 -24
- package/dist/ToggleFeatureCard.js.map +1 -1
- package/dist/VersionHistory.js +1 -3
- package/dist/VersionHistory.js.map +1 -1
- package/dist/cjs/AuditLogs.js +190 -60
- package/dist/cjs/AuditLogs.js.map +1 -1
- package/dist/cjs/Breadcrumbs.js +40 -24
- package/dist/cjs/Breadcrumbs.js.map +1 -1
- package/dist/cjs/BrowserSupport.js +17 -8
- package/dist/cjs/BrowserSupport.js.map +1 -1
- package/dist/cjs/Builder.js +16 -23
- package/dist/cjs/Builder.js.map +1 -1
- package/dist/cjs/CalendarView.js +35 -11
- package/dist/cjs/CalendarView.js.map +1 -1
- package/dist/cjs/CardLayout.js +0 -1
- package/dist/cjs/CardLayout.js.map +1 -1
- package/dist/cjs/{Chevron-DzdbGPJI.js → Chevron-brQURuT5.js} +23 -20
- package/dist/cjs/Chevron-brQURuT5.js.map +1 -0
- package/dist/cjs/Codeblock.js +3 -5
- package/dist/cjs/Codeblock.js.map +1 -1
- package/dist/cjs/{Columns-DHPNrFgq.js → Columns-7xltEL2z.js} +8 -9
- package/dist/cjs/Columns-7xltEL2z.js.map +1 -0
- package/dist/cjs/Columns.js +1 -1
- package/dist/cjs/ConfigurePageSidebar.js +3 -3
- package/dist/cjs/ConfigurePageSidebar.js.map +1 -1
- package/dist/cjs/ConfirmationModal.js +2 -2
- package/dist/cjs/ConfirmationModal.js.map +1 -1
- package/dist/cjs/CopyToClipboardButton.js +11 -6
- package/dist/cjs/CopyToClipboardButton.js.map +1 -1
- package/dist/cjs/DeleteArchiveModal.js +5 -7
- package/dist/cjs/DeleteArchiveModal.js.map +1 -1
- package/dist/cjs/DeviceIncompatibilityMessage.js +0 -1
- package/dist/cjs/DeviceIncompatibilityMessage.js.map +1 -1
- package/dist/cjs/DocumentEditor.js +3 -3
- package/dist/cjs/DocumentEditor.js.map +1 -1
- package/dist/cjs/DynamicVariables.js +5 -7
- package/dist/cjs/DynamicVariables.js.map +1 -1
- package/dist/cjs/EmailForm.js +105 -122
- package/dist/cjs/EmailForm.js.map +1 -1
- package/dist/cjs/EmailPreview.js +108 -73
- package/dist/cjs/EmailPreview.js.map +1 -1
- package/dist/cjs/EmojiPicker.js +6 -1
- package/dist/cjs/EmojiPicker.js.map +1 -1
- package/dist/cjs/EmojiReactions.js +1 -1
- package/dist/cjs/EmojiReactions.js.map +1 -1
- package/dist/cjs/ErrorPage.js +7 -5
- package/dist/cjs/ErrorPage.js.map +1 -1
- package/dist/cjs/FileUpload.js +13 -13
- package/dist/cjs/FileUpload.js.map +1 -1
- package/dist/cjs/FinderModal.js +59 -72
- package/dist/cjs/FinderModal.js.map +1 -1
- package/dist/cjs/FloatingActionMenu.js +232 -189
- package/dist/cjs/FloatingActionMenu.js.map +1 -1
- package/dist/cjs/Header.js +2 -4
- package/dist/cjs/Header.js.map +1 -1
- package/dist/cjs/HelpPopover.js +2 -6
- package/dist/cjs/HelpPopover.js.map +1 -1
- package/dist/cjs/IconPicker.js +2 -3
- package/dist/cjs/IconPicker.js.map +1 -1
- package/dist/cjs/InlineInput.js +6 -2
- package/dist/cjs/InlineInput.js.map +1 -1
- package/dist/cjs/Insights.js +3 -6
- package/dist/cjs/Insights.js.map +1 -1
- package/dist/cjs/IntegrationCard.js +9 -11
- package/dist/cjs/IntegrationCard.js.map +1 -1
- package/dist/cjs/IpRestriction.js +11 -13
- package/dist/cjs/IpRestriction.js.map +1 -1
- package/dist/cjs/KeyboardShortcuts.js +3 -4
- package/dist/cjs/KeyboardShortcuts.js.map +1 -1
- package/dist/cjs/LoginPage.js +4 -9
- package/dist/cjs/LoginPage.js.map +1 -1
- package/dist/cjs/MadeWith.js +1 -2
- package/dist/cjs/MadeWith.js.map +1 -1
- package/dist/cjs/MenuBar.js +10 -8
- package/dist/cjs/MenuBar.js.map +1 -1
- package/dist/cjs/Metadata.js +5 -8
- package/dist/cjs/Metadata.js.map +1 -1
- package/dist/cjs/MobilePreviewHeader.js +1 -1
- package/dist/cjs/MobilePreviewHeader.js.map +1 -1
- package/dist/cjs/MoreDropdown.js +1 -2
- package/dist/cjs/MoreDropdown.js.map +1 -1
- package/dist/cjs/NavigationHeader.js +4 -8
- package/dist/cjs/NavigationHeader.js.map +1 -1
- package/dist/cjs/NeetoWidget.js +2 -3
- package/dist/cjs/NeetoWidget.js.map +1 -1
- package/dist/cjs/Onboarding.js +2 -10
- package/dist/cjs/Onboarding.js.map +1 -1
- package/dist/cjs/OptionFields.js +6 -22
- package/dist/cjs/OptionFields.js.map +1 -1
- package/dist/cjs/PageLoader.js +1 -1
- package/dist/cjs/PageLoader.js.map +1 -1
- package/dist/cjs/PhoneNumber.js +0 -1
- package/dist/cjs/PhoneNumber.js.map +1 -1
- package/dist/cjs/ProductEmbed.js +35 -36
- package/dist/cjs/ProductEmbed.js.map +1 -1
- package/dist/cjs/PublishBlock.js +11 -22
- package/dist/cjs/PublishBlock.js.map +1 -1
- package/dist/cjs/PublishYourItem.js +2 -2
- package/dist/cjs/PublishYourItem.js.map +1 -1
- package/dist/cjs/Rename.js +18 -17
- package/dist/cjs/Rename.js.map +1 -1
- package/dist/cjs/Schedule.js +119 -68
- package/dist/cjs/Schedule.js.map +1 -1
- package/dist/cjs/SendToFields.js +31 -23
- package/dist/cjs/SendToFields.js.map +1 -1
- package/dist/cjs/SessionEnvironment.js +2 -8
- package/dist/cjs/SessionEnvironment.js.map +1 -1
- package/dist/cjs/Settings.js +8 -9
- package/dist/cjs/Settings.js.map +1 -1
- package/dist/cjs/ShareRecordingPane.js +68 -51
- package/dist/cjs/ShareRecordingPane.js.map +1 -1
- package/dist/cjs/ShareViaEmail.js +6 -9
- package/dist/cjs/ShareViaEmail.js.map +1 -1
- package/dist/cjs/ShareViaLink.js +6 -22
- package/dist/cjs/ShareViaLink.js.map +1 -1
- package/dist/cjs/Sidebar.js +24 -20
- package/dist/cjs/Sidebar.js.map +1 -1
- package/dist/cjs/StatusDropdown.js +6 -9
- package/dist/cjs/StatusDropdown.js.map +1 -1
- package/dist/cjs/StickyRibbonsContainer.js +3 -3
- package/dist/cjs/StickyRibbonsContainer.js.map +1 -1
- package/dist/cjs/SubHeader.js +12 -15
- package/dist/cjs/SubHeader.js.map +1 -1
- package/dist/cjs/Taxonomy.js +4 -6
- package/dist/cjs/Taxonomy.js.map +1 -1
- package/dist/cjs/ToggleFeatureCard.js +17 -23
- package/dist/cjs/ToggleFeatureCard.js.map +1 -1
- package/dist/cjs/VersionHistory.js +1 -3
- package/dist/cjs/VersionHistory.js.map +1 -1
- package/package.json +5 -5
- package/src/translations/ar.json +52 -14
- package/src/translations/bg.json +52 -14
- package/src/translations/ca.json +53 -15
- package/src/translations/cs.json +52 -14
- package/src/translations/da.json +52 -14
- package/src/translations/de.json +52 -14
- package/src/translations/en.json +51 -15
- package/src/translations/es-MX.json +53 -15
- package/src/translations/es.json +52 -14
- package/src/translations/et.json +52 -14
- package/src/translations/fi.json +53 -15
- package/src/translations/fil.json +53 -15
- package/src/translations/fr.json +52 -14
- package/src/translations/he.json +52 -14
- package/src/translations/hi.json +52 -14
- package/src/translations/hr.json +53 -15
- package/src/translations/id.json +53 -15
- package/src/translations/it.json +53 -15
- package/src/translations/ja.json +53 -15
- package/src/translations/ko.json +52 -14
- package/src/translations/nl.json +53 -15
- package/src/translations/pl.json +53 -15
- package/src/translations/pt-BR.json +53 -15
- package/src/translations/pt.json +53 -15
- package/src/translations/ro.json +53 -15
- package/src/translations/ru.json +51 -13
- package/src/translations/sk.json +52 -14
- package/src/translations/sl.json +52 -14
- package/src/translations/sv.json +53 -15
- package/src/translations/th.json +53 -15
- package/src/translations/tr.json +53 -15
- package/src/translations/uk.json +51 -13
- package/src/translations/vi.json +50 -12
- package/src/translations/zh-CN.json +50 -12
- package/src/translations/zh-TW.json +50 -12
- package/types/EmailForm.d.ts +5 -3
- package/types/FinderModal.d.ts +0 -8
- package/types/IntegrationCard.d.ts +1 -1
- package/types/Rename.d.ts +2 -0
- package/types/Settings.d.ts +2 -2
- package/types/ShareViaLink.d.ts +2 -2
- package/types/SubHeader.d.ts +2 -2
- package/types/ToggleFeatureCard.d.ts +3 -3
- package/dist/Chevron-Dtxc2piW.js.map +0 -1
- package/dist/Columns-CsOYfWFt.js.map +0 -1
- package/dist/cjs/Chevron-DzdbGPJI.js.map +0 -1
- package/dist/cjs/Columns-DHPNrFgq.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CalendarView.js","sources":["../../src/components/CalendarView/constants.js","../../src/components/CalendarView/utils.js","../../src/components/CalendarView/CustomDatePicker.jsx","../../src/components/CalendarView/Header.jsx","../../src/components/CalendarView/index.jsx"],"sourcesContent":["import { t } from \"i18next\";\n\nconst WEEKLY_VIEW = t(\"neetoMolecules.calendarView.weekly\");\nconst MONTHLY_VIEW = t(\"neetoMolecules.calendarView.monthly\");\nconst DAILY_VIEW = t(\"neetoMolecules.calendarView.daily\");\n\nexport const VIEW_OPTIONS = {\n [DAILY_VIEW]: {\n label: DAILY_VIEW,\n fullCalendarView: \"timeGridDay\",\n picker: \"day\",\n },\n [WEEKLY_VIEW]: {\n label: WEEKLY_VIEW,\n fullCalendarView: \"timeGridWeek\",\n picker: \"week\",\n },\n [MONTHLY_VIEW]: {\n label: MONTHLY_VIEW,\n fullCalendarView: \"dayGridMonth\",\n picker: \"month\",\n },\n};\n","import { dayjs } from \"neetocommons/utils\";\n\nconst getWeekString = ({\n date,\n isStartOfWeek = true,\n showMonth = false,\n showYear = false,\n}) =>\n `${showMonth || isStartOfWeek ? date.format(\"MMM\") : \"\"} ${date.date()} ${\n showYear || !isStartOfWeek ? date.format(\"YYYY\") : \"\"\n }`;\n\nexport const getStartOfWeek = date => dayjs(date).startOf(\"week\");\n\nexport const getEndOfWeek = date => dayjs(date).endOf(\"week\");\n\nexport const getFormattedMonthStr = date => date.format(\"MMM YYYY\");\n\nexport const getFormattedWeekRangeStr = date => {\n const startOfWeek = getStartOfWeek(date);\n const endOfWeek = getEndOfWeek(date);\n\n const shouldShowMonthsSeparately = startOfWeek.month() !== endOfWeek.month();\n const shouldShowYearsSeparately = startOfWeek.year() !== endOfWeek.year();\n\n const startOfWeekStr = getWeekString({\n date: startOfWeek,\n showMonth: shouldShowMonthsSeparately,\n showYear: shouldShowYearsSeparately,\n });\n\n const endOfWeekStr = getWeekString({\n date: endOfWeek,\n isStartOfWeek: false,\n showMonth: shouldShowMonthsSeparately,\n showYear: shouldShowYearsSeparately,\n });\n\n return `${startOfWeekStr} - ${endOfWeekStr}`;\n};\n\nexport const getFormattedDayStr = date => date.format(\"DD MMM YYYY\");\n\nexport const getFormattedRangeStr = (date, picker) => {\n const formatFunctions = {\n month: getFormattedMonthStr,\n week: getFormattedWeekRangeStr,\n day: getFormattedDayStr,\n };\n const selectedFormatter = formatFunctions[picker];\n\n return selectedFormatter(date);\n};\n\nexport const mergeRefs =\n (...refs) =>\n node =>\n refs\n .filter(Boolean)\n .forEach(ref =>\n typeof ref === \"function\" ? ref(node) : (ref.current = node)\n );\n","import { useRef, useState } from \"react\";\n\nimport { dayjs } from \"neetocommons/utils\";\nimport { Down, Left, Right } from \"neetoicons\";\nimport { Typography, Button, DatePicker } from \"neetoui\";\n\nimport { getFormattedRangeStr } from \"./utils\";\n\nconst CustomDatePicker = ({\n selectedDate,\n setSelectedDate,\n picker,\n validDates,\n ...otherProps\n}) => {\n const [isOpen, setIsOpen] = useState(false);\n\n const datePickerRef = useRef(null);\n const buttonRef = useRef(null);\n\n const selectedRangeStr = getFormattedRangeStr(selectedDate, picker);\n\n const { start, end } = validDates;\n\n const isDateLessThanStart =\n start && selectedDate.isSameOrBefore(dayjs(start), picker);\n\n const isDateGreaterThanEnd =\n end && selectedDate.isSameOrAfter(dayjs(end), picker);\n\n const onPrevious = () =>\n setSelectedDate(selectedDate => selectedDate.subtract(1, picker));\n\n const onNext = () =>\n setSelectedDate(selectedDate => selectedDate.add(1, picker));\n\n const onToday = () => setSelectedDate(dayjs());\n\n const getDisabledDates = date => {\n if (!date) return false;\n\n return (start && date <= start) || (end && date >= end);\n };\n\n const handleButtonMouseDown = e => {\n if (!(buttonRef.current && buttonRef.current.contains(e.target))) return;\n e.stopPropagation();\n if (isOpen) datePickerRef.current.focus();\n };\n\n return (\n <div className=\"flex items-center justify-start gap-x-4\">\n <Button\n data-cy=\"neeto-molecules-calendar-view-today-button\"\n label=\"Today\"\n style=\"secondary\"\n onClick={onToday}\n />\n <div className=\"flex\">\n <Button\n className=\"me-1\"\n data-cy=\"neeto-molecules-calendar-view-previous-button\"\n data-testid=\"neeto-molecules-calendar-view-previous-button\"\n disabled={isDateLessThanStart}\n icon={() => <Left className=\"rtl:scale-x-[-1]\" size={20} />}\n style=\"text\"\n onClick={onPrevious}\n />\n <Button\n className=\"min-w-52 justify-center\"\n data-cy=\"neeto-molecules-calendar-view-date-picker-button\"\n icon={Down}\n ref={buttonRef}\n style=\"text\"\n onClick={() => setIsOpen(isOpen => !isOpen)}\n onMouseDown={handleButtonMouseDown}\n >\n <Typography\n data-cy=\"neeto-molecules-calendar-view-date-picker-button-label\"\n style=\"h5\"\n >\n {selectedRangeStr}\n </Typography>\n </Button>\n <DatePicker\n className=\"invisible w-0 px-0\"\n defaultValue={selectedDate}\n disabledDate={getDisabledDates}\n open={isOpen}\n placement=\"topRight\"\n ref={datePickerRef}\n value={selectedDate}\n onChange={setSelectedDate}\n onOpenChange={setIsOpen}\n {...{ picker, ...otherProps }}\n />\n <Button\n className=\"ms-1\"\n data-cy=\"neeto-molecules-calendar-view-next-button\"\n disabled={isDateGreaterThanEnd}\n icon={() => <Right className=\"rtl:scale-x-[-1]\" size={20} />}\n style=\"text\"\n onClick={onNext}\n />\n </div>\n </div>\n );\n};\n\nexport default CustomDatePicker;\n","import { useEffect } from \"react\";\n\nimport { capitalize } from \"neetocist\";\nimport { Dropdown } from \"neetoui\";\nimport { prop, values } from \"ramda\";\n\nimport CustomDatePicker from \"./CustomDatePicker\";\n\nconst Header = ({\n calendarRef,\n selectedView,\n setSelectedView,\n setSelectedDate,\n selectedDate,\n calendarViewOptions,\n validDates,\n}) => {\n const { Menu, MenuItem } = Dropdown;\n\n const handleViewSelection = option => {\n setSelectedView(option);\n calendarRef.current.calendar.changeView(option.fullCalendarView);\n };\n\n const navigateToSelectedDate = () =>\n calendarRef?.current?.calendar?.gotoDate(selectedDate.format(\"YYYY-MM-DD\"));\n\n useEffect(() => {\n setTimeout(navigateToSelectedDate);\n }, [selectedDate]);\n\n return (\n <div className=\"flex gap-x-4\">\n <CustomDatePicker\n {...{ selectedDate, setSelectedDate, validDates }}\n getPopupContainer={prop(\"parentNode\")}\n picker={selectedView.picker}\n />\n {Object.keys(calendarViewOptions).length > 1 && (\n <Dropdown\n buttonProps={{ \"data-testid\": \"calendar-view-dropdown\" }}\n buttonStyle=\"secondary\"\n label={capitalize(selectedView.label)}\n >\n <Menu>\n {values(calendarViewOptions).map((option, idx) => (\n <MenuItem.Button\n isActive={selectedView === option}\n key={idx}\n onClick={() => handleViewSelection(option)}\n >\n {capitalize(option.label)}\n </MenuItem.Button>\n ))}\n </Menu>\n </Dropdown>\n )}\n </div>\n );\n};\n\nexport default Header;\n","import { forwardRef, useRef, useState, useEffect } from \"react\";\n\nimport dayGridPlugin from \"@fullcalendar/daygrid\";\nimport interactionPlugin from \"@fullcalendar/interaction\";\nimport FullCalendar from \"@fullcalendar/react\";\nimport timeGridPlugin from \"@fullcalendar/timegrid\";\nimport { noop } from \"neetocist\";\nimport { dayjs } from \"neetocommons/utils\";\nimport { Typography } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { prop } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport SubHeader from \"components/SubHeader\";\n\nimport \"./calendar-view.scss\";\nimport { VIEW_OPTIONS } from \"./constants\";\nimport Header from \"./Header\";\nimport { mergeRefs } from \"./utils\";\n\nconst CalendarView = forwardRef(\n (\n {\n viewOptions = VIEW_OPTIONS,\n events = [],\n handleDateClick = noop,\n handleEventClick = noop,\n eventClassNames = \"\",\n dayCellClassNames = \"\",\n validDates = { start: null, end: null },\n onDateChange = noop,\n dayMaxEvents,\n eventMaxStack,\n hideHeader = false,\n ...otherProps\n },\n ref\n ) => {\n const calendarViewOptions = viewOptions || VIEW_OPTIONS;\n\n const defaultView =\n Object.values(calendarViewOptions).find(prop(\"default\")) ||\n calendarViewOptions[Object.keys(calendarViewOptions)[0]];\n\n const [selectedView, setSelectedView] = useState(defaultView);\n\n const [selectedDate, setSelectedDate] = useState(dayjs());\n\n const { t } = useTranslation();\n\n const handleDateChange = date => {\n setSelectedDate(prevDate => {\n const newDate = typeof date === \"function\" ? date(prevDate) : date;\n onDateChange(newDate);\n\n return newDate;\n });\n };\n const calendarWrapperRef = useRef(null);\n const calendarRef = useRef();\n\n useEffect(() => {\n const calendarApi = calendarRef.current?.getApi?.();\n const wrapperElement = calendarWrapperRef.current;\n\n if (!calendarApi || !wrapperElement) return undefined;\n\n const handleResize = () => {\n calendarApi.updateSize();\n };\n\n const observer = new ResizeObserver(handleResize);\n\n observer.observe(wrapperElement);\n\n return () => {\n observer.disconnect();\n };\n }, []);\n\n return (\n <div\n className=\"flex-col\"\n data-testid=\"calendar-view\"\n ref={calendarWrapperRef}\n >\n {!hideHeader && (\n <SubHeader\n leftActionBlock={\n <Typography style=\"h2\">\n {selectedDate.format(\"MMMM, YYYY\")}\n </Typography>\n }\n rightActionBlock={\n <Header\n {...{\n calendarRef,\n calendarViewOptions,\n selectedDate,\n selectedView,\n setSelectedDate,\n setSelectedView,\n validDates,\n }}\n setSelectedDate={handleDateChange}\n />\n }\n />\n )}\n <FullCalendar\n expandRows\n allDayText={t(\"neetoMolecules.calendarView.allDay\")}\n dateClick={handleDateClick}\n dayHeaderClassNames=\"p-2\"\n displayEventTime={false}\n eventClick={handleEventClick}\n headerToolbar={false}\n height=\"auto\"\n initialView={selectedView.fullCalendarView}\n plugins={[dayGridPlugin, timeGridPlugin, interactionPlugin]}\n ref={mergeRefs(ref, calendarRef)}\n {...{\n dayCellClassNames,\n dayMaxEvents,\n eventClassNames,\n eventMaxStack,\n events,\n ...otherProps,\n }}\n />\n </div>\n );\n }\n);\n\nCalendarView.displayName = \"CalendarView\";\n\nCalendarView.propTypes = {\n /**\n * Views to be listed in the dropdown. The default selected view can be set by adding `default: true` to the required view.\n */\n viewOptions: PropTypes.object,\n /**\n * An array of event objects that will be displayed on the calendar.\n */\n events: PropTypes.array,\n /**\n * Function to be triggered when the user clicks on a date or a time.\n */\n handleDateClick: PropTypes.func,\n /**\n * Function to be triggered when the user clicks an event.\n */\n handleEventClick: PropTypes.func,\n /**\n * A className input for adding classNames to the outermost event element.\n */\n eventClassNames: PropTypes.string,\n /**\n * A className input for adding classNames to the <td> cell.\n */\n dayCellClassNames: PropTypes.string,\n /**\n * In dayGrid view, the max number of events within a given day, not counting the +more link.\n */\n dayMaxEvents: PropTypes.number,\n /**\n * For timeline view, the maximum number of events that stack top-to-bottom. For timeGrid view, the maximum number of events that stack left-to-right.\n */\n eventMaxStack: PropTypes.number,\n /**\n * This function will be triggered with the new selected date passed as argument\n */\n onDateChange: PropTypes.func,\n /**\n * An object containing the start and end dates in which the range given is the valid range of selectable dates.\n */\n validDates: PropTypes.shape({\n start: PropTypes.instanceOf(Date),\n end: PropTypes.instanceOf(Date),\n }),\n /**\n * This prop can be used to hide the header\n */\n hideHeader: PropTypes.bool,\n};\n\nexport default CalendarView;\n"],"names":["WEEKLY_VIEW","t","MONTHLY_VIEW","DAILY_VIEW","VIEW_OPTIONS","_defineProperty","label","fullCalendarView","picker","getWeekString","_ref","date","_ref$isStartOfWeek","isStartOfWeek","_ref$showMonth","showMonth","_ref$showYear","showYear","concat","format","getStartOfWeek","dayjs","startOf","getEndOfWeek","endOf","getFormattedMonthStr","getFormattedWeekRangeStr","startOfWeek","endOfWeek","shouldShowMonthsSeparately","month","shouldShowYearsSeparately","year","startOfWeekStr","endOfWeekStr","getFormattedDayStr","getFormattedRangeStr","formatFunctions","week","day","selectedFormatter","mergeRefs","_len","arguments","length","refs","Array","_key","node","filter","Boolean","forEach","ref","current","CustomDatePicker","selectedDate","setSelectedDate","validDates","otherProps","_objectWithoutProperties","_excluded","_useState","useState","_useState2","_slicedToArray","isOpen","setIsOpen","datePickerRef","useRef","buttonRef","selectedRangeStr","start","end","isDateLessThanStart","isSameOrBefore","isDateGreaterThanEnd","isSameOrAfter","onPrevious","subtract","onNext","add","onToday","getDisabledDates","handleButtonMouseDown","e","contains","target","stopPropagation","focus","_jsxs","className","children","_jsx","Button","style","onClick","disabled","icon","Left","size","Down","onMouseDown","Typography","DatePicker","_objectSpread","defaultValue","disabledDate","open","placement","value","onChange","onOpenChange","Right","Header","calendarRef","selectedView","setSelectedView","calendarViewOptions","Menu","Dropdown","MenuItem","handleViewSelection","option","calendar","changeView","navigateToSelectedDate","_calendarRef$current","gotoDate","useEffect","setTimeout","getPopupContainer","prop","Object","keys","buttonProps","buttonStyle","capitalize","values","map","idx","isActive","CalendarView","forwardRef","_ref$viewOptions","viewOptions","_ref$events","events","_ref$handleDateClick","handleDateClick","noop","_ref$handleEventClick","handleEventClick","_ref$eventClassNames","eventClassNames","_ref$dayCellClassName","dayCellClassNames","_ref$validDates","_ref$onDateChange","onDateChange","dayMaxEvents","eventMaxStack","_ref$hideHeader","hideHeader","defaultView","find","_useState3","_useState4","_useTranslation","useTranslation","handleDateChange","prevDate","newDate","calendarWrapperRef","_calendarRef$current$","calendarApi","getApi","call","wrapperElement","undefined","handleResize","updateSize","observer","ResizeObserver","observe","disconnect","SubHeader","leftActionBlock","rightActionBlock","FullCalendar","expandRows","allDayText","dateClick","dayHeaderClassNames","displayEventTime","eventClick","headerToolbar","height","initialView","plugins","dayGridPlugin","timeGridPlugin","interactionPlugin","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAMA,WAAW,GAAGC,SAAC,CAAC,oCAAoC,CAAC;AAC3D,IAAMC,YAAY,GAAGD,SAAC,CAAC,qCAAqC,CAAC;AAC7D,IAAME,UAAU,GAAGF,SAAC,CAAC,mCAAmC,CAAC;AAElD,IAAMG,YAAY,GAAAC,eAAA,CAAAA,eAAA,CAAAA,eAAA,CAAA,EAAA,EACtBF,UAAU,EAAG;AACZG,EAAAA,KAAK,EAAEH,UAAU;AACjBI,EAAAA,gBAAgB,EAAE,aAAa;AAC/BC,EAAAA,MAAM,EAAE;AACV,CAAC,CAAA,EACAR,WAAW,EAAG;AACbM,EAAAA,KAAK,EAAEN,WAAW;AAClBO,EAAAA,gBAAgB,EAAE,cAAc;AAChCC,EAAAA,MAAM,EAAE;AACV,CAAC,CAAA,EACAN,YAAY,EAAG;AACdI,EAAAA,KAAK,EAAEJ,YA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,GACC,CAAC;AAEV,CACF;AAEAmF,YAAY,CAAC6D,WAAW,GAAG,cAAc;;;;"}
|
|
1
|
+
{"version":3,"file":"CalendarView.js","sources":["../../src/components/CalendarView/constants.js","../../src/components/CalendarView/utils.js","../../src/components/CalendarView/CustomDatePicker.jsx","../../src/components/CalendarView/Header.jsx","../../src/components/CalendarView/index.jsx"],"sourcesContent":["import { t } from \"i18next\";\n\nconst WEEKLY_VIEW = t(\"neetoMolecules.calendarView.weekly\");\nconst MONTHLY_VIEW = t(\"neetoMolecules.calendarView.monthly\");\nconst DAILY_VIEW = t(\"neetoMolecules.calendarView.daily\");\n\nexport const VIEW_OPTIONS = {\n [DAILY_VIEW]: {\n label: DAILY_VIEW,\n fullCalendarView: \"timeGridDay\",\n picker: \"day\",\n },\n [WEEKLY_VIEW]: {\n label: WEEKLY_VIEW,\n fullCalendarView: \"timeGridWeek\",\n picker: \"week\",\n },\n [MONTHLY_VIEW]: {\n label: MONTHLY_VIEW,\n fullCalendarView: \"dayGridMonth\",\n picker: \"month\",\n },\n};\n","import { dayjs } from \"neetocommons/utils\";\n\nconst getWeekString = ({\n date,\n isStartOfWeek = true,\n showMonth = false,\n showYear = false,\n}) =>\n `${showMonth || isStartOfWeek ? date.format(\"MMM\") : \"\"} ${date.date()} ${\n showYear || !isStartOfWeek ? date.format(\"YYYY\") : \"\"\n }`;\n\nexport const getStartOfWeek = date => dayjs(date).startOf(\"week\");\n\nexport const getEndOfWeek = date => dayjs(date).endOf(\"week\");\n\nexport const getFormattedMonthStr = date => date.format(\"MMM YYYY\");\n\nexport const getFormattedWeekRangeStr = date => {\n const startOfWeek = getStartOfWeek(date);\n const endOfWeek = getEndOfWeek(date);\n\n const shouldShowMonthsSeparately = startOfWeek.month() !== endOfWeek.month();\n const shouldShowYearsSeparately = startOfWeek.year() !== endOfWeek.year();\n\n const startOfWeekStr = getWeekString({\n date: startOfWeek,\n showMonth: shouldShowMonthsSeparately,\n showYear: shouldShowYearsSeparately,\n });\n\n const endOfWeekStr = getWeekString({\n date: endOfWeek,\n isStartOfWeek: false,\n showMonth: shouldShowMonthsSeparately,\n showYear: shouldShowYearsSeparately,\n });\n\n return `${startOfWeekStr} - ${endOfWeekStr}`;\n};\n\nexport const getFormattedDayStr = date => date.format(\"DD MMM YYYY\");\n\nexport const getFormattedRangeStr = (date, picker) => {\n const formatFunctions = {\n month: getFormattedMonthStr,\n week: getFormattedWeekRangeStr,\n day: getFormattedDayStr,\n };\n const selectedFormatter = formatFunctions[picker];\n\n return selectedFormatter(date);\n};\n\nexport const mergeRefs =\n (...refs) =>\n node =>\n refs\n .filter(Boolean)\n .forEach(ref =>\n typeof ref === \"function\" ? ref(node) : (ref.current = node)\n );\n","import { useRef, useState } from \"react\";\n\nimport { dayjs } from \"neetocommons/utils\";\nimport { Down, Left, Right } from \"neetoicons\";\nimport { Typography, Button, DatePicker } from \"neetoui\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { getFormattedRangeStr } from \"./utils\";\n\nconst CustomDatePicker = ({\n selectedDate,\n setSelectedDate,\n picker,\n validDates,\n ...otherProps\n}) => {\n const { t } = useTranslation();\n const [isOpen, setIsOpen] = useState(false);\n\n const datePickerRef = useRef(null);\n const buttonRef = useRef(null);\n\n const selectedRangeStr = getFormattedRangeStr(selectedDate, picker);\n\n const { start, end } = validDates;\n\n const isDateLessThanStart =\n start && selectedDate.isSameOrBefore(dayjs(start), picker);\n\n const isDateGreaterThanEnd =\n end && selectedDate.isSameOrAfter(dayjs(end), picker);\n\n const onPrevious = () =>\n setSelectedDate(selectedDate => selectedDate.subtract(1, picker));\n\n const onNext = () =>\n setSelectedDate(selectedDate => selectedDate.add(1, picker));\n\n const onToday = () => setSelectedDate(dayjs());\n\n const getDisabledDates = date => {\n if (!date) return false;\n\n return (start && date <= start) || (end && date >= end);\n };\n\n const handleButtonMouseDown = e => {\n if (!(buttonRef.current && buttonRef.current.contains(e.target))) return;\n e.stopPropagation();\n if (isOpen) datePickerRef.current.focus();\n };\n\n return (\n <div className=\"flex items-center justify-start gap-x-4\">\n <Button\n aria-label={t(\"neetoMolecules.calendarView.aria.goToToday\")}\n data-testid=\"neeto-molecules-calendar-view-today-button\"\n label={t(\"neetoMolecules.calendarView.today\")}\n style=\"secondary\"\n onClick={onToday}\n />\n <div\n aria-label={t(\"neetoMolecules.calendarView.aria.dateNavigation\")}\n className=\"flex\"\n role=\"group\"\n >\n <Button\n className=\"me-1\"\n data-testid=\"neeto-molecules-calendar-view-previous-button\"\n disabled={isDateLessThanStart}\n icon={() => <Left className=\"rtl:scale-x-[-1]\" size={20} />}\n style=\"text\"\n aria-label={t(\"neetoMolecules.calendarView.aria.previousPeriod\", {\n period: picker,\n })}\n onClick={onPrevious}\n />\n <Button\n aria-expanded={isOpen}\n aria-haspopup=\"dialog\"\n className=\"min-w-52 justify-center\"\n data-testid=\"neeto-molecules-calendar-view-date-picker-button\"\n icon={Down}\n ref={buttonRef}\n style=\"text\"\n aria-label={t(\"neetoMolecules.calendarView.aria.selectDate\", {\n currentDate: selectedRangeStr,\n })}\n onClick={() => setIsOpen(isOpen => !isOpen)}\n onMouseDown={handleButtonMouseDown}\n >\n <Typography\n data-testid=\"neeto-molecules-calendar-view-date-picker-button-label\"\n style=\"h5\"\n >\n {selectedRangeStr}\n </Typography>\n </Button>\n <DatePicker\n className=\"invisible w-0 px-0\"\n defaultValue={selectedDate}\n disabledDate={getDisabledDates}\n open={isOpen}\n placement=\"topRight\"\n ref={datePickerRef}\n value={selectedDate}\n onChange={setSelectedDate}\n onOpenChange={setIsOpen}\n {...{ picker, ...otherProps }}\n />\n <Button\n className=\"ms-1\"\n data-testid=\"neeto-molecules-calendar-view-next-button\"\n disabled={isDateGreaterThanEnd}\n icon={() => <Right className=\"rtl:scale-x-[-1]\" size={20} />}\n style=\"text\"\n aria-label={t(\"neetoMolecules.calendarView.aria.nextPeriod\", {\n period: picker,\n })}\n onClick={onNext}\n />\n </div>\n </div>\n );\n};\n\nexport default CustomDatePicker;\n","import { useEffect } from \"react\";\n\nimport { capitalize } from \"neetocist\";\nimport { Dropdown } from \"neetoui\";\nimport { prop, values } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport CustomDatePicker from \"./CustomDatePicker\";\n\nconst Header = ({\n calendarRef,\n selectedView,\n setSelectedView,\n setSelectedDate,\n selectedDate,\n calendarViewOptions,\n validDates,\n}) => {\n const { t } = useTranslation();\n const { Menu, MenuItem } = Dropdown;\n\n const handleViewSelection = option => {\n setSelectedView(option);\n calendarRef.current.calendar.changeView(option.fullCalendarView);\n };\n\n const navigateToSelectedDate = () =>\n calendarRef?.current?.calendar?.gotoDate(selectedDate.format(\"YYYY-MM-DD\"));\n\n useEffect(() => {\n setTimeout(navigateToSelectedDate);\n }, [selectedDate]);\n\n return (\n <div\n aria-label={t(\"neetoMolecules.calendarView.aria.calendarControls\")}\n className=\"flex gap-x-4\"\n role=\"group\"\n >\n <CustomDatePicker\n {...{ selectedDate, setSelectedDate, validDates }}\n getPopupContainer={prop(\"parentNode\")}\n picker={selectedView.picker}\n />\n {Object.keys(calendarViewOptions).length > 1 && (\n <Dropdown\n buttonStyle=\"secondary\"\n label={capitalize(selectedView.label)}\n buttonProps={{\n \"data-testid\": \"calendar-view-dropdown\",\n \"aria-label\": t(\"neetoMolecules.calendarView.aria.viewSelector\", {\n view: capitalize(selectedView.label),\n }),\n }}\n >\n <Menu>\n {values(calendarViewOptions).map((option, idx) => (\n <MenuItem.Button\n isActive={selectedView === option}\n key={idx}\n onClick={() => handleViewSelection(option)}\n >\n {capitalize(option.label)}\n </MenuItem.Button>\n ))}\n </Menu>\n </Dropdown>\n )}\n </div>\n );\n};\n\nexport default Header;\n","import { forwardRef, useRef, useState, useEffect } from \"react\";\n\nimport dayGridPlugin from \"@fullcalendar/daygrid\";\nimport interactionPlugin from \"@fullcalendar/interaction\";\nimport FullCalendar from \"@fullcalendar/react\";\nimport timeGridPlugin from \"@fullcalendar/timegrid\";\nimport i18next from \"i18next\";\nimport { noop } from \"neetocist\";\nimport { dayjs } from \"neetocommons/utils\";\nimport { Typography } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { prop } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport SubHeader from \"components/SubHeader\";\n\nimport \"./calendar-view.scss\";\nimport { VIEW_OPTIONS } from \"./constants\";\nimport Header from \"./Header\";\nimport { mergeRefs } from \"./utils\";\n\nconst direction = i18next.dir() || \"ltr\";\n\nconst CalendarView = forwardRef(\n (\n {\n viewOptions = VIEW_OPTIONS,\n events = [],\n handleDateClick = noop,\n handleEventClick = noop,\n eventClassNames = \"\",\n dayCellClassNames = \"\",\n validDates = { start: null, end: null },\n onDateChange = noop,\n dayMaxEvents,\n eventMaxStack,\n hideHeader = false,\n ...otherProps\n },\n ref\n ) => {\n const calendarViewOptions = viewOptions || VIEW_OPTIONS;\n\n const defaultView =\n Object.values(calendarViewOptions).find(prop(\"default\")) ||\n calendarViewOptions[Object.keys(calendarViewOptions)[0]];\n\n const [selectedView, setSelectedView] = useState(defaultView);\n\n const [selectedDate, setSelectedDate] = useState(dayjs());\n\n const { t } = useTranslation();\n\n const handleDateChange = date => {\n setSelectedDate(prevDate => {\n const newDate = typeof date === \"function\" ? date(prevDate) : date;\n onDateChange(newDate);\n\n return newDate;\n });\n };\n const calendarWrapperRef = useRef(null);\n const calendarRef = useRef();\n\n useEffect(() => {\n const calendarApi = calendarRef.current?.getApi?.();\n const wrapperElement = calendarWrapperRef.current;\n\n if (!calendarApi || !wrapperElement) return undefined;\n\n const handleResize = () => {\n calendarApi.updateSize();\n };\n\n const observer = new ResizeObserver(handleResize);\n\n observer.observe(wrapperElement);\n\n return () => {\n observer.disconnect();\n };\n }, []);\n\n return (\n <div\n className=\"flex-col\"\n data-testid=\"calendar-view\"\n ref={calendarWrapperRef}\n >\n {!hideHeader && (\n <SubHeader\n leftActionBlock={\n <Typography style=\"h2\">\n {selectedDate.format(\"MMMM, YYYY\")}\n </Typography>\n }\n rightActionBlock={\n <Header\n {...{\n calendarRef,\n calendarViewOptions,\n selectedDate,\n selectedView,\n setSelectedDate,\n setSelectedView,\n validDates,\n }}\n setSelectedDate={handleDateChange}\n />\n }\n />\n )}\n <FullCalendar\n expandRows\n allDayText={t(\"neetoMolecules.calendarView.allDay\")}\n dateClick={handleDateClick}\n dayHeaderClassNames=\"p-2\"\n displayEventTime={false}\n eventClick={handleEventClick}\n headerToolbar={false}\n height=\"auto\"\n initialView={selectedView.fullCalendarView}\n plugins={[dayGridPlugin, timeGridPlugin, interactionPlugin]}\n ref={mergeRefs(ref, calendarRef)}\n {...{\n dayCellClassNames,\n dayMaxEvents,\n direction,\n eventClassNames,\n eventMaxStack,\n events,\n ...otherProps,\n }}\n />\n </div>\n );\n }\n);\n\nCalendarView.displayName = \"CalendarView\";\n\nCalendarView.propTypes = {\n /**\n * Views to be listed in the dropdown. The default selected view can be set by adding `default: true` to the required view.\n */\n viewOptions: PropTypes.object,\n /**\n * An array of event objects that will be displayed on the calendar.\n */\n events: PropTypes.array,\n /**\n * Function to be triggered when the user clicks on a date or a time.\n */\n handleDateClick: PropTypes.func,\n /**\n * Function to be triggered when the user clicks an event.\n */\n handleEventClick: PropTypes.func,\n /**\n * A className input for adding classNames to the outermost event element.\n */\n eventClassNames: PropTypes.string,\n /**\n * A className input for adding classNames to the <td> cell.\n */\n dayCellClassNames: PropTypes.string,\n /**\n * In dayGrid view, the max number of events within a given day, not counting the +more link.\n */\n dayMaxEvents: PropTypes.number,\n /**\n * For timeline view, the maximum number of events that stack top-to-bottom. For timeGrid view, the maximum number of events that stack left-to-right.\n */\n eventMaxStack: PropTypes.number,\n /**\n * This function will be triggered with the new selected date passed as argument\n */\n onDateChange: PropTypes.func,\n /**\n * An object containing the start and end dates in which the range given is the valid range of selectable dates.\n */\n validDates: PropTypes.shape({\n start: PropTypes.instanceOf(Date),\n end: PropTypes.instanceOf(Date),\n }),\n /**\n * This prop can be used to hide the header\n */\n hideHeader: PropTypes.bool,\n};\n\nexport default CalendarView;\n"],"names":["WEEKLY_VIEW","t","MONTHLY_VIEW","DAILY_VIEW","VIEW_OPTIONS","_defineProperty","label","fullCalendarView","picker","getWeekString","_ref","date","_ref$isStartOfWeek","isStartOfWeek","_ref$showMonth","showMonth","_ref$showYear","showYear","concat","format","getStartOfWeek","dayjs","startOf","getEndOfWeek","endOf","getFormattedMonthStr","getFormattedWeekRangeStr","startOfWeek","endOfWeek","shouldShowMonthsSeparately","month","shouldShowYearsSeparately","year","startOfWeekStr","endOfWeekStr","getFormattedDayStr","getFormattedRangeStr","formatFunctions","week","day","selectedFormatter","mergeRefs","_len","arguments","length","refs","Array","_key","node","filter","Boolean","forEach","ref","current","CustomDatePicker","selectedDate","setSelectedDate","validDates","otherProps","_objectWithoutProperties","_excluded","_useTranslation","useTranslation","_useState","useState","_useState2","_slicedToArray","isOpen","setIsOpen","datePickerRef","useRef","buttonRef","selectedRangeStr","start","end","isDateLessThanStart","isSameOrBefore","isDateGreaterThanEnd","isSameOrAfter","onPrevious","subtract","onNext","add","onToday","getDisabledDates","handleButtonMouseDown","e","contains","target","stopPropagation","focus","_jsxs","className","children","_jsx","Button","style","onClick","role","disabled","icon","Left","size","period","Down","currentDate","onMouseDown","Typography","DatePicker","_objectSpread","defaultValue","disabledDate","open","placement","value","onChange","onOpenChange","Right","Header","calendarRef","selectedView","setSelectedView","calendarViewOptions","Menu","Dropdown","MenuItem","handleViewSelection","option","calendar","changeView","navigateToSelectedDate","_calendarRef$current","gotoDate","useEffect","setTimeout","getPopupContainer","prop","Object","keys","buttonStyle","capitalize","buttonProps","view","values","map","idx","isActive","direction","i18next","dir","CalendarView","forwardRef","_ref$viewOptions","viewOptions","_ref$events","events","_ref$handleDateClick","handleDateClick","noop","_ref$handleEventClick","handleEventClick","_ref$eventClassNames","eventClassNames","_ref$dayCellClassName","dayCellClassNames","_ref$validDates","_ref$onDateChange","onDateChange","dayMaxEvents","eventMaxStack","_ref$hideHeader","hideHeader","defaultView","find","_useState3","_useState4","handleDateChange","prevDate","newDate","calendarWrapperRef","_calendarRef$current$","calendarApi","getApi","call","wrapperElement","undefined","handleResize","updateSize","observer","ResizeObserver","observe","disconnect","SubHeader","leftActionBlock","rightActionBlock","FullCalendar","expandRows","allDayText","dateClick","dayHeaderClassNames","displayEventTime","eventClick","headerToolbar","height","initialView","plugins","dayGridPlugin","timeGridPlugin","interactionPlugin","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAMA,WAAW,GAAGC,SAAC,CAAC,oCAAoC,CAAC;AAC3D,IAAMC,YAAY,GAAGD,SAAC,CAAC,qCAAqC,CAAC;AAC7D,IAAME,UAAU,GAAGF,SAAC,CAAC,mCAAmC,CAAC;AAElD,IAAMG,YAAY,GAAAC,eAAA,CAAAA,eAAA,CAAAA,eAAA,CAAA,EAAA,EACtBF,UAAU,EAAG;AACZG,EAAAA,KAAK,EAAEH,UAAU;AACjBI,EAAAA,gBAAgB,EAAE,aAAa;AAC/BC,EAAAA,MAAM,EAAE;AACV,CAAC,CAAA,EACAR,WAAW,EAAG;AACbM,EAAAA,KAAK,EAAEN,WAAW;AAClBO,EAAAA,gBAAgB,EAAE,cAAc;AAChCC,EAAAA,MAAM,EAAE;AACV,CAAC,CAAA,EACAN,YAAY,EAAG;AACdI,EAAAA,KAAK,EAAEJ,YAAY;AACnBK,EAAAA,gBAAgB,EAAE,cAAc;AAChCC,EAAAA,MAAM,EAAE;AACV,CAAC,CACF;;ACpBD,IAAMC,aAAa,GAAG,SAAhBA,aAAaA,CAAAC,IAAA,EAAA;AAAA,EAAA,IACjBC,IAAI,GAAAD,IAAA,CAAJC,IAAI;IAAAC,kBAAA,GAAAF,IAAA,CACJG,aAAa;AAAbA,IAAAA,aAAa,GAAAD,kBAAA,KAAA,MAAA,GAAG,IAAI,GAAAA,kBAAA;IAAAE,cAAA,GAAAJ,IAAA,CACpBK,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAA,MAAA,GAA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B,EAAE,KAAM;AACxBC,MAAAA,UAAU,EAAEzC,gBAAiB;AAC7B0C,MAAAA,aAAa,EAAE,KAAM;AACrBC,MAAAA,MAAM,EAAC,MAAM;MACbC,WAAW,EAAEpF,YAAY,CAACjH,gBAAiB;AAC3CsM,MAAAA,OAAO,EAAE,CAACC,aAAa,EAAEC,cAAc,EAAEC,iBAAiB,CAAE;AAC5D5J,MAAAA,GAAG,EAAEX,SAAS,CAACW,GAAG,EAAEmE,WAAW;AAAE,KAAA,EAAAV,aAAA,CAAA;AAE/BuD,MAAAA,iBAAiB,EAAjBA,iBAAiB;AACjBI,MAAAA,YAAY,EAAZA,YAAY;AACZrB,MAAAA,SAAS,EAATA,SAAS;AACTe,MAAAA,eAAe,EAAfA,eAAe;AACfO,MAAAA,aAAa,EAAbA,aAAa;AACbd,MAAAA,MAAM,EAANA;KAAM,EACHjG,UAAU,EAEhB,CAAC;AAAA,GACC,CAAC;AAEV,CACF;AAEA4F,YAAY,CAAC2D,WAAW,GAAG,cAAc;;;;"}
|
package/dist/cjs/CardLayout.js
CHANGED
|
@@ -21,7 +21,6 @@ var CardLayout = function CardLayout(_ref) {
|
|
|
21
21
|
"data-testid": "neeto-molecules-card-container",
|
|
22
22
|
className: classnames(["neeto-molecules-card__container mx-auto w-full max-w-3xl", containerClassName]),
|
|
23
23
|
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
24
|
-
"data-cy": "neeto-molecules-card",
|
|
25
24
|
"data-testid": "neeto-molecules-card",
|
|
26
25
|
className: classnames(["neeto-molecules-card neeto-ui-border-gray-300 neeto-ui-rounded-lg my-6 w-full border", className]),
|
|
27
26
|
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardLayout.js","sources":["../../src/components/CardLayout/index.jsx"],"sourcesContent":["import classnames from \"classnames\";\nimport { isNotPresent } from \"neetocist\";\nimport { Typography } from \"neetoui\";\nimport PropTypes from \"prop-types\";\n\nconst CardLayout = ({\n className = \"\",\n icon,\n containerClassName = \"\",\n title = null,\n description = null,\n actionBlock,\n children,\n}) => (\n <div\n data-testid=\"neeto-molecules-card-container\"\n className={classnames([\n \"neeto-molecules-card__container mx-auto w-full max-w-3xl\",\n containerClassName,\n ])}\n >\n <div\n data-
|
|
1
|
+
{"version":3,"file":"CardLayout.js","sources":["../../src/components/CardLayout/index.jsx"],"sourcesContent":["import classnames from \"classnames\";\nimport { isNotPresent } from \"neetocist\";\nimport { Typography } from \"neetoui\";\nimport PropTypes from \"prop-types\";\n\nconst CardLayout = ({\n className = \"\",\n icon,\n containerClassName = \"\",\n title = null,\n description = null,\n actionBlock,\n children,\n}) => (\n <div\n data-testid=\"neeto-molecules-card-container\"\n className={classnames([\n \"neeto-molecules-card__container mx-auto w-full max-w-3xl\",\n containerClassName,\n ])}\n >\n <div\n data-testid=\"neeto-molecules-card\"\n className={classnames([\n \"neeto-molecules-card neeto-ui-border-gray-300 neeto-ui-rounded-lg my-6 w-full border\",\n className,\n ])}\n >\n <div className=\"neeto-molecules-card__content p-4 md:p-6\">\n {icon && (\n <div className=\"neeto-molecules-card__icon-wrapper mb-4 w-full text-start\">\n {icon}\n </div>\n )}\n {title && (\n <Typography\n style=\"h2\"\n className={classnames([\n \"mb-2\",\n { \"pb-2\": isNotPresent(description) },\n ])}\n >\n {title}\n </Typography>\n )}\n {description && (\n <Typography className=\"mb-4\" style=\"body1\">\n {description}\n </Typography>\n )}\n {children}\n </div>\n {actionBlock && (\n <div\n className={classnames([\n \"neeto-molecules-card__action-block neeto-ui-bg-gray-50 neeto-ui-rounded-lg sticky bottom-0 w-full rounded-t-none p-4 md:px-6\",\n className,\n ])}\n >\n {actionBlock}\n </div>\n )}\n </div>\n </div>\n);\n\nCardLayout.propTypes = {\n /**\n * To set the title of the card.\n */\n title: PropTypes.string,\n /**\n * To set the description of the card.\n */\n description: PropTypes.node,\n /**\n * To set custom class name to the card.\n */\n className: PropTypes.string,\n /**\n * To set custom class name to the card container.\n */\n containerClassName: PropTypes.string,\n /**\n * To specify the content to be rendered in the card footer.\n */\n actionBlock: PropTypes.node,\n /**\n * To specify the components to be rendered inside the card.\n */\n children: PropTypes.node,\n /**\n * To set the icon of the card.\n */\n icon: PropTypes.node,\n};\n\nexport default CardLayout;\n"],"names":["CardLayout","_ref","_ref$className","className","icon","_ref$containerClassNa","containerClassName","_ref$title","title","_ref$description","description","actionBlock","children","_jsx","classnames","_jsxs","Typography","style","isNotPresent"],"mappings":";;;;;;;AAKA,IAAMA,UAAU,GAAG,SAAbA,UAAUA,CAAAC,IAAA,EAAA;AAAA,EAAA,IAAAC,cAAA,GAAAD,IAAA,CACdE,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAA,MAAA,GAAG,EAAE,GAAAA,cAAA;IACdE,IAAI,GAAAH,IAAA,CAAJG,IAAI;IAAAC,qBAAA,GAAAJ,IAAA,CACJK,kBAAkB;AAAlBA,IAAAA,kBAAkB,GAAAD,qBAAA,KAAA,MAAA,GAAG,EAAE,GAAAA,qBAAA;IAAAE,UAAA,GAAAN,IAAA,CACvBO,KAAK;AAALA,IAAAA,KAAK,GAAAD,UAAA,KAAA,MAAA,GAAG,IAAI,GAAAA,UAAA;IAAAE,gBAAA,GAAAR,IAAA,CACZS,WAAW;AAAXA,IAAAA,WAAW,GAAAD,gBAAA,KAAA,MAAA,GAAG,IAAI,GAAAA,gBAAA;IAClBE,WAAW,GAAAV,IAAA,CAAXU,WAAW;IACXC,QAAQ,GAAAX,IAAA,CAARW,QAAQ;AAAA,EAAA,oBAERC,cAAA,CAAA,KAAA,EAAA;AACE,IAAA,aAAA,EAAY,gCAAgC;IAC5CV,SAAS,EAAEW,UAAU,CAAC,CACpB,0DAA0D,EAC1DR,kBAAkB,CACnB,CAAE;AAAAM,IAAAA,QAAA,eAEHG,eAAA,CAAA,KAAA,EAAA;AACE,MAAA,aAAA,EAAY,sBAAsB;MAClCZ,SAAS,EAAEW,UAAU,CAAC,CACpB,sFAAsF,EACtFX,SAAS,CACV,CAAE;AAAAS,MAAAA,QAAA,gBAEHG,eAAA,CAAA,KAAA,EAAA;AAAKZ,QAAAA,SAAS,EAAC,0CAA0C;QAAAS,QAAA,EAAA,CACtDR,IAAI,iBACHS,cAAA,CAAA,KAAA,EAAA;AAAKV,UAAAA,SAAS,EAAC,2DAA2D;AAAAS,UAAAA,QAAA,EACvER;AAAI,SACF,CACN,EACAI,KAAK,iBACJK,cAAA,CAACG,UAAU,EAAA;AACTC,UAAAA,KAAK,EAAC,IAAI;AACVd,UAAAA,SAAS,EAAEW,UAAU,CAAC,CACpB,MAAM,EACN;YAAE,MAAM,EAAEI,sBAAY,CAACR,WAAW;AAAE,WAAC,CACtC,CAAE;AAAAE,UAAAA,QAAA,EAEFJ;AAAK,SACI,CACb,EACAE,WAAW,iBACVG,cAAA,CAACG,UAAU,EAAA;AAACb,UAAAA,SAAS,EAAC,MAAM;AAACc,UAAAA,KAAK,EAAC,OAAO;AAAAL,UAAAA,QAAA,EACvCF;SACS,CACb,EACAE,QAAQ;AAAA,OACN,CAAC,EACLD,WAAW,iBACVE,cAAA,CAAA,KAAA,EAAA;QACEV,SAAS,EAAEW,UAAU,CAAC,CACpB,8HAA8H,EAC9HX,SAAS,CACV,CAAE;AAAAS,QAAAA,QAAA,EAEFD;AAAW,OACT,CACN;KACE;AAAC,GACH,CAAC;AAAA;;;;"}
|
|
@@ -13,6 +13,7 @@ var reactRouterDom = require('react-router-dom');
|
|
|
13
13
|
var React = require('react');
|
|
14
14
|
var neetoCist = require('@bigbinary/neeto-cist');
|
|
15
15
|
var Segments = require('@bigbinary/neeto-filters-frontend/Segments');
|
|
16
|
+
var Tag = require('@bigbinary/neetoui/Tag');
|
|
16
17
|
var useRegisterNavigationCheckpoint = require('@bigbinary/neeto-commons-frontend/react-utils/useRegisterNavigationCheckpoint');
|
|
17
18
|
var jsxRuntime = require('react/jsx-runtime');
|
|
18
19
|
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
@@ -34,8 +35,8 @@ var SPECIAL_APP_NAMES = {
|
|
|
34
35
|
};
|
|
35
36
|
|
|
36
37
|
var _excluded$1 = ["checkpointKey", "to", "href", "children"];
|
|
37
|
-
function ownKeys$
|
|
38
|
-
function _objectSpread$
|
|
38
|
+
function ownKeys$3(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
39
|
+
function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
39
40
|
var CheckPointNavLinks = function CheckPointNavLinks(_ref) {
|
|
40
41
|
var checkpointKey = _ref.checkpointKey,
|
|
41
42
|
to = _ref.to,
|
|
@@ -45,14 +46,14 @@ var CheckPointNavLinks = function CheckPointNavLinks(_ref) {
|
|
|
45
46
|
var _useNavigationCheckpo = useRegisterNavigationCheckpoint.useNavigationCheckpoints(checkpointKey),
|
|
46
47
|
checkpoint = _useNavigationCheckpo[checkpointKey];
|
|
47
48
|
var LinkElement = href ? "a" : reactRouterDom.NavLink;
|
|
48
|
-
var linkProps = href ? _objectSpread$
|
|
49
|
+
var linkProps = href ? _objectSpread$3({
|
|
49
50
|
href: href,
|
|
50
51
|
key: href
|
|
51
|
-
}, others) : _objectSpread$
|
|
52
|
+
}, others) : _objectSpread$3({
|
|
52
53
|
to: checkpoint || to,
|
|
53
54
|
key: to
|
|
54
55
|
}, others);
|
|
55
|
-
return /*#__PURE__*/jsxRuntime.jsx(LinkElement, _objectSpread$
|
|
56
|
+
return /*#__PURE__*/jsxRuntime.jsx(LinkElement, _objectSpread$3(_objectSpread$3({}, linkProps), {}, {
|
|
56
57
|
children: children
|
|
57
58
|
}));
|
|
58
59
|
};
|
|
@@ -100,6 +101,8 @@ var disableDraggingStyles = function disableDraggingStyles() {
|
|
|
100
101
|
document.body.style.userSelect = "";
|
|
101
102
|
};
|
|
102
103
|
|
|
104
|
+
function ownKeys$2(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
105
|
+
function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
103
106
|
var SubLink = function SubLink(_ref) {
|
|
104
107
|
var to = _ref.to,
|
|
105
108
|
href = _ref.href,
|
|
@@ -110,13 +113,14 @@ var SubLink = function SubLink(_ref) {
|
|
|
110
113
|
count = _ref.count,
|
|
111
114
|
isSectionHeader = _ref.isSectionHeader,
|
|
112
115
|
isCountsLoading = _ref.isCountsLoading,
|
|
113
|
-
|
|
116
|
+
dataTestid = _ref["data-testid"],
|
|
114
117
|
_ref$entity = _ref.entity,
|
|
115
118
|
entity = _ref$entity === void 0 ? "" : _ref$entity,
|
|
116
119
|
_ref$columns = _ref.columns,
|
|
117
120
|
columns = _ref$columns === void 0 ? [] : _ref$columns,
|
|
118
121
|
baseUrl = _ref.baseUrl,
|
|
119
|
-
isActive = _ref.isActive
|
|
122
|
+
isActive = _ref.isActive,
|
|
123
|
+
tag = _ref.tag;
|
|
120
124
|
if (type === SUB_LINK_TYPES.SEGMENTS) {
|
|
121
125
|
return /*#__PURE__*/jsxRuntime.jsx(Segments, {
|
|
122
126
|
baseUrl: baseUrl,
|
|
@@ -125,7 +129,7 @@ var SubLink = function SubLink(_ref) {
|
|
|
125
129
|
isIndependent: false
|
|
126
130
|
});
|
|
127
131
|
}
|
|
128
|
-
var
|
|
132
|
+
var dataTestidPrefix = dataTestid || neetoCist.hyphenate(label);
|
|
129
133
|
var renderCount = function renderCount(count) {
|
|
130
134
|
return count > 999 ? "999+" : count;
|
|
131
135
|
};
|
|
@@ -138,18 +142,18 @@ var SubLink = function SubLink(_ref) {
|
|
|
138
142
|
to: to,
|
|
139
143
|
activeClassName: "active",
|
|
140
144
|
className: "neeto-molecules-sidebar__sublink neeto-ui-flex neeto-ui-items-center neeto-ui-select-none",
|
|
141
|
-
"data-
|
|
145
|
+
"data-testid": "".concat(dataTestidPrefix, "-sub-link"),
|
|
142
146
|
isActive: isSubLinkActive,
|
|
143
|
-
children: [/*#__PURE__*/jsxRuntime.
|
|
144
|
-
className: "neeto-molecules-sidebar__link-sub-label neeto-ui-flex-grow",
|
|
147
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs(Typography, {
|
|
148
|
+
className: "neeto-molecules-sidebar__link-sub-label neeto-ui-flex-grow flex items-center gap-2",
|
|
145
149
|
component: "span",
|
|
146
|
-
"data-
|
|
150
|
+
"data-testid": "".concat(dataTestidPrefix, "-sub-link-label"),
|
|
147
151
|
style: "body2",
|
|
148
|
-
children: label
|
|
152
|
+
children: [label, tag && /*#__PURE__*/jsxRuntime.jsx(Tag, _objectSpread$2({}, tag))]
|
|
149
153
|
}), /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
150
154
|
className: "neeto-molecules-sidebar__link-sub-count neeto-ui-flex-shrink-0",
|
|
151
155
|
component: "span",
|
|
152
|
-
"data-
|
|
156
|
+
"data-testid": "".concat(dataTestidPrefix, "-sub-link-count"),
|
|
153
157
|
style: "body2",
|
|
154
158
|
children: isCountsLoading ? /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
155
159
|
className: "neeto-ui-rounded neeto-ui-bg-gray-200 h-4 w-4 animate-pulse"
|
|
@@ -167,7 +171,7 @@ var _Items = function Items(_ref) {
|
|
|
167
171
|
isCountsLoading = _ref.isCountsLoading;
|
|
168
172
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
169
173
|
className: "neeto-molecules-sidebar__sublink-wrapper",
|
|
170
|
-
"data-
|
|
174
|
+
"data-testid": "sidebar-sub-link-wrapper",
|
|
171
175
|
children: items.filter(filterByPermissions).map(function (subItem, subIndex) {
|
|
172
176
|
var _subItem$to;
|
|
173
177
|
return /*#__PURE__*/jsxRuntime.jsxs(React.Fragment, {
|
|
@@ -215,7 +219,7 @@ var SelectedLink = function SelectedLink(_ref) {
|
|
|
215
219
|
};
|
|
216
220
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
217
221
|
className: "neeto-molecules-sidebar__links neeto-molecules-sidebar__links--focus-mode neeto-molecules-sidebar__no-shrinkable",
|
|
218
|
-
"data-
|
|
222
|
+
"data-testid": "configure-nav-container",
|
|
219
223
|
children: [/*#__PURE__*/jsxRuntime.jsxs("div", _objectSpread(_objectSpread({
|
|
220
224
|
className: "neeto-ui-flex neeto-ui-items-center neeto-ui-no-underline neeto-molecules-sidebar__link neeto-ui-border-b neeto-ui-border-gray-200",
|
|
221
225
|
onClick: handleGoBack
|
|
@@ -223,8 +227,7 @@ var SelectedLink = function SelectedLink(_ref) {
|
|
|
223
227
|
children: [isConfigureNavLink && /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
224
228
|
className: "neeto-molecules-sidebar__link-icon flex items-center pl-3",
|
|
225
229
|
children: [/*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
226
|
-
"data-
|
|
227
|
-
"data-testid": "".concat(label, "-go-home-button"),
|
|
230
|
+
"data-testid": "".concat(general.hyphenize(label), "-go-back-button"),
|
|
228
231
|
icon: Home,
|
|
229
232
|
style: "text",
|
|
230
233
|
onClick: handleHomeButtonClick
|
|
@@ -247,7 +250,7 @@ var SelectedLink = function SelectedLink(_ref) {
|
|
|
247
250
|
});
|
|
248
251
|
};
|
|
249
252
|
|
|
250
|
-
var css = ":root{--neeto-molecules-sidebar-width:15rem;--neeto-molecules-sidebar-wrapper-z-index:99997;--neeto-molecules-sidebar-z-index:99998}@media screen and (min-width:1024px){:root{--neeto-molecules-sidebar-width:15rem}}.neeto-molecules-sidebar__wrapper{display:flex;max-width:15rem;max-width:var(--neeto-molecules-sidebar-width);position:relative;width:15rem;width:var(--neeto-molecules-sidebar-width)}@media screen and (max-width:768px){.neeto-molecules-sidebar__wrapper{height:100%;inset-inline-start:0;max-width:100%;position:fixed;top:0;transition:none;width:100%;z-index:99997;z-index:var(--neeto-molecules-sidebar-wrapper-z-index)}.neeto-molecules-sidebar__wrapper .neeto-molecules-sidebar{inset-inline-start:0;max-width:15rem;max-width:var(--neeto-molecules-sidebar-width);position:fixed;top:0;transition:none;width:15rem;width:var(--neeto-molecules-sidebar-width)}}.neeto-molecules-sidebar__wrapper__configure-page .neeto-molecules-sidebar__toggler{inset-inline-end:1.25rem;top:.5rem}@media screen and (max-width:768px){.neeto-molecules-sidebar__wrapper__configure-page .neeto-molecules-sidebar__toggler{inset-inline-end:auto;top:.5rem}}.neeto-molecules-sidebar__wrapper--collapsed{max-width:0;width:0}.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{inset-inline-end:-2.25rem;transform:scale(-1)}@media screen and (max-width:768px){.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{inset-inline-end:auto;inset-inline-start:.5rem;top:.5rem}.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar{inset-inline-start:-15rem;inset-inline-start:calc(var(--neeto-molecules-sidebar-width)*-1)}.neeto-molecules-sidebar__wrapper__configure-page.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{top:6.8125rem}}.neeto-molecules-sidebar{background-color:rgb(var(--neeto-ui-white));border-inline-end:1px solid rgb(var(--neeto-ui-gray-200));height:100vh;height:100dvh;padding:1.5rem 0;width:100%;z-index:99998;z-index:var(--neeto-molecules-sidebar-z-index)}.neeto-molecules-sidebar:not(.neeto-molecules-sidebar__configure-page) .neeto-molecules-sidebar__links:not(.neeto-molecules-sidebar__links--focus-mode){height:calc(100vh - 7.75rem)!important;height:calc(100dvh - 7.75rem)!important;overflow-y:auto;padding-block-end:4rem}.neeto-molecules-sidebar__no-shrinkable{max-width:15rem;max-width:var(--neeto-molecules-sidebar-width);width:15rem;width:var(--neeto-molecules-sidebar-width)}.neeto-molecules-sidebar__separator{margin:.375rem auto;width:100%}.neeto-molecules-sidebar__toggler{color:rgb(var(--neeto-ui-primary-500))!important;inset-inline-end:.5rem;position:absolute!important;top:2.125rem;z-index:99998;z-index:var(--neeto-molecules-sidebar-z-index)}@media screen and (max-width:768px){.neeto-molecules-sidebar__toggler{inset-inline-end:auto;inset-inline-start:12.625rem;inset-inline-start:calc(var(--neeto-molecules-sidebar-width) - 2.375rem);transition:none}}.neeto-molecules-sidebar__configure-page{border-inline-end:1px solid rgb(var(--neeto-ui-gray-200));height:auto}@media screen and (max-width:768px){.neeto-molecules-sidebar__configure-page{height:100%}}.neeto-molecules-sidebar__configure-page .neeto-molecules-sidebar__links{height:calc(100vh - 8.5rem)!important;height:calc(100dvh - 8.5rem)!important}@media screen and (max-width:768px){.neeto-molecules-sidebar__configure-page .neeto-molecules-sidebar__links{height:calc(100vh - 5rem)!important;height:calc(100dvh - 5rem)!important}}.neeto-molecules-sidebar__configure-page .neeto-molecules-sidebar__toggler{display:none}.neeto-molecules-sidebar__header{margin-block:.5rem 2rem;margin-inline:0;padding-block:0;padding-inline:1.5rem}.neeto-molecules-sidebar__logo svg{height:2.25rem;max-width:100%;width:auto}.neeto-molecules-sidebar__link{color:rgb(var(--neeto-ui-black));gap:.625rem;line-height:1.2;padding-block:.75rem;padding-inline:1.5rem;position:relative;text-decoration:none!important;transition:color .3s,background-color .3s;width:100%}.neeto-molecules-sidebar__link-icon{flex-shrink:0}.neeto-molecules-sidebar__link-icon svg path{vector-effect:non-scaling-stroke}.neeto-molecules-sidebar__link-icon--caret{opacity:0;transition:opacity .3s ease-in-out}.neeto-molecules-sidebar__link-icon--rotate{opacity:1;transform:rotate(90deg)}.neeto-molecules-sidebar__link-label,.neeto-molecules-sidebar__link-sub-label{--neeto-ui-text-body2:0.9375rem;flex-grow:1;text-align:start}@media screen and (min-width:1536px){.neeto-molecules-sidebar__link-label,.neeto-molecules-sidebar__link-sub-label{--neeto-ui-text-body2:1rem}}.neeto-molecules-sidebar__link:hover{background-color:rgb(var(--neeto-ui-gray-100));color:rgb(var(--neeto-ui-black))}.neeto-molecules-sidebar__link:focus,.neeto-molecules-sidebar__link:focus-visible,.neeto-molecules-sidebar__link[aria-expanded=true]{color:rgb(var(--neeto-ui-black));outline:none}.neeto-molecules-sidebar__link--hover-active{background-color:rgb(var(--neeto-ui-gray-100))}.neeto-molecules-sidebar__link.active{background-color:rgb(var(--neeto-ui-accent-100));color:rgb(var(--neeto-ui-black));font-weight:var(--neeto-ui-font-semibold)}.neeto-molecules-sidebar__link.active .neeto-molecules-sidebar__link-icon--caret,.neeto-molecules-sidebar__link:hover .neeto-molecules-sidebar__link-icon--caret,.neeto-molecules-sidebar__link[aria-expanded=true] .neeto-molecules-sidebar__link-icon--caret{opacity:1}.neeto-molecules-sidebar__link--button:focus{background-color:transparent}.neeto-molecules-sidebar__link--button:focus-visible{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-black))}.neeto-molecules-sidebar__link--change-log{outline:none!important}.neeto-molecules-sidebar__sublink-wrapper{padding-block:.25rem;padding-inline:0}.neeto-molecules-sidebar__sublink{color:rgb(var(--neeto-ui-gray-700));cursor:pointer;gap:.5rem;margin-block-end:0;margin-inline:0;padding-block:.5rem;padding-inline-end:1.5rem;padding-inline-start:3.625rem;text-decoration:none;transition:color .3s,background-color .3s}.neeto-molecules-sidebar__sublink .neeto-molecules-sidebar__link-sub-count{--neeto-ui-text-body2:0.9375rem;opacity:.75}@media screen and (min-width:1536px){.neeto-molecules-sidebar__sublink .neeto-molecules-sidebar__link-sub-count{--neeto-ui-text-body2:1rem}}.neeto-molecules-sidebar__sublink:hover{color:rgb(var(--neeto-ui-black));text-decoration:none}.neeto-molecules-sidebar__sublink:hover .neeto-molecules-sidebar__link-sub-count{opacity:1}.neeto-molecules-sidebar__sublink:focus,.neeto-molecules-sidebar__sublink:focus-visible{color:rgb(var(--neeto-ui-black));outline:none;text-decoration:none}.neeto-molecules-sidebar__sublink:focus .neeto-molecules-sidebar__link-sub-count,.neeto-molecules-sidebar__sublink:focus-visible .neeto-molecules-sidebar__link-sub-count{opacity:1}.neeto-molecules-sidebar__sublink.active,.neeto-molecules-sidebar__sublink:active{color:rgb(var(--neeto-ui-accent-800));font-weight:500;text-decoration:none}.neeto-molecules-sidebar__sublink.active .neeto-molecules-sidebar__link-sub-count,.neeto-molecules-sidebar__sublink:active .neeto-molecules-sidebar__link-sub-count{opacity:1}.neeto-molecules-sidebar__footer{margin-block-start:auto}.sidebar-featured-tooltip__content{border-radius:.5rem!important;box-shadow:var(--neeto-ui-shadow-sm)!important}.sidebar-featured-tooltip__content .tippy-content{padding:0}.sidebar-featured-tooltip{padding:.75rem;width:9.375rem}.sidebar-featured-tooltip__icon-wrap{background-color:rgb(var(--neeto-ui-gray-100));border-radius:.5rem;height:2.5rem;margin-block-end:.5rem;margin-inline:auto;width:2.5rem}.sidebar-featured-tooltip__title{margin-block-end:.25rem}.neeto-molecules-help-popup-wrapper,.neeto-molecules-product-switcher-popup-wrapper,.neeto-molecules-profile-popup-wrapper{border:1px solid rgb(var(--neeto-ui-gray-400));border-radius:var(--neeto-ui-rounded)!important;min-width:15rem}.neeto-molecules-help-popup-wrapper .tippy-content,.neeto-molecules-product-switcher-popup-wrapper .tippy-content,.neeto-molecules-profile-popup-wrapper .tippy-content{padding:0}.neeto-molecules-help-popup-wrapper .tippy-svg-arrow,.neeto-molecules-product-switcher-popup-wrapper .tippy-svg-arrow,.neeto-molecules-profile-popup-wrapper .tippy-svg-arrow{display:none!important}.neeto-molecules-profile-popup__top-section{border-start-end-radius:var(--neeto-ui-rounded);border-start-start-radius:var(--neeto-ui-rounded)}.neeto-molecules-profile-sublist{border-block-start:1px solid rgb(var(--neeto-ui-gray-400))}.neeto-molecules-help-sublist,.neeto-molecules-profile-sublist{list-style:none;margin:0;padding-block:.25rem;padding-inline:0}.neeto-molecules-help-sublist__item,.neeto-molecules-profile-sublist__item{width:100%}.neeto-molecules-help-sublist__item-btn,.neeto-molecules-profile-sublist__item-btn{border-radius:0;justify-content:flex-end!important;min-height:2.5rem;text-align:start}.neeto-molecules-help-sublist__item-btn.active,.neeto-molecules-profile-sublist__item-btn.active{background-color:rgb(var(--neeto-ui-gray-800));color:rgb(var(--neeto-ui-white))}.neeto-molecules-help-sublist__item-btn-icon svg path,.neeto-molecules-profile-sublist__item-btn-icon svg path{vector-effect:non-scaling-stroke}.neeto-molecules-help-sublist__item-btn span,.neeto-molecules-profile-sublist__item-btn span{align-items:center;display:flex;gap:.5rem}.neeto-molecules-sidebar__link-icon{position:relative}.neeto-molecules-sidebar__notif-count{inset-inline-end:-6px;position:absolute;top:-6px;z-index:1}.neeto-molecules-help-sublist__item-btn-count,.neeto-molecules-sidebar__notif-count{align-items:center;background-color:rgb(var(--neeto-ui-primary-500));border-radius:var(--neeto-ui-rounded-full);color:rgb(var(--neeto-ui-white));display:inline-flex;flex-shrink:0;font-size:var(--neeto-ui-text-xxs);height:.9375rem;justify-content:center;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:.9375rem}.neeto-molecules-product-switcher-popup-wrapper{height:calc(100vh - 1rem);height:calc(100dvh - 1rem);margin-block-end:.5rem;min-width:calc(100vw - 11rem);overflow-y:auto}@media screen and (max-width:768px){.neeto-molecules-product-switcher-popup-wrapper{width:calc(100vw - 11.5625rem)!important}}.neeto-molecules-sidebar__backdrop{background-color:rgba(var(--neeto-ui-black),.4);height:100%;inset-inline-start:0;position:absolute;top:0;width:100%}@media screen and (min-width:769px){.neeto-molecules-sidebar__backdrop{display:none;visibility:hidden}}.neeto-molecules-sidebar-segments-header{padding-inline-start:3.625rem}.neeto-molecules-sidebar-segment{margin-block-end:0!important;padding-block:.25rem;padding-inline-end:1.5rem;padding-inline-start:3.625rem}.neeto-molecules-sidebar.neeto-molecules-sidebar--focus-mode{padding-block-start:0}.neeto-molecules-sidebar.neeto-molecules-sidebar--focus-mode .neeto-molecules-sidebar__header{padding-block-start:1.5rem}.neeto-molecules-sidebar.neeto-molecules-sidebar--focus-mode .neeto-molecules-sidebar__links{display:flex;flex-direction:column;height:calc(100vh - 10rem);height:calc(100dvh - 10rem);margin-block-end:0}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper{flex-grow:1;margin-block-end:.625rem!important;margin-inline:0!important;min-height:0;overflow-y:auto;padding-block-end:.625rem!important;padding-inline:0!important}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper .neeto-molecules-sidebar__sublink-wrapper{padding:0!important}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper .neeto-molecules-sidebar__sublink-wrapper .neeto-molecules-sidebar__sublink{border-radius:0}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__link{--neeto-ui-text-body1:1.125rem;background-color:rgb(var(--neeto-ui-gray-100));color:rgb(var(--neeto-ui-black));cursor:pointer;font-weight:var(--neeto-ui-font-semibold);gap:.25rem;padding-block:.75rem;padding-inline:.25rem;position:sticky;top:0;z-index:1}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__link-label,.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__link-sub-label{--neeto-ui-text-body2:0.9375rem}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper>.neeto-molecules-sidebar__sublink{color:rgb(var(--neeto-ui-black));font-weight:var(--neeto-ui-font-medium);margin-block-end:0;padding-block:.625rem;padding-inline:.75rem}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper>.neeto-molecules-sidebar__sublink.active{font-weight:var(--neeto-ui-font-semibold)}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper>.neeto-molecules-sidebar__sublink-wrapper .neeto-molecules-sidebar__sublink{border-radius:0;padding-inline-start:2rem}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink{cursor:pointer;line-height:1.2;padding-block:.5rem;padding-inline-end:.75rem;padding-inline-start:1.5rem;position:relative}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink:hover{background-color:rgb(var(--neeto-ui-gray-100))}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink.active{background-color:rgb(var(--neeto-ui-accent-100))!important;color:rgb(var(--neeto-ui-black))!important;font-weight:var(--neeto-ui-font-medium)}.neeto-molecules-sidebar__link-unread-count{align-items:center;background-color:rgb(var(--neeto-ui-accent-500));border-radius:var(--neeto-ui-rounded-full);color:rgb(var(--neeto-ui-white));display:flex;flex-shrink:0;font-size:var(--neeto-ui-text-xxs);height:1rem;inset-inline-end:-4px;justify-content:center;min-width:1rem;padding-inline:.25rem;position:absolute;top:-4px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.neeto-ui-theme--dark .neeto-molecules-sidebar__logo [data-dark-mode-color=true]{fill:rgb(var(--neeto-ui-black))}.neeto-molecules-sidebar__workspace-info{margin-block-end:1.5rem;padding-block:.5rem;padding-inline:1.5rem}.neeto-molecules-sidebar__resize-handle{bottom:0;cursor:col-resize;inset-inline-end:0;position:absolute;top:0;width:3px;z-index:99999;z-index:calc(var(--neeto-molecules-sidebar-z-index) + 1)}.neeto-molecules-sidebar__resize-handle:before{background-color:rgb(var(--neeto-ui-gray-200));bottom:0;content:\"\";inset-inline-start:0;position:absolute;top:0;transition:background-color .15s ease-in-out,width .15s ease-in-out;width:0}.neeto-molecules-sidebar__resize-handle:hover:before{background-color:rgb(var(--neeto-ui-gray-400));width:2px}.neeto-molecules-sidebar__resize-handle:active:before{background-color:rgb(var(--neeto-ui-primary-500));width:2px}.neeto-molecules-sidebar__wrapper:not(.neeto-molecules-sidebar__wrapper--collapsed)+.neeto-molecules-sidebar__resize-handle{display:block}.neeto-molecules-sidebar__wrapper+.neeto-molecules-sidebar__resize-handle{display:none;inset-inline-start:15rem;inset-inline-start:var(--neeto-molecules-sidebar-width)}.neeto-molecules-sidebar__wrapper--collapsed+.neeto-molecules-sidebar__resize-handle{display:none}body.dragging-sidebar,body.dragging-sidebar *{cursor:col-resize!important}body.dragging-sidebar *{-webkit-user-select:none!important;-moz-user-select:none!important;user-select:none!important}[dir=rtl] .neeto-molecules-sidebar__toggler{transform:scaleX(-1);transition:none}[dir=rtl] .neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{transform:scaleX(1)}[dir=rtl] .neeto-molecules-sidebar__link-icon{transform:scaleX(-1)}[dir=rtl] .neeto-molecules-sidebar__link-icon--rotate{transform:scaleX(1) rotate(90deg)}";
|
|
253
|
+
var css = ":root{--neeto-molecules-sidebar-width:15rem;--neeto-molecules-sidebar-wrapper-z-index:99997;--neeto-molecules-sidebar-z-index:99998}@media screen and (min-width:1024px){:root{--neeto-molecules-sidebar-width:15rem}}.neeto-molecules-sidebar__wrapper{display:flex;max-width:15rem;max-width:var(--neeto-molecules-sidebar-width);position:relative;width:15rem;width:var(--neeto-molecules-sidebar-width)}@media screen and (max-width:768px){.neeto-molecules-sidebar__wrapper{height:100%;inset-inline-start:0;max-width:100%;position:fixed;top:0;transition:none;width:100%;z-index:99997;z-index:var(--neeto-molecules-sidebar-wrapper-z-index)}.neeto-molecules-sidebar__wrapper .neeto-molecules-sidebar{inset-inline-start:0;max-width:15rem;max-width:var(--neeto-molecules-sidebar-width);position:fixed;top:0;transition:none;width:15rem;width:var(--neeto-molecules-sidebar-width)}}.neeto-molecules-sidebar__wrapper__configure-page .neeto-molecules-sidebar__toggler{inset-inline-end:1.25rem;top:.5rem}@media screen and (max-width:768px){.neeto-molecules-sidebar__wrapper__configure-page .neeto-molecules-sidebar__toggler{inset-inline-end:auto;top:.5rem}}.neeto-molecules-sidebar__wrapper--collapsed{max-width:0;width:0}.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{inset-inline-end:-2.25rem;transform:scale(-1)}@media screen and (max-width:768px){.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{inset-inline-end:auto;inset-inline-start:.5rem;top:.5rem}.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar{inset-inline-start:-15rem;inset-inline-start:calc(var(--neeto-molecules-sidebar-width)*-1)}.neeto-molecules-sidebar__wrapper__configure-page.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{top:6.8125rem}}.neeto-molecules-sidebar{background-color:rgb(var(--neeto-ui-white));border-inline-end:1px solid rgb(var(--neeto-ui-gray-200));height:100vh;height:100dvh;padding:1.5rem 0;width:100%;z-index:99998;z-index:var(--neeto-molecules-sidebar-z-index)}.neeto-molecules-sidebar:not(.neeto-molecules-sidebar__configure-page) .neeto-molecules-sidebar__links:not(.neeto-molecules-sidebar__links--focus-mode){height:calc(100vh - 7.75rem)!important;height:calc(100dvh - 7.75rem)!important;overflow-y:auto;padding-block-end:4rem}.neeto-molecules-sidebar__no-shrinkable{max-width:15rem;max-width:var(--neeto-molecules-sidebar-width);width:15rem;width:var(--neeto-molecules-sidebar-width)}.neeto-molecules-sidebar__separator{margin:.375rem auto;width:100%}.neeto-molecules-sidebar__toggler{color:rgb(var(--neeto-ui-primary-500))!important;inset-inline-end:.5rem;position:absolute!important;top:2.125rem;z-index:99998;z-index:var(--neeto-molecules-sidebar-z-index)}@media screen and (max-width:768px){.neeto-molecules-sidebar__toggler{inset-inline-end:auto;inset-inline-start:12.625rem;inset-inline-start:calc(var(--neeto-molecules-sidebar-width) - 2.375rem);transition:none}}.neeto-molecules-sidebar__configure-page{border-inline-end:1px solid rgb(var(--neeto-ui-gray-200));height:auto}@media screen and (max-width:768px){.neeto-molecules-sidebar__configure-page{height:100%}}.neeto-molecules-sidebar__configure-page .neeto-molecules-sidebar__links{height:calc(100vh - 8.5rem)!important;height:calc(100dvh - 8.5rem)!important}@media screen and (max-width:768px){.neeto-molecules-sidebar__configure-page .neeto-molecules-sidebar__links{height:calc(100vh - 5rem)!important;height:calc(100dvh - 5rem)!important}}.neeto-molecules-sidebar__configure-page .neeto-molecules-sidebar__toggler{display:none}.neeto-molecules-sidebar__header{margin-block:.5rem 2rem;margin-inline:0;padding-block:0;padding-inline:1.5rem}.neeto-molecules-sidebar__logo svg{height:2.25rem;max-width:100%;width:auto}.neeto-molecules-sidebar__link{color:rgb(var(--neeto-ui-black));gap:.625rem;line-height:1.2;padding-block:.75rem;padding-inline:1.5rem;position:relative;text-decoration:none!important;transition:color .3s,background-color .3s;width:100%}@media (prefers-reduced-motion:reduce){.neeto-molecules-sidebar__link{transition:none}}.neeto-molecules-sidebar__link-icon{flex-shrink:0}.neeto-molecules-sidebar__link-icon svg path{vector-effect:non-scaling-stroke}.neeto-molecules-sidebar__link-icon--caret{opacity:0;transition:opacity .3s ease-in-out}@media (prefers-reduced-motion:reduce){.neeto-molecules-sidebar__link-icon--caret{transition:none}}.neeto-molecules-sidebar__link-icon--rotate{opacity:1;transform:rotate(90deg)}.neeto-molecules-sidebar__link-label,.neeto-molecules-sidebar__link-sub-label{--neeto-ui-text-body2:0.9375rem;flex-grow:1;text-align:start}@media screen and (min-width:1536px){.neeto-molecules-sidebar__link-label,.neeto-molecules-sidebar__link-sub-label{--neeto-ui-text-body2:1rem}}.neeto-molecules-sidebar__link:hover{background-color:rgb(var(--neeto-ui-gray-100));color:rgb(var(--neeto-ui-black))}.neeto-molecules-sidebar__link:focus,.neeto-molecules-sidebar__link:focus-visible,.neeto-molecules-sidebar__link[aria-expanded=true]{color:rgb(var(--neeto-ui-black));outline:none}.neeto-molecules-sidebar__link--hover-active{background-color:rgb(var(--neeto-ui-gray-100))}.neeto-molecules-sidebar__link.active{background-color:rgb(var(--neeto-ui-accent-100));color:rgb(var(--neeto-ui-black));font-weight:var(--neeto-ui-font-semibold)}.neeto-molecules-sidebar__link.active .neeto-molecules-sidebar__link-icon--caret,.neeto-molecules-sidebar__link:hover .neeto-molecules-sidebar__link-icon--caret,.neeto-molecules-sidebar__link[aria-expanded=true] .neeto-molecules-sidebar__link-icon--caret{opacity:1}.neeto-molecules-sidebar__link--button:focus{background-color:transparent}.neeto-molecules-sidebar__link--button:focus-visible{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-black))}.neeto-molecules-sidebar__link--change-log{outline:none!important}.neeto-molecules-sidebar__sublink-wrapper{padding-block:.25rem;padding-inline:0}.neeto-molecules-sidebar__sublink{color:rgb(var(--neeto-ui-gray-700));cursor:pointer;gap:.5rem;margin-block-end:0;margin-inline:0;padding-block:.5rem;padding-inline-end:1.5rem;padding-inline-start:3.625rem;text-decoration:none;transition:color .3s,background-color .3s}@media (prefers-reduced-motion:reduce){.neeto-molecules-sidebar__sublink{transition:none}}.neeto-molecules-sidebar__sublink .neeto-molecules-sidebar__link-sub-count{--neeto-ui-text-body2:0.9375rem;opacity:.75}@media screen and (min-width:1536px){.neeto-molecules-sidebar__sublink .neeto-molecules-sidebar__link-sub-count{--neeto-ui-text-body2:1rem}}.neeto-molecules-sidebar__sublink:hover{color:rgb(var(--neeto-ui-black));text-decoration:none}.neeto-molecules-sidebar__sublink:hover .neeto-molecules-sidebar__link-sub-count{opacity:1}.neeto-molecules-sidebar__sublink:focus,.neeto-molecules-sidebar__sublink:focus-visible{color:rgb(var(--neeto-ui-black));outline:none;text-decoration:none}.neeto-molecules-sidebar__sublink:focus .neeto-molecules-sidebar__link-sub-count,.neeto-molecules-sidebar__sublink:focus-visible .neeto-molecules-sidebar__link-sub-count{opacity:1}.neeto-molecules-sidebar__sublink.active,.neeto-molecules-sidebar__sublink:active{color:rgb(var(--neeto-ui-accent-800));font-weight:500;text-decoration:none}.neeto-molecules-sidebar__sublink.active .neeto-molecules-sidebar__link-sub-count,.neeto-molecules-sidebar__sublink:active .neeto-molecules-sidebar__link-sub-count{opacity:1}.neeto-molecules-sidebar__footer{margin-block-start:auto}.sidebar-featured-tooltip__content{border-radius:.5rem!important;box-shadow:var(--neeto-ui-shadow-sm)!important}.sidebar-featured-tooltip__content .tippy-content{padding:0}.sidebar-featured-tooltip{padding:.75rem;width:9.375rem}.sidebar-featured-tooltip__icon-wrap{background-color:rgb(var(--neeto-ui-gray-100));border-radius:.5rem;height:2.5rem;margin-block-end:.5rem;margin-inline:auto;width:2.5rem}.sidebar-featured-tooltip__title{margin-block-end:.25rem}.neeto-molecules-help-popup-wrapper,.neeto-molecules-product-switcher-popup-wrapper,.neeto-molecules-profile-popup-wrapper{border:1px solid rgb(var(--neeto-ui-gray-400));border-radius:var(--neeto-ui-rounded)!important;min-width:15rem}.neeto-molecules-help-popup-wrapper .tippy-content,.neeto-molecules-product-switcher-popup-wrapper .tippy-content,.neeto-molecules-profile-popup-wrapper .tippy-content{padding:0}.neeto-molecules-help-popup-wrapper .tippy-svg-arrow,.neeto-molecules-product-switcher-popup-wrapper .tippy-svg-arrow,.neeto-molecules-profile-popup-wrapper .tippy-svg-arrow{display:none!important}.neeto-molecules-profile-popup__top-section{border-start-end-radius:var(--neeto-ui-rounded);border-start-start-radius:var(--neeto-ui-rounded)}.neeto-molecules-profile-sublist{border-block-start:1px solid rgb(var(--neeto-ui-gray-400))}.neeto-molecules-help-sublist,.neeto-molecules-profile-sublist{list-style:none;margin:0;padding-block:.25rem;padding-inline:0}.neeto-molecules-help-sublist__item,.neeto-molecules-profile-sublist__item{width:100%}.neeto-molecules-help-sublist__item-btn,.neeto-molecules-profile-sublist__item-btn{border-radius:0;justify-content:flex-end!important;min-height:2.5rem;text-align:start}.neeto-molecules-help-sublist__item-btn.active,.neeto-molecules-profile-sublist__item-btn.active{background-color:rgb(var(--neeto-ui-gray-800));color:rgb(var(--neeto-ui-white))}.neeto-molecules-help-sublist__item-btn-icon svg path,.neeto-molecules-profile-sublist__item-btn-icon svg path{vector-effect:non-scaling-stroke}.neeto-molecules-help-sublist__item-btn span,.neeto-molecules-profile-sublist__item-btn span{align-items:center;display:flex;gap:.5rem}.neeto-molecules-sidebar__link-icon{position:relative}.neeto-molecules-sidebar__notif-count{inset-inline-end:-6px;position:absolute;top:-6px;z-index:1}.neeto-molecules-help-sublist__item-btn-count,.neeto-molecules-sidebar__notif-count{align-items:center;background-color:rgb(var(--neeto-ui-primary-500));border-radius:var(--neeto-ui-rounded-full);color:rgb(var(--neeto-ui-white));display:inline-flex;flex-shrink:0;font-size:var(--neeto-ui-text-xxs);height:.9375rem;justify-content:center;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:.9375rem}.neeto-molecules-product-switcher-popup-wrapper{height:calc(100vh - 1rem);height:calc(100dvh - 1rem);margin-block-end:.5rem;min-width:calc(100vw - 11rem);overflow-y:auto}@media screen and (max-width:768px){.neeto-molecules-product-switcher-popup-wrapper{width:calc(100vw - 11.5625rem)!important}}.neeto-molecules-sidebar__backdrop{background-color:rgba(var(--neeto-ui-black),.4);height:100%;inset-inline-start:0;position:absolute;top:0;width:100%}@media screen and (min-width:769px){.neeto-molecules-sidebar__backdrop{display:none;visibility:hidden}}.neeto-molecules-sidebar-segments-header{padding-inline-start:3.625rem}.neeto-molecules-sidebar-segment{margin-block-end:0!important;padding-block:.25rem;padding-inline-end:1.5rem;padding-inline-start:3.625rem}.neeto-molecules-sidebar.neeto-molecules-sidebar--focus-mode{padding-block-start:0}.neeto-molecules-sidebar.neeto-molecules-sidebar--focus-mode .neeto-molecules-sidebar__header{padding-block-start:1.5rem}.neeto-molecules-sidebar.neeto-molecules-sidebar--focus-mode .neeto-molecules-sidebar__links{display:flex;flex-direction:column;height:calc(100vh - 10rem);height:calc(100dvh - 10rem);margin-block-end:0}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper{flex-grow:1;margin-block-end:.625rem!important;margin-inline:0!important;min-height:0;overflow-y:auto;padding-block-end:.625rem!important;padding-inline:0!important}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper .neeto-molecules-sidebar__sublink-wrapper{padding:0!important}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper .neeto-molecules-sidebar__sublink-wrapper .neeto-molecules-sidebar__sublink{border-radius:0}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__link{--neeto-ui-text-body1:1.125rem;background-color:rgb(var(--neeto-ui-gray-100));color:rgb(var(--neeto-ui-black));cursor:pointer;font-weight:var(--neeto-ui-font-semibold);gap:.25rem;padding-block:.75rem;padding-inline:.25rem;position:sticky;top:0;z-index:1}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__link-label,.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__link-sub-label{--neeto-ui-text-body2:0.9375rem}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper>.neeto-molecules-sidebar__sublink{color:rgb(var(--neeto-ui-black));font-weight:var(--neeto-ui-font-medium);margin-block-end:0;padding-block:.625rem;padding-inline:.75rem}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper>.neeto-molecules-sidebar__sublink.active{font-weight:var(--neeto-ui-font-semibold)}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper>.neeto-molecules-sidebar__sublink-wrapper .neeto-molecules-sidebar__sublink{border-radius:0;padding-inline-start:2rem}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink{cursor:pointer;line-height:1.2;padding-block:.5rem;padding-inline-end:.75rem;padding-inline-start:1.5rem;position:relative}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink:hover{background-color:rgb(var(--neeto-ui-gray-100))}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink.active{background-color:rgb(var(--neeto-ui-accent-100))!important;color:rgb(var(--neeto-ui-black))!important;font-weight:var(--neeto-ui-font-medium)}.neeto-molecules-sidebar__link-unread-count{align-items:center;background-color:rgb(var(--neeto-ui-accent-500));border-radius:var(--neeto-ui-rounded-full);color:rgb(var(--neeto-ui-white));display:flex;flex-shrink:0;font-size:var(--neeto-ui-text-xxs);height:1rem;inset-inline-end:-4px;justify-content:center;min-width:1rem;padding-inline:.25rem;position:absolute;top:-4px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.neeto-ui-theme--dark .neeto-molecules-sidebar__logo [data-dark-mode-color=true]{fill:rgb(var(--neeto-ui-black))}.neeto-molecules-sidebar__workspace-info{margin-block-end:1.5rem;padding-block:.5rem;padding-inline:1.5rem}.neeto-molecules-sidebar__resize-handle{bottom:0;cursor:col-resize;inset-inline-end:0;position:absolute;top:0;width:3px;z-index:99999;z-index:calc(var(--neeto-molecules-sidebar-z-index) + 1)}.neeto-molecules-sidebar__resize-handle:before{background-color:rgb(var(--neeto-ui-gray-200));bottom:0;content:\"\";inset-inline-start:0;position:absolute;top:0;transition:background-color .15s ease-in-out,width .15s ease-in-out;width:0}@media (prefers-reduced-motion:reduce){.neeto-molecules-sidebar__resize-handle:before{transition:none}}.neeto-molecules-sidebar__resize-handle:hover:before{background-color:rgb(var(--neeto-ui-gray-400));width:2px}.neeto-molecules-sidebar__resize-handle:active:before{background-color:rgb(var(--neeto-ui-primary-500));width:2px}.neeto-molecules-sidebar__wrapper:not(.neeto-molecules-sidebar__wrapper--collapsed)+.neeto-molecules-sidebar__resize-handle{display:block}.neeto-molecules-sidebar__wrapper+.neeto-molecules-sidebar__resize-handle{display:none;inset-inline-start:15rem;inset-inline-start:var(--neeto-molecules-sidebar-width)}.neeto-molecules-sidebar__wrapper--collapsed+.neeto-molecules-sidebar__resize-handle{display:none}body.dragging-sidebar,body.dragging-sidebar *{cursor:col-resize!important}body.dragging-sidebar *{-webkit-user-select:none!important;-moz-user-select:none!important;user-select:none!important}[dir=rtl] .neeto-molecules-sidebar__toggler{transform:scaleX(-1);transition:none}[dir=rtl] .neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{transform:scaleX(1)}[dir=rtl] .neeto-molecules-sidebar__link-icon{transform:scaleX(-1)}[dir=rtl] .neeto-molecules-sidebar__link-icon--rotate{transform:scaleX(1) rotate(90deg)}";
|
|
251
254
|
injectCss.n(css,{});
|
|
252
255
|
|
|
253
256
|
var Chevron = function Chevron(_ref) {
|
|
@@ -281,4 +284,4 @@ exports.enableDraggingStyles = enableDraggingStyles;
|
|
|
281
284
|
exports.filterByPermissions = filterByPermissions;
|
|
282
285
|
exports.getActiveConfigurePageLink = getActiveConfigurePageLink;
|
|
283
286
|
exports.getSidebarStateLocalStorageKey = getSidebarStateLocalStorageKey;
|
|
284
|
-
//# sourceMappingURL=Chevron-
|
|
287
|
+
//# sourceMappingURL=Chevron-brQURuT5.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Chevron-brQURuT5.js","sources":["../../src/components/Sidebar/constants.js","../../src/components/Sidebar/Components/Links/CheckPointNavLink.jsx","../../src/components/Sidebar/utils.js","../../src/components/Sidebar/Components/Links/SubLink.jsx","../../src/components/Sidebar/Components/Links/Items.jsx","../../src/components/Sidebar/Components/Links/SelectedLink.jsx","../../src/components/Sidebar/Components/Chevron.jsx"],"sourcesContent":["export const SUB_LINK_TYPES = {\n SYSTEM_VIEW: \"system_view\",\n SEGMENTS: \"segments\",\n};\n\nexport const SELECTED_NAV_LINK_ROUTE_STORAGE_KEY = \"selectedNavLinkRoute\";\n\nexport const DEFAULT_HOME_PATH = \"/admin\";\n\nexport const SIDEBAR_WIDTH_KEY = \"neeto-molecules-sidebar-width\";\nexport const MIN_SIDEBAR_WIDTH = 12.5 * 16;\nexport const MAX_SIDEBAR_WIDTH = 20 * 16;\nexport const DEFAULT_SIDEBAR_WIDTH = 15 * 16;\n\nexport const PINNED_MORE_NAV_LINKS_KEY = \"pinnedMoreNavLinks\";\n\nexport const SPECIAL_APP_NAMES = { bugwatch: \"BugWatch\" };\n","import { useNavigationCheckpoints } from \"neetocommons/react-utils/useRegisterNavigationCheckpoint\";\nimport { NavLink } from \"react-router-dom\";\n\nconst CheckPointNavLinks = ({\n checkpointKey,\n to,\n href,\n children,\n ...others\n}) => {\n const { [checkpointKey]: checkpoint } =\n useNavigationCheckpoints(checkpointKey);\n\n const LinkElement = href ? \"a\" : NavLink;\n const linkProps = href\n ? { href, key: href, ...others }\n : { to: checkpoint || to, key: to, ...others };\n\n return <LinkElement {...linkProps}>{children}</LinkElement>;\n};\n\nexport default CheckPointNavLinks;\n","import { isPresent, isNotEmpty } from \"neetocist\";\nimport { __, all, curry, equals, includes, is } from \"ramda\";\n\nexport const isSubRouteActive = (subRoute, location) => {\n const currentBrowserUrl = new URL(\n location.pathname + location.search + location.hash,\n window.location.origin\n );\n const targetUrl = new URL(subRoute, window.location.origin);\n\n const targetSearchParams = targetUrl.searchParams;\n const targetSearchKeys = Array.from(targetSearchParams.keys());\n\n return (\n all(\n key =>\n currentBrowserUrl.searchParams.get(key) === targetSearchParams.get(key),\n targetSearchKeys\n ) && equals(currentBrowserUrl.pathname, targetUrl.pathname)\n );\n};\n\nexport const getSidebarStateLocalStorageKey = () => {\n const user = globalProps.user?.email || globalProps.user?.phoneNumber;\n\n return `sidebarState-${user}`;\n};\n\nexport const filterByPermissions = curry(({ permissions }) => {\n if (permissions && isNotEmpty(permissions)) {\n return is(Array, permissions)\n ? permissions.some(includes(__, globalProps.permissions))\n : globalProps.permissions.includes(permissions);\n }\n\n return true;\n});\n\nexport const getActiveConfigurePageLink = ({ navLinks, location }) =>\n navLinks.find(link => {\n const [linkPathname] = link.to?.split(\"?\") || [];\n\n return (\n isPresent(link.isConfigureNavLink) &&\n link.isConfigureNavLink &&\n location.pathname.startsWith(linkPathname)\n );\n });\n\nexport const enableDraggingStyles = () => {\n document.body.classList.add(\"dragging-sidebar\");\n document.body.style.cursor = \"col-resize\";\n document.body.style.userSelect = \"none\";\n};\n\nexport const disableDraggingStyles = () => {\n document.body.classList.remove(\"dragging-sidebar\");\n document.body.style.cursor = \"\";\n document.body.style.userSelect = \"\";\n};\n","import { hyphenate } from \"neetocist\";\nimport { Segments } from \"neetofilters\";\nimport { Typography, Tag } from \"neetoui\";\nimport { is } from \"ramda\";\n\nimport CheckPointNavLinks from \"./CheckPointNavLink\";\n\nimport { SUB_LINK_TYPES } from \"../../constants\";\nimport { isSubRouteActive } from \"../../utils\";\n\nconst SubLink = ({\n to,\n href,\n onClick,\n label,\n type = SUB_LINK_TYPES.SYSTEM_VIEW,\n count,\n isSectionHeader,\n isCountsLoading,\n \"data-testid\": dataTestid,\n entity = \"\",\n columns = [],\n baseUrl,\n isActive,\n tag,\n}) => {\n if (type === SUB_LINK_TYPES.SEGMENTS) {\n return <Segments {...{ baseUrl, columns, entity }} isIndependent={false} />;\n }\n\n const dataTestidPrefix = dataTestid || hyphenate(label);\n\n const renderCount = count => (count > 999 ? \"999+\" : count);\n\n const isSubLinkActive = () =>\n !isSectionHeader &&\n (is(Function, isActive) ? isActive() : isSubRouteActive(to, location));\n\n return (\n <CheckPointNavLinks\n {...{ href, onClick, to }}\n activeClassName=\"active\"\n className=\"neeto-molecules-sidebar__sublink neeto-ui-flex neeto-ui-items-center neeto-ui-select-none\"\n data-testid={`${dataTestidPrefix}-sub-link`}\n isActive={isSubLinkActive}\n >\n <Typography\n className=\"neeto-molecules-sidebar__link-sub-label neeto-ui-flex-grow flex items-center gap-2\"\n component=\"span\"\n data-testid={`${dataTestidPrefix}-sub-link-label`}\n style=\"body2\"\n >\n {label}\n {tag && <Tag {...tag} />}\n </Typography>\n <Typography\n className=\"neeto-molecules-sidebar__link-sub-count neeto-ui-flex-shrink-0\"\n component=\"span\"\n data-testid={`${dataTestidPrefix}-sub-link-count`}\n style=\"body2\"\n >\n {isCountsLoading ? (\n <div className=\"neeto-ui-rounded neeto-ui-bg-gray-200 h-4 w-4 animate-pulse\" />\n ) : (\n renderCount(count)\n )}\n </Typography>\n </CheckPointNavLinks>\n );\n};\n\nexport default SubLink;\n","import { Fragment } from \"react\";\n\nimport { isPresent } from \"neetocist\";\n\nimport SubLink from \"./SubLink\";\n\nimport { filterByPermissions } from \"../../utils\";\n\nconst Items = ({ items, isSettingsItems = false, isCountsLoading }) => (\n <div\n className=\"neeto-molecules-sidebar__sublink-wrapper\"\n data-testid=\"sidebar-sub-link-wrapper\"\n >\n {items.filter(filterByPermissions).map((subItem, subIndex) => (\n <Fragment key={subIndex}>\n <SubLink\n {...{ ...subItem, isCountsLoading }}\n href={subItem.href}\n isActive={subItem.isActive}\n isSectionHeader={isPresent(subItem.item)}\n to={subItem.to ?? subItem.path}\n onClick={subItem.onClick}\n />\n {isSettingsItems && isPresent(subItem.items) && (\n <>\n <Items {...{ isSettingsItems }} items={subItem.items} />\n {items.length - 1 !== subIndex && (\n <hr className=\"neeto-molecules-sidebar__separator neeto-ui-border-gray-200\" />\n )}\n </>\n )}\n </Fragment>\n ))}\n </div>\n);\n\nexport default Items;\n","import classNames from \"classnames\";\nimport { handleMetaClick } from \"neetocommons/react-utils\";\nimport { hyphenize } from \"neetocommons/utils/general\";\nimport { Home } from \"neetoicons\";\nimport { Typography, Button } from \"neetoui\";\nimport { omit } from \"ramda\";\nimport { useHistory } from \"react-router-dom\";\n\nimport { DEFAULT_HOME_PATH } from \"components/Sidebar/constants\";\n\nimport Items from \"./Items\";\n\nconst SelectedLink = ({\n navLink = { label: \"\", items: [], isConfigureNavLink: false },\n handleGoBack,\n isConfigureSidebar,\n}) => {\n const history = useHistory();\n const { label, items, isConfigureNavLink, ...otherProps } = navLink;\n\n const handleHomeButtonClick = e => {\n e.stopPropagation();\n handleMetaClick(history, DEFAULT_HOME_PATH, e);\n };\n\n return (\n <div\n className=\"neeto-molecules-sidebar__links neeto-molecules-sidebar__links--focus-mode neeto-molecules-sidebar__no-shrinkable\"\n data-testid=\"configure-nav-container\"\n >\n <div\n className=\"neeto-ui-flex neeto-ui-items-center neeto-ui-no-underline neeto-molecules-sidebar__link neeto-ui-border-b neeto-ui-border-gray-200\"\n onClick={handleGoBack}\n {...{ ...omit([\"icon\"], otherProps) }}\n >\n {isConfigureNavLink && (\n <span className=\"neeto-molecules-sidebar__link-icon flex items-center pl-3\">\n <Button\n data-testid={`${hyphenize(label)}-go-back-button`}\n icon={Home}\n style=\"text\"\n onClick={handleHomeButtonClick}\n />\n <span className=\"px-1 text-xs\">/</span>\n </span>\n )}\n <Typography\n component=\"span\"\n style=\"body1\"\n className={classNames(\"neeto-molecules-sidebar__link-label\", {\n \"neeto-molecules-sidebar__configure-page-header\":\n isConfigureNavLink,\n [\"pl-4\"]: isConfigureSidebar,\n })}\n >\n {label}\n </Typography>\n </div>\n {items && <Items {...{ items }} isSettingsItems />}\n </div>\n );\n};\n\nexport default SelectedLink;\n","const Chevron = ({ style }) => (\n <svg {...{ style }} height=\"16\" viewBox=\"0 0 16 16\" width=\"16\">\n <path\n d=\"M7.07031 13.8887C7.2207 14.0391 7.40527 14.1211 7.62402 14.1211C8.06836 14.1211 8.41699 13.7725 8.41699 13.3281C8.41699 13.1094 8.32812 12.9043 8.17773 12.7539L3.37207 8.05762L8.17773 3.375C8.32812 3.21777 8.41699 3.0127 8.41699 2.80078C8.41699 2.35645 8.06836 2.00781 7.62402 2.00781C7.40527 2.00781 7.2207 2.08984 7.07031 2.24023L1.73828 7.44922C1.56055 7.62012 1.46484 7.8252 1.46484 8.06445C1.46484 8.29688 1.55371 8.49512 1.73828 8.67969L7.07031 13.8887ZM13.1748 13.8887C13.3252 14.0391 13.5098 14.1211 13.7354 14.1211C14.1797 14.1211 14.5283 13.7725 14.5283 13.3281C14.5283 13.1094 14.4395 12.9043 14.2891 12.7539L9.4834 8.05762L14.2891 3.375C14.4395 3.21777 14.5283 3.0127 14.5283 2.80078C14.5283 2.35645 14.1797 2.00781 13.7354 2.00781C13.5098 2.00781 13.3252 2.08984 13.1748 2.24023L7.84961 7.44922C7.66504 7.62012 7.57617 7.8252 7.56934 8.06445C7.56934 8.29688 7.66504 8.49512 7.84961 8.67969L13.1748 13.8887Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n\nexport default Chevron;\n"],"names":["SUB_LINK_TYPES","SYSTEM_VIEW","SEGMENTS","SELECTED_NAV_LINK_ROUTE_STORAGE_KEY","DEFAULT_HOME_PATH","SIDEBAR_WIDTH_KEY","MIN_SIDEBAR_WIDTH","MAX_SIDEBAR_WIDTH","DEFAULT_SIDEBAR_WIDTH","PINNED_MORE_NAV_LINKS_KEY","SPECIAL_APP_NAMES","bugwatch","CheckPointNavLinks","_ref","checkpointKey","to","href","children","others","_objectWithoutProperties","_excluded","_useNavigationCheckpo","useNavigationCheckpoints","checkpoint","LinkElement","NavLink","linkProps","_objectSpread","key","_jsx","isSubRouteActive","subRoute","location","currentBrowserUrl","URL","pathname","search","hash","window","origin","targetUrl","targetSearchParams","searchParams","targetSearchKeys","Array","from","keys","all","get","equals","getSidebarStateLocalStorageKey","_globalProps$user","_globalProps$user2","user","globalProps","email","phoneNumber","concat","filterByPermissions","curry","permissions","isNotEmpty","is","some","includes","__","getActiveConfigurePageLink","_ref2","navLinks","find","link","_link$to","_ref3","split","_ref4","_slicedToArray","linkPathname","isPresent","isConfigureNavLink","startsWith","enableDraggingStyles","document","body","classList","add","style","cursor","userSelect","disableDraggingStyles","remove","SubLink","onClick","label","_ref$type","type","count","isSectionHeader","isCountsLoading","dataTestid","_ref$entity","entity","_ref$columns","columns","baseUrl","isActive","tag","Segments","isIndependent","dataTestidPrefix","hyphenate","renderCount","isSubLinkActive","Function","_jsxs","activeClassName","className","Typography","component","Tag","Items","items","_ref$isSettingsItems","isSettingsItems","filter","map","subItem","subIndex","_subItem$to","Fragment","item","path","_Fragment","_Items","length","SelectedLink","_ref$navLink","navLink","handleGoBack","isConfigureSidebar","history","useHistory","otherProps","handleHomeButtonClick","e","stopPropagation","handleMetaClick","omit","Button","hyphenize","icon","Home","classNames","_defineProperty","Chevron","height","viewBox","width","d","fill"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAO,IAAMA,cAAc,GAAG;AAC5BC,EAAAA,WAAW,EAAE,aAAa;AAC1BC,EAAAA,QAAQ,EAAE;AACZ,CAAC;AAEM,IAAMC,mCAAmC,GAAG;AAE5C,IAAMC,iBAAiB,GAAG;AAE1B,IAAMC,iBAAiB,GAAG;AAC1B,IAAMC,iBAAiB,GAAG,IAAI,GAAG;AACjC,IAAMC,iBAAiB,GAAG,EAAE,GAAG;AAC/B,IAAMC,qBAAqB,GAAG,EAAE,GAAG;AAEnC,IAAMC,yBAAyB,GAAG;AAElC,IAAMC,iBAAiB,GAAG;AAAEC,EAAAA,QAAQ,EAAE;AAAW;;;;;ACbxD,IAAMC,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAAC,IAAA,EAMlB;AAAA,EAAA,IALJC,aAAa,GAAAD,IAAA,CAAbC,aAAa;IACbC,EAAE,GAAAF,IAAA,CAAFE,EAAE;IACFC,IAAI,GAAAH,IAAA,CAAJG,IAAI;IACJC,QAAQ,GAAAJ,IAAA,CAARI,QAAQ;AACLC,IAAAA,MAAM,GAAAC,wBAAA,CAAAN,IAAA,EAAAO,WAAA,CAAA;AAET,EAAA,IAAAC,qBAAA,GACEC,wDAAwB,CAACR,aAAa,CAAC;IADhBS,UAAU,GAAAF,qBAAA,CAA1BP,aAAa,CAAA;AAGtB,EAAA,IAAMU,WAAW,GAAGR,IAAI,GAAG,GAAG,GAAGS,sBAAO;AACxC,EAAA,IAAMC,SAAS,GAAGV,IAAI,GAAAW,eAAA,CAAA;AAChBX,IAAAA,IAAI,EAAJA,IAAI;AAAEY,IAAAA,GAAG,EAAEZ;GAAI,EAAKE,MAAM,IAAAS,eAAA,CAAA;IAC1BZ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,EAAC,WAAW;AAACC,IAAAA,KAAK,EAAC,IAAI;AAAA3I,IAAAA,QAAA,eAC5DY,cAAA,CAAA,MAAA,EAAA;AACEgI,MAAAA,CAAC,EAAC,y5BAAy5B;AAC35BC,MAAAA,IAAI,EAAC;KACN;AAAC,GACC,CAAC;AAAA;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/cjs/Codeblock.js
CHANGED
|
@@ -35,18 +35,16 @@ var Codeblock = function Codeblock(_ref) {
|
|
|
35
35
|
wrapLines: true,
|
|
36
36
|
className: "neeto-molecules-code-block p-4 pr-12 md:pr-4",
|
|
37
37
|
codeTagProps: {
|
|
38
|
-
"data-
|
|
38
|
+
"data-testid": "code-block-content"
|
|
39
39
|
},
|
|
40
|
-
"data-
|
|
41
|
-
"data-testid": "codeblock-react-highlighter",
|
|
40
|
+
"data-testid": "code-block",
|
|
42
41
|
language: "javascript",
|
|
43
42
|
style: prism.dracula
|
|
44
43
|
}, codeblockProps), {}, {
|
|
45
44
|
children: code
|
|
46
45
|
})), showCopyButton && /*#__PURE__*/jsxRuntime.jsx(CopyToClipboardButton, _objectSpread(_objectSpread({
|
|
47
46
|
className: "absolute right-2 top-2",
|
|
48
|
-
"data-
|
|
49
|
-
"data-testid": "codeblock-copy-button",
|
|
47
|
+
"data-testid": "copy-to-clipboard-button",
|
|
50
48
|
size: "small",
|
|
51
49
|
style: "secondary",
|
|
52
50
|
value: code
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Codeblock.js","sources":["../../src/components/Codeblock.jsx"],"sourcesContent":["import PropTypes from \"prop-types\";\nimport CodeBlock from \"react-syntax-highlighter/dist/esm/prism-light.js\";\nimport { dracula } from \"react-syntax-highlighter/dist/esm/styles/prism\";\n\nimport CopyCode from \"components/CopyToClipboardButton\";\n\nconst Codeblock = ({\n code,\n showCopyButton = true,\n codeblockProps,\n copyButtonProps = { label: \"Copy\" },\n}) => {\n const isLargerScreen = window.innerWidth > 768;\n\n return (\n <div className=\"relative\">\n <CodeBlock\n wrapLines\n className=\"neeto-molecules-code-block p-4 pr-12 md:pr-4\"\n codeTagProps={{ \"data-
|
|
1
|
+
{"version":3,"file":"Codeblock.js","sources":["../../src/components/Codeblock.jsx"],"sourcesContent":["import PropTypes from \"prop-types\";\nimport CodeBlock from \"react-syntax-highlighter/dist/esm/prism-light.js\";\nimport { dracula } from \"react-syntax-highlighter/dist/esm/styles/prism\";\n\nimport CopyCode from \"components/CopyToClipboardButton\";\n\nconst Codeblock = ({\n code,\n showCopyButton = true,\n codeblockProps,\n copyButtonProps = { label: \"Copy\" },\n}) => {\n const isLargerScreen = window.innerWidth > 768;\n\n return (\n <div className=\"relative\">\n <CodeBlock\n wrapLines\n className=\"neeto-molecules-code-block p-4 pr-12 md:pr-4\"\n codeTagProps={{ \"data-testid\": \"code-block-content\" }}\n data-testid=\"code-block\"\n language=\"javascript\"\n style={dracula}\n {...codeblockProps}\n >\n {code}\n </CodeBlock>\n {showCopyButton && (\n <CopyCode\n className=\"absolute right-2 top-2\"\n data-testid=\"copy-to-clipboard-button\"\n size=\"small\"\n style=\"secondary\"\n value={code}\n {...copyButtonProps}\n label={isLargerScreen ? copyButtonProps.label : \"\"}\n />\n )}\n </div>\n );\n};\n\nCodeblock.propTypes = {\n /**\n * The code to be displayed.\n */\n code: PropTypes.string,\n /**\n * Flag to determine whether the 'Copy' button is displayed.\n */\n showCopyButton: PropTypes.bool,\n /**\n * Additional props that can be passed on to the 'PrismLight' component from 'react-syntax-highlighter'.\n */\n codeblockProps: PropTypes.object,\n /**\n * Additional props that can be passed on to the 'CopyToClipboardButton' component from 'neeto-molecules'.\n */\n copyButtonProps: PropTypes.object,\n};\n\nexport default Codeblock;\n"],"names":["Codeblock","_ref","code","_ref$showCopyButton","showCopyButton","codeblockProps","_ref$copyButtonProps","copyButtonProps","label","isLargerScreen","window","innerWidth","_jsxs","className","children","_jsx","CodeBlock","_objectSpread","wrapLines","codeTagProps","language","style","dracula","CopyCode","size","value"],"mappings":";;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ACnBC,MAAAA,KAAK,EAAEC,cAAc,GAAGF,eAAe,CAACC,KAAK,GAAG;AAAG,KAAA,CACpD,CACF;AAAA,GACE,CAAC;AAEV;;;;"}
|
|
@@ -118,7 +118,7 @@ var Item = function Item(_ref) {
|
|
|
118
118
|
})
|
|
119
119
|
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
120
120
|
className: "neeto-molecules-columns__sortable-item",
|
|
121
|
-
"data-
|
|
121
|
+
"data-testid": "column-sortable-item",
|
|
122
122
|
ref: setNodeRef,
|
|
123
123
|
style: dragStyle,
|
|
124
124
|
children: /*#__PURE__*/jsxRuntime.jsxs(Label, {
|
|
@@ -126,14 +126,14 @@ var Item = function Item(_ref) {
|
|
|
126
126
|
htmlFor: key,
|
|
127
127
|
children: [/*#__PURE__*/jsxRuntime.jsx("div", _objectSpread$3(_objectSpread$3(_objectSpread$3({}, attributes), listeners), {}, {
|
|
128
128
|
className: "neeto-ui-mr-2 neeto-ui-cursor-grab neeto-ui-flex neeto-ui-items-center",
|
|
129
|
-
"data-
|
|
129
|
+
"data-testid": "column-drag-handle",
|
|
130
130
|
children: /*#__PURE__*/jsxRuntime.jsx(Reorder, {
|
|
131
131
|
className: "neeto-ui-text-gray-800",
|
|
132
132
|
size: 18
|
|
133
133
|
})
|
|
134
134
|
})), /*#__PURE__*/jsxRuntime.jsx(Checkbox, _objectSpread$3({
|
|
135
135
|
checked: !hiddenColumns.includes(key),
|
|
136
|
-
"data-
|
|
136
|
+
"data-testid": "neeto-ui-columns-checkbox",
|
|
137
137
|
disabled: isTableConfigurationFetching,
|
|
138
138
|
id: key,
|
|
139
139
|
label: title,
|
|
@@ -432,10 +432,9 @@ var Columns = function Columns(_ref) {
|
|
|
432
432
|
children: /*#__PURE__*/jsxRuntime.jsx(Menu, {
|
|
433
433
|
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
434
434
|
className: "neeto-molecules-columns__container",
|
|
435
|
-
"data-
|
|
435
|
+
"data-testid": "customize-columns-dropdown-container",
|
|
436
436
|
children: [isSearchable && /*#__PURE__*/jsxRuntime.jsx(Input, _objectSpread({
|
|
437
437
|
className: "px-4 py-2",
|
|
438
|
-
"data-cy": "neeto-ui-columns-search",
|
|
439
438
|
"data-testid": "neeto-ui-columns-search",
|
|
440
439
|
placeholder: t("neetoMolecules.columns.search"),
|
|
441
440
|
prefix: /*#__PURE__*/jsxRuntime.jsx(Search, {}),
|
|
@@ -471,7 +470,7 @@ var Columns = function Columns(_ref) {
|
|
|
471
470
|
htmlFor: key,
|
|
472
471
|
children: /*#__PURE__*/jsxRuntime.jsx(Checkbox, _objectSpread({
|
|
473
472
|
checked: !hiddenColumns.includes(key),
|
|
474
|
-
"data-
|
|
473
|
+
"data-testid": "neeto-ui-columns-checkbox",
|
|
475
474
|
id: key,
|
|
476
475
|
label: title,
|
|
477
476
|
name: key,
|
|
@@ -484,12 +483,12 @@ var Columns = function Columns(_ref) {
|
|
|
484
483
|
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
485
484
|
className: "flex justify-end gap-2 p-1 pr-3",
|
|
486
485
|
children: [/*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
487
|
-
"data-
|
|
486
|
+
"data-testid": "column-visibility-hide-all-button",
|
|
488
487
|
label: t("neetoMolecules.columns.hideAll"),
|
|
489
488
|
style: "tertiary",
|
|
490
489
|
onClick: handleHideAllColumns
|
|
491
490
|
}), /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
492
|
-
"data-
|
|
491
|
+
"data-testid": "column-visibility-reset-button",
|
|
493
492
|
label: t("neetoMolecules.columns.reset"),
|
|
494
493
|
style: "secondary",
|
|
495
494
|
onClick: function onClick() {
|
|
@@ -508,4 +507,4 @@ exports.Columns = Columns;
|
|
|
508
507
|
exports.HIDDEN_COLUMNS_STORAGE_KEY = HIDDEN_COLUMNS_STORAGE_KEY;
|
|
509
508
|
exports.TABLE_CONFIGURATION_QUERY_KEY = TABLE_CONFIGURATION_QUERY_KEY;
|
|
510
509
|
exports.useTableConfigurations = useTableConfigurations;
|
|
511
|
-
//# sourceMappingURL=Columns-
|
|
510
|
+
//# sourceMappingURL=Columns-7xltEL2z.js.map
|