ms-data-grid 0.0.59 → 0.0.60

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.
Files changed (64) hide show
  1. package/esm2022/lib/data-grid/data-grid.component.mjs +5069 -0
  2. package/esm2022/lib/data-grid/statuses.mjs +45 -0
  3. package/esm2022/lib/data-grid.module.mjs +27 -0
  4. package/esm2022/lib/directives/cell-render-init.directive.mjs +67 -0
  5. package/esm2022/lib/directives/cellHost.directive.mjs +16 -0
  6. package/esm2022/lib/pipes/filter.pipe.mjs +28 -0
  7. package/esm2022/lib/services/common.service.mjs +259 -0
  8. package/esm2022/lib/services/copy-service.service.mjs +222 -0
  9. package/esm2022/lib/services/export.service.mjs +149 -0
  10. package/esm2022/lib/services/split-columns.service.mjs +143 -0
  11. package/esm2022/ms-data-grid.mjs +5 -0
  12. package/esm2022/public-api.mjs +6 -0
  13. package/fesm2022/ms-data-grid.mjs +6006 -0
  14. package/fesm2022/ms-data-grid.mjs.map +1 -0
  15. package/index.d.ts +5 -0
  16. package/lib/data-grid/data-grid.component.d.ts +564 -0
  17. package/lib/data-grid/statuses.d.ts +3 -0
  18. package/lib/data-grid.module.d.ts +15 -0
  19. package/lib/directives/cell-render-init.directive.d.ts +18 -0
  20. package/lib/directives/cellHost.directive.d.ts +8 -0
  21. package/lib/pipes/filter.pipe.d.ts +7 -0
  22. package/lib/services/common.service.d.ts +18 -0
  23. package/lib/services/copy-service.service.d.ts +14 -0
  24. package/lib/services/export.service.d.ts +24 -0
  25. package/lib/services/split-columns.service.d.ts +9 -0
  26. package/package.json +51 -38
  27. package/{src/public-api.ts → public-api.d.ts} +2 -6
  28. package/ng-package.json +0 -18
  29. package/src/lib/css/bootstrap.css +0 -12043
  30. package/src/lib/data-grid/animations.ts +0 -267
  31. package/src/lib/data-grid/data-grid.component.html +0 -5724
  32. package/src/lib/data-grid/data-grid.component.scss +0 -2126
  33. package/src/lib/data-grid/data-grid.component.spec.ts +0 -28
  34. package/src/lib/data-grid/data-grid.component.ts +0 -5780
  35. package/src/lib/data-grid/statuses.ts +0 -49
  36. package/src/lib/data-grid.module.ts +0 -21
  37. package/src/lib/data-grid.service.spec.ts +0 -16
  38. package/src/lib/data-grid.service.ts +0 -9
  39. package/src/lib/directives/cell-render-init.directive.spec.ts +0 -11
  40. package/src/lib/directives/cell-render-init.directive.ts +0 -65
  41. package/src/lib/directives/cellHost.directive.spec.ts +0 -11
  42. package/src/lib/directives/cellHost.directive.ts +0 -10
  43. package/src/lib/directives/draggable-header.directive.spec.ts +0 -11
  44. package/src/lib/directives/draggable-header.directive.ts +0 -172
  45. package/src/lib/pipes/filter.pipe.spec.ts +0 -11
  46. package/src/lib/pipes/filter.pipe.ts +0 -22
  47. package/src/lib/services/cell-selection.service.spec.ts +0 -16
  48. package/src/lib/services/cell-selection.service.ts +0 -205
  49. package/src/lib/services/common.service.spec.ts +0 -16
  50. package/src/lib/services/common.service.ts +0 -306
  51. package/src/lib/services/copy-service.service.spec.ts +0 -16
  52. package/src/lib/services/copy-service.service.ts +0 -252
  53. package/src/lib/services/drag-drp.service.spec.ts +0 -16
  54. package/src/lib/services/drag-drp.service.ts +0 -58
  55. package/src/lib/services/export.service.spec.ts +0 -16
  56. package/src/lib/services/export.service.ts +0 -189
  57. package/src/lib/services/split-columns.service.spec.ts +0 -16
  58. package/src/lib/services/split-columns.service.ts +0 -148
  59. package/src/lib/services/swap-columns.service.spec.ts +0 -16
  60. package/src/lib/services/swap-columns.service.ts +0 -162
  61. package/src/typings.d.ts +0 -4
  62. package/tsconfig.lib.json +0 -19
  63. package/tsconfig.lib.prod.json +0 -10
  64. package/tsconfig.spec.json +0 -14
@@ -0,0 +1,14 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class CopyServiceService {
3
+ constructor();
4
+ getSelectedDataForCopy(dataSet: any[], columns: any[], rowSelectedIndexes: Set<number>, selectedCells: any[], getNestedValue: (obj: any, path: string) => any): any[][];
5
+ copyToClipboard(selectedData: any[][], selector?: string): void;
6
+ updateRows: any[];
7
+ currentColums: any;
8
+ pasteFromClipboardText(text: string, dataSet: any[], columns: any[], startRowIndex: number, startColIndex: number, startSubColIndex?: number): Promise<any>;
9
+ setNestedValue(obj: any, column: any, option: any, calledFromInput?: boolean): void;
10
+ cutSelectedSelectedData(dataSet: any[], rowSelectedIndexes: Set<number>, selectedCells: any[], columns: any[], setNestedValue: (obj: any, column: any, value: any) => void): any;
11
+ cutWithAnimation(selectedData: any[][], selector?: string): void;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<CopyServiceService, never>;
13
+ static ɵprov: i0.ɵɵInjectableDeclaration<CopyServiceService>;
14
+ }
@@ -0,0 +1,24 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class ExportService {
3
+ constructor();
4
+ /**
5
+ * Exports data to CSV or Excel.
6
+ * @param columns List of column definitions (each having name/key/is_visible)
7
+ * @param data The array of data objects
8
+ * @param fileName Name of the exported file (without extension)
9
+ * @param format 'csv' | 'xlsx'
10
+ */
11
+ exportData(columns: any[], data: any[], fileName: string, format?: 'csv' | 'xlsx', rowSelectedIndexes?: Set<number> | null, styleConfig?: {
12
+ headerBgColor?: string;
13
+ headerTextColor?: string;
14
+ bodyTextColor?: string;
15
+ fontFamily?: string;
16
+ fontWeight?: 'normal' | 'bold';
17
+ zoomScale?: number;
18
+ headerRowHeight?: number;
19
+ selectedRowBgColor?: string;
20
+ }): void;
21
+ private getNestedValue;
22
+ static ɵfac: i0.ɵɵFactoryDeclaration<ExportService, never>;
23
+ static ɵprov: i0.ɵɵInjectableDeclaration<ExportService>;
24
+ }
@@ -0,0 +1,9 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class SplitColumnsService {
3
+ prepareColumns(columns: any[], containerWidth: number): any;
4
+ setColumnsQuery(columns: any[]): any[];
5
+ assignDefaultWidths(columns: any[], containerWidth: number): any[];
6
+ private getVisibleLeafColumns;
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<SplitColumnsService, never>;
8
+ static ɵprov: i0.ɵɵInjectableDeclaration<SplitColumnsService>;
9
+ }
package/package.json CHANGED
@@ -1,38 +1,51 @@
1
- {
2
- "name": "ms-data-grid",
3
- "version": "0.0.59",
4
- "description": "A powerful, customizable Angular data grid component with advanced features like sorting, filtering, pagination, column pinning, and taskbar actions. Perfect for enterprise applications.",
5
- "keywords": [
6
- "angular",
7
- "data-grid",
8
- "table",
9
- "datagrid",
10
- "angular-component",
11
- "data-table",
12
- "grid",
13
- "sorting",
14
- "filtering",
15
- "pagination",
16
- "angular-grid",
17
- "enterprise-grid",
18
- "customizable-grid",
19
- "responsive-table",
20
- "column-pinning"
21
- ],
22
- "author": "Bilal",
23
- "license": "MIT",
24
- "peerDependencies": {
25
- "@angular/common": "^16.2.0",
26
- "@angular/core": "^16.2.0"
27
- },
28
- "dependencies": {
29
- "xlsx-js-style": "^1.2.0",
30
- "ng-inline-svg": "^13.1.1",
31
- "ngx-bootstrap": "^20.0.0",
32
- "bootstrap": "^5.3.7",
33
- "tslib": "^2.3.0",
34
- "file-saver": "^2.0.5",
35
- "zone.js": "~0.13.0"
36
- },
37
- "sideEffects": false
38
- }
1
+ {
2
+ "name": "ms-data-grid",
3
+ "version": "0.0.60",
4
+ "description": "A powerful, customizable Angular data grid component with advanced features like sorting, filtering, pagination, column pinning, and taskbar actions. Perfect for enterprise applications.",
5
+ "keywords": [
6
+ "angular",
7
+ "data-grid",
8
+ "table",
9
+ "datagrid",
10
+ "angular-component",
11
+ "data-table",
12
+ "grid",
13
+ "sorting",
14
+ "filtering",
15
+ "pagination",
16
+ "angular-grid",
17
+ "enterprise-grid",
18
+ "customizable-grid",
19
+ "responsive-table",
20
+ "column-pinning"
21
+ ],
22
+ "author": "Bilal",
23
+ "license": "MIT",
24
+ "peerDependencies": {
25
+ "@angular/common": "^16.2.0",
26
+ "@angular/core": "^16.2.0"
27
+ },
28
+ "dependencies": {
29
+ "xlsx-js-style": "^1.2.0",
30
+ "ng-inline-svg": "^13.1.1",
31
+ "ngx-bootstrap": "^20.0.0",
32
+ "bootstrap": "^5.3.7",
33
+ "tslib": "^2.3.0",
34
+ "file-saver": "^2.0.5",
35
+ "zone.js": "~0.13.0"
36
+ },
37
+ "sideEffects": false,
38
+ "module": "fesm2022/ms-data-grid.mjs",
39
+ "typings": "index.d.ts",
40
+ "exports": {
41
+ "./package.json": {
42
+ "default": "./package.json"
43
+ },
44
+ ".": {
45
+ "types": "./index.d.ts",
46
+ "esm2022": "./esm2022/ms-data-grid.mjs",
47
+ "esm": "./esm2022/ms-data-grid.mjs",
48
+ "default": "./fesm2022/ms-data-grid.mjs"
49
+ }
50
+ }
51
+ }
@@ -1,6 +1,2 @@
1
- /*
2
- * Public API Surface of data-grid
3
- */
4
-
5
- export * from './lib/data-grid.module';
6
- export * from './lib/data-grid/data-grid.component';
1
+ export * from './lib/data-grid.module';
2
+ export * from './lib/data-grid/data-grid.component';
package/ng-package.json DELETED
@@ -1,18 +0,0 @@
1
- {
2
- "$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
3
- "dest": "../../dist/data-grid",
4
- "lib": {
5
- "entryFile": "src/public-api.ts"
6
- },
7
- "assets": [
8
- "src/assets"
9
- ],
10
- "allowedNonPeerDependencies": [
11
- "xlsx-js-style",
12
- "ng-inline-svg",
13
- "ngx-bootstrap",
14
- "bootstrap",
15
- "file-saver",
16
- "zone.js"
17
- ]
18
- }