@acorex/core 19.10.9 → 19.10.11
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/date-time/lib/datetime.module.d.ts +3 -3
- package/date-time/lib/datetime.pipe.d.ts +1 -1
- package/fesm2022/acorex-core-config.mjs +3 -3
- package/fesm2022/acorex-core-date-time.mjs +21 -24
- package/fesm2022/acorex-core-date-time.mjs.map +1 -1
- package/fesm2022/acorex-core-events.mjs +3 -3
- package/fesm2022/acorex-core-file.mjs +10 -10
- package/fesm2022/acorex-core-format.mjs +41 -46
- package/fesm2022/acorex-core-format.mjs.map +1 -1
- package/fesm2022/acorex-core-image.mjs +3 -3
- package/fesm2022/{acorex-core-memorize.mjs → acorex-core-memoize.mjs} +6 -6
- package/fesm2022/acorex-core-memoize.mjs.map +1 -0
- package/fesm2022/acorex-core-network.mjs +3 -3
- package/fesm2022/acorex-core-pipes.mjs +3 -3
- package/fesm2022/acorex-core-platform.mjs +3 -3
- package/fesm2022/acorex-core-storage.mjs +9 -9
- package/fesm2022/acorex-core-translation.mjs +17 -22
- package/fesm2022/acorex-core-translation.mjs.map +1 -1
- package/fesm2022/acorex-core-utils.mjs +3 -3
- package/fesm2022/acorex-core-validation.mjs +40 -40
- package/format/lib/format.directive.d.ts +1 -1
- package/format/lib/format.module.d.ts +1 -1
- package/format/lib/format.pipe.d.ts +1 -1
- package/{memorize → memoize}/README.md +2 -2
- package/memoize/index.d.ts +1 -0
- package/memoize/lib/memoize.decorator.d.ts +1 -0
- package/package.json +4 -4
- package/translation/lib/translation.module.d.ts +1 -1
- package/translation/lib/translator.directive.d.ts +1 -1
- package/translation/lib/translator.pipe.d.ts +1 -1
- package/fesm2022/acorex-core-memorize.mjs.map +0 -1
- package/memorize/index.d.ts +0 -1
- package/memorize/lib/memorize.decorator.d.ts +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-core-translation.mjs","sources":["../../../../libs/core/translation/src/lib/translation.config.ts","../../../../libs/core/translation/src/lib/translation.loader.ts","../../../../libs/core/translation/src/lib/translation.service.ts","../../../../libs/core/translation/src/lib/translation-scope.resolver.ts","../../../../libs/core/translation/src/lib/translator.directive.ts","../../../../libs/core/translation/src/lib/translator.pipe.ts","../../../../libs/core/translation/src/lib/translation.module.ts","../../../../libs/core/translation/src/acorex-core-translation.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { AXTranslateLang, AXTranslateScope } from './translation.types';\n\nexport interface AXTranslationConfig {\n defaultLang: AXTranslateLang;\n defaultScope: AXTranslateScope;\n preloadLangs?: AXTranslateLang[];\n preloadScopes?: AXTranslateLang[];\n availableLangs?: AXTranslateLang[];\n scopeResolverKey: string;\n}\n\nexport const AX_TRANSLATION_CONFIG = new InjectionToken<AXTranslationConfig>('AX_TRANSLATION_CONFIG', {\n providedIn: 'root',\n factory: () => {\n return AXTranslationDefaultConfig;\n },\n});\n\nexport const AXTranslationDefaultConfig: AXTranslationConfig = {\n defaultLang: 'en',\n defaultScope: 'common',\n scopeResolverKey: 'scope',\n};\n\nexport type AXPartialTranslationConfig = Partial<AXTranslationConfig>;\n\nexport function translationConfig(config: AXPartialTranslationConfig = {}): AXTranslationConfig {\n const result = {\n ...AXTranslationDefaultConfig,\n ...config,\n };\n return result;\n}\n","import { InjectionToken } from '@angular/core';\nimport { Observable, of } from 'rxjs';\nimport { AXTranslateLang, AXTranslateScope, AXTranslation } from './translation.types';\n\nexport interface AXTranslationLoaderOptions {\n lang: AXTranslateLang;\n scope?: AXTranslateScope;\n}\n\nexport interface AXTranslationLoader {\n getTranslation(options: AXTranslationLoaderOptions): Observable<AXTranslation>;\n}\n\nexport class AXTranslationLoaderDefault implements AXTranslationLoader {\n getTranslation(options: AXTranslationLoaderOptions): Observable<AXTranslation> {\n return of({});\n }\n}\n\nexport const AX_TRANSLATION_LOADER = new InjectionToken<AXTranslationLoader>('AX_TRANSLATION_LOADER', {\n providedIn: 'root',\n factory: () => {\n return new AXTranslationLoaderDefault();\n },\n});\n","import { AXEventService, AXEventTypes } from '@acorex/core/events';\nimport { Injectable, inject } from '@angular/core';\nimport { get as lodashGet, set as lodashSet } from 'lodash-es';\nimport {\n BehaviorSubject,\n Observable,\n catchError,\n distinctUntilChanged,\n finalize,\n firstValueFrom,\n forkJoin,\n map,\n of,\n shareReplay,\n startWith,\n switchMap,\n tap,\n} from 'rxjs';\nimport { AX_TRANSLATION_CONFIG } from './translation.config';\nimport { AX_TRANSLATION_LOADER } from './translation.loader';\nimport { AXTranslateHashMap, AXTranslateOptions, AXTranslateParams } from './translation.types';\n\nlet singletonInstance: AXTranslationService;\n\nexport function translateSync(key: string, options?: AXTranslateOptions): string {\n return singletonInstance.translateSync(key, options);\n}\n\n@Injectable({ providedIn: 'root' })\nexport class AXTranslationService {\n private loader = inject(AX_TRANSLATION_LOADER);\n private config = inject(AX_TRANSLATION_CONFIG);\n\n private eventService = inject(AXEventService);\n\n private translationCache: AXTranslateHashMap<AXTranslateHashMap<string>> = {};\n private ongoingRequests: Map<string, Observable<any>> = new Map();\n\n private activeLang: BehaviorSubject<string> = new BehaviorSubject<string>(this.getDefaultLang());\n langChanges$: Observable<string> = this.activeLang.asObservable();\n\n private expressionCache = new Map<\n string,\n { key: string; scope?: string; lang?: string; fullMatch: string }[]\n >();\n\n public getDefaultLang(): string {\n return this.config.defaultLang;\n }\n\n public getActiveLang(): string {\n return this.activeLang.getValue();\n }\n\n public setActiveLang(lang: string): void {\n if (lang != this.getActiveLang()) {\n this.activeLang.next(lang);\n this.eventService.emitEvent({\n type: AXEventTypes.AXLanguageChanged,\n payload: lang,\n });\n }\n }\n\n /**\n * @ignore\n */\n constructor() {\n singletonInstance = this;\n }\n\n public loadLanguagesAndScopes(languages: string[], scopes: string[]): Observable<unknown> {\n const requests = languages.flatMap((lang) =>\n scopes.map((scope) => {\n // Check if translations are already cached\n if (this.translationCache[lang]?.[scope]) {\n return of(this.translationCache[lang][scope]);\n }\n\n // Use the new method to handle ongoing requests and loading\n return this.fetchTranslationFiles(lang, scope);\n }),\n );\n\n return forkJoin(requests);\n }\n\n private fetchTranslationFiles(lang: string, scope: string): Observable<AXTranslateHashMap<string>> {\n const requestKey = `${lang}_${scope}`;\n\n // Return existing observable if the request is already in progress\n if (this.ongoingRequests.has(requestKey)) {\n return this.ongoingRequests.get(requestKey);\n }\n\n // Load translations if not in cache or ongoing requests\n const translationObservable = this.loader.getTranslation({ lang, scope }).pipe(\n tap((translations) => this.setTranslationCache(lang, scope, translations)),\n catchError((error) => {\n this.handleError(`Error loading translations for lang: ${lang}, scope: ${scope}`, error);\n return of(null);\n }),\n finalize(() => {\n this.eventService.emitEvent({\n type: AXEventTypes.AXLanguageLoaded,\n payload: lang,\n });\n this.ongoingRequests.delete(requestKey);\n }),\n shareReplay(1),\n );\n\n this.ongoingRequests.set(requestKey, translationObservable);\n return translationObservable;\n }\n\n //#region Helpers Methods\n\n /**\n * Set translation data into cache\n */\n private setTranslationCache(lang: string, scope: string, translations: AXTranslateHashMap<string>): void {\n lodashSet(this.translationCache, `${lang}.${scope}`, translations);\n }\n\n /**\n * Get the translation from the cache or fallback to loading\n */\n private getTranslationFromCache(lang: string, scope: string, key: string): string {\n return lodashGet(this.translationCache, `${lang}.${scope}.${key}`, key) as string;\n }\n\n public isLangAvailable(lang: string, scope: string = null): boolean {\n return !this.translationCache[lang] && (!scope || !this.translationCache[lang][scope]);\n }\n\n private translateKey(key: string, lang: string, scope: string, params?: AXTranslateParams): string {\n // Trigger async preloading without blocking execution\n this.loadLanguagesAndScopes([lang], [scope]).pipe(startWith()).subscribe({\n error: (err) => {\n this.handleError(`Error preloading translations for ${lang}, ${scope}`, err)\n },\n });\n\n // Retrieve the translation from the cache or fallback to the key\n let translation: string = this.getTranslationFromCache(lang, scope, key);\n\n // Replace params like {{ name }}\n if (params && typeof translation === 'string') {\n Object.keys(params).forEach((paramKey) => {\n translation = translation.replace(\n new RegExp(`{{\\\\s*${paramKey}\\\\s*}}`, 'g'),\n params[paramKey] as string,\n );\n });\n }\n\n return translation || key;\n }\n\n private isExpression = (value: string) => value.includes('t(');\n\n private decodeExpression(\n expression: string,\n ): { key: string; scope?: string; lang?: string; fullMatch: string }[] {\n if (this.expressionCache.has(expression)) {\n return this.expressionCache.get(expression);\n }\n\n const regex = /t\\([\"']([^\"']+)[\"']\\s*(?:,\\s*(\\{.*?\\}))?\\)/g;\n const matches: { key: string; scope?: string; lang?: string; fullMatch: string }[] = [];\n let match;\n\n while ((match = regex.exec(expression)) !== null) {\n const key = match[1];\n const rawOptions = match[2];\n\n if (!rawOptions) {\n matches.push({ key, scope: null, lang: null, fullMatch: match[0] });\n continue;\n }\n\n try {\n const jsonString = rawOptions\n .replace(/(['\"])?([a-zA-Z0-9_]+)(['\"])?\\s*:/g, '\"$2\":') // Ensure keys are quoted\n .replace(/'/g, '\"'); // Replace single quotes with double quotes\n const options = JSON.parse(jsonString);\n\n matches.push({\n key,\n scope: options.scope || null,\n lang: options.lang || null,\n fullMatch: match[0],\n });\n } catch (error) {\n this.handleError(`Failed to parse options for key \"${key}\":`, error);\n matches.push({ key, scope: null, lang: null, fullMatch: match[0] });\n }\n }\n\n this.expressionCache.set(expression, matches);\n return matches;\n }\n\n private handleError(message: string, error: any): void {\n console.error(message, error);\n this.eventService.emitEvent({\n type: 'error',\n payload: { message, error },\n });\n }\n\n //#endregion\n\n //#region Async Translation Methods\n\n private translateText(\n text: string,\n contextLang: string,\n contextScope: string,\n params?: AXTranslateParams,\n ): Observable<string> {\n\n if (!this.isExpression(text)) {\n return this.loadLanguagesAndScopes([contextLang], [contextScope]).pipe(\n map(() => this.translateKey(text, contextLang, contextScope, params)),\n catchError((error) => {\n this.handleError(`Error during translation:`, error);\n return of(text); // Fallback to the original text\n })\n );\n }\n\n\n\n\n const matches = this.decodeExpression(text);\n\n // Extract unique languages and scopes for batch loading\n const langScopeSet = new Set(\n matches.map(({ lang, scope }) => `${lang || contextLang}_${scope || contextScope}`),\n );\n\n const langs = Array.from(new Set(Array.from(langScopeSet).map((pair) => pair.split('_')[0])));\n const scopes = Array.from(new Set(Array.from(langScopeSet).map((pair) => pair.split('_')[1])));\n\n // Load all required languages and scopes\n return this.loadLanguagesAndScopes(langs, scopes).pipe(\n map(() => {\n // Resolve translations after loading\n const translations = matches.reduce(\n (acc, { key, scope, lang, fullMatch }) => {\n const resolvedScope = scope || contextScope;\n const resolvedLang = lang || contextLang;\n\n acc[fullMatch] = this.translateKey(key, resolvedLang, resolvedScope, params);\n return acc;\n },\n {} as Record<string, string>,\n );\n\n // Replace all matches in the text with their resolved translations\n return matches.reduce(\n (result, { fullMatch }) =>\n result.replace(\n new RegExp(fullMatch.replace(/[-/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&'), 'g'),\n translations[fullMatch],\n ),\n text,\n );\n }),\n catchError((error) => {\n this.handleError(`Error during translation:`, error);\n return of(text); // Fallback to the original text\n }),\n );\n }\n\n public translate$(text: string, options?: AXTranslateOptions): Observable<string> {\n if (options?.lang) {\n return this.translateText(\n text,\n options.lang,\n options?.scope ?? this.config.defaultScope,\n options?.params,\n );\n }\n return this.langChanges$.pipe(\n startWith(this.getActiveLang()),\n distinctUntilChanged(),\n switchMap((lang) => {\n return this.translateText(text, lang, options?.scope ?? this.config.defaultScope, options?.params);\n }),\n );\n }\n\n public async translateAsync(text: string, options?: AXTranslateOptions): Promise<string> {\n return firstValueFrom(this.translate$(text, options));\n }\n\n //#endregion\n\n //#region Sync Translation Methods\n\n public translateSync(text: string, options?: AXTranslateOptions) {\n if (this.isExpression(text)) {\n return this.translateTextSync(\n text,\n options?.lang ?? this.getActiveLang(),\n options?.scope ?? this.config.defaultScope,\n );\n } else {\n return this.translateKey(\n text,\n options?.lang ?? this.getActiveLang(),\n options?.scope ?? this.config.defaultScope,\n );\n }\n }\n\n private translateTextSync(\n text: string,\n contextLang: string,\n contextScope: string,\n params?: AXTranslateParams,\n ): string {\n const matches = this.decodeExpression(text);\n\n const translations = matches.reduce(\n (acc, { key, scope, lang, fullMatch }) => {\n const resolvedScope = scope || contextScope;\n const resolvedLang = lang || contextLang;\n\n // Cache translation to avoid redundant processing\n if (!acc[fullMatch]) {\n acc[fullMatch] = this.translateKey(key, resolvedLang, resolvedScope, params);\n }\n return acc;\n },\n {} as Record<string, string>,\n );\n\n // Replace all matches in one go\n return matches.reduce(\n (result, { fullMatch }) => result.replace(fullMatch, translations[fullMatch]),\n text,\n );\n }\n\n //#endregion\n}\n","import { inject } from '@angular/core';\nimport { ResolveFn } from '@angular/router';\nimport { AX_TRANSLATION_CONFIG } from './translation.config';\nimport { AXTranslationService } from './translation.service';\n\nexport const loadTranslationScope: ResolveFn<unknown> = (route, state) => {\n const translatorService = inject(AXTranslationService);\n const config = inject(AX_TRANSLATION_CONFIG);\n const scopeValue = route.data[config.scopeResolverKey];\n const scopes = Array.isArray(scopeValue) ? scopeValue : [scopeValue];\n return translatorService.loadLanguagesAndScopes([translatorService.getActiveLang()], scopes);\n};\n","import { Directive, OnInit, TemplateRef, ViewContainerRef } from '@angular/core';\nimport { AXTranslationService } from './translation.service';\nimport { AXTranslateOptions } from './translation.types';\n\n@Directive({\n selector: '[translate]',\n standalone: false\n})\nexport class AXTranslatorDirective implements OnInit {\n constructor(\n private templateRef: TemplateRef<any>,\n private viewContainer: ViewContainerRef,\n private translationService: AXTranslationService,\n ) {}\n\n ngOnInit() {\n this.viewContainer.clear();\n this.viewContainer.createEmbeddedView(this.templateRef, {\n $implicit: (key: string, options?: AXTranslateOptions) => {\n return this.translationService.translate$(key, options);\n },\n });\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { Observable, of } from 'rxjs';\nimport { AXTranslationService } from './translation.service';\nimport { AXTranslateOptions } from './translation.types';\n\n@Pipe({\n name: 'translate',\n pure: true,\n standalone: false\n}) // The pipe can now be pure\nexport class AXTranslatorPipe implements PipeTransform {\n constructor(private service: AXTranslationService) { }\n\n transform(key: string, options?: AXTranslateOptions): Observable<string> {\n if (!key) {\n return of(''); // Return an empty observable if the key is not provided\n }\n return this.service.translate$(key, options);\n }\n}\n","import { NgModule, inject, provideAppInitializer } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { AXTranslationConfig, AX_TRANSLATION_CONFIG } from './translation.config';\nimport { AXTranslationService } from './translation.service';\nimport { AXTranslatorDirective } from './translator.directive';\nimport { AXTranslatorPipe } from './translator.pipe';\n\nfunction initializeApp(translatorService: AXTranslationService, config: AXTranslationConfig) {\n return (): Observable<any> => {\n return translatorService.loadLanguagesAndScopes(\n config.preloadLangs ?? [config.defaultLang],\n config.preloadScopes ?? [config.defaultScope],\n );\n };\n}\n\n@NgModule({\n imports: [],\n exports: [AXTranslatorPipe, AXTranslatorDirective],\n declarations: [AXTranslatorPipe, AXTranslatorDirective],\n providers: [\n provideAppInitializer(() => {\n const initializerFn = (initializeApp)(inject(AXTranslationService), inject(AX_TRANSLATION_CONFIG));\n return initializerFn();\n }),\n ],\n})\nexport class AXTranslationModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["lodashSet","lodashGet","i1.AXTranslationService"],"mappings":";;;;;;MAYa,qBAAqB,GAAG,IAAI,cAAc,CAAsB,uBAAuB,EAAE;AACpG,IAAA,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,MAAK;AACZ,QAAA,OAAO,0BAA0B;KAClC;AACF,CAAA;AAEY,MAAA,0BAA0B,GAAwB;AAC7D,IAAA,WAAW,EAAE,IAAI;AACjB,IAAA,YAAY,EAAE,QAAQ;AACtB,IAAA,gBAAgB,EAAE,OAAO;;AAKX,SAAA,iBAAiB,CAAC,MAAA,GAAqC,EAAE,EAAA;AACvE,IAAA,MAAM,MAAM,GAAG;AACb,QAAA,GAAG,0BAA0B;AAC7B,QAAA,GAAG,MAAM;KACV;AACD,IAAA,OAAO,MAAM;AACf;;MCpBa,0BAA0B,CAAA;AACrC,IAAA,cAAc,CAAC,OAAmC,EAAA;AAChD,QAAA,OAAO,EAAE,CAAC,EAAE,CAAC;;AAEhB;MAE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A,EAAA;YACT,qBAAqB,CAAC,MAAK;AACvB,gBAAA,MAAM,aAAa,GAAG,CAAC,aAAa,EAAE,MAAM,CAAC,oBAAoB,CAAC,EAAE,MAAM,CAAC,qBAAqB,CAAC,CAAC;gBAClG,OAAO,aAAa,EAAE;AACxB,aAAC,CAAC;AACL,SAAA,EAAA,CAAA,CAAA;;2FAEU,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAX/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,EAAE;AACX,oBAAA,OAAO,EAAE,CAAC,gBAAgB,EAAE,qBAAqB,CAAC;AAClD,oBAAA,YAAY,EAAE,CAAC,gBAAgB,EAAE,qBAAqB,CAAC;AACvD,oBAAA,SAAS,EAAE;wBACT,qBAAqB,CAAC,MAAK;AACvB,4BAAA,MAAM,aAAa,GAAG,CAAC,aAAa,EAAE,MAAM,CAAC,oBAAoB,CAAC,EAAE,MAAM,CAAC,qBAAqB,CAAC,CAAC;4BAClG,OAAO,aAAa,EAAE;AACxB,yBAAC,CAAC;AACL,qBAAA;AACF,iBAAA;;;AC1BD;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"acorex-core-translation.mjs","sources":["../../../../libs/core/translation/src/lib/translation.config.ts","../../../../libs/core/translation/src/lib/translation.loader.ts","../../../../libs/core/translation/src/lib/translation.service.ts","../../../../libs/core/translation/src/lib/translation-scope.resolver.ts","../../../../libs/core/translation/src/lib/translator.directive.ts","../../../../libs/core/translation/src/lib/translator.pipe.ts","../../../../libs/core/translation/src/lib/translation.module.ts","../../../../libs/core/translation/src/acorex-core-translation.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { AXTranslateLang, AXTranslateScope } from './translation.types';\n\nexport interface AXTranslationConfig {\n defaultLang: AXTranslateLang;\n defaultScope: AXTranslateScope;\n preloadLangs?: AXTranslateLang[];\n preloadScopes?: AXTranslateLang[];\n availableLangs?: AXTranslateLang[];\n scopeResolverKey: string;\n}\n\nexport const AX_TRANSLATION_CONFIG = new InjectionToken<AXTranslationConfig>('AX_TRANSLATION_CONFIG', {\n providedIn: 'root',\n factory: () => {\n return AXTranslationDefaultConfig;\n },\n});\n\nexport const AXTranslationDefaultConfig: AXTranslationConfig = {\n defaultLang: 'en',\n defaultScope: 'common',\n scopeResolverKey: 'scope',\n};\n\nexport type AXPartialTranslationConfig = Partial<AXTranslationConfig>;\n\nexport function translationConfig(config: AXPartialTranslationConfig = {}): AXTranslationConfig {\n const result = {\n ...AXTranslationDefaultConfig,\n ...config,\n };\n return result;\n}\n","import { InjectionToken } from '@angular/core';\nimport { Observable, of } from 'rxjs';\nimport { AXTranslateLang, AXTranslateScope, AXTranslation } from './translation.types';\n\nexport interface AXTranslationLoaderOptions {\n lang: AXTranslateLang;\n scope?: AXTranslateScope;\n}\n\nexport interface AXTranslationLoader {\n getTranslation(options: AXTranslationLoaderOptions): Observable<AXTranslation>;\n}\n\nexport class AXTranslationLoaderDefault implements AXTranslationLoader {\n getTranslation(options: AXTranslationLoaderOptions): Observable<AXTranslation> {\n return of({});\n }\n}\n\nexport const AX_TRANSLATION_LOADER = new InjectionToken<AXTranslationLoader>('AX_TRANSLATION_LOADER', {\n providedIn: 'root',\n factory: () => {\n return new AXTranslationLoaderDefault();\n },\n});\n","import { AXEventService, AXEventTypes } from '@acorex/core/events';\nimport { Injectable, inject } from '@angular/core';\nimport { get as lodashGet, set as lodashSet } from 'lodash-es';\nimport {\n BehaviorSubject,\n Observable,\n catchError,\n distinctUntilChanged,\n finalize,\n firstValueFrom,\n forkJoin,\n map,\n of,\n shareReplay,\n startWith,\n switchMap,\n tap,\n} from 'rxjs';\nimport { AX_TRANSLATION_CONFIG } from './translation.config';\nimport { AX_TRANSLATION_LOADER } from './translation.loader';\nimport { AXTranslateHashMap, AXTranslateOptions, AXTranslateParams } from './translation.types';\n\nlet singletonInstance: AXTranslationService;\n\nexport function translateSync(key: string, options?: AXTranslateOptions): string {\n return singletonInstance.translateSync(key, options);\n}\n\n@Injectable({ providedIn: 'root' })\nexport class AXTranslationService {\n private loader = inject(AX_TRANSLATION_LOADER);\n private config = inject(AX_TRANSLATION_CONFIG);\n\n private eventService = inject(AXEventService);\n\n private translationCache: AXTranslateHashMap<AXTranslateHashMap<string>> = {};\n private ongoingRequests: Map<string, Observable<any>> = new Map();\n\n private activeLang: BehaviorSubject<string> = new BehaviorSubject<string>(this.getDefaultLang());\n langChanges$: Observable<string> = this.activeLang.asObservable();\n\n private expressionCache = new Map<\n string,\n { key: string; scope?: string; lang?: string; fullMatch: string }[]\n >();\n\n public getDefaultLang(): string {\n return this.config.defaultLang;\n }\n\n public getActiveLang(): string {\n return this.activeLang.getValue();\n }\n\n public setActiveLang(lang: string): void {\n if (lang != this.getActiveLang()) {\n this.activeLang.next(lang);\n this.eventService.emitEvent({\n type: AXEventTypes.AXLanguageChanged,\n payload: lang,\n });\n }\n }\n\n /**\n * @ignore\n */\n constructor() {\n singletonInstance = this;\n }\n\n public loadLanguagesAndScopes(languages: string[], scopes: string[]): Observable<unknown> {\n const requests = languages.flatMap((lang) =>\n scopes.map((scope) => {\n // Check if translations are already cached\n if (this.translationCache[lang]?.[scope]) {\n return of(this.translationCache[lang][scope]);\n }\n\n // Use the new method to handle ongoing requests and loading\n return this.fetchTranslationFiles(lang, scope);\n }),\n );\n\n return forkJoin(requests);\n }\n\n private fetchTranslationFiles(lang: string, scope: string): Observable<AXTranslateHashMap<string>> {\n const requestKey = `${lang}_${scope}`;\n\n // Return existing observable if the request is already in progress\n if (this.ongoingRequests.has(requestKey)) {\n return this.ongoingRequests.get(requestKey);\n }\n\n // Load translations if not in cache or ongoing requests\n const translationObservable = this.loader.getTranslation({ lang, scope }).pipe(\n tap((translations) => this.setTranslationCache(lang, scope, translations)),\n catchError((error) => {\n this.handleError(`Error loading translations for lang: ${lang}, scope: ${scope}`, error);\n return of(null);\n }),\n finalize(() => {\n this.eventService.emitEvent({\n type: AXEventTypes.AXLanguageLoaded,\n payload: lang,\n });\n this.ongoingRequests.delete(requestKey);\n }),\n shareReplay(1),\n );\n\n this.ongoingRequests.set(requestKey, translationObservable);\n return translationObservable;\n }\n\n //#region Helpers Methods\n\n /**\n * Set translation data into cache\n */\n private setTranslationCache(lang: string, scope: string, translations: AXTranslateHashMap<string>): void {\n lodashSet(this.translationCache, `${lang}.${scope}`, translations);\n }\n\n /**\n * Get the translation from the cache or fallback to loading\n */\n private getTranslationFromCache(lang: string, scope: string, key: string): string {\n return lodashGet(this.translationCache, `${lang}.${scope}.${key}`, key) as string;\n }\n\n public isLangAvailable(lang: string, scope: string = null): boolean {\n return !this.translationCache[lang] && (!scope || !this.translationCache[lang][scope]);\n }\n\n private translateKey(key: string, lang: string, scope: string, params?: AXTranslateParams): string {\n // Trigger async preloading without blocking execution\n this.loadLanguagesAndScopes([lang], [scope]).pipe(startWith()).subscribe({\n error: (err) => {\n this.handleError(`Error preloading translations for ${lang}, ${scope}`, err)\n },\n });\n\n // Retrieve the translation from the cache or fallback to the key\n let translation: string = this.getTranslationFromCache(lang, scope, key);\n\n // Replace params like {{ name }}\n if (params && typeof translation === 'string') {\n Object.keys(params).forEach((paramKey) => {\n translation = translation.replace(\n new RegExp(`{{\\\\s*${paramKey}\\\\s*}}`, 'g'),\n params[paramKey] as string,\n );\n });\n }\n\n return translation || key;\n }\n\n private isExpression = (value: string) => value.includes('t(');\n\n private decodeExpression(\n expression: string,\n ): { key: string; scope?: string; lang?: string; fullMatch: string }[] {\n if (this.expressionCache.has(expression)) {\n return this.expressionCache.get(expression);\n }\n\n const regex = /t\\([\"']([^\"']+)[\"']\\s*(?:,\\s*(\\{.*?\\}))?\\)/g;\n const matches: { key: string; scope?: string; lang?: string; fullMatch: string }[] = [];\n let match;\n\n while ((match = regex.exec(expression)) !== null) {\n const key = match[1];\n const rawOptions = match[2];\n\n if (!rawOptions) {\n matches.push({ key, scope: null, lang: null, fullMatch: match[0] });\n continue;\n }\n\n try {\n const jsonString = rawOptions\n .replace(/(['\"])?([a-zA-Z0-9_]+)(['\"])?\\s*:/g, '\"$2\":') // Ensure keys are quoted\n .replace(/'/g, '\"'); // Replace single quotes with double quotes\n const options = JSON.parse(jsonString);\n\n matches.push({\n key,\n scope: options.scope || null,\n lang: options.lang || null,\n fullMatch: match[0],\n });\n } catch (error) {\n this.handleError(`Failed to parse options for key \"${key}\":`, error);\n matches.push({ key, scope: null, lang: null, fullMatch: match[0] });\n }\n }\n\n this.expressionCache.set(expression, matches);\n return matches;\n }\n\n private handleError(message: string, error: any): void {\n console.error(message, error);\n this.eventService.emitEvent({\n type: 'error',\n payload: { message, error },\n });\n }\n\n //#endregion\n\n //#region Async Translation Methods\n\n private translateText(\n text: string,\n contextLang: string,\n contextScope: string,\n params?: AXTranslateParams,\n ): Observable<string> {\n\n if (!this.isExpression(text)) {\n return this.loadLanguagesAndScopes([contextLang], [contextScope]).pipe(\n map(() => this.translateKey(text, contextLang, contextScope, params)),\n catchError((error) => {\n this.handleError(`Error during translation:`, error);\n return of(text); // Fallback to the original text\n })\n );\n }\n\n\n\n\n const matches = this.decodeExpression(text);\n\n // Extract unique languages and scopes for batch loading\n const langScopeSet = new Set(\n matches.map(({ lang, scope }) => `${lang || contextLang}_${scope || contextScope}`),\n );\n\n const langs = Array.from(new Set(Array.from(langScopeSet).map((pair) => pair.split('_')[0])));\n const scopes = Array.from(new Set(Array.from(langScopeSet).map((pair) => pair.split('_')[1])));\n\n // Load all required languages and scopes\n return this.loadLanguagesAndScopes(langs, scopes).pipe(\n map(() => {\n // Resolve translations after loading\n const translations = matches.reduce(\n (acc, { key, scope, lang, fullMatch }) => {\n const resolvedScope = scope || contextScope;\n const resolvedLang = lang || contextLang;\n\n acc[fullMatch] = this.translateKey(key, resolvedLang, resolvedScope, params);\n return acc;\n },\n {} as Record<string, string>,\n );\n\n // Replace all matches in the text with their resolved translations\n return matches.reduce(\n (result, { fullMatch }) =>\n result.replace(\n new RegExp(fullMatch.replace(/[-/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&'), 'g'),\n translations[fullMatch],\n ),\n text,\n );\n }),\n catchError((error) => {\n this.handleError(`Error during translation:`, error);\n return of(text); // Fallback to the original text\n }),\n );\n }\n\n public translate$(text: string, options?: AXTranslateOptions): Observable<string> {\n if (options?.lang) {\n return this.translateText(\n text,\n options.lang,\n options?.scope ?? this.config.defaultScope,\n options?.params,\n );\n }\n return this.langChanges$.pipe(\n startWith(this.getActiveLang()),\n distinctUntilChanged(),\n switchMap((lang) => {\n return this.translateText(text, lang, options?.scope ?? this.config.defaultScope, options?.params);\n }),\n );\n }\n\n public async translateAsync(text: string, options?: AXTranslateOptions): Promise<string> {\n return firstValueFrom(this.translate$(text, options));\n }\n\n //#endregion\n\n //#region Sync Translation Methods\n\n public translateSync(text: string, options?: AXTranslateOptions) {\n if (this.isExpression(text)) {\n return this.translateTextSync(\n text,\n options?.lang ?? this.getActiveLang(),\n options?.scope ?? this.config.defaultScope,\n );\n } else {\n return this.translateKey(\n text,\n options?.lang ?? this.getActiveLang(),\n options?.scope ?? this.config.defaultScope,\n );\n }\n }\n\n private translateTextSync(\n text: string,\n contextLang: string,\n contextScope: string,\n params?: AXTranslateParams,\n ): string {\n const matches = this.decodeExpression(text);\n\n const translations = matches.reduce(\n (acc, { key, scope, lang, fullMatch }) => {\n const resolvedScope = scope || contextScope;\n const resolvedLang = lang || contextLang;\n\n // Cache translation to avoid redundant processing\n if (!acc[fullMatch]) {\n acc[fullMatch] = this.translateKey(key, resolvedLang, resolvedScope, params);\n }\n return acc;\n },\n {} as Record<string, string>,\n );\n\n // Replace all matches in one go\n return matches.reduce(\n (result, { fullMatch }) => result.replace(fullMatch, translations[fullMatch]),\n text,\n );\n }\n\n //#endregion\n}\n","import { inject } from '@angular/core';\nimport { ResolveFn } from '@angular/router';\nimport { AX_TRANSLATION_CONFIG } from './translation.config';\nimport { AXTranslationService } from './translation.service';\n\nexport const loadTranslationScope: ResolveFn<unknown> = (route, state) => {\n const translatorService = inject(AXTranslationService);\n const config = inject(AX_TRANSLATION_CONFIG);\n const scopeValue = route.data[config.scopeResolverKey];\n const scopes = Array.isArray(scopeValue) ? scopeValue : [scopeValue];\n return translatorService.loadLanguagesAndScopes([translatorService.getActiveLang()], scopes);\n};\n","import { Directive, OnInit, TemplateRef, ViewContainerRef } from '@angular/core';\nimport { AXTranslationService } from './translation.service';\nimport { AXTranslateOptions } from './translation.types';\n\n@Directive({ selector: '[translate]' })\nexport class AXTranslatorDirective implements OnInit {\n constructor(\n private templateRef: TemplateRef<any>,\n private viewContainer: ViewContainerRef,\n private translationService: AXTranslationService,\n ) {}\n\n ngOnInit() {\n this.viewContainer.clear();\n this.viewContainer.createEmbeddedView(this.templateRef, {\n $implicit: (key: string, options?: AXTranslateOptions) => {\n return this.translationService.translate$(key, options);\n },\n });\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { Observable, of } from 'rxjs';\nimport { AXTranslationService } from './translation.service';\nimport { AXTranslateOptions } from './translation.types';\n\n@Pipe({\n name: 'translate',\n pure: true,\n}) // The pipe can now be pure\nexport class AXTranslatorPipe implements PipeTransform {\n constructor(private service: AXTranslationService) {}\n\n transform(key: string, options?: AXTranslateOptions): Observable<string> {\n if (!key) {\n return of(''); // Return an empty observable if the key is not provided\n }\n return this.service.translate$(key, options);\n }\n}\n","import { NgModule, inject, provideAppInitializer } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { AXTranslationConfig, AX_TRANSLATION_CONFIG } from './translation.config';\nimport { AXTranslationService } from './translation.service';\nimport { AXTranslatorDirective } from './translator.directive';\nimport { AXTranslatorPipe } from './translator.pipe';\n\nfunction initializeApp(translatorService: AXTranslationService, config: AXTranslationConfig) {\n return (): Observable<any> => {\n return translatorService.loadLanguagesAndScopes(config.preloadLangs ?? [config.defaultLang], config.preloadScopes ?? [config.defaultScope]);\n };\n}\n\n@NgModule({\n imports: [AXTranslatorPipe, AXTranslatorDirective],\n exports: [AXTranslatorPipe, AXTranslatorDirective],\n providers: [\n provideAppInitializer(() => {\n const initializerFn = initializeApp(inject(AXTranslationService), inject(AX_TRANSLATION_CONFIG));\n return initializerFn();\n }),\n ],\n})\nexport class AXTranslationModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["lodashSet","lodashGet","i1.AXTranslationService"],"mappings":";;;;;;MAYa,qBAAqB,GAAG,IAAI,cAAc,CAAsB,uBAAuB,EAAE;AACpG,IAAA,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,MAAK;AACZ,QAAA,OAAO,0BAA0B;KAClC;AACF,CAAA;AAEY,MAAA,0BAA0B,GAAwB;AAC7D,IAAA,WAAW,EAAE,IAAI;AACjB,IAAA,YAAY,EAAE,QAAQ;AACtB,IAAA,gBAAgB,EAAE,OAAO;;AAKX,SAAA,iBAAiB,CAAC,MAAA,GAAqC,EAAE,EAAA;AACvE,IAAA,MAAM,MAAM,GAAG;AACb,QAAA,GAAG,0BAA0B;AAC7B,QAAA,GAAG,MAAM;KACV;AACD,IAAA,OAAO,MAAM;AACf;;MCpBa,0BAA0B,CAAA;AACrC,IAAA,cAAc,CAAC,OAAmC,EAAA;AAChD,QAAA,OAAO,EAAE,CAAC,EAAE,CAAC;;AAEhB;MAEY,qBAAqB,GAAG,IAAI,cAAc,CAAsB,uBAAuB,EAAE;AACpG,IAAA,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,MAAK;QACZ,OAAO,IAAI,0BAA0B,EAAE;KACxC;AACF,CAAA;;ACFD,IAAI,iBAAuC;AAE3B,SAAA,aAAa,CAAC,GAAW,EAAE,OAA4B,EAAA;IACrE,OAAO,iBAAiB,CAAC,aAAa,CAAC,GAAG,EAAE,OAAO,CAAC;AACtD;MAGa,oBAAoB,CAAA;IAiBxB,cAAc,GAAA;AACnB,QAAA,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW;;IAGzB,aAAa,GAAA;AAClB,QAAA,OAAO,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE;;AAG5B,IAAA,aAAa,CAAC,IAA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CAAC;4BAChG,OAAO,aAAa,EAAE;AACxB,yBAAC,CAAC;AACH,qBAAA;AACF,iBAAA;;;ACtBD;;AAEG;;;;"}
|
@@ -31,10 +31,10 @@ class AXUnsubscriber {
|
|
31
31
|
ngOnDestroy() {
|
32
32
|
this.unsubscribe();
|
33
33
|
}
|
34
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
35
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
34
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXUnsubscriber, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
35
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXUnsubscriber }); }
|
36
36
|
}
|
37
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
37
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXUnsubscriber, decorators: [{
|
38
38
|
type: Injectable
|
39
39
|
}] });
|
40
40
|
|
@@ -31,10 +31,10 @@ class AXCallbackValidationRule {
|
|
31
31
|
}
|
32
32
|
return createResult(validationResult);
|
33
33
|
}
|
34
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
35
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
34
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXCallbackValidationRule, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
35
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXCallbackValidationRule }); }
|
36
36
|
}
|
37
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
37
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXCallbackValidationRule, decorators: [{
|
38
38
|
type: Injectable
|
39
39
|
}] });
|
40
40
|
|
@@ -73,10 +73,10 @@ class AXRegexValidationRule {
|
|
73
73
|
value: value,
|
74
74
|
};
|
75
75
|
}
|
76
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
77
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
76
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXRegexValidationRule, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
77
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXRegexValidationRule }); }
|
78
78
|
}
|
79
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
79
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXRegexValidationRule, decorators: [{
|
80
80
|
type: Injectable
|
81
81
|
}] });
|
82
82
|
|
@@ -108,10 +108,10 @@ class AXRequiredValidationRule {
|
|
108
108
|
value,
|
109
109
|
};
|
110
110
|
}
|
111
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
112
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
111
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXRequiredValidationRule, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
112
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXRequiredValidationRule }); }
|
113
113
|
}
|
114
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
114
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXRequiredValidationRule, decorators: [{
|
115
115
|
type: Injectable
|
116
116
|
}] });
|
117
117
|
|
@@ -129,10 +129,10 @@ class AXLengthValidationRule {
|
|
129
129
|
value: value,
|
130
130
|
};
|
131
131
|
}
|
132
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
133
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
132
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXLengthValidationRule, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
133
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXLengthValidationRule }); }
|
134
134
|
}
|
135
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
135
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXLengthValidationRule, decorators: [{
|
136
136
|
type: Injectable
|
137
137
|
}] });
|
138
138
|
|
@@ -150,10 +150,10 @@ class AXMaxLengthValidationRule {
|
|
150
150
|
value: value,
|
151
151
|
};
|
152
152
|
}
|
153
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
154
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
153
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXMaxLengthValidationRule, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
154
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXMaxLengthValidationRule }); }
|
155
155
|
}
|
156
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
156
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXMaxLengthValidationRule, decorators: [{
|
157
157
|
type: Injectable
|
158
158
|
}] });
|
159
159
|
|
@@ -170,10 +170,10 @@ class AXMinLengthValidationRule {
|
|
170
170
|
value: value,
|
171
171
|
};
|
172
172
|
}
|
173
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
174
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
173
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXMinLengthValidationRule, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
174
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXMinLengthValidationRule }); }
|
175
175
|
}
|
176
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
176
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXMinLengthValidationRule, decorators: [{
|
177
177
|
type: Injectable
|
178
178
|
}] });
|
179
179
|
|
@@ -198,10 +198,10 @@ class AXBetweenValidationRule {
|
|
198
198
|
value: value,
|
199
199
|
};
|
200
200
|
}
|
201
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
202
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
201
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXBetweenValidationRule, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
202
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXBetweenValidationRule }); }
|
203
203
|
}
|
204
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
204
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXBetweenValidationRule, decorators: [{
|
205
205
|
type: Injectable
|
206
206
|
}] });
|
207
207
|
|
@@ -221,10 +221,10 @@ class AXEqualValidationRule {
|
|
221
221
|
value: value,
|
222
222
|
};
|
223
223
|
}
|
224
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
225
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
224
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXEqualValidationRule, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
225
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXEqualValidationRule }); }
|
226
226
|
}
|
227
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
227
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXEqualValidationRule, decorators: [{
|
228
228
|
type: Injectable
|
229
229
|
}] });
|
230
230
|
|
@@ -243,10 +243,10 @@ class AXGreaterThanValidationRule {
|
|
243
243
|
value: value,
|
244
244
|
};
|
245
245
|
}
|
246
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
247
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
246
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXGreaterThanValidationRule, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
247
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXGreaterThanValidationRule }); }
|
248
248
|
}
|
249
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
249
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXGreaterThanValidationRule, decorators: [{
|
250
250
|
type: Injectable
|
251
251
|
}] });
|
252
252
|
|
@@ -265,10 +265,10 @@ class AXLessThanValidationRule {
|
|
265
265
|
value: value,
|
266
266
|
};
|
267
267
|
}
|
268
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
269
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
268
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXLessThanValidationRule, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
269
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXLessThanValidationRule }); }
|
270
270
|
}
|
271
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
271
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXLessThanValidationRule, decorators: [{
|
272
272
|
type: Injectable
|
273
273
|
}] });
|
274
274
|
|
@@ -328,10 +328,10 @@ class AXValidationRegistryService {
|
|
328
328
|
get(ruleName) {
|
329
329
|
return this.plugins.find((c) => c.name == ruleName);
|
330
330
|
}
|
331
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
332
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
331
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXValidationRegistryService, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
332
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXValidationRegistryService, providedIn: 'root' }); }
|
333
333
|
}
|
334
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
334
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXValidationRegistryService, decorators: [{
|
335
335
|
type: Injectable,
|
336
336
|
args: [{
|
337
337
|
providedIn: 'root',
|
@@ -366,10 +366,10 @@ class AXValidationService {
|
|
366
366
|
ruleFor(value) {
|
367
367
|
return new AXValidationRuleChain(this, value);
|
368
368
|
}
|
369
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
370
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
369
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXValidationService, deps: [{ token: AXValidationRegistryService }, { token: i1.AXTranslationService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
370
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXValidationService, providedIn: 'root' }); }
|
371
371
|
}
|
372
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
372
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXValidationService, decorators: [{
|
373
373
|
type: Injectable,
|
374
374
|
args: [{ providedIn: 'root' }]
|
375
375
|
}], ctorParameters: () => [{ type: AXValidationRegistryService }, { type: i1.AXTranslationService }] });
|
@@ -452,11 +452,11 @@ class AXValidationModule {
|
|
452
452
|
f();
|
453
453
|
});
|
454
454
|
}
|
455
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
456
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.
|
457
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.
|
455
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXValidationModule, deps: [{ token: 'AXValidationModuleFactory' }], target: i0.ɵɵFactoryTarget.NgModule }); }
|
456
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.8", ngImport: i0, type: AXValidationModule }); }
|
457
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXValidationModule, providers: [...BUILT_IN_RULES] }); }
|
458
458
|
}
|
459
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
459
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXValidationModule, decorators: [{
|
460
460
|
type: NgModule,
|
461
461
|
args: [{
|
462
462
|
imports: [],
|
@@ -8,5 +8,5 @@ export declare class AXFormatterDirective implements OnInit {
|
|
8
8
|
constructor(templateRef: TemplateRef<any>, viewContainer: ViewContainerRef, formatService: AXFormatService);
|
9
9
|
ngOnInit(): void;
|
10
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<AXFormatterDirective, never>;
|
11
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<AXFormatterDirective, "[format]", never, {}, {}, never, never,
|
11
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AXFormatterDirective, "[format]", never, {}, {}, never, never, true, never>;
|
12
12
|
}
|
@@ -14,6 +14,6 @@ export declare class AXFormatModule {
|
|
14
14
|
*/
|
15
15
|
constructor(instances: any[]);
|
16
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<AXFormatModule, never>;
|
17
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<AXFormatModule, [typeof i1.AXFormatPipe, typeof i2.AXFormatterDirective],
|
17
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AXFormatModule, never, [typeof i1.AXFormatPipe, typeof i2.AXFormatterDirective], [typeof i1.AXFormatPipe, typeof i2.AXFormatterDirective]>;
|
18
18
|
static ɵinj: i0.ɵɵInjectorDeclaration<AXFormatModule>;
|
19
19
|
}
|
@@ -8,5 +8,5 @@ export declare class AXFormatPipe implements PipeTransform {
|
|
8
8
|
private triggers;
|
9
9
|
transform(value: unknown, name: string, options?: AXFormatOptions | string): Observable<string>;
|
10
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<AXFormatPipe, never>;
|
11
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<AXFormatPipe, "format",
|
11
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<AXFormatPipe, "format", true>;
|
12
12
|
}
|
@@ -1,3 +1,3 @@
|
|
1
|
-
# @acorex/core/
|
1
|
+
# @acorex/core/memoize
|
2
2
|
|
3
|
-
Secondary entry point of `@acorex/core`. It can be used by importing from `@acorex/core/
|
3
|
+
Secondary entry point of `@acorex/core`. It can be used by importing from `@acorex/core/memoize`.
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './lib/memoize.decorator';
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare function Memoize(): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@acorex/core",
|
3
|
-
"version": "19.10.
|
3
|
+
"version": "19.10.11",
|
4
4
|
"peerDependencies": {
|
5
5
|
"@angular/common": ">=19.0.0",
|
6
6
|
"@angular/core": ">=19.0.0",
|
@@ -52,9 +52,9 @@
|
|
52
52
|
"types": "./image/index.d.ts",
|
53
53
|
"default": "./fesm2022/acorex-core-image.mjs"
|
54
54
|
},
|
55
|
-
"./
|
56
|
-
"types": "./
|
57
|
-
"default": "./fesm2022/acorex-core-
|
55
|
+
"./memoize": {
|
56
|
+
"types": "./memoize/index.d.ts",
|
57
|
+
"default": "./fesm2022/acorex-core-memoize.mjs"
|
58
58
|
},
|
59
59
|
"./network": {
|
60
60
|
"types": "./network/index.d.ts",
|
@@ -3,6 +3,6 @@ import * as i1 from "./translator.pipe";
|
|
3
3
|
import * as i2 from "./translator.directive";
|
4
4
|
export declare class AXTranslationModule {
|
5
5
|
static ɵfac: i0.ɵɵFactoryDeclaration<AXTranslationModule, never>;
|
6
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<AXTranslationModule, [typeof i1.AXTranslatorPipe, typeof i2.AXTranslatorDirective],
|
6
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AXTranslationModule, never, [typeof i1.AXTranslatorPipe, typeof i2.AXTranslatorDirective], [typeof i1.AXTranslatorPipe, typeof i2.AXTranslatorDirective]>;
|
7
7
|
static ɵinj: i0.ɵɵInjectorDeclaration<AXTranslationModule>;
|
8
8
|
}
|
@@ -8,5 +8,5 @@ export declare class AXTranslatorDirective implements OnInit {
|
|
8
8
|
constructor(templateRef: TemplateRef<any>, viewContainer: ViewContainerRef, translationService: AXTranslationService);
|
9
9
|
ngOnInit(): void;
|
10
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<AXTranslatorDirective, never>;
|
11
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<AXTranslatorDirective, "[translate]", never, {}, {}, never, never,
|
11
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AXTranslatorDirective, "[translate]", never, {}, {}, never, never, true, never>;
|
12
12
|
}
|
@@ -8,5 +8,5 @@ export declare class AXTranslatorPipe implements PipeTransform {
|
|
8
8
|
constructor(service: AXTranslationService);
|
9
9
|
transform(key: string, options?: AXTranslateOptions): Observable<string>;
|
10
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<AXTranslatorPipe, never>;
|
11
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<AXTranslatorPipe, "translate",
|
11
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<AXTranslatorPipe, "translate", true>;
|
12
12
|
}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"acorex-core-memorize.mjs","sources":["../../../../libs/core/memorize/src/lib/memorize.decorator.ts","../../../../libs/core/memorize/src/acorex-core-memorize.ts"],"sourcesContent":["import memoizee from 'memoizee';\n\nexport function Memorize() {\n return (target: any, propertyKey: string, descriptor: PropertyDescriptor) => {\n const originalNgOnDestroy = target.ngOnDestroy;\n const originalMethod = descriptor.value;\n const memorizedMethod = memoizee(originalMethod);\n target.ngOnDestroy = function () {\n if (originalNgOnDestroy) {\n originalNgOnDestroy.apply(this);\n }\n memorizedMethod.clear();\n };\n descriptor.value = function (...args) {\n return memorizedMethod.apply(this, args);\n };\n return descriptor;\n };\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;SAEgB,QAAQ,GAAA;AACtB,IAAA,OAAO,CAAC,MAAW,EAAE,WAAmB,EAAE,UAA8B,KAAI;AAC1E,QAAA,MAAM,mBAAmB,GAAG,MAAM,CAAC,WAAW;AAC9C,QAAA,MAAM,cAAc,GAAG,UAAU,CAAC,KAAK;AACvC,QAAA,MAAM,eAAe,GAAG,QAAQ,CAAC,cAAc,CAAC;QAChD,MAAM,CAAC,WAAW,GAAG,YAAA;YACnB,IAAI,mBAAmB,EAAE;AACvB,gBAAA,mBAAmB,CAAC,KAAK,CAAC,IAAI,CAAC;;YAEjC,eAAe,CAAC,KAAK,EAAE;AACzB,SAAC;AACD,QAAA,UAAU,CAAC,KAAK,GAAG,UAAU,GAAG,IAAI,EAAA;YAClC,OAAO,eAAe,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC;AAC1C,SAAC;AACD,QAAA,OAAO,UAAU;AACnB,KAAC;AACH;;AClBA;;AAEG;;;;"}
|
package/memorize/index.d.ts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
export * from './lib/memorize.decorator';
|
@@ -1 +0,0 @@
|
|
1
|
-
export declare function Memorize(): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|