@toolbox-web/grid 1.6.2 → 1.8.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 +51 -15
- package/all.js +267 -158
- package/all.js.map +1 -1
- package/index.js +866 -722
- package/index.js.map +1 -1
- package/lib/core/grid.d.ts +68 -1
- package/lib/core/grid.d.ts.map +1 -1
- package/lib/core/internal/header.d.ts.map +1 -1
- package/lib/core/plugin/base-plugin.d.ts +182 -1
- 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/plugin-manager.d.ts +56 -1
- package/lib/core/plugin/plugin-manager.d.ts.map +1 -1
- package/lib/core/plugin/types.d.ts +36 -0
- package/lib/core/plugin/types.d.ts.map +1 -1
- package/lib/core/types.d.ts +1349 -31
- package/lib/core/types.d.ts.map +1 -1
- package/lib/plugins/clipboard/ClipboardPlugin.d.ts.map +1 -1
- package/lib/plugins/clipboard/index.js +140 -87
- package/lib/plugins/clipboard/index.js.map +1 -1
- package/lib/plugins/column-virtualization/index.js +64 -7
- package/lib/plugins/column-virtualization/index.js.map +1 -1
- package/lib/plugins/context-menu/ContextMenuPlugin.d.ts.map +1 -1
- package/lib/plugins/context-menu/index.js +123 -65
- package/lib/plugins/context-menu/index.js.map +1 -1
- package/lib/plugins/editing/EditingPlugin.d.ts +6 -1
- package/lib/plugins/editing/EditingPlugin.d.ts.map +1 -1
- package/lib/plugins/editing/index.js +95 -13
- package/lib/plugins/editing/index.js.map +1 -1
- package/lib/plugins/export/index.js +91 -34
- package/lib/plugins/export/index.js.map +1 -1
- package/lib/plugins/filtering/FilteringPlugin.d.ts +6 -1
- package/lib/plugins/filtering/FilteringPlugin.d.ts.map +1 -1
- package/lib/plugins/filtering/index.js +192 -123
- package/lib/plugins/filtering/index.js.map +1 -1
- package/lib/plugins/grouping-columns/index.js +57 -0
- package/lib/plugins/grouping-columns/index.js.map +1 -1
- package/lib/plugins/grouping-rows/GroupingRowsPlugin.d.ts +7 -2
- package/lib/plugins/grouping-rows/GroupingRowsPlugin.d.ts.map +1 -1
- package/lib/plugins/grouping-rows/index.js +142 -60
- package/lib/plugins/grouping-rows/index.js.map +1 -1
- package/lib/plugins/master-detail/index.js +69 -12
- package/lib/plugins/master-detail/index.js.map +1 -1
- package/lib/plugins/multi-sort/index.js +70 -13
- package/lib/plugins/multi-sort/index.js.map +1 -1
- package/lib/plugins/pinned-columns/PinnedColumnsPlugin.d.ts +3 -3
- package/lib/plugins/pinned-columns/PinnedColumnsPlugin.d.ts.map +1 -1
- package/lib/plugins/pinned-columns/index.js +106 -36
- package/lib/plugins/pinned-columns/index.js.map +1 -1
- package/lib/plugins/pinned-rows/index.js +57 -0
- package/lib/plugins/pinned-rows/index.js.map +1 -1
- package/lib/plugins/pivot/index.js +57 -0
- package/lib/plugins/pivot/index.js.map +1 -1
- package/lib/plugins/print/PrintPlugin.d.ts.map +1 -1
- package/lib/plugins/print/index.js +58 -1
- package/lib/plugins/print/index.js.map +1 -1
- package/lib/plugins/reorder/ReorderPlugin.d.ts.map +1 -1
- package/lib/plugins/reorder/column-drag.d.ts +2 -2
- package/lib/plugins/reorder/index.js +68 -17
- package/lib/plugins/reorder/index.js.map +1 -1
- package/lib/plugins/responsive/ResponsivePlugin.d.ts +6 -1
- package/lib/plugins/responsive/ResponsivePlugin.d.ts.map +1 -1
- package/lib/plugins/responsive/index.js +125 -54
- package/lib/plugins/responsive/index.js.map +1 -1
- package/lib/plugins/row-reorder/index.js +169 -112
- package/lib/plugins/row-reorder/index.js.map +1 -1
- package/lib/plugins/selection/SelectionPlugin.d.ts +14 -2
- package/lib/plugins/selection/SelectionPlugin.d.ts.map +1 -1
- package/lib/plugins/selection/index.js +84 -7
- package/lib/plugins/selection/index.js.map +1 -1
- package/lib/plugins/server-side/index.js +79 -22
- package/lib/plugins/server-side/index.js.map +1 -1
- package/lib/plugins/tree/TreePlugin.d.ts +7 -1
- package/lib/plugins/tree/TreePlugin.d.ts.map +1 -1
- package/lib/plugins/tree/index.js +140 -58
- package/lib/plugins/tree/index.js.map +1 -1
- package/lib/plugins/undo-redo/UndoRedoPlugin.d.ts +6 -1
- package/lib/plugins/undo-redo/UndoRedoPlugin.d.ts.map +1 -1
- package/lib/plugins/undo-redo/index.js +79 -10
- package/lib/plugins/undo-redo/index.js.map +1 -1
- package/lib/plugins/visibility/index.js +57 -0
- package/lib/plugins/visibility/index.js.map +1 -1
- package/package.json +1 -1
- package/public.d.ts +80 -2
- package/public.d.ts.map +1 -1
- package/umd/grid.all.umd.js +25 -25
- package/umd/grid.all.umd.js.map +1 -1
- package/umd/grid.umd.js +15 -15
- package/umd/grid.umd.js.map +1 -1
- package/umd/plugins/clipboard.umd.js +5 -5
- package/umd/plugins/clipboard.umd.js.map +1 -1
- package/umd/plugins/context-menu.umd.js +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/filtering.umd.js +1 -1
- package/umd/plugins/filtering.umd.js.map +1 -1
- package/umd/plugins/grouping-rows.umd.js +2 -2
- package/umd/plugins/grouping-rows.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/print.umd.js +1 -1
- package/umd/plugins/print.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 +1 -1
- package/umd/plugins/responsive.umd.js.map +1 -1
- package/umd/plugins/selection.umd.js +2 -2
- package/umd/plugins/selection.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 +1 -1
- package/umd/plugins/undo-redo.umd.js.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrintPlugin.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/plugins/print/PrintPlugin.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAI/D,OAAO,KAAK,EAAuB,WAAW,EAAE,WAAW,EAAoB,MAAM,SAAS,CAAC;AAwB/F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6DG;AACH,qBAAa,WAAY,SAAQ,cAAc,CAAC,WAAW,CAAC;;IAC1D,gBAAgB;IAChB,QAAQ,CAAC,IAAI,WAAW;IAExB,gBAAgB;IAChB,SAAkB,OAAO,WAAW;IAEpC,gCAAgC;IAChC,SAAkB,MAAM,SAAU;IA8BlC;;OAEG;IACH,UAAU,IAAI,OAAO;IAIrB;;;;;;;;;;;;;OAaG;IACG,KAAK,CAAC,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"PrintPlugin.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/plugins/print/PrintPlugin.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAI/D,OAAO,KAAK,EAAuB,WAAW,EAAE,WAAW,EAAoB,MAAM,SAAS,CAAC;AAwB/F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6DG;AACH,qBAAa,WAAY,SAAQ,cAAc,CAAC,WAAW,CAAC;;IAC1D,gBAAgB;IAChB,QAAQ,CAAC,IAAI,WAAW;IAExB,gBAAgB;IAChB,SAAkB,OAAO,WAAW;IAEpC,gCAAgC;IAChC,SAAkB,MAAM,SAAU;IA8BlC;;OAEG;IACH,UAAU,IAAI,OAAO;IAIrB;;;;;;;;;;;;;OAaG;IACG,KAAK,CAAC,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAoShD;;;OAGG;IACM,WAAW,IAAI,IAAI;CA2C7B"}
|
|
@@ -239,6 +239,63 @@ class w {
|
|
|
239
239
|
const i = new CustomEvent(t, { detail: e, bubbles: !0, cancelable: !0 });
|
|
240
240
|
return this.grid?.dispatchEvent?.(i), i.defaultPrevented;
|
|
241
241
|
}
|
|
242
|
+
// =========================================================================
|
|
243
|
+
// Event Bus - Plugin-to-Plugin Communication
|
|
244
|
+
// =========================================================================
|
|
245
|
+
/**
|
|
246
|
+
* Subscribe to an event from another plugin.
|
|
247
|
+
* The subscription is automatically cleaned up when this plugin is detached.
|
|
248
|
+
*
|
|
249
|
+
* @category Plugin Development
|
|
250
|
+
* @param eventType - The event type to listen for (e.g., 'filter-change')
|
|
251
|
+
* @param callback - The callback to invoke when the event is emitted
|
|
252
|
+
*
|
|
253
|
+
* @example
|
|
254
|
+
* ```typescript
|
|
255
|
+
* // In attach() or other initialization
|
|
256
|
+
* this.on('filter-change', (detail) => {
|
|
257
|
+
* console.log('Filter changed:', detail);
|
|
258
|
+
* });
|
|
259
|
+
* ```
|
|
260
|
+
*/
|
|
261
|
+
on(t, e) {
|
|
262
|
+
this.grid?._pluginManager?.subscribe(this, t, e);
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* Unsubscribe from a plugin event.
|
|
266
|
+
*
|
|
267
|
+
* @category Plugin Development
|
|
268
|
+
* @param eventType - The event type to stop listening for
|
|
269
|
+
*
|
|
270
|
+
* @example
|
|
271
|
+
* ```typescript
|
|
272
|
+
* this.off('filter-change');
|
|
273
|
+
* ```
|
|
274
|
+
*/
|
|
275
|
+
off(t) {
|
|
276
|
+
this.grid?._pluginManager?.unsubscribe(this, t);
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* Emit an event to other plugins via the Event Bus.
|
|
280
|
+
* This is for inter-plugin communication only; it does NOT dispatch DOM events.
|
|
281
|
+
* Use `emit()` to dispatch DOM events that external consumers can listen to.
|
|
282
|
+
*
|
|
283
|
+
* @category Plugin Development
|
|
284
|
+
* @param eventType - The event type to emit (should be declared in manifest.events)
|
|
285
|
+
* @param detail - The event payload
|
|
286
|
+
*
|
|
287
|
+
* @example
|
|
288
|
+
* ```typescript
|
|
289
|
+
* // Emit to other plugins (not DOM)
|
|
290
|
+
* this.emitPluginEvent('filter-change', { field: 'name', value: 'Alice' });
|
|
291
|
+
*
|
|
292
|
+
* // For DOM events that consumers can addEventListener to:
|
|
293
|
+
* this.emit('filter-change', { field: 'name', value: 'Alice' });
|
|
294
|
+
* ```
|
|
295
|
+
*/
|
|
296
|
+
emitPluginEvent(t, e) {
|
|
297
|
+
this.grid?._pluginManager?.emitPluginEvent(t, e);
|
|
298
|
+
}
|
|
242
299
|
/**
|
|
243
300
|
* Request a re-render of the grid.
|
|
244
301
|
*/
|
|
@@ -542,7 +599,7 @@ Click OK to continue, or Cancel to abort.`
|
|
|
542
599
|
window.removeEventListener("afterprint", e), t();
|
|
543
600
|
};
|
|
544
601
|
window.addEventListener("afterprint", e), window.print(), setTimeout(() => {
|
|
545
|
-
window.removeEventListener("afterprint", e), t();
|
|
602
|
+
typeof window < "u" && window.removeEventListener("afterprint", e), t();
|
|
546
603
|
}, 1e3);
|
|
547
604
|
});
|
|
548
605
|
}
|