@toolbox-web/grid-vue 0.0.0 → 0.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 +489 -1
- package/chunks/feature-registry-BgEOysSJ.js +38 -0
- package/chunks/feature-registry-BgEOysSJ.js.map +1 -0
- package/features/clipboard.d.ts +20 -0
- package/features/clipboard.d.ts.map +1 -0
- package/features/clipboard.js +4 -0
- package/features/clipboard.js.map +1 -0
- package/features/column-virtualization.d.ts +20 -0
- package/features/column-virtualization.d.ts.map +1 -0
- package/features/column-virtualization.js +4 -0
- package/features/column-virtualization.js.map +1 -0
- package/features/context-menu.d.ts +20 -0
- package/features/context-menu.d.ts.map +1 -0
- package/features/context-menu.js +4 -0
- package/features/context-menu.js.map +1 -0
- package/features/editing.d.ts +20 -0
- package/features/editing.d.ts.map +1 -0
- package/features/editing.js +4 -0
- package/features/editing.js.map +1 -0
- package/features/export.d.ts +20 -0
- package/features/export.d.ts.map +1 -0
- package/features/export.js +4 -0
- package/features/export.js.map +1 -0
- package/features/filtering.d.ts +20 -0
- package/features/filtering.d.ts.map +1 -0
- package/features/filtering.js +4 -0
- package/features/filtering.js.map +1 -0
- package/features/grouping-columns.d.ts +24 -0
- package/features/grouping-columns.d.ts.map +1 -0
- package/features/grouping-columns.js +4 -0
- package/features/grouping-columns.js.map +1 -0
- package/features/grouping-rows.d.ts +23 -0
- package/features/grouping-rows.d.ts.map +1 -0
- package/features/grouping-rows.js +4 -0
- package/features/grouping-rows.js.map +1 -0
- package/features/index.d.ts +1 -0
- package/features/index.d.ts.map +1 -0
- package/features/index.js +23 -0
- package/features/index.js.map +1 -0
- package/features/master-detail.d.ts +23 -0
- package/features/master-detail.d.ts.map +1 -0
- package/features/master-detail.js +4 -0
- package/features/master-detail.js.map +1 -0
- package/features/multi-sort.d.ts +20 -0
- package/features/multi-sort.d.ts.map +1 -0
- package/features/multi-sort.js +5 -0
- package/features/multi-sort.js.map +1 -0
- package/features/pinned-columns.d.ts +23 -0
- package/features/pinned-columns.d.ts.map +1 -0
- package/features/pinned-columns.js +4 -0
- package/features/pinned-columns.js.map +1 -0
- package/features/pinned-rows.d.ts +22 -0
- package/features/pinned-rows.d.ts.map +1 -0
- package/features/pinned-rows.js +4 -0
- package/features/pinned-rows.js.map +1 -0
- package/features/pivot.d.ts +24 -0
- package/features/pivot.d.ts.map +1 -0
- package/features/pivot.js +4 -0
- package/features/pivot.js.map +1 -0
- package/features/print.d.ts +20 -0
- package/features/print.d.ts.map +1 -0
- package/features/print.js +4 -0
- package/features/print.js.map +1 -0
- package/features/reorder.d.ts +20 -0
- package/features/reorder.d.ts.map +1 -0
- package/features/reorder.js +4 -0
- package/features/reorder.js.map +1 -0
- package/features/responsive.d.ts +24 -0
- package/features/responsive.d.ts.map +1 -0
- package/features/responsive.js +4 -0
- package/features/responsive.js.map +1 -0
- package/features/row-reorder.d.ts +20 -0
- package/features/row-reorder.d.ts.map +1 -0
- package/features/row-reorder.js +4 -0
- package/features/row-reorder.js.map +1 -0
- package/features/selection.d.ts +20 -0
- package/features/selection.d.ts.map +1 -0
- package/features/selection.js +4 -0
- package/features/selection.js.map +1 -0
- package/features/server-side.d.ts +22 -0
- package/features/server-side.d.ts.map +1 -0
- package/features/server-side.js +4 -0
- package/features/server-side.js.map +1 -0
- package/features/tree.d.ts +23 -0
- package/features/tree.d.ts.map +1 -0
- package/features/tree.js +4 -0
- package/features/tree.js.map +1 -0
- package/features/undo-redo.d.ts +20 -0
- package/features/undo-redo.d.ts.map +1 -0
- package/features/undo-redo.js +4 -0
- package/features/undo-redo.js.map +1 -0
- package/features/visibility.d.ts +20 -0
- package/features/visibility.d.ts.map +1 -0
- package/features/visibility.js +4 -0
- package/features/visibility.js.map +1 -0
- package/index.d.ts +67 -0
- package/index.d.ts.map +1 -0
- package/index.js +673 -0
- package/index.js.map +1 -0
- package/lib/TbwGrid.vue.d.ts +98 -0
- package/lib/TbwGrid.vue.d.ts.map +1 -0
- package/lib/TbwGridColumn.vue.d.ts +183 -0
- package/lib/TbwGridColumn.vue.d.ts.map +1 -0
- package/lib/TbwGridDetailPanel.vue.d.ts +36 -0
- package/lib/TbwGridDetailPanel.vue.d.ts.map +1 -0
- package/lib/TbwGridResponsiveCard.vue.d.ts +22 -0
- package/lib/TbwGridResponsiveCard.vue.d.ts.map +1 -0
- package/lib/TbwGridToolButtons.vue.d.ts +27 -0
- package/lib/TbwGridToolButtons.vue.d.ts.map +1 -0
- package/lib/TbwGridToolPanel.vue.d.ts +178 -0
- package/lib/TbwGridToolPanel.vue.d.ts.map +1 -0
- package/lib/detail-panel-registry.d.ts +20 -0
- package/lib/detail-panel-registry.d.ts.map +1 -0
- package/lib/feature-props.d.ts +317 -0
- package/lib/feature-props.d.ts.map +1 -0
- package/lib/feature-registry.d.ts +69 -0
- package/lib/feature-registry.d.ts.map +1 -0
- package/lib/grid-icon-registry.d.ts +66 -0
- package/lib/grid-icon-registry.d.ts.map +1 -0
- package/lib/grid-provider.d.ts +66 -0
- package/lib/grid-provider.d.ts.map +1 -0
- package/lib/grid-type-registry.d.ts +98 -0
- package/lib/grid-type-registry.d.ts.map +1 -0
- package/lib/responsive-card-registry.d.ts +20 -0
- package/lib/responsive-card-registry.d.ts.map +1 -0
- package/lib/slot-types.d.ts +50 -0
- package/lib/slot-types.d.ts.map +1 -0
- package/lib/tool-panel-registry.d.ts +18 -0
- package/lib/tool-panel-registry.d.ts.map +1 -0
- package/lib/use-grid-event.d.ts +68 -0
- package/lib/use-grid-event.d.ts.map +1 -0
- package/lib/use-grid.d.ts +39 -0
- package/lib/use-grid.d.ts.map +1 -0
- package/lib/vue-column-config.d.ts +69 -0
- package/lib/vue-column-config.d.ts.map +1 -0
- package/lib/vue-grid-adapter.d.ts +94 -0
- package/lib/vue-grid-adapter.d.ts.map +1 -0
- package/package.json +52 -3
- package/typedoc-entry.d.ts +31 -0
- package/typedoc-entry.d.ts.map +1 -0
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { VNode } from 'vue';
|
|
2
|
+
import { ToolPanelContext } from './tool-panel-registry';
|
|
3
|
+
/**
|
|
4
|
+
* Props for TbwGridToolPanel
|
|
5
|
+
*/
|
|
6
|
+
type __VLS_Props = {
|
|
7
|
+
/**
|
|
8
|
+
* Unique identifier for this tool panel.
|
|
9
|
+
*/
|
|
10
|
+
id: string;
|
|
11
|
+
/**
|
|
12
|
+
* Display label for the panel tab/button.
|
|
13
|
+
*/
|
|
14
|
+
label: string;
|
|
15
|
+
/**
|
|
16
|
+
* Icon for the panel tab (string or SVG).
|
|
17
|
+
*/
|
|
18
|
+
icon?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Position of the panel.
|
|
21
|
+
* @default 'right'
|
|
22
|
+
*/
|
|
23
|
+
position?: 'left' | 'right';
|
|
24
|
+
/**
|
|
25
|
+
* Width of the panel when open.
|
|
26
|
+
* @default '250px'
|
|
27
|
+
*/
|
|
28
|
+
width?: string;
|
|
29
|
+
};
|
|
30
|
+
declare const __VLS_slots: Readonly<{
|
|
31
|
+
/** Tool panel content slot */
|
|
32
|
+
default?: (props: ToolPanelContext) => VNode[];
|
|
33
|
+
}> & {
|
|
34
|
+
/** Tool panel content slot */
|
|
35
|
+
default?: (props: ToolPanelContext) => VNode[];
|
|
36
|
+
};
|
|
37
|
+
declare const panelRef: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
38
|
+
declare function __VLS_template(): {
|
|
39
|
+
attrs: Partial<{}>;
|
|
40
|
+
slots: Readonly<{
|
|
41
|
+
/** Tool panel content slot */
|
|
42
|
+
default?: (props: ToolPanelContext) => VNode[];
|
|
43
|
+
}> & {
|
|
44
|
+
/** Tool panel content slot */
|
|
45
|
+
default?: (props: ToolPanelContext) => VNode[];
|
|
46
|
+
};
|
|
47
|
+
refs: {
|
|
48
|
+
panelRef: ({
|
|
49
|
+
$: import('vue').ComponentInternalInstance;
|
|
50
|
+
$data: {};
|
|
51
|
+
$props: {
|
|
52
|
+
readonly id: string;
|
|
53
|
+
readonly label: string;
|
|
54
|
+
readonly icon?: string | undefined;
|
|
55
|
+
readonly position?: "left" | "right" | undefined;
|
|
56
|
+
readonly width?: string | undefined;
|
|
57
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
58
|
+
$attrs: {
|
|
59
|
+
[x: string]: unknown;
|
|
60
|
+
};
|
|
61
|
+
$refs: {
|
|
62
|
+
[x: string]: unknown;
|
|
63
|
+
};
|
|
64
|
+
$slots: Readonly<{
|
|
65
|
+
[name: string]: import('vue').Slot<any> | undefined;
|
|
66
|
+
}>;
|
|
67
|
+
$root: import('vue').ComponentPublicInstance | null;
|
|
68
|
+
$parent: import('vue').ComponentPublicInstance | null;
|
|
69
|
+
$host: Element | null;
|
|
70
|
+
$emit: (event: string, ...args: any[]) => void;
|
|
71
|
+
$el: any;
|
|
72
|
+
$options: import('vue').ComponentOptionsBase<Readonly<__VLS_Props> & Readonly<{}>, {
|
|
73
|
+
panelRef: typeof panelRef;
|
|
74
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
|
75
|
+
width: string;
|
|
76
|
+
position: "left" | "right";
|
|
77
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
78
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
79
|
+
created?: (() => void) | (() => void)[];
|
|
80
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
81
|
+
mounted?: (() => void) | (() => void)[];
|
|
82
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
83
|
+
updated?: (() => void) | (() => void)[];
|
|
84
|
+
activated?: (() => void) | (() => void)[];
|
|
85
|
+
deactivated?: (() => void) | (() => void)[];
|
|
86
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
87
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
88
|
+
destroyed?: (() => void) | (() => void)[];
|
|
89
|
+
unmounted?: (() => void) | (() => void)[];
|
|
90
|
+
renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
91
|
+
renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
92
|
+
errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
93
|
+
};
|
|
94
|
+
$forceUpdate: () => void;
|
|
95
|
+
$nextTick: typeof import('vue').nextTick;
|
|
96
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
|
|
97
|
+
} & Readonly<{
|
|
98
|
+
width: string;
|
|
99
|
+
position: "left" | "right";
|
|
100
|
+
}> & Omit<Readonly<__VLS_Props> & Readonly<{}>, "panelRef" | ("width" | "position")> & import('vue').ShallowUnwrapRef<{
|
|
101
|
+
panelRef: typeof panelRef;
|
|
102
|
+
}> & {} & import('vue').ComponentCustomProperties & {} & {
|
|
103
|
+
$slots: typeof __VLS_slots;
|
|
104
|
+
}) | null;
|
|
105
|
+
};
|
|
106
|
+
rootEl: any;
|
|
107
|
+
};
|
|
108
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
109
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
110
|
+
width: string;
|
|
111
|
+
position: "left" | "right";
|
|
112
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
113
|
+
panelRef: ({
|
|
114
|
+
$: import('vue').ComponentInternalInstance;
|
|
115
|
+
$data: {};
|
|
116
|
+
$props: {
|
|
117
|
+
readonly id: string;
|
|
118
|
+
readonly label: string;
|
|
119
|
+
readonly icon?: string | undefined;
|
|
120
|
+
readonly position?: "left" | "right" | undefined;
|
|
121
|
+
readonly width?: string | undefined;
|
|
122
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
123
|
+
$attrs: {
|
|
124
|
+
[x: string]: unknown;
|
|
125
|
+
};
|
|
126
|
+
$refs: {
|
|
127
|
+
[x: string]: unknown;
|
|
128
|
+
};
|
|
129
|
+
$slots: Readonly<{
|
|
130
|
+
[name: string]: import('vue').Slot<any> | undefined;
|
|
131
|
+
}>;
|
|
132
|
+
$root: import('vue').ComponentPublicInstance | null;
|
|
133
|
+
$parent: import('vue').ComponentPublicInstance | null;
|
|
134
|
+
$host: Element | null;
|
|
135
|
+
$emit: (event: string, ...args: any[]) => void;
|
|
136
|
+
$el: any;
|
|
137
|
+
$options: import('vue').ComponentOptionsBase<Readonly<__VLS_Props> & Readonly<{}>, {
|
|
138
|
+
panelRef: typeof panelRef;
|
|
139
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
|
140
|
+
width: string;
|
|
141
|
+
position: "left" | "right";
|
|
142
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
143
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
144
|
+
created?: (() => void) | (() => void)[];
|
|
145
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
146
|
+
mounted?: (() => void) | (() => void)[];
|
|
147
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
148
|
+
updated?: (() => void) | (() => void)[];
|
|
149
|
+
activated?: (() => void) | (() => void)[];
|
|
150
|
+
deactivated?: (() => void) | (() => void)[];
|
|
151
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
152
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
153
|
+
destroyed?: (() => void) | (() => void)[];
|
|
154
|
+
unmounted?: (() => void) | (() => void)[];
|
|
155
|
+
renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
156
|
+
renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
157
|
+
errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
158
|
+
};
|
|
159
|
+
$forceUpdate: () => void;
|
|
160
|
+
$nextTick: typeof import('vue').nextTick;
|
|
161
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
|
|
162
|
+
} & Readonly<{
|
|
163
|
+
width: string;
|
|
164
|
+
position: "left" | "right";
|
|
165
|
+
}> & Omit<Readonly<__VLS_Props> & Readonly<{}>, "panelRef" | ("width" | "position")> & import('vue').ShallowUnwrapRef<{
|
|
166
|
+
panelRef: typeof panelRef;
|
|
167
|
+
}> & {} & import('vue').ComponentCustomProperties & {} & {
|
|
168
|
+
$slots: typeof __VLS_slots;
|
|
169
|
+
}) | null;
|
|
170
|
+
}, any>;
|
|
171
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
172
|
+
export default _default;
|
|
173
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
174
|
+
new (): {
|
|
175
|
+
$slots: S;
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
//# sourceMappingURL=TbwGridToolPanel.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TbwGridToolPanel.vue.d.ts","sourceRoot":"","sources":["../../../../libs/grid-vue/src/lib/TbwGridToolPanel.vue"],"names":[],"mappings":"AAoEA,OAAO,EAA4B,KAAK,KAAK,EAAE,MAAM,KAAK,CAAC;AAC3D,OAAO,EAAqB,KAAK,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEjF;;GAEG;AACH,KAAK,WAAW,GAAG;IACf;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAE5B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAUJ,QAAA,MAAM,WAAW;IACf,8BAA8B;cACpB,CAAC,KAAK,EAAE,gBAAgB,KAAK,KAAK,EAAE;;IAD9C,8BAA8B;cACpB,CAAC,KAAK,EAAE,gBAAgB,KAAK,KAAK,EAAE;CAC5C,CAAC;AAGL,QAAA,MAAM,QAAQ,2DAAgC,CAAC;AAmB/C,iBAAS,cAAc;WAuCT,OAAO,IAA6B;;QA/DhD,8BAA8B;kBACpB,CAAC,KAAK,EAAE,gBAAgB,KAAK,KAAK,EAAE;;QAD9C,8BAA8B;kBACpB,CAAC,KAAK,EAAE,gBAAgB,KAAK,KAAK,EAAE;;;;;;;6BAnCxC,MAAM;gCAKH,MAAM;gCAKN,MAAM;oCAMF,MAAM,GAAG,OAAO;iCAMnB,MAAM;;;;;;;;;;;;;;;;;0BAoFI,OAAO,QAAQ;;uBApFzB,MAAM;0BANH,MAAM,GAAG,OAAO;;;;;;;;;;;;;;;;;;;;wCA+HsznB,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;mBAzH/7nB,MAAM;sBANH,MAAM,GAAG,OAAO;;sBA0FT,OAAO,QAAQ;;oBA9CgE,OAAO,WAAW;;;;EA0CtH;AAUD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;WA3FT,MAAM;cANH,MAAM,GAAG,OAAO;;;;;;yBAhBvB,MAAM;4BAKH,MAAM;4BAKN,MAAM;gCAMF,MAAM,GAAG,OAAO;6BAMnB,MAAM;;;;;;;;;;;;;;;;;sBAoFI,OAAO,QAAQ;;mBApFzB,MAAM;sBANH,MAAM,GAAG,OAAO;;;;;;;;;;;;;;;;;;;;oCA+HsznB,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;eAzH/7nB,MAAM;kBANH,MAAM,GAAG,OAAO;;kBA0FT,OAAO,QAAQ;;gBA9CgE,OAAO,WAAW;;OA8DrH,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { VNode } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Context object passed to the detail panel slot.
|
|
4
|
+
*/
|
|
5
|
+
export interface DetailPanelContext<T = unknown> {
|
|
6
|
+
/** The row data for this detail panel */
|
|
7
|
+
row: T;
|
|
8
|
+
/** The row index */
|
|
9
|
+
rowIndex: number;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Registry for detail renderers (per grid element)
|
|
13
|
+
*/
|
|
14
|
+
export declare const detailRegistry: WeakMap<HTMLElement, (ctx: DetailPanelContext<unknown>) => VNode[] | undefined>;
|
|
15
|
+
/**
|
|
16
|
+
* Get the detail renderer for a grid element.
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
19
|
+
export declare function getDetailRenderer(gridElement: HTMLElement): ((ctx: DetailPanelContext<unknown>) => VNode[] | undefined) | undefined;
|
|
20
|
+
//# sourceMappingURL=detail-panel-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"detail-panel-registry.d.ts","sourceRoot":"","sources":["../../../../libs/grid-vue/src/lib/detail-panel-registry.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC;AAEjC;;GAEG;AACH,MAAM,WAAW,kBAAkB,CAAC,CAAC,GAAG,OAAO;IAC7C,yCAAyC;IACzC,GAAG,EAAE,CAAC,CAAC;IACP,oBAAoB;IACpB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,eAAO,MAAM,cAAc,6BAAkC,kBAAkB,CAAC,OAAO,CAAC,KAAK,KAAK,EAAE,GAAG,SAAS,CAAG,CAAC;AAEpH;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,WAAW,EAAE,WAAW,GACvB,CAAC,CAAC,GAAG,EAAE,kBAAkB,CAAC,OAAO,CAAC,KAAK,KAAK,EAAE,GAAG,SAAS,CAAC,GAAG,SAAS,CAMzE"}
|
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
import { ClipboardConfig, ColumnVirtualizationConfig, ContextMenuConfig, ExportConfig, FilterConfig, GroupingColumnsConfig, GroupingRowsConfig, MasterDetailConfig, MultiSortConfig, PinnedRowsConfig, PivotConfig, PrintConfig, ReorderConfig, ResponsivePluginConfig, RowReorderConfig, SelectionConfig, ServerSideConfig, TreeConfig, UndoRedoConfig, VisibilityConfig } from '@toolbox-web/grid/all';
|
|
2
|
+
/**
|
|
3
|
+
* Feature props for declarative plugin configuration.
|
|
4
|
+
* Each prop lazily loads its corresponding plugin when used.
|
|
5
|
+
*
|
|
6
|
+
* @template TRow - The row data type
|
|
7
|
+
*/
|
|
8
|
+
export interface FeatureProps<TRow = unknown> {
|
|
9
|
+
/**
|
|
10
|
+
* Enable cell/row/range selection.
|
|
11
|
+
*
|
|
12
|
+
* @requires `import '@toolbox-web/grid-vue/features/selection';`
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```vue
|
|
16
|
+
* <!-- Shorthand - just the mode -->
|
|
17
|
+
* <TbwGrid selection="range" />
|
|
18
|
+
*
|
|
19
|
+
* <!-- Full config -->
|
|
20
|
+
* <TbwGrid :selection="{ mode: 'range', checkbox: true }" />
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
selection?: 'cell' | 'row' | 'range' | SelectionConfig<TRow>;
|
|
24
|
+
/**
|
|
25
|
+
* Enable inline cell editing.
|
|
26
|
+
*
|
|
27
|
+
* @requires `import '@toolbox-web/grid-vue/features/editing';`
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```vue
|
|
31
|
+
* <!-- Enable with default trigger (dblclick) -->
|
|
32
|
+
* <TbwGrid editing />
|
|
33
|
+
*
|
|
34
|
+
* <!-- Specify trigger -->
|
|
35
|
+
* <TbwGrid editing="click" />
|
|
36
|
+
* <TbwGrid editing="dblclick" />
|
|
37
|
+
* <TbwGrid editing="manual" />
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
editing?: boolean | 'click' | 'dblclick' | 'manual';
|
|
41
|
+
/**
|
|
42
|
+
* Enable clipboard copy/paste.
|
|
43
|
+
* Requires selection to be enabled (will be auto-added).
|
|
44
|
+
*
|
|
45
|
+
* @requires `import '@toolbox-web/grid-vue/features/clipboard';`
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```vue
|
|
49
|
+
* <TbwGrid selection="range" clipboard />
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
clipboard?: boolean | ClipboardConfig;
|
|
53
|
+
/**
|
|
54
|
+
* Enable right-click context menu.
|
|
55
|
+
*
|
|
56
|
+
* @requires `import '@toolbox-web/grid-vue/features/context-menu';`
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```vue
|
|
60
|
+
* <TbwGrid contextMenu />
|
|
61
|
+
* <TbwGrid :contextMenu="{ items: customItems }" />
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
contextMenu?: boolean | ContextMenuConfig;
|
|
65
|
+
/**
|
|
66
|
+
* Enable multi-column sorting.
|
|
67
|
+
*
|
|
68
|
+
* Multi-sort allows users to sort by multiple columns simultaneously.
|
|
69
|
+
* For basic single-column sorting, columns with `sortable: true` work without this plugin.
|
|
70
|
+
*
|
|
71
|
+
* @requires `import '@toolbox-web/grid-vue/features/multi-sort';`
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* ```vue
|
|
75
|
+
* <!-- Enable multi-column sorting -->
|
|
76
|
+
* <TbwGrid multiSort />
|
|
77
|
+
*
|
|
78
|
+
* <!-- Limit to single column (uses plugin but restricts to 1) -->
|
|
79
|
+
* <TbwGrid multiSort="single" />
|
|
80
|
+
*
|
|
81
|
+
* <!-- Full config -->
|
|
82
|
+
* <TbwGrid :multiSort="{ maxSortColumns: 3 }" />
|
|
83
|
+
* ```
|
|
84
|
+
*/
|
|
85
|
+
multiSort?: boolean | 'single' | 'multi' | MultiSortConfig;
|
|
86
|
+
/**
|
|
87
|
+
* @deprecated Use `multiSort` instead. Will be removed in a future version.
|
|
88
|
+
*
|
|
89
|
+
* Enable column sorting. This is an alias for `multiSort`.
|
|
90
|
+
*
|
|
91
|
+
* @requires `import '@toolbox-web/grid-vue/features/multi-sort';`
|
|
92
|
+
*/
|
|
93
|
+
sorting?: boolean | 'single' | 'multi' | MultiSortConfig;
|
|
94
|
+
/**
|
|
95
|
+
* Enable column filtering.
|
|
96
|
+
*
|
|
97
|
+
* @requires `import '@toolbox-web/grid-vue/features/filtering';`
|
|
98
|
+
*
|
|
99
|
+
* @example
|
|
100
|
+
* ```vue
|
|
101
|
+
* <TbwGrid filtering />
|
|
102
|
+
* <TbwGrid :filtering="{ debounceMs: 200 }" />
|
|
103
|
+
* ```
|
|
104
|
+
*/
|
|
105
|
+
filtering?: boolean | FilterConfig<TRow>;
|
|
106
|
+
/**
|
|
107
|
+
* Enable column drag-to-reorder.
|
|
108
|
+
*
|
|
109
|
+
* @requires `import '@toolbox-web/grid-vue/features/reorder';`
|
|
110
|
+
*
|
|
111
|
+
* @example
|
|
112
|
+
* ```vue
|
|
113
|
+
* <TbwGrid reorder />
|
|
114
|
+
* ```
|
|
115
|
+
*/
|
|
116
|
+
reorder?: boolean | ReorderConfig;
|
|
117
|
+
/**
|
|
118
|
+
* Enable column visibility toggle panel.
|
|
119
|
+
*
|
|
120
|
+
* @requires `import '@toolbox-web/grid-vue/features/visibility';`
|
|
121
|
+
*
|
|
122
|
+
* @example
|
|
123
|
+
* ```vue
|
|
124
|
+
* <TbwGrid visibility />
|
|
125
|
+
* ```
|
|
126
|
+
*/
|
|
127
|
+
visibility?: boolean | VisibilityConfig;
|
|
128
|
+
/**
|
|
129
|
+
* Enable pinned/sticky columns.
|
|
130
|
+
* Columns are pinned via the `sticky` column property.
|
|
131
|
+
*
|
|
132
|
+
* @requires `import '@toolbox-web/grid-vue/features/pinned-columns';`
|
|
133
|
+
*
|
|
134
|
+
* @example
|
|
135
|
+
* ```vue
|
|
136
|
+
* <TbwGrid pinnedColumns :columns="[
|
|
137
|
+
* { field: 'id', sticky: 'left' },
|
|
138
|
+
* { field: 'name' },
|
|
139
|
+
* { field: 'actions', sticky: 'right' },
|
|
140
|
+
* ]" />
|
|
141
|
+
* ```
|
|
142
|
+
*/
|
|
143
|
+
pinnedColumns?: boolean;
|
|
144
|
+
/**
|
|
145
|
+
* Enable multi-level column headers (column groups).
|
|
146
|
+
*
|
|
147
|
+
* @requires `import '@toolbox-web/grid-vue/features/grouping-columns';`
|
|
148
|
+
*
|
|
149
|
+
* @example
|
|
150
|
+
* ```vue
|
|
151
|
+
* <TbwGrid :groupingColumns="{
|
|
152
|
+
* columnGroups: [
|
|
153
|
+
* { header: 'Personal Info', children: ['firstName', 'lastName'] },
|
|
154
|
+
* ],
|
|
155
|
+
* }" />
|
|
156
|
+
* ```
|
|
157
|
+
*/
|
|
158
|
+
groupingColumns?: boolean | GroupingColumnsConfig;
|
|
159
|
+
/**
|
|
160
|
+
* Enable horizontal column virtualization for wide grids.
|
|
161
|
+
*
|
|
162
|
+
* @requires `import '@toolbox-web/grid-vue/features/column-virtualization';`
|
|
163
|
+
*
|
|
164
|
+
* @example
|
|
165
|
+
* ```vue
|
|
166
|
+
* <TbwGrid columnVirtualization />
|
|
167
|
+
* ```
|
|
168
|
+
*/
|
|
169
|
+
columnVirtualization?: boolean | ColumnVirtualizationConfig;
|
|
170
|
+
/**
|
|
171
|
+
* Enable row drag-to-reorder.
|
|
172
|
+
*
|
|
173
|
+
* @requires `import '@toolbox-web/grid-vue/features/row-reorder';`
|
|
174
|
+
*
|
|
175
|
+
* @example
|
|
176
|
+
* ```vue
|
|
177
|
+
* <TbwGrid rowReorder />
|
|
178
|
+
* ```
|
|
179
|
+
*/
|
|
180
|
+
rowReorder?: boolean | RowReorderConfig;
|
|
181
|
+
/**
|
|
182
|
+
* Enable row grouping by field values.
|
|
183
|
+
*
|
|
184
|
+
* @requires `import '@toolbox-web/grid-vue/features/grouping-rows';`
|
|
185
|
+
*
|
|
186
|
+
* @example
|
|
187
|
+
* ```vue
|
|
188
|
+
* <TbwGrid :groupingRows="{
|
|
189
|
+
* groupBy: ['department', 'team'],
|
|
190
|
+
* defaultExpanded: true,
|
|
191
|
+
* }" />
|
|
192
|
+
* ```
|
|
193
|
+
*/
|
|
194
|
+
groupingRows?: GroupingRowsConfig;
|
|
195
|
+
/**
|
|
196
|
+
* Enable pinned rows (aggregation/status bar).
|
|
197
|
+
*
|
|
198
|
+
* @requires `import '@toolbox-web/grid-vue/features/pinned-rows';`
|
|
199
|
+
*
|
|
200
|
+
* @example
|
|
201
|
+
* ```vue
|
|
202
|
+
* <TbwGrid :pinnedRows="{
|
|
203
|
+
* bottom: [{ type: 'aggregation', aggregator: 'sum' }],
|
|
204
|
+
* }" />
|
|
205
|
+
* ```
|
|
206
|
+
*/
|
|
207
|
+
pinnedRows?: boolean | PinnedRowsConfig;
|
|
208
|
+
/**
|
|
209
|
+
* Enable hierarchical tree view.
|
|
210
|
+
*
|
|
211
|
+
* @requires `import '@toolbox-web/grid-vue/features/tree';`
|
|
212
|
+
*
|
|
213
|
+
* @example
|
|
214
|
+
* ```vue
|
|
215
|
+
* <TbwGrid :tree="{
|
|
216
|
+
* childrenField: 'children',
|
|
217
|
+
* defaultExpanded: true,
|
|
218
|
+
* }" />
|
|
219
|
+
* ```
|
|
220
|
+
*/
|
|
221
|
+
tree?: boolean | TreeConfig;
|
|
222
|
+
/**
|
|
223
|
+
* Enable master-detail expandable rows.
|
|
224
|
+
*
|
|
225
|
+
* @requires `import '@toolbox-web/grid-vue/features/master-detail';`
|
|
226
|
+
*
|
|
227
|
+
* @example
|
|
228
|
+
* ```vue
|
|
229
|
+
* <TbwGrid :masterDetail="{
|
|
230
|
+
* renderer: (row) => h(OrderDetails, { order: row }),
|
|
231
|
+
* }" />
|
|
232
|
+
* ```
|
|
233
|
+
*/
|
|
234
|
+
masterDetail?: MasterDetailConfig;
|
|
235
|
+
/**
|
|
236
|
+
* Enable responsive card layout for narrow viewports.
|
|
237
|
+
*
|
|
238
|
+
* @requires `import '@toolbox-web/grid-vue/features/responsive';`
|
|
239
|
+
*
|
|
240
|
+
* @example
|
|
241
|
+
* ```vue
|
|
242
|
+
* <TbwGrid :responsive="{
|
|
243
|
+
* breakpoint: 768,
|
|
244
|
+
* cardRenderer: (row) => h(EmployeeCard, { employee: row }),
|
|
245
|
+
* }" />
|
|
246
|
+
* ```
|
|
247
|
+
*/
|
|
248
|
+
responsive?: boolean | ResponsivePluginConfig;
|
|
249
|
+
/**
|
|
250
|
+
* Enable undo/redo for cell edits.
|
|
251
|
+
* Requires editing to be enabled (will be auto-added).
|
|
252
|
+
*
|
|
253
|
+
* @requires `import '@toolbox-web/grid-vue/features/undo-redo';`
|
|
254
|
+
*
|
|
255
|
+
* @example
|
|
256
|
+
* ```vue
|
|
257
|
+
* <TbwGrid editing="dblclick" undoRedo />
|
|
258
|
+
* ```
|
|
259
|
+
*/
|
|
260
|
+
undoRedo?: boolean | UndoRedoConfig;
|
|
261
|
+
/**
|
|
262
|
+
* Enable CSV/JSON export functionality.
|
|
263
|
+
*
|
|
264
|
+
* @requires `import '@toolbox-web/grid-vue/features/export';`
|
|
265
|
+
*
|
|
266
|
+
* @example
|
|
267
|
+
* ```vue
|
|
268
|
+
* <TbwGrid export />
|
|
269
|
+
* <TbwGrid :export="{ filename: 'data.csv' }" />
|
|
270
|
+
* ```
|
|
271
|
+
*/
|
|
272
|
+
export?: boolean | ExportConfig;
|
|
273
|
+
/**
|
|
274
|
+
* Enable print functionality.
|
|
275
|
+
*
|
|
276
|
+
* @requires `import '@toolbox-web/grid-vue/features/print';`
|
|
277
|
+
*
|
|
278
|
+
* @example
|
|
279
|
+
* ```vue
|
|
280
|
+
* <TbwGrid print />
|
|
281
|
+
* ```
|
|
282
|
+
*/
|
|
283
|
+
print?: boolean | PrintConfig;
|
|
284
|
+
/**
|
|
285
|
+
* Enable pivot table functionality.
|
|
286
|
+
*
|
|
287
|
+
* @requires `import '@toolbox-web/grid-vue/features/pivot';`
|
|
288
|
+
*
|
|
289
|
+
* @example
|
|
290
|
+
* ```vue
|
|
291
|
+
* <TbwGrid :pivot="{
|
|
292
|
+
* rowFields: ['category'],
|
|
293
|
+
* columnFields: ['year'],
|
|
294
|
+
* valueField: 'sales',
|
|
295
|
+
* }" />
|
|
296
|
+
* ```
|
|
297
|
+
*/
|
|
298
|
+
pivot?: PivotConfig;
|
|
299
|
+
/**
|
|
300
|
+
* Enable server-side data operations.
|
|
301
|
+
*
|
|
302
|
+
* @requires `import '@toolbox-web/grid-vue/features/server-side';`
|
|
303
|
+
*
|
|
304
|
+
* @example
|
|
305
|
+
* ```vue
|
|
306
|
+
* <TbwGrid :serverSide="{
|
|
307
|
+
* dataSource: async (params) => fetchData(params),
|
|
308
|
+
* }" />
|
|
309
|
+
* ```
|
|
310
|
+
*/
|
|
311
|
+
serverSide?: ServerSideConfig;
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* All feature-related props combined.
|
|
315
|
+
*/
|
|
316
|
+
export type AllFeatureProps<TRow = unknown> = FeatureProps<TRow>;
|
|
317
|
+
//# sourceMappingURL=feature-props.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature-props.d.ts","sourceRoot":"","sources":["../../../../libs/grid-vue/src/lib/feature-props.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAGH,OAAO,KAAK,EACV,eAAe,EACf,0BAA0B,EAC1B,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,qBAAqB,EACrB,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,WAAW,EACX,WAAW,EACX,aAAa,EACb,sBAAsB,EACtB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,UAAU,EACV,cAAc,EACd,gBAAgB,EACjB,MAAM,uBAAuB,CAAC;AAE/B;;;;;GAKG;AACH,MAAM,WAAW,YAAY,CAAC,IAAI,GAAG,OAAO;IAK1C;;;;;;;;;;;;;OAaG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;IAE7D;;;;;;;;;;;;;;;OAeG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,UAAU,GAAG,QAAQ,CAAC;IAEpD;;;;;;;;;;OAUG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,eAAe,CAAC;IAEtC;;;;;;;;;;OAUG;IACH,WAAW,CAAC,EAAE,OAAO,GAAG,iBAAiB,CAAC;IAM1C;;;;;;;;;;;;;;;;;;;OAmBG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,eAAe,CAAC;IAE3D;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,eAAe,CAAC;IAEzD;;;;;;;;;;OAUG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IAMzC;;;;;;;;;OASG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,aAAa,CAAC;IAElC;;;;;;;;;OASG;IACH,UAAU,CAAC,EAAE,OAAO,GAAG,gBAAgB,CAAC;IAExC;;;;;;;;;;;;;;OAcG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;;;;;;;;;;;OAaG;IACH,eAAe,CAAC,EAAE,OAAO,GAAG,qBAAqB,CAAC;IAElD;;;;;;;;;OASG;IACH,oBAAoB,CAAC,EAAE,OAAO,GAAG,0BAA0B,CAAC;IAM5D;;;;;;;;;OASG;IACH,UAAU,CAAC,EAAE,OAAO,GAAG,gBAAgB,CAAC;IAExC;;;;;;;;;;;;OAYG;IACH,YAAY,CAAC,EAAE,kBAAkB,CAAC;IAElC;;;;;;;;;;;OAWG;IACH,UAAU,CAAC,EAAE,OAAO,GAAG,gBAAgB,CAAC;IAMxC;;;;;;;;;;;;OAYG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC;IAE5B;;;;;;;;;;;OAWG;IACH,YAAY,CAAC,EAAE,kBAAkB,CAAC;IAMlC;;;;;;;;;;;;OAYG;IACH,UAAU,CAAC,EAAE,OAAO,GAAG,sBAAsB,CAAC;IAM9C;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,EAAE,OAAO,GAAG,cAAc,CAAC;IAMpC;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,OAAO,GAAG,YAAY,CAAC;IAEhC;;;;;;;;;OASG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG,WAAW,CAAC;IAM9B;;;;;;;;;;;;;OAaG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC;IAEpB;;;;;;;;;;;OAWG;IACH,UAAU,CAAC,EAAE,gBAAgB,CAAC;CAC/B;AAED;;GAEG;AACH,MAAM,MAAM,eAAe,CAAC,IAAI,GAAG,OAAO,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Feature Registry for @toolbox-web/grid-vue
|
|
3
|
+
*
|
|
4
|
+
* This module provides a synchronous registry for plugin factories.
|
|
5
|
+
* Features are registered via side-effect imports, enabling tree-shaking
|
|
6
|
+
* while maintaining the clean prop-based API.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```typescript
|
|
10
|
+
* // Import features you need (side-effect imports)
|
|
11
|
+
* import '@toolbox-web/grid-vue/features/selection';
|
|
12
|
+
* import '@toolbox-web/grid-vue/features/filtering';
|
|
13
|
+
*
|
|
14
|
+
* // Props work automatically - no async loading, no HTTP requests
|
|
15
|
+
* <TbwGrid :selection="'range'" :filtering="{ debounceMs: 200 }" />
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* Feature names supported by the TbwGrid component.
|
|
20
|
+
*/
|
|
21
|
+
export type FeatureName = 'selection' | 'editing' | 'clipboard' | 'contextMenu' | 'multiSort' | 'sorting' | 'filtering' | 'reorder' | 'visibility' | 'pinnedColumns' | 'groupingColumns' | 'columnVirtualization' | 'rowReorder' | 'groupingRows' | 'pinnedRows' | 'tree' | 'masterDetail' | 'responsive' | 'undoRedo' | 'export' | 'print' | 'pivot' | 'serverSide';
|
|
22
|
+
/**
|
|
23
|
+
* Plugin factory function type.
|
|
24
|
+
* Takes configuration and returns a plugin instance.
|
|
25
|
+
*/
|
|
26
|
+
export type PluginFactory<TConfig = unknown> = (config: TConfig) => unknown;
|
|
27
|
+
/**
|
|
28
|
+
* Register a feature's plugin factory.
|
|
29
|
+
* Called by side-effect feature imports.
|
|
30
|
+
*
|
|
31
|
+
* @param name - The feature name (matches the prop name on TbwGrid)
|
|
32
|
+
* @param factory - Function that creates the plugin instance
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```ts
|
|
36
|
+
* // features/selection.ts
|
|
37
|
+
* import { SelectionPlugin } from '@toolbox-web/grid/plugins/selection';
|
|
38
|
+
* import { registerFeature } from '../lib/feature-registry';
|
|
39
|
+
*
|
|
40
|
+
* registerFeature('selection', (config) => new SelectionPlugin(config));
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
export declare function registerFeature<TConfig = unknown>(name: FeatureName, factory: PluginFactory<TConfig>): void;
|
|
44
|
+
/**
|
|
45
|
+
* Check if a feature is registered.
|
|
46
|
+
*/
|
|
47
|
+
export declare function isFeatureRegistered(name: FeatureName): boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Get all registered feature names.
|
|
50
|
+
*/
|
|
51
|
+
export declare function getRegisteredFeatures(): FeatureName[];
|
|
52
|
+
/**
|
|
53
|
+
* Get the factory for a feature, if registered.
|
|
54
|
+
*/
|
|
55
|
+
export declare function getFeatureFactory(name: FeatureName): PluginFactory | undefined;
|
|
56
|
+
/**
|
|
57
|
+
* Create a plugin from a feature prop.
|
|
58
|
+
* Returns undefined if the feature is not registered (with a console warning).
|
|
59
|
+
*
|
|
60
|
+
* @param name - Feature name
|
|
61
|
+
* @param config - Configuration value from the prop
|
|
62
|
+
*/
|
|
63
|
+
export declare function createPluginFromFeature(name: FeatureName, config: unknown): unknown | undefined;
|
|
64
|
+
/**
|
|
65
|
+
* Clear the feature registry.
|
|
66
|
+
* @internal - for testing only
|
|
67
|
+
*/
|
|
68
|
+
export declare function clearFeatureRegistry(): void;
|
|
69
|
+
//# sourceMappingURL=feature-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature-registry.d.ts","sourceRoot":"","sources":["../../../../libs/grid-vue/src/lib/feature-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;GAEG;AACH,MAAM,MAAM,WAAW,GACnB,WAAW,GACX,SAAS,GACT,WAAW,GACX,aAAa,GACb,WAAW,GACX,SAAS,GACT,WAAW,GACX,SAAS,GACT,YAAY,GACZ,eAAe,GACf,iBAAiB,GACjB,sBAAsB,GACtB,YAAY,GACZ,cAAc,GACd,YAAY,GACZ,MAAM,GACN,cAAc,GACd,YAAY,GACZ,UAAU,GACV,QAAQ,GACR,OAAO,GACP,OAAO,GACP,YAAY,CAAC;AAEjB;;;GAGG;AACH,MAAM,MAAM,aAAa,CAAC,OAAO,GAAG,OAAO,IAAI,CAAC,MAAM,EAAE,OAAO,KAAK,OAAO,CAAC;AAuB5E;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,eAAe,CAAC,OAAO,GAAG,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,aAAa,CAAC,OAAO,CAAC,GAAG,IAAI,CAK3G;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAE9D;AAED;;GAEG;AACH,wBAAgB,qBAAqB,IAAI,WAAW,EAAE,CAErD;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,WAAW,GAAG,aAAa,GAAG,SAAS,CAE9E;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS,CAgB/F;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,IAAI,CAG3C"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { GridIcons } from '@toolbox-web/grid';
|
|
2
|
+
import { InjectionKey, PropType } from 'vue';
|
|
3
|
+
/**
|
|
4
|
+
* Injection key for grid icons.
|
|
5
|
+
*/
|
|
6
|
+
export declare const GRID_ICONS: InjectionKey<Partial<GridIcons>>;
|
|
7
|
+
/**
|
|
8
|
+
* Composable to get the current icon overrides from the nearest provider.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```vue
|
|
12
|
+
* <script setup>
|
|
13
|
+
* import { useGridIcons } from '@toolbox-web/grid-vue';
|
|
14
|
+
*
|
|
15
|
+
* const icons = useGridIcons();
|
|
16
|
+
* </script>
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export declare function useGridIcons(): Partial<GridIcons> | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* Provides application-wide icon overrides for all descendant grids.
|
|
22
|
+
*
|
|
23
|
+
* Wrap your application (or part of it) with this provider to customize
|
|
24
|
+
* icons used by all TbwGrid components.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```vue
|
|
28
|
+
* <script setup>
|
|
29
|
+
* import { GridIconProvider } from '@toolbox-web/grid-vue';
|
|
30
|
+
*
|
|
31
|
+
* const icons = {
|
|
32
|
+
* sortAsc: '↑',
|
|
33
|
+
* sortDesc: '↓',
|
|
34
|
+
* expand: '+',
|
|
35
|
+
* collapse: '−',
|
|
36
|
+
* };
|
|
37
|
+
* </script>
|
|
38
|
+
*
|
|
39
|
+
* <template>
|
|
40
|
+
* <GridIconProvider :icons="icons">
|
|
41
|
+
* <App />
|
|
42
|
+
* </GridIconProvider>
|
|
43
|
+
* </template>
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
export declare const GridIconProvider: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
47
|
+
/**
|
|
48
|
+
* Icon overrides to provide to all descendant grids.
|
|
49
|
+
*/
|
|
50
|
+
icons: {
|
|
51
|
+
type: PropType<Partial<GridIcons>>;
|
|
52
|
+
required: true;
|
|
53
|
+
};
|
|
54
|
+
}>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
55
|
+
[key: string]: any;
|
|
56
|
+
}>[] | undefined, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
57
|
+
/**
|
|
58
|
+
* Icon overrides to provide to all descendant grids.
|
|
59
|
+
*/
|
|
60
|
+
icons: {
|
|
61
|
+
type: PropType<Partial<GridIcons>>;
|
|
62
|
+
required: true;
|
|
63
|
+
};
|
|
64
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
65
|
+
export type GridIconProviderProps = InstanceType<typeof GridIconProvider>['$props'];
|
|
66
|
+
//# sourceMappingURL=grid-icon-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grid-icon-registry.d.ts","sourceRoot":"","sources":["../../../../libs/grid-vue/src/lib/grid-icon-registry.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAoC,KAAK,YAAY,EAAE,KAAK,QAAQ,EAAE,MAAM,KAAK,CAAC;AAEzF;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,YAAY,CAAC,OAAO,CAAC,SAAS,CAAC,CAAwB,CAAC;AAEjF;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAAC,SAAS,CAAC,GAAG,SAAS,CAE7D;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,gBAAgB;IAGzB;;OAEG;;cAEe,QAAQ,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;;;;;;IAJ9C;;OAEG;;cAEe,QAAQ,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;;;iGAWhD,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,YAAY,CAAC,OAAO,gBAAgB,CAAC,CAAC,QAAQ,CAAC,CAAC"}
|