@digitaldefiance/i18n-lib 3.7.2 → 3.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (131) hide show
  1. package/README.md +204 -34
  2. package/package.json +4 -1
  3. package/src/active-context.d.ts +2 -33
  4. package/src/active-context.d.ts.map +1 -1
  5. package/src/builders/i18n-builder.d.ts +2 -2
  6. package/src/builders/i18n-builder.d.ts.map +1 -1
  7. package/src/builders/i18n-builder.js +1 -1
  8. package/src/builders/i18n-builder.js.map +1 -1
  9. package/src/component-registration.d.ts +9 -0
  10. package/src/component-registration.d.ts.map +1 -1
  11. package/src/component-registry.d.ts.map +1 -1
  12. package/src/component-registry.js.map +1 -1
  13. package/src/core/component-store.d.ts.map +1 -1
  14. package/src/core/component-store.js +8 -8
  15. package/src/core/component-store.js.map +1 -1
  16. package/src/core/enum-registry.d.ts +1 -1
  17. package/src/core/enum-registry.d.ts.map +1 -1
  18. package/src/core/enum-registry.js +8 -5
  19. package/src/core/enum-registry.js.map +1 -1
  20. package/src/core/i18n-engine.d.ts.map +1 -1
  21. package/src/core/i18n-engine.js +31 -19
  22. package/src/core/i18n-engine.js.map +1 -1
  23. package/src/core/index.d.ts +9 -5
  24. package/src/core/index.d.ts.map +1 -1
  25. package/src/core/index.js +15 -6
  26. package/src/core/index.js.map +1 -1
  27. package/src/core/language-registry.d.ts.map +1 -1
  28. package/src/core/language-registry.js +11 -8
  29. package/src/core/language-registry.js.map +1 -1
  30. package/src/core-component-id.d.ts +6 -0
  31. package/src/core-component-id.d.ts.map +1 -0
  32. package/src/core-component-id.js +9 -0
  33. package/src/core-component-id.js.map +1 -0
  34. package/src/core-i18n.d.ts +4 -26
  35. package/src/core-i18n.d.ts.map +1 -1
  36. package/src/core-i18n.js +18 -83
  37. package/src/core-i18n.js.map +1 -1
  38. package/src/core-plugin-factory.d.ts +28 -0
  39. package/src/core-plugin-factory.d.ts.map +1 -0
  40. package/src/core-plugin-factory.js +80 -0
  41. package/src/core-plugin-factory.js.map +1 -0
  42. package/src/errors/base.d.ts +8 -0
  43. package/src/errors/base.d.ts.map +1 -0
  44. package/src/errors/base.js +11 -0
  45. package/src/errors/base.js.map +1 -0
  46. package/src/errors/context-error.d.ts.map +1 -1
  47. package/src/errors/context-error.js +24 -6
  48. package/src/errors/context-error.js.map +1 -1
  49. package/src/errors/enhanced-error-base.d.ts +5 -0
  50. package/src/errors/enhanced-error-base.d.ts.map +1 -1
  51. package/src/errors/i18n-error.d.ts.map +1 -1
  52. package/src/errors/i18n-error.js +97 -30
  53. package/src/errors/i18n-error.js.map +1 -1
  54. package/src/errors/index.d.ts +8 -9
  55. package/src/errors/index.d.ts.map +1 -1
  56. package/src/errors/index.js +10 -9
  57. package/src/errors/index.js.map +1 -1
  58. package/src/errors/simple-typed-error.d.ts +53 -0
  59. package/src/errors/simple-typed-error.d.ts.map +1 -0
  60. package/src/errors/simple-typed-error.js +51 -0
  61. package/src/errors/simple-typed-error.js.map +1 -0
  62. package/src/errors/translatable-exports.d.ts +12 -0
  63. package/src/errors/translatable-exports.d.ts.map +1 -0
  64. package/src/errors/translatable-exports.js +15 -0
  65. package/src/errors/translatable-exports.js.map +1 -0
  66. package/src/errors/translatable-generic.d.ts +4 -1
  67. package/src/errors/translatable-generic.d.ts.map +1 -1
  68. package/src/errors/translatable-generic.js +9 -4
  69. package/src/errors/translatable-generic.js.map +1 -1
  70. package/src/errors/translatable.d.ts +4 -0
  71. package/src/errors/translatable.d.ts.map +1 -1
  72. package/src/errors/translatable.js +9 -4
  73. package/src/errors/translatable.js.map +1 -1
  74. package/src/errors/typed-handleable.d.ts +1 -1
  75. package/src/errors/typed-handleable.d.ts.map +1 -1
  76. package/src/errors/typed-handleable.js +15 -11
  77. package/src/errors/typed-handleable.js.map +1 -1
  78. package/src/errors/typed.d.ts +7 -5
  79. package/src/errors/typed.d.ts.map +1 -1
  80. package/src/errors/typed.js +44 -31
  81. package/src/errors/typed.js.map +1 -1
  82. package/src/global-active-context.d.ts +3 -3
  83. package/src/global-active-context.d.ts.map +1 -1
  84. package/src/global-active-context.js +2 -2
  85. package/src/global-active-context.js.map +1 -1
  86. package/src/index.d.ts +11 -11
  87. package/src/index.d.ts.map +1 -1
  88. package/src/index.js +17 -17
  89. package/src/index.js.map +1 -1
  90. package/src/interfaces/active-context.interface.d.ts +36 -0
  91. package/src/interfaces/active-context.interface.d.ts.map +1 -0
  92. package/src/interfaces/active-context.interface.js +3 -0
  93. package/src/interfaces/active-context.interface.js.map +1 -0
  94. package/src/interfaces/global-active-context.d.ts +4 -4
  95. package/src/interfaces/global-active-context.d.ts.map +1 -1
  96. package/src/interfaces/index.d.ts +9 -7
  97. package/src/interfaces/index.d.ts.map +1 -1
  98. package/src/interfaces/index.js +1 -8
  99. package/src/interfaces/index.js.map +1 -1
  100. package/src/plugin-i18n-engine.d.ts +1 -1
  101. package/src/plugin-i18n-engine.d.ts.map +1 -1
  102. package/src/plugin-i18n-engine.js +10 -6
  103. package/src/plugin-i18n-engine.js.map +1 -1
  104. package/src/pluralization/language-plural-map.d.ts +2 -2
  105. package/src/pluralization/language-plural-map.d.ts.map +1 -1
  106. package/src/pluralization/language-plural-map.js +90 -71
  107. package/src/pluralization/language-plural-map.js.map +1 -1
  108. package/src/registry-error.d.ts +8 -2
  109. package/src/registry-error.d.ts.map +1 -1
  110. package/src/registry-error.js +19 -5
  111. package/src/registry-error.js.map +1 -1
  112. package/src/types/engine.d.ts +47 -0
  113. package/src/types/engine.d.ts.map +1 -0
  114. package/src/types/engine.js +8 -0
  115. package/src/types/engine.js.map +1 -0
  116. package/src/types/index.d.ts +1 -0
  117. package/src/types/index.d.ts.map +1 -1
  118. package/src/types/index.js +1 -0
  119. package/src/types/index.js.map +1 -1
  120. package/src/types.d.ts +0 -5
  121. package/src/types.d.ts.map +1 -1
  122. package/src/types.js.map +1 -1
  123. package/src/utils/currency.d.ts +1 -1
  124. package/src/utils/currency.d.ts.map +1 -1
  125. package/src/utils/currency.js +2 -4
  126. package/src/utils/currency.js.map +1 -1
  127. package/src/utils/safe-object.d.ts.map +1 -1
  128. package/src/utils/safe-object.js +1 -0
  129. package/src/utils/safe-object.js.map +1 -1
  130. package/src/utils.d.ts.map +1 -1
  131. package/src/utils.js.map +1 -1
@@ -74,8 +74,10 @@ class I18nError extends Error {
74
74
  */
75
75
  static componentNotFound(componentId, language = 'en-US') {
76
76
  const hasNamespace = componentId.includes('.');
77
- const message = (0, helpers_1.formatICUMessage)("{hasNamespace, select, true {Namespaced component {componentId}} other {Component {componentId}}} not found in registry", { componentId, hasNamespace: hasNamespace ? 'true' : 'false' }, language);
78
- return new I18nError(exports.I18nErrorCode.COMPONENT_NOT_FOUND, message, { componentId });
77
+ const message = (0, helpers_1.formatICUMessage)('{hasNamespace, select, true {Namespaced component {componentId}} other {Component {componentId}}} not found in registry', { componentId, hasNamespace: hasNamespace ? 'true' : 'false' }, language);
78
+ return new I18nError(exports.I18nErrorCode.COMPONENT_NOT_FOUND, message, {
79
+ componentId,
80
+ });
79
81
  }
80
82
  /**
81
83
  * Creates an error for when a string key is not found in a component with nested ICU formatting.
@@ -87,8 +89,11 @@ class I18nError extends Error {
87
89
  static stringKeyNotFound(componentId, stringKey, language = 'en-US') {
88
90
  const depth = stringKey.split('.').length;
89
91
  const isNested = depth > 1;
90
- const message = (0, helpers_1.formatICUMessage)("{isNested, select, true {Nested string key at {depth, selectordinal, one {#st} two {#nd} few {#rd} other {#th}} level {stringKey}} other {String key {stringKey}}} not found in component {componentId}", { componentId, stringKey, depth, isNested: isNested ? 'true' : 'false' }, language);
91
- return new I18nError(exports.I18nErrorCode.STRING_KEY_NOT_FOUND, message, { componentId, stringKey });
92
+ const message = (0, helpers_1.formatICUMessage)('{isNested, select, true {Nested string key at {depth, selectordinal, one {#st} two {#nd} few {#rd} other {#th}} level {stringKey}} other {String key {stringKey}}} not found in component {componentId}', { componentId, stringKey, depth, isNested: isNested ? 'true' : 'false' }, language);
93
+ return new I18nError(exports.I18nErrorCode.STRING_KEY_NOT_FOUND, message, {
94
+ componentId,
95
+ stringKey,
96
+ });
92
97
  }
93
98
  /**
94
99
  * Creates an error for when a language is not found with ICU formatting.
@@ -97,8 +102,10 @@ class I18nError extends Error {
97
102
  * @returns An I18nError instance
98
103
  */
99
104
  static languageNotFound(language, messageLanguage = 'en-US') {
100
- const message = (0, helpers_1.formatICUMessage)("Language {language} not found", { language }, messageLanguage);
101
- return new I18nError(exports.I18nErrorCode.LANGUAGE_NOT_FOUND, message, { language });
105
+ const message = (0, helpers_1.formatICUMessage)('Language {language} not found', { language }, messageLanguage);
106
+ return new I18nError(exports.I18nErrorCode.LANGUAGE_NOT_FOUND, message, {
107
+ language,
108
+ });
102
109
  }
103
110
  /**
104
111
  * Creates an error for when a translation is missing with nested ICU formatting.
@@ -110,8 +117,17 @@ class I18nError extends Error {
110
117
  */
111
118
  static translationMissing(componentId, stringKey, language, messageLanguage = 'en-US') {
112
119
  const hasNestedKey = stringKey.includes('.');
113
- const message = (0, helpers_1.formatICUMessage)("Translation missing: {hasNested, select, true {nested path} other {key}} {componentId}.{stringKey} not found in language {language}", { componentId, stringKey, language, hasNested: hasNestedKey ? 'true' : 'false' }, messageLanguage);
114
- return new I18nError(exports.I18nErrorCode.TRANSLATION_MISSING, message, { componentId, stringKey, language });
120
+ const message = (0, helpers_1.formatICUMessage)('Translation missing: {hasNested, select, true {nested path} other {key}} {componentId}.{stringKey} not found in language {language}', {
121
+ componentId,
122
+ stringKey,
123
+ language,
124
+ hasNested: hasNestedKey ? 'true' : 'false',
125
+ }, messageLanguage);
126
+ return new I18nError(exports.I18nErrorCode.TRANSLATION_MISSING, message, {
127
+ componentId,
128
+ stringKey,
129
+ language,
130
+ });
115
131
  }
116
132
  /**
117
133
  * Creates an error for invalid configuration.
@@ -129,8 +145,10 @@ class I18nError extends Error {
129
145
  */
130
146
  static duplicateComponent(componentId, language = 'en-US') {
131
147
  const hasNamespace = componentId.includes('.');
132
- const message = (0, helpers_1.formatICUMessage)("{hasNamespace, select, true {Namespaced component {componentId}} other {Component {componentId}}} is already registered {hasNamespace, select, true {in this namespace} other {in the registry}}", { componentId, hasNamespace: hasNamespace ? 'true' : 'false' }, language);
133
- return new I18nError(exports.I18nErrorCode.DUPLICATE_COMPONENT, message, { componentId });
148
+ const message = (0, helpers_1.formatICUMessage)('{hasNamespace, select, true {Namespaced component {componentId}} other {Component {componentId}}} is already registered {hasNamespace, select, true {in this namespace} other {in the registry}}', { componentId, hasNamespace: hasNamespace ? 'true' : 'false' }, language);
149
+ return new I18nError(exports.I18nErrorCode.DUPLICATE_COMPONENT, message, {
150
+ componentId,
151
+ });
134
152
  }
135
153
  /**
136
154
  * Creates an error for duplicate language registration with ICU formatting.
@@ -140,7 +158,9 @@ class I18nError extends Error {
140
158
  */
141
159
  static duplicateLanguage(language, messageLanguage = 'en-US') {
142
160
  const message = `Language '${language}' already registered`;
143
- return new I18nError(exports.I18nErrorCode.DUPLICATE_LANGUAGE, message, { language });
161
+ return new I18nError(exports.I18nErrorCode.DUPLICATE_LANGUAGE, message, {
162
+ language,
163
+ });
144
164
  }
145
165
  /**
146
166
  * Creates an error for validation failure with ICU plural formatting and number formatting.
@@ -150,7 +170,10 @@ class I18nError extends Error {
150
170
  */
151
171
  static validationFailed(errors, language = 'en-US') {
152
172
  const message = (0, helpers_1.formatICUMessage)('Validation failed with {count, plural, one {{count, number, integer} error} other {{count, number, integer} errors}}: {details}', { count: errors.length, details: errors.join(', ') }, language);
153
- return new I18nError(exports.I18nErrorCode.VALIDATION_FAILED, message, { errors, count: errors.length });
173
+ return new I18nError(exports.I18nErrorCode.VALIDATION_FAILED, message, {
174
+ errors,
175
+ count: errors.length,
176
+ });
154
177
  }
155
178
  /**
156
179
  * Creates an error for when an i18n instance is not found with nested ICU select formatting.
@@ -160,7 +183,7 @@ class I18nError extends Error {
160
183
  */
161
184
  static instanceNotFound(key, language = 'en-US') {
162
185
  const isDefault = key === 'default' || key === '';
163
- const message = (0, helpers_1.formatICUMessage)("{isDefault, select, true {Default i18n instance not found} other {I18n instance {key} not found}} in registry", { key, isDefault: isDefault ? 'true' : 'false' }, language);
186
+ const message = (0, helpers_1.formatICUMessage)('{isDefault, select, true {Default i18n instance not found} other {I18n instance {key} not found}} in registry', { key, isDefault: isDefault ? 'true' : 'false' }, language);
164
187
  return new I18nError(exports.I18nErrorCode.INSTANCE_NOT_FOUND, message, { key });
165
188
  }
166
189
  /**
@@ -181,8 +204,10 @@ class I18nError extends Error {
181
204
  * @returns An I18nError instance
182
205
  */
183
206
  static invalidContext(contextKey, language = 'en-US') {
184
- const message = (0, helpers_1.formatICUMessage)("Invalid context key {contextKey}", { contextKey }, language);
185
- return new I18nError(exports.I18nErrorCode.INVALID_CONTEXT, message, { contextKey });
207
+ const message = (0, helpers_1.formatICUMessage)('Invalid context key {contextKey}', { contextKey }, language);
208
+ return new I18nError(exports.I18nErrorCode.INVALID_CONTEXT, message, {
209
+ contextKey,
210
+ });
186
211
  }
187
212
  /**
188
213
  * Creates an error for when a plural form is not found with nested ICU select and plural formatting.
@@ -194,15 +219,21 @@ class I18nError extends Error {
194
219
  */
195
220
  static pluralFormNotFound(category, language, key, availableForms) {
196
221
  const formCount = availableForms.length;
197
- const message = (0, helpers_1.formatICUMessage)("Plural form {category} not found for language {language}{hasKey, select, true { in key {keyName}} other {}}. {formCount, plural, one {Available form} other {Available forms}} ({formCount, number, integer}): {forms}", {
222
+ const message = (0, helpers_1.formatICUMessage)('Plural form {category} not found for language {language}{hasKey, select, true { in key {keyName}} other {}}. {formCount, plural, one {Available form} other {Available forms}} ({formCount, number, integer}): {forms}', {
198
223
  category,
199
224
  language,
200
225
  keyName: key,
201
226
  hasKey: key ? 'true' : 'false',
202
227
  forms: availableForms.join(', '),
203
- formCount
228
+ formCount,
204
229
  }, language);
205
- return new I18nError(exports.I18nErrorCode.PLURAL_FORM_NOT_FOUND, message, { category, language, key, availableForms, formCount });
230
+ return new I18nError(exports.I18nErrorCode.PLURAL_FORM_NOT_FOUND, message, {
231
+ category,
232
+ language,
233
+ key,
234
+ availableForms,
235
+ formCount,
236
+ });
206
237
  }
207
238
  /**
208
239
  * Creates an error for an invalid plural category with nested ICU plural and number formatting.
@@ -213,12 +244,16 @@ class I18nError extends Error {
213
244
  */
214
245
  static invalidPluralCategory(category, validCategories, language = 'en-US') {
215
246
  const count = validCategories.length;
216
- const message = (0, helpers_1.formatICUMessage)("Invalid plural category {category}. {count, plural, one {Valid category ({count, number, integer})} other {Valid categories ({count, number, integer})}}: {categories}", {
247
+ const message = (0, helpers_1.formatICUMessage)('Invalid plural category {category}. {count, plural, one {Valid category ({count, number, integer})} other {Valid categories ({count, number, integer})}}: {categories}', {
217
248
  category,
218
249
  categories: validCategories.join(', '),
219
- count
250
+ count,
220
251
  }, language);
221
- return new I18nError(exports.I18nErrorCode.INVALID_PLURAL_CATEGORY, message, { category, validCategories, count });
252
+ return new I18nError(exports.I18nErrorCode.INVALID_PLURAL_CATEGORY, message, {
253
+ category,
254
+ validCategories,
255
+ count,
256
+ });
222
257
  }
223
258
  /**
224
259
  * Creates an error for when the count variable is missing for plural forms with ICU formatting.
@@ -228,7 +263,9 @@ class I18nError extends Error {
228
263
  */
229
264
  static missingCountVariable(key, language = 'en-US') {
230
265
  const message = (0, helpers_1.formatICUMessage)("Plural forms used in key {key} but no 'count' variable provided", { key }, language);
231
- return new I18nError(exports.I18nErrorCode.MISSING_COUNT_VARIABLE, message, { key });
266
+ return new I18nError(exports.I18nErrorCode.MISSING_COUNT_VARIABLE, message, {
267
+ key,
268
+ });
232
269
  }
233
270
  /**
234
271
  * Creates an error for validation threshold violations with ICU number formatting.
@@ -241,8 +278,17 @@ class I18nError extends Error {
241
278
  * @returns An I18nError instance
242
279
  */
243
280
  static validationThresholdExceeded(fieldName, value, threshold, thresholdType = 'integer', language = 'en-US') {
244
- const message = (0, helpers_1.formatICUMessage)("Validation failed for {fieldName}: value {value, number, " + thresholdType + "} exceeds maximum threshold of {threshold, number, " + thresholdType + "}", { fieldName, value, threshold }, language);
245
- return new I18nError(exports.I18nErrorCode.VALIDATION_THRESHOLD_EXCEEDED, message, { fieldName, value, threshold, thresholdType });
281
+ const message = (0, helpers_1.formatICUMessage)('Validation failed for {fieldName}: value {value, number, ' +
282
+ thresholdType +
283
+ '} exceeds maximum threshold of {threshold, number, ' +
284
+ thresholdType +
285
+ '}', { fieldName, value, threshold }, language);
286
+ return new I18nError(exports.I18nErrorCode.VALIDATION_THRESHOLD_EXCEEDED, message, {
287
+ fieldName,
288
+ value,
289
+ threshold,
290
+ thresholdType,
291
+ });
246
292
  }
247
293
  /**
248
294
  * Creates an error for operation failures at specific steps with ICU selectordinal formatting.
@@ -254,8 +300,12 @@ class I18nError extends Error {
254
300
  * @returns An I18nError instance
255
301
  */
256
302
  static operationStepFailed(stepNumber, operationName, reason, language = 'en-US') {
257
- const message = (0, helpers_1.formatICUMessage)("Operation {operationName} failed at {stepNumber, selectordinal, one {#st} two {#nd} few {#rd} other {#th}} step: {reason}", { stepNumber, operationName, reason }, language);
258
- return new I18nError(exports.I18nErrorCode.OPERATION_STEP_FAILED, message, { stepNumber, operationName, reason });
303
+ const message = (0, helpers_1.formatICUMessage)('Operation {operationName} failed at {stepNumber, selectordinal, one {#st} two {#nd} few {#rd} other {#th}} step: {reason}', { stepNumber, operationName, reason }, language);
304
+ return new I18nError(exports.I18nErrorCode.OPERATION_STEP_FAILED, message, {
305
+ stepNumber,
306
+ operationName,
307
+ reason,
308
+ });
259
309
  }
260
310
  /**
261
311
  * Creates an error for rate limit violations with nested ICU messages.
@@ -268,8 +318,19 @@ class I18nError extends Error {
268
318
  * @returns An I18nError instance
269
319
  */
270
320
  static rateLimitExceeded(requestCount, limit, windowSeconds, retryAfterSeconds, language = 'en-US') {
271
- const message = (0, helpers_1.formatICUMessage)("Rate limit exceeded: {requestCount, plural, one {# request} other {# requests}} made, exceeding limit of {limit, number, integer} {limit, plural, one {request} other {requests}} per {windowSeconds, number, integer} {windowSeconds, plural, one {second} other {seconds}}. {hasRetry, select, true {Retry after {retryAfterSeconds, number, integer} {retryAfterSeconds, plural, one {second} other {seconds}}.} other {Retry immediately.}}", { requestCount, limit, windowSeconds, retryAfterSeconds, hasRetry: retryAfterSeconds > 0 ? 'true' : 'false' }, language);
272
- return new I18nError(exports.I18nErrorCode.RATE_LIMIT_EXCEEDED, message, { requestCount, limit, windowSeconds, retryAfterSeconds });
321
+ const message = (0, helpers_1.formatICUMessage)('Rate limit exceeded: {requestCount, plural, one {# request} other {# requests}} made, exceeding limit of {limit, number, integer} {limit, plural, one {request} other {requests}} per {windowSeconds, number, integer} {windowSeconds, plural, one {second} other {seconds}}. {hasRetry, select, true {Retry after {retryAfterSeconds, number, integer} {retryAfterSeconds, plural, one {second} other {seconds}}.} other {Retry immediately.}}', {
322
+ requestCount,
323
+ limit,
324
+ windowSeconds,
325
+ retryAfterSeconds,
326
+ hasRetry: retryAfterSeconds > 0 ? 'true' : 'false',
327
+ }, language);
328
+ return new I18nError(exports.I18nErrorCode.RATE_LIMIT_EXCEEDED, message, {
329
+ requestCount,
330
+ limit,
331
+ windowSeconds,
332
+ retryAfterSeconds,
333
+ });
273
334
  }
274
335
  /**
275
336
  * Creates a nested validation error with multiple layers of context.
@@ -283,8 +344,14 @@ class I18nError extends Error {
283
344
  * @returns An I18nError instance
284
345
  */
285
346
  static nestedValidationError(componentId, fieldPath, errorCount, errorType, severity, language = 'en-US') {
286
- const message = (0, helpers_1.formatICUMessage)("Validation error in component {componentId}: {severity, select, low {Minor issue} medium {Moderate issue} high {Serious issue} critical {Critical issue} other {Issue}} detected in nested field {fieldPath} - {errorType, select, type {Type mismatch} range {Value out of range} format {Invalid format} required {Required field missing} other {Validation error}} with {errorCount, plural, one {# occurrence} other {# occurrences}}", { componentId, fieldPath, errorCount, errorType, severity }, language);
287
- return new I18nError(exports.I18nErrorCode.NESTED_VALIDATION_ERROR, message, { componentId, fieldPath, errorCount, errorType, severity });
347
+ const message = (0, helpers_1.formatICUMessage)('Validation error in component {componentId}: {severity, select, low {Minor issue} medium {Moderate issue} high {Serious issue} critical {Critical issue} other {Issue}} detected in nested field {fieldPath} - {errorType, select, type {Type mismatch} range {Value out of range} format {Invalid format} required {Required field missing} other {Validation error}} with {errorCount, plural, one {# occurrence} other {# occurrences}}', { componentId, fieldPath, errorCount, errorType, severity }, language);
348
+ return new I18nError(exports.I18nErrorCode.NESTED_VALIDATION_ERROR, message, {
349
+ componentId,
350
+ fieldPath,
351
+ errorCount,
352
+ errorType,
353
+ severity,
354
+ });
288
355
  }
289
356
  }
290
357
  exports.I18nError = I18nError;
@@ -1 +1 @@
1
- {"version":3,"file":"i18n-error.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/errors/i18n-error.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,4CAAkD;AAElD;;GAEG;AACU,QAAA,aAAa,GAAG;IAC3B,sCAAsC;IACtC,mBAAmB,EAAE,qBAAqB;IAC1C,wCAAwC;IACxC,oBAAoB,EAAE,sBAAsB;IAC5C,qCAAqC;IACrC,kBAAkB,EAAE,oBAAoB;IACxC,yDAAyD;IACzD,mBAAmB,EAAE,qBAAqB;IAC1C,qCAAqC;IACrC,cAAc,EAAE,gBAAgB;IAChC,8CAA8C;IAC9C,mBAAmB,EAAE,qBAAqB;IAC1C,6CAA6C;IAC7C,kBAAkB,EAAE,oBAAoB;IACxC,4CAA4C;IAC5C,iBAAiB,EAAE,mBAAmB;IACtC,8BAA8B;IAC9B,kBAAkB,EAAE,oBAAoB;IACxC,mCAAmC;IACnC,eAAe,EAAE,iBAAiB;IAClC,mCAAmC;IACnC,eAAe,EAAE,iBAAiB;IAClC,sDAAsD;IACtD,qBAAqB,EAAE,uBAAuB;IAC9C,uCAAuC;IACvC,uBAAuB,EAAE,yBAAyB;IAClD,oDAAoD;IACpD,sBAAsB,EAAE,wBAAwB;IAChD,oCAAoC;IACpC,6BAA6B,EAAE,+BAA+B;IAC9D,wCAAwC;IACxC,qBAAqB,EAAE,uB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AAM,OAAO,GAAG,IAAA,0BAAgB,EAC9B,4aAA4a,EAC5a,EAAE,WAAW,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,EAC3D,QAAQ,CACT,CAAC;QACF,OAAO,IAAI,SAAS,CAClB,qBAAa,CAAC,uBAAuB,EACrC,OAAO,EACP,EAAE,WAAW,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,CAC5D,CAAC;IACJ,CAAC;CACF;AApaD,8BAoaC"}
1
+ {"version":3,"file":"i18n-error.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/errors/i18n-error.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,4CAAkD;AAElD;;GAEG;AACU,QAAA,aAAa,GAAG;IAC3B,sCAAsC;IACtC,mBAAmB,EAAE,qBAAqB;IAC1C,wCAAwC;IACxC,oBAAoB,EAAE,sBAAsB;IAC5C,qCAAqC;IACrC,kBAAkB,EAAE,oBAAoB;IACxC,yDAAyD;IACzD,mBAAmB,EAAE,qBAAqB;IAC1C,qCAAqC;IACrC,cAAc,EAAE,gBAAgB;IAChC,8CAA8C;IAC9C,mBAAmB,EAAE,qBAAqB;IAC1C,6CAA6C;IAC7C,kBAAkB,EAAE,oBAAoB;IACxC,4CAA4C;IAC5C,iBAAiB,EAAE,mBAAmB;IACtC,8BAA8B;IAC9B,kBAAkB,EAAE,oBAAoB;IACxC,mCAAmC;IACnC,eAAe,EAAE,iBAAiB;IAClC,mCAAmC;IACnC,eAAe,EAAE,iBAAiB;IAClC,sDAAsD;IACtD,qBAAqB,EAAE,uBAAuB;IAC9C,uCAAuC;IACvC,uBAAuB,EAAE,yBAAyB;IAClD,oDAAoD;IACpD,sBAAsB,EAAE,wBAAwB;IAChD,oCAAoC;IACpC,6BAA6B,EAAE,+BAA+B;IAC9D,wCAAwC;IACxC,qBAAqB,EAAE,uBAAuB;IAC9C,0BAA0B;IAC1B,mBAAmB,EAAE,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EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,EAC3D,QAAQ,CACT,CAAC;QACF,OAAO,IAAI,SAAS,CAAC,qBAAa,CAAC,uBAAuB,EAAE,OAAO,EAAE;YACnE,WAAW;YACX,SAAS;YACT,UAAU;YACV,SAAS;YACT,QAAQ;SACT,CAAC,CAAC;IACL,CAAC;CACF;AApbD,8BAobC"}
@@ -1,13 +1,12 @@
1
1
  /**
2
2
  * Error exports
3
+ *
4
+ * This barrel export is split into separate files to avoid circular dependencies:
5
+ * - base.ts: Base error classes without core dependencies
6
+ * - translatable-exports.ts: Errors that use lazy initialization with core modules
7
+ *
8
+ * Import from specific files when possible to minimize module loading.
3
9
  */
4
- export * from './context-error';
5
- export * from './enhanced-error-base';
6
- export * from './handleable';
7
- export * from './i18n-error';
8
- export * from './translatable-generic';
9
- export * from './translatable-handleable-generic';
10
- export * from './translatable';
11
- export * from './typed-handleable';
12
- export * from './typed';
10
+ export * from './base';
11
+ export * from './translatable-exports';
13
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/errors/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,wBAAwB,CAAC;AACvC,cAAc,mCAAmC,CAAC;AAClD,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/errors/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,cAAc,QAAQ,CAAC;AAGvB,cAAc,wBAAwB,CAAC"}
@@ -1,16 +1,17 @@
1
1
  "use strict";
2
2
  /**
3
3
  * Error exports
4
+ *
5
+ * This barrel export is split into separate files to avoid circular dependencies:
6
+ * - base.ts: Base error classes without core dependencies
7
+ * - translatable-exports.ts: Errors that use lazy initialization with core modules
8
+ *
9
+ * Import from specific files when possible to minimize module loading.
4
10
  */
5
11
  Object.defineProperty(exports, "__esModule", { value: true });
6
12
  const tslib_1 = require("tslib");
7
- tslib_1.__exportStar(require("./context-error"), exports);
8
- tslib_1.__exportStar(require("./enhanced-error-base"), exports);
9
- tslib_1.__exportStar(require("./handleable"), exports);
10
- tslib_1.__exportStar(require("./i18n-error"), exports);
11
- tslib_1.__exportStar(require("./translatable-generic"), exports);
12
- tslib_1.__exportStar(require("./translatable-handleable-generic"), exports);
13
- tslib_1.__exportStar(require("./translatable"), exports);
14
- tslib_1.__exportStar(require("./typed-handleable"), exports);
15
- tslib_1.__exportStar(require("./typed"), exports);
13
+ // Re-export from base (no core dependencies)
14
+ tslib_1.__exportStar(require("./base"), exports);
15
+ // Re-export from translatable (uses lazy initialization)
16
+ tslib_1.__exportStar(require("./translatable-exports"), exports);
16
17
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/errors/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,0DAAgC;AAChC,gEAAsC;AACtC,uDAA6B;AAC7B,uDAA6B;AAC7B,iEAAuC;AACvC,4EAAkD;AAClD,yDAA+B;AAC/B,6DAAmC;AACnC,kDAAwB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/errors/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;AAEH,6CAA6C;AAC7C,iDAAuB;AAEvB,yDAAyD;AACzD,iEAAuC"}
@@ -0,0 +1,53 @@
1
+ /**
2
+ * TypedError class with proper type safety
3
+ *
4
+ * This class provides a type-safe way to create errors with additional
5
+ * properties without using type casts. It extends the standard Error class
6
+ * and adds support for:
7
+ * - type: Error type classification
8
+ * - componentId: Component identifier where error originated
9
+ * - reasonMap: Map of reasons or context for the error
10
+ * - metadata: Additional metadata associated with the error
11
+ * - cause: Error cause chaining (ES2022 standard)
12
+ */
13
+ export interface TypedErrorOptions {
14
+ /**
15
+ * Error type classification (e.g., 'validation', 'network', 'auth')
16
+ */
17
+ type: string;
18
+ /**
19
+ * Component identifier where the error originated
20
+ */
21
+ componentId?: string;
22
+ /**
23
+ * Map of reasons or context for the error
24
+ */
25
+ reasonMap?: Record<string, unknown>;
26
+ /**
27
+ * Additional metadata associated with the error
28
+ */
29
+ metadata?: Record<string, unknown>;
30
+ /**
31
+ * The cause of this error (for error chaining)
32
+ */
33
+ cause?: Error;
34
+ }
35
+ /**
36
+ * TypedError class that extends Error with additional type-safe properties
37
+ */
38
+ export declare class TypedError extends Error {
39
+ readonly type: string;
40
+ readonly componentId?: string;
41
+ readonly reasonMap?: Record<string, unknown>;
42
+ readonly metadata?: Record<string, unknown>;
43
+ constructor(message: string, options: TypedErrorOptions);
44
+ /**
45
+ * Check if an error is a TypedError
46
+ */
47
+ static isTypedError(error: unknown): error is TypedError;
48
+ /**
49
+ * Convert a standard Error to a TypedError
50
+ */
51
+ static fromError(error: Error, options: Omit<TypedErrorOptions, 'cause'>): TypedError;
52
+ }
53
+ //# sourceMappingURL=simple-typed-error.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"simple-typed-error.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/errors/simple-typed-error.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEpC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEnC;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AAED;;GAEG;AACH,qBAAa,UAAW,SAAQ,KAAK;IACnC,SAAyB,IAAI,EAAE,MAAM,CAAC;IACtC,SAAyB,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9C,SAAyB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC7D,SAAyB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;gBAEhD,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,iBAAiB;IAYvD;;OAEG;IACH,MAAM,CAAC,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,UAAU;IAIxD;;OAEG;IACH,MAAM,CAAC,SAAS,CACd,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,IAAI,CAAC,iBAAiB,EAAE,OAAO,CAAC,GACxC,UAAU;CAMd"}
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ /**
3
+ * TypedError class with proper type safety
4
+ *
5
+ * This class provides a type-safe way to create errors with additional
6
+ * properties without using type casts. It extends the standard Error class
7
+ * and adds support for:
8
+ * - type: Error type classification
9
+ * - componentId: Component identifier where error originated
10
+ * - reasonMap: Map of reasons or context for the error
11
+ * - metadata: Additional metadata associated with the error
12
+ * - cause: Error cause chaining (ES2022 standard)
13
+ */
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.TypedError = void 0;
16
+ /**
17
+ * TypedError class that extends Error with additional type-safe properties
18
+ */
19
+ class TypedError extends Error {
20
+ type;
21
+ componentId;
22
+ reasonMap;
23
+ metadata;
24
+ constructor(message, options) {
25
+ super(message, { cause: options.cause });
26
+ this.type = options.type;
27
+ this.componentId = options.componentId;
28
+ this.reasonMap = options.reasonMap;
29
+ this.metadata = options.metadata;
30
+ this.name = 'TypedError';
31
+ // Maintain proper prototype chain
32
+ Object.setPrototypeOf(this, TypedError.prototype);
33
+ }
34
+ /**
35
+ * Check if an error is a TypedError
36
+ */
37
+ static isTypedError(error) {
38
+ return error instanceof TypedError;
39
+ }
40
+ /**
41
+ * Convert a standard Error to a TypedError
42
+ */
43
+ static fromError(error, options) {
44
+ return new TypedError(error.message, {
45
+ ...options,
46
+ cause: error,
47
+ });
48
+ }
49
+ }
50
+ exports.TypedError = TypedError;
51
+ //# sourceMappingURL=simple-typed-error.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"simple-typed-error.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/errors/simple-typed-error.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;;AA6BH;;GAEG;AACH,MAAa,UAAW,SAAQ,KAAK;IACV,IAAI,CAAS;IACb,WAAW,CAAU;IACrB,SAAS,CAA2B;IACpC,QAAQ,CAA2B;IAE5D,YAAY,OAAe,EAAE,OAA0B;QACrD,KAAK,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC;QACzC,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;QACzB,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;QACvC,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;QACnC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;QACjC,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC;QAEzB,kCAAkC;QAClC,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC;IACpD,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,YAAY,CAAC,KAAc;QAChC,OAAO,KAAK,YAAY,UAAU,CAAC;IACrC,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,SAAS,CACd,KAAY,EACZ,OAAyC;QAEzC,OAAO,IAAI,UAAU,CAAC,KAAK,CAAC,OAAO,EAAE;YACnC,GAAG,OAAO;YACV,KAAK,EAAE,KAAK;SACb,CAAC,CAAC;IACL,CAAC;CACF;AArCD,gCAqCC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Translatable error exports that use lazy initialization
3
+ * These errors depend on core modules but use lazy loading patterns
4
+ */
5
+ export * from './context-error';
6
+ export * from './i18n-error';
7
+ export * from './translatable';
8
+ export * from './translatable-generic';
9
+ export * from './translatable-handleable-generic';
10
+ export * from './typed';
11
+ export * from './typed-handleable';
12
+ //# sourceMappingURL=translatable-exports.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"translatable-exports.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/errors/translatable-exports.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,mCAAmC,CAAC;AAClD,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /**
3
+ * Translatable error exports that use lazy initialization
4
+ * These errors depend on core modules but use lazy loading patterns
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ const tslib_1 = require("tslib");
8
+ tslib_1.__exportStar(require("./context-error"), exports);
9
+ tslib_1.__exportStar(require("./i18n-error"), exports);
10
+ tslib_1.__exportStar(require("./translatable"), exports);
11
+ tslib_1.__exportStar(require("./translatable-generic"), exports);
12
+ tslib_1.__exportStar(require("./translatable-handleable-generic"), exports);
13
+ tslib_1.__exportStar(require("./typed"), exports);
14
+ tslib_1.__exportStar(require("./typed-handleable"), exports);
15
+ //# sourceMappingURL=translatable-exports.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"translatable-exports.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/errors/translatable-exports.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,0DAAgC;AAChC,uDAA6B;AAC7B,yDAA+B;AAC/B,iEAAuC;AACvC,4EAAkD;AAClD,kDAAwB;AACxB,6DAAmC"}
@@ -1,8 +1,11 @@
1
- import { I18nEngine } from '../core';
1
+ import { I18nEngine } from '../core/i18n-engine';
2
2
  import { GenderCategory } from '../gender/gender-categories';
3
3
  /**
4
4
  * Generic translatable error that works with any plugin engine and component.
5
5
  *
6
+ * Uses lazy initialization to avoid circular dependencies with core modules.
7
+ * The I18nEngine is only accessed when the error is constructed, not at module load time.
8
+ *
6
9
  * **Full i18n 3.0/3.5 Feature Support:**
7
10
  * - ICU MessageFormat (all formatters: plural, select, selectordinal)
8
11
  * - Pluralization for 37 languages with CLDR rules
@@ -1 +1 @@
1
- {"version":3,"file":"translatable-generic.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/errors/translatable-generic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAE7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,qBAAa,wBAAwB,CAAC,UAAU,SAAS,MAAM,GAAG,MAAM,CAAE,SAAQ,KAAK;IACrF,SAAgB,SAAS,EAAE,UAAU,CAAC;IACtC,SAAgB,WAAW,EAAE,MAAM,CAAC;IACpC,SAAgB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClC,SAAgB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;IAC5D,SAAgB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAE/C;;;;;;;;OAQG;gBAED,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,UAAU,EACrB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,G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AM,EAC1C,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,UAAU,EACrB,aAAa,EAAE,MAAM,EACrB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,EAC3C,QAAQ,CAAC,EAAE,MAAM,EACjB,WAAW,CAAC,EAAE,MAAM,GACnB,wBAAwB,CAAC,UAAU,CAAC;IAWvC;;;OAGG;IACH,MAAM,CAAC,gBAAgB,CAAC,UAAU,SAAS,MAAM,EAC/C,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,UAAU,EACrB,KAAK,EAAE,MAAM,EACb,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,EAC3C,QAAQ,CAAC,EAAE,MAAM,EACjB,WAAW,CAAC,EAAE,MAAM,GACnB,wBAAwB,CAAC,UAAU,CAAC;IAWvC;;;OAGG;IACH,MAAM,CAAC,oBAAoB,CAAC,UAAU,SAAS,MAAM,EACnD,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,UAAU,EACrB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,EACzC,QAAQ,CAAC,EAAE,MAAM,EACjB,WAAW,CAAC,EAAE,MAAM,GACnB,wBAAwB,CAAC,UAAU,CAAC;CAUxC"}
1
+ {"version":3,"file":"translatable-generic.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/errors/translatable-generic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAE7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,qBAAa,wBAAwB,CACnC,UAAU,SAAS,MAAM,GAAG,MAAM,CAClC,SAAQ,KAAK;IACb,SAAgB,SAAS,EAAE,UAAU,CAAC;IACtC,SAAyB,WAAW,EAAE,M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ule", { value: true });
3
3
  exports.TranslatableGenericError = void 0;
4
- const core_1 = require("../core");
4
+ const i18n_engine_1 = require("../core/i18n-engine");
5
5
  /**
6
6
  * Generic translatable error that works with any plugin engine and component.
7
7
  *
8
+ * Uses lazy initialization to avoid circular dependencies with core modules.
9
+ * The I18nEngine is only accessed when the error is constructed, not at module load time.
10
+ *
8
11
  * **Full i18n 3.0/3.5 Feature Support:**
9
12
  * - ICU MessageFormat (all formatters: plural, select, selectordinal)
10
13
  * - Pluralization for 37 languages with CLDR rules
@@ -49,13 +52,14 @@ class TranslatableGenericError extends Error {
49
52
  * @param instanceKey - Optional engine instance key
50
53
  */
51
54
  constructor(componentId, stringKey, variables, language, metadata, instanceKey) {
55
+ // Lazy initialization: getInstance() is only called when error is constructed
52
56
  let translatedMessage;
53
57
  try {
54
- const engine = core_1.I18nEngine.getInstance(instanceKey);
58
+ const engine = i18n_engine_1.I18nEngine.getInstance(instanceKey);
55
59
  translatedMessage = engine.safeTranslate(componentId, stringKey, variables, language);
56
60
  }
57
61
  catch (error) {
58
- // If engine not found or translation fails, use fallback format
62
+ // Fallback if engine not found - TranslatableGenericError is designed to be flexible
59
63
  translatedMessage = `[${componentId}.${stringKey}]`;
60
64
  }
61
65
  super(translatedMessage);
@@ -87,10 +91,11 @@ class TranslatableGenericError extends Error {
87
91
  */
88
92
  retranslate(language, instanceKey) {
89
93
  try {
90
- const engine = core_1.I18nEngine.getInstance(instanceKey);
94
+ const engine = i18n_engine_1.I18nEngine.getInstance(instanceKey);
91
95
  return engine.safeTranslate(this.componentId, this.stringKey, this.variables, language);
92
96
  }
93
97
  catch (error) {
98
+ // Fallback if engine not found
94
99
  return `[${this.componentId}.${this.stringKey}]`;
95
100
  }
96
101
  }
@@ -1 +1 @@
1
- {"version":3,"file":"translatable-generic.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/errors/translatable-generic.ts"],"names":[],"mappings":";;;AAAA,kCAAqC;AAIrC;;;;;;;;;;;;;;;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MAAM,EAAE,EACxB,QAAQ,EACR,SAAS,EACT,WAAW,CACZ,CAAC;IACJ,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,WAAW,CAChB,WAAmB,EACnB,SAAqB,EACrB,aAAqB,EACrB,SAA2C,EAC3C,QAAiB,EACjB,WAAoB;QAEpB,OAAO,IAAI,wBAAwB,CACjC,WAAW,EACX,SAAS,EACT,EAAE,GAAG,SAAS,EAAE,aAAa,EAAE,EAC/B,QAAQ,EACR,SAAS,EACT,WAAW,CACZ,CAAC;IACJ,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,gBAAgB,CACrB,WAAmB,EACnB,SAAqB,EACrB,KAAa,EACb,SAA2C,EAC3C,QAAiB,EACjB,WAAoB;QAEpB,OAAO,IAAI,wBAAwB,CACjC,WAAW,EACX,SAAS,EACT,EAAE,GAAG,SAAS,EAAE,KAAK,EAAE,EACvB,QAAQ,EACR,SAAS,EACT,WAAW,CACZ,CAAC;IACJ,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,oBAAoB,CACzB,WAAmB,EACnB,SAAqB,EACrB,QAAyC,EACzC,QAAiB,EACjB,WAAoB;QAEpB,OAAO,IAAI,wBAAwB,CACjC,WAAW,EACX,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,WAAW,CACZ,CAAC;IACJ,CAAC;CACF;AA5MD,4DA4MC"}
1
+ {"version":3,"file":"translatable-generic.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/errors/translatable-generic.ts"],"names":[],"mappings":";;;AAAA,qDAAiD;AAGjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MAAa,wBAEX,SAAQ,KAAK;IACG,SAAS,CAAa;IACb,WAAW,CAAS;IAC7B,QAAQ,CAAU;IAClB,SAAS,CAAmC;IACnC,QAAQ,CAAuB;IAExD;;;;;;;;OAQG;IACH,YACE,WAAmB,EACnB,SAAqB,EACrB,SAA2C,EAC3C,QAAiB,E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AI,wBAAwB,CACjC,WAAW,EACX,SAAS,EACT,EAAE,GAAG,SAAS,EAAE,aAAa,EAAE,EAC/B,QAAQ,EACR,SAAS,EACT,WAAW,CACZ,CAAC;IACJ,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,gBAAgB,CACrB,WAAmB,EACnB,SAAqB,EACrB,KAAa,EACb,SAA2C,EAC3C,QAAiB,EACjB,WAAoB;QAEpB,OAAO,IAAI,wBAAwB,CACjC,WAAW,EACX,SAAS,EACT,EAAE,GAAG,SAAS,EAAE,KAAK,EAAE,EACvB,QAAQ,EACR,SAAS,EACT,WAAW,CACZ,CAAC;IACJ,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,oBAAoB,CACzB,WAAmB,EACnB,SAAqB,EACrB,QAAyC,EACzC,QAAiB,EACjB,WAAoB;QAEpB,OAAO,IAAI,wBAAwB,CACjC,WAAW,EACX,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,WAAW,CACZ,CAAC;IACJ,CAAC;CACF;AA/MD,4DA+MC"}
@@ -2,6 +2,10 @@ import { GenderCategory } from '../gender/gender-categories';
2
2
  /**
3
3
  * Translatable error class with full i18n 3.0/3.5 feature support.
4
4
  *
5
+ * Uses lazy initialization to avoid circular dependencies with core modules.
6
+ * The I18nEngine is only accessed when the error is constructed, not at module load time.
7
+ * If the i18n engine is not initialized, falls back to displaying the raw key.
8
+ *
5
9
  * **Supported Features:**
6
10
  * - ICU MessageFormat (variables, plural, select, selectordinal)
7
11
  * - Pluralization (37 languages, CLDR rules)
@@ -1 +1 @@
1
- {"version":3,"file":"translatable.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/errors/translatable.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAE7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,qBAAa,iBAAiB,CAAC,UAAU,SAAS,MAAM,GAAG,MAAM,CAAE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UAAU,SAAS,MAAM,EACzC,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,UAAU,EACrB,KAAK,EAAE,MAAM,EACb,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,EAC3C,QAAQ,CAAC,EAAE,MAAM,GAChB,iBAAiB,CAAC,UAAU,CAAC;CAQjC"}
1
+ {"version":3,"file":"translatable.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-i18n-lib/src/errors/translatable.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAE7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,qBAAa,iBAAiB,CAC5B,UAAU,SAAS,MAAM,GAAG,MAAM,CAClC,SAAQ,KAAK;IACb,SAAyB,WAAW,EAAE,MAAM,CAAC;IAC7C,SAAgB,SAAS,EAAE,UAAU,CAAC;IACtC,SAAgB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;IAC5D,SAAgB,QAAQ,CAAC,EAAE,MAAM,CAAC;gBAGhC,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,UAAU,EACrB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,EAC3C,QAAQ,CAAC,EAAE,MAAM;IAanB;;;OAGG;IACH,MAAM,CAAC,SAAS,CAAC,UAAU,SAAS,MAAM,EACxC,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,UAAU,EACrB,KAAK,EAAE,MAAM,EACb,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,EAC3C,QAAQ,CAAC,EAAE,MAAM,GAChB,iBAAiB,CAAC,UAAU,CAAC;IAShC;;;OAGG;IACH,MAAM,CAAC,UAAU,CAAC,UAAU,SAAS,MAAM,EACzC,WAAW,EAAE,MAAM,E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