@decaf-ts/for-angular 0.0.22 → 0.0.23

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.
@@ -1,10 +1,16 @@
1
- import { ModuleWithProviders } from '@angular/core';
1
+ import { ModuleWithProviders, InjectionToken } from '@angular/core';
2
2
  import { Logger } from '@decaf-ts/logging';
3
- import { FunctionLike } from './engine';
3
+ import { FunctionLike, I18nResourceConfig } from './engine';
4
+ import { DecafRepositoryAdapter } from './engine/types';
4
5
  import * as i0 from "@angular/core";
5
6
  import * as i1 from "@angular/common";
6
7
  import * as i2 from "@angular/forms";
7
8
  import * as i3 from "@ngx-translate/core";
9
+ export declare const DB_ADAPTER_PROVIDER_TOKEN: InjectionToken<DecafRepositoryAdapter>;
10
+ export declare const I18N_CONFIG_TOKEN: InjectionToken<{
11
+ resources: I18nResourceConfig[];
12
+ versionedSuffix: boolean;
13
+ }>;
8
14
  export declare function getLogger(instance: string | FunctionLike | unknown): Logger;
9
15
  /**
10
16
  * @description Main Angular module for the Decaf framework
package/i18n/Loader.d.ts CHANGED
@@ -2,7 +2,6 @@ import { HttpClient } from '@angular/common/http';
2
2
  import { TranslateLoader, TranslationObject } from '@ngx-translate/core';
3
3
  import { Observable } from 'rxjs';
4
4
  import { I18nResourceConfig } from '../engine/interfaces';
5
- import { InjectionToken } from '@angular/core';
6
5
  import { FunctionLike } from '../engine';
7
6
  export declare class I18nLoader {
8
7
  static loadFromHttp(http: HttpClient): TranslateLoader;
@@ -23,15 +22,11 @@ export declare function getLocaleContext(clazz: FunctionLike | object | string,
23
22
  * @memberOf module:for-angular
24
23
  */
25
24
  export declare function getLocaleContextByKey(locale: string, phrase: string | undefined): string;
26
- export declare const I18N_CONFIG_TOKEN: InjectionToken<{
27
- resources: I18nResourceConfig[];
28
- versionedSuffix: false;
29
- }>;
30
25
  export declare function I18nLoaderFactory(http: HttpClient): TranslateLoader;
31
26
  export declare function getI18nLoaderFactoryProviderConfig(resources?: I18nResourceConfig | I18nResourceConfig[], versionedSuffix?: boolean): {
32
- provide: InjectionToken<{
27
+ provide: import("@angular/core").InjectionToken<{
33
28
  resources: I18nResourceConfig[];
34
- versionedSuffix: false;
29
+ versionedSuffix: boolean;
35
30
  }>;
36
31
  useValue: {
37
32
  resources: I18nResourceConfig[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decaf-ts/for-angular",
3
- "version": "0.0.22",
3
+ "version": "0.0.23",
4
4
  "author": "Tiago Venceslau",
5
5
  "license": "AGPL-3.0-or-later",
6
6
  "repository": {
@@ -12,15 +12,15 @@
12
12
  "npm": ">=10.0.0"
13
13
  },
14
14
  "peerDependencies": {
15
- "@angular/animations": "^18.2.13",
15
+ "@angular/animations": "^18.2.14",
16
16
  "@angular/cdk": "^18.2.14",
17
- "@angular/common": "^18.2.13",
18
- "@angular/compiler": "^18.2.13",
19
- "@angular/core": "^18.2.13",
20
- "@angular/forms": "^18.2.13",
21
- "@angular/platform-browser": "^18.2.13",
22
- "@angular/platform-browser-dynamic": "^18.2.13",
23
- "@angular/router": "^18.2.13",
17
+ "@angular/common": "^18.2.14",
18
+ "@angular/compiler": "^18.2.14",
19
+ "@angular/core": "^18.2.14",
20
+ "@angular/forms": "^18.2.14",
21
+ "@angular/platform-browser": "^18.2.14",
22
+ "@angular/platform-browser-dynamic": "^18.2.14",
23
+ "@angular/router": "^18.2.14",
24
24
  "@decaf-ts/cli": "latest",
25
25
  "@decaf-ts/core": "latest",
26
26
  "@decaf-ts/db-decorators": "latest",
@@ -1,80 +0,0 @@
1
- {
2
- "errors": {
3
- "required": "This field is required.",
4
- "pattern": "The provided value does not match the pattern.",
5
- "min": "The minimum value for this field is {0}.",
6
- "max": "The maximum value for this field is {0}.",
7
- "minlength": "The minimum length for this field is {0}.",
8
- "maxlength": "The maximum length for this field is {0}.",
9
- "equal": "This field must be equal to {0}",
10
- "default": "This value appears to be invalid.",
11
- "unique": "Field {0} must be unique",
12
- "password": "Password must be at least 8 characters and contain one of number, lower and upper case letters, and special character (@$!%*?&_-.,)",
13
- "email": "This field must be a valid email address.",
14
- "url": "This field must be a valid URL.",
15
- "number": "This field must be a valid number.",
16
- "integer": "This field must be a valid integer.",
17
- "digits": "This field must contain only digits.",
18
- "alphanum": "This field must be alphanumeric.",
19
- "file": "Only {0} files are allowed",
20
- "equals": "This field must be equal to field {0}",
21
- "different": "This field must be different from field {0}",
22
- "lessThan": "This field must be less than field {0}",
23
- "lessThanOrEqual": "This field must be less than or equal to field {0}",
24
- "greaterThan": "This field must be greater than field {0}",
25
- "greaterThanOrEqual": "This field must be greater than or equal to field {0}"
26
- },
27
- "component": {
28
- "fieldset": {
29
- "add": "Add another",
30
- "update": "Update item",
31
- "cancel": "Cancel",
32
- "not_unique": "The value entered already exists. Value \"{{value}}\""
33
- },
34
- "list": {
35
- "pagination": "Showing page <span class=\"text-bold\">{{value0}} of {{value1}}</span>",
36
- "loading": "Loading data",
37
- "search": {
38
- "title": "Not data found for search",
39
- "subtitle": "You searched for: <ion-text color=\"primary\" class=\"display-block ion-text-center text-bold\">{{value0}}</ion-text>",
40
- "button": "Clear search"
41
- },
42
- "empty": {
43
- "title": "No data found",
44
- "subtitle": "",
45
- "button": "Create"
46
- }
47
- },
48
- "list_item": {
49
- "actions": "Actions",
50
- "operations": {
51
- "read": "Read",
52
- "create": "Create",
53
- "update": "Update",
54
- "delete": "Delete"
55
- }
56
- },
57
- "empty_state": {
58
- "title": "No data found",
59
- "button": "Create",
60
- "search": {
61
- "title": "Not data found for search",
62
- "subtitle": "You searched for: <ion-text color=\"primary\" class=\"display-block ion-text-center text-bold\">{{value0}}</ion-text>",
63
- "button": "Clear search"
64
- }
65
- },
66
- "pagination": {
67
- "resume": "Showing page <span class=\"text-bold\">{{value0}} of {{value1}}</span>"
68
- },
69
- "filter": {
70
- "title": "Filter",
71
- "type": "Type value",
72
- "select": "Filter selection",
73
- "step1": "Select an index",
74
- "step2": "Select a condition",
75
- "step3": "Type a value",
76
- "no_suggestions": "No suggestions",
77
- "sort": "Sort by"
78
- }
79
- }
80
- }
@@ -1,80 +0,0 @@
1
- {
2
- "errors": {
3
- "required": "Este campo é obrigatório.",
4
- "pattern": "O valor fornecido não corresponde ao padrão.",
5
- "min": "O valor mínimo para este campo é {0}.",
6
- "max": "O valor máximo para este campo é {0}.",
7
- "minlength": "O comprimento mínimo para este campo é {0}.",
8
- "maxlength": "O comprimento máximo para este campo é {0}.",
9
- "equal": "Este campo deve ser igual a {0}",
10
- "default": "Este valor parece ser inválido.",
11
- "unique": "O campo {0} deve ser único",
12
- "password": "A palavra-passe deve ter pelo menos 8 caracteres e conter um número, letras maiúsculas e minúsculas, e um carácter especial (@$!%*?&_-.,)",
13
- "email": "Este campo deve conter um endereço de e-mail válido.",
14
- "url": "Este campo deve conter um URL válido.",
15
- "number": "Este campo deve conter um número válido.",
16
- "integer": "Este campo deve conter um número inteiro válido.",
17
- "digits": "Este campo deve conter apenas dígitos.",
18
- "alphanum": "Este campo deve ser alfanumérico.",
19
- "file": "Apenas {0} ficheiros são permitidos",
20
- "equals": "Este campo deve ser igual ao campo {0}",
21
- "different": "Este campo deve ser diferente do campo {0}",
22
- "lessThan": "Este campo deve ser inferior ao campo {0}",
23
- "lessThanOrEqual": "Este campo deve ser inferior ou igual ao campo {0}",
24
- "greaterThan": "Este campo deve ser superior ao campo {0}",
25
- "greaterThanOrEqual": "Este campo deve ser superior ou igual ao campo {0}"
26
- },
27
- "component": {
28
- "fieldset": {
29
- "add": "Adicionar outro",
30
- "update": "Atualizar item",
31
- "not_unique": "O valor introduzido já existe. Valor \"{{value}}\".",
32
- "cancel": "Cancelar"
33
- },
34
- "list": {
35
- "pagination": "A mostrar a página <span class=\"text-bold\">{{value0}} de {{value1}}</span>",
36
- "loading": "A carregar dados",
37
- "search": {
38
- "title": "Não foram encontrados dados para a pesquisa",
39
- "subtitle": "Pesquisou por: <ion-text color=\"primary\" class=\"display-block ion-text-center text-bold\">{{value0}}</ion-text>",
40
- "button": "Limpar pesquisa"
41
- },
42
- "empty": {
43
- "title": "Não foram encontrados dados",
44
- "subtitle": "",
45
- "button": "Criar"
46
- }
47
- },
48
- "list_item": {
49
- "actions": "Ações",
50
- "operations": {
51
- "read": "Ler",
52
- "create": "Criar",
53
- "update": "Atualizar",
54
- "delete": "Eliminar"
55
- }
56
- },
57
- "empty_state": {
58
- "title": "Não foram encontrados dados",
59
- "button": "Criar",
60
- "search": {
61
- "title": "Não foram encontrados dados para a pesquisa",
62
- "subtitle": "Pesquisou por: <ion-text color=\"primary\" class=\"display-block ion-text-center text-bold\">{{value0}}</ion-text>",
63
- "button": "Limpar pesquisa"
64
- }
65
- },
66
- "pagination": {
67
- "resume": "A mostrar a página <span class=\"text-bold\">{{value0}} de {{value1}}</span>"
68
- },
69
- "filter": {
70
- "title": "Filtro",
71
- "type": "Escreva um valor",
72
- "select": "Seleção de filtro",
73
- "step1": "Selecione um índice",
74
- "step2": "Selecione uma condição",
75
- "step3": "Escreva um valor",
76
- "no_suggestions": "Sem sugestões",
77
- "sort": "Ordenar por"
78
- }
79
- }
80
- }
@@ -1,25 +0,0 @@
1
- import { Adapter, Repository } from '@decaf-ts/core';
2
- import { Context, RepositoryFlags } from '@decaf-ts/db-decorators';
3
- import { Constructor, Model } from '@decaf-ts/decorator-validation';
4
- export declare enum ListComponentsTypes {
5
- INFINITE = "infinite",
6
- PAGINATED = "paginated"
7
- }
8
- export interface IListEmptyResult {
9
- title: string;
10
- subtitle: string;
11
- showButton: boolean;
12
- buttonText: string;
13
- link: string;
14
- icon: string;
15
- }
16
- export interface RawQuery<M extends Model> {
17
- select: undefined | (keyof M)[];
18
- from: Constructor<M>;
19
- where: (el: M) => boolean;
20
- sort?: (el: M, el2: M) => number;
21
- limit?: number;
22
- skip?: number;
23
- }
24
- export type DecafRepositoryAdapter<F extends RepositoryFlags = RepositoryFlags, C extends Context<F> = Context<F>> = Adapter<any, any, RawQuery<any>, F, C>;
25
- export type DecafRepository<M extends Model> = Repository<M, RawQuery<M>, DecafRepositoryAdapter<RepositoryFlags, Context<RepositoryFlags>>, RepositoryFlags, Context<RepositoryFlags>>;
@@ -1,6 +0,0 @@
1
- export var ListComponentsTypes;
2
- (function (ListComponentsTypes) {
3
- ListComponentsTypes["INFINITE"] = "infinite";
4
- ListComponentsTypes["PAGINATED"] = "paginated";
5
- })(ListComponentsTypes || (ListComponentsTypes = {}));
6
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uc3RhbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vc3JjL2xpYi9jb21wb25lbnRzL2xpc3QvY29uc3RhbnRzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUlBLE1BQU0sQ0FBTixJQUFZLG1CQUdYO0FBSEQsV0FBWSxtQkFBbUI7SUFDN0IsNENBQXFCLENBQUE7SUFDckIsOENBQXVCLENBQUE7QUFDekIsQ0FBQyxFQUhXLG1CQUFtQixLQUFuQixtQkFBbUIsUUFHOUIiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBBZGFwdGVyLCBSZXBvc2l0b3J5IH0gZnJvbSAnQGRlY2FmLXRzL2NvcmUnO1xuaW1wb3J0IHsgQ29udGV4dCwgUmVwb3NpdG9yeUZsYWdzIH0gZnJvbSAnQGRlY2FmLXRzL2RiLWRlY29yYXRvcnMnO1xuaW1wb3J0IHsgQ29uc3RydWN0b3IsIE1vZGVsIH0gZnJvbSAnQGRlY2FmLXRzL2RlY29yYXRvci12YWxpZGF0aW9uJztcblxuZXhwb3J0IGVudW0gTGlzdENvbXBvbmVudHNUeXBlcyB7XG4gIElORklOSVRFID0gJ2luZmluaXRlJyxcbiAgUEFHSU5BVEVEID0gJ3BhZ2luYXRlZCcsXG59XG5cbmV4cG9ydCBpbnRlcmZhY2UgSUxpc3RFbXB0eVJlc3VsdCB7XG4gIHRpdGxlOiBz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