@magic-xpa/angular-material-core 4.702.0-dev472.353 → 4.800.0-dev000.0

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 (27) hide show
  1. package/bundles/magic-xpa-angular-material-core.umd.js +102 -174
  2. package/bundles/magic-xpa-angular-material-core.umd.js.map +1 -1
  3. package/bundles/magic-xpa-angular-material-core.umd.min.js +1 -15
  4. package/bundles/magic-xpa-angular-material-core.umd.min.js.map +1 -1
  5. package/esm2015/index.js +2 -1
  6. package/esm2015/magic-xpa-angular-material-core.js +1 -4
  7. package/esm2015/src/angular-material.module.js +9 -10
  8. package/esm2015/src/components/base-mat-table-magic.component.js +4 -16
  9. package/esm2015/src/directives/magic/form-controls/mat-magic-autocomplete.directive.js +28 -0
  10. package/esm2015/src/directives/magic/form-controls/mat-magic-checkbox.directive.js +5 -8
  11. package/esm2015/src/directives/magic/form-controls/mat-magic-combobox.directive.js +5 -12
  12. package/esm2015/src/directives/magic/form-controls/mat-magic-listbox.directive.js +4 -11
  13. package/esm2015/src/services/mat.magic.providers.js +1 -4
  14. package/esm2015/src/services/mattable.magic.service.js +5 -94
  15. package/fesm2015/magic-xpa-angular-material-core.js +70 -169
  16. package/fesm2015/magic-xpa-angular-material-core.js.map +1 -1
  17. package/index.d.ts +1 -0
  18. package/magic-xpa-angular-material-core.d.ts +0 -3
  19. package/package.json +2 -2
  20. package/src/angular-material.module.d.ts +17 -22
  21. package/src/components/base-mat-table-magic.component.d.ts +0 -27
  22. package/src/directives/magic/form-controls/mat-magic-autocomplete.directive.d.ts +7 -0
  23. package/src/directives/magic/form-controls/mat-magic-checkbox.directive.d.ts +0 -3
  24. package/src/directives/magic/form-controls/mat-magic-combobox.directive.d.ts +0 -7
  25. package/src/directives/magic/form-controls/mat-magic-listbox.directive.d.ts +0 -7
  26. package/src/services/mat.magic.providers.d.ts +0 -3
  27. package/src/services/mattable.magic.service.d.ts +0 -99
@@ -1,8 +1,30 @@
1
1
  (function (global, factory) {
2
2
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/forms'), require('@magic-xpa/angular'), require('@angular/material/sort'), require('@angular/material/table'), require('@angular/cdk/collections'), require('@magic-xpa/engine'), require('util'), require('@angular/material/paginator'), require('@angular/material/dialog'), require('@angular/material/input'), require('@angular/material/button'), require('@angular/material/list'), require('@angular/material/checkbox'), require('@angular/material/tabs'), require('@angular/material/select'), require('@angular/material/datepicker'), require('@angular/material/core')) :
3
3
  typeof define === 'function' && define.amd ? define('@magic-xpa/angular-material-core', ['exports', '@angular/core', '@angular/common', '@angular/forms', '@magic-xpa/angular', '@angular/material/sort', '@angular/material/table', '@angular/cdk/collections', '@magic-xpa/engine', 'util', '@angular/material/paginator', '@angular/material/dialog', '@angular/material/input', '@angular/material/button', '@angular/material/list', '@angular/material/checkbox', '@angular/material/tabs', '@angular/material/select', '@angular/material/datepicker', '@angular/material/core'], factory) :
4
- (global = global || self, factory((global['magic-xpa'] = global['magic-xpa'] || {}, global['magic-xpa']['angular-material-core'] = {}), global.ng.core, global.ng.common, global.ng.forms, global.i1, global.ng.material.sort, global.ng.material.table, global.ng.cdk.collections, global.engine, global.util, global.ng.material.paginator, global.ng.material.dialog, global.ng.material.input, global.ng.material.button, global.ng.material.list, global.ng.material.checkbox, global.ng.material.tabs, global.ng.material.select, global.ng.material.datepicker, global.ng.material.core));
5
- }(this, (function (exports, i0, common, forms, i1, sort, table, collections, engine, util, paginator, i1$1, input, button, list, checkbox, tabs, select, datepicker, core) { 'use strict';
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["magic-xpa"] = global["magic-xpa"] || {}, global["magic-xpa"]["angular-material-core"] = {}), global.ng.core, global.ng.common, global.ng.forms, global.i1, global.ng.material.sort, global.ng.material.table, global.ng.cdk.collections, global.engine, global.util, global.ng.material.paginator, global.ng.material.dialog, global.ng.material.input, global.ng.material.button, global.ng.material.list, global.ng.material.checkbox, global.ng.material.tabs, global.ng.material.select, global.ng.material.datepicker, global.ng.material.core));
5
+ })(this, (function (exports, i0, common, forms, i1, sort, table, collections, engine, util, paginator, i1$1, input, button, list, checkbox, tabs, select, datepicker, core) { 'use strict';
6
+
7
+ function _interopNamespace(e) {
8
+ if (e && e.__esModule) return e;
9
+ var n = Object.create(null);
10
+ if (e) {
11
+ Object.keys(e).forEach(function (k) {
12
+ if (k !== 'default') {
13
+ var d = Object.getOwnPropertyDescriptor(e, k);
14
+ Object.defineProperty(n, k, d.get ? d : {
15
+ enumerable: true,
16
+ get: function () { return e[k]; }
17
+ });
18
+ }
19
+ });
20
+ }
21
+ n["default"] = e;
22
+ return Object.freeze(n);
23
+ }
24
+
25
+ var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
26
+ var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
27
+ var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
6
28
 
7
29
  /*! *****************************************************************************
8
30
  Copyright (c) Microsoft Corporation.
@@ -296,9 +318,6 @@
296
318
  return value;
297
319
  }
298
320
 
299
- /**
300
- * Directive for material-design checkboxes not on material-design table
301
- */
302
321
  var MatCheckboxDirective = /** @class */ (function (_super) {
303
322
  __extends(MatCheckboxDirective, _super);
304
323
  function MatCheckboxDirective() {
@@ -306,11 +325,11 @@
306
325
  }
307
326
  return MatCheckboxDirective;
308
327
  }(i1.CheckboxMagicDirective));
309
- /** @nocollapse */ MatCheckboxDirective.ɵfac = function MatCheckboxDirective_Factory(t) { return ɵMatCheckboxDirective_BaseFactory(t || MatCheckboxDirective); };
310
- /** @nocollapse */ MatCheckboxDirective.ɵdir = i0.ɵɵdefineDirective({ type: MatCheckboxDirective, selectors: [["mat-checkbox", "magic", "", 3, "noFormControl", ""]], features: [i0.ɵɵInheritDefinitionFeature] });
311
- var ɵMatCheckboxDirective_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(MatCheckboxDirective);
312
- /*@__PURE__*/ (function () {
313
- i0.ɵsetClassMetadata(MatCheckboxDirective, [{
328
+ MatCheckboxDirective.ɵfac = function MatCheckboxDirective_Factory(t) { return ɵMatCheckboxDirective_BaseFactory(t || MatCheckboxDirective); };
329
+ MatCheckboxDirective.ɵdir = i0__namespace.ɵɵdefineDirective({ type: MatCheckboxDirective, selectors: [["mat-checkbox", "magic", "", 3, "noFormControl", ""]], features: [i0__namespace.ɵɵInheritDefinitionFeature] });
330
+ var ɵMatCheckboxDirective_BaseFactory = i0__namespace.ɵɵgetInheritedFactory(MatCheckboxDirective);
331
+ (function () {
332
+ i0__namespace.ɵsetClassMetadata(MatCheckboxDirective, [{
314
333
  type: i0.Directive,
315
334
  args: [{
316
335
  selector: "\n mat-checkbox[magic]:not([noFormControl])\n ",
@@ -318,18 +337,11 @@
318
337
  }], null, null);
319
338
  })();
320
339
 
321
- /**
322
- * Directive for material-design comboboxes not on material-design table
323
- */
324
340
  var MatComboboxDirective = /** @class */ (function (_super) {
325
341
  __extends(MatComboboxDirective, _super);
326
342
  function MatComboboxDirective() {
327
343
  return _super !== null && _super.apply(this, arguments) || this;
328
344
  }
329
- /**
330
- * Handles the "selectionChange" event - pass it to the "change" event handler
331
- * @param $event
332
- */
333
345
  MatComboboxDirective.prototype.onChange = function ($event) {
334
346
  _super.prototype.onChange.call(this, $event);
335
347
  };
@@ -338,15 +350,15 @@
338
350
  };
339
351
  return MatComboboxDirective;
340
352
  }(i1.ComboboxMagicDirective));
341
- /** @nocollapse */ MatComboboxDirective.ɵfac = function MatComboboxDirective_Factory(t) { return ɵMatComboboxDirective_BaseFactory(t || MatComboboxDirective); };
342
- /** @nocollapse */ MatComboboxDirective.ɵdir = i0.ɵɵdefineDirective({ type: MatComboboxDirective, selectors: [["mat-select", "magic", ""]], hostBindings: function MatComboboxDirective_HostBindings(rf, ctx) {
353
+ MatComboboxDirective.ɵfac = function MatComboboxDirective_Factory(t) { return ɵMatComboboxDirective_BaseFactory(t || MatComboboxDirective); };
354
+ MatComboboxDirective.ɵdir = i0__namespace.ɵɵdefineDirective({ type: MatComboboxDirective, selectors: [["mat-select", "magic", ""]], hostBindings: function MatComboboxDirective_HostBindings(rf, ctx) {
343
355
  if (rf & 1) {
344
- i0.ɵɵlistener("selectionChange", function MatComboboxDirective_selectionChange_HostBindingHandler($event) { return ctx.onChange($event); })("openedChange", function MatComboboxDirective_openedChange_HostBindingHandler($event) { return ctx.onOpenedChanged($event); });
356
+ i0__namespace.ɵɵlistener("selectionChange", function MatComboboxDirective_selectionChange_HostBindingHandler($event) { return ctx.onChange($event); })("openedChange", function MatComboboxDirective_openedChange_HostBindingHandler($event) { return ctx.onOpenedChanged($event); });
345
357
  }
346
- }, features: [i0.ɵɵInheritDefinitionFeature] });
347
- var ɵMatComboboxDirective_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(MatComboboxDirective);
348
- /*@__PURE__*/ (function () {
349
- i0.ɵsetClassMetadata(MatComboboxDirective, [{
358
+ }, features: [i0__namespace.ɵɵInheritDefinitionFeature] });
359
+ var ɵMatComboboxDirective_BaseFactory = i0__namespace.ɵɵgetInheritedFactory(MatComboboxDirective);
360
+ (function () {
361
+ i0__namespace.ɵsetClassMetadata(MatComboboxDirective, [{
350
362
  type: i0.Directive,
351
363
  args: [{
352
364
  selector: "mat-select[magic]",
@@ -360,14 +372,8 @@
360
372
  }] });
361
373
  })();
362
374
 
363
- /**
364
- * Extends the Magic table service to supply functionality for Material Design tables
365
- */
366
375
  var MgMatTableService = /** @class */ (function (_super) {
367
376
  __extends(MgMatTableService, _super);
368
- /**
369
- * @ignore
370
- */
371
377
  function MgMatTableService(componentList, task) {
372
378
  var _this = _super.call(this, componentList, task) || this;
373
379
  _this.componentList = componentList;
@@ -375,15 +381,9 @@
375
381
  return _this;
376
382
  }
377
383
  Object.defineProperty(MgMatTableService.prototype, "DataSource", {
378
- /**
379
- * @ignore
380
- */
381
384
  get: function () {
382
385
  return this.dataSource;
383
386
  },
384
- /**
385
- * @ignore
386
- */
387
387
  set: function (dataSource) {
388
388
  this.dataSource = dataSource;
389
389
  },
@@ -391,15 +391,9 @@
391
391
  configurable: true
392
392
  });
393
393
  Object.defineProperty(MgMatTableService.prototype, "Selection", {
394
- /**
395
- * @ignore
396
- */
397
394
  get: function () {
398
395
  return this.selection;
399
396
  },
400
- /**
401
- * @ignore
402
- */
403
397
  set: function (selection) {
404
398
  this.selection = selection;
405
399
  },
@@ -407,86 +401,47 @@
407
401
  configurable: true
408
402
  });
409
403
  Object.defineProperty(MgMatTableService.prototype, "Paginator", {
410
- /**
411
- * @ignore
412
- */
413
404
  get: function () {
414
405
  return this.paginator;
415
406
  },
416
- /**
417
- * @ignore
418
- */
419
407
  set: function (paginator) {
420
408
  this.paginator = paginator;
421
409
  },
422
410
  enumerable: false,
423
411
  configurable: true
424
412
  });
425
- /**
426
- * Connects the service to the elements of the table component
427
- * @param dataSource Table data source
428
- * @param paginator Table paginator
429
- * @param selection table SelectionModel
430
- * @param dialog Dialog used for editing values
431
- */
432
413
  MgMatTableService.prototype.connect = function (dataSource, paginator, selection, dialog) {
433
414
  this.dataSource = dataSource;
434
415
  this.paginator = paginator;
435
416
  this.selection = selection;
436
417
  this.dialog = dialog;
437
418
  };
438
- /**
439
- * @ignore
440
- */
441
419
  MgMatTableService.prototype.refreshDataSource = function () {
442
420
  if (!util.isNullOrUndefined(this.paginator))
443
421
  this.dataSource.paginator = this.paginator;
444
422
  this.dataSource.data = (this.task.mgAccessorService.isDataviewEmpty() ? [] : this.task.Records.list);
445
423
  };
446
- /**
447
- * returns the page size of the table
448
- * @returns
449
- */
450
424
  MgMatTableService.prototype.getPageSize = function () {
451
425
  if (util.isNullOrUndefined(this.paginator))
452
426
  return _super.prototype.getPageSize.call(this);
453
427
  return this.paginator.pageSize;
454
428
  };
455
- /**
456
- * Selects a table row
457
- * @param guiRowid Id of row to be selected
458
- */
459
429
  MgMatTableService.prototype.selectRow = function (guiRowid) {
460
430
  _super.prototype.selectRow.call(this, guiRowid);
461
431
  this.selection.select(this.task.Records.list[guiRowid]);
462
432
  this.refreshDataSource();
463
433
  };
464
- /**
465
- * @ignore
466
- */
467
434
  MgMatTableService.prototype.getDialog = function () {
468
435
  return this.dialog;
469
436
  };
470
- /**
471
- * Displays the requested table page
472
- * @param pageId Id of page to be selected
473
- */
474
437
  MgMatTableService.prototype.selectPage = function (pageId) {
475
438
  if (!util.isNullOrUndefined(this.paginator))
476
439
  this.paginator.pageIndex = pageId;
477
440
  this.refreshDataSource();
478
441
  };
479
- /**
480
- * Returns the currently seleted row
481
- * @returns
482
- */
483
442
  MgMatTableService.prototype.selectedRow = function () {
484
443
  return this.selection.selected[0];
485
444
  };
486
- /**
487
- * Handle the paginator's "page" event
488
- * @param e The event received from the UI
489
- */
490
445
  MgMatTableService.prototype.mgOnPaginateChange = function (e) {
491
446
  if (this.task.oldPageSize != e.pageSize) {
492
447
  this.handleResize(e.pageIndex, e.previousPageIndex, e.pageSize);
@@ -495,32 +450,16 @@
495
450
  else
496
451
  this.getRowsIfNeeded(e.pageIndex, e.previousPageIndex, e.pageSize);
497
452
  };
498
- /**
499
- * Handle resize and set table top index.
500
- * @param pageIndex : New page index.
501
- * @param prevPageIndex : Prev page index
502
- * @param pageSize : PageSize
503
- */
504
453
  MgMatTableService.prototype.handleResize = function (pageIndex, prevPageIndex, pageSize) {
505
454
  var requiredGuiRowId = pageIndex * pageSize;
506
455
  this.task.resize(pageSize, requiredGuiRowId);
507
456
  };
508
- /**
509
- * Execute getRows to fetch required chunk of records.
510
- * @param pageIndex : New page index.
511
- * @param prevPageIndex : Prev page index
512
- * @param pageSize : PageSize
513
- */
514
457
  MgMatTableService.prototype.getRowsIfNeeded = function (pageIndex, prevPageIndex, pageSize) {
515
458
  var guiEvent = engine.getGuiEventObj("getRows", "table", 0);
516
459
  guiEvent.Line = pageIndex * pageSize;
517
460
  this.task.insertEvent(guiEvent);
518
461
  this.setTableTopIndex(this.task.getDvRowId(pageSize * pageIndex));
519
462
  };
520
- /**
521
- * Handles the "matSortChange" event
522
- * @param e The event received from the UI
523
- */
524
463
  MgMatTableService.prototype.sortData = function (e) {
525
464
  var direction = 0;
526
465
  if (e.direction === 'asc')
@@ -530,13 +469,8 @@
530
469
  var guiEvent = engine.getGuiEventObj("columnSort", e.active, direction);
531
470
  this.task.insertEvent(guiEvent);
532
471
  };
533
- /**
534
- * Change the number of lines in a table
535
- * @param size New number of lines in table
536
- */
537
472
  MgMatTableService.prototype.updateTableSize = function (size) {
538
- if (size === 0) // never remove row 0 for now
539
- {
473
+ if (size === 0) {
540
474
  size = 1;
541
475
  this.task.Records.clearFirstTableRecord(this.task.template);
542
476
  }
@@ -546,57 +480,37 @@
546
480
  this.task.Records.updateSize(size);
547
481
  this.task.setIncludesFirst(false);
548
482
  };
549
- /**
550
- * Handle the selection of row and if needed move to respective page.
551
- * @param guiRowId New number of lines in table
552
- */
553
483
  MgMatTableService.prototype.selectPageForGuiRowId = function (guiRowId) {
554
484
  var pageToBeSelected = 0;
555
485
  var prevSelectedRow = this.selectedRow();
556
486
  pageToBeSelected = Math.floor(guiRowId / this.getPageSize());
557
- // Explicitly handle selection of page when it's not raised by using pagination
558
487
  if ((util.isNullOrUndefined(prevSelectedRow) || (!util.isNullOrUndefined(this.paginator) && pageToBeSelected != this.paginator.pageIndex)))
559
488
  this.selectPage(pageToBeSelected);
560
489
  };
561
- /**
562
- * @ignore
563
- */
564
490
  MgMatTableService.prototype.setTableTopIndex = function (value) {
565
491
  this.task.Records.setGuiTopIndex(value);
566
492
  if (value >= 0)
567
493
  this.selectPageForGuiRowId(this.task.getGuiRowId(value, true));
568
494
  };
569
- /**
570
- * @ignore
571
- */
572
495
  MgMatTableService.prototype.getTableTopIndex = function () {
573
496
  return this.task.Records.getGuiTopIndex();
574
497
  };
575
498
  return MgMatTableService;
576
499
  }(i1.TableMagicService));
577
- /** @nocollapse */ MgMatTableService.ɵfac = function MgMatTableService_Factory(t) { return new (t || MgMatTableService)(i0.ɵɵinject(i1.ComponentListMagicService), i0.ɵɵinject(i1.TaskMagicService)); };
578
- /** @nocollapse */ MgMatTableService.ɵprov = i0.ɵɵdefineInjectable({ token: MgMatTableService, factory: MgMatTableService.ɵfac });
579
- /*@__PURE__*/ (function () {
580
- i0.ɵsetClassMetadata(MgMatTableService, [{
500
+ MgMatTableService.ɵfac = function MgMatTableService_Factory(t) { return new (t || MgMatTableService)(i0__namespace.ɵɵinject(i1__namespace.ComponentListMagicService), i0__namespace.ɵɵinject(i1__namespace.TaskMagicService)); };
501
+ MgMatTableService.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: MgMatTableService, factory: MgMatTableService.ɵfac });
502
+ (function () {
503
+ i0__namespace.ɵsetClassMetadata(MgMatTableService, [{
581
504
  type: i0.Injectable
582
- }], function () { return [{ type: i1.ComponentListMagicService }, { type: i1.TaskMagicService }]; }, null);
505
+ }], function () { return [{ type: i1__namespace.ComponentListMagicService }, { type: i1__namespace.TaskMagicService }]; }, null);
583
506
  })();
584
507
 
585
- /**
586
- * @ignore
587
- */
588
508
  var matMagicProviders = __spread(i1.basicMagicProviders, [
589
509
  { provide: i1.TableMagicService, useClass: MgMatTableService }
590
510
  ]);
591
511
 
592
- /**
593
- * This component is the base component for forms which has a material-design table (grid)
594
- */
595
512
  var BaseMatTableMagicComponent = /** @class */ (function (_super) {
596
513
  __extends(BaseMatTableMagicComponent, _super);
597
- /**
598
- * @ignore
599
- */
600
514
  function BaseMatTableMagicComponent(dialog, ref, magicService) {
601
515
  var _this = _super.call(this, ref, magicService) || this;
602
516
  _this.dialog = dialog;
@@ -607,16 +521,10 @@
607
521
  _this.selection = new collections.SelectionModel(false, []);
608
522
  return _this;
609
523
  }
610
- /**
611
- * Initializer
612
- */
613
524
  BaseMatTableMagicComponent.prototype.ngOnInit = function () {
614
525
  _super.prototype.ngOnInit.call(this);
615
526
  this.magicService.tableService.connect(this.dataSource, this.paginator, this.selection, this.dialog);
616
527
  };
617
- /**
618
- * AfterContentChecked implementation
619
- */
620
528
  BaseMatTableMagicComponent.prototype.ngAfterContentChecked = function () {
621
529
  if (!util.isNullOrUndefined(this.paginator) && !util.isNullOrUndefined(this.paginator.pageSize) &&
622
530
  this.paginator.pageSize != this.task.oldPageSize) {
@@ -626,26 +534,26 @@
626
534
  };
627
535
  return BaseMatTableMagicComponent;
628
536
  }(i1.TaskBaseMagicComponent));
629
- /** @nocollapse */ BaseMatTableMagicComponent.ɵfac = function BaseMatTableMagicComponent_Factory(t) { return new (t || BaseMatTableMagicComponent)(i0.ɵɵdirectiveInject(i1$1.MatDialog), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i1.MagicServices)); };
630
- /** @nocollapse */ BaseMatTableMagicComponent.ɵcmp = i0.ɵɵdefineComponent({ type: BaseMatTableMagicComponent, selectors: [["ng-component"]], viewQuery: function BaseMatTableMagicComponent_Query(rf, ctx) {
537
+ BaseMatTableMagicComponent.ɵfac = function BaseMatTableMagicComponent_Factory(t) { return new (t || BaseMatTableMagicComponent)(i0__namespace.ɵɵdirectiveInject(i1__namespace$1.MatDialog), i0__namespace.ɵɵdirectiveInject(i0__namespace.ChangeDetectorRef), i0__namespace.ɵɵdirectiveInject(i1__namespace.MagicServices)); };
538
+ BaseMatTableMagicComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: BaseMatTableMagicComponent, selectors: [["ng-component"]], viewQuery: function BaseMatTableMagicComponent_Query(rf, ctx) {
631
539
  if (rf & 1) {
632
- i0.ɵɵstaticViewQuery(paginator.MatPaginator, true);
633
- i0.ɵɵstaticViewQuery(sort.MatSort, true);
540
+ i0__namespace.ɵɵstaticViewQuery(paginator.MatPaginator, true);
541
+ i0__namespace.ɵɵstaticViewQuery(sort.MatSort, true);
634
542
  }
635
543
  if (rf & 2) {
636
544
  var _t;
637
- i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.paginator = _t.first);
638
- i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.sort = _t.first);
545
+ i0__namespace.ɵɵqueryRefresh(_t = i0__namespace.ɵɵloadQuery()) && (ctx.paginator = _t.first);
546
+ i0__namespace.ɵɵqueryRefresh(_t = i0__namespace.ɵɵloadQuery()) && (ctx.sort = _t.first);
639
547
  }
640
- }, features: [i0.ɵɵProvidersFeature(matMagicProviders), i0.ɵɵInheritDefinitionFeature], decls: 0, vars: 0, template: function BaseMatTableMagicComponent_Template(rf, ctx) { }, encapsulation: 2 });
641
- /*@__PURE__*/ (function () {
642
- i0.ɵsetClassMetadata(BaseMatTableMagicComponent, [{
548
+ }, features: [i0__namespace.ɵɵProvidersFeature(matMagicProviders), i0__namespace.ɵɵInheritDefinitionFeature], decls: 0, vars: 0, template: function BaseMatTableMagicComponent_Template(rf, ctx) { }, encapsulation: 2 });
549
+ (function () {
550
+ i0__namespace.ɵsetClassMetadata(BaseMatTableMagicComponent, [{
643
551
  type: i0.Component,
644
552
  args: [{
645
553
  providers: matMagicProviders,
646
554
  template: ''
647
555
  }]
648
- }], function () { return [{ type: i1$1.MatDialog }, { type: i0.ChangeDetectorRef }, { type: i1.MagicServices }]; }, { paginator: [{
556
+ }], function () { return [{ type: i1__namespace$1.MatDialog }, { type: i0__namespace.ChangeDetectorRef }, { type: i1__namespace.MagicServices }]; }, { paginator: [{
649
557
  type: i0.ViewChild,
650
558
  args: [paginator.MatPaginator, { static: true }]
651
559
  }], sort: [{
@@ -654,43 +562,65 @@
654
562
  }] });
655
563
  })();
656
564
 
657
- /**
658
- * Directive for material-design listboxes not on material-design table
659
- */
660
565
  var MatListboxDirective = /** @class */ (function () {
661
566
  function MatListboxDirective(magicDirective) {
662
567
  this.magicDirective = magicDirective;
663
568
  }
664
- /**
665
- * Handles the "selectionChange" event - pass it to the "change" event handler
666
- * @param $event
667
- */
668
569
  MatListboxDirective.prototype.onChange = function ($event) {
669
570
  this.magicDirective.task.onListBoxSelectionChanged($event, this.magicDirective.id);
670
571
  };
671
572
  return MatListboxDirective;
672
573
  }());
673
- /** @nocollapse */ MatListboxDirective.ɵfac = function MatListboxDirective_Factory(t) { return new (t || MatListboxDirective)(i0.ɵɵdirectiveInject(i1.MagicDirective)); };
674
- /** @nocollapse */ MatListboxDirective.ɵdir = i0.ɵɵdefineDirective({ type: MatListboxDirective, selectors: [["mat-selection-list", "magic", ""]], hostBindings: function MatListboxDirective_HostBindings(rf, ctx) {
574
+ MatListboxDirective.ɵfac = function MatListboxDirective_Factory(t) { return new (t || MatListboxDirective)(i0__namespace.ɵɵdirectiveInject(i1__namespace.MagicDirective)); };
575
+ MatListboxDirective.ɵdir = i0__namespace.ɵɵdefineDirective({ type: MatListboxDirective, selectors: [["mat-selection-list", "magic", ""]], hostBindings: function MatListboxDirective_HostBindings(rf, ctx) {
675
576
  if (rf & 1) {
676
- i0.ɵɵlistener("selectionChange", function MatListboxDirective_selectionChange_HostBindingHandler($event) { return ctx.onChange($event); });
577
+ i0__namespace.ɵɵlistener("selectionChange", function MatListboxDirective_selectionChange_HostBindingHandler($event) { return ctx.onChange($event); });
677
578
  }
678
579
  } });
679
- /*@__PURE__*/ (function () {
680
- i0.ɵsetClassMetadata(MatListboxDirective, [{
580
+ (function () {
581
+ i0__namespace.ɵsetClassMetadata(MatListboxDirective, [{
681
582
  type: i0.Directive,
682
583
  args: [{
683
584
  selector: "mat-selection-list[magic]",
684
585
  }]
685
- }], function () { return [{ type: i1.MagicDirective }]; }, { onChange: [{
586
+ }], function () { return [{ type: i1__namespace.MagicDirective }]; }, { onChange: [{
686
587
  type: i0.HostListener,
687
588
  args: ['selectionChange', ['$event']]
688
589
  }] });
689
590
  })();
690
591
 
691
- /**
692
- * @ignore
693
- */
592
+ var MatMagicAutocompleteDirective = /** @class */ (function () {
593
+ function MatMagicAutocompleteDirective() {
594
+ }
595
+ MatMagicAutocompleteDirective.prototype.onOpenedChanged = function ($event) {
596
+ i1.MagicDirective.noOfAutoCompleteBoxesOpened++;
597
+ };
598
+ MatMagicAutocompleteDirective.prototype.onClosedChanged = function ($event) {
599
+ i1.MagicDirective.noOfAutoCompleteBoxesOpened--;
600
+ };
601
+ return MatMagicAutocompleteDirective;
602
+ }());
603
+ MatMagicAutocompleteDirective.ɵfac = function MatMagicAutocompleteDirective_Factory(t) { return new (t || MatMagicAutocompleteDirective)(); };
604
+ MatMagicAutocompleteDirective.ɵdir = i0__namespace.ɵɵdefineDirective({ type: MatMagicAutocompleteDirective, selectors: [["mat-autocomplete", "magic", ""]], hostBindings: function MatMagicAutocompleteDirective_HostBindings(rf, ctx) {
605
+ if (rf & 1) {
606
+ i0__namespace.ɵɵlistener("opened", function MatMagicAutocompleteDirective_opened_HostBindingHandler($event) { return ctx.onOpenedChanged($event); })("closed", function MatMagicAutocompleteDirective_closed_HostBindingHandler($event) { return ctx.onClosedChanged($event); });
607
+ }
608
+ } });
609
+ (function () {
610
+ i0__namespace.ɵsetClassMetadata(MatMagicAutocompleteDirective, [{
611
+ type: i0.Directive,
612
+ args: [{
613
+ selector: 'mat-autocomplete[magic]'
614
+ }]
615
+ }], null, { onOpenedChanged: [{
616
+ type: i0.HostListener,
617
+ args: ['opened', ['$event']]
618
+ }], onClosedChanged: [{
619
+ type: i0.HostListener,
620
+ args: ['closed', ['$event']]
621
+ }] });
622
+ })();
623
+
694
624
  var materialModules = [
695
625
  table.MatTableModule,
696
626
  paginator.MatPaginatorModule,
@@ -704,26 +634,24 @@
704
634
  core.MatNativeDateModule,
705
635
  i1$1.MatDialogModule
706
636
  ];
707
- /**
708
- * @ignore
709
- */
710
637
  var MagicAngularMaterialModule = /** @class */ (function () {
711
638
  function MagicAngularMaterialModule(componentList, matdialog) {
712
639
  componentList.dialogs.set('MatDialog', matdialog);
713
640
  }
714
641
  return MagicAngularMaterialModule;
715
642
  }());
716
- /** @nocollapse */ MagicAngularMaterialModule.ɵmod = i0.ɵɵdefineNgModule({ type: MagicAngularMaterialModule });
717
- /** @nocollapse */ MagicAngularMaterialModule.ɵinj = i0.ɵɵdefineInjector({ factory: function MagicAngularMaterialModule_Factory(t) { return new (t || MagicAngularMaterialModule)(i0.ɵɵinject(i1.ComponentListMagicService), i0.ɵɵinject(i1$1.MatDialog)); }, imports: [__spread([
643
+ MagicAngularMaterialModule.ɵmod = i0__namespace.ɵɵdefineNgModule({ type: MagicAngularMaterialModule });
644
+ MagicAngularMaterialModule.ɵinj = i0__namespace.ɵɵdefineInjector({ factory: function MagicAngularMaterialModule_Factory(t) { return new (t || MagicAngularMaterialModule)(i0__namespace.ɵɵinject(i1__namespace.ComponentListMagicService), i0__namespace.ɵɵinject(i1__namespace$1.MatDialog)); }, imports: [__spread([
718
645
  common.CommonModule,
719
646
  forms.FormsModule
720
647
  ], materialModules, [
721
648
  i1.MagicModule
722
649
  ])] });
723
650
  (function () {
724
- (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MagicAngularMaterialModule, { declarations: [MatCheckboxDirective,
651
+ (typeof ngJitMode === "undefined" || ngJitMode) && i0__namespace.ɵɵsetNgModuleScope(MagicAngularMaterialModule, { declarations: [MatCheckboxDirective,
725
652
  MatComboboxDirective,
726
653
  MatListboxDirective,
654
+ MatMagicAutocompleteDirective,
727
655
  BaseMatTableMagicComponent], imports: [common.CommonModule,
728
656
  forms.FormsModule, table.MatTableModule,
729
657
  paginator.MatPaginatorModule,
@@ -738,22 +666,25 @@
738
666
  i1$1.MatDialogModule, i1.MagicModule], exports: [MatCheckboxDirective,
739
667
  MatComboboxDirective,
740
668
  MatListboxDirective,
669
+ MatMagicAutocompleteDirective,
741
670
  BaseMatTableMagicComponent] });
742
671
  })();
743
- /*@__PURE__*/ (function () {
744
- i0.ɵsetClassMetadata(MagicAngularMaterialModule, [{
672
+ (function () {
673
+ i0__namespace.ɵsetClassMetadata(MagicAngularMaterialModule, [{
745
674
  type: i0.NgModule,
746
675
  args: [{
747
676
  declarations: [
748
677
  MatCheckboxDirective,
749
678
  MatComboboxDirective,
750
679
  MatListboxDirective,
680
+ MatMagicAutocompleteDirective,
751
681
  BaseMatTableMagicComponent,
752
682
  ],
753
683
  exports: [
754
684
  MatCheckboxDirective,
755
685
  MatComboboxDirective,
756
686
  MatListboxDirective,
687
+ MatMagicAutocompleteDirective,
757
688
  BaseMatTableMagicComponent
758
689
  ],
759
690
  imports: __spread([
@@ -763,23 +694,20 @@
763
694
  i1.MagicModule
764
695
  ])
765
696
  }]
766
- }], function () { return [{ type: i1.ComponentListMagicService }, { type: i1$1.MatDialog }]; }, null);
697
+ }], function () { return [{ type: i1__namespace.ComponentListMagicService }, { type: i1__namespace$1.MatDialog }]; }, null);
767
698
  })();
768
699
 
769
- /**
770
- * Generated bundle index. Do not edit.
771
- */
772
-
773
700
  exports.BaseMatTableMagicComponent = BaseMatTableMagicComponent;
774
701
  exports.MagicAngularMaterialModule = MagicAngularMaterialModule;
775
702
  exports.MatCheckboxDirective = MatCheckboxDirective;
776
703
  exports.MatComboboxDirective = MatComboboxDirective;
777
704
  exports.MatListboxDirective = MatListboxDirective;
705
+ exports.MatMagicAutocompleteDirective = MatMagicAutocompleteDirective;
778
706
  exports.MgMatTableService = MgMatTableService;
779
707
  exports.matMagicProviders = matMagicProviders;
780
708
  exports.materialModules = materialModules;
781
709
 
782
710
  Object.defineProperty(exports, '__esModule', { value: true });
783
711
 
784
- })));
712
+ }));
785
713
  //# sourceMappingURL=magic-xpa-angular-material-core.umd.js.map