@acorex/core 21.0.2-next.4 → 21.0.2-next.40

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 (32) hide show
  1. package/fesm2022/acorex-core-components.mjs +3 -3
  2. package/fesm2022/acorex-core-config.mjs +3 -3
  3. package/fesm2022/acorex-core-date-time.mjs +105 -91
  4. package/fesm2022/acorex-core-date-time.mjs.map +1 -1
  5. package/fesm2022/acorex-core-events.mjs +3 -3
  6. package/fesm2022/acorex-core-file.mjs +667 -92
  7. package/fesm2022/acorex-core-file.mjs.map +1 -1
  8. package/fesm2022/acorex-core-format.mjs +19 -19
  9. package/fesm2022/acorex-core-full-screen.mjs +4 -4
  10. package/fesm2022/acorex-core-full-screen.mjs.map +1 -1
  11. package/fesm2022/acorex-core-icon.mjs +3 -3
  12. package/fesm2022/acorex-core-image.mjs +3 -3
  13. package/fesm2022/acorex-core-locale.mjs +30 -13
  14. package/fesm2022/acorex-core-locale.mjs.map +1 -1
  15. package/fesm2022/acorex-core-network.mjs +4 -4
  16. package/fesm2022/acorex-core-network.mjs.map +1 -1
  17. package/fesm2022/acorex-core-pipes.mjs +3 -3
  18. package/fesm2022/acorex-core-platform.mjs +4 -4
  19. package/fesm2022/acorex-core-platform.mjs.map +1 -1
  20. package/fesm2022/acorex-core-storage.mjs +9 -9
  21. package/fesm2022/acorex-core-translation.mjs +68 -24
  22. package/fesm2022/acorex-core-translation.mjs.map +1 -1
  23. package/fesm2022/acorex-core-utils.mjs +3 -78
  24. package/fesm2022/acorex-core-utils.mjs.map +1 -1
  25. package/fesm2022/acorex-core-validation.mjs +40 -40
  26. package/fesm2022/acorex-core-z-index.mjs +3 -3
  27. package/package.json +3 -2
  28. package/types/acorex-core-date-time.d.ts +24 -20
  29. package/types/acorex-core-file.d.ts +268 -40
  30. package/types/acorex-core-locale.d.ts +5 -0
  31. package/types/acorex-core-translation.d.ts +8 -1
  32. package/types/acorex-core-utils.d.ts +0 -22
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-core-file.mjs","sources":["../../../../packages/core/file/src/lib/file-size-formatter.ts","../../../../packages/core/file/src/lib/file.module.ts","../../../../packages/core/file/src/lib/file.service.ts","../../../../packages/core/file/src/acorex-core-file.ts"],"sourcesContent":["import { AXFormatOptions, AXFormatter } from '@acorex/core/format';\nimport { Injectable } from '@angular/core';\n\nexport interface AXFileSizeFormatterOptions extends AXFormatOptions {\n format: string;\n}\n\ndeclare module '@acorex/core/format' {\n interface AXFormatOptionsMap {\n filesize: AXFileSizeFormatterOptions;\n }\n}\n\n@Injectable()\nexport class AXFileSizeFormatter implements AXFormatter {\n /**\n * Gets the name of the formatter.\n *\n * @returns string - The formatter name 'filesize'\n */\n\n get name(): string {\n return 'filesize';\n }\n\n /**\n * Formats a file size value to human-readable format.\n *\n * @param value - The file size in bytes\n * @returns string - The formatted file size string (e.g., '1.5 MB')\n */\n\n format(value: number): string {\n const size = Number(value);\n\n if (size === 0) return '0 Bytes';\n if (Number.isNaN(size)) return 'Unknown';\n\n const k = 1024;\n const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];\n const i = Math.floor(Math.log(size) / Math.log(k));\n\n return parseFloat((size / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];\n }\n}\n","import { AXFormatModule } from '@acorex/core/format';\nimport { NgModule } from '@angular/core';\nimport { AXFileSizeFormatter } from './file-size-formatter';\n\n@NgModule({\n imports: [AXFormatModule.forChild({ formatters: [AXFileSizeFormatter] })],\n exports: [],\n declarations: [],\n providers: [AXFileSizeFormatter],\n})\nexport class AXFileModule {}\n","import { DOCUMENT, inject, Injectable, PLATFORM_ID } from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AXFileService {\n private document = inject(DOCUMENT);\n private platformID = inject(PLATFORM_ID);\n\n /**\n * Opens a file selection dialog and returns the selected files.\n *\n * @param options - Optional configuration for file selection\n * @param options.accept - File types to accept (e.g., 'image/*', '.pdf')\n * @param options.multiple - Whether to allow multiple file selection\n * @returns Promise<File[]> - Promise that resolves with the selected files\n */\n\n public choose(options?: { accept?: string; multiple?: boolean }): Promise<File[]> {\n return new Promise<File[]>((resolve, reject) => {\n options = Object.assign({ multiple: false }, options);\n const input: HTMLInputElement = this.document.createElement('input');\n input.style.display = 'none';\n this.document.body.appendChild(input);\n input.type = 'file';\n input.accept = options.accept || '';\n input.multiple = options.multiple || false;\n //\n const onError = (e) => {\n reject(e);\n this.document.body.removeChild(input);\n input.remove();\n input.removeEventListener('change', onChange);\n input.removeEventListener('error', onError);\n };\n //\n const onChange = () => {\n resolve(Array.from(input.files || []));\n this.document.body.removeChild(input);\n input.remove();\n input.removeEventListener('change', onChange);\n input.removeEventListener('error', onError);\n };\n //\n input.addEventListener('change', onChange);\n input.addEventListener('error', onError);\n input.click();\n });\n }\n\n /**\n * Gets the size of a file, blob, or base64 string.\n *\n * @param file - The file, blob, or base64 string to get size for\n * @returns number | false - The size in bytes or false if not a base64 string\n */\n\n public blobToBase64 = (blob: Blob) => {\n if (blob instanceof Blob) {\n return new Promise<string>((resolve, reject) => {\n const reader = new FileReader();\n reader.onerror = reject;\n reader.onload = () => {\n resolve(reader.result as string);\n };\n reader.readAsDataURL(blob);\n });\n } else {\n return Promise.reject('input is not blob');\n }\n };\n\n /**\n * Gets the size of a file, blob, or base64 string.\n *\n * @param file - The file, blob, or base64 string to get size for\n * @returns number | false - The size in bytes or false if not a base64 string\n */\n\n public getSize(file: File | Blob | string) {\n if (this.isBase64(file as string)) {\n return this.getBase64Size(file as string);\n }\n return false;\n }\n\n /**\n * Checks if a string is a valid base64 string.\n *\n * @param base64 - The string to check\n * @returns boolean - True if the string is a valid base64 string\n */\n\n public isBase64(base64: string) {\n const regx = /[^:]\\w+\\/[\\w-+\\d.]+(?=;|,)/;\n return regx.test(base64);\n }\n\n /**\n * Gets the size of a base64 string in bytes.\n *\n * @param base64 - The base64 string to get size for\n * @returns number - The size in bytes\n */\n\n public getBase64Size(base64: string) {\n return atob(base64.substring(base64.indexOf(',') + 1)).length;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAca,mBAAmB,CAAA;AAC9B;;;;AAIG;AAEH,IAAA,IAAI,IAAI,GAAA;AACN,QAAA,OAAO,UAAU;IACnB;AAEA;;;;;AAKG;AAEH,IAAA,MAAM,CAAC,KAAa,EAAA;AAClB,QAAA,MAAM,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC;QAE1B,IAAI,IAAI,KAAK,CAAC;AAAE,YAAA,OAAO,SAAS;AAChC,QAAA,IAAI,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC;AAAE,YAAA,OAAO,SAAS;QAExC,MAAM,CAAC,GAAG,IAAI;QACd,MAAM,KAAK,GAAG,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;QACvE,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAElD,OAAO,UAAU,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC;IACxE;8GA7BW,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAAnB,mBAAmB,EAAA,CAAA,CAAA;;2FAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAD/B;;;MCHY,YAAY,CAAA;8GAAZ,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAA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EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,cAFZ,MAAM,EAAA,CAAA,CAAA;;2FAEP,aAAa,EAAA,UAAA,EAAA,CAAA;kBAHzB,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACJD;;AAEG;;;;"}
1
+ {"version":3,"file":"acorex-core-file.mjs","sources":["../../../../packages/core/file/src/lib/file-size-formatter.ts","../../../../packages/core/file/src/lib/format-file-size.ts","../../../../packages/core/file/src/lib/file-type/file-type.copy.ts","../../../../packages/core/file/src/lib/file-type/file-type-info-provider.ts","../../../../packages/core/file/src/lib/file-type/file-type.merge.ts","../../../../packages/core/file/src/lib/file-type/file-type.validate.ts","../../../../packages/core/file/src/lib/file-type/file-type-registry.service.ts","../../../../packages/core/file/src/lib/file-type/types.providers/audio-file-type.provider.ts","../../../../packages/core/file/src/lib/file-type/types.providers/document-file-type.provider.ts","../../../../packages/core/file/src/lib/file-type/types.providers/file-file-type.provider.ts","../../../../packages/core/file/src/lib/file-type/types.providers/image-file-type.provider.ts","../../../../packages/core/file/src/lib/file-type/types.providers/video-file-type.provider.ts","../../../../packages/core/file/src/lib/file-type/types.providers/index.ts","../../../../packages/core/file/src/lib/file-type/rules/file-mime-type.rule.ts","../../../../packages/core/file/src/lib/file-type/rules/file-min-size.rule.ts","../../../../packages/core/file/src/lib/file-type/rules/file-max-size.rule.ts","../../../../packages/core/file/src/lib/file-type/index.ts","../../../../packages/core/file/src/lib/file.module.ts","../../../../packages/core/file/src/lib/file.service.ts","../../../../packages/core/file/src/acorex-core-file.ts"],"sourcesContent":["import { AXFormatOptions, AXFormatter } from '@acorex/core/format';\nimport { Injectable } from '@angular/core';\n\nexport interface AXFileSizeFormatterOptions extends AXFormatOptions {\n format: string;\n}\n\ndeclare module '@acorex/core/format' {\n interface AXFormatOptionsMap {\n filesize: AXFileSizeFormatterOptions;\n }\n}\n\n@Injectable()\nexport class AXFileSizeFormatter implements AXFormatter {\n /**\n * Gets the name of the formatter.\n *\n * @returns string - The formatter name 'filesize'\n */\n\n get name(): string {\n return 'filesize';\n }\n\n /**\n * Formats a file size value to human-readable format.\n *\n * @param value - The file size in bytes\n * @returns string - The formatted file size string (e.g., '1.5 MB')\n */\n\n format(value: number): string {\n const size = Number(value);\n\n if (size === 0) return '0 Bytes';\n if (Number.isNaN(size)) return 'Unknown';\n\n const k = 1024;\n const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];\n const i = Math.floor(Math.log(size) / Math.log(k));\n\n return parseFloat((size / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];\n }\n}\n","/** Human-readable file size (binary units, e.g. `41.5 MB`). */\nexport function formatFileSizeBytes(bytes: number): string {\n if (!Number.isFinite(bytes) || bytes < 0) {\n return '0 B';\n }\n if (bytes === 0) {\n return '0 B';\n }\n\n const k = 1024;\n const units = ['B', 'KB', 'MB', 'GB', 'TB'];\n const i = Math.min(Math.floor(Math.log(bytes) / Math.log(k)), units.length - 1);\n const value = bytes / Math.pow(k, i);\n\n if (i === 0) {\n return `${bytes} B`;\n }\n\n const digits = value >= 100 ? 0 : value >= 10 ? 1 : 2;\n return `${value.toFixed(digits)} ${units[i]}`;\n}\n","/** Structured copy payload from {@link AXFileType.copy}. */\nexport interface AXFileCopyData {\n /** Primary plain-text value for clipboard or previews. */\n text: string;\n /** Optional type-specific metadata for consumers (URLs, names, mime types, …). */\n meta?: Record<string, unknown>;\n}\n\n/** Return value of {@link AXFileType.copy} — shorthand string or structured data. */\nexport type AXFileCopyResult = string | AXFileCopyData | null | undefined;\n\n/** Resolves clipboard/plain text from a copy result. */\nexport function resolveFileCopyText(result: AXFileCopyResult): string | null {\n if (result == null) {\n return null;\n }\n if (typeof result === 'string') {\n const trimmed = result.trim();\n return trimmed.length > 0 ? trimmed : null;\n }\n const trimmed = result.text?.trim();\n return trimmed && trimmed.length > 0 ? trimmed : null;\n}\n","import { InjectionToken, Provider, Type } from '@angular/core';\nimport type { AXFileType } from './file-type.models';\n\n/** Contributes {@link AXFileType} entries (multi provider). */\nexport abstract class AXFileTypeInfoProvider {\n abstract items(): Promise<AXFileType[]>;\n}\n\nexport const AX_FILE_TYPE_INFO_PROVIDER = new InjectionToken<AXFileTypeInfoProvider[]>('AX_FILE_TYPE_INFO_PROVIDER');\n\nexport function provideFileTypeInfoProvider(provider: Type<AXFileTypeInfoProvider>): Provider {\n return {\n provide: AX_FILE_TYPE_INFO_PROVIDER,\n useClass: provider,\n multi: true,\n };\n}\n","import type { AXFileType, AXFileTypeExtension, AXFileValidations } from './file-type.models';\n\n/** Merges type-level validations with extension overrides (extension wins per field). */\nexport function mergeFileValidations(\n base: AXFileValidations,\n override?: Partial<AXFileValidations>,\n): AXFileValidations {\n if (!override) {\n return { ...base };\n }\n\n return {\n mimeTypes: override.mimeTypes ?? base.mimeTypes,\n minSize: override.minSize ?? base.minSize,\n maxSize: override.maxSize ?? base.maxSize,\n rules: override.rules ?? base.rules,\n };\n}\n\n/** Resolved validations for a type + optional extension. */\nexport function resolveFileValidations(type: AXFileType, extension?: AXFileTypeExtension): AXFileValidations {\n return mergeFileValidations(type.validations ?? {}, extension?.validations);\n}\n\n/** True when no mime/size/rules are defined on the type. */\nexport function isEmptyFileValidations(validations?: AXFileValidations): boolean {\n if (!validations) {\n return true;\n }\n return (\n (validations.mimeTypes?.length ?? 0) === 0 &&\n validations.minSize == null &&\n validations.maxSize == null &&\n (validations.rules?.length ?? 0) === 0\n );\n}\n\n/**\n * Extension-only mode: empty type `validations` and a non-empty `extensions` list.\n * Files must match a listed extension; rules come from that extension entry.\n */\nexport function isExtensionsOnlyType(type: AXFileType): boolean {\n return isEmptyFileValidations(type.validations) && (type.extensions?.length ?? 0) > 0;\n}\n\n/** File extension from name (lowercase, no dot). */\nexport function getFileExtension(fileName: string): string {\n const parts = fileName.trim().split('.');\n return parts.length > 1 ? (parts.pop()?.toLowerCase() ?? '') : '';\n}\n\n/** Matching extension entry for a file within a type, if any. */\nexport function findFileTypeExtension(file: File, type: AXFileType): AXFileTypeExtension | undefined {\n const ext = getFileExtension(file.name);\n if (!ext || !type.extensions?.length) {\n return undefined;\n }\n return type.extensions.find((e) => e.name.toLowerCase() === ext);\n}\n","import { AXValidationService, type AXValidationRuleResult } from '@acorex/core/validation';\nimport {\n findFileTypeExtension,\n getFileExtension,\n isExtensionsOnlyType,\n resolveFileValidations,\n} from './file-type.merge';\nimport type { AXFileType, AXFileTypeExtension, AXFileValidationRule, AXFileValidations } from './file-type.models';\n\n/** Maps {@link AXFileValidations} to executable validation entries. */\nexport function fileValidationsToRules(validations: AXFileValidations): AXFileValidationRule[] {\n const rules: AXFileValidationRule[] = [];\n\n if (validations.mimeTypes?.length) {\n rules.push({\n rule: 'fileMimeType',\n options: { allowed: validations.mimeTypes },\n });\n }\n\n if (validations.minSize != null) {\n rules.push({\n rule: 'fileMinSize',\n options: { minSize: validations.minSize },\n });\n }\n\n if (validations.maxSize != null) {\n rules.push({\n rule: 'fileMaxSize',\n options: { maxSize: validations.maxSize },\n });\n }\n\n if (validations.rules?.length) {\n rules.push(...validations.rules);\n }\n\n return rules;\n}\n\n/** Failed validation results; empty array means the file is valid. */\nexport async function validateFileWithValidations(\n validation: AXValidationService,\n file: File,\n validations: AXFileValidations,\n): Promise<AXValidationRuleResult[]> {\n const entries = fileValidationsToRules(validations);\n const errors: AXValidationRuleResult[] = [];\n\n for (const { rule, options } of entries) {\n const result = await validation.validate(rule, file, options);\n if (!result.result) {\n errors.push(result);\n }\n }\n\n return errors;\n}\n\n/** Validates a file against a type; extension rules override when the file name matches. */\nexport async function validateFileAgainstType(\n validation: AXValidationService,\n file: File,\n type: AXFileType,\n extension?: AXFileTypeExtension,\n): Promise<AXValidationRuleResult[]> {\n const matchedExtension = extension ?? findFileTypeExtension(file, type);\n\n if (isExtensionsOnlyType(type) && !matchedExtension) {\n const ext = getFileExtension(file.name);\n return [\n {\n rule: 'fileExtension',\n result: false,\n message: ext ? `Extension \".${ext}\" is not allowed.` : 'File must have an allowed extension.',\n value: ext,\n },\n ];\n }\n\n const resolved = resolveFileValidations(type, matchedExtension);\n return validateFileWithValidations(validation, file, resolved);\n}\n","import type { AXValidationRuleResult } from '@acorex/core/validation';\n\nimport { AXValidationService } from '@acorex/core/validation';\n\nimport { Injectable, inject } from '@angular/core';\n\nimport { AX_FILE_TYPE_INFO_PROVIDER } from './file-type-info-provider';\n\nimport { findFileTypeExtension } from './file-type.merge';\n\nimport type { AXFileType } from './file-type.models';\n\nimport { validateFileAgainstType } from './file-type.validate';\n\n@Injectable({ providedIn: 'root' })\nexport class AXFileTypeRegistryService {\n private readonly validation = inject(AXValidationService);\n\n private readonly providers = inject(AX_FILE_TYPE_INFO_PROVIDER, { optional: true }) ?? [];\n\n private readonly registeredTypes: AXFileType[] = [];\n\n private cache: AXFileType[] | null = null;\n\n /** Registers or replaces catalog entries (e.g. from feature bootstrap). */\n\n registerTypes(types: AXFileType[]): void {\n for (const type of types) {\n const index = this.registeredTypes.findIndex((t) => t.name === type.name);\n\n if (index >= 0) {\n this.registeredTypes[index] = type;\n } else {\n this.registeredTypes.push(type);\n }\n }\n\n this.invalidateCache();\n }\n\n invalidateCache(): void {\n this.cache = null;\n }\n\n private async resolveTypes(): Promise<AXFileType[]> {\n if (this.cache) {\n return this.cache;\n }\n\n const byName = new Map<string, AXFileType>();\n\n if (this.providers.length) {\n const batches = await Promise.all(this.providers.map((p) => p.items()));\n\n for (const batch of batches) {\n for (const type of batch) {\n if (!byName.has(type.name)) {\n byName.set(type.name, type);\n }\n }\n }\n }\n\n for (const type of this.registeredTypes) {\n byName.set(type.name, type);\n }\n\n this.cache = [...byName.values()];\n\n return this.cache;\n }\n\n async getTypes(): Promise<AXFileType[]> {\n return this.resolveTypes();\n }\n\n async get(name: string): Promise<AXFileType | undefined> {\n const types = await this.resolveTypes();\n\n return types.find((t) => t.name === name);\n }\n\n async accept(typeNames?: string | string[]): Promise<string> {\n const names = typeNames ? (Array.isArray(typeNames) ? typeNames : [typeNames]) : undefined;\n\n const types = await this.resolveTypes();\n\n const selected = names?.length ? types.filter((t) => names.includes(t.name)) : types;\n\n if (names?.length && selected.length === 0) {\n return '';\n }\n\n const parts = new Set<string>();\n\n for (const type of selected) {\n type.validations?.mimeTypes?.forEach((m) => parts.add(m));\n\n type.extensions?.forEach((ext) => {\n ext.validations?.mimeTypes?.forEach((m) => parts.add(m));\n\n parts.add(`.${ext.name.replace(/^\\./, '')}`);\n });\n }\n\n return [...parts].join(',');\n }\n\n async matchType(file: File): Promise<AXFileType | undefined> {\n const types = await this.resolveTypes();\n\n const mime = file.type.trim().toLowerCase();\n\n return types.find((type) => {\n const patterns = [\n ...(type.validations?.mimeTypes ?? []),\n\n ...(type.extensions?.flatMap((e) => e.validations?.mimeTypes ?? []) ?? []),\n ];\n\n if (!patterns.length) {\n return false;\n }\n\n return patterns.some((pattern) => this.matchesMime(mime, pattern.trim().toLowerCase()));\n });\n }\n\n async validate(file: File, typeName: string): Promise<AXValidationRuleResult[]> {\n const type = await this.get(typeName);\n\n if (!type) {\n return [\n {\n rule: 'fileType',\n\n result: false,\n\n message: `Unknown file type: ${typeName}`,\n\n value: typeName,\n },\n ];\n }\n\n const extension = findFileTypeExtension(file, type);\n\n return validateFileAgainstType(this.validation, file, type, extension);\n }\n\n async validateAgainstTypes(\n file: File,\n\n typeNames: string | string[],\n ): Promise<AXValidationRuleResult[]> {\n const names = Array.isArray(typeNames) ? typeNames : [typeNames];\n\n let lastErrors: AXValidationRuleResult[] = [];\n\n for (const name of names) {\n const errors = await this.validate(file, name);\n\n if (errors.length === 0) {\n return [];\n }\n\n lastErrors = errors;\n }\n\n return lastErrors;\n }\n\n async validateMany(\n files: File[],\n\n typeNames: string | string[],\n ): Promise<{ accepted: File[]; rejected: { file: File; errors: AXValidationRuleResult[] }[] }> {\n const accepted: File[] = [];\n\n const rejected: { file: File; errors: AXValidationRuleResult[] }[] = [];\n\n for (const file of files) {\n const errors = await this.validateAgainstTypes(file, typeNames);\n\n if (errors.length === 0) {\n accepted.push(file);\n } else {\n rejected.push({ file, errors });\n }\n }\n\n return { accepted, rejected };\n }\n\n private matchesMime(mime: string, pattern: string): boolean {\n if (!pattern || pattern === '*/*' || pattern === '*') {\n return true;\n }\n\n if (pattern.endsWith('/*')) {\n const category = pattern.slice(0, -2);\n\n return mime.startsWith(`${category}/`) || (mime === '' && category === 'application');\n }\n\n return mime === pattern;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { AXFileTypeInfoProvider } from '../file-type-info-provider';\nimport type { AXFileType } from '../file-type.models';\n\nconst MB = 1024 * 1024;\n\nexport const AX_AUDIO_FILE_TYPE: AXFileType = {\n name: 'audio',\n title: 'Audio',\n icon: 'fa-light fa-music ax-text-amber-500',\n validations: {\n mimeTypes: ['audio/*'],\n minSize: 1,\n maxSize: 50 * MB,\n },\n extensions: [\n { name: 'mp3', title: 'MP3' },\n { name: 'wav', title: 'WAV', validations: { maxSize: 30 * MB } },\n { name: 'ogg', title: 'OGG' },\n { name: 'm4a', title: 'M4A' },\n ],\n};\n\n@Injectable()\nexport class AXAudioFileTypeProvider extends AXFileTypeInfoProvider {\n items(): Promise<AXFileType[]> {\n return Promise.resolve([AX_AUDIO_FILE_TYPE]);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { AXFileTypeInfoProvider } from '../file-type-info-provider';\nimport type { AXFileType } from '../file-type.models';\n\nconst MB = 1024 * 1024;\n\n/** Extension-only: no type `validations` — only listed extensions are allowed. */\nexport const AX_DOCUMENT_FILE_TYPE: AXFileType = {\n name: 'document',\n title: 'Document',\n icon: 'fa-light fa-file-lines ax-text-red-500',\n extensions: [{ name: 'pdf', title: 'PDF', validations: { mimeTypes: ['application/pdf'], maxSize: 5 * MB } }],\n};\n\n@Injectable()\nexport class AXDocumentFileTypeProvider extends AXFileTypeInfoProvider {\n items(): Promise<AXFileType[]> {\n return Promise.resolve([AX_DOCUMENT_FILE_TYPE]);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { AXFileTypeInfoProvider } from '../file-type-info-provider';\nimport type { AXFileType } from '../file-type.models';\n\nconst MB = 1024 * 1024;\n\nexport const AX_FILE_FILE_TYPE: AXFileType = {\n name: 'file',\n title: 'File',\n icon: 'fa-light fa-file ax-text-neutral-500',\n validations: {\n mimeTypes: ['application/*', 'text/*'],\n minSize: 1,\n maxSize: 100 * MB,\n },\n extensions: [\n { name: 'pdf', title: 'PDF', validations: { mimeTypes: ['application/pdf'], maxSize: 25 * MB } },\n { name: 'doc', title: 'Word' },\n { name: 'docx', title: 'Word' },\n { name: 'txt', title: 'Text', validations: { mimeTypes: ['text/plain'], maxSize: 5 * MB } },\n { name: 'zip', title: 'ZIP', validations: { maxSize: 50 * MB } },\n ],\n};\n\n@Injectable()\nexport class AXFileFileTypeProvider extends AXFileTypeInfoProvider {\n items(): Promise<AXFileType[]> {\n return Promise.resolve([AX_FILE_FILE_TYPE]);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { AXFileTypeInfoProvider } from '../file-type-info-provider';\nimport type { AXFileType } from '../file-type.models';\n\nconst MB = 1024 * 1024;\n\nexport const AX_IMAGE_FILE_TYPE: AXFileType = {\n name: 'image',\n title: 'Image',\n icon: 'fa-light fa-image ax-text-purple-500',\n validations: {\n mimeTypes: ['image/*'],\n minSize: 1,\n maxSize: 100 * MB,\n },\n extensions: [\n { name: 'jpg', title: 'JPEG' },\n { name: 'jpeg', title: 'JPEG', validations: { maxSize: 5 * MB } },\n { name: 'png', title: 'PNG' },\n { name: 'gif', title: 'GIF' },\n { name: 'webp', title: 'WebP' },\n { name: 'svg', title: 'SVG', validations: { maxSize: 2 * MB } },\n ],\n};\n\n@Injectable()\nexport class AXImageFileTypeProvider extends AXFileTypeInfoProvider {\n items(): Promise<AXFileType[]> {\n return Promise.resolve([AX_IMAGE_FILE_TYPE]);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { AXFileTypeInfoProvider } from '../file-type-info-provider';\nimport type { AXFileType } from '../file-type.models';\n\nconst MB = 1024 * 1024;\n\nexport const AX_VIDEO_FILE_TYPE: AXFileType = {\n name: 'video',\n title: 'Video',\n icon: 'fa-light fa-video ax-text-blue-500',\n validations: {\n mimeTypes: ['video/*'],\n minSize: 1,\n maxSize: 500 * MB,\n },\n extensions: [\n { name: 'mp4', title: 'MP4' },\n { name: 'webm', title: 'WebM', validations: { maxSize: 200 * MB } },\n { name: 'ogg', title: 'OGG' },\n ],\n};\n\n@Injectable()\nexport class AXVideoFileTypeProvider extends AXFileTypeInfoProvider {\n items(): Promise<AXFileType[]> {\n return Promise.resolve([AX_VIDEO_FILE_TYPE]);\n }\n}\n","import { Provider, Type } from '@angular/core';\nimport { provideFileTypeInfoProvider, AXFileTypeInfoProvider } from '../file-type-info-provider';\nimport { AXAudioFileTypeProvider } from './audio-file-type.provider';\nimport { AXDocumentFileTypeProvider } from './document-file-type.provider';\nimport { AXFileFileTypeProvider } from './file-file-type.provider';\nimport { AXImageFileTypeProvider } from './image-file-type.provider';\nimport { AXVideoFileTypeProvider } from './video-file-type.provider';\n\nexport * from './image-file-type.provider';\nexport * from './video-file-type.provider';\nexport * from './audio-file-type.provider';\nexport * from './file-file-type.provider';\nexport * from './document-file-type.provider';\n\n/** Built-in file type provider classes (one logical type per provider). */\nexport const AX_BUILTIN_FILE_TYPE_PROVIDERS = [\n AXImageFileTypeProvider,\n AXVideoFileTypeProvider,\n AXAudioFileTypeProvider,\n AXFileFileTypeProvider,\n AXDocumentFileTypeProvider,\n] as const satisfies readonly Type<AXFileTypeInfoProvider>[];\n\n/** Registers all built-in file type providers (image, video, audio, file, document). */\nexport function provideBuiltinFileTypeProviders(): Provider[] {\n return AX_BUILTIN_FILE_TYPE_PROVIDERS.map((provider) => provideFileTypeInfoProvider(provider));\n}\n\n/** @deprecated Use {@link provideBuiltinFileTypeProviders}. */\nexport const provideDefaultFileTypeProviders = provideBuiltinFileTypeProviders;\n","import { Injectable } from '@angular/core';\nimport {\n AXValidationRule,\n AXValidationRuleOptions,\n AXValidationRuleResult,\n} from '@acorex/core/validation';\n\nexport interface AXFileMimeTypeValidationRuleOptions extends AXValidationRuleOptions {\n /** MIME patterns, e.g. `image/*`, `image/png`. */\n allowed: string[];\n}\n\ndeclare module '@acorex/core/validation' {\n interface AXValidationRuleOptionsMap {\n fileMimeType: AXFileMimeTypeValidationRuleOptions;\n }\n}\n\n@Injectable()\nexport class AXFileMimeTypeValidationRule implements AXValidationRule {\n get name(): string {\n return 'fileMimeType';\n }\n\n async validate(\n value: File | Blob,\n options: AXFileMimeTypeValidationRuleOptions,\n ): Promise<AXValidationRuleResult> {\n const mime = (value instanceof File || value instanceof Blob ? value.type : '').trim().toLowerCase();\n const allowed = options.allowed ?? [];\n const valid =\n allowed.length === 0 ||\n allowed.some((pattern) => this.matchesMime(mime, pattern.trim().toLowerCase()));\n\n return {\n rule: this.name,\n result: valid,\n message: valid ? '' : (options.message ?? 'File type is not allowed.'),\n value: mime,\n };\n }\n\n private matchesMime(mime: string, pattern: string): boolean {\n if (!pattern || pattern === '*/*' || pattern === '*') {\n return true;\n }\n if (pattern.endsWith('/*')) {\n const category = pattern.slice(0, -2);\n return mime.startsWith(`${category}/`) || (mime === '' && category === 'application');\n }\n return mime === pattern;\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n AXValidationRule,\n AXValidationRuleOptions,\n AXValidationRuleResult,\n} from '@acorex/core/validation';\nimport { formatFileSizeBytes } from '../../format-file-size';\n\nexport interface AXFileMinSizeValidationRuleOptions extends AXValidationRuleOptions {\n /** Minimum size in bytes. */\n minSize: number;\n}\n\ndeclare module '@acorex/core/validation' {\n interface AXValidationRuleOptionsMap {\n fileMinSize: AXFileMinSizeValidationRuleOptions;\n }\n}\n\n@Injectable()\nexport class AXFileMinSizeValidationRule implements AXValidationRule {\n get name(): string {\n return 'fileMinSize';\n }\n\n async validate(\n value: File | Blob,\n options: AXFileMinSizeValidationRuleOptions,\n ): Promise<AXValidationRuleResult> {\n const size = value instanceof File || value instanceof Blob ? value.size : 0;\n const valid = size >= options.minSize;\n const limitLabel = formatFileSizeBytes(options.minSize);\n\n return {\n rule: this.name,\n result: valid,\n message: valid\n ? ''\n : (options.message ?? `File is too small. Minimum size is ${limitLabel}.`),\n value: size,\n minSize: options.minSize,\n };\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n AXValidationRule,\n AXValidationRuleOptions,\n AXValidationRuleResult,\n} from '@acorex/core/validation';\nimport { formatFileSizeBytes } from '../../format-file-size';\n\nexport interface AXFileMaxSizeValidationRuleOptions extends AXValidationRuleOptions {\n /** Maximum size in bytes. */\n maxSize: number;\n}\n\ndeclare module '@acorex/core/validation' {\n interface AXValidationRuleOptionsMap {\n fileMaxSize: AXFileMaxSizeValidationRuleOptions;\n }\n}\n\n@Injectable()\nexport class AXFileMaxSizeValidationRule implements AXValidationRule {\n get name(): string {\n return 'fileMaxSize';\n }\n\n async validate(\n value: File | Blob,\n options: AXFileMaxSizeValidationRuleOptions,\n ): Promise<AXValidationRuleResult> {\n const size = value instanceof File || value instanceof Blob ? value.size : 0;\n const valid = size <= options.maxSize;\n const limitLabel = formatFileSizeBytes(options.maxSize);\n\n return {\n rule: this.name,\n result: valid,\n message: valid\n ? ''\n : (options.message ??\n `File is too large. Maximum size is ${limitLabel}.`),\n value: size,\n maxSize: options.maxSize,\n };\n }\n}\n","export * from './file-type.models';\nexport * from './file-type.copy';\nexport * from './file-type-info-provider';\nexport * from './file-type-registry.service';\nexport * from './file-type.merge';\nexport * from './file-type.validate';\nexport * from './types.providers';\nexport * from './rules/file-mime-type.rule';\nexport * from './rules/file-min-size.rule';\nexport * from './rules/file-max-size.rule';\n\nimport { Provider } from '@angular/core';\nimport { AXValidationRegistryService } from '@acorex/core/validation';\nimport { provideBuiltinFileTypeProviders } from './types.providers';\nimport { AXFileMaxSizeValidationRule } from './rules/file-max-size.rule';\nimport { AXFileMimeTypeValidationRule } from './rules/file-mime-type.rule';\nimport { AXFileMinSizeValidationRule } from './rules/file-min-size.rule';\n\n/** Validation rule classes to register with {@link AXValidationModule}. */\nexport const AX_FILE_VALIDATION_RULES = [\n AXFileMimeTypeValidationRule,\n AXFileMinSizeValidationRule,\n AXFileMaxSizeValidationRule,\n] as const;\n\n/** Registers file validation rules with {@link AXValidationRegistryService}. */\nexport function provideFileValidationRules(): Provider {\n return {\n provide: 'AXValidationModuleFactory',\n useFactory: (registry: AXValidationRegistryService) => () => {\n registry.register(...AX_FILE_VALIDATION_RULES);\n },\n deps: [AXValidationRegistryService],\n multi: true,\n };\n}\n\n/** Registers built-in image / video / audio / file / document type providers. */\nexport { provideBuiltinFileTypeProviders, provideDefaultFileTypeProviders } from './types.providers';\n\n/**\n * Registers validation rules and optional built-in file type providers.\n * {@link AXFileTypeRegistryService} and {@link AXFileService} are `providedIn: 'root'`.\n */\nexport function provideFileTypeSystem(): Provider[] {\n return [provideFileValidationRules(), ...provideBuiltinFileTypeProviders()];\n}\n","import { AXFormatModule } from '@acorex/core/format';\nimport { AXValidationModule } from '@acorex/core/validation';\nimport { ModuleWithProviders, NgModule, Provider } from '@angular/core';\nimport { AXFileSizeFormatter } from './file-size-formatter';\nimport {\n AX_FILE_VALIDATION_RULES,\n provideDefaultFileTypeProviders,\n provideFileValidationRules,\n} from './file-type';\n\nexport interface AXFileModuleConfig {\n fileTypeProviders?: Provider[];\n includeDefaultFileTypes?: boolean;\n}\n\n@NgModule({\n imports: [\n AXFormatModule.forChild({ formatters: [AXFileSizeFormatter] }),\n AXValidationModule.forChild({ rules: [...AX_FILE_VALIDATION_RULES] }),\n ],\n providers: [AXFileSizeFormatter],\n})\nexport class AXFileModule {\n static forRoot(config?: AXFileModuleConfig): ModuleWithProviders<AXFileModule> {\n const includeDefaults = config?.includeDefaultFileTypes !== false;\n\n return {\n ngModule: AXFileModule,\n providers: [\n provideFileValidationRules(),\n ...(includeDefaults ? provideDefaultFileTypeProviders() : []),\n ...(config?.fileTypeProviders ?? []),\n ],\n };\n }\n\n static forChild(config?: AXFileModuleConfig): ModuleWithProviders<AXFileModule> {\n return AXFileModule.forRoot(config);\n }\n}\n","import type { AXValidationRuleResult } from '@acorex/core/validation';\nimport { DOCUMENT, inject, Injectable, isDevMode } from '@angular/core';\nimport { AXFileTypeRegistryService } from './file-type/file-type-registry.service';\nimport type { AXFileType } from './file-type/file-type.models';\n\nexport interface AXFileChooseOptions {\n /** Logical type name(s) from {@link AXFileTypeRegistryService}. When set, files are validated against the catalog. */\n fileType?: string | string[];\n accept?: string;\n multiple?: boolean;\n}\n\n@Injectable({ providedIn: 'root' })\nexport class AXFileService {\n private readonly document = inject(DOCUMENT);\n private readonly fileTypes = inject(AXFileTypeRegistryService);\n\n async getFileTypes(): Promise<AXFileType[]> {\n return this.fileTypes.getTypes();\n }\n\n async getFileType(name: string): Promise<AXFileType | undefined> {\n return this.fileTypes.get(name);\n }\n\n async getAcceptAttribute(fileType?: string | string[]): Promise<string> {\n return this.fileTypes.accept(fileType);\n }\n\n async matchFileType(file: File): Promise<AXFileType | undefined> {\n return this.fileTypes.matchType(file);\n }\n\n validate(file: File, fileType: string | string[]): Promise<AXValidationRuleResult[]> {\n return this.fileTypes.validateAgainstTypes(file, fileType);\n }\n\n validateMany(\n files: File[],\n fileType: string | string[],\n ): Promise<{ accepted: File[]; rejected: { file: File; errors: AXValidationRuleResult[] }[] }> {\n return this.fileTypes.validateMany(files, fileType);\n }\n\n /**\n * Opens a file selection dialog.\n * With `fileType`, returns files that pass catalog validation (`accept` defaults from the catalog).\n * Without `fileType`, returns all selected files (legacy `accept` / `multiple` only).\n */\n async chooseValidated(\n options: AXFileChooseOptions,\n ): Promise<{ accepted: File[]; rejected: { file: File; errors: AXValidationRuleResult[] }[] }> {\n const resolved = await this.resolveChooseOptions(options);\n const files = await this.openFileDialog(resolved);\n\n if (files.length === 0) {\n return { accepted: [], rejected: [] };\n }\n\n if (options.fileType) {\n return this.validateMany(files, options.fileType);\n }\n\n return { accepted: files, rejected: [] };\n }\n\n async choose(options: AXFileChooseOptions): Promise<File[]> {\n const { accepted } = await this.chooseValidated(options);\n return accepted;\n }\n\n blobToBase64(blob: Blob): Promise<string> {\n if (!(blob instanceof Blob)) {\n return Promise.reject(new Error('input is not blob'));\n }\n return new Promise<string>((resolve, reject) => {\n const reader = new FileReader();\n reader.onerror = () => reject(reader.error);\n reader.onload = () => resolve(reader.result as string);\n reader.readAsDataURL(blob);\n });\n }\n\n getSize(file: File | Blob | string): number | false {\n if (this.isBase64(file as string)) {\n return this.getBase64Size(file as string);\n }\n return false;\n }\n\n isBase64(base64: string): boolean {\n const regx = /[^:]\\w+\\/[\\w-+\\d.]+(?=;|,)/;\n return regx.test(base64);\n }\n\n getBase64Size(base64: string): number {\n return atob(base64.substring(base64.indexOf(',') + 1)).length;\n }\n\n private async resolveChooseOptions(\n options: AXFileChooseOptions,\n ): Promise<{ accept: string; multiple: boolean }> {\n const multiple = options.multiple ?? false;\n\n if (options.fileType) {\n const accept = options.accept ?? (await this.getAcceptAttribute(options.fileType));\n\n if (isDevMode() && !accept) {\n const name = Array.isArray(options.fileType) ? options.fileType.join(', ') : options.fileType;\n console.warn(\n `[AXFileService] No accept filter for file type \"${name}\". ` +\n 'Register a file type provider (e.g. provideConversationFileCatalog).',\n );\n }\n\n return { accept, multiple };\n }\n\n return { accept: options.accept ?? '', multiple };\n }\n\n private openFileDialog(options: { accept: string; multiple: boolean }): Promise<File[]> {\n return new Promise<File[]>((resolve, reject) => {\n const input: HTMLInputElement = this.document.createElement('input');\n input.style.display = 'none';\n this.document.body.appendChild(input);\n input.type = 'file';\n input.accept = options.accept;\n input.multiple = options.multiple;\n\n const cleanup = () => {\n input.removeEventListener('change', onChange);\n input.removeEventListener('error', onError);\n if (input.parentNode) {\n this.document.body.removeChild(input);\n }\n input.remove();\n };\n\n const onError = (e: Event) => {\n cleanup();\n reject(e);\n };\n\n const onChange = () => {\n const files = Array.from(input.files ?? []);\n cleanup();\n resolve(files);\n };\n\n input.addEventListener('change', onChange);\n input.addEventListener('error', onError);\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BAAA,OAAO,EAAE;gBACT,OAAO,CAAC,KAAK,CAAC;AAChB,YAAA,CAAC;AAED,YAAA,KAAK,CAAC,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,CAAC;AAC1C,YAAA,KAAK,CAAC,gBAAgB,CAAC,OAAO,EAAE,OAAO,CAAC;YACxC,KAAK,CAAC,KAAK,EAAE;AACf,QAAA,CAAC,CAAC;IACJ;8GA7IW,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAb,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,cADA,MAAM,EAAA,CAAA,CAAA;;2FACnB,aAAa,EAAA,UAAA,EAAA,CAAA;kBADzB,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACZlC;;AAEG;;;;"}
@@ -41,10 +41,10 @@ class AXFormatterRegistryService {
41
41
  }
42
42
  return formatter;
43
43
  }
44
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXFormatterRegistryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
45
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXFormatterRegistryService, providedIn: 'root' }); }
44
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXFormatterRegistryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
45
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXFormatterRegistryService, providedIn: 'root' }); }
46
46
  }
47
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXFormatterRegistryService, decorators: [{
47
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXFormatterRegistryService, decorators: [{
48
48
  type: Injectable,
49
49
  args: [{
50
50
  providedIn: 'root',
@@ -82,10 +82,10 @@ class AXFormatService {
82
82
  return new AXFormatFluent(this, this.pluginRegistry, value);
83
83
  }
84
84
  }
85
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXFormatService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
86
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXFormatService, providedIn: 'root' }); }
85
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXFormatService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
86
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXFormatService, providedIn: 'root' }); }
87
87
  }
88
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXFormatService, decorators: [{
88
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXFormatService, decorators: [{
89
89
  type: Injectable,
90
90
  args: [{ providedIn: 'root' }]
91
91
  }] });
@@ -126,10 +126,10 @@ class AXFormatterDirective {
126
126
  },
127
127
  });
128
128
  }
129
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXFormatterDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
130
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.3", type: AXFormatterDirective, isStandalone: true, selector: "[formatter]", ngImport: i0 }); }
129
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXFormatterDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
130
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: AXFormatterDirective, isStandalone: true, selector: "[formatter]", ngImport: i0 }); }
131
131
  }
132
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXFormatterDirective, decorators: [{
132
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXFormatterDirective, decorators: [{
133
133
  type: Directive,
134
134
  args: [{
135
135
  selector: '[formatter]',
@@ -177,10 +177,10 @@ class AXFormatPipe {
177
177
  // For non-periodic formatters, use the original behavior
178
178
  return systemEvents$.pipe(startWith(null), map(() => this.formatService.format(value, name, options)));
179
179
  }
180
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXFormatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
181
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.1.3", ngImport: i0, type: AXFormatPipe, isStandalone: true, name: "format" }); }
180
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXFormatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
181
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: AXFormatPipe, isStandalone: true, name: "format" }); }
182
182
  }
183
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXFormatPipe, decorators: [{
183
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXFormatPipe, decorators: [{
184
184
  type: Pipe,
185
185
  args: [{
186
186
  name: 'format',
@@ -252,10 +252,10 @@ class AXNumberFormatter {
252
252
  this.separatorsCache[locale] = { thousandSeparator, decimalSeparator };
253
253
  return this.separatorsCache[locale];
254
254
  }
255
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXNumberFormatter, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
256
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXNumberFormatter }); }
255
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXNumberFormatter, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
256
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXNumberFormatter }); }
257
257
  }
258
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXNumberFormatter, decorators: [{
258
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXNumberFormatter, decorators: [{
259
259
  type: Injectable
260
260
  }] });
261
261
 
@@ -330,11 +330,11 @@ class AXFormatModule {
330
330
  f();
331
331
  });
332
332
  }
333
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXFormatModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
334
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.1.3", ngImport: i0, type: AXFormatModule, imports: [AXFormatterDirective, AXFormatPipe], exports: [AXFormatterDirective, AXFormatPipe] }); }
335
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXFormatModule }); }
333
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXFormatModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
334
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: AXFormatModule, imports: [AXFormatterDirective, AXFormatPipe], exports: [AXFormatterDirective, AXFormatPipe] }); }
335
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXFormatModule }); }
336
336
  }
337
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXFormatModule, decorators: [{
337
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXFormatModule, decorators: [{
338
338
  type: NgModule,
339
339
  args: [{
340
340
  imports: [AXFormatterDirective, AXFormatPipe],
@@ -8,7 +8,7 @@ class AXFullScreenService {
8
8
  /**
9
9
  * Current fullscreen state
10
10
  */
11
- this.isFullscreenState = signal(false, ...(ngDevMode ? [{ debugName: "isFullscreenState" }] : []));
11
+ this.isFullscreenState = signal(false, ...(ngDevMode ? [{ debugName: "isFullscreenState" }] : /* istanbul ignore next */ []));
12
12
  /**
13
13
  * Original element styles to restore
14
14
  */
@@ -142,10 +142,10 @@ class AXFullScreenService {
142
142
  });
143
143
  this.originalStyles = {};
144
144
  }
145
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXFullScreenService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
146
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXFullScreenService, providedIn: 'root' }); }
145
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXFullScreenService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
146
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXFullScreenService, providedIn: 'root' }); }
147
147
  }
148
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXFullScreenService, decorators: [{
148
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXFullScreenService, decorators: [{
149
149
  type: Injectable,
150
150
  args: [{
151
151
  providedIn: 'root',
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-core-full-screen.mjs","sources":["../../../../packages/core/full-screen/src/lib/full-screen.service.ts","../../../../packages/core/full-screen/src/acorex-core-full-screen.ts"],"sourcesContent":["import { AXZIndexService, AXZToken } from '@acorex/core/z-index';\nimport { inject, Injectable, signal } from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AXFullScreenService {\n private readonly zIndexService = inject(AXZIndexService);\n\n /**\n * Current fullscreen state\n */\n private readonly isFullscreenState = signal<boolean>(false);\n\n /**\n * Original element styles to restore\n */\n private originalStyles: Partial<CSSStyleDeclaration> = {};\n\n /**\n * Original parent element reference\n */\n private originalParent: HTMLElement | null = null;\n\n /**\n * Fullscreen container element\n */\n private fullscreenContainer: HTMLElement | null = null;\n\n /**\n * Z-index token for this fullscreen instance\n */\n private zToken: AXZToken | null = null;\n\n /**\n * Toggle fullscreen state\n */\n toggle(element: HTMLElement): void {\n if (this.isFullscreenState()) {\n this.exit(element);\n } else {\n this.enter(element);\n }\n }\n\n /**\n * Enter fullscreen mode\n */\n enter(element: HTMLElement): void {\n if (this.isFullscreenState()) return;\n\n try {\n // Store original styles & parent\n this.storeOriginalStyles(element);\n this.originalParent = element.parentElement;\n\n // Acquire z-index token\n this.zToken = this.zIndexService.acquire();\n\n // Create fullscreen container\n const container = document.createElement('div');\n container.style.position = 'fixed';\n container.style.top = '0';\n container.style.left = '0';\n container.style.width = '100vw';\n container.style.height = '100vh';\n container.style.zIndex = String(this.zToken.zIndex);\n container.style.overflow = 'auto';\n\n // Move element into container\n container.appendChild(element);\n\n // Apply fullscreen styles to element\n element.style.position = 'relative';\n element.style.width = '100%';\n element.style.height = '100%';\n element.style.margin = '0';\n element.style.padding = '0';\n\n // Append container to body\n document.body.appendChild(container);\n\n // Prevent body scroll\n document.body.style.overflow = 'hidden';\n\n this.fullscreenContainer = container;\n this.isFullscreenState.set(true);\n } catch (error) {\n console.error('Error entering fullscreen:', error);\n this.restoreOriginalStyles(element);\n }\n }\n\n /**\n * Exit fullscreen mode\n */\n exit(element: HTMLElement): void {\n if (!this.isFullscreenState()) return;\n\n try {\n // Restore body scroll\n document.body.style.overflow = '';\n\n // Move element back to original parent\n if (this.fullscreenContainer && this.originalParent) {\n this.fullscreenContainer.removeChild(element);\n this.originalParent.appendChild(element);\n document.body.removeChild(this.fullscreenContainer);\n }\n\n this.fullscreenContainer = null;\n\n // Release z-index token\n this.zIndexService.release(this.zToken);\n this.zToken = null;\n\n // Restore original styles\n this.restoreOriginalStyles(element);\n\n this.isFullscreenState.set(false);\n } catch (error) {\n console.error('Error exiting fullscreen:', error);\n }\n }\n\n /**\n * Check fullscreen state\n */\n isFullscreen(): boolean {\n return this.isFullscreenState();\n }\n\n /**\n * Store original computed styles\n */\n private storeOriginalStyles(element: HTMLElement): void {\n const computed = window.getComputedStyle(element);\n\n this.originalStyles = {\n position: computed.position,\n top: computed.top,\n left: computed.left,\n width: computed.width,\n height: computed.height,\n zIndex: computed.zIndex,\n backgroundColor: computed.backgroundColor,\n margin: computed.margin,\n padding: computed.padding,\n };\n }\n\n /**\n * Restore original styles\n */\n private restoreOriginalStyles(element: HTMLElement): void {\n Object.entries(this.originalStyles).forEach(([key, value]) => {\n if (value) {\n (element.style as any)[key] = value;\n } else {\n (element.style as any)[key] = '';\n }\n });\n\n this.originalStyles = {};\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"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AAE,KAAK,CAAC,KAAI;YAC3D,IAAI,KAAK,EAAE;AACR,gBAAA,OAAO,CAAC,KAAa,CAAC,GAAG,CAAC,GAAG,KAAK;YACrC;iBAAO;AACJ,gBAAA,OAAO,CAAC,KAAa,CAAC,GAAG,CAAC,GAAG,EAAE;YAClC;AACF,QAAA,CAAC,CAAC;AAEF,QAAA,IAAI,CAAC,cAAc,GAAG,EAAE;IAC1B;8GA9JW,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAnB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,cAFlB,MAAM,EAAA,CAAA,CAAA;;2FAEP,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAH/B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACLD;;AAEG;;;;"}
1
+ {"version":3,"file":"acorex-core-full-screen.mjs","sources":["../../../../packages/core/full-screen/src/lib/full-screen.service.ts","../../../../packages/core/full-screen/src/acorex-core-full-screen.ts"],"sourcesContent":["import { AXZIndexService, AXZToken } from '@acorex/core/z-index';\nimport { inject, Injectable, signal } from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AXFullScreenService {\n private readonly zIndexService = inject(AXZIndexService);\n\n /**\n * Current fullscreen state\n */\n private readonly isFullscreenState = signal<boolean>(false);\n\n /**\n * Original element styles to restore\n */\n private originalStyles: Partial<CSSStyleDeclaration> = {};\n\n /**\n * Original parent element reference\n */\n private originalParent: HTMLElement | null = null;\n\n /**\n * Fullscreen container element\n */\n private fullscreenContainer: HTMLElement | null = null;\n\n /**\n * Z-index token for this fullscreen instance\n */\n private zToken: AXZToken | null = null;\n\n /**\n * Toggle fullscreen state\n */\n toggle(element: HTMLElement): void {\n if (this.isFullscreenState()) {\n this.exit(element);\n } else {\n this.enter(element);\n }\n }\n\n /**\n * Enter fullscreen mode\n */\n enter(element: HTMLElement): void {\n if (this.isFullscreenState()) return;\n\n try {\n // Store original styles & parent\n this.storeOriginalStyles(element);\n this.originalParent = element.parentElement;\n\n // Acquire z-index token\n this.zToken = this.zIndexService.acquire();\n\n // Create fullscreen container\n const container = document.createElement('div');\n container.style.position = 'fixed';\n container.style.top = '0';\n container.style.left = '0';\n container.style.width = '100vw';\n container.style.height = '100vh';\n container.style.zIndex = String(this.zToken.zIndex);\n container.style.overflow = 'auto';\n\n // Move element into container\n container.appendChild(element);\n\n // Apply fullscreen styles to element\n element.style.position = 'relative';\n element.style.width = '100%';\n element.style.height = '100%';\n element.style.margin = '0';\n element.style.padding = '0';\n\n // Append container to body\n document.body.appendChild(container);\n\n // Prevent body scroll\n document.body.style.overflow = 'hidden';\n\n this.fullscreenContainer = container;\n this.isFullscreenState.set(true);\n } catch (error) {\n console.error('Error entering fullscreen:', error);\n this.restoreOriginalStyles(element);\n }\n }\n\n /**\n * Exit fullscreen mode\n */\n exit(element: HTMLElement): void {\n if (!this.isFullscreenState()) return;\n\n try {\n // Restore body scroll\n document.body.style.overflow = '';\n\n // Move element back to original parent\n if (this.fullscreenContainer && this.originalParent) {\n this.fullscreenContainer.removeChild(element);\n this.originalParent.appendChild(element);\n document.body.removeChild(this.fullscreenContainer);\n }\n\n this.fullscreenContainer = null;\n\n // Release z-index token\n this.zIndexService.release(this.zToken);\n this.zToken = null;\n\n // Restore original styles\n this.restoreOriginalStyles(element);\n\n this.isFullscreenState.set(false);\n } catch (error) {\n console.error('Error exiting fullscreen:', error);\n }\n }\n\n /**\n * Check fullscreen state\n */\n isFullscreen(): boolean {\n return this.isFullscreenState();\n }\n\n /**\n * Store original computed styles\n */\n private storeOriginalStyles(element: HTMLElement): void {\n const computed = window.getComputedStyle(element);\n\n this.originalStyles = {\n position: computed.position,\n top: computed.top,\n left: computed.left,\n width: computed.width,\n height: computed.height,\n zIndex: computed.zIndex,\n backgroundColor: computed.backgroundColor,\n margin: computed.margin,\n padding: computed.padding,\n };\n }\n\n /**\n * Restore original styles\n */\n private restoreOriginalStyles(element: HTMLElement): void {\n Object.entries(this.originalStyles).forEach(([key, value]) => {\n if (value) {\n (element.style as any)[key] = value;\n } else {\n (element.style as any)[key] = '';\n }\n });\n\n this.originalStyles = {};\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAMa,mBAAmB,CAAA;AAHhC,IAAA,WAAA,GAAA;AAImB,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,eAAe,CAAC;AAExD;;AAEG;AACc,QAAA,IAAA,CAAA,iBAAiB,GAAG,MAAM,CAAU,KAAK,wFAAC;AAE3D;;AAEG;QACK,IAAA,CAAA,cAAc,GAAiC,EAAE;AAEzD;;AAEG;QACK,IAAA,CAAA,cAAc,GAAuB,IAAI;AAEjD;;AAEG;QACK,IAAA,CAAA,mBAAmB,GAAuB,IAAI;AAEtD;;AAEG;QACK,IAAA,CAAA,MAAM,GAAoB,IAAI;AAqIvC,IAAA;AAnIC;;AAEG;AACH,IAAA,MAAM,CAAC,OAAoB,EAAA;AACzB,QAAA,IAAI,IAAI,CAAC,iBAAiB,EAAE,EAAE;AAC5B,YAAA,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;QACpB;aAAO;AACL,YAAA,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC;QACrB;IACF;AAEA;;AAEG;AACH,IAAA,KAAK,CAAC,OAAoB,EAAA;QACxB,IAAI,IAAI,CAAC,iBAAiB,EAAE;YAAE;AAE9B,QAAA,IAAI;;AAEF,YAAA,IAAI,CAAC,mBAAmB,CAAC,OAAO,CAAC;AACjC,YAAA,IAAI,CAAC,cAAc,GAAG,OAAO,CAAC,aAAa;;YAG3C,IAAI,CAAC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,KAAK;YACrB,MAAM,EAAE,QAAQ,CAAC,MAAM;YACvB,MAAM,EAAE,QAAQ,CAAC,MAAM;YACvB,eAAe,EAAE,QAAQ,CAAC,eAAe;YACzC,MAAM,EAAE,QAAQ,CAAC,MAAM;YACvB,OAAO,EAAE,QAAQ,CAAC,OAAO;SAC1B;IACH;AAEA;;AAEG;AACK,IAAA,qBAAqB,CAAC,OAAoB,EAAA;AAChD,QAAA,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,KAAI;YAC3D,IAAI,KAAK,EAAE;AACR,gBAAA,OAAO,CAAC,KAAa,CAAC,GAAG,CAAC,GAAG,KAAK;YACrC;iBAAO;AACJ,gBAAA,OAAO,CAAC,KAAa,CAAC,GAAG,CAAC,GAAG,EAAE;YAClC;AACF,QAAA,CAAC,CAAC;AAEF,QAAA,IAAI,CAAC,cAAc,GAAG,EAAE;IAC1B;8GA9JW,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAnB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,cAFlB,MAAM,EAAA,CAAA,CAAA;;2FAEP,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAH/B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACLD;;AAEG;;;;"}
@@ -35,10 +35,10 @@ class AXIconResolverService {
35
35
  }
36
36
  throw new Error(`AXIconResolverService: Could not resolve icon "${icon}"`);
37
37
  }
38
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXIconResolverService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
39
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXIconResolverService, providedIn: 'root' }); }
38
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXIconResolverService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
39
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXIconResolverService, providedIn: 'root' }); }
40
40
  }
41
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXIconResolverService, decorators: [{
41
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXIconResolverService, decorators: [{
42
42
  type: Injectable,
43
43
  args: [{ providedIn: 'root' }]
44
44
  }] });
@@ -47,10 +47,10 @@ class AXImageService {
47
47
  canvas.getContext('2d').drawImage(image, 0, 0, width, height);
48
48
  return new Promise((resolve) => canvas.toBlob(resolve, options.type, options.quality));
49
49
  }
50
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXImageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
51
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXImageService }); }
50
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXImageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
51
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXImageService }); }
52
52
  }
53
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXImageService, decorators: [{
53
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXImageService, decorators: [{
54
54
  type: Injectable
55
55
  }] });
56
56
 
@@ -1,7 +1,8 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, inject, Injectable, NgModule, signal } from '@angular/core';
2
+ import { InjectionToken, inject, Injectable, NgModule, PLATFORM_ID, signal, computed } from '@angular/core';
3
3
  import * as i1 from '@acorex/core/format';
4
4
  import { AXFormatModule } from '@acorex/core/format';
5
+ import { isPlatformBrowser, DOCUMENT } from '@angular/common';
5
6
  import { toObservable } from '@angular/core/rxjs-interop';
6
7
  import { cloneDeep, set, merge } from 'lodash-es';
7
8
 
@@ -112,10 +113,10 @@ class AXLocaleProfileProviderService {
112
113
  has(localeCode) {
113
114
  return this.registry.has(localeCode);
114
115
  }
115
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXLocaleProfileProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
116
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXLocaleProfileProviderService, providedIn: 'root' }); }
116
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXLocaleProfileProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
117
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXLocaleProfileProviderService, providedIn: 'root' }); }
117
118
  }
118
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXLocaleProfileProviderService, decorators: [{
119
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXLocaleProfileProviderService, decorators: [{
119
120
  type: Injectable,
120
121
  args: [{
121
122
  providedIn: 'root',
@@ -132,13 +133,13 @@ const AX_LOCALE_CONFIG = new InjectionToken('AX_LOCALE_CONFIG', {
132
133
  });
133
134
 
134
135
  class AXLocaleModule {
135
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXLocaleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
136
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.1.3", ngImport: i0, type: AXLocaleModule, imports: [i1.AXFormatModule] }); }
137
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXLocaleModule, imports: [AXFormatModule.forChild({
136
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXLocaleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
137
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: AXLocaleModule, imports: [i1.AXFormatModule] }); }
138
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXLocaleModule, imports: [AXFormatModule.forChild({
138
139
  formatters: [],
139
140
  })] }); }
140
141
  }
141
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXLocaleModule, decorators: [{
142
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXLocaleModule, decorators: [{
142
143
  type: NgModule,
143
144
  args: [{
144
145
  imports: [
@@ -228,21 +229,35 @@ class AXLocaleService {
228
229
  if (profile) {
229
230
  this.originalProfile = cloneDeep(profile);
230
231
  this._activeProfile.set(cloneDeep(profile));
232
+ this.applyDocumentDirection(profile);
231
233
  }
232
234
  else {
233
235
  console.warn(`[AXLocaleService] Locale not found: ${localeCode}`);
234
236
  }
235
237
  }
238
+ applyDocumentDirection(profile) {
239
+ if (!isPlatformBrowser(this.platformId)) {
240
+ return;
241
+ }
242
+ const isRtl = !!profile.i18nMeta?.rtl;
243
+ this.document.documentElement.setAttribute('dir', isRtl ? 'rtl' : 'ltr');
244
+ this.document.documentElement.setAttribute('lang', profile.localeInfo.language);
245
+ }
236
246
  /**
237
247
  *
238
248
  */
239
249
  constructor() {
240
250
  this.provider = inject(AXLocaleProfileProviderService);
241
251
  this.config = inject(AX_LOCALE_CONFIG);
242
- this._activeProfile = signal(AXUSLocaleProfile, ...(ngDevMode ? [{ debugName: "_activeProfile" }] : []));
252
+ this.document = inject(DOCUMENT);
253
+ this.platformId = inject(PLATFORM_ID);
254
+ this._activeProfile = signal(AXUSLocaleProfile, ...(ngDevMode ? [{ debugName: "_activeProfile" }] : /* istanbul ignore next */ []));
243
255
  this.activeProfile = this._activeProfile.asReadonly();
256
+ /** Whether the active locale uses right-to-left layout. */
257
+ this.isRtl = computed(() => !!this._activeProfile()?.i18nMeta?.rtl, ...(ngDevMode ? [{ debugName: "isRtl" }] : /* istanbul ignore next */ []));
244
258
  this.profileChanged$ = toObservable(this._activeProfile);
245
259
  this.originalProfile = cloneDeep(AXUSLocaleProfile);
260
+ this.applyDocumentDirection(this._activeProfile());
246
261
  this.setProfile(this.config.default);
247
262
  }
248
263
  apply(arg1, arg2) {
@@ -272,13 +287,15 @@ class AXLocaleService {
272
287
  */
273
288
  reset() {
274
289
  if (this.originalProfile) {
275
- this._activeProfile.set(cloneDeep(this.originalProfile));
290
+ const profile = cloneDeep(this.originalProfile);
291
+ this._activeProfile.set(profile);
292
+ this.applyDocumentDirection(profile);
276
293
  }
277
294
  }
278
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXLocaleService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
279
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXLocaleService, providedIn: 'root' }); }
295
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXLocaleService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
296
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXLocaleService, providedIn: 'root' }); }
280
297
  }
281
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXLocaleService, decorators: [{
298
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXLocaleService, decorators: [{
282
299
  type: Injectable,
283
300
  args: [{
284
301
  providedIn: 'root',
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-core-locale.mjs","sources":["../../../../packages/core/locale/src/lib/formatters/currency.formatter.ts","../../../../packages/core/locale/src/lib/locale-profile-provider.service.ts","../../../../packages/core/locale/src/lib/locale.config.ts","../../../../packages/core/locale/src/lib/locale.module.ts","../../../../packages/core/locale/src/lib/profiles/en-US.profile.ts","../../../../packages/core/locale/src/lib/locale.service.ts","../../../../packages/core/locale/src/lib/profiles/fa-IR.profile.ts","../../../../packages/core/locale/src/lib/profiles/en-AU.profile.ts","../../../../packages/core/locale/src/acorex-core-locale.ts"],"sourcesContent":["import { AXFormatOptions } from '@acorex/core/format';\n\nexport interface AXCurrencyFormatterOptions extends AXFormatOptions {\n locale?: string;\n currency?: string;\n}\n\ndeclare module '@acorex/core/format' {\n interface AXFormatOptionsMap {\n currency: AXCurrencyFormatterOptions;\n }\n}\n\n// @Injectable()\n// export class AXCurrencyFormatter implements AXFormatter {\n\n// get name(): string {\n// return 'currency';\n// }\n\n// format(value: number, options: AXCurrencyFormatterOptions): string {\n// return value.toLocaleString(options.locale, { style: 'currency', currency: options.currency });\n// }\n// }\n","import { inject, Injectable, InjectionToken } from '@angular/core';\nimport { AXLocaleProfile } from './locale.types';\n\n// Record of locale code → loader function (returns profile or Promise<profile>)\nexport type AXLocaleProfileProviderResult = Record<string, () => Promise<AXLocaleProfile> | AXLocaleProfile>;\n\nexport interface AXLocaleProfileProvider {\n provide(): Promise<AXLocaleProfileProviderResult>;\n}\n\nexport const AX_LOCALE_PROFILE_PROVIDERS = new InjectionToken<AXLocaleProfileProvider[]>(\n 'AX_LOCALE_PROFILE_PROVIDERS',\n {\n providedIn: 'root',\n factory: () => [new AXLocaleProfileProviderDefault()],\n },\n);\n\n// ✅ Lazy-loaded default provider\nexport class AXLocaleProfileProviderDefault implements AXLocaleProfileProvider {\n async provide(): Promise<AXLocaleProfileProviderResult> {\n return {\n 'en-AU': () => import('./profiles/en-AU.profile').then((m) => m.AXAULocaleProfile),\n 'en-US': () => import('./profiles/en-US.profile').then((m) => m.AXUSLocaleProfile),\n 'fa-IR': () => import('./profiles/fa-IR.profile').then((m) => m.AXIRLocaleProfile),\n };\n }\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AXLocaleProfileProviderService {\n private providers: AXLocaleProfileProvider[] = inject(AX_LOCALE_PROFILE_PROVIDERS);\n\n private registry = new Map<string, () => Promise<AXLocaleProfile>>();\n private resolvedCache = new Map<string, AXLocaleProfile>();\n private isInitialized = false;\n\n private async init(): Promise<void> {\n if (this.isInitialized) return;\n\n for (const provider of this.providers) {\n const result: AXLocaleProfileProviderResult = await provider.provide();\n\n for (const [localeCode, loaderFn] of Object.entries(result)) {\n if (typeof loaderFn === 'function') {\n this.registry.set(localeCode, async () => {\n const profile = await loaderFn();\n return profile;\n });\n } else {\n console.warn(`[AXLocaleService] Profile for \"${localeCode}\" is not a function. Skipped.`);\n }\n }\n }\n\n this.isInitialized = true;\n }\n\n /**\n * Returns all available locale profiles by loading each registered provider.\n *\n * @returns Promise<AXLocaleProfile[]>\n */\n\n public async getList(): Promise<AXLocaleProfile[]> {\n await this.init();\n\n const profiles: AXLocaleProfile[] = [];\n\n for (const localeCode of this.registry.keys()) {\n const profile = await this.getByLocale(localeCode);\n if (profile) profiles.push(profile);\n }\n\n return profiles;\n }\n\n /**\n * Loads or returns from cache the locale profile associated with the given code.\n *\n * @param localeCode - The locale code to resolve.\n * @returns Promise<AXLocaleProfile | undefined>\n */\n\n public async getByLocale(localeCode: string): Promise<AXLocaleProfile | undefined> {\n await this.init();\n\n // If already loaded, return from cache\n if (this.resolvedCache.has(localeCode)) {\n return this.resolvedCache.get(localeCode);\n }\n\n // Otherwise, try to load it\n const loader = this.registry.get(localeCode);\n if (!loader) {\n console.warn(`[AXLocaleService] No profile loader found for locale: \"${localeCode}\"`);\n return undefined;\n }\n\n const profile = await loader();\n this.resolvedCache.set(localeCode, profile);\n return profile;\n }\n\n /**\n * Clears caches and reloads all providers.\n *\n * @returns Promise<void>\n */\n\n public async reload(): Promise<void> {\n this.registry.clear();\n this.resolvedCache.clear();\n this.isInitialized = false;\n await this.init();\n }\n\n /**\n * Indicates whether a loader has been registered for the given locale code.\n *\n * @param localeCode - The locale code to check.\n * @returns boolean - True if a loader exists.\n */\n\n public has(localeCode: string): boolean {\n return this.registry.has(localeCode);\n }\n}\n","import { InjectionToken } from '@angular/core';\n\nexport interface AXLocaleConfig {\n default: string;\n}\n\nexport const AX_LOCALE_CONFIG = new InjectionToken<AXLocaleConfig>('AX_LOCALE_CONFIG', {\n providedIn: 'root',\n factory: () => {\n return {\n default: 'en-US',\n };\n },\n});\n","import { AXFormatModule } from '@acorex/core/format';\nimport { NgModule } from '@angular/core';\n\n@NgModule({\n imports: [\n AXFormatModule.forChild({\n formatters: [],\n }),\n ],\n})\nexport class AXLocaleModule {}\n","import { AXLocaleProfile } from '../locale.types';\n\nexport const AXUSLocaleProfile: AXLocaleProfile = {\n localeInfo: {\n code: 'en-US',\n language: 'en',\n region: 'US',\n timezone: 'America/New_York',\n },\n calendar: {\n system: 'gregorian',\n week: {\n startsOn: 0, // Sunday\n weekends: [0, 6], // Sunday + Saturday\n },\n clock: {\n format24Hour: false,\n },\n },\n formats: {\n date: {\n short: 'MM/DD/YY',\n medium: 'MM/DD/YYYY',\n long: 'MMMM DD, YYYY',\n full: 'dddd, MMMM DD, YYYY',\n },\n time: {\n short: 'hh:mm A',\n medium: 'hh:mm:ss A',\n long: 'hh:mm:ss A Z',\n full: 'hh:mm:ss A ZZZZ',\n },\n datetime: {\n short: 'MM/DD/YY hh:mm A',\n medium: 'MM/DD/YYYY hh:mm:ss A',\n long: 'MMMM DD, YYYY hh:mm:ss A Z',\n full: 'dddd, MMMM DD, YYYY hh:mm:ss A ZZZZ',\n },\n numbers: {\n decimalPattern: '1,000.00',\n currency: {\n code: 'USD',\n },\n },\n contacts: {\n phone: '(000) 000-0000',\n postalCode: '00000',\n },\n },\n units: {\n temperature: 'fahrenheit',\n distance: 'miles',\n weight: 'pounds',\n volume: 'gallons',\n speed: 'mph',\n area: 'square-feet',\n },\n i18nMeta: {\n rtl: false,\n fallbackLocales: ['en-US'],\n supportedLanguages: ['en-US'],\n },\n};\n","import { Injectable, inject, signal } from '@angular/core';\nimport { AXLocaleProfileProviderService } from './locale-profile-provider.service';\nimport { AXLocaleProfile } from './locale.types';\n\nimport { toObservable } from '@angular/core/rxjs-interop';\nimport { cloneDeep, merge, set } from 'lodash-es';\nimport { AX_LOCALE_CONFIG } from './locale.config';\nimport { AXUSLocaleProfile } from './profiles/en-US.profile';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AXLocaleService {\n private provider = inject(AXLocaleProfileProviderService);\n private config = inject(AX_LOCALE_CONFIG);\n\n private _activeProfile = signal<AXLocaleProfile>(AXUSLocaleProfile);\n public activeProfile = this._activeProfile.asReadonly();\n\n public profileChanged$ = toObservable(this._activeProfile);\n\n private originalProfile: AXLocaleProfile = cloneDeep(AXUSLocaleProfile);\n\n /**\n * Loads and activates a locale profile by its code (e.g., 'en-US', 'fa-IR').\n *\n * @param localeCode - Locale identifier to load.\n * @returns Promise<void> - Resolves when the profile is loaded and activated.\n */\n\n public async setProfile(localeCode: string): Promise<void> {\n const profile = await this.provider.getByLocale(localeCode);\n if (profile) {\n this.originalProfile = cloneDeep(profile);\n this._activeProfile.set(cloneDeep(profile));\n } else {\n console.warn(`[AXLocaleService] Locale not found: ${localeCode}`);\n }\n }\n\n /**\n *\n */\n constructor() {\n this.setProfile(this.config.default);\n }\n\n /**\n * Applies overrides to the active profile using a deep-merge object.\n *\n * @param profile - Partial profile object whose properties override the active profile.\n * @returns void\n */\n\n public apply(profile: Partial<AXLocaleProfile>): void;\n\n /**\n * Applies a single value override at the given path (dot notation).\n *\n * @param path - Dot-notated path (e.g., 'formats.date.short').\n * @param value - The value to set at the path.\n * @returns void\n */\n\n public apply(path: string, value: any): void;\n\n public apply(arg1: any, arg2?: any): void {\n const current = this.activeProfile();\n if (!current) {\n console.warn('[AXLocaleService] No active profile found');\n return;\n }\n\n const updated = cloneDeep(current);\n\n if (typeof arg1 === 'string' && arg2 !== undefined) {\n // Overload: updateProfile('formats.date.full', 'YYYY-MM-DD')\n set(updated, arg1, arg2);\n } else if (typeof arg1 === 'object') {\n // Overload: updateProfile({ formats: { date: { short: '...' } } })\n merge(updated, arg1);\n } else {\n console.warn('[AXLocaleService] Invalid arguments passed to updateProfile()');\n return;\n }\n }\n\n /**\n * Resets the active profile to its original loaded state (clears overrides).\n *\n * @returns void\n */\n\n public reset(): void {\n if (this.originalProfile) {\n this._activeProfile.set(cloneDeep(this.originalProfile));\n }\n }\n}\n","import { AXLocaleProfile } from '../locale.types';\n\nexport const AXIRLocaleProfile: AXLocaleProfile = {\n localeInfo: {\n code: 'fa-IR',\n language: 'fa',\n region: 'IR',\n timezone: 'Asia/Tehran',\n },\n calendar: {\n system: 'solar-hijri',\n week: {\n startsOn: 6, // Saturday\n weekends: [5], // Friday\n },\n clock: {\n format24Hour: true,\n },\n },\n formats: {\n date: {\n short: 'YY/MM/DD',\n medium: 'YYYY/MM/DD',\n long: 'dddd، D MMMM YYYY',\n full: 'dddd، D MMMM YYYY',\n },\n time: {\n short: 'HH:mm',\n medium: 'HH:mm:ss',\n long: 'HH:mm:ss Z',\n full: 'HH:mm:ss ZZZZ',\n },\n datetime: {\n short: 'YY/MM/DD HH:mm',\n medium: 'YYYY/MM/DD HH:mm:ss',\n long: 'dddd، D MMMM YYYY HH:mm:ss Z',\n full: 'dddd، D MMMM YYYY HH:mm:ss ZZZZ',\n },\n numbers: {\n decimalPattern: '1٬000٫00',\n currency: {\n code: 'IRR',\n },\n },\n contacts: {\n phone: '09XX XXX XXXX',\n postalCode: 'XXXXX-XXXXX',\n },\n },\n units: {\n temperature: 'celsius',\n distance: 'kilometers',\n weight: 'kilograms',\n volume: 'liters',\n speed: 'kmh',\n area: 'square-meters',\n },\n i18nMeta: {\n rtl: true,\n fallbackLocales: ['en-US'],\n supportedLanguages: ['fa-IR', 'en-US'],\n },\n};\n","import { AXLocaleProfile } from '../locale.types';\n\nexport const AXAULocaleProfile: AXLocaleProfile = {\n localeInfo: {\n code: 'en-AU',\n language: 'en',\n region: 'AU',\n timezone: 'Australia/Sydney',\n },\n calendar: {\n system: 'gregorian',\n week: {\n startsOn: 1, // Monday\n weekends: [0, 6], // Sunday + Saturday\n },\n clock: {\n format24Hour: true,\n },\n },\n formats: {\n date: {\n short: 'DD/MM/YY',\n medium: 'DD/MM/YYYY',\n long: 'DD MMMM YYYY',\n full: 'dddd, DD MMMM YYYY',\n },\n time: {\n short: 'HH:mm',\n medium: 'HH:mm:ss',\n long: 'HH:mm:ss Z',\n full: 'HH:mm:ss ZZZZ',\n },\n datetime: {\n short: 'DD/MM/YY HH:mm',\n medium: 'DD/MM/YYYY HH:mm:ss',\n long: 'DD MMMM YYYY HH:mm:ss Z',\n full: 'dddd, DD MMMM YYYY HH:mm:ss ZZZZ',\n },\n numbers: {\n decimalPattern: '1,000.00',\n currency: {\n code: 'AUD',\n },\n },\n contacts: {\n phone: '04XX XXX XXX',\n postalCode: '0000',\n },\n },\n\n units: {\n temperature: 'celsius',\n distance: 'kilometers',\n weight: 'kilograms',\n volume: 'liters',\n speed: 'kmh',\n area: 'square-meters',\n },\n\n i18nMeta: {\n rtl: false,\n fallbackLocales: ['en-US'],\n supportedLanguages: ['en-AU'],\n },\n};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAaA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;;MCba,2BAA2B,GAAG,IAAI,cAAc,CAC3D,6BAA6B,EAC7B;AACE,IAAA,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,MAAM,CAAC,IAAI,8BAA8B,EAAE,CAAC;AACtD,CAAA;AAGH;MACa,8BAA8B,CAAA;AACzC,IAAA,MAAM,OAAO,GAAA;QACX,OAAO;AACL,YAAA,OAAO,EAAE,MAAM,4DAAkC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,iBAAiB,CAAC;AAClF,YAAA,OAAO,EAAE,MAAM,4DAAkC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,iBAAiB,CAAC;AAClF,YAAA,OAAO,EAAE,MAAM,4DAAkC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,iBAAiB,CAAC;SACnF;IACH;AACD;MAKY,8BAA8B,CAAA;AAH3C,IAAA,WAAA,GAAA;AAIU,QAAA,IAAA,CAAA,SAAS,GAA8B,MAAM,CAAC,2BAA2B,CAAC;AAE1E,QAAA,IAAA,CAAA,QAAQ,GAAG,IAAI,GAAG,EAA0C;AAC5D,QAAA,IAAA,CAAA,aAAa,GAAG,IAAI,GAAG,EAA2B;QAClD,IAAA,CAAA,aAAa,GAAG,KAAK;AA4F9B,IAAA;AA1FS,IAAA,MAAM,IAAI,GAAA;QAChB,IAAI,IAAI,CAAC,aAAa;YAAE;AAExB,QAAA,KAAK,MAAM,QAAQ,IAAI,IAAI,CAAC,SAAS,EAAE;AACrC,YAAA,MAAM,MAAM,GAAkC,MAAM,QAAQ,CAA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-core-locale.mjs","sources":["../../../../packages/core/locale/src/lib/formatters/currency.formatter.ts","../../../../packages/core/locale/src/lib/locale-profile-provider.service.ts","../../../../packages/core/locale/src/lib/locale.config.ts","../../../../packages/core/locale/src/lib/locale.module.ts","../../../../packages/core/locale/src/lib/profiles/en-US.profile.ts","../../../../packages/core/locale/src/lib/locale.service.ts","../../../../packages/core/locale/src/lib/profiles/fa-IR.profile.ts","../../../../packages/core/locale/src/lib/profiles/en-AU.profile.ts","../../../../packages/core/locale/src/acorex-core-locale.ts"],"sourcesContent":["import { AXFormatOptions } from '@acorex/core/format';\n\nexport interface AXCurrencyFormatterOptions extends AXFormatOptions {\n locale?: string;\n currency?: string;\n}\n\ndeclare module '@acorex/core/format' {\n interface AXFormatOptionsMap {\n currency: AXCurrencyFormatterOptions;\n }\n}\n\n// @Injectable()\n// export class AXCurrencyFormatter implements AXFormatter {\n\n// get name(): string {\n// return 'currency';\n// }\n\n// format(value: number, options: AXCurrencyFormatterOptions): string {\n// return value.toLocaleString(options.locale, { style: 'currency', currency: options.currency });\n// }\n// }\n","import { inject, Injectable, InjectionToken } from '@angular/core';\nimport { AXLocaleProfile } from './locale.types';\n\n// Record of locale code → loader function (returns profile or Promise<profile>)\nexport type AXLocaleProfileProviderResult = Record<string, () => Promise<AXLocaleProfile> | AXLocaleProfile>;\n\nexport interface AXLocaleProfileProvider {\n provide(): Promise<AXLocaleProfileProviderResult>;\n}\n\nexport const AX_LOCALE_PROFILE_PROVIDERS = new InjectionToken<AXLocaleProfileProvider[]>(\n 'AX_LOCALE_PROFILE_PROVIDERS',\n {\n providedIn: 'root',\n factory: () => [new AXLocaleProfileProviderDefault()],\n },\n);\n\n// ✅ Lazy-loaded default provider\nexport class AXLocaleProfileProviderDefault implements AXLocaleProfileProvider {\n async provide(): Promise<AXLocaleProfileProviderResult> {\n return {\n 'en-AU': () => import('./profiles/en-AU.profile').then((m) => m.AXAULocaleProfile),\n 'en-US': () => import('./profiles/en-US.profile').then((m) => m.AXUSLocaleProfile),\n 'fa-IR': () => import('./profiles/fa-IR.profile').then((m) => m.AXIRLocaleProfile),\n };\n }\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AXLocaleProfileProviderService {\n private providers: AXLocaleProfileProvider[] = inject(AX_LOCALE_PROFILE_PROVIDERS);\n\n private registry = new Map<string, () => Promise<AXLocaleProfile>>();\n private resolvedCache = new Map<string, AXLocaleProfile>();\n private isInitialized = false;\n\n private async init(): Promise<void> {\n if (this.isInitialized) return;\n\n for (const provider of this.providers) {\n const result: AXLocaleProfileProviderResult = await provider.provide();\n\n for (const [localeCode, loaderFn] of Object.entries(result)) {\n if (typeof loaderFn === 'function') {\n this.registry.set(localeCode, async () => {\n const profile = await loaderFn();\n return profile;\n });\n } else {\n console.warn(`[AXLocaleService] Profile for \"${localeCode}\" is not a function. Skipped.`);\n }\n }\n }\n\n this.isInitialized = true;\n }\n\n /**\n * Returns all available locale profiles by loading each registered provider.\n *\n * @returns Promise<AXLocaleProfile[]>\n */\n\n public async getList(): Promise<AXLocaleProfile[]> {\n await this.init();\n\n const profiles: AXLocaleProfile[] = [];\n\n for (const localeCode of this.registry.keys()) {\n const profile = await this.getByLocale(localeCode);\n if (profile) profiles.push(profile);\n }\n\n return profiles;\n }\n\n /**\n * Loads or returns from cache the locale profile associated with the given code.\n *\n * @param localeCode - The locale code to resolve.\n * @returns Promise<AXLocaleProfile | undefined>\n */\n\n public async getByLocale(localeCode: string): Promise<AXLocaleProfile | undefined> {\n await this.init();\n\n // If already loaded, return from cache\n if (this.resolvedCache.has(localeCode)) {\n return this.resolvedCache.get(localeCode);\n }\n\n // Otherwise, try to load it\n const loader = this.registry.get(localeCode);\n if (!loader) {\n console.warn(`[AXLocaleService] No profile loader found for locale: \"${localeCode}\"`);\n return undefined;\n }\n\n const profile = await loader();\n this.resolvedCache.set(localeCode, profile);\n return profile;\n }\n\n /**\n * Clears caches and reloads all providers.\n *\n * @returns Promise<void>\n */\n\n public async reload(): Promise<void> {\n this.registry.clear();\n this.resolvedCache.clear();\n this.isInitialized = false;\n await this.init();\n }\n\n /**\n * Indicates whether a loader has been registered for the given locale code.\n *\n * @param localeCode - The locale code to check.\n * @returns boolean - True if a loader exists.\n */\n\n public has(localeCode: string): boolean {\n return this.registry.has(localeCode);\n }\n}\n","import { InjectionToken } from '@angular/core';\n\nexport interface AXLocaleConfig {\n default: string;\n}\n\nexport const AX_LOCALE_CONFIG = new InjectionToken<AXLocaleConfig>('AX_LOCALE_CONFIG', {\n providedIn: 'root',\n factory: () => {\n return {\n default: 'en-US',\n };\n },\n});\n","import { AXFormatModule } from '@acorex/core/format';\nimport { NgModule } from '@angular/core';\n\n@NgModule({\n imports: [\n AXFormatModule.forChild({\n formatters: [],\n }),\n ],\n})\nexport class AXLocaleModule {}\n","import { AXLocaleProfile } from '../locale.types';\n\nexport const AXUSLocaleProfile: AXLocaleProfile = {\n localeInfo: {\n code: 'en-US',\n language: 'en',\n region: 'US',\n timezone: 'America/New_York',\n },\n calendar: {\n system: 'gregorian',\n week: {\n startsOn: 0, // Sunday\n weekends: [0, 6], // Sunday + Saturday\n },\n clock: {\n format24Hour: false,\n },\n },\n formats: {\n date: {\n short: 'MM/DD/YY',\n medium: 'MM/DD/YYYY',\n long: 'MMMM DD, YYYY',\n full: 'dddd, MMMM DD, YYYY',\n },\n time: {\n short: 'hh:mm A',\n medium: 'hh:mm:ss A',\n long: 'hh:mm:ss A Z',\n full: 'hh:mm:ss A ZZZZ',\n },\n datetime: {\n short: 'MM/DD/YY hh:mm A',\n medium: 'MM/DD/YYYY hh:mm:ss A',\n long: 'MMMM DD, YYYY hh:mm:ss A Z',\n full: 'dddd, MMMM DD, YYYY hh:mm:ss A ZZZZ',\n },\n numbers: {\n decimalPattern: '1,000.00',\n currency: {\n code: 'USD',\n },\n },\n contacts: {\n phone: '(000) 000-0000',\n postalCode: '00000',\n },\n },\n units: {\n temperature: 'fahrenheit',\n distance: 'miles',\n weight: 'pounds',\n volume: 'gallons',\n speed: 'mph',\n area: 'square-feet',\n },\n i18nMeta: {\n rtl: false,\n fallbackLocales: ['en-US'],\n supportedLanguages: ['en-US'],\n },\n};\n","import { DOCUMENT, isPlatformBrowser } from '@angular/common';\nimport { computed, Injectable, inject, PLATFORM_ID, signal } from '@angular/core';\nimport { AXLocaleProfileProviderService } from './locale-profile-provider.service';\nimport { AXLocaleProfile } from './locale.types';\n\nimport { toObservable } from '@angular/core/rxjs-interop';\nimport { cloneDeep, merge, set } from 'lodash-es';\nimport { AX_LOCALE_CONFIG } from './locale.config';\nimport { AXUSLocaleProfile } from './profiles/en-US.profile';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AXLocaleService {\n private provider = inject(AXLocaleProfileProviderService);\n private config = inject(AX_LOCALE_CONFIG);\n private document = inject(DOCUMENT);\n private platformId = inject(PLATFORM_ID);\n\n private _activeProfile = signal<AXLocaleProfile>(AXUSLocaleProfile);\n public activeProfile = this._activeProfile.asReadonly();\n\n /** Whether the active locale uses right-to-left layout. */\n public readonly isRtl = computed(() => !!this._activeProfile()?.i18nMeta?.rtl);\n\n public profileChanged$ = toObservable(this._activeProfile);\n\n private originalProfile: AXLocaleProfile = cloneDeep(AXUSLocaleProfile);\n\n /**\n * Loads and activates a locale profile by its code (e.g., 'en-US', 'fa-IR').\n *\n * @param localeCode - Locale identifier to load.\n * @returns Promise<void> - Resolves when the profile is loaded and activated.\n */\n\n public async setProfile(localeCode: string): Promise<void> {\n const profile = await this.provider.getByLocale(localeCode);\n if (profile) {\n this.originalProfile = cloneDeep(profile);\n this._activeProfile.set(cloneDeep(profile));\n this.applyDocumentDirection(profile);\n } else {\n console.warn(`[AXLocaleService] Locale not found: ${localeCode}`);\n }\n }\n\n private applyDocumentDirection(profile: AXLocaleProfile): void {\n if (!isPlatformBrowser(this.platformId)) {\n return;\n }\n const isRtl = !!profile.i18nMeta?.rtl;\n this.document.documentElement.setAttribute('dir', isRtl ? 'rtl' : 'ltr');\n this.document.documentElement.setAttribute('lang', profile.localeInfo.language);\n }\n\n /**\n *\n */\n constructor() {\n this.applyDocumentDirection(this._activeProfile());\n this.setProfile(this.config.default);\n }\n\n /**\n * Applies overrides to the active profile using a deep-merge object.\n *\n * @param profile - Partial profile object whose properties override the active profile.\n * @returns void\n */\n\n public apply(profile: Partial<AXLocaleProfile>): void;\n\n /**\n * Applies a single value override at the given path (dot notation).\n *\n * @param path - Dot-notated path (e.g., 'formats.date.short').\n * @param value - The value to set at the path.\n * @returns void\n */\n\n public apply(path: string, value: any): void;\n\n public apply(arg1: any, arg2?: any): void {\n const current = this.activeProfile();\n if (!current) {\n console.warn('[AXLocaleService] No active profile found');\n return;\n }\n\n const updated = cloneDeep(current);\n\n if (typeof arg1 === 'string' && arg2 !== undefined) {\n // Overload: updateProfile('formats.date.full', 'YYYY-MM-DD')\n set(updated, arg1, arg2);\n } else if (typeof arg1 === 'object') {\n // Overload: updateProfile({ formats: { date: { short: '...' } } })\n merge(updated, arg1);\n } else {\n console.warn('[AXLocaleService] Invalid arguments passed to updateProfile()');\n return;\n }\n }\n\n /**\n * Resets the active profile to its original loaded state (clears overrides).\n *\n * @returns void\n */\n\n public reset(): void {\n if (this.originalProfile) {\n const profile = cloneDeep(this.originalProfile);\n this._activeProfile.set(profile);\n this.applyDocumentDirection(profile);\n }\n }\n}\n","import { AXLocaleProfile } from '../locale.types';\n\nexport const AXIRLocaleProfile: AXLocaleProfile = {\n localeInfo: {\n code: 'fa-IR',\n language: 'fa',\n region: 'IR',\n timezone: 'Asia/Tehran',\n },\n calendar: {\n system: 'solar-hijri',\n week: {\n startsOn: 6, // Saturday\n weekends: [5], // Friday\n },\n clock: {\n format24Hour: true,\n },\n },\n formats: {\n date: {\n short: 'YY/MM/DD',\n medium: 'YYYY/MM/DD',\n long: 'dddd، D MMMM YYYY',\n full: 'dddd، D MMMM YYYY',\n },\n time: {\n short: 'HH:mm',\n medium: 'HH:mm:ss',\n long: 'HH:mm:ss Z',\n full: 'HH:mm:ss ZZZZ',\n },\n datetime: {\n short: 'YY/MM/DD HH:mm',\n medium: 'YYYY/MM/DD HH:mm:ss',\n long: 'dddd، D MMMM YYYY HH:mm:ss Z',\n full: 'dddd، D MMMM YYYY HH:mm:ss ZZZZ',\n },\n numbers: {\n decimalPattern: '1٬000٫00',\n currency: {\n code: 'IRR',\n },\n },\n contacts: {\n phone: '09XX XXX XXXX',\n postalCode: 'XXXXX-XXXXX',\n },\n },\n units: {\n temperature: 'celsius',\n distance: 'kilometers',\n weight: 'kilograms',\n volume: 'liters',\n speed: 'kmh',\n area: 'square-meters',\n },\n i18nMeta: {\n rtl: true,\n fallbackLocales: ['en-US'],\n supportedLanguages: ['fa-IR', 'en-US'],\n },\n};\n","import { AXLocaleProfile } from '../locale.types';\n\nexport const AXAULocaleProfile: AXLocaleProfile = {\n localeInfo: {\n code: 'en-AU',\n language: 'en',\n region: 'AU',\n timezone: 'Australia/Sydney',\n },\n calendar: {\n system: 'gregorian',\n week: {\n startsOn: 1, // Monday\n weekends: [0, 6], // Sunday + Saturday\n },\n clock: {\n format24Hour: true,\n },\n },\n formats: {\n date: {\n short: 'DD/MM/YY',\n medium: 'DD/MM/YYYY',\n long: 'DD MMMM YYYY',\n full: 'dddd, DD MMMM YYYY',\n },\n time: {\n short: 'HH:mm',\n medium: 'HH:mm:ss',\n long: 'HH:mm:ss Z',\n full: 'HH:mm:ss ZZZZ',\n },\n datetime: {\n short: 'DD/MM/YY HH:mm',\n medium: 'DD/MM/YYYY HH:mm:ss',\n long: 'DD MMMM YYYY HH:mm:ss Z',\n full: 'dddd, DD MMMM YYYY HH:mm:ss ZZZZ',\n },\n numbers: {\n decimalPattern: '1,000.00',\n currency: {\n code: 'AUD',\n },\n },\n contacts: {\n phone: '04XX XXX XXX',\n postalCode: '0000',\n },\n },\n\n units: {\n temperature: 'celsius',\n distance: 'kilometers',\n weight: 'kilograms',\n volume: 'liters',\n speed: 'kmh',\n area: 'square-meters',\n },\n\n i18nMeta: {\n rtl: false,\n fallbackLocales: ['en-US'],\n support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