@bigbinary/neeto-molecules 3.15.43 → 3.15.45
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 +539 -0
- package/dist/AuditLogs.js.map +1 -0
- package/dist/BoardView.js +394 -0
- package/dist/BoardView.js.map +1 -0
- package/dist/Breadcrumbs.js +46 -0
- package/dist/Breadcrumbs.js.map +1 -0
- package/dist/BrowserPreview.js +50 -0
- package/dist/BrowserPreview.js.map +1 -0
- package/dist/BrowserSupport.js +348 -0
- package/dist/BrowserSupport.js.map +1 -0
- package/dist/Builder.js +786 -0
- package/dist/Builder.js.map +1 -0
- package/dist/ButtonGroup.js +36 -0
- package/dist/ButtonGroup.js.map +1 -0
- package/dist/CalendarView.js +356 -0
- package/dist/CalendarView.js.map +1 -0
- package/dist/CardLayout.js +49 -0
- package/dist/CardLayout.js.map +1 -0
- package/dist/Chevron-DfSoxXBs.js +246 -0
- package/dist/Chevron-DfSoxXBs.js.map +1 -0
- package/dist/Codeblock.js +58 -0
- package/dist/Codeblock.js.map +1 -0
- package/dist/Columns.js +21 -0
- package/dist/Columns.js.map +1 -0
- package/dist/ConfigurePageSidebar.js +97 -0
- package/dist/ConfigurePageSidebar.js.map +1 -0
- package/dist/ConfirmationModal.js +110 -0
- package/dist/ConfirmationModal.js.map +1 -0
- package/dist/Container.js +38 -0
- package/dist/Container.js.map +1 -0
- package/dist/CopyToClipboardButton.js +82 -0
- package/dist/CopyToClipboardButton.js.map +1 -0
- package/dist/Currency.js +917 -0
- package/dist/Currency.js.map +1 -0
- package/dist/DateFormat.js +45 -0
- package/dist/DateFormat.js.map +1 -0
- package/dist/DateRangeFilter.js +178 -0
- package/dist/DateRangeFilter.js.map +1 -0
- package/dist/DeleteArchiveModal.js +98 -0
- package/dist/DeleteArchiveModal.js.map +1 -0
- package/dist/DeviceIncompatibilityMessage.js +95 -0
- package/dist/DeviceIncompatibilityMessage.js.map +1 -0
- package/dist/DocumentEditor.js +183 -0
- package/dist/DocumentEditor.js.map +1 -0
- package/dist/DownloadMobileAppCallout.js +40 -0
- package/dist/DownloadMobileAppCallout.js.map +1 -0
- package/dist/DynamicVariables.js +115 -0
- package/dist/DynamicVariables.js.map +1 -0
- package/dist/EmailForm.js +567 -0
- package/dist/EmailForm.js.map +1 -0
- package/dist/EmailPreview.js +140 -0
- package/dist/EmailPreview.js.map +1 -0
- package/dist/EmojiPicker.js +112 -0
- package/dist/EmojiPicker.js.map +1 -0
- package/dist/EmojiReactions.js +82 -0
- package/dist/EmojiReactions.js.map +1 -0
- package/dist/Engagements.js +292 -0
- package/dist/Engagements.js.map +1 -0
- package/dist/ErrorPage.js +1811 -0
- package/dist/ErrorPage.js.map +1 -0
- package/dist/FileUpload.js +595 -0
- package/dist/FileUpload.js.map +1 -0
- package/dist/FinderModal.js +280 -0
- package/dist/FinderModal.js.map +1 -0
- package/dist/FloatingActionMenu.js +854 -0
- package/dist/FloatingActionMenu.js.map +1 -0
- package/dist/GoogleFontPicker.js +581 -0
- package/dist/GoogleFontPicker.js.map +1 -0
- package/dist/Header.js +126 -0
- package/dist/Header.js.map +1 -0
- package/dist/HelpPopover.js +83 -0
- package/dist/HelpPopover.js.map +1 -0
- package/dist/IconPicker.js +1159 -0
- package/dist/IconPicker.js.map +1 -0
- package/dist/ImageWithFallback.js +49 -0
- package/dist/ImageWithFallback.js.map +1 -0
- package/dist/InlineInput.js +230 -0
- package/dist/InlineInput.js.map +1 -0
- package/dist/Insights.js +358 -0
- package/dist/Insights.js.map +1 -0
- package/dist/IntegrationCard.js +227 -0
- package/dist/IntegrationCard.js.map +1 -0
- package/dist/IpRestriction.js +3617 -0
- package/dist/IpRestriction.js.map +1 -0
- package/dist/KeyboardShortcuts.js +284 -0
- package/dist/KeyboardShortcuts.js.map +1 -0
- package/dist/LoginPage.js +184 -0
- package/dist/LoginPage.js.map +1 -0
- package/dist/MadeWith.js +41 -0
- package/dist/MadeWith.js.map +1 -0
- package/dist/MenuBar.js +1326 -0
- package/dist/MenuBar.js.map +1 -0
- package/dist/Metadata.js +218 -0
- package/dist/Metadata.js.map +1 -0
- package/dist/MobilePreviewHeader.js +25 -0
- package/dist/MobilePreviewHeader.js.map +1 -0
- package/dist/MoreDropdown.js +163 -0
- package/dist/MoreDropdown.js.map +1 -0
- package/dist/NavigationHeader.js +264 -0
- package/dist/NavigationHeader.js.map +1 -0
- package/dist/NeetoWidget.js +2867 -0
- package/dist/NeetoWidget.js.map +1 -0
- package/dist/Onboarding.js +246 -0
- package/dist/Onboarding.js.map +1 -0
- package/dist/OptionFields.js +717 -0
- package/dist/OptionFields.js.map +1 -0
- package/dist/PageLoader.js +40 -0
- package/dist/PageLoader.js.map +1 -0
- package/dist/PhoneNumber.js +75 -0
- package/dist/PhoneNumber.js.map +1 -0
- package/dist/ProductEmbed.js +884 -0
- package/dist/ProductEmbed.js.map +1 -0
- package/dist/PublishBlock.js +447 -0
- package/dist/PublishBlock.js.map +1 -0
- package/dist/PublishYourItem.js +58 -0
- package/dist/PublishYourItem.js.map +1 -0
- package/dist/Rename.js +366 -0
- package/dist/Rename.js.map +1 -0
- package/dist/ResponsiveDevicePicker.js +63 -0
- package/dist/ResponsiveDevicePicker.js.map +1 -0
- package/dist/Schedule.js +926 -0
- package/dist/Schedule.js.map +1 -0
- package/dist/Scrollable.js +42 -0
- package/dist/Scrollable.js.map +1 -0
- package/dist/Search.js +110 -0
- package/dist/Search.js.map +1 -0
- package/dist/SendToFields.js +2221 -0
- package/dist/SendToFields.js.map +1 -0
- package/dist/SessionEnvironment.js +431 -0
- package/dist/SessionEnvironment.js.map +1 -0
- package/dist/Settings.js +250 -0
- package/dist/Settings.js.map +1 -0
- package/dist/ShareRecordingPane.js +216 -0
- package/dist/ShareRecordingPane.js.map +1 -0
- package/dist/ShareViaEmail.js +416 -0
- package/dist/ShareViaEmail.js.map +1 -0
- package/dist/ShareViaLink.js +1556 -0
- package/dist/ShareViaLink.js.map +1 -0
- package/dist/Sidebar.js +294 -0
- package/dist/Sidebar.js.map +1 -0
- package/dist/StatusDropdown.js +109 -0
- package/dist/StatusDropdown.js.map +1 -0
- package/dist/StickyRibbonsContainer.js +131 -0
- package/dist/StickyRibbonsContainer.js.map +1 -0
- package/dist/SubHeader.js +209 -0
- package/dist/SubHeader.js.map +1 -0
- package/dist/SubscriptionNotificationsContainer.js +77 -0
- package/dist/SubscriptionNotificationsContainer.js.map +1 -0
- package/dist/SuffixedInput.js +111 -0
- package/dist/SuffixedInput.js.map +1 -0
- package/dist/TableWrapper.js +27 -0
- package/dist/TableWrapper.js.map +1 -0
- package/dist/Taxonomy.js +496 -0
- package/dist/Taxonomy.js.map +1 -0
- package/dist/TimeFormat.js +14 -0
- package/dist/TimeFormat.js.map +1 -0
- package/dist/TimezoneMismatchModal.js +138 -0
- package/dist/TimezoneMismatchModal.js.map +1 -0
- package/dist/ToggleFeatureCard.js +211 -0
- package/dist/ToggleFeatureCard.js.map +1 -0
- package/dist/_commonjsHelpers-BFTU3MAI.js +8 -0
- package/dist/_commonjsHelpers-BFTU3MAI.js.map +1 -0
- package/dist/cjs/AuditLogs.js +541 -0
- package/dist/cjs/AuditLogs.js.map +1 -0
- package/dist/cjs/BoardView.js +396 -0
- package/dist/cjs/BoardView.js.map +1 -0
- package/dist/cjs/Breadcrumbs.js +48 -0
- package/dist/cjs/Breadcrumbs.js.map +1 -0
- package/dist/cjs/BrowserPreview.js +52 -0
- package/dist/cjs/BrowserPreview.js.map +1 -0
- package/dist/cjs/BrowserSupport.js +350 -0
- package/dist/cjs/BrowserSupport.js.map +1 -0
- package/dist/cjs/Builder.js +794 -0
- package/dist/cjs/Builder.js.map +1 -0
- package/dist/cjs/ButtonGroup.js +38 -0
- package/dist/cjs/ButtonGroup.js.map +1 -0
- package/dist/cjs/CalendarView.js +358 -0
- package/dist/cjs/CalendarView.js.map +1 -0
- package/dist/cjs/CardLayout.js +51 -0
- package/dist/cjs/CardLayout.js.map +1 -0
- package/dist/cjs/Chevron-DJbXy_CD.js +256 -0
- package/dist/cjs/Chevron-DJbXy_CD.js.map +1 -0
- package/dist/cjs/Codeblock.js +60 -0
- package/dist/cjs/Codeblock.js.map +1 -0
- package/dist/cjs/Columns.js +35 -0
- package/dist/cjs/Columns.js.map +1 -0
- package/dist/cjs/ConfigurePageSidebar.js +99 -0
- package/dist/cjs/ConfigurePageSidebar.js.map +1 -0
- package/dist/cjs/ConfirmationModal.js +131 -0
- package/dist/cjs/ConfirmationModal.js.map +1 -0
- package/dist/cjs/Container.js +40 -0
- package/dist/cjs/Container.js.map +1 -0
- package/dist/cjs/CopyToClipboardButton.js +84 -0
- package/dist/cjs/CopyToClipboardButton.js.map +1 -0
- package/dist/cjs/Currency.js +920 -0
- package/dist/cjs/Currency.js.map +1 -0
- package/dist/cjs/DateFormat.js +47 -0
- package/dist/cjs/DateFormat.js.map +1 -0
- package/dist/cjs/DateRangeFilter.js +180 -0
- package/dist/cjs/DateRangeFilter.js.map +1 -0
- package/dist/cjs/DeleteArchiveModal.js +100 -0
- package/dist/cjs/DeleteArchiveModal.js.map +1 -0
- package/dist/cjs/DeviceIncompatibilityMessage.js +115 -0
- package/dist/cjs/DeviceIncompatibilityMessage.js.map +1 -0
- package/dist/cjs/DocumentEditor.js +185 -0
- package/dist/cjs/DocumentEditor.js.map +1 -0
- package/dist/cjs/DownloadMobileAppCallout.js +42 -0
- package/dist/cjs/DownloadMobileAppCallout.js.map +1 -0
- package/dist/cjs/DynamicVariables.js +117 -0
- package/dist/cjs/DynamicVariables.js.map +1 -0
- package/dist/cjs/EmailForm.js +593 -0
- package/dist/cjs/EmailForm.js.map +1 -0
- package/dist/cjs/EmailPreview.js +142 -0
- package/dist/cjs/EmailPreview.js.map +1 -0
- package/dist/cjs/EmojiPicker.js +114 -0
- package/dist/cjs/EmojiPicker.js.map +1 -0
- package/dist/cjs/EmojiReactions.js +84 -0
- package/dist/cjs/EmojiReactions.js.map +1 -0
- package/dist/cjs/Engagements.js +294 -0
- package/dist/cjs/Engagements.js.map +1 -0
- package/dist/cjs/ErrorPage.js +1831 -0
- package/dist/cjs/ErrorPage.js.map +1 -0
- package/dist/cjs/FileUpload.js +598 -0
- package/dist/cjs/FileUpload.js.map +1 -0
- package/dist/cjs/FinderModal.js +282 -0
- package/dist/cjs/FinderModal.js.map +1 -0
- package/dist/cjs/FloatingActionMenu.js +875 -0
- package/dist/cjs/FloatingActionMenu.js.map +1 -0
- package/dist/cjs/GoogleFontPicker.js +583 -0
- package/dist/cjs/GoogleFontPicker.js.map +1 -0
- package/dist/cjs/Header.js +128 -0
- package/dist/cjs/Header.js.map +1 -0
- package/dist/cjs/HelpPopover.js +85 -0
- package/dist/cjs/HelpPopover.js.map +1 -0
- package/dist/cjs/IconPicker.js +1161 -0
- package/dist/cjs/IconPicker.js.map +1 -0
- package/dist/cjs/ImageWithFallback.js +51 -0
- package/dist/cjs/ImageWithFallback.js.map +1 -0
- package/dist/cjs/InlineInput.js +233 -0
- package/dist/cjs/InlineInput.js.map +1 -0
- package/dist/cjs/Insights.js +360 -0
- package/dist/cjs/Insights.js.map +1 -0
- package/dist/cjs/IntegrationCard.js +229 -0
- package/dist/cjs/IntegrationCard.js.map +1 -0
- package/dist/cjs/IpRestriction.js +3638 -0
- package/dist/cjs/IpRestriction.js.map +1 -0
- package/dist/cjs/KeyboardShortcuts.js +286 -0
- package/dist/cjs/KeyboardShortcuts.js.map +1 -0
- package/dist/cjs/LoginPage.js +205 -0
- package/dist/cjs/LoginPage.js.map +1 -0
- package/dist/cjs/MadeWith.js +43 -0
- package/dist/cjs/MadeWith.js.map +1 -0
- package/dist/cjs/MenuBar.js +1328 -0
- package/dist/cjs/MenuBar.js.map +1 -0
- package/dist/cjs/Metadata.js +220 -0
- package/dist/cjs/Metadata.js.map +1 -0
- package/dist/cjs/MobilePreviewHeader.js +27 -0
- package/dist/cjs/MobilePreviewHeader.js.map +1 -0
- package/dist/cjs/MoreDropdown.js +165 -0
- package/dist/cjs/MoreDropdown.js.map +1 -0
- package/dist/cjs/NavigationHeader.js +266 -0
- package/dist/cjs/NavigationHeader.js.map +1 -0
- package/dist/cjs/NeetoWidget.js +2888 -0
- package/dist/cjs/NeetoWidget.js.map +1 -0
- package/dist/cjs/Onboarding.js +248 -0
- package/dist/cjs/Onboarding.js.map +1 -0
- package/dist/cjs/OptionFields.js +719 -0
- package/dist/cjs/OptionFields.js.map +1 -0
- package/dist/cjs/PageLoader.js +42 -0
- package/dist/cjs/PageLoader.js.map +1 -0
- package/dist/cjs/PhoneNumber.js +80 -0
- package/dist/cjs/PhoneNumber.js.map +1 -0
- package/dist/cjs/ProductEmbed.js +886 -0
- package/dist/cjs/ProductEmbed.js.map +1 -0
- package/dist/cjs/PublishBlock.js +449 -0
- package/dist/cjs/PublishBlock.js.map +1 -0
- package/dist/cjs/PublishYourItem.js +60 -0
- package/dist/cjs/PublishYourItem.js.map +1 -0
- package/dist/cjs/Rename.js +368 -0
- package/dist/cjs/Rename.js.map +1 -0
- package/dist/cjs/ResponsiveDevicePicker.js +65 -0
- package/dist/cjs/ResponsiveDevicePicker.js.map +1 -0
- package/dist/cjs/Schedule.js +947 -0
- package/dist/cjs/Schedule.js.map +1 -0
- package/dist/cjs/Scrollable.js +44 -0
- package/dist/cjs/Scrollable.js.map +1 -0
- package/dist/cjs/Search.js +112 -0
- package/dist/cjs/Search.js.map +1 -0
- package/dist/cjs/SendToFields.js +2223 -0
- package/dist/cjs/SendToFields.js.map +1 -0
- package/dist/cjs/SessionEnvironment.js +433 -0
- package/dist/cjs/SessionEnvironment.js.map +1 -0
- package/dist/cjs/Settings.js +252 -0
- package/dist/cjs/Settings.js.map +1 -0
- package/dist/cjs/ShareRecordingPane.js +218 -0
- package/dist/cjs/ShareRecordingPane.js.map +1 -0
- package/dist/cjs/ShareViaEmail.js +437 -0
- package/dist/cjs/ShareViaEmail.js.map +1 -0
- package/dist/cjs/ShareViaLink.js +1577 -0
- package/dist/cjs/ShareViaLink.js.map +1 -0
- package/dist/cjs/Sidebar.js +315 -0
- package/dist/cjs/Sidebar.js.map +1 -0
- package/dist/cjs/StatusDropdown.js +111 -0
- package/dist/cjs/StatusDropdown.js.map +1 -0
- package/dist/cjs/StickyRibbonsContainer.js +133 -0
- package/dist/cjs/StickyRibbonsContainer.js.map +1 -0
- package/dist/cjs/SubHeader.js +211 -0
- package/dist/cjs/SubHeader.js.map +1 -0
- package/dist/cjs/SubscriptionNotificationsContainer.js +79 -0
- package/dist/cjs/SubscriptionNotificationsContainer.js.map +1 -0
- package/dist/cjs/SuffixedInput.js +113 -0
- package/dist/cjs/SuffixedInput.js.map +1 -0
- package/dist/cjs/TableWrapper.js +29 -0
- package/dist/cjs/TableWrapper.js.map +1 -0
- package/dist/cjs/Taxonomy.js +517 -0
- package/dist/cjs/Taxonomy.js.map +1 -0
- package/dist/cjs/TimeFormat.js +16 -0
- package/dist/cjs/TimeFormat.js.map +1 -0
- package/dist/cjs/TimezoneMismatchModal.js +140 -0
- package/dist/cjs/TimezoneMismatchModal.js.map +1 -0
- package/dist/cjs/ToggleFeatureCard.js +213 -0
- package/dist/cjs/ToggleFeatureCard.js.map +1 -0
- package/dist/cjs/_commonjsHelpers-BJu3ubxk.js +11 -0
- package/dist/cjs/_commonjsHelpers-BJu3ubxk.js.map +1 -0
- package/dist/cjs/index-JY2zVpnv.js +1189 -0
- package/dist/cjs/index-JY2zVpnv.js.map +1 -0
- package/dist/cjs/inject-css-vQvjPR2x.js +6 -0
- package/dist/cjs/inject-css-vQvjPR2x.js.map +1 -0
- package/dist/cjs/phone-number-BN-c0rfv.js +320 -0
- package/dist/cjs/phone-number-BN-c0rfv.js.map +1 -0
- package/dist/cjs/platform-BUcCb8Jx.js +1254 -0
- package/dist/cjs/platform-BUcCb8Jx.js.map +1 -0
- package/dist/cjs/useColumns-BP8c4PV-.js +282 -0
- package/dist/cjs/useColumns-BP8c4PV-.js.map +1 -0
- package/dist/index-DAYCJu79.js +1187 -0
- package/dist/index-DAYCJu79.js.map +1 -0
- package/dist/inject-css-DmrvuTKK.js +4 -0
- package/dist/inject-css-DmrvuTKK.js.map +1 -0
- package/dist/phone-number-CXCBroLh.js +295 -0
- package/dist/phone-number-CXCBroLh.js.map +1 -0
- package/dist/platform-F44zJ4Xh.js +1252 -0
- package/dist/platform-F44zJ4Xh.js.map +1 -0
- package/dist/styles/page-loader.css +1 -0
- package/dist/styles/page-loader.js +3 -0
- package/dist/useColumns-Db5uic1-.js +274 -0
- package/dist/useColumns-Db5uic1-.js.map +1 -0
- package/package.json +5 -5
- package/types/AuditLogs.d.ts +22 -0
- package/types/BoardView.d.ts +149 -0
- package/types/Breadcrumbs.d.ts +30 -0
- package/types/BrowserPreview.d.ts +30 -0
- package/types/BrowserSupport.d.ts +110 -0
- package/types/Builder.d.ts +99 -0
- package/types/ButtonGroup.d.ts +45 -0
- package/types/CalendarView.d.ts +98 -0
- package/types/CardLayout.d.ts +34 -0
- package/types/Codeblock.d.ts +37 -0
- package/types/Columns.d.ts +168 -0
- package/types/ConfigurePageSidebar.d.ts +45 -0
- package/types/ConfirmationModal.d.ts +65 -0
- package/types/Container.d.ts +38 -0
- package/types/CopyToClipboardButton.d.ts +28 -0
- package/types/Currency.d.ts +50 -0
- package/types/DateFormat.d.ts +15 -0
- package/types/DateRangeFilter.d.ts +56 -0
- package/types/DeleteArchiveModal.d.ts +65 -0
- package/types/DeviceIncompatibilityMessage.d.ts +19 -0
- package/types/DocumentEditor.d.ts +61 -0
- package/types/DownloadMobileAppCallout.d.ts +35 -0
- package/types/DynamicVariables.d.ts +48 -0
- package/types/EmailForm.d.ts +165 -0
- package/types/EmailFormProvider.d.ts +48 -0
- package/types/EmailPreview.d.ts +43 -0
- package/types/EmojiPicker.d.ts +35 -0
- package/types/EmojiReactions.d.ts +62 -0
- package/types/Engagements.d.ts +131 -0
- package/types/ErrorPage.d.ts +22 -0
- package/types/FileUpload.d.ts +89 -0
- package/types/FinderModal.d.ts +66 -0
- package/types/FloatingActionMenu.d.ts +59 -0
- package/types/GoogleFontPicker.d.ts +68 -0
- package/types/Header.d.ts +37 -0
- package/types/HelpPopover.d.ts +45 -0
- package/types/IconPicker.d.ts +45 -0
- package/types/ImageWithFallback.d.ts +24 -0
- package/types/InlineInput.d.ts +87 -0
- package/types/Insights.d.ts +112 -0
- package/types/IntegrationCard.d.ts +60 -0
- package/types/IpRestriction.d.ts +25 -0
- package/types/KeyboardShortcuts.d.ts +149 -0
- package/types/LoginPage.d.ts +45 -0
- package/types/MadeWith.d.ts +18 -0
- package/types/MenuBar.d.ts +127 -0
- package/types/Metadata.d.ts +109 -0
- package/types/MobilePreviewHeader.d.ts +19 -0
- package/types/MoreDropdown.d.ts +52 -0
- package/types/NavigationHeader.d.ts +180 -0
- package/types/NeetoWidget.d.ts +43 -0
- package/types/Onboarding.d.ts +70 -0
- package/types/OptionFields.d.ts +70 -0
- package/types/PageLoader.d.ts +40 -0
- package/types/PhoneNumber.d.ts +112 -0
- package/types/ProductEmbed.d.ts +93 -0
- package/types/PublishBlock.d.ts +148 -0
- package/types/Rename.d.ts +73 -0
- package/types/ResponsiveDevicePicker.d.ts +32 -0
- package/types/Schedule.d.ts +146 -0
- package/types/Scrollable.d.ts +30 -0
- package/types/Search.d.ts +22 -0
- package/types/SendToFields.d.ts +67 -0
- package/types/SessionEnvironment.d.ts +170 -0
- package/types/Settings.d.ts +108 -0
- package/types/ShareRecordingPane.d.ts +85 -0
- package/types/ShareViaEmail.d.ts +99 -0
- package/types/ShareViaLink.d.ts +183 -0
- package/types/Sidebar.d.ts +51 -0
- package/types/StatusDropdown.d.ts +74 -0
- package/types/StickyRibbonsContainer.d.ts +28 -0
- package/types/SubHeader.d.ts +105 -0
- package/types/SubscriptionNotificationsContainer.d.ts +26 -0
- package/types/SuffixedInput.d.ts +45 -0
- package/types/TableWrapper.d.ts +40 -0
- package/types/Taxonomy.d.ts +59 -0
- package/types/TimeFormat.d.ts +13 -0
- package/types/TimezoneMismatchModal.d.ts +41 -0
- package/types/ToggleFeatureCard.d.ts +38 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StickyRibbonsContainer.js","sources":["../../src/components/StickyRibbonsContainer/constants.js","../../src/components/StickyRibbonsContainer/api.js","../../src/components/StickyRibbonsContainer/useStickyRibbonsApi.js","../../src/components/StickyRibbonsContainer/index.jsx"],"sourcesContent":["export const QUERY_KEYS = {\n APP_STICKY_RIBBONS_LIST: \"APP_STICKY_RIBBONS_LIST\",\n};\n\nexport const STICKY_RIBBON_KIND_TO_STYLE = {\n info: \"info\",\n warning: \"warning\",\n error: \"danger\",\n};\n\nexport const STICKY_RIBBONS_LOCAL_STORAGE_KEY = \"dismissedStickyRibbons\";\n\nexport const POLLING_INTERVAL = 5000;\nexport const MAX_POLLING_TIME = 60000;\n","import axios from \"axios\";\nimport { BASE_API_V1_URL } from \"neetocommons/constants\";\n\nconst fetchStickyRibbons = () =>\n axios.get(`${BASE_API_V1_URL}/sticky_ribbons`, {\n includeMetadataInResponse: true,\n });\n\nconst stickyRibbonsApi = { fetchStickyRibbons };\n\nexport default stickyRibbonsApi;\n","import { useState, useEffect } from \"react\";\n\nimport { useQuery } from \"@tanstack/react-query\";\nimport { noop } from \"neetocist\";\n\nimport stickyRibbonsApi from \"./api\";\nimport { QUERY_KEYS, POLLING_INTERVAL, MAX_POLLING_TIME } from \"./constants\";\n\nconst { APP_STICKY_RIBBONS_LIST } = QUERY_KEYS;\n\nconst useFetchStickyRibbons = () => {\n const [isPolling, setIsPolling] = useState(false);\n\n useEffect(() => {\n if (!isPolling) return noop;\n\n const timer = setTimeout(() => {\n setIsPolling(false);\n }, MAX_POLLING_TIME);\n\n return () => {\n clearTimeout(timer);\n };\n }, [isPolling]);\n\n return useQuery({\n queryKey: [APP_STICKY_RIBBONS_LIST],\n queryFn: async () => {\n const response = await stickyRibbonsApi.fetchStickyRibbons();\n\n if (response.status === 202) {\n setIsPolling(true);\n } else if (response.status === 200) {\n setIsPolling(false);\n }\n\n return response.data;\n },\n refetchInterval: isPolling ? POLLING_INTERVAL : false,\n });\n};\n\nexport { useFetchStickyRibbons };\n","import { useLocalStorage } from \"neetocommons/react-utils\";\nimport { EditorContent } from \"neetoeditor\";\nimport { Tag } from \"neetoui\";\nimport { pluck } from \"ramda\";\n\nimport {\n STICKY_RIBBONS_LOCAL_STORAGE_KEY,\n STICKY_RIBBON_KIND_TO_STYLE,\n} from \"./constants\";\nimport \"./sticky-ribbons.scss\";\nimport { useFetchStickyRibbons } from \"./useStickyRibbonsApi\";\n\nconst StickyRibbonsContainer = () => {\n const [dismissedRibbons, setDismissedRibbons] = useLocalStorage(\n STICKY_RIBBONS_LOCAL_STORAGE_KEY,\n []\n );\n\n const { data: { stickyRibbons = [] } = {} } = useFetchStickyRibbons();\n\n const handleDismiss = ribbonId => {\n const validRibbonIds = pluck(\"id\", stickyRibbons);\n const updatedDismissedRibbons = dismissedRibbons.filter(id =>\n validRibbonIds.includes(id)\n );\n\n setDismissedRibbons([...updatedDismissedRibbons, ribbonId]);\n };\n\n const visibleRibbons = stickyRibbons.filter(\n ribbon => !dismissedRibbons.includes(ribbon.id)\n );\n\n return (\n <>\n {visibleRibbons.map(({ id, kind, message }) => (\n <Tag\n className=\"neeto-molecules-sticky-ribbon w-full p-2.5 text-center\"\n key={id}\n size=\"large\"\n style={STICKY_RIBBON_KIND_TO_STYLE[kind]}\n onClose={() => handleDismiss(id)}\n >\n <EditorContent className=\"w-full\" content={message} />\n </Tag>\n ))}\n </>\n );\n};\n\nexport default StickyRibbonsContainer;\n"],"names":["QUERY_KEYS","APP_STICKY_RIBBONS_LIST","STICKY_RIBBON_KIND_TO_STYLE","info","warning","error","STICKY_RIBBONS_LOCAL_STORAGE_KEY","POLLING_INTERVAL","MAX_POLLING_TIME","fetchStickyRibbons","axios","get","concat","BASE_API_V1_URL","includeMetadataInResponse","stickyRibbonsApi","useFetchStickyRibbons","_useState","useState","_useState2","_slicedToArray","isPolling","setIsPolling","useEffect","noop","timer","setTimeout","clearTimeout","useQuery","queryKey","queryFn","_queryFn","_asyncToGenerator","_regeneratorRuntime","mark","_callee","response","wrap","_callee$","_context","prev","next","sent","status","abrupt","data","stop","apply","arguments","refetchInterval","StickyRibbonsContainer","_useLocalStorage","useLocalStorage","_useLocalStorage2","dismissedRibbons","setDismissedRibbons","_useFetchStickyRibbon","_useFetchStickyRibbon2","_useFetchStickyRibbon3","_useFetchStickyRibbon4","stickyRibbons","handleDismiss","ribbonId","validRibbonIds","pluck","updatedDismissedRibbons","filter","id","includes","_toConsumableArray","visibleRibbons","ribbon","_jsx","_Fragment","children","map","_ref","kind","message","Tag","className","size","style","onClose","EditorContent","content"],"mappings":";;;;;;;;;;;;;;;;;;AAAO,IAAMA,UAAU,GAAG;AACxBC,EAAAA,uBAAuB,EAAE,yBAAA;AAC3B,CAAC,CAAA;AAEM,IAAMC,2BAA2B,GAAG;AACzCC,EAAAA,IAAI,EAAE,MAAM;AACZC,EAAAA,OAAO,EAAE,SAAS;AAClBC,EAAAA,KAAK,EAAE,QAAA;AACT,CAAC,CAAA;AAEM,IAAMC,gCAAgC,GAAG,wBAAwB,CAAA;AAEjE,IAAMC,gBAAgB,GAAG,IAAI,CAAA;AAC7B,IAAMC,gBAAgB,GAAG,KAAK;;;;;ACVrC,IAAMC,kBAAkB,GAAG,SAArBA,kBAAkBA,GAAA;AAAA,EAAA,OACtBC,KAAK,CAACC,GAAG,IAAAC,MAAA,CAAIC,yBAAe,EAAmB,iBAAA,CAAA,EAAA;AAC7CC,IAAAA,yBAAyB,EAAE,IAAA;AAC7B,GAAC,CAAC,CAAA;AAAA,CAAA,CAAA;AAEJ,IAAMC,gBAAgB,GAAG;AAAEN,EAAAA,kBAAkB,EAAlBA,kBAAAA;AAAmB,CAAC;;ACA/C,IAAQR,uBAAuB,GAAKD,UAAU,CAAtCC,uBAAuB,CAAA;AAE/B,IAAMe,qBAAqB,GAAG,SAAxBA,qBAAqBA,GAAS;AAClC,EAAA,IAAAC,SAAA,GAAkCC,cAAQ,CAAC,KAAK,CAAC;IAAAC,UAA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A,EALjDX,EAMF,CAAC,CAAA;KACP,CAAA;AAAC,GACF,CAAC,CAAA;AAEP;;;;"}
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var classnames = require('classnames');
|
|
5
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
6
|
+
var neetoCist = require('@bigbinary/neeto-cist');
|
|
7
|
+
var ramda = require('ramda');
|
|
8
|
+
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
9
|
+
var Column = require('@bigbinary/neeto-icons/Column');
|
|
10
|
+
var Button = require('@bigbinary/neetoui/Button');
|
|
11
|
+
var reactI18next = require('react-i18next');
|
|
12
|
+
var useColumns = require('./useColumns-BP8c4PV-.js');
|
|
13
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
14
|
+
var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
|
|
15
|
+
var Download = require('@bigbinary/neeto-icons/Download');
|
|
16
|
+
var NeetoFilters = require('@bigbinary/neeto-filters-frontend/Filters');
|
|
17
|
+
var Filter = require('@bigbinary/neeto-icons/Filter');
|
|
18
|
+
var injectCss = require('./inject-css-vQvjPR2x.js');
|
|
19
|
+
require('@babel/runtime/helpers/slicedToArray');
|
|
20
|
+
require('i18next');
|
|
21
|
+
require('@bigbinary/neeto-icons/Search');
|
|
22
|
+
require('@bigbinary/neetoui/Checkbox');
|
|
23
|
+
require('@bigbinary/neetoui/Dropdown');
|
|
24
|
+
require('@bigbinary/neetoui/Input');
|
|
25
|
+
require('@bigbinary/neetoui/Label');
|
|
26
|
+
require('@bigbinary/neetoui/Typography');
|
|
27
|
+
require('zustand');
|
|
28
|
+
require('zustand/middleware');
|
|
29
|
+
require('@bigbinary/neeto-commons-frontend/utils/general');
|
|
30
|
+
|
|
31
|
+
var _excluded$1 = ["buttonProps", "columnData", "localStorageKey", "fixedColumns"];
|
|
32
|
+
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; }
|
|
33
|
+
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), !0).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; }
|
|
34
|
+
var Columns = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
35
|
+
var _ref$buttonProps = _ref.buttonProps,
|
|
36
|
+
buttonProps = _ref$buttonProps === void 0 ? {} : _ref$buttonProps,
|
|
37
|
+
columnData = _ref.columnData,
|
|
38
|
+
localStorageKey = _ref.localStorageKey,
|
|
39
|
+
fixedColumns = _ref.fixedColumns,
|
|
40
|
+
props = _objectWithoutProperties(_ref, _excluded$1);
|
|
41
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
42
|
+
t = _useTranslation.t;
|
|
43
|
+
var columnDataIndex = React.useMemo(function () {
|
|
44
|
+
return ramda.pluck("dataIndex", (columnData || []).filter(function (column) {
|
|
45
|
+
return !(fixedColumns !== null && fixedColumns !== void 0 && fixedColumns.includes(column.dataIndex));
|
|
46
|
+
}));
|
|
47
|
+
}, [columnData, fixedColumns]);
|
|
48
|
+
var _useHiddenColumns = useColumns.useHiddenColumns(localStorageKey),
|
|
49
|
+
hideColumn = _useHiddenColumns.hideColumn,
|
|
50
|
+
showColumn = _useHiddenColumns.showColumn;
|
|
51
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
52
|
+
className: "neeto-molecules-subheader__columns",
|
|
53
|
+
children: /*#__PURE__*/jsxRuntime.jsx(useColumns.Columns, _objectSpread$2({
|
|
54
|
+
isSearchable: true,
|
|
55
|
+
className: "neeto-ui-dropdown--manage-columns",
|
|
56
|
+
actionBlock: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
57
|
+
className: "grid grid-cols-2 gap-2 px-4 py-3",
|
|
58
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
59
|
+
className: "col-span-1 justify-center",
|
|
60
|
+
"data-cy": "column-visibility-hide-all-button",
|
|
61
|
+
label: t("neetoMolecules.columns.hideAll"),
|
|
62
|
+
style: "secondary",
|
|
63
|
+
onClick: function onClick() {
|
|
64
|
+
return hideColumn(columnDataIndex);
|
|
65
|
+
}
|
|
66
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
67
|
+
className: "col-span-1 justify-center",
|
|
68
|
+
"data-cy": "column-visibility-show-all-button",
|
|
69
|
+
label: t("neetoMolecules.columns.showAll"),
|
|
70
|
+
style: "secondary",
|
|
71
|
+
onClick: function onClick() {
|
|
72
|
+
return showColumn(columnDataIndex);
|
|
73
|
+
}
|
|
74
|
+
})]
|
|
75
|
+
}),
|
|
76
|
+
buttonProps: _objectSpread$2({
|
|
77
|
+
icon: Column,
|
|
78
|
+
label: null,
|
|
79
|
+
tooltipProps: {
|
|
80
|
+
content: t("neetoMolecules.columns.columns"),
|
|
81
|
+
position: "bottom",
|
|
82
|
+
touch: ["hold", 500]
|
|
83
|
+
},
|
|
84
|
+
"data-testid": "columns-button",
|
|
85
|
+
"data-cy": "columns-dropdown-button"
|
|
86
|
+
}, buttonProps)
|
|
87
|
+
}, _objectSpread$2(_objectSpread$2({
|
|
88
|
+
columnData: columnData,
|
|
89
|
+
localStorageKey: localStorageKey
|
|
90
|
+
}, props), {}, {
|
|
91
|
+
ref: ref
|
|
92
|
+
})))
|
|
93
|
+
});
|
|
94
|
+
});
|
|
95
|
+
Columns.displayName = "Columns";
|
|
96
|
+
|
|
97
|
+
var DownloadButton = reactUtils.withT(function (_ref) {
|
|
98
|
+
var t = _ref.t,
|
|
99
|
+
count = _ref.count,
|
|
100
|
+
onClick = _ref.onClick,
|
|
101
|
+
_ref$dataCy = _ref["data-cy"],
|
|
102
|
+
dataCy = _ref$dataCy === void 0 ? "download-button" : _ref$dataCy;
|
|
103
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
104
|
+
className: "neeto-molecules-subheader__download",
|
|
105
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
106
|
+
onClick: onClick,
|
|
107
|
+
"data-cy": dataCy,
|
|
108
|
+
"data-testid": "download-button",
|
|
109
|
+
icon: Download,
|
|
110
|
+
style: "text",
|
|
111
|
+
tooltipProps: {
|
|
112
|
+
content: t("neetoMolecules.common.download"),
|
|
113
|
+
position: "bottom",
|
|
114
|
+
touch: ["hold", 500]
|
|
115
|
+
}
|
|
116
|
+
}), count && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
117
|
+
className: "neeto-molecules-subheader__download-count",
|
|
118
|
+
children: count
|
|
119
|
+
})]
|
|
120
|
+
});
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
var _excluded = ["t", "buttonProps"];
|
|
124
|
+
function ownKeys$1(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; }
|
|
125
|
+
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
126
|
+
var FilterButton = reactUtils.withT(function (_ref) {
|
|
127
|
+
var t = _ref.t,
|
|
128
|
+
buttonProps = _ref.buttonProps,
|
|
129
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
130
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
131
|
+
className: "neeto-molecules-subheader__filter",
|
|
132
|
+
children: /*#__PURE__*/jsxRuntime.jsx(NeetoFilters, _objectSpread$1({
|
|
133
|
+
buttonProps: _objectSpread$1({
|
|
134
|
+
"data-testid": "filter-button",
|
|
135
|
+
icon: Filter,
|
|
136
|
+
style: "text",
|
|
137
|
+
tooltipProps: {
|
|
138
|
+
content: t("neetoMolecules.common.filter"),
|
|
139
|
+
position: "bottom",
|
|
140
|
+
touch: ["hold", 500]
|
|
141
|
+
},
|
|
142
|
+
label: null
|
|
143
|
+
}, buttonProps)
|
|
144
|
+
}, props))
|
|
145
|
+
});
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
function ownKeys(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; }
|
|
149
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
150
|
+
var RightBlock = function RightBlock(_ref) {
|
|
151
|
+
var downloadButtonProps = _ref.downloadButtonProps,
|
|
152
|
+
columnsButtonProps = _ref.columnsButtonProps,
|
|
153
|
+
filterProps = _ref.filterProps,
|
|
154
|
+
dataProps = _ref.dataProps;
|
|
155
|
+
var showIcons = neetoCist.isNotPresent(dataProps === null || dataProps === void 0 ? void 0 : dataProps.totalCount) ? true : (dataProps === null || dataProps === void 0 ? void 0 : dataProps.totalCount) > 0;
|
|
156
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
157
|
+
"data-testid": "subheader-rightblock-buttons-container",
|
|
158
|
+
className: classnames("neeto-molecules-subheader__right-actions", {
|
|
159
|
+
hidden: ramda.not(showIcons)
|
|
160
|
+
}),
|
|
161
|
+
children: [downloadButtonProps && /*#__PURE__*/jsxRuntime.jsx(DownloadButton, _objectSpread({}, downloadButtonProps)), columnsButtonProps && /*#__PURE__*/jsxRuntime.jsx(Columns, _objectSpread({}, columnsButtonProps)), filterProps && /*#__PURE__*/jsxRuntime.jsx(FilterButton, _objectSpread({}, filterProps))]
|
|
162
|
+
});
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
var css = ":root{--neeto-molecules-sub-header-height:2.3125rem;--neeto-molecules-sub-header-bottom-margin:1.25rem;--neeto-molecules-effective-subheader-height:0px}.neeto-molecules-subheader{align-items:center;background-color:rgb(var(--neeto-ui-white));display:flex;flex-direction:row;flex-shrink:0;gap:1rem;justify-content:space-between;margin-bottom:1.25rem;margin-bottom:var(--neeto-molecules-sub-header-bottom-margin);width:100%}@media screen and (max-width:768px){.neeto-molecules-subheader{flex-wrap:wrap}}.neeto-molecules-subheader .neeto-molecules-subheader__left-wrapper{display:flex;flex-grow:1}.neeto-molecules-subheader .neeto-molecules-subheader__left-wrapper .neeto-molecules-subheader__left{align-items:center;display:flex;flex-direction:row;justify-content:flex-start}.neeto-molecules-subheader .neeto-molecules-subheader__left-wrapper .neeto-molecules-subheader__left .neeto-molecules-input__prefix{color:rgb(var(--neeto-ui-gray-400))}@media screen and (max-width:360px){.neeto-molecules-subheader .neeto-molecules-subheader__left-wrapper .neeto-molecules-subheader__left h4{font-size:.875rem}}.neeto-molecules-subheader .neeto-molecules-subheader__left-wrapper .neeto-ui-btn{flex-shrink:0}.neeto-molecules-subheader .neeto-molecules-subheader__right{align-items:center;display:flex;flex-direction:row;gap:.75rem;justify-content:flex-end}@media screen and (max-width:768px){.neeto-molecules-subheader .neeto-molecules-subheader__right{margin-left:auto}}.neeto-molecules-subheader .neeto-molecules-subheader__right-actions{align-items:center;display:flex;flex-direction:row;gap:.5rem;justify-content:flex-end}.neeto-molecules-subheader .neeto-molecules-subheader__right-actions>:not([hidden])~:not([hidden]){border-left:thin solid rgb(var(--neeto-ui-gray-200));padding-left:.5rem}.neeto-molecules-subheader__download{position:relative}.neeto-molecules-subheader__download-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:inline-flex;font-size:.625rem;justify-content:center;min-height:1rem;min-width:1rem;position:absolute;right:-2px;text-align:center;top:-2px;z-index:1}.neeto-molecules-subheader__columns .neeto-ui-dropdown__popup{max-height:calc(100vh - var(--neeto-molecules-effective-header-height) - 3.5625rem);max-height:calc(100vh - var(--neeto-molecules-effective-header-height) - var(--neeto-molecules-sub-header-height) - var(--neeto-molecules-sub-header-bottom-margin));min-width:20rem}";
|
|
166
|
+
injectCss.n(css,{});
|
|
167
|
+
|
|
168
|
+
var SubHeader = function SubHeader(_ref) {
|
|
169
|
+
var _ref$className = _ref.className,
|
|
170
|
+
className = _ref$className === void 0 ? "" : _ref$className,
|
|
171
|
+
leftActionBlock = _ref.leftActionBlock,
|
|
172
|
+
rightActionBlock = _ref.rightActionBlock,
|
|
173
|
+
_ref$dataCy = _ref["data-cy"],
|
|
174
|
+
dataCy = _ref$dataCy === void 0 ? "subheader" : _ref$dataCy;
|
|
175
|
+
var subheaderRef = React.useRef(null);
|
|
176
|
+
React.useLayoutEffect(function () {
|
|
177
|
+
var updateHeaderHeight = function updateHeaderHeight() {
|
|
178
|
+
if (!subheaderRef.current) return;
|
|
179
|
+
var height = subheaderRef.current.offsetHeight;
|
|
180
|
+
document.body.style.setProperty("--neeto-molecules-effective-subheader-height", "".concat(height, "px"));
|
|
181
|
+
};
|
|
182
|
+
updateHeaderHeight();
|
|
183
|
+
window.addEventListener("resize", updateHeaderHeight);
|
|
184
|
+
return function () {
|
|
185
|
+
return window.removeEventListener("resize", updateHeaderHeight);
|
|
186
|
+
};
|
|
187
|
+
}, []);
|
|
188
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
189
|
+
className: classnames(["neeto-molecules-subheader", className]),
|
|
190
|
+
"data-cy": dataCy,
|
|
191
|
+
"data-testid": "subheader",
|
|
192
|
+
ref: subheaderRef,
|
|
193
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
194
|
+
className: "neeto-molecules-subheader__left-wrapper",
|
|
195
|
+
"data-cy": "subheader-left-wrapper",
|
|
196
|
+
children: leftActionBlock && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
197
|
+
className: "neeto-molecules-subheader__left",
|
|
198
|
+
"data-cy": "subheader-left",
|
|
199
|
+
children: leftActionBlock
|
|
200
|
+
})
|
|
201
|
+
}), rightActionBlock && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
202
|
+
className: "neeto-molecules-subheader__right",
|
|
203
|
+
"data-cy": "subheader-right",
|
|
204
|
+
children: rightActionBlock
|
|
205
|
+
})]
|
|
206
|
+
});
|
|
207
|
+
};
|
|
208
|
+
SubHeader.RightBlock = RightBlock;
|
|
209
|
+
|
|
210
|
+
module.exports = SubHeader;
|
|
211
|
+
//# sourceMappingURL=SubHeader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SubHeader.js","sources":["../../src/components/SubHeader/RightBlock/Columns.jsx","../../src/components/SubHeader/RightBlock/Download.jsx","../../src/components/SubHeader/RightBlock/Filter.jsx","../../src/components/SubHeader/RightBlock/index.jsx","../../src/components/SubHeader/index.jsx"],"sourcesContent":["import { forwardRef, useMemo } from \"react\";\n\nimport { Column } from \"neetoicons\";\nimport { Button } from \"neetoui\";\nimport { pluck } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport ManageColumns, { useHiddenColumns } from \"components/Columns\";\n\nconst Columns = forwardRef(\n (\n { buttonProps = {}, columnData, localStorageKey, fixedColumns, ...props },\n ref\n ) => {\n const { t } = useTranslation();\n\n const columnDataIndex = useMemo(\n () =>\n pluck(\n \"dataIndex\",\n (columnData || []).filter(\n column => !fixedColumns?.includes(column.dataIndex)\n )\n ),\n [columnData, fixedColumns]\n );\n\n const { hideColumn, showColumn } = useHiddenColumns(localStorageKey);\n\n return (\n <div className=\"neeto-molecules-subheader__columns\">\n <ManageColumns\n isSearchable\n className=\"neeto-ui-dropdown--manage-columns\"\n actionBlock={\n <div className=\"grid grid-cols-2 gap-2 px-4 py-3\">\n <Button\n className=\"col-span-1 justify-center\"\n data-cy=\"column-visibility-hide-all-button\"\n label={t(\"neetoMolecules.columns.hideAll\")}\n style=\"secondary\"\n onClick={() => hideColumn(columnDataIndex)}\n />\n <Button\n className=\"col-span-1 justify-center\"\n data-cy=\"column-visibility-show-all-button\"\n label={t(\"neetoMolecules.columns.showAll\")}\n style=\"secondary\"\n onClick={() => showColumn(columnDataIndex)}\n />\n </div>\n }\n buttonProps={{\n icon: Column,\n label: null,\n tooltipProps: {\n content: t(\"neetoMolecules.columns.columns\"),\n position: \"bottom\",\n touch: [\"hold\", 500],\n },\n \"data-testid\": \"columns-button\",\n \"data-cy\": \"columns-dropdown-button\",\n ...buttonProps,\n }}\n {...{ columnData, localStorageKey, ...props, ref }}\n />\n </div>\n );\n }\n);\n\nColumns.displayName = \"Columns\";\nexport default Columns;\n","import { withT } from \"neetocommons/react-utils\";\nimport { Download } from \"neetoicons\";\nimport { Button } from \"neetoui\";\n\nconst DownloadButton = withT(\n ({ t, count, onClick, \"data-cy\": dataCy = \"download-button\" }) => (\n <div className=\"neeto-molecules-subheader__download\">\n <Button\n {...{ onClick }}\n data-cy={dataCy}\n data-testid=\"download-button\"\n icon={Download}\n style=\"text\"\n tooltipProps={{\n content: t(\"neetoMolecules.common.download\"),\n position: \"bottom\",\n touch: [\"hold\", 500],\n }}\n />\n {count && (\n <span className=\"neeto-molecules-subheader__download-count\">\n {count}\n </span>\n )}\n </div>\n )\n);\n\nexport default DownloadButton;\n","import { withT } from \"neetocommons/react-utils\";\nimport { Filters as NeetoFilters } from \"neetofilters\";\nimport { Filter } from \"neetoicons\";\n\nconst FilterButton = withT(({ t, buttonProps, ...props }) => (\n <div className=\"neeto-molecules-subheader__filter\">\n <NeetoFilters\n buttonProps={{\n \"data-testid\": \"filter-button\",\n icon: Filter,\n style: \"text\",\n tooltipProps: {\n content: t(\"neetoMolecules.common.filter\"),\n position: \"bottom\",\n touch: [\"hold\", 500],\n },\n label: null,\n ...buttonProps,\n }}\n {...props}\n />\n </div>\n));\n\nexport default FilterButton;\n","import classnames from \"classnames\";\nimport { isNotPresent } from \"neetocist\";\nimport PropTypes from \"prop-types\";\nimport { not } from \"ramda\";\n\nimport Columns from \"./Columns\";\nimport Download from \"./Download\";\nimport Filter from \"./Filter\";\n\nconst RightBlock = ({\n downloadButtonProps,\n columnsButtonProps,\n filterProps,\n dataProps,\n}) => {\n const showIcons = isNotPresent(dataProps?.totalCount)\n ? true\n : dataProps?.totalCount > 0;\n\n return (\n <div\n data-testid=\"subheader-rightblock-buttons-container\"\n className={classnames(\"neeto-molecules-subheader__right-actions\", {\n hidden: not(showIcons),\n })}\n >\n {downloadButtonProps && <Download {...downloadButtonProps} />}\n {columnsButtonProps && <Columns {...columnsButtonProps} />}\n {filterProps && <Filter {...filterProps} />}\n </div>\n );\n};\n\nRightBlock.propTypes = {\n /**\n * Props that are passed to the download button.\n */\n downloadButtonProps: PropTypes.shape({\n count: PropTypes.number,\n onClick: PropTypes.func,\n }),\n /**\n * Props that are passed to the columns button, same as the `Columns` component from neetoMolecules.\n */\n columnsButtonProps: PropTypes.shape({\n onChange: PropTypes.func,\n actionBlock: PropTypes.node,\n checkboxProps: PropTypes.object,\n columnData: PropTypes.array,\n isSearchable: PropTypes.bool,\n localStorageKey: PropTypes.string,\n initialValue: PropTypes.array,\n noColumnMessage: PropTypes.string,\n searchProps: PropTypes.object,\n }),\n /**\n * Props that are passed the the filter component. These are the same props as the\n * neetoFilters `Filters` component.\n */\n filterProps: PropTypes.shape({\n size: PropTypes.oneOf([\"xsmall\", \"small\", \"large\"]),\n isOpen: PropTypes.bool,\n setIsOpen: PropTypes.func,\n columns: PropTypes.object,\n onChange: PropTypes.func,\n onSelectorsChange: PropTypes.func,\n buttonProps: PropTypes.object,\n paneProps: PropTypes.object,\n isSearchable: PropTypes.bool,\n className: PropTypes.string,\n }),\n /**\n * Props related to data being displayed, such as tables, lists, and more. The buttons\n * will be hidden if the value of `totalCount` in `dataProps` is `0`.\n */\n dataProps: PropTypes.shape({ totalCount: PropTypes.number }),\n};\n\nexport default RightBlock;\n","import { useLayoutEffect, useRef } from \"react\";\n\nimport classnames from \"classnames\";\nimport PropTypes from \"prop-types\";\n\nimport RightBlock from \"./RightBlock\";\nimport \"./subheader.scss\";\n\nconst SubHeader = ({\n className = \"\",\n leftActionBlock,\n rightActionBlock,\n \"data-cy\": dataCy = \"subheader\",\n}) => {\n const subheaderRef = useRef(null);\n\n useLayoutEffect(() => {\n const updateHeaderHeight = () => {\n if (!subheaderRef.current) return;\n const height = subheaderRef.current.offsetHeight;\n document.body.style.setProperty(\n \"--neeto-molecules-effective-subheader-height\",\n `${height}px`\n );\n };\n\n updateHeaderHeight();\n\n window.addEventListener(\"resize\", updateHeaderHeight);\n\n return () => window.removeEventListener(\"resize\", updateHeaderHeight);\n }, []);\n\n return (\n <div\n className={classnames([\"neeto-molecules-subheader\", className])}\n data-cy={dataCy}\n data-testid=\"subheader\"\n ref={subheaderRef}\n >\n <div\n className=\"neeto-molecules-subheader__left-wrapper\"\n data-cy=\"subheader-left-wrapper\"\n >\n {leftActionBlock && (\n <div\n className=\"neeto-molecules-subheader__left\"\n data-cy=\"subheader-left\"\n >\n {leftActionBlock}\n </div>\n )}\n </div>\n {rightActionBlock && (\n <div\n className=\"neeto-molecules-subheader__right\"\n data-cy=\"subheader-right\"\n >\n {rightActionBlock}\n </div>\n )}\n </div>\n );\n};\n\nSubHeader.RightBlock = RightBlock;\n\nSubHeader.propTypes = {\n /**\n * To specify external classnames as overrides to the `SubHeader`.\n */\n className: PropTypes.string,\n /**\n * To specify the content to be rendered in the left side of the `SubHeader` section.\n */\n leftActionBlock: PropTypes.node,\n /**\n * To specify the content to be rendered in the right side of the `SubHeader` section.\n */\n rightActionBlock: PropTypes.node,\n};\n\nexport default SubHeader;\n"],"names":["Columns","forwardRef","_ref","ref","_ref$buttonProps","buttonProps","columnData","localStorageKey","fixedColumns","props","_objectWithoutProperties","_excluded","_useTranslation","useTranslation","t","columnDataIndex","useMemo","pluck","filter","column","includes","dataIndex","_useHiddenColumns","useHiddenColumns","hideColumn","showColumn","_jsx","className","children","ManageColumns","_objectSpread","isSearchable","actionBlock","_jsxs","Button","label","style","onClick","icon","Column","tooltipProps","content","position","touch","displayName","DownloadButton","withT","count","_ref$dataCy","dataCy","Download","FilterButton","NeetoFilters","Filter","RightBlock","downloadButtonProps","columnsButtonProps","filterProps","dataProps","showIcons","isNotPresent","totalCount","classnames","hidden","not","SubHeader","_ref$className","leftActionBlock","rightActionBlock","subheaderRef","useRef","useLayoutEffect","updateHeaderHeight","current","height","offsetHeight","document","body","setProperty","concat","window","addEventListener","removeEventListener"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,IAAMA,OAAO,gBAAGC,gBAAU,CACxB,UAAAC,IAAA,EAEEC,GAAG,EACA;AAAA,EAAA,IAAAC,gBAAA,GAAAF,IAAA,CAFDG,WAAW;AAAXA,IAAAA,WAAW,GAAAD,gBAAA,KAAA,KAAA,CAAA,GAAG,EAAE,GAAAA,gBAAA;IAAEE,UAAU,GAAAJ,IAAA,CAAVI,UAAU;IAAEC,eAAe,GAAAL,IAAA,CAAfK,eAAe;IAAEC,YAAY,GAAAN,IAAA,CAAZM,YAAY;AAAKC,IAAAA,KAAK,GAAAC,wBAAA,CAAAR,IAAA,EAAAS,WAAA,CAAA,CAAA;AAGvE,EAAA,IAAAC,eAAA,GA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BAAkB,CAAC,CAAA;AAAA,KAAA,CAAA;GACtE,EAAE,EAAE,CAAC,CAAA;AAEN,EAAA,oBACEvC,eAAA,CAAA,KAAA,EAAA;IACEN,SAAS,EAAEmC,UAAU,CAAC,CAAC,2BAA2B,EAAEnC,SAAS,CAAC,CAAE;AAChE,IAAA,SAAA,EAASsB,MAAO;AAChB,IAAA,aAAA,EAAY,WAAW;AACvB9C,IAAAA,GAAG,EAAEkE,YAAa;AAAAzC,IAAAA,QAAA,gBAElBF,cAAA,CAAA,KAAA,EAAA;AACEC,MAAAA,SAAS,EAAC,yCAAyC;AACnD,MAAA,SAAA,EAAQ,wBAAwB;MAAAC,QAAA,EAE/BuC,eAAe,iBACdzC,cAAA,CAAA,KAAA,EAAA;AACEC,QAAAA,SAAS,EAAC,iCAAiC;AAC3C,QAAA,SAAA,EAAQ,gBAAgB;AAAAC,QAAAA,QAAA,EAEvBuC,eAAAA;OACE,CAAA;AACN,KACE,CAAC,EACLC,gBAAgB,iBACf1C,cAAA,CAAA,KAAA,EAAA;AACEC,MAAAA,SAAS,EAAC,kCAAkC;AAC5C,MAAA,SAAA,EAAQ,iBAAiB;AAAAC,MAAAA,QAAA,EAExBwC,gBAAAA;AAAgB,KACd,CACN,CAAA;AAAA,GACE,CAAC,CAAA;AAEV,EAAC;AAEDH,SAAS,CAACX,UAAU,GAAGA,UAAU;;;;"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var neetoCist = require('@bigbinary/neeto-cist');
|
|
4
|
+
var utils = require('@bigbinary/neeto-commons-frontend/utils');
|
|
5
|
+
var Callout = require('@bigbinary/neetoui/Callout');
|
|
6
|
+
var Typography = require('@bigbinary/neetoui/Typography');
|
|
7
|
+
var Button = require('@bigbinary/neetoui/Button');
|
|
8
|
+
var reactI18next = require('react-i18next');
|
|
9
|
+
var injectCss = require('./inject-css-vQvjPR2x.js');
|
|
10
|
+
var reactQuery = require('@tanstack/react-query');
|
|
11
|
+
var axios = require('axios');
|
|
12
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
13
|
+
|
|
14
|
+
var QUERY_KEYS = {
|
|
15
|
+
SUBSCRIPTIONS_LIST: "SUBSCRIPTIONS_LIST"
|
|
16
|
+
};
|
|
17
|
+
var SUBSCRIPTION_STATUS = {
|
|
18
|
+
past_due: "past_due"
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
var css = ".neeto-molecules-subscription-notifications{border-radius:0}";
|
|
22
|
+
injectCss.n(css,{});
|
|
23
|
+
|
|
24
|
+
var fetchSubscriptions = function fetchSubscriptions() {
|
|
25
|
+
return axios.get("neeto_sso/api/v1/server/subscriptions");
|
|
26
|
+
};
|
|
27
|
+
var subscriptionsApi = {
|
|
28
|
+
fetchSubscriptions: fetchSubscriptions
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
var SUBSCRIPTIONS_LIST = QUERY_KEYS.SUBSCRIPTIONS_LIST;
|
|
32
|
+
var useFetchSubscriptions = function useFetchSubscriptions() {
|
|
33
|
+
return reactQuery.useQuery({
|
|
34
|
+
queryKey: [SUBSCRIPTIONS_LIST],
|
|
35
|
+
queryFn: subscriptionsApi.fetchSubscriptions
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
var SubscriptionNotificationsContainer = function SubscriptionNotificationsContainer() {
|
|
40
|
+
var _useFetchSubscription = useFetchSubscriptions(),
|
|
41
|
+
_useFetchSubscription2 = _useFetchSubscription.data,
|
|
42
|
+
_useFetchSubscription3 = _useFetchSubscription2 === void 0 ? {} : _useFetchSubscription2,
|
|
43
|
+
_useFetchSubscription4 = _useFetchSubscription3.clientAppSubscriptions,
|
|
44
|
+
clientAppSubscriptions = _useFetchSubscription4 === void 0 ? [] : _useFetchSubscription4;
|
|
45
|
+
var visibleNotifications = neetoCist.filterBy({
|
|
46
|
+
status: SUBSCRIPTION_STATUS.past_due
|
|
47
|
+
}, clientAppSubscriptions);
|
|
48
|
+
return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
49
|
+
children: visibleNotifications.map(function (_ref, index) {
|
|
50
|
+
var downgradeScheduledAt = _ref.downgradeScheduledAt,
|
|
51
|
+
customerPortalUrl = _ref.customerPortalUrl;
|
|
52
|
+
return /*#__PURE__*/jsxRuntime.jsx(Callout, {
|
|
53
|
+
className: "neeto-molecules-subscription-notifications w-full p-2.5",
|
|
54
|
+
"data-testid": "subscription-notifications",
|
|
55
|
+
style: "warning",
|
|
56
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
57
|
+
style: "body2",
|
|
58
|
+
children: /*#__PURE__*/jsxRuntime.jsx(reactI18next.Trans, {
|
|
59
|
+
i18nKey: "neetoMolecules.subscription.paymentFailedNotification",
|
|
60
|
+
components: {
|
|
61
|
+
a: /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
62
|
+
href: customerPortalUrl,
|
|
63
|
+
rel: "noreferrer",
|
|
64
|
+
style: "link",
|
|
65
|
+
target: "_blank"
|
|
66
|
+
})
|
|
67
|
+
},
|
|
68
|
+
values: {
|
|
69
|
+
downgradeScheduledAt: utils.dateFormat.date(downgradeScheduledAt)
|
|
70
|
+
}
|
|
71
|
+
})
|
|
72
|
+
})
|
|
73
|
+
}, index);
|
|
74
|
+
})
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
module.exports = SubscriptionNotificationsContainer;
|
|
79
|
+
//# sourceMappingURL=SubscriptionNotificationsContainer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SubscriptionNotificationsContainer.js","sources":["../../src/components/SubscriptionNotificationsContainer/constants.js","../../src/components/SubscriptionNotificationsContainer/api.js","../../src/components/SubscriptionNotificationsContainer/useSubscriptionsApi.js","../../src/components/SubscriptionNotificationsContainer/index.jsx"],"sourcesContent":["export const QUERY_KEYS = {\n SUBSCRIPTIONS_LIST: \"SUBSCRIPTIONS_LIST\",\n};\n\nexport const SUBSCRIPTION_STATUS = { past_due: \"past_due\" };\n","import axios from \"axios\";\n\nconst fetchSubscriptions = () =>\n axios.get(\"neeto_sso/api/v1/server/subscriptions\");\n\nconst subscriptionsApi = { fetchSubscriptions };\n\nexport default subscriptionsApi;\n","import { useQuery } from \"@tanstack/react-query\";\n\nimport subscriptionsApi from \"./api\";\nimport { QUERY_KEYS } from \"./constants\";\n\nconst { SUBSCRIPTIONS_LIST } = QUERY_KEYS;\n\nconst useFetchSubscriptions = () =>\n useQuery({\n queryKey: [SUBSCRIPTIONS_LIST],\n queryFn: subscriptionsApi.fetchSubscriptions,\n });\n\nexport { useFetchSubscriptions };\n","import { filterBy } from \"neetocist\";\nimport { dateFormat } from \"neetocommons/utils\";\nimport { Callout, Typography, Button } from \"neetoui\";\nimport { Trans } from \"react-i18next\";\n\nimport { SUBSCRIPTION_STATUS } from \"./constants\";\nimport \"./subscription-notifications.scss\";\nimport { useFetchSubscriptions } from \"./useSubscriptionsApi\";\n\nconst SubscriptionNotificationsContainer = () => {\n const { data: { clientAppSubscriptions = [] } = {} } =\n useFetchSubscriptions();\n\n const visibleNotifications = filterBy(\n { status: SUBSCRIPTION_STATUS.past_due },\n clientAppSubscriptions\n );\n\n return (\n <>\n {visibleNotifications.map(\n ({ downgradeScheduledAt, customerPortalUrl }, index) => (\n <Callout\n className=\"neeto-molecules-subscription-notifications w-full p-2.5\"\n data-testid=\"subscription-notifications\"\n key={index}\n style=\"warning\"\n >\n <Typography style=\"body2\">\n <Trans\n i18nKey=\"neetoMolecules.subscription.paymentFailedNotification\"\n components={{\n a: (\n <Button\n href={customerPortalUrl}\n rel=\"noreferrer\"\n style=\"link\"\n target=\"_blank\"\n />\n ),\n }}\n values={{\n downgradeScheduledAt: dateFormat.date(downgradeScheduledAt),\n }}\n />\n </Typography>\n </Callout>\n )\n )}\n </>\n );\n};\n\nexport default SubscriptionNotificationsContainer;\n"],"names":["QUERY_KEYS","SUBSCRIPTIONS_LIST","SUBSCRIPTION_STATUS","past_due","fetchSubscriptions","axios","get","subscriptionsApi","useFetchSubscriptions","useQuery","queryKey","queryFn","SubscriptionNotificationsContainer","_useFetchSubscription","_useFetchSubscription2","data","_useFetchSubscription3","_useFetchSubscription4","clientAppSubscriptions","visibleNotifications","filterBy","status","_jsx","_Fragment","children","map","_ref","index","downgradeScheduledAt","customerPortalUrl","Callout","className","style","Typography","Trans","i18nKey","components","a","Button","href","rel","target","values","dateFormat","date"],"mappings":";;;;;;;;;;;;;AAAO,IAAMA,UAAU,GAAG;AACxBC,EAAAA,kBAAkB,EAAE,oBAAA;AACtB,CAAC,CAAA;AAEM,IAAMC,mBAAmB,GAAG;AAAEC,EAAAA,QAAQ,EAAE,UAAA;AAAW,CAAC;;;;;ACF3D,IAAMC,kBAAkB,GAAG,SAArBA,kBAAkBA,GAAA;AAAA,EAAA,OACtBC,KAAK,CAACC,GAAG,CAAC,uCAAuC,CAAC,CAAA;AAAA,CAAA,CAAA;AAEpD,IAAMC,gBAAgB,GAAG;AAAEH,EAAAA,kBAAkB,EAAlBA,kBAAAA;AAAmB,CAAC;;ACA/C,IAAQH,kBAAkB,GAAKD,UAAU,CAAjCC,kBAAkB,CAAA;AAE1B,IAAMO,qBAAqB,GAAG,SAAxBA,qBAAqBA,GAAA;AAAA,EAAA,OACzBC,mBAAQ,CAAC;IACPC,QAAQ,EAAE,CAACT,kBAAkB,CAAC;IAC9BU,OAAO,EAAEJ,gBAAgB,CAACH,kBAAAA;AAC5B,GAAC,CAAC,CAAA;AAAA,CAAA;;ACFJ,IAAMQ,kCAAkC,GAAG,SAArCA,kCAAkCA,GAAS;AAC/C,EAAA,IAAAC,qBAAA,GACEL,qBAAqB,EAAE;IAAAM,sBAAA,GAAAD,qBAAA,CADjBE,IAAI;AAAAC,IAAAA,sBAAA,GAAAF,sBAAA,KAAA,KAAA,CAAA,GAAoC,EAAE,GAAAA,sBAAA;IAAAG,sBAAA,GAAAD,sBAAA,CAAlCE,sBAAsB;AAAtBA,IAAAA,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require('@babel/runtime/helpers/defineProperty');
|
|
4
|
+
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var neetoCist = require('@bigbinary/neeto-cist');
|
|
7
|
+
var Info = require('@bigbinary/neeto-icons/Info');
|
|
8
|
+
var Input = require('@bigbinary/neetoui/formik/Input');
|
|
9
|
+
var ramda = require('ramda');
|
|
10
|
+
var CopyToClipboardButton = require('./CopyToClipboardButton.js');
|
|
11
|
+
var injectCss = require('./inject-css-vQvjPR2x.js');
|
|
12
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
13
|
+
require('@babel/runtime/helpers/objectWithoutProperties');
|
|
14
|
+
require('classnames');
|
|
15
|
+
require('@bigbinary/neeto-commons-frontend/utils/general');
|
|
16
|
+
require('@bigbinary/neeto-icons/Copy');
|
|
17
|
+
require('@bigbinary/neeto-icons/Check');
|
|
18
|
+
require('@bigbinary/neetoui/Button');
|
|
19
|
+
require('react-i18next');
|
|
20
|
+
|
|
21
|
+
var INPUT_FIELD_MIN_WIDTH = 60;
|
|
22
|
+
|
|
23
|
+
var css = ".nm-suffixed-input-field{max-width:100%;min-width:0;width:-moz-max-content;width:max-content}.nm-suffixed-input-field .neeto-ui-input{align-items:stretch}.nm-suffixed-input-field .neeto-ui-input .neeto-ui-input__suffix{background-color:rgb(var(--neeto-ui-gray-200));cursor:not-allowed;margin:0 0 0 .25rem!important;padding:.3125rem .5rem;white-space:nowrap}.nm-suffixed-input-field input{padding-right:0!important}";
|
|
24
|
+
injectCss.n(css,{});
|
|
25
|
+
|
|
26
|
+
function ownKeys(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; }
|
|
27
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
28
|
+
var SuffixedInput = function SuffixedInput(_ref) {
|
|
29
|
+
var _placeholderRef$curre2, _placeholderRef$curre3;
|
|
30
|
+
var placeholder = _ref.placeholder,
|
|
31
|
+
helpUrl = _ref.helpUrl,
|
|
32
|
+
helpIconTooltipContent = _ref.helpIconTooltipContent,
|
|
33
|
+
label = _ref.label,
|
|
34
|
+
value = _ref.value,
|
|
35
|
+
getInputRef = _ref.getInputRef,
|
|
36
|
+
suffix = _ref.suffix,
|
|
37
|
+
_ref$isCopyToClipboar = _ref.isCopyToClipboardEnabled,
|
|
38
|
+
isCopyToClipboardEnabled = _ref$isCopyToClipboar === void 0 ? false : _ref$isCopyToClipboar,
|
|
39
|
+
_ref$name = _ref.name,
|
|
40
|
+
name = _ref$name === void 0 ? "email" : _ref$name,
|
|
41
|
+
_ref$inputProps = _ref.inputProps,
|
|
42
|
+
inputProps = _ref$inputProps === void 0 ? {} : _ref$inputProps;
|
|
43
|
+
var _useState = React.useState(INPUT_FIELD_MIN_WIDTH),
|
|
44
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
45
|
+
initialInputWidth = _useState2[0],
|
|
46
|
+
setInitialInputWidth = _useState2[1];
|
|
47
|
+
var inputRef = React.useRef(null);
|
|
48
|
+
var placeholderRef = React.useRef(null);
|
|
49
|
+
var setInputRef = function setInputRef(ref) {
|
|
50
|
+
inputRef.current = ref;
|
|
51
|
+
getInputRef === null || getInputRef === void 0 || getInputRef(ref);
|
|
52
|
+
};
|
|
53
|
+
React.useEffect(function () {
|
|
54
|
+
var _placeholderRef$curre;
|
|
55
|
+
//To handle the input width on initial render.
|
|
56
|
+
var placeholderSpanWidth = (_placeholderRef$curre = placeholderRef.current) === null || _placeholderRef$curre === void 0 ? void 0 : _placeholderRef$curre.offsetWidth;
|
|
57
|
+
setInitialInputWidth(placeholderSpanWidth);
|
|
58
|
+
}, []);
|
|
59
|
+
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
60
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
61
|
+
// Dummy element to calculate the width to be set for the input. Do not remove.
|
|
62
|
+
className: "pointer-events-none invisible absolute pl-2",
|
|
63
|
+
ref: placeholderRef,
|
|
64
|
+
children: value || placeholder
|
|
65
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
66
|
+
className: "inline-flex max-w-full items-end gap-2",
|
|
67
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Input, _objectSpread(_objectSpread({}, _objectSpread({
|
|
68
|
+
label: label,
|
|
69
|
+
name: name,
|
|
70
|
+
placeholder: placeholder
|
|
71
|
+
}, inputProps)), {}, {
|
|
72
|
+
className: "nm-suffixed-input-field",
|
|
73
|
+
ref: setInputRef,
|
|
74
|
+
type: "text",
|
|
75
|
+
labelProps: {
|
|
76
|
+
helpIconProps: neetoCist.isPresent(helpUrl) && {
|
|
77
|
+
icon: Info,
|
|
78
|
+
className: "cursor-pointer opacity-75 hover:opacity-100 transition-opacity duration-300 ease-in-out",
|
|
79
|
+
onClick: function onClick() {
|
|
80
|
+
return window.open(helpUrl, "_blank");
|
|
81
|
+
},
|
|
82
|
+
tooltipProps: {
|
|
83
|
+
content: helpIconTooltipContent,
|
|
84
|
+
position: "right",
|
|
85
|
+
disabled: neetoCist.isNotPresent(helpUrl)
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
style: {
|
|
90
|
+
minWidth: ramda.isEmpty(value) ? INPUT_FIELD_MIN_WIDTH : 0,
|
|
91
|
+
width: (_placeholderRef$curre2 = (_placeholderRef$curre3 = placeholderRef.current) === null || _placeholderRef$curre3 === void 0 ? void 0 : _placeholderRef$curre3.offsetWidth) !== null && _placeholderRef$curre2 !== void 0 ? _placeholderRef$curre2 : initialInputWidth // Additional 2px to act as a buffer.
|
|
92
|
+
},
|
|
93
|
+
suffix:
|
|
94
|
+
/*#__PURE__*/
|
|
95
|
+
// Added onClick to focus the input even when the suffix part is clicked.
|
|
96
|
+
jsxRuntime.jsx("span", {
|
|
97
|
+
onClick: function onClick() {
|
|
98
|
+
var _inputRef$current;
|
|
99
|
+
return (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
|
|
100
|
+
},
|
|
101
|
+
children: suffix
|
|
102
|
+
})
|
|
103
|
+
})), isCopyToClipboardEnabled && /*#__PURE__*/jsxRuntime.jsx(CopyToClipboardButton, {
|
|
104
|
+
disabled: ramda.isEmpty(value),
|
|
105
|
+
style: "text",
|
|
106
|
+
value: "".concat(value).concat(suffix)
|
|
107
|
+
})]
|
|
108
|
+
})]
|
|
109
|
+
});
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
module.exports = SuffixedInput;
|
|
113
|
+
//# sourceMappingURL=SuffixedInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SuffixedInput.js","sources":["../../src/components/SuffixedInput/constants.js","../../src/components/SuffixedInput/index.jsx"],"sourcesContent":["export const INPUT_FIELD_MIN_WIDTH = 60;\n","import { useEffect, useRef, useState } from \"react\";\n\nimport { isPresent, isNotPresent } from \"neetocist\";\nimport { Info } from \"neetoicons\";\nimport { Input } from \"neetoui/formik\";\nimport PropTypes from \"prop-types\";\nimport { isEmpty } from \"ramda\";\n\nimport CopyToClipboardButton from \"components/CopyToClipboardButton\";\n\nimport { INPUT_FIELD_MIN_WIDTH } from \"./constants\";\nimport \"./suffixed-input.scss\";\n\nconst SuffixedInput = ({\n placeholder,\n helpUrl,\n helpIconTooltipContent,\n label,\n value,\n getInputRef,\n suffix,\n isCopyToClipboardEnabled = false,\n name = \"email\",\n inputProps = {},\n}) => {\n const [initialInputWidth, setInitialInputWidth] = useState(\n INPUT_FIELD_MIN_WIDTH\n );\n const inputRef = useRef(null);\n const placeholderRef = useRef(null);\n\n const setInputRef = ref => {\n inputRef.current = ref;\n getInputRef?.(ref);\n };\n\n useEffect(() => {\n //To handle the input width on initial render.\n const placeholderSpanWidth = placeholderRef.current?.offsetWidth;\n setInitialInputWidth(placeholderSpanWidth);\n }, []);\n\n return (\n <>\n <span // Dummy element to calculate the width to be set for the input. Do not remove.\n className=\"pointer-events-none invisible absolute pl-2\"\n ref={placeholderRef}\n >\n {value || placeholder}\n </span>\n <div className=\"inline-flex max-w-full items-end gap-2\">\n <Input\n {...{ label, name, placeholder, ...inputProps }}\n className=\"nm-suffixed-input-field\"\n ref={setInputRef}\n type=\"text\"\n labelProps={{\n helpIconProps: isPresent(helpUrl) && {\n icon: Info,\n className:\n \"cursor-pointer opacity-75 hover:opacity-100 transition-opacity duration-300 ease-in-out\",\n onClick: () => window.open(helpUrl, \"_blank\"),\n tooltipProps: {\n content: helpIconTooltipContent,\n position: \"right\",\n disabled: isNotPresent(helpUrl),\n },\n },\n }}\n style={{\n minWidth: isEmpty(value) ? INPUT_FIELD_MIN_WIDTH : 0,\n width: placeholderRef.current?.offsetWidth ?? initialInputWidth, // Additional 2px to act as a buffer.\n }}\n suffix={\n // Added onClick to focus the input even when the suffix part is clicked.\n <span onClick={() => inputRef.current?.focus()}>{suffix}</span>\n }\n />\n {isCopyToClipboardEnabled && (\n <CopyToClipboardButton\n disabled={isEmpty(value)}\n style=\"text\"\n value={`${value}${suffix}`}\n />\n )}\n </div>\n </>\n );\n};\n\nSuffixedInput.propTypes = {\n /**\n * Placeholder of the input field.\n */\n placeholder: PropTypes.string,\n /**\n * A help icon will be displayed next to the label if helpUrl is present. On clicking the icon will take the user to the URL.\n */\n helpUrl: PropTypes.string,\n /**\n * Text to be displayed inside the tooltip of the help icon.\n */\n helpIconTooltipContent: PropTypes.string,\n /**\n * Label of the input field.\n */\n label: PropTypes.string,\n /**\n * The value entered by the user, eg: email.\n */\n value: PropTypes.string,\n /**\n * A method to get the ref of the input field.\n */\n getInputRef: PropTypes.func,\n /**\n * Domain name to be rendered next to the input field.\n */\n suffix: PropTypes.string,\n /**\n * Whether to show the copy to clipboard button.\n */\n isCopyToClipboardEnabled: PropTypes.bool,\n /**\n * Formik field name of the input field.\n */\n name: PropTypes.string,\n /**\n * This will be passed down to the `Input` component.\n */\n inputProps: PropTypes.object,\n};\n\nexport default SuffixedInput;\n"],"names":["INPUT_FIELD_MIN_WIDTH","SuffixedInput","_ref","_placeholderRef$curre2","_placeholderRef$curre3","placeholder","helpUrl","helpIconTooltipContent","label","value","getInputRef","suffix","_ref$isCopyToClipboar","isCopyToClipboardEnabled","_ref$name","name","_ref$inputProps","inputProps","_useState","useState","_useState2","_slicedToArray","initialInputWidth","setInitialInputWidth","inputRef","useRef","placeholderRef","setInputRef","ref","current","useEffect","_placeholderRef$curre","placeholderSpanWidth","offsetWidth","_jsxs","_Fragment","children","_jsx","className","Input","_objectSpread","type","labelProps","helpIconProps","isPresent","icon","Info","onClick","window","open","tooltipProps","content","position","disabled","isNotPresent","style","minWidth","isEmpty","width","_inputRef$current","focus","CopyToClipboardButton","concat"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAO,IAAMA,qBAAqB,GAAG,EAAE;;;;;;;ACavC,IAAMC,aAAa,GAAG,SAAhBA,aAAaA,CAAAC,IAAA,EAWb;EAAA,IAAAC,sBAAA,EAAAC,sBAAA,CAAA;AAAA,EAAA,IAVJC,WAAW,GAAAH,IAAA,CAAXG,WAAW;IACXC,OAAO,GAAAJ,IAAA,CAAPI,OAAO;IACPC,sBAAsB,GAAAL,IAAA,CAAtBK,sBAAsB;IACtBC,KAAK,GAAAN,IAAA,CAALM,KAAK;IACLC,KAAK,GAAAP,IAAA,CAALO,KAAK;IACLC,WAAW,GAAAR,IAAA,CAAXQ,WAAW;IACXC,MAAM,GAAAT,IAAA,CAANS,MAAM;IAAAC,qBAAA,GAAAV,IAAA,CACNW,w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AAAC,CAAAA,sBAAA,GAAEsB,cAAc,CAACG,OAAO,MAAAzB,IAAAA,IAAAA,sBAAA,uBAAtBA,sBAAA,CAAwB6B,WAAW,MAAA9B,IAAAA,IAAAA,sBAAA,cAAAA,sBAAA,GAAImB,iBAAiB;SAC/D;QACFX,MAAM;AAAA;AACJ;QACA0B,cAAA,CAAA,MAAA,EAAA;UAAMU,OAAO,EAAE,SAATA,OAAOA,GAAA;AAAA,YAAA,IAAAY,iBAAA,CAAA;AAAA,YAAA,OAAA,CAAAA,iBAAA,GAAQnC,QAAQ,CAACK,OAAO,MAAA,IAAA,IAAA8B,iBAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAhBA,iBAAA,CAAkBC,KAAK,EAAE,CAAA;WAAC;AAAAxB,UAAAA,QAAA,EAAEzB,MAAAA;SAAa,CAAA;AAC/D,OAAA,CACF,CAAC,EACDE,wBAAwB,iBACvBwB,cAAA,CAACwB,qBAAqB,EAAA;AACpBR,QAAAA,QAAQ,EAAEI,aAAO,CAAChD,KAAK,CAAE;AACzB8C,QAAAA,KAAK,EAAC,MAAM;AACZ9C,QAAAA,KAAK,KAAAqD,MAAA,CAAKrD,KAAK,CAAAqD,CAAAA,MAAA,CAAGnD,MAAM,CAAA;AAAG,OAC5B,CACF,CAAA;AAAA,KACE,CAAC,CAAA;AAAA,GACN,CAAC,CAAA;AAEP;;;;"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var classnames = require('classnames');
|
|
4
|
+
var injectCss = require('./inject-css-vQvjPR2x.js');
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
|
|
7
|
+
var css = ".neeto-molecules-tablewrapper-pagination--height{padding:0 0 3rem}";
|
|
8
|
+
injectCss.n(css,{});
|
|
9
|
+
|
|
10
|
+
var TableWrapper = function TableWrapper(_ref) {
|
|
11
|
+
var children = _ref.children,
|
|
12
|
+
_ref$className = _ref.className,
|
|
13
|
+
className = _ref$className === void 0 ? "" : _ref$className,
|
|
14
|
+
_ref$hasPagination = _ref.hasPagination,
|
|
15
|
+
hasPagination = _ref$hasPagination === void 0 ? false : _ref$hasPagination;
|
|
16
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
17
|
+
"data-testid": "table-wrapper",
|
|
18
|
+
className: classnames("flex min-h-0 w-full flex-grow flex-col pb-6", className),
|
|
19
|
+
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
20
|
+
className: classnames("min-h-0 flex-grow", {
|
|
21
|
+
"neeto-molecules-tablewrapper-pagination--height": hasPagination
|
|
22
|
+
}),
|
|
23
|
+
children: children
|
|
24
|
+
})
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
module.exports = TableWrapper;
|
|
29
|
+
//# sourceMappingURL=TableWrapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableWrapper.js","sources":["../../src/components/TableWrapper/index.jsx"],"sourcesContent":["import classNames from \"classnames\";\nimport PropTypes from \"prop-types\";\n\nimport \"./table-wrapper.scss\";\n\nconst TableWrapper = ({ children, className = \"\", hasPagination = false }) => (\n <div\n data-testid=\"table-wrapper\"\n className={classNames(\n \"flex min-h-0 w-full flex-grow flex-col pb-6\",\n className\n )}\n >\n <div\n className={classNames(\"min-h-0 flex-grow\", {\n \"neeto-molecules-tablewrapper-pagination--height\": hasPagination,\n })}\n >\n {children}\n </div>\n </div>\n);\n\nTableWrapper.propTypes = {\n /**\n * Custom classnames for table wrapper.\n */\n className: PropTypes.string,\n /**\n * Handles table wrapper height when pagination is enabled.\n *\n * `hasPagination={totalCount > defaultPageSize}`\n */\n hasPagination: PropTypes.bool,\n};\n\nexport default TableWrapper;\n"],"names":["TableWrapper","_ref","children","_ref$className","className","_ref$hasPagination","hasPagination","_jsx","classNames"],"mappings":";;;;;;;;;AAKA,IAAMA,YAAY,GAAG,SAAfA,YAAYA,CAAAC,IAAA,EAAA;AAAA,EAAA,IAAMC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IAAAC,cAAA,GAAAF,IAAA,CAAEG,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAG,KAAA,CAAA,GAAA,EAAE,GAAAA,cAAA;IAAAE,kBAAA,GAAAJ,IAAA,CAAEK,aAAa;AAAbA,IAAAA,aAAa,GAAAD,kBAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,kBAAA,CAAA;AAAA,EAAA,oBACrEE,cAAA,CAAA,KAAA,EAAA;AACE,IAAA,aAAA,EAAY,eAAe;AAC3BH,IAAAA,SAAS,EAAEI,UAAU,CACnB,6CAA6C,EAC7CJ,SACF,CAAE;AAAAF,IAAAA,QAAA,eAEFK,cAAA,CAAA,KAAA,EAAA;AACEH,MAAAA,SAAS,EAAEI,UAAU,CAAC,mBAAmB,EAAE;AACzC,QAAA,iDAAiD,EAAEF,aAAAA;AACrD,OAAC,CAAE;AAAAJ,MAAAA,QAAA,EAEFA,QAAAA;KACE,CAAA;AAAC,GACH,CAAC,CAAA;AAAA;;;;"}
|