@shival99/z-ui 2.1.24 → 2.1.26
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.
- package/fesm2022/shival99-z-ui-components-z-calendar.mjs +1 -1
- package/fesm2022/shival99-z-ui-components-z-calendar.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-gallery.mjs +62 -0
- package/fesm2022/shival99-z-ui-components-z-gallery.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-input.mjs +1 -1
- package/fesm2022/shival99-z-ui-components-z-input.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-kanban.mjs +1 -1
- package/fesm2022/shival99-z-ui-components-z-kanban.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-pagination.mjs +1 -1
- package/fesm2022/shival99-z-ui-components-z-pagination.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-select.mjs +6 -4
- package/fesm2022/shival99-z-ui-components-z-select.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-table.mjs +3 -3
- package/fesm2022/shival99-z-ui-components-z-table.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-toast.mjs +27 -26
- package/fesm2022/shival99-z-ui-components-z-toast.mjs.map +1 -1
- package/package.json +1 -1
- package/types/shival99-z-ui-components-z-autocomplete.d.ts +1 -1
- package/types/shival99-z-ui-components-z-editor.d.ts +1 -1
- package/types/shival99-z-ui-components-z-gallery.d.ts +2 -0
- package/types/shival99-z-ui-components-z-modal.d.ts +1 -1
- package/types/shival99-z-ui-components-z-select.d.ts +3 -1
- package/types/shival99-z-ui-components-z-table.d.ts +1 -1
- package/types/shival99-z-ui-components-z-upload.d.ts +3 -3
|
@@ -198,6 +198,8 @@ class ZGalleryItemComponent {
|
|
|
198
198
|
formattedSize = computed(() => formatFileSize(this.file().size), ...(ngDevMode ? [{ debugName: "formattedSize" }] : []));
|
|
199
199
|
category = computed(() => getFileCategory(this.file()), ...(ngDevMode ? [{ debugName: "category" }] : []));
|
|
200
200
|
isImage = computed(() => this.category() === 'image', ...(ngDevMode ? [{ debugName: "isImage" }] : []));
|
|
201
|
+
isVideo = computed(() => this.category() === 'video', ...(ngDevMode ? [{ debugName: "isVideo" }] : []));
|
|
202
|
+
hasVideoPreview = computed(() => this.isVideo() && !!this.file().url, ...(ngDevMode ? [{ debugName: "hasVideoPreview" }] : []));
|
|
201
203
|
fileExtension = computed(() => {
|
|
202
204
|
const fileName = this.file().name;
|
|
203
205
|
const parts = fileName.split('.');
|
|
@@ -312,6 +314,24 @@ class ZGalleryItemComponent {
|
|
|
312
314
|
(load)="onImageLoad()"
|
|
313
315
|
(error)="onImageError()"
|
|
314
316
|
/>
|
|
317
|
+
} @else if (hasVideoPreview()) {
|
|
318
|
+
<video
|
|
319
|
+
[src]="file().url"
|
|
320
|
+
[poster]="file().thumbnailUrl ?? ''"
|
|
321
|
+
class="size-full object-cover transition-all duration-500 group-hover:scale-110"
|
|
322
|
+
muted
|
|
323
|
+
playsinline
|
|
324
|
+
preload="metadata"
|
|
325
|
+
></video>
|
|
326
|
+
<div
|
|
327
|
+
class="absolute inset-0 flex items-center justify-center bg-black/10 transition-colors duration-300 group-hover:bg-black/25"
|
|
328
|
+
>
|
|
329
|
+
<div
|
|
330
|
+
class="flex size-12 items-center justify-center rounded-full bg-black/50 shadow-lg backdrop-blur-sm transition-transform duration-300 group-hover:scale-110"
|
|
331
|
+
>
|
|
332
|
+
<i z-icon zType="lucidePlay" zSize="20" class="fill-white text-white"></i>
|
|
333
|
+
</div>
|
|
334
|
+
</div>
|
|
315
335
|
} @else {
|
|
316
336
|
<div
|
|
317
337
|
class="flex size-full flex-col items-center justify-center gap-2 bg-gradient-to-br"
|
|
@@ -428,6 +448,18 @@ class ZGalleryItemComponent {
|
|
|
428
448
|
class="size-full rounded-sm object-cover"
|
|
429
449
|
loading="lazy"
|
|
430
450
|
/>
|
|
451
|
+
} @else if (hasVideoPreview()) {
|
|
452
|
+
<video
|
|
453
|
+
[src]="file().url"
|
|
454
|
+
[poster]="file().thumbnailUrl ?? ''"
|
|
455
|
+
class="size-full rounded-sm object-cover"
|
|
456
|
+
muted
|
|
457
|
+
playsinline
|
|
458
|
+
preload="metadata"
|
|
459
|
+
></video>
|
|
460
|
+
<div class="absolute inset-0 flex items-center justify-center rounded-sm bg-black/25">
|
|
461
|
+
<i z-icon zType="lucidePlay" zSize="12" class="fill-white text-white"></i>
|
|
462
|
+
</div>
|
|
431
463
|
} @else {
|
|
432
464
|
<span class="absolute inset-0 opacity-30 dark:opacity-20" [class]="categoryStyle().bg"></span>
|
|
433
465
|
<i
|
|
@@ -543,6 +575,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImpor
|
|
|
543
575
|
(load)="onImageLoad()"
|
|
544
576
|
(error)="onImageError()"
|
|
545
577
|
/>
|
|
578
|
+
} @else if (hasVideoPreview()) {
|
|
579
|
+
<video
|
|
580
|
+
[src]="file().url"
|
|
581
|
+
[poster]="file().thumbnailUrl ?? ''"
|
|
582
|
+
class="size-full object-cover transition-all duration-500 group-hover:scale-110"
|
|
583
|
+
muted
|
|
584
|
+
playsinline
|
|
585
|
+
preload="metadata"
|
|
586
|
+
></video>
|
|
587
|
+
<div
|
|
588
|
+
class="absolute inset-0 flex items-center justify-center bg-black/10 transition-colors duration-300 group-hover:bg-black/25"
|
|
589
|
+
>
|
|
590
|
+
<div
|
|
591
|
+
class="flex size-12 items-center justify-center rounded-full bg-black/50 shadow-lg backdrop-blur-sm transition-transform duration-300 group-hover:scale-110"
|
|
592
|
+
>
|
|
593
|
+
<i z-icon zType="lucidePlay" zSize="20" class="fill-white text-white"></i>
|
|
594
|
+
</div>
|
|
595
|
+
</div>
|
|
546
596
|
} @else {
|
|
547
597
|
<div
|
|
548
598
|
class="flex size-full flex-col items-center justify-center gap-2 bg-gradient-to-br"
|
|
@@ -659,6 +709,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImpor
|
|
|
659
709
|
class="size-full rounded-sm object-cover"
|
|
660
710
|
loading="lazy"
|
|
661
711
|
/>
|
|
712
|
+
} @else if (hasVideoPreview()) {
|
|
713
|
+
<video
|
|
714
|
+
[src]="file().url"
|
|
715
|
+
[poster]="file().thumbnailUrl ?? ''"
|
|
716
|
+
class="size-full rounded-sm object-cover"
|
|
717
|
+
muted
|
|
718
|
+
playsinline
|
|
719
|
+
preload="metadata"
|
|
720
|
+
></video>
|
|
721
|
+
<div class="absolute inset-0 flex items-center justify-center rounded-sm bg-black/25">
|
|
722
|
+
<i z-icon zType="lucidePlay" zSize="12" class="fill-white text-white"></i>
|
|
723
|
+
</div>
|
|
662
724
|
} @else {
|
|
663
725
|
<span class="absolute inset-0 opacity-30 dark:opacity-20" [class]="categoryStyle().bg"></span>
|
|
664
726
|
<i
|