@alfresco/aca-shared 4.5.0-9979013368 → 4.5.0-9992012107

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/esm2020/lib/components/document-base-page/document-base-page.component.mjs +2 -3
  2. package/esm2020/lib/models/types.mjs +1 -1
  3. package/esm2020/lib/services/app-settings.service.mjs +41 -1
  4. package/esm2020/lib/services/app.extension.service.mjs +2 -19
  5. package/esm2020/lib/services/app.service.mjs +17 -36
  6. package/esm2020/public-api.mjs +1 -2
  7. package/esm2020/store/actions/app-action-types.mjs +1 -2
  8. package/esm2020/store/actions/app.actions.mjs +1 -7
  9. package/esm2020/store/selectors/app.selectors.mjs +1 -7
  10. package/esm2020/store/states/app.state.mjs +34 -1
  11. package/fesm2015/alfresco-aca-shared-store.mjs +34 -14
  12. package/fesm2015/alfresco-aca-shared-store.mjs.map +1 -1
  13. package/fesm2015/alfresco-aca-shared.mjs +685 -679
  14. package/fesm2015/alfresco-aca-shared.mjs.map +1 -1
  15. package/fesm2020/alfresco-aca-shared-store.mjs +34 -14
  16. package/fesm2020/alfresco-aca-shared-store.mjs.map +1 -1
  17. package/fesm2020/alfresco-aca-shared.mjs +545 -568
  18. package/fesm2020/alfresco-aca-shared.mjs.map +1 -1
  19. package/lib/components/document-base-page/document-base-page.component.d.ts +0 -1
  20. package/lib/models/types.d.ts +0 -16
  21. package/lib/services/app-settings.service.d.ts +24 -0
  22. package/lib/services/app.extension.service.d.ts +2 -7
  23. package/lib/services/app.service.d.ts +6 -5
  24. package/package.json +1 -1
  25. package/public-api.d.ts +0 -1
  26. package/store/actions/app-action-types.d.ts +0 -1
  27. package/store/actions/app.actions.d.ts +0 -6
  28. package/store/selectors/app.selectors.d.ts +0 -6
  29. package/store/states/app.state.d.ts +4 -6
  30. package/esm2020/lib/models/modal-configuration.mjs +0 -25
  31. package/lib/models/modal-configuration.d.ts +0 -26
@@ -13,7 +13,7 @@ import { MatIconModule } from '@angular/material/icon';
13
13
  import { __awaiter } from 'tslib';
14
14
  import * as i3 from '@angular/router';
15
15
  import { ActivationEnd, NavigationStart, Router } from '@angular/router';
16
- import { CloseModalDialogsAction, SetCurrentUrlAction, ResetSelectionAction, SnackbarErrorAction, SetRepositoryInfoAction, SetUserProfileAction, SetInitialStateAction, getCustomCssPath, getCustomWebFontPath, STORE_INITIAL_APP_DATA, getRuleContext, infoDrawerPreview, SetInfoDrawerStateAction, ToggleInfoDrawerAction, getSharedUrl, isInfoDrawerOpened, getAppSelection, getCurrentFolder, SetSelectedNodesAction, ViewNodeAction, ReloadDocumentListAction, ContextMenu, isQuickShareEnabled } from '@alfresco/aca-shared/store';
16
+ import { CloseModalDialogsAction, SetCurrentUrlAction, ResetSelectionAction, SnackbarErrorAction, SetRepositoryInfoAction, SetUserProfileAction, getRuleContext, infoDrawerPreview, SetInfoDrawerStateAction, ToggleInfoDrawerAction, isInfoDrawerOpened, getAppSelection, getCurrentFolder, SetSelectedNodesAction, ViewNodeAction, ReloadDocumentListAction, ContextMenu, isQuickShareEnabled } from '@alfresco/aca-shared/store';
17
17
  import * as i1 from '@alfresco/adf-core';
18
18
  import { AppConfigService, IconComponent, IconModule, InfoDrawerModule, ShowHeaderMode, AlfrescoApiService, AlfrescoApiServiceMock, TranslationService, TranslationMock, TranslateLoaderService } from '@alfresco/adf-core';
19
19
  import * as i1$2 from '@ngrx/store';
@@ -791,9 +791,316 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
791
791
  }]
792
792
  }] });
793
793
 
794
+ /*!
795
+ * Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.
796
+ *
797
+ * Alfresco Example Content Application
798
+ *
799
+ * This file is part of the Alfresco Example Content Application.
800
+ * If the software was purchased under a paid Alfresco license, the terms of
801
+ * the paid license agreement will prevail. Otherwise, the software is
802
+ * provided under the following open source license terms:
803
+ *
804
+ * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
805
+ * it under the terms of the GNU Lesser General Public License as published by
806
+ * the Free Software Foundation, either version 3 of the License, or
807
+ * (at your option) any later version.
808
+ *
809
+ * The Alfresco Example Content Application is distributed in the hope that it will be useful,
810
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
811
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
812
+ * GNU Lesser General Public License for more details.
813
+ *
814
+ * You should have received a copy of the GNU Lesser General Public License
815
+ * from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
816
+ */
817
+ const DefaultMimeTypes = [
818
+ { value: 'video/3gpp', label: '3G Video' },
819
+ { value: 'video/3gpp2', label: '3G2 Video' },
820
+ { value: 'application/vnd.alfresco.ai.features.v1+json', label: 'AI-Features' },
821
+ { value: 'application/vnd.alfresco.ai.labels.v1+json', label: 'AI-Labels' },
822
+ { value: 'application/vnd.alfresco.ai.pii.entities.v1+json', label: 'AI-PII-Entities' },
823
+ { value: 'application/vnd.alfresco.ai.speech-to-text.v1+json', label: 'AI-SpeechToText' },
824
+ { value: 'application/vnd.alfresco.ai.textract.v1+json', label: 'AI-Textract' },
825
+ { value: 'audio/x-aiff', label: 'AIFF Audio' },
826
+ { value: 'application/vnd.adobe.air-application-installer-package+zip', label: 'Adobe AIR' },
827
+ { value: 'application/vnd.adobe.xdp+xml', label: 'Adobe Acrobat XML Data Package' },
828
+ { value: 'application/vnd.adobe.aftereffects.project', label: 'Adobe AfterEffects Project' },
829
+ { value: 'application/vnd.adobe.aftereffects.template', label: 'Adobe AfterEffects Template' },
830
+ { value: 'image/x-raw-adobe', label: 'Adobe Digital Negative Image' },
831
+ { value: 'application/x-zip', label: 'Adobe Flex Project File' },
832
+ { value: 'application/framemaker', label: 'Adobe FrameMaker' },
833
+ { value: 'application/illustrator', label: 'Adobe Illustrator File' },
834
+ { value: 'application/x-indesign', label: 'Adobe InDesign Document' },
835
+ { value: 'application/pdf', label: 'Adobe PDF Document' },
836
+ { value: 'application/pagemaker', label: 'Adobe PageMaker' },
837
+ { value: 'image/vnd.adobe.photoshop', label: 'Adobe Photoshop' },
838
+ { value: 'image/vnd.adobe.premiere', label: 'Adobe Premiere' },
839
+ { value: 'audio/vnd.adobe.soundbooth', label: 'Adobe SoundBooth' },
840
+ { value: 'application/acp', label: 'Alfresco Content Package' },
841
+ { value: 'application/vnd.android.package-archive', label: 'Android Package' },
842
+ { value: 'image/x-portable-anymap', label: 'Anymap Image' },
843
+ { value: 'image/icns', label: 'Apple Icon' },
844
+ { value: 'application/vnd.apple.keynote', label: 'Apple iWork Keynote' },
845
+ { value: 'application/vnd.apple.numbers', label: 'Apple iWork Numbers' },
846
+ { value: 'application/vnd.apple.pages', label: 'Apple iWork Pages' },
847
+ { value: 'image/vnd.dwg', label: 'AutoCAD Drawing' },
848
+ { value: 'image/x-dwt', label: 'AutoCAD Template' },
849
+ { value: 'audio/basic', label: 'Basic Audio' },
850
+ { value: 'application/x-dosexec', label: 'Binary File' },
851
+ { value: 'application/octet-stream', label: 'Binary File (Octet Stream)' },
852
+ { value: 'image/bmp', label: 'Bitmap Image' },
853
+ { value: 'image/cgm', label: 'CGM Image' },
854
+ { value: 'image/x-raw-canon', label: 'Canon RAW Image' },
855
+ { value: 'text/csv', label: 'Comma Separated Values (CSV)' },
856
+ { value: 'application/dita+xml', label: 'DITA' },
857
+ { value: 'message/rfc822', label: 'EMail' },
858
+ { value: 'application/eps', label: 'EPS Type PostScript' },
859
+ { value: 'audio/x-flac', label: 'FLAC Audio' },
860
+ { value: 'application/x-fla', label: 'Flash Source' },
861
+ { value: 'video/x-flv', label: 'Flash Video' },
862
+ { value: 'image/x-raw-fuji', label: 'Fuji RAW Image' },
863
+ { value: 'image/gif', label: 'GIF Image' },
864
+ { value: 'application/x-gzip', label: 'GZIP' },
865
+ { value: 'application/x-gtar', label: 'GZIP Tarball' },
866
+ { value: 'image/x-portable-graymap', label: 'Greymap Image' },
867
+ { value: 'text/html', label: 'HTML' },
868
+ { value: 'application/vnd.oasis.opendocument.text-web', label: 'HTML Document Template' },
869
+ { value: 'image/x-raw-hasselblad', label: 'Hasselblad RAW Image' },
870
+ { value: 'image/ief', label: 'IEF Image' },
871
+ { value: 'image/jp2', label: 'JPEG 2000 Image' },
872
+ { value: 'image/jpeg', label: 'JPEG Image' },
873
+ { value: 'application/json', label: 'JSON' },
874
+ { value: 'application/java-archive', label: 'Java Archive' },
875
+ { value: 'application/java', label: 'Java Class' },
876
+ { value: 'text/x-jsp', label: 'Java Server Page' },
877
+ { value: 'text/x-java-source', label: 'Java Source File' },
878
+ { value: 'application/x-javascript', label: 'JavaScript' },
879
+ { value: 'image/x-raw-kodak', label: 'Kodak RAW Image' },
880
+ { value: 'application/x-latex', label: 'LaTeX' },
881
+ { value: 'image/x-raw-leica', label: 'Leica RAW Image' },
882
+ { value: 'audio/mpeg', label: 'MPEG Audio' },
883
+ { value: 'video/mp2t', label: 'MPEG Transport Stream' },
884
+ { value: 'video/mpeg', label: 'MPEG Video' },
885
+ { value: 'video/mpeg2', label: 'MPEG2 Video' },
886
+ { value: 'audio/mp4', label: 'MPEG4 Audio' },
887
+ { value: 'video/mp4', label: 'MPEG4 Video' },
888
+ { value: 'video/x-m4v', label: 'MPEG4 Video (m4v)' },
889
+ { value: 'video/x-ms-asf', label: 'MS ASF Streaming Video' },
890
+ { value: 'video/x-msvideo', label: 'MS Video' },
891
+ { value: 'audio/x-ms-wma', label: 'MS WMA Streaming Audio' },
892
+ { value: 'video/x-ms-wmv', label: 'MS WMV Streaming Video' },
893
+ { value: 'application/x-troff-man', label: 'Man Page' },
894
+ { value: 'text/x-markdown', label: 'Markdown' },
895
+ { value: 'text/mediawiki', label: 'MediaWiki Markup' },
896
+ { value: 'application/vnd.ms-excel', label: 'Microsoft Excel' },
897
+ { value: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', label: 'Microsoft Excel 2007' },
898
+ { value: 'application/vnd.ms-excel.addin.macroenabled.12', label: 'Microsoft Excel 2007 add-in' },
899
+ { value: 'application/vnd.ms-excel.sheet.binary.macroenabled.12', label: 'Microsoft Excel 2007 binary workbook' },
900
+ { value: 'application/vnd.ms-excel.sheet.macroenabled.12', label: 'Microsoft Excel 2007 macro-enabled workbook' },
901
+ { value: 'application/vnd.ms-excel.template.macroenabled.12', label: 'Microsoft Excel 2007 macro-enabled workbook template' },
902
+ { value: 'application/vnd.openxmlformats-officedocument.spreadsheetml.template', label: 'Microsoft Excel template 2007' },
903
+ { value: 'application/vnd.ms-outlook', label: 'Microsoft Outlook Message' },
904
+ { value: 'application/vnd.ms-powerpoint', label: 'Microsoft PowerPoint' },
905
+ { value: 'application/vnd.openxmlformats-officedocument.presentationml.presentation', label: 'Microsoft PowerPoint 2007' },
906
+ { value: 'application/vnd.ms-powerpoint.addin.macroenabled.12', label: 'Microsoft PowerPoint 2007 add-in' },
907
+ { value: 'application/vnd.ms-powerpoint.presentation.macroenabled.12', label: 'Microsoft PowerPoint 2007 macro-enabled presentation' },
908
+ { value: 'application/vnd.ms-powerpoint.template.macroenabled.12', label: 'Microsoft PowerPoint 2007 macro-enabled presentation template' },
909
+ { value: 'application/vnd.ms-powerpoint.slide.macroenabled.12', label: 'Microsoft PowerPoint 2007 macro-enabled slide' },
910
+ { value: 'application/vnd.ms-powerpoint.slideshow.macroenabled.12', label: 'Microsoft PowerPoint 2007 macro-enabled slide show' },
911
+ { value: 'application/vnd.openxmlformats-officedocument.presentationml.slide', label: 'Microsoft PowerPoint 2007 slide' },
912
+ { value: 'application/vnd.openxmlformats-officedocument.presentationml.slideshow', label: 'Microsoft PowerPoint 2007 slide show' },
913
+ { value: 'application/vnd.openxmlformats-officedocument.presentationml.template', label: 'Microsoft PowerPoint 2007 template' },
914
+ { value: 'application/vnd.ms-project', label: 'Microsoft Project' },
915
+ { value: 'application/vnd.visio', label: 'Microsoft Visio' },
916
+ { value: 'application/vnd.visio2013', label: 'Microsoft Visio 2013' },
917
+ { value: 'application/vnd.ms-visio.drawing.macroenabled.main+xml', label: 'Microsoft Visio macro-enabled drawing' },
918
+ { value: 'application/vnd.ms-visio.stencil.macroenabled.main+xml', label: 'Microsoft Visio macro-enabled stencil' },
919
+ { value: 'application/vnd.ms-visio.template.macroenabled.main+xml', label: 'Microsoft Visio macro-enabled template' },
920
+ { value: 'application/vnd.ms-visio.stencil.main+xml', label: 'Microsoft Visio stencil' },
921
+ { value: 'application/vnd.ms-visio.template.main+xml', label: 'Microsoft Visio template' },
922
+ { value: 'application/msword', label: 'Microsoft Word' },
923
+ { value: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', label: 'Microsoft Word 2007' },
924
+ { value: 'application/vnd.ms-word.document.macroenabled.12', label: 'Microsoft Word 2007 macro-enabled document' },
925
+ { value: 'application/vnd.ms-word.template.macroenabled.12', label: 'Microsoft Word 2007 macro-enabled document template' },
926
+ { value: 'application/vnd.openxmlformats-officedocument.wordprocessingml.template', label: 'Microsoft Word 2007 template' },
927
+ { value: 'image/x-raw-minolta', label: 'Minolta RAW Image' },
928
+ { value: 'image/x-raw-nikon', label: 'Nikon RAW Image' },
929
+ { value: 'audio/ogg', label: 'Ogg Audio' },
930
+ { value: 'application/ogg', label: 'Ogg Multiplex' },
931
+ { value: 'video/ogg', label: 'Ogg Video' },
932
+ { value: 'audio/vorbis', label: 'Ogg Vorbis Audio' },
933
+ { value: 'image/x-raw-olympus', label: 'Olympus RAW Image' },
934
+ { value: 'application/vnd.oasis.opendocument.chart', label: 'OpenDocument Chart' },
935
+ { value: 'application/vnd.oasis.opendocument.database', label: 'OpenDocument Database' },
936
+ { value: 'application/vnd.oasis.opendocument.graphics', label: 'OpenDocument Drawing' },
937
+ { value: 'application/vnd.oasis.opendocument.graphics-template', label: 'OpenDocument Drawing Template' },
938
+ { value: 'application/vnd.oasis.opendocument.formula', label: 'OpenDocument Formula' },
939
+ { value: 'application/vnd.oasis.opendocument.image', label: 'OpenDocument Image' },
940
+ { value: 'application/vnd.oasis.opendocument.text-master', label: 'OpenDocument Master Document' },
941
+ { value: 'application/vnd.oasis.opendocument.presentation', label: 'OpenDocument Presentation' },
942
+ { value: 'application/vnd.oasis.opendocument.presentation-template', label: 'OpenDocument Presentation Template' },
943
+ { value: 'application/vnd.oasis.opendocument.spreadsheet', label: 'OpenDocument Spreadsheet' },
944
+ { value: 'application/vnd.oasis.opendocument.spreadsheet-template', label: 'OpenDocument Spreadsheet Template' },
945
+ { value: 'application/vnd.oasis.opendocument.text', label: 'OpenDocument Text (OpenOffice 2.0)' },
946
+ { value: 'application/vnd.oasis.opendocument.text-template', label: 'OpenDocument Text Template' },
947
+ { value: 'application/vnd.sun.xml.calc', label: 'OpenOffice 1.0/StarOffice6.0 Calc 6.0' },
948
+ { value: 'application/vnd.sun.xml.calc.template', label: 'OpenOffice 1.0/StarOffice6.0 Calc 6.0 Template' },
949
+ { value: 'application/vnd.sun.xml.draw', label: 'OpenOffice 1.0/StarOffice6.0 Draw 6.0' },
950
+ { value: 'application/vnd.sun.xml.impress', label: 'OpenOffice 1.0/StarOffice6.0 Impress 6.0' },
951
+ { value: 'application/vnd.sun.xml.impress.template', label: 'OpenOffice 1.0/StarOffice6.0 Impress 6.0 Template' },
952
+ { value: 'application/vnd.sun.xml.writer', label: 'OpenOffice 1.0/StarOffice6.0 Writer 6.0' },
953
+ { value: 'application/vnd.sun.xml.writer.template', label: 'OpenOffice 1.0/StarOffice6.0 Writer 6.0 Template' },
954
+ { value: 'image/png', label: 'PNG Image' },
955
+ { value: 'image/x-raw-panasonic', label: 'Panasonic RAW Image' },
956
+ { value: 'image/x-raw-pentax', label: 'Pentax RAW Image' },
957
+ { value: 'image/x-portable-pixmap', label: 'Pixmap Image' },
958
+ { value: 'text/plain', label: 'Plain Text' },
959
+ { value: 'image/x-portable-bitmap', label: 'Portable Bitmap' },
960
+ { value: 'application/postscript', label: 'PostScript' },
961
+ { value: 'application/remote-printing', label: 'Printer Text File' },
962
+ { value: 'video/quicktime', label: 'Quicktime Video' },
963
+ { value: 'video/x-rad-screenplay', label: 'RAD Screen Display' },
964
+ { value: 'application/x-rar-compressed', label: 'RAR Archive' },
965
+ { value: 'image/x-raw-red', label: 'RED RAW Image' },
966
+ { value: 'image/x-rgb', label: 'RGB Image' },
967
+ { value: 'application/rss+xml', label: 'RSS' },
968
+ { value: 'image/x-cmu-raster', label: 'Raster Image' },
969
+ { value: 'text/richtext', label: 'Rich Text' },
970
+ { value: 'application/rtf', label: 'Rich Text Format' },
971
+ { value: 'video/x-sgi-movie', label: 'SGI Video' },
972
+ { value: 'text/sgml', label: 'SGML (Human Readable)' },
973
+ { value: 'application/sgml', label: 'SGML (Machine Readable)' },
974
+ { value: 'image/svg+xml', label: 'Scalable Vector Graphics Image' },
975
+ { value: 'application/x-sh', label: 'Shell Script' },
976
+ { value: 'application/x-shockwave-flash', label: 'Shockwave Flash' },
977
+ { value: 'image/x-raw-sigma', label: 'Sigma RAW Image' },
978
+ { value: 'image/x-raw-sony', label: 'Sony RAW Image' },
979
+ { value: 'application/vnd.stardivision.chart', label: 'StarChart 5.x' },
980
+ { value: 'application/vnd.stardivision.calc', label: 'StarCalc 5.x' },
981
+ { value: 'application/vnd.stardivision.draw', label: 'StarDraw 5.x' },
982
+ { value: 'application/vnd.stardivision.impress', label: 'StarImpress 5.x' },
983
+ { value: 'application/vnd.stardivision.impress-packed', label: 'StarImpress Packed 5.x' },
984
+ { value: 'application/vnd.stardivision.math', label: 'StarMath 5.x' },
985
+ { value: 'application/vnd.stardivision.writer', label: 'StarWriter 5.x' },
986
+ { value: 'application/vnd.stardivision.writer-global', label: 'StarWriter 5.x global' },
987
+ { value: 'text/css', label: 'Style Sheet' },
988
+ { value: 'image/tiff', label: 'TIFF Image' },
989
+ { value: 'text/tab-separated-values', label: 'Tab Separated Values' },
990
+ { value: 'application/x-tar', label: 'Tarball' },
991
+ { value: 'application/x-tex', label: 'Tex' },
992
+ { value: 'application/x-texinfo', label: 'Tex Info' },
993
+ { value: 'x-world/x-vrml', label: 'VRML' },
994
+ { value: 'audio/x-wav', label: 'WAV Audio' },
995
+ { value: 'video/webm', label: 'WebM Video' },
996
+ { value: 'application/wordperfect', label: 'WordPerfect' },
997
+ { value: 'image/x-xbitmap', label: 'XBitmap Image' },
998
+ { value: 'application/xhtml+xml', label: 'XHTML' },
999
+ { value: 'text/xml', label: 'XML' },
1000
+ { value: 'image/x-xpixmap', label: 'XPixmap Image' },
1001
+ { value: 'image/x-xwindowdump', label: 'XWindow Dump' },
1002
+ { value: 'application/x-compress', label: 'Z Compress' },
1003
+ { value: 'application/zip', label: 'ZIP' },
1004
+ { value: 'text/calendar', label: 'iCalendar File' }
1005
+ ];
1006
+
1007
+ /*!
1008
+ * Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.
1009
+ *
1010
+ * Alfresco Example Content Application
1011
+ *
1012
+ * This file is part of the Alfresco Example Content Application.
1013
+ * If the software was purchased under a paid Alfresco license, the terms of
1014
+ * the paid license agreement will prevail. Otherwise, the software is
1015
+ * provided under the following open source license terms:
1016
+ *
1017
+ * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
1018
+ * it under the terms of the GNU Lesser General Public License as published by
1019
+ * the Free Software Foundation, either version 3 of the License, or
1020
+ * (at your option) any later version.
1021
+ *
1022
+ * The Alfresco Example Content Application is distributed in the hope that it will be useful,
1023
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1024
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1025
+ * GNU Lesser General Public License for more details.
1026
+ *
1027
+ * You should have received a copy of the GNU Lesser General Public License
1028
+ * from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
1029
+ */
1030
+ class AppSettingsService {
1031
+ constructor() {
1032
+ this.appConfig = inject(AppConfigService);
1033
+ }
1034
+ /**
1035
+ * Get the AOS (Alfresco Office Services) host URL from the app settings.
1036
+ */
1037
+ get aosHost() {
1038
+ return this.appConfig.get('aosHost');
1039
+ }
1040
+ /**
1041
+ * Get the default landing page from the app settings.
1042
+ * Default value: `/personal-files`.
1043
+ */
1044
+ get landingPage() {
1045
+ return this.appConfig.get('landingPage', '/personal-files');
1046
+ }
1047
+ /**
1048
+ * Get the list of mime types from the app settings.
1049
+ */
1050
+ get mimeTypes() {
1051
+ return this.appConfig.get('mimeTypes', DefaultMimeTypes);
1052
+ }
1053
+ /**
1054
+ * Get the application name from the app settings.
1055
+ */
1056
+ get appName() {
1057
+ return this.appConfig.get('application.name', 'Alfresco Content Application');
1058
+ }
1059
+ /**
1060
+ * Get the application version from the app settings.
1061
+ */
1062
+ get appVersion() {
1063
+ return this.appConfig.get('application.version', '1.0.0');
1064
+ }
1065
+ /**
1066
+ * Get the application logo URL from the app settings.
1067
+ */
1068
+ get appLogoUrl() {
1069
+ return this.appConfig.get('application.logo', 'assets/images/app-logo.svg');
1070
+ }
1071
+ /**
1072
+ * Get the custom CSS stylesheet path from the app settings.
1073
+ */
1074
+ get customCssPath() {
1075
+ return this.appConfig.get('customCssPath', '');
1076
+ }
1077
+ /**
1078
+ * Get the custom web font path from the app settings.
1079
+ */
1080
+ get webFontPath() {
1081
+ return this.appConfig.get('webFontPath', '');
1082
+ }
1083
+ /**
1084
+ * Get the base share URL from the app settings.
1085
+ */
1086
+ get baseShareUrl() {
1087
+ let result = this.appConfig.get('baseShareUrl', '');
1088
+ if (!result.endsWith('/')) {
1089
+ result += '/';
1090
+ }
1091
+ return result;
1092
+ }
1093
+ }
1094
+ AppSettingsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: AppSettingsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1095
+ AppSettingsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: AppSettingsService, providedIn: 'root' });
1096
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: AppSettingsService, decorators: [{
1097
+ type: Injectable,
1098
+ args: [{ providedIn: 'root' }]
1099
+ }] });
1100
+
794
1101
  // After moving shell to ADF to core, AppService will implement ShellAppService
795
1102
  class AppService {
796
- constructor(preferencesService, authenticationService, store, router, activatedRoute, config, pageTitle, alfrescoApiService, uploadService, routerExtensionService, contentApi, sharedLinksApiService, groupService, overlayContainer, initialAppState, searchQueryBuilderService, acaMobileAppSwitcherService) {
1103
+ constructor(preferencesService, authenticationService, store, router, activatedRoute, config, pageTitle, alfrescoApiService, uploadService, routerExtensionService, contentApi, sharedLinksApiService, groupService, overlayContainer, searchQueryBuilderService, acaMobileAppSwitcherService, appSettingsService) {
797
1104
  this.preferencesService = preferencesService;
798
1105
  this.authenticationService = authenticationService;
799
1106
  this.store = store;
@@ -808,8 +1115,8 @@ class AppService {
808
1115
  this.sharedLinksApiService = sharedLinksApiService;
809
1116
  this.groupService = groupService;
810
1117
  this.overlayContainer = overlayContainer;
811
- this.initialAppState = initialAppState;
812
1118
  this.acaMobileAppSwitcherService = acaMobileAppSwitcherService;
1119
+ this.appSettingsService = appSettingsService;
813
1120
  this.appNavNarMode$ = new BehaviorSubject('expanded');
814
1121
  this.toggleAppNavBar$ = new Subject();
815
1122
  this.hideSidenavConditions = ['/preview/'];
@@ -855,7 +1162,6 @@ class AppService {
855
1162
  }
856
1163
  }
857
1164
  });
858
- this.loadAppSettings();
859
1165
  this.loadCustomCss();
860
1166
  this.loadCustomWebFont();
861
1167
  const { router } = this;
@@ -907,14 +1213,6 @@ class AppService {
907
1213
  });
908
1214
  });
909
1215
  }
910
- loadAppSettings() {
911
- let baseShareUrl = this.config.get('baseShareUrl', '');
912
- if (!baseShareUrl.endsWith('/')) {
913
- baseShareUrl += '/';
914
- }
915
- const state = Object.assign(Object.assign({}, this.initialAppState), { appName: this.config.get('application.name'), logoPath: this.config.get('application.logo'), customCssPath: this.config.get('customCssPath'), webFontPath: this.config.get('webFontPath'), sharedUrl: baseShareUrl });
916
- this.store.dispatch(new SetInitialStateAction(state));
917
- }
918
1216
  onFileUploadedError(error) {
919
1217
  var _a, _b, _c, _d, _e;
920
1218
  let message = 'APP.MESSAGES.UPLOAD.ERROR.GENERIC';
@@ -936,18 +1234,16 @@ class AppService {
936
1234
  this.store.dispatch(new SnackbarErrorAction(message));
937
1235
  }
938
1236
  loadCustomCss() {
939
- this.store.select(getCustomCssPath).subscribe((cssPath) => {
940
- if (cssPath) {
941
- this.createLink(cssPath);
942
- }
943
- });
1237
+ const customCssPath = this.appSettingsService.customCssPath;
1238
+ if (customCssPath) {
1239
+ this.createLink(customCssPath);
1240
+ }
944
1241
  }
945
1242
  loadCustomWebFont() {
946
- this.store.select(getCustomWebFontPath).subscribe((fontUrl) => {
947
- if (fontUrl) {
948
- this.createLink(fontUrl);
949
- }
950
- });
1243
+ const webFontPath = this.appSettingsService.webFontPath;
1244
+ if (webFontPath) {
1245
+ this.createLink(webFontPath);
1246
+ }
951
1247
  }
952
1248
  createLink(url) {
953
1249
  const cssLinkElement = document.createElement('link');
@@ -966,19 +1262,14 @@ class AppService {
966
1262
  }
967
1263
  }
968
1264
  }
969
- AppService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: AppService, deps: [{ token: i1.UserPreferencesService }, { token: i1.AuthenticationService }, { token: i1$2.Store }, { token: i3.Router }, { token: i3.ActivatedRoute }, { token: i1.AppConfigService }, { token: i1.PageTitleService }, { token: i1.AlfrescoApiService }, { token: i4$1.UploadService }, { token: RouterExtensionService }, { token: ContentApiService }, { token: i4$1.SharedLinksApiService }, { token: i4$1.GroupService }, { token: i7.OverlayContainer }, { token: STORE_INITIAL_APP_DATA }, { token: i4$1.SearchQueryBuilderService }, { token: AcaMobileAppSwitcherService }], target: i0.ɵɵFactoryTarget.Injectable });
1265
+ AppService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: AppService, deps: [{ token: i1.UserPreferencesService }, { token: i1.AuthenticationService }, { token: i1$2.Store }, { token: i3.Router }, { token: i3.ActivatedRoute }, { token: i1.AppConfigService }, { token: i1.PageTitleService }, { token: i1.AlfrescoApiService }, { token: i4$1.UploadService }, { token: RouterExtensionService }, { token: ContentApiService }, { token: i4$1.SharedLinksApiService }, { token: i4$1.GroupService }, { token: i7.OverlayContainer }, { token: i4$1.SearchQueryBuilderService }, { token: AcaMobileAppSwitcherService }, { token: AppSettingsService }], target: i0.ɵɵFactoryTarget.Injectable });
970
1266
  AppService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: AppService, providedIn: 'root' });
971
1267
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: AppService, decorators: [{
972
1268
  type: Injectable,
973
1269
  args: [{
974
1270
  providedIn: 'root'
975
1271
  }]
976
- }], ctorParameters: function () {
977
- return [{ type: i1.UserPreferencesService }, { type: i1.AuthenticationService }, { type: i1$2.Store }, { type: i3.Router }, { type: i3.ActivatedRoute }, { type: i1.AppConfigService }, { type: i1.PageTitleService }, { type: i1.AlfrescoApiService }, { type: i4$1.UploadService }, { type: RouterExtensionService }, { type: ContentApiService }, { type: i4$1.SharedLinksApiService }, { type: i4$1.GroupService }, { type: i7.OverlayContainer }, { type: undefined, decorators: [{
978
- type: Inject,
979
- args: [STORE_INITIAL_APP_DATA]
980
- }] }, { type: i4$1.SearchQueryBuilderService }, { type: AcaMobileAppSwitcherService }];
981
- } });
1272
+ }], ctorParameters: function () { return [{ type: i1.UserPreferencesService }, { type: i1.AuthenticationService }, { type: i1$2.Store }, { type: i3.Router }, { type: i3.ActivatedRoute }, { type: i1.AppConfigService }, { type: i1.PageTitleService }, { type: i1.AlfrescoApiService }, { type: i4$1.UploadService }, { type: RouterExtensionService }, { type: ContentApiService }, { type: i4$1.SharedLinksApiService }, { type: i4$1.GroupService }, { type: i7.OverlayContainer }, { type: i4$1.SearchQueryBuilderService }, { type: AcaMobileAppSwitcherService }, { type: AppSettingsService }]; } });
982
1273
 
983
1274
  /*!
984
1275
  * Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.
@@ -1250,7 +1541,6 @@ class AppExtensionService {
1250
1541
  this.navbar = [];
1251
1542
  this.sidebarTabs = [];
1252
1543
  this.viewerRules = {};
1253
- this.settingGroups = [];
1254
1544
  this._headerActions = new BehaviorSubject([]);
1255
1545
  this._toolbarActions = new BehaviorSubject([]);
1256
1546
  this._viewerToolbarActions = new BehaviorSubject([]);
@@ -1258,7 +1548,6 @@ class AppExtensionService {
1258
1548
  this._contextMenuActions = new BehaviorSubject([]);
1259
1549
  this._openWithActions = new BehaviorSubject([]);
1260
1550
  this._createActions = new BehaviorSubject([]);
1261
- this._mainActions = new BehaviorSubject(null);
1262
1551
  this._sidebarActions = new BehaviorSubject([]);
1263
1552
  this._badges = new BehaviorSubject([]);
1264
1553
  this._filesDocumentListPreset = new BehaviorSubject([]);
@@ -1297,7 +1586,6 @@ class AppExtensionService {
1297
1586
  this.logger.error('Extension configuration not found');
1298
1587
  return;
1299
1588
  }
1300
- this.settingGroups = this.loader.getElements(config, 'settings');
1301
1589
  this._headerActions.next(this.loader.getContentActions(config, 'features.header'));
1302
1590
  this._sidebarActions.next(this.loader.getContentActions(config, 'features.sidebar.toolbar'));
1303
1591
  this._toolbarActions.next(this.loader.getContentActions(config, 'features.toolbar'));
@@ -1306,7 +1594,6 @@ class AppExtensionService {
1306
1594
  this._contextMenuActions.next(this.loader.getContentActions(config, 'features.contextMenu'));
1307
1595
  this._openWithActions.next(this.loader.getContentActions(config, 'features.viewer.openWith'));
1308
1596
  this._createActions.next(this.loader.getElements(config, 'features.create'));
1309
- this._mainActions.next(this.loader.getFeatures(config).mainAction);
1310
1597
  this._badges.next(this.loader.getElements(config, 'features.badges'));
1311
1598
  this._filesDocumentListPreset.next(this.getDocumentListPreset(config, 'files'));
1312
1599
  this._customMetadataPanels.next(this.loader.getElements(config, 'features.customMetadataPanels'));
@@ -1445,9 +1732,6 @@ class AppExtensionService {
1445
1732
  return object;
1446
1733
  }
1447
1734
  }
1448
- getNavigationGroups() {
1449
- return this.navbar;
1450
- }
1451
1735
  getSidebarTabs() {
1452
1736
  return this.sidebarTabs.filter((action) => this.filterVisible(action));
1453
1737
  }
@@ -1469,13 +1753,6 @@ class AppExtensionService {
1469
1753
  .map((action) => this.buildMenu(action))
1470
1754
  .map((action) => this.setActionDisabledFromRule(action))));
1471
1755
  }
1472
- getMainAction() {
1473
- return this._mainActions.pipe(filter((mainAction) => mainAction && this.filterVisible(mainAction)), map((mainAction) => {
1474
- let actionCopy = this.copyAction(mainAction);
1475
- actionCopy = this.setActionDisabledFromRule(actionCopy);
1476
- return actionCopy;
1477
- }));
1478
- }
1479
1756
  getBadges(node) {
1480
1757
  return this._badges.pipe(map((badges) => badges.filter((badge) => this.evaluateRule(badge.rules.visible, node))));
1481
1758
  }
@@ -1554,9 +1831,6 @@ class AppExtensionService {
1554
1831
  getAllowedContextMenuActions() {
1555
1832
  return this._contextMenuActions.pipe(map((contextMenuActions) => (!this.selection.isEmpty ? this.getAllowedActions(contextMenuActions) : [])));
1556
1833
  }
1557
- getSettingsGroups() {
1558
- return this.settingGroups.filter((group) => this.filterVisible(group));
1559
- }
1560
1834
  copyAction(action) {
1561
1835
  return Object.assign(Object.assign({}, action), { children: (action.children || []).map((child) => this.copyAction(child)) });
1562
1836
  }
@@ -1834,235 +2108,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
1834
2108
  type: ViewChild,
1835
2109
  args: [MatMenu]
1836
2110
  }], toolbarMenuItems: [{
1837
- type: ViewChildren,
1838
- args: [ToolbarMenuItemComponent]
1839
- }], data: [{
1840
- type: Input
1841
- }], handleKeydownEscape: [{
1842
- type: HostListener,
1843
- args: ['document:keydown.Escape']
1844
- }] } });
1845
-
1846
- /*!
1847
- * Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.
1848
- *
1849
- * Alfresco Example Content Application
1850
- *
1851
- * This file is part of the Alfresco Example Content Application.
1852
- * If the software was purchased under a paid Alfresco license, the terms of
1853
- * the paid license agreement will prevail. Otherwise, the software is
1854
- * provided under the following open source license terms:
1855
- *
1856
- * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
1857
- * it under the terms of the GNU Lesser General Public License as published by
1858
- * the Free Software Foundation, either version 3 of the License, or
1859
- * (at your option) any later version.
1860
- *
1861
- * The Alfresco Example Content Application is distributed in the hope that it will be useful,
1862
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
1863
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1864
- * GNU Lesser General Public License for more details.
1865
- *
1866
- * You should have received a copy of the GNU Lesser General Public License
1867
- * from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
1868
- */
1869
- class ToolbarActionComponent {
1870
- constructor(cd) {
1871
- this.cd = cd;
1872
- this.type = ToolbarButtonType.ICON_BUTTON;
1873
- }
1874
- // todo: review after ADF 2.6
1875
- // preview component : change detection workaround for children without input
1876
- ngDoCheck() {
1877
- if (this.actionRef.id.includes('app.viewer')) {
1878
- this.cd.markForCheck();
1879
- }
1880
- }
1881
- }
1882
- ToolbarActionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: ToolbarActionComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
1883
- ToolbarActionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.3", type: ToolbarActionComponent, isStandalone: true, selector: "aca-toolbar-action", inputs: { data: "data", type: "type", color: "color", actionRef: "actionRef" }, host: { classAttribute: "aca-toolbar-action" }, ngImport: i0, template: "<ng-container [ngSwitch]=\"actionRef.type\">\n <ng-container *ngSwitchCase=\"'default'\">\n <app-toolbar-button [type]=\"type\" [actionRef]=\"actionRef\" [color]=\"color\"> </app-toolbar-button>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'button'\">\n <app-toolbar-button [type]=\"data?.buttonType || type\" [actionRef]=\"actionRef\" [color]=\"color\" [data]=\"actionRef.data\"> </app-toolbar-button>\n </ng-container>\n\n <div *ngSwitchCase=\"'separator'\" [id]=\"actionRef.id\" class=\"aca-toolbar-divider\"></div>\n\n <ng-container *ngSwitchCase=\"'menu'\">\n <app-toolbar-menu [actionRef]=\"actionRef\" [color]=\"color\" [data]=\"actionRef.data\"></app-toolbar-menu>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'custom'\">\n <adf-dynamic-component [data]=\"actionRef.data\" [id]=\"actionRef.component\"></adf-dynamic-component>\n </ng-container>\n</ng-container>\n", styles: [".aca-toolbar-action{margin:0 5px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: ToolbarButtonComponent, selector: "app-toolbar-button", inputs: ["data", "type", "color", "actionRef"] }, { kind: "component", type: ToolbarMenuComponent, selector: "app-toolbar-menu", inputs: ["actionRef", "color", "data"] }, { kind: "component", type: DynamicExtensionComponent, selector: "adf-dynamic-component", inputs: ["id", "data"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1884
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: ToolbarActionComponent, decorators: [{
1885
- type: Component,
1886
- args: [{ standalone: true, imports: [CommonModule, ToolbarButtonComponent, ToolbarMenuComponent, DynamicExtensionComponent], selector: 'aca-toolbar-action', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'aca-toolbar-action' }, template: "<ng-container [ngSwitch]=\"actionRef.type\">\n <ng-container *ngSwitchCase=\"'default'\">\n <app-toolbar-button [type]=\"type\" [actionRef]=\"actionRef\" [color]=\"color\"> </app-toolbar-button>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'button'\">\n <app-toolbar-button [type]=\"data?.buttonType || type\" [actionRef]=\"actionRef\" [color]=\"color\" [data]=\"actionRef.data\"> </app-toolbar-button>\n </ng-container>\n\n <div *ngSwitchCase=\"'separator'\" [id]=\"actionRef.id\" class=\"aca-toolbar-divider\"></div>\n\n <ng-container *ngSwitchCase=\"'menu'\">\n <app-toolbar-menu [actionRef]=\"actionRef\" [color]=\"color\" [data]=\"actionRef.data\"></app-toolbar-menu>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'custom'\">\n <adf-dynamic-component [data]=\"actionRef.data\" [id]=\"actionRef.component\"></adf-dynamic-component>\n </ng-container>\n</ng-container>\n", styles: [".aca-toolbar-action{margin:0 5px}\n"] }]
1887
- }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { data: [{
1888
- type: Input
1889
- }], type: [{
1890
- type: Input
1891
- }], color: [{
1892
- type: Input
1893
- }], actionRef: [{
1894
- type: Input
1895
- }] } });
1896
-
1897
- /*!
1898
- * Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.
1899
- *
1900
- * Alfresco Example Content Application
1901
- *
1902
- * This file is part of the Alfresco Example Content Application.
1903
- * If the software was purchased under a paid Alfresco license, the terms of
1904
- * the paid license agreement will prevail. Otherwise, the software is
1905
- * provided under the following open source license terms:
1906
- *
1907
- * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
1908
- * it under the terms of the GNU Lesser General Public License as published by
1909
- * the Free Software Foundation, either version 3 of the License, or
1910
- * (at your option) any later version.
1911
- *
1912
- * The Alfresco Example Content Application is distributed in the hope that it will be useful,
1913
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
1914
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1915
- * GNU Lesser General Public License for more details.
1916
- *
1917
- * You should have received a copy of the GNU Lesser General Public License
1918
- * from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
1919
- */
1920
- class ToolbarComponent {
1921
- trackByActionId(_, action) {
1922
- return action.id;
1923
- }
1924
- }
1925
- ToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: ToolbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1926
- ToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.3", type: ToolbarComponent, isStandalone: true, selector: "aca-toolbar", inputs: { items: "items" }, ngImport: i0, template: "<mat-toolbar class=\"aca-toolbar\">\n <ng-container *ngFor=\"let item of items; trackBy: trackByActionId\">\n <aca-toolbar-action [actionRef]=\"item\"></aca-toolbar-action>\n </ng-container>\n</mat-toolbar>\n", styles: ["aca-toolbar .aca-toolbar{min-height:48px;color:var(--adf-theme-foreground-text-color-054);background-color:inherit;border:none;padding:0}aca-toolbar .aca-toolbar-divider{height:24px;width:1px;background:var(--adf-theme-foreground-text-color-025);margin-left:5px;margin-right:5px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: ToolbarActionComponent, selector: "aca-toolbar-action", inputs: ["data", "type", "color", "actionRef"] }, { kind: "ngmodule", type: MatToolbarModule }, { kind: "component", type: i2$1.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }], encapsulation: i0.ViewEncapsulation.None });
1927
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: ToolbarComponent, decorators: [{
1928
- type: Component,
1929
- args: [{ selector: 'aca-toolbar', standalone: true, imports: [CommonModule, ToolbarActionComponent, MatToolbarModule], encapsulation: ViewEncapsulation.None, template: "<mat-toolbar class=\"aca-toolbar\">\n <ng-container *ngFor=\"let item of items; trackBy: trackByActionId\">\n <aca-toolbar-action [actionRef]=\"item\"></aca-toolbar-action>\n </ng-container>\n</mat-toolbar>\n", styles: ["aca-toolbar .aca-toolbar{min-height:48px;color:var(--adf-theme-foreground-text-color-054);background-color:inherit;border:none;padding:0}aca-toolbar .aca-toolbar-divider{height:24px;width:1px;background:var(--adf-theme-foreground-text-color-025);margin-left:5px;margin-right:5px}\n"] }]
1930
- }], propDecorators: { items: [{
1931
- type: Input
1932
- }] } });
1933
-
1934
- /*!
1935
- * Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.
1936
- *
1937
- * Alfresco Example Content Application
1938
- *
1939
- * This file is part of the Alfresco Example Content Application.
1940
- * If the software was purchased under a paid Alfresco license, the terms of
1941
- * the paid license agreement will prevail. Otherwise, the software is
1942
- * provided under the following open source license terms:
1943
- *
1944
- * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
1945
- * it under the terms of the GNU Lesser General Public License as published by
1946
- * the Free Software Foundation, either version 3 of the License, or
1947
- * (at your option) any later version.
1948
- *
1949
- * The Alfresco Example Content Application is distributed in the hope that it will be useful,
1950
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
1951
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1952
- * GNU Lesser General Public License for more details.
1953
- *
1954
- * You should have received a copy of the GNU Lesser General Public License
1955
- * from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
1956
- */
1957
- class InfoDrawerComponent {
1958
- constructor(store, contentApi, extensions, nodesService, contentService) {
1959
- this.store = store;
1960
- this.contentApi = contentApi;
1961
- this.extensions = extensions;
1962
- this.nodesService = nodesService;
1963
- this.contentService = contentService;
1964
- this.isLoading = false;
1965
- this.tabs = [];
1966
- this.actions = [];
1967
- this.onDestroy$ = new Subject();
1968
- this.preventFromClosing = false;
1969
- this.icon = null;
1970
- }
1971
- onEscapeKeyboardEvent() {
1972
- this.close();
1973
- }
1974
- ngOnInit() {
1975
- this.tabs = this.extensions.getSidebarTabs();
1976
- this.extensions
1977
- .getAllowedSidebarActions()
1978
- .pipe(takeUntil(this.onDestroy$))
1979
- .subscribe((actions) => {
1980
- this.actions = actions;
1981
- });
1982
- this.store
1983
- .select(infoDrawerPreview)
1984
- .pipe(takeUntil(this.onDestroy$))
1985
- .subscribe((isInfoDrawerPreviewOpened) => {
1986
- this.preventFromClosing = isInfoDrawerPreviewOpened;
1987
- });
1988
- this.nodesService.nodeUpdated.pipe(takeUntil(this.onDestroy$)).subscribe((node) => {
1989
- this.node.entry = node;
1990
- });
1991
- }
1992
- ngOnDestroy() {
1993
- this.onDestroy$.next(true);
1994
- this.onDestroy$.complete();
1995
- if (!this.preventFromClosing) {
1996
- this.store.dispatch(new SetInfoDrawerStateAction(false));
1997
- }
1998
- }
1999
- ngOnChanges() {
2000
- if (this.node) {
2001
- if (this.node['isLibrary']) {
2002
- return this.setDisplayNode(this.node);
2003
- }
2004
- const entry = this.node.entry;
2005
- const id = entry.nodeId || entry.id;
2006
- return this.loadNodeInfo(id);
2007
- }
2008
- }
2009
- close() {
2010
- this.store.dispatch(new ToggleInfoDrawerAction());
2011
- }
2012
- loadNodeInfo(nodeId) {
2013
- if (nodeId) {
2014
- this.isLoading = true;
2015
- this.contentApi.getNodeInfo(nodeId).subscribe((entity) => {
2016
- this.setDisplayNode(entity);
2017
- this.node.entry = entity;
2018
- this.isLoading = false;
2019
- }, () => (this.isLoading = false));
2020
- }
2021
- }
2022
- setDisplayNode(node) {
2023
- this.displayNode = node;
2024
- this.icon = this.contentService.getNodeIcon(node);
2025
- }
2026
- }
2027
- InfoDrawerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: InfoDrawerComponent, deps: [{ token: i1$2.Store }, { token: ContentApiService }, { token: AppExtensionService }, { token: i4$1.NodesApiService }, { token: i4$1.ContentService }], target: i0.ɵɵFactoryTarget.Component });
2028
- InfoDrawerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.3", type: InfoDrawerComponent, isStandalone: true, selector: "aca-info-drawer", inputs: { nodeId: "nodeId", node: "node" }, host: { listeners: { "keydown.escape": "onEscapeKeyboardEvent()" } }, usesOnChanges: true, ngImport: i0, template: "<div *ngIf=\"isLoading\">\n <mat-progress-bar mode=\"indeterminate\" [attr.aria-label]=\"'APP.INFO_DRAWER.DATA_LOADING' | translate\"></mat-progress-bar>\n</div>\n<ng-container *ngIf=\"!isLoading && !!displayNode\">\n <adf-info-drawer [icon]=\"icon\" [title]=\"node?.entry?.name || 'APP.INFO_DRAWER.TITLE'\" cdkTrapFocusAutoCapture>\n <aca-toolbar [items]=\"actions\" info-drawer-buttons></aca-toolbar>\n\n <adf-info-drawer-tab *ngFor=\"let tab of tabs\" [icon]=\"tab.icon\" [label]=\"tab.title\">\n <adf-dynamic-tab [node]=\"$any(displayNode)\" [id]=\"tab.component\" [attr.data-automation-id]=\"tab.component\"> </adf-dynamic-tab>\n </adf-info-drawer-tab>\n </adf-info-drawer>\n</ng-container>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3$2.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: MatProgressBarModule }, { kind: "component", type: i7$1.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "ngmodule", type: InfoDrawerModule }, { kind: "component", type: i1.InfoDrawerTabComponent, selector: "adf-info-drawer-tab", inputs: ["label", "icon"] }, { kind: "component", type: i1.InfoDrawerComponent, selector: "adf-info-drawer", inputs: ["title", "icon", "selectedIndex", "showHeader"], outputs: ["currentTab"] }, { kind: "directive", type: i1.InfoDrawerButtonsDirective, selector: "[adf-info-drawer-buttons], [info-drawer-buttons]" }, { kind: "ngmodule", type: A11yModule }, { kind: "component", type: ToolbarComponent, selector: "aca-toolbar", inputs: ["items"] }, { kind: "component", type: DynamicTabComponent, selector: "adf-dynamic-tab", inputs: ["id", "node"] }], encapsulation: i0.ViewEncapsulation.None });
2029
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: InfoDrawerComponent, decorators: [{
2030
- type: Component,
2031
- args: [{ standalone: true, imports: [CommonModule, TranslateModule, MatProgressBarModule, InfoDrawerModule, A11yModule, ToolbarComponent, DynamicTabComponent], selector: 'aca-info-drawer', encapsulation: ViewEncapsulation.None, template: "<div *ngIf=\"isLoading\">\n <mat-progress-bar mode=\"indeterminate\" [attr.aria-label]=\"'APP.INFO_DRAWER.DATA_LOADING' | translate\"></mat-progress-bar>\n</div>\n<ng-container *ngIf=\"!isLoading && !!displayNode\">\n <adf-info-drawer [icon]=\"icon\" [title]=\"node?.entry?.name || 'APP.INFO_DRAWER.TITLE'\" cdkTrapFocusAutoCapture>\n <aca-toolbar [items]=\"actions\" info-drawer-buttons></aca-toolbar>\n\n <adf-info-drawer-tab *ngFor=\"let tab of tabs\" [icon]=\"tab.icon\" [label]=\"tab.title\">\n <adf-dynamic-tab [node]=\"$any(displayNode)\" [id]=\"tab.component\" [attr.data-automation-id]=\"tab.component\"> </adf-dynamic-tab>\n </adf-info-drawer-tab>\n </adf-info-drawer>\n</ng-container>\n" }]
2032
- }], ctorParameters: function () { return [{ type: i1$2.Store }, { type: ContentApiService }, { type: AppExtensionService }, { type: i4$1.NodesApiService }, { type: i4$1.ContentService }]; }, propDecorators: { nodeId: [{
2033
- type: Input
2034
- }], node: [{
2035
- type: Input
2036
- }], onEscapeKeyboardEvent: [{
2037
- type: HostListener,
2038
- args: ['keydown.escape']
2039
- }] } });
2040
-
2041
- /*!
2042
- * Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.
2043
- *
2044
- * Alfresco Example Content Application
2045
- *
2046
- * This file is part of the Alfresco Example Content Application.
2047
- * If the software was purchased under a paid Alfresco license, the terms of
2048
- * the paid license agreement will prevail. Otherwise, the software is
2049
- * provided under the following open source license terms:
2050
- *
2051
- * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
2052
- * it under the terms of the GNU Lesser General Public License as published by
2053
- * the Free Software Foundation, either version 3 of the License, or
2054
- * (at your option) any later version.
2055
- *
2056
- * The Alfresco Example Content Application is distributed in the hope that it will be useful,
2057
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
2058
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2059
- * GNU Lesser General Public License for more details.
2060
- *
2061
- * You should have received a copy of the GNU Lesser General Public License
2062
- * from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
2063
- */
2064
- class DocumentBasePageService {
2065
- }
2111
+ type: ViewChildren,
2112
+ args: [ToolbarMenuItemComponent]
2113
+ }], data: [{
2114
+ type: Input
2115
+ }], handleKeydownEscape: [{
2116
+ type: HostListener,
2117
+ args: ['document:keydown.Escape']
2118
+ }] } });
2066
2119
 
2067
2120
  /*!
2068
2121
  * Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.
@@ -2087,25 +2140,33 @@ class DocumentBasePageService {
2087
2140
  * You should have received a copy of the GNU Lesser General Public License
2088
2141
  * from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
2089
2142
  */
2090
- function isLocked(node) {
2091
- var _a, _b;
2092
- if (node === null || node === void 0 ? void 0 : node.entry) {
2093
- const { entry } = node;
2094
- return entry.isLocked || ((_a = entry.properties) === null || _a === void 0 ? void 0 : _a['cm:lockType']) === 'READ_ONLY_LOCK' || ((_b = entry.properties) === null || _b === void 0 ? void 0 : _b['cm:lockType']) === 'WRITE_LOCK';
2095
- }
2096
- else {
2097
- return false;
2098
- }
2099
- }
2100
- function isLibrary(node) {
2101
- if (node === null || node === void 0 ? void 0 : node.entry) {
2102
- const { entry } = node;
2103
- return !!(entry.guid && entry.id && entry.preset && entry.title && entry.visibility) || entry.nodeType === 'st:site';
2143
+ class ToolbarActionComponent {
2144
+ constructor(cd) {
2145
+ this.cd = cd;
2146
+ this.type = ToolbarButtonType.ICON_BUTTON;
2104
2147
  }
2105
- else {
2106
- return false;
2148
+ // todo: review after ADF 2.6
2149
+ // preview component : change detection workaround for children without input
2150
+ ngDoCheck() {
2151
+ if (this.actionRef.id.includes('app.viewer')) {
2152
+ this.cd.markForCheck();
2153
+ }
2107
2154
  }
2108
2155
  }
2156
+ ToolbarActionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: ToolbarActionComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
2157
+ ToolbarActionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.3", type: ToolbarActionComponent, isStandalone: true, selector: "aca-toolbar-action", inputs: { data: "data", type: "type", color: "color", actionRef: "actionRef" }, host: { classAttribute: "aca-toolbar-action" }, ngImport: i0, template: "<ng-container [ngSwitch]=\"actionRef.type\">\n <ng-container *ngSwitchCase=\"'default'\">\n <app-toolbar-button [type]=\"type\" [actionRef]=\"actionRef\" [color]=\"color\"> </app-toolbar-button>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'button'\">\n <app-toolbar-button [type]=\"data?.buttonType || type\" [actionRef]=\"actionRef\" [color]=\"color\" [data]=\"actionRef.data\"> </app-toolbar-button>\n </ng-container>\n\n <div *ngSwitchCase=\"'separator'\" [id]=\"actionRef.id\" class=\"aca-toolbar-divider\"></div>\n\n <ng-container *ngSwitchCase=\"'menu'\">\n <app-toolbar-menu [actionRef]=\"actionRef\" [color]=\"color\" [data]=\"actionRef.data\"></app-toolbar-menu>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'custom'\">\n <adf-dynamic-component [data]=\"actionRef.data\" [id]=\"actionRef.component\"></adf-dynamic-component>\n </ng-container>\n</ng-container>\n", styles: [".aca-toolbar-action{margin:0 5px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: ToolbarButtonComponent, selector: "app-toolbar-button", inputs: ["data", "type", "color", "actionRef"] }, { kind: "component", type: ToolbarMenuComponent, selector: "app-toolbar-menu", inputs: ["actionRef", "color", "data"] }, { kind: "component", type: DynamicExtensionComponent, selector: "adf-dynamic-component", inputs: ["id", "data"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
2158
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: ToolbarActionComponent, decorators: [{
2159
+ type: Component,
2160
+ args: [{ standalone: true, imports: [CommonModule, ToolbarButtonComponent, ToolbarMenuComponent, DynamicExtensionComponent], selector: 'aca-toolbar-action', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'aca-toolbar-action' }, template: "<ng-container [ngSwitch]=\"actionRef.type\">\n <ng-container *ngSwitchCase=\"'default'\">\n <app-toolbar-button [type]=\"type\" [actionRef]=\"actionRef\" [color]=\"color\"> </app-toolbar-button>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'button'\">\n <app-toolbar-button [type]=\"data?.buttonType || type\" [actionRef]=\"actionRef\" [color]=\"color\" [data]=\"actionRef.data\"> </app-toolbar-button>\n </ng-container>\n\n <div *ngSwitchCase=\"'separator'\" [id]=\"actionRef.id\" class=\"aca-toolbar-divider\"></div>\n\n <ng-container *ngSwitchCase=\"'menu'\">\n <app-toolbar-menu [actionRef]=\"actionRef\" [color]=\"color\" [data]=\"actionRef.data\"></app-toolbar-menu>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'custom'\">\n <adf-dynamic-component [data]=\"actionRef.data\" [id]=\"actionRef.component\"></adf-dynamic-component>\n </ng-container>\n</ng-container>\n", styles: [".aca-toolbar-action{margin:0 5px}\n"] }]
2161
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { data: [{
2162
+ type: Input
2163
+ }], type: [{
2164
+ type: Input
2165
+ }], color: [{
2166
+ type: Input
2167
+ }], actionRef: [{
2168
+ type: Input
2169
+ }] } });
2109
2170
 
2110
2171
  /*!
2111
2172
  * Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.
@@ -2130,30 +2191,19 @@ function isLibrary(node) {
2130
2191
  * You should have received a copy of the GNU Lesser General Public License
2131
2192
  * from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
2132
2193
  */
2133
- const BYTES_TO_MB_CONVERSION_VALUE = 1048576;
2134
- class AcaFileAutoDownloadService {
2135
- constructor(dialog, appConfig) {
2136
- this.dialog = dialog;
2137
- this.appConfig = appConfig;
2138
- }
2139
- shouldFileAutoDownload(fileSizeInBytes) {
2140
- const sizeInMB = fileSizeInBytes / BYTES_TO_MB_CONVERSION_VALUE;
2141
- const fileAutoDownloadFlag = this.appConfig.get('viewer.enableFileAutoDownload', true);
2142
- const sizeThreshold = this.appConfig.get('viewer.fileAutoDownloadSizeThresholdInMB', 15);
2143
- return fileAutoDownloadFlag && sizeInMB && sizeInMB > sizeThreshold;
2144
- }
2145
- autoDownloadFile(node) {
2146
- this.dialog.open(FileAutoDownloadComponent, { disableClose: true, data: node });
2194
+ class ToolbarComponent {
2195
+ trackByActionId(_, action) {
2196
+ return action.id;
2147
2197
  }
2148
2198
  }
2149
- AcaFileAutoDownloadService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: AcaFileAutoDownloadService, deps: [{ token: i1$1.MatDialog }, { token: i1.AppConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
2150
- AcaFileAutoDownloadService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: AcaFileAutoDownloadService, providedIn: 'root' });
2151
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: AcaFileAutoDownloadService, decorators: [{
2152
- type: Injectable,
2153
- args: [{
2154
- providedIn: 'root'
2155
- }]
2156
- }], ctorParameters: function () { return [{ type: i1$1.MatDialog }, { type: i1.AppConfigService }]; } });
2199
+ ToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: ToolbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2200
+ ToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.3", type: ToolbarComponent, isStandalone: true, selector: "aca-toolbar", inputs: { items: "items" }, ngImport: i0, template: "<mat-toolbar class=\"aca-toolbar\">\n <ng-container *ngFor=\"let item of items; trackBy: trackByActionId\">\n <aca-toolbar-action [actionRef]=\"item\"></aca-toolbar-action>\n </ng-container>\n</mat-toolbar>\n", styles: ["aca-toolbar .aca-toolbar{min-height:48px;color:var(--adf-theme-foreground-text-color-054);background-color:inherit;border:none;padding:0}aca-toolbar .aca-toolbar-divider{height:24px;width:1px;background:var(--adf-theme-foreground-text-color-025);margin-left:5px;margin-right:5px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: ToolbarActionComponent, selector: "aca-toolbar-action", inputs: ["data", "type", "color", "actionRef"] }, { kind: "ngmodule", type: MatToolbarModule }, { kind: "component", type: i2$1.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }], encapsulation: i0.ViewEncapsulation.None });
2201
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: ToolbarComponent, decorators: [{
2202
+ type: Component,
2203
+ args: [{ selector: 'aca-toolbar', standalone: true, imports: [CommonModule, ToolbarActionComponent, MatToolbarModule], encapsulation: ViewEncapsulation.None, template: "<mat-toolbar class=\"aca-toolbar\">\n <ng-container *ngFor=\"let item of items; trackBy: trackByActionId\">\n <aca-toolbar-action [actionRef]=\"item\"></aca-toolbar-action>\n </ng-container>\n</mat-toolbar>\n", styles: ["aca-toolbar .aca-toolbar{min-height:48px;color:var(--adf-theme-foreground-text-color-054);background-color:inherit;border:none;padding:0}aca-toolbar .aca-toolbar-divider{height:24px;width:1px;background:var(--adf-theme-foreground-text-color-025);margin-left:5px;margin-right:5px}\n"] }]
2204
+ }], propDecorators: { items: [{
2205
+ type: Input
2206
+ }] } });
2157
2207
 
2158
2208
  /*!
2159
2209
  * Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.
@@ -2178,155 +2228,88 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
2178
2228
  * You should have received a copy of the GNU Lesser General Public License
2179
2229
  * from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
2180
2230
  */
2181
- /* eslint-disable @angular-eslint/directive-class-suffix */
2182
- class PageComponent {
2183
- constructor() {
2184
- this.onDestroy$ = new Subject();
2185
- this.title = 'Page';
2231
+ class InfoDrawerComponent {
2232
+ constructor(store, contentApi, extensions, nodesService, contentService) {
2233
+ this.store = store;
2234
+ this.contentApi = contentApi;
2235
+ this.extensions = extensions;
2236
+ this.nodesService = nodesService;
2237
+ this.contentService = contentService;
2238
+ this.isLoading = false;
2239
+ this.tabs = [];
2186
2240
  this.actions = [];
2187
- this.viewerToolbarActions = [];
2188
- this.canUpdateNode = false;
2189
- this.canUpload = false;
2190
- this.showHeader = ShowHeaderMode.Data;
2191
- this.filterSorting = 'name-asc';
2192
- this.createActions = [];
2193
- this.isSmallScreen = false;
2194
- this.extensions = inject(AppExtensionService);
2195
- this.content = inject(DocumentBasePageService);
2196
- this.store = inject((Store));
2197
- this.breakpointObserver = inject(BreakpointObserver);
2198
- this.uploadService = inject(UploadService);
2199
- this.router = inject(Router);
2200
- this.fileAutoDownloadService = inject(AcaFileAutoDownloadService, { optional: true });
2201
- this.subscriptions = [];
2241
+ this.onDestroy$ = new Subject();
2242
+ this.preventFromClosing = false;
2243
+ this.icon = null;
2244
+ }
2245
+ onEscapeKeyboardEvent() {
2246
+ this.close();
2202
2247
  }
2203
2248
  ngOnInit() {
2249
+ this.tabs = this.extensions.getSidebarTabs();
2204
2250
  this.extensions
2205
- .getCreateActions()
2206
- .pipe(takeUntil(this.onDestroy$))
2207
- .subscribe((actions) => {
2208
- this.createActions = actions;
2209
- });
2210
- this.sharedPreviewUrl$ = this.store.select(getSharedUrl);
2211
- this.infoDrawerOpened$ = this.store.select(isInfoDrawerOpened);
2212
- this.store
2213
- .select(getAppSelection)
2214
- .pipe(takeUntil(this.onDestroy$))
2215
- .subscribe((selection) => {
2216
- this.selection = selection;
2217
- this.canUpdateNode = this.selection.count === 1 && this.content.canUpdateNode(selection.first);
2218
- });
2219
- this.extensions
2220
- .getAllowedToolbarActions()
2251
+ .getAllowedSidebarActions()
2221
2252
  .pipe(takeUntil(this.onDestroy$))
2222
2253
  .subscribe((actions) => {
2223
2254
  this.actions = actions;
2224
2255
  });
2225
- this.extensions
2226
- .getViewerToolbarActions()
2227
- .pipe(takeUntil(this.onDestroy$))
2228
- .subscribe((actions) => {
2229
- this.viewerToolbarActions = actions;
2230
- });
2231
2256
  this.store
2232
- .select(getCurrentFolder)
2257
+ .select(infoDrawerPreview)
2233
2258
  .pipe(takeUntil(this.onDestroy$))
2234
- .subscribe((node) => {
2235
- this.canUpload = node && this.content.canUploadContent(node);
2259
+ .subscribe((isInfoDrawerPreviewOpened) => {
2260
+ this.preventFromClosing = isInfoDrawerPreviewOpened;
2236
2261
  });
2237
- this.breakpointObserver
2238
- .observe([Breakpoints.HandsetPortrait, Breakpoints.HandsetLandscape])
2239
- .pipe(takeUntil(this.onDestroy$))
2240
- .subscribe((result) => {
2241
- this.isSmallScreen = result.matches;
2262
+ this.nodesService.nodeUpdated.pipe(takeUntil(this.onDestroy$)).subscribe((node) => {
2263
+ this.node.entry = node;
2242
2264
  });
2243
2265
  }
2244
- ngOnChanges(changes) {
2245
- var _a;
2246
- if ((_a = changes.nodeResult) === null || _a === void 0 ? void 0 : _a.currentValue) {
2247
- this.nodeResult = changes.nodeResult.currentValue;
2248
- }
2249
- }
2250
2266
  ngOnDestroy() {
2251
- this.subscriptions.forEach((subscription) => subscription.unsubscribe());
2252
- this.subscriptions = [];
2253
2267
  this.onDestroy$.next(true);
2254
2268
  this.onDestroy$.complete();
2255
- this.store.dispatch(new SetSelectedNodesAction([]));
2256
- }
2257
- showPreview(node, extras) {
2258
- var _a, _b, _c;
2259
- if (node === null || node === void 0 ? void 0 : node.entry) {
2260
- if ((_a = this.fileAutoDownloadService) === null || _a === void 0 ? void 0 : _a.shouldFileAutoDownload((_c = (_b = node.entry) === null || _b === void 0 ? void 0 : _b.content) === null || _c === void 0 ? void 0 : _c.sizeInBytes)) {
2261
- this.fileAutoDownloadService.autoDownloadFile(node);
2262
- }
2263
- else {
2264
- let id;
2265
- if (node.entry.nodeType === 'app:filelink') {
2266
- id = node.entry.properties['cm:destination'];
2267
- }
2268
- else {
2269
- id = node.entry.nodeId || node.entry.guid || node.entry.id;
2270
- }
2271
- this.store.dispatch(new ViewNodeAction(id, extras));
2272
- }
2269
+ if (!this.preventFromClosing) {
2270
+ this.store.dispatch(new SetInfoDrawerStateAction(false));
2273
2271
  }
2274
2272
  }
2275
- getParentNodeId() {
2276
- return this.node ? this.node.id : null;
2277
- }
2278
- imageResolver(row) {
2279
- if (row) {
2280
- if (isLocked(row.node)) {
2281
- return 'assets/images/baseline-lock-24px.svg';
2282
- }
2283
- if (isLibrary(row.node)) {
2284
- return 'assets/images/baseline-library_books-24px.svg';
2273
+ ngOnChanges() {
2274
+ if (this.node) {
2275
+ if (this.node['isLibrary']) {
2276
+ return this.setDisplayNode(this.node);
2285
2277
  }
2278
+ const entry = this.node.entry;
2279
+ const id = entry.nodeId || entry.id;
2280
+ return this.loadNodeInfo(id);
2286
2281
  }
2287
- return null;
2288
- }
2289
- reload(selectedNode) {
2290
- if (this.isOutletPreviewUrl()) {
2291
- return;
2292
- }
2293
- this.store.dispatch(new ReloadDocumentListAction());
2294
- if (selectedNode) {
2295
- this.store.dispatch(new SetSelectedNodesAction([selectedNode]));
2296
- }
2297
- }
2298
- trackByActionId(_, action) {
2299
- return action.id;
2300
- }
2301
- trackById(_, obj) {
2302
- return obj.id;
2303
- }
2304
- trackByColumnId(_, obj) {
2305
- return obj.id;
2306
2282
  }
2307
- isOutletPreviewUrl() {
2308
- return location.href.includes('viewer:view');
2309
- }
2310
- onSortingChanged(event) {
2311
- this.filterSorting = event.detail.key + '-' + event.detail.direction;
2283
+ close() {
2284
+ this.store.dispatch(new ToggleInfoDrawerAction());
2312
2285
  }
2313
- onAllFilterCleared() {
2314
- if (!this.isOutletPreviewUrl()) {
2315
- this.documentList.node = null;
2316
- this.store.dispatch(new ReloadDocumentListAction());
2286
+ loadNodeInfo(nodeId) {
2287
+ if (nodeId) {
2288
+ this.isLoading = true;
2289
+ this.contentApi.getNodeInfo(nodeId).subscribe((entity) => {
2290
+ this.setDisplayNode(entity);
2291
+ this.node.entry = entity;
2292
+ this.isLoading = false;
2293
+ }, () => (this.isLoading = false));
2317
2294
  }
2318
2295
  }
2296
+ setDisplayNode(node) {
2297
+ this.displayNode = node;
2298
+ this.icon = this.contentService.getNodeIcon(node);
2299
+ }
2319
2300
  }
2320
- PageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: PageComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
2321
- PageComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.3", type: PageComponent, host: { listeners: { "sorting-changed": "onSortingChanged($event)" } }, viewQueries: [{ propertyName: "documentList", first: true, predicate: DocumentListComponent, descendants: true }], usesOnChanges: true, ngImport: i0 });
2322
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: PageComponent, decorators: [{
2323
- type: Directive
2324
- }], propDecorators: { documentList: [{
2325
- type: ViewChild,
2326
- args: [DocumentListComponent]
2327
- }], onSortingChanged: [{
2301
+ InfoDrawerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: InfoDrawerComponent, deps: [{ token: i1$2.Store }, { token: ContentApiService }, { token: AppExtensionService }, { token: i4$1.NodesApiService }, { token: i4$1.ContentService }], target: i0.ɵɵFactoryTarget.Component });
2302
+ InfoDrawerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.3", type: InfoDrawerComponent, isStandalone: true, selector: "aca-info-drawer", inputs: { nodeId: "nodeId", node: "node" }, host: { listeners: { "keydown.escape": "onEscapeKeyboardEvent()" } }, usesOnChanges: true, ngImport: i0, template: "<div *ngIf=\"isLoading\">\n <mat-progress-bar mode=\"indeterminate\" [attr.aria-label]=\"'APP.INFO_DRAWER.DATA_LOADING' | translate\"></mat-progress-bar>\n</div>\n<ng-container *ngIf=\"!isLoading && !!displayNode\">\n <adf-info-drawer [icon]=\"icon\" [title]=\"node?.entry?.name || 'APP.INFO_DRAWER.TITLE'\" cdkTrapFocusAutoCapture>\n <aca-toolbar [items]=\"actions\" info-drawer-buttons></aca-toolbar>\n\n <adf-info-drawer-tab *ngFor=\"let tab of tabs\" [icon]=\"tab.icon\" [label]=\"tab.title\">\n <adf-dynamic-tab [node]=\"$any(displayNode)\" [id]=\"tab.component\" [attr.data-automation-id]=\"tab.component\"> </adf-dynamic-tab>\n </adf-info-drawer-tab>\n </adf-info-drawer>\n</ng-container>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3$2.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: MatProgressBarModule }, { kind: "component", type: i7$1.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "ngmodule", type: InfoDrawerModule }, { kind: "component", type: i1.InfoDrawerTabComponent, selector: "adf-info-drawer-tab", inputs: ["label", "icon"] }, { kind: "component", type: i1.InfoDrawerComponent, selector: "adf-info-drawer", inputs: ["title", "icon", "selectedIndex", "showHeader"], outputs: ["currentTab"] }, { kind: "directive", type: i1.InfoDrawerButtonsDirective, selector: "[adf-info-drawer-buttons], [info-drawer-buttons]" }, { kind: "ngmodule", type: A11yModule }, { kind: "component", type: ToolbarComponent, selector: "aca-toolbar", inputs: ["items"] }, { kind: "component", type: DynamicTabComponent, selector: "adf-dynamic-tab", inputs: ["id", "node"] }], encapsulation: i0.ViewEncapsulation.None });
2303
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: InfoDrawerComponent, decorators: [{
2304
+ type: Component,
2305
+ args: [{ standalone: true, imports: [CommonModule, TranslateModule, MatProgressBarModule, InfoDrawerModule, A11yModule, ToolbarComponent, DynamicTabComponent], selector: 'aca-info-drawer', encapsulation: ViewEncapsulation.None, template: "<div *ngIf=\"isLoading\">\n <mat-progress-bar mode=\"indeterminate\" [attr.aria-label]=\"'APP.INFO_DRAWER.DATA_LOADING' | translate\"></mat-progress-bar>\n</div>\n<ng-container *ngIf=\"!isLoading && !!displayNode\">\n <adf-info-drawer [icon]=\"icon\" [title]=\"node?.entry?.name || 'APP.INFO_DRAWER.TITLE'\" cdkTrapFocusAutoCapture>\n <aca-toolbar [items]=\"actions\" info-drawer-buttons></aca-toolbar>\n\n <adf-info-drawer-tab *ngFor=\"let tab of tabs\" [icon]=\"tab.icon\" [label]=\"tab.title\">\n <adf-dynamic-tab [node]=\"$any(displayNode)\" [id]=\"tab.component\" [attr.data-automation-id]=\"tab.component\"> </adf-dynamic-tab>\n </adf-info-drawer-tab>\n </adf-info-drawer>\n</ng-container>\n" }]
2306
+ }], ctorParameters: function () { return [{ type: i1$2.Store }, { type: ContentApiService }, { type: AppExtensionService }, { type: i4$1.NodesApiService }, { type: i4$1.ContentService }]; }, propDecorators: { nodeId: [{
2307
+ type: Input
2308
+ }], node: [{
2309
+ type: Input
2310
+ }], onEscapeKeyboardEvent: [{
2328
2311
  type: HostListener,
2329
- args: ['sorting-changed', ['$event']]
2312
+ args: ['keydown.escape']
2330
2313
  }] } });
2331
2314
 
2332
2315
  /*!
@@ -2352,195 +2335,272 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
2352
2335
  * You should have received a copy of the GNU Lesser General Public License
2353
2336
  * from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
2354
2337
  */
2355
- const DefaultMimeTypes = [
2356
- { value: 'video/3gpp', label: '3G Video' },
2357
- { value: 'video/3gpp2', label: '3G2 Video' },
2358
- { value: 'application/vnd.alfresco.ai.features.v1+json', label: 'AI-Features' },
2359
- { value: 'application/vnd.alfresco.ai.labels.v1+json', label: 'AI-Labels' },
2360
- { value: 'application/vnd.alfresco.ai.pii.entities.v1+json', label: 'AI-PII-Entities' },
2361
- { value: 'application/vnd.alfresco.ai.speech-to-text.v1+json', label: 'AI-SpeechToText' },
2362
- { value: 'application/vnd.alfresco.ai.textract.v1+json', label: 'AI-Textract' },
2363
- { value: 'audio/x-aiff', label: 'AIFF Audio' },
2364
- { value: 'application/vnd.adobe.air-application-installer-package+zip', label: 'Adobe AIR' },
2365
- { value: 'application/vnd.adobe.xdp+xml', label: 'Adobe Acrobat XML Data Package' },
2366
- { value: 'application/vnd.adobe.aftereffects.project', label: 'Adobe AfterEffects Project' },
2367
- { value: 'application/vnd.adobe.aftereffects.template', label: 'Adobe AfterEffects Template' },
2368
- { value: 'image/x-raw-adobe', label: 'Adobe Digital Negative Image' },
2369
- { value: 'application/x-zip', label: 'Adobe Flex Project File' },
2370
- { value: 'application/framemaker', label: 'Adobe FrameMaker' },
2371
- { value: 'application/illustrator', label: 'Adobe Illustrator File' },
2372
- { value: 'application/x-indesign', label: 'Adobe InDesign Document' },
2373
- { value: 'application/pdf', label: 'Adobe PDF Document' },
2374
- { value: 'application/pagemaker', label: 'Adobe PageMaker' },
2375
- { value: 'image/vnd.adobe.photoshop', label: 'Adobe Photoshop' },
2376
- { value: 'image/vnd.adobe.premiere', label: 'Adobe Premiere' },
2377
- { value: 'audio/vnd.adobe.soundbooth', label: 'Adobe SoundBooth' },
2378
- { value: 'application/acp', label: 'Alfresco Content Package' },
2379
- { value: 'application/vnd.android.package-archive', label: 'Android Package' },
2380
- { value: 'image/x-portable-anymap', label: 'Anymap Image' },
2381
- { value: 'image/icns', label: 'Apple Icon' },
2382
- { value: 'application/vnd.apple.keynote', label: 'Apple iWork Keynote' },
2383
- { value: 'application/vnd.apple.numbers', label: 'Apple iWork Numbers' },
2384
- { value: 'application/vnd.apple.pages', label: 'Apple iWork Pages' },
2385
- { value: 'image/vnd.dwg', label: 'AutoCAD Drawing' },
2386
- { value: 'image/x-dwt', label: 'AutoCAD Template' },
2387
- { value: 'audio/basic', label: 'Basic Audio' },
2388
- { value: 'application/x-dosexec', label: 'Binary File' },
2389
- { value: 'application/octet-stream', label: 'Binary File (Octet Stream)' },
2390
- { value: 'image/bmp', label: 'Bitmap Image' },
2391
- { value: 'image/cgm', label: 'CGM Image' },
2392
- { value: 'image/x-raw-canon', label: 'Canon RAW Image' },
2393
- { value: 'text/csv', label: 'Comma Separated Values (CSV)' },
2394
- { value: 'application/dita+xml', label: 'DITA' },
2395
- { value: 'message/rfc822', label: 'EMail' },
2396
- { value: 'application/eps', label: 'EPS Type PostScript' },
2397
- { value: 'audio/x-flac', label: 'FLAC Audio' },
2398
- { value: 'application/x-fla', label: 'Flash Source' },
2399
- { value: 'video/x-flv', label: 'Flash Video' },
2400
- { value: 'image/x-raw-fuji', label: 'Fuji RAW Image' },
2401
- { value: 'image/gif', label: 'GIF Image' },
2402
- { value: 'application/x-gzip', label: 'GZIP' },
2403
- { value: 'application/x-gtar', label: 'GZIP Tarball' },
2404
- { value: 'image/x-portable-graymap', label: 'Greymap Image' },
2405
- { value: 'text/html', label: 'HTML' },
2406
- { value: 'application/vnd.oasis.opendocument.text-web', label: 'HTML Document Template' },
2407
- { value: 'image/x-raw-hasselblad', label: 'Hasselblad RAW Image' },
2408
- { value: 'image/ief', label: 'IEF Image' },
2409
- { value: 'image/jp2', label: 'JPEG 2000 Image' },
2410
- { value: 'image/jpeg', label: 'JPEG Image' },
2411
- { value: 'application/json', label: 'JSON' },
2412
- { value: 'application/java-archive', label: 'Java Archive' },
2413
- { value: 'application/java', label: 'Java Class' },
2414
- { value: 'text/x-jsp', label: 'Java Server Page' },
2415
- { value: 'text/x-java-source', label: 'Java Source File' },
2416
- { value: 'application/x-javascript', label: 'JavaScript' },
2417
- { value: 'image/x-raw-kodak', label: 'Kodak RAW Image' },
2418
- { value: 'application/x-latex', label: 'LaTeX' },
2419
- { value: 'image/x-raw-leica', label: 'Leica RAW Image' },
2420
- { value: 'audio/mpeg', label: 'MPEG Audio' },
2421
- { value: 'video/mp2t', label: 'MPEG Transport Stream' },
2422
- { value: 'video/mpeg', label: 'MPEG Video' },
2423
- { value: 'video/mpeg2', label: 'MPEG2 Video' },
2424
- { value: 'audio/mp4', label: 'MPEG4 Audio' },
2425
- { value: 'video/mp4', label: 'MPEG4 Video' },
2426
- { value: 'video/x-m4v', label: 'MPEG4 Video (m4v)' },
2427
- { value: 'video/x-ms-asf', label: 'MS ASF Streaming Video' },
2428
- { value: 'video/x-msvideo', label: 'MS Video' },
2429
- { value: 'audio/x-ms-wma', label: 'MS WMA Streaming Audio' },
2430
- { value: 'video/x-ms-wmv', label: 'MS WMV Streaming Video' },
2431
- { value: 'application/x-troff-man', label: 'Man Page' },
2432
- { value: 'text/x-markdown', label: 'Markdown' },
2433
- { value: 'text/mediawiki', label: 'MediaWiki Markup' },
2434
- { value: 'application/vnd.ms-excel', label: 'Microsoft Excel' },
2435
- { value: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', label: 'Microsoft Excel 2007' },
2436
- { value: 'application/vnd.ms-excel.addin.macroenabled.12', label: 'Microsoft Excel 2007 add-in' },
2437
- { value: 'application/vnd.ms-excel.sheet.binary.macroenabled.12', label: 'Microsoft Excel 2007 binary workbook' },
2438
- { value: 'application/vnd.ms-excel.sheet.macroenabled.12', label: 'Microsoft Excel 2007 macro-enabled workbook' },
2439
- { value: 'application/vnd.ms-excel.template.macroenabled.12', label: 'Microsoft Excel 2007 macro-enabled workbook template' },
2440
- { value: 'application/vnd.openxmlformats-officedocument.spreadsheetml.template', label: 'Microsoft Excel template 2007' },
2441
- { value: 'application/vnd.ms-outlook', label: 'Microsoft Outlook Message' },
2442
- { value: 'application/vnd.ms-powerpoint', label: 'Microsoft PowerPoint' },
2443
- { value: 'application/vnd.openxmlformats-officedocument.presentationml.presentation', label: 'Microsoft PowerPoint 2007' },
2444
- { value: 'application/vnd.ms-powerpoint.addin.macroenabled.12', label: 'Microsoft PowerPoint 2007 add-in' },
2445
- { value: 'application/vnd.ms-powerpoint.presentation.macroenabled.12', label: 'Microsoft PowerPoint 2007 macro-enabled presentation' },
2446
- { value: 'application/vnd.ms-powerpoint.template.macroenabled.12', label: 'Microsoft PowerPoint 2007 macro-enabled presentation template' },
2447
- { value: 'application/vnd.ms-powerpoint.slide.macroenabled.12', label: 'Microsoft PowerPoint 2007 macro-enabled slide' },
2448
- { value: 'application/vnd.ms-powerpoint.slideshow.macroenabled.12', label: 'Microsoft PowerPoint 2007 macro-enabled slide show' },
2449
- { value: 'application/vnd.openxmlformats-officedocument.presentationml.slide', label: 'Microsoft PowerPoint 2007 slide' },
2450
- { value: 'application/vnd.openxmlformats-officedocument.presentationml.slideshow', label: 'Microsoft PowerPoint 2007 slide show' },
2451
- { value: 'application/vnd.openxmlformats-officedocument.presentationml.template', label: 'Microsoft PowerPoint 2007 template' },
2452
- { value: 'application/vnd.ms-project', label: 'Microsoft Project' },
2453
- { value: 'application/vnd.visio', label: 'Microsoft Visio' },
2454
- { value: 'application/vnd.visio2013', label: 'Microsoft Visio 2013' },
2455
- { value: 'application/vnd.ms-visio.drawing.macroenabled.main+xml', label: 'Microsoft Visio macro-enabled drawing' },
2456
- { value: 'application/vnd.ms-visio.stencil.macroenabled.main+xml', label: 'Microsoft Visio macro-enabled stencil' },
2457
- { value: 'application/vnd.ms-visio.template.macroenabled.main+xml', label: 'Microsoft Visio macro-enabled template' },
2458
- { value: 'application/vnd.ms-visio.stencil.main+xml', label: 'Microsoft Visio stencil' },
2459
- { value: 'application/vnd.ms-visio.template.main+xml', label: 'Microsoft Visio template' },
2460
- { value: 'application/msword', label: 'Microsoft Word' },
2461
- { value: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', label: 'Microsoft Word 2007' },
2462
- { value: 'application/vnd.ms-word.document.macroenabled.12', label: 'Microsoft Word 2007 macro-enabled document' },
2463
- { value: 'application/vnd.ms-word.template.macroenabled.12', label: 'Microsoft Word 2007 macro-enabled document template' },
2464
- { value: 'application/vnd.openxmlformats-officedocument.wordprocessingml.template', label: 'Microsoft Word 2007 template' },
2465
- { value: 'image/x-raw-minolta', label: 'Minolta RAW Image' },
2466
- { value: 'image/x-raw-nikon', label: 'Nikon RAW Image' },
2467
- { value: 'audio/ogg', label: 'Ogg Audio' },
2468
- { value: 'application/ogg', label: 'Ogg Multiplex' },
2469
- { value: 'video/ogg', label: 'Ogg Video' },
2470
- { value: 'audio/vorbis', label: 'Ogg Vorbis Audio' },
2471
- { value: 'image/x-raw-olympus', label: 'Olympus RAW Image' },
2472
- { value: 'application/vnd.oasis.opendocument.chart', label: 'OpenDocument Chart' },
2473
- { value: 'application/vnd.oasis.opendocument.database', label: 'OpenDocument Database' },
2474
- { value: 'application/vnd.oasis.opendocument.graphics', label: 'OpenDocument Drawing' },
2475
- { value: 'application/vnd.oasis.opendocument.graphics-template', label: 'OpenDocument Drawing Template' },
2476
- { value: 'application/vnd.oasis.opendocument.formula', label: 'OpenDocument Formula' },
2477
- { value: 'application/vnd.oasis.opendocument.image', label: 'OpenDocument Image' },
2478
- { value: 'application/vnd.oasis.opendocument.text-master', label: 'OpenDocument Master Document' },
2479
- { value: 'application/vnd.oasis.opendocument.presentation', label: 'OpenDocument Presentation' },
2480
- { value: 'application/vnd.oasis.opendocument.presentation-template', label: 'OpenDocument Presentation Template' },
2481
- { value: 'application/vnd.oasis.opendocument.spreadsheet', label: 'OpenDocument Spreadsheet' },
2482
- { value: 'application/vnd.oasis.opendocument.spreadsheet-template', label: 'OpenDocument Spreadsheet Template' },
2483
- { value: 'application/vnd.oasis.opendocument.text', label: 'OpenDocument Text (OpenOffice 2.0)' },
2484
- { value: 'application/vnd.oasis.opendocument.text-template', label: 'OpenDocument Text Template' },
2485
- { value: 'application/vnd.sun.xml.calc', label: 'OpenOffice 1.0/StarOffice6.0 Calc 6.0' },
2486
- { value: 'application/vnd.sun.xml.calc.template', label: 'OpenOffice 1.0/StarOffice6.0 Calc 6.0 Template' },
2487
- { value: 'application/vnd.sun.xml.draw', label: 'OpenOffice 1.0/StarOffice6.0 Draw 6.0' },
2488
- { value: 'application/vnd.sun.xml.impress', label: 'OpenOffice 1.0/StarOffice6.0 Impress 6.0' },
2489
- { value: 'application/vnd.sun.xml.impress.template', label: 'OpenOffice 1.0/StarOffice6.0 Impress 6.0 Template' },
2490
- { value: 'application/vnd.sun.xml.writer', label: 'OpenOffice 1.0/StarOffice6.0 Writer 6.0' },
2491
- { value: 'application/vnd.sun.xml.writer.template', label: 'OpenOffice 1.0/StarOffice6.0 Writer 6.0 Template' },
2492
- { value: 'image/png', label: 'PNG Image' },
2493
- { value: 'image/x-raw-panasonic', label: 'Panasonic RAW Image' },
2494
- { value: 'image/x-raw-pentax', label: 'Pentax RAW Image' },
2495
- { value: 'image/x-portable-pixmap', label: 'Pixmap Image' },
2496
- { value: 'text/plain', label: 'Plain Text' },
2497
- { value: 'image/x-portable-bitmap', label: 'Portable Bitmap' },
2498
- { value: 'application/postscript', label: 'PostScript' },
2499
- { value: 'application/remote-printing', label: 'Printer Text File' },
2500
- { value: 'video/quicktime', label: 'Quicktime Video' },
2501
- { value: 'video/x-rad-screenplay', label: 'RAD Screen Display' },
2502
- { value: 'application/x-rar-compressed', label: 'RAR Archive' },
2503
- { value: 'image/x-raw-red', label: 'RED RAW Image' },
2504
- { value: 'image/x-rgb', label: 'RGB Image' },
2505
- { value: 'application/rss+xml', label: 'RSS' },
2506
- { value: 'image/x-cmu-raster', label: 'Raster Image' },
2507
- { value: 'text/richtext', label: 'Rich Text' },
2508
- { value: 'application/rtf', label: 'Rich Text Format' },
2509
- { value: 'video/x-sgi-movie', label: 'SGI Video' },
2510
- { value: 'text/sgml', label: 'SGML (Human Readable)' },
2511
- { value: 'application/sgml', label: 'SGML (Machine Readable)' },
2512
- { value: 'image/svg+xml', label: 'Scalable Vector Graphics Image' },
2513
- { value: 'application/x-sh', label: 'Shell Script' },
2514
- { value: 'application/x-shockwave-flash', label: 'Shockwave Flash' },
2515
- { value: 'image/x-raw-sigma', label: 'Sigma RAW Image' },
2516
- { value: 'image/x-raw-sony', label: 'Sony RAW Image' },
2517
- { value: 'application/vnd.stardivision.chart', label: 'StarChart 5.x' },
2518
- { value: 'application/vnd.stardivision.calc', label: 'StarCalc 5.x' },
2519
- { value: 'application/vnd.stardivision.draw', label: 'StarDraw 5.x' },
2520
- { value: 'application/vnd.stardivision.impress', label: 'StarImpress 5.x' },
2521
- { value: 'application/vnd.stardivision.impress-packed', label: 'StarImpress Packed 5.x' },
2522
- { value: 'application/vnd.stardivision.math', label: 'StarMath 5.x' },
2523
- { value: 'application/vnd.stardivision.writer', label: 'StarWriter 5.x' },
2524
- { value: 'application/vnd.stardivision.writer-global', label: 'StarWriter 5.x global' },
2525
- { value: 'text/css', label: 'Style Sheet' },
2526
- { value: 'image/tiff', label: 'TIFF Image' },
2527
- { value: 'text/tab-separated-values', label: 'Tab Separated Values' },
2528
- { value: 'application/x-tar', label: 'Tarball' },
2529
- { value: 'application/x-tex', label: 'Tex' },
2530
- { value: 'application/x-texinfo', label: 'Tex Info' },
2531
- { value: 'x-world/x-vrml', label: 'VRML' },
2532
- { value: 'audio/x-wav', label: 'WAV Audio' },
2533
- { value: 'video/webm', label: 'WebM Video' },
2534
- { value: 'application/wordperfect', label: 'WordPerfect' },
2535
- { value: 'image/x-xbitmap', label: 'XBitmap Image' },
2536
- { value: 'application/xhtml+xml', label: 'XHTML' },
2537
- { value: 'text/xml', label: 'XML' },
2538
- { value: 'image/x-xpixmap', label: 'XPixmap Image' },
2539
- { value: 'image/x-xwindowdump', label: 'XWindow Dump' },
2540
- { value: 'application/x-compress', label: 'Z Compress' },
2541
- { value: 'application/zip', label: 'ZIP' },
2542
- { value: 'text/calendar', label: 'iCalendar File' }
2543
- ];
2338
+ class DocumentBasePageService {
2339
+ }
2340
+
2341
+ /*!
2342
+ * Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.
2343
+ *
2344
+ * Alfresco Example Content Application
2345
+ *
2346
+ * This file is part of the Alfresco Example Content Application.
2347
+ * If the software was purchased under a paid Alfresco license, the terms of
2348
+ * the paid license agreement will prevail. Otherwise, the software is
2349
+ * provided under the following open source license terms:
2350
+ *
2351
+ * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
2352
+ * it under the terms of the GNU Lesser General Public License as published by
2353
+ * the Free Software Foundation, either version 3 of the License, or
2354
+ * (at your option) any later version.
2355
+ *
2356
+ * The Alfresco Example Content Application is distributed in the hope that it will be useful,
2357
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2358
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2359
+ * GNU Lesser General Public License for more details.
2360
+ *
2361
+ * You should have received a copy of the GNU Lesser General Public License
2362
+ * from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
2363
+ */
2364
+ function isLocked(node) {
2365
+ var _a, _b;
2366
+ if (node === null || node === void 0 ? void 0 : node.entry) {
2367
+ const { entry } = node;
2368
+ return entry.isLocked || ((_a = entry.properties) === null || _a === void 0 ? void 0 : _a['cm:lockType']) === 'READ_ONLY_LOCK' || ((_b = entry.properties) === null || _b === void 0 ? void 0 : _b['cm:lockType']) === 'WRITE_LOCK';
2369
+ }
2370
+ else {
2371
+ return false;
2372
+ }
2373
+ }
2374
+ function isLibrary(node) {
2375
+ if (node === null || node === void 0 ? void 0 : node.entry) {
2376
+ const { entry } = node;
2377
+ return !!(entry.guid && entry.id && entry.preset && entry.title && entry.visibility) || entry.nodeType === 'st:site';
2378
+ }
2379
+ else {
2380
+ return false;
2381
+ }
2382
+ }
2383
+
2384
+ /*!
2385
+ * Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.
2386
+ *
2387
+ * Alfresco Example Content Application
2388
+ *
2389
+ * This file is part of the Alfresco Example Content Application.
2390
+ * If the software was purchased under a paid Alfresco license, the terms of
2391
+ * the paid license agreement will prevail. Otherwise, the software is
2392
+ * provided under the following open source license terms:
2393
+ *
2394
+ * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
2395
+ * it under the terms of the GNU Lesser General Public License as published by
2396
+ * the Free Software Foundation, either version 3 of the License, or
2397
+ * (at your option) any later version.
2398
+ *
2399
+ * The Alfresco Example Content Application is distributed in the hope that it will be useful,
2400
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2401
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2402
+ * GNU Lesser General Public License for more details.
2403
+ *
2404
+ * You should have received a copy of the GNU Lesser General Public License
2405
+ * from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
2406
+ */
2407
+ const BYTES_TO_MB_CONVERSION_VALUE = 1048576;
2408
+ class AcaFileAutoDownloadService {
2409
+ constructor(dialog, appConfig) {
2410
+ this.dialog = dialog;
2411
+ this.appConfig = appConfig;
2412
+ }
2413
+ shouldFileAutoDownload(fileSizeInBytes) {
2414
+ const sizeInMB = fileSizeInBytes / BYTES_TO_MB_CONVERSION_VALUE;
2415
+ const fileAutoDownloadFlag = this.appConfig.get('viewer.enableFileAutoDownload', true);
2416
+ const sizeThreshold = this.appConfig.get('viewer.fileAutoDownloadSizeThresholdInMB', 15);
2417
+ return fileAutoDownloadFlag && sizeInMB && sizeInMB > sizeThreshold;
2418
+ }
2419
+ autoDownloadFile(node) {
2420
+ this.dialog.open(FileAutoDownloadComponent, { disableClose: true, data: node });
2421
+ }
2422
+ }
2423
+ AcaFileAutoDownloadService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: AcaFileAutoDownloadService, deps: [{ token: i1$1.MatDialog }, { token: i1.AppConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
2424
+ AcaFileAutoDownloadService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: AcaFileAutoDownloadService, providedIn: 'root' });
2425
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: AcaFileAutoDownloadService, decorators: [{
2426
+ type: Injectable,
2427
+ args: [{
2428
+ providedIn: 'root'
2429
+ }]
2430
+ }], ctorParameters: function () { return [{ type: i1$1.MatDialog }, { type: i1.AppConfigService }]; } });
2431
+
2432
+ /*!
2433
+ * Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.
2434
+ *
2435
+ * Alfresco Example Content Application
2436
+ *
2437
+ * This file is part of the Alfresco Example Content Application.
2438
+ * If the software was purchased under a paid Alfresco license, the terms of
2439
+ * the paid license agreement will prevail. Otherwise, the software is
2440
+ * provided under the following open source license terms:
2441
+ *
2442
+ * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
2443
+ * it under the terms of the GNU Lesser General Public License as published by
2444
+ * the Free Software Foundation, either version 3 of the License, or
2445
+ * (at your option) any later version.
2446
+ *
2447
+ * The Alfresco Example Content Application is distributed in the hope that it will be useful,
2448
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2449
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2450
+ * GNU Lesser General Public License for more details.
2451
+ *
2452
+ * You should have received a copy of the GNU Lesser General Public License
2453
+ * from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
2454
+ */
2455
+ /* eslint-disable @angular-eslint/directive-class-suffix */
2456
+ class PageComponent {
2457
+ constructor() {
2458
+ this.onDestroy$ = new Subject();
2459
+ this.title = 'Page';
2460
+ this.actions = [];
2461
+ this.viewerToolbarActions = [];
2462
+ this.canUpdateNode = false;
2463
+ this.canUpload = false;
2464
+ this.showHeader = ShowHeaderMode.Data;
2465
+ this.filterSorting = 'name-asc';
2466
+ this.createActions = [];
2467
+ this.isSmallScreen = false;
2468
+ this.extensions = inject(AppExtensionService);
2469
+ this.content = inject(DocumentBasePageService);
2470
+ this.store = inject((Store));
2471
+ this.breakpointObserver = inject(BreakpointObserver);
2472
+ this.uploadService = inject(UploadService);
2473
+ this.router = inject(Router);
2474
+ this.fileAutoDownloadService = inject(AcaFileAutoDownloadService, { optional: true });
2475
+ this.subscriptions = [];
2476
+ }
2477
+ ngOnInit() {
2478
+ this.extensions
2479
+ .getCreateActions()
2480
+ .pipe(takeUntil(this.onDestroy$))
2481
+ .subscribe((actions) => {
2482
+ this.createActions = actions;
2483
+ });
2484
+ this.infoDrawerOpened$ = this.store.select(isInfoDrawerOpened);
2485
+ this.store
2486
+ .select(getAppSelection)
2487
+ .pipe(takeUntil(this.onDestroy$))
2488
+ .subscribe((selection) => {
2489
+ this.selection = selection;
2490
+ this.canUpdateNode = this.selection.count === 1 && this.content.canUpdateNode(selection.first);
2491
+ });
2492
+ this.extensions
2493
+ .getAllowedToolbarActions()
2494
+ .pipe(takeUntil(this.onDestroy$))
2495
+ .subscribe((actions) => {
2496
+ this.actions = actions;
2497
+ });
2498
+ this.extensions
2499
+ .getViewerToolbarActions()
2500
+ .pipe(takeUntil(this.onDestroy$))
2501
+ .subscribe((actions) => {
2502
+ this.viewerToolbarActions = actions;
2503
+ });
2504
+ this.store
2505
+ .select(getCurrentFolder)
2506
+ .pipe(takeUntil(this.onDestroy$))
2507
+ .subscribe((node) => {
2508
+ this.canUpload = node && this.content.canUploadContent(node);
2509
+ });
2510
+ this.breakpointObserver
2511
+ .observe([Breakpoints.HandsetPortrait, Breakpoints.HandsetLandscape])
2512
+ .pipe(takeUntil(this.onDestroy$))
2513
+ .subscribe((result) => {
2514
+ this.isSmallScreen = result.matches;
2515
+ });
2516
+ }
2517
+ ngOnChanges(changes) {
2518
+ var _a;
2519
+ if ((_a = changes.nodeResult) === null || _a === void 0 ? void 0 : _a.currentValue) {
2520
+ this.nodeResult = changes.nodeResult.currentValue;
2521
+ }
2522
+ }
2523
+ ngOnDestroy() {
2524
+ this.subscriptions.forEach((subscription) => subscription.unsubscribe());
2525
+ this.subscriptions = [];
2526
+ this.onDestroy$.next(true);
2527
+ this.onDestroy$.complete();
2528
+ this.store.dispatch(new SetSelectedNodesAction([]));
2529
+ }
2530
+ showPreview(node, extras) {
2531
+ var _a, _b, _c;
2532
+ if (node === null || node === void 0 ? void 0 : node.entry) {
2533
+ if ((_a = this.fileAutoDownloadService) === null || _a === void 0 ? void 0 : _a.shouldFileAutoDownload((_c = (_b = node.entry) === null || _b === void 0 ? void 0 : _b.content) === null || _c === void 0 ? void 0 : _c.sizeInBytes)) {
2534
+ this.fileAutoDownloadService.autoDownloadFile(node);
2535
+ }
2536
+ else {
2537
+ let id;
2538
+ if (node.entry.nodeType === 'app:filelink') {
2539
+ id = node.entry.properties['cm:destination'];
2540
+ }
2541
+ else {
2542
+ id = node.entry.nodeId || node.entry.guid || node.entry.id;
2543
+ }
2544
+ this.store.dispatch(new ViewNodeAction(id, extras));
2545
+ }
2546
+ }
2547
+ }
2548
+ getParentNodeId() {
2549
+ return this.node ? this.node.id : null;
2550
+ }
2551
+ imageResolver(row) {
2552
+ if (row) {
2553
+ if (isLocked(row.node)) {
2554
+ return 'assets/images/baseline-lock-24px.svg';
2555
+ }
2556
+ if (isLibrary(row.node)) {
2557
+ return 'assets/images/baseline-library_books-24px.svg';
2558
+ }
2559
+ }
2560
+ return null;
2561
+ }
2562
+ reload(selectedNode) {
2563
+ if (this.isOutletPreviewUrl()) {
2564
+ return;
2565
+ }
2566
+ this.store.dispatch(new ReloadDocumentListAction());
2567
+ if (selectedNode) {
2568
+ this.store.dispatch(new SetSelectedNodesAction([selectedNode]));
2569
+ }
2570
+ }
2571
+ trackByActionId(_, action) {
2572
+ return action.id;
2573
+ }
2574
+ trackById(_, obj) {
2575
+ return obj.id;
2576
+ }
2577
+ trackByColumnId(_, obj) {
2578
+ return obj.id;
2579
+ }
2580
+ isOutletPreviewUrl() {
2581
+ return location.href.includes('viewer:view');
2582
+ }
2583
+ onSortingChanged(event) {
2584
+ this.filterSorting = event.detail.key + '-' + event.detail.direction;
2585
+ }
2586
+ onAllFilterCleared() {
2587
+ if (!this.isOutletPreviewUrl()) {
2588
+ this.documentList.node = null;
2589
+ this.store.dispatch(new ReloadDocumentListAction());
2590
+ }
2591
+ }
2592
+ }
2593
+ PageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: PageComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
2594
+ PageComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.3", type: PageComponent, host: { listeners: { "sorting-changed": "onSortingChanged($event)" } }, viewQueries: [{ propertyName: "documentList", first: true, predicate: DocumentListComponent, descendants: true }], usesOnChanges: true, ngImport: i0 });
2595
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: PageComponent, decorators: [{
2596
+ type: Directive
2597
+ }], propDecorators: { documentList: [{
2598
+ type: ViewChild,
2599
+ args: [DocumentListComponent]
2600
+ }], onSortingChanged: [{
2601
+ type: HostListener,
2602
+ args: ['sorting-changed', ['$event']]
2603
+ }] } });
2544
2604
 
2545
2605
  /*!
2546
2606
  * Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.
@@ -2866,60 +2926,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
2866
2926
  }]
2867
2927
  }] });
2868
2928
 
2869
- /*!
2870
- * Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.
2871
- *
2872
- * Alfresco Example Content Application
2873
- *
2874
- * This file is part of the Alfresco Example Content Application.
2875
- * If the software was purchased under a paid Alfresco license, the terms of
2876
- * the paid license agreement will prevail. Otherwise, the software is
2877
- * provided under the following open source license terms:
2878
- *
2879
- * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
2880
- * it under the terms of the GNU Lesser General Public License as published by
2881
- * the Free Software Foundation, either version 3 of the License, or
2882
- * (at your option) any later version.
2883
- *
2884
- * The Alfresco Example Content Application is distributed in the hope that it will be useful,
2885
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
2886
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2887
- * GNU Lesser General Public License for more details.
2888
- *
2889
- * You should have received a copy of the GNU Lesser General Public License
2890
- * from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
2891
- */
2892
- class AppSettingsService {
2893
- constructor() {
2894
- this.appConfig = inject(AppConfigService);
2895
- }
2896
- /**
2897
- * Get the AOS (Alfresco Office Services) host URL from the app settings.
2898
- */
2899
- get aosHost() {
2900
- return this.appConfig.get('aosHost');
2901
- }
2902
- /**
2903
- * Get the default landing page from the app settings.
2904
- * Default value: `/personal-files`.
2905
- */
2906
- get landingPage() {
2907
- return this.appConfig.get('landingPage', '/personal-files');
2908
- }
2909
- /**
2910
- * Get the list of mime types from the app settings.
2911
- */
2912
- get mimeTypes() {
2913
- return this.appConfig.get('mimeTypes', DefaultMimeTypes);
2914
- }
2915
- }
2916
- AppSettingsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: AppSettingsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2917
- AppSettingsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: AppSettingsService, providedIn: 'root' });
2918
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: AppSettingsService, decorators: [{
2919
- type: Injectable,
2920
- args: [{ providedIn: 'root' }]
2921
- }] });
2922
-
2923
2929
  /*!
2924
2930
  * Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.
2925
2931
  *