@po-ui/ng-components 19.5.0-beta.1 → 19.5.1
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.
- package/fesm2022/po-ui-ng-components.mjs +43 -61
- package/fesm2022/po-ui-ng-components.mjs.map +1 -1
- package/lib/services/po-i18n/index.d.ts +0 -1
- package/lib/services/po-i18n/interfaces/po-i18n-config.interface.d.ts +1 -2
- package/lib/services/po-i18n/po-i18n-base.service.d.ts +0 -19
- package/lib/services/po-i18n/po-i18n-config-injection-token.d.ts +1 -1
- package/lib/services/po-i18n/po-i18n.module.d.ts +2 -1
- package/lib/services/po-i18n/po-i18n.service.d.ts +1 -2
- package/package.json +4 -4
- package/po-ui-ng-components-19.5.1.tgz +0 -0
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-update/v14/index.js +1 -1
- package/schematics/ng-update/v15/index.js +1 -1
- package/schematics/ng-update/v16/index.js +1 -1
- package/schematics/ng-update/v17/index.js +1 -1
- package/schematics/ng-update/v18/index.js +2 -2
- package/schematics/ng-update/v19/index.js +2 -2
- package/schematics/ng-update/v2/index.js +1 -1
- package/schematics/ng-update/v3/index.js +1 -1
- package/schematics/ng-update/v4/index.js +1 -1
- package/schematics/ng-update/v5/index.js +1 -1
- package/schematics/ng-update/v6/index.js +1 -1
- package/lib/services/po-i18n/interfaces/po-i18n-config-context.interface.d.ts +0 -18
- package/po-ui-ng-components-19.5.0-beta.1.tgz +0 -0
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export * from './interfaces/po-i18n-config.interface';
|
|
2
|
-
export * from './interfaces/po-i18n-config-context.interface';
|
|
3
2
|
export * from './interfaces/po-i18n-config-default.interface';
|
|
4
3
|
export * from './interfaces/po-i18n-literals.interface';
|
|
5
4
|
export * from './po-i18n.pipe';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { PoI18nConfigDefault } from './po-i18n-config-default.interface';
|
|
2
|
-
import { PoI18nConfigContext } from './po-i18n-config-context.interface';
|
|
3
2
|
/**
|
|
4
3
|
* @description
|
|
5
4
|
*
|
|
@@ -75,5 +74,5 @@ export interface PoI18nConfig {
|
|
|
75
74
|
* ```
|
|
76
75
|
* > Caso a constante contenha alguma literal que o serviço não possua será utilizado a literal da constante.
|
|
77
76
|
*/
|
|
78
|
-
contexts:
|
|
77
|
+
contexts: object;
|
|
79
78
|
}
|
|
@@ -30,24 +30,6 @@ import * as i0 from "@angular/core";
|
|
|
30
30
|
* porém, nenhuma das propriedades são obrigatórias. Caso nenhum parâmetro seja passado, serão buscadas
|
|
31
31
|
* todas as literais do contexto definido com padrão, no idioma definido como padrão.
|
|
32
32
|
*
|
|
33
|
-
* * ## Alterações a partir da versão 19
|
|
34
|
-
* A partir da versão 19, para evitar conflitos com bibliotecas de terceiros que também utilizam i18n,
|
|
35
|
-
* é necessário passar explicitamente o contexto ao chamar `getLiterals`, garantindo a correta exibição das literais.
|
|
36
|
-
* Caso `getLiterals` seja chamado sem parâmetros, o retorno pode vir das configurações da biblioteca de terceiros.
|
|
37
|
-
*
|
|
38
|
-
* **Exemplo de chamada com contexto explícito:**
|
|
39
|
-
* ```typescript
|
|
40
|
-
* poI18nService.getLiterals({ context: 'general' }).subscribe(literals => console.log(literals));
|
|
41
|
-
* ```
|
|
42
|
-
*
|
|
43
|
-
* **Cenário de Contextos Iguais:**
|
|
44
|
-
* Caso tanto a aplicação quanto uma biblioteca de terceiros utilizem o mesmo nome de contexto,
|
|
45
|
-
* o PO UI fará um merge das literais, priorizando os valores definidos na aplicação cliente.
|
|
46
|
-
*
|
|
47
|
-
* **Recomendações:**
|
|
48
|
-
* - Sempre informar o contexto ao chamar `getLiterals` para evitar conflitos de literais.
|
|
49
|
-
* - Caso a aplicação utilize `lazy loading`, utilizar `setLanguage()` para garantir a correta configuração de idioma.
|
|
50
|
-
*
|
|
51
33
|
* Exemplos de requisição:
|
|
52
34
|
* ```
|
|
53
35
|
* literals = {};
|
|
@@ -156,7 +138,6 @@ import * as i0 from "@angular/core";
|
|
|
156
138
|
* }));
|
|
157
139
|
*
|
|
158
140
|
* });
|
|
159
|
-
*
|
|
160
141
|
* ```
|
|
161
142
|
*/
|
|
162
143
|
export declare class PoI18nBaseService {
|
|
@@ -139,6 +139,7 @@ import * as i1 from "../po-language/po-language.module";
|
|
|
139
139
|
* Para aplicações que utilizem a abordagem de módulos com carregamento *lazy loading*, caso seja
|
|
140
140
|
* definida outra configuração do `PoI18nModule`, deve-se atentar os seguintes detalhes:
|
|
141
141
|
*
|
|
142
|
+
* - Caso existam literais comuns na aplicação, estas devem ser reimportadas;
|
|
142
143
|
* - Não defina outra *default language* para este módulo. Caso for definida, será sobreposta para
|
|
143
144
|
* toda a aplicação;
|
|
144
145
|
* - Caso precise de módulos carregados via *lazy loading* com linguagens diferentes, utilize o
|
|
@@ -151,4 +152,4 @@ export declare class PoI18nModule {
|
|
|
151
152
|
static ɵmod: i0.ɵɵNgModuleDeclaration<PoI18nModule, never, [typeof i1.PoLanguageModule], never>;
|
|
152
153
|
static ɵinj: i0.ɵɵInjectorDeclaration<PoI18nModule>;
|
|
153
154
|
}
|
|
154
|
-
export declare function initializeLanguageDefault(
|
|
155
|
+
export declare function initializeLanguageDefault(config: PoI18nConfig, languageService: PoLanguageService): () => void;
|
|
@@ -10,5 +10,4 @@ export declare class PoI18nService extends PoI18nBaseService {
|
|
|
10
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<PoI18nService, never>;
|
|
11
11
|
static ɵprov: i0.ɵɵInjectableDeclaration<PoI18nService>;
|
|
12
12
|
}
|
|
13
|
-
export declare function returnPoI18nService(
|
|
14
|
-
export declare function mergePoI18nConfigs(objects: Array<any>): any;
|
|
13
|
+
export declare function returnPoI18nService(config: PoI18nConfig, http: HttpClient, languageService: PoLanguageService): PoI18nService;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@po-ui/ng-components",
|
|
3
|
-
"version": "19.5.
|
|
3
|
+
"version": "19.5.1",
|
|
4
4
|
"description": "PO UI - Components",
|
|
5
5
|
"author": "PO UI",
|
|
6
6
|
"license": "MIT",
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@angular/cdk": "~19.0.3",
|
|
25
|
-
"@po-ui/style": "19.5.
|
|
26
|
-
"@po-ui/ng-schematics": "19.5.
|
|
25
|
+
"@po-ui/style": "19.5.1",
|
|
26
|
+
"@po-ui/ng-schematics": "19.5.1",
|
|
27
27
|
"tslib": "^2.6.2"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@angular/platform-browser-dynamic": "^19",
|
|
38
38
|
"@angular/router": "^19",
|
|
39
39
|
"@angular-devkit/schematics": "^19",
|
|
40
|
-
"@po-ui/style": "19.5.
|
|
40
|
+
"@po-ui/style": "19.5.1",
|
|
41
41
|
"rxjs": "~7.8.1",
|
|
42
42
|
"zone.js": "~0.15.0"
|
|
43
43
|
},
|
|
Binary file
|
|
@@ -18,7 +18,7 @@ function default_1(options) {
|
|
|
18
18
|
}
|
|
19
19
|
function addPoPackageAndInstall() {
|
|
20
20
|
return (tree, context) => {
|
|
21
|
-
(0, package_config_1.addPackageToPackageJson)(tree, '@po-ui/ng-components', '19.5.
|
|
21
|
+
(0, package_config_1.addPackageToPackageJson)(tree, '@po-ui/ng-components', '19.5.1');
|
|
22
22
|
// install packages
|
|
23
23
|
context.addTask(new tasks_1.NodePackageInstallTask());
|
|
24
24
|
};
|
|
@@ -6,7 +6,7 @@ const tasks_1 = require("@angular-devkit/schematics/tasks");
|
|
|
6
6
|
const package_config_1 = require("@po-ui/ng-schematics/package-config");
|
|
7
7
|
const changes_1 = require("./changes");
|
|
8
8
|
function default_1() {
|
|
9
|
-
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.5.
|
|
9
|
+
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.5.1', changes_1.updateDepedenciesVersion), postUpdate()]);
|
|
10
10
|
}
|
|
11
11
|
function postUpdate() {
|
|
12
12
|
return (_, context) => {
|
|
@@ -11,7 +11,7 @@ const changes_1 = require("./changes");
|
|
|
11
11
|
const httpClientModuleName = 'HttpClientModule';
|
|
12
12
|
const httpClientModuleSourcePath = '@angular/common/http';
|
|
13
13
|
function default_1() {
|
|
14
|
-
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.5.
|
|
14
|
+
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.5.1', changes_1.updateDepedenciesVersion), createUpgradeRule(), postUpdate()]);
|
|
15
15
|
}
|
|
16
16
|
function postUpdate() {
|
|
17
17
|
return (_, context) => {
|
|
@@ -6,7 +6,7 @@ const tasks_1 = require("@angular-devkit/schematics/tasks");
|
|
|
6
6
|
const package_config_1 = require("@po-ui/ng-schematics/package-config");
|
|
7
7
|
const changes_1 = require("./changes");
|
|
8
8
|
function default_1() {
|
|
9
|
-
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.5.
|
|
9
|
+
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.5.1', changes_1.updateDepedenciesVersion), postUpdate()]);
|
|
10
10
|
}
|
|
11
11
|
function postUpdate() {
|
|
12
12
|
return (_, context) => {
|
|
@@ -6,7 +6,7 @@ const tasks_1 = require("@angular-devkit/schematics/tasks");
|
|
|
6
6
|
const package_config_1 = require("@po-ui/ng-schematics/package-config");
|
|
7
7
|
const changes_1 = require("./changes");
|
|
8
8
|
function default_1() {
|
|
9
|
-
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.5.
|
|
9
|
+
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.5.1', changes_1.updateDepedenciesVersion), postUpdate()]);
|
|
10
10
|
}
|
|
11
11
|
function postUpdate() {
|
|
12
12
|
return (_, context) => {
|
|
@@ -40,11 +40,11 @@ function main(options) {
|
|
|
40
40
|
configureNewIcon.toLowerCase() === 'y' ||
|
|
41
41
|
configureNewIcon.toLowerCase() === 'sim' ||
|
|
42
42
|
configureNewIcon.toLowerCase() === '') {
|
|
43
|
-
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.5.
|
|
43
|
+
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.5.1', changes_1.updateDepedenciesVersion), createUpgradeRule(), postUpdate()]);
|
|
44
44
|
}
|
|
45
45
|
else {
|
|
46
46
|
return (0, schematics_1.chain)([
|
|
47
|
-
(0, package_config_1.updatePackageJson)('19.5.
|
|
47
|
+
(0, package_config_1.updatePackageJson)('19.5.1', changes_1.updateDepedenciesVersion),
|
|
48
48
|
addImportOnly(options, [IconsDictionaryName, poIconDictionary], poModuleSourcePath),
|
|
49
49
|
addProviderToAppModule(options, newProviderDictionary),
|
|
50
50
|
updateAppConfigFileRule(),
|
|
@@ -40,11 +40,11 @@ function main(options) {
|
|
|
40
40
|
configureNewIcon.toLowerCase() === 'y' ||
|
|
41
41
|
configureNewIcon.toLowerCase() === 'sim' ||
|
|
42
42
|
configureNewIcon.toLowerCase() === '') {
|
|
43
|
-
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.5.
|
|
43
|
+
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.5.1', changes_1.updateDepedenciesVersion), createUpgradeRule(), postUpdate()]);
|
|
44
44
|
}
|
|
45
45
|
else {
|
|
46
46
|
return (0, schematics_1.chain)([
|
|
47
|
-
(0, package_config_1.updatePackageJson)('19.5.
|
|
47
|
+
(0, package_config_1.updatePackageJson)('19.5.1', changes_1.updateDepedenciesVersion),
|
|
48
48
|
addImportOnly(options, [IconsDictionaryName, poIconDictionary], poModuleSourcePath),
|
|
49
49
|
addProviderToAppModule(options, newProviderDictionary),
|
|
50
50
|
updateAppConfigFileRule(),
|
|
@@ -10,7 +10,7 @@ const package_config_1 = require("@po-ui/ng-schematics/package-config");
|
|
|
10
10
|
const changes_1 = require("./changes");
|
|
11
11
|
function updateToV2() {
|
|
12
12
|
return (0, schematics_1.chain)([
|
|
13
|
-
updatePackageJson('19.5.
|
|
13
|
+
updatePackageJson('19.5.1', changes_1.dependeciesChanges),
|
|
14
14
|
(0, replace_1.replaceInFile)('tslint.json', changes_1.tsLintReplaces),
|
|
15
15
|
(0, replace_1.replaceInFile)('angular.json', changes_1.angularJsonReplaces),
|
|
16
16
|
createUpgradeRule(),
|
|
@@ -7,7 +7,7 @@ const project_1 = require("@po-ui/ng-schematics/project");
|
|
|
7
7
|
const package_config_1 = require("@po-ui/ng-schematics/package-config");
|
|
8
8
|
const changes_1 = require("./changes");
|
|
9
9
|
function updateToV3() {
|
|
10
|
-
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.5.
|
|
10
|
+
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.5.1', changes_1.updateDepedenciesVersion), createUpgradeRule(), postUpdate()]);
|
|
11
11
|
}
|
|
12
12
|
function postUpdate() {
|
|
13
13
|
return (_, context) => {
|
|
@@ -7,7 +7,7 @@ const project_1 = require("@po-ui/ng-schematics/project");
|
|
|
7
7
|
const package_config_1 = require("@po-ui/ng-schematics/package-config");
|
|
8
8
|
const changes_1 = require("./changes");
|
|
9
9
|
function default_1() {
|
|
10
|
-
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.5.
|
|
10
|
+
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.5.1', changes_1.updateDepedenciesVersion), createUpgradeRule(), postUpdate()]);
|
|
11
11
|
}
|
|
12
12
|
function postUpdate() {
|
|
13
13
|
return (_, context) => {
|
|
@@ -7,7 +7,7 @@ const project_1 = require("@po-ui/ng-schematics/project");
|
|
|
7
7
|
const package_config_1 = require("@po-ui/ng-schematics/package-config");
|
|
8
8
|
const changes_1 = require("./changes");
|
|
9
9
|
function default_1() {
|
|
10
|
-
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.5.
|
|
10
|
+
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.5.1', changes_1.updateDepedenciesVersion), createUpgradeRule(), postUpdate()]);
|
|
11
11
|
}
|
|
12
12
|
function postUpdate() {
|
|
13
13
|
return (_, context) => {
|
|
@@ -6,7 +6,7 @@ const tasks_1 = require("@angular-devkit/schematics/tasks");
|
|
|
6
6
|
const package_config_1 = require("@po-ui/ng-schematics/package-config");
|
|
7
7
|
const changes_1 = require("./changes");
|
|
8
8
|
function default_1() {
|
|
9
|
-
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.5.
|
|
9
|
+
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.5.1', changes_1.updateDepedenciesVersion), postUpdate()]);
|
|
10
10
|
}
|
|
11
11
|
function postUpdate() {
|
|
12
12
|
return (_, context) => {
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description
|
|
3
|
-
*
|
|
4
|
-
* <a id="poI18nConfigContext"></a>
|
|
5
|
-
*
|
|
6
|
-
* Interface para a configuração dos contextos do módulo `PoI18nModule`.
|
|
7
|
-
*
|
|
8
|
-
* @usedBy PoI18nModule
|
|
9
|
-
*/
|
|
10
|
-
export interface PoI18nConfigContext {
|
|
11
|
-
[name: string]: {
|
|
12
|
-
[language: string]: {
|
|
13
|
-
[literal: string]: string;
|
|
14
|
-
};
|
|
15
|
-
} | {
|
|
16
|
-
url: string;
|
|
17
|
-
};
|
|
18
|
-
}
|
|
Binary file
|