@guiexpert/angular-table 16.1.52 → 16.1.56

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 (38) hide show
  1. package/README.md +8 -8
  2. package/esm2022/guiexpert-angular-table.mjs +5 -0
  3. package/esm2022/lib/component-renderer.if.mjs +2 -0
  4. package/esm2022/lib/service/dom-service.mjs +56 -0
  5. package/esm2022/lib/service/render-wrapper-factory.mjs +22 -0
  6. package/esm2022/lib/service/renderer-wrapper.mjs +44 -0
  7. package/esm2022/lib/table.component.mjs +113 -0
  8. package/esm2022/public-api.mjs +9 -0
  9. package/fesm2022/guiexpert-angular-table.mjs +237 -0
  10. package/fesm2022/guiexpert-angular-table.mjs.map +1 -0
  11. package/index.d.ts +5 -0
  12. package/lib/component-renderer.if.d.ts +4 -0
  13. package/lib/service/dom-service.d.ts +17 -0
  14. package/lib/service/render-wrapper-factory.d.ts +13 -0
  15. package/lib/service/renderer-wrapper.d.ts +14 -0
  16. package/lib/table.component.d.ts +43 -0
  17. package/package.json +22 -37
  18. package/{projects/angular-table/src/public-api.ts → public-api.d.ts} +0 -4
  19. package/.editorconfig +0 -16
  20. package/.vscode/extensions.json +0 -4
  21. package/.vscode/launch.json +0 -20
  22. package/.vscode/tasks.json +0 -42
  23. package/angular.json +0 -40
  24. package/projects/angular-table/README.md +0 -119
  25. package/projects/angular-table/ng-package.json +0 -7
  26. package/projects/angular-table/package.json +0 -19
  27. package/projects/angular-table/src/lib/component-renderer.if.ts +0 -12
  28. package/projects/angular-table/src/lib/service/dom-service.spec.ts +0 -17
  29. package/projects/angular-table/src/lib/service/dom-service.ts +0 -63
  30. package/projects/angular-table/src/lib/service/render-wrapper-factory.ts +0 -24
  31. package/projects/angular-table/src/lib/service/renderer-wrapper.ts +0 -86
  32. package/projects/angular-table/src/lib/table.component.css +0 -5
  33. package/projects/angular-table/src/lib/table.component.spec.ts +0 -28
  34. package/projects/angular-table/src/lib/table.component.ts +0 -169
  35. package/projects/angular-table/tsconfig.lib.json +0 -14
  36. package/projects/angular-table/tsconfig.lib.prod.json +0 -10
  37. package/projects/angular-table/tsconfig.spec.json +0 -14
  38. package/tsconfig.json +0 -38
@@ -1,169 +0,0 @@
1
- import {
2
- ChangeDetectionStrategy,
3
- Component,
4
- ElementRef,
5
- Input,
6
- NgZone,
7
- OnDestroy,
8
- OnInit,
9
- Output,
10
- Renderer2,
11
- ViewEncapsulation
12
- } from "@angular/core";
13
- import { CommonModule } from "@angular/common";
14
- import { debounceTime, Subject, takeWhile } from "rxjs";
15
- import {
16
- EventListenerIf, FocusModelIf,
17
- GeModelChangeEvent,
18
- GeMouseEvent, SelectionModelIf,
19
- TableApi,
20
- TableModelIf,
21
- TableOptions,
22
- TableOptionsIf,
23
- TableScope
24
- } from '@guiexpert/table';
25
- import { DomService } from "./service/dom-service";
26
-
27
-
28
- @Component({
29
- selector: "guiexpert-table",
30
- standalone: true,
31
- imports: [CommonModule],
32
- providers: [DomService],
33
- template: "",
34
- styleUrls: [
35
- "./table.component.css"
36
- ],
37
- encapsulation: ViewEncapsulation.None,
38
- changeDetection: ChangeDetectionStrategy.OnPush
39
- })
40
- export class TableComponent implements OnInit, OnDestroy, EventListenerIf {
41
-
42
- @Output()
43
- tableReady = new Subject<TableApi>();
44
-
45
- @Output()
46
- mouseMoved: Subject<GeMouseEvent> = new Subject<GeMouseEvent>();
47
-
48
- @Output()
49
- mouseDragging: Subject<GeMouseEvent> = new Subject<GeMouseEvent>();
50
-
51
- @Output()
52
- mouseDraggingEnded: Subject<GeMouseEvent> = new Subject<GeMouseEvent>();
53
-
54
- @Output()
55
- contextmenu: Subject<GeMouseEvent> = new Subject<GeMouseEvent>();
56
-
57
- @Output()
58
- mouseClicked: Subject<GeMouseEvent> = new Subject<GeMouseEvent>();
59
-
60
- @Output()
61
- modelChanged: Subject<GeModelChangeEvent> = new Subject<GeModelChangeEvent>();
62
-
63
-
64
- @Output()
65
- selectionChanged: Subject<SelectionModelIf> = new Subject<SelectionModelIf>();
66
-
67
- @Output()
68
- focusChanged: Subject<FocusModelIf> = new Subject<FocusModelIf>();
69
-
70
- @Output()
71
- checkboxChanged: Subject<any[]> = new Subject<any[]>();
72
-
73
- @Input()
74
- tableModel?: TableModelIf;
75
-
76
- @Input()
77
- tableOptions: TableOptionsIf = new TableOptions();
78
-
79
- @Input()
80
- debounceMouseClickDelay: number = 150;
81
-
82
- private debounceMouseClick: Subject<GeMouseEvent> = new Subject<GeMouseEvent>();
83
-
84
- private tableScope?: TableScope;
85
- private alive = true;
86
-
87
-
88
- constructor(
89
- private readonly renderer: Renderer2,
90
- private readonly elementRef: ElementRef,
91
- private readonly zone: NgZone,
92
- private readonly domService: DomService
93
- ) {
94
- }
95
-
96
-
97
- onSelectionChanged(model: SelectionModelIf): void {
98
- this.selectionChanged.next(model);
99
- }
100
-
101
- onFocusChanged(model: FocusModelIf): void {
102
- this.focusChanged.next(model);
103
- }
104
-
105
- onContextmenu(evt: GeMouseEvent): void {
106
- this.contextmenu.next(evt);
107
- }
108
-
109
- onMouseMoved(evt: GeMouseEvent): void {
110
- this.mouseMoved.next(evt);
111
- }
112
-
113
- // will be called by table-scope:
114
- onMouseClicked(evt: GeMouseEvent): void {
115
- this.debounceMouseClick.next(evt);
116
- }
117
-
118
- onCheckboxChanged(arr: any[]): void {
119
- this.checkboxChanged.next(arr);
120
- }
121
-
122
- onModelChanged(evt: GeModelChangeEvent): void {
123
- this.modelChanged.next(evt);
124
- }
125
-
126
- ngOnInit(): void {
127
- this.initModel();
128
- this.debounceMouseClick
129
- .pipe(
130
- debounceTime(this.debounceMouseClickDelay),
131
- takeWhile(() => this.alive)
132
- )
133
- .subscribe((value) => {
134
- this.zone.run(() => {
135
- this.mouseClicked.next(value);
136
- });
137
- });
138
- }
139
-
140
- ngOnDestroy(): void {
141
- this.alive = false;
142
- }
143
-
144
-
145
- onMouseDragging(evt: GeMouseEvent): void {
146
- this.mouseDragging.next(evt);
147
- }
148
-
149
- onMouseDraggingEnd(evt: GeMouseEvent): void {
150
- this.mouseDraggingEnded.next(evt);
151
- }
152
-
153
-
154
- private initModel() {
155
- this.zone.runOutsideAngular(this.init.bind(this));
156
- }
157
-
158
- private init() {
159
- if (this.tableModel) {
160
- this.tableScope = new TableScope(
161
- this.elementRef.nativeElement, this.tableModel, this.domService, this.tableOptions, this
162
- );
163
- this.tableScope.firstInit();
164
- this.tableReady.next(this.tableScope.getApi());
165
- }
166
- }
167
-
168
-
169
- }
@@ -1,14 +0,0 @@
1
- /* To learn more about this file see: https://angular.io/config/tsconfig. */
2
- {
3
- "extends": "../../tsconfig.json",
4
- "compilerOptions": {
5
- "outDir": "../../out-tsc/lib",
6
- "declaration": true,
7
- "declarationMap": true,
8
- "inlineSources": true,
9
- "types": []
10
- },
11
- "exclude": [
12
- "**/*.spec.ts"
13
- ]
14
- }
@@ -1,10 +0,0 @@
1
- /* To learn more about this file see: https://angular.io/config/tsconfig. */
2
- {
3
- "extends": "./tsconfig.lib.json",
4
- "compilerOptions": {
5
- "declarationMap": false
6
- },
7
- "angularCompilerOptions": {
8
- "compilationMode": "partial"
9
- }
10
- }
@@ -1,14 +0,0 @@
1
- /* To learn more about this file see: https://angular.io/config/tsconfig. */
2
- {
3
- "extends": "../../tsconfig.json",
4
- "compilerOptions": {
5
- "outDir": "../../out-tsc/spec",
6
- "types": [
7
- "jasmine"
8
- ]
9
- },
10
- "include": [
11
- "**/*.spec.ts",
12
- "**/*.d.ts"
13
- ]
14
- }
package/tsconfig.json DELETED
@@ -1,38 +0,0 @@
1
- /* To learn more about this file see: https://angular.io/config/tsconfig. */
2
- {
3
- "compileOnSave": false,
4
- "compilerOptions": {
5
- "paths": {
6
- "angular-table": [
7
- "./dist/angular-table"
8
- ]
9
- },
10
- "outDir": "./dist/out-tsc",
11
- "forceConsistentCasingInFileNames": true,
12
- "strict": true,
13
- "noImplicitOverride": true,
14
- "noPropertyAccessFromIndexSignature": true,
15
- "noImplicitReturns": true,
16
- "noFallthroughCasesInSwitch": true,
17
- "skipLibCheck": true,
18
- "esModuleInterop": true,
19
- "sourceMap": true,
20
- "declaration": false,
21
- "experimentalDecorators": true,
22
- "moduleResolution": "node",
23
- "importHelpers": true,
24
- "target": "ES2022",
25
- "module": "ES2022",
26
- "useDefineForClassFields": false,
27
- "lib": [
28
- "ES2022",
29
- "dom"
30
- ]
31
- },
32
- "angularCompilerOptions": {
33
- "enableI18nLegacyMessageIdFormat": false,
34
- "strictInjectionParameters": true,
35
- "strictInputAccessModifiers": true,
36
- "strictTemplates": true
37
- }
38
- }