@galaxy-io/dls 1.0.3
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/README.md +42 -0
- package/dist/accordion/Accordion.d.ts +30 -0
- package/dist/accordion/Accordion.js +147 -0
- package/dist/animations/Fade.d.ts +6 -0
- package/dist/animations/Fade.js +22 -0
- package/dist/animations/Flashing.d.ts +3 -0
- package/dist/animations/Flashing.js +14 -0
- package/dist/animations/RotateWithTransition.d.ts +8 -0
- package/dist/animations/RotateWithTransition.js +28 -0
- package/dist/animations/ScaleFade.d.ts +6 -0
- package/dist/animations/ScaleFade.js +31 -0
- package/dist/animations/SpinAnimation.d.ts +7 -0
- package/dist/animations/SpinAnimation.js +20 -0
- package/dist/animations/SpinVerticalAnimation.d.ts +6 -0
- package/dist/animations/SpinVerticalAnimation.js +19 -0
- package/dist/assets/components/GalaxyLogomarkDark.d.ts +3 -0
- package/dist/assets/components/GalaxyLogomarkDark.js +11 -0
- package/dist/assets/components/GalaxyLogomarkLight.d.ts +3 -0
- package/dist/assets/components/GalaxyLogomarkLight.js +17 -0
- package/dist/assets/components/GalaxyWordmarkDark.d.ts +3 -0
- package/dist/assets/components/GalaxyWordmarkDark.js +15 -0
- package/dist/assets/components/GalaxyWordmarkLight.d.ts +3 -0
- package/dist/assets/components/GalaxyWordmarkLight.js +28 -0
- package/dist/assets/components/enrichment/PerplexityIcon.d.ts +3 -0
- package/dist/assets/components/enrichment/PerplexityIcon.js +35 -0
- package/dist/assets/components/enrichment/TavilyIcon.d.ts +3 -0
- package/dist/assets/components/enrichment/TavilyIcon.js +15 -0
- package/dist/assets/components/onboarding/TenantSetupDark.d.ts +3 -0
- package/dist/assets/components/onboarding/TenantSetupDark.js +498 -0
- package/dist/assets/components/onboarding/TenantSetupLight.d.ts +3 -0
- package/dist/assets/components/onboarding/TenantSetupLight.js +482 -0
- package/dist/assets/components/onboarding/UserSetupDark.d.ts +3 -0
- package/dist/assets/components/onboarding/UserSetupDark.js +1086 -0
- package/dist/assets/components/onboarding/UserSetupLight.d.ts +3 -0
- package/dist/assets/components/onboarding/UserSetupLight.js +1024 -0
- package/dist/assets/components/onboarding/WorkspaceSetupBuildDark.d.ts +3 -0
- package/dist/assets/components/onboarding/WorkspaceSetupBuildDark.js +466 -0
- package/dist/assets/components/onboarding/WorkspaceSetupBuildLight.d.ts +3 -0
- package/dist/assets/components/onboarding/WorkspaceSetupBuildLight.js +460 -0
- package/dist/assets/components/onboarding/WorkspaceSetupConnectDark.d.ts +3 -0
- package/dist/assets/components/onboarding/WorkspaceSetupConnectDark.js +336 -0
- package/dist/assets/components/onboarding/WorkspaceSetupConnectLight.d.ts +3 -0
- package/dist/assets/components/onboarding/WorkspaceSetupConnectLight.js +336 -0
- package/dist/assets/components/onboarding/WorkspaceSetupIntegrateDark.d.ts +3 -0
- package/dist/assets/components/onboarding/WorkspaceSetupIntegrateDark.js +153 -0
- package/dist/assets/components/onboarding/WorkspaceSetupIntegrateLight.d.ts +3 -0
- package/dist/assets/components/onboarding/WorkspaceSetupIntegrateLight.js +153 -0
- package/dist/assets/components/projects/MappingMethodAutoIntrospectDark.d.ts +3 -0
- package/dist/assets/components/projects/MappingMethodAutoIntrospectDark.js +117 -0
- package/dist/assets/components/projects/MappingMethodAutoIntrospectLight.d.ts +3 -0
- package/dist/assets/components/projects/MappingMethodAutoIntrospectLight.js +117 -0
- package/dist/assets/components/projects/MappingMethodBlankDark.d.ts +3 -0
- package/dist/assets/components/projects/MappingMethodBlankDark.js +150 -0
- package/dist/assets/components/projects/MappingMethodBlankDarkHovered.d.ts +3 -0
- package/dist/assets/components/projects/MappingMethodBlankDarkHovered.js +150 -0
- package/dist/assets/components/projects/MappingMethodBlankLight.d.ts +3 -0
- package/dist/assets/components/projects/MappingMethodBlankLight.js +150 -0
- package/dist/assets/components/projects/MappingMethodBlankLightHovered.d.ts +3 -0
- package/dist/assets/components/projects/MappingMethodBlankLightHovered.js +150 -0
- package/dist/assets/components/projects/MappingMethodJsonDark.d.ts +3 -0
- package/dist/assets/components/projects/MappingMethodJsonDark.js +90 -0
- package/dist/assets/components/projects/MappingMethodJsonDarkHovered.d.ts +3 -0
- package/dist/assets/components/projects/MappingMethodJsonDarkHovered.js +90 -0
- package/dist/assets/components/projects/MappingMethodJsonLight.d.ts +3 -0
- package/dist/assets/components/projects/MappingMethodJsonLight.js +90 -0
- package/dist/assets/components/projects/MappingMethodJsonLightHovered.d.ts +3 -0
- package/dist/assets/components/projects/MappingMethodJsonLightHovered.js +90 -0
- package/dist/assets/components/projects/ProjectsEmptyStateDark.d.ts +3 -0
- package/dist/assets/components/projects/ProjectsEmptyStateDark.js +454 -0
- package/dist/assets/components/projects/ProjectsEmptyStateLight.d.ts +3 -0
- package/dist/assets/components/projects/ProjectsEmptyStateLight.js +456 -0
- package/dist/assets/components/root/CreateProjectActionCardDark.d.ts +3 -0
- package/dist/assets/components/root/CreateProjectActionCardDark.js +1796 -0
- package/dist/assets/components/root/CreateProjectActionCardDarkHovered.d.ts +3 -0
- package/dist/assets/components/root/CreateProjectActionCardDarkHovered.js +1796 -0
- package/dist/assets/components/root/CreateProjectActionCardLight.d.ts +3 -0
- package/dist/assets/components/root/CreateProjectActionCardLight.js +1786 -0
- package/dist/assets/components/root/CreateProjectActionCardLightHovered.d.ts +3 -0
- package/dist/assets/components/root/CreateProjectActionCardLightHovered.js +1786 -0
- package/dist/assets/components/root/CreateSourceActionCardDark.d.ts +3 -0
- package/dist/assets/components/root/CreateSourceActionCardDark.js +879 -0
- package/dist/assets/components/root/CreateSourceActionCardDarkHovered.d.ts +3 -0
- package/dist/assets/components/root/CreateSourceActionCardDarkHovered.js +879 -0
- package/dist/assets/components/root/CreateSourceActionCardLight.d.ts +3 -0
- package/dist/assets/components/root/CreateSourceActionCardLight.js +889 -0
- package/dist/assets/components/root/CreateSourceActionCardLightHovered.d.ts +3 -0
- package/dist/assets/components/root/CreateSourceActionCardLightHovered.js +889 -0
- package/dist/assets/components/sources/AttioIcon.d.ts +3 -0
- package/dist/assets/components/sources/AttioIcon.js +11 -0
- package/dist/assets/components/sources/BigquerySourceIcon.d.ts +3 -0
- package/dist/assets/components/sources/BigquerySourceIcon.js +39 -0
- package/dist/assets/components/sources/BrowserbaseSourceIcon.d.ts +3 -0
- package/dist/assets/components/sources/BrowserbaseSourceIcon.js +35 -0
- package/dist/assets/components/sources/ClickhouseLogoSourceIconDark.d.ts +3 -0
- package/dist/assets/components/sources/ClickhouseLogoSourceIconDark.js +13 -0
- package/dist/assets/components/sources/ClickhouseLogoSourceIconLight.d.ts +3 -0
- package/dist/assets/components/sources/ClickhouseLogoSourceIconLight.js +13 -0
- package/dist/assets/components/sources/ConfluenceSourceIcon.d.ts +3 -0
- package/dist/assets/components/sources/ConfluenceSourceIcon.js +30 -0
- package/dist/assets/components/sources/GalaxyFileUploadSourceIcon.d.ts +3 -0
- package/dist/assets/components/sources/GalaxyFileUploadSourceIcon.js +16 -0
- package/dist/assets/components/sources/GalaxyTextSourceIcon.d.ts +3 -0
- package/dist/assets/components/sources/GalaxyTextSourceIcon.js +16 -0
- package/dist/assets/components/sources/GalaxyWebhookSourceIcon.d.ts +3 -0
- package/dist/assets/components/sources/GalaxyWebhookSourceIcon.js +16 -0
- package/dist/assets/components/sources/GithubSourceIcon.d.ts +3 -0
- package/dist/assets/components/sources/GithubSourceIcon.js +27 -0
- package/dist/assets/components/sources/GoogleDriveIcon.d.ts +3 -0
- package/dist/assets/components/sources/GoogleDriveIcon.js +45 -0
- package/dist/assets/components/sources/HubspotSourceIcon.d.ts +3 -0
- package/dist/assets/components/sources/HubspotSourceIcon.js +14 -0
- package/dist/assets/components/sources/JiraSourceIcon.d.ts +3 -0
- package/dist/assets/components/sources/JiraSourceIcon.js +54 -0
- package/dist/assets/components/sources/LinearSourceIcon.d.ts +3 -0
- package/dist/assets/components/sources/LinearSourceIcon.js +14 -0
- package/dist/assets/components/sources/MysqlLogoSourceIconDark.d.ts +3 -0
- package/dist/assets/components/sources/MysqlLogoSourceIconDark.js +17 -0
- package/dist/assets/components/sources/MysqlLogoSourceIconLight.d.ts +3 -0
- package/dist/assets/components/sources/MysqlLogoSourceIconLight.js +17 -0
- package/dist/assets/components/sources/NetsuiteSourceIcon.d.ts +3 -0
- package/dist/assets/components/sources/NetsuiteSourceIcon.js +32 -0
- package/dist/assets/components/sources/NotionIcon.d.ts +3 -0
- package/dist/assets/components/sources/NotionIcon.js +20 -0
- package/dist/assets/components/sources/NotionLogoSourceIconDark.d.ts +3 -0
- package/dist/assets/components/sources/NotionLogoSourceIconDark.js +10 -0
- package/dist/assets/components/sources/NotionLogoSourceIconLight.d.ts +3 -0
- package/dist/assets/components/sources/NotionLogoSourceIconLight.js +13 -0
- package/dist/assets/components/sources/PostgresLogoSourceIconDark.d.ts +3 -0
- package/dist/assets/components/sources/PostgresLogoSourceIconDark.js +28 -0
- package/dist/assets/components/sources/PostgresLogoSourceIconLight.d.ts +3 -0
- package/dist/assets/components/sources/PostgresLogoSourceIconLight.js +28 -0
- package/dist/assets/components/sources/PostgresqlIcon.d.ts +3 -0
- package/dist/assets/components/sources/PostgresqlIcon.js +61 -0
- package/dist/assets/components/sources/PostgresqlLogoSourceIconDark.d.ts +3 -0
- package/dist/assets/components/sources/PostgresqlLogoSourceIconDark.js +10 -0
- package/dist/assets/components/sources/PostgresqlLogoSourceIconLight.d.ts +3 -0
- package/dist/assets/components/sources/PostgresqlLogoSourceIconLight.js +13 -0
- package/dist/assets/components/sources/S3Icon.d.ts +3 -0
- package/dist/assets/components/sources/S3Icon.js +76 -0
- package/dist/assets/components/sources/S3LogoSourceIconDark.d.ts +3 -0
- package/dist/assets/components/sources/S3LogoSourceIconDark.js +10 -0
- package/dist/assets/components/sources/S3LogoSourceIconLight.d.ts +3 -0
- package/dist/assets/components/sources/S3LogoSourceIconLight.js +13 -0
- package/dist/assets/components/sources/SalesforceSourceIcon.d.ts +3 -0
- package/dist/assets/components/sources/SalesforceSourceIcon.js +23 -0
- package/dist/assets/components/sources/SlackIcon.d.ts +3 -0
- package/dist/assets/components/sources/SlackIcon.js +32 -0
- package/dist/assets/components/sources/SlackLogoSourceIconDark.d.ts +3 -0
- package/dist/assets/components/sources/SlackLogoSourceIconDark.js +15 -0
- package/dist/assets/components/sources/SlackLogoSourceIconLight.d.ts +3 -0
- package/dist/assets/components/sources/SlackLogoSourceIconLight.js +15 -0
- package/dist/assets/components/sources/SnowflakeLogoSourceIconDark.d.ts +3 -0
- package/dist/assets/components/sources/SnowflakeLogoSourceIconDark.js +14 -0
- package/dist/assets/components/sources/SnowflakeLogoSourceIconLight.d.ts +3 -0
- package/dist/assets/components/sources/SnowflakeLogoSourceIconLight.js +14 -0
- package/dist/assets/components/sources/SourcesEmptyStateDark.d.ts +3 -0
- package/dist/assets/components/sources/SourcesEmptyStateDark.js +432 -0
- package/dist/assets/components/sources/SourcesEmptyStateLight.d.ts +3 -0
- package/dist/assets/components/sources/SourcesEmptyStateLight.js +434 -0
- package/dist/assets/components/sources/WikipediaSourceIcon.d.ts +3 -0
- package/dist/assets/components/sources/WikipediaSourceIcon.js +1490 -0
- package/dist/assets/models/galaxy-logomark.js +4 -0
- package/dist/avatar/Avatar.d.ts +9 -0
- package/dist/avatar/Avatar.js +52 -0
- package/dist/avatar/AvatarEmpty.d.ts +36 -0
- package/dist/avatar/AvatarEmpty.js +43 -0
- package/dist/avatar/AvatarShimmer.d.ts +28 -0
- package/dist/avatar/AvatarShimmer.js +21 -0
- package/dist/avatar/GalaxyAvatar.d.ts +6 -0
- package/dist/avatar/GalaxyAvatar.js +36 -0
- package/dist/avatar/types.d.ts +5 -0
- package/dist/avatar/types.js +9 -0
- package/dist/backgrounds/CellGridBackground.d.ts +13 -0
- package/dist/backgrounds/CellGridBackground.js +39 -0
- package/dist/backgrounds/CrossGridBackground.d.ts +14 -0
- package/dist/backgrounds/CrossGridBackground.js +45 -0
- package/dist/backgrounds/DotGridBackground.d.ts +13 -0
- package/dist/backgrounds/DotGridBackground.js +43 -0
- package/dist/badge/Badge.d.ts +30 -0
- package/dist/badge/Badge.js +92 -0
- package/dist/beacons/Beacon.d.ts +43 -0
- package/dist/beacons/Beacon.js +68 -0
- package/dist/buttons/Button.d.ts +30 -0
- package/dist/buttons/Button.js +173 -0
- package/dist/charts/BarChart.d.ts +21 -0
- package/dist/charts/BarChart.js +264 -0
- package/dist/charts/ChartAxis.d.ts +28 -0
- package/dist/charts/ChartAxis.js +94 -0
- package/dist/charts/ChartLegend.d.ts +7 -0
- package/dist/charts/ChartLegend.js +30 -0
- package/dist/charts/ChartTooltip.d.ts +7 -0
- package/dist/charts/ChartTooltip.js +66 -0
- package/dist/charts/LineChart.d.ts +22 -0
- package/dist/charts/LineChart.js +250 -0
- package/dist/charts/PieChart.d.ts +35 -0
- package/dist/charts/PieChart.js +183 -0
- package/dist/charts/constants.d.ts +22 -0
- package/dist/charts/constants.js +38 -0
- package/dist/charts/types.d.ts +80 -0
- package/dist/charts/types.js +0 -0
- package/dist/charts/utils.d.ts +29 -0
- package/dist/charts/utils.js +62 -0
- package/dist/chips/Chip.d.ts +39 -0
- package/dist/chips/Chip.js +185 -0
- package/dist/containers/FlexItem.d.ts +28 -0
- package/dist/containers/FlexItem.js +93 -0
- package/dist/containers/FlexWrapper.d.ts +147 -0
- package/dist/containers/FlexWrapper.js +122 -0
- package/dist/containers/GridWrapper.d.ts +120 -0
- package/dist/containers/GridWrapper.js +117 -0
- package/dist/containers/Spacing.d.ts +13 -0
- package/dist/containers/Spacing.js +52 -0
- package/dist/containers/Wrapper.d.ts +16 -0
- package/dist/containers/Wrapper.js +50 -0
- package/dist/dividers/HorizontalDivider.d.ts +2 -0
- package/dist/dividers/HorizontalDivider.js +17 -0
- package/dist/dividers/VerticalDivider.d.ts +2 -0
- package/dist/dividers/VerticalDivider.js +17 -0
- package/dist/drawer/Drawer.d.ts +13 -0
- package/dist/drawer/Drawer.js +70 -0
- package/dist/dropdown/Dropdown.d.ts +51 -0
- package/dist/dropdown/Dropdown.js +136 -0
- package/dist/dropdown/DropdownButton.d.ts +18 -0
- package/dist/dropdown/DropdownButton.js +179 -0
- package/dist/dropdown/DropdownFooter.d.ts +10 -0
- package/dist/dropdown/DropdownFooter.js +35 -0
- package/dist/dropdown/DropdownItem.d.ts +10 -0
- package/dist/dropdown/DropdownItem.js +38 -0
- package/dist/editor/CodeEditor.d.ts +68 -0
- package/dist/editor/CodeEditor.js +435 -0
- package/dist/editor/CodeEditorReactWidget.d.ts +35 -0
- package/dist/editor/CodeEditorReactWidget.js +47 -0
- package/dist/hooks/useDismiss.d.ts +27 -0
- package/dist/hooks/useDismiss.js +37 -0
- package/dist/hooks/useElementWidth.d.ts +22 -0
- package/dist/hooks/useElementWidth.js +44 -0
- package/dist/hooks/useResize.d.ts +83 -0
- package/dist/hooks/useResize.js +114 -0
- package/dist/hotkeys/HotKeyBindings.d.ts +7 -0
- package/dist/hotkeys/HotKeyBindings.js +23 -0
- package/dist/hotkeys/HotKeySymbol.d.ts +13 -0
- package/dist/hotkeys/HotKeySymbol.js +49 -0
- package/dist/icons/BackIcon.d.ts +3 -0
- package/dist/icons/BackIcon.js +13 -0
- package/dist/icons/CloseIcon.d.ts +3 -0
- package/dist/icons/CloseIcon.js +13 -0
- package/dist/icons/CreateIcon.d.ts +3 -0
- package/dist/icons/CreateIcon.js +13 -0
- package/dist/icons/ForwardIcon.d.ts +3 -0
- package/dist/icons/ForwardIcon.js +13 -0
- package/dist/icons/GalaxyLogomark.d.ts +5 -0
- package/dist/icons/GalaxyLogomark.js +21 -0
- package/dist/icons/GalaxyLogomark3D.d.ts +41 -0
- package/dist/icons/GalaxyLogomark3D.js +310 -0
- package/dist/icons/GalaxyWordmark.d.ts +5 -0
- package/dist/icons/GalaxyWordmark.js +21 -0
- package/dist/icons/HelpIcon.d.ts +3 -0
- package/dist/icons/HelpIcon.js +14 -0
- package/dist/icons/Icon.d.ts +41 -0
- package/dist/icons/Icon.js +51 -0
- package/dist/icons/ProjectsIcon.d.ts +3 -0
- package/dist/icons/ProjectsIcon.js +12 -0
- package/dist/icons/SearchIcon.d.ts +3 -0
- package/dist/icons/SearchIcon.js +12 -0
- package/dist/icons/SourcesIcon.d.ts +3 -0
- package/dist/icons/SourcesIcon.js +12 -0
- package/dist/icons/TextIcon.d.ts +4 -0
- package/dist/icons/TextIcon.js +22 -0
- package/dist/icons/WebScrapeIcon.d.ts +4 -0
- package/dist/icons/WebScrapeIcon.js +22 -0
- package/dist/icons/WebhookIcon.d.ts +4 -0
- package/dist/icons/WebhookIcon.js +22 -0
- package/dist/icons/sources/AttioLogomark.d.ts +4 -0
- package/dist/icons/sources/AttioLogomark.js +8 -0
- package/dist/icons/sources/BrowserbaseLogomark.d.ts +4 -0
- package/dist/icons/sources/BrowserbaseLogomark.js +8 -0
- package/dist/icons/sources/ClickhouseLogomark.d.ts +4 -0
- package/dist/icons/sources/ClickhouseLogomark.js +16 -0
- package/dist/icons/sources/ConfluenceLogomark.d.ts +4 -0
- package/dist/icons/sources/ConfluenceLogomark.js +8 -0
- package/dist/icons/sources/GithubLogomark.d.ts +4 -0
- package/dist/icons/sources/GithubLogomark.js +8 -0
- package/dist/icons/sources/GoogleBigqueryLogomark.d.ts +4 -0
- package/dist/icons/sources/GoogleBigqueryLogomark.js +8 -0
- package/dist/icons/sources/GoogleDriveLogomark.d.ts +4 -0
- package/dist/icons/sources/GoogleDriveLogomark.js +8 -0
- package/dist/icons/sources/HubspotLogomark.d.ts +4 -0
- package/dist/icons/sources/HubspotLogomark.js +8 -0
- package/dist/icons/sources/JiraLogomark.d.ts +4 -0
- package/dist/icons/sources/JiraLogomark.js +8 -0
- package/dist/icons/sources/LinearLogomark.d.ts +4 -0
- package/dist/icons/sources/LinearLogomark.js +8 -0
- package/dist/icons/sources/MySQLLogomark.d.ts +4 -0
- package/dist/icons/sources/MySQLLogomark.js +8 -0
- package/dist/icons/sources/NetsuiteLogomark.d.ts +4 -0
- package/dist/icons/sources/NetsuiteLogomark.js +8 -0
- package/dist/icons/sources/NotionLogomark.d.ts +4 -0
- package/dist/icons/sources/NotionLogomark.js +8 -0
- package/dist/icons/sources/PostgresLogomark.d.ts +4 -0
- package/dist/icons/sources/PostgresLogomark.js +8 -0
- package/dist/icons/sources/S3Logomark.d.ts +4 -0
- package/dist/icons/sources/S3Logomark.js +8 -0
- package/dist/icons/sources/SalesforceLogomark.d.ts +4 -0
- package/dist/icons/sources/SalesforceLogomark.js +8 -0
- package/dist/icons/sources/SlackLogoIconmark.d.ts +4 -0
- package/dist/icons/sources/SlackLogoIconmark.js +8 -0
- package/dist/icons/sources/SnowflakeLogomark.d.ts +4 -0
- package/dist/icons/sources/SnowflakeLogomark.js +16 -0
- package/dist/icons/sources/WikipediaLogomark.d.ts +4 -0
- package/dist/icons/sources/WikipediaLogomark.js +8 -0
- package/dist/inputs/CheckboxInput.d.ts +20 -0
- package/dist/inputs/CheckboxInput.js +97 -0
- package/dist/inputs/ColorInput.d.ts +20 -0
- package/dist/inputs/ColorInput.js +368 -0
- package/dist/inputs/CopyInput.d.ts +15 -0
- package/dist/inputs/CopyInput.js +46 -0
- package/dist/inputs/DateInput.d.ts +19 -0
- package/dist/inputs/DateInput.js +498 -0
- package/dist/inputs/Input.d.ts +91 -0
- package/dist/inputs/Input.js +205 -0
- package/dist/inputs/MultiSelectInput.d.ts +38 -0
- package/dist/inputs/MultiSelectInput.js +566 -0
- package/dist/inputs/MultiTextInput.d.ts +27 -0
- package/dist/inputs/MultiTextInput.js +178 -0
- package/dist/inputs/NumberInput.d.ts +4 -0
- package/dist/inputs/NumberInput.js +34 -0
- package/dist/inputs/PasswordInput.d.ts +4 -0
- package/dist/inputs/PasswordInput.js +40 -0
- package/dist/inputs/RadioInput.d.ts +20 -0
- package/dist/inputs/RadioInput.js +108 -0
- package/dist/inputs/SelectInput.d.ts +51 -0
- package/dist/inputs/SelectInput.js +528 -0
- package/dist/inputs/SliderInput.d.ts +16 -0
- package/dist/inputs/SliderInput.js +172 -0
- package/dist/inputs/TextAreaInput.d.ts +40 -0
- package/dist/inputs/TextAreaInput.js +238 -0
- package/dist/inputs/TextInput.d.ts +4 -0
- package/dist/inputs/TextInput.js +53 -0
- package/dist/inputs/ToggleInput.d.ts +11 -0
- package/dist/inputs/ToggleInput.js +100 -0
- package/dist/inputs/hooks.d.ts +10 -0
- package/dist/inputs/hooks.js +22 -0
- package/dist/links/Link.d.ts +2 -0
- package/dist/links/Link.js +10 -0
- package/dist/lists/BulletedList.d.ts +11 -0
- package/dist/lists/BulletedList.js +41 -0
- package/dist/metrics/MetricItem.d.ts +15 -0
- package/dist/metrics/MetricItem.js +53 -0
- package/dist/metrics/ProgressBar.d.ts +15 -0
- package/dist/metrics/ProgressBar.js +60 -0
- package/dist/modal/Modal.d.ts +7 -0
- package/dist/modal/Modal.js +52 -0
- package/dist/overlay/OverlayProvider.d.ts +26 -0
- package/dist/overlay/OverlayProvider.js +92 -0
- package/dist/overlay/constants.d.ts +27 -0
- package/dist/overlay/constants.js +36 -0
- package/dist/overlay/useOverlay.d.ts +7 -0
- package/dist/overlay/useOverlay.js +46 -0
- package/dist/resizable/HorizontalResizeHandle.d.ts +10 -0
- package/dist/resizable/HorizontalResizeHandle.js +32 -0
- package/dist/resizable/VerticalResizeHandle.d.ts +11 -0
- package/dist/resizable/VerticalResizeHandle.js +33 -0
- package/dist/shapes/Circle.d.ts +6 -0
- package/dist/shapes/Circle.js +25 -0
- package/dist/spreadsheet/InfiniteSpreadsheet.d.ts +3 -0
- package/dist/spreadsheet/InfiniteSpreadsheet.js +265 -0
- package/dist/spreadsheet/SpreadsheetAddColumnButton.d.ts +6 -0
- package/dist/spreadsheet/SpreadsheetAddColumnButton.js +32 -0
- package/dist/spreadsheet/SpreadsheetCell.d.ts +19 -0
- package/dist/spreadsheet/SpreadsheetCell.js +115 -0
- package/dist/spreadsheet/SpreadsheetCellEditor.d.ts +11 -0
- package/dist/spreadsheet/SpreadsheetCellEditor.js +95 -0
- package/dist/spreadsheet/SpreadsheetHeaderCell.d.ts +13 -0
- package/dist/spreadsheet/SpreadsheetHeaderCell.js +125 -0
- package/dist/spreadsheet/SpreadsheetRow.d.ts +21 -0
- package/dist/spreadsheet/SpreadsheetRow.js +68 -0
- package/dist/spreadsheet/SpreadsheetRowActionCell.d.ts +11 -0
- package/dist/spreadsheet/SpreadsheetRowActionCell.js +60 -0
- package/dist/spreadsheet/hooks/useColumnResize.d.ts +6 -0
- package/dist/spreadsheet/hooks/useColumnResize.js +46 -0
- package/dist/spreadsheet/hooks/useSpreadsheetEditing.d.ts +13 -0
- package/dist/spreadsheet/hooks/useSpreadsheetEditing.js +41 -0
- package/dist/spreadsheet/types.d.ts +92 -0
- package/dist/spreadsheet/types.js +21 -0
- package/dist/styles.css +213 -0
- package/dist/switcher/Switcher.d.ts +11 -0
- package/dist/switcher/Switcher.js +41 -0
- package/dist/table/InfiniteTable.d.ts +83 -0
- package/dist/table/InfiniteTable.js +711 -0
- package/dist/table/VirtualizedInfiniteTable.d.ts +28 -0
- package/dist/table/VirtualizedInfiniteTable.js +359 -0
- package/dist/text/Bold.d.ts +3 -0
- package/dist/text/Bold.js +17 -0
- package/dist/text/Code.d.ts +3 -0
- package/dist/text/Code.js +27 -0
- package/dist/text/EditableText.d.ts +7 -0
- package/dist/text/EditableText.js +141 -0
- package/dist/text/Ellipsis.d.ts +10 -0
- package/dist/text/Ellipsis.js +28 -0
- package/dist/text/MarkdownText.d.ts +7 -0
- package/dist/text/MarkdownText.js +295 -0
- package/dist/text/Paragraph.d.ts +16 -0
- package/dist/text/Paragraph.js +76 -0
- package/dist/text/RequiredMarker.d.ts +6 -0
- package/dist/text/RequiredMarker.js +44 -0
- package/dist/text/Selectable.d.ts +3 -0
- package/dist/text/Selectable.js +15 -0
- package/dist/text/Text.d.ts +47 -0
- package/dist/text/Text.js +104 -0
- package/dist/text/TextShimmer.d.ts +7 -0
- package/dist/text/TextShimmer.js +30 -0
- package/dist/theme/GalaxyTheme.d.ts +36 -0
- package/dist/theme/GalaxyTheme.js +107 -0
- package/dist/theme/constants.d.ts +13 -0
- package/dist/theme/constants.js +43 -0
- package/dist/theme/index.d.ts +6 -0
- package/dist/theme/index.js +6 -0
- package/dist/theme/types.d.ts +174 -0
- package/dist/theme/types.js +0 -0
- package/dist/theme/typography.d.ts +2 -0
- package/dist/theme/typography.js +73 -0
- package/dist/theme/variants/dark.d.ts +2 -0
- package/dist/theme/variants/dark.js +125 -0
- package/dist/theme/variants/light.d.ts +2 -0
- package/dist/theme/variants/light.js +125 -0
- package/dist/tooltip/Tooltip.d.ts +37 -0
- package/dist/tooltip/Tooltip.js +79 -0
- package/dist/utils/colors.d.ts +84 -0
- package/dist/utils/colors.js +323 -0
- package/dist/utils/linaria.d.ts +1 -0
- package/dist/utils/linaria.js +8 -0
- package/dist/widget/Widget.d.ts +28 -0
- package/dist/widget/Widget.js +99 -0
- package/package.json +268 -0
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { withTheme } from "../theme/GalaxyTheme.js";
|
|
2
|
+
import Text, { TextSize, TextVariant, TextWeight } from "../text/Text.js";
|
|
3
|
+
import FlexWrapper, { FlexDirection } from "../containers/FlexWrapper.js";
|
|
4
|
+
import Button, { ButtonSize, ButtonVariant } from "../buttons/Button.js";
|
|
5
|
+
import { ColumnAlign, ColumnPin } from "../table/InfiniteTable.js";
|
|
6
|
+
import Dropdown, { DropdownPosition } from "../dropdown/Dropdown.js";
|
|
7
|
+
import DropdownItem from "../dropdown/DropdownItem.js";
|
|
8
|
+
/* empty css */
|
|
9
|
+
import { styled } from "@linaria/react";
|
|
10
|
+
import { match } from "ts-pattern";
|
|
11
|
+
import React, { useCallback, useState } from "react";
|
|
12
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { DotsThreeVerticalIcon } from "@phosphor-icons/react";
|
|
14
|
+
//#region src/spreadsheet/SpreadsheetHeaderCell.tsx
|
|
15
|
+
var _exp = () => ({ $pin }) => $pin ? 25 : 20;
|
|
16
|
+
var _exp2 = () => ({ $pin, $pinnedOffset }) => $pin === ColumnPin.LEFT && $pinnedOffset !== void 0 ? `${$pinnedOffset}px` : "auto";
|
|
17
|
+
var _exp3 = () => ({ $pin, $pinnedOffset }) => $pin === ColumnPin.RIGHT && $pinnedOffset !== void 0 ? `${$pinnedOffset}px` : "auto";
|
|
18
|
+
var _exp4 = () => ({ $width }) => `0 0 ${$width}px`;
|
|
19
|
+
var _exp5 = () => ({ $align }) => match($align).with(ColumnAlign.CENTER, () => "center").with(ColumnAlign.RIGHT, () => "flex-end").otherwise(() => "flex-start");
|
|
20
|
+
var _exp6 = () => ({ theme }) => theme.color.background.tertiary;
|
|
21
|
+
var _exp7 = () => ({ theme }) => theme.color.border.primary;
|
|
22
|
+
var _exp8 = () => ({ $pin, theme }) => $pin === ColumnPin.LEFT ? `0.5px solid ${theme.color.border.primary}` : "none";
|
|
23
|
+
var _exp9 = () => ({ $pin, theme }) => $pin === ColumnPin.RIGHT ? `0.5px solid ${theme.color.border.primary}` : "none";
|
|
24
|
+
var HeaderCellContainer = withTheme(/*#__PURE__*/ styled("th")({
|
|
25
|
+
name: "HeaderCellContainer",
|
|
26
|
+
class: "hn1lp9n",
|
|
27
|
+
propsAsIs: false,
|
|
28
|
+
vars: {
|
|
29
|
+
"hn1lp9n-0": [_exp()],
|
|
30
|
+
"hn1lp9n-1": [_exp2()],
|
|
31
|
+
"hn1lp9n-2": [_exp3()],
|
|
32
|
+
"hn1lp9n-3": [_exp4()],
|
|
33
|
+
"hn1lp9n-4": [_exp5()],
|
|
34
|
+
"hn1lp9n-5": [_exp6()],
|
|
35
|
+
"hn1lp9n-6": [_exp7()],
|
|
36
|
+
"hn1lp9n-7": [_exp8()],
|
|
37
|
+
"hn1lp9n-8": [_exp9()]
|
|
38
|
+
}
|
|
39
|
+
}));
|
|
40
|
+
var HeaderContent = /*#__PURE__*/ styled("div")({
|
|
41
|
+
name: "HeaderContent",
|
|
42
|
+
class: "h5b2q63",
|
|
43
|
+
propsAsIs: false
|
|
44
|
+
});
|
|
45
|
+
var MenuTriggerWrapper = /*#__PURE__*/ styled("div")({
|
|
46
|
+
name: "MenuTriggerWrapper",
|
|
47
|
+
class: "m1q357fu",
|
|
48
|
+
propsAsIs: false
|
|
49
|
+
});
|
|
50
|
+
var _exp0 = () => ({ theme }) => theme.color.background.galaxy;
|
|
51
|
+
var ResizeHandle = withTheme(/*#__PURE__*/ styled("div")({
|
|
52
|
+
name: "ResizeHandle",
|
|
53
|
+
class: "r10tums3",
|
|
54
|
+
propsAsIs: false,
|
|
55
|
+
vars: { "r10tums3-0": [_exp0()] }
|
|
56
|
+
}));
|
|
57
|
+
function SpreadsheetHeaderCellInner({ column, width, pin, pinnedOffset, onResizeStart, getAllRows }) {
|
|
58
|
+
const [isMenuOpen, setIsMenuOpen] = useState(false);
|
|
59
|
+
const handleResizeMouseDown = useCallback((e) => {
|
|
60
|
+
e.preventDefault();
|
|
61
|
+
e.stopPropagation();
|
|
62
|
+
onResizeStart(column.id, e.clientX);
|
|
63
|
+
}, [column.id, onResizeStart]);
|
|
64
|
+
const headerActions = column.headerActions ?? [];
|
|
65
|
+
const enrichmentActions = column.enrichmentActions ?? [];
|
|
66
|
+
const hasMenu = headerActions.length > 0 || enrichmentActions.length > 0;
|
|
67
|
+
return /* @__PURE__ */ jsxs(HeaderCellContainer, {
|
|
68
|
+
$width: width,
|
|
69
|
+
$pin: pin,
|
|
70
|
+
$pinnedOffset: pinnedOffset,
|
|
71
|
+
$align: column.align,
|
|
72
|
+
children: [
|
|
73
|
+
/* @__PURE__ */ jsx(HeaderContent, { children: /* @__PURE__ */ jsx(Text, {
|
|
74
|
+
variant: TextVariant.TERTIARY,
|
|
75
|
+
weight: TextWeight.MEDIUM,
|
|
76
|
+
size: TextSize.BODY_SM,
|
|
77
|
+
isEllipsis: true,
|
|
78
|
+
children: column.header ?? column.id
|
|
79
|
+
}) }),
|
|
80
|
+
hasMenu && /* @__PURE__ */ jsx(MenuTriggerWrapper, {
|
|
81
|
+
className: "header-menu-trigger",
|
|
82
|
+
children: /* @__PURE__ */ jsx(Dropdown, {
|
|
83
|
+
body: /* @__PURE__ */ jsxs(FlexWrapper, {
|
|
84
|
+
direction: FlexDirection.COLUMN,
|
|
85
|
+
gap: 2,
|
|
86
|
+
children: [enrichmentActions.map((action) => /* @__PURE__ */ jsx(DropdownItem, {
|
|
87
|
+
icon: action.icon,
|
|
88
|
+
label: action.label,
|
|
89
|
+
onClick: () => {
|
|
90
|
+
const rows = getAllRows?.() ?? [];
|
|
91
|
+
action.onAction(column.id, rows);
|
|
92
|
+
setIsMenuOpen(false);
|
|
93
|
+
}
|
|
94
|
+
}, `enrich-${action.id}`)), headerActions.map((action) => /* @__PURE__ */ jsx(DropdownItem, {
|
|
95
|
+
icon: action.icon,
|
|
96
|
+
label: action.label,
|
|
97
|
+
variant: action.variant,
|
|
98
|
+
onClick: () => {
|
|
99
|
+
action.onAction(column.id);
|
|
100
|
+
setIsMenuOpen(false);
|
|
101
|
+
}
|
|
102
|
+
}, `action-${action.id}`))]
|
|
103
|
+
}),
|
|
104
|
+
position: DropdownPosition.BOTTOM_END,
|
|
105
|
+
isOpen: isMenuOpen,
|
|
106
|
+
onClose: () => setIsMenuOpen(false),
|
|
107
|
+
minWidth: 160,
|
|
108
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
109
|
+
icon: DotsThreeVerticalIcon,
|
|
110
|
+
variant: ButtonVariant.TERTIARY,
|
|
111
|
+
size: ButtonSize.SMALL,
|
|
112
|
+
onClick: (e) => {
|
|
113
|
+
e.stopPropagation();
|
|
114
|
+
setIsMenuOpen(!isMenuOpen);
|
|
115
|
+
}
|
|
116
|
+
})
|
|
117
|
+
})
|
|
118
|
+
}),
|
|
119
|
+
column.enableResize !== false && /* @__PURE__ */ jsx(ResizeHandle, { onMouseDown: handleResizeMouseDown })
|
|
120
|
+
]
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
var SpreadsheetHeaderCell = React.memo(SpreadsheetHeaderCellInner);
|
|
124
|
+
//#endregion
|
|
125
|
+
export { SpreadsheetHeaderCell as default };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { type EditingCell, type SpreadsheetColumnDef, type SpreadsheetRowAction } from "./types";
|
|
3
|
+
export interface SpreadsheetRowProps<TData> {
|
|
4
|
+
rowData: TData | undefined;
|
|
5
|
+
rowIndex: number;
|
|
6
|
+
translateY: number;
|
|
7
|
+
rowHeight: number;
|
|
8
|
+
isLastRow: boolean;
|
|
9
|
+
columns: SpreadsheetColumnDef<TData, unknown>[];
|
|
10
|
+
pinnedOffsets: Map<string, number>;
|
|
11
|
+
getColumnWidth: (col: SpreadsheetColumnDef<TData, unknown>) => number;
|
|
12
|
+
editingCell: EditingCell | null;
|
|
13
|
+
onStartEditing: (rowIndex: number, columnId: string) => void;
|
|
14
|
+
onCommitEditing: () => void;
|
|
15
|
+
onCancelEditing: () => void;
|
|
16
|
+
rowActions?: SpreadsheetRowAction<TData>[];
|
|
17
|
+
showActionColumn?: boolean;
|
|
18
|
+
}
|
|
19
|
+
declare function SpreadsheetRowInner<TData>({ rowData, rowIndex, translateY, rowHeight, isLastRow, columns, pinnedOffsets, getColumnWidth, editingCell, onStartEditing, onCommitEditing, onCancelEditing, rowActions, showActionColumn, }: SpreadsheetRowProps<TData>): React.JSX.Element | null;
|
|
20
|
+
declare const SpreadsheetRow: typeof SpreadsheetRowInner;
|
|
21
|
+
export default SpreadsheetRow;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { withTheme } from "../theme/GalaxyTheme.js";
|
|
2
|
+
import SpreadsheetRowActionCell from "./SpreadsheetRowActionCell.js";
|
|
3
|
+
import SpreadsheetCell from "./SpreadsheetCell.js";
|
|
4
|
+
/* empty css */
|
|
5
|
+
import { styled } from "@linaria/react";
|
|
6
|
+
import React from "react";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
//#region src/spreadsheet/SpreadsheetRow.tsx
|
|
9
|
+
var _exp = () => ({ theme }) => theme.color.background.primary;
|
|
10
|
+
var _exp2 = () => ({ theme }) => theme.color.border.primary;
|
|
11
|
+
var ActionSpacerCell = withTheme(/*#__PURE__*/ styled("td")({
|
|
12
|
+
name: "ActionSpacerCell",
|
|
13
|
+
class: "a1thqwpm",
|
|
14
|
+
propsAsIs: false,
|
|
15
|
+
vars: {
|
|
16
|
+
"a1thqwpm-0": [_exp()],
|
|
17
|
+
"a1thqwpm-1": [_exp2()]
|
|
18
|
+
}
|
|
19
|
+
}));
|
|
20
|
+
var _exp3 = () => ({ $translateY }) => $translateY;
|
|
21
|
+
var _exp4 = () => ({ $rowHeight }) => $rowHeight;
|
|
22
|
+
var _exp5 = () => ({ $isLastRow, theme }) => $isLastRow ? "none" : `0.5px solid ${theme.color.border.primary}`;
|
|
23
|
+
var _exp6 = () => ({ theme }) => theme.color.background.tertiary;
|
|
24
|
+
var RowContainer = withTheme(/*#__PURE__*/ styled("tr")({
|
|
25
|
+
name: "RowContainer",
|
|
26
|
+
class: "r1frty7c",
|
|
27
|
+
propsAsIs: false,
|
|
28
|
+
vars: {
|
|
29
|
+
"r1frty7c-0": [_exp3(), "px"],
|
|
30
|
+
"r1frty7c-1": [_exp4(), "px"],
|
|
31
|
+
"r1frty7c-2": [_exp5()],
|
|
32
|
+
"r1frty7c-3": [_exp6()]
|
|
33
|
+
}
|
|
34
|
+
}));
|
|
35
|
+
function SpreadsheetRowInner({ rowData, rowIndex, translateY, rowHeight, isLastRow, columns, pinnedOffsets, getColumnWidth, editingCell, onStartEditing, onCommitEditing, onCancelEditing, rowActions, showActionColumn }) {
|
|
36
|
+
if (!rowData) return null;
|
|
37
|
+
return /* @__PURE__ */ jsxs(RowContainer, {
|
|
38
|
+
$translateY: translateY,
|
|
39
|
+
$rowHeight: rowHeight,
|
|
40
|
+
$isLastRow: isLastRow,
|
|
41
|
+
children: [columns.map((col) => /* @__PURE__ */ jsx(SpreadsheetCell, {
|
|
42
|
+
column: col,
|
|
43
|
+
row: rowData,
|
|
44
|
+
rowIndex,
|
|
45
|
+
isEditing: editingCell?.rowIndex === rowIndex && editingCell?.columnId === col.id,
|
|
46
|
+
onStartEditing: () => onStartEditing(rowIndex, col.id),
|
|
47
|
+
onCommit: (value) => {
|
|
48
|
+
col.onCellChange?.(rowIndex, rowData, value);
|
|
49
|
+
onCommitEditing();
|
|
50
|
+
},
|
|
51
|
+
onCancel: onCancelEditing,
|
|
52
|
+
width: getColumnWidth(col),
|
|
53
|
+
pin: col.pin,
|
|
54
|
+
pinnedOffset: pinnedOffsets.get(col.id),
|
|
55
|
+
align: col.align,
|
|
56
|
+
density: "MEDIUM"
|
|
57
|
+
}, col.id)), showActionColumn && rowActions && rowActions.length > 0 ? /* @__PURE__ */ jsx(SpreadsheetRowActionCell, {
|
|
58
|
+
row: rowData,
|
|
59
|
+
rowIndex,
|
|
60
|
+
actions: rowActions
|
|
61
|
+
}) : showActionColumn ? /* @__PURE__ */ jsx(ActionSpacerCell, {}) : null]
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
var SpreadsheetRow = React.memo(SpreadsheetRowInner, (prev, next) => {
|
|
65
|
+
return prev.rowData === next.rowData && prev.translateY === next.translateY && prev.isLastRow === next.isLastRow && prev.columns === next.columns && prev.editingCell === next.editingCell && prev.getColumnWidth === next.getColumnWidth;
|
|
66
|
+
});
|
|
67
|
+
//#endregion
|
|
68
|
+
export { SpreadsheetRow as default };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { SpreadsheetRowAction } from "./types";
|
|
3
|
+
export interface SpreadsheetRowActionCellProps<TData> {
|
|
4
|
+
row: TData;
|
|
5
|
+
rowIndex: number;
|
|
6
|
+
actions: SpreadsheetRowAction<TData>[];
|
|
7
|
+
pinnedOffset?: number;
|
|
8
|
+
}
|
|
9
|
+
declare function SpreadsheetRowActionCellInner<TData>({ row, rowIndex, actions, pinnedOffset, }: SpreadsheetRowActionCellProps<TData>): React.JSX.Element;
|
|
10
|
+
declare const SpreadsheetRowActionCell: typeof SpreadsheetRowActionCellInner;
|
|
11
|
+
export default SpreadsheetRowActionCell;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { withTheme } from "../theme/GalaxyTheme.js";
|
|
2
|
+
import FlexWrapper, { FlexDirection } from "../containers/FlexWrapper.js";
|
|
3
|
+
import Button, { ButtonSize, ButtonVariant } from "../buttons/Button.js";
|
|
4
|
+
import Dropdown, { DropdownPosition } from "../dropdown/Dropdown.js";
|
|
5
|
+
import DropdownItem from "../dropdown/DropdownItem.js";
|
|
6
|
+
/* empty css */
|
|
7
|
+
import { styled } from "@linaria/react";
|
|
8
|
+
import React, { useState } from "react";
|
|
9
|
+
import { jsx } from "react/jsx-runtime";
|
|
10
|
+
import { DotsThreeVerticalIcon } from "@phosphor-icons/react";
|
|
11
|
+
//#region src/spreadsheet/SpreadsheetRowActionCell.tsx
|
|
12
|
+
var _exp = () => ({ $pinnedOffset }) => $pinnedOffset !== void 0 ? `${$pinnedOffset}px` : "0";
|
|
13
|
+
var _exp2 = () => ({ theme }) => theme.color.background.primary;
|
|
14
|
+
var _exp3 = () => ({ theme }) => theme.color.border.primary;
|
|
15
|
+
var ActionCellContainer = withTheme(/*#__PURE__*/ styled("td")({
|
|
16
|
+
name: "ActionCellContainer",
|
|
17
|
+
class: "a1b1bj84",
|
|
18
|
+
propsAsIs: false,
|
|
19
|
+
vars: {
|
|
20
|
+
"a1b1bj84-0": [_exp()],
|
|
21
|
+
"a1b1bj84-1": [_exp2()],
|
|
22
|
+
"a1b1bj84-2": [_exp3()]
|
|
23
|
+
}
|
|
24
|
+
}));
|
|
25
|
+
function SpreadsheetRowActionCellInner({ row, rowIndex, actions, pinnedOffset }) {
|
|
26
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
27
|
+
return /* @__PURE__ */ jsx(ActionCellContainer, {
|
|
28
|
+
$pinnedOffset: pinnedOffset,
|
|
29
|
+
children: /* @__PURE__ */ jsx(Dropdown, {
|
|
30
|
+
body: /* @__PURE__ */ jsx(FlexWrapper, {
|
|
31
|
+
direction: FlexDirection.COLUMN,
|
|
32
|
+
gap: 2,
|
|
33
|
+
children: actions.map((action) => /* @__PURE__ */ jsx(DropdownItem, {
|
|
34
|
+
icon: action.icon,
|
|
35
|
+
label: action.label,
|
|
36
|
+
onClick: () => {
|
|
37
|
+
action.onAction(rowIndex, row);
|
|
38
|
+
setIsOpen(false);
|
|
39
|
+
}
|
|
40
|
+
}, action.id))
|
|
41
|
+
}),
|
|
42
|
+
position: DropdownPosition.BOTTOM_END,
|
|
43
|
+
isOpen,
|
|
44
|
+
onClose: () => setIsOpen(false),
|
|
45
|
+
minWidth: 140,
|
|
46
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
47
|
+
icon: DotsThreeVerticalIcon,
|
|
48
|
+
variant: ButtonVariant.TERTIARY,
|
|
49
|
+
size: ButtonSize.SMALL,
|
|
50
|
+
onClick: (e) => {
|
|
51
|
+
e.stopPropagation();
|
|
52
|
+
setIsOpen(!isOpen);
|
|
53
|
+
}
|
|
54
|
+
})
|
|
55
|
+
})
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
var SpreadsheetRowActionCell = React.memo(SpreadsheetRowActionCellInner);
|
|
59
|
+
//#endregion
|
|
60
|
+
export { SpreadsheetRowActionCell as default };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { SpreadsheetColumnDef } from "../types";
|
|
2
|
+
export declare function useColumnResize<TData>(columns: SpreadsheetColumnDef<TData, unknown>[]): {
|
|
3
|
+
getColumnWidth: (col: SpreadsheetColumnDef<TData, unknown>) => number;
|
|
4
|
+
onResizeStart: (columnId: string, clientX: number) => void;
|
|
5
|
+
widthOverrides: Map<string, number>;
|
|
6
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { useCallback, useRef, useState } from "react";
|
|
2
|
+
//#region src/spreadsheet/hooks/useColumnResize.ts
|
|
3
|
+
function useColumnResize(columns) {
|
|
4
|
+
const [widthOverrides, setWidthOverrides] = useState(/* @__PURE__ */ new Map());
|
|
5
|
+
const resizeRef = useRef(null);
|
|
6
|
+
return {
|
|
7
|
+
getColumnWidth: useCallback((col) => {
|
|
8
|
+
return widthOverrides.get(col.id) ?? col.size ?? 150;
|
|
9
|
+
}, [widthOverrides]),
|
|
10
|
+
onResizeStart: useCallback((columnId, clientX) => {
|
|
11
|
+
const col = columns.find((c) => c.id === columnId);
|
|
12
|
+
if (!col || col.enableResize === false) return;
|
|
13
|
+
resizeRef.current = {
|
|
14
|
+
columnId,
|
|
15
|
+
startX: clientX,
|
|
16
|
+
startWidth: widthOverrides.get(columnId) ?? col.size ?? 150
|
|
17
|
+
};
|
|
18
|
+
const onMouseMove = (e) => {
|
|
19
|
+
if (!resizeRef.current) return;
|
|
20
|
+
const delta = e.clientX - resizeRef.current.startX;
|
|
21
|
+
const minWidth = col.minSize ?? 60;
|
|
22
|
+
const maxWidth = col.maxSize ?? 800;
|
|
23
|
+
const newWidth = Math.min(maxWidth, Math.max(minWidth, resizeRef.current.startWidth + delta));
|
|
24
|
+
setWidthOverrides((prev) => {
|
|
25
|
+
const next = new Map(prev);
|
|
26
|
+
next.set(columnId, newWidth);
|
|
27
|
+
return next;
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
const onMouseUp = () => {
|
|
31
|
+
resizeRef.current = null;
|
|
32
|
+
document.removeEventListener("mousemove", onMouseMove);
|
|
33
|
+
document.removeEventListener("mouseup", onMouseUp);
|
|
34
|
+
document.body.style.cursor = "";
|
|
35
|
+
document.body.style.userSelect = "";
|
|
36
|
+
};
|
|
37
|
+
document.addEventListener("mousemove", onMouseMove);
|
|
38
|
+
document.addEventListener("mouseup", onMouseUp);
|
|
39
|
+
document.body.style.cursor = "col-resize";
|
|
40
|
+
document.body.style.userSelect = "none";
|
|
41
|
+
}, [columns, widthOverrides]),
|
|
42
|
+
widthOverrides
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
//#endregion
|
|
46
|
+
export { useColumnResize };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { EditingCell } from "../types";
|
|
2
|
+
interface UseSpreadsheetEditingOptions {
|
|
3
|
+
editingCell?: EditingCell | null;
|
|
4
|
+
onEditingCellChange?: (cell: EditingCell | null) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare function useSpreadsheetEditing(options: UseSpreadsheetEditingOptions): {
|
|
7
|
+
editingCell: EditingCell | null;
|
|
8
|
+
startEditing: (rowIndex: number, columnId: string) => void;
|
|
9
|
+
cancelEditing: () => void;
|
|
10
|
+
commitEditing: () => void;
|
|
11
|
+
isEditing: (rowIndex: number, columnId: string) => boolean;
|
|
12
|
+
};
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { useCallback, useEffect, useState } from "react";
|
|
2
|
+
//#region src/spreadsheet/hooks/useSpreadsheetEditing.ts
|
|
3
|
+
function useSpreadsheetEditing(options) {
|
|
4
|
+
const { editingCell: controlledCell, onEditingCellChange } = options;
|
|
5
|
+
const isControlled = controlledCell !== void 0;
|
|
6
|
+
const [internalCell, setInternalCell] = useState(null);
|
|
7
|
+
const currentCell = isControlled ? controlledCell : internalCell;
|
|
8
|
+
const setEditingCell = useCallback((cell) => {
|
|
9
|
+
if (isControlled) onEditingCellChange?.(cell);
|
|
10
|
+
else setInternalCell(cell);
|
|
11
|
+
}, [isControlled, onEditingCellChange]);
|
|
12
|
+
const startEditing = useCallback((rowIndex, columnId) => {
|
|
13
|
+
setEditingCell({
|
|
14
|
+
rowIndex,
|
|
15
|
+
columnId
|
|
16
|
+
});
|
|
17
|
+
}, [setEditingCell]);
|
|
18
|
+
const cancelEditing = useCallback(() => {
|
|
19
|
+
setEditingCell(null);
|
|
20
|
+
}, [setEditingCell]);
|
|
21
|
+
const commitEditing = useCallback(() => {
|
|
22
|
+
setEditingCell(null);
|
|
23
|
+
}, [setEditingCell]);
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
if (!currentCell) return;
|
|
26
|
+
const onKeyDown = (e) => {
|
|
27
|
+
if (e.key === "Escape") cancelEditing();
|
|
28
|
+
};
|
|
29
|
+
document.addEventListener("keydown", onKeyDown);
|
|
30
|
+
return () => document.removeEventListener("keydown", onKeyDown);
|
|
31
|
+
}, [currentCell, cancelEditing]);
|
|
32
|
+
return {
|
|
33
|
+
editingCell: currentCell,
|
|
34
|
+
startEditing,
|
|
35
|
+
cancelEditing,
|
|
36
|
+
commitEditing,
|
|
37
|
+
isEditing: (rowIndex, columnId) => currentCell?.rowIndex === rowIndex && currentCell?.columnId === columnId
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
//#endregion
|
|
41
|
+
export { useSpreadsheetEditing };
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import { ColumnAlign, ColumnPin, TableDensity } from "../table/InfiniteTable";
|
|
3
|
+
import type { TextVariant } from "../text/Text";
|
|
4
|
+
export { ColumnAlign, ColumnPin, TableDensity };
|
|
5
|
+
export declare enum CellEnrichmentStatus {
|
|
6
|
+
IDLE = "IDLE",
|
|
7
|
+
PENDING = "PENDING",
|
|
8
|
+
RUNNING = "RUNNING",
|
|
9
|
+
COMPLETE = "COMPLETE",
|
|
10
|
+
ERROR = "ERROR"
|
|
11
|
+
}
|
|
12
|
+
export interface SpreadsheetColumnAction<TData> {
|
|
13
|
+
id: string;
|
|
14
|
+
label: string;
|
|
15
|
+
icon?: ReactNode;
|
|
16
|
+
onAction: (columnId: string, rows: TData[]) => void;
|
|
17
|
+
}
|
|
18
|
+
export declare enum SpreadsheetCellType {
|
|
19
|
+
TEXT = "TEXT",
|
|
20
|
+
NUMBER = "NUMBER",
|
|
21
|
+
BOOLEAN = "BOOLEAN",
|
|
22
|
+
ENUM = "ENUM",
|
|
23
|
+
DATE = "DATE",
|
|
24
|
+
READONLY = "READONLY"
|
|
25
|
+
}
|
|
26
|
+
export interface SpreadsheetHeaderAction {
|
|
27
|
+
id: string;
|
|
28
|
+
label: string;
|
|
29
|
+
icon?: ReactNode;
|
|
30
|
+
variant?: TextVariant;
|
|
31
|
+
onAction: (columnId: string) => void;
|
|
32
|
+
}
|
|
33
|
+
export interface SpreadsheetColumnDef<TData, TValue = unknown> {
|
|
34
|
+
id: string;
|
|
35
|
+
accessorFn?: (row: TData) => TValue;
|
|
36
|
+
header?: string;
|
|
37
|
+
size?: number;
|
|
38
|
+
minSize?: number;
|
|
39
|
+
maxSize?: number;
|
|
40
|
+
pin?: ColumnPin;
|
|
41
|
+
align?: ColumnAlign;
|
|
42
|
+
cellLoading?: () => ReactNode;
|
|
43
|
+
cellType: SpreadsheetCellType;
|
|
44
|
+
editable?: boolean;
|
|
45
|
+
enumOptions?: string[];
|
|
46
|
+
onCellChange?: (rowIndex: number, row: TData, value: TValue) => void;
|
|
47
|
+
cellRenderer?: (props: {
|
|
48
|
+
value: TValue;
|
|
49
|
+
row: TData;
|
|
50
|
+
rowIndex: number;
|
|
51
|
+
isEditing: boolean;
|
|
52
|
+
}) => ReactNode;
|
|
53
|
+
headerActions?: SpreadsheetHeaderAction[];
|
|
54
|
+
enableResize?: boolean;
|
|
55
|
+
enrichmentActions?: SpreadsheetColumnAction<TData>[];
|
|
56
|
+
getCellEnrichmentStatus?: (row: TData, rowIndex: number) => CellEnrichmentStatus;
|
|
57
|
+
}
|
|
58
|
+
export interface SpreadsheetRowAction<TData> {
|
|
59
|
+
id: string;
|
|
60
|
+
label: string;
|
|
61
|
+
icon?: ReactNode;
|
|
62
|
+
onAction: (rowIndex: number, row: TData) => void;
|
|
63
|
+
}
|
|
64
|
+
export interface EditingCell {
|
|
65
|
+
rowIndex: number;
|
|
66
|
+
columnId: string;
|
|
67
|
+
}
|
|
68
|
+
export interface InfiniteSpreadsheetProps<TData> {
|
|
69
|
+
columns: SpreadsheetColumnDef<TData, unknown>[];
|
|
70
|
+
totalRowCount: number;
|
|
71
|
+
getRowData: (index: number) => TData | undefined;
|
|
72
|
+
getRowId?: (row: TData, index: number) => string;
|
|
73
|
+
height?: number | string;
|
|
74
|
+
width?: number | string;
|
|
75
|
+
fillWidth?: boolean;
|
|
76
|
+
fillHeight?: boolean;
|
|
77
|
+
density?: TableDensity;
|
|
78
|
+
estimateRowHeight?: number;
|
|
79
|
+
overscan?: number;
|
|
80
|
+
hasNextPage?: boolean;
|
|
81
|
+
isFetchingNextPage?: boolean;
|
|
82
|
+
fetchNextPage?: () => void;
|
|
83
|
+
isLoading?: boolean;
|
|
84
|
+
isError?: boolean;
|
|
85
|
+
loadingRowCount?: number;
|
|
86
|
+
contentWhenEmpty?: ReactNode;
|
|
87
|
+
contentWhenError?: ReactNode | ((error?: Error) => ReactNode);
|
|
88
|
+
onAddColumn?: () => void;
|
|
89
|
+
rowActions?: SpreadsheetRowAction<TData>[];
|
|
90
|
+
editingCell?: EditingCell | null;
|
|
91
|
+
onEditingCellChange?: (cell: EditingCell | null) => void;
|
|
92
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ColumnAlign, ColumnPin, TableDensity } from "../table/InfiniteTable.js";
|
|
2
|
+
//#region src/spreadsheet/types.ts
|
|
3
|
+
var CellEnrichmentStatus = /* @__PURE__ */ function(CellEnrichmentStatus) {
|
|
4
|
+
CellEnrichmentStatus["IDLE"] = "IDLE";
|
|
5
|
+
CellEnrichmentStatus["PENDING"] = "PENDING";
|
|
6
|
+
CellEnrichmentStatus["RUNNING"] = "RUNNING";
|
|
7
|
+
CellEnrichmentStatus["COMPLETE"] = "COMPLETE";
|
|
8
|
+
CellEnrichmentStatus["ERROR"] = "ERROR";
|
|
9
|
+
return CellEnrichmentStatus;
|
|
10
|
+
}({});
|
|
11
|
+
var SpreadsheetCellType = /* @__PURE__ */ function(SpreadsheetCellType) {
|
|
12
|
+
SpreadsheetCellType["TEXT"] = "TEXT";
|
|
13
|
+
SpreadsheetCellType["NUMBER"] = "NUMBER";
|
|
14
|
+
SpreadsheetCellType["BOOLEAN"] = "BOOLEAN";
|
|
15
|
+
SpreadsheetCellType["ENUM"] = "ENUM";
|
|
16
|
+
SpreadsheetCellType["DATE"] = "DATE";
|
|
17
|
+
SpreadsheetCellType["READONLY"] = "READONLY";
|
|
18
|
+
return SpreadsheetCellType;
|
|
19
|
+
}({});
|
|
20
|
+
//#endregion
|
|
21
|
+
export { CellEnrichmentStatus, ColumnAlign, ColumnPin, SpreadsheetCellType, TableDensity };
|