@shival99/z-ui 2.0.29 → 2.0.31

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 (46) hide show
  1. package/fesm2022/shival99-z-ui-components-z-calendar.mjs +294 -7
  2. package/fesm2022/shival99-z-ui-components-z-calendar.mjs.map +1 -1
  3. package/fesm2022/shival99-z-ui-components-z-chat.mjs +1 -1
  4. package/fesm2022/shival99-z-ui-components-z-chat.mjs.map +1 -1
  5. package/fesm2022/shival99-z-ui-components-z-drawer.mjs +16 -4
  6. package/fesm2022/shival99-z-ui-components-z-drawer.mjs.map +1 -1
  7. package/fesm2022/shival99-z-ui-components-z-editor.mjs +43 -25
  8. package/fesm2022/shival99-z-ui-components-z-editor.mjs.map +1 -1
  9. package/fesm2022/shival99-z-ui-components-z-gallery.mjs +457 -532
  10. package/fesm2022/shival99-z-ui-components-z-gallery.mjs.map +1 -1
  11. package/fesm2022/shival99-z-ui-components-z-kanban.mjs +1 -1
  12. package/fesm2022/shival99-z-ui-components-z-kanban.mjs.map +1 -1
  13. package/fesm2022/shival99-z-ui-components-z-media-player.mjs +658 -0
  14. package/fesm2022/shival99-z-ui-components-z-media-player.mjs.map +1 -0
  15. package/fesm2022/shival99-z-ui-components-z-modal.mjs +16 -4
  16. package/fesm2022/shival99-z-ui-components-z-modal.mjs.map +1 -1
  17. package/fesm2022/shival99-z-ui-components-z-qrcode.mjs +383 -0
  18. package/fesm2022/shival99-z-ui-components-z-qrcode.mjs.map +1 -0
  19. package/fesm2022/shival99-z-ui-components-z-scrollarea.mjs +131 -0
  20. package/fesm2022/shival99-z-ui-components-z-scrollarea.mjs.map +1 -0
  21. package/fesm2022/shival99-z-ui-components-z-show-more.mjs +121 -0
  22. package/fesm2022/shival99-z-ui-components-z-show-more.mjs.map +1 -0
  23. package/fesm2022/shival99-z-ui-components-z-table.mjs +988 -137
  24. package/fesm2022/shival99-z-ui-components-z-table.mjs.map +1 -1
  25. package/fesm2022/shival99-z-ui-components-z-tabs.mjs +135 -61
  26. package/fesm2022/shival99-z-ui-components-z-tabs.mjs.map +1 -1
  27. package/fesm2022/shival99-z-ui-components-z-tags.mjs +24 -14
  28. package/fesm2022/shival99-z-ui-components-z-tags.mjs.map +1 -1
  29. package/fesm2022/shival99-z-ui-components-z-toast.mjs +124 -31
  30. package/fesm2022/shival99-z-ui-components-z-toast.mjs.map +1 -1
  31. package/fesm2022/shival99-z-ui-i18n.mjs +70 -0
  32. package/fesm2022/shival99-z-ui-i18n.mjs.map +1 -1
  33. package/package.json +17 -1
  34. package/types/shival99-z-ui-components-z-calendar.d.ts +10 -5
  35. package/types/shival99-z-ui-components-z-drawer.d.ts +14 -2
  36. package/types/shival99-z-ui-components-z-editor.d.ts +13 -8
  37. package/types/shival99-z-ui-components-z-gallery.d.ts +97 -6
  38. package/types/shival99-z-ui-components-z-media-player.d.ts +123 -0
  39. package/types/shival99-z-ui-components-z-modal.d.ts +14 -2
  40. package/types/shival99-z-ui-components-z-qrcode.d.ts +76 -0
  41. package/types/shival99-z-ui-components-z-scrollarea.d.ts +46 -0
  42. package/types/shival99-z-ui-components-z-show-more.d.ts +36 -0
  43. package/types/shival99-z-ui-components-z-table.d.ts +59 -14
  44. package/types/shival99-z-ui-components-z-tabs.d.ts +10 -6
  45. package/types/shival99-z-ui-components-z-tags.d.ts +3 -0
  46. package/types/shival99-z-ui-components-z-toast.d.ts +35 -2
@@ -0,0 +1,383 @@
1
+ import { isPlatformBrowser } from '@angular/common';
2
+ import * as i0 from '@angular/core';
3
+ import { input, viewChild, inject, PLATFORM_ID, signal, effect, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
4
+ import { TranslatePipe } from '@ngx-translate/core';
5
+ import { ZButtonComponent } from '@shival99/z-ui/components/z-button';
6
+ import { zTransform } from '@shival99/z-ui/utils';
7
+ import * as QRCode from 'qrcode';
8
+
9
+ class ZQrCodeComponent {
10
+ // Inputs
11
+ zValue = input.required(...(ngDevMode ? [{ debugName: "zValue" }] : []));
12
+ zSize = input(256, ...(ngDevMode ? [{ debugName: "zSize" }] : []));
13
+ zLevel = input('H', ...(ngDevMode ? [{ debugName: "zLevel" }] : []));
14
+ zLogo = input('', ...(ngDevMode ? [{ debugName: "zLogo" }] : []));
15
+ zLogoSize = input(0.2, ...(ngDevMode ? [{ debugName: "zLogoSize" }] : [])); // 20% of QR size
16
+ zLogoBgColor = input('#ffffff', ...(ngDevMode ? [{ debugName: "zLogoBgColor" }] : []));
17
+ zLogoBgShape = input('circle', ...(ngDevMode ? [{ debugName: "zLogoBgShape" }] : []));
18
+ zLogoPadding = input(4, ...(ngDevMode ? [{ debugName: "zLogoPadding" }] : []));
19
+ zFgColor = input('#000000', ...(ngDevMode ? [{ debugName: "zFgColor" }] : []));
20
+ zBgColor = input('#ffffff', ...(ngDevMode ? [{ debugName: "zBgColor" }] : []));
21
+ zDotStyle = input('square', ...(ngDevMode ? [{ debugName: "zDotStyle" }] : []));
22
+ zEyeStyle = input('square', ...(ngDevMode ? [{ debugName: "zEyeStyle" }] : []));
23
+ zEyeColor = input('', ...(ngDevMode ? [{ debugName: "zEyeColor" }] : [])); // if empty, falls back to zFgColor
24
+ zMargin = input(4, ...(ngDevMode ? [{ debugName: "zMargin" }] : [])); // margin in modules
25
+ zFgGradient = input(...(ngDevMode ? [undefined, { debugName: "zFgGradient" }] : []));
26
+ zFrame = input('none', ...(ngDevMode ? [{ debugName: "zFrame" }] : []));
27
+ zFrameText = input('SCAN ME', ...(ngDevMode ? [{ debugName: "zFrameText" }] : []));
28
+ zFrameColor = input('#0f172a', ...(ngDevMode ? [{ debugName: "zFrameColor" }] : []));
29
+ zFramePadding = input(12, ...(ngDevMode ? [{ debugName: "zFramePadding" }] : [])); // padding around QR inside frame
30
+ zFrameBorderRadius = input(12, ...(ngDevMode ? [{ debugName: "zFrameBorderRadius" }] : [])); // border radius of the frame
31
+ zDownloadable = input(false, { ...(ngDevMode ? { debugName: "zDownloadable" } : {}), transform: zTransform }); // toggles hover overlay button
32
+ zDownloadButton = input(false, { ...(ngDevMode ? { debugName: "zDownloadButton" } : {}), transform: zTransform }); // toggles standalone button below
33
+ zShadow = input(true, { ...(ngDevMode ? { debugName: "zShadow" } : {}), transform: zTransform }); // Bật/tắt đổ bóng khung ngoài
34
+ zLoading = input(false, { ...(ngDevMode ? { debugName: "zLoading" } : {}), transform: zTransform });
35
+ // DOM references
36
+ _canvasRef = viewChild('qrCanvas', ...(ngDevMode ? [{ debugName: "_canvasRef" }] : []));
37
+ _platformId = inject(PLATFORM_ID);
38
+ // States
39
+ downloadText = signal('i18n_z_ui_qrcode_download', ...(ngDevMode ? [{ debugName: "downloadText" }] : []));
40
+ constructor() {
41
+ // Re-render when any signal inputs change
42
+ effect(() => {
43
+ if (isPlatformBrowser(this._platformId)) {
44
+ void this.renderQrCode();
45
+ }
46
+ });
47
+ }
48
+ /**
49
+ * Renders the stylized QR code onto the canvas element
50
+ */
51
+ async renderQrCode() {
52
+ const canvas = this._canvasRef()?.nativeElement;
53
+ if (!canvas) {
54
+ return;
55
+ }
56
+ const value = this.zValue();
57
+ const size = this.zSize();
58
+ const level = this.zLevel();
59
+ const fgColor = this.zFgColor();
60
+ const bgColor = this.zBgColor();
61
+ const dotStyle = this.zDotStyle();
62
+ const eyeStyle = this.zEyeStyle();
63
+ const eyeColorInput = this.zEyeColor();
64
+ const logoUrl = this.zLogo();
65
+ const frame = this.zFrame();
66
+ const dpr = isPlatformBrowser(this._platformId) ? window.devicePixelRatio || 1 : 1;
67
+ const framePadding = frame !== 'none' ? this.zFramePadding() : 0;
68
+ const frameBorderRadius = this.zFrameBorderRadius();
69
+ const bannerHeight = frame === 'text-bottom' || frame === 'text-top' ? 50 : 0;
70
+ const cssWidth = size + framePadding * 2;
71
+ const cssHeight = size + framePadding * 2 + bannerHeight;
72
+ canvas.width = cssWidth * dpr;
73
+ canvas.height = cssHeight * dpr;
74
+ const ctx = canvas.getContext('2d');
75
+ if (!ctx) {
76
+ return;
77
+ }
78
+ ctx.scale(dpr, dpr);
79
+ // Clear background
80
+ ctx.fillStyle = bgColor;
81
+ ctx.fillRect(0, 0, cssWidth, cssHeight);
82
+ if (frame !== 'none') {
83
+ // Draw rounded frame container
84
+ ctx.fillStyle = bgColor;
85
+ ctx.beginPath();
86
+ this._drawRoundedRectPath(ctx, 0, 0, cssWidth, cssHeight, frameBorderRadius);
87
+ ctx.fill();
88
+ // Draw border outline
89
+ ctx.strokeStyle = this.zFrameColor();
90
+ ctx.lineWidth = 1.5;
91
+ ctx.beginPath();
92
+ this._drawRoundedRectPath(ctx, 0.75, 0.75, cssWidth - 1.5, cssHeight - 1.5, frameBorderRadius);
93
+ ctx.stroke();
94
+ }
95
+ try {
96
+ // Create raw QR code matrix
97
+ const qr = QRCode.create(value, { errorCorrectionLevel: level });
98
+ const moduleCount = qr.modules.size;
99
+ const marginModules = this.zMargin();
100
+ const drawSize = size;
101
+ // Calculate module size
102
+ const moduleSize = drawSize / (moduleCount + 2 * marginModules);
103
+ const marginOffset = marginModules * moduleSize;
104
+ // Draw offsets
105
+ let xOffset = 0;
106
+ let yOffset = 0;
107
+ if (frame !== 'none') {
108
+ xOffset = framePadding;
109
+ yOffset = frame === 'text-top' ? framePadding + bannerHeight : framePadding;
110
+ }
111
+ // 1. Prepare foreground style (solid or gradient)
112
+ let fillStyle = fgColor;
113
+ const gradientOpt = this.zFgGradient();
114
+ if (gradientOpt && gradientOpt.colors && gradientOpt.colors.length > 0) {
115
+ fillStyle = this._getGradientStyle(ctx, gradientOpt, drawSize, xOffset, yOffset, marginOffset);
116
+ }
117
+ const eyeColor = eyeColorInput || fillStyle;
118
+ // 2. Draw normal modules (skip eyes and central logo)
119
+ ctx.fillStyle = fillStyle;
120
+ // Calculate logo skip boundary
121
+ const hasLogo = !!logoUrl;
122
+ const logoModules = Math.ceil(moduleCount * this.zLogoSize());
123
+ const logoStart = Math.floor((moduleCount - logoModules) / 2);
124
+ const logoEnd = logoStart + logoModules;
125
+ for (let r = 0; r < moduleCount; r++) {
126
+ for (let c = 0; c < moduleCount; c++) {
127
+ // Check if it's top-left, top-right, or bottom-left eye
128
+ const isTopLeftEye = r < 7 && c < 7;
129
+ const isTopRightEye = r < 7 && c >= moduleCount - 7;
130
+ const isBottomLeftEye = r >= moduleCount - 7 && c < 7;
131
+ if (isTopLeftEye || isTopRightEye || isBottomLeftEye) {
132
+ continue;
133
+ }
134
+ // Check if overlapping logo area
135
+ if (hasLogo && r >= logoStart && r < logoEnd && c >= logoStart && c < logoEnd) {
136
+ continue;
137
+ }
138
+ const isDark = qr.modules.get(r, c) === 1; // standard raw check
139
+ if (!isDark) {
140
+ continue;
141
+ }
142
+ const x = xOffset + marginOffset + c * moduleSize;
143
+ const y = yOffset + marginOffset + r * moduleSize;
144
+ this._drawDot(ctx, x, y, moduleSize, dotStyle);
145
+ }
146
+ }
147
+ // 3. Draw Eyes
148
+ const eyeCoords = [
149
+ { x: xOffset + marginOffset, y: yOffset + marginOffset }, // Top Left
150
+ { x: xOffset + marginOffset + (moduleCount - 7) * moduleSize, y: yOffset + marginOffset }, // Top Right
151
+ { x: xOffset + marginOffset, y: yOffset + marginOffset + (moduleCount - 7) * moduleSize }, // Bottom Left
152
+ ];
153
+ eyeCoords.forEach(coord => {
154
+ this._drawEye(ctx, coord.x, coord.y, moduleSize, eyeStyle, eyeColor);
155
+ });
156
+ // 4. Draw central logo if specified
157
+ if (hasLogo) {
158
+ await this._drawLogo(ctx, xOffset + marginOffset, yOffset, drawSize, logoUrl);
159
+ }
160
+ // 5. Draw Frame details
161
+ if (frame === 'text-bottom' || frame === 'text-top') {
162
+ const bannerY = frame === 'text-bottom' ? framePadding + size : framePadding;
163
+ this._drawFrame(ctx, cssWidth, bannerY, bannerHeight, this.zFrameText(), this.zFrameColor());
164
+ }
165
+ }
166
+ catch (err) {
167
+ console.error('Error generating QR code:', err);
168
+ }
169
+ }
170
+ /**
171
+ * Helper function to get gradient style fill (no else branches)
172
+ */
173
+ _getGradientStyle(ctx, gradientOpt, drawSize, xOffset, yOffset, marginOffset) {
174
+ if (gradientOpt.type === 'radial') {
175
+ const cx = drawSize / 2 + xOffset;
176
+ const cy = drawSize / 2 + yOffset;
177
+ const r = (drawSize / 2) * 1.2;
178
+ const grad = ctx.createRadialGradient(cx, cy, 0, cx, cy, r);
179
+ gradientOpt.colors.forEach((c, idx) => {
180
+ grad.addColorStop(idx / (gradientOpt.colors.length - 1), c);
181
+ });
182
+ return grad;
183
+ }
184
+ // Default to linear
185
+ const angle = gradientOpt.angle ?? 45;
186
+ const rad = (angle * Math.PI) / 180;
187
+ const x1 = Math.cos(rad) * 0;
188
+ const y1 = Math.sin(rad) * 0;
189
+ const x2 = Math.cos(rad) * drawSize + x1;
190
+ const y2 = Math.sin(rad) * drawSize + y1;
191
+ const grad = ctx.createLinearGradient(x1 + xOffset + marginOffset, y1 + yOffset + marginOffset, x2 + xOffset + marginOffset, y2 + yOffset + marginOffset);
192
+ gradientOpt.colors.forEach((c, idx) => {
193
+ grad.addColorStop(idx / (gradientOpt.colors.length - 1), c);
194
+ });
195
+ return grad;
196
+ }
197
+ /**
198
+ * Helper function to draw dynamic dot module style (no else branches)
199
+ */
200
+ _drawDot(ctx, x, y, moduleSize, dotStyle) {
201
+ ctx.beginPath();
202
+ if (dotStyle === 'dots') {
203
+ ctx.arc(x + moduleSize / 2, y + moduleSize / 2, (moduleSize / 2) * 0.95, 0, Math.PI * 2);
204
+ ctx.fill();
205
+ return;
206
+ }
207
+ if (dotStyle === 'rounded') {
208
+ this._drawRoundedRectPath(ctx, x + moduleSize * 0.05, y + moduleSize * 0.05, moduleSize * 0.9, moduleSize * 0.9, moduleSize * 0.3);
209
+ ctx.fill();
210
+ return;
211
+ }
212
+ // Default to square
213
+ ctx.fillRect(x, y, moduleSize, moduleSize);
214
+ }
215
+ /**
216
+ * Helper path function for rounded corners (no else branches)
217
+ */
218
+ _drawRoundedRectPath(ctx, x, y, w, h, r, counterClockwise = false) {
219
+ if (r > w / 2) {
220
+ r = w / 2;
221
+ }
222
+ if (r > h / 2) {
223
+ r = h / 2;
224
+ }
225
+ ctx.moveTo(x + r, y);
226
+ if (counterClockwise) {
227
+ ctx.lineTo(x + r, y);
228
+ ctx.arcTo(x, y, x, y + r, r);
229
+ ctx.lineTo(x, y + h - r);
230
+ ctx.arcTo(x, x + h, x + r, y + h, r);
231
+ ctx.lineTo(x + w - r, y + h);
232
+ ctx.arcTo(x + w, y + h, x + w, y + h - r, r);
233
+ ctx.lineTo(x + w, y + r);
234
+ ctx.arcTo(x + w, y, x + w - r, y, r);
235
+ ctx.closePath();
236
+ return;
237
+ }
238
+ ctx.lineTo(x + w - r, y);
239
+ ctx.arcTo(x + w, y, x + w, y + r, r);
240
+ ctx.lineTo(x + w, y + h - r);
241
+ ctx.arcTo(x + w, y + h, x + w - r, y + h, r);
242
+ ctx.lineTo(x + r, y + h);
243
+ ctx.arcTo(x, y + h, x, y + h - r, r);
244
+ ctx.lineTo(x, y + r);
245
+ ctx.arcTo(x, y, x + r, y, r);
246
+ ctx.closePath();
247
+ }
248
+ /**
249
+ * Draw eye pattern (no else branches)
250
+ */
251
+ _drawEye(ctx, x, y, moduleSize, style, color) {
252
+ ctx.save();
253
+ ctx.fillStyle = color;
254
+ const outerSize = 7 * moduleSize;
255
+ const innerSize = 3 * moduleSize;
256
+ const innerOffset = 2 * moduleSize;
257
+ if (style === 'circle') {
258
+ ctx.beginPath();
259
+ ctx.arc(x + outerSize / 2, y + outerSize / 2, outerSize / 2, 0, Math.PI * 2);
260
+ ctx.arc(x + outerSize / 2, y + outerSize / 2, outerSize / 2 - moduleSize, 0, Math.PI * 2, true);
261
+ ctx.fill();
262
+ ctx.beginPath();
263
+ ctx.arc(x + outerSize / 2, y + outerSize / 2, innerSize / 2, 0, Math.PI * 2);
264
+ ctx.fill();
265
+ ctx.restore();
266
+ return;
267
+ }
268
+ if (style === 'rounded') {
269
+ const outerRadius = 2 * moduleSize;
270
+ const innerRadius = moduleSize;
271
+ ctx.beginPath();
272
+ this._drawRoundedRectPath(ctx, x, y, outerSize, outerSize, outerRadius);
273
+ this._drawRoundedRectPath(ctx, x + moduleSize, y + moduleSize, outerSize - 2 * moduleSize, outerSize - 2 * moduleSize, outerRadius - moduleSize, true);
274
+ ctx.fill();
275
+ ctx.beginPath();
276
+ this._drawRoundedRectPath(ctx, x + innerOffset, y + innerOffset, innerSize, innerSize, innerRadius);
277
+ ctx.fill();
278
+ ctx.restore();
279
+ return;
280
+ }
281
+ // Default to square
282
+ ctx.fillRect(x, y, outerSize, outerSize);
283
+ ctx.clearRect(x + moduleSize, y + moduleSize, outerSize - 2 * moduleSize, outerSize - 2 * moduleSize);
284
+ ctx.fillRect(x + innerOffset, y + innerOffset, innerSize, innerSize);
285
+ ctx.restore();
286
+ }
287
+ /**
288
+ * Load and render the central logo on canvas (no else branches)
289
+ */
290
+ _drawLogo(ctx, marginOffset, yOffset, drawSize, logoUrl) {
291
+ return new Promise(resolve => {
292
+ const img = new Image();
293
+ img.crossOrigin = 'anonymous'; // prevent tainted canvas
294
+ img.src = logoUrl;
295
+ img.onload = () => {
296
+ const logoBoxSize = drawSize * this.zLogoSize();
297
+ const logoBoxX = marginOffset + (drawSize - 2 * marginOffset - logoBoxSize) / 2;
298
+ const logoBoxY = marginOffset + (drawSize - 2 * marginOffset - logoBoxSize) / 2 + yOffset;
299
+ ctx.save();
300
+ // 1. Draw logo mask background (circle or square)
301
+ const bgShape = this.zLogoBgShape();
302
+ if (bgShape === 'circle') {
303
+ ctx.fillStyle = this.zLogoBgColor();
304
+ ctx.beginPath();
305
+ ctx.arc(logoBoxX + logoBoxSize / 2, logoBoxY + logoBoxSize / 2, logoBoxSize / 2, 0, Math.PI * 2);
306
+ ctx.fill();
307
+ }
308
+ if (bgShape === 'square') {
309
+ ctx.fillStyle = this.zLogoBgColor();
310
+ ctx.beginPath();
311
+ this._drawRoundedRectPath(ctx, logoBoxX, logoBoxY, logoBoxSize, logoBoxSize, logoBoxSize * 0.2);
312
+ ctx.fill();
313
+ }
314
+ // 2. Draw logo image centered
315
+ const padding = this.zLogoPadding();
316
+ const logoImgSize = logoBoxSize - padding * 2;
317
+ const logoImgX = logoBoxX + padding;
318
+ const logoImgY = logoBoxY + padding;
319
+ if (bgShape === 'circle') {
320
+ // Clip to circle so non-circle logos look neat
321
+ ctx.beginPath();
322
+ ctx.arc(logoBoxX + logoBoxSize / 2, logoBoxY + logoBoxSize / 2, logoImgSize / 2, 0, Math.PI * 2);
323
+ ctx.clip();
324
+ }
325
+ ctx.drawImage(img, logoImgX, logoImgY, logoImgSize, logoImgSize);
326
+ ctx.restore();
327
+ resolve();
328
+ };
329
+ img.onerror = () => {
330
+ console.warn('Failed to load QR code logo from URL:', logoUrl);
331
+ resolve(); // resolve anyway to avoid blocking execution
332
+ };
333
+ });
334
+ }
335
+ _drawFrame(ctx, width, bannerY, bannerHeight, text, frameColor) {
336
+ ctx.save();
337
+ // Draw pill badge for standard frame aesthetic
338
+ ctx.fillStyle = frameColor;
339
+ const pillWidth = width * 0.75;
340
+ const pillHeight = 28;
341
+ const pillX = (width - pillWidth) / 2;
342
+ const pillY = bannerY + (bannerHeight - pillHeight) / 2;
343
+ ctx.beginPath();
344
+ this._drawRoundedRectPath(ctx, pillX, pillY, pillWidth, pillHeight, pillHeight / 2);
345
+ ctx.fill();
346
+ // Render banner text
347
+ ctx.fillStyle = '#ffffff';
348
+ ctx.font = 'bold 12px var(--font-sans, system-ui, sans-serif)';
349
+ ctx.textAlign = 'center';
350
+ ctx.textBaseline = 'middle';
351
+ ctx.fillText(text, width / 2, pillY + pillHeight / 2);
352
+ ctx.restore();
353
+ }
354
+ /**
355
+ * Download the generated canvas QR Code as a PNG image file
356
+ */
357
+ downloadQr() {
358
+ const canvas = this._canvasRef()?.nativeElement;
359
+ if (!canvas) {
360
+ return;
361
+ }
362
+ const dataUrl = canvas.toDataURL('image/png');
363
+ const link = document.createElement('a');
364
+ link.href = dataUrl;
365
+ link.download = `qrcode_${Date.now()}.png`;
366
+ document.body.appendChild(link);
367
+ link.click();
368
+ document.body.removeChild(link);
369
+ }
370
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ZQrCodeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
371
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.9", type: ZQrCodeComponent, isStandalone: true, selector: "z-qrcode", inputs: { zValue: { classPropertyName: "zValue", publicName: "zValue", isSignal: true, isRequired: true, transformFunction: null }, zSize: { classPropertyName: "zSize", publicName: "zSize", isSignal: true, isRequired: false, transformFunction: null }, zLevel: { classPropertyName: "zLevel", publicName: "zLevel", isSignal: true, isRequired: false, transformFunction: null }, zLogo: { classPropertyName: "zLogo", publicName: "zLogo", isSignal: true, isRequired: false, transformFunction: null }, zLogoSize: { classPropertyName: "zLogoSize", publicName: "zLogoSize", isSignal: true, isRequired: false, transformFunction: null }, zLogoBgColor: { classPropertyName: "zLogoBgColor", publicName: "zLogoBgColor", isSignal: true, isRequired: false, transformFunction: null }, zLogoBgShape: { classPropertyName: "zLogoBgShape", publicName: "zLogoBgShape", isSignal: true, isRequired: false, transformFunction: null }, zLogoPadding: { classPropertyName: "zLogoPadding", publicName: "zLogoPadding", isSignal: true, isRequired: false, transformFunction: null }, zFgColor: { classPropertyName: "zFgColor", publicName: "zFgColor", isSignal: true, isRequired: false, transformFunction: null }, zBgColor: { classPropertyName: "zBgColor", publicName: "zBgColor", isSignal: true, isRequired: false, transformFunction: null }, zDotStyle: { classPropertyName: "zDotStyle", publicName: "zDotStyle", isSignal: true, isRequired: false, transformFunction: null }, zEyeStyle: { classPropertyName: "zEyeStyle", publicName: "zEyeStyle", isSignal: true, isRequired: false, transformFunction: null }, zEyeColor: { classPropertyName: "zEyeColor", publicName: "zEyeColor", isSignal: true, isRequired: false, transformFunction: null }, zMargin: { classPropertyName: "zMargin", publicName: "zMargin", isSignal: true, isRequired: false, transformFunction: null }, zFgGradient: { classPropertyName: "zFgGradient", publicName: "zFgGradient", isSignal: true, isRequired: false, transformFunction: null }, zFrame: { classPropertyName: "zFrame", publicName: "zFrame", isSignal: true, isRequired: false, transformFunction: null }, zFrameText: { classPropertyName: "zFrameText", publicName: "zFrameText", isSignal: true, isRequired: false, transformFunction: null }, zFrameColor: { classPropertyName: "zFrameColor", publicName: "zFrameColor", isSignal: true, isRequired: false, transformFunction: null }, zFramePadding: { classPropertyName: "zFramePadding", publicName: "zFramePadding", isSignal: true, isRequired: false, transformFunction: null }, zFrameBorderRadius: { classPropertyName: "zFrameBorderRadius", publicName: "zFrameBorderRadius", isSignal: true, isRequired: false, transformFunction: null }, zDownloadable: { classPropertyName: "zDownloadable", publicName: "zDownloadable", isSignal: true, isRequired: false, transformFunction: null }, zDownloadButton: { classPropertyName: "zDownloadButton", publicName: "zDownloadButton", isSignal: true, isRequired: false, transformFunction: null }, zShadow: { classPropertyName: "zShadow", publicName: "zShadow", isSignal: true, isRequired: false, transformFunction: null }, zLoading: { classPropertyName: "zLoading", publicName: "zLoading", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "_canvasRef", first: true, predicate: ["qrCanvas"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"z-qrcode-container relative flex flex-col items-center\">\n <div\n class=\"z-qrcode-canvas-wrapper relative transition-all duration-200\"\n [class.shadow-md]=\"zShadow()\"\n [style.border-radius.px]=\"zFrame() !== 'none' || zShadow() ? zFrameBorderRadius() : 0\"\n [style.overflow]=\"zFrame() !== 'none' || zShadow() ? 'hidden' : 'visible'\">\n <canvas\n #qrCanvas\n class=\"block\"\n [style.width.px]=\"zFrame() !== 'none' ? zSize() + zFramePadding() * 2 : zSize()\"\n [style.height.px]=\"\n zFrame() !== 'none'\n ? zSize() + zFramePadding() * 2 + (zFrame() === 'text-bottom' || zFrame() === 'text-top' ? 50 : 0)\n : zSize()\n \"></canvas>\n\n @if (zLoading()) {\n <div class=\"absolute inset-0 z-10 flex items-center justify-center bg-white/80 transition-opacity\">\n <svg\n class=\"h-8 w-8 animate-spin text-slate-800\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\">\n <circle class=\"opacity-25\" cx=\"12\" cy=\"12\" r=\"10\" stroke=\"currentColor\" stroke-width=\"4\" />\n <path\n class=\"opacity-75\"\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\" />\n </svg>\n </div>\n }\n\n @if (zDownloadable() && !zLoading()) {\n <div\n class=\"absolute inset-0 z-10 flex items-center justify-center rounded-md bg-black/45 opacity-0 transition-all duration-200 hover:opacity-100\">\n <button\n z-button\n [zWave]=\"false\"\n zSize=\"sm\"\n (click)=\"downloadQr()\"\n class=\"flex cursor-pointer items-center gap-2 font-semibold select-none\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"h-4 w-4\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n stroke-width=\"2.5\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4\" />\n </svg>\n {{ downloadText() | translate }}\n </button>\n </div>\n }\n </div>\n\n @if (zDownloadButton() && !zLoading()) {\n <div class=\"mt-4\">\n <button\n z-button\n [zWave]=\"false\"\n (click)=\"downloadQr()\"\n class=\"flex cursor-pointer items-center gap-2 font-semibold select-none\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"h-4 w-4\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n stroke-width=\"2.5\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4\" />\n </svg>\n {{ downloadText() | translate }}\n </button>\n </div>\n }\n</div>\n", styles: ["z-qrcode{display:inline-block;line-height:0}z-qrcode .z-qrcode-container{position:relative;display:inline-flex;flex-direction:column;align-items:center;border-radius:inherit}z-qrcode .z-qrcode-canvas-wrapper{position:relative;overflow:hidden;border-radius:inherit}\n"], dependencies: [{ kind: "component", type: ZButtonComponent, selector: "z-button, button[z-button], a[z-button]", inputs: ["class", "zType", "zSize", "zShape", "zLabel", "zLoading", "zDisabled", "zTypeIcon", "zAnimatedTypeIcon", "zAnimateIcon", "zAnimationTriggerIcon", "zSizeIcon", "zStrokeWidthIcon", "zWave"], exportAs: ["zButton"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
372
+ }
373
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ZQrCodeComponent, decorators: [{
374
+ type: Component,
375
+ args: [{ selector: 'z-qrcode', imports: [TranslatePipe, ZButtonComponent], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div class=\"z-qrcode-container relative flex flex-col items-center\">\n <div\n class=\"z-qrcode-canvas-wrapper relative transition-all duration-200\"\n [class.shadow-md]=\"zShadow()\"\n [style.border-radius.px]=\"zFrame() !== 'none' || zShadow() ? zFrameBorderRadius() : 0\"\n [style.overflow]=\"zFrame() !== 'none' || zShadow() ? 'hidden' : 'visible'\">\n <canvas\n #qrCanvas\n class=\"block\"\n [style.width.px]=\"zFrame() !== 'none' ? zSize() + zFramePadding() * 2 : zSize()\"\n [style.height.px]=\"\n zFrame() !== 'none'\n ? zSize() + zFramePadding() * 2 + (zFrame() === 'text-bottom' || zFrame() === 'text-top' ? 50 : 0)\n : zSize()\n \"></canvas>\n\n @if (zLoading()) {\n <div class=\"absolute inset-0 z-10 flex items-center justify-center bg-white/80 transition-opacity\">\n <svg\n class=\"h-8 w-8 animate-spin text-slate-800\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\">\n <circle class=\"opacity-25\" cx=\"12\" cy=\"12\" r=\"10\" stroke=\"currentColor\" stroke-width=\"4\" />\n <path\n class=\"opacity-75\"\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\" />\n </svg>\n </div>\n }\n\n @if (zDownloadable() && !zLoading()) {\n <div\n class=\"absolute inset-0 z-10 flex items-center justify-center rounded-md bg-black/45 opacity-0 transition-all duration-200 hover:opacity-100\">\n <button\n z-button\n [zWave]=\"false\"\n zSize=\"sm\"\n (click)=\"downloadQr()\"\n class=\"flex cursor-pointer items-center gap-2 font-semibold select-none\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"h-4 w-4\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n stroke-width=\"2.5\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4\" />\n </svg>\n {{ downloadText() | translate }}\n </button>\n </div>\n }\n </div>\n\n @if (zDownloadButton() && !zLoading()) {\n <div class=\"mt-4\">\n <button\n z-button\n [zWave]=\"false\"\n (click)=\"downloadQr()\"\n class=\"flex cursor-pointer items-center gap-2 font-semibold select-none\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"h-4 w-4\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n stroke-width=\"2.5\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4\" />\n </svg>\n {{ downloadText() | translate }}\n </button>\n </div>\n }\n</div>\n", styles: ["z-qrcode{display:inline-block;line-height:0}z-qrcode .z-qrcode-container{position:relative;display:inline-flex;flex-direction:column;align-items:center;border-radius:inherit}z-qrcode .z-qrcode-canvas-wrapper{position:relative;overflow:hidden;border-radius:inherit}\n"] }]
376
+ }], ctorParameters: () => [], propDecorators: { zValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "zValue", required: true }] }], zSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "zSize", required: false }] }], zLevel: [{ type: i0.Input, args: [{ isSignal: true, alias: "zLevel", required: false }] }], zLogo: [{ type: i0.Input, args: [{ isSignal: true, alias: "zLogo", required: false }] }], zLogoSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "zLogoSize", required: false }] }], zLogoBgColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "zLogoBgColor", required: false }] }], zLogoBgShape: [{ type: i0.Input, args: [{ isSignal: true, alias: "zLogoBgShape", required: false }] }], zLogoPadding: [{ type: i0.Input, args: [{ isSignal: true, alias: "zLogoPadding", required: false }] }], zFgColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "zFgColor", required: false }] }], zBgColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "zBgColor", required: false }] }], zDotStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "zDotStyle", required: false }] }], zEyeStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "zEyeStyle", required: false }] }], zEyeColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "zEyeColor", required: false }] }], zMargin: [{ type: i0.Input, args: [{ isSignal: true, alias: "zMargin", required: false }] }], zFgGradient: [{ type: i0.Input, args: [{ isSignal: true, alias: "zFgGradient", required: false }] }], zFrame: [{ type: i0.Input, args: [{ isSignal: true, alias: "zFrame", required: false }] }], zFrameText: [{ type: i0.Input, args: [{ isSignal: true, alias: "zFrameText", required: false }] }], zFrameColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "zFrameColor", required: false }] }], zFramePadding: [{ type: i0.Input, args: [{ isSignal: true, alias: "zFramePadding", required: false }] }], zFrameBorderRadius: [{ type: i0.Input, args: [{ isSignal: true, alias: "zFrameBorderRadius", required: false }] }], zDownloadable: [{ type: i0.Input, args: [{ isSignal: true, alias: "zDownloadable", required: false }] }], zDownloadButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "zDownloadButton", required: false }] }], zShadow: [{ type: i0.Input, args: [{ isSignal: true, alias: "zShadow", required: false }] }], zLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "zLoading", required: false }] }], _canvasRef: [{ type: i0.ViewChild, args: ['qrCanvas', { isSignal: true }] }] } });
377
+
378
+ /**
379
+ * Generated bundle index. Do not edit.
380
+ */
381
+
382
+ export { ZQrCodeComponent };
383
+ //# sourceMappingURL=shival99-z-ui-components-z-qrcode.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shival99-z-ui-components-z-qrcode.mjs","sources":["../../../../libs/core-ui/components/z-qrcode/z-qrcode.component.ts","../../../../libs/core-ui/components/z-qrcode/z-qrcode.component.html","../../../../libs/core-ui/components/z-qrcode/shival99-z-ui-components-z-qrcode.ts"],"sourcesContent":["import { isPlatformBrowser } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n inject,\n input,\n PLATFORM_ID,\n signal,\n viewChild,\n effect,\n ViewEncapsulation,\n} from '@angular/core';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { ZButtonComponent } from '@shival99/z-ui/components/z-button';\nimport { zTransform } from '@shival99/z-ui/utils';\nimport * as QRCode from 'qrcode';\nimport {\n ZQrCodeDotStyle,\n ZQrCodeErrorCorrectionLevel,\n ZQrCodeEyeStyle,\n ZQrCodeFrame,\n ZQrCodeGradient,\n} from './z-qrcode.types';\n\n@Component({\n selector: 'z-qrcode',\n imports: [TranslatePipe, ZButtonComponent],\n standalone: true,\n templateUrl: './z-qrcode.component.html',\n styleUrl: './z-qrcode.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class ZQrCodeComponent {\n // Inputs\n public readonly zValue = input.required<string>();\n public readonly zSize = input<number>(256);\n public readonly zLevel = input<ZQrCodeErrorCorrectionLevel>('H');\n public readonly zLogo = input<string>('');\n public readonly zLogoSize = input<number>(0.2); // 20% of QR size\n public readonly zLogoBgColor = input<string>('#ffffff');\n public readonly zLogoBgShape = input<'circle' | 'square' | 'none'>('circle');\n public readonly zLogoPadding = input<number>(4);\n public readonly zFgColor = input<string>('#000000');\n public readonly zBgColor = input<string>('#ffffff');\n public readonly zDotStyle = input<ZQrCodeDotStyle>('square');\n public readonly zEyeStyle = input<ZQrCodeEyeStyle>('square');\n public readonly zEyeColor = input<string>(''); // if empty, falls back to zFgColor\n public readonly zMargin = input<number>(4); // margin in modules\n public readonly zFgGradient = input<ZQrCodeGradient>();\n public readonly zFrame = input<ZQrCodeFrame>('none');\n public readonly zFrameText = input<string>('SCAN ME');\n public readonly zFrameColor = input<string>('#0f172a');\n public readonly zFramePadding = input<number>(12); // padding around QR inside frame\n public readonly zFrameBorderRadius = input<number>(12); // border radius of the frame\n public readonly zDownloadable = input(false, { transform: zTransform }); // toggles hover overlay button\n public readonly zDownloadButton = input(false, { transform: zTransform }); // toggles standalone button below\n public readonly zShadow = input(true, { transform: zTransform }); // Bật/tắt đổ bóng khung ngoài\n public readonly zLoading = input(false, { transform: zTransform });\n\n // DOM references\n private readonly _canvasRef = viewChild<ElementRef<HTMLCanvasElement>>('qrCanvas');\n private readonly _platformId = inject(PLATFORM_ID);\n\n // States\n protected readonly downloadText = signal('i18n_z_ui_qrcode_download');\n\n constructor() {\n // Re-render when any signal inputs change\n effect(() => {\n if (isPlatformBrowser(this._platformId)) {\n void this.renderQrCode();\n }\n });\n }\n\n /**\n * Renders the stylized QR code onto the canvas element\n */\n public async renderQrCode(): Promise<void> {\n const canvas = this._canvasRef()?.nativeElement;\n if (!canvas) {\n return;\n }\n\n const value = this.zValue();\n const size = this.zSize();\n const level = this.zLevel();\n const fgColor = this.zFgColor();\n const bgColor = this.zBgColor();\n const dotStyle = this.zDotStyle();\n const eyeStyle = this.zEyeStyle();\n const eyeColorInput = this.zEyeColor();\n const logoUrl = this.zLogo();\n const frame = this.zFrame();\n const dpr = isPlatformBrowser(this._platformId) ? window.devicePixelRatio || 1 : 1;\n const framePadding = frame !== 'none' ? this.zFramePadding() : 0;\n const frameBorderRadius = this.zFrameBorderRadius();\n\n const bannerHeight = frame === 'text-bottom' || frame === 'text-top' ? 50 : 0;\n const cssWidth = size + framePadding * 2;\n const cssHeight = size + framePadding * 2 + bannerHeight;\n canvas.width = cssWidth * dpr;\n canvas.height = cssHeight * dpr;\n\n const ctx = canvas.getContext('2d');\n if (!ctx) {\n return;\n }\n\n ctx.scale(dpr, dpr);\n\n // Clear background\n ctx.fillStyle = bgColor;\n ctx.fillRect(0, 0, cssWidth, cssHeight);\n\n if (frame !== 'none') {\n // Draw rounded frame container\n ctx.fillStyle = bgColor;\n ctx.beginPath();\n this._drawRoundedRectPath(ctx, 0, 0, cssWidth, cssHeight, frameBorderRadius);\n ctx.fill();\n\n // Draw border outline\n ctx.strokeStyle = this.zFrameColor();\n ctx.lineWidth = 1.5;\n ctx.beginPath();\n this._drawRoundedRectPath(ctx, 0.75, 0.75, cssWidth - 1.5, cssHeight - 1.5, frameBorderRadius);\n ctx.stroke();\n }\n\n try {\n // Create raw QR code matrix\n const qr = QRCode.create(value, { errorCorrectionLevel: level });\n const moduleCount = qr.modules.size;\n const marginModules = this.zMargin();\n const drawSize = size;\n\n // Calculate module size\n const moduleSize = drawSize / (moduleCount + 2 * marginModules);\n const marginOffset = marginModules * moduleSize;\n\n // Draw offsets\n let xOffset = 0;\n let yOffset = 0;\n if (frame !== 'none') {\n xOffset = framePadding;\n yOffset = frame === 'text-top' ? framePadding + bannerHeight : framePadding;\n }\n\n // 1. Prepare foreground style (solid or gradient)\n let fillStyle: string | CanvasGradient = fgColor;\n const gradientOpt = this.zFgGradient();\n if (gradientOpt && gradientOpt.colors && gradientOpt.colors.length > 0) {\n fillStyle = this._getGradientStyle(ctx, gradientOpt, drawSize, xOffset, yOffset, marginOffset);\n }\n\n const eyeColor = eyeColorInput || fillStyle;\n\n // 2. Draw normal modules (skip eyes and central logo)\n ctx.fillStyle = fillStyle;\n\n // Calculate logo skip boundary\n const hasLogo = !!logoUrl;\n const logoModules = Math.ceil(moduleCount * this.zLogoSize());\n const logoStart = Math.floor((moduleCount - logoModules) / 2);\n const logoEnd = logoStart + logoModules;\n\n for (let r = 0; r < moduleCount; r++) {\n for (let c = 0; c < moduleCount; c++) {\n // Check if it's top-left, top-right, or bottom-left eye\n const isTopLeftEye = r < 7 && c < 7;\n const isTopRightEye = r < 7 && c >= moduleCount - 7;\n const isBottomLeftEye = r >= moduleCount - 7 && c < 7;\n\n if (isTopLeftEye || isTopRightEye || isBottomLeftEye) {\n continue;\n }\n\n // Check if overlapping logo area\n if (hasLogo && r >= logoStart && r < logoEnd && c >= logoStart && c < logoEnd) {\n continue;\n }\n\n const isDark = qr.modules.get(r, c) === 1; // standard raw check\n if (!isDark) {\n continue;\n }\n\n const x = xOffset + marginOffset + c * moduleSize;\n const y = yOffset + marginOffset + r * moduleSize;\n\n this._drawDot(ctx, x, y, moduleSize, dotStyle);\n }\n }\n\n // 3. Draw Eyes\n const eyeCoords = [\n { x: xOffset + marginOffset, y: yOffset + marginOffset }, // Top Left\n { x: xOffset + marginOffset + (moduleCount - 7) * moduleSize, y: yOffset + marginOffset }, // Top Right\n { x: xOffset + marginOffset, y: yOffset + marginOffset + (moduleCount - 7) * moduleSize }, // Bottom Left\n ];\n\n eyeCoords.forEach(coord => {\n this._drawEye(ctx, coord.x, coord.y, moduleSize, eyeStyle, eyeColor);\n });\n\n // 4. Draw central logo if specified\n if (hasLogo) {\n await this._drawLogo(ctx, xOffset + marginOffset, yOffset, drawSize, logoUrl);\n }\n\n // 5. Draw Frame details\n if (frame === 'text-bottom' || frame === 'text-top') {\n const bannerY = frame === 'text-bottom' ? framePadding + size : framePadding;\n this._drawFrame(ctx, cssWidth, bannerY, bannerHeight, this.zFrameText(), this.zFrameColor());\n }\n } catch (err) {\n console.error('Error generating QR code:', err);\n }\n }\n\n /**\n * Helper function to get gradient style fill (no else branches)\n */\n private _getGradientStyle(\n ctx: CanvasRenderingContext2D,\n gradientOpt: ZQrCodeGradient,\n drawSize: number,\n xOffset: number,\n yOffset: number,\n marginOffset: number\n ): CanvasGradient {\n if (gradientOpt.type === 'radial') {\n const cx = drawSize / 2 + xOffset;\n const cy = drawSize / 2 + yOffset;\n const r = (drawSize / 2) * 1.2;\n const grad = ctx.createRadialGradient(cx, cy, 0, cx, cy, r);\n gradientOpt.colors.forEach((c, idx) => {\n grad.addColorStop(idx / (gradientOpt.colors.length - 1), c);\n });\n return grad;\n }\n\n // Default to linear\n const angle = gradientOpt.angle ?? 45;\n const rad = (angle * Math.PI) / 180;\n const x1 = Math.cos(rad) * 0;\n const y1 = Math.sin(rad) * 0;\n const x2 = Math.cos(rad) * drawSize + x1;\n const y2 = Math.sin(rad) * drawSize + y1;\n const grad = ctx.createLinearGradient(\n x1 + xOffset + marginOffset,\n y1 + yOffset + marginOffset,\n x2 + xOffset + marginOffset,\n y2 + yOffset + marginOffset\n );\n gradientOpt.colors.forEach((c, idx) => {\n grad.addColorStop(idx / (gradientOpt.colors.length - 1), c);\n });\n return grad;\n }\n\n /**\n * Helper function to draw dynamic dot module style (no else branches)\n */\n private _drawDot(\n ctx: CanvasRenderingContext2D,\n x: number,\n y: number,\n moduleSize: number,\n dotStyle: ZQrCodeDotStyle\n ): void {\n ctx.beginPath();\n if (dotStyle === 'dots') {\n ctx.arc(x + moduleSize / 2, y + moduleSize / 2, (moduleSize / 2) * 0.95, 0, Math.PI * 2);\n ctx.fill();\n return;\n }\n\n if (dotStyle === 'rounded') {\n this._drawRoundedRectPath(\n ctx,\n x + moduleSize * 0.05,\n y + moduleSize * 0.05,\n moduleSize * 0.9,\n moduleSize * 0.9,\n moduleSize * 0.3\n );\n ctx.fill();\n return;\n }\n\n // Default to square\n ctx.fillRect(x, y, moduleSize, moduleSize);\n }\n\n /**\n * Helper path function for rounded corners (no else branches)\n */\n private _drawRoundedRectPath(\n ctx: CanvasRenderingContext2D,\n x: number,\n y: number,\n w: number,\n h: number,\n r: number,\n counterClockwise = false\n ): void {\n if (r > w / 2) {\n r = w / 2;\n }\n if (r > h / 2) {\n r = h / 2;\n }\n\n ctx.moveTo(x + r, y);\n if (counterClockwise) {\n ctx.lineTo(x + r, y);\n ctx.arcTo(x, y, x, y + r, r);\n ctx.lineTo(x, y + h - r);\n ctx.arcTo(x, x + h, x + r, y + h, r);\n ctx.lineTo(x + w - r, y + h);\n ctx.arcTo(x + w, y + h, x + w, y + h - r, r);\n ctx.lineTo(x + w, y + r);\n ctx.arcTo(x + w, y, x + w - r, y, r);\n ctx.closePath();\n return;\n }\n\n ctx.lineTo(x + w - r, y);\n ctx.arcTo(x + w, y, x + w, y + r, r);\n ctx.lineTo(x + w, y + h - r);\n ctx.arcTo(x + w, y + h, x + w - r, y + h, r);\n ctx.lineTo(x + r, y + h);\n ctx.arcTo(x, y + h, x, y + h - r, r);\n ctx.lineTo(x, y + r);\n ctx.arcTo(x, y, x + r, y, r);\n ctx.closePath();\n }\n\n /**\n * Draw eye pattern (no else branches)\n */\n private _drawEye(\n ctx: CanvasRenderingContext2D,\n x: number,\n y: number,\n moduleSize: number,\n style: ZQrCodeEyeStyle,\n color: string | CanvasGradient\n ): void {\n ctx.save();\n ctx.fillStyle = color;\n\n const outerSize = 7 * moduleSize;\n const innerSize = 3 * moduleSize;\n const innerOffset = 2 * moduleSize;\n\n if (style === 'circle') {\n ctx.beginPath();\n ctx.arc(x + outerSize / 2, y + outerSize / 2, outerSize / 2, 0, Math.PI * 2);\n ctx.arc(x + outerSize / 2, y + outerSize / 2, outerSize / 2 - moduleSize, 0, Math.PI * 2, true);\n ctx.fill();\n\n ctx.beginPath();\n ctx.arc(x + outerSize / 2, y + outerSize / 2, innerSize / 2, 0, Math.PI * 2);\n ctx.fill();\n ctx.restore();\n return;\n }\n\n if (style === 'rounded') {\n const outerRadius = 2 * moduleSize;\n const innerRadius = moduleSize;\n\n ctx.beginPath();\n this._drawRoundedRectPath(ctx, x, y, outerSize, outerSize, outerRadius);\n this._drawRoundedRectPath(\n ctx,\n x + moduleSize,\n y + moduleSize,\n outerSize - 2 * moduleSize,\n outerSize - 2 * moduleSize,\n outerRadius - moduleSize,\n true\n );\n ctx.fill();\n\n ctx.beginPath();\n this._drawRoundedRectPath(ctx, x + innerOffset, y + innerOffset, innerSize, innerSize, innerRadius);\n ctx.fill();\n ctx.restore();\n return;\n }\n\n // Default to square\n ctx.fillRect(x, y, outerSize, outerSize);\n ctx.clearRect(x + moduleSize, y + moduleSize, outerSize - 2 * moduleSize, outerSize - 2 * moduleSize);\n ctx.fillRect(x + innerOffset, y + innerOffset, innerSize, innerSize);\n ctx.restore();\n }\n\n /**\n * Load and render the central logo on canvas (no else branches)\n */\n private _drawLogo(\n ctx: CanvasRenderingContext2D,\n marginOffset: number,\n yOffset: number,\n drawSize: number,\n logoUrl: string\n ): Promise<void> {\n return new Promise(resolve => {\n const img = new Image();\n img.crossOrigin = 'anonymous'; // prevent tainted canvas\n img.src = logoUrl;\n\n img.onload = () => {\n const logoBoxSize = drawSize * this.zLogoSize();\n const logoBoxX = marginOffset + (drawSize - 2 * marginOffset - logoBoxSize) / 2;\n const logoBoxY = marginOffset + (drawSize - 2 * marginOffset - logoBoxSize) / 2 + yOffset;\n\n ctx.save();\n\n // 1. Draw logo mask background (circle or square)\n const bgShape = this.zLogoBgShape();\n if (bgShape === 'circle') {\n ctx.fillStyle = this.zLogoBgColor();\n ctx.beginPath();\n ctx.arc(logoBoxX + logoBoxSize / 2, logoBoxY + logoBoxSize / 2, logoBoxSize / 2, 0, Math.PI * 2);\n ctx.fill();\n }\n if (bgShape === 'square') {\n ctx.fillStyle = this.zLogoBgColor();\n ctx.beginPath();\n this._drawRoundedRectPath(ctx, logoBoxX, logoBoxY, logoBoxSize, logoBoxSize, logoBoxSize * 0.2);\n ctx.fill();\n }\n\n // 2. Draw logo image centered\n const padding = this.zLogoPadding();\n const logoImgSize = logoBoxSize - padding * 2;\n const logoImgX = logoBoxX + padding;\n const logoImgY = logoBoxY + padding;\n\n if (bgShape === 'circle') {\n // Clip to circle so non-circle logos look neat\n ctx.beginPath();\n ctx.arc(logoBoxX + logoBoxSize / 2, logoBoxY + logoBoxSize / 2, logoImgSize / 2, 0, Math.PI * 2);\n ctx.clip();\n }\n\n ctx.drawImage(img, logoImgX, logoImgY, logoImgSize, logoImgSize);\n ctx.restore();\n resolve();\n };\n\n img.onerror = () => {\n console.warn('Failed to load QR code logo from URL:', logoUrl);\n resolve(); // resolve anyway to avoid blocking execution\n };\n });\n }\n\n private _drawFrame(\n ctx: CanvasRenderingContext2D,\n width: number,\n bannerY: number,\n bannerHeight: number,\n text: string,\n frameColor: string\n ): void {\n ctx.save();\n\n // Draw pill badge for standard frame aesthetic\n ctx.fillStyle = frameColor;\n const pillWidth = width * 0.75;\n const pillHeight = 28;\n const pillX = (width - pillWidth) / 2;\n const pillY = bannerY + (bannerHeight - pillHeight) / 2;\n\n ctx.beginPath();\n this._drawRoundedRectPath(ctx, pillX, pillY, pillWidth, pillHeight, pillHeight / 2);\n ctx.fill();\n\n // Render banner text\n ctx.fillStyle = '#ffffff';\n ctx.font = 'bold 12px var(--font-sans, system-ui, sans-serif)';\n ctx.textAlign = 'center';\n ctx.textBaseline = 'middle';\n ctx.fillText(text, width / 2, pillY + pillHeight / 2);\n\n ctx.restore();\n }\n\n /**\n * Download the generated canvas QR Code as a PNG image file\n */\n protected downloadQr(): void {\n const canvas = this._canvasRef()?.nativeElement;\n if (!canvas) {\n return;\n }\n\n const dataUrl = canvas.toDataURL('image/png');\n const link = document.createElement('a');\n link.href = dataUrl;\n link.download = `qrcode_${Date.now()}.png`;\n document.body.appendChild(link);\n link.click();\n document.body.removeChild(link);\n }\n}\n","<div class=\"z-qrcode-container relative flex flex-col items-center\">\n <div\n class=\"z-qrcode-canvas-wrapper relative transition-all duration-200\"\n [class.shadow-md]=\"zShadow()\"\n [style.border-radius.px]=\"zFrame() !== 'none' || zShadow() ? zFrameBorderRadius() : 0\"\n [style.overflow]=\"zFrame() !== 'none' || zShadow() ? 'hidden' : 'visible'\">\n <canvas\n #qrCanvas\n class=\"block\"\n [style.width.px]=\"zFrame() !== 'none' ? zSize() + zFramePadding() * 2 : zSize()\"\n [style.height.px]=\"\n zFrame() !== 'none'\n ? zSize() + zFramePadding() * 2 + (zFrame() === 'text-bottom' || zFrame() === 'text-top' ? 50 : 0)\n : zSize()\n \"></canvas>\n\n @if (zLoading()) {\n <div class=\"absolute inset-0 z-10 flex items-center justify-center bg-white/80 transition-opacity\">\n <svg\n class=\"h-8 w-8 animate-spin text-slate-800\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\">\n <circle class=\"opacity-25\" cx=\"12\" cy=\"12\" r=\"10\" stroke=\"currentColor\" stroke-width=\"4\" />\n <path\n class=\"opacity-75\"\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\" />\n </svg>\n </div>\n }\n\n @if (zDownloadable() && !zLoading()) {\n <div\n class=\"absolute inset-0 z-10 flex items-center justify-center rounded-md bg-black/45 opacity-0 transition-all duration-200 hover:opacity-100\">\n <button\n z-button\n [zWave]=\"false\"\n zSize=\"sm\"\n (click)=\"downloadQr()\"\n class=\"flex cursor-pointer items-center gap-2 font-semibold select-none\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"h-4 w-4\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n stroke-width=\"2.5\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4\" />\n </svg>\n {{ downloadText() | translate }}\n </button>\n </div>\n }\n </div>\n\n @if (zDownloadButton() && !zLoading()) {\n <div class=\"mt-4\">\n <button\n z-button\n [zWave]=\"false\"\n (click)=\"downloadQr()\"\n class=\"flex cursor-pointer items-center gap-2 font-semibold select-none\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"h-4 w-4\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n stroke-width=\"2.5\">\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4\" />\n </svg>\n {{ downloadText() | translate }}\n </button>\n </div>\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;MAkCa,gBAAgB,CAAA;;AAEX,IAAA,MAAM,GAAG,KAAK,CAAC,QAAQ,iDAAU;AACjC,IAAA,KAAK,GAAG,KAAK,CAAS,GAAG,iDAAC;AAC1B,IAAA,MAAM,GAAG,KAAK,CAA8B,GAAG,kDAAC;AAChD,IAAA,KAAK,GAAG,KAAK,CAAS,EAAE,iDAAC;AACzB,IAAA,SAAS,GAAG,KAAK,CAAS,GAAG,EAAA,IAAA,SAAA,GAAA,CAAA,EAAA,SAAA,EAAA,WAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAC,CAAC;AAC/B,IAAA,YAAY,GAAG,KAAK,CAAS,SAAS,wDAAC;AACvC,IAAA,YAAY,GAAG,KAAK,CAA+B,QAAQ,wDAAC;AAC5D,IAAA,YAAY,GAAG,KAAK,CAAS,CAAC,wDAAC;AAC/B,IAAA,QAAQ,GAAG,KAAK,CAAS,SAAS,oDAAC;AACnC,IAAA,QAAQ,GAAG,KAAK,CAAS,SAAS,oDAAC;AACnC,IAAA,SAAS,GA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