@ecodev/natural 66.0.1 → 66.0.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.
@@ -5339,6 +5339,9 @@ class NaturalThemeService {
5339
5339
  effect(() => {
5340
5340
  this.document.documentElement.setAttribute('data-is-dark', this.isDark() ? 'true' : 'false');
5341
5341
  });
5342
+ const storedScheme = this.storage.getItem('color-scheme');
5343
+ const isValidScheme = storedScheme && Object.values(ColorScheme).includes(storedScheme);
5344
+ this.colorScheme.set(isValidScheme ? storedScheme : ColorScheme.Auto);
5342
5345
  }
5343
5346
  /**
5344
5347
  * Set theme in memory, local storage and dom
@@ -6519,11 +6522,11 @@ class NaturalDetailHeaderComponent {
6519
6522
  return this.getRootLink().concat([id]);
6520
6523
  }
6521
6524
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: NaturalDetailHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
6522
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.7", type: NaturalDetailHeaderComponent, isStandalone: true, selector: "natural-detail-header", inputs: { currentBaseUrl: { classPropertyName: "currentBaseUrl", publicName: "currentBaseUrl", isSignal: true, isRequired: false, transformFunction: null }, isPanel: { classPropertyName: "isPanel", publicName: "isPanel", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: false, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: false, isRequired: false, transformFunction: null }, rootLabel: { classPropertyName: "rootLabel", publicName: "rootLabel", isSignal: false, isRequired: false, transformFunction: null }, newLabel: { classPropertyName: "newLabel", publicName: "newLabel", isSignal: true, isRequired: false, transformFunction: null }, model: { classPropertyName: "model", publicName: "model", isSignal: false, isRequired: true, transformFunction: null }, breadcrumbs: { classPropertyName: "breadcrumbs", publicName: "breadcrumbs", isSignal: true, isRequired: false, transformFunction: null }, listRoute: { classPropertyName: "listRoute", publicName: "listRoute", isSignal: true, isRequired: false, transformFunction: null }, listFragment: { classPropertyName: "listFragment", publicName: "listFragment", isSignal: true, isRequired: false, transformFunction: null }, link: { classPropertyName: "link", publicName: "link", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"breadcrumb\">\n @if (rootLabel || label) {\n <a color=\"primary\" mat-button [routerLink]=\"isPanel() ? [] : getRootLink()\" [fragment]=\"listFragment()\">{{\n rootLabel || label\n }}</a>\n }\n @for (parent of breadcrumbs(); track parent.id) {\n /\n <a color=\"primary\" mat-button [routerLink]=\"isPanel() ? [] : getLink(parent.id)\">\n {{ parent?.fullName || parent?.name }}</a\n >\n }\n</div>\n\n<div class=\"body\">\n @if (icon) {\n <div style=\"width: 30px\">\n <mat-icon [naturalIcon]=\"icon\" />\n </div>\n }\n @if (!model.id) {\n <div class=\"mat-headline-5 nat-no-margin newLabel\">{{ newLabel() }}</div>\n }\n @if (model.id) {\n <div class=\"mat-headline-5 nat-no-margin label\">{{ model.name || model.fullName || label }}</div>\n }\n <div>\n <ng-content />\n </div>\n</div>\n", styles: [":host{display:flex;flex-direction:column}:host .breadcrumb,:host .body{display:flex;flex-direction:row;align-items:center}:host .breadcrumb{position:relative;top:5px}:host .body{min-height:40px}:host .body>*:not(:last-child){margin-right:5px}:host .body .label,:host .body .newLabel{flex:1}@media screen and (max-width: 600px){:host .body{flex-direction:column;align-items:flex-start}:host .body>*:not(:last-child){margin-bottom:10px!important}:host .body mat-icon{display:none}}\n"], dependencies: [{ kind: "component", type: MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NaturalIconDirective, selector: "mat-icon[naturalIcon]", inputs: ["naturalIcon", "size"] }] });
6525
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.7", type: NaturalDetailHeaderComponent, isStandalone: true, selector: "natural-detail-header", inputs: { currentBaseUrl: { classPropertyName: "currentBaseUrl", publicName: "currentBaseUrl", isSignal: true, isRequired: false, transformFunction: null }, isPanel: { classPropertyName: "isPanel", publicName: "isPanel", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: false, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: false, isRequired: false, transformFunction: null }, rootLabel: { classPropertyName: "rootLabel", publicName: "rootLabel", isSignal: false, isRequired: false, transformFunction: null }, newLabel: { classPropertyName: "newLabel", publicName: "newLabel", isSignal: true, isRequired: false, transformFunction: null }, model: { classPropertyName: "model", publicName: "model", isSignal: false, isRequired: true, transformFunction: null }, breadcrumbs: { classPropertyName: "breadcrumbs", publicName: "breadcrumbs", isSignal: true, isRequired: false, transformFunction: null }, listRoute: { classPropertyName: "listRoute", publicName: "listRoute", isSignal: true, isRequired: false, transformFunction: null }, listFragment: { classPropertyName: "listFragment", publicName: "listFragment", isSignal: true, isRequired: false, transformFunction: null }, link: { classPropertyName: "link", publicName: "link", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"breadcrumb\">\n @if (rootLabel || label) {\n <a color=\"primary\" mat-button [routerLink]=\"isPanel() ? [] : getRootLink()\" [fragment]=\"listFragment()\">{{\n rootLabel || label\n }}</a>\n }\n @for (parent of breadcrumbs(); track parent.id) {\n /\n <a color=\"primary\" mat-button [routerLink]=\"isPanel() ? [] : getLink(parent.id)\">\n {{ parent?.fullName || parent?.name }}</a\n >\n }\n</div>\n\n<div class=\"body\">\n @if (icon) {\n <div style=\"width: 30px\">\n <mat-icon [naturalIcon]=\"icon\" />\n </div>\n }\n @if (!model.id) {\n <div class=\"mat-font-headline-sm nat-no-margin newLabel\">{{ newLabel() }}</div>\n }\n @if (model.id) {\n <div class=\"mat-font-headline-sm nat-no-margin label\">{{ model.name || model.fullName || label }}</div>\n }\n <div>\n <ng-content />\n </div>\n</div>\n", styles: [":host{display:flex;flex-direction:column}:host .breadcrumb,:host .body{display:flex;flex-direction:row;align-items:center}:host .breadcrumb{position:relative;top:5px}:host .body{min-height:40px}:host .body>*:not(:last-child){margin-right:5px}:host .body .label,:host .body .newLabel{flex:1}@media screen and (max-width: 600px){:host .body{flex-direction:column;align-items:flex-start}:host .body>*:not(:last-child){margin-bottom:10px!important}:host .body mat-icon{display:none}}\n"], dependencies: [{ kind: "component", type: MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NaturalIconDirective, selector: "mat-icon[naturalIcon]", inputs: ["naturalIcon", "size"] }] });
6523
6526
  }
6524
6527
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: NaturalDetailHeaderComponent, decorators: [{
6525
6528
  type: Component,
6526
- args: [{ selector: 'natural-detail-header', imports: [MatButton, RouterLink, MatIcon, NaturalIconDirective], template: "<div class=\"breadcrumb\">\n @if (rootLabel || label) {\n <a color=\"primary\" mat-button [routerLink]=\"isPanel() ? [] : getRootLink()\" [fragment]=\"listFragment()\">{{\n rootLabel || label\n }}</a>\n }\n @for (parent of breadcrumbs(); track parent.id) {\n /\n <a color=\"primary\" mat-button [routerLink]=\"isPanel() ? [] : getLink(parent.id)\">\n {{ parent?.fullName || parent?.name }}</a\n >\n }\n</div>\n\n<div class=\"body\">\n @if (icon) {\n <div style=\"width: 30px\">\n <mat-icon [naturalIcon]=\"icon\" />\n </div>\n }\n @if (!model.id) {\n <div class=\"mat-headline-5 nat-no-margin newLabel\">{{ newLabel() }}</div>\n }\n @if (model.id) {\n <div class=\"mat-headline-5 nat-no-margin label\">{{ model.name || model.fullName || label }}</div>\n }\n <div>\n <ng-content />\n </div>\n</div>\n", styles: [":host{display:flex;flex-direction:column}:host .breadcrumb,:host .body{display:flex;flex-direction:row;align-items:center}:host .breadcrumb{position:relative;top:5px}:host .body{min-height:40px}:host .body>*:not(:last-child){margin-right:5px}:host .body .label,:host .body .newLabel{flex:1}@media screen and (max-width: 600px){:host .body{flex-direction:column;align-items:flex-start}:host .body>*:not(:last-child){margin-bottom:10px!important}:host .body mat-icon{display:none}}\n"] }]
6529
+ args: [{ selector: 'natural-detail-header', imports: [MatButton, RouterLink, MatIcon, NaturalIconDirective], template: "<div class=\"breadcrumb\">\n @if (rootLabel || label) {\n <a color=\"primary\" mat-button [routerLink]=\"isPanel() ? [] : getRootLink()\" [fragment]=\"listFragment()\">{{\n rootLabel || label\n }}</a>\n }\n @for (parent of breadcrumbs(); track parent.id) {\n /\n <a color=\"primary\" mat-button [routerLink]=\"isPanel() ? [] : getLink(parent.id)\">\n {{ parent?.fullName || parent?.name }}</a\n >\n }\n</div>\n\n<div class=\"body\">\n @if (icon) {\n <div style=\"width: 30px\">\n <mat-icon [naturalIcon]=\"icon\" />\n </div>\n }\n @if (!model.id) {\n <div class=\"mat-font-headline-sm nat-no-margin newLabel\">{{ newLabel() }}</div>\n }\n @if (model.id) {\n <div class=\"mat-font-headline-sm nat-no-margin label\">{{ model.name || model.fullName || label }}</div>\n }\n <div>\n <ng-content />\n </div>\n</div>\n", styles: [":host{display:flex;flex-direction:column}:host .breadcrumb,:host .body{display:flex;flex-direction:row;align-items:center}:host .breadcrumb{position:relative;top:5px}:host .body{min-height:40px}:host .body>*:not(:last-child){margin-right:5px}:host .body .label,:host .body .newLabel{flex:1}@media screen and (max-width: 600px){:host .body{flex-direction:column;align-items:flex-start}:host .body>*:not(:last-child){margin-bottom:10px!important}:host .body mat-icon{display:none}}\n"] }]
6527
6530
  }], propDecorators: { currentBaseUrl: [{ type: i0.Input, args: [{ isSignal: true, alias: "currentBaseUrl", required: false }] }], isPanel: [{ type: i0.Input, args: [{ isSignal: true, alias: "isPanel", required: false }] }], icon: [{
6528
6531
  type: Input
6529
6532
  }], label: [{
@@ -7489,11 +7492,11 @@ class FacetSelectorComponent {
7489
7492
  return true;
7490
7493
  }
7491
7494
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: FacetSelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
7492
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.7", type: FacetSelectorComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: "@if (data.title) {\n <div class=\"dropdown-title mat-body-2\">{{ data.title }}</div>\n}\n<mat-nav-list>\n @for (facet of facets; track $index) {\n <mat-list-item (click)=\"selection = facet; close()\">\n <a>{{ facet.display }}</a>\n </mat-list-item>\n }\n</mat-nav-list>\n", styles: [".mat-nav-list{padding:0}.dropdown-title{opacity:.7;padding:5px;font-variant:all-small-caps;font-size:18px}\n"], dependencies: [{ kind: "component", type: MatNavList, selector: "mat-nav-list", exportAs: ["matNavList"] }, { kind: "component", type: MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }] });
7495
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.7", type: FacetSelectorComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: "@if (data.title) {\n <div class=\"dropdown-title nat-bold\">{{ data.title }}</div>\n}\n<mat-nav-list>\n @for (facet of facets; track $index) {\n <mat-list-item (click)=\"selection = facet; close()\">\n <a>{{ facet.display }}</a>\n </mat-list-item>\n }\n</mat-nav-list>\n", styles: [".mat-nav-list{padding:0}.dropdown-title{opacity:.7;padding:5px;font-variant:all-small-caps;font-size:18px}\n"], dependencies: [{ kind: "component", type: MatNavList, selector: "mat-nav-list", exportAs: ["matNavList"] }, { kind: "component", type: MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }] });
7493
7496
  }
7494
7497
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: FacetSelectorComponent, decorators: [{
7495
7498
  type: Component,
7496
- args: [{ imports: [MatNavList, MatListItem], template: "@if (data.title) {\n <div class=\"dropdown-title mat-body-2\">{{ data.title }}</div>\n}\n<mat-nav-list>\n @for (facet of facets; track $index) {\n <mat-list-item (click)=\"selection = facet; close()\">\n <a>{{ facet.display }}</a>\n </mat-list-item>\n }\n</mat-nav-list>\n", styles: [".mat-nav-list{padding:0}.dropdown-title{opacity:.7;padding:5px;font-variant:all-small-caps;font-size:18px}\n"] }]
7499
+ args: [{ imports: [MatNavList, MatListItem], template: "@if (data.title) {\n <div class=\"dropdown-title nat-bold\">{{ data.title }}</div>\n}\n<mat-nav-list>\n @for (facet of facets; track $index) {\n <mat-list-item (click)=\"selection = facet; close()\">\n <a>{{ facet.display }}</a>\n </mat-list-item>\n }\n</mat-nav-list>\n", styles: [".mat-nav-list{padding:0}.dropdown-title{opacity:.7;padding:5px;font-variant:all-small-caps;font-size:18px}\n"] }]
7497
7500
  }] });
7498
7501
 
7499
7502
  // Required to check invalid fields when initializing natural-search