@digitaldefiance/i18n-lib 3.8.2 → 3.8.3
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/package.json +6 -5
- package/src/{active-context.ts → active-context.d.ts} +1 -0
- package/src/active-context.d.ts.map +1 -0
- package/src/active-context.js +3 -0
- package/src/active-context.js.map +1 -0
- package/src/builders/i18n-builder.d.ts +26 -0
- package/src/builders/i18n-builder.d.ts.map +1 -0
- package/src/builders/i18n-builder.js +70 -0
- package/src/builders/i18n-builder.js.map +1 -0
- package/src/builders/{index.ts → index.d.ts} +1 -1
- package/src/builders/index.d.ts.map +1 -0
- package/src/builders/index.js +8 -0
- package/src/builders/index.js.map +1 -0
- package/src/component-definition.d.ts +12 -0
- package/src/component-definition.d.ts.map +1 -0
- package/src/component-definition.js +3 -0
- package/src/component-definition.js.map +1 -0
- package/src/component-registration.d.ts +22 -0
- package/src/component-registration.d.ts.map +1 -0
- package/src/component-registration.js +3 -0
- package/src/component-registration.js.map +1 -0
- package/src/component-registry.d.ts +102 -0
- package/src/component-registry.d.ts.map +1 -0
- package/src/component-registry.js +282 -0
- package/src/component-registry.js.map +1 -0
- package/src/context-error-type.d.ts +8 -0
- package/src/context-error-type.d.ts.map +1 -0
- package/src/context-error-type.js +12 -0
- package/src/context-error-type.js.map +1 -0
- package/src/core/component-store.d.ts +93 -0
- package/src/core/component-store.d.ts.map +1 -0
- package/src/core/component-store.js +198 -0
- package/src/core/component-store.js.map +1 -0
- package/src/core/context-manager.d.ts +72 -0
- package/src/core/context-manager.d.ts.map +1 -0
- package/src/core/context-manager.js +98 -0
- package/src/core/context-manager.js.map +1 -0
- package/src/core/enum-registry.d.ts +48 -0
- package/src/core/enum-registry.d.ts.map +1 -0
- package/src/core/enum-registry.js +85 -0
- package/src/core/enum-registry.js.map +1 -0
- package/src/core/i18n-engine.d.ts +241 -0
- package/src/core/i18n-engine.d.ts.map +1 -0
- package/src/core/i18n-engine.js +568 -0
- package/src/core/i18n-engine.js.map +1 -0
- package/src/core/{index.ts → index.d.ts} +1 -4
- package/src/core/index.d.ts.map +1 -0
- package/src/core/index.js +21 -0
- package/src/core/index.js.map +1 -0
- package/src/core/language-registry.d.ts +180 -0
- package/src/core/language-registry.d.ts.map +1 -0
- package/src/core/language-registry.js +298 -0
- package/src/core/language-registry.js.map +1 -0
- package/src/{core-component-id.ts → core-component-id.d.ts} +2 -1
- package/src/core-component-id.d.ts.map +1 -0
- package/src/core-component-id.js +9 -0
- package/src/core-component-id.js.map +1 -0
- package/src/core-i18n.d.ts +69 -0
- package/src/core-i18n.d.ts.map +1 -0
- package/src/core-i18n.js +219 -0
- package/src/core-i18n.js.map +1 -0
- package/src/core-plugin-factory.d.ts +28 -0
- package/src/core-plugin-factory.d.ts.map +1 -0
- package/src/core-plugin-factory.js +80 -0
- package/src/core-plugin-factory.js.map +1 -0
- package/src/core-string-key.d.ts +52 -0
- package/src/core-string-key.d.ts.map +1 -0
- package/src/core-string-key.js +61 -0
- package/src/core-string-key.js.map +1 -0
- package/src/create-translation-adapter.d.ts +33 -0
- package/src/create-translation-adapter.d.ts.map +1 -0
- package/src/create-translation-adapter.js +72 -0
- package/src/create-translation-adapter.js.map +1 -0
- package/src/enum-registry.d.ts +65 -0
- package/src/enum-registry.d.ts.map +1 -0
- package/src/enum-registry.js +123 -0
- package/src/enum-registry.js.map +1 -0
- package/src/errors/{base.ts → base.d.ts} +1 -1
- package/src/errors/base.d.ts.map +1 -0
- package/src/errors/base.js +11 -0
- package/src/errors/base.js.map +1 -0
- package/src/errors/context-error.d.ts +50 -0
- package/src/errors/context-error.d.ts.map +1 -0
- package/src/errors/context-error.js +93 -0
- package/src/errors/context-error.js.map +1 -0
- package/src/errors/enhanced-error-base.d.ts +125 -0
- package/src/errors/enhanced-error-base.d.ts.map +1 -0
- package/src/errors/enhanced-error-base.js +165 -0
- package/src/errors/enhanced-error-base.js.map +1 -0
- package/src/errors/handleable.d.ts +83 -0
- package/src/errors/handleable.d.ts.map +1 -0
- package/src/errors/handleable.js +136 -0
- package/src/errors/handleable.js.map +1 -0
- package/src/errors/i18n-error.d.ts +211 -0
- package/src/errors/i18n-error.d.ts.map +1 -0
- package/src/errors/i18n-error.js +358 -0
- package/src/errors/i18n-error.js.map +1 -0
- package/src/errors/{index.ts → index.d.ts} +1 -4
- package/src/errors/index.d.ts.map +1 -0
- package/src/errors/index.js +17 -0
- package/src/errors/index.js.map +1 -0
- package/src/errors/simple-typed-error.d.ts +53 -0
- package/src/errors/simple-typed-error.d.ts.map +1 -0
- package/src/errors/simple-typed-error.js +51 -0
- package/src/errors/simple-typed-error.js.map +1 -0
- package/src/errors/{translatable-exports.ts → translatable-exports.d.ts} +1 -1
- package/src/errors/translatable-exports.d.ts.map +1 -0
- package/src/errors/translatable-exports.js +15 -0
- package/src/errors/translatable-exports.js.map +1 -0
- package/src/errors/translatable-generic.d.ts +87 -0
- package/src/errors/translatable-generic.d.ts.map +1 -0
- package/src/errors/translatable-generic.js +139 -0
- package/src/errors/translatable-generic.js.map +1 -0
- package/src/errors/translatable-handleable-generic.d.ts +116 -0
- package/src/errors/translatable-handleable-generic.d.ts.map +1 -0
- package/src/errors/translatable-handleable-generic.js +121 -0
- package/src/errors/translatable-handleable-generic.js.map +1 -0
- package/src/errors/translatable.d.ts +63 -0
- package/src/errors/translatable.d.ts.map +1 -0
- package/src/errors/translatable.js +85 -0
- package/src/errors/translatable.js.map +1 -0
- package/src/errors/typed-handleable.d.ts +62 -0
- package/src/errors/typed-handleable.d.ts.map +1 -0
- package/src/errors/typed-handleable.js +108 -0
- package/src/errors/typed-handleable.js.map +1 -0
- package/src/errors/typed.d.ts +206 -0
- package/src/errors/typed.d.ts.map +1 -0
- package/src/errors/typed.js +458 -0
- package/src/errors/typed.js.map +1 -0
- package/src/gender/{gender-categories.ts → gender-categories.d.ts} +2 -6
- package/src/gender/gender-categories.d.ts.map +1 -0
- package/src/gender/gender-categories.js +15 -0
- package/src/gender/gender-categories.js.map +1 -0
- package/src/gender/gender-resolver.d.ts +14 -0
- package/src/gender/gender-resolver.d.ts.map +1 -0
- package/src/gender/gender-resolver.js +35 -0
- package/src/gender/gender-resolver.js.map +1 -0
- package/src/gender/{index.ts → index.d.ts} +1 -0
- package/src/gender/index.d.ts.map +1 -0
- package/src/gender/index.js +6 -0
- package/src/gender/index.js.map +1 -0
- package/src/global-active-context.d.ts +50 -0
- package/src/global-active-context.d.ts.map +1 -0
- package/src/global-active-context.js +185 -0
- package/src/global-active-context.js.map +1 -0
- package/src/icu/ast.d.ts +48 -0
- package/src/icu/ast.d.ts.map +1 -0
- package/src/icu/ast.js +16 -0
- package/src/icu/ast.js.map +1 -0
- package/src/icu/compiler.d.ts +16 -0
- package/src/icu/compiler.d.ts.map +1 -0
- package/src/icu/compiler.js +87 -0
- package/src/icu/compiler.js.map +1 -0
- package/src/icu/formatter-registry.d.ts +10 -0
- package/src/icu/formatter-registry.d.ts.map +1 -0
- package/src/icu/formatter-registry.js +34 -0
- package/src/icu/formatter-registry.js.map +1 -0
- package/src/icu/formatters/base-formatter.d.ts +8 -0
- package/src/icu/formatters/base-formatter.d.ts.map +1 -0
- package/src/icu/formatters/base-formatter.js +3 -0
- package/src/icu/formatters/base-formatter.js.map +1 -0
- package/src/icu/formatters/date-formatter.d.ts +5 -0
- package/src/icu/formatters/date-formatter.d.ts.map +1 -0
- package/src/icu/formatters/date-formatter.js +31 -0
- package/src/icu/formatters/date-formatter.js.map +1 -0
- package/src/icu/formatters/number-formatter.d.ts +5 -0
- package/src/icu/formatters/number-formatter.d.ts.map +1 -0
- package/src/icu/formatters/number-formatter.js +33 -0
- package/src/icu/formatters/number-formatter.js.map +1 -0
- package/src/icu/formatters/plural-formatter.d.ts +5 -0
- package/src/icu/formatters/plural-formatter.d.ts.map +1 -0
- package/src/icu/formatters/plural-formatter.js +15 -0
- package/src/icu/formatters/plural-formatter.js.map +1 -0
- package/src/icu/formatters/select-formatter.d.ts +5 -0
- package/src/icu/formatters/select-formatter.d.ts.map +1 -0
- package/src/icu/formatters/select-formatter.js +10 -0
- package/src/icu/formatters/select-formatter.js.map +1 -0
- package/src/icu/formatters/selectordinal-formatter.d.ts +5 -0
- package/src/icu/formatters/selectordinal-formatter.d.ts.map +1 -0
- package/src/icu/formatters/selectordinal-formatter.js +22 -0
- package/src/icu/formatters/selectordinal-formatter.js.map +1 -0
- package/src/icu/formatters/time-formatter.d.ts +5 -0
- package/src/icu/formatters/time-formatter.d.ts.map +1 -0
- package/src/icu/formatters/time-formatter.js +31 -0
- package/src/icu/formatters/time-formatter.js.map +1 -0
- package/src/icu/helpers.d.ts +9 -0
- package/src/icu/helpers.d.ts.map +1 -0
- package/src/icu/helpers.js +31 -0
- package/src/icu/helpers.js.map +1 -0
- package/src/icu/parser.d.ts +31 -0
- package/src/icu/parser.d.ts.map +1 -0
- package/src/icu/parser.js +203 -0
- package/src/icu/parser.js.map +1 -0
- package/src/icu/runtime.d.ts +10 -0
- package/src/icu/runtime.d.ts.map +1 -0
- package/src/icu/runtime.js +33 -0
- package/src/icu/runtime.js.map +1 -0
- package/src/icu/tokenizer.d.ts +37 -0
- package/src/icu/tokenizer.d.ts.map +1 -0
- package/src/icu/tokenizer.js +187 -0
- package/src/icu/tokenizer.js.map +1 -0
- package/src/icu/validator.d.ts +11 -0
- package/src/icu/validator.d.ts.map +1 -0
- package/src/icu/validator.js +140 -0
- package/src/icu/validator.js.map +1 -0
- package/src/{index.ts → index.d.ts} +6 -38
- package/src/index.d.ts.map +1 -0
- package/src/index.js +76 -0
- package/src/index.js.map +1 -0
- package/src/interfaces/active-context.interface.d.ts +36 -0
- package/src/interfaces/active-context.interface.d.ts.map +1 -0
- package/src/interfaces/active-context.interface.js +3 -0
- package/src/interfaces/active-context.interface.js.map +1 -0
- package/src/interfaces/component-config.interface.d.ts +16 -0
- package/src/interfaces/component-config.interface.d.ts.map +1 -0
- package/src/interfaces/component-config.interface.js +6 -0
- package/src/interfaces/component-config.interface.js.map +1 -0
- package/src/interfaces/engine-config.interface.d.ts +22 -0
- package/src/interfaces/engine-config.interface.d.ts.map +1 -0
- package/src/interfaces/engine-config.interface.js +6 -0
- package/src/interfaces/engine-config.interface.js.map +1 -0
- package/src/interfaces/global-active-context.d.ts +23 -0
- package/src/interfaces/global-active-context.d.ts.map +1 -0
- package/src/interfaces/global-active-context.js +3 -0
- package/src/interfaces/global-active-context.js.map +1 -0
- package/src/interfaces/handleable-error-options.d.ts +14 -0
- package/src/interfaces/handleable-error-options.d.ts.map +1 -0
- package/src/interfaces/handleable-error-options.js +3 -0
- package/src/interfaces/handleable-error-options.js.map +1 -0
- package/src/interfaces/handleable.d.ts +21 -0
- package/src/interfaces/handleable.d.ts.map +1 -0
- package/src/interfaces/handleable.js +3 -0
- package/src/interfaces/handleable.js.map +1 -0
- package/src/interfaces/i18n-engine.interface.d.ts +46 -0
- package/src/interfaces/i18n-engine.interface.d.ts.map +1 -0
- package/src/interfaces/i18n-engine.interface.js +6 -0
- package/src/interfaces/i18n-engine.interface.js.map +1 -0
- package/src/interfaces/{index.ts → index.d.ts} +1 -1
- package/src/interfaces/index.d.ts.map +1 -0
- package/src/interfaces/index.js +7 -0
- package/src/interfaces/index.js.map +1 -0
- package/src/interfaces/language-definition.interface.d.ts +17 -0
- package/src/interfaces/language-definition.interface.d.ts.map +1 -0
- package/src/interfaces/language-definition.interface.js +6 -0
- package/src/interfaces/language-definition.interface.js.map +1 -0
- package/src/interfaces/translation-options.interface.d.ts +15 -0
- package/src/interfaces/translation-options.interface.d.ts.map +1 -0
- package/src/interfaces/translation-options.interface.js +6 -0
- package/src/interfaces/translation-options.interface.js.map +1 -0
- package/src/interfaces/validation-result.interface.d.ts +24 -0
- package/src/interfaces/validation-result.interface.d.ts.map +1 -0
- package/src/interfaces/validation-result.interface.js +6 -0
- package/src/interfaces/validation-result.interface.js.map +1 -0
- package/src/language-codes.d.ts +28 -0
- package/src/language-codes.d.ts.map +1 -0
- package/src/language-codes.js +32 -0
- package/src/language-codes.js.map +1 -0
- package/src/language-definition.d.ts +14 -0
- package/src/language-definition.d.ts.map +1 -0
- package/src/language-definition.js +3 -0
- package/src/language-definition.js.map +1 -0
- package/src/plugin-i18n-engine.d.ts +164 -0
- package/src/plugin-i18n-engine.d.ts.map +1 -0
- package/src/plugin-i18n-engine.js +493 -0
- package/src/plugin-i18n-engine.js.map +1 -0
- package/src/pluralization/{index.ts → index.d.ts} +1 -1
- package/src/pluralization/index.d.ts.map +1 -0
- package/src/pluralization/index.js +10 -0
- package/src/pluralization/index.js.map +1 -0
- package/src/pluralization/language-plural-map.d.ts +29 -0
- package/src/pluralization/language-plural-map.d.ts.map +1 -0
- package/src/pluralization/language-plural-map.js +155 -0
- package/src/pluralization/language-plural-map.js.map +1 -0
- package/src/pluralization/{plural-categories.ts → plural-categories.d.ts} +3 -5
- package/src/pluralization/plural-categories.d.ts.map +1 -0
- package/src/pluralization/plural-categories.js +8 -0
- package/src/pluralization/plural-categories.js.map +1 -0
- package/src/pluralization/plural-rules.d.ts +102 -0
- package/src/pluralization/plural-rules.d.ts.map +1 -0
- package/src/pluralization/plural-rules.js +263 -0
- package/src/pluralization/plural-rules.js.map +1 -0
- package/src/registry-config.d.ts +16 -0
- package/src/registry-config.d.ts.map +1 -0
- package/src/registry-config.js +3 -0
- package/src/registry-config.js.map +1 -0
- package/src/registry-error-type.d.ts +20 -0
- package/src/registry-error-type.d.ts.map +1 -0
- package/src/registry-error-type.js +24 -0
- package/src/registry-error-type.js.map +1 -0
- package/src/registry-error.d.ts +25 -0
- package/src/registry-error.d.ts.map +1 -0
- package/src/registry-error.js +63 -0
- package/src/registry-error.js.map +1 -0
- package/src/strict-types.d.ts +19 -0
- package/src/strict-types.d.ts.map +1 -0
- package/src/strict-types.js +18 -0
- package/src/strict-types.js.map +1 -0
- package/src/strings/de.d.ts +3 -0
- package/src/strings/de.d.ts.map +1 -0
- package/src/strings/de.js +57 -0
- package/src/strings/de.js.map +1 -0
- package/src/strings/en-GB.d.ts +3 -0
- package/src/strings/en-GB.d.ts.map +1 -0
- package/src/strings/en-GB.js +57 -0
- package/src/strings/en-GB.js.map +1 -0
- package/src/strings/en-US.d.ts +3 -0
- package/src/strings/en-US.d.ts.map +1 -0
- package/src/strings/en-US.js +57 -0
- package/src/strings/en-US.js.map +1 -0
- package/src/strings/es.d.ts +3 -0
- package/src/strings/es.d.ts.map +1 -0
- package/src/strings/es.js +57 -0
- package/src/strings/es.js.map +1 -0
- package/src/strings/fr.d.ts +3 -0
- package/src/strings/fr.d.ts.map +1 -0
- package/src/strings/fr.js +57 -0
- package/src/strings/fr.js.map +1 -0
- package/src/strings/ja.d.ts +3 -0
- package/src/strings/ja.d.ts.map +1 -0
- package/src/strings/ja.js +57 -0
- package/src/strings/ja.js.map +1 -0
- package/src/strings/uk.d.ts +3 -0
- package/src/strings/uk.d.ts.map +1 -0
- package/src/strings/uk.js +57 -0
- package/src/strings/uk.js.map +1 -0
- package/src/strings/zh-CN.d.ts +3 -0
- package/src/strings/zh-CN.d.ts.map +1 -0
- package/src/strings/zh-CN.js +57 -0
- package/src/strings/zh-CN.js.map +1 -0
- package/src/template.d.ts +13 -0
- package/src/template.d.ts.map +1 -0
- package/src/template.js +40 -0
- package/src/template.js.map +1 -0
- package/src/translation-engine.d.ts +9 -0
- package/src/translation-engine.d.ts.map +1 -0
- package/src/translation-engine.js +3 -0
- package/src/translation-engine.js.map +1 -0
- package/src/translation-request.d.ts +10 -0
- package/src/translation-request.d.ts.map +1 -0
- package/src/translation-request.js +3 -0
- package/src/translation-request.js.map +1 -0
- package/src/translation-response.d.ts +9 -0
- package/src/translation-response.d.ts.map +1 -0
- package/src/translation-response.js +3 -0
- package/src/translation-response.js.map +1 -0
- package/src/types/engine.d.ts +47 -0
- package/src/types/engine.d.ts.map +1 -0
- package/src/types/engine.js +8 -0
- package/src/types/engine.js.map +1 -0
- package/src/types/{index.ts → index.d.ts} +1 -1
- package/src/types/index.d.ts.map +1 -0
- package/src/types/index.js +9 -0
- package/src/types/index.js.map +1 -0
- package/src/types/{plural-types.ts → plural-types.d.ts} +3 -29
- package/src/types/plural-types.d.ts.map +1 -0
- package/src/types/plural-types.js +39 -0
- package/src/types/plural-types.js.map +1 -0
- package/src/{types.ts → types.d.ts} +21 -72
- package/src/types.d.ts.map +1 -0
- package/src/types.js +23 -0
- package/src/types.js.map +1 -0
- package/src/utils/currency.d.ts +81 -0
- package/src/utils/currency.d.ts.map +1 -0
- package/src/utils/currency.js +99 -0
- package/src/utils/currency.js.map +1 -0
- package/src/utils/html-escape.d.ts +22 -0
- package/src/utils/html-escape.d.ts.map +1 -0
- package/src/utils/html-escape.js +53 -0
- package/src/utils/html-escape.js.map +1 -0
- package/src/utils/{index.ts → index.d.ts} +1 -0
- package/src/utils/index.d.ts.map +1 -0
- package/src/utils/index.js +12 -0
- package/src/utils/index.js.map +1 -0
- package/src/utils/lru-cache.d.ts +42 -0
- package/src/utils/lru-cache.d.ts.map +1 -0
- package/src/utils/lru-cache.js +73 -0
- package/src/utils/lru-cache.js.map +1 -0
- package/src/utils/{plural-helpers.ts → plural-helpers.d.ts} +4 -14
- package/src/utils/plural-helpers.d.ts.map +1 -0
- package/src/utils/plural-helpers.js +35 -0
- package/src/utils/plural-helpers.js.map +1 -0
- package/src/utils/safe-object.d.ts +39 -0
- package/src/utils/safe-object.d.ts.map +1 -0
- package/src/utils/{safe-object.ts → safe-object.js} +34 -37
- package/src/utils/safe-object.js.map +1 -0
- package/src/utils/string-utils.d.ts +28 -0
- package/src/utils/string-utils.d.ts.map +1 -0
- package/src/utils/string-utils.js +63 -0
- package/src/utils/string-utils.js.map +1 -0
- package/src/utils/timezone.d.ts +50 -0
- package/src/utils/timezone.d.ts.map +1 -0
- package/src/utils/timezone.js +74 -0
- package/src/utils/timezone.js.map +1 -0
- package/src/utils/validation.d.ts +40 -0
- package/src/utils/validation.d.ts.map +1 -0
- package/src/utils/validation.js +69 -0
- package/src/utils/validation.js.map +1 -0
- package/src/utils.d.ts +65 -0
- package/src/utils.d.ts.map +1 -0
- package/src/utils.js +129 -0
- package/src/utils.js.map +1 -0
- package/src/validation/{index.ts → index.d.ts} +1 -0
- package/src/validation/index.d.ts.map +1 -0
- package/src/validation/index.js +5 -0
- package/src/validation/index.js.map +1 -0
- package/src/validation/plural-validator.d.ts +46 -0
- package/src/validation/plural-validator.d.ts.map +1 -0
- package/src/validation/plural-validator.js +123 -0
- package/src/validation/plural-validator.js.map +1 -0
- package/src/validation-config.d.ts +12 -0
- package/src/validation-config.d.ts.map +1 -0
- package/src/validation-config.js +3 -0
- package/src/validation-config.js.map +1 -0
- package/src/validation-result.d.ts +13 -0
- package/src/validation-result.d.ts.map +1 -0
- package/src/validation-result.js +3 -0
- package/src/validation-result.js.map +1 -0
- package/LICENSE +0 -21
- package/src/builders/i18n-builder.ts +0 -82
- package/src/component-definition.ts +0 -11
- package/src/component-registration.ts +0 -29
- package/src/component-registry.ts +0 -432
- package/src/context-error-type.ts +0 -7
- package/src/core/component-store.ts +0 -241
- package/src/core/context-manager.ts +0 -113
- package/src/core/enum-registry.ts +0 -106
- package/src/core/i18n-engine.ts +0 -710
- package/src/core/language-registry.ts +0 -345
- package/src/core-i18n.ts +0 -270
- package/src/core-plugin-factory.ts +0 -111
- package/src/core-string-key.ts +0 -59
- package/src/create-translation-adapter.ts +0 -93
- package/src/enum-registry.ts +0 -152
- package/src/errors/context-error.ts +0 -122
- package/src/errors/enhanced-error-base.ts +0 -260
- package/src/errors/handleable.ts +0 -152
- package/src/errors/i18n-error.ts +0 -494
- package/src/errors/simple-typed-error.ts +0 -81
- package/src/errors/translatable-generic.ts +0 -245
- package/src/errors/translatable-handleable-generic.ts +0 -222
- package/src/errors/translatable.ts +0 -138
- package/src/errors/typed-handleable.ts +0 -138
- package/src/errors/typed.ts +0 -617
- package/src/gender/gender-resolver.ts +0 -40
- package/src/global-active-context.ts +0 -266
- package/src/icu/ast.ts +0 -56
- package/src/icu/compiler.ts +0 -96
- package/src/icu/formatter-registry.ts +0 -36
- package/src/icu/formatters/base-formatter.ts +0 -8
- package/src/icu/formatters/date-formatter.ts +0 -30
- package/src/icu/formatters/number-formatter.ts +0 -32
- package/src/icu/formatters/plural-formatter.ts +0 -12
- package/src/icu/formatters/select-formatter.ts +0 -7
- package/src/icu/formatters/selectordinal-formatter.ts +0 -17
- package/src/icu/formatters/time-formatter.ts +0 -30
- package/src/icu/helpers.ts +0 -34
- package/src/icu/parser.ts +0 -242
- package/src/icu/runtime.ts +0 -37
- package/src/icu/tokenizer.ts +0 -212
- package/src/icu/validator.ts +0 -163
- package/src/interfaces/active-context.interface.ts +0 -41
- package/src/interfaces/component-config.interface.ts +0 -17
- package/src/interfaces/engine-config.interface.ts +0 -22
- package/src/interfaces/global-active-context.ts +0 -39
- package/src/interfaces/handleable-error-options.ts +0 -13
- package/src/interfaces/handleable.ts +0 -20
- package/src/interfaces/i18n-engine.interface.ts +0 -57
- package/src/interfaces/language-definition.interface.ts +0 -17
- package/src/interfaces/translation-options.interface.ts +0 -15
- package/src/interfaces/validation-result.interface.ts +0 -24
- package/src/language-codes.ts +0 -40
- package/src/language-definition.ts +0 -13
- package/src/plugin-i18n-engine.ts +0 -707
- package/src/pluralization/language-plural-map.ts +0 -186
- package/src/pluralization/plural-rules.ts +0 -228
- package/src/registry-config.ts +0 -16
- package/src/registry-error-type.ts +0 -19
- package/src/registry-error.ts +0 -100
- package/src/strict-types.ts +0 -35
- package/src/strings/de.ts +0 -75
- package/src/strings/en-GB.ts +0 -74
- package/src/strings/en-US.ts +0 -74
- package/src/strings/es.ts +0 -74
- package/src/strings/fr.ts +0 -75
- package/src/strings/ja.ts +0 -73
- package/src/strings/uk.ts +0 -73
- package/src/strings/zh-CN.ts +0 -72
- package/src/template.ts +0 -72
- package/src/translation-engine.ts +0 -18
- package/src/translation-request.ts +0 -12
- package/src/translation-response.ts +0 -8
- package/src/types/engine.ts +0 -55
- package/src/utils/currency.ts +0 -141
- package/src/utils/html-escape.ts +0 -55
- package/src/utils/lru-cache.ts +0 -76
- package/src/utils/string-utils.ts +0 -77
- package/src/utils/timezone.ts +0 -76
- package/src/utils/validation.ts +0 -66
- package/src/utils.ts +0 -215
- package/src/validation/plural-validator.ts +0 -168
- package/src/validation-config.ts +0 -11
- package/src/validation-result.ts +0 -12
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digitaldefiance/i18n-lib",
|
|
3
|
-
"version": "3.8.
|
|
3
|
+
"version": "3.8.3",
|
|
4
4
|
"description": "i18n library with enum translation support",
|
|
5
5
|
"homepage": "https://github.com/Digital-Defiance/i18n-lib",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "git+https://github.com/Digital-Defiance/i18n-lib.git"
|
|
9
|
-
},
|
|
9
|
+
},
|
|
10
10
|
"main": "src/index.js",
|
|
11
11
|
"types": "src/index.d.ts",
|
|
12
12
|
"scripts": {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"format": "npx nx format:write --projects=digitaldefiance-i18n-lib",
|
|
25
25
|
"format:check": "npx nx format:check --projects=digitaldefiance-i18n-lib",
|
|
26
26
|
"prepublishOnly": "npx nx build digitaldefiance-i18n-lib",
|
|
27
|
-
"publish:public": "npm publish --access public"
|
|
27
|
+
"publish:public": "cd ../../dist/packages/digitaldefiance-i18n-lib && npm publish --access public"
|
|
28
28
|
},
|
|
29
29
|
"files": [
|
|
30
30
|
"src",
|
|
@@ -51,5 +51,6 @@
|
|
|
51
51
|
"eslint-plugin-import": "^2.32.0",
|
|
52
52
|
"eslint-plugin-prettier": "^5.5.4",
|
|
53
53
|
"fast-check": "^4.3.0"
|
|
54
|
-
}
|
|
55
|
-
|
|
54
|
+
},
|
|
55
|
+
"type": "commonjs"
|
|
56
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"active-context.d.ts","sourceRoot":"","sources":["../../../../packages/digitaldefiance-i18n-lib/src/active-context.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,YAAY,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"active-context.js","sourceRoot":"","sources":["../../../../packages/digitaldefiance-i18n-lib/src/active-context.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fluent builder for I18n Engine
|
|
3
|
+
*/
|
|
4
|
+
import { I18nEngine } from '../core/i18n-engine';
|
|
5
|
+
import { EngineConfig, LanguageDefinition } from '../interfaces';
|
|
6
|
+
export declare class I18nBuilder {
|
|
7
|
+
private languages;
|
|
8
|
+
private config;
|
|
9
|
+
private instanceKey;
|
|
10
|
+
private registerInstance;
|
|
11
|
+
private setAsDefault;
|
|
12
|
+
private constructor();
|
|
13
|
+
static create(): I18nBuilder;
|
|
14
|
+
withLanguages(languages: readonly LanguageDefinition[]): this;
|
|
15
|
+
withDefaultLanguage(languageId: string): this;
|
|
16
|
+
withFallbackLanguage(languageId: string): this;
|
|
17
|
+
withConstants(constants: Record<string, any>): this;
|
|
18
|
+
withValidation(validation: EngineConfig['validation']): this;
|
|
19
|
+
withInstanceKey(key: string): this;
|
|
20
|
+
withRegisterInstance(register: boolean): this;
|
|
21
|
+
withSetAsDefault(setDefault: boolean): this;
|
|
22
|
+
isolated(): this;
|
|
23
|
+
asDefault(): this;
|
|
24
|
+
build(): I18nEngine;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=i18n-builder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i18n-builder.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/builders/i18n-builder.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEjE,qBAAa,WAAW;IACtB,OAAO,CAAC,SAAS,CAA4B;IAC7C,OAAO,CAAC,MAAM,CAAoB;IAClC,OAAO,CAAC,WAAW,CAAa;IAChC,OAAO,CAAC,gBAAgB,CAAQ;IAChC,OAAO,CAAC,YAAY,CAAQ;IAE5B,OAAO;IAEP,MAAM,CAAC,MAAM,IAAI,WAAW;IAI5B,aAAa,CAAC,SAAS,EAAE,SAAS,kBAAkB,EAAE,GAAG,IAAI;IAK7D,mBAAmB,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;IAK7C,oBAAoB,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;IAK9C,aAAa,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI;IAKnD,cAAc,CAAC,UAAU,EAAE,YAAY,CAAC,YAAY,CAAC,GAAG,IAAI;IAK5D,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAKlC,oBAAoB,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI;IAK7C,gBAAgB,CAAC,UAAU,EAAE,OAAO,GAAG,IAAI;IAK3C,QAAQ,IAAI,IAAI;IAKhB,SAAS,IAAI,IAAI;IAKjB,KAAK,IAAI,UAAU;CAWpB"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Fluent builder for I18n Engine
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.I18nBuilder = void 0;
|
|
7
|
+
const i18n_engine_1 = require("../core/i18n-engine");
|
|
8
|
+
class I18nBuilder {
|
|
9
|
+
languages = [];
|
|
10
|
+
config = {};
|
|
11
|
+
instanceKey = 'default';
|
|
12
|
+
registerInstance = true;
|
|
13
|
+
setAsDefault = true;
|
|
14
|
+
constructor() { }
|
|
15
|
+
static create() {
|
|
16
|
+
return new I18nBuilder();
|
|
17
|
+
}
|
|
18
|
+
withLanguages(languages) {
|
|
19
|
+
this.languages = [...languages];
|
|
20
|
+
return this;
|
|
21
|
+
}
|
|
22
|
+
withDefaultLanguage(languageId) {
|
|
23
|
+
this.config.defaultLanguage = languageId;
|
|
24
|
+
return this;
|
|
25
|
+
}
|
|
26
|
+
withFallbackLanguage(languageId) {
|
|
27
|
+
this.config.fallbackLanguage = languageId;
|
|
28
|
+
return this;
|
|
29
|
+
}
|
|
30
|
+
withConstants(constants) {
|
|
31
|
+
this.config.constants = constants;
|
|
32
|
+
return this;
|
|
33
|
+
}
|
|
34
|
+
withValidation(validation) {
|
|
35
|
+
this.config.validation = validation;
|
|
36
|
+
return this;
|
|
37
|
+
}
|
|
38
|
+
withInstanceKey(key) {
|
|
39
|
+
this.instanceKey = key;
|
|
40
|
+
return this;
|
|
41
|
+
}
|
|
42
|
+
withRegisterInstance(register) {
|
|
43
|
+
this.registerInstance = register;
|
|
44
|
+
return this;
|
|
45
|
+
}
|
|
46
|
+
withSetAsDefault(setDefault) {
|
|
47
|
+
this.setAsDefault = setDefault;
|
|
48
|
+
return this;
|
|
49
|
+
}
|
|
50
|
+
isolated() {
|
|
51
|
+
this.registerInstance = false;
|
|
52
|
+
return this;
|
|
53
|
+
}
|
|
54
|
+
asDefault() {
|
|
55
|
+
this.setAsDefault = true;
|
|
56
|
+
return this;
|
|
57
|
+
}
|
|
58
|
+
build() {
|
|
59
|
+
if (this.languages.length === 0) {
|
|
60
|
+
throw new Error('At least one language must be provided');
|
|
61
|
+
}
|
|
62
|
+
return new i18n_engine_1.I18nEngine(this.languages, this.config, {
|
|
63
|
+
instanceKey: this.instanceKey,
|
|
64
|
+
registerInstance: this.registerInstance,
|
|
65
|
+
setAsDefault: this.setAsDefault,
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
exports.I18nBuilder = I18nBuilder;
|
|
70
|
+
//# sourceMappingURL=i18n-builder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i18n-builder.js","sourceRoot":"","sources":["../../../../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AC;IACd,CAAC;IAED,QAAQ;QACN,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC;QAC9B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,SAAS;QACP,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;QACzB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK;QACH,IAAI,IAAI,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAChC,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;QAC5D,CAAC;QAED,OAAO,IAAI,wBAAU,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,MAAM,EAAE;YACjD,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,gBAAgB,EAAE,IAAI,CAAC,gBAAgB;YACvC,YAAY,EAAE,IAAI,CAAC,YAAY;SAChC,CAAC,CAAC;IACL,CAAC;CACF;AA1ED,kCA0EC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/builders/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/builders/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,yDAA+B"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Component definition with its string keys
|
|
3
|
+
*/
|
|
4
|
+
export interface ComponentDefinition<TStringKeys extends string> {
|
|
5
|
+
/** Unique identifier for the component */
|
|
6
|
+
readonly id: string;
|
|
7
|
+
/** Human-readable name for the component */
|
|
8
|
+
readonly name: string;
|
|
9
|
+
/** Array of all string keys this component requires */
|
|
10
|
+
readonly stringKeys: readonly TStringKeys[];
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=component-definition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-definition.d.ts","sourceRoot":"","sources":["../../../../packages/digitaldefiance-i18n-lib/src/component-definition.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,mBAAmB,CAAC,WAAW,SAAS,MAAM;IAC7D,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,4CAA4C;IAC5C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,uDAAuD;IACvD,QAAQ,CAAC,UAAU,EAAE,SAAS,WAAW,EAAE,CAAC;CAC7C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-definition.js","sourceRoot":"","sources":["../../../../packages/digitaldefiance-i18n-lib/src/component-definition.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ComponentDefinition } from './component-definition';
|
|
2
|
+
import { PartialComponentLanguageStrings } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Registration payload for a component with its strings
|
|
5
|
+
*/
|
|
6
|
+
export interface ComponentRegistration<TStringKeys extends string, TLanguages extends string> {
|
|
7
|
+
readonly component: ComponentDefinition<TStringKeys>;
|
|
8
|
+
readonly strings: PartialComponentLanguageStrings<TStringKeys, TLanguages>;
|
|
9
|
+
readonly enumName?: string;
|
|
10
|
+
readonly enumObject?: Record<string, TStringKeys>;
|
|
11
|
+
readonly aliases?: readonly string[];
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Type utility to extract string keys from a component definition
|
|
15
|
+
*/
|
|
16
|
+
type ExtractStringKeys<T> = T extends ComponentDefinition<infer K> ? K : never;
|
|
17
|
+
/**
|
|
18
|
+
* Type utility to create a strongly typed component registration
|
|
19
|
+
*/
|
|
20
|
+
export type CreateComponentRegistration<TComponent extends ComponentDefinition<any>, TLanguages extends string> = ComponentRegistration<ExtractStringKeys<TComponent>, TLanguages>;
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=component-registration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-registration.d.ts","sourceRoot":"","sources":["../../../../packages/digitaldefiance-i18n-lib/src/component-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,+BAA+B,EAAE,MAAM,SAAS,CAAC;AAE1D;;GAEG;AACH,MAAM,WAAW,qBAAqB,CACpC,WAAW,SAAS,MAAM,EAC1B,UAAU,SAAS,MAAM;IAEzB,QAAQ,CAAC,SAAS,EAAE,mBAAmB,CAAC,WAAW,CAAC,CAAC;IACrD,QAAQ,CAAC,OAAO,EAAE,+BAA+B,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;IAC3E,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IAClD,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACtC;AAED;;GAEG;AACH,KAAK,iBAAiB,CAAC,CAAC,IAAI,CAAC,SAAS,mBAAmB,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAE/E;;GAEG;AACH,MAAM,MAAM,2BAA2B,CACrC,UAAU,SAAS,mBAAmB,CAAC,GAAG,CAAC,EAC3C,UAAU,SAAS,MAAM,IACvB,qBAAqB,CAAC,iBAAiB,CAAC,UAAU,CAAC,EAAE,UAAU,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-registration.js","sourceRoot":"","sources":["../../../../packages/digitaldefiance-i18n-lib/src/component-registration.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Component registry for managing internationalization components and their string translations
|
|
3
|
+
*/
|
|
4
|
+
import { ComponentDefinition } from './component-definition';
|
|
5
|
+
import { ComponentRegistration } from './component-registration';
|
|
6
|
+
import { TranslationRequest } from './translation-request';
|
|
7
|
+
import { TranslationResponse } from './translation-response';
|
|
8
|
+
import { ComponentLanguageStrings, PartialComponentLanguageStrings } from './types';
|
|
9
|
+
import { ValidationConfig } from './validation-config';
|
|
10
|
+
import { ValidationResult } from './validation-result';
|
|
11
|
+
/**
|
|
12
|
+
* Registry for managing components and their translations
|
|
13
|
+
*/
|
|
14
|
+
export declare class ComponentRegistry<TLanguages extends string> {
|
|
15
|
+
private readonly components;
|
|
16
|
+
private readonly componentStrings;
|
|
17
|
+
private readonly validationConfig;
|
|
18
|
+
private readonly registeredLanguages;
|
|
19
|
+
private readonly constants?;
|
|
20
|
+
/**
|
|
21
|
+
* Creates a new ComponentRegistry.
|
|
22
|
+
* @param languages - Array of supported language codes.
|
|
23
|
+
* @param validationConfig - Configuration for validation rules.
|
|
24
|
+
* @param constants - Optional constants for variable replacement in templates.
|
|
25
|
+
*/
|
|
26
|
+
constructor(languages: readonly TLanguages[], validationConfig: ValidationConfig, constants?: Record<string, any>);
|
|
27
|
+
/**
|
|
28
|
+
* Update the set of registered languages (for dynamic language addition).
|
|
29
|
+
* @param languages - Array of language codes to register.
|
|
30
|
+
*/
|
|
31
|
+
updateRegisteredLanguages(languages: readonly TLanguages[]): void;
|
|
32
|
+
/**
|
|
33
|
+
* Register a new component with its translations.
|
|
34
|
+
* @param registration - Component registration payload.
|
|
35
|
+
* @returns ValidationResult indicating success or errors.
|
|
36
|
+
* @throws RegistryError if component is already registered or validation fails.
|
|
37
|
+
*/
|
|
38
|
+
registerComponent<TStringKeys extends string>(registration: ComponentRegistration<TStringKeys, TLanguages>): ValidationResult;
|
|
39
|
+
/**
|
|
40
|
+
* Update strings for an existing component.
|
|
41
|
+
* @param componentId - The ID of the component to update.
|
|
42
|
+
* @param strings - Partial strings to update.
|
|
43
|
+
* @returns ValidationResult indicating success or errors.
|
|
44
|
+
* @throws RegistryError if component is not found.
|
|
45
|
+
*/
|
|
46
|
+
updateComponentStrings<TStringKeys extends string>(componentId: string, strings: PartialComponentLanguageStrings<TStringKeys, TLanguages>): ValidationResult;
|
|
47
|
+
/**
|
|
48
|
+
* Get a translation for a specific component, string key, and language.
|
|
49
|
+
* @param request - Translation request containing componentId, stringKey, language, and variables.
|
|
50
|
+
* @returns TranslationResponse with the translated string and metadata.
|
|
51
|
+
* @throws RegistryError if component, language, or string key is not found.
|
|
52
|
+
*/
|
|
53
|
+
getTranslation<TStringKeys extends string>(request: TranslationRequest<TStringKeys, TLanguages>): TranslationResponse;
|
|
54
|
+
/**
|
|
55
|
+
* Get all registered components.
|
|
56
|
+
* @returns Array of all registered ComponentDefinition objects.
|
|
57
|
+
*/
|
|
58
|
+
getComponents(): ReadonlyArray<ComponentDefinition<any>>;
|
|
59
|
+
/**
|
|
60
|
+
* Get a specific component by ID.
|
|
61
|
+
* @param componentId - The ID of the component to retrieve.
|
|
62
|
+
* @returns The ComponentDefinition or undefined if not found.
|
|
63
|
+
*/
|
|
64
|
+
getComponent<TStringKeys extends string>(componentId: string): ComponentDefinition<TStringKeys> | undefined;
|
|
65
|
+
/**
|
|
66
|
+
* Check if a component is registered.
|
|
67
|
+
* @param componentId - The ID of the component to check.
|
|
68
|
+
* @returns True if the component is registered, false otherwise.
|
|
69
|
+
*/
|
|
70
|
+
hasComponent(componentId: string): boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Get all strings for a component in all languages.
|
|
73
|
+
* @param componentId - The ID of the component.
|
|
74
|
+
* @returns ComponentLanguageStrings or undefined if not found.
|
|
75
|
+
*/
|
|
76
|
+
getComponentStrings<TStringKeys extends string>(componentId: string): ComponentLanguageStrings<TStringKeys, TLanguages> | undefined;
|
|
77
|
+
/**
|
|
78
|
+
* Validate a component registration.
|
|
79
|
+
* @param registration - Component registration to validate.
|
|
80
|
+
* @returns ValidationResult with details of missing keys and errors.
|
|
81
|
+
*/
|
|
82
|
+
private validateComponentRegistration;
|
|
83
|
+
/**
|
|
84
|
+
* Complete missing strings with fallbacks.
|
|
85
|
+
* @param component - The component definition.
|
|
86
|
+
* @param strings - Partial strings provided.
|
|
87
|
+
* @returns Complete strings with fallbacks filled in.
|
|
88
|
+
*/
|
|
89
|
+
private completeStringsWithFallbacks;
|
|
90
|
+
/**
|
|
91
|
+
* Merge existing strings with new strings.
|
|
92
|
+
* @param existing - Existing complete strings.
|
|
93
|
+
* @param updates - Partial updates to apply.
|
|
94
|
+
* @returns Merged partial strings.
|
|
95
|
+
*/
|
|
96
|
+
private mergeStrings;
|
|
97
|
+
/**
|
|
98
|
+
* Clear all components and their strings (useful for testing).
|
|
99
|
+
*/
|
|
100
|
+
clearAllComponents(): void;
|
|
101
|
+
}
|
|
102
|
+
//# sourceMappingURL=component-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-registry.d.ts","sourceRoot":"","sources":["../../../../packages/digitaldefiance-i18n-lib/src/component-registry.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAGjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EACL,wBAAwB,EAExB,+BAA+B,EAEhC,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD;;GAEG;AACH,qBAAa,iBAAiB,CAAC,UAAU,SAAS,MAAM;IACtD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA+C;IAC1E,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAG7B;IACJ,OAAO,CAAC,Q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A4B;IAmCpC;;;;;OAKG;IACH,OAAO,CAAC,YAAY;IA+BpB;;OAEG;IACI,kBAAkB,IAAI,IAAI;CAIlC"}
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Component registry for managing internationalization components and their string translations
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ComponentRegistry = void 0;
|
|
7
|
+
const registry_error_1 = require("./registry-error");
|
|
8
|
+
const registry_error_type_1 = require("./registry-error-type");
|
|
9
|
+
const utils_1 = require("./utils");
|
|
10
|
+
/**
|
|
11
|
+
* Registry for managing components and their translations
|
|
12
|
+
*/
|
|
13
|
+
class ComponentRegistry {
|
|
14
|
+
components = new Map();
|
|
15
|
+
componentStrings = new Map();
|
|
16
|
+
validationConfig;
|
|
17
|
+
registeredLanguages;
|
|
18
|
+
constants;
|
|
19
|
+
/**
|
|
20
|
+
* Creates a new ComponentRegistry.
|
|
21
|
+
* @param languages - Array of supported language codes.
|
|
22
|
+
* @param validationConfig - Configuration for validation rules.
|
|
23
|
+
* @param constants - Optional constants for variable replacement in templates.
|
|
24
|
+
*/
|
|
25
|
+
constructor(languages, validationConfig, constants) {
|
|
26
|
+
this.registeredLanguages = new Set(languages);
|
|
27
|
+
this.validationConfig = validationConfig;
|
|
28
|
+
this.constants = constants;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Update the set of registered languages (for dynamic language addition).
|
|
32
|
+
* @param languages - Array of language codes to register.
|
|
33
|
+
*/
|
|
34
|
+
updateRegisteredLanguages(languages) {
|
|
35
|
+
this.registeredLanguages.clear();
|
|
36
|
+
languages.forEach((lang) => this.registeredLanguages.add(lang));
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Register a new component with its translations.
|
|
40
|
+
* @param registration - Component registration payload.
|
|
41
|
+
* @returns ValidationResult indicating success or errors.
|
|
42
|
+
* @throws RegistryError if component is already registered or validation fails.
|
|
43
|
+
*/
|
|
44
|
+
registerComponent(registration) {
|
|
45
|
+
const { component, strings } = registration;
|
|
46
|
+
// Check for duplicate component
|
|
47
|
+
if (this.components.has(component.id)) {
|
|
48
|
+
throw registry_error_1.RegistryError.createSimple(registry_error_type_1.RegistryErrorType.DuplicateComponent, `Component '${component.id}' is already registered`, { componentId: component.id });
|
|
49
|
+
}
|
|
50
|
+
// Validate the registration
|
|
51
|
+
const validationResult = this.validateComponentRegistration(registration);
|
|
52
|
+
if (!validationResult.isValid &&
|
|
53
|
+
!this.validationConfig.allowPartialRegistration) {
|
|
54
|
+
throw registry_error_1.RegistryError.createSimple(registry_error_type_1.RegistryErrorType.ValidationFailed, `Component registration validation failed: ${validationResult.errors.join(', ')}`, {
|
|
55
|
+
componentId: component.id,
|
|
56
|
+
missingKeys: validationResult.missingKeys,
|
|
57
|
+
errors: validationResult.errors,
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
// Complete missing strings with fallbacks if partial registration is allowed
|
|
61
|
+
const completeStrings = this.completeStringsWithFallbacks(component, strings);
|
|
62
|
+
// Register the component
|
|
63
|
+
this.components.set(component.id, component);
|
|
64
|
+
this.componentStrings.set(component.id, completeStrings);
|
|
65
|
+
return validationResult;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Update strings for an existing component.
|
|
69
|
+
* @param componentId - The ID of the component to update.
|
|
70
|
+
* @param strings - Partial strings to update.
|
|
71
|
+
* @returns ValidationResult indicating success or errors.
|
|
72
|
+
* @throws RegistryError if component is not found.
|
|
73
|
+
*/
|
|
74
|
+
updateComponentStrings(componentId, strings) {
|
|
75
|
+
const component = this.components.get(componentId);
|
|
76
|
+
if (!component) {
|
|
77
|
+
throw registry_error_1.RegistryError.createSimple(registry_error_type_1.RegistryErrorType.ComponentNotFound, `Component with ID '${componentId}' not found`, { componentId });
|
|
78
|
+
}
|
|
79
|
+
const registration = {
|
|
80
|
+
component: component,
|
|
81
|
+
strings,
|
|
82
|
+
};
|
|
83
|
+
const validationResult = this.validateComponentRegistration(registration);
|
|
84
|
+
if (validationResult.isValid ||
|
|
85
|
+
this.validationConfig.allowPartialRegistration) {
|
|
86
|
+
const existingStrings = this.componentStrings.get(componentId) ||
|
|
87
|
+
{};
|
|
88
|
+
const updatedStrings = this.mergeStrings(existingStrings, strings);
|
|
89
|
+
const completeStrings = this.completeStringsWithFallbacks(component, updatedStrings);
|
|
90
|
+
this.componentStrings.set(componentId, completeStrings);
|
|
91
|
+
}
|
|
92
|
+
return validationResult;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Get a translation for a specific component, string key, and language.
|
|
96
|
+
* @param request - Translation request containing componentId, stringKey, language, and variables.
|
|
97
|
+
* @returns TranslationResponse with the translated string and metadata.
|
|
98
|
+
* @throws RegistryError if component, language, or string key is not found.
|
|
99
|
+
*/
|
|
100
|
+
getTranslation(request) {
|
|
101
|
+
const { componentId, stringKey, language, variables } = request;
|
|
102
|
+
// Check if component exists
|
|
103
|
+
if (!this.components.has(componentId)) {
|
|
104
|
+
throw registry_error_1.RegistryError.createSimple(registry_error_type_1.RegistryErrorType.ComponentNotFound, `Component '${componentId}' not found`, { componentId });
|
|
105
|
+
}
|
|
106
|
+
const componentStrings = this.componentStrings.get(componentId);
|
|
107
|
+
if (!componentStrings) {
|
|
108
|
+
throw registry_error_1.RegistryError.createSimple(registry_error_type_1.RegistryErrorType.StringKeyNotFound, `No strings registered for component '${componentId}'`, { componentId });
|
|
109
|
+
}
|
|
110
|
+
const targetLanguage = language || this.validationConfig.fallbackLanguageId;
|
|
111
|
+
let actualLanguage = targetLanguage;
|
|
112
|
+
let wasFallback = false;
|
|
113
|
+
// Try to get the string in the requested language
|
|
114
|
+
let languageStrings = componentStrings[targetLanguage];
|
|
115
|
+
// If not found and different from fallback, try fallback language
|
|
116
|
+
if (!languageStrings &&
|
|
117
|
+
targetLanguage !== this.validationConfig.fallbackLanguageId) {
|
|
118
|
+
languageStrings =
|
|
119
|
+
componentStrings[this.validationConfig.fallbackLanguageId];
|
|
120
|
+
actualLanguage = this.validationConfig.fallbackLanguageId;
|
|
121
|
+
wasFallback = true;
|
|
122
|
+
}
|
|
123
|
+
if (!languageStrings) {
|
|
124
|
+
throw registry_error_1.RegistryError.createSimple(registry_error_type_1.RegistryErrorType.LanguageNotFound, `No strings found for language '${targetLanguage}' in component '${componentId}'`, { componentId, language: targetLanguage });
|
|
125
|
+
}
|
|
126
|
+
const translation = languageStrings[stringKey];
|
|
127
|
+
if (!translation) {
|
|
128
|
+
throw registry_error_1.RegistryError.createSimple(registry_error_type_1.RegistryErrorType.StringKeyNotFound, `String key '${stringKey}' not found for component '${componentId}' in language '${actualLanguage}'`, { componentId, stringKey, language: actualLanguage });
|
|
129
|
+
}
|
|
130
|
+
// Process variables if the string key indicates it's a template
|
|
131
|
+
let processedTranslation = translation;
|
|
132
|
+
if ((0, utils_1.isTemplate)(stringKey)) {
|
|
133
|
+
processedTranslation = (0, utils_1.replaceVariables)(translation, variables, this.constants);
|
|
134
|
+
}
|
|
135
|
+
return {
|
|
136
|
+
translation: processedTranslation,
|
|
137
|
+
actualLanguage,
|
|
138
|
+
wasFallback,
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Get all registered components.
|
|
143
|
+
* @returns Array of all registered ComponentDefinition objects.
|
|
144
|
+
*/
|
|
145
|
+
getComponents() {
|
|
146
|
+
return Array.from(this.components.values());
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Get a specific component by ID.
|
|
150
|
+
* @param componentId - The ID of the component to retrieve.
|
|
151
|
+
* @returns The ComponentDefinition or undefined if not found.
|
|
152
|
+
*/
|
|
153
|
+
getComponent(componentId) {
|
|
154
|
+
return this.components.get(componentId);
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Check if a component is registered.
|
|
158
|
+
* @param componentId - The ID of the component to check.
|
|
159
|
+
* @returns True if the component is registered, false otherwise.
|
|
160
|
+
*/
|
|
161
|
+
hasComponent(componentId) {
|
|
162
|
+
return this.components.has(componentId);
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Get all strings for a component in all languages.
|
|
166
|
+
* @param componentId - The ID of the component.
|
|
167
|
+
* @returns ComponentLanguageStrings or undefined if not found.
|
|
168
|
+
*/
|
|
169
|
+
getComponentStrings(componentId) {
|
|
170
|
+
return this.componentStrings.get(componentId);
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Validate a component registration.
|
|
174
|
+
* @param registration - Component registration to validate.
|
|
175
|
+
* @returns ValidationResult with details of missing keys and errors.
|
|
176
|
+
*/
|
|
177
|
+
validateComponentRegistration(registration) {
|
|
178
|
+
const { component, strings } = registration;
|
|
179
|
+
const missingKeys = [];
|
|
180
|
+
const errors = [];
|
|
181
|
+
// Check if all required string keys are provided for each language
|
|
182
|
+
for (const languageId of this.registeredLanguages) {
|
|
183
|
+
const languageStrings = strings[languageId];
|
|
184
|
+
if (!languageStrings) {
|
|
185
|
+
if (this.validationConfig.requireCompleteStrings) {
|
|
186
|
+
errors.push(`Missing all strings for language '${languageId}' in component '${component.id}'`);
|
|
187
|
+
}
|
|
188
|
+
// Add all missing keys for this language
|
|
189
|
+
for (const stringKey of component.stringKeys) {
|
|
190
|
+
missingKeys.push({
|
|
191
|
+
languageId,
|
|
192
|
+
componentId: component.id,
|
|
193
|
+
stringKey,
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
continue;
|
|
197
|
+
}
|
|
198
|
+
// Check individual string keys
|
|
199
|
+
for (const stringKey of component.stringKeys) {
|
|
200
|
+
if (!languageStrings[stringKey]) {
|
|
201
|
+
missingKeys.push({
|
|
202
|
+
languageId,
|
|
203
|
+
componentId: component.id,
|
|
204
|
+
stringKey,
|
|
205
|
+
});
|
|
206
|
+
if (this.validationConfig.requireCompleteStrings) {
|
|
207
|
+
errors.push(`Missing string key '${stringKey}' for language '${languageId}' in component '${component.id}'`);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
return {
|
|
213
|
+
isValid: missingKeys.length === 0,
|
|
214
|
+
missingKeys,
|
|
215
|
+
errors,
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Complete missing strings with fallbacks.
|
|
220
|
+
* @param component - The component definition.
|
|
221
|
+
* @param strings - Partial strings provided.
|
|
222
|
+
* @returns Complete strings with fallbacks filled in.
|
|
223
|
+
*/
|
|
224
|
+
completeStringsWithFallbacks(component, strings) {
|
|
225
|
+
const result = {};
|
|
226
|
+
const fallbackLanguage = this.validationConfig
|
|
227
|
+
.fallbackLanguageId;
|
|
228
|
+
const fallbackStrings = strings[fallbackLanguage];
|
|
229
|
+
// Ensure all languages have all required keys
|
|
230
|
+
for (const languageId of this.registeredLanguages) {
|
|
231
|
+
const existingLanguageStrings = strings[languageId] || {};
|
|
232
|
+
const languageStrings = {};
|
|
233
|
+
for (const stringKey of component.stringKeys) {
|
|
234
|
+
if (existingLanguageStrings[stringKey]) {
|
|
235
|
+
languageStrings[stringKey] = existingLanguageStrings[stringKey];
|
|
236
|
+
}
|
|
237
|
+
else if (fallbackStrings && fallbackStrings[stringKey]) {
|
|
238
|
+
// Try to use fallback language
|
|
239
|
+
languageStrings[stringKey] = fallbackStrings[stringKey];
|
|
240
|
+
}
|
|
241
|
+
else {
|
|
242
|
+
// Last resort: use a placeholder
|
|
243
|
+
languageStrings[stringKey] = `[${component.id}.${stringKey}]`;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
result[languageId] = languageStrings;
|
|
247
|
+
}
|
|
248
|
+
return result;
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* Merge existing strings with new strings.
|
|
252
|
+
* @param existing - Existing complete strings.
|
|
253
|
+
* @param updates - Partial updates to apply.
|
|
254
|
+
* @returns Merged partial strings.
|
|
255
|
+
*/
|
|
256
|
+
mergeStrings(existing, updates) {
|
|
257
|
+
const result = {};
|
|
258
|
+
// Copy existing strings
|
|
259
|
+
for (const [languageId, languageStrings] of Object.entries(existing)) {
|
|
260
|
+
result[languageId] = { ...languageStrings };
|
|
261
|
+
}
|
|
262
|
+
// Apply updates
|
|
263
|
+
for (const [languageId, languageStrings] of Object.entries(updates)) {
|
|
264
|
+
if (languageStrings) {
|
|
265
|
+
result[languageId] = {
|
|
266
|
+
...result[languageId],
|
|
267
|
+
...languageStrings,
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
return result;
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* Clear all components and their strings (useful for testing).
|
|
275
|
+
*/
|
|
276
|
+
clearAllComponents() {
|
|
277
|
+
this.components.clear();
|
|
278
|
+
this.componentStrings.clear();
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
exports.ComponentRegistry = ComponentRegistry;
|
|
282
|
+
//# sourceMappingURL=component-registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-registry.js","sourceRoot":"","sources":["../../../../packages/digitaldefiance-i18n-lib/src/component-registry.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAIH,qDAAiD;AACjD,+DAA0D;AAS1D,mCAAuD;AAIvD;;GAEG;AACH,MAAa,iBAAiB;IACX,UAAU,GAAG,IAAI,GAAG,EAAoC,CAAC;IACzD,gBAAgB,GAAG,IAAI,GAAG,EAGxC,CAAC;IACa,gBAAgB,CAAmB;IACnC,mBAAmB,CAAkB;IACrC,SAAS,CAAuB;IAEjD;;;;;OAKG;IACH,YACE,SAAgC,EAChC,gBAAkC,EAClC,SAA+B;QAE/B,IAAI,CAAC,mBAAmB,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,CAAC;QAC9C,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QACzC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;IAED;;;OAGG;IACI,yBAAyB,CAAC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