@sumaris-net/ngx-components 0.26.2 → 0.26.3

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.
@@ -7760,6 +7760,89 @@
7760
7760
  },] }
7761
7761
  ];
7762
7762
 
7763
+ var MatBadgeIconDirective = /** @class */ (function () {
7764
+ function MatBadgeIconDirective(el) {
7765
+ this.el = el;
7766
+ }
7767
+ MatBadgeIconDirective.prototype.ngOnInit = function () {
7768
+ this.size = this.size || 'medium';
7769
+ this.color = this.color || 'primary';
7770
+ if (this.color === 'warn')
7771
+ this.color = 'warning';
7772
+ var fontSize;
7773
+ switch (this.size) {
7774
+ case 'large':
7775
+ fontSize = '24px';
7776
+ break;
7777
+ case 'medium':
7778
+ fontSize = '22px';
7779
+ break;
7780
+ case 'small':
7781
+ fontSize = '16px';
7782
+ break;
7783
+ }
7784
+ var badge = this.el.nativeElement.querySelector('.mat-badge-content');
7785
+ badge.style.display = 'flex';
7786
+ badge.style.alignItems = 'center';
7787
+ badge.style.justifyContent = 'center';
7788
+ if (this.color !== 'accent') {
7789
+ if (this.fill !== 'clear') {
7790
+ badge.style.background = "var(--ion-color-" + this.color + ")";
7791
+ badge.style.color = "var(--ion-color-" + this.color + "-contrast)";
7792
+ }
7793
+ else {
7794
+ badge.style.color = "var(--ion-color-" + this.color + ")";
7795
+ badge.style.background = 'transparent';
7796
+ }
7797
+ }
7798
+ if (this.matIcon) {
7799
+ badge.innerHTML = "<i class=\"material-icons\" style=\"font-size: " + fontSize + ";\">" + this.matIcon + "</i>";
7800
+ }
7801
+ else if (this.ionIcon) {
7802
+ badge.innerHTML = "<ion-icon style=\"font-size: " + fontSize + ";\" name=\"" + this.ionIcon + "\"></ion-icon>";
7803
+ }
7804
+ };
7805
+ return MatBadgeIconDirective;
7806
+ }());
7807
+ MatBadgeIconDirective.decorators = [
7808
+ { type: i0.Directive, args: [{
7809
+ selector: '[matBadgeIcon], [ionBadgeIcon]',
7810
+ inputs: [
7811
+ 'size: matBadgeSize',
7812
+ 'color: matBadgeColor',
7813
+ 'fill: matBadgeFill',
7814
+ ]
7815
+ },] }
7816
+ ];
7817
+ MatBadgeIconDirective.ctorParameters = function () { return [
7818
+ { type: i0.ElementRef }
7819
+ ]; };
7820
+ MatBadgeIconDirective.propDecorators = {
7821
+ matIcon: [{ type: i0.Input, args: ['matBadgeIcon',] }],
7822
+ ionIcon: [{ type: i0.Input, args: ['ionBadgeIcon',] }]
7823
+ };
7824
+
7825
+ var SharedMatBadgeIconModule = /** @class */ (function () {
7826
+ function SharedMatBadgeIconModule() {
7827
+ }
7828
+ return SharedMatBadgeIconModule;
7829
+ }());
7830
+ SharedMatBadgeIconModule.decorators = [
7831
+ { type: i0.NgModule, args: [{
7832
+ imports: [
7833
+ i1$4.CommonModule,
7834
+ i1$5.IonicModule,
7835
+ badge.MatBadgeModule,
7836
+ ],
7837
+ exports: [
7838
+ MatBadgeIconDirective
7839
+ ],
7840
+ declarations: [
7841
+ MatBadgeIconDirective
7842
+ ]
7843
+ },] }
7844
+ ];
7845
+
7763
7846
  var modules = [
7764
7847
  // Angular material components
7765
7848
  i1$3.MatCommonModule,
@@ -7801,7 +7884,8 @@
7801
7884
  SharedMatBooleanModule,
7802
7885
  SharedMatNumpadModule,
7803
7886
  SharedMatSwipeModule,
7804
- MaterialChipsModule
7887
+ MaterialChipsModule,
7888
+ SharedMatBadgeIconModule
7805
7889
  ];
7806
7890
  var SharedMaterialModule = /** @class */ (function () {
7807
7891
  function SharedMaterialModule() {
@@ -18462,7 +18546,7 @@
18462
18546
  MaterialTestingPage.decorators = [
18463
18547
  { type: i0.Component, args: [{
18464
18548
  selector: 'app-material-testing',
18465
- template: "\n<ion-header>\n <ion-toolbar color=\"primary\">\n\n <ion-buttons slot=\"start\">\n <ion-back-button></ion-back-button>\n </ion-buttons>\n\n <ion-title>Material components</ion-title>\n </ion-toolbar>\n</ion-header>\n\n<ion-content>\n\n <ion-list>\n\n <ion-item-divider>Shared Material components</ion-item-divider>\n\n <ion-item tappable class=\"text-1x\" (click)=\"openPage('./datetime')\">\n Date/Time field\n </ion-item>\n <ion-item tappable class=\"text-1x\" (click)=\"openPage('./autocomplete')\">\n Autocomplete field\n </ion-item>\n <ion-item tappable class=\"text-1x\" (click)=\"openPage('./latlong')\">\n Lat/Long field\n </ion-item>\n<!-- <ion-item tappable class=\"text-1x\" (click)=\"openPage('./numpad')\">-->\n<!-- Numeric pad component-->\n<!-- </ion-item>-->\n <ion-item tappable class=\"text-1x\" (click)=\"openPage('./swipe')\">\n Swipe component\n </ion-item>\n <ion-item tappable class=\"text-1x\" (click)=\"openPage('./chips')\">\n Chips component\n </ion-item>\n\n <ng-container *ngIf=\"pages && pages.length\">\n <ion-item-divider>Other components</ion-item-divider>\n\n <ion-item *ngFor=\"let item of pages\"\n tappable class=\"text-1x\"\n (click)=\"openPage(item.page)\">{{item.label}}</ion-item>\n\n </ng-container>\n </ion-list>\n\n</ion-content>\n"
18549
+ template: "\n<ion-header>\n <ion-toolbar color=\"primary\">\n\n <ion-buttons slot=\"start\">\n <ion-back-button></ion-back-button>\n </ion-buttons>\n\n <ion-title>Material components</ion-title>\n </ion-toolbar>\n</ion-header>\n\n<ion-content>\n\n <ion-list>\n\n <ion-item-divider>Shared Material components</ion-item-divider>\n\n <ion-item tappable class=\"text-1x\" (click)=\"openPage('./datetime')\">\n Date/Time field\n </ion-item>\n <ion-item tappable class=\"text-1x\" (click)=\"openPage('./autocomplete')\">\n Autocomplete field\n </ion-item>\n <ion-item tappable class=\"text-1x\" (click)=\"openPage('./latlong')\">\n Lat/Long field\n </ion-item>\n<!-- <ion-item tappable class=\"text-1x\" (click)=\"openPage('./numpad')\">-->\n<!-- Numeric pad component-->\n<!-- </ion-item>-->\n <ion-item tappable class=\"text-1x\" (click)=\"openPage('./swipe')\">\n Swipe component\n </ion-item>\n <ion-item tappable class=\"text-1x\" (click)=\"openPage('./chips')\">\n Chips component\n </ion-item>\n\n <ion-item-divider>Directive</ion-item-divider>\n <ion-item tappable class=\"text-1x\" (click)=\"openPage('./badge-icon')\">\n Badge icon directive\n </ion-item>\n\n <ng-container *ngIf=\"pages && pages.length\">\n <ion-item-divider>Other components</ion-item-divider>\n\n <ion-item *ngFor=\"let item of pages\"\n tappable class=\"text-1x\"\n (click)=\"openPage(item.page)\">{{item.label}}</ion-item>\n\n </ng-container>\n </ion-list>\n\n</ion-content>\n"
18466
18550
  },] }
18467
18551
  ];
18468
18552
  MaterialTestingPage.ctorParameters = function () { return [
@@ -18747,6 +18831,18 @@
18747
18831
  { type: i1.FormBuilder }
18748
18832
  ]; };
18749
18833
 
18834
+ var MatBadgeIconTestPage = /** @class */ (function () {
18835
+ function MatBadgeIconTestPage() {
18836
+ }
18837
+ return MatBadgeIconTestPage;
18838
+ }());
18839
+ MatBadgeIconTestPage.decorators = [
18840
+ { type: i0.Component, args: [{
18841
+ selector: 'mat-badge-icon-test',
18842
+ template: "\n<ion-header>\n <ion-toolbar color=\"primary\">\n\n <ion-buttons slot=\"start\">\n <ion-back-button></ion-back-button>\n </ion-buttons>\n\n <ion-title>matBadgeIcon directive</ion-title>\n </ion-toolbar>\n</ion-header>\n\n<ion-content class=\"ion-padding\">\n\n <!-- small badge -->\n <p>\n <ion-text color=\"tertiary\">\n <span matBadge matIcon=\"check\"\n matBadgeSize=\"small\"\n matBadgeColor=\"accent\"\n matBadgeOverlap=\"false\">Small badge</span>\n </ion-text>\n </p>\n\n <!-- medium badge -->\n <p>\n <ion-text matBadge matBadgeIcon=\"check\"\n matBadgeSize=\"medium\"\n matBadgeColor=\"tertiary\"\n matBadgeOverlap=\"false\"\n >Medium badge</ion-text>\n </p>\n\n <!-- small badge -->\n <p>\n <ion-label matBadge matBadgeIcon=\"close\" matBadgeSize=\"large\"\n matBadgeOverlap=\"false\">Large badge</ion-label>\n </p>\n\n <!-- default size badge -->\n <p>\n <ion-label matBadge matBadgeIcon=\"check\" matBadgeColor=\"success\"\n matBadgeOverlap=\"false\">Badge (no size, no color)\n </ion-label>\n </p>\n\n <!-- ion icon -->\n <p>\n <ion-label matBadge\n ionBadgeIcon=\"checkmark\"\n matBadgeColor=\"success\"\n matBadgeOverlap=\"false\">Badge with ion-icon\n </ion-label>\n </p>\n\n <!-- ion icon clear -->\n <p>\n <ion-label matBadge\n ionBadgeIcon=\"checkmark-circle\"\n matBadgeColor=\"tertiary\"\n matBadgeFill=\"clear\"\n matBadgeOverlap=\"false\">Badge with clear icon\n </ion-label>\n </p>\n\n\n</ion-content>\n"
18843
+ },] }
18844
+ ];
18845
+
18750
18846
  var routes$1 = [
18751
18847
  {
18752
18848
  path: '',
@@ -18782,6 +18878,11 @@
18782
18878
  path: 'chips',
18783
18879
  pathMatch: 'full',
18784
18880
  component: ChipsTestPage
18881
+ },
18882
+ {
18883
+ path: 'badge-icon',
18884
+ pathMatch: 'full',
18885
+ component: MatBadgeIconTestPage
18785
18886
  }
18786
18887
  ];
18787
18888
  var MaterialTestingModule = /** @class */ (function () {
@@ -18806,7 +18907,8 @@
18806
18907
  LatLongTestPage,
18807
18908
  // NumpadTestPage,
18808
18909
  SwipeTestPage,
18809
- ChipsTestPage
18910
+ ChipsTestPage,
18911
+ MatBadgeIconTestPage
18810
18912
  ],
18811
18913
  exports: [
18812
18914
  SharedMaterialModule,
@@ -28049,12 +28151,15 @@
28049
28151
  exports["ɵ0"] = ɵ0$5;
28050
28152
  exports["ɵa"] = CustomReuseStrategy;
28051
28153
  exports["ɵb"] = MatNumpadDomService;
28052
- exports["ɵc"] = isFocusableElement;
28053
- exports["ɵd"] = RegisterForm;
28054
- exports["ɵe"] = AccountValidatorService;
28055
- exports["ɵf"] = RegisterModal;
28056
- exports["ɵg"] = UserSettingsValidatorService;
28057
- exports["ɵh"] = LocalSettingsValidatorService;
28154
+ exports["ɵc"] = SharedMatBadgeIconModule;
28155
+ exports["ɵd"] = MatBadgeIconDirective;
28156
+ exports["ɵe"] = isFocusableElement;
28157
+ exports["ɵf"] = MatBadgeIconTestPage;
28158
+ exports["ɵg"] = RegisterForm;
28159
+ exports["ɵh"] = AccountValidatorService;
28160
+ exports["ɵi"] = RegisterModal;
28161
+ exports["ɵj"] = UserSettingsValidatorService;
28162
+ exports["ɵk"] = LocalSettingsValidatorService;
28058
28163
 
28059
28164
  Object.defineProperty(exports, '__esModule', { value: true });
28060
28165