@magic-xpa/angular-material-core 4.1200.0-dev4120.13 → 4.1200.0-dev4120.131
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/fesm2022/magic-xpa-angular-material-core.mjs +203 -26
- package/fesm2022/magic-xpa-angular-material-core.mjs.map +1 -1
- package/index.d.ts +3 -0
- package/package.json +6 -8
- package/src/angular-material.module.d.ts +6 -0
- package/src/components/base-mat-table-magic.component.d.ts +27 -0
- package/src/directives/magic/form-controls/mat-magic-autocomplete.directive.d.ts +3 -0
- package/src/directives/magic/form-controls/mat-magic-checkbox.directive.d.ts +12 -0
- package/src/directives/magic/form-controls/mat-magic-combobox.directive.d.ts +10 -0
- package/src/directives/magic/form-controls/mat-magic-listbox.directive.d.ts +7 -0
- package/src/services/mat.magic.providers.d.ts +4 -1
- package/src/services/mattable.magic.service.d.ts +93 -0
- package/esm2022/index.mjs +0 -9
- package/esm2022/magic-xpa-angular-material-core.mjs +0 -2
- package/esm2022/src/angular-material.module.mjs +0 -83
- package/esm2022/src/components/base-mat-table-magic.component.mjs +0 -62
- package/esm2022/src/directives/magic/form-controls/mat-magic-autocomplete.directive.mjs +0 -28
- package/esm2022/src/directives/magic/form-controls/mat-magic-checkbox.directive.mjs +0 -101
- package/esm2022/src/directives/magic/form-controls/mat-magic-combobox.directive.mjs +0 -30
- package/esm2022/src/directives/magic/form-controls/mat-magic-listbox.directive.mjs +0 -27
- package/esm2022/src/services/mat.magic.providers.mjs +0 -7
- package/esm2022/src/services/mattable.magic.service.mjs +0 -138
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Directive,
|
|
2
|
+
import { Directive, HostListener, Input, Injectable, Component, ViewChild, NgModule } from '@angular/core';
|
|
3
3
|
import { CommonModule } from '@angular/common';
|
|
4
4
|
import { FormsModule } from '@angular/forms';
|
|
5
5
|
import * as i1 from '@magic-xpa/angular';
|
|
@@ -22,6 +22,9 @@ import { MatSelectModule } from '@angular/material/select';
|
|
|
22
22
|
import { MatDatepickerModule } from '@angular/material/datepicker';
|
|
23
23
|
import { MatNativeDateModule } from '@angular/material/core';
|
|
24
24
|
|
|
25
|
+
/**
|
|
26
|
+
* Directive for material-design checkboxes not on material-design table
|
|
27
|
+
*/
|
|
25
28
|
class MatCheckboxDirective {
|
|
26
29
|
magicDirective;
|
|
27
30
|
matCheckbox;
|
|
@@ -30,12 +33,18 @@ class MatCheckboxDirective {
|
|
|
30
33
|
threeState = false;
|
|
31
34
|
subscribeRefreshDom = null;
|
|
32
35
|
indeterminate = false;
|
|
36
|
+
/**
|
|
37
|
+
* @ignore
|
|
38
|
+
*/
|
|
33
39
|
constructor(magicDirective, matCheckbox, task, element) {
|
|
34
40
|
this.magicDirective = magicDirective;
|
|
35
41
|
this.matCheckbox = matCheckbox;
|
|
36
42
|
this.task = task;
|
|
37
43
|
this.element = element;
|
|
38
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* Handles the Checkbox 'change' event - pass it to the Magic engine
|
|
47
|
+
*/
|
|
39
48
|
onChange($event) {
|
|
40
49
|
if (this.threeState) {
|
|
41
50
|
this.handleThreeState();
|
|
@@ -89,16 +98,20 @@ class MatCheckboxDirective {
|
|
|
89
98
|
this.matCheckbox.checked = true;
|
|
90
99
|
value = 'checked';
|
|
91
100
|
}
|
|
101
|
+
// @ts-ignore
|
|
92
102
|
this.magicDirective.task.onCheckChanged(value, this.magicDirective.id, +this.magicDirective.rowId);
|
|
93
103
|
}
|
|
104
|
+
/**
|
|
105
|
+
* Cleanup
|
|
106
|
+
*/
|
|
94
107
|
ngOnDestroy() {
|
|
95
108
|
if (this.subscribeRefreshDom !== null)
|
|
96
109
|
this.subscribeRefreshDom.unsubscribe();
|
|
97
110
|
}
|
|
98
|
-
static ɵfac = function MatCheckboxDirective_Factory(
|
|
99
|
-
static ɵdir = i0.ɵɵdefineDirective({ type: MatCheckboxDirective, selectors: [["mat-checkbox", "magic", "", 3, "noFormControl", ""]], hostBindings: function MatCheckboxDirective_HostBindings(rf, ctx) { if (rf & 1) {
|
|
111
|
+
/** @nocollapse */ static ɵfac = function MatCheckboxDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MatCheckboxDirective)(i0.ɵɵdirectiveInject(i1.MagicDirective), i0.ɵɵdirectiveInject(i2.MatCheckbox), i0.ɵɵdirectiveInject(i1.TaskMagicService), i0.ɵɵdirectiveInject(i0.ElementRef)); };
|
|
112
|
+
/** @nocollapse */ static ɵdir = /** @pureOrBreakMyCode */ i0.ɵɵdefineDirective({ type: MatCheckboxDirective, selectors: [["mat-checkbox", "magic", "", 3, "noFormControl", ""]], hostBindings: function MatCheckboxDirective_HostBindings(rf, ctx) { if (rf & 1) {
|
|
100
113
|
i0.ɵɵlistener("change", function MatCheckboxDirective_change_HostBindingHandler($event) { return ctx.onChange($event); });
|
|
101
|
-
} }, inputs: { threeState: "threeState" } });
|
|
114
|
+
} }, inputs: { threeState: "threeState" }, standalone: false });
|
|
102
115
|
}
|
|
103
116
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MatCheckboxDirective, [{
|
|
104
117
|
type: Directive,
|
|
@@ -106,6 +119,7 @@ class MatCheckboxDirective {
|
|
|
106
119
|
selector: `
|
|
107
120
|
mat-checkbox[magic]:not([noFormControl])
|
|
108
121
|
`,
|
|
122
|
+
standalone: false
|
|
109
123
|
}]
|
|
110
124
|
}], () => [{ type: i1.MagicDirective }, { type: i2.MatCheckbox }, { type: i1.TaskMagicService }, { type: i0.ElementRef }], { threeState: [{
|
|
111
125
|
type: Input
|
|
@@ -114,24 +128,35 @@ class MatCheckboxDirective {
|
|
|
114
128
|
args: ['change', ['$event']]
|
|
115
129
|
}] }); })();
|
|
116
130
|
|
|
131
|
+
/**
|
|
132
|
+
* Directive for material-design comboboxes not on material-design table
|
|
133
|
+
*/
|
|
117
134
|
class MatComboboxDirective extends ComboboxMagicDirective {
|
|
135
|
+
/**
|
|
136
|
+
* Handles the "selectionChange" event - pass it to the "change" event handler
|
|
137
|
+
* @param $event
|
|
138
|
+
*/
|
|
118
139
|
onChange($event) {
|
|
119
140
|
super.onChange($event);
|
|
120
141
|
}
|
|
121
142
|
onOpenedChanged($event) {
|
|
122
143
|
MagicDirective.opened = $event;
|
|
123
144
|
}
|
|
145
|
+
/**
|
|
146
|
+
* For mat-select do nothing
|
|
147
|
+
*/
|
|
124
148
|
onComboboxItemsListChanged() {
|
|
125
149
|
}
|
|
126
|
-
static ɵfac = (() => { let ɵMatComboboxDirective_BaseFactory; return function MatComboboxDirective_Factory(
|
|
127
|
-
static ɵdir = i0.ɵɵdefineDirective({ type: MatComboboxDirective, selectors: [["mat-select", "magic", ""]], hostBindings: function MatComboboxDirective_HostBindings(rf, ctx) { if (rf & 1) {
|
|
150
|
+
/** @nocollapse */ static ɵfac = /** @pureOrBreakMyCode */ (() => { let ɵMatComboboxDirective_BaseFactory; return function MatComboboxDirective_Factory(__ngFactoryType__) { return (ɵMatComboboxDirective_BaseFactory || (ɵMatComboboxDirective_BaseFactory = i0.ɵɵgetInheritedFactory(MatComboboxDirective)))(__ngFactoryType__ || MatComboboxDirective); }; })();
|
|
151
|
+
/** @nocollapse */ static ɵdir = /** @pureOrBreakMyCode */ i0.ɵɵdefineDirective({ type: MatComboboxDirective, selectors: [["mat-select", "magic", ""]], hostBindings: function MatComboboxDirective_HostBindings(rf, ctx) { if (rf & 1) {
|
|
128
152
|
i0.ɵɵlistener("selectionChange", function MatComboboxDirective_selectionChange_HostBindingHandler($event) { return ctx.onChange($event); })("openedChange", function MatComboboxDirective_openedChange_HostBindingHandler($event) { return ctx.onOpenedChanged($event); });
|
|
129
|
-
} }, features: [i0.ɵɵInheritDefinitionFeature] });
|
|
153
|
+
} }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature] });
|
|
130
154
|
}
|
|
131
155
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MatComboboxDirective, [{
|
|
132
156
|
type: Directive,
|
|
133
157
|
args: [{
|
|
134
158
|
selector: `mat-select[magic]`,
|
|
159
|
+
standalone: false
|
|
135
160
|
}]
|
|
136
161
|
}], null, { onChange: [{
|
|
137
162
|
type: HostListener,
|
|
@@ -141,63 +166,126 @@ class MatComboboxDirective extends ComboboxMagicDirective {
|
|
|
141
166
|
args: ['openedChange', ['$event']]
|
|
142
167
|
}] }); })();
|
|
143
168
|
|
|
169
|
+
/**
|
|
170
|
+
* Extends the Magic table service to supply functionality for Material Design tables
|
|
171
|
+
*/
|
|
144
172
|
class MgMatTableService extends TableMagicService {
|
|
145
173
|
componentList;
|
|
146
174
|
task;
|
|
175
|
+
/**
|
|
176
|
+
* Table data source
|
|
177
|
+
*/
|
|
147
178
|
dataSource;
|
|
179
|
+
/**
|
|
180
|
+
* @ignore
|
|
181
|
+
*/
|
|
148
182
|
get DataSource() {
|
|
149
183
|
return this.dataSource;
|
|
150
184
|
}
|
|
185
|
+
/**
|
|
186
|
+
* @ignore
|
|
187
|
+
*/
|
|
151
188
|
set DataSource(dataSource) {
|
|
152
189
|
this.dataSource = dataSource;
|
|
153
190
|
}
|
|
191
|
+
/**
|
|
192
|
+
* Provides selection options for the table
|
|
193
|
+
*/
|
|
154
194
|
selection;
|
|
195
|
+
/**
|
|
196
|
+
* @ignore
|
|
197
|
+
*/
|
|
155
198
|
get Selection() {
|
|
156
199
|
return this.selection;
|
|
157
200
|
}
|
|
201
|
+
/**
|
|
202
|
+
* @ignore
|
|
203
|
+
*/
|
|
158
204
|
set Selection(selection) {
|
|
159
205
|
this.selection = selection;
|
|
160
206
|
}
|
|
207
|
+
/**
|
|
208
|
+
* Paginator to enable changing pages in the table
|
|
209
|
+
*/
|
|
161
210
|
paginator;
|
|
211
|
+
/**
|
|
212
|
+
* @ignore
|
|
213
|
+
*/
|
|
162
214
|
get Paginator() {
|
|
163
215
|
return this.paginator;
|
|
164
216
|
}
|
|
217
|
+
/**
|
|
218
|
+
* @ignore
|
|
219
|
+
*/
|
|
165
220
|
set Paginator(paginator) {
|
|
166
221
|
this.paginator = paginator;
|
|
167
222
|
}
|
|
223
|
+
/**
|
|
224
|
+
* @ignore
|
|
225
|
+
*/
|
|
168
226
|
constructor(componentList, task) {
|
|
169
227
|
super(componentList, task);
|
|
170
228
|
this.componentList = componentList;
|
|
171
229
|
this.task = task;
|
|
172
230
|
}
|
|
231
|
+
/**
|
|
232
|
+
* Connects the service to the elements of the table component
|
|
233
|
+
* @param dataSource Table data source
|
|
234
|
+
* @param paginator Table paginator
|
|
235
|
+
* @param selection table SelectionModel
|
|
236
|
+
*/
|
|
173
237
|
connect(dataSource, paginator, selection) {
|
|
174
238
|
this.dataSource = dataSource;
|
|
175
239
|
this.paginator = paginator;
|
|
176
240
|
this.selection = selection;
|
|
177
241
|
}
|
|
242
|
+
/**
|
|
243
|
+
* @ignore
|
|
244
|
+
*/
|
|
178
245
|
refreshDataSource() {
|
|
179
246
|
if (!isNullOrUndefined(this.paginator))
|
|
180
247
|
this.dataSource.paginator = this.paginator;
|
|
181
248
|
this.dataSource.data = (this.task.mgAccessorService.isDataviewEmpty() ? [] : this.task.Records.list);
|
|
182
249
|
}
|
|
250
|
+
/**
|
|
251
|
+
* returns the page size of the table
|
|
252
|
+
* @returns
|
|
253
|
+
*/
|
|
183
254
|
getPageSize() {
|
|
184
255
|
if (isNullOrUndefined(this.paginator))
|
|
185
256
|
return 10;
|
|
186
257
|
return this.paginator.pageSize;
|
|
187
258
|
}
|
|
259
|
+
/**
|
|
260
|
+
* Selects a table row
|
|
261
|
+
* @param guiRowid Id of row to be selected
|
|
262
|
+
*/
|
|
188
263
|
selectRow(guiRowid) {
|
|
189
264
|
super.selectRow(guiRowid);
|
|
190
265
|
this.selection.select(this.task.Records.list[guiRowid]);
|
|
191
266
|
this.refreshDataSource();
|
|
192
267
|
}
|
|
268
|
+
/**
|
|
269
|
+
* Displays the requested table page
|
|
270
|
+
* @param pageId Id of page to be selected
|
|
271
|
+
*/
|
|
193
272
|
selectPage(pageId) {
|
|
194
273
|
if (!isNullOrUndefined(this.paginator))
|
|
195
274
|
this.paginator.pageIndex = pageId;
|
|
196
275
|
this.refreshDataSource();
|
|
197
276
|
}
|
|
277
|
+
/**
|
|
278
|
+
* Returns the currently seleted row
|
|
279
|
+
* @returns
|
|
280
|
+
*/
|
|
198
281
|
selectedRow() {
|
|
199
282
|
return this.selection.selected[0];
|
|
200
283
|
}
|
|
284
|
+
/**
|
|
285
|
+
* Handle the paginator's "page" event
|
|
286
|
+
* @param e The event received from the UI
|
|
287
|
+
* @param changeSelectedRow The flag true or false to indicate change the row
|
|
288
|
+
*/
|
|
201
289
|
mgOnPaginateChange(e, changeSelectedRow) {
|
|
202
290
|
if (this.task.oldPageSize != e.pageSize) {
|
|
203
291
|
this.handleResize(e.pageIndex, e.previousPageIndex, e.pageSize);
|
|
@@ -220,16 +308,32 @@ class MgMatTableService extends TableMagicService {
|
|
|
220
308
|
this.getRowsIfNeeded(e.pageIndex, e.previousPageIndex, e.pageSize);
|
|
221
309
|
}
|
|
222
310
|
}
|
|
311
|
+
/**
|
|
312
|
+
* Handle resize and set table top index.
|
|
313
|
+
* @param pageIndex : New page index.
|
|
314
|
+
* @param prevPageIndex : Prev page index
|
|
315
|
+
* @param pageSize : PageSize
|
|
316
|
+
*/
|
|
223
317
|
handleResize(pageIndex, prevPageIndex, pageSize) {
|
|
224
318
|
let requiredGuiRowId = pageIndex * pageSize;
|
|
225
319
|
this.task.resize(pageSize, requiredGuiRowId);
|
|
226
320
|
}
|
|
321
|
+
/**
|
|
322
|
+
* Execute getRows to fetch required chunk of records.
|
|
323
|
+
* @param pageIndex : New page index.
|
|
324
|
+
* @param prevPageIndex : Prev page index
|
|
325
|
+
* @param pageSize : PageSize
|
|
326
|
+
*/
|
|
227
327
|
getRowsIfNeeded(pageIndex, prevPageIndex, pageSize) {
|
|
228
328
|
let guiEvent = getGuiEventObj("getRows", "", 0);
|
|
229
329
|
guiEvent.Line = pageIndex * pageSize;
|
|
230
330
|
this.task.insertEvent(guiEvent);
|
|
231
331
|
this.setTableTopIndex(this.task.getDvRowId(pageSize * pageIndex));
|
|
232
332
|
}
|
|
333
|
+
/**
|
|
334
|
+
* Handles the "matSortChange" event
|
|
335
|
+
* @param e The event received from the UI
|
|
336
|
+
*/
|
|
233
337
|
sortData(e) {
|
|
234
338
|
let direction = 0;
|
|
235
339
|
if (e.direction === 'asc')
|
|
@@ -239,8 +343,13 @@ class MgMatTableService extends TableMagicService {
|
|
|
239
343
|
let guiEvent = getGuiEventObj("columnSort", e.active, direction);
|
|
240
344
|
this.task.insertEvent(guiEvent);
|
|
241
345
|
}
|
|
346
|
+
/**
|
|
347
|
+
* Change the number of lines in a table
|
|
348
|
+
* @param size New number of lines in table
|
|
349
|
+
*/
|
|
242
350
|
updateTableSize(size) {
|
|
243
|
-
if (size === 0)
|
|
351
|
+
if (size === 0) // never remove row 0 for now
|
|
352
|
+
{
|
|
244
353
|
size = 1;
|
|
245
354
|
this.task.Records.clearFirstTableRecord(this.task.template);
|
|
246
355
|
}
|
|
@@ -250,41 +359,76 @@ class MgMatTableService extends TableMagicService {
|
|
|
250
359
|
this.task.Records.updateSize(size);
|
|
251
360
|
this.task.setIncludesFirst(false);
|
|
252
361
|
}
|
|
362
|
+
/**
|
|
363
|
+
* Handle the selection of row and if needed move to respective page.
|
|
364
|
+
* @param guiRowId New number of lines in table
|
|
365
|
+
*/
|
|
253
366
|
selectPageForGuiRowId(guiRowId) {
|
|
254
367
|
let pageToBeSelected = 0;
|
|
255
368
|
let prevSelectedRow = this.selectedRow();
|
|
256
369
|
pageToBeSelected = Math.floor(guiRowId / this.getPageSize());
|
|
370
|
+
// Explicitly handle selection of page when it's not raised by using pagination
|
|
257
371
|
if ((isNullOrUndefined(prevSelectedRow) || (!isNullOrUndefined(this.paginator) && pageToBeSelected != this.paginator.pageIndex)))
|
|
258
372
|
this.selectPage(pageToBeSelected);
|
|
259
373
|
}
|
|
374
|
+
/**
|
|
375
|
+
* @ignore
|
|
376
|
+
*/
|
|
260
377
|
setTableTopIndex(value) {
|
|
261
378
|
this.task.Records.setGuiTopIndex(value);
|
|
262
379
|
if (value >= 0)
|
|
263
380
|
this.selectPageForGuiRowId(this.task.getGuiRowId(value, true));
|
|
264
381
|
}
|
|
382
|
+
/**
|
|
383
|
+
* @ignore
|
|
384
|
+
*/
|
|
265
385
|
getTableTopIndex() {
|
|
266
386
|
return this.task.Records.getGuiTopIndex();
|
|
267
387
|
}
|
|
268
|
-
static ɵfac = function MgMatTableService_Factory(
|
|
269
|
-
static ɵprov = i0.ɵɵdefineInjectable({ token: MgMatTableService, factory: MgMatTableService.ɵfac });
|
|
388
|
+
/** @nocollapse */ static ɵfac = function MgMatTableService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MgMatTableService)(i0.ɵɵinject(i1.ComponentListMagicService), i0.ɵɵinject(i1.TaskMagicService)); };
|
|
389
|
+
/** @nocollapse */ static ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: MgMatTableService, factory: MgMatTableService.ɵfac });
|
|
270
390
|
}
|
|
271
391
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MgMatTableService, [{
|
|
272
392
|
type: Injectable
|
|
273
393
|
}], () => [{ type: i1.ComponentListMagicService }, { type: i1.TaskMagicService }], null); })();
|
|
274
394
|
|
|
395
|
+
/**
|
|
396
|
+
* @ignore
|
|
397
|
+
*/
|
|
275
398
|
const matMagicProviders = [
|
|
276
|
-
...basicMagicProviders,
|
|
399
|
+
...basicMagicProviders, // - created error Exported variable 'matMagicProviders' has or is using name 'MagicServices' from external module "D:/magicxpaproject/_Trunk/Sources/Webclient/dist/angular/src/services/magic.services" but cannot be named.
|
|
277
400
|
{ provide: TableMagicService, useClass: MgMatTableService }
|
|
278
401
|
];
|
|
279
402
|
|
|
403
|
+
/**
|
|
404
|
+
* This component is the base component for forms which has a material-design table (grid)
|
|
405
|
+
*/
|
|
280
406
|
class BaseMatTableMagicComponent extends TaskBaseMagicComponent {
|
|
281
407
|
ref;
|
|
282
408
|
magicService;
|
|
409
|
+
/**
|
|
410
|
+
* Paginator to enable changing pages in the table
|
|
411
|
+
*/
|
|
283
412
|
paginator;
|
|
413
|
+
/**
|
|
414
|
+
* Provides the table sort capabilities
|
|
415
|
+
*/
|
|
284
416
|
sort;
|
|
417
|
+
/**
|
|
418
|
+
* List of table columns to be displayed
|
|
419
|
+
*/
|
|
285
420
|
displayedColumns;
|
|
421
|
+
/**
|
|
422
|
+
* Table data source
|
|
423
|
+
*/
|
|
286
424
|
dataSource;
|
|
425
|
+
/**
|
|
426
|
+
* Provides selection options for the table
|
|
427
|
+
*/
|
|
287
428
|
selection;
|
|
429
|
+
/**
|
|
430
|
+
* @ignore
|
|
431
|
+
*/
|
|
288
432
|
constructor(ref, magicService) {
|
|
289
433
|
super(ref, magicService);
|
|
290
434
|
this.ref = ref;
|
|
@@ -293,10 +437,16 @@ class BaseMatTableMagicComponent extends TaskBaseMagicComponent {
|
|
|
293
437
|
this.dataSource = new MatTableDataSource(this.task.Records.list);
|
|
294
438
|
this.selection = new SelectionModel(false, []);
|
|
295
439
|
}
|
|
440
|
+
/**
|
|
441
|
+
* Initializer
|
|
442
|
+
*/
|
|
296
443
|
ngOnInit() {
|
|
297
444
|
super.ngOnInit();
|
|
298
445
|
this.magicService.tableService.connect(this.dataSource, this.paginator, this.selection);
|
|
299
446
|
}
|
|
447
|
+
/**
|
|
448
|
+
* AfterContentChecked implementation
|
|
449
|
+
*/
|
|
300
450
|
ngAfterContentChecked() {
|
|
301
451
|
if (!isNullOrUndefined(this.paginator) && !isNullOrUndefined(this.paginator.pageSize) &&
|
|
302
452
|
this.paginator.pageSize != this.task.oldPageSize) {
|
|
@@ -304,21 +454,22 @@ class BaseMatTableMagicComponent extends TaskBaseMagicComponent {
|
|
|
304
454
|
this.task.oldPageSize = this.paginator.pageSize;
|
|
305
455
|
}
|
|
306
456
|
}
|
|
307
|
-
static ɵfac = function BaseMatTableMagicComponent_Factory(
|
|
308
|
-
static ɵcmp = i0.ɵɵdefineComponent({ type: BaseMatTableMagicComponent, selectors: [["ng-component"]], viewQuery: function BaseMatTableMagicComponent_Query(rf, ctx) { if (rf & 1) {
|
|
457
|
+
/** @nocollapse */ static ɵfac = function BaseMatTableMagicComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || BaseMatTableMagicComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i1.MagicServices)); };
|
|
458
|
+
/** @nocollapse */ static ɵcmp = /** @pureOrBreakMyCode */ i0.ɵɵdefineComponent({ type: BaseMatTableMagicComponent, selectors: [["ng-component"]], viewQuery: function BaseMatTableMagicComponent_Query(rf, ctx) { if (rf & 1) {
|
|
309
459
|
i0.ɵɵviewQuery(MatPaginator, 7);
|
|
310
460
|
i0.ɵɵviewQuery(MatSort, 7);
|
|
311
461
|
} if (rf & 2) {
|
|
312
462
|
let _t;
|
|
313
463
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.paginator = _t.first);
|
|
314
464
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.sort = _t.first);
|
|
315
|
-
} }, features: [i0.ɵɵProvidersFeature(matMagicProviders), i0.ɵɵInheritDefinitionFeature], decls: 0, vars: 0, template: function BaseMatTableMagicComponent_Template(rf, ctx) { }, encapsulation: 2 });
|
|
465
|
+
} }, standalone: false, features: [i0.ɵɵProvidersFeature(matMagicProviders), i0.ɵɵInheritDefinitionFeature], decls: 0, vars: 0, template: function BaseMatTableMagicComponent_Template(rf, ctx) { }, encapsulation: 2 });
|
|
316
466
|
}
|
|
317
467
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BaseMatTableMagicComponent, [{
|
|
318
468
|
type: Component,
|
|
319
469
|
args: [{
|
|
320
470
|
providers: matMagicProviders,
|
|
321
|
-
template: ''
|
|
471
|
+
template: '',
|
|
472
|
+
standalone: false
|
|
322
473
|
}]
|
|
323
474
|
}], () => [{ type: i0.ChangeDetectorRef }, { type: i1.MagicServices }], { paginator: [{
|
|
324
475
|
type: ViewChild,
|
|
@@ -327,31 +478,42 @@ class BaseMatTableMagicComponent extends TaskBaseMagicComponent {
|
|
|
327
478
|
type: ViewChild,
|
|
328
479
|
args: [MatSort, { static: true }]
|
|
329
480
|
}] }); })();
|
|
330
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(BaseMatTableMagicComponent, { className: "BaseMatTableMagicComponent", filePath: "src
|
|
481
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(BaseMatTableMagicComponent, { className: "BaseMatTableMagicComponent", filePath: "src/components/base-mat-table-magic.component.ts", lineNumber: 19 }); })();
|
|
331
482
|
|
|
483
|
+
/**
|
|
484
|
+
* Directive for material-design listboxes not on material-design table
|
|
485
|
+
*/
|
|
332
486
|
class MatListboxDirective {
|
|
333
487
|
magicDirective;
|
|
334
488
|
constructor(magicDirective) {
|
|
335
489
|
this.magicDirective = magicDirective;
|
|
336
490
|
}
|
|
491
|
+
/**
|
|
492
|
+
* Handles the "selectionChange" event - pass it to the "change" event handler
|
|
493
|
+
* @param $event
|
|
494
|
+
*/
|
|
337
495
|
onChange($event) {
|
|
338
496
|
this.magicDirective.task.onListBoxSelectionChanged($event, this.magicDirective.id);
|
|
339
497
|
}
|
|
340
|
-
static ɵfac = function MatListboxDirective_Factory(
|
|
341
|
-
static ɵdir = i0.ɵɵdefineDirective({ type: MatListboxDirective, selectors: [["mat-selection-list", "magic", ""]], hostBindings: function MatListboxDirective_HostBindings(rf, ctx) { if (rf & 1) {
|
|
498
|
+
/** @nocollapse */ static ɵfac = function MatListboxDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MatListboxDirective)(i0.ɵɵdirectiveInject(i1.MagicDirective)); };
|
|
499
|
+
/** @nocollapse */ static ɵdir = /** @pureOrBreakMyCode */ i0.ɵɵdefineDirective({ type: MatListboxDirective, selectors: [["mat-selection-list", "magic", ""]], hostBindings: function MatListboxDirective_HostBindings(rf, ctx) { if (rf & 1) {
|
|
342
500
|
i0.ɵɵlistener("selectionChange", function MatListboxDirective_selectionChange_HostBindingHandler($event) { return ctx.onChange($event); });
|
|
343
|
-
} } });
|
|
501
|
+
} }, standalone: false });
|
|
344
502
|
}
|
|
345
503
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MatListboxDirective, [{
|
|
346
504
|
type: Directive,
|
|
347
505
|
args: [{
|
|
348
506
|
selector: `mat-selection-list[magic]`,
|
|
507
|
+
standalone: false
|
|
349
508
|
}]
|
|
350
509
|
}], () => [{ type: i1.MagicDirective }], { onChange: [{
|
|
351
510
|
type: HostListener,
|
|
352
511
|
args: ['selectionChange', ['$event']]
|
|
353
512
|
}] }); })();
|
|
354
513
|
|
|
514
|
+
/**
|
|
515
|
+
* Directive for material-design autocomplete not on material-design table
|
|
516
|
+
*/
|
|
355
517
|
class MatMagicAutocompleteDirective {
|
|
356
518
|
onOpenedChanged($event) {
|
|
357
519
|
MagicDirective.noOfAutoCompleteBoxesOpened++;
|
|
@@ -359,15 +521,16 @@ class MatMagicAutocompleteDirective {
|
|
|
359
521
|
onClosedChanged($event) {
|
|
360
522
|
MagicDirective.noOfAutoCompleteBoxesOpened--;
|
|
361
523
|
}
|
|
362
|
-
static ɵfac = function MatMagicAutocompleteDirective_Factory(
|
|
363
|
-
static ɵdir = i0.ɵɵdefineDirective({ type: MatMagicAutocompleteDirective, selectors: [["mat-autocomplete", "magic", ""]], hostBindings: function MatMagicAutocompleteDirective_HostBindings(rf, ctx) { if (rf & 1) {
|
|
524
|
+
/** @nocollapse */ static ɵfac = function MatMagicAutocompleteDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MatMagicAutocompleteDirective)(); };
|
|
525
|
+
/** @nocollapse */ static ɵdir = /** @pureOrBreakMyCode */ i0.ɵɵdefineDirective({ type: MatMagicAutocompleteDirective, selectors: [["mat-autocomplete", "magic", ""]], hostBindings: function MatMagicAutocompleteDirective_HostBindings(rf, ctx) { if (rf & 1) {
|
|
364
526
|
i0.ɵɵlistener("opened", function MatMagicAutocompleteDirective_opened_HostBindingHandler($event) { return ctx.onOpenedChanged($event); })("closed", function MatMagicAutocompleteDirective_closed_HostBindingHandler($event) { return ctx.onClosedChanged($event); });
|
|
365
|
-
} } });
|
|
527
|
+
} }, standalone: false });
|
|
366
528
|
}
|
|
367
529
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MatMagicAutocompleteDirective, [{
|
|
368
530
|
type: Directive,
|
|
369
531
|
args: [{
|
|
370
|
-
selector: 'mat-autocomplete[magic]'
|
|
532
|
+
selector: 'mat-autocomplete[magic]',
|
|
533
|
+
standalone: false
|
|
371
534
|
}]
|
|
372
535
|
}], null, { onOpenedChanged: [{
|
|
373
536
|
type: HostListener,
|
|
@@ -377,6 +540,9 @@ class MatMagicAutocompleteDirective {
|
|
|
377
540
|
args: ['closed', ['$event']]
|
|
378
541
|
}] }); })();
|
|
379
542
|
|
|
543
|
+
/**
|
|
544
|
+
* @ignore
|
|
545
|
+
*/
|
|
380
546
|
const materialModules = [
|
|
381
547
|
MatTableModule,
|
|
382
548
|
MatPaginatorModule,
|
|
@@ -389,10 +555,13 @@ const materialModules = [
|
|
|
389
555
|
MatDatepickerModule,
|
|
390
556
|
MatNativeDateModule,
|
|
391
557
|
];
|
|
558
|
+
/**
|
|
559
|
+
* @ignore
|
|
560
|
+
*/
|
|
392
561
|
class MagicAngularMaterialModule {
|
|
393
|
-
static ɵfac = function MagicAngularMaterialModule_Factory(
|
|
394
|
-
static ɵmod = i0.ɵɵdefineNgModule({ type: MagicAngularMaterialModule });
|
|
395
|
-
static ɵinj = i0.ɵɵdefineInjector({ imports: [CommonModule,
|
|
562
|
+
/** @nocollapse */ static ɵfac = function MagicAngularMaterialModule_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MagicAngularMaterialModule)(); };
|
|
563
|
+
/** @nocollapse */ static ɵmod = /** @pureOrBreakMyCode */ i0.ɵɵdefineNgModule({ type: MagicAngularMaterialModule });
|
|
564
|
+
/** @nocollapse */ static ɵinj = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjector({ imports: [CommonModule,
|
|
396
565
|
FormsModule, materialModules, MagicModule] });
|
|
397
566
|
}
|
|
398
567
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicAngularMaterialModule, [{
|
|
@@ -440,5 +609,13 @@ class MagicAngularMaterialModule {
|
|
|
440
609
|
MatMagicAutocompleteDirective,
|
|
441
610
|
BaseMatTableMagicComponent] }); })();
|
|
442
611
|
|
|
612
|
+
/**
|
|
613
|
+
* @file Automatically generated by barrelsby.
|
|
614
|
+
*/
|
|
615
|
+
|
|
616
|
+
/**
|
|
617
|
+
* Generated bundle index. Do not edit.
|
|
618
|
+
*/
|
|
619
|
+
|
|
443
620
|
export { BaseMatTableMagicComponent, MagicAngularMaterialModule, MatCheckboxDirective, MatComboboxDirective, MatListboxDirective, MatMagicAutocompleteDirective, MgMatTableService, matMagicProviders, materialModules };
|
|
444
621
|
//# sourceMappingURL=magic-xpa-angular-material-core.mjs.map
|