@o3r/localization 11.6.0-prerelease.2 → 11.6.0-prerelease.21
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/annotations/localization.d.ts.map +1 -1
- package/builders/helpers/localization.generator.d.ts +1 -1
- package/builders/helpers/localization.generator.d.ts.map +1 -1
- package/builders/helpers/localization.generator.js +20 -22
- package/builders/i18n/index.d.ts.map +1 -1
- package/builders/i18n/index.js +2 -2
- package/builders/i18n/schema.d.ts +0 -2
- package/builders/i18n/schema.d.ts.map +1 -1
- package/builders/localization/index.d.ts +0 -2
- package/builders/localization/index.d.ts.map +1 -1
- package/builders/localization/index.js +28 -41
- package/builders/localization/schema.d.ts.map +1 -1
- package/builders/localization-extractor/index.d.ts.map +1 -1
- package/builders/localization-extractor/index.js +19 -19
- package/builders/localization-extractor/schema.d.ts.map +1 -1
- package/builders/localization-extractor/validations.d.ts +0 -2
- package/builders/localization-extractor/validations.d.ts.map +1 -1
- package/builders/localization-extractor/validations.js +3 -7
- package/builders/metadata-check/helpers/localization-metadata-comparison.helper.d.ts +2 -2
- package/builders/metadata-check/helpers/localization-metadata-comparison.helper.d.ts.map +1 -1
- package/builders/metadata-check/index.d.ts.map +1 -1
- package/builders/metadata-check/schema.d.ts.map +1 -1
- package/core/localization.configuration.d.ts +1 -1
- package/core/localization.configuration.d.ts.map +1 -1
- package/core/translatable.d.ts.map +1 -1
- package/core/translate-messageformat-lazy.compiler.d.ts +1 -1
- package/core/translate-messageformat-lazy.compiler.d.ts.map +1 -1
- package/devkit/localization-devkit.interface.d.ts.map +1 -1
- package/devkit/localization-devtools.console.service.d.ts.map +1 -1
- package/devkit/localization-devtools.message.service.d.ts +1 -2
- package/devkit/localization-devtools.message.service.d.ts.map +1 -1
- package/devkit/localization-devtools.module.d.ts.map +1 -1
- package/devkit/localization-devtools.service.d.ts.map +1 -1
- package/devkit/localization-devtools.token.d.ts +1 -1
- package/devkit/localization-devtools.token.d.ts.map +1 -1
- package/esm2022/annotations/localization.mjs +3 -3
- package/esm2022/core/index.mjs +1 -1
- package/esm2022/core/localization.configuration.mjs +1 -1
- package/esm2022/core/translatable.mjs +1 -1
- package/esm2022/core/translate-messageformat-lazy.compiler.mjs +12 -13
- package/esm2022/devkit/index.mjs +1 -1
- package/esm2022/devkit/localization-devkit.interface.mjs +1 -1
- package/esm2022/devkit/localization-devtools.console.service.mjs +8 -10
- package/esm2022/devkit/localization-devtools.message.service.mjs +12 -13
- package/esm2022/devkit/localization-devtools.module.mjs +11 -11
- package/esm2022/devkit/localization-devtools.service.mjs +8 -8
- package/esm2022/devkit/localization-devtools.token.mjs +2 -2
- package/esm2022/public_api.mjs +1 -2
- package/esm2022/rules-engine/localization.handler-action.mjs +8 -8
- package/esm2022/rules-engine/localization.interfaces.mjs +1 -1
- package/esm2022/rules-engine/localization.rules-engine.module.mjs +8 -8
- package/esm2022/stores/index.mjs +1 -1
- package/esm2022/stores/localization-override/localization-override.actions.mjs +2 -2
- package/esm2022/stores/localization-override/localization-override.module.mjs +9 -9
- package/esm2022/stores/localization-override/localization-override.reducer.mjs +2 -2
- package/esm2022/stores/localization-override/localization-override.selectors.mjs +3 -3
- package/esm2022/stores/localization-override/localization-override.state.mjs +1 -1
- package/esm2022/stores/localization-override/localization-override.sync.mjs +2 -2
- package/esm2022/tools/index.mjs +1 -1
- package/esm2022/tools/localization-translate.directive.mjs +9 -9
- package/esm2022/tools/localization-translate.pipe.mjs +11 -11
- package/esm2022/tools/localization.module.mjs +27 -25
- package/esm2022/tools/localization.provider.mjs +7 -7
- package/esm2022/tools/localization.service.mjs +21 -26
- package/esm2022/tools/localization.token.mjs +2 -2
- package/esm2022/tools/localized-currency.pipe.mjs +7 -7
- package/esm2022/tools/localized-date.pipe.mjs +8 -13
- package/esm2022/tools/localized-decimal.pipe.mjs +7 -7
- package/esm2022/tools/text-direction.service.mjs +9 -9
- package/esm2022/tools/text-directionality.service.mjs +7 -7
- package/esm2022/tools/translations-loader.mjs +16 -16
- package/fesm2022/o3r-localization-rules-engine.mjs +7 -7
- package/fesm2022/o3r-localization-rules-engine.mjs.map +1 -1
- package/fesm2022/o3r-localization.mjs +87 -99
- package/fesm2022/o3r-localization.mjs.map +1 -1
- package/migration.json +5 -0
- package/package.json +6 -6
- package/public_api.d.ts +0 -1
- package/public_api.d.ts.map +1 -1
- package/rules-engine/localization.handler-action.d.ts +1 -1
- package/rules-engine/localization.handler-action.d.ts.map +1 -1
- package/rules-engine/localization.interfaces.d.ts.map +1 -1
- package/rules-engine/localization.rules-engine.module.d.ts.map +1 -1
- package/schematics/add-localization-key/index.d.ts.map +1 -1
- package/schematics/add-localization-key/index.js +34 -16
- package/schematics/add-localization-key/schema.d.ts.map +1 -1
- package/schematics/cms-adapter/index.d.ts.map +1 -1
- package/schematics/cms-adapter/index.js +1 -1
- package/schematics/localization-base/index.d.ts.map +1 -1
- package/schematics/localization-base/index.js +25 -26
- package/schematics/localization-to-component/index.d.ts.map +1 -1
- package/schematics/localization-to-component/index.js +10 -5
- package/schematics/localization-to-component/schema.d.ts.map +1 -1
- package/schematics/localization-to-component/templates/__name__.translation.ts.template +1 -1
- package/schematics/ng-add/helpers/devtools-registration.d.ts +0 -3
- package/schematics/ng-add/helpers/devtools-registration.d.ts.map +1 -1
- package/schematics/ng-add/helpers/devtools-registration.js +2 -5
- package/schematics/ng-add/index.d.ts.map +1 -1
- package/schematics/ng-add/index.js +2 -8
- package/schematics/ng-add/schema.d.ts.map +1 -1
- package/schematics/ng-update/v10-0/index.d.ts.map +1 -1
- package/schematics/ng-update/v10-0/index.js +2 -1
- package/schematics/ng-update/v11-6/index.d.ts +6 -0
- package/schematics/ng-update/v11-6/index.d.ts.map +1 -0
- package/schematics/ng-update/v11-6/index.js +22 -0
- package/stores/localization-override/localization-override.actions.d.ts.map +1 -1
- package/stores/localization-override/localization-override.module.d.ts.map +1 -1
- package/stores/localization-override/localization-override.reducer.d.ts.map +1 -1
- package/stores/localization-override/localization-override.selectors.d.ts.map +1 -1
- package/stores/localization-override/localization-override.state.d.ts.map +1 -1
- package/stores/localization-override/localization-override.sync.d.ts.map +1 -1
- package/tools/localization-translate.directive.d.ts.map +1 -1
- package/tools/localization-translate.pipe.d.ts.map +1 -1
- package/tools/localization.module.d.ts.map +1 -1
- package/tools/localization.provider.d.ts +1 -1
- package/tools/localization.provider.d.ts.map +1 -1
- package/tools/localization.service.d.ts.map +1 -1
- package/tools/localization.token.d.ts.map +1 -1
- package/tools/localized-currency.pipe.d.ts.map +1 -1
- package/tools/localized-date.pipe.d.ts.map +1 -1
- package/tools/localized-decimal.pipe.d.ts.map +1 -1
- package/tools/text-direction.service.d.ts.map +1 -1
- package/tools/text-directionality.service.d.ts.map +1 -1
- package/tools/translations-loader.d.ts +2 -2
- package/tools/translations-loader.d.ts.map +1 -1
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ngAddLocalizationKey = void 0;
|
|
4
4
|
exports.ngAddLocalizationKeyFn = ngAddLocalizationKeyFn;
|
|
5
|
-
const
|
|
5
|
+
const node_path_1 = require("node:path");
|
|
6
6
|
const prompt_1 = require("@angular/cli/src/utilities/prompt");
|
|
7
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
7
8
|
const schematics_2 = require("@o3r/schematics");
|
|
8
|
-
const node_path_1 = require("node:path");
|
|
9
9
|
const ts = require("typescript");
|
|
10
10
|
class NoLocalizationArchitecture extends Error {
|
|
11
11
|
constructor(componentPath) {
|
|
@@ -45,7 +45,7 @@ const getLocalizationInformation = (componentPath, tree) => {
|
|
|
45
45
|
throw new NoLocalizationArchitecture(componentPath);
|
|
46
46
|
}
|
|
47
47
|
if (!defaultTranslationVariableName) {
|
|
48
|
-
const constructor = o3rClass.members.find(ts.isConstructorDeclaration);
|
|
48
|
+
const constructor = o3rClass.members.find((member) => ts.isConstructorDeclaration(member));
|
|
49
49
|
if (constructor?.body) {
|
|
50
50
|
constructor.body.statements.forEach((statement) => {
|
|
51
51
|
if (ts.isExpressionStatement(statement)
|
|
@@ -66,7 +66,7 @@ const getLocalizationInformation = (componentPath, tree) => {
|
|
|
66
66
|
&& !!statement.importClause
|
|
67
67
|
&& !!statement.importClause.namedBindings
|
|
68
68
|
&& ts.isNamedImports(statement.importClause.namedBindings)
|
|
69
|
-
&&
|
|
69
|
+
&& statement.importClause.namedBindings.elements.some((element) => ts.isIdentifier(element.name) && element.name.escapedText.toString() === defaultTranslationVariableName));
|
|
70
70
|
if (!importDeclaration) {
|
|
71
71
|
throw new schematics_2.O3rCliError(`Unable to find import declaration of ${defaultTranslationVariableName} in ${componentPath}`);
|
|
72
72
|
}
|
|
@@ -97,16 +97,18 @@ function ngAddLocalizationKeyFn(options) {
|
|
|
97
97
|
throw new KeyAlreadyExists(properties.keyValue, localizationJsonPath);
|
|
98
98
|
}
|
|
99
99
|
const translationFileContent = tree.readText(translationsPath);
|
|
100
|
-
if (
|
|
100
|
+
if (new RegExp(`${properties.keyName}:`).test(translationFileContent)) {
|
|
101
101
|
throw new KeyAlreadyExists(properties.keyName, translationsPath);
|
|
102
102
|
}
|
|
103
103
|
const updateLocalizationFileRule = () => {
|
|
104
104
|
localizationJson[properties.keyValue] = {
|
|
105
|
-
...(properties.dictionnary
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
105
|
+
...(properties.dictionnary
|
|
106
|
+
? {
|
|
107
|
+
dictionnary: true
|
|
108
|
+
}
|
|
109
|
+
: {
|
|
110
|
+
defaultValue: properties.defaultValue
|
|
111
|
+
}),
|
|
110
112
|
description: properties.description
|
|
111
113
|
};
|
|
112
114
|
tree.overwrite(localizationJsonPath, JSON.stringify(localizationJson, null, 2));
|
|
@@ -122,12 +124,28 @@ function ngAddLocalizationKeyFn(options) {
|
|
|
122
124
|
return factory.updateInterfaceDeclaration(node, ts.getModifiers(node), node.name, node.typeParameters, node.heritageClauses, node.members.concat(factory.createPropertySignature(undefined, factory.createIdentifier(properties.keyName), undefined, factory.createKeywordTypeNode(ts.SyntaxKind.StringKeyword))));
|
|
123
125
|
}
|
|
124
126
|
if (ts.isVariableDeclaration(node)
|
|
125
|
-
&& node.type
|
|
126
|
-
&& ts.
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
127
|
+
&& node.type
|
|
128
|
+
&& ((ts.isTypeReferenceNode(node.type)
|
|
129
|
+
&& ts.isIdentifier(node.type.typeName)
|
|
130
|
+
&& node.type.typeName.escapedText.toString() === translationsVariableType)
|
|
131
|
+
|| (ts.isTypeReferenceNode(node.type)
|
|
132
|
+
&& ts.isIdentifier(node.type.typeName)
|
|
133
|
+
&& node.type.typeName.escapedText.toString() === 'Readonly'
|
|
134
|
+
&& node.type.typeArguments?.[0]
|
|
135
|
+
&& ts.isTypeReferenceNode(node.type.typeArguments[0])
|
|
136
|
+
&& ts.isIdentifier(node.type.typeArguments[0].typeName)
|
|
137
|
+
&& node.type.typeArguments[0].typeName.escapedText.toString() === translationsVariableType))
|
|
138
|
+
&& node.initializer) {
|
|
139
|
+
if (ts.isObjectLiteralExpression(node.initializer)) {
|
|
140
|
+
return factory.updateVariableDeclaration(node, node.name, node.exclamationToken, node.type, factory.updateObjectLiteralExpression(node.initializer, node.initializer.properties.concat(factory.createPropertyAssignment(factory.createIdentifier(properties.keyName), factory.createStringLiteral(properties.keyValue, true)))));
|
|
141
|
+
}
|
|
142
|
+
else if (ts.isAsExpression(node.initializer)
|
|
143
|
+
&& ts.isTypeReferenceNode(node.initializer.type)
|
|
144
|
+
&& ts.isIdentifier(node.initializer.type.typeName)
|
|
145
|
+
&& node.initializer.type.typeName.escapedText.toString() === 'const'
|
|
146
|
+
&& ts.isObjectLiteralExpression(node.initializer.expression)) {
|
|
147
|
+
return factory.updateVariableDeclaration(node, node.name, node.exclamationToken, node.type, factory.updateAsExpression(node.initializer, factory.updateObjectLiteralExpression(node.initializer.expression, node.initializer.expression.properties.concat(factory.createPropertyAssignment(factory.createIdentifier(properties.keyName), factory.createStringLiteral(properties.keyValue, true)))), node.initializer.type));
|
|
148
|
+
}
|
|
131
149
|
}
|
|
132
150
|
return ts.visitEachChild(node, visit, ctx);
|
|
133
151
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../schematics/add-localization-key/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../schematics/add-localization-key/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,WAAW,oCAAqC,SAAQ,qBAAqB;IACjF,4BAA4B;IAC5B,IAAI,EAAE,MAAM,CAAC;IAEb,8BAA8B;IAC9B,UAAU,EAAE,OAAO,CAAC;IAEpB,oDAAoD;IACpD,GAAG,EAAE,MAAM,CAAC;IAEZ,sCAAsC;IACtC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEjC,wCAAwC;IACxC,KAAK,EAAE,MAAM,CAAC;IAEd,2BAA2B;IAC3B,WAAW,EAAE,OAAO,CAAC;IAErB,8EAA8E;IAC9E,cAAc,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CACtC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/cms-adapter/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/cms-adapter/index.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,IAAI,EAGL,MAAM,4BAA4B,CAAC;AAuFpC;;;;GAIG;AACH,eAAO,MAAM,gBAAgB;kBA/EwB,MAAM,GAAG,SAAS;UA+EkB,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.updateCmsAdapter = void 0;
|
|
4
|
+
const path = require("node:path");
|
|
4
5
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
6
|
const schematics_2 = require("@o3r/schematics");
|
|
6
|
-
const path = require("node:path");
|
|
7
7
|
/**
|
|
8
8
|
* Update CMS adapter tools
|
|
9
9
|
* @param options @see RuleFactory.options
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/localization-base/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/localization-base/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAQL,IAAI,EAKL,MAAM,4BAA4B,CAAC;AAqCpC;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE;IAAE,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;CAAE,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CA6Z/G;AA4CD,eAAO,MAAM,UAAU;kBA1CwB,MAAM,GAAG,SAAS;UA0CY,CAAC"}
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.updateI18n = void 0;
|
|
4
4
|
exports.updateLocalization = updateLocalization;
|
|
5
|
+
const fs = require("node:fs");
|
|
6
|
+
const path = require("node:path");
|
|
5
7
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
6
8
|
const schematics_2 = require("@o3r/schematics");
|
|
7
|
-
const ast_utils_1 = require("@schematics/angular/utility/ast-utils");
|
|
8
9
|
const utility_1 = require("@schematics/angular/utility");
|
|
10
|
+
const ast_utils_1 = require("@schematics/angular/utility/ast-utils");
|
|
9
11
|
const change_1 = require("@schematics/angular/utility/change");
|
|
10
|
-
const path = require("node:path");
|
|
11
|
-
const fs = require("node:fs");
|
|
12
12
|
const ts = require("typescript");
|
|
13
13
|
const packageJsonPath = path.resolve(__dirname, '..', '..', 'package.json');
|
|
14
14
|
const ownPackageJson = JSON.parse(fs.readFileSync(packageJsonPath, { encoding: 'utf8' }));
|
|
@@ -24,7 +24,6 @@ function updateLocalization(options, rootPath) {
|
|
|
24
24
|
/**
|
|
25
25
|
* Generate locales folder
|
|
26
26
|
* @param tree
|
|
27
|
-
* @param context
|
|
28
27
|
*/
|
|
29
28
|
const generateLocalesFolder = (tree) => {
|
|
30
29
|
const workspaceProject = options.projectName ? (0, schematics_2.getWorkspaceConfig)(tree)?.projects[options.projectName] : undefined;
|
|
@@ -48,12 +47,13 @@ function updateLocalization(options, rootPath) {
|
|
|
48
47
|
const projectName = options.projectName;
|
|
49
48
|
const workspaceProject = options.projectName ? workspace?.projects[options.projectName] : undefined;
|
|
50
49
|
const projectRoot = path.posix.join(workspaceProject?.root || '');
|
|
51
|
-
const distFolder = (workspaceProject
|
|
52
|
-
workspaceProject.architect
|
|
53
|
-
workspaceProject.architect.build
|
|
54
|
-
workspaceProject.architect.build.options
|
|
55
|
-
|
|
56
|
-
workspaceProject.architect.build.
|
|
50
|
+
const distFolder = (workspaceProject
|
|
51
|
+
&& workspaceProject.architect
|
|
52
|
+
&& workspaceProject.architect.build
|
|
53
|
+
&& workspaceProject.architect.build.options
|
|
54
|
+
&& ((workspaceProject.architect.build.configurations
|
|
55
|
+
&& workspaceProject.architect.build.configurations.production
|
|
56
|
+
&& workspaceProject.architect.build.configurations.production.outputPath) || workspaceProject.architect.build.options.outputPath)) || './dist';
|
|
57
57
|
// exit if not an application
|
|
58
58
|
if (!workspace || !projectName || !workspaceProject || workspaceProject.projectType === 'library') {
|
|
59
59
|
context.logger.debug('No application project found to add translation extraction');
|
|
@@ -95,7 +95,9 @@ function updateLocalization(options, rootPath) {
|
|
|
95
95
|
};
|
|
96
96
|
const projectType = workspaceProject?.projectType || 'application';
|
|
97
97
|
if (projectType === 'application' && workspaceProject.architect.build) {
|
|
98
|
-
const alreadyExistingBuildOption = workspaceProject.architect.build.options?.assets
|
|
98
|
+
const alreadyExistingBuildOption = workspaceProject.architect.build.options?.assets
|
|
99
|
+
?.map((a) => a.output)
|
|
100
|
+
.find((output) => output === '/localizations');
|
|
99
101
|
if (!alreadyExistingBuildOption) {
|
|
100
102
|
workspaceProject.architect.build.options ||= {};
|
|
101
103
|
workspaceProject.architect.build.options.assets ||= [];
|
|
@@ -103,7 +105,9 @@ function updateLocalization(options, rootPath) {
|
|
|
103
105
|
}
|
|
104
106
|
}
|
|
105
107
|
if (workspaceProject.architect.test) {
|
|
106
|
-
const alreadyExistingTestOption = workspaceProject.architect.test.options?.assets
|
|
108
|
+
const alreadyExistingTestOption = workspaceProject.architect.test.options?.assets
|
|
109
|
+
?.map((a) => a.output)
|
|
110
|
+
.find((output) => output === '/localizations');
|
|
107
111
|
if (!alreadyExistingTestOption) {
|
|
108
112
|
workspaceProject.architect.test.options ||= {};
|
|
109
113
|
workspaceProject.architect.test.options.assets ||= [];
|
|
@@ -117,7 +121,7 @@ function updateLocalization(options, rootPath) {
|
|
|
117
121
|
if (workspaceProject.architect.run && workspaceProject.architect.run.options && Array.isArray(workspaceProject.architect.run.options.targets)) {
|
|
118
122
|
workspaceProject.architect.run.options.targets.push(...targets);
|
|
119
123
|
workspaceProject.architect.run.options.targets = workspaceProject.architect.run.options.targets
|
|
120
|
-
.reduce((acc, target) => acc.
|
|
124
|
+
.reduce((acc, target) => acc.includes(target) ? acc : [...acc, target], []);
|
|
121
125
|
}
|
|
122
126
|
else {
|
|
123
127
|
workspaceProject.architect.run = {
|
|
@@ -169,9 +173,9 @@ function updateLocalization(options, rootPath) {
|
|
|
169
173
|
const additionalRules = [];
|
|
170
174
|
const moduleFilePath = (0, schematics_2.getAppModuleFilePath)(tree, context, options.projectName);
|
|
171
175
|
if (!moduleFilePath || !tree.exists(moduleFilePath)) {
|
|
172
|
-
context.logger.warn(
|
|
173
|
-
|
|
174
|
-
|
|
176
|
+
context.logger.warn(moduleFilePath
|
|
177
|
+
? `Module file not found under '${moduleFilePath}'. Localization modules not registered.`
|
|
178
|
+
: 'No module file found. Localization modules not registered.');
|
|
175
179
|
return tree;
|
|
176
180
|
}
|
|
177
181
|
const sourceFile = ts.createSourceFile(moduleFilePath, tree.read(moduleFilePath).toString(), ts.ScriptTarget.ES2015, true);
|
|
@@ -252,15 +256,15 @@ function updateLocalization(options, rootPath) {
|
|
|
252
256
|
}
|
|
253
257
|
else {
|
|
254
258
|
const classNode = (0, schematics_2.findFirstNodeOfKind)(sourceFile, ts.SyntaxKind.ClassDeclaration);
|
|
255
|
-
if (
|
|
256
|
-
context.logger.warn(`No class found in ${componentFilePath}, the default language won't be set`);
|
|
257
|
-
}
|
|
258
|
-
else {
|
|
259
|
+
if (classNode) {
|
|
259
260
|
const firstToken = classNode.members[0];
|
|
260
261
|
if (firstToken) {
|
|
261
262
|
recorder.insertLeft(firstToken.pos, '\n constructor(localizationService: LocalizationService) { localizationService.useLanguage(\'en-GB\'); }');
|
|
262
263
|
}
|
|
263
264
|
}
|
|
265
|
+
else {
|
|
266
|
+
context.logger.warn(`No class found in ${componentFilePath}, the default language won't be set`);
|
|
267
|
+
}
|
|
264
268
|
}
|
|
265
269
|
tree.commitUpdate(recorder);
|
|
266
270
|
return tree;
|
|
@@ -291,7 +295,7 @@ function updateLocalization(options, rootPath) {
|
|
|
291
295
|
insertImportToComponentFile('mockTranslationModules', '@o3r/testing/localization');
|
|
292
296
|
const regExp = /TestBed\.configureTestingModule\({.*imports\s*:\s*\[(\s*)/s;
|
|
293
297
|
const result = sourceFile.text.match(regExp);
|
|
294
|
-
if (result && result.length && typeof result.index !== 'undefined') {
|
|
298
|
+
if (result && result.length > 0 && typeof result.index !== 'undefined') {
|
|
295
299
|
recorder.insertRight(result.index + result[0].length, '...mockTranslationModules(),' + result[1]);
|
|
296
300
|
}
|
|
297
301
|
tree.commitUpdate(recorder);
|
|
@@ -340,11 +344,6 @@ function updateLocalization(options, rootPath) {
|
|
|
340
344
|
ignoreDevResourcesFiles
|
|
341
345
|
]);
|
|
342
346
|
}
|
|
343
|
-
/**
|
|
344
|
-
*
|
|
345
|
-
* @param options
|
|
346
|
-
* @param options.projectName
|
|
347
|
-
*/
|
|
348
347
|
function updateI18nFn(options) {
|
|
349
348
|
if (!options.projectName) {
|
|
350
349
|
return schematics_1.noop;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/localization-to-component/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/localization-to-component/index.ts"],"names":[],"mappings":"AAKA,OAAO,EASL,IAAI,EAML,MAAM,4BAA4B,CAAC;AA0BpC,OAAO,KAAK,EACV,iCAAiC,EAClC,MAAM,UAAU,CAAC;AAkClB;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,iCAAiC,GAAG,IAAI,CAkTpF;AAED;;;GAGG;AACH,eAAO,MAAM,iBAAiB,sDAA6D,CAAC"}
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ngAddLocalization = void 0;
|
|
4
4
|
exports.ngAddLocalizationFn = ngAddLocalizationFn;
|
|
5
|
+
const node_path_1 = require("node:path");
|
|
5
6
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
6
7
|
const schematics_2 = require("@o3r/schematics");
|
|
7
8
|
const ast_utils_1 = require("@schematics/angular/utility/ast-utils");
|
|
8
9
|
const change_1 = require("@schematics/angular/utility/change");
|
|
9
|
-
const node_path_1 = require("node:path");
|
|
10
10
|
const ts = require("typescript");
|
|
11
11
|
const localizationProperties = [
|
|
12
12
|
'translations'
|
|
@@ -22,7 +22,7 @@ const checkLocalization = (componentPath, tree, baseFileName) => {
|
|
|
22
22
|
const componentSourceFile = ts.createSourceFile(componentPath, tree.readText(componentPath), ts.ScriptTarget.ES2020, true);
|
|
23
23
|
const o3rClassDeclaration = componentSourceFile.statements.find((statement) => ts.isClassDeclaration(statement)
|
|
24
24
|
&& (0, schematics_2.isO3rClassComponent)(statement));
|
|
25
|
-
if (o3rClassDeclaration.members.
|
|
25
|
+
if (o3rClassDeclaration.members.some((classElement) => ts.isPropertyDeclaration(classElement)
|
|
26
26
|
&& ts.isIdentifier(classElement.name)
|
|
27
27
|
&& localizationProperties.includes(classElement.name.escapedText.toString()))) {
|
|
28
28
|
throw new schematics_2.O3rCliError(`Unable to add localization to this component because it already has at least one of these properties: ${localizationProperties.join(', ')}.`);
|
|
@@ -91,7 +91,10 @@ function ngAddLocalizationFn(options) {
|
|
|
91
91
|
const constructorDeclaration = node.members.find((classElement) => ts.isConstructorDeclaration(classElement));
|
|
92
92
|
const localizationConstructorBlockStatements = (0, schematics_2.generateBlockStatementsFromString)('this.translations = translations;');
|
|
93
93
|
const newContructorDeclaration = constructorDeclaration
|
|
94
|
-
? factory.updateConstructorDeclaration(constructorDeclaration, ts.getModifiers(constructorDeclaration) || [], constructorDeclaration.parameters, constructorDeclaration.body
|
|
94
|
+
? factory.updateConstructorDeclaration(constructorDeclaration, ts.getModifiers(constructorDeclaration) || [], constructorDeclaration.parameters, constructorDeclaration.body
|
|
95
|
+
? factory.updateBlock(constructorDeclaration.body, constructorDeclaration.body.statements.concat(localizationConstructorBlockStatements))
|
|
96
|
+
: factory.createBlock(localizationConstructorBlockStatements, true))
|
|
97
|
+
: factory.createConstructorDeclaration([], [], factory.createBlock(localizationConstructorBlockStatements, true));
|
|
95
98
|
const newModifiers = []
|
|
96
99
|
.concat(ts.getDecorators(node) || [])
|
|
97
100
|
.concat(ts.getModifiers(node) || []);
|
|
@@ -166,9 +169,11 @@ function ngAddLocalizationFn(options) {
|
|
|
166
169
|
const changes = [new change_1.InsertChange(specFilePath, lastImport?.getEnd() || 0, `
|
|
167
170
|
const localizationConfiguration = {language: 'en'};
|
|
168
171
|
const mockTranslations = {
|
|
169
|
-
en: {${options.activateDummy
|
|
172
|
+
en: {${options.activateDummy
|
|
173
|
+
? `
|
|
170
174
|
'${properties.componentSelector}.dummyLoc1': 'Dummy 1'
|
|
171
|
-
`
|
|
175
|
+
`
|
|
176
|
+
: ''}}
|
|
172
177
|
};
|
|
173
178
|
const mockTranslationsCompilerProvider: Provider = {
|
|
174
179
|
provide: TranslateCompiler,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../schematics/localization-to-component/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../schematics/localization-to-component/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,WAAW,iCAAkC,SAAQ,qBAAqB;IAC9E,4BAA4B;IAC5B,IAAI,EAAE,MAAM,CAAC;IAEb,yCAAyC;IACzC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAElC,8BAA8B;IAC9B,UAAU,EAAE,OAAO,CAAC;IAEpB,8DAA8D;IAC9D,aAAa,EAAE,OAAO,CAAC;CACxB"}
|
|
@@ -2,10 +2,7 @@ import { Rule } from '@angular-devkit/schematics';
|
|
|
2
2
|
import type { NgAddSchematicsSchema } from '../schema';
|
|
3
3
|
/**
|
|
4
4
|
* Register Devtools to the application
|
|
5
|
-
* @param tree
|
|
6
|
-
* @param context
|
|
7
5
|
* @param options
|
|
8
|
-
* @param options.projectName
|
|
9
6
|
*/
|
|
10
7
|
export declare const registerDevtools: (options: NgAddSchematicsSchema) => Promise<Rule>;
|
|
11
8
|
//# sourceMappingURL=devtools-registration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"devtools-registration.d.ts","sourceRoot":"","sources":["../../../../schematics/ng-add/helpers/devtools-registration.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"devtools-registration.d.ts","sourceRoot":"","sources":["../../../../schematics/ng-add/helpers/devtools-registration.ts"],"names":[],"mappings":"AAIA,OAAO,EAEL,IAAI,EACL,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,WAAW,CAAC;AAOnB;;;GAGG;AACH,eAAO,MAAM,gBAAgB,YAAmB,qBAAqB,KAAG,OAAO,CAAC,IAAI,CAgBnF,CAAC"}
|
|
@@ -1,19 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.registerDevtools = void 0;
|
|
4
|
-
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
|
-
const path = require("node:path");
|
|
6
4
|
const node_fs_1 = require("node:fs");
|
|
5
|
+
const path = require("node:path");
|
|
6
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
7
7
|
const DEVTOOL_MODULE_NAME = 'LocalizationDevtoolsModule';
|
|
8
8
|
const MESSAGE_DEVTOOL_SERVICE_NAME = 'LocalizationDevtoolsMessageService';
|
|
9
9
|
const CONSOLE_DEVTOOL_SERVICE_NAME = 'LocalizationDevtoolsConsoleService';
|
|
10
10
|
const PACKAGE_NAME = JSON.parse((0, node_fs_1.readFileSync)(path.resolve(__dirname, '..', '..', '..', 'package.json'), { encoding: 'utf8' })).name;
|
|
11
11
|
/**
|
|
12
12
|
* Register Devtools to the application
|
|
13
|
-
* @param tree
|
|
14
|
-
* @param context
|
|
15
13
|
* @param options
|
|
16
|
-
* @param options.projectName
|
|
17
14
|
*/
|
|
18
15
|
const registerDevtools = async (options) => {
|
|
19
16
|
const { registerDevtoolsToApplication } = await Promise.resolve().then(() => require('@o3r/schematics'));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,IAAI,EACL,MAAM,4BAA4B,CAAC;AAOpC,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,UAAU,CAAC;AA4ElB;;;GAGG;AACH,eAAO,MAAM,KAAK,YAAa,qBAAqB,KAAG,IAGtD,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ngAdd = void 0;
|
|
4
|
-
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
4
|
const fs = require("node:fs");
|
|
6
5
|
const path = require("node:path");
|
|
6
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
7
7
|
const cms_adapter_1 = require("../cms-adapter");
|
|
8
8
|
const devtools_registration_1 = require("./helpers/devtools-registration");
|
|
9
9
|
const dependenciesToInstall = [
|
|
@@ -29,7 +29,6 @@ function ngAddFn(options) {
|
|
|
29
29
|
const depsInfo = getO3rPeerDeps(packageJsonPath);
|
|
30
30
|
context.logger.info(`The package ${depsInfo.packageName} comes with a debug mechanism`);
|
|
31
31
|
context.logger.info('Get information on https://github.com/AmadeusITGroup/otter/tree/main/docs/localization/LOCALIZATION.md#Debugging');
|
|
32
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
33
32
|
const { NodeDependencyType } = await Promise.resolve().then(() => require('@schematics/angular/utility/dependencies'));
|
|
34
33
|
const workspaceProject = options.projectName ? getWorkspaceConfig(tree)?.projects[options.projectName] : undefined;
|
|
35
34
|
const dependencies = depsInfo.o3rPeerDeps.reduce((acc, dep) => {
|
|
@@ -62,12 +61,7 @@ function ngAddFn(options) {
|
|
|
62
61
|
}),
|
|
63
62
|
(0, cms_adapter_1.updateCmsAdapter)(options),
|
|
64
63
|
registerPackageCollectionSchematics(packageJson),
|
|
65
|
-
setupSchematicsParamsForProject({
|
|
66
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
67
|
-
'@o3r/core:component*': {
|
|
68
|
-
useLocalization: true
|
|
69
|
-
}
|
|
70
|
-
}, options.projectName),
|
|
64
|
+
setupSchematicsParamsForProject({ '@o3r/core:component*': { useLocalization: true } }, options.projectName),
|
|
71
65
|
registerDevtoolRule
|
|
72
66
|
]);
|
|
73
67
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,WAAW,qBAAsB,SAAQ,qBAAqB;IAClE,mBAAmB;IACnB,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,8BAA8B;IAC9B,UAAU,EAAE,OAAO,CAAC;IACpB,+BAA+B;IAC/B,WAAW,EAAE,OAAO,CAAC;IACrB,8CAA8C;IAC9C,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../schematics/ng-update/v10-0/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../schematics/ng-update/v10-0/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,IAAI,EAGL,MAAM,4BAA4B,CAAC;AA8BpC;;GAEG;AAEH,eAAO,MAAM,WAAW,4BAAuD,CAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.updateV10_0 = void 0;
|
|
4
|
-
/* eslint-disable camelcase, @typescript-eslint/naming-convention */
|
|
5
4
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
6
5
|
const schematics_2 = require("@o3r/schematics");
|
|
7
6
|
const pipeReplacementInfo = {
|
|
@@ -15,6 +14,7 @@ const pipeReplacementInfo = {
|
|
|
15
14
|
/**
|
|
16
15
|
* Update of Otter library V10.0
|
|
17
16
|
*/
|
|
17
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention -- contains the version number
|
|
18
18
|
function updateV10_0Fn() {
|
|
19
19
|
return (tree, context) => {
|
|
20
20
|
const updateRules = [
|
|
@@ -26,5 +26,6 @@ function updateV10_0Fn() {
|
|
|
26
26
|
/**
|
|
27
27
|
* Update of Otter library V10.0
|
|
28
28
|
*/
|
|
29
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention -- contains the version number
|
|
29
30
|
exports.updateV10_0 = (0, schematics_2.createSchematicWithMetricsIfInstalled)(updateV10_0Fn);
|
|
30
31
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../schematics/ng-update/v11-6/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,IAAI,EAEL,MAAM,4BAA4B,CAAC;AAqBpC;;GAEG;AACH,eAAO,MAAM,UAAU,4BAAsD,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateV116 = void 0;
|
|
4
|
+
const schematics_1 = require("@o3r/schematics");
|
|
5
|
+
const regexp = /translations\s*:\s*(?:Readonly<)?([A-Z][\w]*)(?:>)?\s*=\s*({[^;]+})\s*(as\s*const)?\s*;/g;
|
|
6
|
+
function updateV116Fn() {
|
|
7
|
+
return (tree) => {
|
|
8
|
+
const files = (0, schematics_1.findFilesInTree)(tree.getDir(''), (filePath) => /translation\.ts$/.test(filePath));
|
|
9
|
+
files.forEach(({ content, path }) => {
|
|
10
|
+
const str = content.toString();
|
|
11
|
+
const newContent = str.replaceAll(regexp, 'translations: Readonly<$1> = $2 as const;');
|
|
12
|
+
if (newContent !== str) {
|
|
13
|
+
tree.overwrite(path, newContent);
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Update of Otter configuration V11.6
|
|
20
|
+
*/
|
|
21
|
+
exports.updateV116 = (0, schematics_1.createSchematicWithMetricsIfInstalled)(updateV116Fn);
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localization-override.actions.d.ts","sourceRoot":"","sources":["../../../src/stores/localization-override/localization-override.actions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"localization-override.actions.d.ts","sourceRoot":"","sources":["../../../src/stores/localization-override/localization-override.actions.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,qBAAqB,EACtB,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,yBAAyB,EAC1B,MAAM,+BAA+B,CAAC;AAKvC;;GAEG;AACH,eAAO,MAAM,uBAAuB,+OAAsF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localization-override.module.d.ts","sourceRoot":"","sources":["../../../src/stores/localization-override/localization-override.module.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"localization-override.module.d.ts","sourceRoot":"","sources":["../../../src/stores/localization-override/localization-override.module.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,mBAAmB,EAEpB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,MAAM,EACN,aAAa,EAEd,MAAM,aAAa,CAAC;AAIrB,OAAO,EAEL,yBAAyB,EAC1B,MAAM,+BAA+B,CAAC;;;AAEvC,gDAAgD;AAChD,eAAO,MAAM,mCAAmC,0EAA+G,CAAC;AAEhK,6DAA6D;AAC7D,wBAAgB,qCAAqC,6DAEpD;AAED,qBAQa,+BAA+B;WAC5B,OAAO,CAAC,CAAC,SAAS,yBAAyB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC,CAAC,EAAE,MAAM,CAAC,GAAG,mBAAmB,CAAC,+BAA+B,CAAC;yCADrJ,+BAA+B;0CAA/B,+BAA+B;0CAA/B,+BAA+B;CAS3C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localization-override.reducer.d.ts","sourceRoot":"","sources":["../../../src/stores/localization-override/localization-override.reducer.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"localization-override.reducer.d.ts","sourceRoot":"","sources":["../../../src/stores/localization-override/localization-override.reducer.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EAGb,YAAY,EACb,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,yBAAyB,EAC1B,MAAM,+BAA+B,CAAC;AAEvC;;GAEG;AACH,eAAO,MAAM,gCAAgC,EAAE,yBAAyD,CAAC;AAEzG;;GAEG;AACH,eAAO,MAAM,mCAAmC,EAAE,YAAY,CAAC,yBAAyB,EAAE,aAAa,EAAE,CAAC,EAEzG,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,2BAA2B,sGAGvC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localization-override.selectors.d.ts","sourceRoot":"","sources":["../../../src/stores/localization-override/localization-override.selectors.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"localization-override.selectors.d.ts","sourceRoot":"","sources":["../../../src/stores/localization-override/localization-override.selectors.ts"],"names":[],"mappings":"AAIA,OAAO,EAEL,yBAAyB,EAC1B,MAAM,+BAA+B,CAAC;AAEvC,wCAAwC;AACxC,eAAO,MAAM,+BAA+B,gJAAqF,CAAC;AAElI,2CAA2C;AAC3C,eAAO,MAAM,0BAA0B,mIAAiG,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localization-override.state.d.ts","sourceRoot":"","sources":["../../../src/stores/localization-override/localization-override.state.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,6EAA6E;IAC7E,qBAAqB,EAAE,MAAM,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"localization-override.state.d.ts","sourceRoot":"","sources":["../../../src/stores/localization-override/localization-override.state.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,6EAA6E;IAC7E,qBAAqB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC/C;AAED;;GAEG;AACH,eAAO,MAAM,gCAAgC,yBAAyB,CAAC;AAEvE;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,iCAAiC;IACjC,CAAC,gCAAgC,CAAC,EAAE,yBAAyB,CAAC;CAC/D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localization-override.sync.d.ts","sourceRoot":"","sources":["../../../src/stores/localization-override/localization-override.sync.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"localization-override.sync.d.ts","sourceRoot":"","sources":["../../../src/stores/localization-override/localization-override.sync.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACX,MAAM,WAAW,CAAC;AAInB,OAAO,EACL,yBAAyB,EAC1B,MAAM,+BAA+B,CAAC;AAEvC,eAAO,MAAM,uCAAuC,cAAe,GAAG,QAKrE,CAAC;AAEF,eAAO,MAAM,+BAA+B,EAAE,UAAU,CAAC,yBAAyB,CAEjF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localization-translate.directive.d.ts","sourceRoot":"","sources":["../../src/tools/localization-translate.directive.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"localization-translate.directive.d.ts","sourceRoot":"","sources":["../../src/tools/localization-translate.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EAEjB,UAAU,EAGV,SAAS,EACV,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,qBAAqB,CAAC;AAI7B,OAAO,EACL,yBAAyB,EAC1B,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,mBAAmB,EACpB,MAAM,wBAAwB,CAAC;;AAIhC;;GAEG;AACH,qBAGa,8BAA+B,SAAQ,kBAAmB,YAAW,SAAS;IA8B7E,OAAO,CAAC,QAAQ,CAAC,mBAAmB;IACJ,OAAO,CAAC,QAAQ,CAAC,kBAAkB;IA9B/E;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAe;IAEjD;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAS;IAEzB;;OAEG;IACH,OAAO,CAAC,WAAW,CAAC,CAAe;IAEnC,kBAAkB;IAClB,IACW,SAAS,CAAC,GAAG,EAAE,MAAM,EAU/B;gBAE4B,mBAAmB,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,iBAAiB,EAC1F,kBAAkB,EAAE,yBAAyB;IAW1G;;;;OAIG;IACI,UAAU,CAAC,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;IAU5C,WAAW;yCAzDP,8BAA8B;2CAA9B,8BAA8B;CAkE1C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localization-translate.pipe.d.ts","sourceRoot":"","sources":["../../src/tools/localization-translate.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"localization-translate.pipe.d.ts","sourceRoot":"","sources":["../../src/tools/localization-translate.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EAEjB,SAAS,EAET,aAAa,EACd,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,aAAa,EACb,gBAAgB,EACjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,YAAY,EACb,MAAM,MAAM,CAAC;AACd,OAAO,EACL,yBAAyB,EAC1B,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,mBAAmB,EACpB,MAAM,wBAAwB,CAAC;;AAKhC;;GAEG;AACH,qBACa,4BAA6B,SAAQ,aAAc,YAAW,aAAa,EAAE,SAAS;IAsBrF,SAAS,CAAC,QAAQ,CAAC,mBAAmB,EAAE,mBAAmB;IAAsC,SAAS,CAAC,QAAQ,CAAC,cAAc,EAAE,iBAAiB;IACrH,SAAS,CAAC,QAAQ,CAAC,kBAAkB,EAAE,yBAAyB;IAtB5G;;OAEG;IACH,SAAS,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,YAAY,CAAC;IAEnD;;OAEG;IACH,SAAS,CAAC,WAAW,CAAC,EAAE,YAAY,CAAC;IAErC;;OAEG;IACH,SAAS,CAAC,QAAQ,UAAS;IAE3B,uBAAuB;IACvB,SAAS,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAEhC,wBAAwB;IACxB,SAAS,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;gBAEJ,mBAAmB,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,gBAAgB,EAAqB,cAAc,EAAE,iBAAiB,EAClG,kBAAkB,EAAE,yBAAyB;IAW5G;;;OAGG;IACI,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,GAAG;IA6B7C,WAAW;yCAnEP,4BAA4B;uCAA5B,4BAA4B;CA4ExC;AAED;;;GAGG;AACH,qBACa,yBAA0B,SAAQ,4BAA6B,YAAW,aAAa;yCAAvF,yBAAyB;uCAAzB,yBAAyB;CAAiE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localization.module.d.ts","sourceRoot":"","sources":["../../src/tools/localization.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"localization.module.d.ts","sourceRoot":"","sources":["../../src/tools/localization.module.ts"],"names":[],"mappings":"AAUA,OAAO,EACL,cAAc,EAEd,mBAAmB,EAGpB,MAAM,eAAe,CAAC;AAOvB,OAAO,EAEL,yBAAyB,EAC1B,MAAM,SAAS,CAAC;AAQjB,OAAO,EACL,mBAAmB,EACpB,MAAM,wBAAwB,CAAC;;;;;;;;;;;AAoBhC;;;GAGG;AACH,wBAAgB,+BAA+B,CAAC,aAAa,CAAC,EAAE,OAAO,CAAC,yBAAyB,CAAC,GAAG,yBAAyB,CAK7H;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,mBAAmB,EAAE,mBAAmB,UAExE;AAED,6FAA6F;AAC7F,eAAO,MAAM,uCAAuC,oDAA+F,CAAC;AAEpJ,qBAca,kBAAkB;IAC7B;;;;;;;;OAQG;WACW,OAAO,CACnB,aAAa,CAAC,EAAE,MAAM,OAAO,CAAC,yBAAyB,CAAC,GACvD,mBAAmB,CAAC,kBAAkB,CAAC;yCAZ/B,kBAAkB;0CAAlB,kBAAkB;0CAAlB,kBAAkB;CA0B9B"}
|
|
@@ -14,5 +14,5 @@ export declare function createTranslateLoader(localizationConfiguration: Localiz
|
|
|
14
14
|
/**
|
|
15
15
|
* TranslateLoader provider, using framework's TranslationsLoader class
|
|
16
16
|
*/
|
|
17
|
-
export declare const translateLoaderProvider: FactoryProvider
|
|
17
|
+
export declare const translateLoaderProvider: Readonly<FactoryProvider>;
|
|
18
18
|
//# sourceMappingURL=localization.provider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localization.provider.d.ts","sourceRoot":"","sources":["../../src/tools/localization.provider.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"localization.provider.d.ts","sourceRoot":"","sources":["../../src/tools/localization.provider.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EAEhB,MAAM,eAAe,CAAC;AAIvB,OAAO,EACL,qBAAqB,EACtB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,aAAa,EACd,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,yBAAyB,EAC1B,MAAM,SAAS,CAAC;AAIjB,OAAO,EACL,kBAAkB,EACnB,MAAM,uBAAuB,CAAC;AAE/B;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,yBAAyB,EAAE,yBAAyB,EAAE,MAAM,CAAC,EAAE,aAAa,EAAE,qBAAqB,CAAC,EAAE,qBAAqB,sBAEhK;AAED;;GAEG;AACH,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,eAAe,CAIpD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localization.service.d.ts","sourceRoot":"","sources":["../../src/tools/localization.service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"localization.service.d.ts","sourceRoot":"","sources":["../../src/tools/localization.service.ts"],"names":[],"mappings":"AAKA,OAAO,EAEL,KAAK,EACN,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,gBAAgB,EACjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,aAAa,EACd,MAAM,aAAa,CAAC;AACrB,OAAO,EAGL,UAAU,EAEX,MAAM,MAAM,CAAC;AAOd,OAAO,EACL,yBAAyB,EAC1B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,yBAAyB,EAE1B,MAAM,iBAAiB,CAAC;;AAKzB;;;;GAIG;AACH,qBACa,mBAAmB;IAmB5B,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IACjC,OAAO,CAAC,QAAQ,CAAC,MAAM;IACmB,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC5D,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC;IArBrC,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAAe;IAErD;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA8B;IAEzD;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAkC;IAE/D;;OAEG;IACI,SAAS,sBAAkC;gBAG/B,gBAAgB,EAAE,gBAAgB,EAClC,MAAM,EAAE,aAAa,EACqB,aAAa,EAAE,yBAAyB,EACtE,KAAK,CAAC,EAAE,KAAK,CAAC,yBAAyB,CAAC,YAAA;IAUvE;;;;;;OAMG;IACH,OAAO,CAAC,uBAAuB;IAkB/B;;;;;;;OAOG;IACH,OAAO,CAAC,sBAAsB;IAO9B;;;;;;;OAOG;IACH,OAAO,CAAC,oCAAoC;IAO5C;;;;;OAKG;IACH,OAAO,CAAC,oBAAoB;IAiB5B;;OAEG;IACI,SAAS;IAOhB;;OAEG;IACI,gCAAgC;IAIvC;;OAEG;IACI,YAAY;IAInB;;;OAGG;IACI,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,UAAU,CAAC,GAAG,CAAC;IAKrD;;OAEG;IACI,kBAAkB;IAIzB;;OAEG;IACI,mBAAmB;IAI1B;;;OAGG;IACI,cAAc,CAAC,KAAK,CAAC,EAAE,OAAO;IAQrC;;OAEG;IACH,IAAW,QAAQ,YAElB;IAED;;;OAGG;IACI,MAAM,CAAC,YAAY,EAAE,MAAM;IASlC;;;;;OAKG;IACI,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,iBAAiB,CAAC,EAAE,MAAM;yCAnM7C,mBAAmB;6CAAnB,mBAAmB;CAyM/B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localization.token.d.ts","sourceRoot":"","sources":["../../src/tools/localization.token.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"localization.token.d.ts","sourceRoot":"","sources":["../../src/tools/localization.token.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACf,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,yBAAyB,EAC1B,MAAM,SAAS,CAAC;AAEjB,uCAAuC;AACvC,eAAO,MAAM,gCAAgC,2CAA8F,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localized-currency.pipe.d.ts","sourceRoot":"","sources":["../../src/tools/localized-currency.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"localized-currency.pipe.d.ts","sourceRoot":"","sources":["../../src/tools/localized-currency.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACb,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,iBAAiB,EACjB,SAAS,EAET,aAAa,EACd,MAAM,eAAe,CAAC;AAIvB,OAAO,EACL,mBAAmB,EACpB,MAAM,wBAAwB,CAAC;;AAEhC;;GAEG;AACH,qBAIa,qBAAsB,SAAQ,YAAa,YAAW,SAAS,EAAE,aAAa;IAG7E,OAAO,CAAC,QAAQ,CAAC,mBAAmB;IAAuB,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAFzG,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAe;gBAEf,mBAAmB,EAAE,mBAAmB,EAAmB,iBAAiB,EAAE,iBAAiB;IAO5H;;OAEG;IACI,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IACzI,SAAS,CAAC,KAAK,EAAE,IAAI,GAAG,SAAS,EAAE,YAAY,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI;IACjI,SAAS,CAEd,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,YAAY,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAM7I,WAAW,IAAI,IAAI;yCAvBf,qBAAqB;uCAArB,qBAAqB;CA0BjC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localized-date.pipe.d.ts","sourceRoot":"","sources":["../../src/tools/localized-date.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"localized-date.pipe.d.ts","sourceRoot":"","sources":["../../src/tools/localized-date.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACT,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,iBAAiB,EACjB,SAAS,EAET,aAAa,EACd,MAAM,eAAe,CAAC;AAIvB,OAAO,EACL,mBAAmB,EACpB,MAAM,wBAAwB,CAAC;;AAEhC;;GAEG;AACH,qBAIa,iBAAkB,SAAQ,QAAS,YAAW,SAAS,EAAE,aAAa;IAGrE,OAAO,CAAC,QAAQ,CAAC,mBAAmB;IAAuB,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAFzG,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAe;gBAEf,mBAAmB,EAAE,mBAAmB,EAAmB,iBAAiB,EAAE,iBAAiB;IAO5H;;OAEG;IACI,SAAS,CAAC,KAAK,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,GACxG,IAAI;IACD,SAAS,CAAC,KAAK,EAAE,IAAI,GAAG,SAAS,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI;IAC7F,SAAS,CACd,KAAK,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,EACpF,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAO1B,WAAW,IAAI,IAAI;yCAzBf,iBAAiB;uCAAjB,iBAAiB;CA4B7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localized-decimal.pipe.d.ts","sourceRoot":"","sources":["../../src/tools/localized-decimal.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"localized-decimal.pipe.d.ts","sourceRoot":"","sources":["../../src/tools/localized-decimal.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACZ,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,iBAAiB,EACjB,SAAS,EAET,aAAa,EACd,MAAM,eAAe,CAAC;AAIvB,OAAO,EACL,mBAAmB,EACpB,MAAM,wBAAwB,CAAC;;AAEhC;;GAEG;AACH,qBAIa,oBAAqB,SAAQ,WAAY,YAAW,SAAS,EAAE,aAAa;IAG3E,OAAO,CAAC,QAAQ,CAAC,mBAAmB;IAAuB,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAFzG,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAe;gBAEf,mBAAmB,EAAE,mBAAmB,EAAmB,iBAAiB,EAAE,iBAAiB;IAO5H;;OAEG;IACI,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IACtF,SAAS,CAAC,KAAK,EAAE,IAAI,GAAG,SAAS,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI;IAK9E,WAAW,IAAI,IAAI;yCAnBf,oBAAoB;uCAApB,oBAAoB;CAsBhC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-direction.service.d.ts","sourceRoot":"","sources":["../../src/tools/text-direction.service.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"text-direction.service.d.ts","sourceRoot":"","sources":["../../src/tools/text-direction.service.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACf,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAIL,gBAAgB,EACjB,MAAM,eAAe,CAAC;AACvB,OAAO,EAEL,gBAAgB,EACjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,YAAY,EACb,MAAM,MAAM,CAAC;AACd,OAAO,EACL,yBAAyB,EAC1B,MAAM,SAAS,CAAC;;AAKjB;;GAEG;AACH,qBACa,oBAAoB;IAK7B,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IACS,OAAO,CAAC,QAAQ,CAAC,aAAa;IACxE,OAAO,CAAC,QAAQ,CAAC,eAAe;IAChC,OAAO,CAAC,QAAQ,CAAC,cAAc;IAPjC,OAAO,CAAC,YAAY,CAAC,CAAe;IACpC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAY;gBAGlB,gBAAgB,EAAE,gBAAgB,EACQ,aAAa,EAAE,yBAAyB,EAClF,eAAe,EAAE,gBAAgB,EACjC,cAAc,EAAE,cAAc;IAIjD;;;OAGG;IACI,wBAAwB;yCAhBpB,oBAAoB;6CAApB,oBAAoB;CA2BhC"}
|