@elderbyte/ngx-starter 19.7.0 → 19.8.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.
@@ -30,6 +30,16 @@ export declare class ElderEnumTranslationService {
30
30
  * @param asc if true, data will be sorted in ascending order
31
31
  */
32
32
  translate(enumClass: any, translationPrefix: string, sort?: boolean, asc?: boolean): Observable<TranslatedEnumValue[]>;
33
+ /**
34
+ * Translates the given Enum class. Loads translations of given translationPrefix
35
+ * and creates for each enum value a TranslatedEnumValue.
36
+ *
37
+ * @param values The strings to translate.
38
+ * @param translationPrefix prefix to load translations
39
+ * @param sort if true, data will be sorted by translations
40
+ * @param asc if true, data will be sorted in ascending order
41
+ */
42
+ translateStrings(values: readonly string[], translationPrefix: string, sort?: boolean, asc?: boolean): Observable<TranslatedEnumValue[]>;
33
43
  /**
34
44
  * Translates the given element. Loads the translation
35
45
  * and creates a TranslatedEnumValue.
@@ -47,7 +57,16 @@ export declare class ElderEnumTranslationService {
47
57
  * @param sort if true, data will be sorted by translations
48
58
  * @param asc if true, data will be sorted in ascending order
49
59
  */
50
- enumDateSource(enumClass: any, translationPrefix: string, sort?: boolean, asc?: boolean): IDataSource<TranslatedEnumValue>;
60
+ enumDateSource<TEnum extends object>(enumClass: TEnum, translationPrefix: string, sort?: boolean, asc?: boolean): IDataSource<TranslatedEnumValue>;
61
+ /**
62
+ * Creates a data source of translations of the given enum class.
63
+ *
64
+ * @param values Values
65
+ * @param translationPrefix prefix to load translations
66
+ * @param sort if true, data will be sorted by translations
67
+ * @param asc if true, data will be sorted in ascending order
68
+ */
69
+ stringArrayDateSource(values: readonly string[], translationPrefix: string, sort?: boolean, asc?: boolean): IDataSource<TranslatedEnumValue>;
51
70
  static ɵfac: i0.ɵɵFactoryDeclaration<ElderEnumTranslationService, never>;
52
71
  static ɵprov: i0.ɵɵInjectableDeclaration<ElderEnumTranslationService>;
53
72
  }
@@ -1,7 +1,6 @@
1
1
  import { ThemePalette } from '@angular/material/core';
2
+ import { ElderNamedColor } from '../colors/named/named-color';
2
3
  import * as i0 from "@angular/core";
3
- export declare const elderChipColorNames: readonly ["white", "grey", "blue", "turquoise", "green", "orange", "yellow", "red", "purple", "pink"];
4
- export type ElderNamedColor = (typeof elderChipColorNames)[number] | undefined;
5
4
  export declare const elderChipColorStates: readonly ["open", "inProgress", "completed", "warn", "error", "other"];
6
5
  export type ElderStateColor = (typeof elderChipColorStates)[number] | undefined;
7
6
  export declare const elderChipColorLevels: readonly ["low", "medium", "high", "critical"];
@@ -4,7 +4,7 @@ import * as i2 from "@ngx-translate/core";
4
4
  import * as i3 from "@angular/material/chips";
5
5
  import * as i4 from "@angular/cdk/a11y";
6
6
  import * as i5 from "./elder-chip-label.directive";
7
- export { ElderChipLabelDirective, elderChipColorStates, elderChipColorLevels, elderChipColorNames, } from './elder-chip-label.directive';
7
+ export { ElderChipLabelDirective, elderChipColorStates, elderChipColorLevels, } from './elder-chip-label.directive';
8
8
  export declare class ElderChipsModule {
9
9
  static ɵfac: i0.ɵɵFactoryDeclaration<ElderChipsModule, never>;
10
10
  static ɵmod: i0.ɵɵNgModuleDeclaration<ElderChipsModule, never, [typeof i1.CommonModule, typeof i2.TranslateModule, typeof i3.MatChipsModule, typeof i4.A11yModule, typeof i5.ElderChipLabelDirective], [typeof i5.ElderChipLabelDirective]>;
@@ -0,0 +1,9 @@
1
+ import { ElderNamedColor } from '../named-color';
2
+ import { TranslatedEnumValue } from '../../../../common/enums/elder-enum-translation.service';
3
+ import * as i0 from "@angular/core";
4
+ export declare class NamedColorSelectValueComponent {
5
+ readonly value: import("@angular/core").InputSignal<TranslatedEnumValue>;
6
+ readonly namedColor: import("@angular/core").Signal<ElderNamedColor>;
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<NamedColorSelectValueComponent, never>;
8
+ static ɵcmp: i0.ɵɵComponentDeclaration<NamedColorSelectValueComponent, "elder-named-color-select-value", never, { "value": { "alias": "value"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
9
+ }
@@ -0,0 +1,9 @@
1
+ import { ElderSelectComponent } from '../../select/single/elder-select/elder-select.component';
2
+ import { ElderEnumTranslationService } from '../../../common/enums/elder-enum-translation.service';
3
+ import * as i0 from "@angular/core";
4
+ export declare class NamedColorSelectDirective {
5
+ private select;
6
+ constructor(select: ElderSelectComponent, enumTranslationService: ElderEnumTranslationService);
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<NamedColorSelectDirective, never>;
8
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NamedColorSelectDirective, "[elderNamedColorSelect]", never, {}, {}, never, never, true, never>;
9
+ }
@@ -0,0 +1,5 @@
1
+ export declare const elderNamedColors: readonly ["white", "grey", "blue", "turquoise", "green", "orange", "yellow", "red", "purple", "pink"];
2
+ export type ElderNamedColor = (typeof elderNamedColors)[number] | undefined;
3
+ export declare const elderNamedColorRoles: readonly ["primary", "darker", "on"];
4
+ export type ElderNamedColorRole = (typeof elderNamedColorRoles)[number] | undefined;
5
+ export declare function elderNamedColorToken(color: ElderNamedColor, role?: ElderNamedColorRole): string;
@@ -0,0 +1,14 @@
1
+ import { ElderNamedColor, ElderNamedColorRole } from '../named/named-color';
2
+ import { MatIcon } from '@angular/material/icon';
3
+ import * as i0 from "@angular/core";
4
+ export declare class NamedColorDirective {
5
+ readonly namedColor: import("@angular/core").InputSignal<ElderNamedColor>;
6
+ readonly backgroundRole: import("@angular/core").ModelSignal<ElderNamedColorRole>;
7
+ readonly frontRole: import("@angular/core").ModelSignal<ElderNamedColorRole>;
8
+ readonly hostColor: import("@angular/core").Signal<string>;
9
+ readonly hostBackgroundColor: import("@angular/core").Signal<string>;
10
+ constructor(icon: MatIcon);
11
+ private namedColorCssVariable;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<NamedColorDirective, [{ optional: true; }]>;
13
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NamedColorDirective, "[elderNamedColor]", never, { "namedColor": { "alias": "elderNamedColor"; "required": true; "isSignal": true; }; "backgroundRole": { "alias": "backgroundRole"; "required": false; "isSignal": true; }; "frontRole": { "alias": "frontRole"; "required": false; "isSignal": true; }; }, { "backgroundRole": "backgroundRoleChange"; "frontRole": "frontRoleChange"; }, never, never, true, never>;
14
+ }
@@ -0,0 +1,4 @@
1
+ export * from './named-color';
2
+ export * from './named-color-select.directive';
3
+ export * from './named-color.directive';
4
+ export * from './named-color-select-value/named-color-select-value.component';
@@ -0,0 +1 @@
1
+ export * from './named/public_api';
@@ -41,3 +41,4 @@ export * from './tabs/elder-tab.module';
41
41
  export * from './badge/elder-badge.module';
42
42
  export * from './page/public_api';
43
43
  export * from './layout/public_api';
44
+ export * from './colors/public_api';
@@ -1,5 +1,6 @@
1
1
  import { ThemePalette } from '@angular/material/core';
2
- import { ElderLevelColor, ElderNamedColor, ElderStateColor } from '../../../chips/elder-chip-label.directive';
2
+ import { ElderLevelColor, ElderStateColor } from '../../../chips/elder-chip-label.directive';
3
+ import { ElderNamedColor } from '../../../colors/named/named-color';
3
4
  export declare class SelectChipSpecUtil {
4
5
  static readonly DefaultChipSpec: SelectChipSpec;
5
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elderbyte/ngx-starter",
3
- "version": "19.7.0",
3
+ "version": "19.8.0",
4
4
  "peerDependencies": {
5
5
  "@angular/core": "^18.0.0 || ^19.0.0",
6
6
  "@angular/common": "^18.0.0 || ^19.0.0",
@@ -1,6 +1,23 @@
1
1
  {
2
2
  "greeting": "Hallo Welt!",
3
3
 
4
+ "elder": {
5
+ "colors": {
6
+ "named": {
7
+ "white": "Weiß",
8
+ "grey": "Grau",
9
+ "blue": "Blau",
10
+ "turquoise": "Türkis",
11
+ "green": "Grün",
12
+ "orange": "Orange",
13
+ "yellow": "Gelb",
14
+ "red": "Rot",
15
+ "purple": "Lila",
16
+ "pink": "Rosa"
17
+ }
18
+ }
19
+ },
20
+
4
21
  "context": {
5
22
  "reset": "Zurücksetzen",
6
23
  "noSelection": "Keine Auswahl",
@@ -1,6 +1,23 @@
1
1
  {
2
2
  "greeting": "Hello World!",
3
3
 
4
+ "elder": {
5
+ "colors": {
6
+ "named": {
7
+ "white": "White",
8
+ "grey": "Grey",
9
+ "blue": "Blue",
10
+ "turquoise": "Turquoise",
11
+ "green": "Green",
12
+ "orange": "Orange",
13
+ "yellow": "Yellow",
14
+ "red": "Red",
15
+ "purple": "Purple",
16
+ "pink": "Pink"
17
+ }
18
+ }
19
+ },
20
+
4
21
  "context": {
5
22
  "reset": "Reset",
6
23
  "noSelection": "No Selection",
@@ -1,6 +1,23 @@
1
1
  {
2
2
  "greeting": "Salut tout le monde!",
3
3
 
4
+ "elder": {
5
+ "colors": {
6
+ "named": {
7
+ "white": "Blanc",
8
+ "grey": "Gris",
9
+ "blue": "Bleu",
10
+ "turquoise": "Turquoise",
11
+ "green": "Vert",
12
+ "orange": "Orange",
13
+ "yellow": "Jaune",
14
+ "red": "Rouge",
15
+ "purple": "Violet",
16
+ "pink": "Rose"
17
+ }
18
+ }
19
+ },
20
+
4
21
  "context": {
5
22
  "reset": "Réinitialiser",
6
23
  "noSelection": "Aucune Sélection",
@@ -174,6 +174,7 @@
174
174
  // "on" (darker) variants
175
175
  @each $key, $value in config.$named-colors-darker {
176
176
  --elder-named-color-on-#{$key}: #{$value};
177
+ --elder-named-color-darker-#{$key}: #{$value};
177
178
  }
178
179
  }
179
180
 
@@ -182,6 +183,7 @@
182
183
  // Base colors
183
184
  @each $key, $value in config.$named-colors-darker {
184
185
  --elder-named-color-#{$key}: #{$value};
186
+ --elder-named-color-darker-#{$key}: #{$value};
185
187
  }
186
188
  }
187
189
 
@@ -37,14 +37,14 @@ $custom-colors: (
37
37
  $named-colors: (
38
38
  'white': #e1e1e1,
39
39
  'grey': #cecbca,
40
- 'blue': #bddcf3,
40
+ 'blue': #b9d7ee,
41
41
  'turquoise': #b0e6ef,
42
42
  'green': #b1ddce,
43
43
  'orange': #f4dab8,
44
44
  'yellow': #f3e7ad,
45
45
  'red': #e6b6b6,
46
- 'purple': #cdc7e5,
47
- 'pink': #eec2ea,
46
+ 'purple': #d9d3ee,
47
+ 'pink': #e8c2e1,
48
48
  );
49
49
 
50
50
  $named-colors-darker: ();