@ecodev/natural 69.0.8 → 69.0.10

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.
@@ -5505,6 +5505,7 @@ class NaturalIconDirective {
5505
5505
  domSanitizer = inject(DomSanitizer);
5506
5506
  config = inject(NATURAL_ICONS_CONFIG, { optional: true });
5507
5507
  matIconComponent = inject(MatIcon, { host: true, self: true });
5508
+ isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
5508
5509
  naturalIcon = input.required({ ...(ngDevMode ? { debugName: "naturalIcon" } : {}), transform: (value) => value ?? '' });
5509
5510
  size = input(undefined, ...(ngDevMode ? [{ debugName: "size" }] : []));
5510
5511
  icon = computed(() => {
@@ -5530,8 +5531,6 @@ class NaturalIconDirective {
5530
5531
  });
5531
5532
  }
5532
5533
  registerIcons(config) {
5533
- // Ensure that this specific instance of registry has our our icons
5534
- // exactly once, not less and not more
5535
5534
  const registry = this.matIconRegistry;
5536
5535
  if (registry[naturalRegistered]) {
5537
5536
  return;
@@ -5539,7 +5538,7 @@ class NaturalIconDirective {
5539
5538
  registry[naturalRegistered] = true;
5540
5539
  for (const key of Object.keys(config)) {
5541
5540
  const svg = config[key].svg;
5542
- if (svg) {
5541
+ if (svg && this.isBrowser) {
5543
5542
  this.matIconRegistry.addSvgIcon(key, this.domSanitizer.bypassSecurityTrustResourceUrl(svg));
5544
5543
  }
5545
5544
  }
@@ -11425,11 +11424,11 @@ class NaturalCompactColorSchemerComponent {
11425
11424
  colorSchemeOptions = colorSchemeOptions;
11426
11425
  current = computed(() => colorSchemeOptions.find(choice => this.themeService.colorScheme() === choice.value), ...(ngDevMode ? [{ debugName: "current" }] : []));
11427
11426
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: NaturalCompactColorSchemerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
11428
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.0", type: NaturalCompactColorSchemerComponent, isStandalone: true, selector: "natural-compact-color-schemer", ngImport: i0, template: "<button\n matIconButton\n matTooltipPosition=\"below\"\n i18n-matTooltip\n [matTooltip]=\"current()?.label\"\n [matMenuTriggerFor]=\"menu\"\n ><mat-icon [fontIcon]=\"current()?.icon ?? ''\"\n/></button>\n<mat-menu #menu=\"matMenu\">\n @for (option of colorSchemeOptions; track $index) {\n <button mat-menu-item (click)=\"themeService.setColorScheme(option.value)\">\n <mat-icon [fontIcon]=\"themeService.colorScheme() === option.value ? 'check' : ''\" />\n {{ option.label }}</button\n >\n }\n</mat-menu>\n", styles: ["@supports not (color: light-dark(white,black)){:host{display:none}}\n"], dependencies: [{ kind: "component", type: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
11427
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.0", type: NaturalCompactColorSchemerComponent, isStandalone: true, selector: "natural-compact-color-schemer", ngImport: i0, template: "<button\n matIconButton\n matTooltipPosition=\"below\"\n i18n-matTooltip\n [matTooltip]=\"current()?.label\"\n [matMenuTriggerFor]=\"menu\"\n ><mat-icon [fontIcon]=\"current()?.icon ?? ''\"\n/></button>\n<mat-menu #menu=\"matMenu\">\n @for (option of colorSchemeOptions; track $index) {\n <button mat-menu-item (click)=\"themeService.setColorScheme(option.value)\">\n <mat-icon [fontIcon]=\"themeService.colorScheme() === option.value ? 'check' : ''\" />\n {{ option.label }}</button\n >\n }\n</mat-menu>\n", styles: ["@supports not (color: light-dark(white,black)){:host{display:none}}:host{display:grid;place-content:center}.mat-mdc-icon-button{color:inherit}\n"], dependencies: [{ kind: "component", type: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
11429
11428
  }
11430
11429
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: NaturalCompactColorSchemerComponent, decorators: [{
11431
11430
  type: Component,
11432
- args: [{ selector: 'natural-compact-color-schemer', imports: [MatIconButton, MatTooltip, MatIcon, MatMenu, MatMenuItem, MatMenuTrigger], changeDetection: ChangeDetectionStrategy.OnPush, template: "<button\n matIconButton\n matTooltipPosition=\"below\"\n i18n-matTooltip\n [matTooltip]=\"current()?.label\"\n [matMenuTriggerFor]=\"menu\"\n ><mat-icon [fontIcon]=\"current()?.icon ?? ''\"\n/></button>\n<mat-menu #menu=\"matMenu\">\n @for (option of colorSchemeOptions; track $index) {\n <button mat-menu-item (click)=\"themeService.setColorScheme(option.value)\">\n <mat-icon [fontIcon]=\"themeService.colorScheme() === option.value ? 'check' : ''\" />\n {{ option.label }}</button\n >\n }\n</mat-menu>\n", styles: ["@supports not (color: light-dark(white,black)){:host{display:none}}\n"] }]
11431
+ args: [{ selector: 'natural-compact-color-schemer', imports: [MatIconButton, MatTooltip, MatIcon, MatMenu, MatMenuItem, MatMenuTrigger], changeDetection: ChangeDetectionStrategy.OnPush, template: "<button\n matIconButton\n matTooltipPosition=\"below\"\n i18n-matTooltip\n [matTooltip]=\"current()?.label\"\n [matMenuTriggerFor]=\"menu\"\n ><mat-icon [fontIcon]=\"current()?.icon ?? ''\"\n/></button>\n<mat-menu #menu=\"matMenu\">\n @for (option of colorSchemeOptions; track $index) {\n <button mat-menu-item (click)=\"themeService.setColorScheme(option.value)\">\n <mat-icon [fontIcon]=\"themeService.colorScheme() === option.value ? 'check' : ''\" />\n {{ option.label }}</button\n >\n }\n</mat-menu>\n", styles: ["@supports not (color: light-dark(white,black)){:host{display:none}}:host{display:grid;place-content:center}.mat-mdc-icon-button{color:inherit}\n"] }]
11433
11432
  }] });
11434
11433
 
11435
11434
  /*