@shival99/z-ui 1.8.13 → 1.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/assets/css/tailwind.css +7 -11
  2. package/fesm2022/shival99-z-ui-components-z-autocomplete.mjs +45 -71
  3. package/fesm2022/shival99-z-ui-components-z-autocomplete.mjs.map +1 -1
  4. package/fesm2022/shival99-z-ui-components-z-button.mjs +21 -11
  5. package/fesm2022/shival99-z-ui-components-z-button.mjs.map +1 -1
  6. package/fesm2022/shival99-z-ui-components-z-calendar.mjs +61 -32
  7. package/fesm2022/shival99-z-ui-components-z-calendar.mjs.map +1 -1
  8. package/fesm2022/shival99-z-ui-components-z-card.mjs +1 -1
  9. package/fesm2022/shival99-z-ui-components-z-card.mjs.map +1 -1
  10. package/fesm2022/shival99-z-ui-components-z-chat.mjs +429 -0
  11. package/fesm2022/shival99-z-ui-components-z-chat.mjs.map +1 -0
  12. package/fesm2022/shival99-z-ui-components-z-checkbox.mjs +1 -1
  13. package/fesm2022/shival99-z-ui-components-z-checkbox.mjs.map +1 -1
  14. package/fesm2022/shival99-z-ui-components-z-code.mjs +51 -21
  15. package/fesm2022/shival99-z-ui-components-z-code.mjs.map +1 -1
  16. package/fesm2022/shival99-z-ui-components-z-drawer.mjs +8 -3
  17. package/fesm2022/shival99-z-ui-components-z-drawer.mjs.map +1 -1
  18. package/fesm2022/shival99-z-ui-components-z-editor.mjs +3 -3
  19. package/fesm2022/shival99-z-ui-components-z-editor.mjs.map +1 -1
  20. package/fesm2022/shival99-z-ui-components-z-empty.mjs.map +1 -1
  21. package/fesm2022/shival99-z-ui-components-z-filter.mjs +3 -3
  22. package/fesm2022/shival99-z-ui-components-z-filter.mjs.map +1 -1
  23. package/fesm2022/shival99-z-ui-components-z-gallery.mjs +169 -90
  24. package/fesm2022/shival99-z-ui-components-z-gallery.mjs.map +1 -1
  25. package/fesm2022/shival99-z-ui-components-z-icon.mjs +143 -360
  26. package/fesm2022/shival99-z-ui-components-z-icon.mjs.map +1 -1
  27. package/fesm2022/shival99-z-ui-components-z-input.mjs +131 -8
  28. package/fesm2022/shival99-z-ui-components-z-input.mjs.map +1 -1
  29. package/fesm2022/shival99-z-ui-components-z-loading.mjs +2 -2
  30. package/fesm2022/shival99-z-ui-components-z-loading.mjs.map +1 -1
  31. package/fesm2022/shival99-z-ui-components-z-menu.mjs +2 -2
  32. package/fesm2022/shival99-z-ui-components-z-menu.mjs.map +1 -1
  33. package/fesm2022/shival99-z-ui-components-z-modal.mjs +8 -3
  34. package/fesm2022/shival99-z-ui-components-z-modal.mjs.map +1 -1
  35. package/fesm2022/shival99-z-ui-components-z-pagination.mjs +1 -1
  36. package/fesm2022/shival99-z-ui-components-z-pagination.mjs.map +1 -1
  37. package/fesm2022/shival99-z-ui-components-z-popover.mjs +3 -3
  38. package/fesm2022/shival99-z-ui-components-z-popover.mjs.map +1 -1
  39. package/fesm2022/shival99-z-ui-components-z-select.mjs +31 -7
  40. package/fesm2022/shival99-z-ui-components-z-select.mjs.map +1 -1
  41. package/fesm2022/shival99-z-ui-components-z-skeleton.mjs +3 -3
  42. package/fesm2022/shival99-z-ui-components-z-skeleton.mjs.map +1 -1
  43. package/fesm2022/shival99-z-ui-components-z-steps.mjs +31 -29
  44. package/fesm2022/shival99-z-ui-components-z-steps.mjs.map +1 -1
  45. package/fesm2022/shival99-z-ui-components-z-switch.mjs +131 -15
  46. package/fesm2022/shival99-z-ui-components-z-switch.mjs.map +1 -1
  47. package/fesm2022/shival99-z-ui-components-z-table.mjs +57 -13
  48. package/fesm2022/shival99-z-ui-components-z-table.mjs.map +1 -1
  49. package/fesm2022/shival99-z-ui-components-z-tabs.mjs +6 -6
  50. package/fesm2022/shival99-z-ui-components-z-tabs.mjs.map +1 -1
  51. package/fesm2022/shival99-z-ui-components-z-tags.mjs +1 -1
  52. package/fesm2022/shival99-z-ui-components-z-tags.mjs.map +1 -1
  53. package/fesm2022/shival99-z-ui-components-z-timeline.mjs +6 -6
  54. package/fesm2022/shival99-z-ui-components-z-timeline.mjs.map +1 -1
  55. package/fesm2022/shival99-z-ui-components-z-tooltip.mjs +4 -4
  56. package/fesm2022/shival99-z-ui-components-z-tooltip.mjs.map +1 -1
  57. package/fesm2022/shival99-z-ui-components-z-upload.mjs +5 -4
  58. package/fesm2022/shival99-z-ui-components-z-upload.mjs.map +1 -1
  59. package/fesm2022/shival99-z-ui-i18n.mjs +12 -0
  60. package/fesm2022/shival99-z-ui-i18n.mjs.map +1 -1
  61. package/fesm2022/shival99-z-ui-pipes.mjs +18 -0
  62. package/fesm2022/shival99-z-ui-pipes.mjs.map +1 -1
  63. package/fesm2022/shival99-z-ui-providers.mjs +30 -13
  64. package/fesm2022/shival99-z-ui-providers.mjs.map +1 -1
  65. package/fesm2022/shival99-z-ui-services.mjs +53 -29
  66. package/fesm2022/shival99-z-ui-services.mjs.map +1 -1
  67. package/fesm2022/z-ui.mjs +0 -4
  68. package/fesm2022/z-ui.mjs.map +1 -1
  69. package/package.json +6 -1
  70. package/types/shival99-z-ui-components-z-autocomplete.d.ts +25 -38
  71. package/types/shival99-z-ui-components-z-breadcrumb.d.ts +4 -4
  72. package/types/shival99-z-ui-components-z-button.d.ts +5 -4
  73. package/types/shival99-z-ui-components-z-chat.d.ts +148 -0
  74. package/types/shival99-z-ui-components-z-drawer.d.ts +3 -1
  75. package/types/shival99-z-ui-components-z-dropdown-menu.d.ts +2 -2
  76. package/types/shival99-z-ui-components-z-empty.d.ts +3 -3
  77. package/types/shival99-z-ui-components-z-filter.d.ts +2 -2
  78. package/types/shival99-z-ui-components-z-gallery.d.ts +6 -3
  79. package/types/shival99-z-ui-components-z-icon.d.ts +18 -304
  80. package/types/shival99-z-ui-components-z-input.d.ts +42 -1
  81. package/types/shival99-z-ui-components-z-modal.d.ts +4 -2
  82. package/types/shival99-z-ui-components-z-select.d.ts +5 -2
  83. package/types/shival99-z-ui-components-z-steps.d.ts +4 -4
  84. package/types/shival99-z-ui-components-z-switch.d.ts +25 -4
  85. package/types/shival99-z-ui-components-z-table.d.ts +2 -0
  86. package/types/shival99-z-ui-pipes.d.ts +2 -0
  87. package/types/shival99-z-ui-providers.d.ts +10 -16
  88. package/types/shival99-z-ui-services.d.ts +6 -1
  89. package/types/z-ui.d.ts +1 -2
@@ -1,60 +1,28 @@
1
1
  import * as i0 from '@angular/core';
2
- import { input, computed, ViewEncapsulation, ChangeDetectionStrategy, Component, isDevMode, makeEnvironmentProviders, inject } from '@angular/core';
2
+ import { isDevMode, input, signal, computed, effect, ViewEncapsulation, ChangeDetectionStrategy, Component, makeEnvironmentProviders, inject } from '@angular/core';
3
3
  import { NgIconComponent, provideNgIconLoader, withCaching } from '@ng-icons/core';
4
4
  import { zMergeClasses } from '@shival99/z-ui/utils';
5
+ import { ZIndexDbService } from '@shival99/z-ui/services';
5
6
  import { cva } from 'class-variance-authority';
6
- import { saxRefreshBold, saxCloudChangeBold, saxPauseBold } from '@ng-icons/iconsax/bold';
7
- import { saxEditOutline } from '@ng-icons/iconsax/outline';
8
- import { lucideTestTube, lucidePackage2, lucideUndo, lucideRedo, lucideBanknote, lucideRotateCcw, lucideRefreshCw, lucideHistory, lucideMessageSquare, lucideCalendarDays, lucideHelpCircle, lucideFolder, lucideCircle, lucideUserSquare, 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, lucideServerCrash, lucideServer, lucideRadio, lucidePrinter, lucidePhoneCall, lucidePalette, lucideNetwork, lucideMailCheck, lucideLightbulb, lucideKey, lucideHeadphones, lucideLanguages, 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
7
  import { HttpClient } from '@angular/common/http';
10
- import { ZIndexDbService } from '@shival99/z-ui/services';
11
8
  import { from, switchMap, of, map, tap, catchError } from 'rxjs';
12
9
 
10
+ const Z_ICON_CACHE_DB_NAME = 'ZIconCache';
11
+ const Z_ICON_CACHE_STORE = 'zIcons';
12
+ const zIconCacheDb = new ZIndexDbService({
13
+ dbName: Z_ICON_CACHE_DB_NAME,
14
+ version: 1,
15
+ stores: [{ name: Z_ICON_CACHE_STORE, encrypt: !isDevMode() }],
16
+ defaultStore: Z_ICON_CACHE_STORE,
17
+ });
18
+
19
+ const zIconSizeVariants = Object.fromEntries(Array.from({ length: 100 - 10 + 1 }, (_, index) => {
20
+ const size = String(10 + index);
21
+ return [size, `size-${size}`];
22
+ }));
13
23
  const zIconVariants = cva('', {
14
24
  variants: {
15
- zSize: {
16
- '10': 'size-10',
17
- '11': 'size-11',
18
- '12': 'size-12',
19
- '13': 'size-13',
20
- '14': 'size-14',
21
- '15': 'size-15',
22
- '16': 'size-16',
23
- '17': 'size-17',
24
- '18': 'size-18',
25
- '19': 'size-19',
26
- '20': 'size-20',
27
- '21': 'size-21',
28
- '22': 'size-22',
29
- '23': 'size-23',
30
- '24': 'size-24',
31
- '25': 'size-25',
32
- '26': 'size-26',
33
- '27': 'size-27',
34
- '28': 'size-28',
35
- '29': 'size-29',
36
- '30': 'size-30',
37
- '31': 'size-31',
38
- '32': 'size-32',
39
- '33': 'size-33',
40
- '34': 'size-34',
41
- '35': 'size-35',
42
- '36': 'size-36',
43
- '37': 'size-37',
44
- '38': 'size-38',
45
- '39': 'size-39',
46
- '40': 'size-40',
47
- '41': 'size-41',
48
- '42': 'size-42',
49
- '43': 'size-43',
50
- '44': 'size-44',
51
- '45': 'size-45',
52
- '46': 'size-46',
53
- '47': 'size-47',
54
- '48': 'size-48',
55
- '49': 'size-49',
56
- '50': 'size-50',
57
- },
25
+ zSize: zIconSizeVariants,
58
26
  },
59
27
  defaultVariants: {
60
28
  zSize: '16',
@@ -67,325 +35,140 @@ class ZIconComponent {
67
35
  zSize = input('16', ...(ngDevMode ? [{ debugName: "zSize" }] : []));
68
36
  zStrokeWidth = input(2, ...(ngDevMode ? [{ debugName: "zStrokeWidth" }] : []));
69
37
  zSvg = input('', ...(ngDevMode ? [{ debugName: "zSvg" }] : []));
38
+ resolvedSvg = signal('', ...(ngDevMode ? [{ debugName: "resolvedSvg" }] : []));
39
+ normalizedSize = computed(() => {
40
+ const size = this.zSize();
41
+ if (size === null || size === undefined || size === '') {
42
+ return '16';
43
+ }
44
+ return String(size);
45
+ }, ...(ngDevMode ? [{ debugName: "normalizedSize" }] : []));
46
+ _svgFetchError = signal('', ...(ngDevMode ? [{ debugName: "_svgFetchError" }] : []));
70
47
  zClasses = computed(() => zMergeClasses(zIconVariants({ zSize: this.zSize() }), this.class(), this.zStrokeWidth() === 0 ? 'stroke-none' : '', 'inline-flex shrink-0'), ...(ngDevMode ? [{ debugName: "zClasses" }] : []));
48
+ constructor() {
49
+ effect(onCleanup => {
50
+ const svgInput = this.zSvg().trim();
51
+ if (!svgInput) {
52
+ this.resolvedSvg.set('');
53
+ this._svgFetchError.set('');
54
+ return;
55
+ }
56
+ if (this._isRawSvg(svgInput)) {
57
+ this.resolvedSvg.set(this._normalizeCustomSvg(svgInput));
58
+ this._svgFetchError.set('');
59
+ return;
60
+ }
61
+ if (!this._isSvgPath(svgInput)) {
62
+ this.resolvedSvg.set('');
63
+ this._svgFetchError.set('Unsupported SVG input format.');
64
+ return;
65
+ }
66
+ const controller = new AbortController();
67
+ onCleanup(() => controller.abort());
68
+ const cacheKey = `zsvg:path:${svgInput}`;
69
+ void zIconCacheDb
70
+ .get(cacheKey, { storeName: Z_ICON_CACHE_STORE })
71
+ .then(cachedSvg => {
72
+ if (controller.signal.aborted) {
73
+ return null;
74
+ }
75
+ if (cachedSvg && this._isRawSvg(cachedSvg.trim())) {
76
+ this.resolvedSvg.set(this._normalizeCustomSvg(cachedSvg));
77
+ this._svgFetchError.set('');
78
+ return null;
79
+ }
80
+ return fetch(svgInput, { signal: controller.signal }).then(response => {
81
+ if (!response.ok) {
82
+ throw new Error(`Failed to fetch SVG from "${svgInput}"`);
83
+ }
84
+ return response.text();
85
+ });
86
+ })
87
+ .then(svgContent => {
88
+ if (controller.signal.aborted || !svgContent) {
89
+ return;
90
+ }
91
+ if (!this._isRawSvg(svgContent.trim())) {
92
+ throw new Error(`Invalid SVG content loaded from "${svgInput}"`);
93
+ }
94
+ const normalizedSvg = this._normalizeCustomSvg(svgContent);
95
+ this.resolvedSvg.set(normalizedSvg);
96
+ this._svgFetchError.set('');
97
+ void zIconCacheDb.set(cacheKey, normalizedSvg, { storeName: Z_ICON_CACHE_STORE }).catch(console.error);
98
+ })
99
+ .catch(error => {
100
+ if (controller.signal.aborted) {
101
+ return;
102
+ }
103
+ console.error('[z-icon] Failed to load zSvg path:', error);
104
+ this.resolvedSvg.set('');
105
+ this._svgFetchError.set('Unable to load SVG path.');
106
+ });
107
+ });
108
+ }
109
+ _isRawSvg(value) {
110
+ return value.startsWith('<svg');
111
+ }
112
+ _isSvgPath(value) {
113
+ return value.endsWith('.svg') || value.includes('/');
114
+ }
115
+ _normalizeCustomSvg(svg) {
116
+ try {
117
+ const parser = new DOMParser();
118
+ const doc = parser.parseFromString(svg, 'image/svg+xml');
119
+ const svgEl = doc.documentElement;
120
+ if (svgEl.tagName.toLowerCase() !== 'svg') {
121
+ return svg;
122
+ }
123
+ const width = svgEl.getAttribute('width');
124
+ const height = svgEl.getAttribute('height');
125
+ if (!svgEl.getAttribute('viewBox') &&
126
+ width &&
127
+ height &&
128
+ !Number.isNaN(Number(width)) &&
129
+ !Number.isNaN(Number(height))) {
130
+ svgEl.setAttribute('viewBox', `0 0 ${width} ${height}`);
131
+ }
132
+ svgEl.removeAttribute('width');
133
+ svgEl.removeAttribute('height');
134
+ const allNodes = [svgEl, ...Array.from(svgEl.querySelectorAll('*'))];
135
+ allNodes.forEach(node => {
136
+ const fill = node.getAttribute('fill');
137
+ if (fill && fill !== 'none' && fill !== 'currentColor') {
138
+ node.setAttribute('fill', 'currentColor');
139
+ }
140
+ const stroke = node.getAttribute('stroke');
141
+ if (stroke && stroke !== 'none' && stroke !== 'currentColor') {
142
+ node.setAttribute('stroke', 'currentColor');
143
+ }
144
+ if (node.hasAttribute('stroke-width')) {
145
+ node.removeAttribute('stroke-width');
146
+ const currentStyle = node.getAttribute('style') ?? '';
147
+ const normalizedStyle = currentStyle.trim();
148
+ const strokeWidthStyle = 'stroke-width: var(--ng-icon__stroke-width, 2)';
149
+ node.setAttribute('style', normalizedStyle ? `${normalizedStyle}; ${strokeWidthStyle}` : strokeWidthStyle);
150
+ }
151
+ });
152
+ return svgEl.outerHTML;
153
+ }
154
+ catch {
155
+ return svg;
156
+ }
157
+ }
71
158
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ZIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
72
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: ZIconComponent, isStandalone: true, selector: "z-icon, [z-icon]", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, zType: { classPropertyName: "zType", publicName: "zType", isSignal: true, isRequired: false, transformFunction: null }, zSize: { classPropertyName: "zSize", publicName: "zSize", isSignal: true, isRequired: false, transformFunction: null }, zStrokeWidth: { classPropertyName: "zStrokeWidth", publicName: "zStrokeWidth", isSignal: true, isRequired: false, transformFunction: null }, zSvg: { classPropertyName: "zSvg", publicName: "zSvg", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "zClasses()", "style.width": "zSize() + \"px\"", "style.height": "zSize() + \"px\"" } }, ngImport: i0, template: "@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", dependencies: [{ kind: "component", type: NgIconComponent, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
159
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: ZIconComponent, isStandalone: true, selector: "z-icon, [z-icon]", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, zType: { classPropertyName: "zType", publicName: "zType", isSignal: true, isRequired: false, transformFunction: null }, zSize: { classPropertyName: "zSize", publicName: "zSize", isSignal: true, isRequired: false, transformFunction: null }, zStrokeWidth: { classPropertyName: "zStrokeWidth", publicName: "zStrokeWidth", isSignal: true, isRequired: false, transformFunction: null }, zSvg: { classPropertyName: "zSvg", publicName: "zSvg", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "zClasses()", "style.width": "normalizedSize() + \"px\"", "style.height": "normalizedSize() + \"px\"" } }, ngImport: i0, template: "@if (resolvedSvg()) {\n <ng-icon [svg]=\"resolvedSvg()\" [size]=\"normalizedSize()\" [strokeWidth]=\"zStrokeWidth()\" />\n} @else if (!zSvg()) {\n <ng-icon [name]=\"zType()\" [size]=\"normalizedSize()\" [strokeWidth]=\"zStrokeWidth()\" />\n}\n", dependencies: [{ kind: "component", type: NgIconComponent, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
73
160
  }
74
161
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ZIconComponent, decorators: [{
75
162
  type: Component,
76
163
  args: [{ selector: 'z-icon, [z-icon]', imports: [NgIconComponent], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
77
164
  '[class]': 'zClasses()',
78
- '[style.width]': 'zSize() + "px"',
79
- '[style.height]': 'zSize() + "px"',
80
- }, template: "@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" }]
81
- }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], zType: [{ type: i0.Input, args: [{ isSignal: true, alias: "zType", required: false }] }], zSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "zSize", required: false }] }], zStrokeWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "zStrokeWidth", required: false }] }], zSvg: [{ type: i0.Input, args: [{ isSignal: true, alias: "zSvg", required: false }] }] } });
165
+ '[style.width]': 'normalizedSize() + "px"',
166
+ '[style.height]': 'normalizedSize() + "px"',
167
+ }, template: "@if (resolvedSvg()) {\n <ng-icon [svg]=\"resolvedSvg()\" [size]=\"normalizedSize()\" [strokeWidth]=\"zStrokeWidth()\" />\n} @else if (!zSvg()) {\n <ng-icon [name]=\"zType()\" [size]=\"normalizedSize()\" [strokeWidth]=\"zStrokeWidth()\" />\n}\n" }]
168
+ }], ctorParameters: () => [], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], zType: [{ type: i0.Input, args: [{ isSignal: true, alias: "zType", required: false }] }], zSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "zSize", required: false }] }], zStrokeWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "zStrokeWidth", required: false }] }], zSvg: [{ type: i0.Input, args: [{ isSignal: true, alias: "zSvg", required: false }] }] } });
82
169
 
83
- const Z_ICONS = {
84
- lucideLayers2,
85
- lucideStore,
86
- lucideChartBarStacked,
87
- lucideBookCheck,
88
- lucideAlarmClock,
89
- lucideClipboardPlus,
90
- lucideSave,
91
- lucideSaveAll,
92
- lucideFlag,
93
- lucideFlagTriangleRight,
94
- lucideMessageSquareDot,
95
- lucideCheckCheck,
96
- lucideTriangleAlert,
97
- lucideMessageSquareWarning,
98
- lucideCheck,
99
- lucidePencil,
100
- lucideMail,
101
- lucideLayoutGrid,
102
- lucideArrowLeft,
103
- lucideArrowRight,
104
- lucideMenu,
105
- lucideLock,
106
- lucideLogOut,
107
- lucideUser,
108
- lucideSettings,
109
- lucidePill,
110
- lucideCalendarFold,
111
- lucideSettings2,
112
- lucideChevronLeft,
113
- lucideChevronRight,
114
- lucideChevronDown,
115
- lucidePlus,
116
- lucideSearch,
117
- lucideUsers,
118
- lucideEye,
119
- lucideEyeOff,
120
- lucideEllipsis,
121
- lucidePanelLeftClose,
122
- lucidePanelLeftOpen,
123
- lucideLayoutDashboard,
124
- lucideChartColumn,
125
- lucideUsersRound,
126
- lucideLogs,
127
- lucideChevronUp,
128
- lucideTrendingUp,
129
- lucidePackage,
130
- lucideShoppingCart,
131
- lucideUserCheck,
132
- lucideActivity,
133
- lucideZap,
134
- lucideMousePointer,
135
- lucideInfo,
136
- lucideLayers,
137
- lucideBriefcase,
138
- lucideTarget,
139
- lucideWorkflow,
140
- lucideWarehouse,
141
- lucideLoaderCircle,
142
- lucideChevronsLeft,
143
- lucideChevronsRight,
144
- lucideBellRing,
145
- lucideSlidersHorizontal,
146
- lucideTrash2,
147
- lucideFileDown,
148
- lucideFunnel,
149
- lucideAlignJustify,
150
- lucideX,
151
- lucideFiles,
152
- lucideCrown,
153
- lucideBadgeInfo,
154
- lucideMinus,
155
- lucideBox,
156
- lucideCog,
157
- lucideBellMinus,
158
- lucidePackageOpen,
159
- lucideInbox,
160
- lucideClock,
161
- lucideBookOpen,
162
- lucideCalendar,
163
- lucideCalculator,
164
- lucideClipboardList,
165
- lucideDatabase,
166
- lucideDollarSign,
167
- lucideFileText,
168
- lucideGraduationCap,
169
- lucideHeart,
170
- lucideHospital,
171
- lucideMapPin,
172
- lucideMonitor,
173
- lucidePhone,
174
- lucideShield,
175
- lucideStar,
176
- lucideStethoscope,
177
- lucideTimer,
178
- lucideTrendingDown,
179
- lucideUserPlus,
180
- lucideVideo,
181
- lucideWallet,
182
- lucideWrench,
183
- lucideBuilding2,
184
- lucideCar,
185
- lucideCreditCard,
186
- lucideFileSpreadsheet,
187
- lucideGlobe,
188
- lucideLanguages,
189
- lucideHeadphones,
190
- lucideKey,
191
- lucideLightbulb,
192
- lucideMailCheck,
193
- lucideNetwork,
194
- lucidePalette,
195
- lucidePhoneCall,
196
- lucidePrinter,
197
- lucideRadio,
198
- lucideServer,
199
- lucideServerCrash,
200
- lucideSmartphone,
201
- lucideTablet,
202
- lucideTerminal,
203
- lucideTruck,
204
- lucideWifi,
205
- lucideRefreshCcw,
206
- lucideLockKeyhole,
207
- lucideArrowDown,
208
- lucideArrowUp,
209
- lucideUserLock,
210
- lucideCircleCheck,
211
- lucideHouse,
212
- lucideChartBar,
213
- lucideChartPie,
214
- lucideChartLine,
215
- lucideCalendarRange,
216
- lucideCalendar1,
217
- lucideCalendarCheck,
218
- lucideNotepadText,
219
- lucideFileUp,
220
- lucideTableOfContents,
221
- lucideBot,
222
- lucideSend,
223
- lucidePause,
224
- lucidePaperclip,
225
- saxPauseBold,
226
- lucideCopy,
227
- lucideUserRoundPen,
228
- lucideFilePenLine,
229
- lucideArrowDownUp,
230
- lucideCircleX,
231
- lucideCheckLine,
232
- lucideBadgeCheck,
233
- lucideShieldCheck,
234
- lucideCircleCheckBig,
235
- lucideBadgeX,
236
- lucideLockKeyholeOpen,
237
- lucideFileSymlink,
238
- lucideWifiZero,
239
- lucideCloudCheck,
240
- lucideMailPlus,
241
- lucideHardDriveDownload,
242
- saxCloudChangeBold,
243
- saxRefreshBold,
244
- lucideBarcode,
245
- lucideCode,
246
- lucideScanQrCode,
247
- lucideQrCode,
248
- lucideScanLine,
249
- lucideListPlus,
250
- lucideFilePlus,
251
- lucideFilePlus2,
252
- lucideBookUp2,
253
- lucideFileClock,
254
- lucideRefreshCwOff,
255
- lucideListChecks,
256
- lucideFastForward,
257
- lucideBrushCleaning,
258
- lucideChartColumnIncreasing,
259
- lucideBell,
260
- lucideCheckCircle2,
261
- lucideAlertCircle,
262
- lucideXCircle,
263
- lucideLink,
264
- lucideDatabaseBackup,
265
- lucideFileCheck,
266
- lucideListChevronsDownUp,
267
- lucideListChevronsUpDown,
268
- lucideSun,
269
- lucideMoon,
270
- lucideLoader,
271
- lucideAlertOctagon,
272
- lucideMessageCircle,
273
- lucideCircleAlert,
274
- lucideMessageCircleQuestion,
275
- lucideComponent,
276
- lucidePanelRightOpen,
277
- lucideLoader2,
278
- lucideGithub,
279
- lucideLifeBuoy,
280
- lucideCloud,
281
- lucideBarChart,
282
- lucideHome,
283
- lucideFolderOpen,
284
- lucideSquarePen,
285
- lucideLayoutTemplate,
286
- lucideFileOutput,
287
- lucideCircleHelp,
288
- lucideGripHorizontal,
289
- lucideImage,
290
- lucideList,
291
- lucideHash,
292
- lucideMegaphone,
293
- lucidePenTool,
294
- lucideSquare,
295
- lucideRocket,
296
- lucideBarChart3,
297
- lucideUsers2,
298
- lucideGrid3x3,
299
- lucideFolderTree,
300
- lucideCheckCircle,
301
- lucideSliders,
302
- lucideFileEdit,
303
- lucideNavigation,
304
- lucideListFilter,
305
- lucideTextCursor,
306
- lucidePieChart,
307
- lucideUserSearch,
308
- lucideFolders,
309
- lucideSparkles,
310
- lucideSquareCheck,
311
- lucideCircleDot,
312
- lucideToggleLeft,
313
- lucideUpload,
314
- lucideUploadCloud,
315
- lucideDownload,
316
- lucideFile,
317
- lucideMusic,
318
- lucideFileCode,
319
- lucideFileJson,
320
- lucideFileArchive,
321
- lucideTable2,
322
- lucideGripVertical,
323
- lucidePin,
324
- lucideSearchX,
325
- lucideMoreVertical,
326
- lucideGitBranch,
327
- lucideAlertTriangle,
328
- lucideFilter,
329
- lucideFunnelX,
330
- lucideBan,
331
- lucideBuilding,
332
- lucideType,
333
- lucidePercent,
334
- lucideReceipt,
335
- lucideClipboardPen,
336
- lucidePackageCheck,
337
- lucideShoppingBag,
338
- lucideTag,
339
- lucideTags,
340
- lucideTicket,
341
- lucideWand2,
342
- lucideZoomIn,
343
- lucideZoomOut,
344
- lucideBadge,
345
- lucideClipboardCopy,
346
- lucideContact,
347
- lucideIdCard,
348
- lucideRecycle,
349
- lucidePlug,
350
- lucidePlug2,
351
- lucideBotMessageSquare,
352
- lucideBotOff,
353
- lucideBrain,
354
- lucideBrainCircuit,
355
- lucideBrainCog,
356
- lucideCpu,
357
- lucideDumbbell,
358
- lucideSparkle,
359
- lucideWandSparkles,
360
- lucideMessageSquareText,
361
- lucideMic,
362
- lucideAudioLines,
363
- lucidePlay,
364
- lucideSquarePlay,
365
- lucideEllipsisVertical,
366
- saxEditOutline,
367
- lucideUserSquare,
368
- lucideCircle,
369
- lucideFolder,
370
- lucideHelpCircle,
371
- lucideCalendarDays,
372
- lucideMessageSquare,
373
- lucideHistory,
374
- lucideRefreshCw,
375
- lucideRotateCcw,
376
- lucideBanknote,
377
- lucideRedo,
378
- lucideUndo,
379
- lucidePackage2,
380
- lucideTestTube,
381
- };
170
+ const Z_ICONS = {};
382
171
 
383
- const iconCacheDb = new ZIndexDbService({
384
- dbName: 'ZIconCache',
385
- version: 1,
386
- stores: [{ name: 'zIcons', encrypt: !isDevMode() }],
387
- defaultStore: 'zIcons',
388
- });
389
172
  /**
390
173
  * Normalizes Sax SVG to use currentColor and CSS variable for stroke-width.
391
174
  * This allows the icon to inherit color and strokeWidth from ng-icon props.
@@ -474,12 +257,12 @@ const SAX_CDN_URL = 'https://cdn.jsdelivr.net/gh/placetopay-org/iconsax-vue@main
474
257
  * ```
475
258
  */
476
259
  function loadWithCache(name, url, http, normalizer) {
477
- return from(iconCacheDb.get(name)).pipe(switchMap(cached => {
260
+ return from(zIconCacheDb.get(name, { storeName: Z_ICON_CACHE_STORE })).pipe(switchMap(cached => {
478
261
  if (cached) {
479
262
  return of(cached);
480
263
  }
481
264
  return http.get(url, { responseType: 'text' }).pipe(map(normalizer), tap(svg => {
482
- void iconCacheDb.set(name, svg);
265
+ void zIconCacheDb.set(name, svg, { storeName: Z_ICON_CACHE_STORE });
483
266
  }), catchError(error => {
484
267
  console.error(`[ZIcon] Failed to load "${name}" from ${url}`, error);
485
268
  return of(getFallbackIcon(name));