@arsedizioni/ars-utils 18.2.107 → 18.2.108

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.
@@ -1,4 +1,4 @@
1
- import { Breakpoints, BreakpointObserver } from '@angular/cdk/layout';
1
+ import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';
2
2
  import { NgClass, NgStyle } from '@angular/common';
3
3
  import * as i0 from '@angular/core';
4
4
  import { input, computed, Component, ChangeDetectionStrategy, EventEmitter, inject, Output, ViewChild, ChangeDetectorRef, signal, Renderer2 } from '@angular/core';
@@ -32,8 +32,8 @@ import { MatSidenavModule } from '@angular/material/sidenav';
32
32
  import { MatTabsModule } from '@angular/material/tabs';
33
33
  import * as i3$1 from '@angular/material/tooltip';
34
34
  import { MatTooltipModule } from '@angular/material/tooltip';
35
- import { ClipperService, ClipperSearchParams, ClipperModule, ClipperSectors, ClipperRegions, ClipperChannels, ClipperAuthors, ClipperSectorTypes, ClipperSearchUtils, ClipperSearchFacetsSnapshot, ClipperFacet, ClipperModel, ClipperQueryReferencesMode, ClipperMessages, ClipperSearchResult, ClipperSort, ClipperModels, ClipperSources, ClipperDocumentChangeReason } from '@arsedizioni/ars-utils/clipper.common';
36
- import { SystemUtils, DateInterval, DateIntervalChangeDirective, SafeHtmlPipe, ScreenService, FormatPipe, SelectableModel, BroadcastService, DateFormat, SafeUrlPipe } from '@arsedizioni/ars-utils/core';
35
+ import { ClipperService, ClipperSearchParams, ClipperModule, ClipperSectors, ClipperRegions, ClipperChannels, ClipperAuthors, ClipperSectorTypes, ClipperSearchUtils, ClipperSearchFacetsSnapshot, ClipperFacet, ClipperModel, ClipperMessages, ClipperQueryReferencesMode, ClipperSearchResult, ClipperSort, ClipperModels, ClipperSources, ClipperDocumentChangeReason } from '@arsedizioni/ars-utils/clipper.common';
36
+ import { SystemUtils, DateInterval, DateIntervalChangeDirective, SafeHtmlPipe, ScreenService, FormatPipe, BroadcastService, DateFormat, SelectableModel, SafeUrlPipe } from '@arsedizioni/ars-utils/core';
37
37
  import { FlexLayoutModule } from '@ngbracket/ngx-layout';
38
38
  import { Subject, takeUntil, fromEvent } from 'rxjs';
39
39
  import { takeUntil as takeUntil$1, debounceTime } from 'rxjs/operators';
@@ -813,393 +813,100 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImpor
813
813
  args: ['contextMenuTrigger']
814
814
  }] } });
815
815
 
816
- class ClipperReferencesComponent extends ClipperSearchResultManager {
816
+ class ClipperDocumentManager {
817
817
  constructor() {
818
- super(...arguments);
819
- this.dialogRef = inject((MatDialogRef));
820
- this.dialogData = inject(MAT_DIALOG_DATA) ?? { mode: ClipperQueryReferencesMode.ReferencesIn };
821
- this.title = null;
822
- this.item = null;
823
- }
824
- ngOnInit() {
825
- if (this.dialogData) {
826
- switch (this.dialogData.mode) {
827
- case ClipperQueryReferencesMode.ReferencesIn:
828
- this.title = "Documenti richiamati nelle note o nel testo";
829
- break;
830
- case ClipperQueryReferencesMode.ReferencesOut:
831
- this.title = "Documenti che richiamano quello in visione";
832
- break;
833
- case ClipperQueryReferencesMode.ChangesIn:
834
- this.title = "Modifiche subite";
835
- break;
836
- case ClipperQueryReferencesMode.ChangesOut:
837
- this.title = "Modifiche apportate";
838
- break;
839
- case ClipperQueryReferencesMode.Juris:
840
- this.title = "Giurisprudenza associata";
841
- break;
842
- }
843
- if (this.dialogData.anchorTitle) {
844
- this.title += " - " + this.dialogData.anchorTitle;
845
- }
846
- // Use service snapshot
847
- this.snapshot = this.clipperService.referencesSnapshot ?? { searchParams: new ClipperSearchParams(), interval: "-1" };
848
- if (this.filterParams.mode !== this.dialogData.mode ||
849
- this.filterParams.id !== this.dialogData.id ||
850
- this.filterParams.anchor !== this.dialogData.anchor) {
851
- this.filterParams = new ClipperSearchParams();
852
- this.filterParams.mode = this.dialogData.mode;
853
- this.filterParams.model = this.dialogData.model;
854
- this.filterParams.anchor = this.dialogData.anchor;
855
- this.filterParams.id = this.dialogData.id;
856
- this.filterParams.useModifierInfo = this.dialogData.mode === ClipperQueryReferencesMode.ChangesOut;
857
- this.filterParams.returnModifierInfo = this.dialogData.mode !== ClipperQueryReferencesMode.ChangesOut;
858
- this.clipperService.referencesSnapshot = this.snapshot;
859
- }
860
- }
861
- // Initialize selection
862
- this.selection = new SelectableModel(true, 'documentId');
863
- // Observe layout changes
864
- this.breakpointObserver
865
- .observe([
866
- Breakpoints.XSmall,
867
- Breakpoints.Small,
868
- Breakpoints.Medium,
869
- Breakpoints.Large,
870
- Breakpoints.XLarge,
871
- ])
872
- .pipe(takeUntil$1(this.unsubscribe))
873
- .subscribe(result => {
874
- for (const query of Object.keys(result.breakpoints)) {
875
- if (result.breakpoints[query]) {
876
- this.handleFilterPaneVisibility();
877
- }
878
- }
879
- });
880
- // React to window size change
881
- fromEvent(window, 'resize')
882
- .pipe(takeUntil$1(this.unsubscribe), debounceTime(250))
883
- .subscribe(() => {
884
- this.resize();
885
- });
886
- }
887
- ngOnDestroy() {
888
- this.unsubscribe.next();
889
- this.unsubscribe.complete();
818
+ this.clipboard = inject(Clipboard);
819
+ this.clipperService = inject(ClipperService);
820
+ this.broadcastService = inject(BroadcastService);
821
+ this.dialogService = inject(ApplicationDialogService);
890
822
  }
891
- ngAfterViewInit() {
892
- setTimeout(() => {
893
- // Handle filter pane
894
- this.handleFilterPaneVisibility();
895
- // Handle facets
896
- if (this.facets) {
897
- this.facets.changed
898
- .subscribe((value) => {
899
- this.snapshot.facets = value;
900
- if (this.snapshot.facets.fromDate) {
901
- this.filterParams.fromDate = this.snapshot.facets.fromDate;
902
- this.filterParams.toDate = this.snapshot.facets.toDate;
903
- this.filterParams.year = this.snapshot.facets.fromDate.getFullYear();
904
- }
905
- else if (this.snapshot.facets.changedInterval) {
906
- this.filterParams.year = null;
907
- this.filterParams.fromDate = null;
908
- this.filterParams.toDate = null;
823
+ /**
824
+ * Export a document in pdf format
825
+ * @param item : the document to export
826
+ */
827
+ exportPdf(item) {
828
+ if (!this.clipperService.loggedIn())
829
+ return;
830
+ if (!item)
831
+ return;
832
+ this.dialogService
833
+ .confirm("Confermi l'esportazione?", 'Attenzione!')
834
+ .componentInstance.choosen.subscribe((r) => {
835
+ if (r.result === 'ok') {
836
+ const id = item.id || item.documentId;
837
+ this.dialogService.busy('Esportazione in corso...');
838
+ this.clipperService.exportPdf(id)
839
+ .subscribe({
840
+ next: (r2) => {
841
+ saveAs(r2, (item.title1 ? item.title1 : id) + '.pdf');
842
+ },
843
+ complete: () => {
844
+ this.dialogService.clearBusy();
909
845
  }
910
- if (this.snapshot.facets.sector || this.snapshot.facets.changedSector)
911
- this.filterParams.sector = this.snapshot.facets.sector;
912
- if (this.snapshot.facets.type || this.snapshot.facets.changedType)
913
- this.filterParams.type = this.snapshot.facets.type;
914
- if (this.snapshot.facets.author || this.snapshot.facets.changedAuthor)
915
- this.filterParams.author = this.snapshot.facets.author;
916
- this.fetch(true);
917
846
  });
918
847
  }
919
- }, 0);
920
- this.fetch(true);
921
- this.restoreFacets();
922
- this.resize();
923
- this.changeDetector.detectChanges();
848
+ });
924
849
  }
925
850
  /**
926
- * Resize
851
+ * Save current document list or just the selected documents as a csv
852
+ * @param items: the item list
853
+ * @param searchParams: the search params
927
854
  */
928
- resize() {
929
- setTimeout(() => {
930
- let elem = document.getElementById('clipper-references-scrollable');
931
- if (elem) {
932
- const height = this.dialogService.getCurrentDialogScrollableHeight(['clipper-references-fixed'], window.innerHeight);
933
- if (height != elem.clientHeight) {
934
- elem.setAttribute('style', 'padding:0 0 0 0;' + height + 'px !important;max-height:' + height + 'px !important');
935
- }
936
- }
937
- else {
938
- this.resize();
855
+ exportItems(items, searchParams = null) {
856
+ if (!this.clipperService.loggedIn())
857
+ return;
858
+ const ids = items?.map(n => n.documentId ?? n.id) ?? [];
859
+ let model = { ids: ids, query: null, format: 1 };
860
+ if (model.ids.length === 0) {
861
+ model.query = searchParams;
862
+ }
863
+ this.dialogService.busy('Salvataggio in corso...');
864
+ this.clipperService.export(model)
865
+ .subscribe({
866
+ next: (r) => {
867
+ saveAs(r, 'elenco.csv');
868
+ },
869
+ complete: () => {
870
+ this.dialogService.clearBusy();
939
871
  }
940
- }, 0);
941
- }
942
- /**
943
- * Show hide filter pane manually
944
- */
945
- toggleFilterPane() {
946
- this.filterPaneClosed = !this.filterPaneClosed;
947
- this.filterPane?.toggle();
872
+ });
948
873
  }
949
874
  /**
950
- * Handle filter pane visibility
875
+ * Archive a list of items
876
+ * @param items: the item list
951
877
  */
952
- handleFilterPaneVisibility() {
953
- if (this.filterPane) {
954
- if (this.breakpointObserver.isMatched(Breakpoints.XSmall) ||
955
- this.breakpointObserver.isMatched(Breakpoints.Small) ||
956
- this.breakpointObserver.isMatched(Breakpoints.Medium)) {
957
- if (this.filterPane.opened) {
958
- this.filterPane.close();
959
- }
960
- this.filterPane.mode = 'over';
961
- this.filterPane.disableClose = false;
962
- this.filterPaneHasBackdrop = true;
963
- }
964
- else {
965
- if (!this.filterPane.opened && !this.filterPaneClosed && this.hasFacets()) {
966
- this.filterPane.open();
967
- }
968
- else if (this.filterPane.opened && this.filterPaneClosed) {
969
- this.filterPane.close();
970
- }
971
- this.filterPane.mode = 'side';
972
- this.filterPane.disableClose = true;
973
- this.filterPaneHasBackdrop = false;
974
- }
975
- }
878
+ addToArchive(items) {
879
+ this.broadcastService.sendMessage(ClipperMessages.COMMAND_ARCHIVE_ADD, items);
976
880
  }
977
881
  /**
978
- * Close dialog
882
+ * Create a new deadline
883
+ * @param item : the item to add
979
884
  */
980
- close() {
981
- this.dialogRef.close();
885
+ addToCalendar(item) {
886
+ this.broadcastService.sendMessage(ClipperMessages.COMMAND_CALENDAR_ADD, item);
982
887
  }
983
888
  /**
984
- * Send document links by email
985
- * @param item : the item to add
986
- */
987
- sendTo(item = null) {
988
- this.sendItemsTo(item ? [item] : this.selection?.all);
889
+ * Add a list of items to working documents
890
+ * @param items : the item list
891
+ */
892
+ addItemsToWorkingDocuments(items) {
893
+ this.broadcastService.sendMessage(ClipperMessages.COMMAND_WORKING_ADD, items);
989
894
  }
990
895
  /**
991
- * Perform a search
992
- * @param newSearch: true if is a new search
993
- */
994
- fetch(newSearch = false) {
896
+ * Add a list of items to working documents
897
+ * @param items : the item list
898
+ */
899
+ addItemsToBag(items) {
995
900
  if (!this.clipperService.loggedIn())
996
901
  return;
997
- if (newSearch)
998
- this.filterParams.first = 0;
999
- this.filterParams.useModifierInfo =
1000
- this.filterParams.mode === ClipperQueryReferencesMode.ChangesOut;
1001
- this.filterParams.returnModifierInfo =
1002
- this.filterParams.mode !== ClipperQueryReferencesMode.ChangesOut;
1003
- this.dialogService.busy('Ricerca in corso...');
1004
- this.clipperService.references(this.filterParams.toReferencesSearchParams())
1005
- .subscribe({
902
+ const ids = items?.map(n => n.documentId ?? n.id) ?? [];
903
+ this.clipperService.addToBag(ids).subscribe({
1006
904
  next: (r) => {
1007
- if (!r.success)
905
+ if (!r.success) {
1008
906
  this.dialogService.error(r.message);
907
+ }
1009
908
  else {
1010
- this.prepareResults(r.value);
1011
- // Handle facets
1012
- if (this.snapshot.total > 0) {
1013
- if (newSearch)
1014
- // Update facets
1015
- this.fetchFacets();
1016
- }
1017
- else {
1018
- this.facets?.reset();
1019
- this.filterPane.close();
1020
- }
1021
- if (newSearch) {
1022
- if (this.paginator)
1023
- this.paginator.pageIndex = 0;
1024
- }
1025
- this.scroll(0);
1026
- }
1027
- },
1028
- complete: () => {
1029
- this.dialogService.clearBusy();
1030
- }
1031
- });
1032
- }
1033
- /**
1034
- * Show a new page result
1035
- * @param e : the MatPaginator PageEvent data
1036
- */
1037
- fetchMore(e) {
1038
- let first = e.pageIndex * this.filterParams.count;
1039
- this.filterParams.first = first;
1040
- this.fetch();
1041
- }
1042
- /**
1043
- * Get facets
1044
- */
1045
- fetchFacets() {
1046
- if (!this.clipperService.loggedIn())
1047
- return;
1048
- if (!this.snapshot.facets || this.snapshot.facets?.hasMoreFacets) {
1049
- this.filterBusy.set(true);
1050
- this.clipperService.referencesFacets(this.filterParams.toReferencesSearchParams())
1051
- .subscribe({
1052
- next: (r) => {
1053
- if (r.success) {
1054
- this.prepareResults(null, r.value);
1055
- this.handleFilterPaneVisibility();
1056
- }
1057
- },
1058
- complete: () => {
1059
- this.filterBusy.set(false);
1060
- }
1061
- });
1062
- }
1063
- }
1064
- /**
1065
- * Try to restore stored facets
1066
- */
1067
- restoreFacets() {
1068
- if (this.snapshot.facets) {
1069
- this.facets.restore(this.snapshot.facets);
1070
- this.handleFilterPaneVisibility();
1071
- }
1072
- }
1073
- /**
1074
- * Close current dialog and return the id to navigate to
1075
- * @param documentId : the document id
1076
- */
1077
- open(documentId) {
1078
- this.dialogRef.close({ id: documentId });
1079
- }
1080
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: ClipperReferencesComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1081
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.0", type: ClipperReferencesComponent, isStandalone: true, selector: "ng-component", host: { attributes: { "Bind": SystemUtils.generateUUID() } }, viewQueries: [{ propertyName: "filterPane", first: true, predicate: ["filterPane"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"clipper-references-fixed\">\r\n <div class=\"dialog-header\">\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutGap='10px' fxFill>\r\n <div fxFlex=\"*\">\r\n <h2 mat-dialog-title>{{title}} </h2>\r\n </div>\r\n <div fxLayoutAlign=\"end\">\r\n <button fxFlexAlign=\"start\" type=\"button\" mat-icon-button matTooltip=\"Chiudi\" aria-label=\"Chiudi\"\r\n (click)=\"close()\" class=\"dialog-close\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </div>\r\n </div>\r\n @if (dialogData.mode > 0 || selection?.hasValue() || (snapshot && snapshot.facets?.hasFacets && filterPane &&\r\n (!filterPane.opened || filterPaneClosed))) {\r\n <div style=\"padding: 0 10px 0 24px; height: 48px; min-height: 48px;\">\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\" fxFill>\r\n <div fxFlex=\"*\">\r\n @if (dialogData.mode === 1) {\r\n <mat-slide-toggle name=\"excludeTextReferences\" [(ngModel)]=\"filterParams.excludeTextReferences\"\r\n (change)=\"fetch(true)\">\r\n Mostra solo se citati nelle note\r\n </mat-slide-toggle>\r\n } @else if (dialogData.mode == 2) {\r\n <mat-slide-toggle name=\"excludeNotesReferences\" [(ngModel)]=\"filterParams.excludeNotesReferences\"\r\n (change)=\"fetch(true)\">\r\n Mostra solo se citano nel testo il documento\r\n </mat-slide-toggle>\r\n }\r\n </div>\r\n <div fxLayoutAlign=\"end\">\r\n @if (selection?.hasValue()) {\r\n <button fxFlexAlign=\"center\" type=\"button\" mat-icon-button\r\n matTooltip=\"Azioni da eseguire sugli elementi selezionati\"\r\n [attr.aria-label]=\"'Menu opzioni per elementi selezionati'\" [matMenuTriggerFor]=\"menuSelections\"\r\n [disabled]=\"!snapshot.total\">\r\n <mat-icon aria-hidden=\"false\" [matBadge]=\"selection?.all.length\" matBadgeColor=\"accent\">checklist</mat-icon>\r\n </button>\r\n }\r\n <mat-menu #menuSelections=\"matMenu\">\r\n <clipper-document-menu [parent]=\"this\" [selectionSource]=\"selection\" [isReadable]=\"false\"\r\n [isReference]=\"true\">\r\n </clipper-document-menu>\r\n </mat-menu>\r\n @if (snapshot && snapshot.facets?.hasFacets && filterPane && (!filterPane.opened || filterPaneClosed)) {\r\n <div fxFlexAlign=\"center\">\r\n <button type=\"button\" mat-icon-button matTooltip=\"Affina ricerca\" aria-label=\"'Affina ricerca'\"\r\n (click)=\"toggleFilterPane()\">\r\n <mat-icon>menu_open</mat-icon>\r\n </button>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n<div mat-dialog-content id=\"clipper-references-scrollable\">\r\n <mat-drawer-container class=\"fill\" [hasBackdrop]=\"filterPaneHasBackdrop\">\r\n <mat-drawer #filterPane position=\"end\" class=\"drawer-small drawer-with-loader\" opened=\"false\">\r\n @if (filterBusy()) {\r\n <div class=\"overlay\"></div>\r\n }\r\n <div fxLayout=\"column\" fxFill>\r\n <div fxFlex=\"6px\">\r\n @if (filterBusy()) {\r\n <mat-progress-bar style=\"z-index: 11;\" mode=\"indeterminate\">\r\n </mat-progress-bar>\r\n }\r\n </div>\r\n <div fxFlex=\"56px\" class=\"title-container-with-loader\">\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxFill>\r\n <div fxFlexAlign=\"center\" class=\"title\">Affina ricerca</div>\r\n <div fxFlex=\"*\" fxLayoutAlign=\"end\">\r\n <button fxFlexAlign=\"center\" mat-icon-button (click)=\"toggleFilterPane()\"\r\n matTooltip=\"Nascondi\"><mat-icon>close</mat-icon></button>\r\n </div>\r\n </div>\r\n </div>\r\n <div fxFlex=\"*\" class=\"scroll-hidden\" style=\"padding: 0 5px;\">\r\n <clipper-search-facets #facets></clipper-search-facets>\r\n </div>\r\n </div>\r\n </mat-drawer>\r\n <div fxLayout=\"column\" fxFill>\r\n <div fxFlex=\"*\" [id]=\"scrollerId\" class=\"scroll-auto\" style=\"padding: 0 5px;\">\r\n @if (!snapshot.total) {\r\n <div>\r\n <p class=\"message\"><i>Nessun elemento da visualizzare.</i></p>\r\n </div>\r\n } @else {\r\n <div>\r\n @for (item of snapshot.items; track $index; let i = $index) {\r\n @if (item.group) {\r\n <div class=\"items-group-title\">\r\n <div [ngClass]=\"{'group-spaced': i > 0}\">{{item.group}}</div>\r\n </div>\r\n }\r\n <clipper-search-result-item [item]=\"item\" [parent]=\"this\" [actions]=\"contextMenu\"></clipper-search-result-item>\r\n }\r\n <mat-menu #contextMenu=\"matMenu\" (closed)=\"updateMenuButtonsVisibility()\">\r\n <ng-template matMenuContent let-item=\"item\">\r\n <clipper-document-menu [parent]=\"this\" [item]=\"item\" [isReadable]=\"false\" [isReference]=\"true\">\r\n </clipper-document-menu>\r\n </ng-template>\r\n </mat-menu>\r\n </div>\r\n }\r\n </div>\r\n <!-- footer -->\r\n @if ((snapshot?.total ?? 0) > 0) {\r\n <div class=\"items-footer\">\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxLayoutAlign=\"end center\" fxFill>\r\n <mat-paginator #paginator class=\"paginator\" [hidePageSize]=\"true\" [length]=\"snapshot?.total ?? 0\"\r\n [pageSize]=\"filterParams.count ?? 15\" [showFirstLastButtons]=\"true\" (page)=\"fetchMore($event)\">\r\n </mat-paginator>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n </mat-drawer-container>\r\n</div>", styles: [".dialog-info{font-size:x-small;font-weight:700;text-align:right;padding:10px}.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #388E3C)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #a80710)}.dialog-header{padding-bottom:20px}.dialog-close{margin-right:10px;margin-top:10px}.dialog-menu{margin-left:10px;margin-top:10px}.dialog-title{padding:0 24px}.section-title{font-size:large;font-weight:600;padding-top:10px;padding-bottom:8px}.center{text-align:center}.wide{min-width:100%!important;max-width:100%!important;width:100%!important}.fill{min-width:100%!important;max-width:100%!important;width:100%!important;min-height:100%!important;max-height:100%!important;height:100%!important}.scroll-auto{overflow:auto}.scroll-hidden{overflow:hidden}b{font-weight:700}.large{font-size:large!important}.smaller{font-size:smaller}.small{font-size:small!important;line-height:16px}.small-icon-button{width:1.5rem!important;height:1.5rem!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center}.small-icon-button .mat-mdc-button-touch-target{width:1.5rem!important;height:1.5rem!important}.x-small{font-size:x-small!important;line-height:14px}.bold{font-weight:700}.uppercase{text-transform:uppercase!important}.lowercase{text-transform:lowercase!important}.truncated{min-width:0;max-width:100%}.truncated span,.truncated div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.clipped{min-width:0;max-width:100%}.clipped span,.clipped div{white-space:nowrap;overflow:hidden;text-overflow:clip}.accent{color:var(--ars-accent, #7894ae)!important}.primary{color:var(--ars-primary, #00a293)!important}.secondary{color:var(--ars-secondary, #4a635f)!important}.error{color:var(--ars-error, #ff5449)!important}.warning{color:var(--ars-warning, #FFC107)!important}.overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10;background-color:var(--ars-color-overlay, rgba(255, 255, 255, .75))}.drawer-content{padding-top:10px}.drawer,.drawer-small{min-width:420px!important;max-width:420px!important;padding:20px 0 0}.drawer .title-container,.drawer-small .title-container{padding:20px 10px}.drawer .title-container-with-loader,.drawer-small .title-container-with-loader{padding:14px 10px 20px}.drawer .title,.drawer-small .title{font-size:1.2em;font-weight:600;padding-left:10px;min-width:200px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.drawer .accordion-panel,.drawer-small .accordion-panel{background-color:transparent!important}.drawer .accordion-header,.drawer-small .accordion-header{padding-left:15px;padding-right:20px;border-radius:var(--mat-expansion-container-shape)}.drawer .mat-expansion-panel-body,.drawer-small .mat-expansion-panel-body{padding-bottom:20px!important}.drawer-with-loader{padding-top:0!important}.drawer-transparent{background-color:transparent}.drawer-small{min-width:360px!important;max-width:360px!important}.drawer-small .title{min-width:150px}@media screen and (min-width: 0px) and (max-width: 359px){.drawer{min-width:360px!important;max-width:360px!important}.drawer .title{min-width:150px}}.fade-in{animation:fadein .5s linear}@keyframes fadein{0%{opacity:0}to{opacity:1}}@media (prefers-color-scheme: dark){.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #4CAF50)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #ff5449)}b{font-weight:600}}.clipper-logo{background-size:110px 48px;width:110px;height:48px}.clipper-selection-button{width:150px;font-size:small;font-weight:600;text-transform:uppercase}.clipper-selection-icon-button{background-color:var(--ars-primary, #00a293);color:var(--ars-color-text-low, #e0e2e5)}.clipper-selection-icon-button:hover{background-color:var(--ars-primary-hi, #12c0ae)}.expired,.unread{color:var(--ars-error, #ff5449)!important}.expiring{color:var(--ars-warning, #FFC107)!important}.error-bg,.expired-bg,.unread-bg{background-color:var(--ars-error, #ff5449)}.expiring-bg{background-color:var(--ars-warning, #FFC107)}.popular-bg{background-color:#388e3c}.very-popular-bg{background-color:#4caf50}.item-selected{background-color:var(--ars-item-selected-background-color, #ced1d2);border-radius:0!important}.item-unread{font-weight:bolder}.items-group-title{color:var(--ars-accent, #7894ae);font-size:large;font-weight:700;padding-left:25px;padding-bottom:10px;padding-top:10px}.items-group-title .group-spaced{padding:10px 0 0!important}.items-footer{padding-top:10px}.item{border-radius:12px;padding:10px 6px 10px 0;min-height:68px!important;margin-bottom:2px}.item:hover{background-color:var(--ars-item-hover-background-color, #eaecef)}.item-content .info-1{font-size:x-small;font-weight:700;line-height:15px;text-transform:uppercase;color:var(--ars-accent, #7894ae)}.item-content .info-2{font-size:x-small;font-weight:700;line-height:15px;text-transform:uppercase;color:var(--ars-accent-low, #456179)}.item-content .title{font-size:small;line-height:18px}.item-content .details{margin-top:4px;font-size:x-small;font-weight:700;line-height:15px;color:var(--ars-accent-low, #456179);text-transform:uppercase;border-left:4px solid var(--ars-accent-low, #456179);padding-left:10px}.item-content .details .links{text-transform:none;text-decoration:none}.item-content .details .links a,.item-content .details .links span,.item-content .details .links div{margin-right:8px;font-weight:600;color:var(--ars-color-text, #191c1b)}.item-content .details .links a{cursor:pointer!important;color:var(--ars-link, #03A9F4);font-weight:600}.item-content a.link{color:var(--ars-link, #03A9F4);cursor:pointer!important}.item-content:hover{-webkit-mask-image:linear-gradient(to right,black 85%,transparent 100%);mask-image:linear-gradient(to right,black 85%,transparent 100%)}.tile:hover{background-color:var(--ars-item-hover-background-color, #eaecef);border-radius:12px}.tile{cursor:pointer;padding:10px 13px;margin-bottom:2px}.tile .body{padding:4px 6px}.tile .image-mark{border-top:6px solid transparent;margin:0 8px}.tile .image-mark-unread{border-top-color:var(--ars-error, #ff5449);margin:0 8px}.tile .image{height:180px;position:relative;background-color:transparent;overflow:hidden;display:flex;justify-content:center;align-items:center;border-radius:8px}.tile .image img{object-fit:cover;width:100%;height:100%}.tile .image .info-1{position:absolute;left:0;bottom:0;padding:4px 8px;background-color:var(--ars-color-overlay, rgba(255, 255, 255, .75));color:var(--ars-color-text, #191c1b);font-size:small;font-weight:700;text-transform:uppercase}.tile .image .info-2{position:absolute;right:0;top:0;padding:4px 8px;background-color:var(--ars-color-overlay, rgba(255, 255, 255, .75));color:var(--ars-accent, #7894ae);font-size:small;font-weight:700;text-transform:uppercase}.tile .image .buttons{position:absolute;left:0;top:0;height:42px}.tile .image .buttons .check,.tile .image .buttons .read{background-color:var(--ars-primary, #00a293);color:var(--ars-color-text-low, #e0e2e5)}.tile .image .buttons .check-selected{background-color:var(--ars-primary-hi, #12c0ae)}.tile .date{padding:8px 0 6px;font-weight:700;text-transform:uppercase}.tile .date .date-day{color:var(--ars-accent, #7894ae)}.tile .date .date-divider{width:1px;margin:0 8px;border-left:1px solid var(--ars-color-divider, #757d87)}.tile .time{font-size:small;font-weight:700}.tile .title{text-decoration:none;font-size:small;min-height:72px;overflow:hidden}.badge,.badge-red{margin-left:10px;padding:1px 4px;border-radius:3px;font-size:x-small;font-weight:600;text-align:center;background-color:var(--ars-accent, #7894ae);text-transform:uppercase;white-space:nowrap;color:var(--ars-color-text, #191c1b)}.badge-red{background-color:var(--ars-error, #ff5449);color:var(--ars-color-text, #191c1b)}.busy-backdrop{background-color:#00000052!important}.legend-container{display:flex;flex-direction:row;align-items:center;font-size:x-small;text-transform:uppercase;font-weight:500;margin-left:10px}.legend-container .legend{display:inline-block;height:8px;width:8px;margin-right:4px}.legend-container .next{margin-left:8px}.special-date,.special-date-expired{border:2px var(--ars-accent, #7894ae) solid!important;border-radius:100%!important}.special-date-expired{border:2px var(--ars-error, #ff5449) solid!important}.message{color:var(--ars-color-secondary, #4a635f);padding:20px;text-align:center}\n"], dependencies: [{ kind: "ngmodule", type: FlexLayoutModule }, { kind: "directive", type: i1.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i1.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i1.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i1.FlexFillDirective, selector: "[fxFill], [fxFlexFill]" }, { kind: "directive", type: i1.DefaultFlexAlignDirective, selector: " [fxFlexAlign], [fxFlexAlign.xs], [fxFlexAlign.sm], [fxFlexAlign.md], [fxFlexAlign.lg], [fxFlexAlign.xl], [fxFlexAlign.lt-sm], [fxFlexAlign.lt-md], [fxFlexAlign.lt-lg], [fxFlexAlign.lt-xl], [fxFlexAlign.gt-xs], [fxFlexAlign.gt-sm], [fxFlexAlign.gt-md], [fxFlexAlign.gt-lg]", inputs: ["fxFlexAlign", "fxFlexAlign.xs", "fxFlexAlign.sm", "fxFlexAlign.md", "fxFlexAlign.lg", "fxFlexAlign.xl", "fxFlexAlign.lt-sm", "fxFlexAlign.lt-md", "fxFlexAlign.lt-lg", "fxFlexAlign.lt-xl", "fxFlexAlign.gt-xs", "fxFlexAlign.gt-sm", "fxFlexAlign.gt-md", "fxFlexAlign.gt-lg"] }, { kind: "directive", type: i1.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: i2$1.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { kind: "directive", type: MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i3$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "ngmodule", type: MatSlideToggleModule }, { kind: "component", type: i15.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "color", "disabled", "disableRipple", "tabIndex", "checked", "hideIcon"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i11.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "directive", type: i11.MatMenuContent, selector: "ng-template[matMenuContent]" }, { kind: "directive", type: i11.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: MatBadgeModule }, { kind: "directive", type: i9.MatBadge, selector: "[matBadge]", inputs: ["matBadgeColor", "matBadgeOverlap", "matBadgeDisabled", "matBadgePosition", "matBadge", "matBadgeDescription", "matBadgeSize", "matBadgeHidden"] }, { kind: "ngmodule", type: MatPaginatorModule }, { kind: "component", type: i10.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "directive", type: MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "ngmodule", type: MatSidenavModule }, { kind: "component", type: i11$1.MatDrawer, selector: "mat-drawer", inputs: ["position", "mode", "disableClose", "autoFocus", "opened"], outputs: ["openedChange", "opened", "openedStart", "closed", "closedStart", "positionChanged"], exportAs: ["matDrawer"] }, { kind: "component", type: i11$1.MatDrawerContainer, selector: "mat-drawer-container", inputs: ["autosize", "hasBackdrop"], outputs: ["backdropClick"], exportAs: ["matDrawerContainer"] }, { kind: "ngmodule", type: MatProgressBarModule }, { kind: "component", type: i12.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: ClipperDocumentMenuComponent, selector: "clipper-document-menu", inputs: ["parent", "selectionSource", "useSelections", "item", "isReference", "isReadable", "isDeadline", "isLawInForce", "isLaw"] }, { kind: "component", type: ClipperSearchFacetsComponent, selector: "clipper-search-facets", outputs: ["changed"] }, { kind: "component", type: ClipperSearchResultItemComponent, selector: "clipper-search-result-item", inputs: ["parent", "item", "actions", "tileNoPictureUrl", "tilePictureUrl", "isSelectable", "isReadable", "displayModelName", "displayMode"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1082
- }
1083
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: ClipperReferencesComponent, decorators: [{
1084
- type: Component,
1085
- args: [{ host: { 'Bind': SystemUtils.generateUUID() }, standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
1086
- FlexLayoutModule,
1087
- MatDialogTitle,
1088
- MatButtonModule,
1089
- MatTooltipModule,
1090
- MatIconModule,
1091
- MatCheckboxModule,
1092
- MatSlideToggleModule,
1093
- FormsModule,
1094
- MatMenuModule,
1095
- MatBadgeModule,
1096
- MatPaginatorModule,
1097
- MatDialogContent,
1098
- MatSidenavModule,
1099
- MatProgressBarModule,
1100
- ClipperDocumentMenuComponent,
1101
- ClipperSearchFacetsComponent,
1102
- ClipperSearchResultItemComponent
1103
- ], template: "<div class=\"clipper-references-fixed\">\r\n <div class=\"dialog-header\">\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutGap='10px' fxFill>\r\n <div fxFlex=\"*\">\r\n <h2 mat-dialog-title>{{title}} </h2>\r\n </div>\r\n <div fxLayoutAlign=\"end\">\r\n <button fxFlexAlign=\"start\" type=\"button\" mat-icon-button matTooltip=\"Chiudi\" aria-label=\"Chiudi\"\r\n (click)=\"close()\" class=\"dialog-close\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </div>\r\n </div>\r\n @if (dialogData.mode > 0 || selection?.hasValue() || (snapshot && snapshot.facets?.hasFacets && filterPane &&\r\n (!filterPane.opened || filterPaneClosed))) {\r\n <div style=\"padding: 0 10px 0 24px; height: 48px; min-height: 48px;\">\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\" fxFill>\r\n <div fxFlex=\"*\">\r\n @if (dialogData.mode === 1) {\r\n <mat-slide-toggle name=\"excludeTextReferences\" [(ngModel)]=\"filterParams.excludeTextReferences\"\r\n (change)=\"fetch(true)\">\r\n Mostra solo se citati nelle note\r\n </mat-slide-toggle>\r\n } @else if (dialogData.mode == 2) {\r\n <mat-slide-toggle name=\"excludeNotesReferences\" [(ngModel)]=\"filterParams.excludeNotesReferences\"\r\n (change)=\"fetch(true)\">\r\n Mostra solo se citano nel testo il documento\r\n </mat-slide-toggle>\r\n }\r\n </div>\r\n <div fxLayoutAlign=\"end\">\r\n @if (selection?.hasValue()) {\r\n <button fxFlexAlign=\"center\" type=\"button\" mat-icon-button\r\n matTooltip=\"Azioni da eseguire sugli elementi selezionati\"\r\n [attr.aria-label]=\"'Menu opzioni per elementi selezionati'\" [matMenuTriggerFor]=\"menuSelections\"\r\n [disabled]=\"!snapshot.total\">\r\n <mat-icon aria-hidden=\"false\" [matBadge]=\"selection?.all.length\" matBadgeColor=\"accent\">checklist</mat-icon>\r\n </button>\r\n }\r\n <mat-menu #menuSelections=\"matMenu\">\r\n <clipper-document-menu [parent]=\"this\" [selectionSource]=\"selection\" [isReadable]=\"false\"\r\n [isReference]=\"true\">\r\n </clipper-document-menu>\r\n </mat-menu>\r\n @if (snapshot && snapshot.facets?.hasFacets && filterPane && (!filterPane.opened || filterPaneClosed)) {\r\n <div fxFlexAlign=\"center\">\r\n <button type=\"button\" mat-icon-button matTooltip=\"Affina ricerca\" aria-label=\"'Affina ricerca'\"\r\n (click)=\"toggleFilterPane()\">\r\n <mat-icon>menu_open</mat-icon>\r\n </button>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n<div mat-dialog-content id=\"clipper-references-scrollable\">\r\n <mat-drawer-container class=\"fill\" [hasBackdrop]=\"filterPaneHasBackdrop\">\r\n <mat-drawer #filterPane position=\"end\" class=\"drawer-small drawer-with-loader\" opened=\"false\">\r\n @if (filterBusy()) {\r\n <div class=\"overlay\"></div>\r\n }\r\n <div fxLayout=\"column\" fxFill>\r\n <div fxFlex=\"6px\">\r\n @if (filterBusy()) {\r\n <mat-progress-bar style=\"z-index: 11;\" mode=\"indeterminate\">\r\n </mat-progress-bar>\r\n }\r\n </div>\r\n <div fxFlex=\"56px\" class=\"title-container-with-loader\">\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxFill>\r\n <div fxFlexAlign=\"center\" class=\"title\">Affina ricerca</div>\r\n <div fxFlex=\"*\" fxLayoutAlign=\"end\">\r\n <button fxFlexAlign=\"center\" mat-icon-button (click)=\"toggleFilterPane()\"\r\n matTooltip=\"Nascondi\"><mat-icon>close</mat-icon></button>\r\n </div>\r\n </div>\r\n </div>\r\n <div fxFlex=\"*\" class=\"scroll-hidden\" style=\"padding: 0 5px;\">\r\n <clipper-search-facets #facets></clipper-search-facets>\r\n </div>\r\n </div>\r\n </mat-drawer>\r\n <div fxLayout=\"column\" fxFill>\r\n <div fxFlex=\"*\" [id]=\"scrollerId\" class=\"scroll-auto\" style=\"padding: 0 5px;\">\r\n @if (!snapshot.total) {\r\n <div>\r\n <p class=\"message\"><i>Nessun elemento da visualizzare.</i></p>\r\n </div>\r\n } @else {\r\n <div>\r\n @for (item of snapshot.items; track $index; let i = $index) {\r\n @if (item.group) {\r\n <div class=\"items-group-title\">\r\n <div [ngClass]=\"{'group-spaced': i > 0}\">{{item.group}}</div>\r\n </div>\r\n }\r\n <clipper-search-result-item [item]=\"item\" [parent]=\"this\" [actions]=\"contextMenu\"></clipper-search-result-item>\r\n }\r\n <mat-menu #contextMenu=\"matMenu\" (closed)=\"updateMenuButtonsVisibility()\">\r\n <ng-template matMenuContent let-item=\"item\">\r\n <clipper-document-menu [parent]=\"this\" [item]=\"item\" [isReadable]=\"false\" [isReference]=\"true\">\r\n </clipper-document-menu>\r\n </ng-template>\r\n </mat-menu>\r\n </div>\r\n }\r\n </div>\r\n <!-- footer -->\r\n @if ((snapshot?.total ?? 0) > 0) {\r\n <div class=\"items-footer\">\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxLayoutAlign=\"end center\" fxFill>\r\n <mat-paginator #paginator class=\"paginator\" [hidePageSize]=\"true\" [length]=\"snapshot?.total ?? 0\"\r\n [pageSize]=\"filterParams.count ?? 15\" [showFirstLastButtons]=\"true\" (page)=\"fetchMore($event)\">\r\n </mat-paginator>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n </mat-drawer-container>\r\n</div>", styles: [".dialog-info{font-size:x-small;font-weight:700;text-align:right;padding:10px}.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #388E3C)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #a80710)}.dialog-header{padding-bottom:20px}.dialog-close{margin-right:10px;margin-top:10px}.dialog-menu{margin-left:10px;margin-top:10px}.dialog-title{padding:0 24px}.section-title{font-size:large;font-weight:600;padding-top:10px;padding-bottom:8px}.center{text-align:center}.wide{min-width:100%!important;max-width:100%!important;width:100%!important}.fill{min-width:100%!important;max-width:100%!important;width:100%!important;min-height:100%!important;max-height:100%!important;height:100%!important}.scroll-auto{overflow:auto}.scroll-hidden{overflow:hidden}b{font-weight:700}.large{font-size:large!important}.smaller{font-size:smaller}.small{font-size:small!important;line-height:16px}.small-icon-button{width:1.5rem!important;height:1.5rem!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center}.small-icon-button .mat-mdc-button-touch-target{width:1.5rem!important;height:1.5rem!important}.x-small{font-size:x-small!important;line-height:14px}.bold{font-weight:700}.uppercase{text-transform:uppercase!important}.lowercase{text-transform:lowercase!important}.truncated{min-width:0;max-width:100%}.truncated span,.truncated div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.clipped{min-width:0;max-width:100%}.clipped span,.clipped div{white-space:nowrap;overflow:hidden;text-overflow:clip}.accent{color:var(--ars-accent, #7894ae)!important}.primary{color:var(--ars-primary, #00a293)!important}.secondary{color:var(--ars-secondary, #4a635f)!important}.error{color:var(--ars-error, #ff5449)!important}.warning{color:var(--ars-warning, #FFC107)!important}.overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10;background-color:var(--ars-color-overlay, rgba(255, 255, 255, .75))}.drawer-content{padding-top:10px}.drawer,.drawer-small{min-width:420px!important;max-width:420px!important;padding:20px 0 0}.drawer .title-container,.drawer-small .title-container{padding:20px 10px}.drawer .title-container-with-loader,.drawer-small .title-container-with-loader{padding:14px 10px 20px}.drawer .title,.drawer-small .title{font-size:1.2em;font-weight:600;padding-left:10px;min-width:200px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.drawer .accordion-panel,.drawer-small .accordion-panel{background-color:transparent!important}.drawer .accordion-header,.drawer-small .accordion-header{padding-left:15px;padding-right:20px;border-radius:var(--mat-expansion-container-shape)}.drawer .mat-expansion-panel-body,.drawer-small .mat-expansion-panel-body{padding-bottom:20px!important}.drawer-with-loader{padding-top:0!important}.drawer-transparent{background-color:transparent}.drawer-small{min-width:360px!important;max-width:360px!important}.drawer-small .title{min-width:150px}@media screen and (min-width: 0px) and (max-width: 359px){.drawer{min-width:360px!important;max-width:360px!important}.drawer .title{min-width:150px}}.fade-in{animation:fadein .5s linear}@keyframes fadein{0%{opacity:0}to{opacity:1}}@media (prefers-color-scheme: dark){.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #4CAF50)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #ff5449)}b{font-weight:600}}.clipper-logo{background-size:110px 48px;width:110px;height:48px}.clipper-selection-button{width:150px;font-size:small;font-weight:600;text-transform:uppercase}.clipper-selection-icon-button{background-color:var(--ars-primary, #00a293);color:var(--ars-color-text-low, #e0e2e5)}.clipper-selection-icon-button:hover{background-color:var(--ars-primary-hi, #12c0ae)}.expired,.unread{color:var(--ars-error, #ff5449)!important}.expiring{color:var(--ars-warning, #FFC107)!important}.error-bg,.expired-bg,.unread-bg{background-color:var(--ars-error, #ff5449)}.expiring-bg{background-color:var(--ars-warning, #FFC107)}.popular-bg{background-color:#388e3c}.very-popular-bg{background-color:#4caf50}.item-selected{background-color:var(--ars-item-selected-background-color, #ced1d2);border-radius:0!important}.item-unread{font-weight:bolder}.items-group-title{color:var(--ars-accent, #7894ae);font-size:large;font-weight:700;padding-left:25px;padding-bottom:10px;padding-top:10px}.items-group-title .group-spaced{padding:10px 0 0!important}.items-footer{padding-top:10px}.item{border-radius:12px;padding:10px 6px 10px 0;min-height:68px!important;margin-bottom:2px}.item:hover{background-color:var(--ars-item-hover-background-color, #eaecef)}.item-content .info-1{font-size:x-small;font-weight:700;line-height:15px;text-transform:uppercase;color:var(--ars-accent, #7894ae)}.item-content .info-2{font-size:x-small;font-weight:700;line-height:15px;text-transform:uppercase;color:var(--ars-accent-low, #456179)}.item-content .title{font-size:small;line-height:18px}.item-content .details{margin-top:4px;font-size:x-small;font-weight:700;line-height:15px;color:var(--ars-accent-low, #456179);text-transform:uppercase;border-left:4px solid var(--ars-accent-low, #456179);padding-left:10px}.item-content .details .links{text-transform:none;text-decoration:none}.item-content .details .links a,.item-content .details .links span,.item-content .details .links div{margin-right:8px;font-weight:600;color:var(--ars-color-text, #191c1b)}.item-content .details .links a{cursor:pointer!important;color:var(--ars-link, #03A9F4);font-weight:600}.item-content a.link{color:var(--ars-link, #03A9F4);cursor:pointer!important}.item-content:hover{-webkit-mask-image:linear-gradient(to right,black 85%,transparent 100%);mask-image:linear-gradient(to right,black 85%,transparent 100%)}.tile:hover{background-color:var(--ars-item-hover-background-color, #eaecef);border-radius:12px}.tile{cursor:pointer;padding:10px 13px;margin-bottom:2px}.tile .body{padding:4px 6px}.tile .image-mark{border-top:6px solid transparent;margin:0 8px}.tile .image-mark-unread{border-top-color:var(--ars-error, #ff5449);margin:0 8px}.tile .image{height:180px;position:relative;background-color:transparent;overflow:hidden;display:flex;justify-content:center;align-items:center;border-radius:8px}.tile .image img{object-fit:cover;width:100%;height:100%}.tile .image .info-1{position:absolute;left:0;bottom:0;padding:4px 8px;background-color:var(--ars-color-overlay, rgba(255, 255, 255, .75));color:var(--ars-color-text, #191c1b);font-size:small;font-weight:700;text-transform:uppercase}.tile .image .info-2{position:absolute;right:0;top:0;padding:4px 8px;background-color:var(--ars-color-overlay, rgba(255, 255, 255, .75));color:var(--ars-accent, #7894ae);font-size:small;font-weight:700;text-transform:uppercase}.tile .image .buttons{position:absolute;left:0;top:0;height:42px}.tile .image .buttons .check,.tile .image .buttons .read{background-color:var(--ars-primary, #00a293);color:var(--ars-color-text-low, #e0e2e5)}.tile .image .buttons .check-selected{background-color:var(--ars-primary-hi, #12c0ae)}.tile .date{padding:8px 0 6px;font-weight:700;text-transform:uppercase}.tile .date .date-day{color:var(--ars-accent, #7894ae)}.tile .date .date-divider{width:1px;margin:0 8px;border-left:1px solid var(--ars-color-divider, #757d87)}.tile .time{font-size:small;font-weight:700}.tile .title{text-decoration:none;font-size:small;min-height:72px;overflow:hidden}.badge,.badge-red{margin-left:10px;padding:1px 4px;border-radius:3px;font-size:x-small;font-weight:600;text-align:center;background-color:var(--ars-accent, #7894ae);text-transform:uppercase;white-space:nowrap;color:var(--ars-color-text, #191c1b)}.badge-red{background-color:var(--ars-error, #ff5449);color:var(--ars-color-text, #191c1b)}.busy-backdrop{background-color:#00000052!important}.legend-container{display:flex;flex-direction:row;align-items:center;font-size:x-small;text-transform:uppercase;font-weight:500;margin-left:10px}.legend-container .legend{display:inline-block;height:8px;width:8px;margin-right:4px}.legend-container .next{margin-left:8px}.special-date,.special-date-expired{border:2px var(--ars-accent, #7894ae) solid!important;border-radius:100%!important}.special-date-expired{border:2px var(--ars-error, #ff5449) solid!important}.message{color:var(--ars-color-secondary, #4a635f);padding:20px;text-align:center}\n"] }]
1104
- }], propDecorators: { filterPane: [{
1105
- type: ViewChild,
1106
- args: ['filterPane']
1107
- }] } });
1108
-
1109
- class ClipperDocumentManager {
1110
- constructor() {
1111
- this.clipboard = inject(Clipboard);
1112
- this.clipperService = inject(ClipperService);
1113
- this.broadcastService = inject(BroadcastService);
1114
- this.dialogService = inject(ApplicationDialogService);
1115
- }
1116
- /**
1117
- * Export a document in pdf format
1118
- * @param item : the document to export
1119
- */
1120
- exportPdf(item) {
1121
- if (!this.clipperService.loggedIn())
1122
- return;
1123
- if (!item)
1124
- return;
1125
- this.dialogService
1126
- .confirm("Confermi l'esportazione?", 'Attenzione!')
1127
- .componentInstance.choosen.subscribe((r) => {
1128
- if (r.result === 'ok') {
1129
- const id = item.id || item.documentId;
1130
- this.dialogService.busy('Esportazione in corso...');
1131
- this.clipperService.exportPdf(id)
1132
- .subscribe({
1133
- next: (r2) => {
1134
- saveAs(r2, (item.title1 ? item.title1 : id) + '.pdf');
1135
- },
1136
- complete: () => {
1137
- this.dialogService.clearBusy();
1138
- }
1139
- });
1140
- }
1141
- });
1142
- }
1143
- /**
1144
- * Save current document list or just the selected documents as a csv
1145
- * @param items: the item list
1146
- * @param searchParams: the search params
1147
- */
1148
- exportItems(items, searchParams = null) {
1149
- if (!this.clipperService.loggedIn())
1150
- return;
1151
- const ids = items?.map(n => n.documentId ?? n.id) ?? [];
1152
- let model = { ids: ids, query: null, format: 1 };
1153
- if (model.ids.length === 0) {
1154
- model.query = searchParams;
1155
- }
1156
- this.dialogService.busy('Salvataggio in corso...');
1157
- this.clipperService.export(model)
1158
- .subscribe({
1159
- next: (r) => {
1160
- saveAs(r, 'elenco.csv');
1161
- },
1162
- complete: () => {
1163
- this.dialogService.clearBusy();
1164
- }
1165
- });
1166
- }
1167
- /**
1168
- * Archive a list of items
1169
- * @param items: the item list
1170
- */
1171
- addToArchive(items) {
1172
- this.broadcastService.sendMessage(ClipperMessages.COMMAND_ARCHIVE_ADD, items);
1173
- }
1174
- /**
1175
- * Create a new deadline
1176
- * @param item : the item to add
1177
- */
1178
- addToCalendar(item) {
1179
- this.broadcastService.sendMessage(ClipperMessages.COMMAND_CALENDAR_ADD, item);
1180
- }
1181
- /**
1182
- * Add a list of items to working documents
1183
- * @param items : the item list
1184
- */
1185
- addItemsToWorkingDocuments(items) {
1186
- this.broadcastService.sendMessage(ClipperMessages.COMMAND_WORKING_ADD, items);
1187
- }
1188
- /**
1189
- * Add a list of items to working documents
1190
- * @param items : the item list
1191
- */
1192
- addItemsToBag(items) {
1193
- if (!this.clipperService.loggedIn())
1194
- return;
1195
- const ids = items?.map(n => n.documentId ?? n.id) ?? [];
1196
- this.clipperService.addToBag(ids).subscribe({
1197
- next: (r) => {
1198
- if (!r.success) {
1199
- this.dialogService.error(r.message);
1200
- }
1201
- else {
1202
- this.dialogService.toast('Operazione completata con successo.');
909
+ this.dialogService.toast('Operazione completata con successo.');
1203
910
  }
1204
911
  }
1205
912
  });
@@ -1380,26 +1087,7 @@ class ClipperDocumentManager {
1380
1087
  * @param mode : the snapshot mode
1381
1088
  */
1382
1089
  references(item, mode = ClipperQueryReferencesMode.ReferencesIn) {
1383
- if (!item)
1384
- return;
1385
- const d = this.dialogService.open(ClipperReferencesComponent, {
1386
- ariaLabel: 'riferimenti legati al documento',
1387
- autoFocus: false,
1388
- restoreFocus: false,
1389
- disableClose: false,
1390
- closeOnNavigation: false,
1391
- data: { id: item.documentId, mode: mode },
1392
- panelClass: 'references-container',
1393
- minWidth: '375px',
1394
- maxWidth: '1000px',
1395
- width: '99%',
1396
- height: '99%',
1397
- });
1398
- d.afterClosed()
1399
- .subscribe((r) => {
1400
- if (r && r.id)
1401
- this.open(r.id);
1402
- });
1090
+ console.log("This function must be overridden! (" + item + ", " + mode + ")");
1403
1091
  }
1404
1092
  /**
1405
1093
  * Manage clipper bag
@@ -2010,124 +1698,417 @@ class ClipperSearchResultManager extends ClipperDocumentManager {
2010
1698
  }
2011
1699
  }
2012
1700
  /**
2013
- * Toggle the read flag
2014
- * @param item : the item to update
2015
- * @paran e: the optional click event
1701
+ * Toggle the read flag
1702
+ * @param item : the item to update
1703
+ * @paran e: the optional click event
1704
+ */
1705
+ toggleRead(item, e = null) {
1706
+ e?.preventDefault();
1707
+ e?.stopPropagation();
1708
+ this.setRead(!item?.isRead, item);
1709
+ }
1710
+ /**
1711
+ * Toggle the selection flag
1712
+ * @param item : the item to update
1713
+ * @paran e: the optional click event
1714
+ */
1715
+ toggleSelection(item, e = null) {
1716
+ e?.preventDefault();
1717
+ e?.stopPropagation();
1718
+ this.selection?.toggle(item, item.documentId);
1719
+ }
1720
+ /**
1721
+ * Get the selected id
1722
+ */
1723
+ setRead(value, item = null) {
1724
+ let documentIds = [];
1725
+ if (item) {
1726
+ documentIds = [item.documentId];
1727
+ }
1728
+ else if (this.hasAnySelection()) {
1729
+ documentIds = this.selection?.all?.map(n => n.documentId);
1730
+ }
1731
+ this.clipperService.updateState({ documentIds: documentIds, isRead: value }).subscribe(r => {
1732
+ if (r.success) {
1733
+ if (item) {
1734
+ item.isRead = value;
1735
+ }
1736
+ else if (this.hasAnySelection()) {
1737
+ this.selection?.all?.forEach(n => {
1738
+ n.isRead = value;
1739
+ });
1740
+ }
1741
+ }
1742
+ });
1743
+ }
1744
+ ///
1745
+ // Restorable
1746
+ ///
1747
+ /**
1748
+ * Save restorable data
1749
+ * @param id : the restorable id
1750
+ * @param scroll : the current scroll position
1751
+ */
1752
+ save(id, scroll = 0) {
1753
+ sessionStorage.setItem(id, JSON.stringify({
1754
+ paginator: {
1755
+ page: this.paginator?.pageIndex ?? 0,
1756
+ total: this.snapshot?.total ?? 0,
1757
+ size: this.paginator?.pageSize ?? 15
1758
+ },
1759
+ facets: this.facets?.save(),
1760
+ filterParams: this.filterParams,
1761
+ scroll: scroll,
1762
+ sort: { mode: this.sortMode, options: this.sortOptions },
1763
+ data: this.snapshot
1764
+ ? { items: this.snapshot.items, total: this.snapshot.total }
1765
+ : null
1766
+ }));
1767
+ }
1768
+ /**
1769
+ * Restore data
1770
+ * @param id : the restorable id
1771
+ */
1772
+ restore(id) {
1773
+ const value = sessionStorage.getItem(id);
1774
+ if (value) {
1775
+ const data = JSON.parse(value);
1776
+ if (data) {
1777
+ this.filterParams = data.filterParams;
1778
+ this.snapshot = data.data;
1779
+ this.sortMode = data.sort.mode;
1780
+ this.sortOptions = data.sort.options;
1781
+ if (this.facets && data.facets) {
1782
+ this.facets.restore(data.facets);
1783
+ this.hasFacets.set(data.facets.hasFacets);
1784
+ }
1785
+ if (this.paginator && data.paginator) {
1786
+ this.paginator.pageIndex = data.paginator.page;
1787
+ this.paginator.pageSize = data.paginator.size;
1788
+ this.paginator.length = data.paginator.total;
1789
+ }
1790
+ this.broadcastService.sendMessage(ClipperMessages.COMMAND_SEARCH_RESTORED, data.filterParams);
1791
+ this.changeDetector.detectChanges();
1792
+ // Scroll top
1793
+ setTimeout(() => {
1794
+ this.scroll(data.scroll ?? 0);
1795
+ }, 100);
1796
+ }
1797
+ }
1798
+ }
1799
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: ClipperSearchResultManager, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1800
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.0", type: ClipperSearchResultManager, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "paginator", first: true, predicate: ["paginator"], descendants: true }, { propertyName: "facets", first: true, predicate: ["facets"], descendants: true }, { propertyName: "calendar", first: true, predicate: ["calendar"], descendants: true }], usesInheritance: true, ngImport: i0, template: '<div></div>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1801
+ }
1802
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: ClipperSearchResultManager, decorators: [{
1803
+ type: Component,
1804
+ args: [{
1805
+ template: '<div></div>',
1806
+ standalone: true,
1807
+ changeDetection: ChangeDetectionStrategy.OnPush,
1808
+ imports: [ClipperDocumentManager, ClipperSearchFacetsComponent, ClipperSearchCalendarComponent],
1809
+ }]
1810
+ }], propDecorators: { paginator: [{
1811
+ type: ViewChild,
1812
+ args: ['paginator']
1813
+ }], facets: [{
1814
+ type: ViewChild,
1815
+ args: ['facets']
1816
+ }], calendar: [{
1817
+ type: ViewChild,
1818
+ args: ['calendar']
1819
+ }] } });
1820
+
1821
+ class ClipperReferencesComponent extends ClipperSearchResultManager {
1822
+ constructor() {
1823
+ super(...arguments);
1824
+ this.dialogRef = inject((MatDialogRef));
1825
+ this.dialogData = inject(MAT_DIALOG_DATA) ?? { mode: ClipperQueryReferencesMode.ReferencesIn };
1826
+ this.title = null;
1827
+ this.item = null;
1828
+ }
1829
+ ngOnInit() {
1830
+ if (this.dialogData) {
1831
+ switch (this.dialogData.mode) {
1832
+ case ClipperQueryReferencesMode.ReferencesIn:
1833
+ this.title = "Documenti richiamati nelle note o nel testo";
1834
+ break;
1835
+ case ClipperQueryReferencesMode.ReferencesOut:
1836
+ this.title = "Documenti che richiamano quello in visione";
1837
+ break;
1838
+ case ClipperQueryReferencesMode.ChangesIn:
1839
+ this.title = "Modifiche subite";
1840
+ break;
1841
+ case ClipperQueryReferencesMode.ChangesOut:
1842
+ this.title = "Modifiche apportate";
1843
+ break;
1844
+ case ClipperQueryReferencesMode.Juris:
1845
+ this.title = "Giurisprudenza associata";
1846
+ break;
1847
+ }
1848
+ if (this.dialogData.anchorTitle) {
1849
+ this.title += " - " + this.dialogData.anchorTitle;
1850
+ }
1851
+ // Use service snapshot
1852
+ this.snapshot = this.clipperService.referencesSnapshot ?? { searchParams: new ClipperSearchParams(), interval: "-1" };
1853
+ if (this.filterParams.mode !== this.dialogData.mode ||
1854
+ this.filterParams.id !== this.dialogData.id ||
1855
+ this.filterParams.anchor !== this.dialogData.anchor) {
1856
+ this.filterParams = new ClipperSearchParams();
1857
+ this.filterParams.mode = this.dialogData.mode;
1858
+ this.filterParams.model = this.dialogData.model;
1859
+ this.filterParams.anchor = this.dialogData.anchor;
1860
+ this.filterParams.id = this.dialogData.id;
1861
+ this.filterParams.useModifierInfo = this.dialogData.mode === ClipperQueryReferencesMode.ChangesOut;
1862
+ this.filterParams.returnModifierInfo = this.dialogData.mode !== ClipperQueryReferencesMode.ChangesOut;
1863
+ this.clipperService.referencesSnapshot = this.snapshot;
1864
+ }
1865
+ }
1866
+ // Initialize selection
1867
+ this.selection = new SelectableModel(true, 'documentId');
1868
+ // Observe layout changes
1869
+ this.breakpointObserver
1870
+ .observe([
1871
+ Breakpoints.XSmall,
1872
+ Breakpoints.Small,
1873
+ Breakpoints.Medium,
1874
+ Breakpoints.Large,
1875
+ Breakpoints.XLarge,
1876
+ ])
1877
+ .pipe(takeUntil$1(this.unsubscribe))
1878
+ .subscribe(result => {
1879
+ for (const query of Object.keys(result.breakpoints)) {
1880
+ if (result.breakpoints[query]) {
1881
+ this.handleFilterPaneVisibility();
1882
+ }
1883
+ }
1884
+ });
1885
+ // React to window size change
1886
+ fromEvent(window, 'resize')
1887
+ .pipe(takeUntil$1(this.unsubscribe), debounceTime(250))
1888
+ .subscribe(() => {
1889
+ this.resize();
1890
+ });
1891
+ }
1892
+ ngOnDestroy() {
1893
+ this.unsubscribe.next();
1894
+ this.unsubscribe.complete();
1895
+ }
1896
+ ngAfterViewInit() {
1897
+ setTimeout(() => {
1898
+ // Handle filter pane
1899
+ this.handleFilterPaneVisibility();
1900
+ // Handle facets
1901
+ if (this.facets) {
1902
+ this.facets.changed
1903
+ .subscribe((value) => {
1904
+ this.snapshot.facets = value;
1905
+ if (this.snapshot.facets.fromDate) {
1906
+ this.filterParams.fromDate = this.snapshot.facets.fromDate;
1907
+ this.filterParams.toDate = this.snapshot.facets.toDate;
1908
+ this.filterParams.year = this.snapshot.facets.fromDate.getFullYear();
1909
+ }
1910
+ else if (this.snapshot.facets.changedInterval) {
1911
+ this.filterParams.year = null;
1912
+ this.filterParams.fromDate = null;
1913
+ this.filterParams.toDate = null;
1914
+ }
1915
+ if (this.snapshot.facets.sector || this.snapshot.facets.changedSector)
1916
+ this.filterParams.sector = this.snapshot.facets.sector;
1917
+ if (this.snapshot.facets.type || this.snapshot.facets.changedType)
1918
+ this.filterParams.type = this.snapshot.facets.type;
1919
+ if (this.snapshot.facets.author || this.snapshot.facets.changedAuthor)
1920
+ this.filterParams.author = this.snapshot.facets.author;
1921
+ this.fetch(true);
1922
+ });
1923
+ }
1924
+ }, 0);
1925
+ this.fetch(true);
1926
+ this.restoreFacets();
1927
+ this.resize();
1928
+ this.changeDetector.detectChanges();
1929
+ }
1930
+ /**
1931
+ * Resize
1932
+ */
1933
+ resize() {
1934
+ setTimeout(() => {
1935
+ let elem = document.getElementById('clipper-references-scrollable');
1936
+ if (elem) {
1937
+ const height = this.dialogService.getCurrentDialogScrollableHeight(['clipper-references-fixed'], window.innerHeight);
1938
+ if (height != elem.clientHeight) {
1939
+ elem.setAttribute('style', 'padding:0 0 0 0;' + height + 'px !important;max-height:' + height + 'px !important');
1940
+ }
1941
+ }
1942
+ else {
1943
+ this.resize();
1944
+ }
1945
+ }, 0);
1946
+ }
1947
+ /**
1948
+ * Show hide filter pane manually
1949
+ */
1950
+ toggleFilterPane() {
1951
+ this.filterPaneClosed = !this.filterPaneClosed;
1952
+ this.filterPane?.toggle();
1953
+ }
1954
+ /**
1955
+ * Handle filter pane visibility
1956
+ */
1957
+ handleFilterPaneVisibility() {
1958
+ if (this.filterPane) {
1959
+ if (this.breakpointObserver.isMatched(Breakpoints.XSmall) ||
1960
+ this.breakpointObserver.isMatched(Breakpoints.Small) ||
1961
+ this.breakpointObserver.isMatched(Breakpoints.Medium)) {
1962
+ if (this.filterPane.opened) {
1963
+ this.filterPane.close();
1964
+ }
1965
+ this.filterPane.mode = 'over';
1966
+ this.filterPane.disableClose = false;
1967
+ this.filterPaneHasBackdrop = true;
1968
+ }
1969
+ else {
1970
+ if (!this.filterPane.opened && !this.filterPaneClosed && this.hasFacets()) {
1971
+ this.filterPane.open();
1972
+ }
1973
+ else if (this.filterPane.opened && this.filterPaneClosed) {
1974
+ this.filterPane.close();
1975
+ }
1976
+ this.filterPane.mode = 'side';
1977
+ this.filterPane.disableClose = true;
1978
+ this.filterPaneHasBackdrop = false;
1979
+ }
1980
+ }
1981
+ }
1982
+ /**
1983
+ * Close dialog
2016
1984
  */
2017
- toggleRead(item, e = null) {
2018
- e?.preventDefault();
2019
- e?.stopPropagation();
2020
- this.setRead(!item?.isRead, item);
1985
+ close() {
1986
+ this.dialogRef.close();
2021
1987
  }
2022
1988
  /**
2023
- * Toggle the selection flag
2024
- * @param item : the item to update
2025
- * @paran e: the optional click event
2026
- */
2027
- toggleSelection(item, e = null) {
2028
- e?.preventDefault();
2029
- e?.stopPropagation();
2030
- this.selection?.toggle(item, item.documentId);
1989
+ * Send document links by email
1990
+ * @param item : the item to add
1991
+ */
1992
+ sendTo(item = null) {
1993
+ this.sendItemsTo(item ? [item] : this.selection?.all);
2031
1994
  }
2032
1995
  /**
2033
- * Get the selected id
2034
- */
2035
- setRead(value, item = null) {
2036
- let documentIds = [];
2037
- if (item) {
2038
- documentIds = [item.documentId];
2039
- }
2040
- else if (this.hasAnySelection()) {
2041
- documentIds = this.selection?.all?.map(n => n.documentId);
2042
- }
2043
- this.clipperService.updateState({ documentIds: documentIds, isRead: value }).subscribe(r => {
2044
- if (r.success) {
2045
- if (item) {
2046
- item.isRead = value;
2047
- }
2048
- else if (this.hasAnySelection()) {
2049
- this.selection?.all?.forEach(n => {
2050
- n.isRead = value;
2051
- });
1996
+ * Perform a search
1997
+ * @param newSearch: true if is a new search
1998
+ */
1999
+ fetch(newSearch = false) {
2000
+ if (!this.clipperService.loggedIn())
2001
+ return;
2002
+ if (newSearch)
2003
+ this.filterParams.first = 0;
2004
+ this.filterParams.useModifierInfo =
2005
+ this.filterParams.mode === ClipperQueryReferencesMode.ChangesOut;
2006
+ this.filterParams.returnModifierInfo =
2007
+ this.filterParams.mode !== ClipperQueryReferencesMode.ChangesOut;
2008
+ this.dialogService.busy('Ricerca in corso...');
2009
+ this.clipperService.references(this.filterParams.toReferencesSearchParams())
2010
+ .subscribe({
2011
+ next: (r) => {
2012
+ if (!r.success)
2013
+ this.dialogService.error(r.message);
2014
+ else {
2015
+ this.prepareResults(r.value);
2016
+ // Handle facets
2017
+ if (this.snapshot.total > 0) {
2018
+ if (newSearch)
2019
+ // Update facets
2020
+ this.fetchFacets();
2021
+ }
2022
+ else {
2023
+ this.facets?.reset();
2024
+ this.filterPane.close();
2025
+ }
2026
+ if (newSearch) {
2027
+ if (this.paginator)
2028
+ this.paginator.pageIndex = 0;
2029
+ }
2030
+ this.scroll(0);
2052
2031
  }
2032
+ },
2033
+ complete: () => {
2034
+ this.dialogService.clearBusy();
2053
2035
  }
2054
2036
  });
2055
2037
  }
2056
- ///
2057
- // Restorable
2058
- ///
2059
2038
  /**
2060
- * Save restorable data
2061
- * @param id : the restorable id
2062
- * @param scroll : the current scroll position
2039
+ * Show a new page result
2040
+ * @param e : the MatPaginator PageEvent data
2063
2041
  */
2064
- save(id, scroll = 0) {
2065
- sessionStorage.setItem(id, JSON.stringify({
2066
- paginator: {
2067
- page: this.paginator?.pageIndex ?? 0,
2068
- total: this.snapshot?.total ?? 0,
2069
- size: this.paginator?.pageSize ?? 15
2070
- },
2071
- facets: this.facets?.save(),
2072
- filterParams: this.filterParams,
2073
- scroll: scroll,
2074
- sort: { mode: this.sortMode, options: this.sortOptions },
2075
- data: this.snapshot
2076
- ? { items: this.snapshot.items, total: this.snapshot.total }
2077
- : null
2078
- }));
2042
+ fetchMore(e) {
2043
+ let first = e.pageIndex * this.filterParams.count;
2044
+ this.filterParams.first = first;
2045
+ this.fetch();
2079
2046
  }
2080
2047
  /**
2081
- * Restore data
2082
- * @param id : the restorable id
2048
+ * Get facets
2083
2049
  */
2084
- restore(id) {
2085
- const value = sessionStorage.getItem(id);
2086
- if (value) {
2087
- const data = JSON.parse(value);
2088
- if (data) {
2089
- this.filterParams = data.filterParams;
2090
- this.snapshot = data.data;
2091
- this.sortMode = data.sort.mode;
2092
- this.sortOptions = data.sort.options;
2093
- if (this.facets && data.facets) {
2094
- this.facets.restore(data.facets);
2095
- this.hasFacets.set(data.facets.hasFacets);
2096
- }
2097
- if (this.paginator && data.paginator) {
2098
- this.paginator.pageIndex = data.paginator.page;
2099
- this.paginator.pageSize = data.paginator.size;
2100
- this.paginator.length = data.paginator.total;
2050
+ fetchFacets() {
2051
+ if (!this.clipperService.loggedIn())
2052
+ return;
2053
+ if (!this.snapshot.facets || this.snapshot.facets?.hasMoreFacets) {
2054
+ this.filterBusy.set(true);
2055
+ this.clipperService.referencesFacets(this.filterParams.toReferencesSearchParams())
2056
+ .subscribe({
2057
+ next: (r) => {
2058
+ if (r.success) {
2059
+ this.prepareResults(null, r.value);
2060
+ this.handleFilterPaneVisibility();
2061
+ }
2062
+ },
2063
+ complete: () => {
2064
+ this.filterBusy.set(false);
2101
2065
  }
2102
- this.broadcastService.sendMessage(ClipperMessages.COMMAND_SEARCH_RESTORED, data.filterParams);
2103
- this.changeDetector.detectChanges();
2104
- // Scroll top
2105
- setTimeout(() => {
2106
- this.scroll(data.scroll ?? 0);
2107
- }, 100);
2108
- }
2066
+ });
2109
2067
  }
2110
2068
  }
2111
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: ClipperSearchResultManager, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2112
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.0", type: ClipperSearchResultManager, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "paginator", first: true, predicate: ["paginator"], descendants: true }, { propertyName: "facets", first: true, predicate: ["facets"], descendants: true }, { propertyName: "calendar", first: true, predicate: ["calendar"], descendants: true }], usesInheritance: true, ngImport: i0, template: '<div></div>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2069
+ /**
2070
+ * Try to restore stored facets
2071
+ */
2072
+ restoreFacets() {
2073
+ if (this.snapshot.facets) {
2074
+ this.facets.restore(this.snapshot.facets);
2075
+ this.handleFilterPaneVisibility();
2076
+ }
2077
+ }
2078
+ /**
2079
+ * Close current dialog and return the id to navigate to
2080
+ * @param documentId : the document id
2081
+ */
2082
+ open(documentId) {
2083
+ this.dialogRef.close({ id: documentId });
2084
+ }
2085
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: ClipperReferencesComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2086
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.0", type: ClipperReferencesComponent, isStandalone: true, selector: "ng-component", host: { attributes: { "Bind": SystemUtils.generateUUID() } }, viewQueries: [{ propertyName: "filterPane", first: true, predicate: ["filterPane"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"clipper-references-fixed\">\r\n <div class=\"dialog-header\">\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutGap='10px' fxFill>\r\n <div fxFlex=\"*\">\r\n <h2 mat-dialog-title>{{title}} </h2>\r\n </div>\r\n <div fxLayoutAlign=\"end\">\r\n <button fxFlexAlign=\"start\" type=\"button\" mat-icon-button matTooltip=\"Chiudi\" aria-label=\"Chiudi\"\r\n (click)=\"close()\" class=\"dialog-close\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </div>\r\n </div>\r\n @if (dialogData.mode > 0 || selection?.hasValue() || (snapshot && snapshot.facets?.hasFacets && filterPane &&\r\n (!filterPane.opened || filterPaneClosed))) {\r\n <div style=\"padding: 0 10px 0 24px; height: 48px; min-height: 48px;\">\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\" fxFill>\r\n <div fxFlex=\"*\">\r\n @if (dialogData.mode === 1) {\r\n <mat-slide-toggle name=\"excludeTextReferences\" [(ngModel)]=\"filterParams.excludeTextReferences\"\r\n (change)=\"fetch(true)\">\r\n Mostra solo se citati nelle note\r\n </mat-slide-toggle>\r\n } @else if (dialogData.mode == 2) {\r\n <mat-slide-toggle name=\"excludeNotesReferences\" [(ngModel)]=\"filterParams.excludeNotesReferences\"\r\n (change)=\"fetch(true)\">\r\n Mostra solo se citano nel testo il documento\r\n </mat-slide-toggle>\r\n }\r\n </div>\r\n <div fxLayoutAlign=\"end\">\r\n @if (selection?.hasValue()) {\r\n <button fxFlexAlign=\"center\" type=\"button\" mat-icon-button\r\n matTooltip=\"Azioni da eseguire sugli elementi selezionati\"\r\n [attr.aria-label]=\"'Menu opzioni per elementi selezionati'\" [matMenuTriggerFor]=\"menuSelections\"\r\n [disabled]=\"!snapshot.total\">\r\n <mat-icon aria-hidden=\"false\" [matBadge]=\"selection?.all.length\" matBadgeColor=\"accent\">checklist</mat-icon>\r\n </button>\r\n }\r\n <mat-menu #menuSelections=\"matMenu\">\r\n <clipper-document-menu [parent]=\"this\" [selectionSource]=\"selection\" [isReadable]=\"false\"\r\n [isReference]=\"true\">\r\n </clipper-document-menu>\r\n </mat-menu>\r\n @if (snapshot && snapshot.facets?.hasFacets && filterPane && (!filterPane.opened || filterPaneClosed)) {\r\n <div fxFlexAlign=\"center\">\r\n <button type=\"button\" mat-icon-button matTooltip=\"Affina ricerca\" aria-label=\"'Affina ricerca'\"\r\n (click)=\"toggleFilterPane()\">\r\n <mat-icon>menu_open</mat-icon>\r\n </button>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n<div mat-dialog-content id=\"clipper-references-scrollable\">\r\n <mat-drawer-container class=\"fill\" [hasBackdrop]=\"filterPaneHasBackdrop\">\r\n <mat-drawer #filterPane position=\"end\" class=\"drawer-small drawer-with-loader\" opened=\"false\">\r\n @if (filterBusy()) {\r\n <div class=\"overlay\"></div>\r\n }\r\n <div fxLayout=\"column\" fxFill>\r\n <div fxFlex=\"6px\">\r\n @if (filterBusy()) {\r\n <mat-progress-bar style=\"z-index: 11;\" mode=\"indeterminate\">\r\n </mat-progress-bar>\r\n }\r\n </div>\r\n <div fxFlex=\"56px\" class=\"title-container-with-loader\">\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxFill>\r\n <div fxFlexAlign=\"center\" class=\"title\">Affina ricerca</div>\r\n <div fxFlex=\"*\" fxLayoutAlign=\"end\">\r\n <button fxFlexAlign=\"center\" mat-icon-button (click)=\"toggleFilterPane()\"\r\n matTooltip=\"Nascondi\"><mat-icon>close</mat-icon></button>\r\n </div>\r\n </div>\r\n </div>\r\n <div fxFlex=\"*\" class=\"scroll-hidden\" style=\"padding: 0 5px;\">\r\n <clipper-search-facets #facets></clipper-search-facets>\r\n </div>\r\n </div>\r\n </mat-drawer>\r\n <div fxLayout=\"column\" fxFill>\r\n <div fxFlex=\"*\" [id]=\"scrollerId\" class=\"scroll-auto\" style=\"padding: 0 5px;\">\r\n @if (!snapshot.total) {\r\n <div>\r\n <p class=\"message\"><i>Nessun elemento da visualizzare.</i></p>\r\n </div>\r\n } @else {\r\n <div>\r\n @for (item of snapshot.items; track $index; let i = $index) {\r\n @if (item.group) {\r\n <div class=\"items-group-title\">\r\n <div [ngClass]=\"{'group-spaced': i > 0}\">{{item.group}}</div>\r\n </div>\r\n }\r\n <clipper-search-result-item [item]=\"item\" [parent]=\"this\" [actions]=\"contextMenu\"></clipper-search-result-item>\r\n }\r\n <mat-menu #contextMenu=\"matMenu\" (closed)=\"updateMenuButtonsVisibility()\">\r\n <ng-template matMenuContent let-item=\"item\">\r\n <clipper-document-menu [parent]=\"this\" [item]=\"item\" [isReadable]=\"false\" [isReference]=\"true\">\r\n </clipper-document-menu>\r\n </ng-template>\r\n </mat-menu>\r\n </div>\r\n }\r\n </div>\r\n <!-- footer -->\r\n @if ((snapshot?.total ?? 0) > 0) {\r\n <div class=\"items-footer\">\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxLayoutAlign=\"end center\" fxFill>\r\n <mat-paginator #paginator class=\"paginator\" [hidePageSize]=\"true\" [length]=\"snapshot?.total ?? 0\"\r\n [pageSize]=\"filterParams.count ?? 15\" [showFirstLastButtons]=\"true\" (page)=\"fetchMore($event)\">\r\n </mat-paginator>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n </mat-drawer-container>\r\n</div>", styles: [".dialog-info{font-size:x-small;font-weight:700;text-align:right;padding:10px}.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #388E3C)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #a80710)}.dialog-header{padding-bottom:20px}.dialog-close{margin-right:10px;margin-top:10px}.dialog-menu{margin-left:10px;margin-top:10px}.dialog-title{padding:0 24px}.section-title{font-size:large;font-weight:600;padding-top:10px;padding-bottom:8px}.center{text-align:center}.wide{min-width:100%!important;max-width:100%!important;width:100%!important}.fill{min-width:100%!important;max-width:100%!important;width:100%!important;min-height:100%!important;max-height:100%!important;height:100%!important}.scroll-auto{overflow:auto}.scroll-hidden{overflow:hidden}b{font-weight:700}.large{font-size:large!important}.smaller{font-size:smaller}.small{font-size:small!important;line-height:16px}.small-icon-button{width:1.5rem!important;height:1.5rem!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center}.small-icon-button .mat-mdc-button-touch-target{width:1.5rem!important;height:1.5rem!important}.x-small{font-size:x-small!important;line-height:14px}.bold{font-weight:700}.uppercase{text-transform:uppercase!important}.lowercase{text-transform:lowercase!important}.truncated{min-width:0;max-width:100%}.truncated span,.truncated div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.clipped{min-width:0;max-width:100%}.clipped span,.clipped div{white-space:nowrap;overflow:hidden;text-overflow:clip}.accent{color:var(--ars-accent, #7894ae)!important}.primary{color:var(--ars-primary, #00a293)!important}.secondary{color:var(--ars-secondary, #4a635f)!important}.error{color:var(--ars-error, #ff5449)!important}.warning{color:var(--ars-warning, #FFC107)!important}.overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10;background-color:var(--ars-color-overlay, rgba(255, 255, 255, .75))}.drawer-content{padding-top:10px}.drawer,.drawer-small{min-width:420px!important;max-width:420px!important;padding:20px 0 0}.drawer .title-container,.drawer-small .title-container{padding:20px 10px}.drawer .title-container-with-loader,.drawer-small .title-container-with-loader{padding:14px 10px 20px}.drawer .title,.drawer-small .title{font-size:1.2em;font-weight:600;padding-left:10px;min-width:200px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.drawer .accordion-panel,.drawer-small .accordion-panel{background-color:transparent!important}.drawer .accordion-header,.drawer-small .accordion-header{padding-left:15px;padding-right:20px;border-radius:var(--mat-expansion-container-shape)}.drawer .mat-expansion-panel-body,.drawer-small .mat-expansion-panel-body{padding-bottom:20px!important}.drawer-with-loader{padding-top:0!important}.drawer-transparent{background-color:transparent}.drawer-small{min-width:360px!important;max-width:360px!important}.drawer-small .title{min-width:150px}@media screen and (min-width: 0px) and (max-width: 359px){.drawer{min-width:360px!important;max-width:360px!important}.drawer .title{min-width:150px}}.fade-in{animation:fadein .5s linear}@keyframes fadein{0%{opacity:0}to{opacity:1}}@media (prefers-color-scheme: dark){.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #4CAF50)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #ff5449)}b{font-weight:600}}.clipper-logo{background-size:110px 48px;width:110px;height:48px}.clipper-selection-button{width:150px;font-size:small;font-weight:600;text-transform:uppercase}.clipper-selection-icon-button{background-color:var(--ars-primary, #00a293);color:var(--ars-color-text-low, #e0e2e5)}.clipper-selection-icon-button:hover{background-color:var(--ars-primary-hi, #12c0ae)}.expired,.unread{color:var(--ars-error, #ff5449)!important}.expiring{color:var(--ars-warning, #FFC107)!important}.error-bg,.expired-bg,.unread-bg{background-color:var(--ars-error, #ff5449)}.expiring-bg{background-color:var(--ars-warning, #FFC107)}.popular-bg{background-color:#388e3c}.very-popular-bg{background-color:#4caf50}.item-selected{background-color:var(--ars-item-selected-background-color, #ced1d2);border-radius:0!important}.item-unread{font-weight:bolder}.items-group-title{color:var(--ars-accent, #7894ae);font-size:large;font-weight:700;padding-left:25px;padding-bottom:10px;padding-top:10px}.items-group-title .group-spaced{padding:10px 0 0!important}.items-footer{padding-top:10px}.item{border-radius:12px;padding:10px 6px 10px 0;min-height:68px!important;margin-bottom:2px}.item:hover{background-color:var(--ars-item-hover-background-color, #eaecef)}.item-content .info-1{font-size:x-small;font-weight:700;line-height:15px;text-transform:uppercase;color:var(--ars-accent, #7894ae)}.item-content .info-2{font-size:x-small;font-weight:700;line-height:15px;text-transform:uppercase;color:var(--ars-accent-low, #456179)}.item-content .title{font-size:small;line-height:18px}.item-content .details{margin-top:4px;font-size:x-small;font-weight:700;line-height:15px;color:var(--ars-accent-low, #456179);text-transform:uppercase;border-left:4px solid var(--ars-accent-low, #456179);padding-left:10px}.item-content .details .links{text-transform:none;text-decoration:none}.item-content .details .links a,.item-content .details .links span,.item-content .details .links div{margin-right:8px;font-weight:600;color:var(--ars-color-text, #191c1b)}.item-content .details .links a{cursor:pointer!important;color:var(--ars-link, #03A9F4);font-weight:600}.item-content a.link{color:var(--ars-link, #03A9F4);cursor:pointer!important}.item-content:hover{-webkit-mask-image:linear-gradient(to right,black 85%,transparent 100%);mask-image:linear-gradient(to right,black 85%,transparent 100%)}.tile:hover{background-color:var(--ars-item-hover-background-color, #eaecef);border-radius:12px}.tile{cursor:pointer;padding:10px 13px;margin-bottom:2px}.tile .body{padding:4px 6px}.tile .image-mark{border-top:6px solid transparent;margin:0 8px}.tile .image-mark-unread{border-top-color:var(--ars-error, #ff5449);margin:0 8px}.tile .image{height:180px;position:relative;background-color:transparent;overflow:hidden;display:flex;justify-content:center;align-items:center;border-radius:8px}.tile .image img{object-fit:cover;width:100%;height:100%}.tile .image .info-1{position:absolute;left:0;bottom:0;padding:4px 8px;background-color:var(--ars-color-overlay, rgba(255, 255, 255, .75));color:var(--ars-color-text, #191c1b);font-size:small;font-weight:700;text-transform:uppercase}.tile .image .info-2{position:absolute;right:0;top:0;padding:4px 8px;background-color:var(--ars-color-overlay, rgba(255, 255, 255, .75));color:var(--ars-accent, #7894ae);font-size:small;font-weight:700;text-transform:uppercase}.tile .image .buttons{position:absolute;left:0;top:0;height:42px}.tile .image .buttons .check,.tile .image .buttons .read{background-color:var(--ars-primary, #00a293);color:var(--ars-color-text-low, #e0e2e5)}.tile .image .buttons .check-selected{background-color:var(--ars-primary-hi, #12c0ae)}.tile .date{padding:8px 0 6px;font-weight:700;text-transform:uppercase}.tile .date .date-day{color:var(--ars-accent, #7894ae)}.tile .date .date-divider{width:1px;margin:0 8px;border-left:1px solid var(--ars-color-divider, #757d87)}.tile .time{font-size:small;font-weight:700}.tile .title{text-decoration:none;font-size:small;min-height:72px;overflow:hidden}.badge,.badge-red{margin-left:10px;padding:1px 4px;border-radius:3px;font-size:x-small;font-weight:600;text-align:center;background-color:var(--ars-accent, #7894ae);text-transform:uppercase;white-space:nowrap;color:var(--ars-color-text, #191c1b)}.badge-red{background-color:var(--ars-error, #ff5449);color:var(--ars-color-text, #191c1b)}.busy-backdrop{background-color:#00000052!important}.legend-container{display:flex;flex-direction:row;align-items:center;font-size:x-small;text-transform:uppercase;font-weight:500;margin-left:10px}.legend-container .legend{display:inline-block;height:8px;width:8px;margin-right:4px}.legend-container .next{margin-left:8px}.special-date,.special-date-expired{border:2px var(--ars-accent, #7894ae) solid!important;border-radius:100%!important}.special-date-expired{border:2px var(--ars-error, #ff5449) solid!important}.message{color:var(--ars-color-secondary, #4a635f);padding:20px;text-align:center}\n"], dependencies: [{ kind: "ngmodule", type: FlexLayoutModule }, { kind: "directive", type: i1.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i1.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i1.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i1.FlexFillDirective, selector: "[fxFill], [fxFlexFill]" }, { kind: "directive", type: i1.DefaultFlexAlignDirective, selector: " [fxFlexAlign], [fxFlexAlign.xs], [fxFlexAlign.sm], [fxFlexAlign.md], [fxFlexAlign.lg], [fxFlexAlign.xl], [fxFlexAlign.lt-sm], [fxFlexAlign.lt-md], [fxFlexAlign.lt-lg], [fxFlexAlign.lt-xl], [fxFlexAlign.gt-xs], [fxFlexAlign.gt-sm], [fxFlexAlign.gt-md], [fxFlexAlign.gt-lg]", inputs: ["fxFlexAlign", "fxFlexAlign.xs", "fxFlexAlign.sm", "fxFlexAlign.md", "fxFlexAlign.lg", "fxFlexAlign.xl", "fxFlexAlign.lt-sm", "fxFlexAlign.lt-md", "fxFlexAlign.lt-lg", "fxFlexAlign.lt-xl", "fxFlexAlign.gt-xs", "fxFlexAlign.gt-sm", "fxFlexAlign.gt-md", "fxFlexAlign.gt-lg"] }, { kind: "directive", type: i1.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: i2$1.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { kind: "directive", type: MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i3$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "ngmodule", type: MatSlideToggleModule }, { kind: "component", type: i15.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "color", "disabled", "disableRipple", "tabIndex", "checked", "hideIcon"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i11.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "directive", type: i11.MatMenuContent, selector: "ng-template[matMenuContent]" }, { kind: "directive", type: i11.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: MatBadgeModule }, { kind: "directive", type: i9.MatBadge, selector: "[matBadge]", inputs: ["matBadgeColor", "matBadgeOverlap", "matBadgeDisabled", "matBadgePosition", "matBadge", "matBadgeDescription", "matBadgeSize", "matBadgeHidden"] }, { kind: "ngmodule", type: MatPaginatorModule }, { kind: "component", type: i10.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "directive", type: MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "ngmodule", type: MatSidenavModule }, { kind: "component", type: i11$1.MatDrawer, selector: "mat-drawer", inputs: ["position", "mode", "disableClose", "autoFocus", "opened"], outputs: ["openedChange", "opened", "openedStart", "closed", "closedStart", "positionChanged"], exportAs: ["matDrawer"] }, { kind: "component", type: i11$1.MatDrawerContainer, selector: "mat-drawer-container", inputs: ["autosize", "hasBackdrop"], outputs: ["backdropClick"], exportAs: ["matDrawerContainer"] }, { kind: "ngmodule", type: MatProgressBarModule }, { kind: "component", type: i12.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: ClipperDocumentMenuComponent, selector: "clipper-document-menu", inputs: ["parent", "selectionSource", "useSelections", "item", "isReference", "isReadable", "isDeadline", "isLawInForce", "isLaw"] }, { kind: "component", type: ClipperSearchFacetsComponent, selector: "clipper-search-facets", outputs: ["changed"] }, { kind: "component", type: ClipperSearchResultItemComponent, selector: "clipper-search-result-item", inputs: ["parent", "item", "actions", "tileNoPictureUrl", "tilePictureUrl", "isSelectable", "isReadable", "displayModelName", "displayMode"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2113
2087
  }
2114
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: ClipperSearchResultManager, decorators: [{
2088
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: ClipperReferencesComponent, decorators: [{
2115
2089
  type: Component,
2116
- args: [{
2117
- template: '<div></div>',
2118
- standalone: true,
2119
- changeDetection: ChangeDetectionStrategy.OnPush,
2120
- imports: [ClipperDocumentManager, ClipperSearchFacetsComponent, ClipperSearchCalendarComponent],
2121
- }]
2122
- }], propDecorators: { paginator: [{
2123
- type: ViewChild,
2124
- args: ['paginator']
2125
- }], facets: [{
2126
- type: ViewChild,
2127
- args: ['facets']
2128
- }], calendar: [{
2090
+ args: [{ host: { 'Bind': SystemUtils.generateUUID() }, standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
2091
+ FlexLayoutModule,
2092
+ MatDialogTitle,
2093
+ MatButtonModule,
2094
+ MatTooltipModule,
2095
+ MatIconModule,
2096
+ MatCheckboxModule,
2097
+ MatSlideToggleModule,
2098
+ FormsModule,
2099
+ MatMenuModule,
2100
+ MatBadgeModule,
2101
+ MatPaginatorModule,
2102
+ MatDialogContent,
2103
+ MatSidenavModule,
2104
+ MatProgressBarModule,
2105
+ ClipperDocumentMenuComponent,
2106
+ ClipperSearchFacetsComponent,
2107
+ ClipperSearchResultItemComponent
2108
+ ], template: "<div class=\"clipper-references-fixed\">\r\n <div class=\"dialog-header\">\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutGap='10px' fxFill>\r\n <div fxFlex=\"*\">\r\n <h2 mat-dialog-title>{{title}} </h2>\r\n </div>\r\n <div fxLayoutAlign=\"end\">\r\n <button fxFlexAlign=\"start\" type=\"button\" mat-icon-button matTooltip=\"Chiudi\" aria-label=\"Chiudi\"\r\n (click)=\"close()\" class=\"dialog-close\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </div>\r\n </div>\r\n @if (dialogData.mode > 0 || selection?.hasValue() || (snapshot && snapshot.facets?.hasFacets && filterPane &&\r\n (!filterPane.opened || filterPaneClosed))) {\r\n <div style=\"padding: 0 10px 0 24px; height: 48px; min-height: 48px;\">\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\" fxFill>\r\n <div fxFlex=\"*\">\r\n @if (dialogData.mode === 1) {\r\n <mat-slide-toggle name=\"excludeTextReferences\" [(ngModel)]=\"filterParams.excludeTextReferences\"\r\n (change)=\"fetch(true)\">\r\n Mostra solo se citati nelle note\r\n </mat-slide-toggle>\r\n } @else if (dialogData.mode == 2) {\r\n <mat-slide-toggle name=\"excludeNotesReferences\" [(ngModel)]=\"filterParams.excludeNotesReferences\"\r\n (change)=\"fetch(true)\">\r\n Mostra solo se citano nel testo il documento\r\n </mat-slide-toggle>\r\n }\r\n </div>\r\n <div fxLayoutAlign=\"end\">\r\n @if (selection?.hasValue()) {\r\n <button fxFlexAlign=\"center\" type=\"button\" mat-icon-button\r\n matTooltip=\"Azioni da eseguire sugli elementi selezionati\"\r\n [attr.aria-label]=\"'Menu opzioni per elementi selezionati'\" [matMenuTriggerFor]=\"menuSelections\"\r\n [disabled]=\"!snapshot.total\">\r\n <mat-icon aria-hidden=\"false\" [matBadge]=\"selection?.all.length\" matBadgeColor=\"accent\">checklist</mat-icon>\r\n </button>\r\n }\r\n <mat-menu #menuSelections=\"matMenu\">\r\n <clipper-document-menu [parent]=\"this\" [selectionSource]=\"selection\" [isReadable]=\"false\"\r\n [isReference]=\"true\">\r\n </clipper-document-menu>\r\n </mat-menu>\r\n @if (snapshot && snapshot.facets?.hasFacets && filterPane && (!filterPane.opened || filterPaneClosed)) {\r\n <div fxFlexAlign=\"center\">\r\n <button type=\"button\" mat-icon-button matTooltip=\"Affina ricerca\" aria-label=\"'Affina ricerca'\"\r\n (click)=\"toggleFilterPane()\">\r\n <mat-icon>menu_open</mat-icon>\r\n </button>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n<div mat-dialog-content id=\"clipper-references-scrollable\">\r\n <mat-drawer-container class=\"fill\" [hasBackdrop]=\"filterPaneHasBackdrop\">\r\n <mat-drawer #filterPane position=\"end\" class=\"drawer-small drawer-with-loader\" opened=\"false\">\r\n @if (filterBusy()) {\r\n <div class=\"overlay\"></div>\r\n }\r\n <div fxLayout=\"column\" fxFill>\r\n <div fxFlex=\"6px\">\r\n @if (filterBusy()) {\r\n <mat-progress-bar style=\"z-index: 11;\" mode=\"indeterminate\">\r\n </mat-progress-bar>\r\n }\r\n </div>\r\n <div fxFlex=\"56px\" class=\"title-container-with-loader\">\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxFill>\r\n <div fxFlexAlign=\"center\" class=\"title\">Affina ricerca</div>\r\n <div fxFlex=\"*\" fxLayoutAlign=\"end\">\r\n <button fxFlexAlign=\"center\" mat-icon-button (click)=\"toggleFilterPane()\"\r\n matTooltip=\"Nascondi\"><mat-icon>close</mat-icon></button>\r\n </div>\r\n </div>\r\n </div>\r\n <div fxFlex=\"*\" class=\"scroll-hidden\" style=\"padding: 0 5px;\">\r\n <clipper-search-facets #facets></clipper-search-facets>\r\n </div>\r\n </div>\r\n </mat-drawer>\r\n <div fxLayout=\"column\" fxFill>\r\n <div fxFlex=\"*\" [id]=\"scrollerId\" class=\"scroll-auto\" style=\"padding: 0 5px;\">\r\n @if (!snapshot.total) {\r\n <div>\r\n <p class=\"message\"><i>Nessun elemento da visualizzare.</i></p>\r\n </div>\r\n } @else {\r\n <div>\r\n @for (item of snapshot.items; track $index; let i = $index) {\r\n @if (item.group) {\r\n <div class=\"items-group-title\">\r\n <div [ngClass]=\"{'group-spaced': i > 0}\">{{item.group}}</div>\r\n </div>\r\n }\r\n <clipper-search-result-item [item]=\"item\" [parent]=\"this\" [actions]=\"contextMenu\"></clipper-search-result-item>\r\n }\r\n <mat-menu #contextMenu=\"matMenu\" (closed)=\"updateMenuButtonsVisibility()\">\r\n <ng-template matMenuContent let-item=\"item\">\r\n <clipper-document-menu [parent]=\"this\" [item]=\"item\" [isReadable]=\"false\" [isReference]=\"true\">\r\n </clipper-document-menu>\r\n </ng-template>\r\n </mat-menu>\r\n </div>\r\n }\r\n </div>\r\n <!-- footer -->\r\n @if ((snapshot?.total ?? 0) > 0) {\r\n <div class=\"items-footer\">\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxLayoutAlign=\"end center\" fxFill>\r\n <mat-paginator #paginator class=\"paginator\" [hidePageSize]=\"true\" [length]=\"snapshot?.total ?? 0\"\r\n [pageSize]=\"filterParams.count ?? 15\" [showFirstLastButtons]=\"true\" (page)=\"fetchMore($event)\">\r\n </mat-paginator>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n </mat-drawer-container>\r\n</div>", styles: [".dialog-info{font-size:x-small;font-weight:700;text-align:right;padding:10px}.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #388E3C)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #a80710)}.dialog-header{padding-bottom:20px}.dialog-close{margin-right:10px;margin-top:10px}.dialog-menu{margin-left:10px;margin-top:10px}.dialog-title{padding:0 24px}.section-title{font-size:large;font-weight:600;padding-top:10px;padding-bottom:8px}.center{text-align:center}.wide{min-width:100%!important;max-width:100%!important;width:100%!important}.fill{min-width:100%!important;max-width:100%!important;width:100%!important;min-height:100%!important;max-height:100%!important;height:100%!important}.scroll-auto{overflow:auto}.scroll-hidden{overflow:hidden}b{font-weight:700}.large{font-size:large!important}.smaller{font-size:smaller}.small{font-size:small!important;line-height:16px}.small-icon-button{width:1.5rem!important;height:1.5rem!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center}.small-icon-button .mat-mdc-button-touch-target{width:1.5rem!important;height:1.5rem!important}.x-small{font-size:x-small!important;line-height:14px}.bold{font-weight:700}.uppercase{text-transform:uppercase!important}.lowercase{text-transform:lowercase!important}.truncated{min-width:0;max-width:100%}.truncated span,.truncated div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.clipped{min-width:0;max-width:100%}.clipped span,.clipped div{white-space:nowrap;overflow:hidden;text-overflow:clip}.accent{color:var(--ars-accent, #7894ae)!important}.primary{color:var(--ars-primary, #00a293)!important}.secondary{color:var(--ars-secondary, #4a635f)!important}.error{color:var(--ars-error, #ff5449)!important}.warning{color:var(--ars-warning, #FFC107)!important}.overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10;background-color:var(--ars-color-overlay, rgba(255, 255, 255, .75))}.drawer-content{padding-top:10px}.drawer,.drawer-small{min-width:420px!important;max-width:420px!important;padding:20px 0 0}.drawer .title-container,.drawer-small .title-container{padding:20px 10px}.drawer .title-container-with-loader,.drawer-small .title-container-with-loader{padding:14px 10px 20px}.drawer .title,.drawer-small .title{font-size:1.2em;font-weight:600;padding-left:10px;min-width:200px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.drawer .accordion-panel,.drawer-small .accordion-panel{background-color:transparent!important}.drawer .accordion-header,.drawer-small .accordion-header{padding-left:15px;padding-right:20px;border-radius:var(--mat-expansion-container-shape)}.drawer .mat-expansion-panel-body,.drawer-small .mat-expansion-panel-body{padding-bottom:20px!important}.drawer-with-loader{padding-top:0!important}.drawer-transparent{background-color:transparent}.drawer-small{min-width:360px!important;max-width:360px!important}.drawer-small .title{min-width:150px}@media screen and (min-width: 0px) and (max-width: 359px){.drawer{min-width:360px!important;max-width:360px!important}.drawer .title{min-width:150px}}.fade-in{animation:fadein .5s linear}@keyframes fadein{0%{opacity:0}to{opacity:1}}@media (prefers-color-scheme: dark){.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #4CAF50)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #ff5449)}b{font-weight:600}}.clipper-logo{background-size:110px 48px;width:110px;height:48px}.clipper-selection-button{width:150px;font-size:small;font-weight:600;text-transform:uppercase}.clipper-selection-icon-button{background-color:var(--ars-primary, #00a293);color:var(--ars-color-text-low, #e0e2e5)}.clipper-selection-icon-button:hover{background-color:var(--ars-primary-hi, #12c0ae)}.expired,.unread{color:var(--ars-error, #ff5449)!important}.expiring{color:var(--ars-warning, #FFC107)!important}.error-bg,.expired-bg,.unread-bg{background-color:var(--ars-error, #ff5449)}.expiring-bg{background-color:var(--ars-warning, #FFC107)}.popular-bg{background-color:#388e3c}.very-popular-bg{background-color:#4caf50}.item-selected{background-color:var(--ars-item-selected-background-color, #ced1d2);border-radius:0!important}.item-unread{font-weight:bolder}.items-group-title{color:var(--ars-accent, #7894ae);font-size:large;font-weight:700;padding-left:25px;padding-bottom:10px;padding-top:10px}.items-group-title .group-spaced{padding:10px 0 0!important}.items-footer{padding-top:10px}.item{border-radius:12px;padding:10px 6px 10px 0;min-height:68px!important;margin-bottom:2px}.item:hover{background-color:var(--ars-item-hover-background-color, #eaecef)}.item-content .info-1{font-size:x-small;font-weight:700;line-height:15px;text-transform:uppercase;color:var(--ars-accent, #7894ae)}.item-content .info-2{font-size:x-small;font-weight:700;line-height:15px;text-transform:uppercase;color:var(--ars-accent-low, #456179)}.item-content .title{font-size:small;line-height:18px}.item-content .details{margin-top:4px;font-size:x-small;font-weight:700;line-height:15px;color:var(--ars-accent-low, #456179);text-transform:uppercase;border-left:4px solid var(--ars-accent-low, #456179);padding-left:10px}.item-content .details .links{text-transform:none;text-decoration:none}.item-content .details .links a,.item-content .details .links span,.item-content .details .links div{margin-right:8px;font-weight:600;color:var(--ars-color-text, #191c1b)}.item-content .details .links a{cursor:pointer!important;color:var(--ars-link, #03A9F4);font-weight:600}.item-content a.link{color:var(--ars-link, #03A9F4);cursor:pointer!important}.item-content:hover{-webkit-mask-image:linear-gradient(to right,black 85%,transparent 100%);mask-image:linear-gradient(to right,black 85%,transparent 100%)}.tile:hover{background-color:var(--ars-item-hover-background-color, #eaecef);border-radius:12px}.tile{cursor:pointer;padding:10px 13px;margin-bottom:2px}.tile .body{padding:4px 6px}.tile .image-mark{border-top:6px solid transparent;margin:0 8px}.tile .image-mark-unread{border-top-color:var(--ars-error, #ff5449);margin:0 8px}.tile .image{height:180px;position:relative;background-color:transparent;overflow:hidden;display:flex;justify-content:center;align-items:center;border-radius:8px}.tile .image img{object-fit:cover;width:100%;height:100%}.tile .image .info-1{position:absolute;left:0;bottom:0;padding:4px 8px;background-color:var(--ars-color-overlay, rgba(255, 255, 255, .75));color:var(--ars-color-text, #191c1b);font-size:small;font-weight:700;text-transform:uppercase}.tile .image .info-2{position:absolute;right:0;top:0;padding:4px 8px;background-color:var(--ars-color-overlay, rgba(255, 255, 255, .75));color:var(--ars-accent, #7894ae);font-size:small;font-weight:700;text-transform:uppercase}.tile .image .buttons{position:absolute;left:0;top:0;height:42px}.tile .image .buttons .check,.tile .image .buttons .read{background-color:var(--ars-primary, #00a293);color:var(--ars-color-text-low, #e0e2e5)}.tile .image .buttons .check-selected{background-color:var(--ars-primary-hi, #12c0ae)}.tile .date{padding:8px 0 6px;font-weight:700;text-transform:uppercase}.tile .date .date-day{color:var(--ars-accent, #7894ae)}.tile .date .date-divider{width:1px;margin:0 8px;border-left:1px solid var(--ars-color-divider, #757d87)}.tile .time{font-size:small;font-weight:700}.tile .title{text-decoration:none;font-size:small;min-height:72px;overflow:hidden}.badge,.badge-red{margin-left:10px;padding:1px 4px;border-radius:3px;font-size:x-small;font-weight:600;text-align:center;background-color:var(--ars-accent, #7894ae);text-transform:uppercase;white-space:nowrap;color:var(--ars-color-text, #191c1b)}.badge-red{background-color:var(--ars-error, #ff5449);color:var(--ars-color-text, #191c1b)}.busy-backdrop{background-color:#00000052!important}.legend-container{display:flex;flex-direction:row;align-items:center;font-size:x-small;text-transform:uppercase;font-weight:500;margin-left:10px}.legend-container .legend{display:inline-block;height:8px;width:8px;margin-right:4px}.legend-container .next{margin-left:8px}.special-date,.special-date-expired{border:2px var(--ars-accent, #7894ae) solid!important;border-radius:100%!important}.special-date-expired{border:2px var(--ars-error, #ff5449) solid!important}.message{color:var(--ars-color-secondary, #4a635f);padding:20px;text-align:center}\n"] }]
2109
+ }], propDecorators: { filterPane: [{
2129
2110
  type: ViewChild,
2130
- args: ['calendar']
2111
+ args: ['filterPane']
2131
2112
  }] } });
2132
2113
 
2133
2114
  class ClipperDocumentIndexComponent {
@@ -2950,6 +2931,36 @@ class ClipperDocumentsUtils {
2950
2931
  height: '99%'
2951
2932
  });
2952
2933
  }
2934
+ /**
2935
+ * Open a document
2936
+ * @param dialogService: the dialog service
2937
+ * @param clipperService: the clipper service
2938
+ * @param documentId : the document id
2939
+ */
2940
+ static openReferences(dialogService, clipperService, documentId, mode = ClipperQueryReferencesMode.ReferencesIn) {
2941
+ if (!clipperService.loggedIn()) {
2942
+ dialogService.error("Clipper non è disponibile in questo momento. Verifica la connessione.");
2943
+ return null;
2944
+ }
2945
+ if (!documentId) {
2946
+ dialogService.error("Documento non valido.");
2947
+ return null;
2948
+ }
2949
+ return dialogService.open(ClipperReferencesComponent, {
2950
+ ariaLabel: 'documento',
2951
+ autoFocus: false,
2952
+ restoreFocus: false,
2953
+ disableClose: false,
2954
+ data: {
2955
+ id: documentId,
2956
+ mode: mode
2957
+ },
2958
+ minWidth: '375px',
2959
+ maxWidth: '1000px',
2960
+ width: '99%',
2961
+ height: '99%'
2962
+ });
2963
+ }
2953
2964
  /**
2954
2965
  * Extract document title
2955
2966
  * @param title : the full document title