@shival99/z-ui 1.2.13 → 1.2.14

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.
@@ -7,7 +7,8 @@ import { saxRefreshBold, saxCloudChangeBold, saxPauseBold } from '@ng-icons/icon
7
7
  import { saxEditOutline } from '@ng-icons/iconsax/outline';
8
8
  import { lucideEllipsisVertical, lucideSquarePlay, lucidePlay, lucideAudioLines, lucideMic, lucideMessageSquareText, lucideWandSparkles, lucideSparkle, lucideDumbbell, lucideCpu, lucideBrainCog, lucideBrainCircuit, lucideBrain, lucideBotOff, lucideBotMessageSquare, lucidePlug2, lucidePlug, lucideRecycle, lucideIdCard, lucideContact, lucideClipboardCopy, lucideBadge, lucideZoomOut, lucideZoomIn, lucideWand2, lucideTicket, lucideTags, lucideTag, lucideShoppingBag, lucidePackageCheck, lucideClipboardPen, lucideReceipt, lucidePercent, lucideType, lucideBuilding, lucideBan, lucideFunnelX, lucideFilter, lucideAlertTriangle, lucideGitBranch, lucideMoreVertical, lucideSearchX, lucidePin, lucideGripVertical, lucideTable2, lucideFileArchive, lucideFileJson, lucideFileCode, lucideMusic, lucideFile, lucideDownload, lucideUploadCloud, lucideUpload, lucideToggleLeft, lucideCircleDot, lucideSquareCheck, lucideSparkles, lucideFolders, lucideUserSearch, lucidePieChart, lucideTextCursor, lucideListFilter, lucideNavigation, lucideFileEdit, lucideSliders, lucideCheckCircle, lucideFolderTree, lucideGrid3x3, lucideUsers2, lucideBarChart3, lucideRocket, lucideSquare, lucidePenTool, lucideMegaphone, lucideHash, lucideList, lucideImage, lucideGripHorizontal, lucideCircleHelp, lucideFileOutput, lucideLayoutTemplate, lucideSquarePen, lucideFolderOpen, lucideHome, lucideBarChart, lucideCloud, lucideLifeBuoy, lucideGithub, lucideLoader2, lucidePanelRightOpen, lucideComponent, lucideMessageCircleQuestion, lucideCircleAlert, lucideMessageCircle, lucideAlertOctagon, lucideLoader, lucideMoon, lucideSun, lucideListChevronsUpDown, lucideListChevronsDownUp, lucideFileCheck, lucideDatabaseBackup, lucideLink, lucideXCircle, lucideAlertCircle, lucideCheckCircle2, lucideBell, lucideChartColumnIncreasing, lucideBrushCleaning, lucideFastForward, lucideListChecks, lucideRefreshCwOff, lucideFileClock, lucideBookUp2, lucideFilePlus2, lucideFilePlus, lucideListPlus, lucideScanLine, lucideQrCode, lucideScanQrCode, lucideCode, lucideBarcode, lucideHardDriveDownload, lucideMailPlus, lucideCloudCheck, lucideWifiZero, lucideFileSymlink, lucideLockKeyholeOpen, lucideBadgeX, lucideCircleCheckBig, lucideShieldCheck, lucideBadgeCheck, lucideCheckLine, lucideCircleX, lucideArrowDownUp, lucideFilePenLine, lucideUserRoundPen, lucideCopy, lucidePaperclip, lucidePause, lucideSend, lucideBot, lucideTableOfContents, lucideFileUp, lucideNotepadText, lucideCalendarCheck, lucideCalendar1, lucideCalendarRange, lucideChartLine, lucideChartPie, lucideChartBar, lucideHouse, lucideCircleCheck, lucideUserLock, lucideArrowUp, lucideArrowDown, lucideLockKeyhole, lucideRefreshCcw, lucideWifi, lucideTruck, lucideTerminal, lucideTablet, lucideSmartphone, lucideServer, lucideRadio, lucidePrinter, lucidePhoneCall, lucidePalette, lucideNetwork, lucideMailCheck, lucideLightbulb, lucideKey, lucideHeadphones, lucideGlobe, lucideFileSpreadsheet, lucideCreditCard, lucideCar, lucideBuilding2, lucideWrench, lucideWallet, lucideVideo, lucideUserPlus, lucideTrendingDown, lucideTimer, lucideStethoscope, lucideStar, lucideShield, lucidePhone, lucideMonitor, lucideMapPin, lucideHospital, lucideHeart, lucideGraduationCap, lucideFileText, lucideDollarSign, lucideDatabase, lucideClipboardList, lucideCalculator, lucideCalendar, lucideBookOpen, lucideClock, lucideInbox, lucidePackageOpen, lucideBellMinus, lucideCog, lucideBox, lucideMinus, lucideBadgeInfo, lucideCrown, lucideFiles, lucideX, lucideAlignJustify, lucideFunnel, lucideFileDown, lucideTrash2, lucideSlidersHorizontal, lucideBellRing, lucideChevronsRight, lucideChevronsLeft, lucideLoaderCircle, lucideWarehouse, lucideWorkflow, lucideTarget, lucideBriefcase, lucideLayers, lucideInfo, lucideMousePointer, lucideZap, lucideActivity, lucideUserCheck, lucideShoppingCart, lucidePackage, lucideTrendingUp, lucideChevronUp, lucideLogs, lucideUsersRound, lucideChartColumn, lucideLayoutDashboard, lucidePanelLeftOpen, lucidePanelLeftClose, lucideEllipsis, lucideEyeOff, lucideEye, lucideUsers, lucideSearch, lucidePlus, lucideChevronDown, lucideChevronRight, lucideChevronLeft, lucideSettings2, lucideCalendarFold, lucidePill, lucideSettings, lucideUser, lucideLogOut, lucideLock, lucideMenu, lucideArrowRight, lucideArrowLeft, lucideLayoutGrid, lucideMail, lucidePencil, lucideCheck, lucideMessageSquareWarning, lucideTriangleAlert, lucideCheckCheck, lucideMessageSquareDot, lucideFlagTriangleRight, lucideFlag, lucideSaveAll, lucideSave, lucideClipboardPlus, lucideAlarmClock, lucideBookCheck, lucideChartBarStacked, lucideStore, lucideLayers2 } from '@ng-icons/lucide';
9
9
  import { HttpClient } from '@angular/common/http';
10
- import { of, map, catchError } from 'rxjs';
10
+ import { ZIndexDbService } from '@shival99/z-ui/services';
11
+ import { from, switchMap, of, map, tap, catchError } from 'rxjs';
11
12
 
12
13
  const zIconVariants = cva('', {
13
14
  variants: {
@@ -353,6 +354,12 @@ const Z_ICONS = {
353
354
  saxEditOutline,
354
355
  };
355
356
 
357
+ const iconCacheDb = new ZIndexDbService({
358
+ dbName: 'ZIconCache',
359
+ version: 1,
360
+ stores: [{ name: 'icons', encrypt: true }],
361
+ defaultStore: 'icons',
362
+ });
356
363
  /**
357
364
  * Normalizes Sax SVG to use currentColor and CSS variable for stroke-width.
358
365
  * This allows the icon to inherit color and strokeWidth from ng-icon props.
@@ -401,7 +408,7 @@ function convertLucideIconName(name) {
401
408
  .replace(/--+/g, '-');
402
409
  }
403
410
  /**
404
- * Converts ng-icons Iconsax icon name to CDN format.
411
+ * Converts ng-icons Sax icon name to CDN format.
405
412
  * Examples:
406
413
  * - saxCloudChangeBold -> bold/cloud-change
407
414
  * - saxPauseBold -> bold/pause
@@ -409,7 +416,7 @@ function convertLucideIconName(name) {
409
416
  * - saxHomeOutline -> outline/home
410
417
  * - saxUserLinear -> linear/user
411
418
  */
412
- function convertIconsaxIconName(name) {
419
+ function convertIconSaxIconName(name) {
413
420
  let iconPart = name.replace(/^sax/, '');
414
421
  // Extract style suffix (Bold, Outline, Linear, Bulk, Broken, TwoTone)
415
422
  const styleMatch = iconPart.match(/(Bold|Outline|Linear|Bulk|Broken|TwoTone)$/i);
@@ -430,7 +437,7 @@ function convertIconsaxIconName(name) {
430
437
  return { style: styleFolder, iconName };
431
438
  }
432
439
  const LUCIDE_CDN_URL = 'https://cdn.jsdelivr.net/npm/lucide-static@latest/icons';
433
- const ICONSAX_CDN_URL = 'https://cdn.jsdelivr.net/gh/placetopay-org/iconsax-vue@main/src/Base';
440
+ const SAX_CDN_URL = 'https://cdn.jsdelivr.net/gh/placetopay-org/iconsax-vue@main/src/Base';
434
441
  /**
435
442
  * Provides hybrid icon loading from CDN with fallback to bundled icons:
436
443
  * - Primary: Load icons from CDN (Lucide & Iconsax)
@@ -445,32 +452,36 @@ const ICONSAX_CDN_URL = 'https://cdn.jsdelivr.net/gh/placetopay-org/iconsax-vue@
445
452
  * ]
446
453
  * ```
447
454
  */
455
+ function loadWithCache(name, url, http, normalizer) {
456
+ return from(iconCacheDb.get(name)).pipe(switchMap(cached => {
457
+ if (cached) {
458
+ return of(cached);
459
+ }
460
+ return http.get(url, { responseType: 'text' }).pipe(map(normalizer), tap(svg => {
461
+ void iconCacheDb.set(name, svg);
462
+ }), catchError(error => {
463
+ console.error(`[ZIcon] Failed to load "${name}" from ${url}`, error);
464
+ return of(getFallbackIcon(name));
465
+ }));
466
+ }), catchError(() => of(getFallbackIcon(name))));
467
+ }
448
468
  function provideZIconLoader() {
449
469
  return makeEnvironmentProviders([
450
470
  provideNgIconLoader(name => {
451
471
  const http = inject(HttpClient);
452
- // Load Iconsax icons from CDN
453
472
  if (name.startsWith('sax')) {
454
- const parsed = convertIconsaxIconName(name);
473
+ const parsed = convertIconSaxIconName(name);
455
474
  if (!parsed) {
456
- console.warn(`[ZIcon] Invalid Iconsax icon name: "${name}"`);
475
+ console.warn(`[ZIcon] Invalid Sax icon name: "${name}"`);
457
476
  return of(getFallbackIcon(name));
458
477
  }
459
- const url = `${ICONSAX_CDN_URL}/${parsed.style}/${parsed.iconName}.svg`;
460
- return http.get(url, { responseType: 'text' }).pipe(map(normalizeSaxSvg), catchError(error => {
461
- console.error(`[ZIcon] Failed to load Iconsax icon "${name}" from ${url}`, error);
462
- return of(getFallbackIcon(name));
463
- }));
478
+ const url = `${SAX_CDN_URL}/${parsed.style}/${parsed.iconName}.svg`;
479
+ return loadWithCache(name, url, http, normalizeSaxSvg);
464
480
  }
465
- // Load Lucide icons from CDN
466
481
  if (name.startsWith('lucide')) {
467
482
  const iconName = convertLucideIconName(name);
468
483
  const url = `${LUCIDE_CDN_URL}/${iconName}.svg`;
469
- return http.get(url, { responseType: 'text' }).pipe(map(normalizeLucideSvg), catchError(error => {
470
- const msg = `[ZIcon] Failed to load Lucide icon "${name}"`;
471
- console.error(msg, url, error);
472
- return of(getFallbackIcon(name));
473
- }));
484
+ return loadWithCache(name, url, http, normalizeLucideSvg);
474
485
  }
475
486
  console.warn(`[ZIcon] Unknown icon: "${name}"`);
476
487
  return of(getFallbackIcon(name));
@@ -1 +1 @@
1
- {"version":3,"file":"shival99-z-ui-components-z-icon.mjs","sources":["../../../../libs/core-ui/components/z-icon/z-icon.variants.ts","../../../../libs/core-ui/components/z-icon/z-icon.component.ts","../../../../libs/core-ui/components/z-icon/z-icon.component.html","../../../../libs/core-ui/components/z-icon/z-icons.ts","../../../../libs/core-ui/components/z-icon/z-icon-loader.provider.ts","../../../../libs/core-ui/components/z-icon/shival99-z-ui-components-z-icon.ts"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\n\nexport const zIconVariants = cva('', {\n variants: {\n zSize: {\n '10': 'size-10',\n '11': 'size-11',\n '12': 'size-12',\n '13': 'size-13',\n '14': 'size-14',\n '15': 'size-15',\n '16': 'size-16',\n '17': 'size-17',\n '18': 'size-18',\n '19': 'size-19',\n '20': 'size-20',\n '21': 'size-21',\n '22': 'size-22',\n '23': 'size-23',\n '24': 'size-24',\n '25': 'size-25',\n '26': 'size-26',\n '27': 'size-27',\n '28': 'size-28',\n '29': 'size-29',\n '30': 'size-30',\n '31': 'size-31',\n '32': 'size-32',\n '33': 'size-33',\n '34': 'size-34',\n '35': 'size-35',\n '36': 'size-36',\n '37': 'size-37',\n '38': 'size-38',\n '39': 'size-39',\n '40': 'size-40',\n },\n },\n defaultVariants: {\n zSize: '16',\n },\n});\n\nexport type ZIconVariants = VariantProps<typeof zIconVariants>;\n","import { ChangeDetectionStrategy, Component, computed, input, ViewEncapsulation } from '@angular/core';\nimport { NgIconComponent as NgIcon } from '@ng-icons/core';\nimport { zMergeClasses } from '@shival99/z-ui/utils';\nimport type { ClassValue } from 'clsx';\nimport { zIconVariants, ZIconVariants } from './z-icon.variants';\nimport { type ZIcon } from './z-icons';\n\n@Component({\n selector: 'z-icon, [z-icon]',\n imports: [NgIcon],\n standalone: true,\n templateUrl: './z-icon.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n '[class]': 'zClasses()',\n '[style.width]': 'zSize() + \"px\"',\n '[style.height]': 'zSize() + \"px\"',\n },\n})\nexport class ZIconComponent {\n public readonly class = input<ClassValue>('');\n public readonly zType = input<ZIcon>();\n public readonly zSize = input<ZIconVariants['zSize']>('16');\n public readonly zStrokeWidth = input<number>(2);\n public readonly zSvg = input<string>('');\n\n protected readonly zClasses = computed(() =>\n zMergeClasses(\n zIconVariants({ zSize: this.zSize() }),\n this.class(),\n this.zStrokeWidth() === 0 ? 'stroke-none' : '',\n 'inline-flex shrink-0'\n )\n );\n}\n","@if (zSvg()) {\n <ng-icon [svg]=\"zSvg()\" [size]=\"zSize() || '16'\" [strokeWidth]=\"zStrokeWidth()\" />\n} @else {\n <ng-icon [name]=\"zType()\" [size]=\"zSize() || '16'\" [strokeWidth]=\"zStrokeWidth()\" />\n}\n","import { type IconType } from '@ng-icons/core';\nimport { saxCloudChangeBold, saxPauseBold, saxRefreshBold } from '@ng-icons/iconsax/bold';\nimport { saxEditOutline } from '@ng-icons/iconsax/outline';\nimport {\n lucideMoreVertical,\n lucideSearchX,\n lucidePin,\n lucideGripVertical,\n lucideSparkles,\n lucideList,\n lucideHash,\n lucideImage,\n lucideGripHorizontal,\n lucideHome,\n lucideFolderOpen,\n lucideGithub,\n lucideLifeBuoy,\n lucideCloud,\n lucideActivity,\n lucideAlarmClock,\n lucideAlertCircle,\n lucideAlertOctagon,\n lucideAlignJustify,\n lucideArrowDown,\n lucideArrowDownUp,\n lucideArrowLeft,\n lucideArrowRight,\n lucideArrowUp,\n lucideBadgeCheck,\n lucideBadgeInfo,\n lucideBadgeX,\n lucideBarcode,\n lucideBell,\n lucideBellMinus,\n lucideBellRing,\n lucideBookCheck,\n lucideBookOpen,\n lucideBookUp2,\n lucideBot,\n lucideBotMessageSquare,\n lucideBotOff,\n lucideBrain,\n lucideBrainCircuit,\n lucideBrainCog,\n lucideBox,\n lucideBriefcase,\n lucideBrushCleaning,\n lucideBuilding2,\n lucideCalculator,\n lucideCalendar,\n lucideCalendar1,\n lucideCalendarCheck,\n lucideCalendarFold,\n lucideCalendarRange,\n lucideCar,\n lucideChartBar,\n lucideChartBarStacked,\n lucideChartColumn,\n lucideChartColumnIncreasing,\n lucideChartLine,\n lucideChartPie,\n lucideCheck,\n lucideEllipsisVertical,\n lucideCheckCheck,\n lucideCheckCircle2,\n lucideCheckLine,\n lucideChevronDown,\n lucideChevronLeft,\n lucideChevronRight,\n lucideChevronsLeft,\n lucideChevronsRight,\n lucideChevronUp,\n lucideCircleAlert,\n lucideCircleCheck,\n lucideCircleCheckBig,\n lucideCircleX,\n lucideClipboardList,\n lucideClipboardPlus,\n lucideClock,\n lucideCloudCheck,\n lucideCode,\n lucideCog,\n lucideComponent,\n lucideCopy,\n lucideCreditCard,\n lucideCrown,\n lucideDatabase,\n lucideDatabaseBackup,\n lucideDollarSign,\n lucideEllipsis,\n lucideEye,\n lucideEyeOff,\n lucideFastForward,\n lucideFileCheck,\n lucideFileClock,\n lucideFileDown,\n lucideFilePenLine,\n lucideFilePlus,\n lucideFilePlus2,\n lucideFiles,\n lucideFileSpreadsheet,\n lucideFileSymlink,\n lucideFileText,\n lucideFileUp,\n lucideFlag,\n lucideFlagTriangleRight,\n lucideFilter,\n lucideFunnel,\n lucideFunnelX,\n lucideGlobe,\n lucideGraduationCap,\n lucideHardDriveDownload,\n lucideHeadphones,\n lucideHeart,\n lucideHospital,\n lucideHouse,\n lucideInbox,\n lucideInfo,\n lucideKey,\n lucideLayers,\n lucideLayers2,\n lucideLayoutDashboard,\n lucideLayoutGrid,\n lucideLightbulb,\n lucideLink,\n lucideListChecks,\n lucideListChevronsDownUp,\n lucideListChevronsUpDown,\n lucideListPlus,\n lucideLoader,\n lucideLoader2,\n lucideLoaderCircle,\n lucideLock,\n lucideLockKeyhole,\n lucideLockKeyholeOpen,\n lucideLogOut,\n lucideLogs,\n lucideMail,\n lucideMailCheck,\n lucideMailPlus,\n lucideMapPin,\n lucideMenu,\n lucideMessageCircle,\n lucideMessageCircleQuestion,\n lucideMessageSquareDot,\n lucideMessageSquareWarning,\n lucideMinus,\n lucideMonitor,\n lucideMoon,\n lucideMousePointer,\n lucideNetwork,\n lucideNotepadText,\n lucidePackage,\n lucidePackageOpen,\n lucidePalette,\n lucidePanelLeftClose,\n lucidePanelLeftOpen,\n lucidePanelRightOpen,\n lucidePaperclip,\n lucidePause,\n lucidePencil,\n lucidePhone,\n lucidePhoneCall,\n lucidePill,\n lucidePlus,\n lucidePrinter,\n lucideQrCode,\n lucideRadio,\n lucideRefreshCcw,\n lucideRefreshCwOff,\n lucideSave,\n lucideSaveAll,\n lucideScanLine,\n lucideScanQrCode,\n lucideSearch,\n lucideSend,\n lucideServer,\n lucideSettings,\n lucideSettings2,\n lucideShield,\n lucideShieldCheck,\n lucideShoppingCart,\n lucideSlidersHorizontal,\n lucideSmartphone,\n lucideStar,\n lucideStethoscope,\n lucideStore,\n lucideSun,\n lucideTableOfContents,\n lucideTablet,\n lucideTarget,\n lucideTerminal,\n lucideTimer,\n lucideTrash2,\n lucideTrendingDown,\n lucideTrendingUp,\n lucideTriangleAlert,\n lucideTruck,\n lucideUser,\n lucideUserCheck,\n lucideUserLock,\n lucideUserPlus,\n lucideUserRoundPen,\n lucideUsers,\n lucideUsersRound,\n lucideVideo,\n lucideWallet,\n lucideWarehouse,\n lucideWifi,\n lucideWifiZero,\n lucideWorkflow,\n lucideWrench,\n lucideX,\n lucideXCircle,\n lucideZap,\n lucideBarChart,\n lucideFileOutput,\n lucideLayoutTemplate,\n lucideSquarePen,\n lucideCircleHelp,\n lucideMegaphone,\n lucideSquare,\n lucidePenTool,\n lucideRocket,\n lucideBarChart3,\n lucideCheckCircle,\n lucideFolderTree,\n lucideGrid3x3,\n lucideSliders,\n lucideUsers2,\n lucideFileEdit,\n lucideNavigation,\n lucideListFilter,\n lucideTextCursor,\n lucidePieChart,\n lucideFolders,\n lucideUserSearch,\n lucideSquareCheck,\n lucideCircleDot,\n lucideToggleLeft,\n lucideUpload,\n lucideUploadCloud,\n lucideDownload,\n lucideFile,\n lucideMusic,\n lucideFileCode,\n lucideFileJson,\n lucideFileArchive,\n lucideTable2,\n lucideGitBranch,\n lucideAlertTriangle,\n lucideBan,\n lucideBuilding,\n lucideType,\n lucidePercent,\n lucideReceipt,\n lucideClipboardPen,\n lucidePackageCheck,\n lucideShoppingBag,\n lucideTag,\n lucideTags,\n lucideTicket,\n lucideWand2,\n lucideZoomIn,\n lucideZoomOut,\n lucideBadge,\n lucideClipboardCopy,\n lucideContact,\n lucideIdCard,\n lucideRecycle,\n lucidePlug2,\n lucidePlug,\n lucideCpu,\n lucideDumbbell,\n lucideSparkle,\n lucideWandSparkles,\n lucideMessageSquareText,\n lucideMic,\n lucideAudioLines,\n lucidePlay,\n lucideSquarePlay,\n} from '@ng-icons/lucide';\n\nexport const Z_ICONS = {\n lucideLayers2,\n lucideStore,\n lucideChartBarStacked,\n lucideBookCheck,\n lucideAlarmClock,\n lucideClipboardPlus,\n lucideSave,\n lucideSaveAll,\n lucideFlag,\n lucideFlagTriangleRight,\n lucideMessageSquareDot,\n lucideCheckCheck,\n lucideTriangleAlert,\n lucideMessageSquareWarning,\n lucideCheck,\n lucidePencil,\n lucideMail,\n lucideLayoutGrid,\n lucideArrowLeft,\n lucideArrowRight,\n lucideMenu,\n lucideLock,\n lucideLogOut,\n lucideUser,\n lucideSettings,\n lucidePill,\n lucideCalendarFold,\n lucideSettings2,\n lucideChevronLeft,\n lucideChevronRight,\n lucideChevronDown,\n lucidePlus,\n lucideSearch,\n lucideUsers,\n lucideEye,\n lucideEyeOff,\n lucideEllipsis,\n lucidePanelLeftClose,\n lucidePanelLeftOpen,\n lucideLayoutDashboard,\n lucideChartColumn,\n lucideUsersRound,\n lucideLogs,\n lucideChevronUp,\n lucideTrendingUp,\n lucidePackage,\n lucideShoppingCart,\n lucideUserCheck,\n lucideActivity,\n lucideZap,\n lucideMousePointer,\n lucideInfo,\n lucideLayers,\n lucideBriefcase,\n lucideTarget,\n lucideWorkflow,\n lucideWarehouse,\n lucideLoaderCircle,\n lucideChevronsLeft,\n lucideChevronsRight,\n lucideBellRing,\n lucideSlidersHorizontal,\n lucideTrash2,\n lucideFileDown,\n lucideFunnel,\n lucideAlignJustify,\n lucideX,\n lucideFiles,\n lucideCrown,\n lucideBadgeInfo,\n lucideMinus,\n lucideBox,\n lucideCog,\n lucideBellMinus,\n lucidePackageOpen,\n lucideInbox,\n lucideClock,\n lucideBookOpen,\n lucideCalendar,\n lucideCalculator,\n lucideClipboardList,\n lucideDatabase,\n lucideDollarSign,\n lucideFileText,\n lucideGraduationCap,\n lucideHeart,\n lucideHospital,\n lucideMapPin,\n lucideMonitor,\n lucidePhone,\n lucideShield,\n lucideStar,\n lucideStethoscope,\n lucideTimer,\n lucideTrendingDown,\n lucideUserPlus,\n lucideVideo,\n lucideWallet,\n lucideWrench,\n lucideBuilding2,\n lucideCar,\n lucideCreditCard,\n lucideFileSpreadsheet,\n lucideGlobe,\n lucideHeadphones,\n lucideKey,\n lucideLightbulb,\n lucideMailCheck,\n lucideNetwork,\n lucidePalette,\n lucidePhoneCall,\n lucidePrinter,\n lucideRadio,\n lucideServer,\n lucideSmartphone,\n lucideTablet,\n lucideTerminal,\n lucideTruck,\n lucideWifi,\n lucideRefreshCcw,\n lucideLockKeyhole,\n lucideArrowDown,\n lucideArrowUp,\n lucideUserLock,\n lucideCircleCheck,\n lucideHouse,\n lucideChartBar,\n lucideChartPie,\n lucideChartLine,\n lucideCalendarRange,\n lucideCalendar1,\n lucideCalendarCheck,\n lucideNotepadText,\n lucideFileUp,\n lucideTableOfContents,\n lucideBot,\n lucideSend,\n lucidePause,\n lucidePaperclip,\n saxPauseBold,\n lucideCopy,\n lucideUserRoundPen,\n lucideFilePenLine,\n lucideArrowDownUp,\n lucideCircleX,\n lucideCheckLine,\n lucideBadgeCheck,\n lucideShieldCheck,\n lucideCircleCheckBig,\n lucideBadgeX,\n lucideLockKeyholeOpen,\n lucideFileSymlink,\n lucideWifiZero,\n lucideCloudCheck,\n lucideMailPlus,\n lucideHardDriveDownload,\n saxCloudChangeBold,\n saxRefreshBold,\n lucideBarcode,\n lucideCode,\n lucideScanQrCode,\n lucideQrCode,\n lucideScanLine,\n lucideListPlus,\n lucideFilePlus,\n lucideFilePlus2,\n lucideBookUp2,\n lucideFileClock,\n lucideRefreshCwOff,\n lucideListChecks,\n lucideFastForward,\n lucideBrushCleaning,\n lucideChartColumnIncreasing,\n lucideBell,\n lucideCheckCircle2,\n lucideAlertCircle,\n lucideXCircle,\n lucideLink,\n lucideDatabaseBackup,\n lucideFileCheck,\n lucideListChevronsDownUp,\n lucideListChevronsUpDown,\n lucideSun,\n lucideMoon,\n lucideLoader,\n lucideAlertOctagon,\n lucideMessageCircle,\n lucideCircleAlert,\n lucideMessageCircleQuestion,\n lucideComponent,\n lucidePanelRightOpen,\n lucideLoader2,\n lucideGithub,\n lucideLifeBuoy,\n lucideCloud,\n lucideBarChart,\n lucideHome,\n lucideFolderOpen,\n lucideSquarePen,\n lucideLayoutTemplate,\n lucideFileOutput,\n lucideCircleHelp,\n lucideGripHorizontal,\n lucideImage,\n lucideList,\n lucideHash,\n lucideMegaphone,\n lucidePenTool,\n lucideSquare,\n lucideRocket,\n lucideBarChart3,\n lucideUsers2,\n lucideGrid3x3,\n lucideFolderTree,\n lucideCheckCircle,\n lucideSliders,\n lucideFileEdit,\n lucideNavigation,\n lucideListFilter,\n lucideTextCursor,\n lucidePieChart,\n lucideUserSearch,\n lucideFolders,\n lucideSparkles,\n lucideSquareCheck,\n lucideCircleDot,\n lucideToggleLeft,\n lucideUpload,\n lucideUploadCloud,\n lucideDownload,\n lucideFile,\n lucideMusic,\n lucideFileCode,\n lucideFileJson,\n lucideFileArchive,\n lucideTable2,\n lucideGripVertical,\n lucidePin,\n lucideSearchX,\n lucideMoreVertical,\n lucideGitBranch,\n lucideAlertTriangle,\n lucideFilter,\n lucideFunnelX,\n lucideBan,\n lucideBuilding,\n lucideType,\n lucidePercent,\n lucideReceipt,\n lucideClipboardPen,\n lucidePackageCheck,\n lucideShoppingBag,\n lucideTag,\n lucideTags,\n lucideTicket,\n lucideWand2,\n lucideZoomIn,\n lucideZoomOut,\n lucideBadge,\n lucideClipboardCopy,\n lucideContact,\n lucideIdCard,\n lucideRecycle,\n lucidePlug,\n lucidePlug2,\n lucideBotMessageSquare,\n lucideBotOff,\n lucideBrain,\n lucideBrainCircuit,\n lucideBrainCog,\n lucideCpu,\n lucideDumbbell,\n lucideSparkle,\n lucideWandSparkles,\n lucideMessageSquareText,\n lucideMic,\n lucideAudioLines,\n lucidePlay,\n lucideSquarePlay,\n lucideEllipsisVertical,\n saxEditOutline,\n} as const satisfies Record<string, IconType>;\n\nexport declare type ZIcon = keyof typeof Z_ICONS;\n","import { HttpClient } from '@angular/common/http';\nimport { type EnvironmentProviders, inject, makeEnvironmentProviders } from '@angular/core';\nimport { provideNgIconLoader, withCaching } from '@ng-icons/core';\nimport { catchError, map, of } from 'rxjs';\nimport { Z_ICONS } from './z-icons';\n\n/**\n * Normalizes Sax SVG to use currentColor and CSS variable for stroke-width.\n * This allows the icon to inherit color and strokeWidth from ng-icon props.\n */\nfunction normalizeSaxSvg(svg: string): string {\n const cssVar = 'style=\"stroke-width: var(--ng-icon__stroke-width, 2)\"';\n const normalized = svg.replace(/fill=\"#292D32\"/gi, 'fill=\"currentColor\"');\n return normalized.replace(/stroke-width=\"[^\"]*\"/gi, cssVar);\n}\n\n/**\n * Normalizes Lucide SVG to use CSS variable for stroke-width.\n * This allows ng-icon strokeWidth prop to work correctly.\n * Replaces hardcoded stroke-width with var(--ng-icon__stroke-width, 2).\n */\nfunction normalizeLucideSvg(svg: string): string {\n const cssVar = 'style=\"stroke-width: var(--ng-icon__stroke-width, 2)\"';\n return svg.replace(/stroke-width=\"[^\"]*\"/gi, cssVar);\n}\n\n/**\n * Gets fallback icon from bundled Z_ICONS if available.\n */\nfunction getFallbackIcon(name: string): string {\n const icon = Z_ICONS[name as keyof typeof Z_ICONS];\n if (icon) {\n console.warn(`[ZIcon] Using bundled fallback for \"${name}\"`);\n return icon;\n }\n return '';\n}\n\n/**\n * Converts ng-icons icon name to Lucide CDN format.\n * Examples:\n * - lucideArrowLeft -> arrow-left\n * - lucideAlertCircle -> alert-circle\n * - lucideTrash2 -> trash-2\n * - lucideGrid3x3 -> grid-3-x-3\n */\nfunction convertLucideIconName(name: string): string {\n return name\n .replace(/^lucide/, '')\n .replace(/([A-Z])/g, '-$1')\n .replace(/(\\d+)/g, '-$1')\n .replace(/(\\d)([a-z])/g, '$1-$2')\n .toLowerCase()\n .replace(/^-/, '')\n .replace(/--+/g, '-');\n}\n\n/**\n * Converts ng-icons Iconsax icon name to CDN format.\n * Examples:\n * - saxCloudChangeBold -> bold/cloud-change\n * - saxPauseBold -> bold/pause\n * - saxRefreshBold -> bold/refresh\n * - saxHomeOutline -> outline/home\n * - saxUserLinear -> linear/user\n */\nfunction convertIconsaxIconName(name: string): { style: string; iconName: string } | null {\n let iconPart = name.replace(/^sax/, '');\n // Extract style suffix (Bold, Outline, Linear, Bulk, Broken, TwoTone)\n const styleMatch = iconPart.match(/(Bold|Outline|Linear|Bulk|Broken|TwoTone)$/i);\n if (!styleMatch) {\n return null;\n }\n\n const style = styleMatch[1].toLowerCase();\n const styleFolder = style === 'twotone' ? 'twotone' : style;\n // Remove style suffix from icon name\n iconPart = iconPart.replace(/(Bold|Outline|Linear|Bulk|Broken|TwoTone)$/i, '');\n\n // Convert PascalCase to kebab-case\n const iconName = iconPart\n .replace(/([A-Z])/g, '-$1')\n .replace(/(\\d+)/g, '-$1')\n .toLowerCase()\n .replace(/^-/, '')\n .replace(/--+/g, '-');\n\n return { style: styleFolder, iconName };\n}\n\nconst LUCIDE_CDN_URL = 'https://cdn.jsdelivr.net/npm/lucide-static@latest/icons';\nconst ICONSAX_CDN_URL = 'https://cdn.jsdelivr.net/gh/placetopay-org/iconsax-vue@main/src/Base';\n\n/**\n * Provides hybrid icon loading from CDN with fallback to bundled icons:\n * - Primary: Load icons from CDN (Lucide & Iconsax)\n * - Fallback: Use bundled icons from Z_ICONS if CDN fails\n *\n * @example\n * ```typescript\n * // app.config.ts\n * providers: [\n * provideHttpClient(),\n * provideZIconLoader(),\n * ]\n * ```\n */\nexport function provideZIconLoader(): EnvironmentProviders {\n return makeEnvironmentProviders([\n provideNgIconLoader(name => {\n const http = inject(HttpClient);\n\n // Load Iconsax icons from CDN\n if (name.startsWith('sax')) {\n const parsed = convertIconsaxIconName(name);\n if (!parsed) {\n console.warn(`[ZIcon] Invalid Iconsax icon name: \"${name}\"`);\n return of(getFallbackIcon(name));\n }\n\n const url = `${ICONSAX_CDN_URL}/${parsed.style}/${parsed.iconName}.svg`;\n\n return http.get(url, { responseType: 'text' }).pipe(\n map(normalizeSaxSvg),\n catchError(error => {\n console.error(`[ZIcon] Failed to load Iconsax icon \"${name}\" from ${url}`, error);\n return of(getFallbackIcon(name));\n })\n );\n }\n\n // Load Lucide icons from CDN\n if (name.startsWith('lucide')) {\n const iconName = convertLucideIconName(name);\n const url = `${LUCIDE_CDN_URL}/${iconName}.svg`;\n\n return http.get(url, { responseType: 'text' }).pipe(\n map(normalizeLucideSvg),\n catchError(error => {\n const msg = `[ZIcon] Failed to load Lucide icon \"${name}\"`;\n console.error(msg, url, error);\n return of(getFallbackIcon(name));\n })\n );\n }\n\n console.warn(`[ZIcon] Unknown icon: \"${name}\"`);\n return of(getFallbackIcon(name));\n }, withCaching()),\n ]);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["NgIcon"],"mappings":";;;;;;;;;;;AAEO,MAAM,aAAa,GAAG,GAAG,CAAC,EAAE,EAAE;AACnC,IAAA,QAAQ,EAAE;AACR,QAAA,KAAK,EAAE;AACL,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,IAAI,EAAE,S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AC,EAAE,WAAW,EAAE,CAAC;AAClB,KAAA,CAAC;AACJ;;ACtJA;;AAEG;;;;"}
1
+ {"version":3,"file":"shival99-z-ui-components-z-icon.mjs","sources":["../../../../libs/core-ui/components/z-icon/z-icon.variants.ts","../../../../libs/core-ui/components/z-icon/z-icon.component.ts","../../../../libs/core-ui/components/z-icon/z-icon.component.html","../../../../libs/core-ui/components/z-icon/z-icons.ts","../../../../libs/core-ui/components/z-icon/z-icon-loader.provider.ts","../../../../libs/core-ui/components/z-icon/shival99-z-ui-components-z-icon.ts"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\n\nexport const zIconVariants = cva('', {\n variants: {\n zSize: {\n '10': 'size-10',\n '11': 'size-11',\n '12': 'size-12',\n '13': 'size-13',\n '14': 'size-14',\n '15': 'size-15',\n '16': 'size-16',\n '17': 'size-17',\n '18': 'size-18',\n '19': 'size-19',\n '20': 'size-20',\n '21': 'size-21',\n '22': 'size-22',\n '23': 'size-23',\n '24': 'size-24',\n '25': 'size-25',\n '26': 'size-26',\n '27': 'size-27',\n '28': 'size-28',\n '29': 'size-29',\n '30': 'size-30',\n '31': 'size-31',\n '32': 'size-32',\n '33': 'size-33',\n '34': 'size-34',\n '35': 'size-35',\n '36': 'size-36',\n '37': 'size-37',\n '38': 'size-38',\n '39': 'size-39',\n '40': 'size-40',\n },\n },\n defaultVariants: {\n zSize: '16',\n },\n});\n\nexport type ZIconVariants = VariantProps<typeof zIconVariants>;\n","import { ChangeDetectionStrategy, Component, computed, input, ViewEncapsulation } from '@angular/core';\nimport { NgIconComponent as NgIcon } from '@ng-icons/core';\nimport { zMergeClasses } from '@shival99/z-ui/utils';\nimport type { ClassValue } from 'clsx';\nimport { zIconVariants, ZIconVariants } from './z-icon.variants';\nimport { type ZIcon } from './z-icons';\n\n@Component({\n selector: 'z-icon, [z-icon]',\n imports: [NgIcon],\n standalone: true,\n templateUrl: './z-icon.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n '[class]': 'zClasses()',\n '[style.width]': 'zSize() + \"px\"',\n '[style.height]': 'zSize() + \"px\"',\n },\n})\nexport class ZIconComponent {\n public readonly class = input<ClassValue>('');\n public readonly zType = input<ZIcon>();\n public readonly zSize = input<ZIconVariants['zSize']>('16');\n public readonly zStrokeWidth = input<number>(2);\n public readonly zSvg = input<string>('');\n\n protected readonly zClasses = computed(() =>\n zMergeClasses(\n zIconVariants({ zSize: this.zSize() }),\n this.class(),\n this.zStrokeWidth() === 0 ? 'stroke-none' : '',\n 'inline-flex shrink-0'\n )\n );\n}\n","@if (zSvg()) {\n <ng-icon [svg]=\"zSvg()\" [size]=\"zSize() || '16'\" [strokeWidth]=\"zStrokeWidth()\" />\n} @else {\n <ng-icon [name]=\"zType()\" [size]=\"zSize() || '16'\" [strokeWidth]=\"zStrokeWidth()\" />\n}\n","import { type IconType } from '@ng-icons/core';\nimport { saxCloudChangeBold, saxPauseBold, saxRefreshBold } from '@ng-icons/iconsax/bold';\nimport { saxEditOutline } from '@ng-icons/iconsax/outline';\nimport {\n lucideMoreVertical,\n lucideSearchX,\n lucidePin,\n lucideGripVertical,\n lucideSparkles,\n lucideList,\n lucideHash,\n lucideImage,\n lucideGripHorizontal,\n lucideHome,\n lucideFolderOpen,\n lucideGithub,\n lucideLifeBuoy,\n lucideCloud,\n lucideActivity,\n lucideAlarmClock,\n lucideAlertCircle,\n lucideAlertOctagon,\n lucideAlignJustify,\n lucideArrowDown,\n lucideArrowDownUp,\n lucideArrowLeft,\n lucideArrowRight,\n lucideArrowUp,\n lucideBadgeCheck,\n lucideBadgeInfo,\n lucideBadgeX,\n lucideBarcode,\n lucideBell,\n lucideBellMinus,\n lucideBellRing,\n lucideBookCheck,\n lucideBookOpen,\n lucideBookUp2,\n lucideBot,\n lucideBotMessageSquare,\n lucideBotOff,\n lucideBrain,\n lucideBrainCircuit,\n lucideBrainCog,\n lucideBox,\n lucideBriefcase,\n lucideBrushCleaning,\n lucideBuilding2,\n lucideCalculator,\n lucideCalendar,\n lucideCalendar1,\n lucideCalendarCheck,\n lucideCalendarFold,\n lucideCalendarRange,\n lucideCar,\n lucideChartBar,\n lucideChartBarStacked,\n lucideChartColumn,\n lucideChartColumnIncreasing,\n lucideChartLine,\n lucideChartPie,\n lucideCheck,\n lucideEllipsisVertical,\n lucideCheckCheck,\n lucideCheckCircle2,\n lucideCheckLine,\n lucideChevronDown,\n lucideChevronLeft,\n lucideChevronRight,\n lucideChevronsLeft,\n lucideChevronsRight,\n lucideChevronUp,\n lucideCircleAlert,\n lucideCircleCheck,\n lucideCircleCheckBig,\n lucideCircleX,\n lucideClipboardList,\n lucideClipboardPlus,\n lucideClock,\n lucideCloudCheck,\n lucideCode,\n lucideCog,\n lucideComponent,\n lucideCopy,\n lucideCreditCard,\n lucideCrown,\n lucideDatabase,\n lucideDatabaseBackup,\n lucideDollarSign,\n lucideEllipsis,\n lucideEye,\n lucideEyeOff,\n lucideFastForward,\n lucideFileCheck,\n lucideFileClock,\n lucideFileDown,\n lucideFilePenLine,\n lucideFilePlus,\n lucideFilePlus2,\n lucideFiles,\n lucideFileSpreadsheet,\n lucideFileSymlink,\n lucideFileText,\n lucideFileUp,\n lucideFlag,\n lucideFlagTriangleRight,\n lucideFilter,\n lucideFunnel,\n lucideFunnelX,\n lucideGlobe,\n lucideGraduationCap,\n lucideHardDriveDownload,\n lucideHeadphones,\n lucideHeart,\n lucideHospital,\n lucideHouse,\n lucideInbox,\n lucideInfo,\n lucideKey,\n lucideLayers,\n lucideLayers2,\n lucideLayoutDashboard,\n lucideLayoutGrid,\n lucideLightbulb,\n lucideLink,\n lucideListChecks,\n lucideListChevronsDownUp,\n lucideListChevronsUpDown,\n lucideListPlus,\n lucideLoader,\n lucideLoader2,\n lucideLoaderCircle,\n lucideLock,\n lucideLockKeyhole,\n lucideLockKeyholeOpen,\n lucideLogOut,\n lucideLogs,\n lucideMail,\n lucideMailCheck,\n lucideMailPlus,\n lucideMapPin,\n lucideMenu,\n lucideMessageCircle,\n lucideMessageCircleQuestion,\n lucideMessageSquareDot,\n lucideMessageSquareWarning,\n lucideMinus,\n lucideMonitor,\n lucideMoon,\n lucideMousePointer,\n lucideNetwork,\n lucideNotepadText,\n lucidePackage,\n lucidePackageOpen,\n lucidePalette,\n lucidePanelLeftClose,\n lucidePanelLeftOpen,\n lucidePanelRightOpen,\n lucidePaperclip,\n lucidePause,\n lucidePencil,\n lucidePhone,\n lucidePhoneCall,\n lucidePill,\n lucidePlus,\n lucidePrinter,\n lucideQrCode,\n lucideRadio,\n lucideRefreshCcw,\n lucideRefreshCwOff,\n lucideSave,\n lucideSaveAll,\n lucideScanLine,\n lucideScanQrCode,\n lucideSearch,\n lucideSend,\n lucideServer,\n lucideSettings,\n lucideSettings2,\n lucideShield,\n lucideShieldCheck,\n lucideShoppingCart,\n lucideSlidersHorizontal,\n lucideSmartphone,\n lucideStar,\n lucideStethoscope,\n lucideStore,\n lucideSun,\n lucideTableOfContents,\n lucideTablet,\n lucideTarget,\n lucideTerminal,\n lucideTimer,\n lucideTrash2,\n lucideTrendingDown,\n lucideTrendingUp,\n lucideTriangleAlert,\n lucideTruck,\n lucideUser,\n lucideUserCheck,\n lucideUserLock,\n lucideUserPlus,\n lucideUserRoundPen,\n lucideUsers,\n lucideUsersRound,\n lucideVideo,\n lucideWallet,\n lucideWarehouse,\n lucideWifi,\n lucideWifiZero,\n lucideWorkflow,\n lucideWrench,\n lucideX,\n lucideXCircle,\n lucideZap,\n lucideBarChart,\n lucideFileOutput,\n lucideLayoutTemplate,\n lucideSquarePen,\n lucideCircleHelp,\n lucideMegaphone,\n lucideSquare,\n lucidePenTool,\n lucideRocket,\n lucideBarChart3,\n lucideCheckCircle,\n lucideFolderTree,\n lucideGrid3x3,\n lucideSliders,\n lucideUsers2,\n lucideFileEdit,\n lucideNavigation,\n lucideListFilter,\n lucideTextCursor,\n lucidePieChart,\n lucideFolders,\n lucideUserSearch,\n lucideSquareCheck,\n lucideCircleDot,\n lucideToggleLeft,\n lucideUpload,\n lucideUploadCloud,\n lucideDownload,\n lucideFile,\n lucideMusic,\n lucideFileCode,\n lucideFileJson,\n lucideFileArchive,\n lucideTable2,\n lucideGitBranch,\n lucideAlertTriangle,\n lucideBan,\n lucideBuilding,\n lucideType,\n lucidePercent,\n lucideReceipt,\n lucideClipboardPen,\n lucidePackageCheck,\n lucideShoppingBag,\n lucideTag,\n lucideTags,\n lucideTicket,\n lucideWand2,\n lucideZoomIn,\n lucideZoomOut,\n lucideBadge,\n lucideClipboardCopy,\n lucideContact,\n lucideIdCard,\n lucideRecycle,\n lucidePlug2,\n lucidePlug,\n lucideCpu,\n lucideDumbbell,\n lucideSparkle,\n lucideWandSparkles,\n lucideMessageSquareText,\n lucideMic,\n lucideAudioLines,\n lucidePlay,\n lucideSquarePlay,\n} from '@ng-icons/lucide';\n\nexport const Z_ICONS = {\n lucideLayers2,\n lucideStore,\n lucideChartBarStacked,\n lucideBookCheck,\n lucideAlarmClock,\n lucideClipboardPlus,\n lucideSave,\n lucideSaveAll,\n lucideFlag,\n lucideFlagTriangleRight,\n lucideMessageSquareDot,\n lucideCheckCheck,\n lucideTriangleAlert,\n lucideMessageSquareWarning,\n lucideCheck,\n lucidePencil,\n lucideMail,\n lucideLayoutGrid,\n lucideArrowLeft,\n lucideArrowRight,\n lucideMenu,\n lucideLock,\n lucideLogOut,\n lucideUser,\n lucideSettings,\n lucidePill,\n lucideCalendarFold,\n lucideSettings2,\n lucideChevronLeft,\n lucideChevronRight,\n lucideChevronDown,\n lucidePlus,\n lucideSearch,\n lucideUsers,\n lucideEye,\n lucideEyeOff,\n lucideEllipsis,\n lucidePanelLeftClose,\n lucidePanelLeftOpen,\n lucideLayoutDashboard,\n lucideChartColumn,\n lucideUsersRound,\n lucideLogs,\n lucideChevronUp,\n lucideTrendingUp,\n lucidePackage,\n lucideShoppingCart,\n lucideUserCheck,\n lucideActivity,\n lucideZap,\n lucideMousePointer,\n lucideInfo,\n lucideLayers,\n lucideBriefcase,\n lucideTarget,\n lucideWorkflow,\n lucideWarehouse,\n lucideLoaderCircle,\n lucideChevronsLeft,\n lucideChevronsRight,\n lucideBellRing,\n lucideSlidersHorizontal,\n lucideTrash2,\n lucideFileDown,\n lucideFunnel,\n lucideAlignJustify,\n lucideX,\n lucideFiles,\n lucideCrown,\n lucideBadgeInfo,\n lucideMinus,\n lucideBox,\n lucideCog,\n lucideBellMinus,\n lucidePackageOpen,\n lucideInbox,\n lucideClock,\n lucideBookOpen,\n lucideCalendar,\n lucideCalculator,\n lucideClipboardList,\n lucideDatabase,\n lucideDollarSign,\n lucideFileText,\n lucideGraduationCap,\n lucideHeart,\n lucideHospital,\n lucideMapPin,\n lucideMonitor,\n lucidePhone,\n lucideShield,\n lucideStar,\n lucideStethoscope,\n lucideTimer,\n lucideTrendingDown,\n lucideUserPlus,\n lucideVideo,\n lucideWallet,\n lucideWrench,\n lucideBuilding2,\n lucideCar,\n lucideCreditCard,\n lucideFileSpreadsheet,\n lucideGlobe,\n lucideHeadphones,\n lucideKey,\n lucideLightbulb,\n lucideMailCheck,\n lucideNetwork,\n lucidePalette,\n lucidePhoneCall,\n lucidePrinter,\n lucideRadio,\n lucideServer,\n lucideSmartphone,\n lucideTablet,\n lucideTerminal,\n lucideTruck,\n lucideWifi,\n lucideRefreshCcw,\n lucideLockKeyhole,\n lucideArrowDown,\n lucideArrowUp,\n lucideUserLock,\n lucideCircleCheck,\n lucideHouse,\n lucideChartBar,\n lucideChartPie,\n lucideChartLine,\n lucideCalendarRange,\n lucideCalendar1,\n lucideCalendarCheck,\n lucideNotepadText,\n lucideFileUp,\n lucideTableOfContents,\n lucideBot,\n lucideSend,\n lucidePause,\n lucidePaperclip,\n saxPauseBold,\n lucideCopy,\n lucideUserRoundPen,\n lucideFilePenLine,\n lucideArrowDownUp,\n lucideCircleX,\n lucideCheckLine,\n lucideBadgeCheck,\n lucideShieldCheck,\n lucideCircleCheckBig,\n lucideBadgeX,\n lucideLockKeyholeOpen,\n lucideFileSymlink,\n lucideWifiZero,\n lucideCloudCheck,\n lucideMailPlus,\n lucideHardDriveDownload,\n saxCloudChangeBold,\n saxRefreshBold,\n lucideBarcode,\n lucideCode,\n lucideScanQrCode,\n lucideQrCode,\n lucideScanLine,\n lucideListPlus,\n lucideFilePlus,\n lucideFilePlus2,\n lucideBookUp2,\n lucideFileClock,\n lucideRefreshCwOff,\n lucideListChecks,\n lucideFastForward,\n lucideBrushCleaning,\n lucideChartColumnIncreasing,\n lucideBell,\n lucideCheckCircle2,\n lucideAlertCircle,\n lucideXCircle,\n lucideLink,\n lucideDatabaseBackup,\n lucideFileCheck,\n lucideListChevronsDownUp,\n lucideListChevronsUpDown,\n lucideSun,\n lucideMoon,\n lucideLoader,\n lucideAlertOctagon,\n lucideMessageCircle,\n lucideCircleAlert,\n lucideMessageCircleQuestion,\n lucideComponent,\n lucidePanelRightOpen,\n lucideLoader2,\n lucideGithub,\n lucideLifeBuoy,\n lucideCloud,\n lucideBarChart,\n lucideHome,\n lucideFolderOpen,\n lucideSquarePen,\n lucideLayoutTemplate,\n lucideFileOutput,\n lucideCircleHelp,\n lucideGripHorizontal,\n lucideImage,\n lucideList,\n lucideHash,\n lucideMegaphone,\n lucidePenTool,\n lucideSquare,\n lucideRocket,\n lucideBarChart3,\n lucideUsers2,\n lucideGrid3x3,\n lucideFolderTree,\n lucideCheckCircle,\n lucideSliders,\n lucideFileEdit,\n lucideNavigation,\n lucideListFilter,\n lucideTextCursor,\n lucidePieChart,\n lucideUserSearch,\n lucideFolders,\n lucideSparkles,\n lucideSquareCheck,\n lucideCircleDot,\n lucideToggleLeft,\n lucideUpload,\n lucideUploadCloud,\n lucideDownload,\n lucideFile,\n lucideMusic,\n lucideFileCode,\n lucideFileJson,\n lucideFileArchive,\n lucideTable2,\n lucideGripVertical,\n lucidePin,\n lucideSearchX,\n lucideMoreVertical,\n lucideGitBranch,\n lucideAlertTriangle,\n lucideFilter,\n lucideFunnelX,\n lucideBan,\n lucideBuilding,\n lucideType,\n lucidePercent,\n lucideReceipt,\n lucideClipboardPen,\n lucidePackageCheck,\n lucideShoppingBag,\n lucideTag,\n lucideTags,\n lucideTicket,\n lucideWand2,\n lucideZoomIn,\n lucideZoomOut,\n lucideBadge,\n lucideClipboardCopy,\n lucideContact,\n lucideIdCard,\n lucideRecycle,\n lucidePlug,\n lucidePlug2,\n lucideBotMessageSquare,\n lucideBotOff,\n lucideBrain,\n lucideBrainCircuit,\n lucideBrainCog,\n lucideCpu,\n lucideDumbbell,\n lucideSparkle,\n lucideWandSparkles,\n lucideMessageSquareText,\n lucideMic,\n lucideAudioLines,\n lucidePlay,\n lucideSquarePlay,\n lucideEllipsisVertical,\n saxEditOutline,\n} as const satisfies Record<string, IconType>;\n\nexport declare type ZIcon = keyof typeof Z_ICONS;\n","import { HttpClient } from '@angular/common/http';\nimport { type EnvironmentProviders, inject, makeEnvironmentProviders } from '@angular/core';\nimport { provideNgIconLoader, withCaching } from '@ng-icons/core';\nimport { ZIndexDbService } from '@shival99/z-ui/services';\nimport { catchError, from, map, type Observable, of, switchMap, tap } from 'rxjs';\nimport { Z_ICONS } from './z-icons';\n\nconst iconCacheDb = new ZIndexDbService({\n dbName: 'ZIconCache',\n version: 1,\n stores: [{ name: 'icons', encrypt: true }],\n defaultStore: 'icons',\n});\n\n/**\n * Normalizes Sax SVG to use currentColor and CSS variable for stroke-width.\n * This allows the icon to inherit color and strokeWidth from ng-icon props.\n */\nfunction normalizeSaxSvg(svg: string): string {\n const cssVar = 'style=\"stroke-width: var(--ng-icon__stroke-width, 2)\"';\n const normalized = svg.replace(/fill=\"#292D32\"/gi, 'fill=\"currentColor\"');\n return normalized.replace(/stroke-width=\"[^\"]*\"/gi, cssVar);\n}\n\n/**\n * Normalizes Lucide SVG to use CSS variable for stroke-width.\n * This allows ng-icon strokeWidth prop to work correctly.\n * Replaces hardcoded stroke-width with var(--ng-icon__stroke-width, 2).\n */\nfunction normalizeLucideSvg(svg: string): string {\n const cssVar = 'style=\"stroke-width: var(--ng-icon__stroke-width, 2)\"';\n return svg.replace(/stroke-width=\"[^\"]*\"/gi, cssVar);\n}\n\n/**\n * Gets fallback icon from bundled Z_ICONS if available.\n */\nfunction getFallbackIcon(name: string): string {\n const icon = Z_ICONS[name as keyof typeof Z_ICONS];\n if (icon) {\n console.warn(`[ZIcon] Using bundled fallback for \"${name}\"`);\n return icon;\n }\n return '';\n}\n\n/**\n * Converts ng-icons icon name to Lucide CDN format.\n * Examples:\n * - lucideArrowLeft -> arrow-left\n * - lucideAlertCircle -> alert-circle\n * - lucideTrash2 -> trash-2\n * - lucideGrid3x3 -> grid-3-x-3\n */\nfunction convertLucideIconName(name: string): string {\n return name\n .replace(/^lucide/, '')\n .replace(/([A-Z])/g, '-$1')\n .replace(/(\\d+)/g, '-$1')\n .replace(/(\\d)([a-z])/g, '$1-$2')\n .toLowerCase()\n .replace(/^-/, '')\n .replace(/--+/g, '-');\n}\n\n/**\n * Converts ng-icons Sax icon name to CDN format.\n * Examples:\n * - saxCloudChangeBold -> bold/cloud-change\n * - saxPauseBold -> bold/pause\n * - saxRefreshBold -> bold/refresh\n * - saxHomeOutline -> outline/home\n * - saxUserLinear -> linear/user\n */\nfunction convertIconSaxIconName(name: string): { style: string; iconName: string } | null {\n let iconPart = name.replace(/^sax/, '');\n // Extract style suffix (Bold, Outline, Linear, Bulk, Broken, TwoTone)\n const styleMatch = iconPart.match(/(Bold|Outline|Linear|Bulk|Broken|TwoTone)$/i);\n if (!styleMatch) {\n return null;\n }\n\n const style = styleMatch[1].toLowerCase();\n const styleFolder = style === 'twotone' ? 'twotone' : style;\n // Remove style suffix from icon name\n iconPart = iconPart.replace(/(Bold|Outline|Linear|Bulk|Broken|TwoTone)$/i, '');\n\n // Convert PascalCase to kebab-case\n const iconName = iconPart\n .replace(/([A-Z])/g, '-$1')\n .replace(/(\\d+)/g, '-$1')\n .toLowerCase()\n .replace(/^-/, '')\n .replace(/--+/g, '-');\n\n return { style: styleFolder, iconName };\n}\n\nconst LUCIDE_CDN_URL = 'https://cdn.jsdelivr.net/npm/lucide-static@latest/icons';\nconst SAX_CDN_URL = 'https://cdn.jsdelivr.net/gh/placetopay-org/iconsax-vue@main/src/Base';\n\n/**\n * Provides hybrid icon loading from CDN with fallback to bundled icons:\n * - Primary: Load icons from CDN (Lucide & Iconsax)\n * - Fallback: Use bundled icons from Z_ICONS if CDN fails\n *\n * @example\n * ```typescript\n * // app.config.ts\n * providers: [\n * provideHttpClient(),\n * provideZIconLoader(),\n * ]\n * ```\n */\nfunction loadWithCache(\n name: string,\n url: string,\n http: HttpClient,\n normalizer: (svg: string) => string\n): Observable<string> {\n return from(iconCacheDb.get<string>(name)).pipe(\n switchMap(cached => {\n if (cached) {\n return of(cached);\n }\n\n return http.get(url, { responseType: 'text' }).pipe(\n map(normalizer),\n tap(svg => {\n void iconCacheDb.set(name, svg);\n }),\n catchError(error => {\n console.error(`[ZIcon] Failed to load \"${name}\" from ${url}`, error);\n return of(getFallbackIcon(name));\n })\n );\n }),\n catchError(() => of(getFallbackIcon(name)))\n );\n}\n\nexport function provideZIconLoader(): EnvironmentProviders {\n return makeEnvironmentProviders([\n provideNgIconLoader(name => {\n const http = inject(HttpClient);\n\n if (name.startsWith('sax')) {\n const parsed = convertIconSaxIconName(name);\n if (!parsed) {\n console.warn(`[ZIcon] Invalid Sax icon name: \"${name}\"`);\n return of(getFallbackIcon(name));\n }\n\n const url = `${SAX_CDN_URL}/${parsed.style}/${parsed.iconName}.svg`;\n return loadWithCache(name, url, http, normalizeSaxSvg);\n }\n\n if (name.startsWith('lucide')) {\n const iconName = convertLucideIconName(name);\n const url = `${LUCIDE_CDN_URL}/${iconName}.svg`;\n return loadWithCache(name, url, http, normalizeLucideSvg);\n }\n\n console.warn(`[ZIcon] Unknown icon: \"${name}\"`);\n return of(getFallbackIcon(name));\n }, withCaching()),\n ]);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["NgIcon"],"mappings":";;;;;;;;;;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'@angular/core';
2
- import { ZIndexDbService, ZCacheService, Z_THEME_CONFIG } from '@shival99/z-ui/services';
1
+ import { InjectionToken, makeEnvironmentProviders, inject, provideAppInitializer } from '@angular/core';
2
+ import { ZIndexDbService, ZCacheService, Z_THEME_CONFIG, Z_LANG_CACHE_KEY } from '@shival99/z-ui/services';
3
3
  import { provideEnvironmentNgxMask } from 'ngx-mask';
4
4
  import { provideScrollbarOptions } from 'ngx-scrollbar';
5
5
  import { HttpClient } from '@angular/common/http';
@@ -47,7 +47,7 @@ function provideZIndexDb(config = {}) {
47
47
  ]);
48
48
  }
49
49
 
50
- const LANG_CACHE_KEY$1 = 'Z_LANGUAGE';
50
+ const LANG_CACHE_KEY = 'Z_LANGUAGE';
51
51
  /**
52
52
  * Get locale-specific mask configuration
53
53
  */
@@ -75,7 +75,7 @@ function getMaskConfig(lang, config = {}) {
75
75
  * ```
76
76
  */
77
77
  function provideZNgxMask(config = {}) {
78
- const savedLang = typeof window !== 'undefined' ? ZCacheService.get(LANG_CACHE_KEY$1) : null;
78
+ const savedLang = typeof window !== 'undefined' ? ZCacheService.get(LANG_CACHE_KEY) : null;
79
79
  const lang = config.lang ?? savedLang ?? 'vi';
80
80
  const maskConfig = getMaskConfig(lang, config);
81
81
  return makeEnvironmentProviders([provideEnvironmentNgxMask(maskConfig)]);
@@ -114,11 +114,6 @@ function provideZTheme(config = {}) {
114
114
  }
115
115
 
116
116
  /* eslint-disable @stylistic/indent */
117
- const LANG_CACHE_KEY = 'Z_LANGUAGE';
118
- /**
119
- * Custom loader - merges Z-UI translations with user translations
120
- * Priority: Z-UI defaults < file overrides < inline overrides < user translations
121
- */
122
117
  class ZTranslateHttpLoader {
123
118
  _http;
124
119
  _prefix;
@@ -160,17 +155,11 @@ function zCreateTranslateLoader(http, path = './assets/i18n/', extension = '.jso
160
155
  return new ZTranslateHttpLoader(http, path, extension, includeZUI, zuiOverridePath, customZUI);
161
156
  }
162
157
  function initializeTranslate(defaultLang) {
163
- return () => {
164
- const translate = inject(TranslateService);
165
- const savedLang = ZCacheService.get(LANG_CACHE_KEY) ?? defaultLang;
166
- translate.setFallbackLang(defaultLang);
167
- return firstValueFrom(translate.use(savedLang));
168
- };
158
+ const translate = inject(TranslateService);
159
+ const savedLang = ZCacheService.get(Z_LANG_CACHE_KEY) ?? defaultLang;
160
+ translate.setFallbackLang(defaultLang);
161
+ return firstValueFrom(translate.use(savedLang));
169
162
  }
170
- /**
171
- * Provide Z-Translate service
172
- * Z-UI translations are auto-included by default
173
- */
174
163
  function provideZTranslate(config = {}) {
175
164
  const { defaultLang = 'vi', translationPath = './assets/i18n/', fileExtension = '.json', includeZUITranslations = true, zuiOverridePath, customZUITranslations, } = config;
176
165
  return makeEnvironmentProviders([
@@ -182,11 +171,7 @@ function provideZTranslate(config = {}) {
182
171
  deps: [HttpClient],
183
172
  },
184
173
  }),
185
- {
186
- provide: APP_INITIALIZER,
187
- useFactory: () => initializeTranslate(defaultLang),
188
- multi: true,
189
- },
174
+ provideAppInitializer(() => initializeTranslate(defaultLang)),
190
175
  ]);
191
176
  }
192
177
 
@@ -194,10 +179,6 @@ function provideZTranslate(config = {}) {
194
179
  * Z-NgxMask Provider Types
195
180
  */
196
181
 
197
- /**
198
- * Z-Translate Provider Types
199
- */
200
-
201
182
  /**
202
183
  * Generated bundle index. Do not edit.
203
184
  */
@@ -1 +1 @@
1
- {"version":3,"file":"shival99-z-ui-providers.mjs","sources":["../../../../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/types/z-translate.types.ts","../../../../libs/core-ui/providers/shival99-z-ui-providers.ts"],"sourcesContent":["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, 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\n/**\n * Get locale-specific mask configuration\n */\nfunction getMaskConfig(lang: string, config: ZNgxMaskConfig = {}) {\n const isVietnamese = lang === 'vi';\n\n return {\n validation: config.validation ?? true,\n thousandSeparator: isVietnamese ? ',' : '.',\n decimalMarker: (isVietnamese ? '.' : ',') as '.' | ',',\n allowNegativeNumbers: config.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 */\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\n return makeEnvironmentProviders([provideEnvironmentNgxMask(maskConfig)]);\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 and defaultDarkMode\n * @example\n * ```typescript\n * // In app.config.ts\n * export const appConfig: ApplicationConfig = {\n * providers: [\n * provideZTheme({ defaultTheme: 'hospital', defaultDarkMode: false })\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 { APP_INITIALIZER, inject, makeEnvironmentProviders, type EnvironmentProviders } from '@angular/core';\nimport {\n provideTranslateService,\n TranslateLoader,\n TranslateService,\n type TranslationObject,\n} from '@ngx-translate/core';\nimport { Z_UI_TRANSLATIONS, type ZUITranslations } from '@shival99/z-ui/i18n';\nimport { ZCacheService } from '@shival99/z-ui/services';\nimport { firstValueFrom, forkJoin, map, type Observable, of } from 'rxjs';\nimport { catchError } from 'rxjs/operators';\nimport type { ZTranslateProviderConfig } from './types/z-translate.types';\n\nconst LANG_CACHE_KEY = 'Z_LANGUAGE';\n\n/**\n * Custom loader - merges Z-UI translations with user translations\n * Priority: Z-UI defaults < file overrides < inline overrides < user translations\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 _customZUI?: Partial<Record<string, ZUITranslations>>\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 = Z_UI_TRANSLATIONS[lang] ?? Z_UI_TRANSLATIONS['en'] ?? {};\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 const inlineOverrides = this._customZUI?.[lang] ?? {};\n\n return forkJoin([of(zuiDefaults), zuiFileOverrides$, userTranslations$]).pipe(\n map(\n ([defaults, fileOverrides, user]) =>\n ({\n ...defaults,\n ...fileOverrides,\n ...inlineOverrides,\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 customZUI?: Partial<Record<string, ZUITranslations>>\n): TranslateLoader {\n return new ZTranslateHttpLoader(http, path, extension, includeZUI, zuiOverridePath, customZUI);\n}\n\nfunction initializeTranslate(defaultLang: string) {\n return () => {\n const translate = inject(TranslateService);\n const savedLang = ZCacheService.get<string>(LANG_CACHE_KEY) ?? defaultLang;\n translate.setFallbackLang(defaultLang);\n return firstValueFrom(translate.use(savedLang));\n };\n}\n\n/**\n * Provide Z-Translate service\n * Z-UI translations are auto-included by default\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 customZUITranslations,\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 customZUITranslations\n ),\n deps: [HttpClient],\n },\n }),\n {\n provide: APP_INITIALIZER,\n useFactory: () => initializeTranslate(defaultLang),\n multi: true,\n },\n ]);\n}\n\nexport { Z_UI_TRANSLATIONS, mergeTranslations, getZUITranslations } from '@shival99/z-ui/i18n';\nexport type { ZUITranslations, ZUILanguage, ZUITranslationSet } from '@shival99/z-ui/i18n';\n","/**\n * Z-NgxMask Provider Types\n */\n\nexport interface ZNgxMaskConfig {\n /** Language code (vi, en, etc.) */\n lang?: string;\n /** Allow negative numbers */\n allowNegativeNumbers?: boolean;\n /** Enable validation */\n validation?: boolean;\n}\n","/**\n * Z-Translate Provider Types\n */\n\nimport type { ZUITranslations } from '@shival99/z-ui/i18n';\n\nexport interface ZTranslateProviderConfig {\n /** Default language (default: 'vi') */\n defaultLang?: string;\n /** Path to user translation files (default: './assets/i18n/') */\n translationPath?: string;\n /** File extension for translation files (default: '.json') */\n fileExtension?: string;\n /**\n * Whether to include Z-UI default translations (default: true)\n * Z-UI translations are merged with user translations,\n * user translations take precedence\n */\n includeZUITranslations?: boolean;\n /**\n * Path to Z-UI translation override files (optional)\n * If set, will load translations from this path to override Z-UI defaults\n * Example: './assets/i18n/z-ui/' will load './assets/i18n/z-ui/vi.json'\n *\n * File format:\n * ```json\n * {\n * \"i18n_z_ui_table_noData\": \"Bảng trống\"\n * }\n * ```\n */\n zuiOverridePath?: string;\n /**\n * Inline custom translations to override Z-UI defaults (optional)\n * Use this for simple overrides without creating separate files\n *\n * @example\n * ```typescript\n * customZUITranslations: {\n * vi: { i18n_z_ui_table_noData: 'Bảng trống' },\n * en: { i18n_z_ui_table_noData: 'Empty table' },\n * }\n * ```\n */\n customZUITranslations?: Partial<Record<string, ZUITranslations>>;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["LANG_CACHE_KEY"],"mappings":";;;;;;;;;;AAGA;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;AAC/B,SAAA;AACF,KAAA,CAAC;AACJ;;ACpCA,MAAMA,gBAAc,GAAG,YAAY;AAEnC;;AAEG;AACH,SAAS,aAAa,CAAC,IAAY,EAAE,SAAyB,EAAE,EAAA;AAC9D,IAAA,MAAM,YAAY,GAAG,IAAI,KAAK,IAAI;IAElC,OAAO;AACL,QAAA,UAAU,EAAE,MAAM,CAAC,UAAU,IAAI,IAAI;QACrC,iBAAiB,EAAE,YAAY,GAAG,GAAG,GAAG,GAAG;QAC3C,aAAa,GAAG,YAAY,GAAG,GAAG,GAAG,GAAG,CAAc;AACtD,QAAA,oBAAoB,EAAE,MAAM,CAAC,oBAAoB,IAAI,IAAI;KAC1D;AACH;AAEA;;;;;;;;;;;;;AAaG;AACG,SAAU,eAAe,CAAC,MAAA,GAAyB,EAAE,EAAA;AACzD,IAAA,MAAM,SAAS,GAAG,OAAO,MAAM,KAAK,WAAW,GAAG,aAAa,CAAC,GAAG,CAASA,gBAAc,CAAC,GAAG,IAAI;IA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/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 { 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, 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\n/**\n * Get locale-specific mask configuration\n */\nfunction getMaskConfig(lang: string, config: ZNgxMaskConfig = {}) {\n const isVietnamese = lang === 'vi';\n\n return {\n validation: config.validation ?? true,\n thousandSeparator: isVietnamese ? ',' : '.',\n decimalMarker: (isVietnamese ? '.' : ',') as '.' | ',',\n allowNegativeNumbers: config.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 */\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\n return makeEnvironmentProviders([provideEnvironmentNgxMask(maskConfig)]);\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 and defaultDarkMode\n * @example\n * ```typescript\n * // In app.config.ts\n * export const appConfig: ApplicationConfig = {\n * providers: [\n * provideZTheme({ defaultTheme: 'hospital', defaultDarkMode: false })\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 { Z_UI_TRANSLATIONS, type ZUITranslations } from '@shival99/z-ui/i18n';\nimport { Z_LANG_CACHE_KEY, ZCacheService } from '@shival99/z-ui/services';\nimport { firstValueFrom, forkJoin, map, type Observable, of } from 'rxjs';\nimport { catchError } from 'rxjs/operators';\nimport type { ZTranslateProviderConfig } from './types/z-translate.types';\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 _customZUI?: Partial<Record<string, ZUITranslations>>\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 = Z_UI_TRANSLATIONS[lang] ?? Z_UI_TRANSLATIONS['en'] ?? {};\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 const inlineOverrides = this._customZUI?.[lang] ?? {};\n\n return forkJoin([of(zuiDefaults), zuiFileOverrides$, userTranslations$]).pipe(\n map(\n ([defaults, fileOverrides, user]) =>\n ({\n ...defaults,\n ...fileOverrides,\n ...inlineOverrides,\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 customZUI?: Partial<Record<string, ZUITranslations>>\n): TranslateLoader {\n return new ZTranslateHttpLoader(http, path, extension, includeZUI, zuiOverridePath, customZUI);\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 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 customZUITranslations,\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 customZUITranslations\n ),\n deps: [HttpClient],\n },\n }),\n provideAppInitializer(() => initializeTranslate(defaultLang)),\n ]);\n}\n\nexport { Z_UI_TRANSLATIONS, mergeTranslations, getZUITranslations } from '@shival99/z-ui/i18n';\nexport type { ZUITranslations, ZUILanguage, ZUITranslationSet } from '@shival99/z-ui/i18n';\n","/**\n * Z-NgxMask Provider Types\n */\n\nexport interface ZNgxMaskConfig {\n /** Language code (vi, en, etc.) */\n lang?: string;\n /** Allow negative numbers */\n allowNegativeNumbers?: boolean;\n /** Enable validation */\n validation?: boolean;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAGA;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,OA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;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;;ACxGA;;AAEG;;ACFH;;AAEG;;;;"}
@@ -1416,7 +1416,7 @@ class ZHttpAbstractService {
1416
1416
  this.indexDbService = new ZIndexDbService({
1417
1417
  dbName: 'ZHttpCache',
1418
1418
  defaultStore: 'HttpCache',
1419
- stores: [{ name: 'HttpCache', encrypt: false }],
1419
+ stores: [{ name: 'HttpCache', encrypt: true }],
1420
1420
  });
1421
1421
  }
1422
1422
  get(endpoint, options) {