@ecodev/natural 55.2.0 → 55.4.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.
@@ -11,6 +11,7 @@ export declare class NaturalAvatarComponent implements OnChanges {
11
11
  initials?: string | null;
12
12
  gravatar?: string | null;
13
13
  size: number;
14
+ decorated: boolean;
14
15
  textSizeRatio: number;
15
16
  bgColor: string | undefined;
16
17
  fgColor: string;
@@ -48,6 +49,6 @@ export declare class NaturalAvatarComponent implements OnChanges {
48
49
  */
49
50
  private getImageStyle;
50
51
  static ɵfac: i0.ɵɵFactoryDeclaration<NaturalAvatarComponent, never>;
51
- static ɵcmp: i0.ɵɵComponentDeclaration<NaturalAvatarComponent, "natural-avatar", never, { "image": { "alias": "image"; "required": false; }; "initials": { "alias": "initials"; "required": false; }; "gravatar": { "alias": "gravatar"; "required": false; }; "size": { "alias": "size"; "required": false; }; "textSizeRatio": { "alias": "textSizeRatio"; "required": false; }; "bgColor": { "alias": "bgColor"; "required": false; }; "fgColor": { "alias": "fgColor"; "required": false; }; "borderRadius": { "alias": "borderRadius"; "required": false; }; "textMaximumLength": { "alias": "textMaximumLength"; "required": false; }; }, {}, never, never, true, never>;
52
+ static ɵcmp: i0.ɵɵComponentDeclaration<NaturalAvatarComponent, "natural-avatar", never, { "image": { "alias": "image"; "required": false; }; "initials": { "alias": "initials"; "required": false; }; "gravatar": { "alias": "gravatar"; "required": false; }; "size": { "alias": "size"; "required": false; }; "decorated": { "alias": "decorated"; "required": false; }; "textSizeRatio": { "alias": "textSizeRatio"; "required": false; }; "bgColor": { "alias": "bgColor"; "required": false; }; "fgColor": { "alias": "fgColor"; "required": false; }; "borderRadius": { "alias": "borderRadius"; "required": false; }; "textMaximumLength": { "alias": "textMaximumLength"; "required": false; }; }, {}, never, never, true, never>;
52
53
  }
53
54
  export {};
@@ -1,6 +1,7 @@
1
1
  import { InjectionToken } from '@angular/core';
2
2
  import { Meta, Title } from '@angular/platform-browser';
3
3
  import { Data, Router } from '@angular/router';
4
+ import { Observable } from 'rxjs';
4
5
  import * as i0 from "@angular/core";
5
6
  export type NaturalSeo = NaturalSeoBasic | NaturalSeoCallback | NaturalSeoResolve;
6
7
  /**
@@ -23,20 +24,6 @@ export type NaturalSeoBasic = Robots & {
23
24
  */
24
25
  canonicalQueryParamsWhitelist?: string[];
25
26
  };
26
- export declare type NaturalLinkDefinition = {
27
- charset?: string;
28
- crossorigin?: string;
29
- href?: string;
30
- hreflang?: string;
31
- media?: string;
32
- rel?: string;
33
- rev?: string;
34
- sizes?: string;
35
- target?: string;
36
- type?: string;
37
- } & {
38
- [prop: string]: string;
39
- };
40
27
  /**
41
28
  * Typically used for a "dynamic" page where a single object is resolved. So a detail page, such
42
29
  * as the detail of a risk and so on.
@@ -70,7 +57,7 @@ interface Robots {
70
57
  */
71
58
  robots?: string;
72
59
  }
73
- export interface NaturalSeoConfig {
60
+ interface NaturalSeoConfigPlain {
74
61
  /**
75
62
  * The name of the application that will always appear in the page title
76
63
  */
@@ -97,6 +84,7 @@ export interface NaturalSeoConfig {
97
84
  */
98
85
  readonly languages?: Readonly<string[]>;
99
86
  }
87
+ export type NaturalSeoConfig = NaturalSeoConfigPlain | Observable<NaturalSeoConfigPlain>;
100
88
  export declare const NATURAL_SEO_CONFIG: InjectionToken<NaturalSeoConfig>;
101
89
  export declare function stripTags(str: string): string;
102
90
  /**
@@ -114,34 +102,28 @@ export declare function stripTags(str: string): string;
114
102
  * configured for it in the routing.
115
103
  */
116
104
  export declare class NaturalSeoService {
117
- private readonly config;
118
105
  private readonly router;
119
106
  private readonly titleService;
120
107
  private readonly metaTagService;
121
108
  private readonly document;
122
109
  private locale;
123
110
  private routeData?;
124
- constructor(config: NaturalSeoConfig, router: Router, titleService: Title, metaTagService: Meta, document: Document, locale: string);
111
+ private config;
112
+ constructor(configToken: NaturalSeoConfig, router: Router, titleService: Title, metaTagService: Meta, document: Document, locale: string);
125
113
  /**
126
114
  * Update the SEO with given info. The extra part and app name will be appended automatically.
127
115
  *
128
- * In most cases this should not be used, and instead the SEO should be configured in the routing,
116
+ * In most cases, this should not be used. And instead, the SEO should be configured in the routing,
129
117
  * possibly with the callback variant for some dynamism.
130
118
  *
131
- * But in rare cases only the Component is able to build a proper page title, after it gather everything it
132
- * needed. For those cases the Component can inject this service and update the SEO directly.
119
+ * But in rare cases, only the Component is able to build a proper page title, after it gathered everything it
120
+ * needed. For those cases, the Component can inject this service and update the SEO directly.
133
121
  */
134
122
  update(seo: NaturalSeoBasic): void;
135
- updateAlternates(urlParts: {
136
- url: string;
137
- params: string;
138
- }): void;
123
+ private updateAlternates;
139
124
  private getUrlParts;
140
125
  /**
141
126
  * Add language between domain and uri https://example.com/fr/folder/page
142
- * @param urlParts
143
- * @param language
144
- * @private
145
127
  */
146
128
  private getUrl;
147
129
  private addLanguageSegment;
@@ -149,11 +131,9 @@ export declare class NaturalSeoService {
149
131
  private updateTag;
150
132
  private updateLinkTag;
151
133
  /**
152
- * Parse tag to create a selector
153
- * @param definition
154
- * @return {string} selector to use in querySelector
134
+ * Returns selector to use in querySelector to get the given link
155
135
  */
156
- private _parseSelector;
136
+ private parseSelector;
157
137
  /**
158
138
  * Returns the data from the most deep/specific activated route
159
139
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ecodev/natural",
3
- "version": "55.2.0",
3
+ "version": "55.4.0",
4
4
  "license": "MIT",
5
5
  "repository": "github:Ecodev/natural",
6
6
  "sideEffects": false,
@@ -45,6 +45,11 @@
45
45
  .mat-mdc-dialog-container .mdc-dialog__content {
46
46
  color: mat.get-color-from-palette(map.get($theme, foreground), base, 0.87);
47
47
  }
48
+
49
+ .natural-elevation {
50
+ box-shadow: inset 0 1px rgba(255, 255, 255, 0.3), 0 2px 1px -1px rgba(0, 0, 0, 0.2),
51
+ 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 1px 3px 0 rgba(0, 0, 0, 0.12);
52
+ }
48
53
  }
49
54
 
50
55
  $defaultConfig: mat.define-typography-config();