@toolbox-web/grid 0.6.0 → 1.1.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/README.md +79 -26
- package/all.d.ts +1 -0
- package/all.d.ts.map +1 -1
- package/all.js +1899 -2696
- package/all.js.map +1 -1
- package/index.js +1498 -2489
- package/index.js.map +1 -1
- package/lib/core/constants.d.ts +8 -0
- package/lib/core/constants.d.ts.map +1 -1
- package/lib/core/grid.d.ts +704 -55
- package/lib/core/grid.d.ts.map +1 -1
- package/lib/core/internal/config-manager.d.ts +3 -7
- package/lib/core/internal/config-manager.d.ts.map +1 -1
- package/lib/core/internal/dom-builder.d.ts +2 -10
- package/lib/core/internal/dom-builder.d.ts.map +1 -1
- package/lib/core/internal/inference.d.ts.map +1 -1
- package/lib/core/internal/keyboard.d.ts.map +1 -1
- package/lib/core/internal/render-scheduler.d.ts +2 -0
- package/lib/core/internal/render-scheduler.d.ts.map +1 -1
- package/lib/core/internal/rows.d.ts +9 -1
- package/lib/core/internal/rows.d.ts.map +1 -1
- package/lib/core/internal/shell.d.ts +41 -41
- package/lib/core/internal/shell.d.ts.map +1 -1
- package/lib/core/internal/validate-config.d.ts +10 -0
- package/lib/core/internal/validate-config.d.ts.map +1 -1
- package/lib/core/plugin/base-plugin.d.ts +103 -15
- package/lib/core/plugin/base-plugin.d.ts.map +1 -1
- package/lib/core/plugin/index.d.ts +1 -1
- package/lib/core/plugin/index.d.ts.map +1 -1
- package/lib/core/plugin/types.d.ts +33 -6
- package/lib/core/plugin/types.d.ts.map +1 -1
- package/lib/core/types.d.ts +376 -68
- package/lib/core/types.d.ts.map +1 -1
- package/lib/plugins/clipboard/ClipboardPlugin.d.ts +89 -2
- package/lib/plugins/clipboard/ClipboardPlugin.d.ts.map +1 -1
- package/lib/plugins/clipboard/index.d.ts +2 -0
- package/lib/plugins/clipboard/index.d.ts.map +1 -1
- package/lib/plugins/clipboard/index.js +46 -35
- package/lib/plugins/clipboard/index.js.map +1 -1
- package/lib/plugins/column-virtualization/ColumnVirtualizationPlugin.d.ts +57 -2
- package/lib/plugins/column-virtualization/ColumnVirtualizationPlugin.d.ts.map +1 -1
- package/lib/plugins/column-virtualization/index.d.ts +2 -0
- package/lib/plugins/column-virtualization/index.d.ts.map +1 -1
- package/lib/plugins/column-virtualization/index.js +55 -43
- package/lib/plugins/column-virtualization/index.js.map +1 -1
- package/lib/plugins/context-menu/ContextMenuPlugin.d.ts +75 -5
- package/lib/plugins/context-menu/ContextMenuPlugin.d.ts.map +1 -1
- package/lib/plugins/context-menu/index.d.ts +3 -1
- package/lib/plugins/context-menu/index.d.ts.map +1 -1
- package/lib/plugins/context-menu/index.js +76 -66
- package/lib/plugins/context-menu/index.js.map +1 -1
- package/lib/plugins/editing/EditingPlugin.d.ts +107 -10
- package/lib/plugins/editing/EditingPlugin.d.ts.map +1 -1
- package/lib/plugins/editing/editors.d.ts +9 -1
- package/lib/plugins/editing/editors.d.ts.map +1 -1
- package/lib/plugins/editing/index.d.ts +4 -2
- package/lib/plugins/editing/index.d.ts.map +1 -1
- package/lib/plugins/editing/index.js +458 -279
- package/lib/plugins/editing/index.js.map +1 -1
- package/lib/plugins/editing/types.d.ts +88 -0
- package/lib/plugins/editing/types.d.ts.map +1 -1
- package/lib/plugins/export/ExportPlugin.d.ts +73 -7
- package/lib/plugins/export/ExportPlugin.d.ts.map +1 -1
- package/lib/plugins/export/index.d.ts +2 -0
- package/lib/plugins/export/index.d.ts.map +1 -1
- package/lib/plugins/export/index.js +40 -33
- package/lib/plugins/export/index.js.map +1 -1
- package/lib/plugins/filtering/FilteringPlugin.d.ts +98 -2
- package/lib/plugins/filtering/FilteringPlugin.d.ts.map +1 -1
- package/lib/plugins/filtering/index.d.ts +2 -0
- package/lib/plugins/filtering/index.d.ts.map +1 -1
- package/lib/plugins/filtering/index.js +31 -17
- package/lib/plugins/filtering/index.js.map +1 -1
- package/lib/plugins/grouping-columns/GroupingColumnsPlugin.d.ts +86 -7
- package/lib/plugins/grouping-columns/GroupingColumnsPlugin.d.ts.map +1 -1
- package/lib/plugins/grouping-columns/index.d.ts +2 -0
- package/lib/plugins/grouping-columns/index.d.ts.map +1 -1
- package/lib/plugins/grouping-columns/index.js +57 -27
- package/lib/plugins/grouping-columns/index.js.map +1 -1
- package/lib/plugins/grouping-rows/GroupingRowsPlugin.d.ts +81 -5
- package/lib/plugins/grouping-rows/GroupingRowsPlugin.d.ts.map +1 -1
- package/lib/plugins/grouping-rows/index.d.ts +3 -1
- package/lib/plugins/grouping-rows/index.d.ts.map +1 -1
- package/lib/plugins/grouping-rows/index.js +35 -21
- package/lib/plugins/grouping-rows/index.js.map +1 -1
- package/lib/plugins/master-detail/MasterDetailPlugin.d.ts +90 -5
- package/lib/plugins/master-detail/MasterDetailPlugin.d.ts.map +1 -1
- package/lib/plugins/master-detail/index.d.ts +2 -0
- package/lib/plugins/master-detail/index.d.ts.map +1 -1
- package/lib/plugins/master-detail/index.js +33 -17
- package/lib/plugins/master-detail/index.js.map +1 -1
- package/lib/plugins/multi-sort/MultiSortPlugin.d.ts +83 -2
- package/lib/plugins/multi-sort/MultiSortPlugin.d.ts.map +1 -1
- package/lib/plugins/multi-sort/index.d.ts +2 -0
- package/lib/plugins/multi-sort/index.d.ts.map +1 -1
- package/lib/plugins/multi-sort/index.js +33 -19
- package/lib/plugins/multi-sort/index.js.map +1 -1
- package/lib/plugins/pinned-columns/PinnedColumnsPlugin.d.ts +67 -3
- package/lib/plugins/pinned-columns/PinnedColumnsPlugin.d.ts.map +1 -1
- package/lib/plugins/pinned-columns/index.d.ts +3 -1
- package/lib/plugins/pinned-columns/index.d.ts.map +1 -1
- package/lib/plugins/pinned-columns/index.js +43 -17
- package/lib/plugins/pinned-columns/index.js.map +1 -1
- package/lib/plugins/pinned-rows/PinnedRowsPlugin.d.ts +71 -10
- package/lib/plugins/pinned-rows/PinnedRowsPlugin.d.ts.map +1 -1
- package/lib/plugins/pinned-rows/index.d.ts +3 -1
- package/lib/plugins/pinned-rows/index.d.ts.map +1 -1
- package/lib/plugins/pinned-rows/index.js +27 -17
- package/lib/plugins/pinned-rows/index.js.map +1 -1
- package/lib/plugins/pivot/PivotPlugin.d.ts +81 -4
- package/lib/plugins/pivot/PivotPlugin.d.ts.map +1 -1
- package/lib/plugins/pivot/index.d.ts +2 -0
- package/lib/plugins/pivot/index.d.ts.map +1 -1
- package/lib/plugins/pivot/index.js +32 -17
- package/lib/plugins/pivot/index.js.map +1 -1
- package/lib/plugins/reorder/ReorderPlugin.d.ts +71 -3
- package/lib/plugins/reorder/ReorderPlugin.d.ts.map +1 -1
- package/lib/plugins/reorder/index.d.ts +2 -0
- package/lib/plugins/reorder/index.d.ts.map +1 -1
- package/lib/plugins/reorder/index.js +30 -18
- package/lib/plugins/reorder/index.js.map +1 -1
- package/lib/plugins/reorder/types.d.ts +0 -5
- package/lib/plugins/reorder/types.d.ts.map +1 -1
- package/lib/plugins/responsive/ResponsivePlugin.d.ts +123 -0
- package/lib/plugins/responsive/ResponsivePlugin.d.ts.map +1 -0
- package/lib/plugins/responsive/index.d.ts +11 -0
- package/lib/plugins/responsive/index.d.ts.map +1 -0
- package/lib/plugins/responsive/index.js +589 -0
- package/lib/plugins/responsive/index.js.map +1 -0
- package/lib/plugins/responsive/types.d.ts +133 -0
- package/lib/plugins/responsive/types.d.ts.map +1 -0
- package/lib/plugins/selection/SelectionPlugin.d.ts +90 -21
- package/lib/plugins/selection/SelectionPlugin.d.ts.map +1 -1
- package/lib/plugins/selection/index.d.ts +3 -2
- package/lib/plugins/selection/index.d.ts.map +1 -1
- package/lib/plugins/selection/index.js +125 -144
- package/lib/plugins/selection/index.js.map +1 -1
- package/lib/plugins/selection/types.d.ts +51 -4
- package/lib/plugins/selection/types.d.ts.map +1 -1
- package/lib/plugins/server-side/ServerSidePlugin.d.ts +65 -4
- package/lib/plugins/server-side/ServerSidePlugin.d.ts.map +1 -1
- package/lib/plugins/server-side/index.d.ts +3 -1
- package/lib/plugins/server-side/index.d.ts.map +1 -1
- package/lib/plugins/server-side/index.js +27 -17
- package/lib/plugins/server-side/index.js.map +1 -1
- package/lib/plugins/tree/TreePlugin.d.ts +89 -2
- package/lib/plugins/tree/TreePlugin.d.ts.map +1 -1
- package/lib/plugins/tree/index.d.ts +3 -2
- package/lib/plugins/tree/index.d.ts.map +1 -1
- package/lib/plugins/tree/index.js +81 -94
- package/lib/plugins/tree/index.js.map +1 -1
- package/lib/plugins/undo-redo/UndoRedoPlugin.d.ts +66 -3
- package/lib/plugins/undo-redo/UndoRedoPlugin.d.ts.map +1 -1
- package/lib/plugins/undo-redo/index.d.ts +3 -1
- package/lib/plugins/undo-redo/index.d.ts.map +1 -1
- package/lib/plugins/undo-redo/index.js +32 -22
- package/lib/plugins/undo-redo/index.js.map +1 -1
- package/lib/plugins/visibility/VisibilityPlugin.d.ts +86 -2
- package/lib/plugins/visibility/VisibilityPlugin.d.ts.map +1 -1
- package/lib/plugins/visibility/index.d.ts +2 -0
- package/lib/plugins/visibility/index.d.ts.map +1 -1
- package/lib/plugins/visibility/index.js +28 -17
- package/lib/plugins/visibility/index.js.map +1 -1
- package/package.json +1 -1
- package/public.d.ts +30 -2
- package/public.d.ts.map +1 -1
- package/umd/grid.all.umd.js +31 -25
- package/umd/grid.all.umd.js.map +1 -1
- package/umd/grid.umd.js +21 -17
- package/umd/grid.umd.js.map +1 -1
- package/umd/plugins/clipboard.umd.js.map +1 -1
- package/umd/plugins/column-virtualization.umd.js.map +1 -1
- package/umd/plugins/context-menu.umd.js.map +1 -1
- package/umd/plugins/editing.umd.js +1 -1
- package/umd/plugins/editing.umd.js.map +1 -1
- package/umd/plugins/export.umd.js.map +1 -1
- package/umd/plugins/filtering.umd.js.map +1 -1
- package/umd/plugins/grouping-columns.umd.js +1 -1
- package/umd/plugins/grouping-columns.umd.js.map +1 -1
- package/umd/plugins/grouping-rows.umd.js.map +1 -1
- package/umd/plugins/master-detail.umd.js.map +1 -1
- package/umd/plugins/multi-sort.umd.js.map +1 -1
- package/umd/plugins/pinned-columns.umd.js +1 -1
- package/umd/plugins/pinned-columns.umd.js.map +1 -1
- package/umd/plugins/pinned-rows.umd.js.map +1 -1
- package/umd/plugins/pivot.umd.js.map +1 -1
- package/umd/plugins/reorder.umd.js +1 -1
- package/umd/plugins/reorder.umd.js.map +1 -1
- package/umd/plugins/responsive.umd.js +2 -0
- package/umd/plugins/responsive.umd.js.map +1 -0
- package/umd/plugins/selection.umd.js +3 -1
- package/umd/plugins/selection.umd.js.map +1 -1
- package/umd/plugins/server-side.umd.js.map +1 -1
- package/umd/plugins/tree.umd.js +1 -1
- package/umd/plugins/tree.umd.js.map +1 -1
- package/umd/plugins/undo-redo.umd.js.map +1 -1
- package/umd/plugins/visibility.umd.js.map +1 -1
|
@@ -15,22 +15,104 @@ export interface ColumnReorderRequestDetail {
|
|
|
15
15
|
/**
|
|
16
16
|
* Column Visibility Plugin for tbw-grid
|
|
17
17
|
*
|
|
18
|
-
*
|
|
18
|
+
* Gives users control over which columns are displayed. Hide less important columns
|
|
19
|
+
* by default, let users toggle them via a column chooser UI, or programmatically
|
|
20
|
+
* show/hide columns based on user preferences or screen size.
|
|
21
|
+
*
|
|
22
|
+
* > **Optional Enhancement:** When ReorderPlugin is also loaded, columns in the
|
|
23
|
+
* > visibility panel become draggable for reordering.
|
|
24
|
+
*
|
|
25
|
+
* ## Installation
|
|
26
|
+
*
|
|
27
|
+
* ```ts
|
|
28
|
+
* import { VisibilityPlugin } from '@toolbox-web/grid/plugins/visibility';
|
|
29
|
+
* ```
|
|
30
|
+
*
|
|
31
|
+
* ## Configuration Options
|
|
32
|
+
*
|
|
33
|
+
* | Option | Type | Default | Description |
|
|
34
|
+
* |--------|------|---------|-------------|
|
|
35
|
+
* | `allowHideAll` | `boolean` | `false` | Allow hiding all columns (no minimum) |
|
|
36
|
+
*
|
|
37
|
+
* ## Column Configuration
|
|
38
|
+
*
|
|
39
|
+
* | Property | Type | Default | Description |
|
|
40
|
+
* |----------|------|---------|-------------|
|
|
41
|
+
* | `visible` | `boolean` | `true` | Initial visibility state |
|
|
42
|
+
* | `meta.lockVisibility` | `boolean` | `false` | Prevent user from toggling |
|
|
43
|
+
*
|
|
44
|
+
* ## Programmatic API
|
|
45
|
+
*
|
|
46
|
+
* | Method | Signature | Description |
|
|
47
|
+
* |--------|-----------|-------------|
|
|
48
|
+
* | `hideColumn` | `(field: string) => void` | Hide a column |
|
|
49
|
+
* | `showColumn` | `(field: string) => void` | Show a column |
|
|
50
|
+
* | `toggleColumn` | `(field: string) => void` | Toggle visibility |
|
|
51
|
+
* | `showAllColumns` | `() => void` | Show all columns |
|
|
52
|
+
* | `getHiddenColumns` | `() => string[]` | Get list of hidden column fields |
|
|
53
|
+
*
|
|
54
|
+
* ## CSS Custom Properties
|
|
55
|
+
*
|
|
56
|
+
* | Property | Default | Description |
|
|
57
|
+
* |----------|---------|-------------|
|
|
58
|
+
* | `--tbw-visibility-hover` | `var(--tbw-color-row-hover)` | Row hover background |
|
|
59
|
+
* | `--tbw-panel-padding` | `0.75em` | Panel content padding |
|
|
60
|
+
* | `--tbw-panel-gap` | `0.5em` | Gap between items |
|
|
61
|
+
*
|
|
62
|
+
* @example Columns Hidden by Default
|
|
19
63
|
* ```ts
|
|
20
|
-
*
|
|
64
|
+
* import '@toolbox-web/grid';
|
|
65
|
+
* import { VisibilityPlugin } from '@toolbox-web/grid/plugins/visibility';
|
|
66
|
+
*
|
|
67
|
+
* const grid = document.querySelector('tbw-grid');
|
|
68
|
+
* grid.gridConfig = {
|
|
69
|
+
* columns: [
|
|
70
|
+
* { field: 'id', header: 'ID' },
|
|
71
|
+
* { field: 'name', header: 'Name' },
|
|
72
|
+
* { field: 'phone', header: 'Phone', visible: false }, // Hidden by default
|
|
73
|
+
* { field: 'address', header: 'Address', visible: false },
|
|
74
|
+
* ],
|
|
75
|
+
* plugins: [new VisibilityPlugin()],
|
|
76
|
+
* };
|
|
77
|
+
*
|
|
78
|
+
* // Toggle programmatically
|
|
79
|
+
* const plugin = grid.getPlugin(VisibilityPlugin);
|
|
80
|
+
* plugin.showColumn('phone');
|
|
21
81
|
* ```
|
|
82
|
+
*
|
|
83
|
+
* @example With Drag-to-Reorder
|
|
84
|
+
* ```ts
|
|
85
|
+
* import { VisibilityPlugin } from '@toolbox-web/grid/plugins/visibility';
|
|
86
|
+
* import { ReorderPlugin } from '@toolbox-web/grid/plugins/reorder';
|
|
87
|
+
*
|
|
88
|
+
* grid.gridConfig = {
|
|
89
|
+
* plugins: [
|
|
90
|
+
* new ReorderPlugin(), // Enables drag-drop in visibility panel
|
|
91
|
+
* new VisibilityPlugin(),
|
|
92
|
+
* ],
|
|
93
|
+
* };
|
|
94
|
+
* ```
|
|
95
|
+
*
|
|
96
|
+
* @see {@link VisibilityConfig} for configuration options
|
|
97
|
+
* @see {@link ReorderPlugin} for drag-to-reorder integration
|
|
98
|
+
*
|
|
99
|
+
* @internal Extends BaseGridPlugin
|
|
22
100
|
*/
|
|
23
101
|
export declare class VisibilityPlugin extends BaseGridPlugin<VisibilityConfig> {
|
|
24
102
|
/**
|
|
25
103
|
* Plugin dependencies - VisibilityPlugin optionally uses ReorderPlugin for drag-drop reordering.
|
|
26
104
|
*
|
|
27
105
|
* When ReorderPlugin is present, columns in the visibility panel become draggable.
|
|
106
|
+
* @internal
|
|
28
107
|
*/
|
|
29
108
|
static readonly dependencies: PluginDependency[];
|
|
109
|
+
/** @internal */
|
|
30
110
|
readonly name = "visibility";
|
|
31
111
|
/** Tool panel ID for shell integration */
|
|
32
112
|
static readonly PANEL_ID = "columns";
|
|
113
|
+
/** @internal */
|
|
33
114
|
readonly styles: string;
|
|
115
|
+
/** @internal */
|
|
34
116
|
protected get defaultConfig(): Partial<VisibilityConfig>;
|
|
35
117
|
private columnListElement;
|
|
36
118
|
private isDragging;
|
|
@@ -39,9 +121,11 @@ export declare class VisibilityPlugin extends BaseGridPlugin<VisibilityConfig> {
|
|
|
39
121
|
private dropIndex;
|
|
40
122
|
/** Clear drag-related classes from all rows in a list. */
|
|
41
123
|
private clearDragClasses;
|
|
124
|
+
/** @internal */
|
|
42
125
|
detach(): void;
|
|
43
126
|
/**
|
|
44
127
|
* Register the column visibility tool panel with the shell.
|
|
128
|
+
* @internal
|
|
45
129
|
*/
|
|
46
130
|
getToolPanel(): ToolPanelDefinition | undefined;
|
|
47
131
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VisibilityPlugin.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/plugins/visibility/VisibilityPlugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,cAAc,EAAE,KAAK,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACtF,OAAO,KAAK,EAAgB,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC1E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAGhD;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,2CAA2C;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,qCAAqC;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,oCAAoC;IACpC,OAAO,EAAE,MAAM,CAAC;CACjB;AAWD
|
|
1
|
+
{"version":3,"file":"VisibilityPlugin.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/plugins/visibility/VisibilityPlugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,cAAc,EAAE,KAAK,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACtF,OAAO,KAAK,EAAgB,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC1E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAGhD;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,2CAA2C;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,qCAAqC;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,oCAAoC;IACpC,OAAO,EAAE,MAAM,CAAC;CACjB;AAWD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqFG;AACH,qBAAa,gBAAiB,SAAQ,cAAc,CAAC,gBAAgB,CAAC;IACpE;;;;;OAKG;IACH,gBAAyB,YAAY,EAAE,gBAAgB,EAAE,CAEvD;IAEF,gBAAgB;IAChB,QAAQ,CAAC,IAAI,gBAAgB;IAE7B,0CAA0C;IAC1C,MAAM,CAAC,QAAQ,CAAC,QAAQ,aAAa;IACrC,gBAAgB;IAChB,SAAkB,MAAM,SAAU;IAElC,gBAAgB;IAChB,cAAuB,aAAa,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAIhE;IAGD,OAAO,CAAC,iBAAiB,CAA4B;IAGrD,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,YAAY,CAAuB;IAC3C,OAAO,CAAC,YAAY,CAAuB;IAC3C,OAAO,CAAC,SAAS,CAAuB;IAExC,0DAA0D;IAC1D,OAAO,CAAC,gBAAgB;IASxB,gBAAgB;IACP,MAAM,IAAI,IAAI;IAWvB;;;OAGG;IACM,YAAY,IAAI,mBAAmB,GAAG,SAAS;IAcxD;;;OAGG;IACH,IAAI,IAAI,IAAI;IAQZ;;OAEG;IACH,IAAI,IAAI,IAAI;IAIZ;;OAEG;IACH,MAAM,IAAI,IAAI;IAQd;;;;;OAKG;IACH,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IAIvC;;;;;OAKG;IACH,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI;IAIvD;;;OAGG;IACH,iBAAiB,IAAI,MAAM,EAAE;IAO7B;;;OAGG;IACH,gBAAgB,IAAI,MAAM,EAAE;IAO5B;;;OAGG;IACH,OAAO,IAAI,IAAI;IAIf;;;;OAIG;IACH,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAIjC;;;;OAIG;IACH,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAI/B;;;;OAIG;IACH,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAI/B;;;;OAIG;IACH,aAAa,IAAI,KAAK,CAAC;QACrB,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,EAAE,OAAO,CAAC;QACjB,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB,OAAO,CAAC,EAAE,OAAO,CAAC;KACnB,CAAC;IAIF;;;OAGG;IACH,cAAc,IAAI,OAAO;IAOzB;;;OAGG;IACH,OAAO,CAAC,kBAAkB;IAoC1B;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAMxB;;;OAGG;IACH,OAAO,CAAC,cAAc;IA4DtB;;;OAGG;IACH,OAAO,CAAC,kBAAkB;CAqF3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/plugins/visibility/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/plugins/visibility/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,YAAY,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,YAAY,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -25,6 +25,28 @@ class w {
|
|
|
25
25
|
* ```
|
|
26
26
|
*/
|
|
27
27
|
static dependencies;
|
|
28
|
+
/**
|
|
29
|
+
* Plugin manifest - declares owned properties, config rules, and hook priorities.
|
|
30
|
+
*
|
|
31
|
+
* This is read by the configuration validator to:
|
|
32
|
+
* - Validate that required plugins are loaded when their properties are used
|
|
33
|
+
* - Execute configRules to detect invalid/conflicting settings
|
|
34
|
+
* - Order hook execution based on priority
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```typescript
|
|
38
|
+
* static override readonly manifest: PluginManifest<MyConfig> = {
|
|
39
|
+
* ownedProperties: [
|
|
40
|
+
* { property: 'myProp', level: 'column', description: 'the "myProp" column property' },
|
|
41
|
+
* ],
|
|
42
|
+
* configRules: [
|
|
43
|
+
* { id: 'myPlugin/conflict', severity: 'warn', message: '...', check: (c) => c.a && c.b },
|
|
44
|
+
* ],
|
|
45
|
+
* };
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
49
|
+
static manifest;
|
|
28
50
|
/**
|
|
29
51
|
* Plugin version - defaults to grid version for built-in plugins.
|
|
30
52
|
* Third-party plugins can override with their own semver.
|
|
@@ -184,23 +206,6 @@ class w {
|
|
|
184
206
|
get gridElement() {
|
|
185
207
|
return this.grid;
|
|
186
208
|
}
|
|
187
|
-
/**
|
|
188
|
-
* Get the render root of the grid for DOM queries.
|
|
189
|
-
* @deprecated Use `gridElement` instead. This getter exists only for backward compatibility.
|
|
190
|
-
*
|
|
191
|
-
* With Shadow DOM removed, the grid element itself is the render root.
|
|
192
|
-
* All new code should use `this.gridElement` for DOM queries.
|
|
193
|
-
*
|
|
194
|
-
* @example
|
|
195
|
-
* // OLD (deprecated)
|
|
196
|
-
* const rows = this.shadowRoot?.querySelector('.rows');
|
|
197
|
-
*
|
|
198
|
-
* // NEW (preferred)
|
|
199
|
-
* const rows = this.gridElement.querySelector('.rows');
|
|
200
|
-
*/
|
|
201
|
-
get shadowRoot() {
|
|
202
|
-
return this.gridElement;
|
|
203
|
-
}
|
|
204
209
|
/**
|
|
205
210
|
* Get the disconnect signal for event listener cleanup.
|
|
206
211
|
* This signal is aborted when the grid disconnects from the DOM.
|
|
@@ -313,14 +318,18 @@ class g extends w {
|
|
|
313
318
|
* Plugin dependencies - VisibilityPlugin optionally uses ReorderPlugin for drag-drop reordering.
|
|
314
319
|
*
|
|
315
320
|
* When ReorderPlugin is present, columns in the visibility panel become draggable.
|
|
321
|
+
* @internal
|
|
316
322
|
*/
|
|
317
323
|
static dependencies = [
|
|
318
324
|
{ name: "reorder", required: !1, reason: "Enables drag-to-reorder columns in visibility panel" }
|
|
319
325
|
];
|
|
326
|
+
/** @internal */
|
|
320
327
|
name = "visibility";
|
|
321
328
|
/** Tool panel ID for shell integration */
|
|
322
329
|
static PANEL_ID = "columns";
|
|
330
|
+
/** @internal */
|
|
323
331
|
styles = C;
|
|
332
|
+
/** @internal */
|
|
324
333
|
get defaultConfig() {
|
|
325
334
|
return {
|
|
326
335
|
allowHideAll: !1
|
|
@@ -341,6 +350,7 @@ class g extends w {
|
|
|
341
350
|
}
|
|
342
351
|
// #endregion
|
|
343
352
|
// #region Lifecycle
|
|
353
|
+
/** @internal */
|
|
344
354
|
detach() {
|
|
345
355
|
this.columnListElement = null, this.isDragging = !1, this.draggedField = null, this.draggedIndex = null, this.dropIndex = null;
|
|
346
356
|
}
|
|
@@ -348,6 +358,7 @@ class g extends w {
|
|
|
348
358
|
// #region Shell Integration
|
|
349
359
|
/**
|
|
350
360
|
* Register the column visibility tool panel with the shell.
|
|
361
|
+
* @internal
|
|
351
362
|
*/
|
|
352
363
|
getToolPanel() {
|
|
353
364
|
return {
|