@magic-xpa/angular-material-core 4.800.0-dev480.18 → 4.800.0-dev480.183

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 (24) hide show
  1. package/bundles/magic-xpa-angular-material-core.umd.js +21 -152
  2. package/bundles/magic-xpa-angular-material-core.umd.js.map +1 -1
  3. package/bundles/magic-xpa-angular-material-core.umd.min.js +2 -2
  4. package/bundles/magic-xpa-angular-material-core.umd.min.js.map +1 -1
  5. package/esm2015/index.js +1 -1
  6. package/esm2015/magic-xpa-angular-material-core.js +1 -4
  7. package/esm2015/src/angular-material.module.js +4 -10
  8. package/esm2015/src/components/base-mat-table-magic.component.js +4 -16
  9. package/esm2015/src/directives/magic/form-controls/mat-magic-checkbox.directive.js +5 -8
  10. package/esm2015/src/directives/magic/form-controls/mat-magic-combobox.directive.js +5 -12
  11. package/esm2015/src/directives/magic/form-controls/mat-magic-listbox.directive.js +4 -11
  12. package/esm2015/src/services/mat.magic.providers.js +1 -4
  13. package/esm2015/src/services/mattable.magic.service.js +5 -94
  14. package/fesm2015/magic-xpa-angular-material-core.js +21 -152
  15. package/fesm2015/magic-xpa-angular-material-core.js.map +1 -1
  16. package/magic-xpa-angular-material-core.d.ts +0 -3
  17. package/package.json +2 -2
  18. package/src/angular-material.module.d.ts +0 -6
  19. package/src/components/base-mat-table-magic.component.d.ts +0 -27
  20. package/src/directives/magic/form-controls/mat-magic-checkbox.directive.d.ts +0 -3
  21. package/src/directives/magic/form-controls/mat-magic-combobox.directive.d.ts +0 -7
  22. package/src/directives/magic/form-controls/mat-magic-listbox.directive.d.ts +0 -7
  23. package/src/services/mat.magic.providers.d.ts +0 -3
  24. package/src/services/mattable.magic.service.d.ts +0 -99
@@ -18,15 +18,12 @@ import { MatSelectModule } from '@angular/material/select';
18
18
  import { MatDatepickerModule } from '@angular/material/datepicker';
19
19
  import { MatNativeDateModule } from '@angular/material/core';
20
20
 
21
- /**
22
- * Directive for material-design checkboxes not on material-design table
23
- */
24
21
  class MatCheckboxDirective extends CheckboxMagicDirective {
25
22
  }
26
- /** @nocollapse */ MatCheckboxDirective.ɵfac = function MatCheckboxDirective_Factory(t) { return ɵMatCheckboxDirective_BaseFactory(t || MatCheckboxDirective); };
27
- /** @nocollapse */ MatCheckboxDirective.ɵdir = ɵɵdefineDirective({ type: MatCheckboxDirective, selectors: [["mat-checkbox", "magic", "", 3, "noFormControl", ""]], features: [ɵɵInheritDefinitionFeature] });
28
- const ɵMatCheckboxDirective_BaseFactory = /*@__PURE__*/ ɵɵgetInheritedFactory(MatCheckboxDirective);
29
- /*@__PURE__*/ (function () { ɵsetClassMetadata(MatCheckboxDirective, [{
23
+ MatCheckboxDirective.ɵfac = function MatCheckboxDirective_Factory(t) { return ɵMatCheckboxDirective_BaseFactory(t || MatCheckboxDirective); };
24
+ MatCheckboxDirective.ɵdir = ɵɵdefineDirective({ type: MatCheckboxDirective, selectors: [["mat-checkbox", "magic", "", 3, "noFormControl", ""]], features: [ɵɵInheritDefinitionFeature] });
25
+ const ɵMatCheckboxDirective_BaseFactory = ɵɵgetInheritedFactory(MatCheckboxDirective);
26
+ (function () { ɵsetClassMetadata(MatCheckboxDirective, [{
30
27
  type: Directive,
31
28
  args: [{
32
29
  selector: `
@@ -35,14 +32,7 @@ const ɵMatCheckboxDirective_BaseFactory = /*@__PURE__*/ ɵɵgetInheritedFactory
35
32
  }]
36
33
  }], null, null); })();
37
34
 
38
- /**
39
- * Directive for material-design comboboxes not on material-design table
40
- */
41
35
  class MatComboboxDirective extends ComboboxMagicDirective {
42
- /**
43
- * Handles the "selectionChange" event - pass it to the "change" event handler
44
- * @param $event
45
- */
46
36
  onChange($event) {
47
37
  super.onChange($event);
48
38
  }
@@ -50,12 +40,12 @@ class MatComboboxDirective extends ComboboxMagicDirective {
50
40
  MagicDirective.opened = $event;
51
41
  }
52
42
  }
53
- /** @nocollapse */ MatComboboxDirective.ɵfac = function MatComboboxDirective_Factory(t) { return ɵMatComboboxDirective_BaseFactory(t || MatComboboxDirective); };
54
- /** @nocollapse */ MatComboboxDirective.ɵdir = ɵɵdefineDirective({ type: MatComboboxDirective, selectors: [["mat-select", "magic", ""]], hostBindings: function MatComboboxDirective_HostBindings(rf, ctx) { if (rf & 1) {
43
+ MatComboboxDirective.ɵfac = function MatComboboxDirective_Factory(t) { return ɵMatComboboxDirective_BaseFactory(t || MatComboboxDirective); };
44
+ MatComboboxDirective.ɵdir = ɵɵdefineDirective({ type: MatComboboxDirective, selectors: [["mat-select", "magic", ""]], hostBindings: function MatComboboxDirective_HostBindings(rf, ctx) { if (rf & 1) {
55
45
  ɵɵlistener("selectionChange", function MatComboboxDirective_selectionChange_HostBindingHandler($event) { return ctx.onChange($event); })("openedChange", function MatComboboxDirective_openedChange_HostBindingHandler($event) { return ctx.onOpenedChanged($event); });
56
46
  } }, features: [ɵɵInheritDefinitionFeature] });
57
- const ɵMatComboboxDirective_BaseFactory = /*@__PURE__*/ ɵɵgetInheritedFactory(MatComboboxDirective);
58
- /*@__PURE__*/ (function () { ɵsetClassMetadata(MatComboboxDirective, [{
47
+ const ɵMatComboboxDirective_BaseFactory = ɵɵgetInheritedFactory(MatComboboxDirective);
48
+ (function () { ɵsetClassMetadata(MatComboboxDirective, [{
59
49
  type: Directive,
60
50
  args: [{
61
51
  selector: `mat-select[magic]`,
@@ -68,119 +58,62 @@ const ɵMatComboboxDirective_BaseFactory = /*@__PURE__*/ ɵɵgetInheritedFactory
68
58
  args: ['openedChange', ['$event']]
69
59
  }] }); })();
70
60
 
71
- /**
72
- * Extends the Magic table service to supply functionality for Material Design tables
73
- */
74
61
  class MgMatTableService extends TableMagicService {
75
- /**
76
- * @ignore
77
- */
78
62
  constructor(componentList, task) {
79
63
  super(componentList, task);
80
64
  this.componentList = componentList;
81
65
  this.task = task;
82
66
  }
83
- /**
84
- * @ignore
85
- */
86
67
  get DataSource() {
87
68
  return this.dataSource;
88
69
  }
89
- /**
90
- * @ignore
91
- */
92
70
  set DataSource(dataSource) {
93
71
  this.dataSource = dataSource;
94
72
  }
95
- /**
96
- * @ignore
97
- */
98
73
  get Selection() {
99
74
  return this.selection;
100
75
  }
101
- /**
102
- * @ignore
103
- */
104
76
  set Selection(selection) {
105
77
  this.selection = selection;
106
78
  }
107
- /**
108
- * @ignore
109
- */
110
79
  get Paginator() {
111
80
  return this.paginator;
112
81
  }
113
- /**
114
- * @ignore
115
- */
116
82
  set Paginator(paginator) {
117
83
  this.paginator = paginator;
118
84
  }
119
- /**
120
- * Connects the service to the elements of the table component
121
- * @param dataSource Table data source
122
- * @param paginator Table paginator
123
- * @param selection table SelectionModel
124
- * @param dialog Dialog used for editing values
125
- */
126
85
  connect(dataSource, paginator, selection, dialog) {
127
86
  this.dataSource = dataSource;
128
87
  this.paginator = paginator;
129
88
  this.selection = selection;
130
89
  this.dialog = dialog;
131
90
  }
132
- /**
133
- * @ignore
134
- */
135
91
  refreshDataSource() {
136
92
  if (!isNullOrUndefined(this.paginator))
137
93
  this.dataSource.paginator = this.paginator;
138
94
  this.dataSource.data = (this.task.mgAccessorService.isDataviewEmpty() ? [] : this.task.Records.list);
139
95
  }
140
- /**
141
- * returns the page size of the table
142
- * @returns
143
- */
144
96
  getPageSize() {
145
97
  if (isNullOrUndefined(this.paginator))
146
98
  return super.getPageSize();
147
99
  return this.paginator.pageSize;
148
100
  }
149
- /**
150
- * Selects a table row
151
- * @param guiRowid Id of row to be selected
152
- */
153
101
  selectRow(guiRowid) {
154
102
  super.selectRow(guiRowid);
155
103
  this.selection.select(this.task.Records.list[guiRowid]);
156
104
  this.refreshDataSource();
157
105
  }
158
- /**
159
- * @ignore
160
- */
161
106
  getDialog() {
162
107
  return this.dialog;
163
108
  }
164
- /**
165
- * Displays the requested table page
166
- * @param pageId Id of page to be selected
167
- */
168
109
  selectPage(pageId) {
169
110
  if (!isNullOrUndefined(this.paginator))
170
111
  this.paginator.pageIndex = pageId;
171
112
  this.refreshDataSource();
172
113
  }
173
- /**
174
- * Returns the currently seleted row
175
- * @returns
176
- */
177
114
  selectedRow() {
178
115
  return this.selection.selected[0];
179
116
  }
180
- /**
181
- * Handle the paginator's "page" event
182
- * @param e The event received from the UI
183
- */
184
117
  mgOnPaginateChange(e) {
185
118
  if (this.task.oldPageSize != e.pageSize) {
186
119
  this.handleResize(e.pageIndex, e.previousPageIndex, e.pageSize);
@@ -189,32 +122,16 @@ class MgMatTableService extends TableMagicService {
189
122
  else
190
123
  this.getRowsIfNeeded(e.pageIndex, e.previousPageIndex, e.pageSize);
191
124
  }
192
- /**
193
- * Handle resize and set table top index.
194
- * @param pageIndex : New page index.
195
- * @param prevPageIndex : Prev page index
196
- * @param pageSize : PageSize
197
- */
198
125
  handleResize(pageIndex, prevPageIndex, pageSize) {
199
126
  let requiredGuiRowId = pageIndex * pageSize;
200
127
  this.task.resize(pageSize, requiredGuiRowId);
201
128
  }
202
- /**
203
- * Execute getRows to fetch required chunk of records.
204
- * @param pageIndex : New page index.
205
- * @param prevPageIndex : Prev page index
206
- * @param pageSize : PageSize
207
- */
208
129
  getRowsIfNeeded(pageIndex, prevPageIndex, pageSize) {
209
130
  let guiEvent = getGuiEventObj("getRows", "table", 0);
210
131
  guiEvent.Line = pageIndex * pageSize;
211
132
  this.task.insertEvent(guiEvent);
212
133
  this.setTableTopIndex(this.task.getDvRowId(pageSize * pageIndex));
213
134
  }
214
- /**
215
- * Handles the "matSortChange" event
216
- * @param e The event received from the UI
217
- */
218
135
  sortData(e) {
219
136
  let direction = 0;
220
137
  if (e.direction === 'asc')
@@ -224,13 +141,8 @@ class MgMatTableService extends TableMagicService {
224
141
  let guiEvent = getGuiEventObj("columnSort", e.active, direction);
225
142
  this.task.insertEvent(guiEvent);
226
143
  }
227
- /**
228
- * Change the number of lines in a table
229
- * @param size New number of lines in table
230
- */
231
144
  updateTableSize(size) {
232
- if (size === 0) // never remove row 0 for now
233
- {
145
+ if (size === 0) {
234
146
  size = 1;
235
147
  this.task.Records.clearFirstTableRecord(this.task.template);
236
148
  }
@@ -240,54 +152,34 @@ class MgMatTableService extends TableMagicService {
240
152
  this.task.Records.updateSize(size);
241
153
  this.task.setIncludesFirst(false);
242
154
  }
243
- /**
244
- * Handle the selection of row and if needed move to respective page.
245
- * @param guiRowId New number of lines in table
246
- */
247
155
  selectPageForGuiRowId(guiRowId) {
248
156
  let pageToBeSelected = 0;
249
157
  let prevSelectedRow = this.selectedRow();
250
158
  pageToBeSelected = Math.floor(guiRowId / this.getPageSize());
251
- // Explicitly handle selection of page when it's not raised by using pagination
252
159
  if ((isNullOrUndefined(prevSelectedRow) || (!isNullOrUndefined(this.paginator) && pageToBeSelected != this.paginator.pageIndex)))
253
160
  this.selectPage(pageToBeSelected);
254
161
  }
255
- /**
256
- * @ignore
257
- */
258
162
  setTableTopIndex(value) {
259
163
  this.task.Records.setGuiTopIndex(value);
260
164
  if (value >= 0)
261
165
  this.selectPageForGuiRowId(this.task.getGuiRowId(value, true));
262
166
  }
263
- /**
264
- * @ignore
265
- */
266
167
  getTableTopIndex() {
267
168
  return this.task.Records.getGuiTopIndex();
268
169
  }
269
170
  }
270
- /** @nocollapse */ MgMatTableService.ɵfac = function MgMatTableService_Factory(t) { return new (t || MgMatTableService)(ɵɵinject(ComponentListMagicService), ɵɵinject(TaskMagicService)); };
271
- /** @nocollapse */ MgMatTableService.ɵprov = ɵɵdefineInjectable({ token: MgMatTableService, factory: MgMatTableService.ɵfac });
272
- /*@__PURE__*/ (function () { ɵsetClassMetadata(MgMatTableService, [{
171
+ MgMatTableService.ɵfac = function MgMatTableService_Factory(t) { return new (t || MgMatTableService)(ɵɵinject(ComponentListMagicService), ɵɵinject(TaskMagicService)); };
172
+ MgMatTableService.ɵprov = ɵɵdefineInjectable({ token: MgMatTableService, factory: MgMatTableService.ɵfac });
173
+ (function () { ɵsetClassMetadata(MgMatTableService, [{
273
174
  type: Injectable
274
175
  }], function () { return [{ type: ComponentListMagicService }, { type: TaskMagicService }]; }, null); })();
275
176
 
276
- /**
277
- * @ignore
278
- */
279
177
  const matMagicProviders = [
280
178
  ...basicMagicProviders,
281
179
  { provide: TableMagicService, useClass: MgMatTableService }
282
180
  ];
283
181
 
284
- /**
285
- * This component is the base component for forms which has a material-design table (grid)
286
- */
287
182
  class BaseMatTableMagicComponent extends TaskBaseMagicComponent {
288
- /**
289
- * @ignore
290
- */
291
183
  constructor(dialog, ref, magicService) {
292
184
  super(ref, magicService);
293
185
  this.dialog = dialog;
@@ -297,16 +189,10 @@ class BaseMatTableMagicComponent extends TaskBaseMagicComponent {
297
189
  this.dataSource = new MatTableDataSource(this.task.Records.list);
298
190
  this.selection = new SelectionModel(false, []);
299
191
  }
300
- /**
301
- * Initializer
302
- */
303
192
  ngOnInit() {
304
193
  super.ngOnInit();
305
194
  this.magicService.tableService.connect(this.dataSource, this.paginator, this.selection, this.dialog);
306
195
  }
307
- /**
308
- * AfterContentChecked implementation
309
- */
310
196
  ngAfterContentChecked() {
311
197
  if (!isNullOrUndefined(this.paginator) && !isNullOrUndefined(this.paginator.pageSize) &&
312
198
  this.paginator.pageSize != this.task.oldPageSize) {
@@ -315,8 +201,8 @@ class BaseMatTableMagicComponent extends TaskBaseMagicComponent {
315
201
  }
316
202
  }
317
203
  }
318
- /** @nocollapse */ BaseMatTableMagicComponent.ɵfac = function BaseMatTableMagicComponent_Factory(t) { return new (t || BaseMatTableMagicComponent)(ɵɵdirectiveInject(MatDialog), ɵɵdirectiveInject(ChangeDetectorRef), ɵɵdirectiveInject(MagicServices)); };
319
- /** @nocollapse */ BaseMatTableMagicComponent.ɵcmp = ɵɵdefineComponent({ type: BaseMatTableMagicComponent, selectors: [["ng-component"]], viewQuery: function BaseMatTableMagicComponent_Query(rf, ctx) { if (rf & 1) {
204
+ BaseMatTableMagicComponent.ɵfac = function BaseMatTableMagicComponent_Factory(t) { return new (t || BaseMatTableMagicComponent)(ɵɵdirectiveInject(MatDialog), ɵɵdirectiveInject(ChangeDetectorRef), ɵɵdirectiveInject(MagicServices)); };
205
+ BaseMatTableMagicComponent.ɵcmp = ɵɵdefineComponent({ type: BaseMatTableMagicComponent, selectors: [["ng-component"]], viewQuery: function BaseMatTableMagicComponent_Query(rf, ctx) { if (rf & 1) {
320
206
  ɵɵstaticViewQuery(MatPaginator, true);
321
207
  ɵɵstaticViewQuery(MatSort, true);
322
208
  } if (rf & 2) {
@@ -324,7 +210,7 @@ class BaseMatTableMagicComponent extends TaskBaseMagicComponent {
324
210
  ɵɵqueryRefresh(_t = ɵɵloadQuery()) && (ctx.paginator = _t.first);
325
211
  ɵɵqueryRefresh(_t = ɵɵloadQuery()) && (ctx.sort = _t.first);
326
212
  } }, features: [ɵɵProvidersFeature(matMagicProviders), ɵɵInheritDefinitionFeature], decls: 0, vars: 0, template: function BaseMatTableMagicComponent_Template(rf, ctx) { }, encapsulation: 2 });
327
- /*@__PURE__*/ (function () { ɵsetClassMetadata(BaseMatTableMagicComponent, [{
213
+ (function () { ɵsetClassMetadata(BaseMatTableMagicComponent, [{
328
214
  type: Component,
329
215
  args: [{
330
216
  providers: matMagicProviders,
@@ -338,26 +224,19 @@ class BaseMatTableMagicComponent extends TaskBaseMagicComponent {
338
224
  args: [MatSort, { static: true }]
339
225
  }] }); })();
340
226
 
341
- /**
342
- * Directive for material-design listboxes not on material-design table
343
- */
344
227
  class MatListboxDirective {
345
228
  constructor(magicDirective) {
346
229
  this.magicDirective = magicDirective;
347
230
  }
348
- /**
349
- * Handles the "selectionChange" event - pass it to the "change" event handler
350
- * @param $event
351
- */
352
231
  onChange($event) {
353
232
  this.magicDirective.task.onListBoxSelectionChanged($event, this.magicDirective.id);
354
233
  }
355
234
  }
356
- /** @nocollapse */ MatListboxDirective.ɵfac = function MatListboxDirective_Factory(t) { return new (t || MatListboxDirective)(ɵɵdirectiveInject(MagicDirective)); };
357
- /** @nocollapse */ MatListboxDirective.ɵdir = ɵɵdefineDirective({ type: MatListboxDirective, selectors: [["mat-selection-list", "magic", ""]], hostBindings: function MatListboxDirective_HostBindings(rf, ctx) { if (rf & 1) {
235
+ MatListboxDirective.ɵfac = function MatListboxDirective_Factory(t) { return new (t || MatListboxDirective)(ɵɵdirectiveInject(MagicDirective)); };
236
+ MatListboxDirective.ɵdir = ɵɵdefineDirective({ type: MatListboxDirective, selectors: [["mat-selection-list", "magic", ""]], hostBindings: function MatListboxDirective_HostBindings(rf, ctx) { if (rf & 1) {
358
237
  ɵɵlistener("selectionChange", function MatListboxDirective_selectionChange_HostBindingHandler($event) { return ctx.onChange($event); });
359
238
  } } });
360
- /*@__PURE__*/ (function () { ɵsetClassMetadata(MatListboxDirective, [{
239
+ (function () { ɵsetClassMetadata(MatListboxDirective, [{
361
240
  type: Directive,
362
241
  args: [{
363
242
  selector: `mat-selection-list[magic]`,
@@ -367,9 +246,6 @@ class MatListboxDirective {
367
246
  args: ['selectionChange', ['$event']]
368
247
  }] }); })();
369
248
 
370
- /**
371
- * @ignore
372
- */
373
249
  const materialModules = [
374
250
  MatTableModule,
375
251
  MatPaginatorModule,
@@ -383,16 +259,13 @@ const materialModules = [
383
259
  MatNativeDateModule,
384
260
  MatDialogModule
385
261
  ];
386
- /**
387
- * @ignore
388
- */
389
262
  class MagicAngularMaterialModule {
390
263
  constructor(componentList, matdialog) {
391
264
  componentList.dialogs.set('MatDialog', matdialog);
392
265
  }
393
266
  }
394
- /** @nocollapse */ MagicAngularMaterialModule.ɵmod = ɵɵdefineNgModule({ type: MagicAngularMaterialModule });
395
- /** @nocollapse */ MagicAngularMaterialModule.ɵinj = ɵɵdefineInjector({ factory: function MagicAngularMaterialModule_Factory(t) { return new (t || MagicAngularMaterialModule)(ɵɵinject(ComponentListMagicService), ɵɵinject(MatDialog)); }, imports: [[
267
+ MagicAngularMaterialModule.ɵmod = ɵɵdefineNgModule({ type: MagicAngularMaterialModule });
268
+ MagicAngularMaterialModule.ɵinj = ɵɵdefineInjector({ factory: function MagicAngularMaterialModule_Factory(t) { return new (t || MagicAngularMaterialModule)(ɵɵinject(ComponentListMagicService), ɵɵinject(MatDialog)); }, imports: [[
396
269
  CommonModule,
397
270
  FormsModule,
398
271
  ...materialModules,
@@ -416,7 +289,7 @@ class MagicAngularMaterialModule {
416
289
  MatComboboxDirective,
417
290
  MatListboxDirective,
418
291
  BaseMatTableMagicComponent] }); })();
419
- /*@__PURE__*/ (function () { ɵsetClassMetadata(MagicAngularMaterialModule, [{
292
+ (function () { ɵsetClassMetadata(MagicAngularMaterialModule, [{
420
293
  type: NgModule,
421
294
  args: [{
422
295
  declarations: [
@@ -440,9 +313,5 @@ class MagicAngularMaterialModule {
440
313
  }]
441
314
  }], function () { return [{ type: ComponentListMagicService }, { type: MatDialog }]; }, null); })();
442
315
 
443
- /**
444
- * Generated bundle index. Do not edit.
445
- */
446
-
447
316
  export { BaseMatTableMagicComponent, MagicAngularMaterialModule, MatCheckboxDirective, MatComboboxDirective, MatListboxDirective, MgMatTableService, matMagicProviders, materialModules };
448
317
  //# sourceMappingURL=magic-xpa-angular-material-core.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"magic-xpa-angular-material-core.js","sources":["../../../projects/angular-material-core/src/directives/magic/form-controls/mat-magic-checkbox.directive.ts","../../../projects/angular-material-core/src/directives/magic/form-controls/mat-magic-combobox.directive.ts","../../../projects/angular-material-core/src/services/mattable.magic.service.ts","../../../projects/angular-material-core/src/services/mat.magic.providers.ts","../../../projects/angular-material-core/src/components/base-mat-table-magic.component.ts","../../../projects/angular-material-core/src/directives/magic/form-controls/mat-magic-listbox.directive.ts","../../../projects/angular-material-core/src/angular-material.module.ts","../../../projects/angular-material-core/magic-xpa-angular-material-core.ts"],"sourcesContent":["import { Directive } from \"@angular/core\";\r\nimport { CheckboxMagicDirective } from \"@magic-xpa/angular\";\r\n\r\n\r\n/**\r\n * Directive for material-design checkboxes not on material-design table\r\n */\r\n@Directive({\r\n selector:\r\n `\r\n mat-checkbox[magic]:not([noFormControl])\r\n `,\r\n})\r\nexport class MatCheckboxDirective extends CheckboxMagicDirective {\r\n\r\n\r\n}\r\n","import { Directive, HostListener } from \"@angular/core\";\r\nimport {ComboboxMagicDirective, MagicDirective} from \"@magic-xpa/angular\";\r\n\r\n\r\n/**\r\n * Directive for material-design comboboxes not on material-design table\r\n */\r\n@Directive({\r\n selector:\r\n `mat-select[magic]`,\r\n})\r\nexport class MatComboboxDirective extends ComboboxMagicDirective {\r\n\r\n /**\r\n * Handles the \"selectionChange\" event - pass it to the \"change\" event handler\r\n * @param $event\r\n */\r\n @HostListener('selectionChange', ['$event'])\r\n onChange($event) {\r\n super.onChange($event);\r\n }\r\n\r\n @HostListener('openedChange', ['$event'])\r\n onOpenedChanged($event) {\r\n MagicDirective.opened = $event;\r\n }\r\n\r\n}\r\n","\nimport { Injectable } from '@angular/core';\nimport { SelectionModel } from \"@angular/cdk/collections\";\n\nimport { TaskMagicService, ComponentListMagicService, ControlsMetadata } from \"@magic-xpa/angular\";\nimport {IGuiEvent, getGuiEventObj} from \"@magic-xpa/engine\";\nimport { TableMagicService } from \"@magic-xpa/angular\";\nimport {isNullOrUndefined} from \"util\";\nimport { MatTableDataSource } from '@angular/material/table';\nimport { MatDialog } from '@angular/material/dialog';\nimport { MatPaginator } from '@angular/material/paginator';\n\n\n/**\n * Extends the Magic table service to supply functionality for Material Design tables\n */\n@Injectable()\nexport class MgMatTableService extends TableMagicService {\n /**\n * Table data source\n */\n dataSource: MatTableDataSource<Element>;\n /**\n * Dialog used for editing values\n */\n dialog: MatDialog;\n /**\n * @ignore\n */\n get DataSource(): MatTableDataSource<Element> {\n return this.dataSource;\n }\n\n /**\n * @ignore\n */\n set DataSource(dataSource: MatTableDataSource<Element>) {\n this.dataSource = dataSource;\n }\n\n /**\n * Provides selection options for the table\n */\n selection: SelectionModel<Element>;\n\n /**\n * @ignore\n */\n get Selection(): SelectionModel<Element> {\n return this.selection;\n }\n\n /**\n * @ignore\n */\n set Selection(selection: SelectionModel<Element>) {\n this.selection = selection;\n }\n\n /**\n * Paginator to enable changing pages in the table\n */\n paginator: MatPaginator;\n\n /**\n * @ignore\n */\n get Paginator(): MatPaginator {\n return this.paginator;\n }\n\n /**\n * @ignore\n */\n set Paginator(paginator: MatPaginator) {\n this.paginator = paginator;\n }\n\n /**\n * @ignore\n */\n constructor(protected componentList: ComponentListMagicService, protected task: TaskMagicService ) {\n super(componentList, task);\n }\n\n /**\n * Connects the service to the elements of the table component\n * @param dataSource Table data source\n * @param paginator Table paginator\n * @param selection table SelectionModel\n * @param dialog Dialog used for editing values\n */\n connect(dataSource: MatTableDataSource<Element> , paginator: MatPaginator, selection: SelectionModel<Element>, dialog: MatDialog) {\n this.dataSource = dataSource;\n this.paginator = paginator;\n this.selection = selection;\n this.dialog = dialog;\n }\n\n /**\n * @ignore\n */\n refreshDataSource() {\n if (!isNullOrUndefined(this.paginator))\n this.dataSource.paginator = this.paginator;\n\n this.dataSource.data = (this.task.mgAccessorService.isDataviewEmpty() ? [] : this.task.Records.list);\n }\n\n /**\n * returns the page size of the table\n * @returns\n */\n getPageSize(): number {\n if (isNullOrUndefined(this.paginator))\n return super.getPageSize();\n return this.paginator.pageSize;\n }\n\n /**\n * Selects a table row\n * @param guiRowid Id of row to be selected\n */\n selectRow(guiRowid: string): void {\n super.selectRow(guiRowid);\n this.selection.select(this.task.Records.list[guiRowid]);\n this.refreshDataSource();\n }\n\n /**\n * @ignore\n */\n getDialog(): any {\n return this.dialog;\n }\n\n /**\n * Displays the requested table page\n * @param pageId Id of page to be selected\n */\n selectPage(pageId: number): void {\n if (!isNullOrUndefined(this.paginator))\n this.paginator.pageIndex = pageId;\n\n this.refreshDataSource();\n }\n\n /**\n * Returns the currently seleted row\n * @returns\n */\n selectedRow(): any {\n return this.selection.selected[0];\n }\n\n /**\n * Handle the paginator's \"page\" event\n * @param e The event received from the UI\n */\n mgOnPaginateChange(e)\n {\n if (this.task.oldPageSize != e.pageSize) {\n this.handleResize(e.pageIndex, e.previousPageIndex, e.pageSize);\n this.task.oldPageSize = e.pageSize;\n }\n else\n this.getRowsIfNeeded(e.pageIndex, e.previousPageIndex, e.pageSize);\n }\n\n /**\n * Handle resize and set table top index.\n * @param pageIndex : New page index.\n * @param prevPageIndex : Prev page index\n * @param pageSize : PageSize\n */\n handleResize(pageIndex: number, prevPageIndex: number, pageSize: number): void {\n let requiredGuiRowId = pageIndex * pageSize;\n this.task.resize(pageSize, requiredGuiRowId);\n }\n\n /**\n * Execute getRows to fetch required chunk of records.\n * @param pageIndex : New page index.\n * @param prevPageIndex : Prev page index\n * @param pageSize : PageSize\n */\n getRowsIfNeeded(pageIndex: number, prevPageIndex: number, pageSize: number): void {\n let guiEvent: IGuiEvent = getGuiEventObj(\"getRows\", \"table\", 0);\n guiEvent.Line = pageIndex * pageSize;\n this.task.insertEvent(guiEvent);\n this.setTableTopIndex(this.task.getDvRowId(pageSize * pageIndex));\n }\n\n /**\n * Handles the \"matSortChange\" event\n * @param e The event received from the UI\n */\n sortData(e) {\n let direction: number = 0;\n if (e.direction === 'asc')\n direction = 0;\n else if (e.direction === 'desc')\n direction = 1;\n\n let guiEvent: IGuiEvent = getGuiEventObj(\"columnSort\", e.active, direction);\n this.task.insertEvent(guiEvent);\n }\n\n /**\n * Change the number of lines in a table\n * @param size New number of lines in table\n */\n updateTableSize(size: number) {\n if (size === 0) // never remove row 0 for now\n {\n size = 1;\n this.task.Records.clearFirstTableRecord(this.task.template);\n }\n\n else if (isNullOrUndefined(this.paginator))\n size = this.getPageSize();\n\n this.task.formGroups.length = size;\n this.task.Records.updateSize(size);\n this.task.setIncludesFirst(false);\n }\n\n /**\n * Handle the selection of row and if needed move to respective page.\n * @param guiRowId New number of lines in table\n */\n protected selectPageForGuiRowId(guiRowId: number): void {\n let pageToBeSelected: number = 0;\n let prevSelectedRow: ControlsMetadata = <ControlsMetadata>this.selectedRow();\n\n pageToBeSelected = Math.floor(guiRowId / this.getPageSize());\n\n // Explicitly handle selection of page when it's not raised by using pagination\n if ((isNullOrUndefined(prevSelectedRow) || (!isNullOrUndefined(this.paginator) && pageToBeSelected != this.paginator.pageIndex)))\n this.selectPage(pageToBeSelected);\n }\n\n /**\n * @ignore\n */\n setTableTopIndex(value: number) {\n this.task.Records.setGuiTopIndex(value);\n\n if (value >= 0)\n this.selectPageForGuiRowId(this.task.getGuiRowId(value, true));\n }\n\n /**\n * @ignore\n */\n getTableTopIndex():number\n {\n return this.task.Records.getGuiTopIndex();\n }\n}\n\n","\r\nimport { basicMagicProviders, TableMagicService} from \"@magic-xpa/angular\";\r\n\r\nimport { MgMatTableService } from \"./mattable.magic.service\";\r\n\r\n\r\n/**\r\n * @ignore\r\n */\r\nexport const matMagicProviders = [\r\n ...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.\r\n { provide: TableMagicService, useClass: MgMatTableService }\r\n];\r\n\r\n","import { MagicServices, TaskBaseMagicComponent } from '@magic-xpa/angular';\r\n\r\n\r\nimport { MatDialog } from '@angular/material/dialog';\r\nimport { MatSort } from '@angular/material/sort';\r\nimport { MatTableDataSource } from '@angular/material/table';\r\nimport { SelectionModel } from '@angular/cdk/collections';\r\nimport { ChangeDetectorRef, Component, ViewChild } from '@angular/core';\r\nimport { MgMatTableService } from '../services/mattable.magic.service';\r\nimport { matMagicProviders } from '../services/mat.magic.providers';\r\nimport { MatPaginator } from '@angular/material/paginator';\r\nimport { isNullOrUndefined } from 'util';\r\n\r\n/**\r\n * This component is the base component for forms which has a material-design table (grid)\r\n */\r\n@Component({\r\n providers: matMagicProviders,\r\n template: ''\r\n\r\n})\r\n export class BaseMatTableMagicComponent extends TaskBaseMagicComponent {\r\n\r\n /**\r\n * Paginator to enable changing pages in the table\r\n */\r\n @ViewChild(MatPaginator, {static:true}) paginator: MatPaginator;\r\n\r\n /**\r\n * Provides the table sort capabilities\r\n */\r\n @ViewChild(MatSort, {static:true}) sort: MatSort;\r\n\r\n /**\r\n * List of table columns to be displayed\r\n */\r\n displayedColumns;\r\n\r\n /**\r\n * Table data source\r\n */\r\n dataSource;\r\n\r\n /**\r\n * Provides selection options for the table\r\n */\r\n selection;\r\n\r\n\r\n /**\r\n * @ignore\r\n */\r\n constructor(\r\n public dialog: MatDialog,\r\n protected ref: ChangeDetectorRef,\r\n public magicService: MagicServices,\r\n ) {\r\n\r\n super(ref, magicService);\r\n\r\n this.displayedColumns = [];\r\n this.dataSource = new MatTableDataSource < Element > (this.task.Records.list);\r\n this.selection = new SelectionModel < Element > (false, []);\r\n }\r\n\r\n /**\r\n * Initializer\r\n */\r\n ngOnInit() {\r\n super.ngOnInit();\r\n (this.magicService.tableService as MgMatTableService).connect(this.dataSource, this.paginator, this.selection, this.dialog);\r\n }\r\n\r\n /**\r\n * AfterContentChecked implementation\r\n */\r\n ngAfterContentChecked() {\r\n if (!isNullOrUndefined(this.paginator) && !isNullOrUndefined(this.paginator.pageSize) &&\r\n this.paginator.pageSize != this.task.oldPageSize) {\r\n (this.magicService.tableService as MgMatTableService).handleResize(this.paginator.pageIndex, 0, this.paginator.pageSize);\r\n this.task.oldPageSize = this.paginator.pageSize;\r\n }\r\n }\r\n}\r\n","import { Directive, HostListener } from \"@angular/core\";\r\nimport { MagicDirective } from \"@magic-xpa/angular\";\r\n\r\n\r\n/**\r\n * Directive for material-design listboxes not on material-design table\r\n */\r\n@Directive({\r\n selector:\r\n `mat-selection-list[magic]`,\r\n})\r\nexport class MatListboxDirective{\r\n\r\n constructor(protected magicDirective: MagicDirective) {\r\n }\r\n\r\n /**\r\n * Handles the \"selectionChange\" event - pass it to the \"change\" event handler\r\n * @param $event\r\n */\r\n @HostListener('selectionChange', ['$event'])\r\n onChange($event) {\r\n this.magicDirective.task.onListBoxSelectionChanged($event, this.magicDirective.id);\r\n }\r\n}\r\n","import {NgModule} from \"@angular/core\";\r\nimport {CommonModule} from \"@angular/common\";\r\n\r\nimport {FormsModule} from \"@angular/forms\";\r\nimport {MatCheckboxDirective} from \"./directives/magic/form-controls/mat-magic-checkbox.directive\";\r\nimport {MatComboboxDirective} from \"./directives/magic/form-controls/mat-magic-combobox.directive\";\r\nimport { BaseMatTableMagicComponent } from \"./components/base-mat-table-magic.component\";\r\nimport { MatListboxDirective } from \"./directives/magic/form-controls/mat-magic-listbox.directive\";\r\nimport {MatTableModule} from '@angular/material/table';\r\nimport { MatPaginatorModule } from \"@angular/material/paginator\";\r\nimport { MatInputModule } from \"@angular/material/input\";\r\nimport { MatButtonModule } from \"@angular/material/button\";\r\nimport { MatListModule } from \"@angular/material/list\";\r\nimport { MatCheckboxModule } from \"@angular/material/checkbox\";\r\nimport { MatTabsModule } from \"@angular/material/tabs\";\r\nimport { MatSelectModule } from \"@angular/material/select\";\r\nimport { MatDatepickerModule } from \"@angular/material/datepicker\";\r\nimport { MatNativeDateModule } from \"@angular/material/core\";\r\nimport { MatDialog, MatDialogModule } from '@angular/material/dialog';\r\nimport { ComponentListMagicService, MagicModule } from '@magic-xpa/angular';\r\n\r\n\r\n/**\r\n * @ignore\r\n */\r\nexport const materialModules = [\r\n MatTableModule,\r\n MatPaginatorModule,\r\n MatInputModule,\r\n MatButtonModule,\r\n MatListModule,\r\n MatCheckboxModule,\r\n MatTabsModule,\r\n MatSelectModule,\r\n MatDatepickerModule,\r\n MatNativeDateModule,\r\n MatDialogModule\r\n];\r\n\r\n/**\r\n * @ignore\r\n */\r\n@NgModule({\r\n declarations: [\r\n MatCheckboxDirective,\r\n MatComboboxDirective,\r\n MatListboxDirective,\r\n BaseMatTableMagicComponent,\r\n ],\r\n exports: [\r\n MatCheckboxDirective,\r\n MatComboboxDirective,\r\n MatListboxDirective,\r\n BaseMatTableMagicComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n ...materialModules,\r\n MagicModule\r\n ]\r\n})\r\nexport class MagicAngularMaterialModule {\r\n constructor(componentList:ComponentListMagicService, matdialog: MatDialog){\r\n componentList.dialogs.set( 'MatDialog' , matdialog );\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;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;IACf,aAAa;IACb,iBAAiB;IACjB,aAAa;IACb,eAAe;IACf,mBAAmB;IACnB,mBAAmB;IACnB,eAAe;EACf;AAEF;;;MAuBa,0BAA0B;IACnC,YAAY,aAAuC,EAAG,SAAoB;QACxE,aAAa,CAAC,OAAO,CAAC,GAAG,CAAE,WAAW,EAAG,SAAS,CAAE,CAAC;KACtD;;8EAHQ,0BAA0B;mJAA1B,0BAA0B,0EAP5B;YACP,YAAY;YACZ,WAAW;YACX,GAAG,eAAe;YAClB,WAAW;SACZ;qFAEU,0BAA0B,mBAlBnC,oBAAoB;QACpB,oBAAoB;QACpB,mBAAmB;QACnB,0BAA0B,aAS1B,YAAY;QACZ,WAAW,EA/Bb,cAAc;QACd,kBAAkB;QAClB,cAAc;QACd,eAAe;QACf,aAAa;QACb,iBAAiB;QACjB,aAAa;QACb,eAAe;QACf,mBAAmB;QACnB,mBAAmB;QACnB,eAAe,EAuBb,WAAW,aATX,oBAAoB;QACpB,oBAAoB;QACpB,mBAAmB;QACnB,0BAA0B;+CASjB,0BAA0B;cApBtC,QAAQ;eAAC;gBACR,YAAY,EAAE;oBACZ,oBAAoB;oBACpB,oBAAoB;oBACpB,mBAAmB;oBACnB,0BAA0B;iBAC3B;gBACD,OAAO,EAAE;oBACP,oBAAoB;oBACpB,oBAAoB;oBACpB,mBAAmB;oBACnB,0BAA0B;iBAC3B;gBACD,OAAO,EAAE;oBACP,YAAY;oBACZ,WAAW;oBACX,GAAG,eAAe;oBAClB,WAAW;iBACZ;aACF;;;AC7DD;;;;;;"}
1
+ {"version":3,"file":"magic-xpa-angular-material-core.js","sources":["../../../../projects/angular-material-core/src/directives/magic/form-controls/mat-magic-checkbox.directive.ts","../../../../projects/angular-material-core/src/directives/magic/form-controls/mat-magic-combobox.directive.ts","../../../../projects/angular-material-core/src/services/mattable.magic.service.ts","../../../../projects/angular-material-core/src/services/mat.magic.providers.ts","../../../../projects/angular-material-core/src/components/base-mat-table-magic.component.ts","../../../../projects/angular-material-core/src/directives/magic/form-controls/mat-magic-listbox.directive.ts","../../../../projects/angular-material-core/src/angular-material.module.ts"],"sourcesContent":["import { Directive } from \"@angular/core\";\r\nimport { CheckboxMagicDirective } from \"@magic-xpa/angular\";\r\n\r\n\r\n/**\r\n * Directive for material-design checkboxes not on material-design table\r\n */\r\n@Directive({\r\n selector:\r\n `\r\n mat-checkbox[magic]:not([noFormControl])\r\n `,\r\n})\r\nexport class MatCheckboxDirective extends CheckboxMagicDirective {\r\n\r\n\r\n}\r\n","import { Directive, HostListener } from \"@angular/core\";\r\nimport {ComboboxMagicDirective, MagicDirective} from \"@magic-xpa/angular\";\r\n\r\n\r\n/**\r\n * Directive for material-design comboboxes not on material-design table\r\n */\r\n@Directive({\r\n selector:\r\n `mat-select[magic]`,\r\n})\r\nexport class MatComboboxDirective extends ComboboxMagicDirective {\r\n\r\n /**\r\n * Handles the \"selectionChange\" event - pass it to the \"change\" event handler\r\n * @param $event\r\n */\r\n @HostListener('selectionChange', ['$event'])\r\n onChange($event) {\r\n super.onChange($event);\r\n }\r\n\r\n @HostListener('openedChange', ['$event'])\r\n onOpenedChanged($event) {\r\n MagicDirective.opened = $event;\r\n }\r\n\r\n}\r\n","\nimport { Injectable } from '@angular/core';\nimport { SelectionModel } from \"@angular/cdk/collections\";\n\nimport { TaskMagicService, ComponentListMagicService, ControlsMetadata } from \"@magic-xpa/angular\";\nimport {IGuiEvent, getGuiEventObj} from \"@magic-xpa/engine\";\nimport { TableMagicService } from \"@magic-xpa/angular\";\nimport {isNullOrUndefined} from \"util\";\nimport { MatTableDataSource } from '@angular/material/table';\nimport { MatDialog } from '@angular/material/dialog';\nimport { MatPaginator } from '@angular/material/paginator';\n\n\n/**\n * Extends the Magic table service to supply functionality for Material Design tables\n */\n@Injectable()\nexport class MgMatTableService extends TableMagicService {\n /**\n * Table data source\n */\n dataSource: MatTableDataSource<Element>;\n /**\n * Dialog used for editing values\n */\n dialog: MatDialog;\n /**\n * @ignore\n */\n get DataSource(): MatTableDataSource<Element> {\n return this.dataSource;\n }\n\n /**\n * @ignore\n */\n set DataSource(dataSource: MatTableDataSource<Element>) {\n this.dataSource = dataSource;\n }\n\n /**\n * Provides selection options for the table\n */\n selection: SelectionModel<Element>;\n\n /**\n * @ignore\n */\n get Selection(): SelectionModel<Element> {\n return this.selection;\n }\n\n /**\n * @ignore\n */\n set Selection(selection: SelectionModel<Element>) {\n this.selection = selection;\n }\n\n /**\n * Paginator to enable changing pages in the table\n */\n paginator: MatPaginator;\n\n /**\n * @ignore\n */\n get Paginator(): MatPaginator {\n return this.paginator;\n }\n\n /**\n * @ignore\n */\n set Paginator(paginator: MatPaginator) {\n this.paginator = paginator;\n }\n\n /**\n * @ignore\n */\n constructor(protected componentList: ComponentListMagicService, protected task: TaskMagicService ) {\n super(componentList, task);\n }\n\n /**\n * Connects the service to the elements of the table component\n * @param dataSource Table data source\n * @param paginator Table paginator\n * @param selection table SelectionModel\n * @param dialog Dialog used for editing values\n */\n connect(dataSource: MatTableDataSource<Element> , paginator: MatPaginator, selection: SelectionModel<Element>, dialog: MatDialog) {\n this.dataSource = dataSource;\n this.paginator = paginator;\n this.selection = selection;\n this.dialog = dialog;\n }\n\n /**\n * @ignore\n */\n refreshDataSource() {\n if (!isNullOrUndefined(this.paginator))\n this.dataSource.paginator = this.paginator;\n\n this.dataSource.data = (this.task.mgAccessorService.isDataviewEmpty() ? [] : this.task.Records.list);\n }\n\n /**\n * returns the page size of the table\n * @returns\n */\n getPageSize(): number {\n if (isNullOrUndefined(this.paginator))\n return super.getPageSize();\n return this.paginator.pageSize;\n }\n\n /**\n * Selects a table row\n * @param guiRowid Id of row to be selected\n */\n selectRow(guiRowid: string): void {\n super.selectRow(guiRowid);\n this.selection.select(this.task.Records.list[guiRowid]);\n this.refreshDataSource();\n }\n\n /**\n * @ignore\n */\n getDialog(): any {\n return this.dialog;\n }\n\n /**\n * Displays the requested table page\n * @param pageId Id of page to be selected\n */\n selectPage(pageId: number): void {\n if (!isNullOrUndefined(this.paginator))\n this.paginator.pageIndex = pageId;\n\n this.refreshDataSource();\n }\n\n /**\n * Returns the currently seleted row\n * @returns\n */\n selectedRow(): any {\n return this.selection.selected[0];\n }\n\n /**\n * Handle the paginator's \"page\" event\n * @param e The event received from the UI\n */\n mgOnPaginateChange(e)\n {\n if (this.task.oldPageSize != e.pageSize) {\n this.handleResize(e.pageIndex, e.previousPageIndex, e.pageSize);\n this.task.oldPageSize = e.pageSize;\n }\n else\n this.getRowsIfNeeded(e.pageIndex, e.previousPageIndex, e.pageSize);\n }\n\n /**\n * Handle resize and set table top index.\n * @param pageIndex : New page index.\n * @param prevPageIndex : Prev page index\n * @param pageSize : PageSize\n */\n handleResize(pageIndex: number, prevPageIndex: number, pageSize: number): void {\n let requiredGuiRowId = pageIndex * pageSize;\n this.task.resize(pageSize, requiredGuiRowId);\n }\n\n /**\n * Execute getRows to fetch required chunk of records.\n * @param pageIndex : New page index.\n * @param prevPageIndex : Prev page index\n * @param pageSize : PageSize\n */\n getRowsIfNeeded(pageIndex: number, prevPageIndex: number, pageSize: number): void {\n let guiEvent: IGuiEvent = getGuiEventObj(\"getRows\", \"table\", 0);\n guiEvent.Line = pageIndex * pageSize;\n this.task.insertEvent(guiEvent);\n this.setTableTopIndex(this.task.getDvRowId(pageSize * pageIndex));\n }\n\n /**\n * Handles the \"matSortChange\" event\n * @param e The event received from the UI\n */\n sortData(e) {\n let direction: number = 0;\n if (e.direction === 'asc')\n direction = 0;\n else if (e.direction === 'desc')\n direction = 1;\n\n let guiEvent: IGuiEvent = getGuiEventObj(\"columnSort\", e.active, direction);\n this.task.insertEvent(guiEvent);\n }\n\n /**\n * Change the number of lines in a table\n * @param size New number of lines in table\n */\n updateTableSize(size: number) {\n if (size === 0) // never remove row 0 for now\n {\n size = 1;\n this.task.Records.clearFirstTableRecord(this.task.template);\n }\n\n else if (isNullOrUndefined(this.paginator))\n size = this.getPageSize();\n\n this.task.formGroups.length = size;\n this.task.Records.updateSize(size);\n this.task.setIncludesFirst(false);\n }\n\n /**\n * Handle the selection of row and if needed move to respective page.\n * @param guiRowId New number of lines in table\n */\n protected selectPageForGuiRowId(guiRowId: number): void {\n let pageToBeSelected: number = 0;\n let prevSelectedRow: ControlsMetadata = <ControlsMetadata>this.selectedRow();\n\n pageToBeSelected = Math.floor(guiRowId / this.getPageSize());\n\n // Explicitly handle selection of page when it's not raised by using pagination\n if ((isNullOrUndefined(prevSelectedRow) || (!isNullOrUndefined(this.paginator) && pageToBeSelected != this.paginator.pageIndex)))\n this.selectPage(pageToBeSelected);\n }\n\n /**\n * @ignore\n */\n setTableTopIndex(value: number) {\n this.task.Records.setGuiTopIndex(value);\n\n if (value >= 0)\n this.selectPageForGuiRowId(this.task.getGuiRowId(value, true));\n }\n\n /**\n * @ignore\n */\n getTableTopIndex():number\n {\n return this.task.Records.getGuiTopIndex();\n }\n}\n\n","\r\nimport { basicMagicProviders, TableMagicService} from \"@magic-xpa/angular\";\r\n\r\nimport { MgMatTableService } from \"./mattable.magic.service\";\r\n\r\n\r\n/**\r\n * @ignore\r\n */\r\nexport const matMagicProviders = [\r\n ...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.\r\n { provide: TableMagicService, useClass: MgMatTableService }\r\n];\r\n\r\n","import { MagicServices, TaskBaseMagicComponent } from '@magic-xpa/angular';\r\n\r\n\r\nimport { MatDialog } from '@angular/material/dialog';\r\nimport { MatSort } from '@angular/material/sort';\r\nimport { MatTableDataSource } from '@angular/material/table';\r\nimport { SelectionModel } from '@angular/cdk/collections';\r\nimport { ChangeDetectorRef, Component, ViewChild } from '@angular/core';\r\nimport { MgMatTableService } from '../services/mattable.magic.service';\r\nimport { matMagicProviders } from '../services/mat.magic.providers';\r\nimport { MatPaginator } from '@angular/material/paginator';\r\nimport { isNullOrUndefined } from 'util';\r\n\r\n/**\r\n * This component is the base component for forms which has a material-design table (grid)\r\n */\r\n@Component({\r\n providers: matMagicProviders,\r\n template: ''\r\n\r\n})\r\n export class BaseMatTableMagicComponent extends TaskBaseMagicComponent {\r\n\r\n /**\r\n * Paginator to enable changing pages in the table\r\n */\r\n @ViewChild(MatPaginator, {static:true}) paginator: MatPaginator;\r\n\r\n /**\r\n * Provides the table sort capabilities\r\n */\r\n @ViewChild(MatSort, {static:true}) sort: MatSort;\r\n\r\n /**\r\n * List of table columns to be displayed\r\n */\r\n displayedColumns;\r\n\r\n /**\r\n * Table data source\r\n */\r\n dataSource;\r\n\r\n /**\r\n * Provides selection options for the table\r\n */\r\n selection;\r\n\r\n\r\n /**\r\n * @ignore\r\n */\r\n constructor(\r\n public dialog: MatDialog,\r\n protected ref: ChangeDetectorRef,\r\n public magicService: MagicServices,\r\n ) {\r\n\r\n super(ref, magicService);\r\n\r\n this.displayedColumns = [];\r\n this.dataSource = new MatTableDataSource < Element > (this.task.Records.list);\r\n this.selection = new SelectionModel < Element > (false, []);\r\n }\r\n\r\n /**\r\n * Initializer\r\n */\r\n ngOnInit() {\r\n super.ngOnInit();\r\n (this.magicService.tableService as MgMatTableService).connect(this.dataSource, this.paginator, this.selection, this.dialog);\r\n }\r\n\r\n /**\r\n * AfterContentChecked implementation\r\n */\r\n ngAfterContentChecked() {\r\n if (!isNullOrUndefined(this.paginator) && !isNullOrUndefined(this.paginator.pageSize) &&\r\n this.paginator.pageSize != this.task.oldPageSize) {\r\n (this.magicService.tableService as MgMatTableService).handleResize(this.paginator.pageIndex, 0, this.paginator.pageSize);\r\n this.task.oldPageSize = this.paginator.pageSize;\r\n }\r\n }\r\n}\r\n","import { Directive, HostListener } from \"@angular/core\";\r\nimport { MagicDirective } from \"@magic-xpa/angular\";\r\n\r\n\r\n/**\r\n * Directive for material-design listboxes not on material-design table\r\n */\r\n@Directive({\r\n selector:\r\n `mat-selection-list[magic]`,\r\n})\r\nexport class MatListboxDirective{\r\n\r\n constructor(protected magicDirective: MagicDirective) {\r\n }\r\n\r\n /**\r\n * Handles the \"selectionChange\" event - pass it to the \"change\" event handler\r\n * @param $event\r\n */\r\n @HostListener('selectionChange', ['$event'])\r\n onChange($event) {\r\n this.magicDirective.task.onListBoxSelectionChanged($event, this.magicDirective.id);\r\n }\r\n}\r\n","import {NgModule} from \"@angular/core\";\r\nimport {CommonModule} from \"@angular/common\";\r\n\r\nimport {FormsModule} from \"@angular/forms\";\r\nimport {MatCheckboxDirective} from \"./directives/magic/form-controls/mat-magic-checkbox.directive\";\r\nimport {MatComboboxDirective} from \"./directives/magic/form-controls/mat-magic-combobox.directive\";\r\nimport { BaseMatTableMagicComponent } from \"./components/base-mat-table-magic.component\";\r\nimport { MatListboxDirective } from \"./directives/magic/form-controls/mat-magic-listbox.directive\";\r\nimport {MatTableModule} from '@angular/material/table';\r\nimport { MatPaginatorModule } from \"@angular/material/paginator\";\r\nimport { MatInputModule } from \"@angular/material/input\";\r\nimport { MatButtonModule } from \"@angular/material/button\";\r\nimport { MatListModule } from \"@angular/material/list\";\r\nimport { MatCheckboxModule } from \"@angular/material/checkbox\";\r\nimport { MatTabsModule } from \"@angular/material/tabs\";\r\nimport { MatSelectModule } from \"@angular/material/select\";\r\nimport { MatDatepickerModule } from \"@angular/material/datepicker\";\r\nimport { MatNativeDateModule } from \"@angular/material/core\";\r\nimport { MatDialog, MatDialogModule } from '@angular/material/dialog';\r\nimport { ComponentListMagicService, MagicModule } from '@magic-xpa/angular';\r\n\r\n\r\n/**\r\n * @ignore\r\n */\r\nexport const materialModules = [\r\n MatTableModule,\r\n MatPaginatorModule,\r\n MatInputModule,\r\n MatButtonModule,\r\n MatListModule,\r\n MatCheckboxModule,\r\n MatTabsModule,\r\n MatSelectModule,\r\n MatDatepickerModule,\r\n MatNativeDateModule,\r\n MatDialogModule\r\n];\r\n\r\n/**\r\n * @ignore\r\n */\r\n@NgModule({\r\n declarations: [\r\n MatCheckboxDirective,\r\n MatComboboxDirective,\r\n MatListboxDirective,\r\n BaseMatTableMagicComponent,\r\n ],\r\n exports: [\r\n MatCheckboxDirective,\r\n MatComboboxDirective,\r\n MatListboxDirective,\r\n BaseMatTableMagicComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n ...materialModules,\r\n MagicModule\r\n ]\r\n})\r\nexport class MagicAngularMaterialModule {\r\n constructor(componentList:ComponentListMagicService, matdialog: MatDialog){\r\n componentList.dialogs.set( 'MatDialog' , matdialog );\r\n }\r\n}\r\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;MAaa,oBAAqB,SAAQ,sBAAsB;;qHAAnD,oBAAoB;sDAApB,oBAAoB;gEAApB,oBAAoB;iCAApB,oBAAoB;cANhC,SAAS;eAAC;gBACT,QAAQ,EACN;;KAEC;aACJ;;;MCDY,oBAAqB,SAAQ,sBAAsB;IAO9D,QAAQ,CAAC,MAAM;QACb,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;KACxB;IAGD,eAAe,CAAC,MAAM;QACpB,cAAc,CAAC,MAAM,GAAG,MAAM,CAAC;KAChC;;qHAdU,oBAAoB;sDAApB,oBAAoB;wHAApB,oBAAgB,oGAAhB,2BAAuB;;gEAAvB,oBAAoB;iCAApB,oBAAoB;cAJhC,SAAS;eAAC;gBACT,QAAQ,EACN,mBAAmB;aACtB;gBAQC,QAAQ;kBADP,YAAY;mBAAC,iBAAiB,EAAE,CAAC,QAAQ,CAAC;YAM3C,eAAe;kBADd,YAAY;mBAAC,cAAc,EAAE,CAAC,QAAQ,CAAC;;;MCL7B,iBAAkB,SAAQ,iBAAiB;IAgEtD,YAAsB,aAAwC,EAAY,IAAsB;QAC9F,KAAK,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;QADP,kBAAa,GAAb,aAAa,CAA2B;QAAY,SAAI,GAAJ,IAAI,CAAkB;KAE/F;IAtDD,IAAI,UAAU;QACZ,OAAO,IAAI,CAAC,UAAU,CAAC;KACxB;IAKD,IAAI,UAAU,CAAC,UAAuC;QACpD,IAAI,CAAC,UAAU,GAAG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mBAAC,iBAAiB,EAAE,CAAC,QAAQ,CAAC;;;MCKhC,eAAe,GAAG;IAC7B,cAAc;IACd,kBAAkB;IAClB,cAAc;IACd,eAAe;IACf,aAAa;IACb,iBAAiB;IACjB,aAAa;IACb,eAAe;IACf,mBAAmB;IACnB,mBAAmB;IACnB,eAAe;EACf;MAyBW,0BAA0B;IACnC,YAAY,aAAuC,EAAG,SAAoB;QACxE,aAAa,CAAC,OAAO,CAAC,GAAG,CAAE,WAAW,EAAG,SAAS,CAAE,CAAC;KACtD;;2DAHQ,0BAA0B;gIAA1B,0BAA0B,0EAP5B;YACP,YAAY;YACZ,WAAW;YACX,GAAG,eAAe;YAClB,WAAW;SACZ;qFAEU,0BAA0B,mBAlBnC,oBAAoB;QACpB,oBAAoB;QACpB,mBAAmB;QACnB,0BAA0B,aAS1B,YAAY;QACZ,WAAW,EA/Bb,cAAc;QACd,kBAAkB;QAClB,cAAc;QACd,eAAe;QACf,aAAa;QACb,iBAAiB;QACjB,aAAa;QACb,eAAe;QACf,mBAAmB;QACnB,mBAAmB;QACnB,eAAe,EAuBb,WAAW,aATX,oBAAoB;QACpB,oBAAoB;QACpB,mBAAmB;QACnB,0BAA0B;iCASjB,0BAA0B;cApBtC,QAAQ;eAAC;gBACR,YAAY,EAAE;oBACZ,oBAAoB;oBACpB,oBAAoB;oBACpB,mBAAmB;oBACnB,0BAA0B;iBAC3B;gBACD,OAAO,EAAE;oBACP,oBAAoB;oBACpB,oBAAoB;oBACpB,mBAAmB;oBACnB,0BAA0B;iBAC3B;gBACD,OAAO,EAAE;oBACP,YAAY;oBACZ,WAAW;oBACX,GAAG,eAAe;oBAClB,WAAW;iBACZ;aACF;;;;;"}
@@ -1,5 +1,2 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
1
  /// <amd-module name="@magic-xpa/angular-material-core" />
5
2
  export * from './index';
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@magic-xpa/angular-material-core",
3
- "version": "4.800.0-dev480.18",
3
+ "version": "4.800.0-dev480.183",
4
4
  "license": "SEE LICENSE IN EULA.pdf",
5
5
  "peerDependencies": {
6
6
  "@angular/core": "^10.2.3",
7
7
  "@angular/common": "^10.2.3",
8
8
  "@angular/forms": "^10.2.3",
9
9
  "@angular/material": "^10.2.7",
10
- "@magic-xpa/angular": "4.800.0-dev480.18"
10
+ "@magic-xpa/angular": "4.800.0-dev480.183"
11
11
  },
12
12
  "main": "bundles/magic-xpa-angular-material-core.umd.js",
13
13
  "module": "fesm2015/magic-xpa-angular-material-core.js",
@@ -20,13 +20,7 @@ import * as i15 from "@angular/material/datepicker";
20
20
  import * as i16 from "@angular/material/core";
21
21
  import * as i17 from "@angular/material/dialog";
22
22
  import * as i18 from "@magic-xpa/angular";
23
- /**
24
- * @ignore
25
- */
26
23
  export declare const materialModules: (typeof MatNativeDateModule)[];
27
- /**
28
- * @ignore
29
- */
30
24
  export declare class MagicAngularMaterialModule {
31
25
  constructor(componentList: ComponentListMagicService, matdialog: MatDialog);
32
26
  static ɵmod: i0.ɵɵNgModuleDefWithMeta<MagicAngularMaterialModule, [typeof i1.MatCheckboxDirective, typeof i2.MatComboboxDirective, typeof i3.MatListboxDirective, typeof i4.BaseMatTableMagicComponent], [typeof i5.CommonModule, typeof i6.FormsModule, typeof i7.MatTableModule, typeof i8.MatPaginatorModule, typeof i9.MatInputModule, typeof i10.MatButtonModule, typeof i11.MatListModule, typeof i12.MatCheckboxModule, typeof i13.MatTabsModule, typeof i14.MatSelectModule, typeof i15.MatDatepickerModule, typeof i16.MatNativeDateModule, typeof i17.MatDialogModule, typeof i18.MagicModule], [typeof i1.MatCheckboxDirective, typeof i2.MatComboboxDirective, typeof i3.MatListboxDirective, typeof i4.BaseMatTableMagicComponent]>;
@@ -4,44 +4,17 @@ import { MatSort } from '@angular/material/sort';
4
4
  import { ChangeDetectorRef } from '@angular/core';
5
5
  import { MatPaginator } from '@angular/material/paginator';
6
6
  import * as i0 from "@angular/core";
7
- /**
8
- * This component is the base component for forms which has a material-design table (grid)
9
- */
10
7
  export declare class BaseMatTableMagicComponent extends TaskBaseMagicComponent {
11
8
  dialog: MatDialog;
12
9
  protected ref: ChangeDetectorRef;
13
10
  magicService: MagicServices;
14
- /**
15
- * Paginator to enable changing pages in the table
16
- */
17
11
  paginator: MatPaginator;
18
- /**
19
- * Provides the table sort capabilities
20
- */
21
12
  sort: MatSort;
22
- /**
23
- * List of table columns to be displayed
24
- */
25
13
  displayedColumns: any;
26
- /**
27
- * Table data source
28
- */
29
14
  dataSource: any;
30
- /**
31
- * Provides selection options for the table
32
- */
33
15
  selection: any;
34
- /**
35
- * @ignore
36
- */
37
16
  constructor(dialog: MatDialog, ref: ChangeDetectorRef, magicService: MagicServices);
38
- /**
39
- * Initializer
40
- */
41
17
  ngOnInit(): void;
42
- /**
43
- * AfterContentChecked implementation
44
- */
45
18
  ngAfterContentChecked(): void;
46
19
  static ɵfac: i0.ɵɵFactoryDef<BaseMatTableMagicComponent, never>;
47
20
  static ɵcmp: i0.ɵɵComponentDefWithMeta<BaseMatTableMagicComponent, "ng-component", never, {}, {}, never, never>;
@@ -1,8 +1,5 @@
1
1
  import { CheckboxMagicDirective } from "@magic-xpa/angular";
2
2
  import * as i0 from "@angular/core";
3
- /**
4
- * Directive for material-design checkboxes not on material-design table
5
- */
6
3
  export declare class MatCheckboxDirective extends CheckboxMagicDirective {
7
4
  static ɵfac: i0.ɵɵFactoryDef<MatCheckboxDirective, never>;
8
5
  static ɵdir: i0.ɵɵDirectiveDefWithMeta<MatCheckboxDirective, " mat-checkbox[magic]:not([noFormControl]) ", never, {}, {}, never>;
@@ -1,13 +1,6 @@
1
1
  import { ComboboxMagicDirective } from "@magic-xpa/angular";
2
2
  import * as i0 from "@angular/core";
3
- /**
4
- * Directive for material-design comboboxes not on material-design table
5
- */
6
3
  export declare class MatComboboxDirective extends ComboboxMagicDirective {
7
- /**
8
- * Handles the "selectionChange" event - pass it to the "change" event handler
9
- * @param $event
10
- */
11
4
  onChange($event: any): void;
12
5
  onOpenedChanged($event: any): void;
13
6
  static ɵfac: i0.ɵɵFactoryDef<MatComboboxDirective, never>;
@@ -1,15 +1,8 @@
1
1
  import { MagicDirective } from "@magic-xpa/angular";
2
2
  import * as i0 from "@angular/core";
3
- /**
4
- * Directive for material-design listboxes not on material-design table
5
- */
6
3
  export declare class MatListboxDirective {
7
4
  protected magicDirective: MagicDirective;
8
5
  constructor(magicDirective: MagicDirective);
9
- /**
10
- * Handles the "selectionChange" event - pass it to the "change" event handler
11
- * @param $event
12
- */
13
6
  onChange($event: any): void;
14
7
  static ɵfac: i0.ɵɵFactoryDef<MatListboxDirective, never>;
15
8
  static ɵdir: i0.ɵɵDirectiveDefWithMeta<MatListboxDirective, "mat-selection-list[magic]", never, {}, {}, never>;
@@ -1,8 +1,5 @@
1
1
  import { TableMagicService } from "@magic-xpa/angular";
2
2
  import { MgMatTableService } from "./mattable.magic.service";
3
- /**
4
- * @ignore
5
- */
6
3
  export declare const matMagicProviders: (typeof import("@magic-xpa/angular").SubformMagicService | typeof import("@magic-xpa/angular").TitleMagicService | typeof import("@magic-xpa/angular").AccessorMagicService | typeof import("@magic-xpa/angular").TaskMagicService | typeof import("@magic-xpa/angular").MagicServices | ({
7
4
  provide: typeof import("@angular/material/core").DateAdapter;
8
5
  useClass: typeof import("@magic-xpa/angular").MgDateAdapter;