@elderbyte/ngx-starter 15.13.2 → 15.14.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.
@@ -0,0 +1,9 @@
1
+ import { ITranslated, ITranslatedText, LocaleMap } from '../translated';
2
+ import { LanguageTag } from '../language-tag';
3
+ export declare class Translated<T> implements ITranslated<T> {
4
+ locales: LocaleMap<T>;
5
+ with(locale: LanguageTag, value: T): this;
6
+ get(locale: LanguageTag, value: T): T | undefined;
7
+ }
8
+ export declare class TranslatedText extends Translated<string> implements ITranslatedText {
9
+ }
@@ -4,7 +4,7 @@
4
4
  * https://datahub.io/core/language-codes#resource-ietf-language-tags
5
5
  */
6
6
  export declare type LanguageTag = string;
7
- export declare class KnownLocaleType {
7
+ export declare class KnownLocaleTags {
8
8
  readonly ENGLISH: LanguageTag;
9
9
  readonly en_US: LanguageTag;
10
10
  readonly FRENCH: LanguageTag;
@@ -1,5 +1,8 @@
1
1
  export * from './language-tag';
2
2
  export * from './localized';
3
+ export * from './translated';
4
+ export * from './impl/translated';
5
+ export * from './translated-converter';
3
6
  export * from './localisation-picker';
4
7
  export * from './impl/i18n-base';
5
8
  export * from './impl/i18n-text';
@@ -0,0 +1,9 @@
1
+ import { Localized } from './localized';
2
+ import { TranslatedText } from './impl/translated';
3
+ import { ITranslatedText } from './translated';
4
+ import { I18nText } from './impl/i18n-text';
5
+ export declare class TranslatedConverter {
6
+ static toTranslatedText<T extends Localized>(localized: I18nText[]): TranslatedText;
7
+ static toTranslatedTextWith<T extends Localized>(localized: T[], textFn: (localized: T) => string): TranslatedText;
8
+ static toI18nText(translatedText: ITranslatedText): I18nText[];
9
+ }
@@ -0,0 +1,9 @@
1
+ import { LanguageTag } from './language-tag';
2
+ export declare type LocaleMap<T> = {
3
+ [name in LanguageTag]: T;
4
+ };
5
+ export interface ITranslated<T> {
6
+ locales: LocaleMap<T>;
7
+ }
8
+ export interface ITranslatedText extends ITranslated<string> {
9
+ }
@@ -21,6 +21,7 @@ import * as i19 from "@angular/cdk/a11y";
21
21
  import * as i20 from "@angular/material/icon";
22
22
  import * as i21 from "../../forms/elder-forms.module";
23
23
  import * as i22 from "@angular/material/toolbar";
24
+ import * as i23 from "../../theme/elder-theme.module";
24
25
  export * from './elder-localized-text-column.directive';
25
26
  export * from './elder-localized-texts.directive';
26
27
  export * from './elder-localized-input-table/elder-localized-input-table.component';
@@ -32,6 +33,6 @@ export * from './picker/i18n-pick.pipe';
32
33
  export * from './picker/i18n-pick-async.pipe';
33
34
  export declare class ElderI18nEntitiesModule {
34
35
  static ɵfac: i0.ɵɵFactoryDeclaration<ElderI18nEntitiesModule, never>;
35
- static ɵmod: i0.ɵɵNgModuleDeclaration<ElderI18nEntitiesModule, [typeof i1.ElderLocalizedTextColumnDirective, typeof i2.ElderLocalizedTextsDirective, typeof i3.ElderLocalizedInputTableComponent, typeof i4.ElderLocalizedInputDialogComponent, typeof i5.ElderLocalizedInputComponent, typeof i6.I18nPickPipe, typeof i7.I18nPickAsyncPipe], [typeof i8.CommonModule, typeof i9.MatTableModule, typeof i10.MatSortModule, typeof i11.MatInputModule, typeof i12.TranslateModule, typeof i13.FormsModule, typeof i14.ElderTableModule, typeof i15.MatChipsModule, typeof i16.ElderCardModule, typeof i17.MatDialogModule, typeof i18.MatButtonModule, typeof i19.A11yModule, typeof i20.MatIconModule, typeof i21.ElderFormsModule, typeof i22.MatToolbarModule], [typeof i1.ElderLocalizedTextColumnDirective, typeof i2.ElderLocalizedTextsDirective, typeof i3.ElderLocalizedInputTableComponent, typeof i4.ElderLocalizedInputDialogComponent, typeof i5.ElderLocalizedInputComponent, typeof i6.I18nPickPipe, typeof i7.I18nPickAsyncPipe]>;
36
+ static ɵmod: i0.ɵɵNgModuleDeclaration<ElderI18nEntitiesModule, [typeof i1.ElderLocalizedTextColumnDirective, typeof i2.ElderLocalizedTextsDirective, typeof i3.ElderLocalizedInputTableComponent, typeof i4.ElderLocalizedInputDialogComponent, typeof i5.ElderLocalizedInputComponent, typeof i6.I18nPickPipe, typeof i7.I18nPickAsyncPipe], [typeof i8.CommonModule, typeof i9.MatTableModule, typeof i10.MatSortModule, typeof i11.MatInputModule, typeof i12.TranslateModule, typeof i13.FormsModule, typeof i14.ElderTableModule, typeof i15.MatChipsModule, typeof i16.ElderCardModule, typeof i17.MatDialogModule, typeof i18.MatButtonModule, typeof i19.A11yModule, typeof i20.MatIconModule, typeof i21.ElderFormsModule, typeof i22.MatToolbarModule, typeof i23.ElderThemeModule], [typeof i1.ElderLocalizedTextColumnDirective, typeof i2.ElderLocalizedTextsDirective, typeof i3.ElderLocalizedInputTableComponent, typeof i4.ElderLocalizedInputDialogComponent, typeof i5.ElderLocalizedInputComponent, typeof i6.I18nPickPipe, typeof i7.I18nPickAsyncPipe]>;
36
37
  static ɵinj: i0.ɵɵInjectorDeclaration<ElderI18nEntitiesModule>;
37
38
  }
@@ -6,6 +6,7 @@ import { ElderLocalizedInputDialogService } from '../elder-localized-input-dialo
6
6
  import { ElderLocalizedTextColumnDirective } from '../elder-localized-text-column.directive';
7
7
  import { LocalisationPickerService } from '../picker/localisation-picker.service';
8
8
  import { AbstractControl, ValidationErrors } from '@angular/forms';
9
+ import { ITranslatedText } from '../../../../common/i18n/entity/translated';
9
10
  import * as i0 from "@angular/core";
10
11
  export declare class ElderLocalizedInputComponent<T extends Localized = Localized> extends FormFieldBaseComponent<T[]> implements OnInit, AfterViewInit, OnDestroy {
11
12
  private readonly localizedInputDialog;
@@ -20,6 +21,7 @@ export declare class ElderLocalizedInputComponent<T extends Localized = Localize
20
21
  readonly hintText$: Observable<string>;
21
22
  textColumnsQuery: QueryList<ElderLocalizedTextColumnDirective>;
22
23
  readonly textColumns$: BehaviorSubject<ElderLocalizedTextColumnDirective[]>;
24
+ readonly translatedValueChange: Observable<ITranslatedText>;
23
25
  private readonly destroy$;
24
26
  /***************************************************************************
25
27
  * *
@@ -42,6 +44,7 @@ export declare class ElderLocalizedInputComponent<T extends Localized = Localize
42
44
  **************************************************************************/
43
45
  set textColumns(cols: ElderLocalizedTextColumnDirective[]);
44
46
  get textColumns(): ElderLocalizedTextColumnDirective[];
47
+ set translatedValue(translated: ITranslatedText);
45
48
  /***************************************************************************
46
49
  * *
47
50
  * Public API *
@@ -58,5 +61,5 @@ export declare class ElderLocalizedInputComponent<T extends Localized = Localize
58
61
  private displayTextField;
59
62
  private toHintText;
60
63
  static ɵfac: i0.ɵɵFactoryDeclaration<ElderLocalizedInputComponent<any>, never>;
61
- static ɵcmp: i0.ɵɵComponentDeclaration<ElderLocalizedInputComponent<any>, "elder-localized-input", never, { "textColumns": "textColumns"; }, {}, ["textColumnsQuery"], never, false, never>;
64
+ static ɵcmp: i0.ɵɵComponentDeclaration<ElderLocalizedInputComponent<any>, "elder-localized-input", never, { "textColumns": "textColumns"; "translatedValue": "translatedValue"; }, { "translatedValueChange": "translatedValueChange"; }, ["textColumnsQuery"], never, false, never>;
62
65
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elderbyte/ngx-starter",
3
- "version": "15.13.2",
3
+ "version": "15.14.0",
4
4
  "peerDependencies": {
5
5
  "@angular/core": "^15.0.0 || ^16.0.0",
6
6
  "@angular/common": "^15.0.0 || ^16.0.0",