@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.
- package/fesm2022/shival99-z-ui-components-z-calendar.mjs +294 -7
- package/fesm2022/shival99-z-ui-components-z-calendar.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-chat.mjs +1 -1
- package/fesm2022/shival99-z-ui-components-z-chat.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-drawer.mjs +16 -4
- package/fesm2022/shival99-z-ui-components-z-drawer.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-editor.mjs +43 -25
- package/fesm2022/shival99-z-ui-components-z-editor.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-gallery.mjs +457 -532
- package/fesm2022/shival99-z-ui-components-z-gallery.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-media-player.mjs +658 -0
- package/fesm2022/shival99-z-ui-components-z-media-player.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-modal.mjs +16 -4
- package/fesm2022/shival99-z-ui-components-z-modal.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-qrcode.mjs +383 -0
- package/fesm2022/shival99-z-ui-components-z-qrcode.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-scrollarea.mjs +131 -0
- package/fesm2022/shival99-z-ui-components-z-scrollarea.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-show-more.mjs +121 -0
- package/fesm2022/shival99-z-ui-components-z-show-more.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-table.mjs +988 -137
- package/fesm2022/shival99-z-ui-components-z-table.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-tabs.mjs +135 -61
- package/fesm2022/shival99-z-ui-components-z-tabs.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-tags.mjs +24 -14
- package/fesm2022/shival99-z-ui-components-z-tags.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-toast.mjs +124 -31
- package/fesm2022/shival99-z-ui-components-z-toast.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-i18n.mjs +70 -0
- package/fesm2022/shival99-z-ui-i18n.mjs.map +1 -1
- package/package.json +17 -1
- package/types/shival99-z-ui-components-z-calendar.d.ts +10 -5
- package/types/shival99-z-ui-components-z-drawer.d.ts +14 -2
- package/types/shival99-z-ui-components-z-editor.d.ts +13 -8
- package/types/shival99-z-ui-components-z-gallery.d.ts +97 -6
- package/types/shival99-z-ui-components-z-media-player.d.ts +123 -0
- package/types/shival99-z-ui-components-z-modal.d.ts +14 -2
- package/types/shival99-z-ui-components-z-qrcode.d.ts +76 -0
- package/types/shival99-z-ui-components-z-scrollarea.d.ts +46 -0
- package/types/shival99-z-ui-components-z-show-more.d.ts +36 -0
- package/types/shival99-z-ui-components-z-table.d.ts +59 -14
- package/types/shival99-z-ui-components-z-tabs.d.ts +10 -6
- package/types/shival99-z-ui-components-z-tags.d.ts +3 -0
- package/types/shival99-z-ui-components-z-toast.d.ts +35 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, output, signal, computed, ViewEncapsulation, ChangeDetectionStrategy, Component, inject, effect, model, EventEmitter, Injector, PLATFORM_ID, Injectable } from '@angular/core';
|
|
3
|
-
import * as i1 from '@angular/forms';
|
|
2
|
+
import { input, output, signal, computed, ViewEncapsulation, ChangeDetectionStrategy, Component, inject, viewChild, effect, model, EventEmitter, Injector, PLATFORM_ID, Injectable, ElementRef, Directive } from '@angular/core';
|
|
3
|
+
import * as i1$1 from '@angular/forms';
|
|
4
4
|
import { FormsModule } from '@angular/forms';
|
|
5
5
|
import { TranslatePipe } from '@ngx-translate/core';
|
|
6
6
|
import { ZButtonComponent } from '@shival99/z-ui/components/z-button';
|
|
@@ -10,13 +10,15 @@ import { ZEmptyComponent } from '@shival99/z-ui/components/z-empty';
|
|
|
10
10
|
import { ZIconComponent } from '@shival99/z-ui/components/z-icon';
|
|
11
11
|
import { ZInputComponent } from '@shival99/z-ui/components/z-input';
|
|
12
12
|
import { ZSkeletonComponent } from '@shival99/z-ui/components/z-skeleton';
|
|
13
|
-
import { zMergeClasses } from '@shival99/z-ui/utils';
|
|
13
|
+
import { zMergeClasses, zTransform } from '@shival99/z-ui/utils';
|
|
14
14
|
import { ZTooltipDirective } from '@shival99/z-ui/components/z-tooltip';
|
|
15
|
+
import { DOCUMENT, isPlatformBrowser } from '@angular/common';
|
|
15
16
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
17
|
+
import * as i1 from 'ng2-pdfjs-viewer';
|
|
18
|
+
import { PdfJsViewerModule } from 'ng2-pdfjs-viewer';
|
|
16
19
|
import { cva } from 'class-variance-authority';
|
|
17
20
|
import { Overlay, OverlayConfig } from '@angular/cdk/overlay';
|
|
18
21
|
import { ComponentPortal } from '@angular/cdk/portal';
|
|
19
|
-
import { DOCUMENT, isPlatformBrowser } from '@angular/common';
|
|
20
22
|
import { ZOverlayZIndexService } from '@shival99/z-ui/services';
|
|
21
23
|
|
|
22
24
|
const FILE_CATEGORY_STYLES = {
|
|
@@ -734,11 +736,283 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImpor
|
|
|
734
736
|
}]
|
|
735
737
|
}], propDecorators: { file: [{ type: i0.Input, args: [{ isSignal: true, alias: "file", required: true }] }], zMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "zMode", required: false }] }], zSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "zSize", required: false }] }], zShowDownload: [{ type: i0.Input, args: [{ isSignal: true, alias: "zShowDownload", required: false }] }], zShowPreview: [{ type: i0.Input, args: [{ isSignal: true, alias: "zShowPreview", required: false }] }], zShowRemove: [{ type: i0.Input, args: [{ isSignal: true, alias: "zShowRemove", required: false }] }], zSelectable: [{ type: i0.Input, args: [{ isSignal: true, alias: "zSelectable", required: false }] }], zSelected: [{ type: i0.Input, args: [{ isSignal: true, alias: "zSelected", required: false }] }], zOnDownload: [{ type: i0.Output, args: ["zOnDownload"] }], zOnPreview: [{ type: i0.Output, args: ["zOnPreview"] }], zOnRemove: [{ type: i0.Output, args: ["zOnRemove"] }], zOnSelect: [{ type: i0.Output, args: ["zOnSelect"] }] } });
|
|
736
738
|
|
|
739
|
+
const Z_GALLERY_PDF_VIEWER_CHROME_CSS = `
|
|
740
|
+
#toolbarContainer,
|
|
741
|
+
#toolbarContainer * {
|
|
742
|
+
box-sizing: border-box;
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
#toolbarContainer,
|
|
746
|
+
.findbar,
|
|
747
|
+
.secondaryToolbar {
|
|
748
|
+
--toolbar-bg-color: #050505;
|
|
749
|
+
--toolbar-box-shadow: none;
|
|
750
|
+
--toolbar-border-bottom: 1px solid #222222;
|
|
751
|
+
--main-color: #f5f5f5;
|
|
752
|
+
--toolbar-icon-bg-color: #e7e7e7;
|
|
753
|
+
--toolbar-icon-hover-bg-color: #ffffff;
|
|
754
|
+
--toolbar-icon-opacity: 0.92;
|
|
755
|
+
--button-hover-color: #1f1f1f;
|
|
756
|
+
--toggled-btn-bg-color: #2a2a2a;
|
|
757
|
+
--toggled-btn-color: #ffffff;
|
|
758
|
+
--separator-color: #303030;
|
|
759
|
+
--field-bg-color: #111111;
|
|
760
|
+
--field-color: #f5f5f5;
|
|
761
|
+
--field-border-color: #3a3a3a;
|
|
762
|
+
--dropdown-btn-bg-color: #111111;
|
|
763
|
+
--dropdown-btn-border: 1px solid #3a3a3a;
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
#toolbarContainer {
|
|
767
|
+
height: var(--toolbar-height) !important;
|
|
768
|
+
padding: var(--toolbar-vertical-padding) var(--toolbar-horizontal-padding) !important;
|
|
769
|
+
background-color: var(--toolbar-bg-color) !important;
|
|
770
|
+
box-shadow: var(--toolbar-box-shadow) !important;
|
|
771
|
+
border-bottom: var(--toolbar-border-bottom) !important;
|
|
772
|
+
font: message-box !important;
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
#toolbarContainer #toolbarViewer,
|
|
776
|
+
#toolbarViewerLeft,
|
|
777
|
+
#toolbarViewerMiddle,
|
|
778
|
+
#toolbarViewerRight {
|
|
779
|
+
height: 100%;
|
|
780
|
+
align-items: center;
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
#toolbarContainer #toolbarViewer {
|
|
784
|
+
justify-content: space-between;
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
#toolbarViewerLeft,
|
|
788
|
+
#toolbarViewerMiddle,
|
|
789
|
+
#toolbarViewerRight,
|
|
790
|
+
.toolbarHorizontalGroup {
|
|
791
|
+
gap: 1px;
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
#toolbarViewerLeft .loadingInput {
|
|
795
|
+
position: relative;
|
|
796
|
+
display: inline-flex;
|
|
797
|
+
align-items: center;
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
.toolbarButton,
|
|
801
|
+
.toolbarButtonWithContainer {
|
|
802
|
+
height: 100% !important;
|
|
803
|
+
aspect-ratio: 1 !important;
|
|
804
|
+
flex: none !important;
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
.toolbarButton {
|
|
808
|
+
display: flex !important;
|
|
809
|
+
align-items: center !important;
|
|
810
|
+
justify-content: center !important;
|
|
811
|
+
padding: 0 !important;
|
|
812
|
+
border: none !important;
|
|
813
|
+
border-radius: 2px !important;
|
|
814
|
+
background: none !important;
|
|
815
|
+
color: var(--main-color) !important;
|
|
816
|
+
font: message-box !important;
|
|
817
|
+
outline: none !important;
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
.toolbarButton:is(:hover, :focus-visible) {
|
|
821
|
+
background-color: var(--button-hover-color) !important;
|
|
822
|
+
color: var(--main-color) !important;
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
.toolbarButton::before {
|
|
826
|
+
width: var(--icon-size) !important;
|
|
827
|
+
height: var(--icon-size) !important;
|
|
828
|
+
background-color: var(--toolbar-icon-bg-color) !important;
|
|
829
|
+
opacity: var(--toolbar-icon-opacity) !important;
|
|
830
|
+
-webkit-mask-size: cover !important;
|
|
831
|
+
mask-size: cover !important;
|
|
832
|
+
-webkit-mask-position: center !important;
|
|
833
|
+
mask-position: center !important;
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
.toolbarButton:is(:hover, :focus-visible)::before {
|
|
837
|
+
background-color: var(--toolbar-icon-hover-bg-color) !important;
|
|
838
|
+
}
|
|
839
|
+
|
|
840
|
+
.toolbarButton.toggled {
|
|
841
|
+
background-color: var(--toggled-btn-bg-color) !important;
|
|
842
|
+
color: var(--toggled-btn-color) !important;
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
.toolbarButton.toggled::before {
|
|
846
|
+
background-color: var(--toggled-btn-color) !important;
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
.splitToolbarButtonSeparator {
|
|
850
|
+
width: 0 !important;
|
|
851
|
+
height: 62% !important;
|
|
852
|
+
border-left: 1px solid var(--separator-color) !important;
|
|
853
|
+
border-right: none !important;
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
.toolbarField {
|
|
857
|
+
padding: 4px 7px !important;
|
|
858
|
+
margin: 3px 0 !important;
|
|
859
|
+
border-radius: 2px !important;
|
|
860
|
+
background-color: var(--field-bg-color) !important;
|
|
861
|
+
background-clip: padding-box !important;
|
|
862
|
+
border: 1px solid var(--field-border-color) !important;
|
|
863
|
+
box-shadow: none !important;
|
|
864
|
+
color: var(--field-color) !important;
|
|
865
|
+
font: message-box !important;
|
|
866
|
+
font-size: 12px !important;
|
|
867
|
+
line-height: 16px !important;
|
|
868
|
+
outline: none !important;
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
.toolbarField:focus {
|
|
872
|
+
border-color: #0a84ff !important;
|
|
873
|
+
}
|
|
874
|
+
|
|
875
|
+
#toolbarViewerLeft #pageNumber.toolbarField {
|
|
876
|
+
appearance: textfield !important;
|
|
877
|
+
width: 48px !important;
|
|
878
|
+
min-width: 48px !important;
|
|
879
|
+
max-width: 48px !important;
|
|
880
|
+
height: auto !important;
|
|
881
|
+
min-height: 0 !important;
|
|
882
|
+
margin: 3px 0 !important;
|
|
883
|
+
padding: 4px 7px !important;
|
|
884
|
+
border-radius: 2px !important;
|
|
885
|
+
font-size: 12px !important;
|
|
886
|
+
line-height: 16px !important;
|
|
887
|
+
text-align: end !important;
|
|
888
|
+
background-size: 0 0 !important;
|
|
889
|
+
transition-property: none !important;
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
#pageNumber::-webkit-inner-spin-button {
|
|
893
|
+
-webkit-appearance: none !important;
|
|
894
|
+
appearance: none !important;
|
|
895
|
+
}
|
|
896
|
+
|
|
897
|
+
#toolbarViewerLeft #numPages.toolbarLabel {
|
|
898
|
+
white-space: nowrap;
|
|
899
|
+
}
|
|
900
|
+
|
|
901
|
+
.toolbarLabel {
|
|
902
|
+
width: max-content !important;
|
|
903
|
+
min-width: 16px !important;
|
|
904
|
+
height: 100% !important;
|
|
905
|
+
padding-inline: 4px !important;
|
|
906
|
+
margin: 2px !important;
|
|
907
|
+
border-radius: 2px !important;
|
|
908
|
+
color: var(--main-color) !important;
|
|
909
|
+
font-size: 12px !important;
|
|
910
|
+
line-height: 14px !important;
|
|
911
|
+
text-align: left !important;
|
|
912
|
+
user-select: none !important;
|
|
913
|
+
cursor: default !important;
|
|
914
|
+
display: inline flex !important;
|
|
915
|
+
flex-direction: column !important;
|
|
916
|
+
align-items: center !important;
|
|
917
|
+
justify-content: center !important;
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
.dropdownToolbarButton {
|
|
921
|
+
width: fit-content !important;
|
|
922
|
+
min-width: 140px !important;
|
|
923
|
+
padding: 0 !important;
|
|
924
|
+
border: var(--dropdown-btn-border) !important;
|
|
925
|
+
border-radius: 2px !important;
|
|
926
|
+
background-color: var(--dropdown-btn-bg-color) !important;
|
|
927
|
+
color: var(--main-color) !important;
|
|
928
|
+
font-size: 12px !important;
|
|
929
|
+
line-height: 14px !important;
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
.dropdownToolbarButton:hover {
|
|
933
|
+
background-color: var(--button-hover-color) !important;
|
|
934
|
+
}
|
|
935
|
+
|
|
936
|
+
.dropdownToolbarButton > select {
|
|
937
|
+
height: 28px !important;
|
|
938
|
+
margin: 0 !important;
|
|
939
|
+
padding-block: 1px 2px !important;
|
|
940
|
+
padding-inline: 6px 38px !important;
|
|
941
|
+
border: none !important;
|
|
942
|
+
background-color: var(--dropdown-btn-bg-color) !important;
|
|
943
|
+
color: var(--main-color) !important;
|
|
944
|
+
font: message-box !important;
|
|
945
|
+
font-size: 12px !important;
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
.dropdownToolbarButton > select > option {
|
|
949
|
+
background-color: #111111 !important;
|
|
950
|
+
color: #f5f5f5 !important;
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
#viewerContainer,
|
|
954
|
+
#viewer,
|
|
955
|
+
.pdfViewer,
|
|
956
|
+
.pdfViewer .page,
|
|
957
|
+
.pdfViewer .page canvas {
|
|
958
|
+
border-color: oklch(0.49 0 0) !important;
|
|
959
|
+
outline-color: oklch(0.49 0 0) !important;
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
.pdfViewer .page {
|
|
963
|
+
background-color: oklch(0.49 0 0) !important;
|
|
964
|
+
border: 0 !important;
|
|
965
|
+
box-shadow: none !important;
|
|
966
|
+
}
|
|
967
|
+
|
|
968
|
+
@media (max-width: 768px) {
|
|
969
|
+
#toolbarContainer {
|
|
970
|
+
--toolbar-horizontal-padding: 4px;
|
|
971
|
+
}
|
|
972
|
+
|
|
973
|
+
#editorModeButtons,
|
|
974
|
+
#editorSignatureButton,
|
|
975
|
+
#editorHighlightButton,
|
|
976
|
+
#editorFreeTextButton,
|
|
977
|
+
#editorInkButton,
|
|
978
|
+
#editorStampButton {
|
|
979
|
+
display: none !important;
|
|
980
|
+
}
|
|
981
|
+
|
|
982
|
+
#toolbarViewerRight {
|
|
983
|
+
gap: 0;
|
|
984
|
+
}
|
|
985
|
+
|
|
986
|
+
.dropdownToolbarButton {
|
|
987
|
+
min-width: 112px !important;
|
|
988
|
+
}
|
|
989
|
+
|
|
990
|
+
#toolbarViewerLeft #pageNumber.toolbarField {
|
|
991
|
+
width: 40px !important;
|
|
992
|
+
min-width: 40px !important;
|
|
993
|
+
max-width: 40px !important;
|
|
994
|
+
}
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
@media (max-width: 480px) {
|
|
998
|
+
#printButton,
|
|
999
|
+
#secondaryToolbarToggleButton {
|
|
1000
|
+
display: none !important;
|
|
1001
|
+
}
|
|
1002
|
+
|
|
1003
|
+
.dropdownToolbarButton {
|
|
1004
|
+
min-width: 96px !important;
|
|
1005
|
+
}
|
|
1006
|
+
}
|
|
1007
|
+
`;
|
|
1008
|
+
|
|
737
1009
|
class ZGalleryPreviewComponent {
|
|
1010
|
+
_document = inject(DOCUMENT);
|
|
738
1011
|
_sanitizer = inject(DomSanitizer);
|
|
739
1012
|
file = input.required(...(ngDevMode ? [{ debugName: "file" }] : []));
|
|
740
1013
|
files = input([], ...(ngDevMode ? [{ debugName: "files" }] : []));
|
|
741
1014
|
zShowRemove = input(false, ...(ngDevMode ? [{ debugName: "zShowRemove" }] : []));
|
|
1015
|
+
zPdfViewerConfig = input({}, ...(ngDevMode ? [{ debugName: "zPdfViewerConfig" }] : []));
|
|
742
1016
|
zTrustedResourceOrigins = input([], ...(ngDevMode ? [{ debugName: "zTrustedResourceOrigins" }] : []));
|
|
743
1017
|
zOnClose = output();
|
|
744
1018
|
zOnDownload = output();
|
|
@@ -749,8 +1023,10 @@ class ZGalleryPreviewComponent {
|
|
|
749
1023
|
rotation = signal(0, ...(ngDevMode ? [{ debugName: "rotation" }] : []));
|
|
750
1024
|
isConverting = signal(false, ...(ngDevMode ? [{ debugName: "isConverting" }] : []));
|
|
751
1025
|
conversionError = signal(null, ...(ngDevMode ? [{ debugName: "conversionError" }] : []));
|
|
1026
|
+
previewError = signal(false, ...(ngDevMode ? [{ debugName: "previewError" }] : []));
|
|
752
1027
|
docHtmlContent = signal(null, ...(ngDevMode ? [{ debugName: "docHtmlContent" }] : []));
|
|
753
1028
|
textContent = signal('', ...(ngDevMode ? [{ debugName: "textContent" }] : []));
|
|
1029
|
+
pdfViewer = viewChild('pdfViewer', ...(ngDevMode ? [{ debugName: "pdfViewer" }] : []));
|
|
754
1030
|
_mediaLoaded = signal(false, ...(ngDevMode ? [{ debugName: "_mediaLoaded" }] : []));
|
|
755
1031
|
_loadingStartTime = 0;
|
|
756
1032
|
_minLoadingTime = 300;
|
|
@@ -767,6 +1043,7 @@ class ZGalleryPreviewComponent {
|
|
|
767
1043
|
this.rotation.set(0);
|
|
768
1044
|
this.isConverting.set(false);
|
|
769
1045
|
this.conversionError.set(null);
|
|
1046
|
+
this.previewError.set(false);
|
|
770
1047
|
this.docHtmlContent.set(null);
|
|
771
1048
|
this.textContent.set('');
|
|
772
1049
|
const category = getFileCategory(currentFile);
|
|
@@ -852,16 +1129,93 @@ class ZGalleryPreviewComponent {
|
|
|
852
1129
|
hasNext = computed(() => this.currentIndex() < this.files().length - 1, ...(ngDevMode ? [{ debugName: "hasNext" }] : []));
|
|
853
1130
|
isImageFile = computed(() => isImage(this.file()), ...(ngDevMode ? [{ debugName: "isImageFile" }] : []));
|
|
854
1131
|
isPdf = computed(() => getFileCategory(this.file()) === 'pdf', ...(ngDevMode ? [{ debugName: "isPdf" }] : []));
|
|
855
|
-
|
|
856
|
-
const
|
|
1132
|
+
pdfUrl = computed(() => {
|
|
1133
|
+
const url = this.file().url || this.file().downloadUrl;
|
|
857
1134
|
if (!url) {
|
|
858
1135
|
return null;
|
|
859
1136
|
}
|
|
860
1137
|
if (!this._isAllowedResourceUrl(url)) {
|
|
861
1138
|
return null;
|
|
862
1139
|
}
|
|
863
|
-
return
|
|
864
|
-
}, ...(ngDevMode ? [{ debugName: "
|
|
1140
|
+
return url;
|
|
1141
|
+
}, ...(ngDevMode ? [{ debugName: "pdfUrl" }] : []));
|
|
1142
|
+
pdfViewerId = computed(() => {
|
|
1143
|
+
const normalizedId = this.file().id.replace(/[^a-zA-Z0-9_-]/g, '-');
|
|
1144
|
+
return `z-gallery-preview-${normalizedId}`;
|
|
1145
|
+
}, ...(ngDevMode ? [{ debugName: "pdfViewerId" }] : []));
|
|
1146
|
+
pdfViewerConfig = computed(() => {
|
|
1147
|
+
const config = this.zPdfViewerConfig();
|
|
1148
|
+
const { controlVisibility } = config;
|
|
1149
|
+
const { groupVisibility } = config;
|
|
1150
|
+
const { autoActions } = config;
|
|
1151
|
+
const { viewerConfig } = config;
|
|
1152
|
+
const { themeConfig } = config;
|
|
1153
|
+
const { layoutConfig } = config;
|
|
1154
|
+
return {
|
|
1155
|
+
...config,
|
|
1156
|
+
viewerFolder: config.viewerFolder ?? '/assets/pdfjs',
|
|
1157
|
+
locale: viewerConfig?.locale ?? config.locale ?? '',
|
|
1158
|
+
showSpinner: viewerConfig?.showSpinner ?? config.showSpinner ?? false,
|
|
1159
|
+
useOnlyCssZoom: viewerConfig?.useOnlyCssZoom ?? config.useOnlyCssZoom ?? false,
|
|
1160
|
+
diagnosticLogs: viewerConfig?.diagnosticLogs ?? config.diagnosticLogs ?? false,
|
|
1161
|
+
showOpenFile: controlVisibility?.openFile ?? config.showOpenFile ?? false,
|
|
1162
|
+
showAnnotations: controlVisibility?.annotations ?? config.showAnnotations ?? true,
|
|
1163
|
+
showDownload: controlVisibility?.download ?? config.showDownload ?? true,
|
|
1164
|
+
showViewBookmark: controlVisibility?.viewBookmark ?? config.showViewBookmark ?? true,
|
|
1165
|
+
showPrint: controlVisibility?.print ?? config.showPrint ?? true,
|
|
1166
|
+
showFullScreen: controlVisibility?.fullScreen ?? config.showFullScreen ?? true,
|
|
1167
|
+
showFind: controlVisibility?.find ?? config.showFind ?? true,
|
|
1168
|
+
downloadOnLoad: autoActions?.downloadOnLoad ?? config.downloadOnLoad ?? false,
|
|
1169
|
+
printOnLoad: autoActions?.printOnLoad ?? config.printOnLoad ?? false,
|
|
1170
|
+
rotateCW: autoActions?.rotateCW ?? config.rotateCW ?? false,
|
|
1171
|
+
rotateCCW: autoActions?.rotateCCW ?? config.rotateCCW ?? false,
|
|
1172
|
+
showLastPageOnLoad: autoActions?.showLastPageOnLoad ?? config.showLastPageOnLoad ?? false,
|
|
1173
|
+
showToolbarLeft: groupVisibility?.toolbarLeft ?? config.showToolbarLeft ?? true,
|
|
1174
|
+
showToolbarMiddle: groupVisibility?.toolbarMiddle ?? config.showToolbarMiddle ?? true,
|
|
1175
|
+
showToolbarRight: groupVisibility?.toolbarRight ?? config.showToolbarRight ?? true,
|
|
1176
|
+
showSecondaryToolbarToggle: groupVisibility?.secondaryToolbarToggle ?? config.showSecondaryToolbarToggle ?? true,
|
|
1177
|
+
showSidebar: groupVisibility?.sidebar ?? config.showSidebar ?? true,
|
|
1178
|
+
showSidebarLeft: groupVisibility?.sidebarLeft ?? config.showSidebarLeft ?? true,
|
|
1179
|
+
showSidebarRight: groupVisibility?.sidebarRight ?? config.showSidebarRight ?? true,
|
|
1180
|
+
toolbarDensity: layoutConfig?.toolbarDensity ?? config.toolbarDensity ?? 'default',
|
|
1181
|
+
sidebarWidth: layoutConfig?.sidebarWidth ?? config.sidebarWidth,
|
|
1182
|
+
toolbarPosition: layoutConfig?.toolbarPosition ?? config.toolbarPosition ?? 'top',
|
|
1183
|
+
sidebarPosition: layoutConfig?.sidebarPosition ?? config.sidebarPosition ?? 'left',
|
|
1184
|
+
responsiveBreakpoint: layoutConfig?.responsiveBreakpoint ?? config.responsiveBreakpoint,
|
|
1185
|
+
zoom: config.zoom ?? 'page-fit',
|
|
1186
|
+
rotation: config.rotation ?? 0,
|
|
1187
|
+
cursor: config.cursor ?? 'select',
|
|
1188
|
+
scroll: config.scroll ?? 'vertical',
|
|
1189
|
+
spread: config.spread ?? 'none',
|
|
1190
|
+
pageMode: config.pageMode ?? 'none',
|
|
1191
|
+
page: config.page ?? 1,
|
|
1192
|
+
iframeBorder: config.iframeBorder ?? 0,
|
|
1193
|
+
theme: themeConfig?.theme ?? config.theme ?? 'auto',
|
|
1194
|
+
primaryColor: themeConfig?.primaryColor ?? config.primaryColor,
|
|
1195
|
+
backgroundColor: themeConfig?.backgroundColor ?? config.backgroundColor,
|
|
1196
|
+
pageBorderColor: themeConfig?.pageBorderColor ?? config.pageBorderColor,
|
|
1197
|
+
pageSpacing: themeConfig?.pageSpacing ?? config.pageSpacing,
|
|
1198
|
+
toolbarColor: themeConfig?.toolbarColor ?? config.toolbarColor,
|
|
1199
|
+
textColor: themeConfig?.textColor ?? config.textColor,
|
|
1200
|
+
borderRadius: themeConfig?.borderRadius ?? config.borderRadius,
|
|
1201
|
+
customCSS: this._mergePdfViewerCss(themeConfig?.customCSS ?? config.customCSS),
|
|
1202
|
+
cspNonce: themeConfig?.cspNonce ?? config.cspNonce,
|
|
1203
|
+
iframeTitle: themeConfig?.iframeTitle ?? config.iframeTitle,
|
|
1204
|
+
urlValidation: config.urlValidation ?? true,
|
|
1205
|
+
controlVisibility: controlVisibility ?? {},
|
|
1206
|
+
groupVisibility: groupVisibility ?? {},
|
|
1207
|
+
autoActions: autoActions ?? {},
|
|
1208
|
+
viewerConfig: viewerConfig ?? {},
|
|
1209
|
+
themeConfig: themeConfig ?? {},
|
|
1210
|
+
layoutConfig: layoutConfig ?? {},
|
|
1211
|
+
};
|
|
1212
|
+
}, ...(ngDevMode ? [{ debugName: "pdfViewerConfig" }] : []));
|
|
1213
|
+
_mergePdfViewerCss(customCSS) {
|
|
1214
|
+
if (!customCSS) {
|
|
1215
|
+
return Z_GALLERY_PDF_VIEWER_CHROME_CSS;
|
|
1216
|
+
}
|
|
1217
|
+
return `${Z_GALLERY_PDF_VIEWER_CHROME_CSS}\n${customCSS}`;
|
|
1218
|
+
}
|
|
865
1219
|
isVideo = computed(() => getFileCategory(this.file()) === 'video', ...(ngDevMode ? [{ debugName: "isVideo" }] : []));
|
|
866
1220
|
isWordFile = computed(() => getFileCategory(this.file()) === 'word', ...(ngDevMode ? [{ debugName: "isWordFile" }] : []));
|
|
867
1221
|
isExcelFile = computed(() => getFileCategory(this.file()) === 'excel', ...(ngDevMode ? [{ debugName: "isExcelFile" }] : []));
|
|
@@ -951,6 +1305,7 @@ class ZGalleryPreviewComponent {
|
|
|
951
1305
|
this.isLoading.set(true);
|
|
952
1306
|
this._mediaLoaded.set(false);
|
|
953
1307
|
this._loadingStartTime = Date.now();
|
|
1308
|
+
this.previewError.set(false);
|
|
954
1309
|
this.zOnNavigate.emit(allFiles[newIndex]);
|
|
955
1310
|
}
|
|
956
1311
|
}
|
|
@@ -972,9 +1327,11 @@ class ZGalleryPreviewComponent {
|
|
|
972
1327
|
this._completeLoading();
|
|
973
1328
|
}
|
|
974
1329
|
onPdfLoad() {
|
|
1330
|
+
this._queueMobilePdfFit();
|
|
975
1331
|
this._completeLoading();
|
|
976
1332
|
}
|
|
977
1333
|
onMediaError() {
|
|
1334
|
+
this.previewError.set(true);
|
|
978
1335
|
this._completeLoading();
|
|
979
1336
|
}
|
|
980
1337
|
download() {
|
|
@@ -988,530 +1345,32 @@ class ZGalleryPreviewComponent {
|
|
|
988
1345
|
this.close();
|
|
989
1346
|
}
|
|
990
1347
|
}
|
|
1348
|
+
_queueMobilePdfFit() {
|
|
1349
|
+
if (this.zPdfViewerConfig().zoom) {
|
|
1350
|
+
return;
|
|
1351
|
+
}
|
|
1352
|
+
const { defaultView } = this._document;
|
|
1353
|
+
if (!defaultView?.matchMedia('(max-width: 768px)').matches) {
|
|
1354
|
+
return;
|
|
1355
|
+
}
|
|
1356
|
+
const syncZoom = () => {
|
|
1357
|
+
void this.pdfViewer()?.setZoom('page-fit');
|
|
1358
|
+
};
|
|
1359
|
+
defaultView.requestAnimationFrame(() => {
|
|
1360
|
+
syncZoom();
|
|
1361
|
+
defaultView.setTimeout(syncZoom, 120);
|
|
1362
|
+
});
|
|
1363
|
+
}
|
|
991
1364
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ZGalleryPreviewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
992
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.9", type: ZGalleryPreviewComponent, isStandalone: true, selector: "z-gallery-preview", inputs: { file: { classPropertyName: "file", publicName: "file", isSignal: true, isRequired: true, transformFunction: null }, files: { classPropertyName: "files", publicName: "files", isSignal: true, isRequired: false, transformFunction: null }, zShowRemove: { classPropertyName: "zShowRemove", publicName: "zShowRemove", isSignal: true, isRequired: false, transformFunction: null }, zTrustedResourceOrigins: { classPropertyName: "zTrustedResourceOrigins", publicName: "zTrustedResourceOrigins", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { zOnClose: "zOnClose", zOnDownload: "zOnDownload", zOnNavigate: "zOnNavigate", zOnRemove: "zOnRemove" }, host: { listeners: { "document:keydown": "onKeyDown($event)" }, classAttribute: "z-gallery-preview z-[9999]" }, ngImport: i0, template: `
|
|
993
|
-
<div
|
|
994
|
-
class="animate-in fade-in fixed inset-0 z-50 flex items-center justify-center bg-black/80 backdrop-blur-sm duration-200"
|
|
995
|
-
(click)="onBackdropClick($event)"
|
|
996
|
-
>
|
|
997
|
-
<button
|
|
998
|
-
z-button
|
|
999
|
-
zType="ghost"
|
|
1000
|
-
zShape="circle"
|
|
1001
|
-
class="absolute top-4 right-4 z-10 text-white hover:bg-white/20"
|
|
1002
|
-
(click)="close()"
|
|
1003
|
-
>
|
|
1004
|
-
<i z-icon zType="lucideX" zSize="24"></i>
|
|
1005
|
-
</button>
|
|
1006
|
-
|
|
1007
|
-
@if (hasPrev()) {
|
|
1008
|
-
<button
|
|
1009
|
-
z-button
|
|
1010
|
-
zType="ghost"
|
|
1011
|
-
zShape="circle"
|
|
1012
|
-
class="absolute left-4 z-10 text-white hover:bg-white/20"
|
|
1013
|
-
(click)="navigate(-1)"
|
|
1014
|
-
>
|
|
1015
|
-
<i z-icon zType="lucideChevronLeft" zSize="32"></i>
|
|
1016
|
-
</button>
|
|
1017
|
-
}
|
|
1018
|
-
|
|
1019
|
-
@if (hasNext()) {
|
|
1020
|
-
<button
|
|
1021
|
-
z-button
|
|
1022
|
-
zType="ghost"
|
|
1023
|
-
zShape="circle"
|
|
1024
|
-
class="absolute right-4 z-10 text-white hover:bg-white/20"
|
|
1025
|
-
(click)="navigate(1)"
|
|
1026
|
-
>
|
|
1027
|
-
<i z-icon zType="lucideChevronRight" zSize="32"></i>
|
|
1028
|
-
</button>
|
|
1029
|
-
}
|
|
1030
|
-
|
|
1031
|
-
<div class="flex h-full w-full flex-col items-center" (click)="$event.stopPropagation()">
|
|
1032
|
-
<div
|
|
1033
|
-
class="dark:!border-border absolute top-4 left-1/2 z-10 flex -translate-x-1/2 items-center gap-2 rounded-[0.375rem] border !border-transparent bg-black/60 px-4 py-2 text-sm text-white backdrop-blur-sm dark:border"
|
|
1034
|
-
>
|
|
1035
|
-
<div class="flex min-w-0 items-baseline gap-1.5">
|
|
1036
|
-
<span class="max-w-[12.5rem] truncate font-medium">{{ file().name }}</span>
|
|
1037
|
-
<span class="shrink-0 text-white/70">({{ formattedSize() }})</span>
|
|
1038
|
-
</div>
|
|
1039
|
-
|
|
1040
|
-
@if (files().length > 1) {
|
|
1041
|
-
<span class="text-white/70">{{ currentIndex() + 1 }} / {{ files().length }}</span>
|
|
1042
|
-
}
|
|
1043
|
-
|
|
1044
|
-
<div class="ml-1 flex items-center gap-0.5">
|
|
1045
|
-
@if (isImageFile()) {
|
|
1046
|
-
<button
|
|
1047
|
-
z-button
|
|
1048
|
-
zType="ghost"
|
|
1049
|
-
zSize="xs"
|
|
1050
|
-
zShape="circle"
|
|
1051
|
-
class="text-white hover:bg-white/20"
|
|
1052
|
-
z-tooltip
|
|
1053
|
-
[zContent]="'i18n_z_ui_gallery_rotate_left' | translate"
|
|
1054
|
-
(click)="rotateLeft()"
|
|
1055
|
-
>
|
|
1056
|
-
<i z-icon zType="lucideUndo" zSize="14"></i>
|
|
1057
|
-
</button>
|
|
1058
|
-
<button
|
|
1059
|
-
z-button
|
|
1060
|
-
zType="ghost"
|
|
1061
|
-
zSize="xs"
|
|
1062
|
-
zShape="circle"
|
|
1063
|
-
class="text-white hover:bg-white/20"
|
|
1064
|
-
z-tooltip
|
|
1065
|
-
[zContent]="'i18n_z_ui_gallery_rotate_right' | translate"
|
|
1066
|
-
(click)="rotateRight()"
|
|
1067
|
-
>
|
|
1068
|
-
<i z-icon zType="lucideRedo" zSize="14"></i>
|
|
1069
|
-
</button>
|
|
1070
|
-
}
|
|
1071
|
-
|
|
1072
|
-
<button
|
|
1073
|
-
z-button
|
|
1074
|
-
zType="ghost"
|
|
1075
|
-
zSize="xs"
|
|
1076
|
-
zShape="circle"
|
|
1077
|
-
class="text-white hover:bg-white/20"
|
|
1078
|
-
z-tooltip
|
|
1079
|
-
[zContent]="'i18n_z_ui_gallery_download' | translate"
|
|
1080
|
-
(click)="download()"
|
|
1081
|
-
>
|
|
1082
|
-
<i z-icon zType="lucideDownload" zSize="14"></i>
|
|
1083
|
-
</button>
|
|
1084
|
-
|
|
1085
|
-
@if (zShowRemove()) {
|
|
1086
|
-
<button
|
|
1087
|
-
z-button
|
|
1088
|
-
zType="ghost"
|
|
1089
|
-
zSize="xs"
|
|
1090
|
-
zShape="circle"
|
|
1091
|
-
class="text-white hover:bg-white/20"
|
|
1092
|
-
z-tooltip
|
|
1093
|
-
[zContent]="'i18n_z_ui_gallery_delete' | translate"
|
|
1094
|
-
(click)="remove()"
|
|
1095
|
-
>
|
|
1096
|
-
<i z-icon zType="lucideTrash2" zSize="14"></i>
|
|
1097
|
-
</button>
|
|
1098
|
-
}
|
|
1099
|
-
</div>
|
|
1100
|
-
</div>
|
|
1101
|
-
|
|
1102
|
-
<div class="relative flex flex-1 items-center justify-center pt-16">
|
|
1103
|
-
@if (isImageFile()) {
|
|
1104
|
-
<div class="relative flex h-[60vh] w-[70vw] items-center justify-center">
|
|
1105
|
-
@if (isLoading()) {
|
|
1106
|
-
<z-skeleton class="absolute inset-0 rounded-lg" />
|
|
1107
|
-
}
|
|
1108
|
-
<img
|
|
1109
|
-
[src]="file().url || file().thumbnailUrl"
|
|
1110
|
-
[alt]="file().name"
|
|
1111
|
-
class="max-h-full max-w-full rounded-lg object-contain shadow-2xl transition-opacity duration-300"
|
|
1112
|
-
[class.opacity-0]="isLoading()"
|
|
1113
|
-
[class.opacity-100]="!isLoading()"
|
|
1114
|
-
[class.cursor-zoom-in]="!zoomed()"
|
|
1115
|
-
[class.cursor-zoom-out]="zoomed()"
|
|
1116
|
-
[style.transform]="imageTransform()"
|
|
1117
|
-
(load)="onImageLoad()"
|
|
1118
|
-
(error)="onMediaError()"
|
|
1119
|
-
(click)="toggleZoom()"
|
|
1120
|
-
/>
|
|
1121
|
-
</div>
|
|
1122
|
-
} @else if (isPdf() && safePdfUrl()) {
|
|
1123
|
-
<div class="relative h-[75vh] w-[85vw]">
|
|
1124
|
-
@if (isLoading()) {
|
|
1125
|
-
<z-skeleton class="absolute inset-0 rounded-lg" />
|
|
1126
|
-
}
|
|
1127
|
-
<iframe
|
|
1128
|
-
[src]="safePdfUrl()"
|
|
1129
|
-
class="absolute inset-0 size-full rounded-lg bg-white shadow-2xl transition-opacity duration-300"
|
|
1130
|
-
[class.opacity-0]="isLoading()"
|
|
1131
|
-
[class.opacity-100]="!isLoading()"
|
|
1132
|
-
frameborder="0"
|
|
1133
|
-
referrerpolicy="no-referrer"
|
|
1134
|
-
(load)="onPdfLoad()"
|
|
1135
|
-
></iframe>
|
|
1136
|
-
</div>
|
|
1137
|
-
} @else if (isVideo()) {
|
|
1138
|
-
<div class="relative flex h-[60vh] w-[70vw] items-center justify-center">
|
|
1139
|
-
@if (isLoading()) {
|
|
1140
|
-
<z-skeleton class="absolute inset-0 rounded-lg" />
|
|
1141
|
-
}
|
|
1142
|
-
<video
|
|
1143
|
-
[src]="file().url"
|
|
1144
|
-
controls
|
|
1145
|
-
autoplay
|
|
1146
|
-
class="max-h-full max-w-full rounded-lg shadow-2xl transition-opacity duration-300"
|
|
1147
|
-
[class.opacity-0]="isLoading()"
|
|
1148
|
-
[class.opacity-100]="!isLoading()"
|
|
1149
|
-
(loadeddata)="onVideoLoad()"
|
|
1150
|
-
(error)="onMediaError()"
|
|
1151
|
-
>
|
|
1152
|
-
Your browser does not support the video tag.
|
|
1153
|
-
</video>
|
|
1154
|
-
</div>
|
|
1155
|
-
} @else if (isWordFile()) {
|
|
1156
|
-
<div class="relative h-[75vh] w-[85vw]">
|
|
1157
|
-
@if (isLoading() || isConverting()) {
|
|
1158
|
-
<z-skeleton class="absolute inset-0 rounded-lg" />
|
|
1159
|
-
}
|
|
1160
|
-
@if (conversionError()) {
|
|
1161
|
-
<div class="bg-card flex size-full flex-col items-center justify-center rounded-lg p-12 shadow-2xl">
|
|
1162
|
-
<div class="bg-muted mb-4 flex size-24 items-center justify-center rounded-xl">
|
|
1163
|
-
<i z-icon [zType]="fileIcon()" zSize="40" class="text-muted-foreground"></i>
|
|
1164
|
-
</div>
|
|
1165
|
-
<span class="text-foreground mb-2 text-lg font-medium">{{ file().name }}</span>
|
|
1166
|
-
<span class="text-muted-foreground rounded-md bg-red-100 px-3 py-1.5 text-xs dark:bg-red-900/30">
|
|
1167
|
-
<span class="text-red-700 dark:text-red-300">{{ conversionError() }}</span>
|
|
1168
|
-
</span>
|
|
1169
|
-
</div>
|
|
1170
|
-
} @else if (docHtmlContent()) {
|
|
1171
|
-
<div
|
|
1172
|
-
class="absolute inset-0 overflow-auto rounded-lg bg-white p-8 text-gray-950 shadow-2xl"
|
|
1173
|
-
[innerHTML]="docHtmlContent()"
|
|
1174
|
-
></div>
|
|
1175
|
-
}
|
|
1176
|
-
</div>
|
|
1177
|
-
} @else if (isExcelFile()) {
|
|
1178
|
-
<div class="relative h-[75vh] w-[85vw]">
|
|
1179
|
-
@if (isLoading() || isConverting()) {
|
|
1180
|
-
<z-skeleton class="absolute inset-0 rounded-lg" />
|
|
1181
|
-
}
|
|
1182
|
-
@if (conversionError()) {
|
|
1183
|
-
<div class="bg-card flex size-full flex-col items-center justify-center rounded-lg p-12 shadow-2xl">
|
|
1184
|
-
<div class="bg-muted mb-4 flex size-24 items-center justify-center rounded-xl">
|
|
1185
|
-
<i z-icon [zType]="fileIcon()" zSize="40" class="text-muted-foreground"></i>
|
|
1186
|
-
</div>
|
|
1187
|
-
<span class="text-foreground mb-2 text-lg font-medium">{{ file().name }}</span>
|
|
1188
|
-
<span class="text-muted-foreground rounded-md bg-red-100 px-3 py-1.5 text-xs dark:bg-red-900/30">
|
|
1189
|
-
<span class="text-red-700 dark:text-red-300">{{ conversionError() }}</span>
|
|
1190
|
-
</span>
|
|
1191
|
-
</div>
|
|
1192
|
-
} @else if (docHtmlContent()) {
|
|
1193
|
-
<div
|
|
1194
|
-
class="absolute inset-0 overflow-auto rounded-lg bg-white p-4 text-gray-950 shadow-2xl"
|
|
1195
|
-
[innerHTML]="docHtmlContent()"
|
|
1196
|
-
></div>
|
|
1197
|
-
}
|
|
1198
|
-
</div>
|
|
1199
|
-
} @else if (isTextFile()) {
|
|
1200
|
-
<div class="relative h-[75vh] w-[85vw]">
|
|
1201
|
-
@if (isLoading() || isConverting()) {
|
|
1202
|
-
<z-skeleton class="absolute inset-0 rounded-lg" />
|
|
1203
|
-
}
|
|
1204
|
-
@if (conversionError()) {
|
|
1205
|
-
<div class="bg-card flex size-full flex-col items-center justify-center rounded-lg p-12 shadow-2xl">
|
|
1206
|
-
<div class="bg-muted mb-4 flex size-24 items-center justify-center rounded-xl">
|
|
1207
|
-
<i z-icon [zType]="fileIcon()" zSize="40" class="text-muted-foreground"></i>
|
|
1208
|
-
</div>
|
|
1209
|
-
<span class="text-foreground mb-2 text-lg font-medium">{{ file().name }}</span>
|
|
1210
|
-
<span class="text-muted-foreground rounded-md bg-red-100 px-3 py-1.5 text-xs dark:bg-red-900/30">
|
|
1211
|
-
<span class="text-red-700 dark:text-red-300">{{ conversionError() }}</span>
|
|
1212
|
-
</span>
|
|
1213
|
-
</div>
|
|
1214
|
-
} @else if (textContent()) {
|
|
1215
|
-
<div class="absolute inset-0 overflow-auto rounded-lg bg-gray-950 p-6 shadow-2xl">
|
|
1216
|
-
<pre class="font-mono text-sm leading-relaxed whitespace-pre-wrap text-gray-100">{{
|
|
1217
|
-
textContent()
|
|
1218
|
-
}}</pre>
|
|
1219
|
-
</div>
|
|
1220
|
-
}
|
|
1221
|
-
</div>
|
|
1222
|
-
} @else {
|
|
1223
|
-
<div class="bg-card flex flex-col items-center justify-center rounded-lg p-12 shadow-2xl">
|
|
1224
|
-
<div class="bg-muted mb-4 flex size-24 items-center justify-center rounded-xl">
|
|
1225
|
-
<i z-icon [zType]="fileIcon()" zSize="40" class="text-muted-foreground"></i>
|
|
1226
|
-
</div>
|
|
1227
|
-
<span class="text-foreground mb-2 text-lg font-medium">{{ file().name }}</span>
|
|
1228
|
-
<span class="text-muted-foreground mb-4 text-sm">{{ formattedSize() }}</span>
|
|
1229
|
-
<span class="text-muted-foreground rounded-md bg-amber-100 px-3 py-1.5 text-xs dark:bg-amber-900/30">
|
|
1230
|
-
<i
|
|
1231
|
-
z-icon
|
|
1232
|
-
zType="lucideInfo"
|
|
1233
|
-
zSize="14"
|
|
1234
|
-
class="mr-1 inline-block align-middle text-amber-600 dark:text-amber-400"
|
|
1235
|
-
></i>
|
|
1236
|
-
<span class="align-middle text-amber-700 dark:text-amber-300">
|
|
1237
|
-
{{ 'i18n_z_ui_gallery_preview_not_supported' | translate }}
|
|
1238
|
-
</span>
|
|
1239
|
-
</span>
|
|
1240
|
-
</div>
|
|
1241
|
-
}
|
|
1242
|
-
</div>
|
|
1243
|
-
</div>
|
|
1244
|
-
</div>
|
|
1245
|
-
`, isInline: true, 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: "component", type: ZIconComponent, selector: "z-icon, [z-icon]", inputs: ["class", "zType", "zAnimatedType", "zAnimate", "zAnimationTrigger", "zSize", "zStrokeWidth", "zSvg"] }, { kind: "component", type: ZSkeletonComponent, selector: "z-skeleton", inputs: ["class", "zType", "zSize", "zWidth", "zHeight", "zRows", "zGap", "zAnimated", "zRadius"] }, { kind: "directive", type: ZTooltipDirective, selector: "[z-tooltip], [zTooltip]", inputs: ["zContent", "zPosition", "zTooltipPosition", "zTrigger", "zTooltipTrigger", "zTooltipType", "zTooltipSize", "zClass", "zTooltipClass", "zShowDelay", "zTooltipShowDelay", "zHideDelay", "zTooltipHideDelay", "zArrow", "zTooltipArrow", "zDisabled", "zTooltipDisabled", "zOffset", "zTooltipOffset", "zAutoDetect", "zTriggerElement", "zAlwaysShow", "zMaxWidth"], outputs: ["zShow", "zHide"], exportAs: ["zTooltip"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1365
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.9", type: ZGalleryPreviewComponent, isStandalone: true, selector: "z-gallery-preview", inputs: { file: { classPropertyName: "file", publicName: "file", isSignal: true, isRequired: true, transformFunction: null }, files: { classPropertyName: "files", publicName: "files", isSignal: true, isRequired: false, transformFunction: null }, zShowRemove: { classPropertyName: "zShowRemove", publicName: "zShowRemove", isSignal: true, isRequired: false, transformFunction: null }, zPdfViewerConfig: { classPropertyName: "zPdfViewerConfig", publicName: "zPdfViewerConfig", isSignal: true, isRequired: false, transformFunction: null }, zTrustedResourceOrigins: { classPropertyName: "zTrustedResourceOrigins", publicName: "zTrustedResourceOrigins", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { zOnClose: "zOnClose", zOnDownload: "zOnDownload", zOnNavigate: "zOnNavigate", zOnRemove: "zOnRemove" }, host: { listeners: { "document:keydown": "onKeyDown($event)" }, classAttribute: "z-gallery-preview z-[9999]" }, viewQueries: [{ propertyName: "pdfViewer", first: true, predicate: ["pdfViewer"], descendants: true, isSignal: true }], ngImport: i0, template: "<div\n class=\"animate-in fade-in fixed inset-0 z-50 flex items-center justify-center bg-black/80 backdrop-blur-sm duration-200\"\n (click)=\"onBackdropClick($event)\">\n <button\n z-button\n zType=\"ghost\"\n zShape=\"circle\"\n class=\"absolute top-3 right-3 z-20 text-white hover:bg-white/20 lg:top-4 lg:right-4\"\n (click)=\"close()\">\n <i z-icon zType=\"lucideX\" zSize=\"24\"></i>\n </button>\n\n @if (hasPrev()) {\n <button\n z-button\n zType=\"ghost\"\n zShape=\"circle\"\n class=\"absolute left-4 z-10 text-white hover:bg-white/20\"\n (click)=\"navigate(-1)\">\n <i z-icon zType=\"lucideChevronLeft\" zSize=\"32\"></i>\n </button>\n }\n\n @if (hasNext()) {\n <button\n z-button\n zType=\"ghost\"\n zShape=\"circle\"\n class=\"absolute right-4 z-10 text-white hover:bg-white/20\"\n (click)=\"navigate(1)\">\n <i z-icon zType=\"lucideChevronRight\" zSize=\"32\"></i>\n </button>\n }\n\n <div class=\"flex h-full w-full flex-col items-center\" (click)=\"$event.stopPropagation()\">\n <div\n class=\"dark:!border-border absolute top-3 right-14 left-3 z-10 flex min-w-0 items-center justify-between gap-2 rounded-[0.375rem] border !border-transparent bg-black/70 px-2.5 py-1.5 text-xs text-white shadow-lg backdrop-blur-sm lg:top-4 lg:right-auto lg:left-1/2 lg:max-w-[calc(100vw-10rem)] lg:-translate-x-1/2 lg:justify-start lg:bg-black/60 lg:px-4 lg:py-2 lg:text-sm dark:border\">\n <div class=\"flex min-w-0 items-baseline gap-1.5\">\n <span class=\"min-w-0 truncate font-medium lg:max-w-[12.5rem]\">{{ file().name }}</span>\n <span class=\"hidden shrink-0 text-white/70 lg:inline\">({{ formattedSize() }})</span>\n </div>\n\n @if (files().length > 1) {\n <span class=\"hidden shrink-0 text-white/70 md:inline\">{{ currentIndex() + 1 }} / {{ files().length }}</span>\n }\n\n <div class=\"ml-1 flex shrink-0 items-center gap-0.5\">\n @if (isImageFile()) {\n <button\n z-button\n zType=\"ghost\"\n zSize=\"xs\"\n zShape=\"circle\"\n class=\"text-white hover:bg-white/20\"\n z-tooltip\n [zContent]=\"'i18n_z_ui_gallery_rotate_left' | translate\"\n (click)=\"rotateLeft()\">\n <i z-icon zType=\"lucideUndo\" zSize=\"14\"></i>\n </button>\n <button\n z-button\n zType=\"ghost\"\n zSize=\"xs\"\n zShape=\"circle\"\n class=\"text-white hover:bg-white/20\"\n z-tooltip\n [zContent]=\"'i18n_z_ui_gallery_rotate_right' | translate\"\n (click)=\"rotateRight()\">\n <i z-icon zType=\"lucideRedo\" zSize=\"14\"></i>\n </button>\n }\n\n <button\n z-button\n zType=\"ghost\"\n zSize=\"xs\"\n zShape=\"circle\"\n class=\"text-white hover:bg-white/20\"\n z-tooltip\n [zContent]=\"'i18n_z_ui_gallery_download' | translate\"\n (click)=\"download()\">\n <i z-icon zType=\"lucideDownload\" zSize=\"14\"></i>\n </button>\n\n @if (zShowRemove()) {\n <button\n z-button\n zType=\"ghost\"\n zSize=\"xs\"\n zShape=\"circle\"\n class=\"text-white hover:bg-white/20\"\n z-tooltip\n [zContent]=\"'i18n_z_ui_gallery_delete' | translate\"\n (click)=\"remove()\">\n <i z-icon zType=\"lucideTrash2\" zSize=\"14\"></i>\n </button>\n }\n </div>\n </div>\n\n <div class=\"relative flex flex-1 items-center justify-center pt-16\">\n @if (isImageFile()) {\n <div class=\"relative flex h-[60vh] w-[70vw] items-center justify-center\">\n @if (isLoading()) {\n <z-skeleton class=\"absolute inset-0 rounded-lg\" />\n <div class=\"text-muted-foreground absolute inset-0 flex items-center justify-center text-sm font-medium\">\n {{ 'i18n_z_ui_gallery_loading_preview' | translate }}\n </div>\n }\n @if (previewError()) {\n <div class=\"bg-card flex size-full flex-col items-center justify-center rounded-lg p-8 shadow-2xl\">\n <div class=\"bg-muted mb-4 flex size-16 items-center justify-center rounded-xl\">\n <i z-icon zType=\"lucideTriangleAlert\" zSize=\"28\" class=\"text-destructive\"></i>\n </div>\n <span class=\"text-foreground text-sm font-medium\">\n {{ 'i18n_z_ui_gallery_preview_load_error' | translate }}\n </span>\n </div>\n } @else {\n <img\n [src]=\"file().url || file().thumbnailUrl\"\n [alt]=\"file().name\"\n class=\"max-h-full max-w-full rounded-lg object-contain shadow-2xl transition-opacity duration-300\"\n [class.opacity-0]=\"isLoading()\"\n [class.opacity-100]=\"!isLoading()\"\n [class.cursor-zoom-in]=\"!zoomed()\"\n [class.cursor-zoom-out]=\"zoomed()\"\n [style.transform]=\"imageTransform()\"\n (load)=\"onImageLoad()\"\n (error)=\"onMediaError()\"\n (click)=\"toggleZoom()\" />\n }\n </div>\n } @else if (isPdf() && pdfUrl()) {\n <div\n class=\"z-gallery-pdf-frame relative h-[75vh] w-[85vw] max-w-[96vw] overflow-hidden rounded-sm border shadow-xs\">\n @if (isLoading()) {\n <z-skeleton class=\"absolute inset-0 rounded-sm\" />\n <div\n class=\"text-muted-foreground absolute inset-0 z-10 flex items-center justify-center text-sm font-medium\">\n {{ 'i18n_z_ui_gallery_loading_preview' | translate }}\n </div>\n }\n @if (previewError()) {\n <div class=\"bg-card flex size-full flex-col items-center justify-center p-8\">\n <div class=\"bg-muted mb-4 flex size-16 items-center justify-center rounded-xl\">\n <i z-icon zType=\"lucideTriangleAlert\" zSize=\"28\" class=\"text-destructive\"></i>\n </div>\n <span class=\"text-foreground text-sm font-medium\">\n {{ 'i18n_z_ui_gallery_preview_load_error' | translate }}\n </span>\n </div>\n } @else {\n <div\n class=\"relative size-full bg-white transition-opacity duration-300\"\n [class.opacity-0]=\"isLoading()\"\n [class.opacity-100]=\"!isLoading()\">\n @let pdfConfig = pdfViewerConfig();\n <ng2-pdfjs-viewer\n #pdfViewer\n class=\"block size-full\"\n [viewerFolder]=\"pdfConfig.viewerFolder!\"\n [viewerId]=\"pdfViewerId()\"\n [pdfSrc]=\"pdfUrl()!\"\n [downloadFileName]=\"file().name\"\n [locale]=\"pdfConfig.locale!\"\n [showSpinner]=\"pdfConfig.showSpinner!\"\n [useOnlyCssZoom]=\"pdfConfig.useOnlyCssZoom!\"\n [diagnosticLogs]=\"pdfConfig.diagnosticLogs!\"\n [showOpenFile]=\"pdfConfig.showOpenFile!\"\n [showAnnotations]=\"pdfConfig.showAnnotations!\"\n [showDownload]=\"pdfConfig.showDownload!\"\n [showViewBookmark]=\"pdfConfig.showViewBookmark!\"\n [showPrint]=\"pdfConfig.showPrint!\"\n [showFullScreen]=\"pdfConfig.showFullScreen!\"\n [showFind]=\"pdfConfig.showFind!\"\n [downloadOnLoad]=\"pdfConfig.downloadOnLoad!\"\n [printOnLoad]=\"pdfConfig.printOnLoad!\"\n [rotateCW]=\"pdfConfig.rotateCW!\"\n [rotateCCW]=\"pdfConfig.rotateCCW!\"\n [showLastPageOnLoad]=\"pdfConfig.showLastPageOnLoad!\"\n [showToolbarLeft]=\"pdfConfig.showToolbarLeft!\"\n [showToolbarMiddle]=\"pdfConfig.showToolbarMiddle!\"\n [showToolbarRight]=\"pdfConfig.showToolbarRight!\"\n [showSecondaryToolbarToggle]=\"pdfConfig.showSecondaryToolbarToggle!\"\n [showSidebar]=\"pdfConfig.showSidebar!\"\n [showSidebarLeft]=\"pdfConfig.showSidebarLeft!\"\n [showSidebarRight]=\"pdfConfig.showSidebarRight!\"\n [toolbarDensity]=\"pdfConfig.toolbarDensity!\"\n [sidebarWidth]=\"pdfConfig.sidebarWidth\"\n [toolbarPosition]=\"pdfConfig.toolbarPosition!\"\n [sidebarPosition]=\"pdfConfig.sidebarPosition!\"\n [responsiveBreakpoint]=\"pdfConfig.responsiveBreakpoint\"\n [zoom]=\"pdfConfig.zoom!\"\n [rotation]=\"pdfConfig.rotation!\"\n [cursor]=\"pdfConfig.cursor!\"\n [scroll]=\"pdfConfig.scroll!\"\n [spread]=\"pdfConfig.spread!\"\n [pageMode]=\"pdfConfig.pageMode!\"\n [page]=\"pdfConfig.page!\"\n [iframeBorder]=\"pdfConfig.iframeBorder!\"\n [theme]=\"pdfConfig.theme!\"\n [primaryColor]=\"pdfConfig.primaryColor\"\n [backgroundColor]=\"pdfConfig.backgroundColor\"\n [pageBorderColor]=\"pdfConfig.pageBorderColor\"\n [pageSpacing]=\"pdfConfig.pageSpacing\"\n [toolbarColor]=\"pdfConfig.toolbarColor\"\n [textColor]=\"pdfConfig.textColor\"\n [borderRadius]=\"pdfConfig.borderRadius\"\n [customCSS]=\"pdfConfig.customCSS\"\n [cspNonce]=\"pdfConfig.cspNonce\"\n [iframeTitle]=\"pdfConfig.iframeTitle || ('i18n_z_ui_gallery_pdf_preview' | translate)\"\n [urlValidation]=\"pdfConfig.urlValidation!\"\n [controlVisibility]=\"pdfConfig.controlVisibility!\"\n [groupVisibility]=\"pdfConfig.groupVisibility!\"\n [autoActions]=\"pdfConfig.autoActions!\"\n [viewerConfig]=\"pdfConfig.viewerConfig!\"\n [themeConfig]=\"pdfConfig.themeConfig!\"\n [layoutConfig]=\"pdfConfig.layoutConfig!\"\n (onDocumentLoad)=\"onPdfLoad()\"\n (onDocumentError)=\"onMediaError()\" />\n </div>\n }\n </div>\n } @else if (isVideo()) {\n <div class=\"relative flex h-[60vh] w-[70vw] items-center justify-center\">\n @if (isLoading()) {\n <z-skeleton class=\"absolute inset-0 rounded-lg\" />\n <div class=\"text-muted-foreground absolute inset-0 flex items-center justify-center text-sm font-medium\">\n {{ 'i18n_z_ui_gallery_loading_preview' | translate }}\n </div>\n }\n @if (previewError()) {\n <div class=\"bg-card flex size-full flex-col items-center justify-center rounded-lg p-8 shadow-2xl\">\n <div class=\"bg-muted mb-4 flex size-16 items-center justify-center rounded-xl\">\n <i z-icon zType=\"lucideTriangleAlert\" zSize=\"28\" class=\"text-destructive\"></i>\n </div>\n <span class=\"text-foreground text-sm font-medium\">\n {{ 'i18n_z_ui_gallery_preview_load_error' | translate }}\n </span>\n </div>\n } @else {\n <video\n [src]=\"file().url\"\n controls\n autoplay\n class=\"max-h-full max-w-full rounded-lg shadow-2xl transition-opacity duration-300\"\n [class.opacity-0]=\"isLoading()\"\n [class.opacity-100]=\"!isLoading()\"\n (loadeddata)=\"onVideoLoad()\"\n (error)=\"onMediaError()\">\n {{ 'i18n_z_ui_gallery_video_not_supported' | translate }}\n </video>\n }\n </div>\n } @else if (isWordFile()) {\n <div class=\"relative h-[75vh] w-[85vw]\">\n @if (isLoading() || isConverting()) {\n <z-skeleton class=\"absolute inset-0 rounded-lg\" />\n <div class=\"text-muted-foreground absolute inset-0 flex items-center justify-center text-sm font-medium\">\n {{ 'i18n_z_ui_gallery_loading_preview' | translate }}\n </div>\n }\n @if (conversionError()) {\n <div class=\"bg-card flex size-full flex-col items-center justify-center rounded-lg p-12 shadow-2xl\">\n <div class=\"bg-muted mb-4 flex size-24 items-center justify-center rounded-xl\">\n <i z-icon [zType]=\"fileIcon()\" zSize=\"40\" class=\"text-muted-foreground\"></i>\n </div>\n <span class=\"text-foreground mb-2 text-lg font-medium\">{{ file().name }}</span>\n <span class=\"text-muted-foreground rounded-md bg-red-100 px-3 py-1.5 text-xs dark:bg-red-900/30\">\n <span class=\"text-red-700 dark:text-red-300\">{{ conversionError() }}</span>\n </span>\n </div>\n } @else if (docHtmlContent()) {\n <div\n class=\"absolute inset-0 overflow-auto rounded-lg bg-white p-8 text-gray-950 shadow-2xl\"\n [innerHTML]=\"docHtmlContent()\"></div>\n }\n </div>\n } @else if (isExcelFile()) {\n <div class=\"relative h-[75vh] w-[85vw]\">\n @if (isLoading() || isConverting()) {\n <z-skeleton class=\"absolute inset-0 rounded-lg\" />\n <div class=\"text-muted-foreground absolute inset-0 flex items-center justify-center text-sm font-medium\">\n {{ 'i18n_z_ui_gallery_loading_preview' | translate }}\n </div>\n }\n @if (conversionError()) {\n <div class=\"bg-card flex size-full flex-col items-center justify-center rounded-lg p-12 shadow-2xl\">\n <div class=\"bg-muted mb-4 flex size-24 items-center justify-center rounded-xl\">\n <i z-icon [zType]=\"fileIcon()\" zSize=\"40\" class=\"text-muted-foreground\"></i>\n </div>\n <span class=\"text-foreground mb-2 text-lg font-medium\">{{ file().name }}</span>\n <span class=\"text-muted-foreground rounded-md bg-red-100 px-3 py-1.5 text-xs dark:bg-red-900/30\">\n <span class=\"text-red-700 dark:text-red-300\">{{ conversionError() }}</span>\n </span>\n </div>\n } @else if (docHtmlContent()) {\n <div\n class=\"absolute inset-0 overflow-auto rounded-lg bg-white p-4 text-gray-950 shadow-2xl\"\n [innerHTML]=\"docHtmlContent()\"></div>\n }\n </div>\n } @else if (isTextFile()) {\n <div class=\"relative h-[75vh] w-[85vw]\">\n @if (isLoading() || isConverting()) {\n <z-skeleton class=\"absolute inset-0 rounded-lg\" />\n <div class=\"text-muted-foreground absolute inset-0 flex items-center justify-center text-sm font-medium\">\n {{ 'i18n_z_ui_gallery_loading_preview' | translate }}\n </div>\n }\n @if (conversionError()) {\n <div class=\"bg-card flex size-full flex-col items-center justify-center rounded-lg p-12 shadow-2xl\">\n <div class=\"bg-muted mb-4 flex size-24 items-center justify-center rounded-xl\">\n <i z-icon [zType]=\"fileIcon()\" zSize=\"40\" class=\"text-muted-foreground\"></i>\n </div>\n <span class=\"text-foreground mb-2 text-lg font-medium\">{{ file().name }}</span>\n <span class=\"text-muted-foreground rounded-md bg-red-100 px-3 py-1.5 text-xs dark:bg-red-900/30\">\n <span class=\"text-red-700 dark:text-red-300\">{{ conversionError() }}</span>\n </span>\n </div>\n } @else if (textContent()) {\n <div class=\"absolute inset-0 overflow-auto rounded-lg bg-gray-950 p-6 shadow-2xl\">\n <pre class=\"font-mono text-sm leading-relaxed whitespace-pre-wrap text-gray-100\">{{ textContent() }}</pre>\n </div>\n }\n </div>\n } @else {\n <div class=\"bg-card flex flex-col items-center justify-center rounded-lg p-12 shadow-2xl\">\n <div class=\"bg-muted mb-4 flex size-24 items-center justify-center rounded-xl\">\n <i z-icon [zType]=\"fileIcon()\" zSize=\"40\" class=\"text-muted-foreground\"></i>\n </div>\n <span class=\"text-foreground mb-2 text-lg font-medium\">{{ file().name }}</span>\n <span class=\"text-muted-foreground mb-4 text-sm\">{{ formattedSize() }}</span>\n <span class=\"text-muted-foreground rounded-md bg-amber-100 px-3 py-1.5 text-xs dark:bg-amber-900/30\">\n <i\n z-icon\n zType=\"lucideInfo\"\n zSize=\"14\"\n class=\"mr-1 inline-block align-middle text-amber-600 dark:text-amber-400\"></i>\n <span class=\"align-middle text-amber-700 dark:text-amber-300\">\n {{ 'i18n_z_ui_gallery_preview_not_supported' | translate }}\n </span>\n </span>\n </div>\n }\n </div>\n </div>\n</div>\n", styles: [".z-gallery-pdf-frame,.z-gallery-pdf-frame *{border-color:#606060!important;outline-color:#606060!important}.z-gallery-pdf-frame{border-width:1px!important;border-style:solid!important;background:#606060}.z-gallery-pdf-frame ng2-pdfjs-viewer,.z-gallery-pdf-frame ng2-pdfjs-viewer iframe{display:block;width:100%;height:100%;border:0!important;outline:0!important;box-shadow:none!important;background:#606060}\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: "component", type: ZIconComponent, selector: "z-icon, [z-icon]", inputs: ["class", "zType", "zAnimatedType", "zAnimate", "zAnimationTrigger", "zSize", "zStrokeWidth", "zSvg"] }, { kind: "component", type: ZSkeletonComponent, selector: "z-skeleton", inputs: ["class", "zType", "zSize", "zWidth", "zHeight", "zRows", "zGap", "zAnimated", "zRadius"] }, { kind: "directive", type: ZTooltipDirective, selector: "[z-tooltip], [zTooltip]", inputs: ["zContent", "zPosition", "zTooltipPosition", "zTrigger", "zTooltipTrigger", "zTooltipType", "zTooltipSize", "zClass", "zTooltipClass", "zShowDelay", "zTooltipShowDelay", "zHideDelay", "zTooltipHideDelay", "zArrow", "zTooltipArrow", "zDisabled", "zTooltipDisabled", "zOffset", "zTooltipOffset", "zAutoDetect", "zTriggerElement", "zAlwaysShow", "zMaxWidth"], outputs: ["zShow", "zHide"], exportAs: ["zTooltip"] }, { kind: "ngmodule", type: PdfJsViewerModule }, { kind: "component", type: i1.PdfJsViewerComponent, selector: "ng2-pdfjs-viewer", inputs: ["viewerId", "viewerFolder", "externalWindow", "target", "showSpinner", "downloadFileName", "locale", "useOnlyCssZoom", "diagnosticLogs", "showOpenFile", "showAnnotations", "showDownload", "showViewBookmark", "showPrint", "showFullScreen", "showFind", "downloadOnLoad", "printOnLoad", "rotateCW", "rotateCCW", "showLastPageOnLoad", "namedDest", "errorOverride", "errorAppend", "errorMessage", "urlValidation", "customSecurityTpl", "theme", "primaryColor", "backgroundColor", "pageBorderColor", "pageSpacing", "toolbarColor", "textColor", "borderRadius", "customCSS", "cspNonce", "iframeTitle", "customSpinnerTpl", "spinnerClass", "customErrorTpl", "errorClass", "showToolbarLeft", "showToolbarMiddle", "showToolbarRight", "showSecondaryToolbarToggle", "showSidebar", "showSidebarLeft", "showSidebarRight", "toolbarDensity", "sidebarWidth", "toolbarPosition", "sidebarPosition", "responsiveBreakpoint", "controlVisibility", "autoActions", "errorHandling", "viewerConfig", "themeConfig", "groupVisibility", "layoutConfig", "startDownload", "startPrint", "openFile", "download", "print", "fullScreen", "find", "viewBookmark", "lastPage", "externalWindowOptions", "iframeBorder", "zoom", "rotation", "cursor", "scroll", "spread", "pageMode", "page", "pdfSrc"], outputs: ["onBeforePrint", "onAfterPrint", "onDocumentLoad", "onPageChange", "onScaleChange", "onRotationChange", "onDocumentError", "onDocumentInit", "onPagesInit", "onPresentationModeChanged", "onOpenFile", "onFind", "onUpdateFindMatchesCount", "onMetadataLoaded", "onOutlineLoaded", "onPageRendered", "onAnnotationLayerRendered", "onBookmarkClick", "onIdle", "zoomChange", "cursorChange", "scrollChange", "spreadChange", "pageModeChange"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1246
1366
|
}
|
|
1247
1367
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ZGalleryPreviewComponent, decorators: [{
|
|
1248
1368
|
type: Component,
|
|
1249
|
-
args: [{
|
|
1250
|
-
selector: 'z-gallery-preview',
|
|
1251
|
-
imports: [ZButtonComponent, ZIconComponent, ZSkeletonComponent, ZTooltipDirective, TranslatePipe],
|
|
1252
|
-
standalone: true,
|
|
1253
|
-
template: `
|
|
1254
|
-
<div
|
|
1255
|
-
class="animate-in fade-in fixed inset-0 z-50 flex items-center justify-center bg-black/80 backdrop-blur-sm duration-200"
|
|
1256
|
-
(click)="onBackdropClick($event)"
|
|
1257
|
-
>
|
|
1258
|
-
<button
|
|
1259
|
-
z-button
|
|
1260
|
-
zType="ghost"
|
|
1261
|
-
zShape="circle"
|
|
1262
|
-
class="absolute top-4 right-4 z-10 text-white hover:bg-white/20"
|
|
1263
|
-
(click)="close()"
|
|
1264
|
-
>
|
|
1265
|
-
<i z-icon zType="lucideX" zSize="24"></i>
|
|
1266
|
-
</button>
|
|
1267
|
-
|
|
1268
|
-
@if (hasPrev()) {
|
|
1269
|
-
<button
|
|
1270
|
-
z-button
|
|
1271
|
-
zType="ghost"
|
|
1272
|
-
zShape="circle"
|
|
1273
|
-
class="absolute left-4 z-10 text-white hover:bg-white/20"
|
|
1274
|
-
(click)="navigate(-1)"
|
|
1275
|
-
>
|
|
1276
|
-
<i z-icon zType="lucideChevronLeft" zSize="32"></i>
|
|
1277
|
-
</button>
|
|
1278
|
-
}
|
|
1279
|
-
|
|
1280
|
-
@if (hasNext()) {
|
|
1281
|
-
<button
|
|
1282
|
-
z-button
|
|
1283
|
-
zType="ghost"
|
|
1284
|
-
zShape="circle"
|
|
1285
|
-
class="absolute right-4 z-10 text-white hover:bg-white/20"
|
|
1286
|
-
(click)="navigate(1)"
|
|
1287
|
-
>
|
|
1288
|
-
<i z-icon zType="lucideChevronRight" zSize="32"></i>
|
|
1289
|
-
</button>
|
|
1290
|
-
}
|
|
1291
|
-
|
|
1292
|
-
<div class="flex h-full w-full flex-col items-center" (click)="$event.stopPropagation()">
|
|
1293
|
-
<div
|
|
1294
|
-
class="dark:!border-border absolute top-4 left-1/2 z-10 flex -translate-x-1/2 items-center gap-2 rounded-[0.375rem] border !border-transparent bg-black/60 px-4 py-2 text-sm text-white backdrop-blur-sm dark:border"
|
|
1295
|
-
>
|
|
1296
|
-
<div class="flex min-w-0 items-baseline gap-1.5">
|
|
1297
|
-
<span class="max-w-[12.5rem] truncate font-medium">{{ file().name }}</span>
|
|
1298
|
-
<span class="shrink-0 text-white/70">({{ formattedSize() }})</span>
|
|
1299
|
-
</div>
|
|
1300
|
-
|
|
1301
|
-
@if (files().length > 1) {
|
|
1302
|
-
<span class="text-white/70">{{ currentIndex() + 1 }} / {{ files().length }}</span>
|
|
1303
|
-
}
|
|
1304
|
-
|
|
1305
|
-
<div class="ml-1 flex items-center gap-0.5">
|
|
1306
|
-
@if (isImageFile()) {
|
|
1307
|
-
<button
|
|
1308
|
-
z-button
|
|
1309
|
-
zType="ghost"
|
|
1310
|
-
zSize="xs"
|
|
1311
|
-
zShape="circle"
|
|
1312
|
-
class="text-white hover:bg-white/20"
|
|
1313
|
-
z-tooltip
|
|
1314
|
-
[zContent]="'i18n_z_ui_gallery_rotate_left' | translate"
|
|
1315
|
-
(click)="rotateLeft()"
|
|
1316
|
-
>
|
|
1317
|
-
<i z-icon zType="lucideUndo" zSize="14"></i>
|
|
1318
|
-
</button>
|
|
1319
|
-
<button
|
|
1320
|
-
z-button
|
|
1321
|
-
zType="ghost"
|
|
1322
|
-
zSize="xs"
|
|
1323
|
-
zShape="circle"
|
|
1324
|
-
class="text-white hover:bg-white/20"
|
|
1325
|
-
z-tooltip
|
|
1326
|
-
[zContent]="'i18n_z_ui_gallery_rotate_right' | translate"
|
|
1327
|
-
(click)="rotateRight()"
|
|
1328
|
-
>
|
|
1329
|
-
<i z-icon zType="lucideRedo" zSize="14"></i>
|
|
1330
|
-
</button>
|
|
1331
|
-
}
|
|
1332
|
-
|
|
1333
|
-
<button
|
|
1334
|
-
z-button
|
|
1335
|
-
zType="ghost"
|
|
1336
|
-
zSize="xs"
|
|
1337
|
-
zShape="circle"
|
|
1338
|
-
class="text-white hover:bg-white/20"
|
|
1339
|
-
z-tooltip
|
|
1340
|
-
[zContent]="'i18n_z_ui_gallery_download' | translate"
|
|
1341
|
-
(click)="download()"
|
|
1342
|
-
>
|
|
1343
|
-
<i z-icon zType="lucideDownload" zSize="14"></i>
|
|
1344
|
-
</button>
|
|
1345
|
-
|
|
1346
|
-
@if (zShowRemove()) {
|
|
1347
|
-
<button
|
|
1348
|
-
z-button
|
|
1349
|
-
zType="ghost"
|
|
1350
|
-
zSize="xs"
|
|
1351
|
-
zShape="circle"
|
|
1352
|
-
class="text-white hover:bg-white/20"
|
|
1353
|
-
z-tooltip
|
|
1354
|
-
[zContent]="'i18n_z_ui_gallery_delete' | translate"
|
|
1355
|
-
(click)="remove()"
|
|
1356
|
-
>
|
|
1357
|
-
<i z-icon zType="lucideTrash2" zSize="14"></i>
|
|
1358
|
-
</button>
|
|
1359
|
-
}
|
|
1360
|
-
</div>
|
|
1361
|
-
</div>
|
|
1362
|
-
|
|
1363
|
-
<div class="relative flex flex-1 items-center justify-center pt-16">
|
|
1364
|
-
@if (isImageFile()) {
|
|
1365
|
-
<div class="relative flex h-[60vh] w-[70vw] items-center justify-center">
|
|
1366
|
-
@if (isLoading()) {
|
|
1367
|
-
<z-skeleton class="absolute inset-0 rounded-lg" />
|
|
1368
|
-
}
|
|
1369
|
-
<img
|
|
1370
|
-
[src]="file().url || file().thumbnailUrl"
|
|
1371
|
-
[alt]="file().name"
|
|
1372
|
-
class="max-h-full max-w-full rounded-lg object-contain shadow-2xl transition-opacity duration-300"
|
|
1373
|
-
[class.opacity-0]="isLoading()"
|
|
1374
|
-
[class.opacity-100]="!isLoading()"
|
|
1375
|
-
[class.cursor-zoom-in]="!zoomed()"
|
|
1376
|
-
[class.cursor-zoom-out]="zoomed()"
|
|
1377
|
-
[style.transform]="imageTransform()"
|
|
1378
|
-
(load)="onImageLoad()"
|
|
1379
|
-
(error)="onMediaError()"
|
|
1380
|
-
(click)="toggleZoom()"
|
|
1381
|
-
/>
|
|
1382
|
-
</div>
|
|
1383
|
-
} @else if (isPdf() && safePdfUrl()) {
|
|
1384
|
-
<div class="relative h-[75vh] w-[85vw]">
|
|
1385
|
-
@if (isLoading()) {
|
|
1386
|
-
<z-skeleton class="absolute inset-0 rounded-lg" />
|
|
1387
|
-
}
|
|
1388
|
-
<iframe
|
|
1389
|
-
[src]="safePdfUrl()"
|
|
1390
|
-
class="absolute inset-0 size-full rounded-lg bg-white shadow-2xl transition-opacity duration-300"
|
|
1391
|
-
[class.opacity-0]="isLoading()"
|
|
1392
|
-
[class.opacity-100]="!isLoading()"
|
|
1393
|
-
frameborder="0"
|
|
1394
|
-
referrerpolicy="no-referrer"
|
|
1395
|
-
(load)="onPdfLoad()"
|
|
1396
|
-
></iframe>
|
|
1397
|
-
</div>
|
|
1398
|
-
} @else if (isVideo()) {
|
|
1399
|
-
<div class="relative flex h-[60vh] w-[70vw] items-center justify-center">
|
|
1400
|
-
@if (isLoading()) {
|
|
1401
|
-
<z-skeleton class="absolute inset-0 rounded-lg" />
|
|
1402
|
-
}
|
|
1403
|
-
<video
|
|
1404
|
-
[src]="file().url"
|
|
1405
|
-
controls
|
|
1406
|
-
autoplay
|
|
1407
|
-
class="max-h-full max-w-full rounded-lg shadow-2xl transition-opacity duration-300"
|
|
1408
|
-
[class.opacity-0]="isLoading()"
|
|
1409
|
-
[class.opacity-100]="!isLoading()"
|
|
1410
|
-
(loadeddata)="onVideoLoad()"
|
|
1411
|
-
(error)="onMediaError()"
|
|
1412
|
-
>
|
|
1413
|
-
Your browser does not support the video tag.
|
|
1414
|
-
</video>
|
|
1415
|
-
</div>
|
|
1416
|
-
} @else if (isWordFile()) {
|
|
1417
|
-
<div class="relative h-[75vh] w-[85vw]">
|
|
1418
|
-
@if (isLoading() || isConverting()) {
|
|
1419
|
-
<z-skeleton class="absolute inset-0 rounded-lg" />
|
|
1420
|
-
}
|
|
1421
|
-
@if (conversionError()) {
|
|
1422
|
-
<div class="bg-card flex size-full flex-col items-center justify-center rounded-lg p-12 shadow-2xl">
|
|
1423
|
-
<div class="bg-muted mb-4 flex size-24 items-center justify-center rounded-xl">
|
|
1424
|
-
<i z-icon [zType]="fileIcon()" zSize="40" class="text-muted-foreground"></i>
|
|
1425
|
-
</div>
|
|
1426
|
-
<span class="text-foreground mb-2 text-lg font-medium">{{ file().name }}</span>
|
|
1427
|
-
<span class="text-muted-foreground rounded-md bg-red-100 px-3 py-1.5 text-xs dark:bg-red-900/30">
|
|
1428
|
-
<span class="text-red-700 dark:text-red-300">{{ conversionError() }}</span>
|
|
1429
|
-
</span>
|
|
1430
|
-
</div>
|
|
1431
|
-
} @else if (docHtmlContent()) {
|
|
1432
|
-
<div
|
|
1433
|
-
class="absolute inset-0 overflow-auto rounded-lg bg-white p-8 text-gray-950 shadow-2xl"
|
|
1434
|
-
[innerHTML]="docHtmlContent()"
|
|
1435
|
-
></div>
|
|
1436
|
-
}
|
|
1437
|
-
</div>
|
|
1438
|
-
} @else if (isExcelFile()) {
|
|
1439
|
-
<div class="relative h-[75vh] w-[85vw]">
|
|
1440
|
-
@if (isLoading() || isConverting()) {
|
|
1441
|
-
<z-skeleton class="absolute inset-0 rounded-lg" />
|
|
1442
|
-
}
|
|
1443
|
-
@if (conversionError()) {
|
|
1444
|
-
<div class="bg-card flex size-full flex-col items-center justify-center rounded-lg p-12 shadow-2xl">
|
|
1445
|
-
<div class="bg-muted mb-4 flex size-24 items-center justify-center rounded-xl">
|
|
1446
|
-
<i z-icon [zType]="fileIcon()" zSize="40" class="text-muted-foreground"></i>
|
|
1447
|
-
</div>
|
|
1448
|
-
<span class="text-foreground mb-2 text-lg font-medium">{{ file().name }}</span>
|
|
1449
|
-
<span class="text-muted-foreground rounded-md bg-red-100 px-3 py-1.5 text-xs dark:bg-red-900/30">
|
|
1450
|
-
<span class="text-red-700 dark:text-red-300">{{ conversionError() }}</span>
|
|
1451
|
-
</span>
|
|
1452
|
-
</div>
|
|
1453
|
-
} @else if (docHtmlContent()) {
|
|
1454
|
-
<div
|
|
1455
|
-
class="absolute inset-0 overflow-auto rounded-lg bg-white p-4 text-gray-950 shadow-2xl"
|
|
1456
|
-
[innerHTML]="docHtmlContent()"
|
|
1457
|
-
></div>
|
|
1458
|
-
}
|
|
1459
|
-
</div>
|
|
1460
|
-
} @else if (isTextFile()) {
|
|
1461
|
-
<div class="relative h-[75vh] w-[85vw]">
|
|
1462
|
-
@if (isLoading() || isConverting()) {
|
|
1463
|
-
<z-skeleton class="absolute inset-0 rounded-lg" />
|
|
1464
|
-
}
|
|
1465
|
-
@if (conversionError()) {
|
|
1466
|
-
<div class="bg-card flex size-full flex-col items-center justify-center rounded-lg p-12 shadow-2xl">
|
|
1467
|
-
<div class="bg-muted mb-4 flex size-24 items-center justify-center rounded-xl">
|
|
1468
|
-
<i z-icon [zType]="fileIcon()" zSize="40" class="text-muted-foreground"></i>
|
|
1469
|
-
</div>
|
|
1470
|
-
<span class="text-foreground mb-2 text-lg font-medium">{{ file().name }}</span>
|
|
1471
|
-
<span class="text-muted-foreground rounded-md bg-red-100 px-3 py-1.5 text-xs dark:bg-red-900/30">
|
|
1472
|
-
<span class="text-red-700 dark:text-red-300">{{ conversionError() }}</span>
|
|
1473
|
-
</span>
|
|
1474
|
-
</div>
|
|
1475
|
-
} @else if (textContent()) {
|
|
1476
|
-
<div class="absolute inset-0 overflow-auto rounded-lg bg-gray-950 p-6 shadow-2xl">
|
|
1477
|
-
<pre class="font-mono text-sm leading-relaxed whitespace-pre-wrap text-gray-100">{{
|
|
1478
|
-
textContent()
|
|
1479
|
-
}}</pre>
|
|
1480
|
-
</div>
|
|
1481
|
-
}
|
|
1482
|
-
</div>
|
|
1483
|
-
} @else {
|
|
1484
|
-
<div class="bg-card flex flex-col items-center justify-center rounded-lg p-12 shadow-2xl">
|
|
1485
|
-
<div class="bg-muted mb-4 flex size-24 items-center justify-center rounded-xl">
|
|
1486
|
-
<i z-icon [zType]="fileIcon()" zSize="40" class="text-muted-foreground"></i>
|
|
1487
|
-
</div>
|
|
1488
|
-
<span class="text-foreground mb-2 text-lg font-medium">{{ file().name }}</span>
|
|
1489
|
-
<span class="text-muted-foreground mb-4 text-sm">{{ formattedSize() }}</span>
|
|
1490
|
-
<span class="text-muted-foreground rounded-md bg-amber-100 px-3 py-1.5 text-xs dark:bg-amber-900/30">
|
|
1491
|
-
<i
|
|
1492
|
-
z-icon
|
|
1493
|
-
zType="lucideInfo"
|
|
1494
|
-
zSize="14"
|
|
1495
|
-
class="mr-1 inline-block align-middle text-amber-600 dark:text-amber-400"
|
|
1496
|
-
></i>
|
|
1497
|
-
<span class="align-middle text-amber-700 dark:text-amber-300">
|
|
1498
|
-
{{ 'i18n_z_ui_gallery_preview_not_supported' | translate }}
|
|
1499
|
-
</span>
|
|
1500
|
-
</span>
|
|
1501
|
-
</div>
|
|
1502
|
-
}
|
|
1503
|
-
</div>
|
|
1504
|
-
</div>
|
|
1505
|
-
</div>
|
|
1506
|
-
`,
|
|
1507
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1508
|
-
encapsulation: ViewEncapsulation.None,
|
|
1509
|
-
host: {
|
|
1369
|
+
args: [{ selector: 'z-gallery-preview', imports: [ZButtonComponent, ZIconComponent, ZSkeletonComponent, ZTooltipDirective, TranslatePipe, PdfJsViewerModule], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
1510
1370
|
class: 'z-gallery-preview z-[9999]',
|
|
1511
1371
|
'(document:keydown)': 'onKeyDown($event)',
|
|
1512
|
-
},
|
|
1513
|
-
|
|
1514
|
-
}], ctorParameters: () => [], propDecorators: { file: [{ type: i0.Input, args: [{ isSignal: true, alias: "file", required: true }] }], files: [{ type: i0.Input, args: [{ isSignal: true, alias: "files", required: false }] }], zShowRemove: [{ type: i0.Input, args: [{ isSignal: true, alias: "zShowRemove", required: false }] }], zTrustedResourceOrigins: [{ type: i0.Input, args: [{ isSignal: true, alias: "zTrustedResourceOrigins", required: false }] }], zOnClose: [{ type: i0.Output, args: ["zOnClose"] }], zOnDownload: [{ type: i0.Output, args: ["zOnDownload"] }], zOnNavigate: [{ type: i0.Output, args: ["zOnNavigate"] }], zOnRemove: [{ type: i0.Output, args: ["zOnRemove"] }] } });
|
|
1372
|
+
}, template: "<div\n class=\"animate-in fade-in fixed inset-0 z-50 flex items-center justify-center bg-black/80 backdrop-blur-sm duration-200\"\n (click)=\"onBackdropClick($event)\">\n <button\n z-button\n zType=\"ghost\"\n zShape=\"circle\"\n class=\"absolute top-3 right-3 z-20 text-white hover:bg-white/20 lg:top-4 lg:right-4\"\n (click)=\"close()\">\n <i z-icon zType=\"lucideX\" zSize=\"24\"></i>\n </button>\n\n @if (hasPrev()) {\n <button\n z-button\n zType=\"ghost\"\n zShape=\"circle\"\n class=\"absolute left-4 z-10 text-white hover:bg-white/20\"\n (click)=\"navigate(-1)\">\n <i z-icon zType=\"lucideChevronLeft\" zSize=\"32\"></i>\n </button>\n }\n\n @if (hasNext()) {\n <button\n z-button\n zType=\"ghost\"\n zShape=\"circle\"\n class=\"absolute right-4 z-10 text-white hover:bg-white/20\"\n (click)=\"navigate(1)\">\n <i z-icon zType=\"lucideChevronRight\" zSize=\"32\"></i>\n </button>\n }\n\n <div class=\"flex h-full w-full flex-col items-center\" (click)=\"$event.stopPropagation()\">\n <div\n class=\"dark:!border-border absolute top-3 right-14 left-3 z-10 flex min-w-0 items-center justify-between gap-2 rounded-[0.375rem] border !border-transparent bg-black/70 px-2.5 py-1.5 text-xs text-white shadow-lg backdrop-blur-sm lg:top-4 lg:right-auto lg:left-1/2 lg:max-w-[calc(100vw-10rem)] lg:-translate-x-1/2 lg:justify-start lg:bg-black/60 lg:px-4 lg:py-2 lg:text-sm dark:border\">\n <div class=\"flex min-w-0 items-baseline gap-1.5\">\n <span class=\"min-w-0 truncate font-medium lg:max-w-[12.5rem]\">{{ file().name }}</span>\n <span class=\"hidden shrink-0 text-white/70 lg:inline\">({{ formattedSize() }})</span>\n </div>\n\n @if (files().length > 1) {\n <span class=\"hidden shrink-0 text-white/70 md:inline\">{{ currentIndex() + 1 }} / {{ files().length }}</span>\n }\n\n <div class=\"ml-1 flex shrink-0 items-center gap-0.5\">\n @if (isImageFile()) {\n <button\n z-button\n zType=\"ghost\"\n zSize=\"xs\"\n zShape=\"circle\"\n class=\"text-white hover:bg-white/20\"\n z-tooltip\n [zContent]=\"'i18n_z_ui_gallery_rotate_left' | translate\"\n (click)=\"rotateLeft()\">\n <i z-icon zType=\"lucideUndo\" zSize=\"14\"></i>\n </button>\n <button\n z-button\n zType=\"ghost\"\n zSize=\"xs\"\n zShape=\"circle\"\n class=\"text-white hover:bg-white/20\"\n z-tooltip\n [zContent]=\"'i18n_z_ui_gallery_rotate_right' | translate\"\n (click)=\"rotateRight()\">\n <i z-icon zType=\"lucideRedo\" zSize=\"14\"></i>\n </button>\n }\n\n <button\n z-button\n zType=\"ghost\"\n zSize=\"xs\"\n zShape=\"circle\"\n class=\"text-white hover:bg-white/20\"\n z-tooltip\n [zContent]=\"'i18n_z_ui_gallery_download' | translate\"\n (click)=\"download()\">\n <i z-icon zType=\"lucideDownload\" zSize=\"14\"></i>\n </button>\n\n @if (zShowRemove()) {\n <button\n z-button\n zType=\"ghost\"\n zSize=\"xs\"\n zShape=\"circle\"\n class=\"text-white hover:bg-white/20\"\n z-tooltip\n [zContent]=\"'i18n_z_ui_gallery_delete' | translate\"\n (click)=\"remove()\">\n <i z-icon zType=\"lucideTrash2\" zSize=\"14\"></i>\n </button>\n }\n </div>\n </div>\n\n <div class=\"relative flex flex-1 items-center justify-center pt-16\">\n @if (isImageFile()) {\n <div class=\"relative flex h-[60vh] w-[70vw] items-center justify-center\">\n @if (isLoading()) {\n <z-skeleton class=\"absolute inset-0 rounded-lg\" />\n <div class=\"text-muted-foreground absolute inset-0 flex items-center justify-center text-sm font-medium\">\n {{ 'i18n_z_ui_gallery_loading_preview' | translate }}\n </div>\n }\n @if (previewError()) {\n <div class=\"bg-card flex size-full flex-col items-center justify-center rounded-lg p-8 shadow-2xl\">\n <div class=\"bg-muted mb-4 flex size-16 items-center justify-center rounded-xl\">\n <i z-icon zType=\"lucideTriangleAlert\" zSize=\"28\" class=\"text-destructive\"></i>\n </div>\n <span class=\"text-foreground text-sm font-medium\">\n {{ 'i18n_z_ui_gallery_preview_load_error' | translate }}\n </span>\n </div>\n } @else {\n <img\n [src]=\"file().url || file().thumbnailUrl\"\n [alt]=\"file().name\"\n class=\"max-h-full max-w-full rounded-lg object-contain shadow-2xl transition-opacity duration-300\"\n [class.opacity-0]=\"isLoading()\"\n [class.opacity-100]=\"!isLoading()\"\n [class.cursor-zoom-in]=\"!zoomed()\"\n [class.cursor-zoom-out]=\"zoomed()\"\n [style.transform]=\"imageTransform()\"\n (load)=\"onImageLoad()\"\n (error)=\"onMediaError()\"\n (click)=\"toggleZoom()\" />\n }\n </div>\n } @else if (isPdf() && pdfUrl()) {\n <div\n class=\"z-gallery-pdf-frame relative h-[75vh] w-[85vw] max-w-[96vw] overflow-hidden rounded-sm border shadow-xs\">\n @if (isLoading()) {\n <z-skeleton class=\"absolute inset-0 rounded-sm\" />\n <div\n class=\"text-muted-foreground absolute inset-0 z-10 flex items-center justify-center text-sm font-medium\">\n {{ 'i18n_z_ui_gallery_loading_preview' | translate }}\n </div>\n }\n @if (previewError()) {\n <div class=\"bg-card flex size-full flex-col items-center justify-center p-8\">\n <div class=\"bg-muted mb-4 flex size-16 items-center justify-center rounded-xl\">\n <i z-icon zType=\"lucideTriangleAlert\" zSize=\"28\" class=\"text-destructive\"></i>\n </div>\n <span class=\"text-foreground text-sm font-medium\">\n {{ 'i18n_z_ui_gallery_preview_load_error' | translate }}\n </span>\n </div>\n } @else {\n <div\n class=\"relative size-full bg-white transition-opacity duration-300\"\n [class.opacity-0]=\"isLoading()\"\n [class.opacity-100]=\"!isLoading()\">\n @let pdfConfig = pdfViewerConfig();\n <ng2-pdfjs-viewer\n #pdfViewer\n class=\"block size-full\"\n [viewerFolder]=\"pdfConfig.viewerFolder!\"\n [viewerId]=\"pdfViewerId()\"\n [pdfSrc]=\"pdfUrl()!\"\n [downloadFileName]=\"file().name\"\n [locale]=\"pdfConfig.locale!\"\n [showSpinner]=\"pdfConfig.showSpinner!\"\n [useOnlyCssZoom]=\"pdfConfig.useOnlyCssZoom!\"\n [diagnosticLogs]=\"pdfConfig.diagnosticLogs!\"\n [showOpenFile]=\"pdfConfig.showOpenFile!\"\n [showAnnotations]=\"pdfConfig.showAnnotations!\"\n [showDownload]=\"pdfConfig.showDownload!\"\n [showViewBookmark]=\"pdfConfig.showViewBookmark!\"\n [showPrint]=\"pdfConfig.showPrint!\"\n [showFullScreen]=\"pdfConfig.showFullScreen!\"\n [showFind]=\"pdfConfig.showFind!\"\n [downloadOnLoad]=\"pdfConfig.downloadOnLoad!\"\n [printOnLoad]=\"pdfConfig.printOnLoad!\"\n [rotateCW]=\"pdfConfig.rotateCW!\"\n [rotateCCW]=\"pdfConfig.rotateCCW!\"\n [showLastPageOnLoad]=\"pdfConfig.showLastPageOnLoad!\"\n [showToolbarLeft]=\"pdfConfig.showToolbarLeft!\"\n [showToolbarMiddle]=\"pdfConfig.showToolbarMiddle!\"\n [showToolbarRight]=\"pdfConfig.showToolbarRight!\"\n [showSecondaryToolbarToggle]=\"pdfConfig.showSecondaryToolbarToggle!\"\n [showSidebar]=\"pdfConfig.showSidebar!\"\n [showSidebarLeft]=\"pdfConfig.showSidebarLeft!\"\n [showSidebarRight]=\"pdfConfig.showSidebarRight!\"\n [toolbarDensity]=\"pdfConfig.toolbarDensity!\"\n [sidebarWidth]=\"pdfConfig.sidebarWidth\"\n [toolbarPosition]=\"pdfConfig.toolbarPosition!\"\n [sidebarPosition]=\"pdfConfig.sidebarPosition!\"\n [responsiveBreakpoint]=\"pdfConfig.responsiveBreakpoint\"\n [zoom]=\"pdfConfig.zoom!\"\n [rotation]=\"pdfConfig.rotation!\"\n [cursor]=\"pdfConfig.cursor!\"\n [scroll]=\"pdfConfig.scroll!\"\n [spread]=\"pdfConfig.spread!\"\n [pageMode]=\"pdfConfig.pageMode!\"\n [page]=\"pdfConfig.page!\"\n [iframeBorder]=\"pdfConfig.iframeBorder!\"\n [theme]=\"pdfConfig.theme!\"\n [primaryColor]=\"pdfConfig.primaryColor\"\n [backgroundColor]=\"pdfConfig.backgroundColor\"\n [pageBorderColor]=\"pdfConfig.pageBorderColor\"\n [pageSpacing]=\"pdfConfig.pageSpacing\"\n [toolbarColor]=\"pdfConfig.toolbarColor\"\n [textColor]=\"pdfConfig.textColor\"\n [borderRadius]=\"pdfConfig.borderRadius\"\n [customCSS]=\"pdfConfig.customCSS\"\n [cspNonce]=\"pdfConfig.cspNonce\"\n [iframeTitle]=\"pdfConfig.iframeTitle || ('i18n_z_ui_gallery_pdf_preview' | translate)\"\n [urlValidation]=\"pdfConfig.urlValidation!\"\n [controlVisibility]=\"pdfConfig.controlVisibility!\"\n [groupVisibility]=\"pdfConfig.groupVisibility!\"\n [autoActions]=\"pdfConfig.autoActions!\"\n [viewerConfig]=\"pdfConfig.viewerConfig!\"\n [themeConfig]=\"pdfConfig.themeConfig!\"\n [layoutConfig]=\"pdfConfig.layoutConfig!\"\n (onDocumentLoad)=\"onPdfLoad()\"\n (onDocumentError)=\"onMediaError()\" />\n </div>\n }\n </div>\n } @else if (isVideo()) {\n <div class=\"relative flex h-[60vh] w-[70vw] items-center justify-center\">\n @if (isLoading()) {\n <z-skeleton class=\"absolute inset-0 rounded-lg\" />\n <div class=\"text-muted-foreground absolute inset-0 flex items-center justify-center text-sm font-medium\">\n {{ 'i18n_z_ui_gallery_loading_preview' | translate }}\n </div>\n }\n @if (previewError()) {\n <div class=\"bg-card flex size-full flex-col items-center justify-center rounded-lg p-8 shadow-2xl\">\n <div class=\"bg-muted mb-4 flex size-16 items-center justify-center rounded-xl\">\n <i z-icon zType=\"lucideTriangleAlert\" zSize=\"28\" class=\"text-destructive\"></i>\n </div>\n <span class=\"text-foreground text-sm font-medium\">\n {{ 'i18n_z_ui_gallery_preview_load_error' | translate }}\n </span>\n </div>\n } @else {\n <video\n [src]=\"file().url\"\n controls\n autoplay\n class=\"max-h-full max-w-full rounded-lg shadow-2xl transition-opacity duration-300\"\n [class.opacity-0]=\"isLoading()\"\n [class.opacity-100]=\"!isLoading()\"\n (loadeddata)=\"onVideoLoad()\"\n (error)=\"onMediaError()\">\n {{ 'i18n_z_ui_gallery_video_not_supported' | translate }}\n </video>\n }\n </div>\n } @else if (isWordFile()) {\n <div class=\"relative h-[75vh] w-[85vw]\">\n @if (isLoading() || isConverting()) {\n <z-skeleton class=\"absolute inset-0 rounded-lg\" />\n <div class=\"text-muted-foreground absolute inset-0 flex items-center justify-center text-sm font-medium\">\n {{ 'i18n_z_ui_gallery_loading_preview' | translate }}\n </div>\n }\n @if (conversionError()) {\n <div class=\"bg-card flex size-full flex-col items-center justify-center rounded-lg p-12 shadow-2xl\">\n <div class=\"bg-muted mb-4 flex size-24 items-center justify-center rounded-xl\">\n <i z-icon [zType]=\"fileIcon()\" zSize=\"40\" class=\"text-muted-foreground\"></i>\n </div>\n <span class=\"text-foreground mb-2 text-lg font-medium\">{{ file().name }}</span>\n <span class=\"text-muted-foreground rounded-md bg-red-100 px-3 py-1.5 text-xs dark:bg-red-900/30\">\n <span class=\"text-red-700 dark:text-red-300\">{{ conversionError() }}</span>\n </span>\n </div>\n } @else if (docHtmlContent()) {\n <div\n class=\"absolute inset-0 overflow-auto rounded-lg bg-white p-8 text-gray-950 shadow-2xl\"\n [innerHTML]=\"docHtmlContent()\"></div>\n }\n </div>\n } @else if (isExcelFile()) {\n <div class=\"relative h-[75vh] w-[85vw]\">\n @if (isLoading() || isConverting()) {\n <z-skeleton class=\"absolute inset-0 rounded-lg\" />\n <div class=\"text-muted-foreground absolute inset-0 flex items-center justify-center text-sm font-medium\">\n {{ 'i18n_z_ui_gallery_loading_preview' | translate }}\n </div>\n }\n @if (conversionError()) {\n <div class=\"bg-card flex size-full flex-col items-center justify-center rounded-lg p-12 shadow-2xl\">\n <div class=\"bg-muted mb-4 flex size-24 items-center justify-center rounded-xl\">\n <i z-icon [zType]=\"fileIcon()\" zSize=\"40\" class=\"text-muted-foreground\"></i>\n </div>\n <span class=\"text-foreground mb-2 text-lg font-medium\">{{ file().name }}</span>\n <span class=\"text-muted-foreground rounded-md bg-red-100 px-3 py-1.5 text-xs dark:bg-red-900/30\">\n <span class=\"text-red-700 dark:text-red-300\">{{ conversionError() }}</span>\n </span>\n </div>\n } @else if (docHtmlContent()) {\n <div\n class=\"absolute inset-0 overflow-auto rounded-lg bg-white p-4 text-gray-950 shadow-2xl\"\n [innerHTML]=\"docHtmlContent()\"></div>\n }\n </div>\n } @else if (isTextFile()) {\n <div class=\"relative h-[75vh] w-[85vw]\">\n @if (isLoading() || isConverting()) {\n <z-skeleton class=\"absolute inset-0 rounded-lg\" />\n <div class=\"text-muted-foreground absolute inset-0 flex items-center justify-center text-sm font-medium\">\n {{ 'i18n_z_ui_gallery_loading_preview' | translate }}\n </div>\n }\n @if (conversionError()) {\n <div class=\"bg-card flex size-full flex-col items-center justify-center rounded-lg p-12 shadow-2xl\">\n <div class=\"bg-muted mb-4 flex size-24 items-center justify-center rounded-xl\">\n <i z-icon [zType]=\"fileIcon()\" zSize=\"40\" class=\"text-muted-foreground\"></i>\n </div>\n <span class=\"text-foreground mb-2 text-lg font-medium\">{{ file().name }}</span>\n <span class=\"text-muted-foreground rounded-md bg-red-100 px-3 py-1.5 text-xs dark:bg-red-900/30\">\n <span class=\"text-red-700 dark:text-red-300\">{{ conversionError() }}</span>\n </span>\n </div>\n } @else if (textContent()) {\n <div class=\"absolute inset-0 overflow-auto rounded-lg bg-gray-950 p-6 shadow-2xl\">\n <pre class=\"font-mono text-sm leading-relaxed whitespace-pre-wrap text-gray-100\">{{ textContent() }}</pre>\n </div>\n }\n </div>\n } @else {\n <div class=\"bg-card flex flex-col items-center justify-center rounded-lg p-12 shadow-2xl\">\n <div class=\"bg-muted mb-4 flex size-24 items-center justify-center rounded-xl\">\n <i z-icon [zType]=\"fileIcon()\" zSize=\"40\" class=\"text-muted-foreground\"></i>\n </div>\n <span class=\"text-foreground mb-2 text-lg font-medium\">{{ file().name }}</span>\n <span class=\"text-muted-foreground mb-4 text-sm\">{{ formattedSize() }}</span>\n <span class=\"text-muted-foreground rounded-md bg-amber-100 px-3 py-1.5 text-xs dark:bg-amber-900/30\">\n <i\n z-icon\n zType=\"lucideInfo\"\n zSize=\"14\"\n class=\"mr-1 inline-block align-middle text-amber-600 dark:text-amber-400\"></i>\n <span class=\"align-middle text-amber-700 dark:text-amber-300\">\n {{ 'i18n_z_ui_gallery_preview_not_supported' | translate }}\n </span>\n </span>\n </div>\n }\n </div>\n </div>\n</div>\n", styles: [".z-gallery-pdf-frame,.z-gallery-pdf-frame *{border-color:#606060!important;outline-color:#606060!important}.z-gallery-pdf-frame{border-width:1px!important;border-style:solid!important;background:#606060}.z-gallery-pdf-frame ng2-pdfjs-viewer,.z-gallery-pdf-frame ng2-pdfjs-viewer iframe{display:block;width:100%;height:100%;border:0!important;outline:0!important;box-shadow:none!important;background:#606060}\n"] }]
|
|
1373
|
+
}], ctorParameters: () => [], propDecorators: { file: [{ type: i0.Input, args: [{ isSignal: true, alias: "file", required: true }] }], files: [{ type: i0.Input, args: [{ isSignal: true, alias: "files", required: false }] }], zShowRemove: [{ type: i0.Input, args: [{ isSignal: true, alias: "zShowRemove", required: false }] }], zPdfViewerConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "zPdfViewerConfig", required: false }] }], zTrustedResourceOrigins: [{ type: i0.Input, args: [{ isSignal: true, alias: "zTrustedResourceOrigins", required: false }] }], zOnClose: [{ type: i0.Output, args: ["zOnClose"] }], zOnDownload: [{ type: i0.Output, args: ["zOnDownload"] }], zOnNavigate: [{ type: i0.Output, args: ["zOnNavigate"] }], zOnRemove: [{ type: i0.Output, args: ["zOnRemove"] }], pdfViewer: [{ type: i0.ViewChild, args: ['pdfViewer', { isSignal: true }] }] } });
|
|
1515
1374
|
|
|
1516
1375
|
const zGalleryVariants = cva('z-gallery', {
|
|
1517
1376
|
variants: {
|
|
@@ -1589,6 +1448,7 @@ class ZGalleryComponent {
|
|
|
1589
1448
|
zShowDownload = input(true, ...(ngDevMode ? [{ debugName: "zShowDownload" }] : []));
|
|
1590
1449
|
zShowPreview = input(true, ...(ngDevMode ? [{ debugName: "zShowPreview" }] : []));
|
|
1591
1450
|
zShowRemove = input(false, ...(ngDevMode ? [{ debugName: "zShowRemove" }] : []));
|
|
1451
|
+
zPdfViewerConfig = input({}, ...(ngDevMode ? [{ debugName: "zPdfViewerConfig" }] : []));
|
|
1592
1452
|
zTrustedResourceOrigins = input([], ...(ngDevMode ? [{ debugName: "zTrustedResourceOrigins" }] : []));
|
|
1593
1453
|
zShowModeToggle = input(true, ...(ngDevMode ? [{ debugName: "zShowModeToggle" }] : []));
|
|
1594
1454
|
zShowSearch = input(false, ...(ngDevMode ? [{ debugName: "zShowSearch" }] : []));
|
|
@@ -1830,7 +1690,7 @@ class ZGalleryComponent {
|
|
|
1830
1690
|
selectedFiles.forEach(file => this.onDownload(file));
|
|
1831
1691
|
}
|
|
1832
1692
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ZGalleryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1833
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.9", type: ZGalleryComponent, isStandalone: true, selector: "z-gallery", inputs: { zFiles: { classPropertyName: "zFiles", publicName: "zFiles", isSignal: true, isRequired: false, transformFunction: null }, zMode: { classPropertyName: "zMode", publicName: "zMode", isSignal: true, isRequired: false, transformFunction: null }, zSize: { classPropertyName: "zSize", publicName: "zSize", isSignal: true, isRequired: false, transformFunction: null }, zColumns: { classPropertyName: "zColumns", publicName: "zColumns", isSignal: true, isRequired: false, transformFunction: null }, zItemWidth: { classPropertyName: "zItemWidth", publicName: "zItemWidth", isSignal: true, isRequired: false, transformFunction: null }, zLoading: { classPropertyName: "zLoading", publicName: "zLoading", isSignal: true, isRequired: false, transformFunction: null }, zSkeletonRows: { classPropertyName: "zSkeletonRows", publicName: "zSkeletonRows", isSignal: true, isRequired: false, transformFunction: null }, zSkeletonItems: { classPropertyName: "zSkeletonItems", publicName: "zSkeletonItems", isSignal: true, isRequired: false, transformFunction: null }, zShowDownload: { classPropertyName: "zShowDownload", publicName: "zShowDownload", isSignal: true, isRequired: false, transformFunction: null }, zShowPreview: { classPropertyName: "zShowPreview", publicName: "zShowPreview", isSignal: true, isRequired: false, transformFunction: null }, zShowRemove: { classPropertyName: "zShowRemove", publicName: "zShowRemove", isSignal: true, isRequired: false, transformFunction: null }, zTrustedResourceOrigins: { classPropertyName: "zTrustedResourceOrigins", publicName: "zTrustedResourceOrigins", isSignal: true, isRequired: false, transformFunction: null }, zShowModeToggle: { classPropertyName: "zShowModeToggle", publicName: "zShowModeToggle", isSignal: true, isRequired: false, transformFunction: null }, zShowSearch: { classPropertyName: "zShowSearch", publicName: "zShowSearch", isSignal: true, isRequired: false, transformFunction: null }, zServerSearch: { classPropertyName: "zServerSearch", publicName: "zServerSearch", isSignal: true, isRequired: false, transformFunction: null }, zSearchDebounce: { classPropertyName: "zSearchDebounce", publicName: "zSearchDebounce", isSignal: true, isRequired: false, transformFunction: null }, zSearchPlaceholder: { classPropertyName: "zSearchPlaceholder", publicName: "zSearchPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, zToggleSize: { classPropertyName: "zToggleSize", publicName: "zToggleSize", isSignal: true, isRequired: false, transformFunction: null }, zTitle: { classPropertyName: "zTitle", publicName: "zTitle", isSignal: true, isRequired: false, transformFunction: null }, zEmptyText: { classPropertyName: "zEmptyText", publicName: "zEmptyText", isSignal: true, isRequired: false, transformFunction: null }, zEmptyIcon: { classPropertyName: "zEmptyIcon", publicName: "zEmptyIcon", isSignal: true, isRequired: false, transformFunction: null }, zClass: { classPropertyName: "zClass", publicName: "zClass", isSignal: true, isRequired: false, transformFunction: null }, zSelectable: { classPropertyName: "zSelectable", publicName: "zSelectable", isSignal: true, isRequired: false, transformFunction: null }, zSelectedFiles: { classPropertyName: "zSelectedFiles", publicName: "zSelectedFiles", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { zMode: "zModeChange", zSelectedFiles: "zSelectedFilesChange", zOnDownload: "zOnDownload", zOnPreview: "zOnPreview", zOnRemove: "zOnRemove", zModeChange: "zModeChange", zSearchChange: "zSearchChange", zControl: "zControl", zSelectionChange: "zSelectionChange", zOnAction: "zOnAction" }, host: { classAttribute: "z-gallery block" }, exportAs: ["zGallery"], ngImport: i0, template: `
|
|
1693
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.9", type: ZGalleryComponent, isStandalone: true, selector: "z-gallery", inputs: { zFiles: { classPropertyName: "zFiles", publicName: "zFiles", isSignal: true, isRequired: false, transformFunction: null }, zMode: { classPropertyName: "zMode", publicName: "zMode", isSignal: true, isRequired: false, transformFunction: null }, zSize: { classPropertyName: "zSize", publicName: "zSize", isSignal: true, isRequired: false, transformFunction: null }, zColumns: { classPropertyName: "zColumns", publicName: "zColumns", isSignal: true, isRequired: false, transformFunction: null }, zItemWidth: { classPropertyName: "zItemWidth", publicName: "zItemWidth", isSignal: true, isRequired: false, transformFunction: null }, zLoading: { classPropertyName: "zLoading", publicName: "zLoading", isSignal: true, isRequired: false, transformFunction: null }, zSkeletonRows: { classPropertyName: "zSkeletonRows", publicName: "zSkeletonRows", isSignal: true, isRequired: false, transformFunction: null }, zSkeletonItems: { classPropertyName: "zSkeletonItems", publicName: "zSkeletonItems", isSignal: true, isRequired: false, transformFunction: null }, zShowDownload: { classPropertyName: "zShowDownload", publicName: "zShowDownload", isSignal: true, isRequired: false, transformFunction: null }, zShowPreview: { classPropertyName: "zShowPreview", publicName: "zShowPreview", isSignal: true, isRequired: false, transformFunction: null }, zShowRemove: { classPropertyName: "zShowRemove", publicName: "zShowRemove", isSignal: true, isRequired: false, transformFunction: null }, zPdfViewerConfig: { classPropertyName: "zPdfViewerConfig", publicName: "zPdfViewerConfig", isSignal: true, isRequired: false, transformFunction: null }, zTrustedResourceOrigins: { classPropertyName: "zTrustedResourceOrigins", publicName: "zTrustedResourceOrigins", isSignal: true, isRequired: false, transformFunction: null }, zShowModeToggle: { classPropertyName: "zShowModeToggle", publicName: "zShowModeToggle", isSignal: true, isRequired: false, transformFunction: null }, zShowSearch: { classPropertyName: "zShowSearch", publicName: "zShowSearch", isSignal: true, isRequired: false, transformFunction: null }, zServerSearch: { classPropertyName: "zServerSearch", publicName: "zServerSearch", isSignal: true, isRequired: false, transformFunction: null }, zSearchDebounce: { classPropertyName: "zSearchDebounce", publicName: "zSearchDebounce", isSignal: true, isRequired: false, transformFunction: null }, zSearchPlaceholder: { classPropertyName: "zSearchPlaceholder", publicName: "zSearchPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, zToggleSize: { classPropertyName: "zToggleSize", publicName: "zToggleSize", isSignal: true, isRequired: false, transformFunction: null }, zTitle: { classPropertyName: "zTitle", publicName: "zTitle", isSignal: true, isRequired: false, transformFunction: null }, zEmptyText: { classPropertyName: "zEmptyText", publicName: "zEmptyText", isSignal: true, isRequired: false, transformFunction: null }, zEmptyIcon: { classPropertyName: "zEmptyIcon", publicName: "zEmptyIcon", isSignal: true, isRequired: false, transformFunction: null }, zClass: { classPropertyName: "zClass", publicName: "zClass", isSignal: true, isRequired: false, transformFunction: null }, zSelectable: { classPropertyName: "zSelectable", publicName: "zSelectable", isSignal: true, isRequired: false, transformFunction: null }, zSelectedFiles: { classPropertyName: "zSelectedFiles", publicName: "zSelectedFiles", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { zMode: "zModeChange", zSelectedFiles: "zSelectedFilesChange", zOnDownload: "zOnDownload", zOnPreview: "zOnPreview", zOnRemove: "zOnRemove", zModeChange: "zModeChange", zSearchChange: "zSearchChange", zControl: "zControl", zSelectionChange: "zSelectionChange", zOnAction: "zOnAction" }, host: { classAttribute: "z-gallery block" }, exportAs: ["zGallery"], ngImport: i0, template: `
|
|
1834
1694
|
<div [class]="containerClasses()">
|
|
1835
1695
|
@if (showHeader()) {
|
|
1836
1696
|
<div class="mb-4 flex flex-wrap items-center justify-between gap-3">
|
|
@@ -1885,7 +1745,7 @@ class ZGalleryComponent {
|
|
|
1885
1745
|
<div class="border-border bg-card overflow-hidden rounded-md border shadow-sm">
|
|
1886
1746
|
<z-skeleton [zHeight]="skeletonMediaHeight()" zRadius="0" />
|
|
1887
1747
|
<div class="p-3">
|
|
1888
|
-
<z-skeleton zWidth="75%" zHeight="
|
|
1748
|
+
<z-skeleton zWidth="75%" zHeight="1.25rem" />
|
|
1889
1749
|
</div>
|
|
1890
1750
|
</div>
|
|
1891
1751
|
}
|
|
@@ -2013,6 +1873,7 @@ class ZGalleryComponent {
|
|
|
2013
1873
|
[file]="previewFile()!"
|
|
2014
1874
|
[files]="filteredFiles()"
|
|
2015
1875
|
[zShowRemove]="zShowRemove()"
|
|
1876
|
+
[zPdfViewerConfig]="zPdfViewerConfig()"
|
|
2016
1877
|
[zTrustedResourceOrigins]="zTrustedResourceOrigins()"
|
|
2017
1878
|
(zOnClose)="closePreview()"
|
|
2018
1879
|
(zOnDownload)="onDownload($event)"
|
|
@@ -2021,7 +1882,7 @@ class ZGalleryComponent {
|
|
|
2021
1882
|
/>
|
|
2022
1883
|
}
|
|
2023
1884
|
</div>
|
|
2024
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: ZGalleryItemComponent, selector: "z-gallery-item", inputs: ["file", "zMode", "zSize", "zShowDownload", "zShowPreview", "zShowRemove", "zSelectable", "zSelected"], outputs: ["zOnDownload", "zOnPreview", "zOnRemove", "zOnSelect"] }, { kind: "component", type: ZGalleryPreviewComponent, selector: "z-gallery-preview", inputs: ["file", "files", "zShowRemove", "zTrustedResourceOrigins"], outputs: ["zOnClose", "zOnDownload", "zOnNavigate", "zOnRemove"] }, { kind: "component", type: ZButtonGroupComponent, selector: "z-button-group", inputs: ["zClass", "zOrientation", "zActive"], outputs: ["zActiveChange"], exportAs: ["zButtonGroup"] }, { kind: "directive", type: ZButtonGroupItemDirective, selector: "[z-button-group-item]", exportAs: ["zButtonGroupItem"] }, { 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: "component", type: ZCheckboxComponent, selector: "z-checkbox", inputs: ["class", "zType", "zSize", "zLabel", "zText", "zDisabled", "zIndeterminate", "zValue", "zOptions", "zOrientation", "zCheckAll", "zCheckAllText", "zChecked", "zGroupValue"], outputs: ["zChange", "zGroupChange", "zOnBlur", "zOnFocus", "zControl", "zEvent", "zCheckedChange", "zGroupValueChange"] }, { kind: "component", type: ZIconComponent, selector: "z-icon, [z-icon]", inputs: ["class", "zType", "zAnimatedType", "zAnimate", "zAnimationTrigger", "zSize", "zStrokeWidth", "zSvg"] }, { kind: "component", type: ZEmptyComponent, selector: "z-empty", inputs: ["class", "zType", "zIcon", "zIconSize", "zSize", "zMessage", "zDescription"] }, { kind: "component", type: ZInputComponent, selector: "z-input", inputs: ["class", "zType", "zSize", "zAlign", "zLabel", "zLabelClass", "zPlaceholder", "zRequired", "zDisabled", "zReadonly", "zPrefix", "zSuffix", "zMin", "zMax", "zStep", "zShowArrows", "zMask", "zDecimalPlaces", "zAllowNegative", "zThousandSeparator", "zDecimalMarker", "zValidators", "zAsyncValidators", "zAsyncDebounce", "zAsyncValidateOn", "zShowPasswordToggle", "zSearch", "zDebounce", "zAutofocus", "zAutoComplete", "zAllowClear", "zAutoSizeContent", "zRows", "zResize", "zMaxLength", "zAutoSuggest", "zColorConfig"], outputs: ["zOnSearch", "zOnChange", "zOnBlur", "zOnFocus", "zOnKeydown", "zOnEnter", "zOnColorCollapse", "zControl", "zEvent"], exportAs: ["zInput"] }, { kind: "component", type: ZSkeletonComponent, selector: "z-skeleton", inputs: ["class", "zType", "zSize", "zWidth", "zHeight", "zRows", "zGap", "zAnimated", "zRadius"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1885
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: ZGalleryItemComponent, selector: "z-gallery-item", inputs: ["file", "zMode", "zSize", "zShowDownload", "zShowPreview", "zShowRemove", "zSelectable", "zSelected"], outputs: ["zOnDownload", "zOnPreview", "zOnRemove", "zOnSelect"] }, { kind: "component", type: ZGalleryPreviewComponent, selector: "z-gallery-preview", inputs: ["file", "files", "zShowRemove", "zPdfViewerConfig", "zTrustedResourceOrigins"], outputs: ["zOnClose", "zOnDownload", "zOnNavigate", "zOnRemove"] }, { kind: "component", type: ZButtonGroupComponent, selector: "z-button-group", inputs: ["zClass", "zOrientation", "zActive"], outputs: ["zActiveChange"], exportAs: ["zButtonGroup"] }, { kind: "directive", type: ZButtonGroupItemDirective, selector: "[z-button-group-item]", exportAs: ["zButtonGroupItem"] }, { 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: "component", type: ZCheckboxComponent, selector: "z-checkbox", inputs: ["class", "zType", "zSize", "zLabel", "zText", "zDisabled", "zIndeterminate", "zValue", "zOptions", "zOrientation", "zCheckAll", "zCheckAllText", "zChecked", "zGroupValue"], outputs: ["zChange", "zGroupChange", "zOnBlur", "zOnFocus", "zControl", "zEvent", "zCheckedChange", "zGroupValueChange"] }, { kind: "component", type: ZIconComponent, selector: "z-icon, [z-icon]", inputs: ["class", "zType", "zAnimatedType", "zAnimate", "zAnimationTrigger", "zSize", "zStrokeWidth", "zSvg"] }, { kind: "component", type: ZEmptyComponent, selector: "z-empty", inputs: ["class", "zType", "zIcon", "zIconSize", "zSize", "zMessage", "zDescription"] }, { kind: "component", type: ZInputComponent, selector: "z-input", inputs: ["class", "zType", "zSize", "zAlign", "zLabel", "zLabelClass", "zPlaceholder", "zRequired", "zDisabled", "zReadonly", "zPrefix", "zSuffix", "zMin", "zMax", "zStep", "zShowArrows", "zMask", "zDecimalPlaces", "zAllowNegative", "zThousandSeparator", "zDecimalMarker", "zValidators", "zAsyncValidators", "zAsyncDebounce", "zAsyncValidateOn", "zShowPasswordToggle", "zSearch", "zDebounce", "zAutofocus", "zAutoComplete", "zAllowClear", "zAutoSizeContent", "zRows", "zResize", "zMaxLength", "zAutoSuggest", "zColorConfig"], outputs: ["zOnSearch", "zOnChange", "zOnBlur", "zOnFocus", "zOnKeydown", "zOnEnter", "zOnColorCollapse", "zControl", "zEvent"], exportAs: ["zInput"] }, { kind: "component", type: ZSkeletonComponent, selector: "z-skeleton", inputs: ["class", "zType", "zSize", "zWidth", "zHeight", "zRows", "zGap", "zAnimated", "zRadius"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
2025
1886
|
}
|
|
2026
1887
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ZGalleryComponent, decorators: [{
|
|
2027
1888
|
type: Component,
|
|
@@ -2097,7 +1958,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImpor
|
|
|
2097
1958
|
<div class="border-border bg-card overflow-hidden rounded-md border shadow-sm">
|
|
2098
1959
|
<z-skeleton [zHeight]="skeletonMediaHeight()" zRadius="0" />
|
|
2099
1960
|
<div class="p-3">
|
|
2100
|
-
<z-skeleton zWidth="75%" zHeight="
|
|
1961
|
+
<z-skeleton zWidth="75%" zHeight="1.25rem" />
|
|
2101
1962
|
</div>
|
|
2102
1963
|
</div>
|
|
2103
1964
|
}
|
|
@@ -2225,6 +2086,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImpor
|
|
|
2225
2086
|
[file]="previewFile()!"
|
|
2226
2087
|
[files]="filteredFiles()"
|
|
2227
2088
|
[zShowRemove]="zShowRemove()"
|
|
2089
|
+
[zPdfViewerConfig]="zPdfViewerConfig()"
|
|
2228
2090
|
[zTrustedResourceOrigins]="zTrustedResourceOrigins()"
|
|
2229
2091
|
(zOnClose)="closePreview()"
|
|
2230
2092
|
(zOnDownload)="onDownload($event)"
|
|
@@ -2241,7 +2103,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImpor
|
|
|
2241
2103
|
},
|
|
2242
2104
|
exportAs: 'zGallery',
|
|
2243
2105
|
}]
|
|
2244
|
-
}], propDecorators: { zFiles: [{ type: i0.Input, args: [{ isSignal: true, alias: "zFiles", required: false }] }], zMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "zMode", required: false }] }, { type: i0.Output, args: ["zModeChange"] }], zSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "zSize", required: false }] }], zColumns: [{ type: i0.Input, args: [{ isSignal: true, alias: "zColumns", required: false }] }], zItemWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "zItemWidth", required: false }] }], zLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "zLoading", required: false }] }], zSkeletonRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "zSkeletonRows", required: false }] }], zSkeletonItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "zSkeletonItems", required: false }] }], zShowDownload: [{ type: i0.Input, args: [{ isSignal: true, alias: "zShowDownload", required: false }] }], zShowPreview: [{ type: i0.Input, args: [{ isSignal: true, alias: "zShowPreview", required: false }] }], zShowRemove: [{ type: i0.Input, args: [{ isSignal: true, alias: "zShowRemove", required: false }] }], zTrustedResourceOrigins: [{ type: i0.Input, args: [{ isSignal: true, alias: "zTrustedResourceOrigins", required: false }] }], zShowModeToggle: [{ type: i0.Input, args: [{ isSignal: true, alias: "zShowModeToggle", required: false }] }], zShowSearch: [{ type: i0.Input, args: [{ isSignal: true, alias: "zShowSearch", required: false }] }], zServerSearch: [{ type: i0.Input, args: [{ isSignal: true, alias: "zServerSearch", required: false }] }], zSearchDebounce: [{ type: i0.Input, args: [{ isSignal: true, alias: "zSearchDebounce", required: false }] }], zSearchPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "zSearchPlaceholder", required: false }] }], zToggleSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "zToggleSize", required: false }] }], zTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "zTitle", required: false }] }], zEmptyText: [{ type: i0.Input, args: [{ isSignal: true, alias: "zEmptyText", required: false }] }], zEmptyIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "zEmptyIcon", required: false }] }], zClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "zClass", required: false }] }], zSelectable: [{ type: i0.Input, args: [{ isSignal: true, alias: "zSelectable", required: false }] }], zSelectedFiles: [{ type: i0.Input, args: [{ isSignal: true, alias: "zSelectedFiles", required: false }] }, { type: i0.Output, args: ["zSelectedFilesChange"] }], zOnDownload: [{ type: i0.Output, args: ["zOnDownload"] }], zOnPreview: [{ type: i0.Output, args: ["zOnPreview"] }], zOnRemove: [{ type: i0.Output, args: ["zOnRemove"] }], zModeChange: [{ type: i0.Output, args: ["zModeChange"] }], zSearchChange: [{ type: i0.Output, args: ["zSearchChange"] }], zControl: [{ type: i0.Output, args: ["zControl"] }], zSelectionChange: [{ type: i0.Output, args: ["zSelectionChange"] }], zOnAction: [{ type: i0.Output, args: ["zOnAction"] }] } });
|
|
2106
|
+
}], propDecorators: { zFiles: [{ type: i0.Input, args: [{ isSignal: true, alias: "zFiles", required: false }] }], zMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "zMode", required: false }] }, { type: i0.Output, args: ["zModeChange"] }], zSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "zSize", required: false }] }], zColumns: [{ type: i0.Input, args: [{ isSignal: true, alias: "zColumns", required: false }] }], zItemWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "zItemWidth", required: false }] }], zLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "zLoading", required: false }] }], zSkeletonRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "zSkeletonRows", required: false }] }], zSkeletonItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "zSkeletonItems", required: false }] }], zShowDownload: [{ type: i0.Input, args: [{ isSignal: true, alias: "zShowDownload", required: false }] }], zShowPreview: [{ type: i0.Input, args: [{ isSignal: true, alias: "zShowPreview", required: false }] }], zShowRemove: [{ type: i0.Input, args: [{ isSignal: true, alias: "zShowRemove", required: false }] }], zPdfViewerConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "zPdfViewerConfig", required: false }] }], zTrustedResourceOrigins: [{ type: i0.Input, args: [{ isSignal: true, alias: "zTrustedResourceOrigins", required: false }] }], zShowModeToggle: [{ type: i0.Input, args: [{ isSignal: true, alias: "zShowModeToggle", required: false }] }], zShowSearch: [{ type: i0.Input, args: [{ isSignal: true, alias: "zShowSearch", required: false }] }], zServerSearch: [{ type: i0.Input, args: [{ isSignal: true, alias: "zServerSearch", required: false }] }], zSearchDebounce: [{ type: i0.Input, args: [{ isSignal: true, alias: "zSearchDebounce", required: false }] }], zSearchPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "zSearchPlaceholder", required: false }] }], zToggleSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "zToggleSize", required: false }] }], zTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "zTitle", required: false }] }], zEmptyText: [{ type: i0.Input, args: [{ isSignal: true, alias: "zEmptyText", required: false }] }], zEmptyIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "zEmptyIcon", required: false }] }], zClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "zClass", required: false }] }], zSelectable: [{ type: i0.Input, args: [{ isSignal: true, alias: "zSelectable", required: false }] }], zSelectedFiles: [{ type: i0.Input, args: [{ isSignal: true, alias: "zSelectedFiles", required: false }] }, { type: i0.Output, args: ["zSelectedFilesChange"] }], zOnDownload: [{ type: i0.Output, args: ["zOnDownload"] }], zOnPreview: [{ type: i0.Output, args: ["zOnPreview"] }], zOnRemove: [{ type: i0.Output, args: ["zOnRemove"] }], zModeChange: [{ type: i0.Output, args: ["zModeChange"] }], zSearchChange: [{ type: i0.Output, args: ["zSearchChange"] }], zControl: [{ type: i0.Output, args: ["zControl"] }], zSelectionChange: [{ type: i0.Output, args: ["zSelectionChange"] }], zOnAction: [{ type: i0.Output, args: ["zOnAction"] }] } });
|
|
2245
2107
|
|
|
2246
2108
|
class ZGalleryFileIconComponent {
|
|
2247
2109
|
file = input.required(...(ngDevMode ? [{ debugName: "file" }] : []));
|
|
@@ -2372,6 +2234,7 @@ class ZGalleryPreviewService {
|
|
|
2372
2234
|
componentRef.setInput('file', previewOptions.file);
|
|
2373
2235
|
componentRef.setInput('files', previewOptions.files);
|
|
2374
2236
|
componentRef.setInput('zShowRemove', previewOptions.zShowRemove ?? false);
|
|
2237
|
+
componentRef.setInput('zPdfViewerConfig', previewOptions.zPdfViewerConfig ?? {});
|
|
2375
2238
|
componentRef.setInput('zTrustedResourceOrigins', previewOptions.zTrustedResourceOrigins ?? []);
|
|
2376
2239
|
componentRef.instance.zOnClose.subscribe(() => {
|
|
2377
2240
|
previewOptions.zOnClose?.();
|
|
@@ -2435,9 +2298,71 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImpor
|
|
|
2435
2298
|
}]
|
|
2436
2299
|
}] });
|
|
2437
2300
|
|
|
2301
|
+
class ZGalleryPreviewItemDirective {
|
|
2302
|
+
zGalleryPreviewItem = input.required(...(ngDevMode ? [{ debugName: "zGalleryPreviewItem" }] : []));
|
|
2303
|
+
zGalleryPreviewFiles = input(null, ...(ngDevMode ? [{ debugName: "zGalleryPreviewFiles" }] : []));
|
|
2304
|
+
zGalleryPreviewOptions = input({}, ...(ngDevMode ? [{ debugName: "zGalleryPreviewOptions" }] : []));
|
|
2305
|
+
zDisabled = input(false, { ...(ngDevMode ? { debugName: "zDisabled" } : {}), transform: zTransform });
|
|
2306
|
+
zOnPreview = output();
|
|
2307
|
+
_elementRef = inject((ElementRef));
|
|
2308
|
+
_previewService = inject(ZGalleryPreviewService);
|
|
2309
|
+
hostRole = computed(() => (this._isNativeInteractive() ? null : 'button'), ...(ngDevMode ? [{ debugName: "hostRole" }] : []));
|
|
2310
|
+
hostTabIndex = computed(() => {
|
|
2311
|
+
if (this._isNativeInteractive()) {
|
|
2312
|
+
return null;
|
|
2313
|
+
}
|
|
2314
|
+
return this.zDisabled() ? -1 : 0;
|
|
2315
|
+
}, ...(ngDevMode ? [{ debugName: "hostTabIndex" }] : []));
|
|
2316
|
+
hostAriaDisabled = computed(() => (this.zDisabled() ? true : null), ...(ngDevMode ? [{ debugName: "hostAriaDisabled" }] : []));
|
|
2317
|
+
openPreview(event) {
|
|
2318
|
+
if (this.zDisabled()) {
|
|
2319
|
+
return;
|
|
2320
|
+
}
|
|
2321
|
+
if (event instanceof KeyboardEvent && this._isNativeInteractive()) {
|
|
2322
|
+
return;
|
|
2323
|
+
}
|
|
2324
|
+
const file = this.zGalleryPreviewItem();
|
|
2325
|
+
if (!isPreviewable(file)) {
|
|
2326
|
+
return;
|
|
2327
|
+
}
|
|
2328
|
+
if (event instanceof KeyboardEvent) {
|
|
2329
|
+
event.preventDefault();
|
|
2330
|
+
}
|
|
2331
|
+
this.zOnPreview.emit(file);
|
|
2332
|
+
this._previewService.open({
|
|
2333
|
+
...this.zGalleryPreviewOptions(),
|
|
2334
|
+
file,
|
|
2335
|
+
files: this.zGalleryPreviewFiles() ?? undefined,
|
|
2336
|
+
});
|
|
2337
|
+
}
|
|
2338
|
+
_isNativeInteractive() {
|
|
2339
|
+
const tagName = this._elementRef.nativeElement.tagName.toLowerCase();
|
|
2340
|
+
return tagName === 'button' || tagName === 'a';
|
|
2341
|
+
}
|
|
2342
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ZGalleryPreviewItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2343
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.9", type: ZGalleryPreviewItemDirective, isStandalone: true, selector: "[zGalleryPreviewItem], [z-gallery-preview-item]", inputs: { zGalleryPreviewItem: { classPropertyName: "zGalleryPreviewItem", publicName: "zGalleryPreviewItem", isSignal: true, isRequired: true, transformFunction: null }, zGalleryPreviewFiles: { classPropertyName: "zGalleryPreviewFiles", publicName: "zGalleryPreviewFiles", isSignal: true, isRequired: false, transformFunction: null }, zGalleryPreviewOptions: { classPropertyName: "zGalleryPreviewOptions", publicName: "zGalleryPreviewOptions", isSignal: true, isRequired: false, transformFunction: null }, zDisabled: { classPropertyName: "zDisabled", publicName: "zDisabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { zOnPreview: "zOnPreview" }, host: { listeners: { "click": "openPreview()", "keydown.enter": "openPreview($event)", "keydown.space": "openPreview($event)" }, properties: { "attr.role": "hostRole()", "attr.tabindex": "hostTabIndex()", "attr.aria-disabled": "hostAriaDisabled()" }, classAttribute: "z-gallery-preview-item" }, exportAs: ["zGalleryPreviewItem"], ngImport: i0 });
|
|
2344
|
+
}
|
|
2345
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ZGalleryPreviewItemDirective, decorators: [{
|
|
2346
|
+
type: Directive,
|
|
2347
|
+
args: [{
|
|
2348
|
+
selector: '[zGalleryPreviewItem], [z-gallery-preview-item]',
|
|
2349
|
+
standalone: true,
|
|
2350
|
+
host: {
|
|
2351
|
+
class: 'z-gallery-preview-item',
|
|
2352
|
+
'[attr.role]': 'hostRole()',
|
|
2353
|
+
'[attr.tabindex]': 'hostTabIndex()',
|
|
2354
|
+
'[attr.aria-disabled]': 'hostAriaDisabled()',
|
|
2355
|
+
'(click)': 'openPreview()',
|
|
2356
|
+
'(keydown.enter)': 'openPreview($event)',
|
|
2357
|
+
'(keydown.space)': 'openPreview($event)',
|
|
2358
|
+
},
|
|
2359
|
+
exportAs: 'zGalleryPreviewItem',
|
|
2360
|
+
}]
|
|
2361
|
+
}], propDecorators: { zGalleryPreviewItem: [{ type: i0.Input, args: [{ isSignal: true, alias: "zGalleryPreviewItem", required: true }] }], zGalleryPreviewFiles: [{ type: i0.Input, args: [{ isSignal: true, alias: "zGalleryPreviewFiles", required: false }] }], zGalleryPreviewOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "zGalleryPreviewOptions", required: false }] }], zDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "zDisabled", required: false }] }], zOnPreview: [{ type: i0.Output, args: ["zOnPreview"] }] } });
|
|
2362
|
+
|
|
2438
2363
|
/**
|
|
2439
2364
|
* Generated bundle index. Do not edit.
|
|
2440
2365
|
*/
|
|
2441
2366
|
|
|
2442
|
-
export { FILE_CATEGORY_STYLES, ZGalleryComponent, ZGalleryFileIconComponent, ZGalleryItemComponent, ZGalleryPreviewComponent, ZGalleryPreviewRef, ZGalleryPreviewService, formatFileSize, getFileCategory, isImage, isPreviewable, zGalleryFileIconVariants, zGalleryItemVariants, zGalleryVariants };
|
|
2367
|
+
export { FILE_CATEGORY_STYLES, ZGalleryComponent, ZGalleryFileIconComponent, ZGalleryItemComponent, ZGalleryPreviewComponent, ZGalleryPreviewItemDirective, ZGalleryPreviewRef, ZGalleryPreviewService, formatFileSize, getFileCategory, isImage, isPreviewable, zGalleryFileIconVariants, zGalleryItemVariants, zGalleryVariants };
|
|
2443
2368
|
//# sourceMappingURL=shival99-z-ui-components-z-gallery.mjs.map
|