@gears-frontx/ui-kit 0.4.0 → 0.4.1
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/NOTICE +1 -0
- package/README.md +2 -1
- package/dist/chunks/data-grid.DIkpRRaf.css +1 -0
- package/dist/chunks/deep-equal.js +15 -0
- package/dist/chunks/deep-equal.js.map +1 -0
- package/dist/chunks/messages.js +42 -0
- package/dist/chunks/messages.js.map +1 -0
- package/dist/chunks/order.D7Jg_Mg8.css +1 -0
- package/dist/chunks/pagination.Cn8tIWMX.css +1 -0
- package/dist/chunks/plugins-helpers.js +41 -0
- package/dist/chunks/plugins-helpers.js.map +1 -0
- package/dist/chunks/segment.js +18 -0
- package/dist/chunks/segment.js.map +1 -0
- package/dist/chunks/text-search.BeZYac6V.css +1 -0
- package/dist/components/data-grid/components/data-grid-content.d.ts +3 -0
- package/dist/components/data-grid/components/data-grid-content.d.ts.map +1 -0
- package/dist/components/data-grid/components/data-grid-empty-state.d.ts +3 -0
- package/dist/components/data-grid/components/data-grid-empty-state.d.ts.map +1 -0
- package/dist/components/data-grid/components/data-grid-spinner.d.ts +16 -0
- package/dist/components/data-grid/components/data-grid-spinner.d.ts.map +1 -0
- package/dist/components/data-grid/components/load-controlled.d.ts +15 -0
- package/dist/components/data-grid/components/load-controlled.d.ts.map +1 -0
- package/dist/components/data-grid/components/segment.d.ts +15 -0
- package/dist/components/data-grid/components/segment.d.ts.map +1 -0
- package/dist/components/data-grid/create-data-grid.d.ts +4 -0
- package/dist/components/data-grid/create-data-grid.d.ts.map +1 -0
- package/dist/components/data-grid/data-grid-types.d.ts +142 -0
- package/dist/components/data-grid/data-grid-types.d.ts.map +1 -0
- package/dist/components/data-grid/data-grid.d.ts +3 -0
- package/dist/components/data-grid/data-grid.d.ts.map +1 -0
- package/dist/components/data-grid/messages.d.ts +39 -0
- package/dist/components/data-grid/messages.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/empty-state/empty-state-plugin.d.ts +5 -0
- package/dist/components/data-grid/plugins/empty-state/empty-state-plugin.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/empty-state/empty-state-types.d.ts +14 -0
- package/dist/components/data-grid/plugins/empty-state/empty-state-types.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/empty-state/public.d.ts +3 -0
- package/dist/components/data-grid/plugins/empty-state/public.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/order/components/data-grid-order-button.d.ts +3 -0
- package/dist/components/data-grid/plugins/order/components/data-grid-order-button.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/order/components/data-grid-order-header-cell-label.d.ts +8 -0
- package/dist/components/data-grid/plugins/order/components/data-grid-order-header-cell-label.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/order/components/data-grid-order-icon.d.ts +7 -0
- package/dist/components/data-grid/plugins/order/components/data-grid-order-icon.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/order/order-plugin.d.ts +4 -0
- package/dist/components/data-grid/plugins/order/order-plugin.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/order/order-types.d.ts +66 -0
- package/dist/components/data-grid/plugins/order/order-types.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/order/public.d.ts +5 -0
- package/dist/components/data-grid/plugins/order/public.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/order/services/order-labels.d.ts +8 -0
- package/dist/components/data-grid/plugins/order/services/order-labels.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/order/services/order-option.d.ts +3 -0
- package/dist/components/data-grid/plugins/order/services/order-option.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/pagination/components/data-grid-pagination.d.ts +3 -0
- package/dist/components/data-grid/plugins/pagination/components/data-grid-pagination.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/pagination/components/pager.d.ts +22 -0
- package/dist/components/data-grid/plugins/pagination/components/pager.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/pagination/pagination-plugin.d.ts +31 -0
- package/dist/components/data-grid/plugins/pagination/pagination-plugin.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/pagination/public.d.ts +3 -0
- package/dist/components/data-grid/plugins/pagination/public.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/pagination/services/pagination-items.d.ts +14 -0
- package/dist/components/data-grid/plugins/pagination/services/pagination-items.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/text-search/components/data-grid-text-search.d.ts +3 -0
- package/dist/components/data-grid/plugins/text-search/components/data-grid-text-search.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/text-search/public.d.ts +3 -0
- package/dist/components/data-grid/plugins/text-search/public.d.ts.map +1 -0
- package/dist/components/data-grid/plugins/text-search/text-search-plugin.d.ts +38 -0
- package/dist/components/data-grid/plugins/text-search/text-search-plugin.d.ts.map +1 -0
- package/dist/components/data-grid/public.d.ts +12 -0
- package/dist/components/data-grid/public.d.ts.map +1 -0
- package/dist/components/data-grid/services/columns/create-column-auto-size.d.ts +7 -0
- package/dist/components/data-grid/services/columns/create-column-auto-size.d.ts.map +1 -0
- package/dist/components/data-grid/services/core/core-service.d.ts +3 -0
- package/dist/components/data-grid/services/core/core-service.d.ts.map +1 -0
- package/dist/components/data-grid/services/core/core-types.d.ts +28 -0
- package/dist/components/data-grid/services/core/core-types.d.ts.map +1 -0
- package/dist/components/data-grid/services/core/data-grid-context.d.ts +17 -0
- package/dist/components/data-grid/services/core/data-grid-context.d.ts.map +1 -0
- package/dist/components/data-grid/services/hooked/hooked-types.d.ts +34 -0
- package/dist/components/data-grid/services/hooked/hooked-types.d.ts.map +1 -0
- package/dist/components/data-grid/services/hooked/hooked.d.ts +4 -0
- package/dist/components/data-grid/services/hooked/hooked.d.ts.map +1 -0
- package/dist/components/data-grid/services/internal/internal-helpers.d.ts +2 -0
- package/dist/components/data-grid/services/internal/internal-helpers.d.ts.map +1 -0
- package/dist/components/data-grid/services/layout/components/data-grid-layout-content.d.ts +7 -0
- package/dist/components/data-grid/services/layout/components/data-grid-layout-content.d.ts.map +1 -0
- package/dist/components/data-grid/services/layout/components/data-grid-layout-main-slot-selector.d.ts +4 -0
- package/dist/components/data-grid/services/layout/components/data-grid-layout-main-slot-selector.d.ts.map +1 -0
- package/dist/components/data-grid/services/layout/components/data-grid-layout-main.d.ts +3 -0
- package/dist/components/data-grid/services/layout/components/data-grid-layout-main.d.ts.map +1 -0
- package/dist/components/data-grid/services/layout/components/data-grid-layout-slot.d.ts +7 -0
- package/dist/components/data-grid/services/layout/components/data-grid-layout-slot.d.ts.map +1 -0
- package/dist/components/data-grid/services/layout/components/data-grid-layout-top-default.d.ts +3 -0
- package/dist/components/data-grid/services/layout/components/data-grid-layout-top-default.d.ts.map +1 -0
- package/dist/components/data-grid/services/layout/components/data-grid-layout-top.d.ts +3 -0
- package/dist/components/data-grid/services/layout/components/data-grid-layout-top.d.ts.map +1 -0
- package/dist/components/data-grid/services/layout/data-grid-view.d.ts +16 -0
- package/dist/components/data-grid/services/layout/data-grid-view.d.ts.map +1 -0
- package/dist/components/data-grid/services/layout/layout-service.d.ts +4 -0
- package/dist/components/data-grid/services/layout/layout-service.d.ts.map +1 -0
- package/dist/components/data-grid/services/layout/layout-slot-ids.d.ts +3 -0
- package/dist/components/data-grid/services/layout/layout-slot-ids.d.ts.map +1 -0
- package/dist/components/data-grid/services/layout/layout-types.d.ts +74 -0
- package/dist/components/data-grid/services/layout/layout-types.d.ts.map +1 -0
- package/dist/components/data-grid/services/load/load-instance.d.ts +4 -0
- package/dist/components/data-grid/services/load/load-instance.d.ts.map +1 -0
- package/dist/components/data-grid/services/load/load-service.d.ts +4 -0
- package/dist/components/data-grid/services/load/load-service.d.ts.map +1 -0
- package/dist/components/data-grid/services/load/load-types.d.ts +76 -0
- package/dist/components/data-grid/services/load/load-types.d.ts.map +1 -0
- package/dist/components/data-grid/services/load/use-data-grid-loading.d.ts +16 -0
- package/dist/components/data-grid/services/load/use-data-grid-loading.d.ts.map +1 -0
- package/dist/components/data-grid/services/persistent-state/persistent-state-service.d.ts +4 -0
- package/dist/components/data-grid/services/persistent-state/persistent-state-service.d.ts.map +1 -0
- package/dist/components/data-grid/services/persistent-state/persistent-state-types.d.ts +36 -0
- package/dist/components/data-grid/services/persistent-state/persistent-state-types.d.ts.map +1 -0
- package/dist/components/data-grid/services/plugins/plugins-helpers.d.ts +49 -0
- package/dist/components/data-grid/services/plugins/plugins-helpers.d.ts.map +1 -0
- package/dist/components/data-grid/services/plugins/plugins-service.d.ts +4 -0
- package/dist/components/data-grid/services/plugins/plugins-service.d.ts.map +1 -0
- package/dist/components/data-grid/services/plugins/plugins-types.d.ts +62 -0
- package/dist/components/data-grid/services/plugins/plugins-types.d.ts.map +1 -0
- package/dist/components/data-grid/services/storage/storage-helpers.d.ts +4 -0
- package/dist/components/data-grid/services/storage/storage-helpers.d.ts.map +1 -0
- package/dist/components/data-grid/services/storage/storage-service.d.ts +4 -0
- package/dist/components/data-grid/services/storage/storage-service.d.ts.map +1 -0
- package/dist/components/data-grid/services/storage/storage-types.d.ts +93 -0
- package/dist/components/data-grid/services/storage/storage-types.d.ts.map +1 -0
- package/dist/components/data-grid/services/table/components/data-grid-body-cell-content.d.ts +9 -0
- package/dist/components/data-grid/services/table/components/data-grid-body-cell-content.d.ts.map +1 -0
- package/dist/components/data-grid/services/table/components/data-grid-cell.d.ts +57 -0
- package/dist/components/data-grid/services/table/components/data-grid-cell.d.ts.map +1 -0
- package/dist/components/data-grid/services/table/components/data-grid-content.d.ts +7 -0
- package/dist/components/data-grid/services/table/components/data-grid-content.d.ts.map +1 -0
- package/dist/components/data-grid/services/table/components/data-grid-extra-body-columns.d.ts +8 -0
- package/dist/components/data-grid/services/table/components/data-grid-extra-body-columns.d.ts.map +1 -0
- package/dist/components/data-grid/services/table/components/data-grid-extra-header-cell.d.ts +12 -0
- package/dist/components/data-grid/services/table/components/data-grid-extra-header-cell.d.ts.map +1 -0
- package/dist/components/data-grid/services/table/components/data-grid-extra-header-columns.d.ts +10 -0
- package/dist/components/data-grid/services/table/components/data-grid-extra-header-columns.d.ts.map +1 -0
- package/dist/components/data-grid/services/table/components/data-grid-header-cell-content.d.ts +7 -0
- package/dist/components/data-grid/services/table/components/data-grid-header-cell-content.d.ts.map +1 -0
- package/dist/components/data-grid/services/table/components/data-grid-header-cell-label.d.ts +8 -0
- package/dist/components/data-grid/services/table/components/data-grid-header-cell-label.d.ts.map +1 -0
- package/dist/components/data-grid/services/table/components/data-grid-header-cell.d.ts +11 -0
- package/dist/components/data-grid/services/table/components/data-grid-header-cell.d.ts.map +1 -0
- package/dist/components/data-grid/services/table/components/data-grid-header-group.d.ts +10 -0
- package/dist/components/data-grid/services/table/components/data-grid-header-group.d.ts.map +1 -0
- package/dist/components/data-grid/services/table/components/data-grid-row.d.ts +8 -0
- package/dist/components/data-grid/services/table/components/data-grid-row.d.ts.map +1 -0
- package/dist/components/data-grid/services/table/components/data-grid-table-body.d.ts +3 -0
- package/dist/components/data-grid/services/table/components/data-grid-table-body.d.ts.map +1 -0
- package/dist/components/data-grid/services/table/components/data-grid-table-header.d.ts +3 -0
- package/dist/components/data-grid/services/table/components/data-grid-table-header.d.ts.map +1 -0
- package/dist/components/data-grid/services/table/components/data-grid-table-record.d.ts +8 -0
- package/dist/components/data-grid/services/table/components/data-grid-table-record.d.ts.map +1 -0
- package/dist/components/data-grid/services/table/components/data-grid-table-records.d.ts +8 -0
- package/dist/components/data-grid/services/table/components/data-grid-table-records.d.ts.map +1 -0
- package/dist/components/data-grid/services/table/components/data-grid-table-slot.d.ts +7 -0
- package/dist/components/data-grid/services/table/components/data-grid-table-slot.d.ts.map +1 -0
- package/dist/components/data-grid/services/table/components/data-grid-table.d.ts +3 -0
- package/dist/components/data-grid/services/table/components/data-grid-table.d.ts.map +1 -0
- package/dist/components/data-grid/services/table/data-grid-record-context.d.ts +5 -0
- package/dist/components/data-grid/services/table/data-grid-record-context.d.ts.map +1 -0
- package/dist/components/data-grid/services/table/ignore-row-click.d.ts +2 -0
- package/dist/components/data-grid/services/table/ignore-row-click.d.ts.map +1 -0
- package/dist/components/data-grid/services/table/resolve-body-cell-props.d.ts +21 -0
- package/dist/components/data-grid/services/table/resolve-body-cell-props.d.ts.map +1 -0
- package/dist/components/data-grid/services/table/resolve-column-style.d.ts +62 -0
- package/dist/components/data-grid/services/table/resolve-column-style.d.ts.map +1 -0
- package/dist/components/data-grid/services/table/table-columns-persistence.d.ts +19 -0
- package/dist/components/data-grid/services/table/table-columns-persistence.d.ts.map +1 -0
- package/dist/components/data-grid/services/table/table-columns.d.ts +15 -0
- package/dist/components/data-grid/services/table/table-columns.d.ts.map +1 -0
- package/dist/components/data-grid/services/table/table-context.d.ts +4 -0
- package/dist/components/data-grid/services/table/table-context.d.ts.map +1 -0
- package/dist/components/data-grid/services/table/table-extra-columns.d.ts +12 -0
- package/dist/components/data-grid/services/table/table-extra-columns.d.ts.map +1 -0
- package/dist/components/data-grid/services/table/table-header.d.ts +11 -0
- package/dist/components/data-grid/services/table/table-header.d.ts.map +1 -0
- package/dist/components/data-grid/services/table/table-helpers.d.ts +13 -0
- package/dist/components/data-grid/services/table/table-helpers.d.ts.map +1 -0
- package/dist/components/data-grid/services/table/table-min-content-width.d.ts +36 -0
- package/dist/components/data-grid/services/table/table-min-content-width.d.ts.map +1 -0
- package/dist/components/data-grid/services/table/table-service.d.ts +4 -0
- package/dist/components/data-grid/services/table/table-service.d.ts.map +1 -0
- package/dist/components/data-grid/services/table/table-slots.d.ts +9 -0
- package/dist/components/data-grid/services/table/table-slots.d.ts.map +1 -0
- package/dist/components/data-grid/services/table/table-sticky.d.ts +35 -0
- package/dist/components/data-grid/services/table/table-sticky.d.ts.map +1 -0
- package/dist/components/data-grid/services/table/table-store.d.ts +4 -0
- package/dist/components/data-grid/services/table/table-store.d.ts.map +1 -0
- package/dist/components/data-grid/services/table/table-types.d.ts +239 -0
- package/dist/components/data-grid/services/table/table-types.d.ts.map +1 -0
- package/dist/components/data-grid/utils/debounce.d.ts +7 -0
- package/dist/components/data-grid/utils/debounce.d.ts.map +1 -0
- package/dist/components/data-grid/utils/deep-equal.d.ts +7 -0
- package/dist/components/data-grid/utils/deep-equal.d.ts.map +1 -0
- package/dist/components/data-grid/utils/hooked.d.ts +17 -0
- package/dist/components/data-grid/utils/hooked.d.ts.map +1 -0
- package/dist/components/data-grid/utils/is-record.d.ts +3 -0
- package/dist/components/data-grid/utils/is-record.d.ts.map +1 -0
- package/dist/components/data-grid/utils/load-state.d.ts +22 -0
- package/dist/components/data-grid/utils/load-state.d.ts.map +1 -0
- package/dist/components/data-grid/utils/use-latest.d.ts +4 -0
- package/dist/components/data-grid/utils/use-latest.d.ts.map +1 -0
- package/dist/data-grid/empty-state.d.ts +1 -0
- package/dist/data-grid/empty-state.js +27 -0
- package/dist/data-grid/empty-state.js.map +1 -0
- package/dist/data-grid/order.d.ts +1 -0
- package/dist/data-grid/order.js +254 -0
- package/dist/data-grid/order.js.map +1 -0
- package/dist/data-grid/pagination.d.ts +1 -0
- package/dist/data-grid/pagination.js +215 -0
- package/dist/data-grid/pagination.js.map +1 -0
- package/dist/data-grid/text-search.d.ts +1 -0
- package/dist/data-grid/text-search.js +112 -0
- package/dist/data-grid/text-search.js.map +1 -0
- package/dist/data-grid.d.ts +1 -0
- package/dist/data-grid.js +1650 -0
- package/dist/data-grid.js.map +1 -0
- package/dist/docs/data-grid.md +588 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +385 -367
- package/dist/index.js.map +1 -1
- package/llms.txt +11 -3
- package/package.json +4 -2
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { DataGridPluginApi } from '../../services/plugins/plugins-helpers';
|
|
2
|
+
import { LoadContextOrderItem, OrderDirection } from '../../services/plugins/plugins-types';
|
|
3
|
+
export type DataGridOrderColumnType = 'string' | 'number' | 'date';
|
|
4
|
+
export interface DataGridOrderOption {
|
|
5
|
+
id: string;
|
|
6
|
+
label: string;
|
|
7
|
+
type?: DataGridOrderColumnType;
|
|
8
|
+
}
|
|
9
|
+
export interface DataGridDefaultOrder {
|
|
10
|
+
id: string;
|
|
11
|
+
direction: OrderDirection;
|
|
12
|
+
}
|
|
13
|
+
export interface DataGridOrderPopoverOptions {
|
|
14
|
+
minInlineSize: number;
|
|
15
|
+
}
|
|
16
|
+
export interface DataGridOrderPluginProps extends Record<string, unknown> {
|
|
17
|
+
/**
|
|
18
|
+
* Columns the toolbar order button offers. Removing the prop is the same as passing `[]`: the
|
|
19
|
+
* plugin reads its configuration from the current props, never from a previous render.
|
|
20
|
+
*/
|
|
21
|
+
options?: DataGridOrderOption[];
|
|
22
|
+
/**
|
|
23
|
+
* Column IDs excluded from sorting in the header. An excluded column's header renders as
|
|
24
|
+
* plain text with no click handler and no direction icon. Removing the prop is the same as
|
|
25
|
+
* passing `[]`.
|
|
26
|
+
*
|
|
27
|
+
* Listing a column here as well as in `options` is a supported configuration, and reads as
|
|
28
|
+
* "not from the header, yes from the toolbar button": the button still offers the column, so it
|
|
29
|
+
* stays orderable there and its order is sent like any other. Exclusion then governs the header
|
|
30
|
+
* alone, and how that header should look is the consuming product's decision.
|
|
31
|
+
*
|
|
32
|
+
* A column excluded here and absent from `options` is orderable nowhere: `setOrder` and
|
|
33
|
+
* `toggleOrder` refuse it, and no order for it is sent. An order stored from an earlier session
|
|
34
|
+
* is withheld rather than deleted, so `defaultOrder` applies in its place and the stored value
|
|
35
|
+
* becomes the order again if the column is ever offered — a narrowing can make a stored order
|
|
36
|
+
* unusable without making it wrong. A sort the user cleared by hand still suppresses
|
|
37
|
+
* `defaultOrder`.
|
|
38
|
+
*/
|
|
39
|
+
excludedColumns?: string[];
|
|
40
|
+
/**
|
|
41
|
+
* Order applied when the grid has no usable order of its own, and the order an unorderable
|
|
42
|
+
* stored order falls back to. A sort the user cleared by hand keeps it suppressed; an unusable
|
|
43
|
+
* stored order does not, because that is not a choice. Skipped when its own column is orderable
|
|
44
|
+
* nowhere. It seeds an order rather than governing one: while an applied order stays usable,
|
|
45
|
+
* changing or removing this prop does not re-sort the grid.
|
|
46
|
+
*/
|
|
47
|
+
defaultOrder?: DataGridDefaultOrder;
|
|
48
|
+
/** Sizing overrides for the toolbar button's popover. */
|
|
49
|
+
popover?: DataGridOrderPopoverOptions;
|
|
50
|
+
}
|
|
51
|
+
export interface DataGridOrderPluginApi extends DataGridPluginApi<DataGridOrderPluginProps> {
|
|
52
|
+
useOrder: () => LoadContextOrderItem | undefined;
|
|
53
|
+
useColumnId: () => string | undefined;
|
|
54
|
+
useDirection: () => OrderDirection | undefined;
|
|
55
|
+
toggleOrder: (columnId: string) => void;
|
|
56
|
+
setOrder: (columnId: string, direction: OrderDirection) => void;
|
|
57
|
+
/**
|
|
58
|
+
* Whether the column is excluded from sorting **in the header**. Not an orderability check: a
|
|
59
|
+
* column listed in both `excludedColumns` and `options` returns `true` here and is still
|
|
60
|
+
* orderable through the toolbar button.
|
|
61
|
+
*/
|
|
62
|
+
useIsColumnExcluded: (columnId: string) => boolean;
|
|
63
|
+
useOptions: () => DataGridOrderOption[];
|
|
64
|
+
popover?: DataGridOrderPopoverOptions;
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=order-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"order-types.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-grid/plugins/order/order-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAChF,OAAO,KAAK,EACV,oBAAoB,EACpB,cAAc,EACf,MAAM,sCAAsC,CAAC;AAE9C,MAAM,MAAM,uBAAuB,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,CAAC;AAEnE,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,uBAAuB,CAAC;CAChC;AAED,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,cAAc,CAAC;CAC3B;AAED,MAAM,WAAW,2BAA2B;IAC1C,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,wBAAyB,SAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACvE;;;OAGG;IACH,OAAO,CAAC,EAAE,mBAAmB,EAAE,CAAC;IAChC;;;;;;;;;;;;;;;;OAgBG;IACH,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,oBAAoB,CAAC;IACpC,yDAAyD;IACzD,OAAO,CAAC,EAAE,2BAA2B,CAAC;CACvC;AAED,MAAM,WAAW,sBAAuB,SAAQ,iBAAiB,CAAC,wBAAwB,CAAC;IACzF,QAAQ,EAAE,MAAM,oBAAoB,GAAG,SAAS,CAAC;IACjD,WAAW,EAAE,MAAM,MAAM,GAAG,SAAS,CAAC;IACtC,YAAY,EAAE,MAAM,cAAc,GAAG,SAAS,CAAC;IAC/C,WAAW,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,cAAc,KAAK,IAAI,CAAC;IAChE;;;;OAIG;IACH,mBAAmB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC;IACnD,UAAU,EAAE,MAAM,mBAAmB,EAAE,CAAC;IACxC,OAAO,CAAC,EAAE,2BAA2B,CAAC;CACvC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { DataGridOrderPlugin } from './order-plugin.js';
|
|
2
|
+
export type { DataGridOrderPluginApi, DataGridOrderPluginProps } from './order-plugin.js';
|
|
3
|
+
export type { DataGridOrderOption, DataGridDefaultOrder, DataGridOrderPopoverOptions, } from './order-types.js';
|
|
4
|
+
export { createDataGridOrderOption } from './services/order-option.js';
|
|
5
|
+
//# sourceMappingURL=public.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-grid/plugins/order/public.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,YAAY,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAC1F,YAAY,EACV,mBAAmB,EACnB,oBAAoB,EACpB,2BAA2B,GAC5B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DataGridOrderColumnType } from '../order-types';
|
|
2
|
+
export interface OrderLabels {
|
|
3
|
+
ascending: string;
|
|
4
|
+
descending: string;
|
|
5
|
+
}
|
|
6
|
+
/** What the two directions are called for a column of this type: A-Z, 0-9, oldest first. */
|
|
7
|
+
export declare function getOrderLabels(type?: DataGridOrderColumnType): OrderLabels;
|
|
8
|
+
//# sourceMappingURL=order-labels.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"order-labels.d.ts","sourceRoot":"","sources":["../../../../../../src/components/data-grid/plugins/order/services/order-labels.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAE9D,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,4FAA4F;AAC5F,wBAAgB,cAAc,CAAC,IAAI,GAAE,uBAAkC,GAAG,WAAW,CAmBpF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"order-option.d.ts","sourceRoot":"","sources":["../../../../../../src/components/data-grid/plugins/order/services/order-option.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAE1D,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,mBAAmB,GAAG,mBAAmB,CAM1F"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-grid-pagination.d.ts","sourceRoot":"","sources":["../../../../../../src/components/data-grid/plugins/pagination/components/data-grid-pagination.tsx"],"names":[],"mappings":";AAKA,wBAAgB,kBAAkB,gCA2BjC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface PagerProps {
|
|
3
|
+
/** Total number of items. */
|
|
4
|
+
total: number;
|
|
5
|
+
/** Current page, 1-based. */
|
|
6
|
+
page: number;
|
|
7
|
+
/** Items per page. */
|
|
8
|
+
limit: number;
|
|
9
|
+
/** The page sizes on offer. The selector is drawn only when there is more than one. */
|
|
10
|
+
limits: number[];
|
|
11
|
+
/** Hides the whole pager while everything fits on one page of the smallest size. */
|
|
12
|
+
autoHide?: boolean;
|
|
13
|
+
onPageChange: (page: number) => void;
|
|
14
|
+
onLimitChange: (limit: number) => void;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The grid's pager: a page-size selector, the "page x of y" text and the page buttons, on the
|
|
18
|
+
* kit's Pagination parts. Controlled only, because the pagination plugin owns page and limit.
|
|
19
|
+
*/
|
|
20
|
+
export declare const Pager: import('react').NamedExoticComponent<PagerProps>;
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=pager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pager.d.ts","sourceRoot":"","sources":["../../../../../../src/components/data-grid/plugins/pagination/components/pager.tsx"],"names":[],"mappings":";AAiBA,UAAU,UAAU;IAClB,6BAA6B;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,6BAA6B;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,sBAAsB;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,uFAAuF;IACvF,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,oFAAoF;IACpF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACxC;AAED;;;GAGG;AACH,eAAO,MAAM,KAAK,kDA0GhB,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { StoreApi, UseBoundStore } from 'zustand';
|
|
2
|
+
interface PaginationConfig {
|
|
3
|
+
defaultLimit: number;
|
|
4
|
+
limits: number[];
|
|
5
|
+
autoHide: boolean;
|
|
6
|
+
}
|
|
7
|
+
interface PaginationStore {
|
|
8
|
+
page: number;
|
|
9
|
+
limit: number;
|
|
10
|
+
total: number;
|
|
11
|
+
}
|
|
12
|
+
type ConfigStore = PaginationConfig;
|
|
13
|
+
export interface DataGridPaginationPluginProps {
|
|
14
|
+
defaultLimit?: number;
|
|
15
|
+
limits?: number[];
|
|
16
|
+
autoHide?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface PaginationPluginApi {
|
|
19
|
+
useConfigStore: UseBoundStore<StoreApi<ConfigStore>>;
|
|
20
|
+
usePaginationStore: UseBoundStore<StoreApi<PaginationStore>>;
|
|
21
|
+
useLimit: () => number;
|
|
22
|
+
getPage: () => number;
|
|
23
|
+
getLimit: () => number;
|
|
24
|
+
onPropsChange: (props: unknown) => void;
|
|
25
|
+
setPage: (page: number) => void;
|
|
26
|
+
setLimit: (limit: number) => void;
|
|
27
|
+
setTotal: (total: number) => void;
|
|
28
|
+
}
|
|
29
|
+
export declare const DataGridPaginationPlugin: import('react').NamedExoticComponent<DataGridPaginationPluginProps>;
|
|
30
|
+
export {};
|
|
31
|
+
//# sourceMappingURL=pagination-plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pagination-plugin.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-grid/plugins/pagination/pagination-plugin.tsx"],"names":[],"mappings":";AAQA,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAMvD,UAAU,gBAAgB;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,UAAU,eAAe;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED,KAAK,WAAW,GAAG,gBAAgB,CAAC;AAEpC,MAAM,WAAW,6BAA6B;IAC5C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,mBAAmB;IAClC,cAAc,EAAE,aAAa,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC;IACrD,kBAAkB,EAAE,aAAa,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC,CAAC;IAC7D,QAAQ,EAAE,MAAM,MAAM,CAAC;IACvB,OAAO,EAAE,MAAM,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,MAAM,CAAC;IACvB,aAAa,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACxC,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAUD,eAAO,MAAM,wBAAwB,qEA6HpC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-grid/plugins/pagination/public.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAClE,YAAY,EAAE,6BAA6B,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type PaginationItem = {
|
|
2
|
+
type: 'page';
|
|
3
|
+
page: number;
|
|
4
|
+
} | {
|
|
5
|
+
type: 'ellipsis';
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* The page numbers to draw, with an ellipsis where a run is collapsed: the first and last page
|
|
9
|
+
* always, the current page and one neighbour either side, and room for the whole list when it is
|
|
10
|
+
* short enough to fit.
|
|
11
|
+
*/
|
|
12
|
+
export declare function computePaginationItems(page: number, totalPages: number): PaginationItem[];
|
|
13
|
+
export declare function usePaginationItems(page: number, totalPages: number): PaginationItem[];
|
|
14
|
+
//# sourceMappingURL=pagination-items.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pagination-items.d.ts","sourceRoot":"","sources":["../../../../../../src/components/data-grid/plugins/pagination/services/pagination-items.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,cAAc,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,CAAC;AAkBnF;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,cAAc,EAAE,CAsCzF;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,cAAc,EAAE,CAErF"}
|
package/dist/components/data-grid/plugins/text-search/components/data-grid-text-search.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-grid-text-search.d.ts","sourceRoot":"","sources":["../../../../../../src/components/data-grid/plugins/text-search/components/data-grid-text-search.tsx"],"names":[],"mappings":";AAWA,wBAAgB,kBAAkB,gCAyCjC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-grid/plugins/text-search/public.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACnE,YAAY,EACV,6BAA6B,EAC7B,2BAA2B,EAC3B,6BAA6B,GAC9B,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/**
|
|
3
|
+
* The value this plugin contributes to the grid's load context, keyed by `filterKey`
|
|
4
|
+
* (default `"textSearch"`). The `load` callback reads it as `filters[filterKey]` and
|
|
5
|
+
* forwards `value` to the request — the plugin renders the search box but does not wire
|
|
6
|
+
* the value to the backend itself.
|
|
7
|
+
*/
|
|
8
|
+
export interface DataGridTextSearchFilterValue {
|
|
9
|
+
value: string;
|
|
10
|
+
}
|
|
11
|
+
export interface DataGridTextSearchPluginProps {
|
|
12
|
+
/**
|
|
13
|
+
* Key this plugin writes its value under in the load context (default `"textSearch"`).
|
|
14
|
+
* Read it in `load` as `filters[filterKey]`, typed {@link DataGridTextSearchFilterValue}.
|
|
15
|
+
*/
|
|
16
|
+
filterKey?: string;
|
|
17
|
+
placeholder?: string;
|
|
18
|
+
fullWidth?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface DataGridTextSearchPluginApi {
|
|
21
|
+
useQuery: () => string;
|
|
22
|
+
usePlaceholder: () => string;
|
|
23
|
+
useFullWidth: () => boolean;
|
|
24
|
+
onPropsChange: (props: DataGridTextSearchPluginProps) => void;
|
|
25
|
+
setSearch: (value: string) => void;
|
|
26
|
+
updateSearch: (value: string) => void;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Text-search toolbar plugin for `DataGrid`. Renders a debounced search box and
|
|
30
|
+
* contributes its value to the load context as `filters[filterKey] = { value }`
|
|
31
|
+
* (default key `"textSearch"`).
|
|
32
|
+
*
|
|
33
|
+
* Wiring is not automatic: the grid's `load` callback must read the value and pass it to
|
|
34
|
+
* the request — e.g. `const query = filters.textSearch?.value` — otherwise the box renders
|
|
35
|
+
* but search does nothing. See {@link DataGridTextSearchFilterValue}.
|
|
36
|
+
*/
|
|
37
|
+
export declare const DataGridTextSearchPlugin: import('react').NamedExoticComponent<DataGridTextSearchPluginProps>;
|
|
38
|
+
//# sourceMappingURL=text-search-plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-search-plugin.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-grid/plugins/text-search/text-search-plugin.tsx"],"names":[],"mappings":";AAuBA;;;;;GAKG;AACH,MAAM,WAAW,6BAA6B;IAC5C,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,6BAA6B;IAC5C;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,EAAE,MAAM,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,MAAM,CAAC;IAC7B,YAAY,EAAE,MAAM,OAAO,CAAC;IAC5B,aAAa,EAAE,CAAC,KAAK,EAAE,6BAA6B,KAAK,IAAI,CAAC;IAC9D,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACvC;AAKD;;;;;;;;GAQG;AACH,eAAO,MAAM,wBAAwB,qEAiGnC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { DataGrid } from './data-grid.js';
|
|
2
|
+
export { useDataGrid, useDataGridPluginContext } from './services/core/data-grid-context.js';
|
|
3
|
+
export type { DataGridConfig, DataGridItem, DataGridLabel, DataGridProps, DataGridLoadContext, DataGridLoadResult, } from './data-grid-types.js';
|
|
4
|
+
export type { DataGridHooks } from './services/hooked/hooked-types.js';
|
|
5
|
+
export type { DataGridPlugin, DataGridPluginContext } from './services/plugins/plugins-types.js';
|
|
6
|
+
export type { DataGridTableColumn, DataGridTableColumnOverflow, DataGridTableGroup, DataGridTableLayout, } from './services/table/table-types.js';
|
|
7
|
+
export { createDataGridPlugin } from './services/plugins/plugins-helpers.js';
|
|
8
|
+
export type { DataGridPluginApi } from './services/plugins/plugins-helpers.js';
|
|
9
|
+
export { useDataGridRecord } from './services/table/data-grid-record-context.js';
|
|
10
|
+
export { DATA_GRID_VIEW, useDataGridActiveView } from './services/layout/data-grid-view.js';
|
|
11
|
+
export type { DataGridViewId } from './services/layout/data-grid-view.js';
|
|
12
|
+
//# sourceMappingURL=public.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/components/data-grid/public.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAC7F,YAAY,EACV,cAAc,EACd,YAAY,EACZ,aAAa,EACb,aAAa,EACb,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AACvE,YAAY,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AACjG,YAAY,EACV,mBAAmB,EACnB,2BAA2B,EAC3B,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,iCAAiC,CAAC;AAGzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,YAAY,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAE/E,OAAO,EAAE,iBAAiB,EAAE,MAAM,8CAA8C,CAAC;AACjF,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAC5F,YAAY,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface ColumnAutoSize {
|
|
2
|
+
measureRef: (element: HTMLElement | null) => void;
|
|
3
|
+
destroy: () => void;
|
|
4
|
+
}
|
|
5
|
+
export declare function createColumnAutoSize(onWidthChange: (width: string) => void): ColumnAutoSize;
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=create-column-auto-size.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-column-auto-size.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-grid/services/columns/create-column-auto-size.ts"],"names":[],"mappings":"AAAA,UAAU,cAAc;IACtB,UAAU,EAAE,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAC;IAClD,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,wBAAgB,oBAAoB,CAAC,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,GAAG,cAAc,CAoH3F"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core-service.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-grid/services/core/core-service.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAwB,MAAM,cAAc,CAAC;AAEtE,wBAAgB,iBAAiB,IAAI,WAAW,CAkB/C"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { StoreApi, UseBoundStore } from 'zustand';
|
|
2
|
+
import { UseLoadStateStore } from '../../utils/load-state';
|
|
3
|
+
export interface ExternalLoadingStore {
|
|
4
|
+
/** Loading state supplied by the consumer, independent of the grid's own data loads. */
|
|
5
|
+
loading: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface CoreService {
|
|
8
|
+
useLoadStateStore: UseLoadStateStore;
|
|
9
|
+
loadPromise: <T>(promise: Promise<T>) => Promise<T>;
|
|
10
|
+
/** Back to idle, so the next `init()` runs the first load again. */
|
|
11
|
+
resetLoadState: () => void;
|
|
12
|
+
/**
|
|
13
|
+
* Consumer-driven loading state. Kept in its own store rather than in either load-state machine:
|
|
14
|
+
* the load service derives its state from the in-flight instance map, so a value written there
|
|
15
|
+
* would be overwritten on the next load event.
|
|
16
|
+
*/
|
|
17
|
+
useExternalLoadingStore: UseBoundStore<StoreApi<ExternalLoadingStore>>;
|
|
18
|
+
/**
|
|
19
|
+
* Backs the `loading` prop, and is the only writer of it. Deliberately not exposed on the grid
|
|
20
|
+
* instance: the instance is reachable only from inside `DataGrid` via `useDataGrid()`, so an
|
|
21
|
+
* imperative setter would be a second writer of one boolean with last-write-wins between them,
|
|
22
|
+
* for a caller shape nothing needs yet. Add it back with its own slot when something does.
|
|
23
|
+
*
|
|
24
|
+
* @internal
|
|
25
|
+
*/
|
|
26
|
+
updateLoading: (loading: boolean) => void;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=core-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core-types.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-grid/services/core/core-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACvD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEhE,MAAM,WAAW,oBAAoB;IACnC,wFAAwF;IACxF,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,WAAW;IAC1B,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,WAAW,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;IACpD,oEAAoE;IACpE,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B;;;;OAIG;IACH,uBAAuB,EAAE,aAAa,CAAC,QAAQ,CAAC,oBAAoB,CAAC,CAAC,CAAC;IACvE;;;;;;;OAOG;IACH,aAAa,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CAC3C"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { DataGridInstance, DataGridItem, InternalContext } from '../../data-grid-types';
|
|
2
|
+
import { DataGridPlugin, DataGridPluginContext } from '../plugins/plugins-types';
|
|
3
|
+
export declare const DataGridProvider: import('react').Provider<DataGridInstance<any, any[]> | null>;
|
|
4
|
+
export declare function useDataGrid<TItem extends DataGridItem = DataGridItem, TPlugins extends DataGridPlugin<TItem>[] = DataGridPlugin<TItem>[]>(): DataGridInstance<TItem, TPlugins>;
|
|
5
|
+
/**
|
|
6
|
+
* Hook for plugins to access public plugin context.
|
|
7
|
+
* Provides access to plugin APIs, hooks, storage, and layout registration.
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
10
|
+
export declare function useDataGridPluginContext<TItem extends DataGridItem = DataGridItem>(): DataGridPluginContext<TItem>;
|
|
11
|
+
/**
|
|
12
|
+
* Hook for internal access to all grid services.
|
|
13
|
+
* Not exported in public API - for internal use only.
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
16
|
+
export declare function useDataGridContext<TItem extends DataGridItem = DataGridItem>(): InternalContext<TItem>;
|
|
17
|
+
//# sourceMappingURL=data-grid-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-grid-context.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-grid/services/core/data-grid-context.tsx"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7F,OAAO,KAAK,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAKtF,eAAO,MAAM,gBAAgB,+DAA2B,CAAC;AAEzD,wBAAgB,WAAW,CACzB,KAAK,SAAS,YAAY,GAAG,YAAY,EACzC,QAAQ,SAAS,cAAc,CAAC,KAAK,CAAC,EAAE,GAAG,cAAc,CAAC,KAAK,CAAC,EAAE,KAC/D,gBAAgB,CAAC,KAAK,EAAE,QAAQ,CAAC,CAOrC;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CACtC,KAAK,SAAS,YAAY,GAAG,YAAY,KACtC,qBAAqB,CAAC,KAAK,CAAC,CAIhC;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,SAAS,YAAY,GAAG,YAAY,KACtC,eAAe,CAAC,KAAK,CAAC,CAI1B"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Hooked } from '../../utils/hooked';
|
|
2
|
+
import { DataGridItem, DataGridLoadResult } from '../../data-grid-types';
|
|
3
|
+
import { LoadInstance } from '../load/load-types';
|
|
4
|
+
/**
|
|
5
|
+
* Lifecycle hooks available for plugins.
|
|
6
|
+
*
|
|
7
|
+
* **Initialization:**
|
|
8
|
+
* - `init` - Grid initializes
|
|
9
|
+
* - `destroy` - Grid unmounts
|
|
10
|
+
*
|
|
11
|
+
* **Load Lifecycle:**
|
|
12
|
+
* - `load:prepare` - Before load starts
|
|
13
|
+
* - `load:context` - Modify load context (add filters, pagination)
|
|
14
|
+
* - `load:process` - Process load result before storing
|
|
15
|
+
* - `load:store` - After data is stored (extract totals)
|
|
16
|
+
* - `load:success` - Successful load
|
|
17
|
+
* - `load:error` - Load error
|
|
18
|
+
*
|
|
19
|
+
* **Data Operations:**
|
|
20
|
+
* - `refresh` - Data refresh triggered
|
|
21
|
+
*/
|
|
22
|
+
export interface DataGridHooks<TItem extends DataGridItem> {
|
|
23
|
+
init: () => void;
|
|
24
|
+
destroy: () => void;
|
|
25
|
+
'load:prepare': (instance: LoadInstance<TItem>) => void;
|
|
26
|
+
'load:context': (instance: LoadInstance<TItem>) => Partial<LoadInstance<TItem>['loadContext']> | void;
|
|
27
|
+
'load:process': (instance: LoadInstance<TItem>) => DataGridLoadResult<TItem> | void;
|
|
28
|
+
'load:store': (instance: LoadInstance<TItem>) => boolean | void;
|
|
29
|
+
'load:success': (instance: LoadInstance<TItem>) => void;
|
|
30
|
+
'load:error': (instance: LoadInstance<TItem>) => void;
|
|
31
|
+
refresh: (options: object) => void;
|
|
32
|
+
}
|
|
33
|
+
export type DataGridHooked<TItem extends DataGridItem> = Pick<Hooked<DataGridHooks<TItem>>, 'hook' | 'callHook' | 'callHookParallel' | 'callHookSync'>;
|
|
34
|
+
//# sourceMappingURL=hooked-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooked-types.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-grid/services/hooked/hooked-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC9E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,aAAa,CAAC,KAAK,SAAS,YAAY;IACvD,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,cAAc,EAAE,CAAC,QAAQ,EAAE,YAAY,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC;IACxD,cAAc,EAAE,CACd,QAAQ,EAAE,YAAY,CAAC,KAAK,CAAC,KAC1B,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,aAAa,CAAC,CAAC,GAAG,IAAI,CAAC;IACxD,cAAc,EAAE,CAAC,QAAQ,EAAE,YAAY,CAAC,KAAK,CAAC,KAAK,kBAAkB,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC;IACpF,YAAY,EAAE,CAAC,QAAQ,EAAE,YAAY,CAAC,KAAK,CAAC,KAAK,OAAO,GAAG,IAAI,CAAC;IAChE,cAAc,EAAE,CAAC,QAAQ,EAAE,YAAY,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC;IACxD,YAAY,EAAE,CAAC,QAAQ,EAAE,YAAY,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC;IACtD,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC;AAED,MAAM,MAAM,cAAc,CAAC,KAAK,SAAS,YAAY,IAAI,IAAI,CAC3D,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,EAC5B,MAAM,GAAG,UAAU,GAAG,kBAAkB,GAAG,cAAc,CAC1D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooked.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-grid/services/hooked/hooked.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAiB,MAAM,gBAAgB,CAAC;AAEpE,wBAAgB,mBAAmB,CAAC,KAAK,SAAS,YAAY,KAAK,cAAc,CAAC,KAAK,CAAC,CASvF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal-helpers.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-grid/services/internal/internal-helpers.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,eAA+B,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
interface DataGridLayoutContentProps {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
}
|
|
5
|
+
export declare function DataGridLayoutContent({ children }: DataGridLayoutContentProps): import("react").JSX.Element;
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=data-grid-layout-content.d.ts.map
|
package/dist/components/data-grid/services/layout/components/data-grid-layout-content.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-grid-layout-content.d.ts","sourceRoot":"","sources":["../../../../../../src/components/data-grid/services/layout/components/data-grid-layout-content.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAOvC,UAAU,0BAA0B;IAClC,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,qBAAqB,CAAC,EAAE,QAAQ,EAAE,EAAE,0BAA0B,+BAwB7E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-grid-layout-main-slot-selector.d.ts","sourceRoot":"","sources":["../../../../../../src/components/data-grid/services/layout/components/data-grid-layout-main-slot-selector.tsx"],"names":[],"mappings":";AAMA,eAAO,MAAM,qBAAqB,kBAAkB,CAAC;AASrD,wBAAgB,8BAA8B,uCA8B7C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-grid-layout-main.d.ts","sourceRoot":"","sources":["../../../../../../src/components/data-grid/services/layout/components/data-grid-layout-main.tsx"],"names":[],"mappings":";AAIA,wBAAgB,kBAAkB,gCA6BjC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { LayoutSlotName } from '../layout-types';
|
|
2
|
+
interface DataGridLayoutSlotProps {
|
|
3
|
+
name: LayoutSlotName;
|
|
4
|
+
}
|
|
5
|
+
export declare function DataGridLayoutSlot({ name }: DataGridLayoutSlotProps): import("react").JSX.Element | null;
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=data-grid-layout-slot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-grid-layout-slot.d.ts","sourceRoot":"","sources":["../../../../../../src/components/data-grid/services/layout/components/data-grid-layout-slot.tsx"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD,UAAU,uBAAuB;IAC/B,IAAI,EAAE,cAAc,CAAC;CACtB;AAED,wBAAgB,kBAAkB,CAAC,EAAE,IAAI,EAAE,EAAE,uBAAuB,sCAanE"}
|
package/dist/components/data-grid/services/layout/components/data-grid-layout-top-default.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-grid-layout-top-default.d.ts","sourceRoot":"","sources":["../../../../../../src/components/data-grid/services/layout/components/data-grid-layout-top-default.tsx"],"names":[],"mappings":";AAGA,wBAAgB,wBAAwB,uCAmCvC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-grid-layout-top.d.ts","sourceRoot":"","sources":["../../../../../../src/components/data-grid/services/layout/components/data-grid-layout-top.tsx"],"names":[],"mappings":";AAGA,wBAAgB,iBAAiB,uCAahC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Stable ids of the built-in DataGrid main views. Use these instead of hardcoding the raw slot-id
|
|
3
|
+
* strings when reading or setting the active view (e.g. `grid.setActiveSlotId('main', DATA_GRID_VIEW.cards)`).
|
|
4
|
+
*/
|
|
5
|
+
export declare const DATA_GRID_VIEW: {
|
|
6
|
+
readonly table: "table_layout";
|
|
7
|
+
readonly cards: "cards_layout";
|
|
8
|
+
};
|
|
9
|
+
/** A built-in DataGrid main-view slot id. */
|
|
10
|
+
export type DataGridViewId = (typeof DATA_GRID_VIEW)[keyof typeof DATA_GRID_VIEW];
|
|
11
|
+
/**
|
|
12
|
+
* Reactively read the id of the currently active DataGrid main view (e.g. the table view, or a cards view that a plugin registers).
|
|
13
|
+
* Re-renders when the active view changes. Returns `undefined` before any main view is active.
|
|
14
|
+
*/
|
|
15
|
+
export declare function useDataGridActiveView(): string | undefined;
|
|
16
|
+
//# sourceMappingURL=data-grid-view.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-grid-view.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-grid/services/layout/data-grid-view.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,eAAO,MAAM,cAAc;;;CAGjB,CAAC;AAEX,6CAA6C;AAC7C,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC;AAElF;;;GAGG;AACH,wBAAgB,qBAAqB,IAAI,MAAM,GAAG,SAAS,CAG1D"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { DataGridItem, InternalContext } from '../../data-grid-types';
|
|
2
|
+
import { LayoutService } from './layout-types';
|
|
3
|
+
export declare function createLayoutService<TItem extends DataGridItem>(context: InternalContext<TItem>): LayoutService;
|
|
4
|
+
//# sourceMappingURL=layout-service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout-service.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-grid/services/layout/layout-service.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAK3E,OAAO,KAAK,EAEV,aAAa,EAKd,MAAM,gBAAgB,CAAC;AAExB,wBAAgB,mBAAmB,CAAC,KAAK,SAAS,YAAY,EAC5D,OAAO,EAAE,eAAe,CAAC,KAAK,CAAC,GAC9B,aAAa,CAiFf"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout-slot-ids.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-grid/services/layout/layout-slot-ids.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,oBAAoB,iBAAiB,CAAC;AACnD,eAAO,MAAM,oBAAoB,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
import { StoreApi, UseBoundStore } from 'zustand';
|
|
3
|
+
export interface LayoutSlotBase<Name extends string> {
|
|
4
|
+
id: string;
|
|
5
|
+
name: Name;
|
|
6
|
+
component: ComponentType;
|
|
7
|
+
order: number;
|
|
8
|
+
}
|
|
9
|
+
export interface MainLayoutSlot extends LayoutSlotBase<'main'> {
|
|
10
|
+
icon?: ComponentType;
|
|
11
|
+
}
|
|
12
|
+
export type LayoutSlot = MainLayoutSlot | LayoutSlotBase<'bottom'> | LayoutSlotBase<'top'> | LayoutSlotBase<'top-start'> | LayoutSlotBase<'top-end'> | LayoutSlotBase<'empty'>;
|
|
13
|
+
/**
|
|
14
|
+
* Layout slot names for the data grid.
|
|
15
|
+
*
|
|
16
|
+
* - `'top-start'` - Top left area (secondary filters, tags)
|
|
17
|
+
* - `'top'` - Top center area (primary filters, search)
|
|
18
|
+
* - `'top-end'` - Top right area (actions, buttons)
|
|
19
|
+
* - `'main'` - Primary content area (table, cards, list)
|
|
20
|
+
* - `'bottom'` - Footer area (pagination, totals)
|
|
21
|
+
* - `'empty'` - Replaces the built-in empty state when the grid has no records
|
|
22
|
+
*/
|
|
23
|
+
export type LayoutSlotName = LayoutSlot['name'];
|
|
24
|
+
export interface LayoutSlotOption {
|
|
25
|
+
id?: string;
|
|
26
|
+
component: ComponentType;
|
|
27
|
+
order?: number;
|
|
28
|
+
}
|
|
29
|
+
export interface MainLayoutSlotOption extends LayoutSlotOption {
|
|
30
|
+
icon?: ComponentType;
|
|
31
|
+
active?: boolean;
|
|
32
|
+
}
|
|
33
|
+
export interface TopLayoutSlotOption extends LayoutSlotOption {
|
|
34
|
+
active?: boolean;
|
|
35
|
+
}
|
|
36
|
+
export interface LayoutSlotOptions {
|
|
37
|
+
main: MainLayoutSlotOption;
|
|
38
|
+
bottom: LayoutSlotOption;
|
|
39
|
+
top: TopLayoutSlotOption;
|
|
40
|
+
'top-start': LayoutSlotOption;
|
|
41
|
+
'top-end': LayoutSlotOption;
|
|
42
|
+
empty: LayoutSlotOption;
|
|
43
|
+
}
|
|
44
|
+
export interface LayoutPublicApi {
|
|
45
|
+
/**
|
|
46
|
+
* Register a component in a layout slot.
|
|
47
|
+
*
|
|
48
|
+
* @param name - The slot name to register the component in
|
|
49
|
+
* @param options - Configuration for the slot component
|
|
50
|
+
*/
|
|
51
|
+
registerSlot: <T extends LayoutSlotName>(name: T, options: LayoutSlotOptions[T]) => void;
|
|
52
|
+
/**
|
|
53
|
+
* Set the active component for a slot.
|
|
54
|
+
*
|
|
55
|
+
* @param name - The slot name
|
|
56
|
+
* @param id - The component ID to activate
|
|
57
|
+
*/
|
|
58
|
+
setActiveSlotId: (name: LayoutSlotName, id: string) => void;
|
|
59
|
+
/**
|
|
60
|
+
* Read the active component id for a slot.
|
|
61
|
+
*
|
|
62
|
+
* @param name - The slot name
|
|
63
|
+
* @returns The active component ID, or `undefined` if none is active
|
|
64
|
+
*/
|
|
65
|
+
getActiveSlotId: (name: LayoutSlotName) => string | undefined;
|
|
66
|
+
}
|
|
67
|
+
export interface LayoutStore {
|
|
68
|
+
slots: Map<LayoutSlotName, LayoutSlot[]>;
|
|
69
|
+
activeSlotIds: Map<LayoutSlotName, string>;
|
|
70
|
+
}
|
|
71
|
+
export interface LayoutService extends LayoutPublicApi {
|
|
72
|
+
useLayoutStore: UseBoundStore<StoreApi<LayoutStore>>;
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=layout-types.d.ts.map
|