@dbcdk/react-components 0.0.169 → 0.0.171
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/assets/logo.cjs +87 -0
- package/dist/assets/logo.d.ts +2 -0
- package/dist/assets/logo.js +85 -0
- package/dist/client.cjs +629 -0
- package/dist/client.d.ts +89 -0
- package/dist/client.js +90 -0
- package/dist/components/accordion/Accordion.cjs +127 -0
- package/dist/components/accordion/Accordion.d.ts +36 -0
- package/dist/components/accordion/Accordion.js +121 -0
- package/dist/components/accordion/Accordion.module.css +41 -0
- package/dist/components/accordion/components/AccordionRow.cjs +129 -0
- package/dist/components/accordion/components/AccordionRow.d.ts +14 -0
- package/dist/components/accordion/components/AccordionRow.js +123 -0
- package/dist/components/accordion/components/AccordionRow.module.css +129 -0
- package/dist/components/alert/Alert.cjs +52 -0
- package/dist/components/alert/Alert.d.ts +14 -0
- package/dist/components/alert/Alert.js +46 -0
- package/dist/components/alert/Alert.module.css +102 -0
- package/dist/components/app-header/AppHeader.cjs +14 -0
- package/dist/components/app-header/AppHeader.d.ts +8 -0
- package/dist/components/app-header/AppHeader.js +8 -0
- package/dist/components/app-header/AppHeader.module.css +74 -0
- package/dist/components/attribute-chip/AttributeChip.cjs +36 -0
- package/dist/components/attribute-chip/AttributeChip.d.ts +11 -0
- package/dist/components/attribute-chip/AttributeChip.js +30 -0
- package/dist/components/attribute-chip/AttributeChip.module.css +64 -0
- package/dist/components/avatar/Avatar.cjs +111 -0
- package/dist/components/avatar/Avatar.d.ts +17 -0
- package/dist/components/avatar/Avatar.js +86 -0
- package/dist/components/avatar/Avatar.module.css +91 -0
- package/dist/components/breadcrumbs/Breadcrumbs.cjs +24 -0
- package/dist/components/breadcrumbs/Breadcrumbs.d.ts +12 -0
- package/dist/components/breadcrumbs/Breadcrumbs.js +18 -0
- package/dist/components/breadcrumbs/Breadcrumbs.module.css +77 -0
- package/dist/components/button/Button.cjs +150 -0
- package/dist/components/button/Button.d.ts +18 -0
- package/dist/components/button/Button.js +125 -0
- package/dist/components/button/Button.module.css +266 -0
- package/dist/components/button-select/ButtonSelect.cjs +35 -0
- package/dist/components/button-select/ButtonSelect.d.ts +16 -0
- package/dist/components/button-select/ButtonSelect.js +29 -0
- package/dist/components/button-select/ButtonSelect.module.css +40 -0
- package/dist/components/card/Card.cjs +109 -0
- package/dist/components/card/Card.d.ts +37 -0
- package/dist/components/card/Card.js +103 -0
- package/dist/components/card/Card.module.css +191 -0
- package/dist/components/card/components/CardMeta.cjs +62 -0
- package/dist/components/card/components/CardMeta.d.ts +16 -0
- package/dist/components/card/components/CardMeta.js +55 -0
- package/dist/components/card/components/CardMeta.module.css +55 -0
- package/dist/components/card-container/CardContainer.cjs +34 -0
- package/dist/components/card-container/CardContainer.d.ts +12 -0
- package/dist/components/card-container/CardContainer.js +28 -0
- package/dist/components/card-container/CardContainer.module.css +63 -0
- package/dist/components/chip/Chip.cjs +65 -0
- package/dist/components/chip/Chip.d.ts +16 -0
- package/dist/components/chip/Chip.js +59 -0
- package/dist/components/chip/Chip.module.css +247 -0
- package/dist/components/circle/Circle.cjs +39 -0
- package/dist/components/circle/Circle.d.ts +14 -0
- package/dist/components/circle/Circle.js +33 -0
- package/dist/components/circle/Circle.module.css +138 -0
- package/dist/components/clear-button/ClearButton.cjs +33 -0
- package/dist/components/clear-button/ClearButton.d.ts +8 -0
- package/dist/components/clear-button/ClearButton.js +27 -0
- package/dist/components/clear-button/ClearButton.module.css +26 -0
- package/dist/components/code-block/CodeBlock.cjs +107 -0
- package/dist/components/code-block/CodeBlock.d.ts +11 -0
- package/dist/components/code-block/CodeBlock.js +101 -0
- package/dist/components/code-block/CodeBlock.module.css +135 -0
- package/dist/components/copy-button/CopyButton.cjs +139 -0
- package/dist/components/copy-button/CopyButton.d.ts +13 -0
- package/dist/components/copy-button/CopyButton.js +133 -0
- package/dist/components/copy-button/CopyButton.module.css +22 -0
- package/dist/components/datetime-picker/DateTimePicker.cjs +563 -0
- package/dist/components/datetime-picker/DateTimePicker.d.ts +66 -0
- package/dist/components/datetime-picker/DateTimePicker.js +557 -0
- package/dist/components/datetime-picker/DateTimePicker.module.css +155 -0
- package/dist/components/datetime-picker/dateTimeHelpers.cjs +185 -0
- package/dist/components/datetime-picker/dateTimeHelpers.d.ts +37 -0
- package/dist/components/datetime-picker/dateTimeHelpers.js +166 -0
- package/dist/components/divider/Divider.cjs +22 -0
- package/dist/components/divider/Divider.d.ts +5 -0
- package/dist/components/divider/Divider.js +20 -0
- package/dist/components/environment-banner/EnvironmentBanner.cjs +20 -0
- package/dist/components/environment-banner/EnvironmentBanner.d.ts +13 -0
- package/dist/components/environment-banner/EnvironmentBanner.js +14 -0
- package/dist/components/environment-banner/EnvironmentBanner.module.css +54 -0
- package/dist/components/filter-field/FilterField.cjs +324 -0
- package/dist/components/filter-field/FilterField.d.ts +39 -0
- package/dist/components/filter-field/FilterField.js +317 -0
- package/dist/components/filter-field/FilterField.module.css +304 -0
- package/dist/components/filtering/chip-multi-toggle/ChipMultiToggle.cjs +115 -0
- package/dist/components/filtering/chip-multi-toggle/ChipMultiToggle.d.ts +35 -0
- package/dist/components/filtering/chip-multi-toggle/ChipMultiToggle.js +108 -0
- package/dist/components/filtering/chip-multi-toggle/ChipMultiToggle.module.css +59 -0
- package/dist/components/forms/checkbox/Checkbox.cjs +99 -0
- package/dist/components/forms/checkbox/Checkbox.d.ts +39 -0
- package/dist/components/forms/checkbox/Checkbox.js +93 -0
- package/dist/components/forms/checkbox/Checkbox.module.css +110 -0
- package/dist/components/forms/checkbox-group/CheckboxGroup.cjs +121 -0
- package/dist/components/forms/checkbox-group/CheckboxGroup.d.ts +47 -0
- package/dist/components/forms/checkbox-group/CheckboxGroup.js +115 -0
- package/dist/components/forms/checkbox-group/CheckboxGroup.module.css +115 -0
- package/dist/components/forms/file-upload/FileUpload.cjs +127 -0
- package/dist/components/forms/file-upload/FileUpload.d.ts +18 -0
- package/dist/components/forms/file-upload/FileUpload.js +121 -0
- package/dist/components/forms/file-upload/FileUpload.module.css +75 -0
- package/dist/components/forms/form-select/FormSelect.cjs +191 -0
- package/dist/components/forms/form-select/FormSelect.d.ts +35 -0
- package/dist/components/forms/form-select/FormSelect.js +166 -0
- package/dist/components/forms/form-select/FormSelect.module.css +236 -0
- package/dist/components/forms/input/Input.cjs +190 -0
- package/dist/components/forms/input/Input.d.ts +37 -0
- package/dist/components/forms/input/Input.js +184 -0
- package/dist/components/forms/input/Input.module.css +478 -0
- package/dist/components/forms/input-container/InputContainer.cjs +72 -0
- package/dist/components/forms/input-container/InputContainer.d.ts +18 -0
- package/dist/components/forms/input-container/InputContainer.js +66 -0
- package/dist/components/forms/input-container/InputContainer.module.css +59 -0
- package/dist/components/forms/multi-select/MultiSelect.cjs +229 -0
- package/dist/components/forms/multi-select/MultiSelect.d.ts +26 -0
- package/dist/components/forms/multi-select/MultiSelect.js +227 -0
- package/dist/components/forms/radio-buttons/RadioButton.cjs +94 -0
- package/dist/components/forms/radio-buttons/RadioButton.d.ts +46 -0
- package/dist/components/forms/radio-buttons/RadioButton.js +88 -0
- package/dist/components/forms/radio-buttons/RadioButtonGroup.cjs +74 -0
- package/dist/components/forms/radio-buttons/RadioButtonGroup.d.ts +25 -0
- package/dist/components/forms/radio-buttons/RadioButtonGroup.js +72 -0
- package/dist/components/forms/radio-buttons/RadioButtons.module.css +131 -0
- package/dist/components/forms/select/Select.cjs +287 -0
- package/dist/components/forms/select/Select.d.ts +24 -0
- package/dist/components/forms/select/Select.js +281 -0
- package/dist/components/forms/select/Select.module.css +41 -0
- package/dist/components/forms/switch/Switch.cjs +93 -0
- package/dist/components/forms/switch/Switch.d.ts +37 -0
- package/dist/components/forms/switch/Switch.js +87 -0
- package/dist/components/forms/switch/Switch.module.css +89 -0
- package/dist/components/forms/text-area/Textarea.cjs +118 -0
- package/dist/components/forms/text-area/Textarea.d.ts +17 -0
- package/dist/components/forms/text-area/Textarea.js +112 -0
- package/dist/components/forms/text-area/Textarea.module.css +70 -0
- package/dist/components/forms/typeahead/Typeahead.cjs +824 -0
- package/dist/components/forms/typeahead/Typeahead.d.ts +46 -0
- package/dist/components/forms/typeahead/Typeahead.js +800 -0
- package/dist/components/forms/typeahead/Typeahead.module.css +38 -0
- package/dist/components/grid/Grid.cjs +58 -0
- package/dist/components/grid/Grid.d.ts +29 -0
- package/dist/components/grid/Grid.js +51 -0
- package/dist/components/grid/Grid.module.css +44 -0
- package/dist/components/headline/CollapsibleHeadline.cjs +84 -0
- package/dist/components/headline/CollapsibleHeadline.d.ts +25 -0
- package/dist/components/headline/CollapsibleHeadline.js +78 -0
- package/dist/components/headline/Headline.cjs +59 -0
- package/dist/components/headline/Headline.d.ts +20 -0
- package/dist/components/headline/Headline.js +53 -0
- package/dist/components/headline/Headline.module.css +167 -0
- package/dist/components/highlighted-text/HighlightedText.cjs +21 -0
- package/dist/components/highlighted-text/HighlightedText.d.ts +7 -0
- package/dist/components/highlighted-text/HighlightedText.js +19 -0
- package/dist/components/hyperlink/Hyperlink.cjs +113 -0
- package/dist/components/hyperlink/Hyperlink.d.ts +24 -0
- package/dist/components/hyperlink/Hyperlink.js +88 -0
- package/dist/components/hyperlink/Hyperlink.module.css +121 -0
- package/dist/components/icon/Icon.cjs +39 -0
- package/dist/components/icon/Icon.d.ts +14 -0
- package/dist/components/icon/Icon.js +32 -0
- package/dist/components/icon/Icon.module.css +50 -0
- package/dist/components/inline-status/InlineStatus.cjs +39 -0
- package/dist/components/inline-status/InlineStatus.d.ts +11 -0
- package/dist/components/inline-status/InlineStatus.js +33 -0
- package/dist/components/inline-status/InlineStatus.module.css +98 -0
- package/dist/components/interval-select/IntervalSelect.cjs +203 -0
- package/dist/components/interval-select/IntervalSelect.d.ts +37 -0
- package/dist/components/interval-select/IntervalSelect.js +201 -0
- package/dist/components/json-viewer/JsonNode.cjs +124 -0
- package/dist/components/json-viewer/JsonNode.d.ts +3 -0
- package/dist/components/json-viewer/JsonNode.js +118 -0
- package/dist/components/json-viewer/JsonViewer.cjs +164 -0
- package/dist/components/json-viewer/JsonViewer.d.ts +4 -0
- package/dist/components/json-viewer/JsonViewer.js +158 -0
- package/dist/components/json-viewer/JsonViewer.module.css +346 -0
- package/dist/components/json-viewer/types.cjs +2 -0
- package/dist/components/json-viewer/types.d.ts +33 -0
- package/dist/components/json-viewer/types.js +1 -0
- package/dist/components/json-viewer/useClipboardStatus.cjs +15 -0
- package/dist/components/json-viewer/useClipboardStatus.d.ts +4 -0
- package/dist/components/json-viewer/useClipboardStatus.js +13 -0
- package/dist/components/json-viewer/utils.cjs +126 -0
- package/dist/components/json-viewer/utils.d.ts +17 -0
- package/dist/components/json-viewer/utils.js +111 -0
- package/dist/components/lightbox/Lightbox.cjs +291 -0
- package/dist/components/lightbox/Lightbox.d.ts +36 -0
- package/dist/components/lightbox/Lightbox.js +285 -0
- package/dist/components/lightbox/Lightbox.module.css +214 -0
- package/dist/components/media-card/MediaCard.cjs +87 -0
- package/dist/components/media-card/MediaCard.d.ts +21 -0
- package/dist/components/media-card/MediaCard.js +80 -0
- package/dist/components/media-card/MediaCard.module.css +91 -0
- package/dist/components/menu/Menu.cjs +455 -0
- package/dist/components/menu/Menu.d.ts +102 -0
- package/dist/components/menu/Menu.js +430 -0
- package/dist/components/menu/Menu.module.css +286 -0
- package/dist/components/meta-bar/MetaBar.cjs +28 -0
- package/dist/components/meta-bar/MetaBar.d.ts +12 -0
- package/dist/components/meta-bar/MetaBar.js +22 -0
- package/dist/components/meta-bar/MetaBar.module.css +27 -0
- package/dist/components/metric-tile/MetricTile.cjs +33 -0
- package/dist/components/metric-tile/MetricTile.d.ts +15 -0
- package/dist/components/metric-tile/MetricTile.js +27 -0
- package/dist/components/metric-tile/MetricTile.module.css +103 -0
- package/dist/components/nav-bar/NavBar.cjs +107 -0
- package/dist/components/nav-bar/NavBar.d.ts +44 -0
- package/dist/components/nav-bar/NavBar.js +101 -0
- package/dist/components/nav-bar/NavBar.module.css +243 -0
- package/dist/components/overlay/fade-overlay/FadeOverlay.cjs +30 -0
- package/dist/components/overlay/fade-overlay/FadeOverlay.d.ts +13 -0
- package/dist/components/overlay/fade-overlay/FadeOverlay.js +24 -0
- package/dist/components/overlay/fade-overlay/FadeOverlay.module.css +54 -0
- package/dist/components/overlay/modal/Modal.cjs +200 -0
- package/dist/components/overlay/modal/Modal.d.ts +30 -0
- package/dist/components/overlay/modal/Modal.js +194 -0
- package/dist/components/overlay/modal/Modal.module.css +112 -0
- package/dist/components/overlay/modal/provider/ModalProvider.cjs +98 -0
- package/dist/components/overlay/modal/provider/ModalProvider.d.ts +23 -0
- package/dist/components/overlay/modal/provider/ModalProvider.js +95 -0
- package/dist/components/overlay/side-panel/SidePanel.cjs +173 -0
- package/dist/components/overlay/side-panel/SidePanel.d.ts +25 -0
- package/dist/components/overlay/side-panel/SidePanel.js +167 -0
- package/dist/components/overlay/side-panel/SidePanel.module.css +177 -0
- package/dist/components/overlay/side-panel/useSidePanel.cjs +16 -0
- package/dist/components/overlay/side-panel/useSidePanel.d.ts +5 -0
- package/dist/components/overlay/side-panel/useSidePanel.js +14 -0
- package/dist/components/overlay/tooltip/Tooltip.cjs +56 -0
- package/dist/components/overlay/tooltip/Tooltip.d.ts +12 -0
- package/dist/components/overlay/tooltip/Tooltip.js +54 -0
- package/dist/components/overlay/tooltip/Tooltip.module.css +104 -0
- package/dist/components/overlay/tooltip/TooltipProvider.cjs +238 -0
- package/dist/components/overlay/tooltip/TooltipProvider.d.ts +20 -0
- package/dist/components/overlay/tooltip/TooltipProvider.js +231 -0
- package/dist/components/overlay/tooltip/useTooltipTrigger.cjs +117 -0
- package/dist/components/overlay/tooltip/useTooltipTrigger.d.ts +28 -0
- package/dist/components/overlay/tooltip/useTooltipTrigger.js +115 -0
- package/dist/components/page/Page.cjs +64 -0
- package/dist/components/page/Page.d.ts +21 -0
- package/dist/components/page/Page.js +58 -0
- package/dist/components/page/Page.module.css +95 -0
- package/dist/components/page-layout/PageLayout.cjs +126 -0
- package/dist/components/page-layout/PageLayout.d.ts +47 -0
- package/dist/components/page-layout/PageLayout.js +120 -0
- package/dist/components/page-layout/PageLayout.module.css +333 -0
- package/dist/components/page-layout/components/footer/Footer.cjs +53 -0
- package/dist/components/page-layout/components/footer/Footer.d.ts +14 -0
- package/dist/components/page-layout/components/footer/Footer.js +47 -0
- package/dist/components/page-layout/components/footer/Footer.module.css +86 -0
- package/dist/components/pagination/Pagination.cjs +161 -0
- package/dist/components/pagination/Pagination.d.ts +21 -0
- package/dist/components/pagination/Pagination.js +155 -0
- package/dist/components/pagination/Pagination.module.css +25 -0
- package/dist/components/panel/Panel.cjs +38 -0
- package/dist/components/panel/Panel.d.ts +13 -0
- package/dist/components/panel/Panel.js +32 -0
- package/dist/components/panel/Panel.module.css +30 -0
- package/dist/components/popover/Popover.cjs +331 -0
- package/dist/components/popover/Popover.d.ts +27 -0
- package/dist/components/popover/Popover.js +307 -0
- package/dist/components/popover/Popover.module.css +52 -0
- package/dist/components/search-box/SearchBox.cjs +297 -0
- package/dist/components/search-box/SearchBox.d.ts +30 -0
- package/dist/components/search-box/SearchBox.js +291 -0
- package/dist/components/search-box/SearchBox.module.css +27 -0
- package/dist/components/section-label/SectionLabel.cjs +18 -0
- package/dist/components/section-label/SectionLabel.d.ts +5 -0
- package/dist/components/section-label/SectionLabel.js +12 -0
- package/dist/components/section-label/SectionLabel.module.css +12 -0
- package/dist/components/segmented-progress-bar/SegmentedProgressBar.cjs +130 -0
- package/dist/components/segmented-progress-bar/SegmentedProgressBar.d.ts +27 -0
- package/dist/components/segmented-progress-bar/SegmentedProgressBar.js +124 -0
- package/dist/components/segmented-progress-bar/SegmentedProgressBar.module.css +187 -0
- package/dist/components/sidebar/Sidebar.cjs +41 -0
- package/dist/components/sidebar/Sidebar.d.ts +23 -0
- package/dist/components/sidebar/Sidebar.js +39 -0
- package/dist/components/sidebar/components/SidebarItem.cjs +29 -0
- package/dist/components/sidebar/components/SidebarItem.d.ts +11 -0
- package/dist/components/sidebar/components/SidebarItem.js +27 -0
- package/dist/components/sidebar/components/SidebarItem.module.css +0 -0
- package/dist/components/sidebar/components/expandable-sidebar-item/ExpandableSidebarItem.cjs +153 -0
- package/dist/components/sidebar/components/expandable-sidebar-item/ExpandableSidebarItem.d.ts +13 -0
- package/dist/components/sidebar/components/expandable-sidebar-item/ExpandableSidebarItem.js +147 -0
- package/dist/components/sidebar/components/expandable-sidebar-item/ExpandableSidebarItem.module.css +47 -0
- package/dist/components/sidebar/components/sidebar-container/SidebarContainer.cjs +220 -0
- package/dist/components/sidebar/components/sidebar-container/SidebarContainer.d.ts +18 -0
- package/dist/components/sidebar/components/sidebar-container/SidebarContainer.js +213 -0
- package/dist/components/sidebar/components/sidebar-container/SidebarContainer.module.css +293 -0
- package/dist/components/sidebar/components/sidebar-item-content/SidebarItemContent.cjs +54 -0
- package/dist/components/sidebar/components/sidebar-item-content/SidebarItemContent.d.ts +13 -0
- package/dist/components/sidebar/components/sidebar-item-content/SidebarItemContent.js +47 -0
- package/dist/components/sidebar/components/sidebar-item-content/SidebarItemContent.module.css +117 -0
- package/dist/components/sidebar/components/sidebar-items/SidebarItems.cjs +61 -0
- package/dist/components/sidebar/components/sidebar-items/SidebarItems.d.ts +4 -0
- package/dist/components/sidebar/components/sidebar-items/SidebarItems.js +55 -0
- package/dist/components/sidebar/components/sidebar-items/SidebarItems.module.css +20 -0
- package/dist/components/sidebar/components/sidenav-filteirng/SidenavFiltering.cjs +96 -0
- package/dist/components/sidebar/components/sidenav-filteirng/SidenavFiltering.d.ts +7 -0
- package/dist/components/sidebar/components/sidenav-filteirng/SidenavFiltering.js +90 -0
- package/dist/components/sidebar/providers/SidebarProvider.cjs +223 -0
- package/dist/components/sidebar/providers/SidebarProvider.d.ts +34 -0
- package/dist/components/sidebar/providers/SidebarProvider.js +220 -0
- package/dist/components/skeleton-loader/SkeletonLoader.cjs +442 -0
- package/dist/components/skeleton-loader/SkeletonLoader.d.ts +9 -0
- package/dist/components/skeleton-loader/SkeletonLoader.js +440 -0
- package/dist/components/skeleton-loader/skeleton-loader-item/SkeletonLoaderItem.cjs +42 -0
- package/dist/components/skeleton-loader/skeleton-loader-item/SkeletonLoaderItem.d.ts +11 -0
- package/dist/components/skeleton-loader/skeleton-loader-item/SkeletonLoaderItem.js +36 -0
- package/dist/components/skeleton-loader/skeleton-loader-item/SkeletonLoaderItem.module.css +55 -0
- package/dist/components/split-button/SplitButton.cjs +46 -0
- package/dist/components/split-button/SplitButton.d.ts +16 -0
- package/dist/components/split-button/SplitButton.js +40 -0
- package/dist/components/split-button/SplitButton.module.css +32 -0
- package/dist/components/split-pane/SplitPane.cjs +191 -0
- package/dist/components/split-pane/SplitPane.d.ts +21 -0
- package/dist/components/split-pane/SplitPane.js +182 -0
- package/dist/components/split-pane/SplitPane.module.css +118 -0
- package/dist/components/split-pane/provider/SplitPaneContext.cjs +129 -0
- package/dist/components/split-pane/provider/SplitPaneContext.d.ts +24 -0
- package/dist/components/split-pane/provider/SplitPaneContext.js +121 -0
- package/dist/components/stack/Stack.cjs +56 -0
- package/dist/components/stack/Stack.d.ts +26 -0
- package/dist/components/stack/Stack.js +50 -0
- package/dist/components/stack/Stack.module.css +77 -0
- package/dist/components/state-page/StatePage.cjs +48 -0
- package/dist/components/state-page/StatePage.d.ts +10 -0
- package/dist/components/state-page/StatePage.js +42 -0
- package/dist/components/state-page/StatePage.module.css +9 -0
- package/dist/components/state-page/empty.cjs +664 -0
- package/dist/components/state-page/empty.d.ts +2 -0
- package/dist/components/state-page/empty.js +662 -0
- package/dist/components/state-page/error.cjs +310 -0
- package/dist/components/state-page/error.d.ts +2 -0
- package/dist/components/state-page/error.js +308 -0
- package/dist/components/state-page/notFound.cjs +243 -0
- package/dist/components/state-page/notFound.d.ts +2 -0
- package/dist/components/state-page/notFound.js +241 -0
- package/dist/components/sticky-footer-layout/StickyFooterLayout.cjs +98 -0
- package/dist/components/sticky-footer-layout/StickyFooterLayout.d.ts +14 -0
- package/dist/components/sticky-footer-layout/StickyFooterLayout.js +96 -0
- package/dist/components/table/Table.cjs +240 -0
- package/dist/components/table/Table.d.ts +4 -0
- package/dist/components/table/Table.js +234 -0
- package/dist/components/table/Table.module.css +704 -0
- package/dist/components/table/Table.types.cjs +2 -0
- package/dist/components/table/Table.types.d.ts +91 -0
- package/dist/components/table/Table.types.js +1 -0
- package/dist/components/table/TanstackTable.cjs +191 -0
- package/dist/components/table/TanstackTable.d.ts +15 -0
- package/dist/components/table/TanstackTable.js +166 -0
- package/dist/components/table/components/TableBody.cjs +58 -0
- package/dist/components/table/components/TableBody.d.ts +28 -0
- package/dist/components/table/components/TableBody.js +52 -0
- package/dist/components/table/components/TableHeader.cjs +56 -0
- package/dist/components/table/components/TableHeader.d.ts +16 -0
- package/dist/components/table/components/TableHeader.js +50 -0
- package/dist/components/table/components/TableHeaderCell.cjs +68 -0
- package/dist/components/table/components/TableHeaderCell.d.ts +12 -0
- package/dist/components/table/components/TableHeaderCell.js +62 -0
- package/dist/components/table/components/TablePagination.cjs +2 -0
- package/dist/components/table/components/TablePagination.d.ts +0 -0
- package/dist/components/table/components/TablePagination.js +1 -0
- package/dist/components/table/components/TableRow.cjs +287 -0
- package/dist/components/table/components/TableRow.d.ts +28 -0
- package/dist/components/table/components/TableRow.js +281 -0
- package/dist/components/table/components/TableSelectionCell.cjs +41 -0
- package/dist/components/table/components/TableSelectionCell.d.ts +9 -0
- package/dist/components/table/components/TableSelectionCell.js +35 -0
- package/dist/components/table/components/column-resizer/ColumnResizer.cjs +25 -0
- package/dist/components/table/components/column-resizer/ColumnResizer.d.ts +7 -0
- package/dist/components/table/components/column-resizer/ColumnResizer.js +19 -0
- package/dist/components/table/components/column-resizer/ColumnResizer.module.css +24 -0
- package/dist/components/table/components/empty-state/EmptyState.cjs +33 -0
- package/dist/components/table/components/empty-state/EmptyState.d.ts +21 -0
- package/dist/components/table/components/empty-state/EmptyState.js +31 -0
- package/dist/components/table/components/empty-state/EmptyState.module.css +4 -0
- package/dist/components/table/components/table-settings/TableSettings.cjs +139 -0
- package/dist/components/table/components/table-settings/TableSettings.d.ts +18 -0
- package/dist/components/table/components/table-settings/TableSettings.js +137 -0
- package/dist/components/table/hooks/useTableRowInteractions.cjs +47 -0
- package/dist/components/table/hooks/useTableRowInteractions.d.ts +15 -0
- package/dist/components/table/hooks/useTableRowInteractions.js +45 -0
- package/dist/components/table/table.classes.cjs +49 -0
- package/dist/components/table/table.classes.d.ts +10 -0
- package/dist/components/table/table.classes.js +40 -0
- package/dist/components/table/table.utils.cjs +59 -0
- package/dist/components/table/table.utils.d.ts +18 -0
- package/dist/components/table/table.utils.js +46 -0
- package/dist/components/table/tanstackTable.utils.cjs +181 -0
- package/dist/components/table/tanstackTable.utils.d.ts +29 -0
- package/dist/components/table/tanstackTable.utils.js +174 -0
- package/dist/components/tabs/Tabs.cjs +187 -0
- package/dist/components/tabs/Tabs.d.ts +52 -0
- package/dist/components/tabs/Tabs.js +181 -0
- package/dist/components/tabs/Tabs.module.css +263 -0
- package/dist/components/theme-button/ThemeButton.cjs +75 -0
- package/dist/components/theme-button/ThemeButton.d.ts +8 -0
- package/dist/components/theme-button/ThemeButton.js +72 -0
- package/dist/components/toast/Toast.cjs +68 -0
- package/dist/components/toast/Toast.d.ts +15 -0
- package/dist/components/toast/Toast.js +62 -0
- package/dist/components/toast/Toast.module.css +165 -0
- package/dist/components/toast/provider/ToastProvider.cjs +105 -0
- package/dist/components/toast/provider/ToastProvider.d.ts +24 -0
- package/dist/components/toast/provider/ToastProvider.js +97 -0
- package/dist/components/user-display/UserDisplay.cjs +22 -0
- package/dist/components/user-display/UserDisplay.d.ts +10 -0
- package/dist/components/user-display/UserDisplay.js +16 -0
- package/dist/components/user-display/UserDisplay.module.css +25 -0
- package/dist/constants/chart-colors.cjs +10 -0
- package/dist/constants/chart-colors.d.ts +2 -0
- package/dist/constants/chart-colors.js +8 -0
- package/dist/constants/chart-colors.types.cjs +2 -0
- package/dist/constants/chart-colors.types.d.ts +3 -0
- package/dist/constants/chart-colors.types.js +1 -0
- package/dist/constants/severity.cjs +33 -0
- package/dist/constants/severity.d.ts +4 -0
- package/dist/constants/severity.js +29 -0
- package/dist/constants/severity.types.cjs +2 -0
- package/dist/constants/severity.types.d.ts +1 -0
- package/dist/constants/severity.types.js +1 -0
- package/dist/constants/sizes.cjs +11 -0
- package/dist/constants/sizes.d.ts +2 -0
- package/dist/constants/sizes.js +9 -0
- package/dist/hooks/useDeviceSize.cjs +33 -0
- package/dist/hooks/useDeviceSize.d.ts +2 -0
- package/dist/hooks/useDeviceSize.js +31 -0
- package/dist/hooks/useListNavigation.cjs +237 -0
- package/dist/hooks/useListNavigation.d.ts +24 -0
- package/dist/hooks/useListNavigation.js +235 -0
- package/dist/hooks/usePagination.cjs +144 -0
- package/dist/hooks/usePagination.d.ts +38 -0
- package/dist/hooks/usePagination.js +142 -0
- package/dist/hooks/usePersistentState.cjs +60 -0
- package/dist/hooks/usePersistentState.d.ts +33 -0
- package/dist/hooks/usePersistentState.js +58 -0
- package/dist/hooks/useSorting.cjs +120 -0
- package/dist/hooks/useSorting.d.ts +50 -0
- package/dist/hooks/useSorting.js +117 -0
- package/dist/hooks/useTableData.cjs +75 -0
- package/dist/hooks/useTableData.d.ts +42 -0
- package/dist/hooks/useTableData.js +73 -0
- package/dist/hooks/useTableSelection.cjs +172 -0
- package/dist/hooks/useTableSelection.d.ts +27 -0
- package/dist/hooks/useTableSelection.js +170 -0
- package/dist/hooks/useTableSettings.cjs +90 -0
- package/dist/hooks/useTableSettings.d.ts +26 -0
- package/dist/hooks/useTableSettings.js +87 -0
- package/dist/hooks/useTheme.cjs +64 -0
- package/dist/hooks/useTheme.d.ts +7 -0
- package/dist/hooks/useTheme.js +62 -0
- package/dist/hooks/useTimeDuration.cjs +75 -0
- package/dist/hooks/useTimeDuration.d.ts +26 -0
- package/dist/hooks/useTimeDuration.js +73 -0
- package/dist/hooks/useViewportFill.cjs +82 -0
- package/dist/hooks/useViewportFill.d.ts +13 -0
- package/dist/hooks/useViewportFill.js +80 -0
- package/dist/index.cjs +292 -0
- package/dist/index.css +75 -0
- package/dist/index.d.ts +42 -0
- package/dist/index.js +41 -0
- package/dist/styles/animation.cjs +9 -0
- package/dist/styles/animation.d.ts +5 -0
- package/dist/styles/animation.js +7 -0
- package/dist/styles/css-helper-classes/flex.css +113 -0
- package/dist/styles/css-helper-classes/spacing.css +312 -0
- package/dist/styles/css-helper-classes/typography.css +11 -0
- package/dist/styles/fonts/Roboto/OFL.txt +93 -0
- package/dist/styles/fonts/Roboto/README.txt +118 -0
- package/dist/styles/fonts/Roboto/Roboto-Black.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto-BlackItalic.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto-Bold.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto-BoldItalic.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto-ExtraBold.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto-ExtraBoldItalic.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto-ExtraLight.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto-ExtraLightItalic.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto-Italic.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto-Light.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto-LightItalic.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto-Medium.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto-MediumItalic.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto-Regular.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto-SemiBold.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto-SemiBoldItalic.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto-Thin.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto-ThinItalic.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_Condensed-Black.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_Condensed-BlackItalic.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_Condensed-Bold.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_Condensed-BoldItalic.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_Condensed-ExtraBold.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_Condensed-ExtraBoldItalic.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_Condensed-ExtraLight.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_Condensed-ExtraLightItalic.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_Condensed-Italic.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_Condensed-Light.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_Condensed-LightItalic.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_Condensed-Medium.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_Condensed-MediumItalic.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_Condensed-Regular.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_Condensed-SemiBold.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_Condensed-SemiBoldItalic.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_Condensed-Thin.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_Condensed-ThinItalic.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_SemiCondensed-Black.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_SemiCondensed-BlackItalic.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_SemiCondensed-Bold.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_SemiCondensed-BoldItalic.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_SemiCondensed-ExtraBold.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_SemiCondensed-ExtraBoldItalic.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_SemiCondensed-ExtraLight.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_SemiCondensed-ExtraLightItalic.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_SemiCondensed-Italic.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_SemiCondensed-Light.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_SemiCondensed-LightItalic.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_SemiCondensed-Medium.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_SemiCondensed-MediumItalic.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_SemiCondensed-Regular.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_SemiCondensed-SemiBold.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_SemiCondensed-SemiBoldItalic.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_SemiCondensed-Thin.ttf +0 -0
- package/dist/styles/fonts/Roboto/Roboto_SemiCondensed-ThinItalic.ttf +0 -0
- package/dist/styles/fonts/Tajawal/OFL.txt +93 -0
- package/dist/styles/fonts/Tajawal/Tajawal-Black.ttf +0 -0
- package/dist/styles/fonts/Tajawal/Tajawal-Bold.ttf +0 -0
- package/dist/styles/fonts/Tajawal/Tajawal-ExtraBold.ttf +0 -0
- package/dist/styles/fonts/Tajawal/Tajawal-ExtraLight.ttf +0 -0
- package/dist/styles/fonts/Tajawal/Tajawal-Light.ttf +0 -0
- package/dist/styles/fonts/Tajawal/Tajawal-Medium.ttf +0 -0
- package/dist/styles/fonts/Tajawal/Tajawal-Regular.ttf +0 -0
- package/dist/styles/styles.css +377 -0
- package/dist/styles/themes/dbc/base.css +141 -0
- package/dist/styles/themes/dbc/colors.css +320 -0
- package/dist/styles/themes/filmstriben-budget/theme.css +22 -0
- package/dist/styles/themes/types.cjs +2 -0
- package/dist/styles/themes/types.d.ts +16 -0
- package/dist/styles/themes/types.js +1 -0
- package/dist/styles.css +377 -0
- package/dist/tanstack.cjs +26 -0
- package/dist/tanstack.d.ts +3 -0
- package/dist/tanstack.js +3 -0
- package/dist/themes/dbc.css +3 -0
- package/dist/themes/filmstriben-budget.css +3 -0
- package/dist/types/a11y-props.types.cjs +2 -0
- package/dist/types/a11y-props.types.d.ts +8 -0
- package/dist/types/a11y-props.types.js +1 -0
- package/dist/types/assets.d.cjs +2 -0
- package/dist/types/assets.d.js +1 -0
- package/dist/types/css.d.cjs +2 -0
- package/dist/types/css.d.js +1 -0
- package/dist/types/sizes.types.cjs +2 -0
- package/dist/types/sizes.types.d.ts +2 -0
- package/dist/types/sizes.types.js +1 -0
- package/dist/utils/arrays/nested-filtering.cjs +40 -0
- package/dist/utils/arrays/nested-filtering.d.ts +9 -0
- package/dist/utils/arrays/nested-filtering.js +38 -0
- package/dist/utils/cookie.utils.cjs +44 -0
- package/dist/utils/cookie.utils.d.ts +19 -0
- package/dist/utils/cookie.utils.js +40 -0
- package/dist/utils/date/formatDate.cjs +49 -0
- package/dist/utils/date/formatDate.d.ts +28 -0
- package/dist/utils/date/formatDate.js +47 -0
- package/dist/utils/localStorage.utils.cjs +53 -0
- package/dist/utils/localStorage.utils.d.ts +19 -0
- package/dist/utils/localStorage.utils.js +49 -0
- package/dist/utils/text/get-highlighted-segments.cjs +49 -0
- package/dist/utils/text/get-highlighted-segments.d.ts +5 -0
- package/dist/utils/text/get-highlighted-segments.js +47 -0
- package/package.json +2 -1
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
.viewer {
|
|
2
|
+
--json-pane-bg: var(--color-bg-inverse);
|
|
3
|
+
--json-pane-border: color-mix(in oklab, var(--color-fg-inverse) 12%, transparent);
|
|
4
|
+
--json-pane-border-strong: color-mix(in oklab, var(--color-fg-inverse) 18%, transparent);
|
|
5
|
+
--json-pane-text: var(--color-fg-inverse);
|
|
6
|
+
--json-pane-muted: color-mix(in oklab, var(--color-fg-inverse) 64%, transparent);
|
|
7
|
+
--json-pane-subtle: color-mix(in oklab, var(--color-fg-inverse) 44%, transparent);
|
|
8
|
+
--json-pane-hover: color-mix(in oklab, var(--color-fg-inverse) 8%, transparent);
|
|
9
|
+
--json-pane-selected: color-mix(in oklab, var(--color-brand) 24%, transparent);
|
|
10
|
+
--json-pane-highlight: color-mix(
|
|
11
|
+
in oklab,
|
|
12
|
+
var(--color-brand) 68%,
|
|
13
|
+
var(--color-syntax-accent) 32%
|
|
14
|
+
);
|
|
15
|
+
--color-highlight-bg: color-mix(in oklab, var(--json-pane-highlight) 58%, transparent);
|
|
16
|
+
--color-highlight-fg: var(--color-fg-inverse);
|
|
17
|
+
--json-pane-key: color-mix(in oklab, var(--color-fg-inverse) 88%, var(--color-syntax-accent) 12%);
|
|
18
|
+
--json-pane-string: color-mix(in oklab, var(--color-syntax-string) 78%, white 22%);
|
|
19
|
+
--json-pane-number: color-mix(in oklab, var(--color-syntax-number) 76%, white 24%);
|
|
20
|
+
--json-pane-boolean: color-mix(in oklab, var(--color-syntax-boolean) 74%, white 26%);
|
|
21
|
+
--json-pane-null: color-mix(in oklab, var(--color-fg-inverse) 54%, transparent);
|
|
22
|
+
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
gap: var(--spacing-sm);
|
|
26
|
+
background: var(--json-pane-bg);
|
|
27
|
+
color: var(--json-pane-text);
|
|
28
|
+
border: var(--border-width-thin) solid var(--json-pane-border);
|
|
29
|
+
border-radius: var(--border-radius-xl);
|
|
30
|
+
box-shadow: var(--shadow-md);
|
|
31
|
+
padding: var(--spacing-sm);
|
|
32
|
+
font-family: var(--font-family-mono);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.toolbar {
|
|
36
|
+
display: grid;
|
|
37
|
+
gap: var(--spacing-xs);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.toolbarTop {
|
|
41
|
+
display: grid;
|
|
42
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
43
|
+
gap: var(--spacing-sm);
|
|
44
|
+
align-items: center;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.searchField {
|
|
48
|
+
display: grid;
|
|
49
|
+
grid-template-columns: auto minmax(0, 1fr) auto;
|
|
50
|
+
align-items: center;
|
|
51
|
+
gap: var(--spacing-xs);
|
|
52
|
+
min-height: var(--component-size-md);
|
|
53
|
+
padding-inline: var(--spacing-sm);
|
|
54
|
+
border: var(--border-width-thin) solid var(--json-pane-border);
|
|
55
|
+
border-radius: var(--border-radius-lg);
|
|
56
|
+
background: transparent;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.searchField:focus-within {
|
|
60
|
+
border-color: var(--json-pane-border-strong);
|
|
61
|
+
box-shadow: var(--focus-ring);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.searchIcon,
|
|
65
|
+
.clearButton svg {
|
|
66
|
+
inline-size: var(--icon-size-sm);
|
|
67
|
+
block-size: var(--icon-size-sm);
|
|
68
|
+
color: var(--json-pane-subtle);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.searchInput {
|
|
72
|
+
inline-size: 100%;
|
|
73
|
+
min-inline-size: 0;
|
|
74
|
+
min-block-size: var(--component-size-md);
|
|
75
|
+
background: transparent;
|
|
76
|
+
border: 0;
|
|
77
|
+
color: var(--json-pane-text);
|
|
78
|
+
font: inherit;
|
|
79
|
+
outline: none;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.searchInput::placeholder {
|
|
83
|
+
color: var(--json-pane-subtle);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.clearButton {
|
|
87
|
+
display: inline-flex;
|
|
88
|
+
align-items: center;
|
|
89
|
+
justify-content: center;
|
|
90
|
+
inline-size: var(--component-size-xs);
|
|
91
|
+
block-size: var(--component-size-xs);
|
|
92
|
+
border: 0;
|
|
93
|
+
border-radius: var(--border-radius-round);
|
|
94
|
+
background: transparent;
|
|
95
|
+
cursor: pointer;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.clearButton:hover {
|
|
99
|
+
background: var(--json-pane-hover);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.metaRow {
|
|
103
|
+
display: flex;
|
|
104
|
+
align-items: center;
|
|
105
|
+
justify-content: space-between;
|
|
106
|
+
gap: var(--spacing-md);
|
|
107
|
+
font-size: var(--font-size-xs);
|
|
108
|
+
color: var(--json-pane-muted);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.actions {
|
|
112
|
+
display: inline-flex;
|
|
113
|
+
align-items: center;
|
|
114
|
+
gap: var(--spacing-xs);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.toolbarButton {
|
|
118
|
+
min-block-size: var(--component-size-sm);
|
|
119
|
+
padding-inline: var(--spacing-sm);
|
|
120
|
+
border: var(--border-width-thin) solid var(--json-pane-border);
|
|
121
|
+
border-radius: var(--border-radius-md);
|
|
122
|
+
background: transparent;
|
|
123
|
+
color: var(--json-pane-text);
|
|
124
|
+
font: inherit;
|
|
125
|
+
cursor: pointer;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.toolbarButton:hover:not(:disabled) {
|
|
129
|
+
background: var(--json-pane-hover);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.toolbarButton:focus-visible {
|
|
133
|
+
outline: none;
|
|
134
|
+
box-shadow: var(--focus-ring);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.toolbarButton:disabled {
|
|
138
|
+
opacity: 0.45;
|
|
139
|
+
cursor: default;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.helperText,
|
|
143
|
+
.statusText {
|
|
144
|
+
min-inline-size: 0;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.treePane {
|
|
148
|
+
display: flex;
|
|
149
|
+
flex-direction: column;
|
|
150
|
+
gap: var(--spacing-2xs);
|
|
151
|
+
background: transparent;
|
|
152
|
+
padding: 0;
|
|
153
|
+
overflow: auto;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.node {
|
|
157
|
+
display: flex;
|
|
158
|
+
flex-direction: column;
|
|
159
|
+
gap: 1px;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.row,
|
|
163
|
+
.pathHint {
|
|
164
|
+
padding-left: calc(var(--json-indent) * var(--spacing-md));
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.row {
|
|
168
|
+
display: flex;
|
|
169
|
+
align-items: flex-start;
|
|
170
|
+
min-inline-size: 0;
|
|
171
|
+
border-radius: var(--border-radius-md);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.row[data-match='true'] {
|
|
175
|
+
background: var(--json-pane-selected);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.toggle,
|
|
179
|
+
.valueButton {
|
|
180
|
+
display: inline-flex;
|
|
181
|
+
align-items: center;
|
|
182
|
+
gap: var(--spacing-xs);
|
|
183
|
+
min-inline-size: 0;
|
|
184
|
+
inline-size: 100%;
|
|
185
|
+
padding-block: 6px;
|
|
186
|
+
padding-inline: var(--spacing-xs);
|
|
187
|
+
background: transparent;
|
|
188
|
+
border: 0;
|
|
189
|
+
border-radius: var(--border-radius-md);
|
|
190
|
+
color: inherit;
|
|
191
|
+
text-align: left;
|
|
192
|
+
cursor: pointer;
|
|
193
|
+
font: inherit;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.toggle {
|
|
197
|
+
justify-content: flex-start;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.valueButton {
|
|
201
|
+
justify-content: flex-start;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.toggle:hover,
|
|
205
|
+
.valueButton:hover {
|
|
206
|
+
background: var(--json-pane-hover);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.toggle:focus-visible,
|
|
210
|
+
.valueButton:focus-visible,
|
|
211
|
+
.clearButton:focus-visible {
|
|
212
|
+
outline: none;
|
|
213
|
+
box-shadow: var(--focus-ring);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.toggle svg,
|
|
217
|
+
.copyState svg {
|
|
218
|
+
inline-size: var(--icon-size-sm);
|
|
219
|
+
block-size: var(--icon-size-sm);
|
|
220
|
+
flex: 0 0 auto;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.rowLabel {
|
|
224
|
+
display: inline-flex;
|
|
225
|
+
align-items: baseline;
|
|
226
|
+
flex-wrap: nowrap;
|
|
227
|
+
gap: 6px;
|
|
228
|
+
min-inline-size: 0;
|
|
229
|
+
flex: 1 1 auto;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.keyChunk {
|
|
233
|
+
display: inline-flex;
|
|
234
|
+
align-items: baseline;
|
|
235
|
+
gap: 4px;
|
|
236
|
+
flex: 0 0 auto;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.rootLabel,
|
|
240
|
+
.key {
|
|
241
|
+
color: var(--json-pane-key);
|
|
242
|
+
font-weight: var(--font-weight-medium);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.punctuation,
|
|
246
|
+
.bracket {
|
|
247
|
+
color: var(--json-pane-subtle);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.summary,
|
|
251
|
+
.pathHint {
|
|
252
|
+
color: var(--json-pane-muted);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.children {
|
|
256
|
+
display: flex;
|
|
257
|
+
flex-direction: column;
|
|
258
|
+
gap: 1px;
|
|
259
|
+
position: relative;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.children::before {
|
|
263
|
+
content: '';
|
|
264
|
+
position: absolute;
|
|
265
|
+
left: calc(var(--spacing-md) - 2px);
|
|
266
|
+
top: 0;
|
|
267
|
+
bottom: 0;
|
|
268
|
+
width: 1px;
|
|
269
|
+
background: color-mix(in oklab, var(--color-fg-inverse) 8%, transparent);
|
|
270
|
+
pointer-events: none;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
.value {
|
|
274
|
+
min-inline-size: 0;
|
|
275
|
+
flex: 0 1 auto;
|
|
276
|
+
word-break: break-word;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.valueString {
|
|
280
|
+
color: var(--json-pane-string);
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
.valueNumber {
|
|
284
|
+
color: var(--json-pane-number);
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
.valueBoolean {
|
|
288
|
+
color: var(--json-pane-boolean);
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
.valueNull {
|
|
292
|
+
color: var(--json-pane-null);
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
.copyState {
|
|
296
|
+
display: inline-flex;
|
|
297
|
+
align-items: center;
|
|
298
|
+
gap: var(--spacing-xxs);
|
|
299
|
+
margin-left: auto;
|
|
300
|
+
color: var(--json-pane-subtle);
|
|
301
|
+
font-size: var(--font-size-xs);
|
|
302
|
+
white-space: nowrap;
|
|
303
|
+
opacity: 0;
|
|
304
|
+
transform: translateX(4px);
|
|
305
|
+
transition:
|
|
306
|
+
opacity var(--transition-fast) var(--ease-standard),
|
|
307
|
+
transform var(--transition-fast) var(--ease-standard);
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
.valueButton:hover .copyState,
|
|
311
|
+
.valueButton:focus-visible .copyState,
|
|
312
|
+
.valueButton:focus-within .copyState {
|
|
313
|
+
opacity: 1;
|
|
314
|
+
transform: translateX(0);
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
.valueButton[title='Kopieret'] .copyState {
|
|
318
|
+
opacity: 1;
|
|
319
|
+
transform: translateX(0);
|
|
320
|
+
color: color-mix(in oklab, var(--color-syntax-string) 78%, white 22%);
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
.emptyState {
|
|
324
|
+
padding: var(--spacing-md);
|
|
325
|
+
color: var(--json-pane-muted);
|
|
326
|
+
text-align: center;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
@media (max-width: 640px) {
|
|
330
|
+
.toolbarTop {
|
|
331
|
+
grid-template-columns: 1fr;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
.actions {
|
|
335
|
+
flex-wrap: wrap;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
.metaRow {
|
|
339
|
+
flex-direction: column;
|
|
340
|
+
align-items: flex-start;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
.copyState span {
|
|
344
|
+
display: none;
|
|
345
|
+
}
|
|
346
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export type JsonPrimitive = string | number | boolean | null;
|
|
2
|
+
export type JsonValue = JsonPrimitive | JsonValue[] | {
|
|
3
|
+
[key: string]: JsonValue;
|
|
4
|
+
};
|
|
5
|
+
export type PrimitiveKind = 'string' | 'number' | 'boolean' | 'null';
|
|
6
|
+
export type SearchMatch = {
|
|
7
|
+
self: boolean;
|
|
8
|
+
descendant: boolean;
|
|
9
|
+
};
|
|
10
|
+
export interface JsonViewerProps {
|
|
11
|
+
value: unknown;
|
|
12
|
+
defaultExpandedDepth?: number;
|
|
13
|
+
expandAll?: boolean;
|
|
14
|
+
searchDebounceMs?: number;
|
|
15
|
+
helperText?: string;
|
|
16
|
+
searchPlaceholder?: string;
|
|
17
|
+
emptySearchText?: string;
|
|
18
|
+
className?: string;
|
|
19
|
+
maxHeight?: number | string;
|
|
20
|
+
}
|
|
21
|
+
export type JsonNodeProps = {
|
|
22
|
+
keyName?: string;
|
|
23
|
+
path: string[];
|
|
24
|
+
value: JsonValue;
|
|
25
|
+
depth: number;
|
|
26
|
+
defaultExpandedDepth: number;
|
|
27
|
+
query: string;
|
|
28
|
+
matches: Map<string, SearchMatch>;
|
|
29
|
+
expandedNodeIds: Set<string>;
|
|
30
|
+
onToggleNode: (nodeId: string) => void;
|
|
31
|
+
copiedId: string | null;
|
|
32
|
+
onCopy: (nodeId: string, rawValue: string) => void;
|
|
33
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var react = require('react');
|
|
4
|
+
|
|
5
|
+
function useClipboardStatus() {
|
|
6
|
+
const [copiedId, setCopiedId] = react.useState(null);
|
|
7
|
+
react.useEffect(() => {
|
|
8
|
+
if (!copiedId) return;
|
|
9
|
+
const timer = window.setTimeout(() => setCopiedId(null), 1400);
|
|
10
|
+
return () => window.clearTimeout(timer);
|
|
11
|
+
}, [copiedId]);
|
|
12
|
+
return { copiedId, setCopiedId };
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
exports.useClipboardStatus = useClipboardStatus;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { useState, useEffect } from 'react';
|
|
2
|
+
|
|
3
|
+
function useClipboardStatus() {
|
|
4
|
+
const [copiedId, setCopiedId] = useState(null);
|
|
5
|
+
useEffect(() => {
|
|
6
|
+
if (!copiedId) return;
|
|
7
|
+
const timer = window.setTimeout(() => setCopiedId(null), 1400);
|
|
8
|
+
return () => window.clearTimeout(timer);
|
|
9
|
+
}, [copiedId]);
|
|
10
|
+
return { copiedId, setCopiedId };
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export { useClipboardStatus };
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
function isJsonArray(value) {
|
|
4
|
+
return Array.isArray(value);
|
|
5
|
+
}
|
|
6
|
+
function isJsonObject(value) {
|
|
7
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
8
|
+
}
|
|
9
|
+
function isJsonValue(value) {
|
|
10
|
+
if (value === null) return true;
|
|
11
|
+
if (Array.isArray(value)) return value.every(isJsonValue);
|
|
12
|
+
if (typeof value === "object") {
|
|
13
|
+
return Object.values(value).every(isJsonValue);
|
|
14
|
+
}
|
|
15
|
+
return typeof value === "string" || typeof value === "number" || typeof value === "boolean";
|
|
16
|
+
}
|
|
17
|
+
function getValueType(value) {
|
|
18
|
+
if (value === null) return "null";
|
|
19
|
+
if (Array.isArray(value)) return "array";
|
|
20
|
+
if (typeof value === "object") return "object";
|
|
21
|
+
if (typeof value === "string") return "string";
|
|
22
|
+
if (typeof value === "number") return "number";
|
|
23
|
+
if (typeof value === "boolean") return "boolean";
|
|
24
|
+
return "string";
|
|
25
|
+
}
|
|
26
|
+
function formatPrimitive(value) {
|
|
27
|
+
if (value === null) return "null";
|
|
28
|
+
if (typeof value === "string") return JSON.stringify(value);
|
|
29
|
+
return String(value);
|
|
30
|
+
}
|
|
31
|
+
function getPrimitiveRawValue(value) {
|
|
32
|
+
if (value === null) return "null";
|
|
33
|
+
return String(value);
|
|
34
|
+
}
|
|
35
|
+
function getSummary(value) {
|
|
36
|
+
if (isJsonArray(value)) {
|
|
37
|
+
return `${value.length} element${value.length === 1 ? "" : "er"}`;
|
|
38
|
+
}
|
|
39
|
+
if (!isJsonObject(value)) return "0 felter";
|
|
40
|
+
const count = Object.keys(value).length;
|
|
41
|
+
return `${count} felt${count === 1 ? "" : "er"}`;
|
|
42
|
+
}
|
|
43
|
+
function getNodeId(path) {
|
|
44
|
+
return path.length === 0 ? "$" : `$.${path.join(".")}`;
|
|
45
|
+
}
|
|
46
|
+
function getPathLabel(path) {
|
|
47
|
+
return getNodeId(path);
|
|
48
|
+
}
|
|
49
|
+
function normalizeSearch(value) {
|
|
50
|
+
return value.trim().toLowerCase();
|
|
51
|
+
}
|
|
52
|
+
function capitalize(value) {
|
|
53
|
+
return value.charAt(0).toUpperCase() + value.slice(1);
|
|
54
|
+
}
|
|
55
|
+
function valueToSearchString(value) {
|
|
56
|
+
return value === null ? "null" : String(value).toLowerCase();
|
|
57
|
+
}
|
|
58
|
+
function collectSearchMatches(value, query, path = [], key) {
|
|
59
|
+
const matches = /* @__PURE__ */ new Map();
|
|
60
|
+
const visit = (current, currentPath, currentKey) => {
|
|
61
|
+
const nodeId = getNodeId(currentPath);
|
|
62
|
+
const pathLabel = getPathLabel(currentPath).toLowerCase();
|
|
63
|
+
const keyLabel = (currentKey != null ? currentKey : "").toLowerCase();
|
|
64
|
+
let self = keyLabel.includes(query) || pathLabel.includes(query);
|
|
65
|
+
let descendant = false;
|
|
66
|
+
if (isJsonArray(current)) {
|
|
67
|
+
current.forEach((item, index) => {
|
|
68
|
+
const childMatches = visit(item, [...currentPath, String(index)], String(index));
|
|
69
|
+
descendant = descendant || childMatches;
|
|
70
|
+
});
|
|
71
|
+
} else if (isJsonObject(current)) {
|
|
72
|
+
Object.entries(current).forEach(([childKey, childValue]) => {
|
|
73
|
+
const childMatches = visit(childValue, [...currentPath, childKey], childKey);
|
|
74
|
+
descendant = descendant || childMatches;
|
|
75
|
+
});
|
|
76
|
+
} else {
|
|
77
|
+
self = self || valueToSearchString(current).includes(query);
|
|
78
|
+
}
|
|
79
|
+
const any = self || descendant;
|
|
80
|
+
if (any) {
|
|
81
|
+
matches.set(nodeId, { self, descendant });
|
|
82
|
+
}
|
|
83
|
+
return any;
|
|
84
|
+
};
|
|
85
|
+
visit(value, path, key);
|
|
86
|
+
return matches;
|
|
87
|
+
}
|
|
88
|
+
function collectExpandableNodeIds(value, path = []) {
|
|
89
|
+
if (!isJsonArray(value) && !isJsonObject(value)) return [];
|
|
90
|
+
const nodeId = getNodeId(path);
|
|
91
|
+
const childEntries = isJsonArray(value) ? value.map((item, index) => [String(index), item]) : Object.entries(value);
|
|
92
|
+
return [
|
|
93
|
+
nodeId,
|
|
94
|
+
...childEntries.flatMap(
|
|
95
|
+
([childKey, childValue]) => collectExpandableNodeIds(childValue, [...path, childKey])
|
|
96
|
+
)
|
|
97
|
+
];
|
|
98
|
+
}
|
|
99
|
+
function collectInitiallyExpandedNodeIds(value, defaultExpandedDepth, expandAll, depth = 0, path = []) {
|
|
100
|
+
if (!isJsonArray(value) && !isJsonObject(value)) return [];
|
|
101
|
+
const nodeId = getNodeId(path);
|
|
102
|
+
const childEntries = isJsonArray(value) ? value.map((item, index) => [String(index), item]) : Object.entries(value);
|
|
103
|
+
const includeNode = expandAll || depth < defaultExpandedDepth;
|
|
104
|
+
const nested = childEntries.flatMap(
|
|
105
|
+
([childKey, childValue]) => collectInitiallyExpandedNodeIds(childValue, defaultExpandedDepth, expandAll, depth + 1, [
|
|
106
|
+
...path,
|
|
107
|
+
childKey
|
|
108
|
+
])
|
|
109
|
+
);
|
|
110
|
+
return includeNode ? [nodeId, ...nested] : nested;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
exports.capitalize = capitalize;
|
|
114
|
+
exports.collectExpandableNodeIds = collectExpandableNodeIds;
|
|
115
|
+
exports.collectInitiallyExpandedNodeIds = collectInitiallyExpandedNodeIds;
|
|
116
|
+
exports.collectSearchMatches = collectSearchMatches;
|
|
117
|
+
exports.formatPrimitive = formatPrimitive;
|
|
118
|
+
exports.getNodeId = getNodeId;
|
|
119
|
+
exports.getPathLabel = getPathLabel;
|
|
120
|
+
exports.getPrimitiveRawValue = getPrimitiveRawValue;
|
|
121
|
+
exports.getSummary = getSummary;
|
|
122
|
+
exports.getValueType = getValueType;
|
|
123
|
+
exports.isJsonArray = isJsonArray;
|
|
124
|
+
exports.isJsonObject = isJsonObject;
|
|
125
|
+
exports.isJsonValue = isJsonValue;
|
|
126
|
+
exports.normalizeSearch = normalizeSearch;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { JsonValue, JsonPrimitive, PrimitiveKind, SearchMatch } from './types';
|
|
2
|
+
export declare function isJsonArray(value: JsonValue): value is JsonValue[];
|
|
3
|
+
export declare function isJsonObject(value: JsonValue): value is {
|
|
4
|
+
[key: string]: JsonValue;
|
|
5
|
+
};
|
|
6
|
+
export declare function isJsonValue(value: unknown): value is JsonValue;
|
|
7
|
+
export declare function getValueType(value: unknown): PrimitiveKind | 'array' | 'object';
|
|
8
|
+
export declare function formatPrimitive(value: JsonPrimitive): string;
|
|
9
|
+
export declare function getPrimitiveRawValue(value: JsonPrimitive): string;
|
|
10
|
+
export declare function getSummary(value: JsonValue): string;
|
|
11
|
+
export declare function getNodeId(path: string[]): string;
|
|
12
|
+
export declare function getPathLabel(path: string[]): string;
|
|
13
|
+
export declare function normalizeSearch(value: string): string;
|
|
14
|
+
export declare function capitalize(value: string): string;
|
|
15
|
+
export declare function collectSearchMatches(value: JsonValue, query: string, path?: string[], key?: string): Map<string, SearchMatch>;
|
|
16
|
+
export declare function collectExpandableNodeIds(value: JsonValue, path?: string[]): string[];
|
|
17
|
+
export declare function collectInitiallyExpandedNodeIds(value: JsonValue, defaultExpandedDepth: number, expandAll: boolean, depth?: number, path?: string[]): string[];
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
function isJsonArray(value) {
|
|
2
|
+
return Array.isArray(value);
|
|
3
|
+
}
|
|
4
|
+
function isJsonObject(value) {
|
|
5
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
6
|
+
}
|
|
7
|
+
function isJsonValue(value) {
|
|
8
|
+
if (value === null) return true;
|
|
9
|
+
if (Array.isArray(value)) return value.every(isJsonValue);
|
|
10
|
+
if (typeof value === "object") {
|
|
11
|
+
return Object.values(value).every(isJsonValue);
|
|
12
|
+
}
|
|
13
|
+
return typeof value === "string" || typeof value === "number" || typeof value === "boolean";
|
|
14
|
+
}
|
|
15
|
+
function getValueType(value) {
|
|
16
|
+
if (value === null) return "null";
|
|
17
|
+
if (Array.isArray(value)) return "array";
|
|
18
|
+
if (typeof value === "object") return "object";
|
|
19
|
+
if (typeof value === "string") return "string";
|
|
20
|
+
if (typeof value === "number") return "number";
|
|
21
|
+
if (typeof value === "boolean") return "boolean";
|
|
22
|
+
return "string";
|
|
23
|
+
}
|
|
24
|
+
function formatPrimitive(value) {
|
|
25
|
+
if (value === null) return "null";
|
|
26
|
+
if (typeof value === "string") return JSON.stringify(value);
|
|
27
|
+
return String(value);
|
|
28
|
+
}
|
|
29
|
+
function getPrimitiveRawValue(value) {
|
|
30
|
+
if (value === null) return "null";
|
|
31
|
+
return String(value);
|
|
32
|
+
}
|
|
33
|
+
function getSummary(value) {
|
|
34
|
+
if (isJsonArray(value)) {
|
|
35
|
+
return `${value.length} element${value.length === 1 ? "" : "er"}`;
|
|
36
|
+
}
|
|
37
|
+
if (!isJsonObject(value)) return "0 felter";
|
|
38
|
+
const count = Object.keys(value).length;
|
|
39
|
+
return `${count} felt${count === 1 ? "" : "er"}`;
|
|
40
|
+
}
|
|
41
|
+
function getNodeId(path) {
|
|
42
|
+
return path.length === 0 ? "$" : `$.${path.join(".")}`;
|
|
43
|
+
}
|
|
44
|
+
function getPathLabel(path) {
|
|
45
|
+
return getNodeId(path);
|
|
46
|
+
}
|
|
47
|
+
function normalizeSearch(value) {
|
|
48
|
+
return value.trim().toLowerCase();
|
|
49
|
+
}
|
|
50
|
+
function capitalize(value) {
|
|
51
|
+
return value.charAt(0).toUpperCase() + value.slice(1);
|
|
52
|
+
}
|
|
53
|
+
function valueToSearchString(value) {
|
|
54
|
+
return value === null ? "null" : String(value).toLowerCase();
|
|
55
|
+
}
|
|
56
|
+
function collectSearchMatches(value, query, path = [], key) {
|
|
57
|
+
const matches = /* @__PURE__ */ new Map();
|
|
58
|
+
const visit = (current, currentPath, currentKey) => {
|
|
59
|
+
const nodeId = getNodeId(currentPath);
|
|
60
|
+
const pathLabel = getPathLabel(currentPath).toLowerCase();
|
|
61
|
+
const keyLabel = (currentKey != null ? currentKey : "").toLowerCase();
|
|
62
|
+
let self = keyLabel.includes(query) || pathLabel.includes(query);
|
|
63
|
+
let descendant = false;
|
|
64
|
+
if (isJsonArray(current)) {
|
|
65
|
+
current.forEach((item, index) => {
|
|
66
|
+
const childMatches = visit(item, [...currentPath, String(index)], String(index));
|
|
67
|
+
descendant = descendant || childMatches;
|
|
68
|
+
});
|
|
69
|
+
} else if (isJsonObject(current)) {
|
|
70
|
+
Object.entries(current).forEach(([childKey, childValue]) => {
|
|
71
|
+
const childMatches = visit(childValue, [...currentPath, childKey], childKey);
|
|
72
|
+
descendant = descendant || childMatches;
|
|
73
|
+
});
|
|
74
|
+
} else {
|
|
75
|
+
self = self || valueToSearchString(current).includes(query);
|
|
76
|
+
}
|
|
77
|
+
const any = self || descendant;
|
|
78
|
+
if (any) {
|
|
79
|
+
matches.set(nodeId, { self, descendant });
|
|
80
|
+
}
|
|
81
|
+
return any;
|
|
82
|
+
};
|
|
83
|
+
visit(value, path, key);
|
|
84
|
+
return matches;
|
|
85
|
+
}
|
|
86
|
+
function collectExpandableNodeIds(value, path = []) {
|
|
87
|
+
if (!isJsonArray(value) && !isJsonObject(value)) return [];
|
|
88
|
+
const nodeId = getNodeId(path);
|
|
89
|
+
const childEntries = isJsonArray(value) ? value.map((item, index) => [String(index), item]) : Object.entries(value);
|
|
90
|
+
return [
|
|
91
|
+
nodeId,
|
|
92
|
+
...childEntries.flatMap(
|
|
93
|
+
([childKey, childValue]) => collectExpandableNodeIds(childValue, [...path, childKey])
|
|
94
|
+
)
|
|
95
|
+
];
|
|
96
|
+
}
|
|
97
|
+
function collectInitiallyExpandedNodeIds(value, defaultExpandedDepth, expandAll, depth = 0, path = []) {
|
|
98
|
+
if (!isJsonArray(value) && !isJsonObject(value)) return [];
|
|
99
|
+
const nodeId = getNodeId(path);
|
|
100
|
+
const childEntries = isJsonArray(value) ? value.map((item, index) => [String(index), item]) : Object.entries(value);
|
|
101
|
+
const includeNode = expandAll || depth < defaultExpandedDepth;
|
|
102
|
+
const nested = childEntries.flatMap(
|
|
103
|
+
([childKey, childValue]) => collectInitiallyExpandedNodeIds(childValue, defaultExpandedDepth, expandAll, depth + 1, [
|
|
104
|
+
...path,
|
|
105
|
+
childKey
|
|
106
|
+
])
|
|
107
|
+
);
|
|
108
|
+
return includeNode ? [nodeId, ...nested] : nested;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export { capitalize, collectExpandableNodeIds, collectInitiallyExpandedNodeIds, collectSearchMatches, formatPrimitive, getNodeId, getPathLabel, getPrimitiveRawValue, getSummary, getValueType, isJsonArray, isJsonObject, isJsonValue, normalizeSearch };
|