@acorex/core 19.11.0-next.0 → 19.11.0-next.2

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 (45) hide show
  1. package/README.md +22 -20
  2. package/{memorize → constants}/README.md +2 -2
  3. package/date-time/lib/datetime.module.d.ts +3 -3
  4. package/date-time/lib/datetime.pipe.d.ts +1 -1
  5. package/fesm2022/acorex-core-config.mjs +3 -3
  6. package/fesm2022/{acorex-core-common.mjs → acorex-core-constants.mjs} +1 -1
  7. package/fesm2022/acorex-core-constants.mjs.map +1 -0
  8. package/fesm2022/acorex-core-date-time.mjs +21 -24
  9. package/fesm2022/acorex-core-date-time.mjs.map +1 -1
  10. package/fesm2022/acorex-core-events.mjs +3 -3
  11. package/fesm2022/acorex-core-file.mjs +10 -10
  12. package/fesm2022/acorex-core-format.mjs +41 -46
  13. package/fesm2022/acorex-core-format.mjs.map +1 -1
  14. package/fesm2022/acorex-core-image.mjs +3 -3
  15. package/fesm2022/{acorex-core-memorize.mjs → acorex-core-memoize.mjs} +6 -6
  16. package/fesm2022/acorex-core-memoize.mjs.map +1 -0
  17. package/fesm2022/acorex-core-network.mjs +3 -3
  18. package/fesm2022/acorex-core-pipes.mjs +3 -3
  19. package/fesm2022/acorex-core-platform.mjs +3 -3
  20. package/fesm2022/acorex-core-storage.mjs +9 -9
  21. package/fesm2022/acorex-core-translation.mjs +17 -22
  22. package/fesm2022/acorex-core-translation.mjs.map +1 -1
  23. package/fesm2022/acorex-core-utils.mjs +5 -142
  24. package/fesm2022/acorex-core-utils.mjs.map +1 -1
  25. package/fesm2022/acorex-core-validation.mjs +40 -40
  26. package/format/lib/format.directive.d.ts +1 -1
  27. package/format/lib/format.module.d.ts +1 -1
  28. package/format/lib/format.pipe.d.ts +1 -1
  29. package/{common → memoize}/README.md +2 -2
  30. package/memoize/index.d.ts +1 -0
  31. package/memoize/lib/memoize.decorator.d.ts +1 -0
  32. package/package.json +8 -8
  33. package/translation/lib/translation.module.d.ts +1 -1
  34. package/translation/lib/translator.directive.d.ts +1 -1
  35. package/translation/lib/translator.pipe.d.ts +1 -1
  36. package/utils/index.d.ts +0 -2
  37. package/fesm2022/acorex-core-common.mjs.map +0 -1
  38. package/fesm2022/acorex-core-memorize.mjs.map +0 -1
  39. package/memorize/index.d.ts +0 -1
  40. package/memorize/lib/memorize.decorator.d.ts +0 -1
  41. package/utils/lib/resize.directive.d.ts +0 -21
  42. package/utils/lib/utils.module.d.ts +0 -8
  43. /package/{common → constants}/countries/countries.data.d.ts +0 -0
  44. /package/{common → constants}/countries/country.d.ts +0 -0
  45. /package/{common → constants}/index.d.ts +0 -0
@@ -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,U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s","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,qBAA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AAoB,CAAC,EAAE,MAAM,CAAC,qBAAqB,CAAC,CAAC;gBAChG,OAAO,aAAa,EAAE;AACxB,aAAC,CAAC;AACH,SAAA,EAAA,CAAA,CAAA;;2FAEU,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAV/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,gBAAgB,EAAE,qBAAqB,CAAC;AAClD,oBAAA,OAAO,EAAE,CAAC,gBAAgB,EAAE,qBAAqB,CAAC;AAClD,oBAAA,SAAS,EAAE;wBACT,qBAAqB,CAAC,MAAK;AACzB,4BAAA,MAAM,aAAa,GAAG,aAAa,CAAC,MAAM,CAAC,oBAAoB,CAAC,EAAE,MAAM,CAAC,qBAAqB,CAAC,CAAC;4BAChG,OAAO,aAAa,EAAE;AACxB,yBAAC,CAAC;AACH,qBAAA;AACF,iBAAA;;;ACtBD;;AAEG;;;;"}
@@ -1,10 +1,9 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, inject, PLATFORM_ID, HostListener, Input, Directive, NgModule } from '@angular/core';
2
+ import { Injectable } from '@angular/core';
3
3
  import { Subject, takeUntil } from 'rxjs';
4
4
  import tinycolor from 'tinycolor2';
5
5
  import tinygradient from 'tinygradient-es';
6
6
  import { isBrowser } from '@acorex/core/platform';
7
- import { DOCUMENT, isPlatformBrowser, CommonModule } from '@angular/common';
8
7
 
9
8
  function AXAutoUnsubscriber() {
10
9
  return function (constructor) {
@@ -32,10 +31,10 @@ class AXUnsubscriber {
32
31
  ngOnDestroy() {
33
32
  this.unsubscribe();
34
33
  }
35
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXUnsubscriber, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
36
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXUnsubscriber }); }
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 }); }
37
36
  }
38
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXUnsubscriber, decorators: [{
37
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImport: i0, type: AXUnsubscriber, decorators: [{
39
38
  type: Injectable
40
39
  }] });
41
40
 
@@ -264,128 +263,6 @@ class AXHtmlUtil {
264
263
  }
265
264
  }
266
265
 
267
- class AXResizableDirective {
268
- constructor(el, renderer, zone) {
269
- this.el = el;
270
- this.renderer = renderer;
271
- this.zone = zone;
272
- this.document = inject(DOCUMENT);
273
- this.platformID = inject(PLATFORM_ID);
274
- this.minWidth = 100; // Minimum width for the resizable element
275
- this.isResizing = false;
276
- this.createResizeHandle(); // Initialize the resize handle
277
- }
278
- // Create the resize handle element and apply inline styles
279
- createResizeHandle() {
280
- // Apply position relative to the container to allow the absolute positioning of the handle
281
- this.renderer.setStyle(this.el.nativeElement, 'position', 'relative');
282
- // Create the resize handle dynamically
283
- this.resizeHandle = this.renderer.createElement('div');
284
- this.renderer.addClass(this.resizeHandle, 'resize-handle');
285
- this.renderer.appendChild(this.el.nativeElement, this.resizeHandle);
286
- // Apply inline styles for the resize handle
287
- this.renderer.setStyle(this.resizeHandle, 'width', '6px'); // Resize handle width
288
- this.renderer.setStyle(this.resizeHandle, 'background-color', 'rgba(0, 0, 0, 0.2)');
289
- this.renderer.setStyle(this.resizeHandle, 'position', 'absolute');
290
- this.renderer.setStyle(this.resizeHandle, 'top', '0');
291
- this.renderer.setStyle(this.resizeHandle, 'right', '0');
292
- this.renderer.setStyle(this.resizeHandle, 'bottom', '0');
293
- this.renderer.setStyle(this.resizeHandle, 'cursor', 'ew-resize'); // Horizontal resize cursor
294
- this.renderer.setStyle(this.resizeHandle, 'z-index', '10');
295
- this.renderer.setStyle(this.resizeHandle, 'transition', 'background-color 0.2s ease');
296
- this.renderer.setStyle(this.resizeHandle, 'border-radius', '4px');
297
- }
298
- // Mouse down event: Start resizing
299
- onMouseDown(event) {
300
- // Only allow resizing when clicking on the handle
301
- const handleRect = this.resizeHandle.getBoundingClientRect();
302
- if (event.clientX >= handleRect.left &&
303
- event.clientX <= handleRect.right &&
304
- isPlatformBrowser(this.platformID)) {
305
- this.zone.runOutsideAngular(() => {
306
- this.isResizing = true;
307
- this.document.body.style.cursor = 'ew-resize'; // Change cursor to resize mode
308
- // Change resize handle color to blue when resizing starts
309
- this.renderer.setStyle(this.resizeHandle, 'background-color', '#007bff');
310
- event.preventDefault();
311
- });
312
- }
313
- }
314
- // Mouse move event: Resize the element
315
- onMouseMove(event) {
316
- this.zone.runOutsideAngular(() => {
317
- if (this.isResizing) {
318
- const rect = this.el.nativeElement.getBoundingClientRect();
319
- let newWidth;
320
- // Resize logic (LTR or RTL support)
321
- if (isPlatformBrowser(this.platformID)) {
322
- if (this.document.documentElement.dir === 'rtl') {
323
- newWidth = rect.right - event.clientX;
324
- }
325
- else {
326
- newWidth = event.clientX - rect.left;
327
- }
328
- }
329
- // Ensure the width does not go below the minimum width
330
- if (newWidth > this.minWidth) {
331
- this.renderer.setStyle(this.el.nativeElement, 'width', `${newWidth}px`);
332
- }
333
- }
334
- });
335
- }
336
- // Mouse up event: End resizing
337
- onMouseUp() {
338
- this.zone.runOutsideAngular(() => {
339
- if (this.isResizing && isPlatformBrowser(this.platformID)) {
340
- this.isResizing = false;
341
- this.document.body.style.cursor = 'default'; // Reset the cursor
342
- // Reset the resize handle color to default when resizing ends
343
- this.renderer.setStyle(this.resizeHandle, 'background-color', 'rgba(0, 0, 0, 0.2)');
344
- }
345
- });
346
- }
347
- // Mouse enter event to change the background color (hover effect)
348
- onMouseEnter() {
349
- // Only change color to blue if not resizing
350
- if (!this.isResizing) {
351
- this.renderer.setStyle(this.resizeHandle, 'background-color', '#007bff'); // Blue color on hover
352
- }
353
- }
354
- // Mouse leave event to reset the background color
355
- onMouseLeave() {
356
- // Only reset to default color if not resizing
357
- if (!this.isResizing) {
358
- this.renderer.setStyle(this.resizeHandle, 'background-color', 'rgba(0, 0, 0, 0.2)'); // Default background color
359
- }
360
- }
361
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXResizableDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive }); }
362
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.3", type: AXResizableDirective, isStandalone: false, selector: "[axResizable]", inputs: { minWidth: "minWidth" }, host: { listeners: { "mousedown": "onMouseDown($event)", "document:mousemove": "onMouseMove($event)", "document:mouseup": "onMouseUp()", "mouseenter": "onMouseEnter($event)", "mouseleave": "onMouseLeave($event)" } }, ngImport: i0 }); }
363
- }
364
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXResizableDirective, decorators: [{
365
- type: Directive,
366
- args: [{
367
- selector: '[axResizable]',
368
- standalone: false
369
- }]
370
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }], propDecorators: { minWidth: [{
371
- type: Input
372
- }], onMouseDown: [{
373
- type: HostListener,
374
- args: ['mousedown', ['$event']]
375
- }], onMouseMove: [{
376
- type: HostListener,
377
- args: ['document:mousemove', ['$event']]
378
- }], onMouseUp: [{
379
- type: HostListener,
380
- args: ['document:mouseup']
381
- }], onMouseEnter: [{
382
- type: HostListener,
383
- args: ['mouseenter', ['$event']]
384
- }], onMouseLeave: [{
385
- type: HostListener,
386
- args: ['mouseleave', ['$event']]
387
- }] } });
388
-
389
266
  // @dynamic
390
267
  class AXStringUtil {
391
268
  static getWordBoundsAtPosition(str, position) {
@@ -405,23 +282,9 @@ class AXStringUtil {
405
282
  }
406
283
  }
407
284
 
408
- class UtilsModule {
409
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: UtilsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
410
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.3", ngImport: i0, type: UtilsModule, declarations: [AXResizableDirective], imports: [CommonModule], exports: [AXResizableDirective] }); }
411
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: UtilsModule, imports: [CommonModule] }); }
412
- }
413
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: UtilsModule, decorators: [{
414
- type: NgModule,
415
- args: [{
416
- declarations: [AXResizableDirective],
417
- imports: [CommonModule],
418
- exports: [AXResizableDirective],
419
- }]
420
- }] });
421
-
422
285
  /**
423
286
  * Generated bundle index. Do not edit.
424
287
  */
425
288
 
426
- export { AXAutoUnsubscriber, AXColorUtil, AXDrawingUtil, AXHtmlUtil, AXResizableDirective, AXStringUtil, AXUnsubscriber, UtilsModule };
289
+ export { AXAutoUnsubscriber, AXColorUtil, AXDrawingUtil, AXHtmlUtil, AXStringUtil, AXUnsubscriber };
427
290
  //# sourceMappingURL=acorex-core-utils.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-core-utils.mjs","sources":["../../../../libs/core/utils/src/lib/auto-unsubscribe.ts","../../../../libs/core/utils/src/lib/color-util.ts","../../../../libs/core/utils/src/lib/drawing-util.ts","../../../../libs/core/utils/src/lib/html-util.ts","../../../../libs/core/utils/src/lib/resize.directive.ts","../../../../libs/core/utils/src/lib/string-util.ts","../../../../libs/core/utils/src/lib/utils.module.ts","../../../../libs/core/utils/src/acorex-core-utils.ts"],"sourcesContent":["import { Injectable, OnDestroy } from '@angular/core';\nimport { Observable, Subject, takeUntil } from 'rxjs';\n\nexport function AXAutoUnsubscriber() {\n return function (constructor) {\n const orig = constructor.prototype.ngOnDestroy;\n constructor.prototype.ngOnDestroy = function () {\n for (const prop in this) {\n const property = this[prop];\n if (typeof property.subscribe === 'function') {\n property.unsubscribe();\n }\n }\n orig.apply();\n };\n };\n}\n\n@Injectable()\nexport class AXUnsubscriber implements OnDestroy {\n private readonly _destroy$ = new Subject<void>();\n\n public readonly takeUntilDestroy = <T>(origin: Observable<T> | Subject<T>): Observable<T> | Subject<T> =>\n origin.pipe(takeUntil(this._destroy$));\n\n public unsubscribe(): void {\n this._destroy$.next();\n this._destroy$.complete();\n }\n\n public ngOnDestroy(): void {\n this.unsubscribe();\n }\n}\n","export type AXColorMode = 'rgba' | 'hex' | 'hsla' | 'hsva' | null;\n\nimport tinycolor, { ColorInput } from 'tinycolor2';\nimport tinygradient, { Instance } from 'tinygradient-es';\n\nexport type AXColorFormat = ColorInput;\n\nexport class AXColorUtil {\n static to(color: AXColorFormat, mode: AXColorMode): AXColorFormat {\n const _color = tinycolor(color);\n switch (mode) {\n case 'rgba':\n return _color.toRgb();\n case 'hsla':\n return _color.toHsl();\n case 'hsva':\n return _color.toHsv();\n default:\n return _color.toHex();\n }\n }\n\n static toString(color: AXColorFormat, mode: AXColorMode = null): string {\n const _color = tinycolor(color);\n switch (mode) {\n case 'rgba':\n return _color.toRgbString();\n case 'hsla':\n return _color.toHslString();\n case 'hsva':\n return _color.toHsvString();\n\n case 'hex': {\n const rgba = _color.toRgb();\n return rgba.a != 1 ? _color.toHex8String() : _color.toHexString();\n }\n default: {\n if (typeof color == 'string') {\n if (color.toLowerCase().startsWith('#')) return this.toString(color, 'hex');\n else return this.toString(color, 'rgba');\n } else {\n return this.toString(color, 'rgba');\n }\n }\n }\n }\n\n static isValid(color: AXColorFormat): boolean {\n const _color = tinycolor(color);\n return _color.isValid();\n }\n\n static mix(baseColor: AXColorFormat, hex: AXColorFormat, percentage: number): string {\n return tinycolor.mix(baseColor, hex, percentage).toString('rgb');\n }\n\n static multiply(color1: AXColorFormat, color2: AXColorFormat): string {\n const rgb1 = tinycolor(color1).toRgb();\n const rgb2 = tinycolor(color2).toRgb();\n rgb1.b = Math.floor((rgb1.b * rgb2.b) / 255);\n rgb1.g = Math.floor((rgb1.g * rgb2.g) / 255);\n rgb1.r = Math.floor((rgb1.r * rgb2.r) / 255);\n return tinycolor('rgb ' + rgb1.r + ' ' + rgb1.g + ' ' + rgb1.b).toString('rgb');\n }\n\n static contrastToWhite(color: AXColorFormat): number {\n return tinycolor.readability('#fff', color);\n }\n\n static lighten(hex: AXColorFormat, percentage?: number) {\n return tinycolor(hex).lighten(percentage);\n }\n\n static darken(hex: AXColorFormat, percentage?: number) {\n return tinycolor(hex).darken(percentage);\n }\n\n static brighten(hex: AXColorFormat, percentage?: number) {\n return tinycolor(hex).brighten(percentage);\n }\n\n static saturate(hex: AXColorFormat, percentage?: number) {\n return tinycolor(hex).saturate(percentage);\n }\n\n static desaturate(hex: AXColorFormat) {\n return tinycolor(hex).getLuminance();\n }\n\n static equal(color1: AXColorFormat, color2: AXColorFormat): boolean {\n return tinycolor.equals(color1, color2);\n }\n\n static gradient(values: unknown[] | { color: unknown; pos: number }[]): Instance {\n return tinygradient([...values]);\n }\n\n static getLuminance(hex: AXColorFormat) {\n return tinycolor(hex).getLuminance();\n }\n\n static xyToRgb(vX, vY): string {\n vY = vY || 0.00000000001;\n const Y = 1;\n const X = (Y / vY) * vX;\n const Z = (Y / vY) * (1 - vX - vY);\n\n // Convert to RGB using Wide RGB D65 conversion.\n let rgb = [X * 1.656492 - Y * 0.354851 - Z * 0.255038, -X * 0.707196 + Y * 1.655397 + Z * 0.036152, X * 0.051713 - Y * 0.121364 + Z * 1.01153];\n\n // Apply reverse gamma correction.\n rgb = rgb.map((x) => (x <= 0.0031308 ? 12.92 * x : (1.0 + 0.055) * Math.pow(x, 1.0 / 2.4) - 0.055));\n\n // Bring all negative components to zero.\n rgb = rgb.map((x) => Math.max(0, x));\n\n // If one component is greater than 1, weight components by that value.\n const max = Math.max(...rgb);\n if (max > 1) {\n rgb = rgb.map((x) => x / max);\n }\n\n rgb = rgb.map((x) => Math.round(x * 255));\n\n return 'rgb(' + rgb.join(',') + ')';\n }\n\n static colorStringToHex(color) {\n // Check if the input is an RGBA color string\n const rgbaMatch = color.match(/^rgba?\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*(?:,\\s*([\\d.]+))?\\s*\\)$/i);\n if (rgbaMatch) {\n let [_, r, g, b, a] = rgbaMatch;\n r = parseInt(r, 10);\n g = parseInt(g, 10);\n b = parseInt(b, 10);\n a = a ? parseFloat(a) : 1;\n\n // Convert RGB to hex\n let hexColor = `#${((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1)}`;\n\n // Include alpha if present\n if (a < 1) {\n const alphaHex = Math.round(a * 255)\n .toString(16)\n .padStart(2, '0');\n hexColor += alphaHex;\n }\n\n return hexColor;\n }\n\n // Check if the input is a hex color string\n const hexMatch = color.match(/^#([0-9a-fA-F]{3}){1,2}$/);\n if (hexMatch) {\n return color;\n }\n\n throw new Error('Invalid color format');\n }\n\n static getRandomColor(): string {\n // Generate a random hex color\n return `#${Math.floor(Math.random() * 16777215).toString(16)}`;\n }\n}\n","export interface AXPoint {\n x: number;\n y: number;\n}\n\nexport interface AXBoundingClientRect {\n left?: number;\n top?: number;\n width?: number;\n height?: number;\n bottom?: number;\n right?: number;\n}\n// @dynamic\nexport class AXDrawingUtil {\n static collision(a: HTMLElement, b: HTMLElement): boolean {\n const ac = a.getBoundingClientRect();\n const bc = b.getBoundingClientRect();\n\n if (\n ac.left < bc.left + bc.width &&\n ac.left + ac.width > bc.left &&\n ac.top < bc.top + bc.height &&\n ac.top + ac.height > bc.top\n ) {\n return true;\n } else {\n return false;\n }\n }\n\n static isInElementBound(pos: AXPoint, element: HTMLElement): boolean {\n const elBound = element.getBoundingClientRect();\n return AXDrawingUtil.isInRecPoint(pos, {\n left: elBound.x,\n width: elBound.width,\n top: elBound.y,\n height: elBound.height,\n });\n }\n\n static isInRecPoint(pos: AXPoint, rec: AXBoundingClientRect | any): boolean {\n return (\n pos.x >= rec.left && pos.x <= rec.left + rec.width && pos.y >= rec.top && pos.y <= rec.top + rec.height\n );\n }\n\n static convertRemToPixels(rem: number): number {\n return rem * parseFloat(getComputedStyle(document.documentElement).fontSize);\n }\n}\n","import { isBrowser } from '@acorex/core/platform';\n\n// @dynamic\nexport class AXHtmlUtil {\n static focusElement(element: HTMLElement): HTMLElement {\n const list = ['button', 'input', '[href]', 'select', 'textarea', '[tabindex]'].map((c) => c + ':not([tabindex=\"-1\"])');\n const focusable = element.querySelector<HTMLElement>(list.join(', '));\n if (focusable) {\n focusable.focus();\n return focusable;\n }\n return null;\n }\n\n static blurElement(element: HTMLElement): HTMLElement {\n const list = ['button', 'input', '[href]', 'select', 'textarea', '[tabindex]'].map((c) => c + ':not([tabindex=\"-1\"])');\n const focusable = element.querySelector<HTMLElement>(list.join(', '));\n if (focusable) {\n focusable.blur();\n return focusable;\n }\n return null;\n }\n\n static hasFocus(element: HTMLElement) {\n return element.matches(':focus-within') || element.matches(':focus');\n }\n\n static isRtl(element?: HTMLElement) {\n if (isBrowser() && element) {\n const rtl = element.classList.contains('ax-rtl') || window.getComputedStyle(element, null).getPropertyValue('direction') === 'rtl';\n return rtl;\n }\n\n return document.documentElement.dir === 'rtl';\n }\n\n static hasDark(element: HTMLElement): boolean {\n if (isBrowser()) {\n return element.closest('.ax-dark') ? true : false;\n }\n return false;\n }\n /**\n * Helper function to check if an element is scrollable\n */\n static isScrollable(element: HTMLElement): boolean {\n const overflowY = window.getComputedStyle(element).overflowY;\n return (overflowY === 'auto' || overflowY === 'scroll') && element.scrollHeight > element.clientHeight;\n }\n\n /**\n * Utility function to find scrollable parent elements\n */\n static getScrollableParents(element: HTMLElement): HTMLElement[] {\n const parents: HTMLElement[] = [];\n let currentElement: HTMLElement | null = element;\n\n while (currentElement) {\n if (AXHtmlUtil.isScrollable(currentElement)) {\n parents.push(currentElement);\n }\n currentElement = currentElement.parentElement;\n }\n\n return parents;\n }\n}\n","import { DOCUMENT, isPlatformBrowser } from '@angular/common';\nimport {\n Directive,\n ElementRef,\n HostListener,\n inject,\n Input,\n NgZone,\n PLATFORM_ID,\n Renderer2,\n} from '@angular/core';\n\n@Directive({\n selector: '[axResizable]',\n standalone: false\n})\nexport class AXResizableDirective {\n private document = inject(DOCUMENT);\n private platformID = inject(PLATFORM_ID);\n\n @Input() minWidth = 100; // Minimum width for the resizable element\n private isResizing = false;\n private resizeHandle: HTMLElement;\n\n constructor(\n private el: ElementRef,\n private renderer: Renderer2,\n private zone: NgZone,\n ) {\n this.createResizeHandle(); // Initialize the resize handle\n }\n\n // Create the resize handle element and apply inline styles\n private createResizeHandle(): void {\n // Apply position relative to the container to allow the absolute positioning of the handle\n this.renderer.setStyle(this.el.nativeElement, 'position', 'relative');\n\n // Create the resize handle dynamically\n this.resizeHandle = this.renderer.createElement('div');\n this.renderer.addClass(this.resizeHandle, 'resize-handle');\n this.renderer.appendChild(this.el.nativeElement, this.resizeHandle);\n\n // Apply inline styles for the resize handle\n this.renderer.setStyle(this.resizeHandle, 'width', '6px'); // Resize handle width\n this.renderer.setStyle(this.resizeHandle, 'background-color', 'rgba(0, 0, 0, 0.2)');\n this.renderer.setStyle(this.resizeHandle, 'position', 'absolute');\n this.renderer.setStyle(this.resizeHandle, 'top', '0');\n this.renderer.setStyle(this.resizeHandle, 'right', '0');\n this.renderer.setStyle(this.resizeHandle, 'bottom', '0');\n this.renderer.setStyle(this.resizeHandle, 'cursor', 'ew-resize'); // Horizontal resize cursor\n this.renderer.setStyle(this.resizeHandle, 'z-index', '10');\n this.renderer.setStyle(this.resizeHandle, 'transition', 'background-color 0.2s ease');\n this.renderer.setStyle(this.resizeHandle, 'border-radius', '4px');\n }\n\n // Mouse down event: Start resizing\n @HostListener('mousedown', ['$event'])\n onMouseDown(event: MouseEvent): void {\n // Only allow resizing when clicking on the handle\n const handleRect = this.resizeHandle.getBoundingClientRect();\n if (\n event.clientX >= handleRect.left &&\n event.clientX <= handleRect.right &&\n isPlatformBrowser(this.platformID)\n ) {\n this.zone.runOutsideAngular(() => {\n this.isResizing = true;\n this.document.body.style.cursor = 'ew-resize'; // Change cursor to resize mode\n // Change resize handle color to blue when resizing starts\n this.renderer.setStyle(this.resizeHandle, 'background-color', '#007bff');\n event.preventDefault();\n });\n }\n }\n\n // Mouse move event: Resize the element\n @HostListener('document:mousemove', ['$event'])\n onMouseMove(event: MouseEvent): void {\n this.zone.runOutsideAngular(() => {\n if (this.isResizing) {\n const rect = this.el.nativeElement.getBoundingClientRect();\n let newWidth: number;\n\n // Resize logic (LTR or RTL support)\n if (isPlatformBrowser(this.platformID)) {\n if (this.document.documentElement.dir === 'rtl') {\n newWidth = rect.right - event.clientX;\n } else {\n newWidth = event.clientX - rect.left;\n }\n }\n\n // Ensure the width does not go below the minimum width\n if (newWidth > this.minWidth) {\n this.renderer.setStyle(this.el.nativeElement, 'width', `${newWidth}px`);\n }\n }\n });\n }\n\n // Mouse up event: End resizing\n @HostListener('document:mouseup')\n onMouseUp(): void {\n this.zone.runOutsideAngular(() => {\n if (this.isResizing && isPlatformBrowser(this.platformID)) {\n this.isResizing = false;\n this.document.body.style.cursor = 'default'; // Reset the cursor\n // Reset the resize handle color to default when resizing ends\n this.renderer.setStyle(this.resizeHandle, 'background-color', 'rgba(0, 0, 0, 0.2)');\n }\n });\n }\n\n // Mouse enter event to change the background color (hover effect)\n @HostListener('mouseenter', ['$event'])\n onMouseEnter(): void {\n // Only change color to blue if not resizing\n if (!this.isResizing) {\n this.renderer.setStyle(this.resizeHandle, 'background-color', '#007bff'); // Blue color on hover\n }\n }\n\n // Mouse leave event to reset the background color\n @HostListener('mouseleave', ['$event'])\n onMouseLeave(): void {\n // Only reset to default color if not resizing\n if (!this.isResizing) {\n this.renderer.setStyle(this.resizeHandle, 'background-color', 'rgba(0, 0, 0, 0.2)'); // Default background color\n }\n }\n}\n","// @dynamic\nexport class AXStringUtil {\n static getWordBoundsAtPosition(str: string, position: number): { start: number; end: number } {\n const isSpace = (c) => /[^a-zA-Z0-9]+/i.test(c);\n let start = position - 1;\n\n while (start >= 0 && !isSpace(str[start])) {\n start -= 1;\n }\n start = Math.max(0, start + 1);\n const leftSideString: any = str.slice(start).match(/[a-zA-Z0-9]+/i);\n start += leftSideString.index;\n let end = start + leftSideString[0].length;\n return {\n start,\n end,\n };\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXResizableDirective } from './resize.directive';\n\n@NgModule({\n declarations: [AXResizableDirective],\n imports: [CommonModule],\n exports: [AXResizableDirective],\n})\nexport class UtilsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;SAGgB,kBAAkB,GAAA;AAChC,IAAA,OAAO,UAAU,WAAW,EAAA;AAC1B,QAAA,MAAM,IAAI,GAAG,WAAW,CAAC,SAAS,CAAC,WAAW;AAC9C,QAAA,WAAW,CAAC,SAAS,CAAC,WAAW,GAAG,YAAA;AAClC,YAAA,KAAK,MAAM,IAAI,IAAI,IAAI,EAAE;AACvB,gBAAA,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC;AAC3B,gBAAA,IAAI,OAAO,QAAQ,CAAC,SAAS,KAAK,UAAU,EAAE;oBAC5C,QAAQ,CAAC,WAAW,EAAE;;;YAG1B,IAAI,CAAC,KAAK,EAAE;AACd,SAAC;AACH,KAAC;AACH;MAGa,cAAc,CAAA;AAD3B,IAAA,WAAA,GAAA;AAEmB,QAAA,IAAA,CAAA,SAAS,GAAG,IAAI,OAAO,EAAQ;AAEhC,QAAA,IAAA,CAAA,gBAAgB,GAAG,CAAI,MAAkC,KACvE,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,CAA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AA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAW,YAHZ,YAAY,CAAA,EAAA,CAAA,CAAA;;2FAGX,WAAW,EAAA,UAAA,EAAA,CAAA;kBALvB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,oBAAoB,CAAC;oBACpC,OAAO,EAAE,CAAC,YAAY,CAAC;oBACvB,OAAO,EAAE,CAAC,oBAAoB,CAAC;AAChC,iBAAA;;;ACRD;;AAEG;;;;"}
1
+ {"version":3,"file":"acorex-core-utils.mjs","sources":["../../../../libs/core/utils/src/lib/auto-unsubscribe.ts","../../../../libs/core/utils/src/lib/color-util.ts","../../../../libs/core/utils/src/lib/drawing-util.ts","../../../../libs/core/utils/src/lib/html-util.ts","../../../../libs/core/utils/src/lib/string-util.ts","../../../../libs/core/utils/src/acorex-core-utils.ts"],"sourcesContent":["import { Injectable, OnDestroy } from '@angular/core';\nimport { Observable, Subject, takeUntil } from 'rxjs';\n\nexport function AXAutoUnsubscriber() {\n return function (constructor) {\n const orig = constructor.prototype.ngOnDestroy;\n constructor.prototype.ngOnDestroy = function () {\n for (const prop in this) {\n const property = this[prop];\n if (typeof property.subscribe === 'function') {\n property.unsubscribe();\n }\n }\n orig.apply();\n };\n };\n}\n\n@Injectable()\nexport class AXUnsubscriber implements OnDestroy {\n private readonly _destroy$ = new Subject<void>();\n\n public readonly takeUntilDestroy = <T>(origin: Observable<T> | Subject<T>): Observable<T> | Subject<T> =>\n origin.pipe(takeUntil(this._destroy$));\n\n public unsubscribe(): void {\n this._destroy$.next();\n this._destroy$.complete();\n }\n\n public ngOnDestroy(): void {\n this.unsubscribe();\n }\n}\n","export type AXColorMode = 'rgba' | 'hex' | 'hsla' | 'hsva' | null;\n\nimport tinycolor, { ColorInput } from 'tinycolor2';\nimport tinygradient, { Instance } from 'tinygradient-es';\n\nexport type AXColorFormat = ColorInput;\n\nexport class AXColorUtil {\n static to(color: AXColorFormat, mode: AXColorMode): AXColorFormat {\n const _color = tinycolor(color);\n switch (mode) {\n case 'rgba':\n return _color.toRgb();\n case 'hsla':\n return _color.toHsl();\n case 'hsva':\n return _color.toHsv();\n default:\n return _color.toHex();\n }\n }\n\n static toString(color: AXColorFormat, mode: AXColorMode = null): string {\n const _color = tinycolor(color);\n switch (mode) {\n case 'rgba':\n return _color.toRgbString();\n case 'hsla':\n return _color.toHslString();\n case 'hsva':\n return _color.toHsvString();\n\n case 'hex': {\n const rgba = _color.toRgb();\n return rgba.a != 1 ? _color.toHex8String() : _color.toHexString();\n }\n default: {\n if (typeof color == 'string') {\n if (color.toLowerCase().startsWith('#')) return this.toString(color, 'hex');\n else return this.toString(color, 'rgba');\n } else {\n return this.toString(color, 'rgba');\n }\n }\n }\n }\n\n static isValid(color: AXColorFormat): boolean {\n const _color = tinycolor(color);\n return _color.isValid();\n }\n\n static mix(baseColor: AXColorFormat, hex: AXColorFormat, percentage: number): string {\n return tinycolor.mix(baseColor, hex, percentage).toString('rgb');\n }\n\n static multiply(color1: AXColorFormat, color2: AXColorFormat): string {\n const rgb1 = tinycolor(color1).toRgb();\n const rgb2 = tinycolor(color2).toRgb();\n rgb1.b = Math.floor((rgb1.b * rgb2.b) / 255);\n rgb1.g = Math.floor((rgb1.g * rgb2.g) / 255);\n rgb1.r = Math.floor((rgb1.r * rgb2.r) / 255);\n return tinycolor('rgb ' + rgb1.r + ' ' + rgb1.g + ' ' + rgb1.b).toString('rgb');\n }\n\n static contrastToWhite(color: AXColorFormat): number {\n return tinycolor.readability('#fff', color);\n }\n\n static lighten(hex: AXColorFormat, percentage?: number) {\n return tinycolor(hex).lighten(percentage);\n }\n\n static darken(hex: AXColorFormat, percentage?: number) {\n return tinycolor(hex).darken(percentage);\n }\n\n static brighten(hex: AXColorFormat, percentage?: number) {\n return tinycolor(hex).brighten(percentage);\n }\n\n static saturate(hex: AXColorFormat, percentage?: number) {\n return tinycolor(hex).saturate(percentage);\n }\n\n static desaturate(hex: AXColorFormat) {\n return tinycolor(hex).getLuminance();\n }\n\n static equal(color1: AXColorFormat, color2: AXColorFormat): boolean {\n return tinycolor.equals(color1, color2);\n }\n\n static gradient(values: unknown[] | { color: unknown; pos: number }[]): Instance {\n return tinygradient([...values]);\n }\n\n static getLuminance(hex: AXColorFormat) {\n return tinycolor(hex).getLuminance();\n }\n\n static xyToRgb(vX, vY): string {\n vY = vY || 0.00000000001;\n const Y = 1;\n const X = (Y / vY) * vX;\n const Z = (Y / vY) * (1 - vX - vY);\n\n // Convert to RGB using Wide RGB D65 conversion.\n let rgb = [X * 1.656492 - Y * 0.354851 - Z * 0.255038, -X * 0.707196 + Y * 1.655397 + Z * 0.036152, X * 0.051713 - Y * 0.121364 + Z * 1.01153];\n\n // Apply reverse gamma correction.\n rgb = rgb.map((x) => (x <= 0.0031308 ? 12.92 * x : (1.0 + 0.055) * Math.pow(x, 1.0 / 2.4) - 0.055));\n\n // Bring all negative components to zero.\n rgb = rgb.map((x) => Math.max(0, x));\n\n // If one component is greater than 1, weight components by that value.\n const max = Math.max(...rgb);\n if (max > 1) {\n rgb = rgb.map((x) => x / max);\n }\n\n rgb = rgb.map((x) => Math.round(x * 255));\n\n return 'rgb(' + rgb.join(',') + ')';\n }\n\n static colorStringToHex(color) {\n // Check if the input is an RGBA color string\n const rgbaMatch = color.match(/^rgba?\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*(?:,\\s*([\\d.]+))?\\s*\\)$/i);\n if (rgbaMatch) {\n let [_, r, g, b, a] = rgbaMatch;\n r = parseInt(r, 10);\n g = parseInt(g, 10);\n b = parseInt(b, 10);\n a = a ? parseFloat(a) : 1;\n\n // Convert RGB to hex\n let hexColor = `#${((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1)}`;\n\n // Include alpha if present\n if (a < 1) {\n const alphaHex = Math.round(a * 255)\n .toString(16)\n .padStart(2, '0');\n hexColor += alphaHex;\n }\n\n return hexColor;\n }\n\n // Check if the input is a hex color string\n const hexMatch = color.match(/^#([0-9a-fA-F]{3}){1,2}$/);\n if (hexMatch) {\n return color;\n }\n\n throw new Error('Invalid color format');\n }\n\n static getRandomColor(): string {\n // Generate a random hex color\n return `#${Math.floor(Math.random() * 16777215).toString(16)}`;\n }\n}\n","export interface AXPoint {\n x: number;\n y: number;\n}\n\nexport interface AXBoundingClientRect {\n left?: number;\n top?: number;\n width?: number;\n height?: number;\n bottom?: number;\n right?: number;\n}\n// @dynamic\nexport class AXDrawingUtil {\n static collision(a: HTMLElement, b: HTMLElement): boolean {\n const ac = a.getBoundingClientRect();\n const bc = b.getBoundingClientRect();\n\n if (\n ac.left < bc.left + bc.width &&\n ac.left + ac.width > bc.left &&\n ac.top < bc.top + bc.height &&\n ac.top + ac.height > bc.top\n ) {\n return true;\n } else {\n return false;\n }\n }\n\n static isInElementBound(pos: AXPoint, element: HTMLElement): boolean {\n const elBound = element.getBoundingClientRect();\n return AXDrawingUtil.isInRecPoint(pos, {\n left: elBound.x,\n width: elBound.width,\n top: elBound.y,\n height: elBound.height,\n });\n }\n\n static isInRecPoint(pos: AXPoint, rec: AXBoundingClientRect | any): boolean {\n return (\n pos.x >= rec.left && pos.x <= rec.left + rec.width && pos.y >= rec.top && pos.y <= rec.top + rec.height\n );\n }\n\n static convertRemToPixels(rem: number): number {\n return rem * parseFloat(getComputedStyle(document.documentElement).fontSize);\n }\n}\n","import { isBrowser } from '@acorex/core/platform';\n\n// @dynamic\nexport class AXHtmlUtil {\n static focusElement(element: HTMLElement): HTMLElement {\n const list = ['button', 'input', '[href]', 'select', 'textarea', '[tabindex]'].map((c) => c + ':not([tabindex=\"-1\"])');\n const focusable = element.querySelector<HTMLElement>(list.join(', '));\n if (focusable) {\n focusable.focus();\n return focusable;\n }\n return null;\n }\n\n static blurElement(element: HTMLElement): HTMLElement {\n const list = ['button', 'input', '[href]', 'select', 'textarea', '[tabindex]'].map((c) => c + ':not([tabindex=\"-1\"])');\n const focusable = element.querySelector<HTMLElement>(list.join(', '));\n if (focusable) {\n focusable.blur();\n return focusable;\n }\n return null;\n }\n\n static hasFocus(element: HTMLElement) {\n return element.matches(':focus-within') || element.matches(':focus');\n }\n\n static isRtl(element?: HTMLElement) {\n if (isBrowser() && element) {\n const rtl = element.classList.contains('ax-rtl') || window.getComputedStyle(element, null).getPropertyValue('direction') === 'rtl';\n return rtl;\n }\n\n return document.documentElement.dir === 'rtl';\n }\n\n static hasDark(element: HTMLElement): boolean {\n if (isBrowser()) {\n return element.closest('.ax-dark') ? true : false;\n }\n return false;\n }\n /**\n * Helper function to check if an element is scrollable\n */\n static isScrollable(element: HTMLElement): boolean {\n const overflowY = window.getComputedStyle(element).overflowY;\n return (overflowY === 'auto' || overflowY === 'scroll') && element.scrollHeight > element.clientHeight;\n }\n\n /**\n * Utility function to find scrollable parent elements\n */\n static getScrollableParents(element: HTMLElement): HTMLElement[] {\n const parents: HTMLElement[] = [];\n let currentElement: HTMLElement | null = element;\n\n while (currentElement) {\n if (AXHtmlUtil.isScrollable(currentElement)) {\n parents.push(currentElement);\n }\n currentElement = currentElement.parentElement;\n }\n\n return parents;\n }\n}\n","// @dynamic\nexport class AXStringUtil {\n static getWordBoundsAtPosition(str: string, position: number): { start: number; end: number } {\n const isSpace = (c) => /[^a-zA-Z0-9]+/i.test(c);\n let start = position - 1;\n\n while (start >= 0 && !isSpace(str[start])) {\n start -= 1;\n }\n start = Math.max(0, start + 1);\n const leftSideString: any = str.slice(start).match(/[a-zA-Z0-9]+/i);\n start += leftSideString.index;\n let end = start + leftSideString[0].length;\n return {\n start,\n end,\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;SAGgB,kBAAkB,GAAA;AAChC,IAAA,OAAO,UAAU,WAAW,EAAA;AAC1B,QAAA,MAAM,IAAI,GAAG,WAAW,CAAC,SAAS,CAAC,WAAW;AAC9C,QAAA,WAAW,CAA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