@gravitee/graphene-core 3.28.0 → 3.29.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/USAGE_GUIDE.md CHANGED
@@ -698,6 +698,8 @@ Target **4-7 visible columns**. List pages show the View menu (`enableColumnVisi
698
698
 
699
699
  `enableColumnVisibility` adds the View menu, which names each column by its `meta.label`, else by its header when that is text: give a column whose header is a component, such as a sortable `DataTableColumnHeader`, a `meta: { label: 'Created' }`, or the menu shows its id.
700
700
 
701
+ A `meta.section` groups the columns of the View menu under a heading: the columns without one come first, then the sections in the order their first column appears. A `meta.description` adds secondary text under the column's name, such as the raw key of a metric. For a table with many columns, pass `columnVisibilityOptions={{ searchable: true }}`: the dropdown becomes a wider panel with a search field (named "Search columns", with a clear button) that matches the name and the description as the user types, and toggling a column keeps the panel open. `searchPlaceholder` changes the field's hint. Without `columnVisibilityOptions`, the menu is the dropdown, which closes on each toggle.
702
+
701
703
  #### Cell renderers
702
704
 
703
705
  Import from `@gravitee/graphene-core`:
@@ -0,0 +1,16 @@
1
+ interface ColumnNameProps {
2
+ readonly label: string;
3
+ readonly description: string | undefined;
4
+ /** Set by the searchable panel, whose options point at their name and description by id. */
5
+ readonly labelId?: string;
6
+ readonly descriptionId?: string;
7
+ }
8
+ /**
9
+ * A column's name in the View menu, with its `meta.description` under it when the column has one. A
10
+ * name with neither description nor id renders as a text node, so a dropdown item without a description
11
+ * keeps the markup it had before this component existed.
12
+ */
13
+ declare function ColumnName({ label, description, labelId, descriptionId }: ColumnNameProps): string | import("react").JSX.Element;
14
+ export { ColumnName };
15
+ export type { ColumnNameProps };
16
+ //# sourceMappingURL=ColumnName.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ColumnName.d.ts","sourceRoot":"","sources":["../../../src/composed/DataTable/ColumnName.tsx"],"names":[],"mappings":"AAAA,UAAU,eAAe;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IACzC,4FAA4F;IAC5F,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;CACjC;AAED;;;;GAIG;AACH,iBAAS,UAAU,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,aAAa,EAAE,EAAE,eAAe,wCAYlF;AAED,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,YAAY,EAAE,eAAe,EAAE,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { Column } from '@tanstack/react-table';
2
+ interface ColumnOptionProps<TData> {
3
+ readonly column: Column<TData>;
4
+ readonly onToggle: (column: Column<TData>) => void;
5
+ }
6
+ /**
7
+ * One column of the searchable panel: an option that carries its own state (`aria-checked`, shown as
8
+ * the trailing check of `CommandItem`), named by its label and described by its `meta.description`. A
9
+ * checkbox button inside an option would be a nested control, which assistive technology does not
10
+ * announce reliably. The DOM ids come from `useId()`, never from the column id: TanStack derives that
11
+ * id from a text header when the column declares none, and a space would break the id references.
12
+ */
13
+ declare function ColumnOption<TData>({ column, onToggle }: ColumnOptionProps<TData>): import("react").JSX.Element;
14
+ export { ColumnOption };
15
+ export type { ColumnOptionProps };
16
+ //# sourceMappingURL=ColumnOption.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ColumnOption.d.ts","sourceRoot":"","sources":["../../../src/composed/DataTable/ColumnOption.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAMpD,UAAU,iBAAiB,CAAC,KAAK;IAC/B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;IAC/B,QAAQ,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC;CACpD;AAED;;;;;;GAMG;AACH,iBAAS,YAAY,CAAC,KAAK,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,iBAAiB,CAAC,KAAK,CAAC,+BAqB1E;AAED,OAAO,EAAE,YAAY,EAAE,CAAC;AACxB,YAAY,EAAE,iBAAiB,EAAE,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { ColumnDef, OnChangeFn, RowData, SortingState, TableOptions } from '@tanstack/react-table';
2
2
  import { ReactNode } from 'react';
3
+ import { DataTableColumnVisibilityOptions } from './DataTableViewOptions';
3
4
  declare module '@tanstack/react-table' {
4
5
  interface ColumnMeta<TData extends RowData, TValue> {
5
6
  /**
@@ -7,6 +8,16 @@ declare module '@tanstack/react-table' {
7
8
  * such as a sortable `DataTableColumnHeader`. Without it, the menu shows the column id.
8
9
  */
9
10
  label?: string;
11
+ /**
12
+ * Groups the column under this heading in the View menu. The columns without a section come first,
13
+ * under no heading, then the sections in the order their first column appears.
14
+ */
15
+ section?: string;
16
+ /**
17
+ * Secondary text under the column's name in the View menu, such as the raw key of a metric. The
18
+ * searchable panel (`columnVisibilityOptions.searchable`) matches it as the user types.
19
+ */
20
+ description?: string;
10
21
  }
11
22
  }
12
23
  interface DataTablePaginationConfig {
@@ -32,9 +43,15 @@ interface DataTableProps<TData> {
32
43
  readonly emptyMessage?: ReactNode;
33
44
  /**
34
45
  * Adds the View menu, which shows and hides the columns whose `enableHiding` is not false. It names a
35
- * column by its `meta.label`, else by its header when that is text, else by its id.
46
+ * column by its `meta.label`, else by its header when that is text, else by its id; `meta.section`
47
+ * groups the columns under a heading and `meta.description` adds secondary text under the name.
36
48
  */
37
49
  readonly enableColumnVisibility?: boolean;
50
+ /**
51
+ * Options of the View menu (`enableColumnVisibility`). Omitted, the menu is a dropdown that closes on
52
+ * each toggle; `searchable` replaces it with a wider panel that filters the columns as the user types.
53
+ */
54
+ readonly columnVisibilityOptions?: DataTableColumnVisibilityOptions;
38
55
  readonly enableColumnResizing?: boolean;
39
56
  /** Makes the table header sticky. Consumer should set a max-height via className. */
40
57
  readonly stickyHeader?: boolean;
@@ -72,7 +89,7 @@ interface DataTableProps<TData> {
72
89
  /** Escape hatch for advanced `@tanstack/react-table` options (e.g. `meta`, `initialState`). */
73
90
  readonly tableOptions?: Partial<TableOptions<TData>>;
74
91
  }
75
- declare function DataTable<TData>({ columns: userColumns, data, selectionMode, onSelectionChange, bulkActions, sorting: sortingProp, onSortingChange: onSortingChangeProp, emptyMessage, enableColumnVisibility, enableColumnResizing, stickyHeader, loading: loadingProp, loadingDelay, skeletonCount, className, 'aria-label': ariaLabel, toolbar, pagination, footer, serverSide, tableOptions, }: DataTableProps<TData>): import("react").JSX.Element;
92
+ declare function DataTable<TData>({ columns: userColumns, data, selectionMode, onSelectionChange, bulkActions, sorting: sortingProp, onSortingChange: onSortingChangeProp, emptyMessage, enableColumnVisibility, columnVisibilityOptions, enableColumnResizing, stickyHeader, loading: loadingProp, loadingDelay, skeletonCount, className, 'aria-label': ariaLabel, toolbar, pagination, footer, serverSide, tableOptions, }: DataTableProps<TData>): import("react").JSX.Element;
76
93
  export { DataTable };
77
94
  export type { DataTablePaginationConfig, DataTableProps };
78
95
  //# sourceMappingURL=DataTable.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DataTable.d.ts","sourceRoot":"","sources":["../../../src/composed/DataTable/DataTable.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,SAAS,EAMd,KAAK,UAAU,EAEf,KAAK,OAAO,EAEZ,KAAK,YAAY,EACjB,KAAK,YAAY,EAGlB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,KAAK,SAAS,EAAqD,MAAM,OAAO,CAAC;AAQ1F,OAAO,QAAQ,uBAAuB,CAAC;IAGrC,UAAU,UAAU,CAAC,KAAK,SAAS,OAAO,EAAE,MAAM;QAChD;;;WAGG;QACH,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB;CACF;AAeD,UAAU,yBAAyB;IACjC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACt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AuB,EACvB,oBAAoB,EACpB,YAAY,EACZ,OAAO,EAAE,WAAW,EACpB,YAAkB,EAClB,aAAiB,EACjB,SAAS,EACT,YAAY,EAAE,SAAS,EACvB,OAAO,EACP,UAAU,EACV,MAAM,EACN,UAAU,EACV,YAAY,GACb,EAAE,cAAc,CAAC,KAAK,CAAC,+BAwOvB;AAED,OAAO,EAAE,SAAS,EAAE,CAAC;AACrB,YAAY,EAAE,yBAAyB,EAAE,cAAc,EAAE,CAAC"}
@@ -1,7 +1,21 @@
1
1
  import { Table } from '@tanstack/react-table';
2
- interface DataTableViewOptionsProps<TData> {
3
- table: Table<TData>;
2
+ interface DataTableColumnVisibilityOptions {
3
+ /**
4
+ * Replaces the dropdown with a wider panel that has a search field: typing filters the columns by
5
+ * their name and their `meta.description`, and toggling a column keeps the panel open. For a table
6
+ * with many columns. Off, the menu is a dropdown that closes on each toggle.
7
+ */
8
+ readonly searchable?: boolean;
9
+ /**
10
+ * The search field's placeholder, "Search columns..." by default. A hint, not the field's name: the
11
+ * field is always named "Search columns" for assistive technology.
12
+ */
13
+ readonly searchPlaceholder?: string;
4
14
  }
5
- declare function DataTableViewOptions<TData>({ table }: DataTableViewOptionsProps<TData>): import("react").JSX.Element;
15
+ interface DataTableViewOptionsProps<TData> extends DataTableColumnVisibilityOptions {
16
+ readonly table: Table<TData>;
17
+ }
18
+ declare function DataTableViewOptions<TData>({ table, searchable, searchPlaceholder, }: DataTableViewOptionsProps<TData>): import("react").JSX.Element;
6
19
  export { DataTableViewOptions };
20
+ export type { DataTableColumnVisibilityOptions, DataTableViewOptionsProps };
7
21
  //# sourceMappingURL=DataTableViewOptions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DataTableViewOptions.d.ts","sourceRoot":"","sources":["../../../src/composed/DataTable/DataTableViewOptions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAYnD,UAAU,yBAAyB,CAAC,KAAK;IACvC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;CACrB;AAED,iBAAS,oBAAoB,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,yBAAyB,CAAC,KAAK,CAAC,+BA4B/E;AAED,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
1
+ {"version":3,"file":"DataTableViewOptions.d.ts","sourceRoot":"","sources":["../../../src/composed/DataTable/DataTableViewOptions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAgBnD,UAAU,gCAAgC;IACxC;;;;OAIG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;IAC9B;;;OAGG;IACH,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;CACrC;AAED,UAAU,yBAAyB,CAAC,KAAK,CAAE,SAAQ,gCAAgC;IACjF,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;CAC9B;AAED,iBAAS,oBAAoB,CAAC,KAAK,EAAE,EACnC,KAAK,EACL,UAAkB,EAClB,iBAAuC,GACxC,EAAE,yBAAyB,CAAC,KAAK,CAAC,+BA2ClC;AAED,OAAO,EAAE,oBAAoB,EAAE,CAAC;AAChC,YAAY,EAAE,gCAAgC,EAAE,yBAAyB,EAAE,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { Column } from '@tanstack/react-table';
2
+ interface DataTableViewOptionsSearchProps<TData> {
3
+ readonly columns: readonly Column<TData>[];
4
+ readonly placeholder: string;
5
+ }
6
+ /**
7
+ * The searchable View menu: a popover with a search field over the columns, grouped by section. A
8
+ * Radix menu is not an option here, since its letter typeahead would eat the keystrokes, so this
9
+ * composes `Popover` and `Command` as `FacetedFilter` does. Escape closes the panel and returns focus
10
+ * to the trigger; the arrow keys move between columns and Enter toggles the highlighted one. Each
11
+ * column is a `ColumnOption`.
12
+ */
13
+ declare function DataTableViewOptionsSearch<TData>({ columns, placeholder }: DataTableViewOptionsSearchProps<TData>): import("react").JSX.Element;
14
+ export { DataTableViewOptionsSearch };
15
+ export type { DataTableViewOptionsSearchProps };
16
+ //# sourceMappingURL=DataTableViewOptionsSearch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataTableViewOptionsSearch.d.ts","sourceRoot":"","sources":["../../../src/composed/DataTable/DataTableViewOptionsSearch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAUpD,UAAU,+BAA+B,CAAC,KAAK;IAC7C,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;IAC3C,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAaD;;;;;;GAMG;AACH,iBAAS,0BAA0B,CAAC,KAAK,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE,EAAE,+BAA+B,CAAC,KAAK,CAAC,+BAmE1G;AAED,OAAO,EAAE,0BAA0B,EAAE,CAAC;AACtC,YAAY,EAAE,+BAA+B,EAAE,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { ComponentProps } from 'react';
2
+ import { Button } from '../../base/Button';
3
+ /** The "View" button both modes of the column menu open; the menu primitive injects its trigger props. */
4
+ declare function ViewOptionsTrigger(props: ComponentProps<typeof Button>): import("react").JSX.Element;
5
+ export { ViewOptionsTrigger };
6
+ //# sourceMappingURL=ViewOptionsTrigger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ViewOptionsTrigger.d.ts","sourceRoot":"","sources":["../../../src/composed/DataTable/ViewOptionsTrigger.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAG7D,0GAA0G;AAC1G,iBAAS,kBAAkB,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,MAAM,CAAC,+BAO/D;AAED,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { Column, Table } from '@tanstack/react-table';
2
+ interface ColumnSection<TData> {
3
+ /** The heading shown above the section; `undefined` for the columns declared without one. */
4
+ readonly heading: string | undefined;
5
+ readonly columns: readonly Column<TData>[];
6
+ }
7
+ /** The columns the View menu offers: the top-level columns whose `enableHiding` is not false. */
8
+ declare function getHideableColumns<TData>(table: Table<TData>): Column<TData>[];
9
+ /** The column's name in the View menu: its `meta.label`, else its header when that is text, else its id. */
10
+ declare function getColumnLabel<TData>(column: Column<TData>): string;
11
+ /**
12
+ * Groups the columns by `meta.section`: the columns without one first, under no heading, then the
13
+ * sections in the order their first column appears. A table without sections yields a single group.
14
+ */
15
+ declare function groupColumnsBySection<TData>(columns: readonly Column<TData>[]): ColumnSection<TData>[];
16
+ /** A React key for a section, distinct from any heading a consumer could choose. */
17
+ declare function sectionKey(heading: string | undefined): string;
18
+ export { getColumnLabel, getHideableColumns, groupColumnsBySection, sectionKey };
19
+ export type { ColumnSection };
20
+ //# sourceMappingURL=columnVisibility.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"columnVisibility.d.ts","sourceRoot":"","sources":["../../../src/composed/DataTable/columnVisibility.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAE3D,UAAU,aAAa,CAAC,KAAK;IAC3B,6FAA6F;IAC7F,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;CAC5C;AAED,iGAAiG;AACjG,iBAAS,kBAAkB,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,EAAE,CAEvE;AAED,4GAA4G;AAC5G,iBAAS,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,GAAG,MAAM,CAG5D;AAED;;;GAGG;AACH,iBAAS,qBAAqB,CAAC,KAAK,EAAE,OAAO,EAAE,SAAS,MAAM,CAAC,KAAK,CAAC,EAAE,GAAG,aAAa,CAAC,KAAK,CAAC,EAAE,CAW/F;AAED,oFAAoF;AACpF,iBAAS,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAEvD;AAED,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,UAAU,EAAE,CAAC;AACjF,YAAY,EAAE,aAAa,EAAE,CAAC"}
@@ -3,6 +3,7 @@ export type { DataTablePaginationConfig, DataTableProps } from './DataTable';
3
3
  export { DataTableColumnHeader } from './DataTableColumnHeader';
4
4
  export type { DataTableColumnHeaderProps } from './DataTableColumnHeader';
5
5
  export { DataTableViewOptions } from './DataTableViewOptions';
6
+ export type { DataTableColumnVisibilityOptions, DataTableViewOptionsProps } from './DataTableViewOptions';
6
7
  export { BadgeCell, CopyableCell, DateCell, MonoCell, TruncatedCell } from './cells';
7
8
  export type { BadgeCellProps, CopyableCellProps, DateCellProps, MonoCellProps, TruncatedCellProps } from './cells';
8
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/composed/DataTable/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,YAAY,EAAE,yBAAyB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7E,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,YAAY,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAC1E,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACrF,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,aAAa,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/composed/DataTable/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,YAAY,EAAE,yBAAyB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7E,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,YAAY,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAC1E,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,YAAY,EAAE,gCAAgC,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAC1G,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACrF,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,aAAa,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC"}