@arsedizioni/ars-utils 22.7.5 → 22.7.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs +18 -15
  2. package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs.map +1 -1
  3. package/fesm2022/{arsedizioni-ars-utils-clipper.ui-document.component-BKjGXtXa.mjs → arsedizioni-ars-utils-clipper.ui-document.component-vI7C4i2r.mjs} +29 -14
  4. package/fesm2022/arsedizioni-ars-utils-clipper.ui-document.component-vI7C4i2r.mjs.map +1 -0
  5. package/fesm2022/arsedizioni-ars-utils-clipper.ui-document.component-xjm4mdUv.mjs +1593 -0
  6. package/fesm2022/arsedizioni-ars-utils-clipper.ui-document.component-xjm4mdUv.mjs.map +1 -0
  7. package/fesm2022/arsedizioni-ars-utils-clipper.ui-references.component-CBuJnNIf.mjs +806 -0
  8. package/fesm2022/arsedizioni-ars-utils-clipper.ui-references.component-CBuJnNIf.mjs.map +1 -0
  9. package/fesm2022/{arsedizioni-ars-utils-clipper.ui-references.component-CEA_wJTS.mjs → arsedizioni-ars-utils-clipper.ui-references.component-DYojmfsw.mjs} +4 -4
  10. package/fesm2022/{arsedizioni-ars-utils-clipper.ui-references.component-CEA_wJTS.mjs.map → arsedizioni-ars-utils-clipper.ui-references.component-DYojmfsw.mjs.map} +1 -1
  11. package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs +359 -77
  12. package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs.map +1 -1
  13. package/fesm2022/arsedizioni-ars-utils-core.date.mjs +6 -6
  14. package/fesm2022/arsedizioni-ars-utils-core.markdown.mjs +3 -3
  15. package/fesm2022/arsedizioni-ars-utils-core.mjs +48 -48
  16. package/fesm2022/arsedizioni-ars-utils-core.validators.mjs +42 -42
  17. package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs +15 -15
  18. package/fesm2022/arsedizioni-ars-utils-support.common.mjs +9 -9
  19. package/fesm2022/arsedizioni-ars-utils-ui.controls.date.mjs +6 -6
  20. package/fesm2022/arsedizioni-ars-utils-ui.controls.mjs +9 -9
  21. package/fesm2022/arsedizioni-ars-utils-ui.controls.tree.mjs +3 -3
  22. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.auth.mjs +18 -18
  23. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.mjs +12 -12
  24. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.prompt.mjs +9 -9
  25. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.select.mjs +15 -15
  26. package/fesm2022/arsedizioni-ars-utils-ui.files.mjs +12 -12
  27. package/fesm2022/arsedizioni-ars-utils-ui.filters.mjs +3 -3
  28. package/fesm2022/arsedizioni-ars-utils-ui.help.mjs +9 -9
  29. package/fesm2022/arsedizioni-ars-utils-ui.mjs +61 -61
  30. package/fesm2022/arsedizioni-ars-utils-ui.navigation.mjs +3 -3
  31. package/fesm2022/arsedizioni-ars-utils-ui.notifications.mjs +6 -6
  32. package/fesm2022/arsedizioni-ars-utils-ui.oauth.mjs +6 -6
  33. package/fesm2022/arsedizioni-ars-utils-ui.paginator.mjs +3 -3
  34. package/fesm2022/arsedizioni-ars-utils-ui.shell.mjs +9 -9
  35. package/fesm2022/arsedizioni-ars-utils-ui.tinymce.mjs +9 -9
  36. package/package.json +1 -1
  37. package/types/arsedizioni-ars-utils-clipper.common.d.ts +34 -0
  38. package/types/arsedizioni-ars-utils-clipper.common.d.ts.map +1 -0
  39. package/types/arsedizioni-ars-utils-clipper.ui.d.ts +108 -3
  40. package/types/arsedizioni-ars-utils-clipper.ui.d.ts.map +1 -0
  41. package/types/arsedizioni-ars-utils-core.d.ts.map +1 -0
  42. package/types/arsedizioni-ars-utils-core.date.d.ts.map +1 -0
  43. package/types/arsedizioni-ars-utils-core.markdown.d.ts.map +1 -0
  44. package/types/arsedizioni-ars-utils-core.validators.d.ts.map +1 -0
  45. package/types/arsedizioni-ars-utils-evolution.common.d.ts.map +1 -0
  46. package/types/arsedizioni-ars-utils-support.common.d.ts.map +1 -0
  47. package/types/arsedizioni-ars-utils-ui.controls.d.ts +1 -1
  48. package/types/arsedizioni-ars-utils-ui.controls.d.ts.map +1 -0
  49. package/types/arsedizioni-ars-utils-ui.controls.date.d.ts.map +1 -0
  50. package/types/arsedizioni-ars-utils-ui.controls.tree.d.ts.map +1 -0
  51. package/types/arsedizioni-ars-utils-ui.d.ts.map +1 -0
  52. package/types/arsedizioni-ars-utils-ui.dialogs.auth.d.ts.map +1 -0
  53. package/types/arsedizioni-ars-utils-ui.dialogs.d.ts.map +1 -0
  54. package/types/arsedizioni-ars-utils-ui.dialogs.prompt.d.ts.map +1 -0
  55. package/types/arsedizioni-ars-utils-ui.dialogs.select.d.ts.map +1 -0
  56. package/types/arsedizioni-ars-utils-ui.files.d.ts.map +1 -0
  57. package/types/arsedizioni-ars-utils-ui.filters.d.ts.map +1 -0
  58. package/types/arsedizioni-ars-utils-ui.help.d.ts.map +1 -0
  59. package/types/arsedizioni-ars-utils-ui.navigation.d.ts +1 -1
  60. package/types/arsedizioni-ars-utils-ui.navigation.d.ts.map +1 -0
  61. package/types/arsedizioni-ars-utils-ui.notifications.d.ts.map +1 -0
  62. package/types/arsedizioni-ars-utils-ui.oauth.d.ts.map +1 -0
  63. package/types/arsedizioni-ars-utils-ui.paginator.d.ts.map +1 -0
  64. package/types/arsedizioni-ars-utils-ui.shell.d.ts.map +1 -0
  65. package/types/arsedizioni-ars-utils-ui.tinymce.d.ts.map +1 -0
  66. package/types/arsedizioni-ars-utils.d.ts.map +1 -0
  67. package/fesm2022/arsedizioni-ars-utils-clipper.ui-document.component-BKjGXtXa.mjs.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"arsedizioni-ars-utils-clipper.ui-references.component-CBuJnNIf.mjs","names":[],"sources":["../../../projects/ars-utils/clipper.ui/references/references.component.ts","../../../projects/ars-utils/clipper.ui/references/references.component.html"],"sourcesContent":["import { Breakpoints } from '@angular/cdk/layout';\nimport { ChangeDetectionStrategy, Component, afterNextRender, inject, viewChild } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { MatBadgeModule } from '@angular/material/badge';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MAT_DIALOG_DATA, MatDialogContent, MatDialogRef, MatDialogTitle } from '@angular/material/dialog';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatMenuModule } from '@angular/material/menu';\nimport { MatPaginatorModule, PageEvent } from '@angular/material/paginator';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\nimport { MatDrawer, MatSidenavModule } from '@angular/material/sidenav';\nimport { MatSlideToggleModule } from '@angular/material/slide-toggle';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { ClipperDocumentInfo, ClipperQueryReferencesMode, ClipperReferencesSearchParams, ClipperSearchFacetsResult, ClipperSearchFacetsSnapshot, ClipperSearchParams, ClipperUserInfo } from '@arsedizioni/ars-utils/clipper.common';\nimport { ApiResult, SelectableModel, SystemUtils } from '@arsedizioni/ars-utils/core';\nimport { FlexLayoutModule } from '@arsedizioni/ars-utils/ui';\nimport { finalize } from 'rxjs/operators';\nimport { ClipperSearchResultManager } from '../search-result-manager/search-result-manager';\nimport { ClipperDocumentMenuComponent } from '../document-menu/document-menu.component';\nimport { ClipperSearchFacetsComponent } from '../search-facets/search-facets.component';\nimport { ClipperSearchResultItemComponent } from '../search-result-item/search-result-item.component';\n\n\nexport interface ClipperReferencesDialogData {\n mode?: ClipperQueryReferencesMode;\n anchor?: string;\n anchorTitle?: string;\n documentId: string;\n model: number;\n canHandleTooManyResults?: boolean;\n}\n\nexport interface ClipperReferenceDialogResult {\n documentId: string;\n}\n\n@Component({\n host: { 'Bind': SystemUtils.generateUUID() },\n templateUrl: './references.component.html',\n styleUrls: ['./references.component.scss'],\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n FlexLayoutModule,\n MatDialogTitle,\n MatButtonModule,\n MatTooltipModule,\n MatIconModule,\n MatCheckboxModule,\n MatSlideToggleModule,\n MatMenuModule,\n MatBadgeModule,\n MatPaginatorModule,\n MatDialogContent,\n MatSidenavModule,\n MatProgressBarModule,\n ClipperDocumentMenuComponent,\n ClipperSearchFacetsComponent,\n ClipperSearchResultItemComponent,\n ],\n})\nexport class ClipperReferencesComponent extends ClipperSearchResultManager {\n readonly filterPane = viewChild<MatDrawer>('filterPane');\n\n private readonly dialogRef = inject(MatDialogRef<ClipperReferencesComponent>);\n protected readonly dialogData: ClipperReferencesDialogData = inject(MAT_DIALOG_DATA) ?? { mode: ClipperQueryReferencesMode.ReferencesIn };\n protected title?: string;\n protected item?: ClipperDocumentInfo;\n protected readonly user: ClipperUserInfo | undefined = this.clipperService.user;\n private _viewReady = false;\n\n constructor() {\n super();\n if (this.dialogData) {\n switch (this.dialogData.mode) {\n case ClipperQueryReferencesMode.ReferencesIn:\n this.title = \"Documenti richiamati nelle note o nel testo\";\n break;\n case ClipperQueryReferencesMode.ReferencesOut:\n this.title = \"Documenti che richiamano quello in visione\";\n break;\n case ClipperQueryReferencesMode.ChangesIn:\n this.title = \"Modifiche subite\";\n break;\n case ClipperQueryReferencesMode.ChangesOut:\n this.title = \"Modifiche apportate\";\n break;\n case ClipperQueryReferencesMode.Juris:\n this.title = \"Giurisprudenza associata\";\n break;\n }\n if (this.dialogData.anchorTitle) {\n this.title += \" - \" + this.dialogData.anchorTitle;\n }\n // Use service snapshot\n this.snapshot = this.clipperService.referencesSnapshot() ?? { searchParams: new ClipperSearchParams(), interval: \"-1\" };\n if (\n this.filterParams.mode !== this.dialogData.mode ||\n this.filterParams.id !== this.dialogData.documentId ||\n this.filterParams.anchor !== this.dialogData.anchor\n ) {\n this.filterParams = new ClipperSearchParams();\n this.filterParams.mode = this.dialogData.mode;\n this.filterParams.model = this.dialogData.model;\n this.filterParams.anchor = this.dialogData.anchor;\n this.filterParams.id = this.dialogData.documentId;\n this.filterParams.useModifierInfo = this.dialogData.mode === ClipperQueryReferencesMode.ChangesOut;\n this.filterParams.returnModifierInfo = this.dialogData.mode !== ClipperQueryReferencesMode.ChangesOut;\n this.clipperService.referencesSnapshot.set(this.snapshot);\n }\n }\n\n // Initialize selection\n this.selection = new SelectableModel<ClipperDocumentInfo, string>(true, 'documentId');\n\n // Observe layout changes\n this.breakpointObserver\n .observe([\n Breakpoints.XSmall,\n Breakpoints.Small,\n Breakpoints.Medium,\n Breakpoints.Large,\n Breakpoints.XLarge,\n ])\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe((result: any) => {\n if (!this._viewReady) return; // DOM not ready yet\n for (const query of Object.keys(result.breakpoints)) {\n if (result.breakpoints[query]) {\n this.handleFilterPaneVisibility();\n }\n }\n });\n\n // Run view-dependent initialization after the first render.\n afterNextRender(() => {\n this._viewReady = true;\n this.handleFilterPaneVisibility();\n const filterPane = this.filterPane();\n if (filterPane) {\n filterPane.openedChange\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(opened => {\n if (filterPane.mode === 'over') {\n this.filterPaneHasBackdrop.set(opened);\n }\n });\n }\n const facets = this.facets();\n if (facets) {\n facets.changed\n .subscribe((value: ClipperSearchFacetsSnapshot) => {\n this.snapshot.facets = value;\n this.fetch(true);\n });\n }\n this.fetch(true);\n this.restoreFacets();\n this.changeDetector.markForCheck();\n });\n }\n\n\n /**\n * Toggles the filter pane open/closed state.\n */\n protected toggleFilterPane(): void {\n this.filterPaneClosed.set(!this.filterPaneClosed());\n this.filterPane()?.toggle();\n }\n\n\n\n /**\n * Adjusts the filter pane mode (side vs. overlay) and backdrop based on the current breakpoint.\n */\n private handleFilterPaneVisibility(): void {\n const filterPane = this.filterPane();\n if (filterPane) {\n if (this.breakpointObserver.isMatched(Breakpoints.XSmall) ||\n this.breakpointObserver.isMatched(Breakpoints.Small) ||\n this.breakpointObserver.isMatched(Breakpoints.Medium)) {\n if (filterPane.opened) {\n filterPane.close();\n }\n filterPane.mode = 'over';\n filterPane.disableClose = false;\n this.filterPaneHasBackdrop.set(filterPane.opened);\n } else {\n if (!this.hasFacets()) {\n filterPane.close();\n } else if (!filterPane.opened && !this.filterPaneClosed()) {\n filterPane.open();\n } else if (filterPane.opened && this.filterPaneClosed()) {\n filterPane.close();\n }\n filterPane.mode = 'side';\n filterPane.disableClose = true;\n this.filterPaneHasBackdrop.set(false);\n }\n }\n }\n\n\n /**\n * Closes the references dialog without returning a result.\n */\n close(): void {\n this.dialogRef.close();\n }\n\n\n\n /**\n * Sends document links by email for the given item or, when omitted, for all selected items.\n * @param item - The specific document to send, or `undefined` to use the current selection.\n */\n sendTo(item?: ClipperDocumentInfo): void {\n this.sendItemsTo(item ? [item] : this.selection?.all);\n }\n\n\n\n /**\n * Builds the search parameters for the next fetch call.\n * @param newSearch - When `true`, resets the pagination offset to 0.\n * @returns A cloned and enriched `ClipperSearchParams` ready to be sent to the API.\n */\n private prepareFetch(newSearch: boolean = false): ClipperSearchParams {\n const newParams = SystemUtils.clone(this.filterParams) as ClipperSearchParams;\n newParams.count = 15;\n newParams.useModifierInfo =\n newParams.mode === ClipperQueryReferencesMode.ChangesOut;\n newParams.returnModifierInfo =\n newParams.mode !== ClipperQueryReferencesMode.ChangesOut;\n // New search, reset paging\n if (newSearch) {\n newParams.first = 0;\n this.filterParams.first = 0;\n }\n\n // Apply facets\n if (this.snapshot.facets?.fromDate) {\n newParams.fromDate = this.snapshot.facets?.fromDate;\n newParams.toDate = this.snapshot.facets?.toDate;\n newParams.year = this.snapshot.facets?.fromDate.getFullYear();\n }\n if (this.snapshot.facets?.sector) {\n newParams.sector = this.snapshot.facets?.sector;\n }\n if (this.snapshot.facets?.type) {\n newParams.type = this.snapshot.facets?.type;\n }\n if (this.snapshot.facets?.author) {\n newParams.author = this.snapshot.facets?.author;\n }\n return newParams;\n }\n\n /**\n * Maps a generic `ClipperSearchParams` to the references-specific API parameter shape.\n * @param params - The base search parameters to convert.\n * @returns A `ClipperReferencesSearchParams` object ready for the references endpoint.\n */\n private toReferencesSearchParams(params: ClipperSearchParams): ClipperReferencesSearchParams {\n return {\n documentId: params.id,\n year: params.year,\n sector: params.sector,\n author: params.author,\n anchor: params.anchor,\n model: params.model?.toString() ?? null,\n mode: params.mode,\n excludeTextReferences: params.excludeTextReferences,\n excludeNotesReferences: params.excludeNotesReferences,\n returnModifierInfo: params.returnModifierInfo,\n useModifierInfo: params.useModifierInfo,\n count: 15,\n first: params.first ?? 0\n }\n }\n\n /**\n * Executes the references search and updates the result snapshot.\n * @param newSearch - When `true`, resets pagination and reloads facets. Defaults to `false`.\n */\n fetch(newSearch: boolean = false): void {\n if (!this.clipperService.loggedIn()) return;\n this.dialogService.busy('Ricerca in corso...');\n const searchParams = this.prepareFetch(newSearch);\n if (searchParams) {\n this.clipperService.documents.references(this.toReferencesSearchParams(searchParams))\n .pipe(finalize(() => this.dialogService.clearBusy()))\n .subscribe(r => {\n if (!r.success) this.dialogService.error(r.message);\n else {\n this.prepareResults(r.value, newSearch);\n\n // Handle facets\n if (this.snapshot.total > 0) {\n if (newSearch)\n // Update facets\n this.fetchFacets(searchParams);\n } else {\n this.hideFacets();\n }\n\n if (newSearch) {\n const paginator = this.paginator();\n if (paginator) paginator.pageIndex = 0;\n }\n\n this.scroll(0);\n }\n });\n }\n }\n\n /**\n * Navigates to the next result page.\n * @param e - The `PageEvent` emitted by the paginator with the new page index and size.\n */\n fetchMore(e: PageEvent): void {\n const first = e.pageIndex * (this.filterParams.count ?? 15);\n this.filterParams.first = first;\n this.fetch();\n }\n\n /**\n * Loads available facets for the current search parameters and updates the filter pane.\n * @param params - The search parameters used to request facets from the API.\n */\n fetchFacets(params: ClipperSearchParams): void {\n if (!this.clipperService.loggedIn() || !params) return;\n if (!this.snapshot.facets || this.snapshot.facets?.hasMoreFacets) {\n this.filterBusy.set(true);\n this.clipperService.documents.referencesFacets(this.toReferencesSearchParams(params))\n .subscribe({\n next: (r: ApiResult<ClipperSearchFacetsResult>) => {\n if (r.success) {\n let hasFacets = (r.value.facets?.length ?? 0) > 0;\n if (r.value.facets) {\n const facets = this.facets();\n facets?.update(r.value.facets, r.value.interval);\n if (facets && this.snapshot) {\n hasFacets = facets.hasFacets();\n this.snapshot.facets = facets.save();\n this.snapshot.facets.hasTooManyResults = (this.snapshot?.total ?? 0) >= 1000;\n }\n }\n this.hasFacets.set(hasFacets);\n this.handleFilterPaneVisibility();\n }\n },\n complete: () => {\n this.filterBusy.set(false);\n }\n });\n }\n }\n\n /**\n * Hides the facet filter pane and resets all applied facet filters.\n */\n protected hideFacets(): void {\n this.hasFacets.set(false);\n this.facets()?.reset();\n this.filterPane().close();\n this.filterPaneClosed.set(false);\n }\n /**\n * Restores previously saved facets from the snapshot and adjusts the filter pane accordingly.\n */\n restoreFacets(): void {\n if (this.snapshot.facets) {\n this.facets().restore(this.snapshot.facets);\n this.handleFilterPaneVisibility();\n }\n }\n\n /**\n * Closes the dialog and navigates to the selected document.\n * @param documentId - The ID of the document to open.\n */\n override open(documentId?: string): void {\n if (documentId) this.dialogRef.close({ documentId });\n }\n\n /**\n * Returns the CSS class reflecting the item's validity state.\n * @param item - The document to evaluate.\n * @returns A CSS class name string, or `undefined` when no special state applies.\n */\n override getItemStateCssClass(item: ClipperDocumentInfo): string | undefined {\n if (item.isExpired) return 'expired-bg';\n return undefined;\n }\n\n /**\n * Returns the tooltip text explaining the item's current validity state.\n * @param item - The document to evaluate.\n * @returns A human-readable state description, or an empty string when no special state applies.\n */\n override getItemStateTooltip(item: ClipperDocumentInfo): string {\n if (item.isExpired) return 'Non più vigente';\n return '';\n }\n}\n","<div class=\"clipper-references-fixed\">\n <div class=\"dialog-header\">\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutGap='10px' fxFill>\n <div fxFlex=\"*\">\n <div mat-dialog-title>{{title}} </div>\n </div>\n <div fxLayoutAlign=\"end\">\n <button fxFlexAlign=\"start\" type=\"button\" mat-icon-button matTooltip=\"Chiudi\" aria-label=\"Chiudi\"\n (click)=\"close()\" class=\"dialog-close\">\n <mat-icon>close</mat-icon>\n </button>\n </div>\n </div>\n @if (dialogData.mode > 0 || selection?.hasValue() || (snapshot && snapshot.facets?.hasFacets && filterPane &&\n (!filterPane.opened || filterPaneClosed()))) {\n <div class=\"dialog-toolbar\">\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\" fxFill>\n <div fxFlex=\"*\">\n @if (dialogData.mode === 1) {\n <mat-slide-toggle [checked]=\"filterParams.excludeTextReferences === true\"\n (change)=\"filterParams.excludeTextReferences = $event.checked; fetch(true)\">\n &nbsp; Mostra solo se citati nelle note\n </mat-slide-toggle>\n } @else if (dialogData.mode == 2) {\n <mat-slide-toggle [checked]=\"filterParams.excludeNotesReferences === true\"\n (change)=\"filterParams.excludeNotesReferences = $event.checked; fetch(true)\">\n &nbsp; Mostra solo se citano nel testo il documento\n </mat-slide-toggle>\n }\n </div>\n <div fxLayoutAlign=\"end\">\n @if (selection?.hasValue()) {\n <button fxFlexAlign=\"center\" type=\"button\" mat-icon-button\n matTooltip=\"Azioni da eseguire sugli elementi selezionati\"\n [attr.aria-label]=\"'Menu opzioni per elementi selezionati'\" [matMenuTriggerFor]=\"menuSelections\"\n [disabled]=\"!snapshot.total\" [matBadge]=\"selection?.all?.length\">\n <mat-icon>checklist</mat-icon>\n </button>\n }\n <mat-menu #menuSelections=\"matMenu\">\n <clipper-document-menu [parent]=\"this\" selectionSource=\"selection\" [useSelections]=\"true\"\n [isReadable]=\"false\" [isReference]=\"true\" [canUseAIAssistant]=\"user?.hasAIAssistant ?? false\">\n </clipper-document-menu>\n </mat-menu>\n @if (snapshot && snapshot.facets?.hasFacets && filterPane && (!filterPane.opened || filterPaneClosed())) {\n <div fxFlexAlign=\"center\">\n <button type=\"button\" mat-icon-button matTooltip=\"Affina ricerca\" aria-label=\"'Affina ricerca'\"\n (click)=\"toggleFilterPane()\">\n <mat-icon>right_panel_open</mat-icon>\n </button>\n </div>\n }\n </div>\n </div>\n </div>\n }\n </div>\n</div>\n<mat-dialog-content id=\"clipper-references-scrollable\">\n <mat-drawer-container class=\"fill\" [hasBackdrop]=\"filterPaneHasBackdrop()\">\n <mat-drawer #filterPane position=\"end\" class=\"drawer-small drawer-with-loader\" opened=\"false\">\n @if (filterBusy()) {\n <div class=\"overlay\"></div>\n }\n <div fxLayout=\"column\" fxFill>\n <div fxFlex=\"6px\">\n @if (filterBusy()) {\n <mat-progress-bar style=\"z-index: 11;\" mode=\"indeterminate\">\n </mat-progress-bar>\n }\n </div>\n <div fxFlex=\"78px\" class=\"title-container-with-loader\">\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\" fxFill>\n <div class=\"title\">Affina ricerca</div>\n <div fxFlex=\"*\" fxLayoutAlign=\"end\">\n <button mat-icon-button (click)=\"toggleFilterPane()\"\n matTooltip=\"Nascondi\"><mat-icon>right_panel_close</mat-icon></button>\n </div>\n </div>\n </div>\n <div fxFlex=\"*\" class=\"scroll-hidden\" style=\"padding: 0 5px;\">\n <clipper-search-facets #facets [handleTooManyResults]=\"dialogData.canHandleTooManyResults\" ></clipper-search-facets>\n </div>\n </div>\n </mat-drawer>\n <div fxLayout=\"column\" fxFill>\n <div fxFlex=\"*\" [id]=\"scrollerId\" class=\"scroll-auto\" style=\"padding: 0 5px;\">\n @if (!snapshot.total) {\n <div class=\"message-container\">\n <p class=\"message\"><b>Nessun elemento da visualizzare.</b></p>\n </div>\n } @else {\n <div>\n @for (item of snapshot.items; track $index; let i = $index) {\n @if (item.group) {\n <div class=\"items-group-title\">\n <div [class.group-spaced]=\"i > 0\">{{item.group}}</div>\n </div>\n }\n <clipper-search-result-item [item]=\"item\" [parent]=\"this\" [isReadable]=\"false\"\n [actions]=\"contextMenu\"></clipper-search-result-item>\n }\n <mat-menu #contextMenu=\"matMenu\" (closed)=\"updateMenuButtonsVisibility()\">\n <ng-template matMenuContent let-item=\"item\">\n <clipper-document-menu [parent]=\"this\" [item]=\"item\" [isReadable]=\"false\" [isReference]=\"true\"\n [canUseAIAssistant]=\"user?.hasAIAssistant ?? false\">\n </clipper-document-menu>\n </ng-template>\n </mat-menu>\n </div>\n }\n </div>\n <!-- footer -->\n @if ((snapshot?.total ?? 0) > 0) {\n <div class=\"items-footer\">\n <div fxLayout=\"row wrap\" fxLayoutGap=\"10px\" fxLayoutAlign=\"space-between center\" fxFill>\n <!-- legend -->\n <div fxFlex.lt-md=\"100\" class=\"legend-container\">\n <div class=\"legend expired-bg \"></div>\n non più vigente\n </div>\n <div fxFlex.lt-md=\"100\" fxLayoutAlign=\"end\" [class.wide]=\"filterPane?.opened\">\n <div fxLayout=\"row\">\n <mat-paginator fxFlexAlign=\"center\" #paginator class=\"paginator\" [hidePageSize]=\"true\"\n [length]=\"snapshot?.total ?? 0\" [pageSize]=\"filterParams.count ?? 15\" [showFirstLastButtons]=\"true\"\n (page)=\"fetchMore($event)\">\n </mat-paginator>\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n </mat-drawer-container>\n</mat-dialog-content>"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ECmBU,GAAA,eAAA,GAAA,oBAAA,EAAA;EACE,GAAA,WAAA,UAAA,SAAA,oGAAA,QAAA;GAAA,GAAA,cAAA,GAAA;GAAA,MAAA,SAAA,GAAA,cAAA,CAAA;GAAA,OAAA,aAAA,wBAAA,OAAA;GAAA,OAAA,GAAA,YAA+D,OAAA,MAAM,IAAI,CAAC;EAAA,CAAA;EAC1E,GAAA,OAAA,GAAA,yCAAA;EACF,GAAA,aAAA;;;;EAHkB,GAAA,WAAA,WAAA,OAAA,aAAA,0BAAA,IAAA;;;;;;EAKlB,GAAA,eAAA,GAAA,oBAAA,EAAA;EACE,GAAA,WAAA,UAAA,SAAA,oGAAA,QAAA;GAAA,GAAA,cAAA,GAAA;GAAA,MAAA,SAAA,GAAA,cAAA,CAAA;GAAA,OAAA,aAAA,yBAAA,OAAA;GAAA,OAAA,GAAA,YAAgE,OAAA,MAAM,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AY,aAAY,EAAE;GAAE,YAGhC;GAAI,iBACC,wBAAwB;GAAM,SACtC;IACP;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACD;GAAA,UAAA;GAAA,QAAA,CAAA,w3dAAA;EAAA,CAAA;CAG0C,CAAA,SAAA,CAAA,GAAA,EAAA,YAAA,CAAA;EAAA,MAAA,GAAA;EAAA,MAAA,CAAA,cAAY,EAAA,UAAA,KAAA,CAAA;CAAA,CAAA,EAAA,CAAA;AAAA,EAAA,CAAA;OAD5C;CAAA,CAAA,OAAA,cAAA,eAAA,cAAA,GAAA,mBAAA,4BAA0B;EAAA,WAAA;EAAA,UAAA;EAAA,YAAA;CAAA,CAAA;AAAA,EAAA,CAAA"}
@@ -236,7 +236,7 @@ var ClipperReferencesComponent = class ClipperReferencesComponent extends Clippe
236
236
  static {
237
237
  this.ɵfac = i0.ɵɵngDeclareFactory({
238
238
  minVersion: "12.0.0",
239
- version: "22.2.2",
239
+ version: "22.2.3",
240
240
  ngImport: i0,
241
241
  type: ClipperReferencesComponent,
242
242
  deps: [],
@@ -246,7 +246,7 @@ var ClipperReferencesComponent = class ClipperReferencesComponent extends Clippe
246
246
  static {
247
247
  this.ɵcmp = i0.ɵɵngDeclareComponent({
248
248
  minVersion: "17.0.0",
249
- version: "22.2.2",
249
+ version: "22.2.3",
250
250
  type: ClipperReferencesComponent,
251
251
  isStandalone: true,
252
252
  selector: "ng-component",
@@ -676,7 +676,7 @@ var ClipperReferencesComponent = class ClipperReferencesComponent extends Clippe
676
676
  };
677
677
  i0.ɵɵngDeclareClassMetadata({
678
678
  minVersion: "12.0.0",
679
- version: "22.2.2",
679
+ version: "22.2.3",
680
680
  ngImport: i0,
681
681
  type: ClipperReferencesComponent,
682
682
  decorators: [{
@@ -715,4 +715,4 @@ i0.ɵɵngDeclareClassMetadata({
715
715
  });
716
716
  export { ClipperReferencesComponent };
717
717
 
718
- //# sourceMappingURL=arsedizioni-ars-utils-clipper.ui-references.component-CEA_wJTS.mjs.map
718
+ //# sourceMappingURL=arsedizioni-ars-utils-clipper.ui-references.component-DYojmfsw.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"arsedizioni-ars-utils-clipper.ui-references.component-CEA_wJTS.mjs","names":[],"sources":["../../../projects/ars-utils/clipper.ui/references/references.component.ts","../../../projects/ars-utils/clipper.ui/references/references.component.html"],"sourcesContent":["import { Breakpoints } from '@angular/cdk/layout';\nimport { ChangeDetectionStrategy, Component, afterNextRender, inject, viewChild } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { MatBadgeModule } from '@angular/material/badge';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MAT_DIALOG_DATA, MatDialogContent, MatDialogRef, MatDialogTitle } from '@angular/material/dialog';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatMenuModule } from '@angular/material/menu';\nimport { MatPaginatorModule, PageEvent } from '@angular/material/paginator';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\nimport { MatDrawer, MatSidenavModule } from '@angular/material/sidenav';\nimport { MatSlideToggleModule } from '@angular/material/slide-toggle';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { ClipperDocumentInfo, ClipperQueryReferencesMode, ClipperReferencesSearchParams, ClipperSearchFacetsResult, ClipperSearchFacetsSnapshot, ClipperSearchParams, ClipperUserInfo } from '@arsedizioni/ars-utils/clipper.common';\nimport { ApiResult, SelectableModel, SystemUtils } from '@arsedizioni/ars-utils/core';\nimport { FlexLayoutModule } from '@arsedizioni/ars-utils/ui';\nimport { finalize } from 'rxjs/operators';\nimport { ClipperSearchResultManager } from '../search-result-manager/search-result-manager';\nimport { ClipperDocumentMenuComponent } from '../document-menu/document-menu.component';\nimport { ClipperSearchFacetsComponent } from '../search-facets/search-facets.component';\nimport { ClipperSearchResultItemComponent } from '../search-result-item/search-result-item.component';\n\n\nexport interface ClipperReferencesDialogData {\n mode?: ClipperQueryReferencesMode;\n anchor?: string;\n anchorTitle?: string;\n documentId: string;\n model: number;\n canHandleTooManyResults?: boolean;\n}\n\nexport interface ClipperReferenceDialogResult {\n documentId: string;\n}\n\n@Component({\n host: { 'Bind': SystemUtils.generateUUID() },\n templateUrl: './references.component.html',\n styleUrls: ['./references.component.scss'],\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n FlexLayoutModule,\n MatDialogTitle,\n MatButtonModule,\n MatTooltipModule,\n MatIconModule,\n MatCheckboxModule,\n MatSlideToggleModule,\n MatMenuModule,\n MatBadgeModule,\n MatPaginatorModule,\n MatDialogContent,\n MatSidenavModule,\n MatProgressBarModule,\n ClipperDocumentMenuComponent,\n ClipperSearchFacetsComponent,\n ClipperSearchResultItemComponent,\n ],\n})\nexport class ClipperReferencesComponent extends ClipperSearchResultManager {\n readonly filterPane = viewChild<MatDrawer>('filterPane');\n\n private readonly dialogRef = inject(MatDialogRef<ClipperReferencesComponent>);\n protected readonly dialogData: ClipperReferencesDialogData = inject(MAT_DIALOG_DATA) ?? { mode: ClipperQueryReferencesMode.ReferencesIn };\n protected title?: string;\n protected item?: ClipperDocumentInfo;\n protected readonly user: ClipperUserInfo | undefined = this.clipperService.user;\n private _viewReady = false;\n\n constructor() {\n super();\n if (this.dialogData) {\n switch (this.dialogData.mode) {\n case ClipperQueryReferencesMode.ReferencesIn:\n this.title = \"Documenti richiamati nelle note o nel testo\";\n break;\n case ClipperQueryReferencesMode.ReferencesOut:\n this.title = \"Documenti che richiamano quello in visione\";\n break;\n case ClipperQueryReferencesMode.ChangesIn:\n this.title = \"Modifiche subite\";\n break;\n case ClipperQueryReferencesMode.ChangesOut:\n this.title = \"Modifiche apportate\";\n break;\n case ClipperQueryReferencesMode.Juris:\n this.title = \"Giurisprudenza associata\";\n break;\n }\n if (this.dialogData.anchorTitle) {\n this.title += \" - \" + this.dialogData.anchorTitle;\n }\n // Use service snapshot\n this.snapshot = this.clipperService.referencesSnapshot() ?? { searchParams: new ClipperSearchParams(), interval: \"-1\" };\n if (\n this.filterParams.mode !== this.dialogData.mode ||\n this.filterParams.id !== this.dialogData.documentId ||\n this.filterParams.anchor !== this.dialogData.anchor\n ) {\n this.filterParams = new ClipperSearchParams();\n this.filterParams.mode = this.dialogData.mode;\n this.filterParams.model = this.dialogData.model;\n this.filterParams.anchor = this.dialogData.anchor;\n this.filterParams.id = this.dialogData.documentId;\n this.filterParams.useModifierInfo = this.dialogData.mode === ClipperQueryReferencesMode.ChangesOut;\n this.filterParams.returnModifierInfo = this.dialogData.mode !== ClipperQueryReferencesMode.ChangesOut;\n this.clipperService.referencesSnapshot.set(this.snapshot);\n }\n }\n\n // Initialize selection\n this.selection = new SelectableModel<ClipperDocumentInfo, string>(true, 'documentId');\n\n // Observe layout changes\n this.breakpointObserver\n .observe([\n Breakpoints.XSmall,\n Breakpoints.Small,\n Breakpoints.Medium,\n Breakpoints.Large,\n Breakpoints.XLarge,\n ])\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe((result: any) => {\n if (!this._viewReady) return; // DOM not ready yet\n for (const query of Object.keys(result.breakpoints)) {\n if (result.breakpoints[query]) {\n this.handleFilterPaneVisibility();\n }\n }\n });\n\n // Run view-dependent initialization after the first render.\n afterNextRender(() => {\n this._viewReady = true;\n this.handleFilterPaneVisibility();\n const filterPane = this.filterPane();\n if (filterPane) {\n filterPane.openedChange\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(opened => {\n if (filterPane.mode === 'over') {\n this.filterPaneHasBackdrop.set(opened);\n }\n });\n }\n const facets = this.facets();\n if (facets) {\n facets.changed\n .subscribe((value: ClipperSearchFacetsSnapshot) => {\n this.snapshot.facets = value;\n this.fetch(true);\n });\n }\n this.fetch(true);\n this.restoreFacets();\n this.changeDetector.markForCheck();\n });\n }\n\n\n /**\n * Toggles the filter pane open/closed state.\n */\n protected toggleFilterPane(): void {\n this.filterPaneClosed.set(!this.filterPaneClosed());\n this.filterPane()?.toggle();\n }\n\n\n\n /**\n * Adjusts the filter pane mode (side vs. overlay) and backdrop based on the current breakpoint.\n */\n private handleFilterPaneVisibility(): void {\n const filterPane = this.filterPane();\n if (filterPane) {\n if (this.breakpointObserver.isMatched(Breakpoints.XSmall) ||\n this.breakpointObserver.isMatched(Breakpoints.Small) ||\n this.breakpointObserver.isMatched(Breakpoints.Medium)) {\n if (filterPane.opened) {\n filterPane.close();\n }\n filterPane.mode = 'over';\n filterPane.disableClose = false;\n this.filterPaneHasBackdrop.set(filterPane.opened);\n } else {\n if (!this.hasFacets()) {\n filterPane.close();\n } else if (!filterPane.opened && !this.filterPaneClosed()) {\n filterPane.open();\n } else if (filterPane.opened && this.filterPaneClosed()) {\n filterPane.close();\n }\n filterPane.mode = 'side';\n filterPane.disableClose = true;\n this.filterPaneHasBackdrop.set(false);\n }\n }\n }\n\n\n /**\n * Closes the references dialog without returning a result.\n */\n close(): void {\n this.dialogRef.close();\n }\n\n\n\n /**\n * Sends document links by email for the given item or, when omitted, for all selected items.\n * @param item - The specific document to send, or `undefined` to use the current selection.\n */\n sendTo(item?: ClipperDocumentInfo): void {\n this.sendItemsTo(item ? [item] : this.selection?.all);\n }\n\n\n\n /**\n * Builds the search parameters for the next fetch call.\n * @param newSearch - When `true`, resets the pagination offset to 0.\n * @returns A cloned and enriched `ClipperSearchParams` ready to be sent to the API.\n */\n private prepareFetch(newSearch: boolean = false): ClipperSearchParams {\n const newParams = SystemUtils.clone(this.filterParams) as ClipperSearchParams;\n newParams.count = 15;\n newParams.useModifierInfo =\n newParams.mode === ClipperQueryReferencesMode.ChangesOut;\n newParams.returnModifierInfo =\n newParams.mode !== ClipperQueryReferencesMode.ChangesOut;\n // New search, reset paging\n if (newSearch) {\n newParams.first = 0;\n this.filterParams.first = 0;\n }\n\n // Apply facets\n if (this.snapshot.facets?.fromDate) {\n newParams.fromDate = this.snapshot.facets?.fromDate;\n newParams.toDate = this.snapshot.facets?.toDate;\n newParams.year = this.snapshot.facets?.fromDate.getFullYear();\n }\n if (this.snapshot.facets?.sector) {\n newParams.sector = this.snapshot.facets?.sector;\n }\n if (this.snapshot.facets?.type) {\n newParams.type = this.snapshot.facets?.type;\n }\n if (this.snapshot.facets?.author) {\n newParams.author = this.snapshot.facets?.author;\n }\n return newParams;\n }\n\n /**\n * Maps a generic `ClipperSearchParams` to the references-specific API parameter shape.\n * @param params - The base search parameters to convert.\n * @returns A `ClipperReferencesSearchParams` object ready for the references endpoint.\n */\n private toReferencesSearchParams(params: ClipperSearchParams): ClipperReferencesSearchParams {\n return {\n documentId: params.id,\n year: params.year,\n sector: params.sector,\n author: params.author,\n anchor: params.anchor,\n model: params.model?.toString() ?? null,\n mode: params.mode,\n excludeTextReferences: params.excludeTextReferences,\n excludeNotesReferences: params.excludeNotesReferences,\n returnModifierInfo: params.returnModifierInfo,\n useModifierInfo: params.useModifierInfo,\n count: 15,\n first: params.first ?? 0\n }\n }\n\n /**\n * Executes the references search and updates the result snapshot.\n * @param newSearch - When `true`, resets pagination and reloads facets. Defaults to `false`.\n */\n fetch(newSearch: boolean = false): void {\n if (!this.clipperService.loggedIn()) return;\n this.dialogService.busy('Ricerca in corso...');\n const searchParams = this.prepareFetch(newSearch);\n if (searchParams) {\n this.clipperService.documents.references(this.toReferencesSearchParams(searchParams))\n .pipe(finalize(() => this.dialogService.clearBusy()))\n .subscribe(r => {\n if (!r.success) this.dialogService.error(r.message);\n else {\n this.prepareResults(r.value, newSearch);\n\n // Handle facets\n if (this.snapshot.total > 0) {\n if (newSearch)\n // Update facets\n this.fetchFacets(searchParams);\n } else {\n this.hideFacets();\n }\n\n if (newSearch) {\n const paginator = this.paginator();\n if (paginator) paginator.pageIndex = 0;\n }\n\n this.scroll(0);\n }\n });\n }\n }\n\n /**\n * Navigates to the next result page.\n * @param e - The `PageEvent` emitted by the paginator with the new page index and size.\n */\n fetchMore(e: PageEvent): void {\n const first = e.pageIndex * (this.filterParams.count ?? 15);\n this.filterParams.first = first;\n this.fetch();\n }\n\n /**\n * Loads available facets for the current search parameters and updates the filter pane.\n * @param params - The search parameters used to request facets from the API.\n */\n fetchFacets(params: ClipperSearchParams): void {\n if (!this.clipperService.loggedIn() || !params) return;\n if (!this.snapshot.facets || this.snapshot.facets?.hasMoreFacets) {\n this.filterBusy.set(true);\n this.clipperService.documents.referencesFacets(this.toReferencesSearchParams(params))\n .subscribe({\n next: (r: ApiResult<ClipperSearchFacetsResult>) => {\n if (r.success) {\n let hasFacets = (r.value.facets?.length ?? 0) > 0;\n if (r.value.facets) {\n const facets = this.facets();\n facets?.update(r.value.facets, r.value.interval);\n if (facets && this.snapshot) {\n hasFacets = facets.hasFacets();\n this.snapshot.facets = facets.save();\n this.snapshot.facets.hasTooManyResults = (this.snapshot?.total ?? 0) >= 1000;\n }\n }\n this.hasFacets.set(hasFacets);\n this.handleFilterPaneVisibility();\n }\n },\n complete: () => {\n this.filterBusy.set(false);\n }\n });\n }\n }\n\n /**\n * Hides the facet filter pane and resets all applied facet filters.\n */\n protected hideFacets(): void {\n this.hasFacets.set(false);\n this.facets()?.reset();\n this.filterPane().close();\n this.filterPaneClosed.set(false);\n }\n /**\n * Restores previously saved facets from the snapshot and adjusts the filter pane accordingly.\n */\n restoreFacets(): void {\n if (this.snapshot.facets) {\n this.facets().restore(this.snapshot.facets);\n this.handleFilterPaneVisibility();\n }\n }\n\n /**\n * Closes the dialog and navigates to the selected document.\n * @param documentId - The ID of the document to open.\n */\n override open(documentId?: string): void {\n if (documentId) this.dialogRef.close({ documentId });\n }\n\n /**\n * Returns the CSS class reflecting the item's validity state.\n * @param item - The document to evaluate.\n * @returns A CSS class name string, or `undefined` when no special state applies.\n */\n override getItemStateCssClass(item: ClipperDocumentInfo): string | undefined {\n if (item.isExpired) return 'expired-bg';\n return undefined;\n }\n\n /**\n * Returns the tooltip text explaining the item's current validity state.\n * @param item - The document to evaluate.\n * @returns A human-readable state description, or an empty string when no special state applies.\n */\n override getItemStateTooltip(item: ClipperDocumentInfo): string {\n if (item.isExpired) return 'Non più vigente';\n return '';\n }\n}\n","<div class=\"clipper-references-fixed\">\n <div class=\"dialog-header\">\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutGap='10px' fxFill>\n <div fxFlex=\"*\">\n <div mat-dialog-title>{{title}} </div>\n </div>\n <div fxLayoutAlign=\"end\">\n <button fxFlexAlign=\"start\" type=\"button\" mat-icon-button matTooltip=\"Chiudi\" aria-label=\"Chiudi\"\n (click)=\"close()\" class=\"dialog-close\">\n <mat-icon>close</mat-icon>\n </button>\n </div>\n </div>\n @if (dialogData.mode > 0 || selection?.hasValue() || (snapshot && snapshot.facets?.hasFacets && filterPane &&\n (!filterPane.opened || filterPaneClosed()))) {\n <div class=\"dialog-toolbar\">\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\" fxFill>\n <div fxFlex=\"*\">\n @if (dialogData.mode === 1) {\n <mat-slide-toggle [checked]=\"filterParams.excludeTextReferences === true\"\n (change)=\"filterParams.excludeTextReferences = $event.checked; fetch(true)\">\n &nbsp; Mostra solo se citati nelle note\n </mat-slide-toggle>\n } @else if (dialogData.mode == 2) {\n <mat-slide-toggle [checked]=\"filterParams.excludeNotesReferences === true\"\n (change)=\"filterParams.excludeNotesReferences = $event.checked; fetch(true)\">\n &nbsp; Mostra solo se citano nel testo il documento\n </mat-slide-toggle>\n }\n </div>\n <div fxLayoutAlign=\"end\">\n @if (selection?.hasValue()) {\n <button fxFlexAlign=\"center\" type=\"button\" mat-icon-button\n matTooltip=\"Azioni da eseguire sugli elementi selezionati\"\n [attr.aria-label]=\"'Menu opzioni per elementi selezionati'\" [matMenuTriggerFor]=\"menuSelections\"\n [disabled]=\"!snapshot.total\" [matBadge]=\"selection?.all?.length\">\n <mat-icon>checklist</mat-icon>\n </button>\n }\n <mat-menu #menuSelections=\"matMenu\">\n <clipper-document-menu [parent]=\"this\" selectionSource=\"selection\" [useSelections]=\"true\"\n [isReadable]=\"false\" [isReference]=\"true\" [canUseAIAssistant]=\"user?.hasAIAssistant ?? false\">\n </clipper-document-menu>\n </mat-menu>\n @if (snapshot && snapshot.facets?.hasFacets && filterPane && (!filterPane.opened || filterPaneClosed())) {\n <div fxFlexAlign=\"center\">\n <button type=\"button\" mat-icon-button matTooltip=\"Affina ricerca\" aria-label=\"'Affina ricerca'\"\n (click)=\"toggleFilterPane()\">\n <mat-icon>right_panel_open</mat-icon>\n </button>\n </div>\n }\n </div>\n </div>\n </div>\n }\n </div>\n</div>\n<mat-dialog-content id=\"clipper-references-scrollable\">\n <mat-drawer-container class=\"fill\" [hasBackdrop]=\"filterPaneHasBackdrop()\">\n <mat-drawer #filterPane position=\"end\" class=\"drawer-small drawer-with-loader\" opened=\"false\">\n @if (filterBusy()) {\n <div class=\"overlay\"></div>\n }\n <div fxLayout=\"column\" fxFill>\n <div fxFlex=\"6px\">\n @if (filterBusy()) {\n <mat-progress-bar style=\"z-index: 11;\" mode=\"indeterminate\">\n </mat-progress-bar>\n }\n </div>\n <div fxFlex=\"78px\" class=\"title-container-with-loader\">\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\" fxFill>\n <div class=\"title\">Affina ricerca</div>\n <div fxFlex=\"*\" fxLayoutAlign=\"end\">\n <button mat-icon-button (click)=\"toggleFilterPane()\"\n matTooltip=\"Nascondi\"><mat-icon>right_panel_close</mat-icon></button>\n </div>\n </div>\n </div>\n <div fxFlex=\"*\" class=\"scroll-hidden\" style=\"padding: 0 5px;\">\n <clipper-search-facets #facets [handleTooManyResults]=\"dialogData.canHandleTooManyResults\" ></clipper-search-facets>\n </div>\n </div>\n </mat-drawer>\n <div fxLayout=\"column\" fxFill>\n <div fxFlex=\"*\" [id]=\"scrollerId\" class=\"scroll-auto\" style=\"padding: 0 5px;\">\n @if (!snapshot.total) {\n <div class=\"message-container\">\n <p class=\"message\"><b>Nessun elemento da visualizzare.</b></p>\n </div>\n } @else {\n <div>\n @for (item of snapshot.items; track $index; let i = $index) {\n @if (item.group) {\n <div class=\"items-group-title\">\n <div [class.group-spaced]=\"i > 0\">{{item.group}}</div>\n </div>\n }\n <clipper-search-result-item [item]=\"item\" [parent]=\"this\" [isReadable]=\"false\"\n [actions]=\"contextMenu\"></clipper-search-result-item>\n }\n <mat-menu #contextMenu=\"matMenu\" (closed)=\"updateMenuButtonsVisibility()\">\n <ng-template matMenuContent let-item=\"item\">\n <clipper-document-menu [parent]=\"this\" [item]=\"item\" [isReadable]=\"false\" [isReference]=\"true\"\n [canUseAIAssistant]=\"user?.hasAIAssistant ?? false\">\n </clipper-document-menu>\n </ng-template>\n </mat-menu>\n </div>\n }\n </div>\n <!-- footer -->\n @if ((snapshot?.total ?? 0) > 0) {\n <div class=\"items-footer\">\n <div fxLayout=\"row wrap\" fxLayoutGap=\"10px\" fxLayoutAlign=\"space-between center\" fxFill>\n <!-- legend -->\n <div fxFlex.lt-md=\"100\" class=\"legend-container\">\n <div class=\"legend expired-bg \"></div>\n non più vigente\n </div>\n <div fxFlex.lt-md=\"100\" fxLayoutAlign=\"end\" [class.wide]=\"filterPane?.opened\">\n <div fxLayout=\"row\">\n <mat-paginator fxFlexAlign=\"center\" #paginator class=\"paginator\" [hidePageSize]=\"true\"\n [length]=\"snapshot?.total ?? 0\" [pageSize]=\"filterParams.count ?? 15\" [showFirstLastButtons]=\"true\"\n (page)=\"fetchMore($event)\">\n </mat-paginator>\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n </mat-drawer-container>\n</mat-dialog-content>"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8DA,IAAa,6BAAb,MAAa,mCAAmC,2BAA0B;CAUxE,cAAA;EACE,MAAK;EAVE,KAAA,aAAa,UAAqB,cAAa,GAAA,YAAA,CAAA,EAAA,WAAA,aAAA,CAAA,+BAAA,CAAA,CAAA;EAEvC,KAAA,YAAY,OAAO,YAAwC;EACzD,KAAA,aAA0C,OAAO,eAAe,KAAK,EAAE,MAAM,2BAA2B,aAAY;EAGpH,KAAA,OAAoC,KAAK,eAAe;EACnE,KAAA,a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IACA;IACA;IACA;IACA;IACA;GACD;GAAA,UAAA;GAAA,QAAA,CAAA,w3dAAA;EAAA,CAAA;CAG0C,CAAA;CAAA,sBAAA,CAAA;CAAA,gBAAA,EAAA,YAAA,CAAA;EAAA,MAAA,GAAA;EAAA,MAAA,CAAA,cAAY,EAAA,UAAA,KAAA,CAAA;CAAA,CAAA,EAAA;AAAA,CAAA"}
1
+ {"version":3,"file":"arsedizioni-ars-utils-clipper.ui-references.component-DYojmfsw.mjs","names":[],"sources":["../../../projects/ars-utils/clipper.ui/references/references.component.ts","../../../projects/ars-utils/clipper.ui/references/references.component.html"],"sourcesContent":["import { Breakpoints } from '@angular/cdk/layout';\nimport { ChangeDetectionStrategy, Component, afterNextRender, inject, viewChild } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { MatBadgeModule } from '@angular/material/badge';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MAT_DIALOG_DATA, MatDialogContent, MatDialogRef, MatDialogTitle } from '@angular/material/dialog';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatMenuModule } from '@angular/material/menu';\nimport { MatPaginatorModule, PageEvent } from '@angular/material/paginator';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\nimport { MatDrawer, MatSidenavModule } from '@angular/material/sidenav';\nimport { MatSlideToggleModule } from '@angular/material/slide-toggle';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { ClipperDocumentInfo, ClipperQueryReferencesMode, ClipperReferencesSearchParams, ClipperSearchFacetsResult, ClipperSearchFacetsSnapshot, ClipperSearchParams, ClipperUserInfo } from '@arsedizioni/ars-utils/clipper.common';\nimport { ApiResult, SelectableModel, SystemUtils } from '@arsedizioni/ars-utils/core';\nimport { FlexLayoutModule } from '@arsedizioni/ars-utils/ui';\nimport { finalize } from 'rxjs/operators';\nimport { ClipperSearchResultManager } from '../search-result-manager/search-result-manager';\nimport { ClipperDocumentMenuComponent } from '../document-menu/document-menu.component';\nimport { ClipperSearchFacetsComponent } from '../search-facets/search-facets.component';\nimport { ClipperSearchResultItemComponent } from '../search-result-item/search-result-item.component';\n\n\nexport interface ClipperReferencesDialogData {\n mode?: ClipperQueryReferencesMode;\n anchor?: string;\n anchorTitle?: string;\n documentId: string;\n model: number;\n canHandleTooManyResults?: boolean;\n}\n\nexport interface ClipperReferenceDialogResult {\n documentId: string;\n}\n\n@Component({\n host: { 'Bind': SystemUtils.generateUUID() },\n templateUrl: './references.component.html',\n styleUrls: ['./references.component.scss'],\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n FlexLayoutModule,\n MatDialogTitle,\n MatButtonModule,\n MatTooltipModule,\n MatIconModule,\n MatCheckboxModule,\n MatSlideToggleModule,\n MatMenuModule,\n MatBadgeModule,\n MatPaginatorModule,\n MatDialogContent,\n MatSidenavModule,\n MatProgressBarModule,\n ClipperDocumentMenuComponent,\n ClipperSearchFacetsComponent,\n ClipperSearchResultItemComponent,\n ],\n})\nexport class ClipperReferencesComponent extends ClipperSearchResultManager {\n readonly filterPane = viewChild<MatDrawer>('filterPane');\n\n private readonly dialogRef = inject(MatDialogRef<ClipperReferencesComponent>);\n protected readonly dialogData: ClipperReferencesDialogData = inject(MAT_DIALOG_DATA) ?? { mode: ClipperQueryReferencesMode.ReferencesIn };\n protected title?: string;\n protected item?: ClipperDocumentInfo;\n protected readonly user: ClipperUserInfo | undefined = this.clipperService.user;\n private _viewReady = false;\n\n constructor() {\n super();\n if (this.dialogData) {\n switch (this.dialogData.mode) {\n case ClipperQueryReferencesMode.ReferencesIn:\n this.title = \"Documenti richiamati nelle note o nel testo\";\n break;\n case ClipperQueryReferencesMode.ReferencesOut:\n this.title = \"Documenti che richiamano quello in visione\";\n break;\n case ClipperQueryReferencesMode.ChangesIn:\n this.title = \"Modifiche subite\";\n break;\n case ClipperQueryReferencesMode.ChangesOut:\n this.title = \"Modifiche apportate\";\n break;\n case ClipperQueryReferencesMode.Juris:\n this.title = \"Giurisprudenza associata\";\n break;\n }\n if (this.dialogData.anchorTitle) {\n this.title += \" - \" + this.dialogData.anchorTitle;\n }\n // Use service snapshot\n this.snapshot = this.clipperService.referencesSnapshot() ?? { searchParams: new ClipperSearchParams(), interval: \"-1\" };\n if (\n this.filterParams.mode !== this.dialogData.mode ||\n this.filterParams.id !== this.dialogData.documentId ||\n this.filterParams.anchor !== this.dialogData.anchor\n ) {\n this.filterParams = new ClipperSearchParams();\n this.filterParams.mode = this.dialogData.mode;\n this.filterParams.model = this.dialogData.model;\n this.filterParams.anchor = this.dialogData.anchor;\n this.filterParams.id = this.dialogData.documentId;\n this.filterParams.useModifierInfo = this.dialogData.mode === ClipperQueryReferencesMode.ChangesOut;\n this.filterParams.returnModifierInfo = this.dialogData.mode !== ClipperQueryReferencesMode.ChangesOut;\n this.clipperService.referencesSnapshot.set(this.snapshot);\n }\n }\n\n // Initialize selection\n this.selection = new SelectableModel<ClipperDocumentInfo, string>(true, 'documentId');\n\n // Observe layout changes\n this.breakpointObserver\n .observe([\n Breakpoints.XSmall,\n Breakpoints.Small,\n Breakpoints.Medium,\n Breakpoints.Large,\n Breakpoints.XLarge,\n ])\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe((result: any) => {\n if (!this._viewReady) return; // DOM not ready yet\n for (const query of Object.keys(result.breakpoints)) {\n if (result.breakpoints[query]) {\n this.handleFilterPaneVisibility();\n }\n }\n });\n\n // Run view-dependent initialization after the first render.\n afterNextRender(() => {\n this._viewReady = true;\n this.handleFilterPaneVisibility();\n const filterPane = this.filterPane();\n if (filterPane) {\n filterPane.openedChange\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(opened => {\n if (filterPane.mode === 'over') {\n this.filterPaneHasBackdrop.set(opened);\n }\n });\n }\n const facets = this.facets();\n if (facets) {\n facets.changed\n .subscribe((value: ClipperSearchFacetsSnapshot) => {\n this.snapshot.facets = value;\n this.fetch(true);\n });\n }\n this.fetch(true);\n this.restoreFacets();\n this.changeDetector.markForCheck();\n });\n }\n\n\n /**\n * Toggles the filter pane open/closed state.\n */\n protected toggleFilterPane(): void {\n this.filterPaneClosed.set(!this.filterPaneClosed());\n this.filterPane()?.toggle();\n }\n\n\n\n /**\n * Adjusts the filter pane mode (side vs. overlay) and backdrop based on the current breakpoint.\n */\n private handleFilterPaneVisibility(): void {\n const filterPane = this.filterPane();\n if (filterPane) {\n if (this.breakpointObserver.isMatched(Breakpoints.XSmall) ||\n this.breakpointObserver.isMatched(Breakpoints.Small) ||\n this.breakpointObserver.isMatched(Breakpoints.Medium)) {\n if (filterPane.opened) {\n filterPane.close();\n }\n filterPane.mode = 'over';\n filterPane.disableClose = false;\n this.filterPaneHasBackdrop.set(filterPane.opened);\n } else {\n if (!this.hasFacets()) {\n filterPane.close();\n } else if (!filterPane.opened && !this.filterPaneClosed()) {\n filterPane.open();\n } else if (filterPane.opened && this.filterPaneClosed()) {\n filterPane.close();\n }\n filterPane.mode = 'side';\n filterPane.disableClose = true;\n this.filterPaneHasBackdrop.set(false);\n }\n }\n }\n\n\n /**\n * Closes the references dialog without returning a result.\n */\n close(): void {\n this.dialogRef.close();\n }\n\n\n\n /**\n * Sends document links by email for the given item or, when omitted, for all selected items.\n * @param item - The specific document to send, or `undefined` to use the current selection.\n */\n sendTo(item?: ClipperDocumentInfo): void {\n this.sendItemsTo(item ? [item] : this.selection?.all);\n }\n\n\n\n /**\n * Builds the search parameters for the next fetch call.\n * @param newSearch - When `true`, resets the pagination offset to 0.\n * @returns A cloned and enriched `ClipperSearchParams` ready to be sent to the API.\n */\n private prepareFetch(newSearch: boolean = false): ClipperSearchParams {\n const newParams = SystemUtils.clone(this.filterParams) as ClipperSearchParams;\n newParams.count = 15;\n newParams.useModifierInfo =\n newParams.mode === ClipperQueryReferencesMode.ChangesOut;\n newParams.returnModifierInfo =\n newParams.mode !== ClipperQueryReferencesMode.ChangesOut;\n // New search, reset paging\n if (newSearch) {\n newParams.first = 0;\n this.filterParams.first = 0;\n }\n\n // Apply facets\n if (this.snapshot.facets?.fromDate) {\n newParams.fromDate = this.snapshot.facets?.fromDate;\n newParams.toDate = this.snapshot.facets?.toDate;\n newParams.year = this.snapshot.facets?.fromDate.getFullYear();\n }\n if (this.snapshot.facets?.sector) {\n newParams.sector = this.snapshot.facets?.sector;\n }\n if (this.snapshot.facets?.type) {\n newParams.type = this.snapshot.facets?.type;\n }\n if (this.snapshot.facets?.author) {\n newParams.author = this.snapshot.facets?.author;\n }\n return newParams;\n }\n\n /**\n * Maps a generic `ClipperSearchParams` to the references-specific API parameter shape.\n * @param params - The base search parameters to convert.\n * @returns A `ClipperReferencesSearchParams` object ready for the references endpoint.\n */\n private toReferencesSearchParams(params: ClipperSearchParams): ClipperReferencesSearchParams {\n return {\n documentId: params.id,\n year: params.year,\n sector: params.sector,\n author: params.author,\n anchor: params.anchor,\n model: params.model?.toString() ?? null,\n mode: params.mode,\n excludeTextReferences: params.excludeTextReferences,\n excludeNotesReferences: params.excludeNotesReferences,\n returnModifierInfo: params.returnModifierInfo,\n useModifierInfo: params.useModifierInfo,\n count: 15,\n first: params.first ?? 0\n }\n }\n\n /**\n * Executes the references search and updates the result snapshot.\n * @param newSearch - When `true`, resets pagination and reloads facets. Defaults to `false`.\n */\n fetch(newSearch: boolean = false): void {\n if (!this.clipperService.loggedIn()) return;\n this.dialogService.busy('Ricerca in corso...');\n const searchParams = this.prepareFetch(newSearch);\n if (searchParams) {\n this.clipperService.documents.references(this.toReferencesSearchParams(searchParams))\n .pipe(finalize(() => this.dialogService.clearBusy()))\n .subscribe(r => {\n if (!r.success) this.dialogService.error(r.message);\n else {\n this.prepareResults(r.value, newSearch);\n\n // Handle facets\n if (this.snapshot.total > 0) {\n if (newSearch)\n // Update facets\n this.fetchFacets(searchParams);\n } else {\n this.hideFacets();\n }\n\n if (newSearch) {\n const paginator = this.paginator();\n if (paginator) paginator.pageIndex = 0;\n }\n\n this.scroll(0);\n }\n });\n }\n }\n\n /**\n * Navigates to the next result page.\n * @param e - The `PageEvent` emitted by the paginator with the new page index and size.\n */\n fetchMore(e: PageEvent): void {\n const first = e.pageIndex * (this.filterParams.count ?? 15);\n this.filterParams.first = first;\n this.fetch();\n }\n\n /**\n * Loads available facets for the current search parameters and updates the filter pane.\n * @param params - The search parameters used to request facets from the API.\n */\n fetchFacets(params: ClipperSearchParams): void {\n if (!this.clipperService.loggedIn() || !params) return;\n if (!this.snapshot.facets || this.snapshot.facets?.hasMoreFacets) {\n this.filterBusy.set(true);\n this.clipperService.documents.referencesFacets(this.toReferencesSearchParams(params))\n .subscribe({\n next: (r: ApiResult<ClipperSearchFacetsResult>) => {\n if (r.success) {\n let hasFacets = (r.value.facets?.length ?? 0) > 0;\n if (r.value.facets) {\n const facets = this.facets();\n facets?.update(r.value.facets, r.value.interval);\n if (facets && this.snapshot) {\n hasFacets = facets.hasFacets();\n this.snapshot.facets = facets.save();\n this.snapshot.facets.hasTooManyResults = (this.snapshot?.total ?? 0) >= 1000;\n }\n }\n this.hasFacets.set(hasFacets);\n this.handleFilterPaneVisibility();\n }\n },\n complete: () => {\n this.filterBusy.set(false);\n }\n });\n }\n }\n\n /**\n * Hides the facet filter pane and resets all applied facet filters.\n */\n protected hideFacets(): void {\n this.hasFacets.set(false);\n this.facets()?.reset();\n this.filterPane().close();\n this.filterPaneClosed.set(false);\n }\n /**\n * Restores previously saved facets from the snapshot and adjusts the filter pane accordingly.\n */\n restoreFacets(): void {\n if (this.snapshot.facets) {\n this.facets().restore(this.snapshot.facets);\n this.handleFilterPaneVisibility();\n }\n }\n\n /**\n * Closes the dialog and navigates to the selected document.\n * @param documentId - The ID of the document to open.\n */\n override open(documentId?: string): void {\n if (documentId) this.dialogRef.close({ documentId });\n }\n\n /**\n * Returns the CSS class reflecting the item's validity state.\n * @param item - The document to evaluate.\n * @returns A CSS class name string, or `undefined` when no special state applies.\n */\n override getItemStateCssClass(item: ClipperDocumentInfo): string | undefined {\n if (item.isExpired) return 'expired-bg';\n return undefined;\n }\n\n /**\n * Returns the tooltip text explaining the item's current validity state.\n * @param item - The document to evaluate.\n * @returns A human-readable state description, or an empty string when no special state applies.\n */\n override getItemStateTooltip(item: ClipperDocumentInfo): string {\n if (item.isExpired) return 'Non più vigente';\n return '';\n }\n}\n","<div class=\"clipper-references-fixed\">\n <div class=\"dialog-header\">\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutGap='10px' fxFill>\n <div fxFlex=\"*\">\n <div mat-dialog-title>{{title}} </div>\n </div>\n <div fxLayoutAlign=\"end\">\n <button fxFlexAlign=\"start\" type=\"button\" mat-icon-button matTooltip=\"Chiudi\" aria-label=\"Chiudi\"\n (click)=\"close()\" class=\"dialog-close\">\n <mat-icon>close</mat-icon>\n </button>\n </div>\n </div>\n @if (dialogData.mode > 0 || selection?.hasValue() || (snapshot && snapshot.facets?.hasFacets && filterPane &&\n (!filterPane.opened || filterPaneClosed()))) {\n <div class=\"dialog-toolbar\">\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\" fxFill>\n <div fxFlex=\"*\">\n @if (dialogData.mode === 1) {\n <mat-slide-toggle [checked]=\"filterParams.excludeTextReferences === true\"\n (change)=\"filterParams.excludeTextReferences = $event.checked; fetch(true)\">\n &nbsp; Mostra solo se citati nelle note\n </mat-slide-toggle>\n } @else if (dialogData.mode == 2) {\n <mat-slide-toggle [checked]=\"filterParams.excludeNotesReferences === true\"\n (change)=\"filterParams.excludeNotesReferences = $event.checked; fetch(true)\">\n &nbsp; Mostra solo se citano nel testo il documento\n </mat-slide-toggle>\n }\n </div>\n <div fxLayoutAlign=\"end\">\n @if (selection?.hasValue()) {\n <button fxFlexAlign=\"center\" type=\"button\" mat-icon-button\n matTooltip=\"Azioni da eseguire sugli elementi selezionati\"\n [attr.aria-label]=\"'Menu opzioni per elementi selezionati'\" [matMenuTriggerFor]=\"menuSelections\"\n [disabled]=\"!snapshot.total\" [matBadge]=\"selection?.all?.length\">\n <mat-icon>checklist</mat-icon>\n </button>\n }\n <mat-menu #menuSelections=\"matMenu\">\n <clipper-document-menu [parent]=\"this\" selectionSource=\"selection\" [useSelections]=\"true\"\n [isReadable]=\"false\" [isReference]=\"true\" [canUseAIAssistant]=\"user?.hasAIAssistant ?? false\">\n </clipper-document-menu>\n </mat-menu>\n @if (snapshot && snapshot.facets?.hasFacets && filterPane && (!filterPane.opened || filterPaneClosed())) {\n <div fxFlexAlign=\"center\">\n <button type=\"button\" mat-icon-button matTooltip=\"Affina ricerca\" aria-label=\"'Affina ricerca'\"\n (click)=\"toggleFilterPane()\">\n <mat-icon>right_panel_open</mat-icon>\n </button>\n </div>\n }\n </div>\n </div>\n </div>\n }\n </div>\n</div>\n<mat-dialog-content id=\"clipper-references-scrollable\">\n <mat-drawer-container class=\"fill\" [hasBackdrop]=\"filterPaneHasBackdrop()\">\n <mat-drawer #filterPane position=\"end\" class=\"drawer-small drawer-with-loader\" opened=\"false\">\n @if (filterBusy()) {\n <div class=\"overlay\"></div>\n }\n <div fxLayout=\"column\" fxFill>\n <div fxFlex=\"6px\">\n @if (filterBusy()) {\n <mat-progress-bar style=\"z-index: 11;\" mode=\"indeterminate\">\n </mat-progress-bar>\n }\n </div>\n <div fxFlex=\"78px\" class=\"title-container-with-loader\">\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\" fxFill>\n <div class=\"title\">Affina ricerca</div>\n <div fxFlex=\"*\" fxLayoutAlign=\"end\">\n <button mat-icon-button (click)=\"toggleFilterPane()\"\n matTooltip=\"Nascondi\"><mat-icon>right_panel_close</mat-icon></button>\n </div>\n </div>\n </div>\n <div fxFlex=\"*\" class=\"scroll-hidden\" style=\"padding: 0 5px;\">\n <clipper-search-facets #facets [handleTooManyResults]=\"dialogData.canHandleTooManyResults\" ></clipper-search-facets>\n </div>\n </div>\n </mat-drawer>\n <div fxLayout=\"column\" fxFill>\n <div fxFlex=\"*\" [id]=\"scrollerId\" class=\"scroll-auto\" style=\"padding: 0 5px;\">\n @if (!snapshot.total) {\n <div class=\"message-container\">\n <p class=\"message\"><b>Nessun elemento da visualizzare.</b></p>\n </div>\n } @else {\n <div>\n @for (item of snapshot.items; track $index; let i = $index) {\n @if (item.group) {\n <div class=\"items-group-title\">\n <div [class.group-spaced]=\"i > 0\">{{item.group}}</div>\n </div>\n }\n <clipper-search-result-item [item]=\"item\" [parent]=\"this\" [isReadable]=\"false\"\n [actions]=\"contextMenu\"></clipper-search-result-item>\n }\n <mat-menu #contextMenu=\"matMenu\" (closed)=\"updateMenuButtonsVisibility()\">\n <ng-template matMenuContent let-item=\"item\">\n <clipper-document-menu [parent]=\"this\" [item]=\"item\" [isReadable]=\"false\" [isReference]=\"true\"\n [canUseAIAssistant]=\"user?.hasAIAssistant ?? false\">\n </clipper-document-menu>\n </ng-template>\n </mat-menu>\n </div>\n }\n </div>\n <!-- footer -->\n @if ((snapshot?.total ?? 0) > 0) {\n <div class=\"items-footer\">\n <div fxLayout=\"row wrap\" fxLayoutGap=\"10px\" fxLayoutAlign=\"space-between center\" fxFill>\n <!-- legend -->\n <div fxFlex.lt-md=\"100\" class=\"legend-container\">\n <div class=\"legend expired-bg \"></div>\n non più vigente\n </div>\n <div fxFlex.lt-md=\"100\" fxLayoutAlign=\"end\" [class.wide]=\"filterPane?.opened\">\n <div fxLayout=\"row\">\n <mat-paginator fxFlexAlign=\"center\" #paginator class=\"paginator\" [hidePageSize]=\"true\"\n [length]=\"snapshot?.total ?? 0\" [pageSize]=\"filterParams.count ?? 15\" [showFirstLastButtons]=\"true\"\n (page)=\"fetchMore($event)\">\n </mat-paginator>\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n </mat-drawer-container>\n</mat-dialog-content>"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8DA,IAAa,6BAAb,MAAa,mCAAmC,2BAA0B;CAUxE,cAAA;EACE,MAAK;EAVE,KAAA,aAAa,UAAqB,cAAa,GAAA,YAAA,CAAA,EAAA,WAAA,aAAA,CAAA,+BAAA,CAAA,CAAA;EAEvC,KAAA,YAAY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