@neo4j-ndl/react 4.9.2 → 4.9.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.
@@ -61,6 +61,7 @@ const DEFAULT_STYLING = {
61
61
  hasHoverEffects: true,
62
62
  hasZebraStriping: false,
63
63
  headerStyle: HeaderStyleEnum.Filled,
64
+ isCompact: false,
64
65
  };
65
66
  const DataGridComponent = function DataGrid(_a) {
66
67
  var { isResizable = true, isLoading = false, isKeyboardNavigable = true, isAutoResizingColumns = true, tableInstance, components, rootProps, styling = {}, tableNavRef, isSkeletonLoading = false, skeletonProps, ref, portalTarget = document.body, htmlAttributes, className, style } = _a, restProps = __rest(_a, ["isResizable", "isLoading", "isKeyboardNavigable", "isAutoResizingColumns", "tableInstance", "components", "rootProps", "styling", "tableNavRef", "isSkeletonLoading", "skeletonProps", "ref", "portalTarget", "htmlAttributes", "className", "style"]);
@@ -135,6 +136,7 @@ const DataGridComponent = function DataGrid(_a) {
135
136
  Styling.borderStyle === BorderStyleEnum.AllSides,
136
137
  'ndl-data-grid-border-vertical': Styling.borderStyle === BorderStyleEnum.Vertical ||
137
138
  Styling.borderStyle === BorderStyleEnum.AllSides,
139
+ 'ndl-data-grid-compact': Styling.isCompact,
138
140
  'ndl-data-grid-focusable-cells': isKeyboardNavigable,
139
141
  'ndl-data-grid-header-filled': Styling.headerStyle === HeaderStyleEnum.Filled,
140
142
  'ndl-data-grid-hover-effects': Styling.hasHoverEffects,
@@ -1 +1 @@
1
- {"version":3,"file":"DataGrid.js","sourceRoot":"","sources":["../../../src/data-grid/DataGrid.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAwBA,4DAAoC;AACpC,iCAMe;AAGf,oCAA6C;AAE7C,6CAyBsB;AACtB,2DAI6B;AAC7B,mDAA8C;AAC9C,uCAA+C;AAE/C,IAAK,eAKJ;AALD,WAAK,eAAe;IAClB,yCAAsB,CAAA;IACtB,4CAAyB,CAAA;IACzB,wCAA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CAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,MAAM,KAAI,uBAAC,UAAU,CAAC,MAAM,KAAG,EAC3C,CAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,IAAI,KAAI,uBAAC,UAAU,CAAC,IAAI,KAAG,IACpC,GACc,EAErB,CAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,UAAU,KAAI,uBAAC,UAAU,CAAC,UAAU,KAAG,KAChD,GACmB,CAC5B,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,kBAAkB,GAAG;IACzB,YAAY,EAAZ,yBAAY;IACZ,UAAU,EAAV,uBAAU;IACV,IAAI,EAAJ,iBAAI;IACJ,QAAQ,EAAR,qBAAQ;IACR,OAAO,EAAP,oBAAO;IACP,cAAc,EAAd,2BAAc;IACd,YAAY,EAAZ,yBAAY;IACZ,MAAM,EAAN,mBAAM;IACN,UAAU,EAAV,uBAAU;IACV,WAAW,EAAX,wBAAW;IACX,cAAc,EAAd,2BAAc;IACd,kBAAkB,EAAlB,+BAAkB;IAClB,UAAU,EAAV,uBAAU;IACV,UAAU,EAAV,uBAAU;IACV,iBAAiB,EAAjB,8BAAiB;IACjB,+BAA+B,EAA/B,4CAA+B;IAC/B,UAAU,EAAV,uBAAU;IACV,qBAAqB,EAArB,kCAAqB;IACrB,uBAAuB,EAAvB,oCAAuB;IACvB,wBAAwB,EAAxB,qCAAwB;IACxB,WAAW,EAAX,wBAAW;IACX,WAAW,EAAX,wBAAW;IACX,UAAU,EAAV,uBAAU;IACV,YAAY,EAAZ,yBAAY;CACb,CAAC;AAEF,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,iBAAiB,EAAE,kBAAkB,CAAC,CAAC;AAE7D,4BAAQ","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport {\n type RowData,\n type Table as DataGridType,\n} from '@tanstack/react-table';\nimport classNames from 'classnames';\nimport {\n useEffect,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from 'react';\n\nimport { type CommonProps, type HtmlAttributes } from '../_common/types';\nimport { useResizeObserver } from '../hooks';\nimport { type Skeleton } from '../skeleton';\nimport {\n ActionButton,\n ActionCell,\n Body,\n BodyCell,\n BodyRow,\n ColumnControls,\n DropDownCell,\n Header,\n HeaderCell,\n HeaderTitle,\n InlineEditCell,\n LoadingPlaceholder,\n Navigation,\n NoDataIcon,\n NoDataPlaceholder,\n NoDataPlaceholderContentWrapper,\n Pagination,\n PaginationArrowButton,\n PaginationNumericButton,\n PaginationNumericButtons,\n ResizingBar,\n RowsPerPage,\n Scrollable,\n TableResults,\n} from './Components';\nimport {\n type DataGridComponentsInterface,\n DataGridContext,\n type DataGridContextType,\n} from './data-grid-context';\nimport { useTableNav } from './data-grid-nav';\nimport { updateColumnWidths } from './helpers';\n\nenum BorderStyleEnum {\n AllSides = 'all-sides',\n Horizontal = 'horizontal',\n Vertical = 'vertical',\n None = 'none',\n}\n\nexport type BorderStyle = `${BorderStyleEnum}`;\n\nenum HeaderStyleEnum {\n Filled = 'filled',\n Clean = 'clean',\n}\n\nexport type HeaderStyle = `${HeaderStyleEnum}`;\n\nexport type DataGridProps<T extends RowData> = {\n styling?: Partial<{\n /** Alternate the background color of rows */\n hasZebraStriping: boolean;\n /** Type of border that will be used */\n borderStyle: BorderStyle;\n /** If header should have styles or not (Aura example) */\n headerStyle: HeaderStyle;\n /** If background hover effects should be enabled on rows and header cells */\n hasHoverEffects: boolean;\n }>;\n /** Resizing the width of columns */\n isResizable?: boolean;\n /** Enables table's loading state */\n isLoading?: boolean;\n /**\n * Enables keyboard navigation.\n * To control keyboard navigation programmatically\n * for edge cases, pass a `ref` to `tableNavRef`\n */\n isKeyboardNavigable?: boolean;\n /**\n * Enables automatic resizing of columns.\n * If `isResizable` is `true`, the columns will only be automatically resized on initial render of the table.\n * If `isResizable` is `false`, the columns will be resized automatically to always fit the table width (assuming that column maxWidths allow for it).\n * Note: Action columns are a fixed size of 40px, and Pinned columns are not resized automatically.\n * @defaultValue true\n */\n isAutoResizingColumns?: boolean;\n /**\n * Reference to the tableNav instance\n * for programmatic control\n */\n // oxlint-disable-next-line @typescript-eslint/no-explicit-any\n tableNavRef?: React.RefObject<any>;\n /** Table instance created from `useTable`*/\n tableInstance: DataGridType<T>;\n /** Table sub-component overrides */\n components?: DataGridComponentsInterface<T>;\n /** @deprecated Use htmlAttributes, className and style on the root element instead */\n rootProps?: HtmlAttributes<'div'>;\n isSkeletonLoading?: boolean;\n skeletonProps?: React.ComponentProps<typeof Skeleton>;\n /** The target element for portaled elements to be rendered in, e.g. the modal root if the data grid is inside a modal.\n * This is used in for example the DropdownCell, RowsPerPage, and ColumnControls.\n */\n portalTarget?: HTMLElement | null;\n ref?: React.Ref<HTMLDivElement>;\n};\n\nconst DEFAULT_STYLING: Required<DataGridProps<unknown>['styling']> = {\n borderStyle: BorderStyleEnum.Horizontal,\n hasHoverEffects: true,\n hasZebraStriping: false,\n headerStyle: HeaderStyleEnum.Filled,\n};\n\nconst DataGridComponent = function DataGrid<T extends RowData = unknown>({\n isResizable = true,\n isLoading = false,\n isKeyboardNavigable = true,\n isAutoResizingColumns = true,\n tableInstance,\n components,\n rootProps,\n styling = {},\n tableNavRef,\n isSkeletonLoading = false,\n skeletonProps,\n ref,\n portalTarget = document.body,\n htmlAttributes,\n className,\n style,\n ...restProps\n}: CommonProps<'div', DataGridProps<T>>) {\n const { className: rootClassName = '', style: rootStyle = {} } =\n rootProps || {};\n\n const [isScrollable, setIsScrollable] = useState(false);\n const [isMediumNavigation, setIsMediumNavigation] = useState(false);\n const [isSmallNavigation, setIsSmallNavigation] = useState(false);\n const tableRef = useRef<HTMLDivElement>(null);\n const scrollableContainerRef = useRef<HTMLDivElement>(null);\n\n tableInstance.setOptions((prevOptions) => {\n return {\n ...prevOptions,\n enableSorting: isSkeletonLoading ? false : prevOptions.enableSorting,\n };\n });\n\n // Triggers when the whole container is resized\n useResizeObserver({\n onResize: (entry) => {\n if (entry.width === undefined) {\n return;\n }\n isAutoResizingColumns &&\n !isResizable &&\n updateColumnWidths(tableInstance, entry.width); // don't resize columns when the table is resizable due to problems with the resize handler.\n setIsScrollable(tableInstance.getTotalSize() > entry.width);\n setIsMediumNavigation(entry.width <= 680);\n setIsSmallNavigation(entry.width <= 480);\n },\n ref: scrollableContainerRef as React.RefObject<HTMLElement>,\n });\n\n // Triggers when the individual columns are resized\n useResizeObserver({\n onResize: () => {\n if (scrollableContainerRef.current === null) {\n return;\n }\n setIsScrollable(\n tableInstance.getTotalSize() >\n scrollableContainerRef.current.clientWidth,\n );\n },\n ref: tableRef as React.RefObject<HTMLElement>,\n });\n\n const Styling = useMemo(\n () => ({\n ...DEFAULT_STYLING,\n ...styling,\n }),\n [styling],\n );\n\n const Components = useMemo(\n () =>\n ({\n ...DataGridComponents,\n ...components,\n }) as DataGridContextType<T>['components'],\n [components],\n );\n const ScrollableContainer = Components?.Scrollable\n ? Components.Scrollable\n : Scrollable;\n\n const { listeners, tableNav } = useTableNav({\n isDebug: false,\n });\n\n /** Surface the tableNav instance for programmatic control if needed */\n useImperativeHandle(tableNavRef, () => tableNav, [tableNav]);\n\n useEffect(() => {\n if (isAutoResizingColumns && isResizable) {\n updateColumnWidths(\n tableInstance,\n scrollableContainerRef.current?.clientWidth\n ? scrollableContainerRef.current.clientWidth - 1 // -1 to avoid horizontal scrollbar\n : 0,\n );\n }\n }, [isAutoResizingColumns, tableInstance, isResizable]);\n\n return (\n <DataGridContext.Provider\n value={\n {\n components: Components,\n dataGridNav: tableNav,\n hasResizeColumns: isAutoResizingColumns,\n isKeyboardNavigationEnabled: isKeyboardNavigable,\n isLoading: isLoading,\n isMediumNavigation,\n isResizable: isResizable,\n isSkeletonLoading,\n isSmallNavigation,\n portalTarget: portalTarget,\n skeletonProps,\n tableProps: tableInstance,\n } as DataGridContextType<T>\n }\n >\n <div\n // Root props needs to be first in order to override className\n {...rootProps}\n className={classNames('ndl-data-grid-root', rootClassName, className, {\n 'ndl-data-grid-border-horizontal':\n Styling.borderStyle === BorderStyleEnum.Horizontal ||\n Styling.borderStyle === BorderStyleEnum.AllSides,\n 'ndl-data-grid-border-vertical':\n Styling.borderStyle === BorderStyleEnum.Vertical ||\n Styling.borderStyle === BorderStyleEnum.AllSides,\n 'ndl-data-grid-focusable-cells': isKeyboardNavigable,\n 'ndl-data-grid-header-filled':\n Styling.headerStyle === HeaderStyleEnum.Filled,\n 'ndl-data-grid-hover-effects': Styling.hasHoverEffects,\n 'ndl-data-grid-zebra-striping': Styling.hasZebraStriping,\n })}\n ref={ref}\n style={{ ...rootStyle, ...style }}\n {...restProps}\n {...htmlAttributes}\n {...(isKeyboardNavigable ? listeners : {})}\n >\n {/* Make DataGrid horizontally scrollable and avoid horizontal scrollbar have an extra vertical scrollbar (esp. Safari) */}\n {/* This behavior can be overridden by consumers through replacing the scrolling container */}\n <ScrollableContainer\n ref={scrollableContainerRef}\n htmlAttributes={{\n onKeyDown: (e) => {\n if (isScrollable && !isKeyboardNavigable) {\n if (e.key === 'ArrowRight' || e.key === 'ArrowLeft') {\n e.stopPropagation();\n }\n }\n },\n // Ensure that the user can focus and scroll inside the table with arrow keys even if there is no interactive element inside\n tabIndex: isScrollable && !isKeyboardNavigable ? 0 : undefined,\n }}\n >\n {/* Table content Area */}\n <div\n className=\"ndl-div-table\"\n role={isKeyboardNavigable ? 'grid' : 'table'}\n aria-busy={isLoading ? 'true' : 'false'}\n ref={tableRef}\n >\n {/* DataGrid Header Area */}\n {Components?.Header && <Components.Header />}\n {Components?.Body && <Components.Body />}\n </div>\n </ScrollableContainer>\n {/* Bottom Navigation Area */}\n {Components?.Navigation && <Components.Navigation />}\n </div>\n </DataGridContext.Provider>\n );\n};\n\nconst DataGridComponents = {\n ActionButton,\n ActionCell,\n Body,\n BodyCell,\n BodyRow,\n ColumnControls,\n DropDownCell,\n Header,\n HeaderCell,\n HeaderTitle,\n InlineEditCell,\n LoadingPlaceholder,\n Navigation,\n NoDataIcon,\n NoDataPlaceholder,\n NoDataPlaceholderContentWrapper,\n Pagination,\n PaginationArrowButton,\n PaginationNumericButton,\n PaginationNumericButtons,\n ResizingBar,\n RowsPerPage,\n Scrollable,\n TableResults,\n};\n\nconst DataGrid = Object.assign(DataGridComponent, DataGridComponents);\n\nexport { DataGrid };\n"]}
1
+ {"version":3,"file":"DataGrid.js","sourceRoot":"","sources":["../../../src/data-grid/DataGrid.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAwBA,4DAAoC;AACpC,iCAMe;AAGf,oCAA6C;AAE7C,6CAyBsB;AACtB,2DAI6B;AAC7B,mDAA8C;AAC9C,uCAA+C;AAE/C,IAAK,eAKJ;AALD,WAAK,eAAe;IAClB,yCAAsB,CAAA;IACtB,4CAAyB,CAAA;IACzB,wCAAqB,CAAA;IACrB,gCAAa,CAAA;AACf,CAAC,EALI,eAAe,KAAf,eAAe,QAKnB;AAID,IAAK,eAGJ;AAHD,WAAK,eAAe;IAClB,oCAAiB,CAAA;IACjB,kCAAe,CAAA;AACjB,CAAC,EAHI,eAAe,KAAf,eAAe,QAGnB;AAwDD,MAAM,eAAe,GAAgD;IACnE,WAAW,EAAE,eAAe,CAAC,UAAU;IACvC,eAAe,EAAE,IAAI;IACrB,gBAAgB,EAAE,KAAK;IACvB,WAAW,EAAE,eAAe,CAAC,MAAM;IACnC,SAAS,EAAE,KAAK;CACjB,CAAC;AAEF,MAAM,iBAAiB,GAAG,SAAS,QAAQ,C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AG;IACzB,YAAY,EAAZ,yBAAY;IACZ,UAAU,EAAV,uBAAU;IACV,IAAI,EAAJ,iBAAI;IACJ,QAAQ,EAAR,qBAAQ;IACR,OAAO,EAAP,oBAAO;IACP,cAAc,EAAd,2BAAc;IACd,YAAY,EAAZ,yBAAY;IACZ,MAAM,EAAN,mBAAM;IACN,UAAU,EAAV,uBAAU;IACV,WAAW,EAAX,wBAAW;IACX,cAAc,EAAd,2BAAc;IACd,kBAAkB,EAAlB,+BAAkB;IAClB,UAAU,EAAV,uBAAU;IACV,UAAU,EAAV,uBAAU;IACV,iBAAiB,EAAjB,8BAAiB;IACjB,+BAA+B,EAA/B,4CAA+B;IAC/B,UAAU,EAAV,uBAAU;IACV,qBAAqB,EAArB,kCAAqB;IACrB,uBAAuB,EAAvB,oCAAuB;IACvB,wBAAwB,EAAxB,qCAAwB;IACxB,WAAW,EAAX,wBAAW;IACX,WAAW,EAAX,wBAAW;IACX,UAAU,EAAV,uBAAU;IACV,YAAY,EAAZ,yBAAY;CACb,CAAC;AAEF,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,iBAAiB,EAAE,kBAAkB,CAAC,CAAC;AAE7D,4BAAQ","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport {\n type RowData,\n type Table as DataGridType,\n} from '@tanstack/react-table';\nimport classNames from 'classnames';\nimport {\n useEffect,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from 'react';\n\nimport { type CommonProps, type HtmlAttributes } from '../_common/types';\nimport { useResizeObserver } from '../hooks';\nimport { type Skeleton } from '../skeleton';\nimport {\n ActionButton,\n ActionCell,\n Body,\n BodyCell,\n BodyRow,\n ColumnControls,\n DropDownCell,\n Header,\n HeaderCell,\n HeaderTitle,\n InlineEditCell,\n LoadingPlaceholder,\n Navigation,\n NoDataIcon,\n NoDataPlaceholder,\n NoDataPlaceholderContentWrapper,\n Pagination,\n PaginationArrowButton,\n PaginationNumericButton,\n PaginationNumericButtons,\n ResizingBar,\n RowsPerPage,\n Scrollable,\n TableResults,\n} from './Components';\nimport {\n type DataGridComponentsInterface,\n DataGridContext,\n type DataGridContextType,\n} from './data-grid-context';\nimport { useTableNav } from './data-grid-nav';\nimport { updateColumnWidths } from './helpers';\n\nenum BorderStyleEnum {\n AllSides = 'all-sides',\n Horizontal = 'horizontal',\n Vertical = 'vertical',\n None = 'none',\n}\n\nexport type BorderStyle = `${BorderStyleEnum}`;\n\nenum HeaderStyleEnum {\n Filled = 'filled',\n Clean = 'clean',\n}\n\nexport type HeaderStyle = `${HeaderStyleEnum}`;\n\nexport type DataGridProps<T extends RowData> = {\n styling?: Partial<{\n /** Alternate the background color of rows */\n hasZebraStriping: boolean;\n /** Type of border that will be used */\n borderStyle: BorderStyle;\n /** If header should have styles or not (Aura example) */\n headerStyle: HeaderStyle;\n /** If background hover effects should be enabled on rows and header cells */\n hasHoverEffects: boolean;\n /** If table should have less padding */\n isCompact: boolean;\n }>;\n /** Resizing the width of columns */\n isResizable?: boolean;\n /** Enables table's loading state */\n isLoading?: boolean;\n /**\n * Enables keyboard navigation.\n * To control keyboard navigation programmatically\n * for edge cases, pass a `ref` to `tableNavRef`\n */\n isKeyboardNavigable?: boolean;\n /**\n * Enables automatic resizing of columns.\n * If `isResizable` is `true`, the columns will only be automatically resized on initial render of the table.\n * If `isResizable` is `false`, the columns will be resized automatically to always fit the table width (assuming that column maxWidths allow for it).\n * Note: Action columns are a fixed size of 40px, and Pinned columns are not resized automatically.\n * @defaultValue true\n */\n isAutoResizingColumns?: boolean;\n /**\n * Reference to the tableNav instance\n * for programmatic control\n */\n // oxlint-disable-next-line @typescript-eslint/no-explicit-any\n tableNavRef?: React.RefObject<any>;\n /** Table instance created from `useTable`*/\n tableInstance: DataGridType<T>;\n /** Table sub-component overrides */\n components?: DataGridComponentsInterface<T>;\n /** @deprecated Use htmlAttributes, className and style on the root element instead */\n rootProps?: HtmlAttributes<'div'>;\n isSkeletonLoading?: boolean;\n skeletonProps?: React.ComponentProps<typeof Skeleton>;\n /** The target element for portaled elements to be rendered in, e.g. the modal root if the data grid is inside a modal.\n * This is used in for example the DropdownCell, RowsPerPage, and ColumnControls.\n */\n portalTarget?: HTMLElement | null;\n ref?: React.Ref<HTMLDivElement>;\n};\n\nconst DEFAULT_STYLING: Required<DataGridProps<unknown>['styling']> = {\n borderStyle: BorderStyleEnum.Horizontal,\n hasHoverEffects: true,\n hasZebraStriping: false,\n headerStyle: HeaderStyleEnum.Filled,\n isCompact: false,\n};\n\nconst DataGridComponent = function DataGrid<T extends RowData = unknown>({\n isResizable = true,\n isLoading = false,\n isKeyboardNavigable = true,\n isAutoResizingColumns = true,\n tableInstance,\n components,\n rootProps,\n styling = {},\n tableNavRef,\n isSkeletonLoading = false,\n skeletonProps,\n ref,\n portalTarget = document.body,\n htmlAttributes,\n className,\n style,\n ...restProps\n}: CommonProps<'div', DataGridProps<T>>) {\n const { className: rootClassName = '', style: rootStyle = {} } =\n rootProps || {};\n\n const [isScrollable, setIsScrollable] = useState(false);\n const [isMediumNavigation, setIsMediumNavigation] = useState(false);\n const [isSmallNavigation, setIsSmallNavigation] = useState(false);\n const tableRef = useRef<HTMLDivElement>(null);\n const scrollableContainerRef = useRef<HTMLDivElement>(null);\n\n tableInstance.setOptions((prevOptions) => {\n return {\n ...prevOptions,\n enableSorting: isSkeletonLoading ? false : prevOptions.enableSorting,\n };\n });\n\n // Triggers when the whole container is resized\n useResizeObserver({\n onResize: (entry) => {\n if (entry.width === undefined) {\n return;\n }\n isAutoResizingColumns &&\n !isResizable &&\n updateColumnWidths(tableInstance, entry.width); // don't resize columns when the table is resizable due to problems with the resize handler.\n setIsScrollable(tableInstance.getTotalSize() > entry.width);\n setIsMediumNavigation(entry.width <= 680);\n setIsSmallNavigation(entry.width <= 480);\n },\n ref: scrollableContainerRef as React.RefObject<HTMLElement>,\n });\n\n // Triggers when the individual columns are resized\n useResizeObserver({\n onResize: () => {\n if (scrollableContainerRef.current === null) {\n return;\n }\n setIsScrollable(\n tableInstance.getTotalSize() >\n scrollableContainerRef.current.clientWidth,\n );\n },\n ref: tableRef as React.RefObject<HTMLElement>,\n });\n\n const Styling = useMemo(\n () => ({\n ...DEFAULT_STYLING,\n ...styling,\n }),\n [styling],\n );\n\n const Components = useMemo(\n () =>\n ({\n ...DataGridComponents,\n ...components,\n }) as DataGridContextType<T>['components'],\n [components],\n );\n const ScrollableContainer = Components?.Scrollable\n ? Components.Scrollable\n : Scrollable;\n\n const { listeners, tableNav } = useTableNav({\n isDebug: false,\n });\n\n /** Surface the tableNav instance for programmatic control if needed */\n useImperativeHandle(tableNavRef, () => tableNav, [tableNav]);\n\n useEffect(() => {\n if (isAutoResizingColumns && isResizable) {\n updateColumnWidths(\n tableInstance,\n scrollableContainerRef.current?.clientWidth\n ? scrollableContainerRef.current.clientWidth - 1 // -1 to avoid horizontal scrollbar\n : 0,\n );\n }\n }, [isAutoResizingColumns, tableInstance, isResizable]);\n\n return (\n <DataGridContext.Provider\n value={\n {\n components: Components,\n dataGridNav: tableNav,\n hasResizeColumns: isAutoResizingColumns,\n isKeyboardNavigationEnabled: isKeyboardNavigable,\n isLoading: isLoading,\n isMediumNavigation,\n isResizable: isResizable,\n isSkeletonLoading,\n isSmallNavigation,\n portalTarget: portalTarget,\n skeletonProps,\n tableProps: tableInstance,\n } as DataGridContextType<T>\n }\n >\n <div\n // Root props needs to be first in order to override className\n {...rootProps}\n className={classNames('ndl-data-grid-root', rootClassName, className, {\n 'ndl-data-grid-border-horizontal':\n Styling.borderStyle === BorderStyleEnum.Horizontal ||\n Styling.borderStyle === BorderStyleEnum.AllSides,\n 'ndl-data-grid-border-vertical':\n Styling.borderStyle === BorderStyleEnum.Vertical ||\n Styling.borderStyle === BorderStyleEnum.AllSides,\n 'ndl-data-grid-compact': Styling.isCompact,\n 'ndl-data-grid-focusable-cells': isKeyboardNavigable,\n 'ndl-data-grid-header-filled':\n Styling.headerStyle === HeaderStyleEnum.Filled,\n 'ndl-data-grid-hover-effects': Styling.hasHoverEffects,\n 'ndl-data-grid-zebra-striping': Styling.hasZebraStriping,\n })}\n ref={ref}\n style={{ ...rootStyle, ...style }}\n {...restProps}\n {...htmlAttributes}\n {...(isKeyboardNavigable ? listeners : {})}\n >\n {/* Make DataGrid horizontally scrollable and avoid horizontal scrollbar have an extra vertical scrollbar (esp. Safari) */}\n {/* This behavior can be overridden by consumers through replacing the scrolling container */}\n <ScrollableContainer\n ref={scrollableContainerRef}\n htmlAttributes={{\n onKeyDown: (e) => {\n if (isScrollable && !isKeyboardNavigable) {\n if (e.key === 'ArrowRight' || e.key === 'ArrowLeft') {\n e.stopPropagation();\n }\n }\n },\n // Ensure that the user can focus and scroll inside the table with arrow keys even if there is no interactive element inside\n tabIndex: isScrollable && !isKeyboardNavigable ? 0 : undefined,\n }}\n >\n {/* Table content Area */}\n <div\n className=\"ndl-div-table\"\n role={isKeyboardNavigable ? 'grid' : 'table'}\n aria-busy={isLoading ? 'true' : 'false'}\n ref={tableRef}\n >\n {/* DataGrid Header Area */}\n {Components?.Header && <Components.Header />}\n {Components?.Body && <Components.Body />}\n </div>\n </ScrollableContainer>\n {/* Bottom Navigation Area */}\n {Components?.Navigation && <Components.Navigation />}\n </div>\n </DataGridContext.Provider>\n );\n};\n\nconst DataGridComponents = {\n ActionButton,\n ActionCell,\n Body,\n BodyCell,\n BodyRow,\n ColumnControls,\n DropDownCell,\n Header,\n HeaderCell,\n HeaderTitle,\n InlineEditCell,\n LoadingPlaceholder,\n Navigation,\n NoDataIcon,\n NoDataPlaceholder,\n NoDataPlaceholderContentWrapper,\n Pagination,\n PaginationArrowButton,\n PaginationNumericButton,\n PaginationNumericButtons,\n ResizingBar,\n RowsPerPage,\n Scrollable,\n TableResults,\n};\n\nconst DataGrid = Object.assign(DataGridComponent, DataGridComponents);\n\nexport { DataGrid };\n"]}
@@ -0,0 +1,82 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const jsx_runtime_1 = require("react/jsx-runtime");
4
+ /**
5
+ *
6
+ * Copyright (c) "Neo4j"
7
+ * Neo4j Sweden AB [http://neo4j.com]
8
+ *
9
+ * This file is part of Neo4j.
10
+ *
11
+ * Neo4j is free software: you can redistribute it and/or modify
12
+ * it under the terms of the GNU General Public License as published by
13
+ * the Free Software Foundation, either version 3 of the License, or
14
+ * (at your option) any later version.
15
+ *
16
+ * This program is distributed in the hope that it will be useful,
17
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
18
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
+ * GNU General Public License for more details.
20
+ *
21
+ * You should have received a copy of the GNU General Public License
22
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
23
+ */
24
+ require("@neo4j-ndl/base/lib/neo4j-ds-styles.css");
25
+ const react_1 = require("@neo4j-ndl/react");
26
+ const react_table_1 = require("@tanstack/react-table");
27
+ const staticData_1 = require("./staticData");
28
+ const Component = () => {
29
+ const columnHelper = (0, react_table_1.createColumnHelper)();
30
+ const columns = [
31
+ columnHelper.accessor('name', {
32
+ cell: (info) => info.getValue(),
33
+ footer: (info) => info.column.id,
34
+ header: () => 'Name',
35
+ maxSize: 300,
36
+ minSize: 180,
37
+ size: 220,
38
+ }),
39
+ columnHelper.accessor('age', {
40
+ cell: (info) => info.renderValue(),
41
+ footer: (info) => info.column.id,
42
+ header: () => 'Age',
43
+ minSize: 80,
44
+ }),
45
+ columnHelper.accessor('cypherCommand', {
46
+ cell: (info) => info.getValue(),
47
+ footer: (info) => info.column.id,
48
+ header: () => 'Cypher Command',
49
+ minSize: 400,
50
+ size: 400,
51
+ }),
52
+ ];
53
+ const table = (0, react_table_1.useReactTable)({
54
+ columnResizeMode: 'onChange',
55
+ columns,
56
+ data: staticData_1.TABLE_DEMO_DATA,
57
+ debugColumns: true,
58
+ debugHeaders: true,
59
+ debugTable: true,
60
+ defaultColumn: {
61
+ maxSize: 800,
62
+ minSize: 80,
63
+ },
64
+ enableSorting: true,
65
+ getCoreRowModel: (0, react_table_1.getCoreRowModel)(),
66
+ getPaginationRowModel: (0, react_table_1.getPaginationRowModel)(),
67
+ getSortedRowModel: (0, react_table_1.getSortedRowModel)(),
68
+ initialState: {
69
+ pagination: {
70
+ pageSize: 5,
71
+ },
72
+ },
73
+ });
74
+ return ((0, jsx_runtime_1.jsx)("div", { className: "n-w-full n-bg-light-neutral-text-weakest", children: (0, jsx_runtime_1.jsx)(react_1.DataGrid, { isResizable: false, tableInstance: table, isKeyboardNavigable: false, styling: {
75
+ borderStyle: 'all-sides',
76
+ hasHoverEffects: true,
77
+ hasZebraStriping: false,
78
+ isCompact: true,
79
+ } }) }));
80
+ };
81
+ exports.default = Component;
82
+ //# sourceMappingURL=datagrid-compact-mode.story.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"datagrid-compact-mode.story.js","sourceRoot":"","sources":["../../../../src/data-grid/stories/datagrid-compact-mode.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAA4C;AAC5C,uDAM+B;AAE/B,6CAA+C;AAQ/C,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,YAAY,GAAG,IAAA,gCAAkB,GAAkB,CAAC;IAE1D,MAAM,OAAO,GAAG;QACd,YAAY,CAAC,QAAQ,CAAC,MAAM,EAAE;YAC5B,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAA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;gBACV,QAAQ,EAAE,CAAC;aACZ;SACF;KACF,CAAC,CAAC;IAEH,OAAO,CACL,gCAAK,SAAS,EAAC,0CAA0C,YACvD,uBAAC,gBAAQ,IACP,WAAW,EAAE,KAAK,EAClB,aAAa,EAAE,KAAK,EACpB,mBAAmB,EAAE,KAAK,EAC1B,OAAO,EAAE;gBACP,WAAW,EAAE,WAAW;gBACxB,eAAe,EAAE,IAAI;gBACrB,gBAAgB,EAAE,KAAK;gBACvB,SAAS,EAAE,IAAI;aAChB,GACD,GACE,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { DataGrid } from '@neo4j-ndl/react';\nimport {\n createColumnHelper,\n getCoreRowModel,\n getPaginationRowModel,\n getSortedRowModel,\n useReactTable,\n} from '@tanstack/react-table';\n\nimport { TABLE_DEMO_DATA } from './staticData';\n\ntype TestDataFormat = {\n name: string;\n age: number;\n cypherCommand: string;\n};\n\nconst Component = () => {\n const columnHelper = createColumnHelper<TestDataFormat>();\n\n const columns = [\n columnHelper.accessor('name', {\n cell: (info) => info.getValue(),\n footer: (info) => info.column.id,\n header: () => 'Name',\n maxSize: 300,\n minSize: 180,\n size: 220,\n }),\n columnHelper.accessor('age', {\n cell: (info) => info.renderValue(),\n footer: (info) => info.column.id,\n header: () => 'Age',\n minSize: 80,\n }),\n columnHelper.accessor('cypherCommand', {\n cell: (info) => info.getValue(),\n footer: (info) => info.column.id,\n header: () => 'Cypher Command',\n minSize: 400,\n size: 400,\n }),\n ];\n\n const table = useReactTable({\n columnResizeMode: 'onChange',\n columns,\n data: TABLE_DEMO_DATA,\n debugColumns: true,\n debugHeaders: true,\n debugTable: true,\n defaultColumn: {\n maxSize: 800,\n minSize: 80,\n },\n enableSorting: true,\n getCoreRowModel: getCoreRowModel(),\n getPaginationRowModel: getPaginationRowModel(),\n getSortedRowModel: getSortedRowModel(),\n initialState: {\n pagination: {\n pageSize: 5,\n },\n },\n });\n\n return (\n <div className=\"n-w-full n-bg-light-neutral-text-weakest\">\n <DataGrid\n isResizable={false}\n tableInstance={table}\n isKeyboardNavigable={false}\n styling={{\n borderStyle: 'all-sides',\n hasHoverEffects: true,\n hasZebraStriping: false,\n isCompact: true,\n }}\n />\n </div>\n );\n};\n\nexport default Component;\n"]}
@@ -23,7 +23,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
23
23
  return (mod && mod.__esModule) ? mod : { "default": mod };
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.DataGridUsingEditableCellsSource = exports.DataGridSingleSelectableSource = exports.DataGridNoPaginationTableSource = exports.DataGridPinnedColumnsSource = exports.DataGridPercentageWidthColumnsSource = exports.DataGridKeyboardNavigationSource = exports.DataGridComponentOverridingSource = exports.DataGridColumnFilteringSource = exports.DataGridResizableColumnSource = exports.DataGridPlaceholderStatesSource = exports.DataGridSkeletonLoadingSource = exports.DataGridVirtualizationSource = exports.DataGridKitchenSinkSource = exports.DataGridInDialogSource = exports.DataGridSearchableSource = exports.DataGridSelectableSource = exports.DataGridSortableSource = exports.DataGridSimpleSource = exports.DataGridUsingEditableCells = exports.DataGridSingleSelectable = exports.DataGridNoPaginationTable = exports.DataGridPinnedRightSide = exports.DataGridPinnedLeftSide = exports.DataGridPinnedBothSides = exports.DataGridPercentageWidthColumns = exports.DataGridKeyboardNavigation = exports.DataGridComponentOverriding = exports.DataGridResizableColumn = exports.DataGridPlaceholderStates = exports.DataGridSkeletonLoading = exports.DataGridVirtualization = exports.DataGridKitchenSink = exports.DataGridInDialog = exports.DataGridColumnFiltering = exports.DataGridSearchable = exports.DataGridSelectable = exports.DataGridSortable = exports.DataGridSimple = void 0;
26
+ exports.DataGridUsingEditableCellsSource = exports.DataGridSingleSelectableSource = exports.DataGridNoPaginationTableSource = exports.DataGridPinnedColumnsSource = exports.DataGridPercentageWidthColumnsSource = exports.DataGridKeyboardNavigationSource = exports.DataGridComponentOverridingSource = exports.DataGridColumnFilteringSource = exports.DataGridResizableColumnSource = exports.DataGridPlaceholderStatesSource = exports.DataGridSkeletonLoadingSource = exports.DataGridVirtualizationSource = exports.DataGridKitchenSinkSource = exports.DataGridInDialogSource = exports.DataGridSearchableSource = exports.DataGridSelectableSource = exports.DataGridSortableSource = exports.DataGridCompactModeSource = exports.DataGridSimpleSource = exports.DataGridUsingEditableCells = exports.DataGridSingleSelectable = exports.DataGridNoPaginationTable = exports.DataGridPinnedRightSide = exports.DataGridPinnedLeftSide = exports.DataGridPinnedBothSides = exports.DataGridPercentageWidthColumns = exports.DataGridKeyboardNavigation = exports.DataGridComponentOverriding = exports.DataGridResizableColumn = exports.DataGridPlaceholderStates = exports.DataGridSkeletonLoading = exports.DataGridVirtualization = exports.DataGridKitchenSink = exports.DataGridInDialog = exports.DataGridColumnFiltering = exports.DataGridSearchable = exports.DataGridSelectable = exports.DataGridSortable = exports.DataGridSimple = exports.DataGridCompactMode = void 0;
27
+ var datagrid_compact_mode_story_1 = require("./datagrid-compact-mode.story");
28
+ Object.defineProperty(exports, "DataGridCompactMode", { enumerable: true, get: function () { return __importDefault(datagrid_compact_mode_story_1).default; } });
27
29
  var datagrid_simple_story_1 = require("./datagrid-simple.story");
28
30
  Object.defineProperty(exports, "DataGridSimple", { enumerable: true, get: function () { return __importDefault(datagrid_simple_story_1).default; } });
29
31
  var datagrid_sortable_story_1 = require("./datagrid-sortable.story");
@@ -63,6 +65,7 @@ var datagrid_using_editable_cells_story_1 = require("./datagrid-using-editable-c
63
65
  Object.defineProperty(exports, "DataGridUsingEditableCells", { enumerable: true, get: function () { return __importDefault(datagrid_using_editable_cells_story_1).default; } });
64
66
  const export_stories_utils_1 = require("../../_common/export-stories-utils");
65
67
  const datagrid_column_filtering_story_raw_1 = __importDefault(require("./datagrid-column-filtering.story?raw"));
68
+ const datagrid_compact_mode_story_raw_1 = __importDefault(require("./datagrid-compact-mode.story?raw"));
66
69
  const datagrid_component_overriding_story_raw_1 = __importDefault(require("./datagrid-component-overriding.story?raw"));
67
70
  const datagrid_in_dialog_story_raw_1 = __importDefault(require("./datagrid-in-dialog.story?raw"));
68
71
  const datagrid_keyboard_navigation_story_raw_1 = __importDefault(require("./datagrid-keyboard-navigation.story?raw"));
@@ -81,6 +84,7 @@ const datagrid_sortable_story_raw_1 = __importDefault(require("./datagrid-sortab
81
84
  const datagrid_using_editable_cells_story_raw_1 = __importDefault(require("./datagrid-using-editable-cells.story?raw"));
82
85
  const datagrid_virtualization_story_raw_1 = __importDefault(require("./datagrid-virtualization.story?raw"));
83
86
  exports.DataGridSimpleSource = (0, export_stories_utils_1.removeLicenseHeader)(datagrid_simple_story_raw_1.default);
87
+ exports.DataGridCompactModeSource = (0, export_stories_utils_1.removeLicenseHeader)(datagrid_compact_mode_story_raw_1.default);
84
88
  exports.DataGridSortableSource = (0, export_stories_utils_1.removeLicenseHeader)(datagrid_sortable_story_raw_1.default);
85
89
  exports.DataGridSelectableSource = (0, export_stories_utils_1.removeLicenseHeader)(datagrid_selectable_story_raw_1.default);
86
90
  exports.DataGridSearchableSource = (0, export_stories_utils_1.removeLicenseHeader)(datagrid_search_and_filters_stories_raw_1.default);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/data-grid/stories/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;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QAAA,wBAAwB,GAAG,IAAA,0CAAmB,EACzD,uCAA2B,CAC5B,CAAC;AACW,QAAA,wBAAwB,GAAG,IAAA,0CAAmB,EACzD,iDAA2B,CAC5B,CAAC;AACW,QAAA,sBAAsB,GAAG,IAAA,0CAAmB,EACvD,sCAAyB,CAC1B,CAAC;AACW,QAAA,yBAAyB,GAAG,IAAA,0CAAmB,EAC1D,yCAA4B,CAC7B,CAAC;AACW,QAAA,4BAA4B,GAAG,IAAA,0CAAmB,EAC7D,2CAA+B,CAChC,CAAC;AACW,QAAA,6BAA6B,GAAG,IAAA,0CAAmB,EAC9D,6CAAgC,CACjC,CAAC;AACW,QAAA,+BAA+B,GAAG,IAAA,0CAAmB,EAChE,+CAAkC,CACnC,CAAC;AACW,QAAA,6BAA6B,GAAG,IAAA,0CAAmB,EAC9D,6CAAgC,CACjC,CAAC;AACW,QAAA,6BAA6B,GAAG,IAAA,0CAAmB,EAC9D,6CAAgC,CACjC,CAAC;AACW,QAAA,iCAAiC,GAAG,IAAA,0CAAmB,EAClE,iDAAoC,CACrC,CAAC;AACW,QAAA,gCAAgC,GAAG,IAAA,0CAAmB,EACjE,gDAAmC,CACpC,CAAC;AACW,QAAA,oCAAoC,GAAG,IAAA,0CAAmB,EACrE,qDAAuC,CACxC,CAAC;AACW,QAAA,2BAA2B,GAAG,IAAA,0CAAmB,EAC5D,6CAA8B,CAC/B,CAAC;AACW,QAAA,+BAA+B,GAAG,IAAA,0CAAmB,EAChE,gDAA4B,CAC7B,CAAC;AACW,QAAA,8BAA8B,GAAG,IAAA,0CAAmB,EAC/D,8CAAiC,CAClC,CAAC;AACW,QAAA,gCAAgC,GAAG,IAAA,0CAAmB,EACjE,iDAAmC,CACpC,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nexport { default as DataGridSimple } from './datagrid-simple.story';\nexport { default as DataGridSortable } from './datagrid-sortable.story';\nexport { default as DataGridSelectable } from './datagrid-selectable.story';\nexport {\n Searchable as DataGridSearchable,\n ColumnFiltering as DataGridColumnFiltering,\n} from './datagrid-search-and-filters.stories';\nexport { default as DataGridInDialog } from './datagrid-in-dialog.story';\nexport { default as DataGridKitchenSink } from './datagrid-kitchen-sink.story';\nexport { default as DataGridVirtualization } from './datagrid-virtualization.story';\nexport { default as DataGridSkeletonLoading } from './datagrid-skeleton-loading.story';\nexport { default as DataGridPlaceholderStates } from './datagrid-placeholder-states.story';\nexport { default as DataGridResizableColumn } from './datagrid-resizable-column.story';\nexport { default as DataGridComponentOverriding } from './datagrid-component-overriding.story';\nexport { default as DataGridKeyboardNavigation } from './datagrid-keyboard-navigation.story';\nexport { default as DataGridPercentageWidthColumns } from './datagrid-percentage-width-columns.story';\nexport {\n PinnedBothSides as DataGridPinnedBothSides,\n PinnedLeftSide as DataGridPinnedLeftSide,\n PinnedRightSide as DataGridPinnedRightSide,\n} from './datagrid-pinned-columns.stories';\nexport { default as DataGridNoPaginationTable } from './datagrid-no-pagination-table.story';\nexport { default as DataGridSingleSelectable } from './datagrid-single-selectable.story';\nexport { default as DataGridUsingEditableCells } from './datagrid-using-editable-cells.story';\n\nimport { removeLicenseHeader } from '../../_common/export-stories-utils';\nimport DataGridColumnFilteringSourceRaw from './datagrid-column-filtering.story?raw';\nimport DataGridComponentOverridingSourceRaw from './datagrid-component-overriding.story?raw';\nimport DataGridInDialogSourceRaw from './datagrid-in-dialog.story?raw';\nimport DataGridKeyboardNavigationSourceRaw from './datagrid-keyboard-navigation.story?raw';\nimport DataGridKitchenSinkSourceRaw from './datagrid-kitchen-sink.story?raw';\nimport DataGridNoPaginationTableRaw from './datagrid-no-pagination-table.story?raw';\nimport DataGridPercentageWidthColumnsSourceRaw from './datagrid-percentage-width-columns.story?raw';\nimport DataGridPinnedColumnsSourceRaw from './datagrid-pinned-columns.stories?raw';\nimport DataGridPlaceholderStatesSourceRaw from './datagrid-placeholder-states.story?raw';\nimport DataGridResizableColumnSourceRaw from './datagrid-resizable-column.story?raw';\nimport DataGridSearchableSourceRaw from './datagrid-search-and-filters.stories?raw';\nimport DataGridSelectableSourceRaw from './datagrid-selectable.story?raw';\nimport DataGridSimpleSourceRaw from './datagrid-simple.story?raw';\nimport DataGridSingleSelectableSourceRaw from './datagrid-single-selectable.story?raw';\nimport DataGridSkeletonLoadingSourceRaw from './datagrid-skeleton-loading.story?raw';\nimport DataGridSortableSourceRaw from './datagrid-sortable.story?raw';\nimport DataGridUsingEditableCellsSourceRaw from './datagrid-using-editable-cells.story?raw';\nimport DataGridVirtualizationSourceRaw from './datagrid-virtualization.story?raw';\n\nexport const DataGridSimpleSource = removeLicenseHeader(\n DataGridSimpleSourceRaw,\n);\nexport const DataGridSortableSource = removeLicenseHeader(\n DataGridSortableSourceRaw,\n);\nexport const DataGridSelectableSource = removeLicenseHeader(\n DataGridSelectableSourceRaw,\n);\nexport const DataGridSearchableSource = removeLicenseHeader(\n DataGridSearchableSourceRaw,\n);\nexport const DataGridInDialogSource = removeLicenseHeader(\n DataGridInDialogSourceRaw,\n);\nexport const DataGridKitchenSinkSource = removeLicenseHeader(\n DataGridKitchenSinkSourceRaw,\n);\nexport const DataGridVirtualizationSource = removeLicenseHeader(\n DataGridVirtualizationSourceRaw,\n);\nexport const DataGridSkeletonLoadingSource = removeLicenseHeader(\n DataGridSkeletonLoadingSourceRaw,\n);\nexport const DataGridPlaceholderStatesSource = removeLicenseHeader(\n DataGridPlaceholderStatesSourceRaw,\n);\nexport const DataGridResizableColumnSource = removeLicenseHeader(\n DataGridResizableColumnSourceRaw,\n);\nexport const DataGridColumnFilteringSource = removeLicenseHeader(\n DataGridColumnFilteringSourceRaw,\n);\nexport const DataGridComponentOverridingSource = removeLicenseHeader(\n DataGridComponentOverridingSourceRaw,\n);\nexport const DataGridKeyboardNavigationSource = removeLicenseHeader(\n DataGridKeyboardNavigationSourceRaw,\n);\nexport const DataGridPercentageWidthColumnsSource = removeLicenseHeader(\n DataGridPercentageWidthColumnsSourceRaw,\n);\nexport const DataGridPinnedColumnsSource = removeLicenseHeader(\n DataGridPinnedColumnsSourceRaw,\n);\nexport const DataGridNoPaginationTableSource = removeLicenseHeader(\n DataGridNoPaginationTableRaw,\n);\nexport const DataGridSingleSelectableSource = removeLicenseHeader(\n DataGridSingleSelectableSourceRaw,\n);\nexport const DataGridUsingEditableCellsSource = removeLicenseHeader(\n DataGridUsingEditableCellsSourceRaw,\n);\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/data-grid/stories/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;AAEH,6EAA+E;AAAtE,mJAAA,OAAO,OAAuB;AACvC,iEAAoE;AAA3D,wIAAA,OAAO,OAAkB;AAClC,qEAAwE;AAA/D,4IAAA,OAAO,OAAoB;AACpC,yEAA4E;AAAnE,gJAAA,OAAO,OAAsB;AACtC,6FAG+C;AAF7C,yIAAA,UAAU,OAAsB;AAChC,8IAAA,eAAe,OAA2B;AAE5C,uEAAyE;AAAhE,6IAAA,OAAO,OAAoB;AACpC,6EAA+E;AAAtE,mJAAA,OAAO,OAAuB;AACvC,iFAAoF;AAA3E,wJAAA,OAAO,OAA0B;AAC1C,qFAAuF;AAA9E,2JAAA,OAAO,OAA2B;AAC3C,yFAA2F;AAAlF,+JAAA,OAAO,OAA6B;AAC7C,qFAAuF;AAA9E,2JAAA,OAAO,OAA2B;AAC3C,6FAA+F;AAAtF,mKAAA,OAAO,OAA+B;AAC/C,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G,IAAA,0CAAmB,EAChE,+CAAkC,CACnC,CAAC;AACW,QAAA,6BAA6B,GAAG,IAAA,0CAAmB,EAC9D,6CAAgC,CACjC,CAAC;AACW,QAAA,6BAA6B,GAAG,IAAA,0CAAmB,EAC9D,6CAAgC,CACjC,CAAC;AACW,QAAA,iCAAiC,GAAG,IAAA,0CAAmB,EAClE,iDAAoC,CACrC,CAAC;AACW,QAAA,gCAAgC,GAAG,IAAA,0CAAmB,EACjE,gDAAmC,CACpC,CAAC;AACW,QAAA,oCAAoC,GAAG,IAAA,0CAAmB,EACrE,qDAAuC,CACxC,CAAC;AACW,QAAA,2BAA2B,GAAG,IAAA,0CAAmB,EAC5D,6CAA8B,CAC/B,CAAC;AACW,QAAA,+BAA+B,GAAG,IAAA,0CAAmB,EAChE,gDAA4B,CAC7B,CAAC;AACW,QAAA,8BAA8B,GAAG,IAAA,0CAAmB,EAC/D,8CAAiC,CAClC,CAAC;AACW,QAAA,gCAAgC,GAAG,IAAA,0CAAmB,EACjE,iDAAmC,CACpC,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nexport { default as DataGridCompactMode } from './datagrid-compact-mode.story';\nexport { default as DataGridSimple } from './datagrid-simple.story';\nexport { default as DataGridSortable } from './datagrid-sortable.story';\nexport { default as DataGridSelectable } from './datagrid-selectable.story';\nexport {\n Searchable as DataGridSearchable,\n ColumnFiltering as DataGridColumnFiltering,\n} from './datagrid-search-and-filters.stories';\nexport { default as DataGridInDialog } from './datagrid-in-dialog.story';\nexport { default as DataGridKitchenSink } from './datagrid-kitchen-sink.story';\nexport { default as DataGridVirtualization } from './datagrid-virtualization.story';\nexport { default as DataGridSkeletonLoading } from './datagrid-skeleton-loading.story';\nexport { default as DataGridPlaceholderStates } from './datagrid-placeholder-states.story';\nexport { default as DataGridResizableColumn } from './datagrid-resizable-column.story';\nexport { default as DataGridComponentOverriding } from './datagrid-component-overriding.story';\nexport { default as DataGridKeyboardNavigation } from './datagrid-keyboard-navigation.story';\nexport { default as DataGridPercentageWidthColumns } from './datagrid-percentage-width-columns.story';\nexport {\n PinnedBothSides as DataGridPinnedBothSides,\n PinnedLeftSide as DataGridPinnedLeftSide,\n PinnedRightSide as DataGridPinnedRightSide,\n} from './datagrid-pinned-columns.stories';\nexport { default as DataGridNoPaginationTable } from './datagrid-no-pagination-table.story';\nexport { default as DataGridSingleSelectable } from './datagrid-single-selectable.story';\nexport { default as DataGridUsingEditableCells } from './datagrid-using-editable-cells.story';\n\nimport { removeLicenseHeader } from '../../_common/export-stories-utils';\nimport DataGridColumnFilteringSourceRaw from './datagrid-column-filtering.story?raw';\nimport DataGridCompactModeSourceRaw from './datagrid-compact-mode.story?raw';\nimport DataGridComponentOverridingSourceRaw from './datagrid-component-overriding.story?raw';\nimport DataGridInDialogSourceRaw from './datagrid-in-dialog.story?raw';\nimport DataGridKeyboardNavigationSourceRaw from './datagrid-keyboard-navigation.story?raw';\nimport DataGridKitchenSinkSourceRaw from './datagrid-kitchen-sink.story?raw';\nimport DataGridNoPaginationTableRaw from './datagrid-no-pagination-table.story?raw';\nimport DataGridPercentageWidthColumnsSourceRaw from './datagrid-percentage-width-columns.story?raw';\nimport DataGridPinnedColumnsSourceRaw from './datagrid-pinned-columns.stories?raw';\nimport DataGridPlaceholderStatesSourceRaw from './datagrid-placeholder-states.story?raw';\nimport DataGridResizableColumnSourceRaw from './datagrid-resizable-column.story?raw';\nimport DataGridSearchableSourceRaw from './datagrid-search-and-filters.stories?raw';\nimport DataGridSelectableSourceRaw from './datagrid-selectable.story?raw';\nimport DataGridSimpleSourceRaw from './datagrid-simple.story?raw';\nimport DataGridSingleSelectableSourceRaw from './datagrid-single-selectable.story?raw';\nimport DataGridSkeletonLoadingSourceRaw from './datagrid-skeleton-loading.story?raw';\nimport DataGridSortableSourceRaw from './datagrid-sortable.story?raw';\nimport DataGridUsingEditableCellsSourceRaw from './datagrid-using-editable-cells.story?raw';\nimport DataGridVirtualizationSourceRaw from './datagrid-virtualization.story?raw';\n\nexport const DataGridSimpleSource = removeLicenseHeader(\n DataGridSimpleSourceRaw,\n);\nexport const DataGridCompactModeSource = removeLicenseHeader(\n DataGridCompactModeSourceRaw,\n);\nexport const DataGridSortableSource = removeLicenseHeader(\n DataGridSortableSourceRaw,\n);\nexport const DataGridSelectableSource = removeLicenseHeader(\n DataGridSelectableSourceRaw,\n);\nexport const DataGridSearchableSource = removeLicenseHeader(\n DataGridSearchableSourceRaw,\n);\nexport const DataGridInDialogSource = removeLicenseHeader(\n DataGridInDialogSourceRaw,\n);\nexport const DataGridKitchenSinkSource = removeLicenseHeader(\n DataGridKitchenSinkSourceRaw,\n);\nexport const DataGridVirtualizationSource = removeLicenseHeader(\n DataGridVirtualizationSourceRaw,\n);\nexport const DataGridSkeletonLoadingSource = removeLicenseHeader(\n DataGridSkeletonLoadingSourceRaw,\n);\nexport const DataGridPlaceholderStatesSource = removeLicenseHeader(\n DataGridPlaceholderStatesSourceRaw,\n);\nexport const DataGridResizableColumnSource = removeLicenseHeader(\n DataGridResizableColumnSourceRaw,\n);\nexport const DataGridColumnFilteringSource = removeLicenseHeader(\n DataGridColumnFilteringSourceRaw,\n);\nexport const DataGridComponentOverridingSource = removeLicenseHeader(\n DataGridComponentOverridingSourceRaw,\n);\nexport const DataGridKeyboardNavigationSource = removeLicenseHeader(\n DataGridKeyboardNavigationSourceRaw,\n);\nexport const DataGridPercentageWidthColumnsSource = removeLicenseHeader(\n DataGridPercentageWidthColumnsSourceRaw,\n);\nexport const DataGridPinnedColumnsSource = removeLicenseHeader(\n DataGridPinnedColumnsSourceRaw,\n);\nexport const DataGridNoPaginationTableSource = removeLicenseHeader(\n DataGridNoPaginationTableRaw,\n);\nexport const DataGridSingleSelectableSource = removeLicenseHeader(\n DataGridSingleSelectableSourceRaw,\n);\nexport const DataGridUsingEditableCellsSource = removeLicenseHeader(\n DataGridUsingEditableCellsSourceRaw,\n);\n"]}
@@ -55,6 +55,7 @@ const DEFAULT_STYLING = {
55
55
  hasHoverEffects: true,
56
56
  hasZebraStriping: false,
57
57
  headerStyle: HeaderStyleEnum.Filled,
58
+ isCompact: false,
58
59
  };
59
60
  const DataGridComponent = function DataGrid(_a) {
60
61
  var { isResizable = true, isLoading = false, isKeyboardNavigable = true, isAutoResizingColumns = true, tableInstance, components, rootProps, styling = {}, tableNavRef, isSkeletonLoading = false, skeletonProps, ref, portalTarget = document.body, htmlAttributes, className, style } = _a, restProps = __rest(_a, ["isResizable", "isLoading", "isKeyboardNavigable", "isAutoResizingColumns", "tableInstance", "components", "rootProps", "styling", "tableNavRef", "isSkeletonLoading", "skeletonProps", "ref", "portalTarget", "htmlAttributes", "className", "style"]);
@@ -129,6 +130,7 @@ const DataGridComponent = function DataGrid(_a) {
129
130
  Styling.borderStyle === BorderStyleEnum.AllSides,
130
131
  'ndl-data-grid-border-vertical': Styling.borderStyle === BorderStyleEnum.Vertical ||
131
132
  Styling.borderStyle === BorderStyleEnum.AllSides,
133
+ 'ndl-data-grid-compact': Styling.isCompact,
132
134
  'ndl-data-grid-focusable-cells': isKeyboardNavigable,
133
135
  'ndl-data-grid-header-filled': Styling.headerStyle === HeaderStyleEnum.Filled,
134
136
  'ndl-data-grid-hover-effects': Styling.hasHoverEffects,
@@ -1 +1 @@
1
- {"version":3,"file":"DataGrid.js","sourceRoot":"","sources":["../../../src/data-grid/DataGrid.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAwBA,OAAO,UAAU,MAAM,YA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AW;IACX,UAAU;IACV,YAAY;CACb,CAAC;AAEF,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,iBAAiB,EAAE,kBAAkB,CAAC,CAAC;AAEtE,OAAO,EAAE,QAAQ,EAAE,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport {\n type RowData,\n type Table as DataGridType,\n} from '@tanstack/react-table';\nimport classNames from 'classnames';\nimport {\n useEffect,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from 'react';\n\nimport { type CommonProps, type HtmlAttributes } from '../_common/types';\nimport { useResizeObserver } from '../hooks';\nimport { type Skeleton } from '../skeleton';\nimport {\n ActionButton,\n ActionCell,\n Body,\n BodyCell,\n BodyRow,\n ColumnControls,\n DropDownCell,\n Header,\n HeaderCell,\n HeaderTitle,\n InlineEditCell,\n LoadingPlaceholder,\n Navigation,\n NoDataIcon,\n NoDataPlaceholder,\n NoDataPlaceholderContentWrapper,\n Pagination,\n PaginationArrowButton,\n PaginationNumericButton,\n PaginationNumericButtons,\n ResizingBar,\n RowsPerPage,\n Scrollable,\n TableResults,\n} from './Components';\nimport {\n type DataGridComponentsInterface,\n DataGridContext,\n type DataGridContextType,\n} from './data-grid-context';\nimport { useTableNav } from './data-grid-nav';\nimport { updateColumnWidths } from './helpers';\n\nenum BorderStyleEnum {\n AllSides = 'all-sides',\n Horizontal = 'horizontal',\n Vertical = 'vertical',\n None = 'none',\n}\n\nexport type BorderStyle = `${BorderStyleEnum}`;\n\nenum HeaderStyleEnum {\n Filled = 'filled',\n Clean = 'clean',\n}\n\nexport type HeaderStyle = `${HeaderStyleEnum}`;\n\nexport type DataGridProps<T extends RowData> = {\n styling?: Partial<{\n /** Alternate the background color of rows */\n hasZebraStriping: boolean;\n /** Type of border that will be used */\n borderStyle: BorderStyle;\n /** If header should have styles or not (Aura example) */\n headerStyle: HeaderStyle;\n /** If background hover effects should be enabled on rows and header cells */\n hasHoverEffects: boolean;\n }>;\n /** Resizing the width of columns */\n isResizable?: boolean;\n /** Enables table's loading state */\n isLoading?: boolean;\n /**\n * Enables keyboard navigation.\n * To control keyboard navigation programmatically\n * for edge cases, pass a `ref` to `tableNavRef`\n */\n isKeyboardNavigable?: boolean;\n /**\n * Enables automatic resizing of columns.\n * If `isResizable` is `true`, the columns will only be automatically resized on initial render of the table.\n * If `isResizable` is `false`, the columns will be resized automatically to always fit the table width (assuming that column maxWidths allow for it).\n * Note: Action columns are a fixed size of 40px, and Pinned columns are not resized automatically.\n * @defaultValue true\n */\n isAutoResizingColumns?: boolean;\n /**\n * Reference to the tableNav instance\n * for programmatic control\n */\n // oxlint-disable-next-line @typescript-eslint/no-explicit-any\n tableNavRef?: React.RefObject<any>;\n /** Table instance created from `useTable`*/\n tableInstance: DataGridType<T>;\n /** Table sub-component overrides */\n components?: DataGridComponentsInterface<T>;\n /** @deprecated Use htmlAttributes, className and style on the root element instead */\n rootProps?: HtmlAttributes<'div'>;\n isSkeletonLoading?: boolean;\n skeletonProps?: React.ComponentProps<typeof Skeleton>;\n /** The target element for portaled elements to be rendered in, e.g. the modal root if the data grid is inside a modal.\n * This is used in for example the DropdownCell, RowsPerPage, and ColumnControls.\n */\n portalTarget?: HTMLElement | null;\n ref?: React.Ref<HTMLDivElement>;\n};\n\nconst DEFAULT_STYLING: Required<DataGridProps<unknown>['styling']> = {\n borderStyle: BorderStyleEnum.Horizontal,\n hasHoverEffects: true,\n hasZebraStriping: false,\n headerStyle: HeaderStyleEnum.Filled,\n};\n\nconst DataGridComponent = function DataGrid<T extends RowData = unknown>({\n isResizable = true,\n isLoading = false,\n isKeyboardNavigable = true,\n isAutoResizingColumns = true,\n tableInstance,\n components,\n rootProps,\n styling = {},\n tableNavRef,\n isSkeletonLoading = false,\n skeletonProps,\n ref,\n portalTarget = document.body,\n htmlAttributes,\n className,\n style,\n ...restProps\n}: CommonProps<'div', DataGridProps<T>>) {\n const { className: rootClassName = '', style: rootStyle = {} } =\n rootProps || {};\n\n const [isScrollable, setIsScrollable] = useState(false);\n const [isMediumNavigation, setIsMediumNavigation] = useState(false);\n const [isSmallNavigation, setIsSmallNavigation] = useState(false);\n const tableRef = useRef<HTMLDivElement>(null);\n const scrollableContainerRef = useRef<HTMLDivElement>(null);\n\n tableInstance.setOptions((prevOptions) => {\n return {\n ...prevOptions,\n enableSorting: isSkeletonLoading ? false : prevOptions.enableSorting,\n };\n });\n\n // Triggers when the whole container is resized\n useResizeObserver({\n onResize: (entry) => {\n if (entry.width === undefined) {\n return;\n }\n isAutoResizingColumns &&\n !isResizable &&\n updateColumnWidths(tableInstance, entry.width); // don't resize columns when the table is resizable due to problems with the resize handler.\n setIsScrollable(tableInstance.getTotalSize() > entry.width);\n setIsMediumNavigation(entry.width <= 680);\n setIsSmallNavigation(entry.width <= 480);\n },\n ref: scrollableContainerRef as React.RefObject<HTMLElement>,\n });\n\n // Triggers when the individual columns are resized\n useResizeObserver({\n onResize: () => {\n if (scrollableContainerRef.current === null) {\n return;\n }\n setIsScrollable(\n tableInstance.getTotalSize() >\n scrollableContainerRef.current.clientWidth,\n );\n },\n ref: tableRef as React.RefObject<HTMLElement>,\n });\n\n const Styling = useMemo(\n () => ({\n ...DEFAULT_STYLING,\n ...styling,\n }),\n [styling],\n );\n\n const Components = useMemo(\n () =>\n ({\n ...DataGridComponents,\n ...components,\n }) as DataGridContextType<T>['components'],\n [components],\n );\n const ScrollableContainer = Components?.Scrollable\n ? Components.Scrollable\n : Scrollable;\n\n const { listeners, tableNav } = useTableNav({\n isDebug: false,\n });\n\n /** Surface the tableNav instance for programmatic control if needed */\n useImperativeHandle(tableNavRef, () => tableNav, [tableNav]);\n\n useEffect(() => {\n if (isAutoResizingColumns && isResizable) {\n updateColumnWidths(\n tableInstance,\n scrollableContainerRef.current?.clientWidth\n ? scrollableContainerRef.current.clientWidth - 1 // -1 to avoid horizontal scrollbar\n : 0,\n );\n }\n }, [isAutoResizingColumns, tableInstance, isResizable]);\n\n return (\n <DataGridContext.Provider\n value={\n {\n components: Components,\n dataGridNav: tableNav,\n hasResizeColumns: isAutoResizingColumns,\n isKeyboardNavigationEnabled: isKeyboardNavigable,\n isLoading: isLoading,\n isMediumNavigation,\n isResizable: isResizable,\n isSkeletonLoading,\n isSmallNavigation,\n portalTarget: portalTarget,\n skeletonProps,\n tableProps: tableInstance,\n } as DataGridContextType<T>\n }\n >\n <div\n // Root props needs to be first in order to override className\n {...rootProps}\n className={classNames('ndl-data-grid-root', rootClassName, className, {\n 'ndl-data-grid-border-horizontal':\n Styling.borderStyle === BorderStyleEnum.Horizontal ||\n Styling.borderStyle === BorderStyleEnum.AllSides,\n 'ndl-data-grid-border-vertical':\n Styling.borderStyle === BorderStyleEnum.Vertical ||\n Styling.borderStyle === BorderStyleEnum.AllSides,\n 'ndl-data-grid-focusable-cells': isKeyboardNavigable,\n 'ndl-data-grid-header-filled':\n Styling.headerStyle === HeaderStyleEnum.Filled,\n 'ndl-data-grid-hover-effects': Styling.hasHoverEffects,\n 'ndl-data-grid-zebra-striping': Styling.hasZebraStriping,\n })}\n ref={ref}\n style={{ ...rootStyle, ...style }}\n {...restProps}\n {...htmlAttributes}\n {...(isKeyboardNavigable ? listeners : {})}\n >\n {/* Make DataGrid horizontally scrollable and avoid horizontal scrollbar have an extra vertical scrollbar (esp. Safari) */}\n {/* This behavior can be overridden by consumers through replacing the scrolling container */}\n <ScrollableContainer\n ref={scrollableContainerRef}\n htmlAttributes={{\n onKeyDown: (e) => {\n if (isScrollable && !isKeyboardNavigable) {\n if (e.key === 'ArrowRight' || e.key === 'ArrowLeft') {\n e.stopPropagation();\n }\n }\n },\n // Ensure that the user can focus and scroll inside the table with arrow keys even if there is no interactive element inside\n tabIndex: isScrollable && !isKeyboardNavigable ? 0 : undefined,\n }}\n >\n {/* Table content Area */}\n <div\n className=\"ndl-div-table\"\n role={isKeyboardNavigable ? 'grid' : 'table'}\n aria-busy={isLoading ? 'true' : 'false'}\n ref={tableRef}\n >\n {/* DataGrid Header Area */}\n {Components?.Header && <Components.Header />}\n {Components?.Body && <Components.Body />}\n </div>\n </ScrollableContainer>\n {/* Bottom Navigation Area */}\n {Components?.Navigation && <Components.Navigation />}\n </div>\n </DataGridContext.Provider>\n );\n};\n\nconst DataGridComponents = {\n ActionButton,\n ActionCell,\n Body,\n BodyCell,\n BodyRow,\n ColumnControls,\n DropDownCell,\n Header,\n HeaderCell,\n HeaderTitle,\n InlineEditCell,\n LoadingPlaceholder,\n Navigation,\n NoDataIcon,\n NoDataPlaceholder,\n NoDataPlaceholderContentWrapper,\n Pagination,\n PaginationArrowButton,\n PaginationNumericButton,\n PaginationNumericButtons,\n ResizingBar,\n RowsPerPage,\n Scrollable,\n TableResults,\n};\n\nconst DataGrid = Object.assign(DataGridComponent, DataGridComponents);\n\nexport { DataGrid };\n"]}
1
+ {"version":3,"file":"DataGrid.js","sourceRoot":"","sources":["../../../src/data-grid/DataGrid.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAwBA,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EACL,SAAS,EACT,mBAAmB,EACnB,OAAO,EACP,MAAM,EACN,QAAQ,GACT,MAAM,OAAO,CAAC;AAGf,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,OAAO,EACL,YAAY,EACZ,UAAU,EACV,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,cAAc,EACd,YAAY,EACZ,MAAM,EACN,UAAU,EACV,WAAW,EACX,cAA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com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport {\n type RowData,\n type Table as DataGridType,\n} from '@tanstack/react-table';\nimport classNames from 'classnames';\nimport {\n useEffect,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from 'react';\n\nimport { type CommonProps, type HtmlAttributes } from '../_common/types';\nimport { useResizeObserver } from '../hooks';\nimport { type Skeleton } from '../skeleton';\nimport {\n ActionButton,\n ActionCell,\n Body,\n BodyCell,\n BodyRow,\n ColumnControls,\n DropDownCell,\n Header,\n HeaderCell,\n HeaderTitle,\n InlineEditCell,\n LoadingPlaceholder,\n Navigation,\n NoDataIcon,\n NoDataPlaceholder,\n NoDataPlaceholderContentWrapper,\n Pagination,\n PaginationArrowButton,\n PaginationNumericButton,\n PaginationNumericButtons,\n ResizingBar,\n RowsPerPage,\n Scrollable,\n TableResults,\n} from './Components';\nimport {\n type DataGridComponentsInterface,\n DataGridContext,\n type DataGridContextType,\n} from './data-grid-context';\nimport { useTableNav } from './data-grid-nav';\nimport { updateColumnWidths } from './helpers';\n\nenum BorderStyleEnum {\n AllSides = 'all-sides',\n Horizontal = 'horizontal',\n Vertical = 'vertical',\n None = 'none',\n}\n\nexport type BorderStyle = `${BorderStyleEnum}`;\n\nenum HeaderStyleEnum {\n Filled = 'filled',\n Clean = 'clean',\n}\n\nexport type HeaderStyle = `${HeaderStyleEnum}`;\n\nexport type DataGridProps<T extends RowData> = {\n styling?: Partial<{\n /** Alternate the background color of rows */\n hasZebraStriping: boolean;\n /** Type of border that will be used */\n borderStyle: BorderStyle;\n /** If header should have styles or not (Aura example) */\n headerStyle: HeaderStyle;\n /** If background hover effects should be enabled on rows and header cells */\n hasHoverEffects: boolean;\n /** If table should have less padding */\n isCompact: boolean;\n }>;\n /** Resizing the width of columns */\n isResizable?: boolean;\n /** Enables table's loading state */\n isLoading?: boolean;\n /**\n * Enables keyboard navigation.\n * To control keyboard navigation programmatically\n * for edge cases, pass a `ref` to `tableNavRef`\n */\n isKeyboardNavigable?: boolean;\n /**\n * Enables automatic resizing of columns.\n * If `isResizable` is `true`, the columns will only be automatically resized on initial render of the table.\n * If `isResizable` is `false`, the columns will be resized automatically to always fit the table width (assuming that column maxWidths allow for it).\n * Note: Action columns are a fixed size of 40px, and Pinned columns are not resized automatically.\n * @defaultValue true\n */\n isAutoResizingColumns?: boolean;\n /**\n * Reference to the tableNav instance\n * for programmatic control\n */\n // oxlint-disable-next-line @typescript-eslint/no-explicit-any\n tableNavRef?: React.RefObject<any>;\n /** Table instance created from `useTable`*/\n tableInstance: DataGridType<T>;\n /** Table sub-component overrides */\n components?: DataGridComponentsInterface<T>;\n /** @deprecated Use htmlAttributes, className and style on the root element instead */\n rootProps?: HtmlAttributes<'div'>;\n isSkeletonLoading?: boolean;\n skeletonProps?: React.ComponentProps<typeof Skeleton>;\n /** The target element for portaled elements to be rendered in, e.g. the modal root if the data grid is inside a modal.\n * This is used in for example the DropdownCell, RowsPerPage, and ColumnControls.\n */\n portalTarget?: HTMLElement | null;\n ref?: React.Ref<HTMLDivElement>;\n};\n\nconst DEFAULT_STYLING: Required<DataGridProps<unknown>['styling']> = {\n borderStyle: BorderStyleEnum.Horizontal,\n hasHoverEffects: true,\n hasZebraStriping: false,\n headerStyle: HeaderStyleEnum.Filled,\n isCompact: false,\n};\n\nconst DataGridComponent = function DataGrid<T extends RowData = unknown>({\n isResizable = true,\n isLoading = false,\n isKeyboardNavigable = true,\n isAutoResizingColumns = true,\n tableInstance,\n components,\n rootProps,\n styling = {},\n tableNavRef,\n isSkeletonLoading = false,\n skeletonProps,\n ref,\n portalTarget = document.body,\n htmlAttributes,\n className,\n style,\n ...restProps\n}: CommonProps<'div', DataGridProps<T>>) {\n const { className: rootClassName = '', style: rootStyle = {} } =\n rootProps || {};\n\n const [isScrollable, setIsScrollable] = useState(false);\n const [isMediumNavigation, setIsMediumNavigation] = useState(false);\n const [isSmallNavigation, setIsSmallNavigation] = useState(false);\n const tableRef = useRef<HTMLDivElement>(null);\n const scrollableContainerRef = useRef<HTMLDivElement>(null);\n\n tableInstance.setOptions((prevOptions) => {\n return {\n ...prevOptions,\n enableSorting: isSkeletonLoading ? false : prevOptions.enableSorting,\n };\n });\n\n // Triggers when the whole container is resized\n useResizeObserver({\n onResize: (entry) => {\n if (entry.width === undefined) {\n return;\n }\n isAutoResizingColumns &&\n !isResizable &&\n updateColumnWidths(tableInstance, entry.width); // don't resize columns when the table is resizable due to problems with the resize handler.\n setIsScrollable(tableInstance.getTotalSize() > entry.width);\n setIsMediumNavigation(entry.width <= 680);\n setIsSmallNavigation(entry.width <= 480);\n },\n ref: scrollableContainerRef as React.RefObject<HTMLElement>,\n });\n\n // Triggers when the individual columns are resized\n useResizeObserver({\n onResize: () => {\n if (scrollableContainerRef.current === null) {\n return;\n }\n setIsScrollable(\n tableInstance.getTotalSize() >\n scrollableContainerRef.current.clientWidth,\n );\n },\n ref: tableRef as React.RefObject<HTMLElement>,\n });\n\n const Styling = useMemo(\n () => ({\n ...DEFAULT_STYLING,\n ...styling,\n }),\n [styling],\n );\n\n const Components = useMemo(\n () =>\n ({\n ...DataGridComponents,\n ...components,\n }) as DataGridContextType<T>['components'],\n [components],\n );\n const ScrollableContainer = Components?.Scrollable\n ? Components.Scrollable\n : Scrollable;\n\n const { listeners, tableNav } = useTableNav({\n isDebug: false,\n });\n\n /** Surface the tableNav instance for programmatic control if needed */\n useImperativeHandle(tableNavRef, () => tableNav, [tableNav]);\n\n useEffect(() => {\n if (isAutoResizingColumns && isResizable) {\n updateColumnWidths(\n tableInstance,\n scrollableContainerRef.current?.clientWidth\n ? scrollableContainerRef.current.clientWidth - 1 // -1 to avoid horizontal scrollbar\n : 0,\n );\n }\n }, [isAutoResizingColumns, tableInstance, isResizable]);\n\n return (\n <DataGridContext.Provider\n value={\n {\n components: Components,\n dataGridNav: tableNav,\n hasResizeColumns: isAutoResizingColumns,\n isKeyboardNavigationEnabled: isKeyboardNavigable,\n isLoading: isLoading,\n isMediumNavigation,\n isResizable: isResizable,\n isSkeletonLoading,\n isSmallNavigation,\n portalTarget: portalTarget,\n skeletonProps,\n tableProps: tableInstance,\n } as DataGridContextType<T>\n }\n >\n <div\n // Root props needs to be first in order to override className\n {...rootProps}\n className={classNames('ndl-data-grid-root', rootClassName, className, {\n 'ndl-data-grid-border-horizontal':\n Styling.borderStyle === BorderStyleEnum.Horizontal ||\n Styling.borderStyle === BorderStyleEnum.AllSides,\n 'ndl-data-grid-border-vertical':\n Styling.borderStyle === BorderStyleEnum.Vertical ||\n Styling.borderStyle === BorderStyleEnum.AllSides,\n 'ndl-data-grid-compact': Styling.isCompact,\n 'ndl-data-grid-focusable-cells': isKeyboardNavigable,\n 'ndl-data-grid-header-filled':\n Styling.headerStyle === HeaderStyleEnum.Filled,\n 'ndl-data-grid-hover-effects': Styling.hasHoverEffects,\n 'ndl-data-grid-zebra-striping': Styling.hasZebraStriping,\n })}\n ref={ref}\n style={{ ...rootStyle, ...style }}\n {...restProps}\n {...htmlAttributes}\n {...(isKeyboardNavigable ? listeners : {})}\n >\n {/* Make DataGrid horizontally scrollable and avoid horizontal scrollbar have an extra vertical scrollbar (esp. Safari) */}\n {/* This behavior can be overridden by consumers through replacing the scrolling container */}\n <ScrollableContainer\n ref={scrollableContainerRef}\n htmlAttributes={{\n onKeyDown: (e) => {\n if (isScrollable && !isKeyboardNavigable) {\n if (e.key === 'ArrowRight' || e.key === 'ArrowLeft') {\n e.stopPropagation();\n }\n }\n },\n // Ensure that the user can focus and scroll inside the table with arrow keys even if there is no interactive element inside\n tabIndex: isScrollable && !isKeyboardNavigable ? 0 : undefined,\n }}\n >\n {/* Table content Area */}\n <div\n className=\"ndl-div-table\"\n role={isKeyboardNavigable ? 'grid' : 'table'}\n aria-busy={isLoading ? 'true' : 'false'}\n ref={tableRef}\n >\n {/* DataGrid Header Area */}\n {Components?.Header && <Components.Header />}\n {Components?.Body && <Components.Body />}\n </div>\n </ScrollableContainer>\n {/* Bottom Navigation Area */}\n {Components?.Navigation && <Components.Navigation />}\n </div>\n </DataGridContext.Provider>\n );\n};\n\nconst DataGridComponents = {\n ActionButton,\n ActionCell,\n Body,\n BodyCell,\n BodyRow,\n ColumnControls,\n DropDownCell,\n Header,\n HeaderCell,\n HeaderTitle,\n InlineEditCell,\n LoadingPlaceholder,\n Navigation,\n NoDataIcon,\n NoDataPlaceholder,\n NoDataPlaceholderContentWrapper,\n Pagination,\n PaginationArrowButton,\n PaginationNumericButton,\n PaginationNumericButtons,\n ResizingBar,\n RowsPerPage,\n Scrollable,\n TableResults,\n};\n\nconst DataGrid = Object.assign(DataGridComponent, DataGridComponents);\n\nexport { DataGrid };\n"]}
@@ -0,0 +1,80 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /**
3
+ *
4
+ * Copyright (c) "Neo4j"
5
+ * Neo4j Sweden AB [http://neo4j.com]
6
+ *
7
+ * This file is part of Neo4j.
8
+ *
9
+ * Neo4j is free software: you can redistribute it and/or modify
10
+ * it under the terms of the GNU General Public License as published by
11
+ * the Free Software Foundation, either version 3 of the License, or
12
+ * (at your option) any later version.
13
+ *
14
+ * This program is distributed in the hope that it will be useful,
15
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
+ * GNU General Public License for more details.
18
+ *
19
+ * You should have received a copy of the GNU General Public License
20
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
21
+ */
22
+ import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
23
+ import { DataGrid } from '@neo4j-ndl/react';
24
+ import { createColumnHelper, getCoreRowModel, getPaginationRowModel, getSortedRowModel, useReactTable, } from '@tanstack/react-table';
25
+ import { TABLE_DEMO_DATA } from './staticData';
26
+ const Component = () => {
27
+ const columnHelper = createColumnHelper();
28
+ const columns = [
29
+ columnHelper.accessor('name', {
30
+ cell: (info) => info.getValue(),
31
+ footer: (info) => info.column.id,
32
+ header: () => 'Name',
33
+ maxSize: 300,
34
+ minSize: 180,
35
+ size: 220,
36
+ }),
37
+ columnHelper.accessor('age', {
38
+ cell: (info) => info.renderValue(),
39
+ footer: (info) => info.column.id,
40
+ header: () => 'Age',
41
+ minSize: 80,
42
+ }),
43
+ columnHelper.accessor('cypherCommand', {
44
+ cell: (info) => info.getValue(),
45
+ footer: (info) => info.column.id,
46
+ header: () => 'Cypher Command',
47
+ minSize: 400,
48
+ size: 400,
49
+ }),
50
+ ];
51
+ const table = useReactTable({
52
+ columnResizeMode: 'onChange',
53
+ columns,
54
+ data: TABLE_DEMO_DATA,
55
+ debugColumns: true,
56
+ debugHeaders: true,
57
+ debugTable: true,
58
+ defaultColumn: {
59
+ maxSize: 800,
60
+ minSize: 80,
61
+ },
62
+ enableSorting: true,
63
+ getCoreRowModel: getCoreRowModel(),
64
+ getPaginationRowModel: getPaginationRowModel(),
65
+ getSortedRowModel: getSortedRowModel(),
66
+ initialState: {
67
+ pagination: {
68
+ pageSize: 5,
69
+ },
70
+ },
71
+ });
72
+ return (_jsx("div", { className: "n-w-full n-bg-light-neutral-text-weakest", children: _jsx(DataGrid, { isResizable: false, tableInstance: table, isKeyboardNavigable: false, styling: {
73
+ borderStyle: 'all-sides',
74
+ hasHoverEffects: true,
75
+ hasZebraStriping: false,
76
+ isCompact: true,
77
+ } }) }));
78
+ };
79
+ export default Component;
80
+ //# sourceMappingURL=datagrid-compact-mode.story.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"datagrid-compact-mode.story.js","sourceRoot":"","sources":["../../../../src/data-grid/stories/datagrid-compact-mode.story.tsx"],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AO,EAAE,GAAG;YACZ,IAAI,EAAE,GAAG;SACV,CAAC;KACH,CAAC;IAEF,MAAM,KAAK,GAAG,aAAa,CAAC;QAC1B,gBAAgB,EAAE,UAAU;QAC5B,OAAO;QACP,IAAI,EAAE,eAAe;QACrB,YAAY,EAAE,IAAI;QAClB,YAAY,EAAE,IAAI;QAClB,UAAU,EAAE,IAAI;QAChB,aAAa,EAAE;YACb,OAAO,EAAE,GAAG;YACZ,OAAO,EAAE,EAAE;SACZ;QACD,aAAa,EAAE,IAAI;QACnB,eAAe,EAAE,eAAe,EAAE;QAClC,qBAAqB,EAAE,qBAAqB,EAAE;QAC9C,iBAAiB,EAAE,iBAAiB,EAAE;QACtC,YAAY,EAAE;YACZ,UAAU,EAAE;gBACV,QAAQ,EAAE,CAAC;aACZ;SACF;KACF,CAAC,CAAC;IAEH,OAAO,CACL,cAAK,SAAS,EAAC,0CAA0C,YACvD,KAAC,QAAQ,IACP,WAAW,EAAE,KAAK,EAClB,aAAa,EAAE,KAAK,EACpB,mBAAmB,EAAE,KAAK,EAC1B,OAAO,EAAE;gBACP,WAAW,EAAE,WAAW;gBACxB,eAAe,EAAE,IAAI;gBACrB,gBAAgB,EAAE,KAAK;gBACvB,SAAS,EAAE,IAAI;aAChB,GACD,GACE,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { DataGrid } from '@neo4j-ndl/react';\nimport {\n createColumnHelper,\n getCoreRowModel,\n getPaginationRowModel,\n getSortedRowModel,\n useReactTable,\n} from '@tanstack/react-table';\n\nimport { TABLE_DEMO_DATA } from './staticData';\n\ntype TestDataFormat = {\n name: string;\n age: number;\n cypherCommand: string;\n};\n\nconst Component = () => {\n const columnHelper = createColumnHelper<TestDataFormat>();\n\n const columns = [\n columnHelper.accessor('name', {\n cell: (info) => info.getValue(),\n footer: (info) => info.column.id,\n header: () => 'Name',\n maxSize: 300,\n minSize: 180,\n size: 220,\n }),\n columnHelper.accessor('age', {\n cell: (info) => info.renderValue(),\n footer: (info) => info.column.id,\n header: () => 'Age',\n minSize: 80,\n }),\n columnHelper.accessor('cypherCommand', {\n cell: (info) => info.getValue(),\n footer: (info) => info.column.id,\n header: () => 'Cypher Command',\n minSize: 400,\n size: 400,\n }),\n ];\n\n const table = useReactTable({\n columnResizeMode: 'onChange',\n columns,\n data: TABLE_DEMO_DATA,\n debugColumns: true,\n debugHeaders: true,\n debugTable: true,\n defaultColumn: {\n maxSize: 800,\n minSize: 80,\n },\n enableSorting: true,\n getCoreRowModel: getCoreRowModel(),\n getPaginationRowModel: getPaginationRowModel(),\n getSortedRowModel: getSortedRowModel(),\n initialState: {\n pagination: {\n pageSize: 5,\n },\n },\n });\n\n return (\n <div className=\"n-w-full n-bg-light-neutral-text-weakest\">\n <DataGrid\n isResizable={false}\n tableInstance={table}\n isKeyboardNavigable={false}\n styling={{\n borderStyle: 'all-sides',\n hasHoverEffects: true,\n hasZebraStriping: false,\n isCompact: true,\n }}\n />\n </div>\n );\n};\n\nexport default Component;\n"]}
@@ -18,6 +18,7 @@
18
18
  * You should have received a copy of the GNU General Public License
19
19
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20
20
  */
21
+ export { default as DataGridCompactMode } from './datagrid-compact-mode.story';
21
22
  export { default as DataGridSimple } from './datagrid-simple.story';
22
23
  export { default as DataGridSortable } from './datagrid-sortable.story';
23
24
  export { default as DataGridSelectable } from './datagrid-selectable.story';
@@ -37,6 +38,7 @@ export { default as DataGridSingleSelectable } from './datagrid-single-selectabl
37
38
  export { default as DataGridUsingEditableCells } from './datagrid-using-editable-cells.story';
38
39
  import { removeLicenseHeader } from '../../_common/export-stories-utils';
39
40
  import DataGridColumnFilteringSourceRaw from './datagrid-column-filtering.story?raw';
41
+ import DataGridCompactModeSourceRaw from './datagrid-compact-mode.story?raw';
40
42
  import DataGridComponentOverridingSourceRaw from './datagrid-component-overriding.story?raw';
41
43
  import DataGridInDialogSourceRaw from './datagrid-in-dialog.story?raw';
42
44
  import DataGridKeyboardNavigationSourceRaw from './datagrid-keyboard-navigation.story?raw';
@@ -55,6 +57,7 @@ import DataGridSortableSourceRaw from './datagrid-sortable.story?raw';
55
57
  import DataGridUsingEditableCellsSourceRaw from './datagrid-using-editable-cells.story?raw';
56
58
  import DataGridVirtualizationSourceRaw from './datagrid-virtualization.story?raw';
57
59
  export const DataGridSimpleSource = removeLicenseHeader(DataGridSimpleSourceRaw);
60
+ export const DataGridCompactModeSource = removeLicenseHeader(DataGridCompactModeSourceRaw);
58
61
  export const DataGridSortableSource = removeLicenseHeader(DataGridSortableSourceRaw);
59
62
  export const DataGridSelectableSource = removeLicenseHeader(DataGridSelectableSourceRaw);
60
63
  export const DataGridSearchableSource = removeLicenseHeader(DataGridSearchableSourceRaw);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/data-grid/stories/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,EACL,UAAU,I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AAG,mBAAmB,CAC9D,gCAAgC,CACjC,CAAC;AACF,MAAM,CAAC,MAAM,6BAA6B,GAAG,mBAAmB,CAC9D,gCAAgC,CACjC,CAAC;AACF,MAAM,CAAC,MAAM,iCAAiC,GAAG,mBAAmB,CAClE,oCAAoC,CACrC,CAAC;AACF,MAAM,CAAC,MAAM,gCAAgC,GAAG,mBAAmB,CACjE,mCAAmC,CACpC,CAAC;AACF,MAAM,CAAC,MAAM,oCAAoC,GAAG,mBAAmB,CACrE,uCAAuC,CACxC,CAAC;AACF,MAAM,CAAC,MAAM,2BAA2B,GAAG,mBAAmB,CAC5D,8BAA8B,CAC/B,CAAC;AACF,MAAM,CAAC,MAAM,+BAA+B,GAAG,mBAAmB,CAChE,4BAA4B,CAC7B,CAAC;AACF,MAAM,CAAC,MAAM,8BAA8B,GAAG,mBAAmB,CAC/D,iCAAiC,CAClC,CAAC;AACF,MAAM,CAAC,MAAM,gCAAgC,GAAG,mBAAmB,CACjE,mCAAmC,CACpC,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nexport { default as DataGridSimple } from './datagrid-simple.story';\nexport { default as DataGridSortable } from './datagrid-sortable.story';\nexport { default as DataGridSelectable } from './datagrid-selectable.story';\nexport {\n Searchable as DataGridSearchable,\n ColumnFiltering as DataGridColumnFiltering,\n} from './datagrid-search-and-filters.stories';\nexport { default as DataGridInDialog } from './datagrid-in-dialog.story';\nexport { default as DataGridKitchenSink } from './datagrid-kitchen-sink.story';\nexport { default as DataGridVirtualization } from './datagrid-virtualization.story';\nexport { default as DataGridSkeletonLoading } from './datagrid-skeleton-loading.story';\nexport { default as DataGridPlaceholderStates } from './datagrid-placeholder-states.story';\nexport { default as DataGridResizableColumn } from './datagrid-resizable-column.story';\nexport { default as DataGridComponentOverriding } from './datagrid-component-overriding.story';\nexport { default as DataGridKeyboardNavigation } from './datagrid-keyboard-navigation.story';\nexport { default as DataGridPercentageWidthColumns } from './datagrid-percentage-width-columns.story';\nexport {\n PinnedBothSides as DataGridPinnedBothSides,\n PinnedLeftSide as DataGridPinnedLeftSide,\n PinnedRightSide as DataGridPinnedRightSide,\n} from './datagrid-pinned-columns.stories';\nexport { default as DataGridNoPaginationTable } from './datagrid-no-pagination-table.story';\nexport { default as DataGridSingleSelectable } from './datagrid-single-selectable.story';\nexport { default as DataGridUsingEditableCells } from './datagrid-using-editable-cells.story';\n\nimport { removeLicenseHeader } from '../../_common/export-stories-utils';\nimport DataGridColumnFilteringSourceRaw from './datagrid-column-filtering.story?raw';\nimport DataGridComponentOverridingSourceRaw from './datagrid-component-overriding.story?raw';\nimport DataGridInDialogSourceRaw from './datagrid-in-dialog.story?raw';\nimport DataGridKeyboardNavigationSourceRaw from './datagrid-keyboard-navigation.story?raw';\nimport DataGridKitchenSinkSourceRaw from './datagrid-kitchen-sink.story?raw';\nimport DataGridNoPaginationTableRaw from './datagrid-no-pagination-table.story?raw';\nimport DataGridPercentageWidthColumnsSourceRaw from './datagrid-percentage-width-columns.story?raw';\nimport DataGridPinnedColumnsSourceRaw from './datagrid-pinned-columns.stories?raw';\nimport DataGridPlaceholderStatesSourceRaw from './datagrid-placeholder-states.story?raw';\nimport DataGridResizableColumnSourceRaw from './datagrid-resizable-column.story?raw';\nimport DataGridSearchableSourceRaw from './datagrid-search-and-filters.stories?raw';\nimport DataGridSelectableSourceRaw from './datagrid-selectable.story?raw';\nimport DataGridSimpleSourceRaw from './datagrid-simple.story?raw';\nimport DataGridSingleSelectableSourceRaw from './datagrid-single-selectable.story?raw';\nimport DataGridSkeletonLoadingSourceRaw from './datagrid-skeleton-loading.story?raw';\nimport DataGridSortableSourceRaw from './datagrid-sortable.story?raw';\nimport DataGridUsingEditableCellsSourceRaw from './datagrid-using-editable-cells.story?raw';\nimport DataGridVirtualizationSourceRaw from './datagrid-virtualization.story?raw';\n\nexport const DataGridSimpleSource = removeLicenseHeader(\n DataGridSimpleSourceRaw,\n);\nexport const DataGridSortableSource = removeLicenseHeader(\n DataGridSortableSourceRaw,\n);\nexport const DataGridSelectableSource = removeLicenseHeader(\n DataGridSelectableSourceRaw,\n);\nexport const DataGridSearchableSource = removeLicenseHeader(\n DataGridSearchableSourceRaw,\n);\nexport const DataGridInDialogSource = removeLicenseHeader(\n DataGridInDialogSourceRaw,\n);\nexport const DataGridKitchenSinkSource = removeLicenseHeader(\n DataGridKitchenSinkSourceRaw,\n);\nexport const DataGridVirtualizationSource = removeLicenseHeader(\n DataGridVirtualizationSourceRaw,\n);\nexport const DataGridSkeletonLoadingSource = removeLicenseHeader(\n DataGridSkeletonLoadingSourceRaw,\n);\nexport const DataGridPlaceholderStatesSource = removeLicenseHeader(\n DataGridPlaceholderStatesSourceRaw,\n);\nexport const DataGridResizableColumnSource = removeLicenseHeader(\n DataGridResizableColumnSourceRaw,\n);\nexport const DataGridColumnFilteringSource = removeLicenseHeader(\n DataGridColumnFilteringSourceRaw,\n);\nexport const DataGridComponentOverridingSource = removeLicenseHeader(\n DataGridComponentOverridingSourceRaw,\n);\nexport const DataGridKeyboardNavigationSource = removeLicenseHeader(\n DataGridKeyboardNavigationSourceRaw,\n);\nexport const DataGridPercentageWidthColumnsSource = removeLicenseHeader(\n DataGridPercentageWidthColumnsSourceRaw,\n);\nexport const DataGridPinnedColumnsSource = removeLicenseHeader(\n DataGridPinnedColumnsSourceRaw,\n);\nexport const DataGridNoPaginationTableSource = removeLicenseHeader(\n DataGridNoPaginationTableRaw,\n);\nexport const DataGridSingleSelectableSource = removeLicenseHeader(\n DataGridSingleSelectableSourceRaw,\n);\nexport const DataGridUsingEditableCellsSource = removeLicenseHeader(\n DataGridUsingEditableCellsSourceRaw,\n);\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/data-grid/stories/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,EACL,UAAU,IAAI,kBAAkB,EAChC,eAAe,IAAI,uBAAuB,GAC3C,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACpF,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AACvF,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAC3F,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AACvF,OAAO,EAAE,OAAO,IAAI,2BAA2B,EAAE,MAAM,uCAAuC,CAAC;AAC/F,OAAO,EAAE,OAAO,IAAI,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAC7F,OAAO,EAAE,OAAO,IAAI,8BAA8B,EAAE,MAAM,2CAA2C,CAAC;AACtG,OAAO,EACL,eAAe,IAAI,uBAAuB,EAC1C,cAAc,IAA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B,CACjE,mCAAmC,CACpC,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nexport { default as DataGridCompactMode } from './datagrid-compact-mode.story';\nexport { default as DataGridSimple } from './datagrid-simple.story';\nexport { default as DataGridSortable } from './datagrid-sortable.story';\nexport { default as DataGridSelectable } from './datagrid-selectable.story';\nexport {\n Searchable as DataGridSearchable,\n ColumnFiltering as DataGridColumnFiltering,\n} from './datagrid-search-and-filters.stories';\nexport { default as DataGridInDialog } from './datagrid-in-dialog.story';\nexport { default as DataGridKitchenSink } from './datagrid-kitchen-sink.story';\nexport { default as DataGridVirtualization } from './datagrid-virtualization.story';\nexport { default as DataGridSkeletonLoading } from './datagrid-skeleton-loading.story';\nexport { default as DataGridPlaceholderStates } from './datagrid-placeholder-states.story';\nexport { default as DataGridResizableColumn } from './datagrid-resizable-column.story';\nexport { default as DataGridComponentOverriding } from './datagrid-component-overriding.story';\nexport { default as DataGridKeyboardNavigation } from './datagrid-keyboard-navigation.story';\nexport { default as DataGridPercentageWidthColumns } from './datagrid-percentage-width-columns.story';\nexport {\n PinnedBothSides as DataGridPinnedBothSides,\n PinnedLeftSide as DataGridPinnedLeftSide,\n PinnedRightSide as DataGridPinnedRightSide,\n} from './datagrid-pinned-columns.stories';\nexport { default as DataGridNoPaginationTable } from './datagrid-no-pagination-table.story';\nexport { default as DataGridSingleSelectable } from './datagrid-single-selectable.story';\nexport { default as DataGridUsingEditableCells } from './datagrid-using-editable-cells.story';\n\nimport { removeLicenseHeader } from '../../_common/export-stories-utils';\nimport DataGridColumnFilteringSourceRaw from './datagrid-column-filtering.story?raw';\nimport DataGridCompactModeSourceRaw from './datagrid-compact-mode.story?raw';\nimport DataGridComponentOverridingSourceRaw from './datagrid-component-overriding.story?raw';\nimport DataGridInDialogSourceRaw from './datagrid-in-dialog.story?raw';\nimport DataGridKeyboardNavigationSourceRaw from './datagrid-keyboard-navigation.story?raw';\nimport DataGridKitchenSinkSourceRaw from './datagrid-kitchen-sink.story?raw';\nimport DataGridNoPaginationTableRaw from './datagrid-no-pagination-table.story?raw';\nimport DataGridPercentageWidthColumnsSourceRaw from './datagrid-percentage-width-columns.story?raw';\nimport DataGridPinnedColumnsSourceRaw from './datagrid-pinned-columns.stories?raw';\nimport DataGridPlaceholderStatesSourceRaw from './datagrid-placeholder-states.story?raw';\nimport DataGridResizableColumnSourceRaw from './datagrid-resizable-column.story?raw';\nimport DataGridSearchableSourceRaw from './datagrid-search-and-filters.stories?raw';\nimport DataGridSelectableSourceRaw from './datagrid-selectable.story?raw';\nimport DataGridSimpleSourceRaw from './datagrid-simple.story?raw';\nimport DataGridSingleSelectableSourceRaw from './datagrid-single-selectable.story?raw';\nimport DataGridSkeletonLoadingSourceRaw from './datagrid-skeleton-loading.story?raw';\nimport DataGridSortableSourceRaw from './datagrid-sortable.story?raw';\nimport DataGridUsingEditableCellsSourceRaw from './datagrid-using-editable-cells.story?raw';\nimport DataGridVirtualizationSourceRaw from './datagrid-virtualization.story?raw';\n\nexport const DataGridSimpleSource = removeLicenseHeader(\n DataGridSimpleSourceRaw,\n);\nexport const DataGridCompactModeSource = removeLicenseHeader(\n DataGridCompactModeSourceRaw,\n);\nexport const DataGridSortableSource = removeLicenseHeader(\n DataGridSortableSourceRaw,\n);\nexport const DataGridSelectableSource = removeLicenseHeader(\n DataGridSelectableSourceRaw,\n);\nexport const DataGridSearchableSource = removeLicenseHeader(\n DataGridSearchableSourceRaw,\n);\nexport const DataGridInDialogSource = removeLicenseHeader(\n DataGridInDialogSourceRaw,\n);\nexport const DataGridKitchenSinkSource = removeLicenseHeader(\n DataGridKitchenSinkSourceRaw,\n);\nexport const DataGridVirtualizationSource = removeLicenseHeader(\n DataGridVirtualizationSourceRaw,\n);\nexport const DataGridSkeletonLoadingSource = removeLicenseHeader(\n DataGridSkeletonLoadingSourceRaw,\n);\nexport const DataGridPlaceholderStatesSource = removeLicenseHeader(\n DataGridPlaceholderStatesSourceRaw,\n);\nexport const DataGridResizableColumnSource = removeLicenseHeader(\n DataGridResizableColumnSourceRaw,\n);\nexport const DataGridColumnFilteringSource = removeLicenseHeader(\n DataGridColumnFilteringSourceRaw,\n);\nexport const DataGridComponentOverridingSource = removeLicenseHeader(\n DataGridComponentOverridingSourceRaw,\n);\nexport const DataGridKeyboardNavigationSource = removeLicenseHeader(\n DataGridKeyboardNavigationSourceRaw,\n);\nexport const DataGridPercentageWidthColumnsSource = removeLicenseHeader(\n DataGridPercentageWidthColumnsSourceRaw,\n);\nexport const DataGridPinnedColumnsSource = removeLicenseHeader(\n DataGridPinnedColumnsSourceRaw,\n);\nexport const DataGridNoPaginationTableSource = removeLicenseHeader(\n DataGridNoPaginationTableRaw,\n);\nexport const DataGridSingleSelectableSource = removeLicenseHeader(\n DataGridSingleSelectableSourceRaw,\n);\nexport const DataGridUsingEditableCellsSource = removeLicenseHeader(\n DataGridUsingEditableCellsSourceRaw,\n);\n"]}
@@ -44,6 +44,8 @@ export type DataGridProps<T extends RowData> = {
44
44
  headerStyle: HeaderStyle;
45
45
  /** If background hover effects should be enabled on rows and header cells */
46
46
  hasHoverEffects: boolean;
47
+ /** If table should have less padding */
48
+ isCompact: boolean;
47
49
  }>;
48
50
  /** Resizing the width of columns */
49
51
  isResizable?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"DataGrid.d.ts","sourceRoot":"","sources":["../../../src/data-grid/DataGrid.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;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B1D,WAAW,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6L8B,CAAC;AAEtE,OAAO,EAAE,QAAQ,EAAE,CAAC"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ *
3
+ * Copyright (c) "Neo4j"
4
+ * Neo4j Sweden AB [http://neo4j.com]
5
+ *
6
+ * This file is part of Neo4j.
7
+ *
8
+ * Neo4j is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
20
+ */
21
+ import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
22
+ declare const Component: () => import("react/jsx-runtime").JSX.Element;
23
+ export default Component;
24
+ //# sourceMappingURL=datagrid-compact-mode.story.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"datagrid-compact-mode.story.d.ts","sourceRoot":"","sources":["../../../../src/data-grid/stories/datagrid-compact-mode.story.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAmBjD,QAAA,MAAM,SAAS,+CAgEd,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -18,6 +18,7 @@
18
18
  * You should have received a copy of the GNU General Public License
19
19
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20
20
  */
21
+ export { default as DataGridCompactMode } from './datagrid-compact-mode.story';
21
22
  export { default as DataGridSimple } from './datagrid-simple.story';
22
23
  export { default as DataGridSortable } from './datagrid-sortable.story';
23
24
  export { default as DataGridSelectable } from './datagrid-selectable.story';
@@ -36,6 +37,7 @@ export { default as DataGridNoPaginationTable } from './datagrid-no-pagination-t
36
37
  export { default as DataGridSingleSelectable } from './datagrid-single-selectable.story';
37
38
  export { default as DataGridUsingEditableCells } from './datagrid-using-editable-cells.story';
38
39
  export declare const DataGridSimpleSource: string;
40
+ export declare const DataGridCompactModeSource: string;
39
41
  export declare const DataGridSortableSource: string;
40
42
  export declare const DataGridSelectableSource: string;
41
43
  export declare const DataGridSearchableSource: string;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/data-grid/stories/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,EACL,UAAU,IAAI,kBAAkB,EAChC,eAAe,IAAI,uBAAuB,GAC3C,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACpF,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AACvF,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAC3F,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AACvF,OAAO,EAAE,OAAO,IAAI,2BAA2B,EAAE,MAA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C;AACzF,OAAO,EAAE,OAAO,IAAI,0BAA0B,EAAE,MAAM,uCAAuC,CAAC;AAuB9F,eAAO,MAAM,oBAAoB,QAEhC,CAAC;AACF,eAAO,MAAM,yBAAyB,QAErC,CAAC;AACF,eAAO,MAAM,sBAAsB,QAElC,CAAC;AACF,eAAO,MAAM,wBAAwB,QAEpC,CAAC;AACF,eAAO,MAAM,wBAAwB,QAEpC,CAAC;AACF,eAAO,MAAM,sBAAsB,QAElC,CAAC;AACF,eAAO,MAAM,yBAAyB,QAErC,CAAC;AACF,eAAO,MAAM,4BAA4B,QAExC,CAAC;AACF,eAAO,MAAM,6BAA6B,QAEzC,CAAC;AACF,eAAO,MAAM,+BAA+B,QAE3C,CAAC;AACF,eAAO,MAAM,6BAA6B,QAEzC,CAAC;AACF,eAAO,MAAM,6BAA6B,QAEzC,CAAC;AACF,eAAO,MAAM,iCAAiC,QAE7C,CAAC;AACF,eAAO,MAAM,gCAAgC,QAE5C,CAAC;AACF,eAAO,MAAM,oCAAoC,QAEhD,CAAC;AACF,eAAO,MAAM,2BAA2B,QAEvC,CAAC;AACF,eAAO,MAAM,+BAA+B,QAE3C,CAAC;AACF,eAAO,MAAM,8BAA8B,QAE1C,CAAC;AACF,eAAO,MAAM,gCAAgC,QAE5C,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neo4j-ndl/react",
3
- "version": "4.9.2",
3
+ "version": "4.9.3",
4
4
  "sideEffects": false,
5
5
  "description": "React implementation of Neo4j Design System",
6
6
  "keywords": [
@@ -85,7 +85,7 @@
85
85
  "@tanstack/react-table": "8.21.3",
86
86
  "react": ">=19.0.0",
87
87
  "react-dom": ">=19.0.0",
88
- "@neo4j-ndl/base": "^4.9.0"
88
+ "@neo4j-ndl/base": "^4.9.1"
89
89
  },
90
90
  "dependencies": {
91
91
  "@dnd-kit/core": "6.3.1",