@magic-xpa/angular-material-core 4.1100.0-dev4110.26 → 4.1100.0-dev4110.260
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/esm2022/index.mjs +9 -0
- package/{esm2020 → esm2022}/magic-xpa-angular-material-core.mjs +1 -1
- package/{esm2020 → esm2022}/src/angular-material.module.mjs +83 -83
- package/esm2022/src/components/base-mat-table-magic.component.mjs +62 -0
- package/esm2022/src/directives/magic/form-controls/mat-magic-autocomplete.directive.mjs +28 -0
- package/{esm2020 → esm2022}/src/directives/magic/form-controls/mat-magic-checkbox.directive.mjs +14 -14
- package/esm2022/src/directives/magic/form-controls/mat-magic-combobox.directive.mjs +30 -0
- package/esm2022/src/directives/magic/form-controls/mat-magic-listbox.directive.mjs +27 -0
- package/{esm2020 → esm2022}/src/services/mat.magic.providers.mjs +6 -6
- package/esm2022/src/services/mattable.magic.service.mjs +138 -0
- package/{fesm2020 → fesm2022}/magic-xpa-angular-material-core.mjs +322 -302
- package/fesm2022/magic-xpa-angular-material-core.mjs.map +1 -0
- package/index.d.ts +8 -8
- package/package.json +10 -16
- package/src/angular-material.module.d.ts +26 -26
- package/src/components/base-mat-table-magic.component.d.ts +19 -19
- package/src/directives/magic/form-controls/mat-magic-autocomplete.directive.d.ts +7 -7
- package/src/directives/magic/form-controls/mat-magic-checkbox.directive.d.ts +6 -6
- package/src/directives/magic/form-controls/mat-magic-combobox.directive.d.ts +9 -9
- package/src/directives/magic/form-controls/mat-magic-listbox.directive.d.ts +9 -9
- package/src/services/mat.magic.providers.d.ts +38 -38
- package/src/services/mattable.magic.service.d.ts +36 -36
- package/esm2020/index.mjs +0 -9
- package/esm2020/src/components/base-mat-table-magic.component.mjs +0 -54
- package/esm2020/src/directives/magic/form-controls/mat-magic-autocomplete.directive.mjs +0 -28
- package/esm2020/src/directives/magic/form-controls/mat-magic-combobox.directive.mjs +0 -30
- package/esm2020/src/directives/magic/form-controls/mat-magic-listbox.directive.mjs +0 -26
- package/esm2020/src/services/mattable.magic.service.mjs +0 -127
- package/fesm2015/magic-xpa-angular-material-core.mjs +0 -367
- package/fesm2015/magic-xpa-angular-material-core.mjs.map +0 -1
- package/fesm2020/magic-xpa-angular-material-core.mjs.map +0 -1
|
@@ -19,323 +19,343 @@ import { MatSelectModule } from '@angular/material/select';
|
|
|
19
19
|
import { MatDatepickerModule } from '@angular/material/datepicker';
|
|
20
20
|
import { MatNativeDateModule } from '@angular/material/core';
|
|
21
21
|
|
|
22
|
-
class MatCheckboxDirective extends CheckboxMagicDirective {
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
(
|
|
27
|
-
type: Directive,
|
|
28
|
-
args: [{
|
|
22
|
+
class MatCheckboxDirective extends CheckboxMagicDirective {
|
|
23
|
+
static ɵfac = (() => { let ɵMatCheckboxDirective_BaseFactory; return function MatCheckboxDirective_Factory(t) { return (ɵMatCheckboxDirective_BaseFactory || (ɵMatCheckboxDirective_BaseFactory = i0.ɵɵgetInheritedFactory(MatCheckboxDirective)))(t || MatCheckboxDirective); }; })();
|
|
24
|
+
static ɵdir = i0.ɵɵdefineDirective({ type: MatCheckboxDirective, selectors: [["mat-checkbox", "magic", "", 3, "noFormControl", ""]], features: [i0.ɵɵInheritDefinitionFeature] });
|
|
25
|
+
}
|
|
26
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MatCheckboxDirective, [{
|
|
27
|
+
type: Directive,
|
|
28
|
+
args: [{
|
|
29
29
|
selector: `
|
|
30
30
|
mat-checkbox[magic]:not([noFormControl])
|
|
31
|
-
`,
|
|
32
|
-
}]
|
|
31
|
+
`,
|
|
32
|
+
}]
|
|
33
33
|
}], null, null); })();
|
|
34
34
|
|
|
35
|
-
class MatComboboxDirective extends ComboboxMagicDirective {
|
|
36
|
-
onChange($event) {
|
|
37
|
-
super.onChange($event);
|
|
38
|
-
}
|
|
39
|
-
onOpenedChanged($event) {
|
|
40
|
-
MagicDirective.opened = $event;
|
|
41
|
-
}
|
|
42
|
-
onComboboxItemsListChanged() {
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
(
|
|
50
|
-
type: Directive,
|
|
51
|
-
args: [{
|
|
52
|
-
selector: `mat-select[magic]`,
|
|
53
|
-
}]
|
|
54
|
-
}], null, { onChange: [{
|
|
55
|
-
type: HostListener,
|
|
56
|
-
args: ['selectionChange', ['$event']]
|
|
57
|
-
}], onOpenedChanged: [{
|
|
58
|
-
type: HostListener,
|
|
59
|
-
args: ['openedChange', ['$event']]
|
|
35
|
+
class MatComboboxDirective extends ComboboxMagicDirective {
|
|
36
|
+
onChange($event) {
|
|
37
|
+
super.onChange($event);
|
|
38
|
+
}
|
|
39
|
+
onOpenedChanged($event) {
|
|
40
|
+
MagicDirective.opened = $event;
|
|
41
|
+
}
|
|
42
|
+
onComboboxItemsListChanged() {
|
|
43
|
+
}
|
|
44
|
+
static ɵfac = (() => { let ɵMatComboboxDirective_BaseFactory; return function MatComboboxDirective_Factory(t) { return (ɵMatComboboxDirective_BaseFactory || (ɵMatComboboxDirective_BaseFactory = i0.ɵɵgetInheritedFactory(MatComboboxDirective)))(t || MatComboboxDirective); }; })();
|
|
45
|
+
static ɵdir = i0.ɵɵdefineDirective({ type: MatComboboxDirective, selectors: [["mat-select", "magic", ""]], hostBindings: function MatComboboxDirective_HostBindings(rf, ctx) { if (rf & 1) {
|
|
46
|
+
i0.ɵɵlistener("selectionChange", function MatComboboxDirective_selectionChange_HostBindingHandler($event) { return ctx.onChange($event); })("openedChange", function MatComboboxDirective_openedChange_HostBindingHandler($event) { return ctx.onOpenedChanged($event); });
|
|
47
|
+
} }, features: [i0.ɵɵInheritDefinitionFeature] });
|
|
48
|
+
}
|
|
49
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MatComboboxDirective, [{
|
|
50
|
+
type: Directive,
|
|
51
|
+
args: [{
|
|
52
|
+
selector: `mat-select[magic]`,
|
|
53
|
+
}]
|
|
54
|
+
}], null, { onChange: [{
|
|
55
|
+
type: HostListener,
|
|
56
|
+
args: ['selectionChange', ['$event']]
|
|
57
|
+
}], onOpenedChanged: [{
|
|
58
|
+
type: HostListener,
|
|
59
|
+
args: ['openedChange', ['$event']]
|
|
60
60
|
}] }); })();
|
|
61
61
|
|
|
62
|
-
class MgMatTableService extends TableMagicService {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
this.dataSource
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
this.
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
this.
|
|
89
|
-
this.
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
this.
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
if (isNullOrUndefined(this.paginator))
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
this.
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
this.refreshDataSource();
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
let guiEvent = getGuiEventObj("
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
this.task.
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
this.task.Records.
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
(
|
|
179
|
-
|
|
180
|
-
|
|
62
|
+
class MgMatTableService extends TableMagicService {
|
|
63
|
+
componentList;
|
|
64
|
+
task;
|
|
65
|
+
dataSource;
|
|
66
|
+
get DataSource() {
|
|
67
|
+
return this.dataSource;
|
|
68
|
+
}
|
|
69
|
+
set DataSource(dataSource) {
|
|
70
|
+
this.dataSource = dataSource;
|
|
71
|
+
}
|
|
72
|
+
selection;
|
|
73
|
+
get Selection() {
|
|
74
|
+
return this.selection;
|
|
75
|
+
}
|
|
76
|
+
set Selection(selection) {
|
|
77
|
+
this.selection = selection;
|
|
78
|
+
}
|
|
79
|
+
paginator;
|
|
80
|
+
get Paginator() {
|
|
81
|
+
return this.paginator;
|
|
82
|
+
}
|
|
83
|
+
set Paginator(paginator) {
|
|
84
|
+
this.paginator = paginator;
|
|
85
|
+
}
|
|
86
|
+
constructor(componentList, task) {
|
|
87
|
+
super(componentList, task);
|
|
88
|
+
this.componentList = componentList;
|
|
89
|
+
this.task = task;
|
|
90
|
+
}
|
|
91
|
+
connect(dataSource, paginator, selection) {
|
|
92
|
+
this.dataSource = dataSource;
|
|
93
|
+
this.paginator = paginator;
|
|
94
|
+
this.selection = selection;
|
|
95
|
+
}
|
|
96
|
+
refreshDataSource() {
|
|
97
|
+
if (!isNullOrUndefined(this.paginator))
|
|
98
|
+
this.dataSource.paginator = this.paginator;
|
|
99
|
+
this.dataSource.data = (this.task.mgAccessorService.isDataviewEmpty() ? [] : this.task.Records.list);
|
|
100
|
+
}
|
|
101
|
+
getPageSize() {
|
|
102
|
+
if (isNullOrUndefined(this.paginator))
|
|
103
|
+
return 10;
|
|
104
|
+
return this.paginator.pageSize;
|
|
105
|
+
}
|
|
106
|
+
selectRow(guiRowid) {
|
|
107
|
+
super.selectRow(guiRowid);
|
|
108
|
+
this.selection.select(this.task.Records.list[guiRowid]);
|
|
109
|
+
this.refreshDataSource();
|
|
110
|
+
}
|
|
111
|
+
selectPage(pageId) {
|
|
112
|
+
if (!isNullOrUndefined(this.paginator))
|
|
113
|
+
this.paginator.pageIndex = pageId;
|
|
114
|
+
this.refreshDataSource();
|
|
115
|
+
}
|
|
116
|
+
selectedRow() {
|
|
117
|
+
return this.selection.selected[0];
|
|
118
|
+
}
|
|
119
|
+
mgOnPaginateChange(e, changeSelectedRow) {
|
|
120
|
+
if (this.task.oldPageSize != e.pageSize) {
|
|
121
|
+
this.handleResize(e.pageIndex, e.previousPageIndex, e.pageSize);
|
|
122
|
+
this.task.oldPageSize = e.pageSize;
|
|
123
|
+
}
|
|
124
|
+
else {
|
|
125
|
+
if (changeSelectedRow) {
|
|
126
|
+
let evt;
|
|
127
|
+
if (e.pageIndex > e.previousPageIndex) {
|
|
128
|
+
evt = (e.pageIndex - e.previousPageIndex === 1) ? "next-page" : "end-table";
|
|
129
|
+
}
|
|
130
|
+
else {
|
|
131
|
+
evt = (e.previousPageIndex - e.pageIndex === 1) ? "previous-page" : "begin-table";
|
|
132
|
+
}
|
|
133
|
+
let guiEvent = getGuiEventObj("navigateInTable", "magicRow", 0);
|
|
134
|
+
guiEvent.Value = evt;
|
|
135
|
+
this.task.insertEvent(guiEvent);
|
|
136
|
+
}
|
|
137
|
+
else
|
|
138
|
+
this.getRowsIfNeeded(e.pageIndex, e.previousPageIndex, e.pageSize);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
handleResize(pageIndex, prevPageIndex, pageSize) {
|
|
142
|
+
let requiredGuiRowId = pageIndex * pageSize;
|
|
143
|
+
this.task.resize(pageSize, requiredGuiRowId);
|
|
144
|
+
}
|
|
145
|
+
getRowsIfNeeded(pageIndex, prevPageIndex, pageSize) {
|
|
146
|
+
let guiEvent = getGuiEventObj("getRows", "", 0);
|
|
147
|
+
guiEvent.Line = pageIndex * pageSize;
|
|
148
|
+
this.task.insertEvent(guiEvent);
|
|
149
|
+
this.setTableTopIndex(this.task.getDvRowId(pageSize * pageIndex));
|
|
150
|
+
}
|
|
151
|
+
sortData(e) {
|
|
152
|
+
let direction = 0;
|
|
153
|
+
if (e.direction === 'asc')
|
|
154
|
+
direction = 0;
|
|
155
|
+
else if (e.direction === 'desc')
|
|
156
|
+
direction = 1;
|
|
157
|
+
let guiEvent = getGuiEventObj("columnSort", e.active, direction);
|
|
158
|
+
this.task.insertEvent(guiEvent);
|
|
159
|
+
}
|
|
160
|
+
updateTableSize(size) {
|
|
161
|
+
if (size === 0) {
|
|
162
|
+
size = 1;
|
|
163
|
+
this.task.Records.clearFirstTableRecord(this.task.template);
|
|
164
|
+
}
|
|
165
|
+
else if (isNullOrUndefined(this.paginator))
|
|
166
|
+
size = this.getPageSize();
|
|
167
|
+
this.task.formGroups.length = size;
|
|
168
|
+
this.task.Records.updateSize(size);
|
|
169
|
+
this.task.setIncludesFirst(false);
|
|
170
|
+
}
|
|
171
|
+
selectPageForGuiRowId(guiRowId) {
|
|
172
|
+
let pageToBeSelected = 0;
|
|
173
|
+
let prevSelectedRow = this.selectedRow();
|
|
174
|
+
pageToBeSelected = Math.floor(guiRowId / this.getPageSize());
|
|
175
|
+
if ((isNullOrUndefined(prevSelectedRow) || (!isNullOrUndefined(this.paginator) && pageToBeSelected != this.paginator.pageIndex)))
|
|
176
|
+
this.selectPage(pageToBeSelected);
|
|
177
|
+
}
|
|
178
|
+
setTableTopIndex(value) {
|
|
179
|
+
this.task.Records.setGuiTopIndex(value);
|
|
180
|
+
if (value >= 0)
|
|
181
|
+
this.selectPageForGuiRowId(this.task.getGuiRowId(value, true));
|
|
182
|
+
}
|
|
183
|
+
getTableTopIndex() {
|
|
184
|
+
return this.task.Records.getGuiTopIndex();
|
|
185
|
+
}
|
|
186
|
+
static ɵfac = function MgMatTableService_Factory(t) { return new (t || MgMatTableService)(i0.ɵɵinject(i1.ComponentListMagicService), i0.ɵɵinject(i1.TaskMagicService)); };
|
|
187
|
+
static ɵprov = i0.ɵɵdefineInjectable({ token: MgMatTableService, factory: MgMatTableService.ɵfac });
|
|
188
|
+
}
|
|
189
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MgMatTableService, [{
|
|
190
|
+
type: Injectable
|
|
191
|
+
}], () => [{ type: i1.ComponentListMagicService }, { type: i1.TaskMagicService }], null); })();
|
|
181
192
|
|
|
182
|
-
const matMagicProviders = [
|
|
183
|
-
...basicMagicProviders,
|
|
184
|
-
{ provide: TableMagicService, useClass: MgMatTableService }
|
|
193
|
+
const matMagicProviders = [
|
|
194
|
+
...basicMagicProviders,
|
|
195
|
+
{ provide: TableMagicService, useClass: MgMatTableService }
|
|
185
196
|
];
|
|
186
197
|
|
|
187
|
-
class BaseMatTableMagicComponent extends TaskBaseMagicComponent {
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
this.magicService
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
198
|
+
class BaseMatTableMagicComponent extends TaskBaseMagicComponent {
|
|
199
|
+
ref;
|
|
200
|
+
magicService;
|
|
201
|
+
paginator;
|
|
202
|
+
sort;
|
|
203
|
+
displayedColumns;
|
|
204
|
+
dataSource;
|
|
205
|
+
selection;
|
|
206
|
+
constructor(ref, magicService) {
|
|
207
|
+
super(ref, magicService);
|
|
208
|
+
this.ref = ref;
|
|
209
|
+
this.magicService = magicService;
|
|
210
|
+
this.displayedColumns = [];
|
|
211
|
+
this.dataSource = new MatTableDataSource(this.task.Records.list);
|
|
212
|
+
this.selection = new SelectionModel(false, []);
|
|
213
|
+
}
|
|
214
|
+
ngOnInit() {
|
|
215
|
+
super.ngOnInit();
|
|
216
|
+
this.magicService.tableService.connect(this.dataSource, this.paginator, this.selection);
|
|
217
|
+
}
|
|
218
|
+
ngAfterContentChecked() {
|
|
219
|
+
if (!isNullOrUndefined(this.paginator) && !isNullOrUndefined(this.paginator.pageSize) &&
|
|
220
|
+
this.paginator.pageSize != this.task.oldPageSize) {
|
|
221
|
+
this.magicService.tableService.handleResize(this.paginator.pageIndex, 0, this.paginator.pageSize);
|
|
222
|
+
this.task.oldPageSize = this.paginator.pageSize;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
static ɵfac = function BaseMatTableMagicComponent_Factory(t) { return new (t || BaseMatTableMagicComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i1.MagicServices)); };
|
|
226
|
+
static ɵcmp = i0.ɵɵdefineComponent({ type: BaseMatTableMagicComponent, selectors: [["ng-component"]], viewQuery: function BaseMatTableMagicComponent_Query(rf, ctx) { if (rf & 1) {
|
|
227
|
+
i0.ɵɵviewQuery(MatPaginator, 7);
|
|
228
|
+
i0.ɵɵviewQuery(MatSort, 7);
|
|
229
|
+
} if (rf & 2) {
|
|
230
|
+
let _t;
|
|
231
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.paginator = _t.first);
|
|
232
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.sort = _t.first);
|
|
233
|
+
} }, features: [i0.ɵɵProvidersFeature(matMagicProviders), i0.ɵɵInheritDefinitionFeature], decls: 0, vars: 0, template: function BaseMatTableMagicComponent_Template(rf, ctx) { }, encapsulation: 2 });
|
|
234
|
+
}
|
|
235
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BaseMatTableMagicComponent, [{
|
|
236
|
+
type: Component,
|
|
237
|
+
args: [{
|
|
238
|
+
providers: matMagicProviders,
|
|
239
|
+
template: ''
|
|
240
|
+
}]
|
|
241
|
+
}], () => [{ type: i0.ChangeDetectorRef }, { type: i1.MagicServices }], { paginator: [{
|
|
242
|
+
type: ViewChild,
|
|
243
|
+
args: [MatPaginator, { static: true }]
|
|
244
|
+
}], sort: [{
|
|
245
|
+
type: ViewChild,
|
|
246
|
+
args: [MatSort, { static: true }]
|
|
229
247
|
}] }); })();
|
|
248
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(BaseMatTableMagicComponent, { className: "BaseMatTableMagicComponent", filePath: "src\\components\\base-mat-table-magic.component.ts", lineNumber: 19 }); })();
|
|
230
249
|
|
|
231
|
-
class MatListboxDirective {
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
250
|
+
class MatListboxDirective {
|
|
251
|
+
magicDirective;
|
|
252
|
+
constructor(magicDirective) {
|
|
253
|
+
this.magicDirective = magicDirective;
|
|
254
|
+
}
|
|
255
|
+
onChange($event) {
|
|
256
|
+
this.magicDirective.task.onListBoxSelectionChanged($event, this.magicDirective.id);
|
|
257
|
+
}
|
|
258
|
+
static ɵfac = function MatListboxDirective_Factory(t) { return new (t || MatListboxDirective)(i0.ɵɵdirectiveInject(i1.MagicDirective)); };
|
|
259
|
+
static ɵdir = i0.ɵɵdefineDirective({ type: MatListboxDirective, selectors: [["mat-selection-list", "magic", ""]], hostBindings: function MatListboxDirective_HostBindings(rf, ctx) { if (rf & 1) {
|
|
260
|
+
i0.ɵɵlistener("selectionChange", function MatListboxDirective_selectionChange_HostBindingHandler($event) { return ctx.onChange($event); });
|
|
261
|
+
} } });
|
|
262
|
+
}
|
|
263
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MatListboxDirective, [{
|
|
264
|
+
type: Directive,
|
|
265
|
+
args: [{
|
|
266
|
+
selector: `mat-selection-list[magic]`,
|
|
267
|
+
}]
|
|
268
|
+
}], () => [{ type: i1.MagicDirective }], { onChange: [{
|
|
269
|
+
type: HostListener,
|
|
270
|
+
args: ['selectionChange', ['$event']]
|
|
251
271
|
}] }); })();
|
|
252
272
|
|
|
253
|
-
class MatMagicAutocompleteDirective {
|
|
254
|
-
onOpenedChanged($event) {
|
|
255
|
-
MagicDirective.noOfAutoCompleteBoxesOpened++;
|
|
256
|
-
}
|
|
257
|
-
onClosedChanged($event) {
|
|
258
|
-
MagicDirective.noOfAutoCompleteBoxesOpened--;
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
(
|
|
266
|
-
type: Directive,
|
|
267
|
-
args: [{
|
|
268
|
-
selector: 'mat-autocomplete[magic]'
|
|
269
|
-
}]
|
|
270
|
-
}], null, { onOpenedChanged: [{
|
|
271
|
-
type: HostListener,
|
|
272
|
-
args: ['opened', ['$event']]
|
|
273
|
-
}], onClosedChanged: [{
|
|
274
|
-
type: HostListener,
|
|
275
|
-
args: ['closed', ['$event']]
|
|
273
|
+
class MatMagicAutocompleteDirective {
|
|
274
|
+
onOpenedChanged($event) {
|
|
275
|
+
MagicDirective.noOfAutoCompleteBoxesOpened++;
|
|
276
|
+
}
|
|
277
|
+
onClosedChanged($event) {
|
|
278
|
+
MagicDirective.noOfAutoCompleteBoxesOpened--;
|
|
279
|
+
}
|
|
280
|
+
static ɵfac = function MatMagicAutocompleteDirective_Factory(t) { return new (t || MatMagicAutocompleteDirective)(); };
|
|
281
|
+
static ɵdir = i0.ɵɵdefineDirective({ type: MatMagicAutocompleteDirective, selectors: [["mat-autocomplete", "magic", ""]], hostBindings: function MatMagicAutocompleteDirective_HostBindings(rf, ctx) { if (rf & 1) {
|
|
282
|
+
i0.ɵɵlistener("opened", function MatMagicAutocompleteDirective_opened_HostBindingHandler($event) { return ctx.onOpenedChanged($event); })("closed", function MatMagicAutocompleteDirective_closed_HostBindingHandler($event) { return ctx.onClosedChanged($event); });
|
|
283
|
+
} } });
|
|
284
|
+
}
|
|
285
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MatMagicAutocompleteDirective, [{
|
|
286
|
+
type: Directive,
|
|
287
|
+
args: [{
|
|
288
|
+
selector: 'mat-autocomplete[magic]'
|
|
289
|
+
}]
|
|
290
|
+
}], null, { onOpenedChanged: [{
|
|
291
|
+
type: HostListener,
|
|
292
|
+
args: ['opened', ['$event']]
|
|
293
|
+
}], onClosedChanged: [{
|
|
294
|
+
type: HostListener,
|
|
295
|
+
args: ['closed', ['$event']]
|
|
276
296
|
}] }); })();
|
|
277
297
|
|
|
278
|
-
const materialModules = [
|
|
279
|
-
MatTableModule,
|
|
280
|
-
MatPaginatorModule,
|
|
281
|
-
MatInputModule,
|
|
282
|
-
MatButtonModule,
|
|
283
|
-
MatListModule,
|
|
284
|
-
MatCheckboxModule,
|
|
285
|
-
MatTabsModule,
|
|
286
|
-
MatSelectModule,
|
|
287
|
-
MatDatepickerModule,
|
|
288
|
-
MatNativeDateModule,
|
|
289
|
-
];
|
|
290
|
-
class MagicAngularMaterialModule {
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
(
|
|
297
|
-
type: NgModule,
|
|
298
|
-
args: [{
|
|
299
|
-
declarations: [
|
|
300
|
-
MatCheckboxDirective,
|
|
301
|
-
MatComboboxDirective,
|
|
302
|
-
MatListboxDirective,
|
|
303
|
-
MatMagicAutocompleteDirective,
|
|
304
|
-
BaseMatTableMagicComponent,
|
|
305
|
-
],
|
|
306
|
-
exports: [
|
|
307
|
-
MatCheckboxDirective,
|
|
308
|
-
MatComboboxDirective,
|
|
309
|
-
MatListboxDirective,
|
|
310
|
-
MatMagicAutocompleteDirective,
|
|
311
|
-
BaseMatTableMagicComponent
|
|
312
|
-
],
|
|
313
|
-
imports: [
|
|
314
|
-
CommonModule,
|
|
315
|
-
FormsModule,
|
|
316
|
-
...materialModules,
|
|
317
|
-
MagicModule
|
|
318
|
-
]
|
|
319
|
-
}]
|
|
320
|
-
}], null, null); })();
|
|
321
|
-
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MagicAngularMaterialModule, { declarations: [MatCheckboxDirective,
|
|
322
|
-
MatComboboxDirective,
|
|
323
|
-
MatListboxDirective,
|
|
324
|
-
MatMagicAutocompleteDirective,
|
|
325
|
-
BaseMatTableMagicComponent], imports: [CommonModule,
|
|
326
|
-
FormsModule, MatTableModule,
|
|
327
|
-
MatPaginatorModule,
|
|
328
|
-
MatInputModule,
|
|
329
|
-
MatButtonModule,
|
|
330
|
-
MatListModule,
|
|
331
|
-
MatCheckboxModule,
|
|
332
|
-
MatTabsModule,
|
|
333
|
-
MatSelectModule,
|
|
334
|
-
MatDatepickerModule,
|
|
335
|
-
MatNativeDateModule, MagicModule], exports: [MatCheckboxDirective,
|
|
336
|
-
MatComboboxDirective,
|
|
337
|
-
MatListboxDirective,
|
|
338
|
-
MatMagicAutocompleteDirective,
|
|
298
|
+
const materialModules = [
|
|
299
|
+
MatTableModule,
|
|
300
|
+
MatPaginatorModule,
|
|
301
|
+
MatInputModule,
|
|
302
|
+
MatButtonModule,
|
|
303
|
+
MatListModule,
|
|
304
|
+
MatCheckboxModule,
|
|
305
|
+
MatTabsModule,
|
|
306
|
+
MatSelectModule,
|
|
307
|
+
MatDatepickerModule,
|
|
308
|
+
MatNativeDateModule,
|
|
309
|
+
];
|
|
310
|
+
class MagicAngularMaterialModule {
|
|
311
|
+
static ɵfac = function MagicAngularMaterialModule_Factory(t) { return new (t || MagicAngularMaterialModule)(); };
|
|
312
|
+
static ɵmod = i0.ɵɵdefineNgModule({ type: MagicAngularMaterialModule });
|
|
313
|
+
static ɵinj = i0.ɵɵdefineInjector({ imports: [CommonModule,
|
|
314
|
+
FormsModule, materialModules, MagicModule] });
|
|
315
|
+
}
|
|
316
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicAngularMaterialModule, [{
|
|
317
|
+
type: NgModule,
|
|
318
|
+
args: [{
|
|
319
|
+
declarations: [
|
|
320
|
+
MatCheckboxDirective,
|
|
321
|
+
MatComboboxDirective,
|
|
322
|
+
MatListboxDirective,
|
|
323
|
+
MatMagicAutocompleteDirective,
|
|
324
|
+
BaseMatTableMagicComponent,
|
|
325
|
+
],
|
|
326
|
+
exports: [
|
|
327
|
+
MatCheckboxDirective,
|
|
328
|
+
MatComboboxDirective,
|
|
329
|
+
MatListboxDirective,
|
|
330
|
+
MatMagicAutocompleteDirective,
|
|
331
|
+
BaseMatTableMagicComponent
|
|
332
|
+
],
|
|
333
|
+
imports: [
|
|
334
|
+
CommonModule,
|
|
335
|
+
FormsModule,
|
|
336
|
+
...materialModules,
|
|
337
|
+
MagicModule
|
|
338
|
+
]
|
|
339
|
+
}]
|
|
340
|
+
}], null, null); })();
|
|
341
|
+
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MagicAngularMaterialModule, { declarations: [MatCheckboxDirective,
|
|
342
|
+
MatComboboxDirective,
|
|
343
|
+
MatListboxDirective,
|
|
344
|
+
MatMagicAutocompleteDirective,
|
|
345
|
+
BaseMatTableMagicComponent], imports: [CommonModule,
|
|
346
|
+
FormsModule, MatTableModule,
|
|
347
|
+
MatPaginatorModule,
|
|
348
|
+
MatInputModule,
|
|
349
|
+
MatButtonModule,
|
|
350
|
+
MatListModule,
|
|
351
|
+
MatCheckboxModule,
|
|
352
|
+
MatTabsModule,
|
|
353
|
+
MatSelectModule,
|
|
354
|
+
MatDatepickerModule,
|
|
355
|
+
MatNativeDateModule, MagicModule], exports: [MatCheckboxDirective,
|
|
356
|
+
MatComboboxDirective,
|
|
357
|
+
MatListboxDirective,
|
|
358
|
+
MatMagicAutocompleteDirective,
|
|
339
359
|
BaseMatTableMagicComponent] }); })();
|
|
340
360
|
|
|
341
361
|
export { BaseMatTableMagicComponent, MagicAngularMaterialModule, MatCheckboxDirective, MatComboboxDirective, MatListboxDirective, MatMagicAutocompleteDirective, MgMatTableService, matMagicProviders, materialModules };
|