@shival99/z-ui 2.1.17 → 2.1.18

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.
@@ -84,7 +84,8 @@ const Z_NGX_MASK_CONFIG = new InjectionToken('Z_NGX_MASK_CONFIG');
84
84
  * Get locale-specific mask configuration
85
85
  */
86
86
  function getMaskConfig(lang, config = {}) {
87
- const isVietnamese = lang === 'vi';
87
+ const normalizedLang = lang.toLowerCase().replace('_', '-');
88
+ const isVietnamese = normalizedLang === 'vi' || normalizedLang.startsWith('vi-');
88
89
  const { lang: _lang, decimalPlaces: _decimalPlaces, ...maskConfig } = config;
89
90
  return {
90
91
  ...maskConfig,
@@ -1 +1 @@
1
- {"version":3,"file":"shival99-z-ui-providers.mjs","sources":["../../../../libs/core-ui/providers/z-cache.provider.ts","../../../../libs/core-ui/providers/z-indexdb.provider.ts","../../../../libs/core-ui/providers/z-ngx-mask.provider.ts","../../../../libs/core-ui/providers/z-scrollbar.provider.ts","../../../../libs/core-ui/providers/z-theme.provider.ts","../../../../libs/core-ui/providers/z-translate.provider.ts","../../../../libs/core-ui/providers/types/z-ngx-mask.types.ts","../../../../libs/core-ui/providers/shival99-z-ui-providers.ts"],"sourcesContent":["import {\n type EnvironmentProviders,\n inject,\n InjectionToken,\n makeEnvironmentProviders,\n provideEnvironmentInitializer,\n} from '@angular/core';\nimport { type ZCacheConfig, ZCacheService } from '@shival99/z-ui/services';\n\n/** Injection token for ZCacheService configuration */\nexport const Z_CACHE_CONFIG = new InjectionToken<ZCacheConfig>('Z_CACHE_CONFIG');\n\n/**\n * Provide Z-Cache service with configuration\n * @param config - Cache configuration with prefix and encrypt options\n *\n * @example\n * ```typescript\n * // In app.config.ts\n * export const appConfig: ApplicationConfig = {\n * providers: [\n * provideZCache({\n * prefix: 'myapp_',\n * encrypt: false, // Disable encryption for debugging\n * }),\n * ],\n * };\n * ```\n */\nexport function provideZCache(config: ZCacheConfig = {}): EnvironmentProviders {\n return makeEnvironmentProviders([\n {\n provide: Z_CACHE_CONFIG,\n useValue: config,\n },\n provideEnvironmentInitializer(() => {\n const cacheConfig = inject(Z_CACHE_CONFIG);\n ZCacheService.configure(cacheConfig);\n }),\n ]);\n}\n","import { type EnvironmentProviders, InjectionToken, makeEnvironmentProviders } from '@angular/core';\nimport { type ZIndexDbConfig, ZIndexDbService } from '@shival99/z-ui/services';\n\n/** Injection token for ZIndexDbService */\nexport const Z_INDEXDB_SERVICE = new InjectionToken<ZIndexDbService>('ZIndexDbService');\n\n/**\n * Provide Z-IndexDB service with configuration\n * @param config - IndexDB configuration with multi-store support\n *\n * @example\n * ```typescript\n * // In app.config.ts\n * export const appConfig: ApplicationConfig = {\n * providers: [\n * provideZIndexDb({\n * dbName: 'MyApp',\n * version: 1,\n * stores: [\n * { name: 'cache', encrypt: true },\n * { name: 'userData', encrypt: true, protectedKeys: ['profile'] },\n * { name: 'settings', encrypt: false },\n * ],\n * defaultStore: 'cache',\n * protectedKeys: ['token'],\n * }),\n * ],\n * };\n * ```\n */\nexport function provideZIndexDb(config: ZIndexDbConfig = {}): EnvironmentProviders {\n return makeEnvironmentProviders([\n {\n provide: Z_INDEXDB_SERVICE,\n useFactory: () => new ZIndexDbService(config),\n },\n {\n provide: ZIndexDbService,\n useExisting: Z_INDEXDB_SERVICE,\n },\n ]);\n}\n","import { type EnvironmentProviders, InjectionToken, makeEnvironmentProviders } from '@angular/core';\nimport { ZCacheService } from '@shival99/z-ui/services';\nimport { provideEnvironmentNgxMask } from 'ngx-mask';\nimport type { ZNgxMaskConfig } from './types/z-ngx-mask.types';\n\nconst LANG_CACHE_KEY = 'Z_LANGUAGE';\n\nexport const Z_NGX_MASK_CONFIG = new InjectionToken<ZNgxMaskConfig>('Z_NGX_MASK_CONFIG');\n\n/**\n * Get locale-specific mask configuration\n */\nfunction getMaskConfig(lang: string, config: ZNgxMaskConfig = {}) {\n const isVietnamese = lang === 'vi';\n const { lang: _lang, decimalPlaces: _decimalPlaces, ...maskConfig } = config;\n\n return {\n ...maskConfig,\n validation: maskConfig.validation ?? true,\n thousandSeparator: maskConfig.thousandSeparator ?? (isVietnamese ? '.' : ','),\n decimalMarker: maskConfig.decimalMarker ?? (isVietnamese ? ',' : '.'),\n allowNegativeNumbers: maskConfig.allowNegativeNumbers ?? true,\n };\n}\n\n/**\n * Provide Z-NgxMask with locale-aware configuration\n * @param config - Mask configuration\n *\n * @example\n * ```typescript\n * // In app.config.ts\n * export const appConfig: ApplicationConfig = {\n * providers: [\n * provideZNgxMask({ lang: 'vi' }),\n * ],\n * };\n * ```\n *\n * Vietnamese defaults: thousandSeparator '.', decimalMarker ','.\n */\nexport function provideZNgxMask(config: ZNgxMaskConfig = {}): EnvironmentProviders {\n const savedLang = typeof window !== 'undefined' ? ZCacheService.get<string>(LANG_CACHE_KEY) : null;\n const lang = config.lang ?? savedLang ?? 'vi';\n const maskConfig = getMaskConfig(lang, config);\n const zMaskConfig: ZNgxMaskConfig = {\n ...maskConfig,\n lang,\n decimalPlaces: config.decimalPlaces,\n };\n\n return makeEnvironmentProviders([\n {\n provide: Z_NGX_MASK_CONFIG,\n useValue: zMaskConfig,\n },\n provideEnvironmentNgxMask(maskConfig),\n ]);\n}\n","import { type EnvironmentProviders, makeEnvironmentProviders } from '@angular/core';\nimport { provideScrollbarOptions } from 'ngx-scrollbar';\n\n/**\n * Provides global scrollbar options for ngx-scrollbar\n * Use this in app.config.ts: providers: [provideZScrollbar()]\n */\nexport function provideZScrollbar(): EnvironmentProviders {\n return makeEnvironmentProviders([\n provideScrollbarOptions({\n visibility: 'hover',\n appearance: 'compact',\n withButtons: false,\n sensorThrottleTime: 200,\n }),\n ]);\n}\n","import { makeEnvironmentProviders, type EnvironmentProviders } from '@angular/core';\nimport { type ZThemeConfig, Z_THEME_CONFIG } from '@shival99/z-ui/services';\n\n/**\n * Provide theme configuration for the application\n * @param config - Theme configuration with defaultTheme, defaultDarkMode, and optional cacheKey\n * @example\n * ```typescript\n * // In app.config.ts\n * export const appConfig: ApplicationConfig = {\n * providers: [\n * provideZTheme({\n * defaultTheme: 'hospital',\n * defaultDarkMode: false,\n * cacheKey: 'Z_THEME_PREFERENCES_CRM',\n * })\n * ]\n * };\n * ```\n */\nexport function provideZTheme(config: ZThemeConfig = {}): EnvironmentProviders {\n return makeEnvironmentProviders([{ provide: Z_THEME_CONFIG, useValue: config }]);\n}\n","/* eslint-disable @stylistic/indent */\nimport { HttpClient } from '@angular/common/http';\nimport { inject, makeEnvironmentProviders, provideAppInitializer, type EnvironmentProviders } from '@angular/core';\nimport {\n provideTranslateService,\n TranslateLoader,\n TranslateService,\n type TranslationObject,\n} from '@ngx-translate/core';\nimport type { ZUITranslations } from '@shival99/z-ui/i18n';\nimport { Z_LANG_CACHE_KEY, ZCacheService } from '@shival99/z-ui/services';\nimport { firstValueFrom, forkJoin, from, map, type Observable, of } from 'rxjs';\nimport { catchError } from 'rxjs/operators';\nimport type { ZTranslateProviderConfig, ZUITranslationsLoader } from './types/z-translate.types';\n\nconst DEFAULT_LANG = 'en';\nconst zuiTranslationsPromiseCache = new Map<string, Promise<ZUITranslations>>();\n\nasync function zLoadDefaultZUITranslations(lang: string): Promise<ZUITranslations> {\n const module = await import('@shival99/z-ui/i18n');\n return module.getZUITranslations(lang) ?? module.getZUITranslations(DEFAULT_LANG);\n}\n\nclass ZTranslateHttpLoader implements TranslateLoader {\n public constructor(\n private readonly _http: HttpClient,\n private readonly _prefix: string,\n private readonly _suffix: string,\n private readonly _includeZUI: boolean,\n private readonly _zuiOverridePath?: string,\n private readonly _zuiLoader: ZUITranslationsLoader = zLoadDefaultZUITranslations\n ) {}\n\n private _loadZUITranslations(lang: string): Promise<ZUITranslations> {\n const cached = zuiTranslationsPromiseCache.get(lang);\n if (cached) {\n return cached;\n }\n\n const loadPromise = this._zuiLoader(lang).catch(async () => {\n if (lang === DEFAULT_LANG) {\n return {};\n }\n return this._zuiLoader(DEFAULT_LANG).catch(() => ({}));\n });\n\n zuiTranslationsPromiseCache.set(lang, loadPromise);\n return loadPromise;\n }\n\n public getTranslation(lang: string): Observable<TranslationObject> {\n const userTranslations$ = this._http\n .get<TranslationObject>(`${this._prefix}${lang}${this._suffix}`)\n .pipe(catchError(() => of({} as TranslationObject)));\n\n if (!this._includeZUI) {\n return userTranslations$;\n }\n\n const zuiDefaults$ = from(this._loadZUITranslations(lang)).pipe(catchError(() => of({} as ZUITranslations)));\n const zuiFileOverrides$ = this._zuiOverridePath\n ? this._http\n .get<ZUITranslations>(`${this._zuiOverridePath}${lang}${this._suffix}`)\n .pipe(catchError(() => of({} as ZUITranslations)))\n : of({} as ZUITranslations);\n\n return forkJoin([zuiDefaults$, zuiFileOverrides$, userTranslations$]).pipe(\n map(\n ([defaults, fileOverrides, user]) =>\n ({\n ...defaults,\n ...fileOverrides,\n ...(user as Record<string, unknown>),\n }) as TranslationObject\n )\n );\n }\n}\n\nexport function zCreateTranslateLoader(\n http: HttpClient,\n path = './assets/i18n/',\n extension = '.json',\n includeZUI = true,\n zuiOverridePath?: string,\n zuiLoader: ZUITranslationsLoader = zLoadDefaultZUITranslations\n): TranslateLoader {\n return new ZTranslateHttpLoader(http, path, extension, includeZUI, zuiOverridePath, zuiLoader);\n}\n\nfunction initializeTranslate(defaultLang: string): Promise<unknown> {\n const translate = inject(TranslateService);\n const savedLang = ZCacheService.get<string>(Z_LANG_CACHE_KEY) ?? defaultLang;\n ZCacheService.set(Z_LANG_CACHE_KEY, savedLang);\n translate.setFallbackLang(defaultLang);\n return firstValueFrom(translate.use(savedLang));\n}\n\nexport function provideZTranslate(config: ZTranslateProviderConfig = {}): EnvironmentProviders {\n const {\n defaultLang = 'vi',\n translationPath = './assets/i18n/',\n fileExtension = '.json',\n includeZUITranslations = true,\n zuiOverridePath,\n zuiTranslationsLoader = zLoadDefaultZUITranslations,\n } = config;\n\n return makeEnvironmentProviders([\n provideTranslateService({\n fallbackLang: defaultLang,\n loader: {\n provide: TranslateLoader,\n useFactory: (http: HttpClient) =>\n zCreateTranslateLoader(\n http,\n translationPath,\n fileExtension,\n includeZUITranslations,\n zuiOverridePath,\n zuiTranslationsLoader\n ),\n deps: [HttpClient],\n },\n }),\n provideAppInitializer(() => initializeTranslate(defaultLang)),\n ]);\n}\n\nexport type { ZUITranslations, ZUILanguage, ZUITranslationSet } from '@shival99/z-ui/i18n';\n","/**\n * Z-NgxMask Provider Types\n */\n\nimport type { NgxMaskOptions } from 'ngx-mask';\n\nexport interface ZNgxMaskConfig extends NgxMaskOptions {\n /** Language code (vi, en, etc.) */\n lang?: string;\n /** Default decimal places for Z-UI number inputs. */\n decimalPlaces?: number;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AASA;MACa,cAAc,GAAG,IAAI,cAAc,CAAe,gBAAgB;AAE/E;;;;;;;;;;;;;;;;AAgBG;AACG,SAAU,aAAa,CAAC,MAAA,GAAuB,EAAE,EAAA;AACrD,IAAA,OAAO,wBAAwB,CAAC;AAC9B,QAAA;AACE,YAAA,OAAO,EAAE,cAAc;AACvB,YAAA,QAAQ,EAAE,MAAM;AACjB,SAAA;QACD,6BAA6B,CAAC,MAAK;AACjC,YAAA,MAAM,WAAW,GAAG,MAAM,CAAC,cAAc,CAAC;AAC1C,YAAA,aAAa,CAAC,SAAS,CAAC,WAAW,CAAC;AACtC,QAAA,CAAC,CAAC;AACH,KAAA,CAAC;AACJ;;ACrCA;MACa,iBAAiB,GAAG,IAAI,cAAc,CAAkB,iBAAiB;AAEtF;;;;;;;;;;;;;;;;;;;;;;;AAuBG;AACG,SAAU,eAAe,CAAC,MAAA,GAAyB,EAAE,EAAA;AACzD,IAAA,OAAO,wBAAwB,CAAC;AAC9B,QAAA;AACE,YAAA,OAAO,EAAE,iBAAiB;YAC1B,UAAU,EAAE,MAAM,IAAI,eAAe,CAAC,MAAM,CAAC;AAC9C,SAAA;AACD,QAAA;AACE,YAAA,OAAO,EAAE,eAAe;AACxB,YAAA,WAAW,EAAE,iBAAiB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,IAAA,OAAO,wBAAwB,CAAC;AAC9B,QAAA,uBAAuB,CAAC;AACtB,YAAA,YAAY,EAAE,WAAW;AACzB,YAAA,MAAM,EAAE;AACN,gBAAA,OAAO,EAAE,eAAe;AACxB,gBAAA,UAAU,EAAE,CAAC,IAAgB,KAC3B,sBAAsB,CACpB,IAAI,EACJ,eAAe,EACf,aAAa,EACb,sBAAsB,EACtB,eAAe,EACf,qBAAqB,CACtB;gBACH,IAAI,EAAE,CAAC,UAAU,CAAC;AACnB,aAAA;SACF,CAAC;QACF,qBAAqB,CAAC,MAAM,mBAAmB,CAAC,WAAW,CAAC,CAAC;AAC9D,KAAA,CAAC;AACJ;;AC/HA;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"shival99-z-ui-providers.mjs","sources":["../../../../libs/core-ui/providers/z-cache.provider.ts","../../../../libs/core-ui/providers/z-indexdb.provider.ts","../../../../libs/core-ui/providers/z-ngx-mask.provider.ts","../../../../libs/core-ui/providers/z-scrollbar.provider.ts","../../../../libs/core-ui/providers/z-theme.provider.ts","../../../../libs/core-ui/providers/z-translate.provider.ts","../../../../libs/core-ui/providers/types/z-ngx-mask.types.ts","../../../../libs/core-ui/providers/shival99-z-ui-providers.ts"],"sourcesContent":["import {\n type EnvironmentProviders,\n inject,\n InjectionToken,\n makeEnvironmentProviders,\n provideEnvironmentInitializer,\n} from '@angular/core';\nimport { type ZCacheConfig, ZCacheService } from '@shival99/z-ui/services';\n\n/** Injection token for ZCacheService configuration */\nexport const Z_CACHE_CONFIG = new InjectionToken<ZCacheConfig>('Z_CACHE_CONFIG');\n\n/**\n * Provide Z-Cache service with configuration\n * @param config - Cache configuration with prefix and encrypt options\n *\n * @example\n * ```typescript\n * // In app.config.ts\n * export const appConfig: ApplicationConfig = {\n * providers: [\n * provideZCache({\n * prefix: 'myapp_',\n * encrypt: false, // Disable encryption for debugging\n * }),\n * ],\n * };\n * ```\n */\nexport function provideZCache(config: ZCacheConfig = {}): EnvironmentProviders {\n return makeEnvironmentProviders([\n {\n provide: Z_CACHE_CONFIG,\n useValue: config,\n },\n provideEnvironmentInitializer(() => {\n const cacheConfig = inject(Z_CACHE_CONFIG);\n ZCacheService.configure(cacheConfig);\n }),\n ]);\n}\n","import { type EnvironmentProviders, InjectionToken, makeEnvironmentProviders } from '@angular/core';\nimport { type ZIndexDbConfig, ZIndexDbService } from '@shival99/z-ui/services';\n\n/** Injection token for ZIndexDbService */\nexport const Z_INDEXDB_SERVICE = new InjectionToken<ZIndexDbService>('ZIndexDbService');\n\n/**\n * Provide Z-IndexDB service with configuration\n * @param config - IndexDB configuration with multi-store support\n *\n * @example\n * ```typescript\n * // In app.config.ts\n * export const appConfig: ApplicationConfig = {\n * providers: [\n * provideZIndexDb({\n * dbName: 'MyApp',\n * version: 1,\n * stores: [\n * { name: 'cache', encrypt: true },\n * { name: 'userData', encrypt: true, protectedKeys: ['profile'] },\n * { name: 'settings', encrypt: false },\n * ],\n * defaultStore: 'cache',\n * protectedKeys: ['token'],\n * }),\n * ],\n * };\n * ```\n */\nexport function provideZIndexDb(config: ZIndexDbConfig = {}): EnvironmentProviders {\n return makeEnvironmentProviders([\n {\n provide: Z_INDEXDB_SERVICE,\n useFactory: () => new ZIndexDbService(config),\n },\n {\n provide: ZIndexDbService,\n useExisting: Z_INDEXDB_SERVICE,\n },\n ]);\n}\n","import { type EnvironmentProviders, InjectionToken, makeEnvironmentProviders } from '@angular/core';\nimport { ZCacheService } from '@shival99/z-ui/services';\nimport { provideEnvironmentNgxMask } from 'ngx-mask';\nimport type { ZNgxMaskConfig } from './types/z-ngx-mask.types';\n\nconst LANG_CACHE_KEY = 'Z_LANGUAGE';\n\nexport const Z_NGX_MASK_CONFIG = new InjectionToken<ZNgxMaskConfig>('Z_NGX_MASK_CONFIG');\n\n/**\n * Get locale-specific mask configuration\n */\nfunction getMaskConfig(lang: string, config: ZNgxMaskConfig = {}) {\n const normalizedLang = lang.toLowerCase().replace('_', '-');\n const isVietnamese = normalizedLang === 'vi' || normalizedLang.startsWith('vi-');\n const { lang: _lang, decimalPlaces: _decimalPlaces, ...maskConfig } = config;\n\n return {\n ...maskConfig,\n validation: maskConfig.validation ?? true,\n thousandSeparator: maskConfig.thousandSeparator ?? (isVietnamese ? '.' : ','),\n decimalMarker: maskConfig.decimalMarker ?? (isVietnamese ? ',' : '.'),\n allowNegativeNumbers: maskConfig.allowNegativeNumbers ?? true,\n };\n}\n\n/**\n * Provide Z-NgxMask with locale-aware configuration\n * @param config - Mask configuration\n *\n * @example\n * ```typescript\n * // In app.config.ts\n * export const appConfig: ApplicationConfig = {\n * providers: [\n * provideZNgxMask({ lang: 'vi' }),\n * ],\n * };\n * ```\n *\n * Vietnamese defaults: thousandSeparator '.', decimalMarker ','.\n */\nexport function provideZNgxMask(config: ZNgxMaskConfig = {}): EnvironmentProviders {\n const savedLang = typeof window !== 'undefined' ? ZCacheService.get<string>(LANG_CACHE_KEY) : null;\n const lang = config.lang ?? savedLang ?? 'vi';\n const maskConfig = getMaskConfig(lang, config);\n const zMaskConfig: ZNgxMaskConfig = {\n ...maskConfig,\n lang,\n decimalPlaces: config.decimalPlaces,\n };\n\n return makeEnvironmentProviders([\n {\n provide: Z_NGX_MASK_CONFIG,\n useValue: zMaskConfig,\n },\n provideEnvironmentNgxMask(maskConfig),\n ]);\n}\n","import { type EnvironmentProviders, makeEnvironmentProviders } from '@angular/core';\nimport { provideScrollbarOptions } from 'ngx-scrollbar';\n\n/**\n * Provides global scrollbar options for ngx-scrollbar\n * Use this in app.config.ts: providers: [provideZScrollbar()]\n */\nexport function provideZScrollbar(): EnvironmentProviders {\n return makeEnvironmentProviders([\n provideScrollbarOptions({\n visibility: 'hover',\n appearance: 'compact',\n withButtons: false,\n sensorThrottleTime: 200,\n }),\n ]);\n}\n","import { makeEnvironmentProviders, type EnvironmentProviders } from '@angular/core';\nimport { type ZThemeConfig, Z_THEME_CONFIG } from '@shival99/z-ui/services';\n\n/**\n * Provide theme configuration for the application\n * @param config - Theme configuration with defaultTheme, defaultDarkMode, and optional cacheKey\n * @example\n * ```typescript\n * // In app.config.ts\n * export const appConfig: ApplicationConfig = {\n * providers: [\n * provideZTheme({\n * defaultTheme: 'hospital',\n * defaultDarkMode: false,\n * cacheKey: 'Z_THEME_PREFERENCES_CRM',\n * })\n * ]\n * };\n * ```\n */\nexport function provideZTheme(config: ZThemeConfig = {}): EnvironmentProviders {\n return makeEnvironmentProviders([{ provide: Z_THEME_CONFIG, useValue: config }]);\n}\n","/* eslint-disable @stylistic/indent */\nimport { HttpClient } from '@angular/common/http';\nimport { inject, makeEnvironmentProviders, provideAppInitializer, type EnvironmentProviders } from '@angular/core';\nimport {\n provideTranslateService,\n TranslateLoader,\n TranslateService,\n type TranslationObject,\n} from '@ngx-translate/core';\nimport type { ZUITranslations } from '@shival99/z-ui/i18n';\nimport { Z_LANG_CACHE_KEY, ZCacheService } from '@shival99/z-ui/services';\nimport { firstValueFrom, forkJoin, from, map, type Observable, of } from 'rxjs';\nimport { catchError } from 'rxjs/operators';\nimport type { ZTranslateProviderConfig, ZUITranslationsLoader } from './types/z-translate.types';\n\nconst DEFAULT_LANG = 'en';\nconst zuiTranslationsPromiseCache = new Map<string, Promise<ZUITranslations>>();\n\nasync function zLoadDefaultZUITranslations(lang: string): Promise<ZUITranslations> {\n const module = await import('@shival99/z-ui/i18n');\n return module.getZUITranslations(lang) ?? module.getZUITranslations(DEFAULT_LANG);\n}\n\nclass ZTranslateHttpLoader implements TranslateLoader {\n public constructor(\n private readonly _http: HttpClient,\n private readonly _prefix: string,\n private readonly _suffix: string,\n private readonly _includeZUI: boolean,\n private readonly _zuiOverridePath?: string,\n private readonly _zuiLoader: ZUITranslationsLoader = zLoadDefaultZUITranslations\n ) {}\n\n private _loadZUITranslations(lang: string): Promise<ZUITranslations> {\n const cached = zuiTranslationsPromiseCache.get(lang);\n if (cached) {\n return cached;\n }\n\n const loadPromise = this._zuiLoader(lang).catch(async () => {\n if (lang === DEFAULT_LANG) {\n return {};\n }\n return this._zuiLoader(DEFAULT_LANG).catch(() => ({}));\n });\n\n zuiTranslationsPromiseCache.set(lang, loadPromise);\n return loadPromise;\n }\n\n public getTranslation(lang: string): Observable<TranslationObject> {\n const userTranslations$ = this._http\n .get<TranslationObject>(`${this._prefix}${lang}${this._suffix}`)\n .pipe(catchError(() => of({} as TranslationObject)));\n\n if (!this._includeZUI) {\n return userTranslations$;\n }\n\n const zuiDefaults$ = from(this._loadZUITranslations(lang)).pipe(catchError(() => of({} as ZUITranslations)));\n const zuiFileOverrides$ = this._zuiOverridePath\n ? this._http\n .get<ZUITranslations>(`${this._zuiOverridePath}${lang}${this._suffix}`)\n .pipe(catchError(() => of({} as ZUITranslations)))\n : of({} as ZUITranslations);\n\n return forkJoin([zuiDefaults$, zuiFileOverrides$, userTranslations$]).pipe(\n map(\n ([defaults, fileOverrides, user]) =>\n ({\n ...defaults,\n ...fileOverrides,\n ...(user as Record<string, unknown>),\n }) as TranslationObject\n )\n );\n }\n}\n\nexport function zCreateTranslateLoader(\n http: HttpClient,\n path = './assets/i18n/',\n extension = '.json',\n includeZUI = true,\n zuiOverridePath?: string,\n zuiLoader: ZUITranslationsLoader = zLoadDefaultZUITranslations\n): TranslateLoader {\n return new ZTranslateHttpLoader(http, path, extension, includeZUI, zuiOverridePath, zuiLoader);\n}\n\nfunction initializeTranslate(defaultLang: string): Promise<unknown> {\n const translate = inject(TranslateService);\n const savedLang = ZCacheService.get<string>(Z_LANG_CACHE_KEY) ?? defaultLang;\n ZCacheService.set(Z_LANG_CACHE_KEY, savedLang);\n translate.setFallbackLang(defaultLang);\n return firstValueFrom(translate.use(savedLang));\n}\n\nexport function provideZTranslate(config: ZTranslateProviderConfig = {}): EnvironmentProviders {\n const {\n defaultLang = 'vi',\n translationPath = './assets/i18n/',\n fileExtension = '.json',\n includeZUITranslations = true,\n zuiOverridePath,\n zuiTranslationsLoader = zLoadDefaultZUITranslations,\n } = config;\n\n return makeEnvironmentProviders([\n provideTranslateService({\n fallbackLang: defaultLang,\n loader: {\n provide: TranslateLoader,\n useFactory: (http: HttpClient) =>\n zCreateTranslateLoader(\n http,\n translationPath,\n fileExtension,\n includeZUITranslations,\n zuiOverridePath,\n zuiTranslationsLoader\n ),\n deps: [HttpClient],\n },\n }),\n provideAppInitializer(() => initializeTranslate(defaultLang)),\n ]);\n}\n\nexport type { ZUITranslations, ZUILanguage, ZUITranslationSet } from '@shival99/z-ui/i18n';\n","/**\n * Z-NgxMask Provider Types\n */\n\nimport type { NgxMaskOptions } from 'ngx-mask';\n\nexport interface ZNgxMaskConfig extends NgxMaskOptions {\n /** Language code (vi, en, etc.) */\n lang?: string;\n /** Default decimal places for Z-UI number inputs. */\n decimalPlaces?: number;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AASA;MACa,cAAc,GAAG,IAAI,cAAc,CAAe,gBAAgB;AAE/E;;;;;;;;;;;;;;;;AAgBG;AACG,SAAU,aAAa,CAAC,MAAA,GAAuB,EAAE,EAAA;AACrD,IAAA,OAAO,wBAAwB,CAAC;AAC9B,QAAA;AACE,YAAA,OAAO,EAAE,cAAc;AACvB,YAAA,QAAQ,EAAE,MAAM;AACjB,SAAA;QACD,6BAA6B,CAAC,MAAK;AACjC,YAAA,MAAM,WAAW,GAAG,MAAM,CAAC,cAAc,CAAC;AAC1C,YAAA,aAAa,CAAC,SAAS,CAAC,WAAW,CAAC;AACtC,QAAA,CAAC,CAAC;AACH,KAAA,CAAC;AACJ;;ACrCA;MACa,iBAAiB,GAAG,IAAI,cAAc,CAAkB,iBAAiB;AAEtF;;;;;;;;;;;;;;;;;;;;;;;AAuBG;AACG,SAAU,eAAe,CAAC,MAAA,GAAyB,EAAE,EAAA;AACzD,IAAA,OAAO,wBAAwB,CAAC;AAC9B,QAAA;AACE,YAAA,OAAO,EAAE,iBAAiB;YAC1B,UAAU,EAAE,MAAM,IAAI,eAAe,CAAC,MAAM,CAAC;AAC9C,SAAA;AACD,QA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,MAAA,GAAmC,EAAE,EAAA;IACrE,MAAM,EACJ,WAAW,GAAG,IAAI,EAClB,eAAe,GAAG,gBAAgB,EAClC,aAAa,GAAG,OAAO,EACvB,sBAAsB,GAAG,IAAI,EAC7B,eAAe,EACf,qBAAqB,GAAG,2BAA2B,GACpD,GAAG,MAAM;AAEV,IAAA,OAAO,wBAAwB,CAAC;AAC9B,QAAA,uBAAuB,CAAC;AACtB,YAAA,YAAY,EAAE,WAAW;AACzB,YAAA,MAAM,EAAE;AACN,gBAAA,OAAO,EAAE,eAAe;AACxB,gBAAA,UAAU,EAAE,CAAC,IAAgB,KAC3B,sBAAsB,CACpB,IAAI,EACJ,eAAe,EACf,aAAa,EACb,sBAAsB,EACtB,eAAe,EACf,qBAAqB,CACtB;gBACH,IAAI,EAAE,CAAC,UAAU,CAAC;AACnB,aAAA;SACF,CAAC;QACF,qBAAqB,CAAC,MAAM,mBAAmB,CAAC,WAAW,CAAC,CAAC;AAC9D,KAAA,CAAC;AACJ;;AC/HA;;AAEG;;ACFH;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shival99/z-ui",
3
- "version": "2.1.17",
3
+ "version": "2.1.18",
4
4
  "description": "Z-UI: Modern Angular UI Component Library - A comprehensive, high-performance design system built with Angular 20+, featuring 40+ customizable components with dark mode, accessibility, and enterprise-ready features.",
5
5
  "keywords": [
6
6
  "angular",
@@ -1670,11 +1670,11 @@ declare class ZTableFilterComponent<T> {
1670
1670
  protected readonly sortOptions: _angular_core.Signal<ZSelectOption<string>[]>;
1671
1671
  protected readonly draftFilters: _angular_core.WritableSignal<ZTableDraftFilterCondition[]>;
1672
1672
  protected readonly draftLegacyFilterValue: _angular_core.WritableSignal<unknown>;
1673
- protected readonly draftSortState: _angular_core.WritableSignal<false | "asc" | "desc">;
1673
+ protected readonly draftSortState: _angular_core.WritableSignal<false | "desc" | "asc">;
1674
1674
  protected readonly columnFilterValue: _angular_core.Signal<unknown>;
1675
1675
  protected readonly effectiveFilterValue: _angular_core.Signal<unknown>;
1676
- protected readonly sortState: _angular_core.Signal<false | "asc" | "desc">;
1677
- protected readonly effectiveSortState: _angular_core.Signal<false | "asc" | "desc">;
1676
+ protected readonly sortState: _angular_core.Signal<false | "desc" | "asc">;
1677
+ protected readonly effectiveSortState: _angular_core.Signal<false | "desc" | "asc">;
1678
1678
  protected readonly canSort: _angular_core.Signal<boolean>;
1679
1679
  protected readonly canFilter: _angular_core.Signal<boolean>;
1680
1680
  protected readonly filterUi: _angular_core.Signal<ZTableFilterUi>;
@@ -1692,7 +1692,7 @@ declare class ZTableFilterComponent<T> {
1692
1692
  protected readonly filterBadgeCount: _angular_core.Signal<number>;
1693
1693
  protected readonly hasFilterValue: _angular_core.Signal<boolean>;
1694
1694
  protected readonly isActive: _angular_core.Signal<boolean>;
1695
- protected readonly draftSortValue: _angular_core.Signal<"asc" | "desc" | "none">;
1695
+ protected readonly draftSortValue: _angular_core.Signal<"none" | "desc" | "asc">;
1696
1696
  protected readonly rangeMinValue: _angular_core.Signal<any>;
1697
1697
  protected readonly rangeMaxValue: _angular_core.Signal<any>;
1698
1698
  protected readonly dateValue: _angular_core.Signal<Date | null>;
@@ -1764,7 +1764,7 @@ declare class ZTableActionsComponent<T = unknown> {
1764
1764
  readonly zConfig: _angular_core.InputSignal<ZTableActionColumnConfig<T>>;
1765
1765
  readonly zRow: _angular_core.InputSignal<T>;
1766
1766
  readonly zRowId: _angular_core.InputSignal<string>;
1767
- readonly zDropdownButtonSize: _angular_core.InputSignal<"default" | "sm" | "lg" | "xs" | "xl" | null | undefined>;
1767
+ readonly zDropdownButtonSize: _angular_core.InputSignal<"sm" | "default" | "lg" | "xs" | "xl" | null | undefined>;
1768
1768
  readonly zActionClick: _angular_core.OutputEmitterRef<ZTableActionClickEvent<T>>;
1769
1769
  protected readonly allActions: _angular_core.Signal<ZTableActionItem<T>[]>;
1770
1770
  protected readonly shouldShowAsButtons: _angular_core.Signal<boolean>;