@gravitee/graphene-core 3.44.1 → 3.45.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 +7 -0
- package/dist/composed/DataTable/cells.d.ts +15 -9
- package/dist/composed/DataTable/cells.d.ts.map +1 -1
- package/dist/composed/DataTablePagination/DataTablePagination.d.ts +6 -1
- package/dist/composed/DataTablePagination/DataTablePagination.d.ts.map +1 -1
- package/dist/index.js +754 -749
- package/package.json +1 -1
package/USAGE_GUIDE.md
CHANGED
|
@@ -1095,6 +1095,13 @@ The components that derive ids from yours. A part exists only when you pass an i
|
|
|
1095
1095
|
| `SearchField` | `${id}-clear` | Clear button, while the field has text |
|
|
1096
1096
|
| `CopyableText` | `${id}-value` | Displayed value |
|
|
1097
1097
|
| `CopyableText` | `${id}-tooltip` | Tooltip content, while the tooltip is open |
|
|
1098
|
+
| `DataTablePagination` | `${id}-previous` | Previous page button |
|
|
1099
|
+
| `DataTablePagination` | `${id}-next` | Next page button |
|
|
1100
|
+
| `DataTablePagination` | `${id}-range` | Range text ("11-20 of 42") |
|
|
1101
|
+
| `DataTablePagination` | `${id}-page-size` | Page size trigger, with `onPageSizeChange` |
|
|
1102
|
+
| `DataTablePagination` | `${id}-page-size-content` | Page size list, with `onPageSizeChange`, while the list is open |
|
|
1103
|
+
| `DataTablePagination` | `${id}-page-size-option-<n>` | Page size option `n`, with `onPageSizeChange`, while the list is open |
|
|
1104
|
+
| `CopyableCell` | `${id}-copy` | Copy button, when the cell has a value |
|
|
1098
1105
|
| `ElCheatSheetTrigger` | `${id}-content` | Popover content, while the popover is open |
|
|
1099
1106
|
| `ElCheatSheetTrigger` | `${id}-copy-<key>` | Copy button of an example: `plan-level`, `path-prefix` or `attribute-lookup` |
|
|
1100
1107
|
| `CodeEditor` | `${id}-loading` | Skeleton, while Monaco loads |
|
|
@@ -1,38 +1,44 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Shared cell renderers for DataTable columns.
|
|
4
|
-
* Use these in `ColumnDef.cell` to maintain consistent column styling across all tables.
|
|
5
|
-
*/
|
|
6
2
|
interface DateCellProps {
|
|
7
3
|
/** ISO date string or Date object */
|
|
8
4
|
readonly value: string | Date | null | undefined;
|
|
9
5
|
/** Display format: 'relative' shows "2h ago", 'absolute' shows full date. @default 'relative' */
|
|
10
6
|
readonly format?: 'relative' | 'absolute';
|
|
7
|
+
/** Test id of the cell's root element, the `—` placeholder included. */
|
|
8
|
+
readonly 'data-testid'?: string;
|
|
11
9
|
}
|
|
12
|
-
declare function DateCell({ value, format }: DateCellProps): import("react").JSX.Element;
|
|
10
|
+
declare function DateCell({ value, format, 'data-testid': testId }: DateCellProps): import("react").JSX.Element;
|
|
13
11
|
interface BadgeCellProps {
|
|
14
12
|
readonly value: string | null | undefined;
|
|
15
13
|
readonly variant?: 'default' | 'secondary' | 'destructive' | 'outline' | 'success' | 'warning' | 'highlight';
|
|
16
14
|
readonly icon?: ReactNode;
|
|
15
|
+
/** Test id of the cell's root element, the `—` placeholder included. */
|
|
16
|
+
readonly 'data-testid'?: string;
|
|
17
17
|
}
|
|
18
|
-
declare function BadgeCell({ value, variant, icon }: BadgeCellProps): import("react").JSX.Element;
|
|
18
|
+
declare function BadgeCell({ value, variant, icon, 'data-testid': testId }: BadgeCellProps): import("react").JSX.Element;
|
|
19
19
|
interface MonoCellProps {
|
|
20
20
|
readonly value: string | null | undefined;
|
|
21
21
|
/** Maximum visible characters before truncation. @default 32 */
|
|
22
22
|
readonly maxLength?: number;
|
|
23
|
+
/** Test id of the cell's root element, the `—` placeholder included. */
|
|
24
|
+
readonly 'data-testid'?: string;
|
|
23
25
|
}
|
|
24
|
-
declare function MonoCell({ value, maxLength }: MonoCellProps): import("react").JSX.Element;
|
|
26
|
+
declare function MonoCell({ value, maxLength, 'data-testid': testId }: MonoCellProps): import("react").JSX.Element;
|
|
25
27
|
interface CopyableCellProps {
|
|
26
28
|
readonly value: string | null | undefined;
|
|
27
29
|
/** Maximum visible characters before truncation. @default 24 */
|
|
28
30
|
readonly maxLength?: number;
|
|
31
|
+
/** Test id of the cell's root element, the `—` placeholder included; the copy button gets `${id}-copy`. */
|
|
32
|
+
readonly 'data-testid'?: string;
|
|
29
33
|
}
|
|
30
|
-
declare function CopyableCell({ value, maxLength }: CopyableCellProps): import("react").JSX.Element;
|
|
34
|
+
declare function CopyableCell({ value, maxLength, 'data-testid': testId }: CopyableCellProps): import("react").JSX.Element;
|
|
31
35
|
interface TruncatedCellProps {
|
|
32
36
|
readonly value: string | null | undefined;
|
|
33
37
|
readonly className?: string;
|
|
38
|
+
/** Test id of the cell's root element, the `—` placeholder included. */
|
|
39
|
+
readonly 'data-testid'?: string;
|
|
34
40
|
}
|
|
35
|
-
declare function TruncatedCell({ value, className }: TruncatedCellProps): import("react").JSX.Element;
|
|
41
|
+
declare function TruncatedCell({ value, className, 'data-testid': testId }: TruncatedCellProps): import("react").JSX.Element;
|
|
36
42
|
export { BadgeCell, CopyableCell, DateCell, MonoCell, TruncatedCell };
|
|
37
43
|
export type { BadgeCellProps, CopyableCellProps, DateCellProps, MonoCellProps, TruncatedCellProps };
|
|
38
44
|
//# sourceMappingURL=cells.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cells.d.ts","sourceRoot":"","sources":["../../../src/composed/DataTable/cells.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"cells.d.ts","sourceRoot":"","sources":["../../../src/composed/DataTable/cells.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAyBvC,UAAU,aAAa;IACrB,qCAAqC;IACrC,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;IACjD,iGAAiG;IACjG,QAAQ,CA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EAAE,KAAK,EAAE,SAAc,EAAE,aAAa,EAAE,MAAM,EAAE,EAAE,iBAAiB,+BA2CxF;AAID,UAAU,kBAAkB;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC1C,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,wEAAwE;IACxE,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;CACjC;AAED,iBAAS,aAAa,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,EAAE,EAAE,kBAAkB,+BAmBrF;AAED,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC;AACtE,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,aAAa,EAAE,aAAa,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -7,8 +7,13 @@ interface DataTablePaginationProps {
|
|
|
7
7
|
readonly onPageChange: (page: number) => void;
|
|
8
8
|
readonly onPageSizeChange?: (pageSize: number) => void;
|
|
9
9
|
readonly children?: ReactNode;
|
|
10
|
+
/**
|
|
11
|
+
* Test id of the root `<div>`. `${id}-previous`, `${id}-next` and `${id}-range` derive from it, and with
|
|
12
|
+
* `onPageSizeChange` `${id}-page-size`, `${id}-page-size-content` and `${id}-page-size-option-<n>`.
|
|
13
|
+
*/
|
|
14
|
+
readonly 'data-testid'?: string;
|
|
10
15
|
}
|
|
11
|
-
declare function DataTablePagination({ page, pageSize, totalCount, pageSizeOptions, onPageChange, onPageSizeChange, children, }: DataTablePaginationProps): import("react").JSX.Element;
|
|
16
|
+
declare function DataTablePagination({ page, pageSize, totalCount, pageSizeOptions, onPageChange, onPageSizeChange, children, 'data-testid': testId, }: DataTablePaginationProps): import("react").JSX.Element;
|
|
12
17
|
export { DataTablePagination };
|
|
13
18
|
export type { DataTablePaginationProps };
|
|
14
19
|
//# sourceMappingURL=DataTablePagination.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTablePagination.d.ts","sourceRoot":"","sources":["../../../src/composed/DataTablePagination/DataTablePagination.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"DataTablePagination.d.ts","sourceRoot":"","sources":["../../../src/composed/DataTablePagination/DataTablePagination.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMvC,UAAU,wBAAwB;IAChC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IACpC,QAAQ,CAAC,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,QAAQ,CAAC,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACvD,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAC;IAC9B;;;OAGG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;CACjC;AAED,iBAAS,mBAAmB,CAAC,EAC3B,IAAI,EACJ,QAAQ,EACR,UAAU,EACV,eAAsC,EACtC,YAAY,EACZ,gBAAgB,EAChB,QAAQ,EACR,aAAa,EAAE,MAAM,GACtB,EAAE,wBAAwB,+BA8D1B;AAED,OAAO,EAAE,mBAAmB,EAAE,CAAC;AAC/B,YAAY,EAAE,wBAAwB,EAAE,CAAC"}
|