@arsedizioni/ars-utils 21.2.204 → 21.2.206

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,9 +1,8 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { DestroyRef, ChangeDetectorRef, Injector, OnInit, AfterViewInit, Signal, OnDestroy } from '@angular/core';
2
+ import { DestroyRef, ChangeDetectorRef, Injector } from '@angular/core';
3
3
  import { MatPaginator, PageEvent } from '@angular/material/paginator';
4
4
  import { MatDrawer } from '@angular/material/sidenav';
5
5
  import { ClipperSearchFacetsSnapshot, ClipperSearchFacet, ClipperSearchFacetGroup, ClipperService, ClipperDocumentInfo, ClipperSearchParams, ClipperQueryReferencesMode, ClipperModule, ClipperModel, ClipperSearchCalendarSnapshotMonth, ClipperSearchCalendarSnapshotResult, ClipperSelectionMode, ClipperSearchResult, ClipperSort, ClipperUserInfo, ClipperUserSearch, SectorInfo, ClipperDocumentRelevants, ClipperDocumentAnchorInfo, ClipperDocumentProperty, EditDialogData, EditDialogCompleted, ClipperContactInfo } from '@arsedizioni/ars-utils/clipper.common';
6
- import * as rxjs from 'rxjs';
7
6
  import { BreakpointObserver } from '@angular/cdk/layout';
8
7
  import { BroadcastService, DateInterval, ThemeService, ScreenService, SelectableModel, NameValueItem, INode, ThemeType } from '@arsedizioni/ars-utils/core';
9
8
  import { Clipboard } from '@angular/cdk/clipboard';
@@ -19,49 +18,54 @@ import { MatDialogRef } from '@angular/material/dialog';
19
18
 
20
19
  declare class ClipperSearchFacetsComponent {
21
20
  readonly changed: _angular_core.OutputEmitterRef<ClipperSearchFacetsSnapshot>;
22
- private changeDetector;
21
+ private readonly changeDetector;
23
22
  protected snapshot: ClipperSearchFacetsSnapshot;
24
- hasFacets: () => boolean;
25
- handleTooManyResults: _angular_core.InputSignal<boolean>;
26
23
  /**
27
- * Update facets
28
- * @param values : the facets values
29
- * @param interval : the date interval for YEAR facets
30
- */
24
+ * Returns whether the current snapshot contains at least one available or applied facet group.
25
+ */
26
+ hasFacets(): boolean;
27
+ readonly handleTooManyResults: _angular_core.InputSignal<boolean>;
28
+ /**
29
+ * Pushes a new set of facet groups into the snapshot and refreshes the view.
30
+ * @param values - The raw facet data returned by the search engine, grouped by type.
31
+ * @param interval - Optional display label for the year-range interval (YEAR facet type).
32
+ */
31
33
  update(values?: ClipperSearchFacet[][], interval?: string): void;
32
34
  /**
33
- * Use a facet item as filter
34
- * @param group : the facet group
35
- * @param item : the facet item
35
+ * Applies the given facet item as an active filter and emits a `changed` event.
36
+ * @param group - The facet group that owns the selected item.
37
+ * @param item - The facet item chosen by the user.
36
38
  */
37
39
  protected use(group: ClipperSearchFacetGroup, item: ClipperSearchFacet): void;
38
40
  /**
39
- * dismiss a facet group filter
40
- * @param group : the facet group
41
- * @param apply : true to emit changed event and generate a new search, false just for update
41
+ * Removes an active facet filter from the selection and optionally emits a `changed` event.
42
+ * @param group - The applied facet group to dismiss.
43
+ * @param apply - When `true` (default), emits the `changed` event to trigger a new search.
42
44
  */
43
45
  protected dismiss(group: ClipperSearchFacetGroup, apply?: boolean): void;
44
46
  /**
45
- * Apply filter
47
+ * Builds and emits the current `ClipperSearchFacetsSnapshot` after resolving each applied
48
+ * facet group's filter value into the corresponding snapshot date/sector/author/type fields.
46
49
  */
47
50
  private apply;
48
51
  /**
49
- * Clear facets by group index
50
- * @param index : the group index to clear. Use -1 to clear all groups at once
51
- * @returns : the number of groups dismissed
52
+ * Dismisses one or all applied facet groups and emits a `changed` event if any were removed.
53
+ * @param index - The group index to clear, or `-1` to clear all applied groups at once.
54
+ * @returns The number of groups that were dismissed.
52
55
  */
53
56
  protected clear(index?: number): number;
54
57
  /**
55
- * Reset
58
+ * Resets all facet state: clears every applied/available group and all derived filter fields.
56
59
  */
57
60
  reset(): void;
58
61
  /**
59
- * Restore data
60
- * @param data : the data to restore
62
+ * Restores a previously serialised facets snapshot and refreshes the view.
63
+ * @param data - The snapshot to restore.
61
64
  */
62
65
  restore(data: ClipperSearchFacetsSnapshot): void;
63
66
  /**
64
- * Save data
67
+ * Returns the current facets snapshot for external serialisation (e.g. save/restore cycle).
68
+ * @returns The current `ClipperSearchFacetsSnapshot`.
65
69
  */
66
70
  save(): ClipperSearchFacetsSnapshot;
67
71
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<ClipperSearchFacetsComponent, never>;
@@ -70,166 +74,165 @@ declare class ClipperSearchFacetsComponent {
70
74
 
71
75
  declare class ClipperDocumentManager {
72
76
  readonly populateContacts: _angular_core.OutputEmitterRef<SendToPopulateData>;
73
- protected clipboard: Clipboard;
74
- clipperService: ClipperService;
75
- protected broadcastService: BroadcastService;
76
- protected dialogService: ApplicationDialogService;
77
- protected canUseArchive: _angular_core.WritableSignal<boolean>;
78
- protected canHandleTooManyResults: _angular_core.WritableSignal<boolean>;
79
- protected canPopulateContacts: _angular_core.WritableSignal<boolean>;
80
- /**
81
- * Export a document in pdf format
82
- * @param item : the document to export
83
- */
77
+ protected readonly clipboard: Clipboard;
78
+ readonly clipperService: ClipperService;
79
+ protected readonly broadcastService: BroadcastService;
80
+ protected readonly dialogService: ApplicationDialogService;
81
+ protected readonly canUseArchive: _angular_core.WritableSignal<boolean>;
82
+ protected readonly canHandleTooManyResults: _angular_core.WritableSignal<boolean>;
83
+ protected readonly canPopulateContacts: _angular_core.WritableSignal<boolean>;
84
+ /**
85
+ * Exports a document in PDF format, after asking for confirmation.
86
+ * @param item - The document to export.
87
+ */
84
88
  exportPdf(item: ClipperDocumentInfo): void;
85
89
  /**
86
- * Export current document list or just the selected documents as a csv
87
- * @param documentIds: the document id list
88
- * @param searchParams: the search params
89
- * @param format: the export format: 1) list 2) deadlines
90
+ * Exports the current document list (or only the selected documents) as CSV or ICS.
91
+ * @param documentIds - The list of document IDs to export; if empty, the full search result is exported.
92
+ * @param searchParams - The search parameters used to identify the full result set when no IDs are provided.
93
+ * @param format - The export format: 1 = list (CSV), 2 = deadlines (ICS).
90
94
  */
91
95
  exportItems(documentIds: string[] | undefined, searchParams?: ClipperSearchParams | undefined, format?: number): void;
92
96
  /**
93
- * Export a single deadline
94
- * @param item : the document to export
97
+ * Exports a single document's deadline as an ICS file.
98
+ * @param item - The document whose deadline to export.
95
99
  */
96
100
  exportDeadline(item: ClipperDocumentInfo): void;
97
101
  /**
98
- * Archive a list of items
99
- * @param items: the item list
102
+ * Sends a broadcast message to add the given documents to the archive.
103
+ * @param items - The list of documents to archive.
100
104
  */
101
105
  addToArchive(items: ClipperDocumentInfo[]): void;
102
106
  /**
103
- * Create a new deadline
104
- * @param item : the item to add
107
+ * Sends a broadcast message to create a new calendar deadline from the given document.
108
+ * @param item - The document to add to the calendar.
105
109
  */
106
110
  addToCalendar(item: ClipperDocumentInfo): void;
107
111
  /**
108
- * Add a list of items to working documents
109
- * @param items : the item list
110
- */
112
+ * Sends a broadcast message to add the given documents to the working-documents set.
113
+ * @param items - The list of documents to add.
114
+ */
111
115
  addItemsToWorkingDocuments(items: ClipperDocumentInfo[]): void;
112
116
  /**
113
- * Add a list of items to bag
114
- * @param items : the item list
115
- */
117
+ * Sends a request to the Clipper service to add the given documents to the bag.
118
+ * @param items - The list of documents to add.
119
+ */
116
120
  addItemsToBag(items: ClipperDocumentInfo[]): void;
117
121
  /**
118
- * Add properties to a document
119
- * @param item : the item to add properties to
122
+ * Sends a broadcast message to add custom properties to the given document.
123
+ * @param item - The document to add properties to.
120
124
  */
121
125
  addItemProperty(item: ClipperDocumentInfo): void;
122
126
  /**
123
- * Copy metadata to clipboard
124
- * @param item : the item to copy
127
+ * Copies the document's metadata (ID, titles, number, date, origin) as a tab-separated string to the clipboard.
128
+ * @param item - The document whose metadata to copy.
125
129
  */
126
130
  copyMetadataToClipboard(item: ClipperDocumentInfo): void;
127
131
  /**
128
- * Show a document permalink
129
- * @param item : the item to show the link for
132
+ * Displays a dialog with a shareable permalink for the given document.
133
+ * @param item - The document to show the permalink for.
130
134
  */
131
135
  showLink(item: ClipperDocumentInfo): void;
132
136
  /**
133
- * Send documents links by email
134
- * @param items : the document list
137
+ * Opens a dialog to send document links by email to one or more recipients.
138
+ * @param items - The list of documents to send.
135
139
  */
136
140
  sendItemsTo(items: ClipperDocumentInfo[]): void;
137
141
  /**
138
- * Display a document report
139
- * @param documentId : the document id
140
- * @param title: the document short title
142
+ * Downloads the document's HTML report.
143
+ * @param documentId - The ID of the document.
144
+ * @param title - Optional display title used as the file name.
141
145
  */
142
146
  openReport(documentId: string, title?: string): void;
143
147
  /**
144
- * Open an item
145
- * This should be always overridden
146
- * @param documentId : the document id
147
- * @param query : the query document
148
- * @param queryChunks : the query chunks for highlight as string (eg. "|1|2|3...")
149
- * @param newWindow: true if the document must be open into a new window
150
- */
148
+ * Opens a document for display. Override in subclasses to provide the actual implementation.
149
+ * @param _documentId - The document ID.
150
+ * @param _query - The search query string.
151
+ * @param _queryChunks - Pipe-separated highlight chunks (e.g. "|1|2|3...").
152
+ * @param _newWindow - When true, opens the document in a new browser window.
153
+ */
151
154
  open(_documentId?: string, _query?: string, _queryChunks?: string, _newWindow?: boolean): void;
152
155
  /**
153
- * Display a document report
154
- * @param item : the document
156
+ * Downloads the HTML report for a normativa/scadenze document.
157
+ * @param item - The document to report on.
155
158
  */
156
159
  report(item: ClipperDocumentInfo): void;
157
160
  /**
158
- * Browse document references
159
- * @param documentId : the document id
160
- * @param mode : the reference mode
161
+ * Opens the references dialog for the given document.
162
+ * @param documentId - The ID of the document whose references to display.
163
+ * @param mode - The reference mode (e.g. ReferencesIn, ReferencesOut).
161
164
  */
162
165
  openReferences(documentId?: string, mode?: ClipperQueryReferencesMode): void;
163
166
  /**
164
- * Manage clipper bag
167
+ * Opens a dialog to manage the documents in the working bag (view, select, delete).
165
168
  */
166
169
  openBag(): void;
167
170
  /**
168
- * Print current document
171
+ * Sends a print command to the Clipper document iframe.
169
172
  */
170
173
  print(): void;
171
174
  /**
172
- * Find in current document
175
+ * Displays a hint dialog explaining how to use the browser's find-in-page feature.
173
176
  */
174
177
  find(): void;
175
178
  /**
176
- * AI: concern me service
177
- * @param document: the document
178
- */
179
+ * AI: sends a "concern me" request for the given document.
180
+ * @param document - The document to analyse.
181
+ */
179
182
  AI_concernMe(document?: ClipperDocumentInfo): void;
180
183
  /**
181
- * AI: explain service
182
- * @param document: the document
183
- */
184
+ * AI: sends an "explain" request for the given document.
185
+ * @param document - The document to explain.
186
+ */
184
187
  AI_explain(document?: ClipperDocumentInfo): void;
185
188
  /**
186
- * AI: comment service
187
- * @param document: the document
188
- */
189
+ * AI: sends a "comment" request for the given document.
190
+ * @param document - The document to comment on.
191
+ */
189
192
  AI_comment(document?: ClipperDocumentInfo): void;
190
193
  /**
191
- * AI: news service
192
- * @param document: the document
193
- */
194
+ * AI: sends a "news" request for the given document.
195
+ * @param document - The document to retrieve news for.
196
+ */
194
197
  AI_news(document?: ClipperDocumentInfo): void;
195
198
  /**
196
- * Checks if a module is supported by RS
197
- * @param module : the module to check
198
- * @returns: true if the module is supported
199
- */
199
+ * Returns whether the given Clipper module is supported by Registro e Scadenzario (RS).
200
+ * @param module - The module to check.
201
+ * @returns `true` if the module is supported by RS.
202
+ */
200
203
  isModuleSupportedByRS(module: ClipperModule): boolean;
201
204
  /**
202
- * Checks if a model is supported by RS
203
- * @param model : the model to check
204
- * @returns: true if the model is supported
205
+ * Returns whether the given Clipper model is supported by Registro e Scadenzario (RS).
206
+ * @param model - The model to check.
207
+ * @returns `true` if the model is supported by RS.
205
208
  */
206
209
  isModelSupportedByRS(model: ClipperModel): boolean;
207
210
  /**
208
- * Checks if all documents are supported by RS
209
- * @param documents : the list of documents
210
- * @returns: true if all documents supports RS
211
- */
211
+ * Returns whether every document in the list has a model supported by RS.
212
+ * @param documents - The list of documents to check.
213
+ * @returns `true` if all documents are RS-compatible.
214
+ */
212
215
  canSupportRS(documents: ClipperDocumentInfo[]): boolean;
213
216
  /**
214
- * Checks if RS is enabled for all given documents
215
- * @param documents : the documents to check
216
- * @returns true if alla documents ar RS enabled
217
+ * Returns whether every document in the list has a model that supports RS tracking.
218
+ * @param documents - The documents to check.
219
+ * @returns `true` if all documents are RS-enabled.
217
220
  */
218
221
  RS_enabled(documents: ClipperDocumentInfo[]): boolean;
219
222
  /**
220
- * New law
221
- * @param documents: the array of documents to link to the law
222
- */
223
+ * Sends a broadcast message to create a new RS law entry linked to the given documents.
224
+ * @param documents - The array of documents to link to the new law.
225
+ */
223
226
  RS_newLaw(documents?: ClipperDocumentInfo[]): void;
224
227
  /**
225
- * New activity
226
- * @param document: the document to link to the activity
228
+ * Sends a broadcast message to create a new RS activity linked to the given document.
229
+ * @param document - The document to link to the new activity.
227
230
  */
228
231
  RS_newActivity(document?: ClipperDocumentInfo): void;
229
232
  /**
230
- * Document usage report
231
- * @param document: the law
232
- */
233
+ * Sends a broadcast message to open the RS usage report for the given document.
234
+ * @param document - The document to generate the usage report for.
235
+ */
233
236
  RS_usageReport(document?: ClipperDocumentInfo): void;
234
237
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<ClipperDocumentManager, never>;
235
238
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<ClipperDocumentManager, "ng-component", never, {}, { "populateContacts": "populateContacts"; }, never, never, true, never>;
@@ -238,7 +241,7 @@ declare class ClipperDocumentManager {
238
241
  declare class ClipperSearchCalendarComponent {
239
242
  readonly calendar: _angular_core.Signal<MatCalendar<any>>;
240
243
  readonly changed: _angular_core.OutputEmitterRef<DateInterval>;
241
- private changeDetector;
244
+ private readonly changeDetector;
242
245
  protected busy: _angular_core.WritableSignal<boolean>;
243
246
  protected months: _angular_core.WritableSignal<ClipperSearchCalendarSnapshotMonth[]>;
244
247
  protected calendarSpecialDays?: number[];
@@ -248,20 +251,22 @@ declare class ClipperSearchCalendarComponent {
248
251
  protected calendarDateFilter: (cellDate: Date) => boolean;
249
252
  readonly canFilter: _angular_core.InputSignal<boolean>;
250
253
  /**
251
- * Update calendar
252
- * @param month : the month snapshot
253
- * @param months : the months snapshot
254
- * @param date : the new current date
254
+ * Refreshes the calendar with a new month/days snapshot and updates the active date.
255
+ * @param month - The single-month snapshot used to populate special-day highlighting.
256
+ * @param months - The full year snapshot used to populate the month-selector chips.
257
+ * @param date - The date the calendar should navigate to. Defaults to today.
255
258
  */
256
259
  update(month?: ClipperSearchCalendarSnapshotResult, months?: ClipperSearchCalendarSnapshotResult, date?: Date): void;
257
260
  /**
258
- * Filter by date
259
- * @param date : the date to filter to or "month" to filter by the whole month.
261
+ * Emits a `DateInterval` for the given date or, when `'month'` is passed, for the entire
262
+ * current calendar month. Passing `undefined` clears the active date filter.
263
+ * @param date - A specific `Date` to filter by, the string `'month'` to filter the whole
264
+ * month, or `undefined` to clear the filter.
260
265
  */
261
266
  protected filterByDate(date?: Date | string): void;
262
267
  /**
263
- * Filter by month
264
- * @param monthInfo: the month info
268
+ * Navigates the calendar to the given month and emits its full date range as a filter.
269
+ * @param monthInfo - The month snapshot to navigate to and filter by.
265
270
  */
266
271
  protected filterByMonth(monthInfo: ClipperSearchCalendarSnapshotMonth): void;
267
272
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<ClipperSearchCalendarComponent, never>;
@@ -273,158 +278,171 @@ declare class ClipperSearchResultManager extends ClipperDocumentManager {
273
278
  readonly facets: _angular_core.Signal<ClipperSearchFacetsComponent>;
274
279
  readonly calendar: _angular_core.Signal<ClipperSearchCalendarComponent>;
275
280
  protected readonly destroyRef: DestroyRef;
276
- protected changeDetector: ChangeDetectorRef;
277
- protected breakpointObserver: BreakpointObserver;
278
- protected injector: Injector;
279
- protected themeService: ThemeService;
280
- screenService: ScreenService;
281
+ protected readonly changeDetector: ChangeDetectorRef;
282
+ protected readonly breakpointObserver: BreakpointObserver;
283
+ protected readonly injector: Injector;
284
+ protected readonly themeService: ThemeService;
285
+ readonly screenService: ScreenService;
281
286
  selection: SelectableModel<ClipperDocumentInfo, string> | undefined;
282
- selectionMode: _angular_core.WritableSignal<ClipperSelectionMode>;
287
+ readonly selectionMode: _angular_core.WritableSignal<ClipperSelectionMode>;
283
288
  protected snapshot: ClipperSearchResult | undefined;
284
- protected filterBusy: _angular_core.WritableSignal<boolean>;
289
+ protected readonly filterBusy: _angular_core.WritableSignal<boolean>;
285
290
  protected filterParams: ClipperSearchParams;
286
- protected filterPaneHasBackdrop: boolean;
287
- protected filterPaneClosed: boolean;
288
- protected filterPane2HasBackdrop: boolean;
289
- protected filterPane2Closed: boolean;
290
- protected sortOptions: NameValueItem<ClipperSort>[];
291
- protected sortMode: NameValueItem<ClipperSort> | undefined;
291
+ protected readonly filterPaneHasBackdrop: _angular_core.WritableSignal<boolean>;
292
+ protected readonly filterPaneClosed: _angular_core.WritableSignal<boolean>;
293
+ protected readonly filterPane2HasBackdrop: _angular_core.WritableSignal<boolean>;
294
+ protected readonly filterPane2Closed: _angular_core.WritableSignal<boolean>;
295
+ protected readonly sortOptions: _angular_core.WritableSignal<NameValueItem<ClipperSort>[]>;
296
+ protected readonly sortMode: _angular_core.WritableSignal<NameValueItem<ClipperSort>>;
292
297
  protected scrollPos: number;
293
- protected scrollerId: string;
298
+ protected readonly scrollerId: string;
294
299
  protected restorableId: string | undefined;
295
- protected hasFacets: _angular_core.WritableSignal<boolean>;
296
- protected hasRegions: () => boolean;
300
+ protected readonly hasFacets: _angular_core.WritableSignal<boolean>;
301
+ /** `true` when the current sector filter contains any regional-law (LR) entries. */
302
+ protected readonly hasRegions: _angular_core.Signal<boolean>;
297
303
  /**
298
- * Update menu buttons visibility when the menu is closed
304
+ * Resets the `isMenuOpen` flag on every snapshot item so that action-menu buttons are hidden.
299
305
  */
300
306
  updateMenuButtonsVisibility(): void;
301
307
  /**
302
- * Scroll on top o list area
303
- * @param top: the top position
308
+ * Scrolls the results list container to the given vertical position.
309
+ * @param top - The target scroll offset in pixels. Defaults to 0 (top).
304
310
  */
305
311
  scroll(top?: number): void;
306
312
  /**
307
- * Check if every element are selected
313
+ * Returns whether every item in the current snapshot is selected.
314
+ * @returns `true` if the selection count equals the total snapshot item count.
308
315
  */
309
316
  allSelected(): boolean;
310
317
  /**
311
- * Master selection toggle
312
- * @param select: true to select all elements false to deselect all elements
318
+ * Selects or deselects all items in the current snapshot.
319
+ * @param select - When `true`, selects all items; when `false`, deselects all.
313
320
  */
314
321
  selectAll(select?: boolean): void;
315
322
  /**
316
- * Check if selections exists
317
- * @returns true if at least one element is selected
318
- */
323
+ * Returns whether at least one item is currently selected.
324
+ * @returns `true` if the selection contains one or more items.
325
+ */
319
326
  hasAnySelection(): boolean;
320
327
  /**
321
- * Check if only one element is selected
322
- * @returns true if only one element is selected
323
- */
328
+ * Returns whether exactly one item is selected.
329
+ * @returns `true` if the selection count is exactly 1.
330
+ */
324
331
  hasSingleSelection(): boolean;
325
332
  /**
326
- * Get the first selected item
327
- * @returns the selected item or null
328
- */
333
+ * Returns the first (and only) selected item, or `undefined` when nothing or multiple items are selected.
334
+ * @returns The selected document, or `undefined`.
335
+ */
329
336
  getSingleSelection(): ClipperDocumentInfo | undefined;
330
337
  /**
331
- * Clear selection
332
- */
338
+ * Clears the entire selection.
339
+ */
333
340
  clearSelection(): void;
334
341
  /**
335
- * Return the number of selected items or null
336
- * @returns Return the number of selected items
337
- */
342
+ * Returns the number of currently selected items, or `undefined` when nothing is selected.
343
+ * @returns The selection count, or `undefined`.
344
+ */
338
345
  countSelections(): number | undefined;
339
346
  /**
340
- * Get the selected id
341
- */
347
+ * Returns the document ID of the first selected item, or `undefined` when nothing is selected.
348
+ * @returns The selected document ID, or `undefined`.
349
+ */
342
350
  getSeletectId(): string | undefined;
343
351
  /**
344
- * Get all selected ids
345
- */
352
+ * Returns the document IDs of all selected items.
353
+ * Shows an error and returns `undefined` when more than 100 items are selected.
354
+ * @returns An array of document IDs, or `undefined` when the limit is exceeded.
355
+ */
346
356
  getSeletectIds(): string[] | undefined;
347
357
  /**
348
- * Get all selected ids
349
- * @returns a tuple list with id and data
358
+ * Returns a list of `[documentId, document]` tuples for all selected items.
359
+ * Shows an error and returns `undefined` when more than 100 items are selected.
360
+ * @returns An array of ID-document tuples, or `undefined` when the limit is exceeded.
350
361
  */
351
362
  getSeletectIdsAndData(): [string, ClipperDocumentInfo][] | undefined;
352
363
  /**
353
- * Prepare result items
354
- * @param items : the items to process
355
- * @param params : the current search params
364
+ * Enriches raw search result items with display metadata: grouping labels, expiry/validity
365
+ * state, anchor relevance scores, and model-specific fields.
366
+ * @param items - The raw document list to process in place.
367
+ * @param params - The search parameters used to determine grouping and filtering.
356
368
  */
357
369
  prepareResultItems(items: ClipperDocumentInfo[], params: ClipperSearchParams): void;
358
370
  /**
359
- * Prepare results
360
- * @param data : the result list to prepare
361
- * @param newSearch : true if is a new search
371
+ * Applies a new search result snapshot: clears the current selection, optionally preserves
372
+ * facet state for incremental updates, and triggers change detection.
373
+ * @param data - The incoming search result.
374
+ * @param newSearch - When `true`, facet state is reset along with the results.
362
375
  */
363
376
  prepareResults(data: ClipperSearchResult, newSearch?: boolean): void;
364
377
  /**
365
- * Save current document list or just the selected documents as a csv
366
- * @param format: the export format: 1) list, 2) deadlines
367
- */
378
+ * Exports either the selected documents or the full result set in the given format.
379
+ * @param format - The export format: 1 = list (CSV), 2 = deadlines (ICS).
380
+ */
368
381
  exportResults(format?: number): void;
369
382
  /**
370
- * Return item state css class
371
- * @param item : the item to evaluate
372
- */
383
+ * Returns the CSS class that reflects the item's read/expiry state.
384
+ * @param item - The document to evaluate.
385
+ * @returns A CSS class name string, or `undefined` when no special state applies.
386
+ */
373
387
  getItemStateCssClass(item: ClipperDocumentInfo): string | undefined;
374
388
  /**
375
- * Return the item state tooltip text
376
- * @param item : the item to evaluate
389
+ * Returns the tooltip text that explains the item's current read/expiry state.
390
+ * @param item - The document to evaluate.
391
+ * @returns A human-readable state description, or an empty string when no special state applies.
377
392
  */
378
393
  getItemStateTooltip(item: ClipperDocumentInfo): string;
379
394
  /**
380
- * Return the item icon
381
- * @param item : the item to evaluate
382
- */
395
+ * Returns the Material icon name that represents the given document's model.
396
+ * @param item - The document whose icon to determine.
397
+ * @returns A Material icon name string.
398
+ */
383
399
  getItemIcon(item: ClipperDocumentInfo): string;
384
400
  /**
385
- * Toggle the read flag
386
- * @param item : the item to update
387
- * @paran e: the optional click event
401
+ * Toggles the read flag of the given item and stops event propagation.
402
+ * @param item - The document whose read state to toggle.
403
+ * @param e - Optional DOM event; when provided, default action and propagation are suppressed.
388
404
  */
389
405
  toggleRead(item: ClipperDocumentInfo, e?: Event): void;
390
406
  /**
391
- * Toggle the selection flag
392
- * @param item : the item to update
393
- * @paran e: the optional click event
394
- */
407
+ * Toggles the selection state of the given item and stops event propagation.
408
+ * @param item - The document to select or deselect.
409
+ * @param e - Optional DOM event; when provided, default action and propagation are suppressed.
410
+ */
395
411
  toggleSelection(item: ClipperDocumentInfo, e?: Event): void;
396
412
  /**
397
- * Set read flag
398
- * @param value: the flag value
399
- * @param item: the item to set or null to use current selection
400
- */
401
- setRead(value: boolean, item?: ClipperDocumentInfo): rxjs.Subscription;
402
- /**
403
- * Open an item
404
- * @param documentId : the document id
405
- * @param query: the current query or undefined
406
- * @param queryChunks : the query chunks for highlight as string (eg. "|1|2|3...")
407
- * @param newWindow: true if the document must be open into a new window
408
- * @param canUseArchive: true if archive is available
409
- */
413
+ * Sets the read state on the given item or on all currently selected items.
414
+ * Broadcasts a read-state-changed event and updates the unread counter.
415
+ * @param value - The new read flag value.
416
+ * @param item - When provided, only this item is updated; otherwise the full selection is used.
417
+ */
418
+ setRead(value: boolean, item?: ClipperDocumentInfo): void;
419
+ /**
420
+ * Opens a document by ID, either inline or in a new browser tab.
421
+ * @param documentId - The ID of the document to open.
422
+ * @param query - The current search query used to highlight terms in the viewer.
423
+ * @param queryChunks - Pipe-separated highlight chunks (e.g. "|1|2|3...").
424
+ * @param newWindow - When `true`, opens the document in a new browser tab.
425
+ */
410
426
  open(documentId?: string, query?: string, queryChunks?: string, newWindow?: boolean): void;
411
427
  /**
412
- * Open a document
413
- * @param documentId : the document id
414
- * @param query: the current query or null
415
- * @param queryChunks : the query chunks for highlight as string (eg. "|1|2|3...")
428
+ * Opens the Clipper document viewer dialog for the given document.
429
+ * @param documentId - The ID of the document to open.
430
+ * @param query - The normalized search query used for term highlighting.
431
+ * @param queryChunks - Pipe-separated highlight chunks (e.g. "|1|2|3...").
416
432
  */
417
433
  openDocument(documentId?: string, query?: string, queryChunks?: string): void;
418
434
  /**
419
- * Save restorable data
420
- * @param id : the restorable id
421
- * @param storage : the storage to use. Default si session storage.
435
+ * Serialises the current component state (paginator, facets, filter params, scroll, sort, data)
436
+ * to the given storage under the given key, enabling later restoration.
437
+ * @param id - The storage key to write to.
438
+ * @param storage - The Web Storage instance to use. Defaults to `sessionStorage`.
422
439
  */
423
440
  save(id: string, storage?: Storage): void;
424
441
  /**
425
- * Restore data
426
- * @param id : the restorable id
427
- * @param storage : the storage to use. Default si session storage.
442
+ * Restores a previously serialised component state from storage and re-applies it.
443
+ * Facets, paginator, scroll position, and filter parameters are all re-hydrated.
444
+ * @param id - The storage key to read from.
445
+ * @param storage - The Web Storage instance to use. Defaults to `sessionStorage`.
428
446
  */
429
447
  restore(id: string, storage?: Storage): void;
430
448
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<ClipperSearchResultManager, never>;
@@ -443,133 +461,177 @@ interface ClipperReferencesDialogData {
443
461
  interface ClipperReferenceDialogResult {
444
462
  documentId: string;
445
463
  }
446
- declare class ClipperReferencesComponent extends ClipperSearchResultManager implements OnInit, AfterViewInit {
464
+ declare class ClipperReferencesComponent extends ClipperSearchResultManager {
447
465
  readonly filterPane: _angular_core.Signal<MatDrawer>;
448
- private dialogRef;
449
- protected dialogData: ClipperReferencesDialogData;
466
+ private readonly dialogRef;
467
+ protected readonly dialogData: ClipperReferencesDialogData;
450
468
  protected title?: string;
451
469
  protected item?: ClipperDocumentInfo;
452
- protected user: ClipperUserInfo | undefined;
453
- ngOnInit(): void;
454
- ngAfterViewInit(): void;
470
+ protected readonly user: ClipperUserInfo | undefined;
471
+ constructor();
455
472
  /**
456
- * Show hide filter pane manually
457
- */
473
+ * Toggles the filter pane open/closed state.
474
+ */
458
475
  protected toggleFilterPane(): void;
459
476
  /**
460
- * Handle filter pane visibility
477
+ * Adjusts the filter pane mode (side vs. overlay) and backdrop based on the current breakpoint.
461
478
  */
462
479
  private handleFilterPaneVisibility;
463
480
  /**
464
- * Close dialog
481
+ * Closes the references dialog without returning a result.
465
482
  */
466
483
  close(): void;
467
484
  /**
468
- * Send document links by email
469
- * @param item : the item to add
485
+ * Sends document links by email for the given item or, when omitted, for all selected items.
486
+ * @param item - The specific document to send, or `undefined` to use the current selection.
470
487
  */
471
488
  sendTo(item?: ClipperDocumentInfo): void;
472
489
  /**
473
- * Prepare the search params
474
- * @param newSearch : true if it is a new search
475
- * @return the new search params
490
+ * Builds the search parameters for the next fetch call.
491
+ * @param newSearch - When `true`, resets the pagination offset to 0.
492
+ * @returns A cloned and enriched `ClipperSearchParams` ready to be sent to the API.
476
493
  */
477
494
  private prepareFetch;
478
495
  /**
479
- * Get e refrences search params form clipper search params
480
- * @param params : the clipper search params
481
- * @returns : the references search params
496
+ * Maps a generic `ClipperSearchParams` to the references-specific API parameter shape.
497
+ * @param params - The base search parameters to convert.
498
+ * @returns A `ClipperReferencesSearchParams` object ready for the references endpoint.
482
499
  */
483
500
  private toReferencesSearchParams;
484
501
  /**
485
- * Perform a search
486
- * @param newSearch: true if is a new search
502
+ * Executes the references search and updates the result snapshot.
503
+ * @param newSearch - When `true`, resets pagination and reloads facets. Defaults to `false`.
487
504
  */
488
505
  fetch(newSearch?: boolean): void;
489
506
  /**
490
- * Show a new page result
491
- * @param e : the MatPaginator PageEvent data
507
+ * Navigates to the next result page.
508
+ * @param e - The `PageEvent` emitted by the paginator with the new page index and size.
492
509
  */
493
510
  fetchMore(e: PageEvent): void;
494
511
  /**
495
- * Get facets
496
- * @param params: the clipper search params
497
- */
512
+ * Loads available facets for the current search parameters and updates the filter pane.
513
+ * @param params - The search parameters used to request facets from the API.
514
+ */
498
515
  fetchFacets(params: ClipperSearchParams): void;
499
516
  /**
500
- * Hide facets
517
+ * Hides the facet filter pane and resets all applied facet filters.
501
518
  */
502
519
  protected hideFacets(): void;
503
520
  /**
504
- * Try to restore stored facets
505
- */
521
+ * Restores previously saved facets from the snapshot and adjusts the filter pane accordingly.
522
+ */
506
523
  restoreFacets(): void;
507
524
  /**
508
- * Close current dialog and return the id to navigate to
509
- * @param documentId : the document id
525
+ * Closes the dialog and navigates to the selected document.
526
+ * @param documentId - The ID of the document to open.
510
527
  */
511
- open(documentId: string): void;
528
+ open(documentId?: string): void;
512
529
  /**
513
- * Return item state css class
514
- * @param item : the item to evaluate
515
- */
530
+ * Returns the CSS class reflecting the item's validity state.
531
+ * @param item - The document to evaluate.
532
+ * @returns A CSS class name string, or `undefined` when no special state applies.
533
+ */
516
534
  getItemStateCssClass(item: ClipperDocumentInfo): string | undefined;
517
535
  /**
518
- * Return the item state tooltip text
519
- * @param item : the item to evaluate
536
+ * Returns the tooltip text explaining the item's current validity state.
537
+ * @param item - The document to evaluate.
538
+ * @returns A human-readable state description, or an empty string when no special state applies.
520
539
  */
521
540
  getItemStateTooltip(item: ClipperDocumentInfo): string;
522
541
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<ClipperReferencesComponent, never>;
523
542
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<ClipperReferencesComponent, "ng-component", never, {}, {}, never, never, true, never>;
524
543
  }
525
544
 
526
- declare class ClipperBrowserComponent extends ClipperSearchResultManager implements OnInit, AfterViewInit {
527
- readonly filterByNumber: Signal<MatInput>;
528
- readonly filterByText: Signal<MatInput>;
529
- readonly filterByChangeNumber: Signal<MatInput>;
530
- readonly filterPane: Signal<MatDrawer>;
531
- readonly filterPane2: Signal<MatDrawer>;
532
- readonly filterSelector: Signal<ButtonSelectorComponent>;
533
- readonly moduleSelector: Signal<ChipsSelectorComponent>;
534
- readonly sourceExpansionPanel: Signal<MatExpansionPanel>;
535
- readonly otherOptionsExpansionPanel: Signal<MatExpansionPanel>;
536
- readonly modifierExpansionPanel: Signal<MatExpansionPanel>;
545
+ declare class ClipperBrowserComponent extends ClipperSearchResultManager {
546
+ readonly filterByNumber: _angular_core.Signal<MatInput>;
547
+ readonly filterByText: _angular_core.Signal<MatInput>;
548
+ readonly filterByChangeNumber: _angular_core.Signal<MatInput>;
549
+ readonly filterPane: _angular_core.Signal<MatDrawer>;
550
+ readonly filterPane2: _angular_core.Signal<MatDrawer>;
551
+ readonly filterSelector: _angular_core.Signal<ButtonSelectorComponent>;
552
+ readonly moduleSelector: _angular_core.Signal<ChipsSelectorComponent>;
553
+ readonly sourceExpansionPanel: _angular_core.Signal<MatExpansionPanel>;
554
+ readonly otherOptionsExpansionPanel: _angular_core.Signal<MatExpansionPanel>;
555
+ readonly modifierExpansionPanel: _angular_core.Signal<MatExpansionPanel>;
537
556
  readonly showChannels: _angular_core.InputSignal<boolean>;
538
557
  readonly showRSOptions: _angular_core.InputSignal<boolean>;
539
558
  readonly showAIAssistantOptions: _angular_core.InputSignal<boolean>;
540
559
  readonly selectableModules: _angular_core.InputSignal<ClipperModule[]>;
541
560
  readonly initialModule: _angular_core.InputSignal<ClipperModule>;
542
561
  protected scrollDispatcher: ScrollDispatcher;
543
- protected filterDescription: _angular_core.WritableSignal<string>;
544
- protected filters: _angular_core.WritableSignal<NameValueItem<ClipperUserSearch>[]>;
545
- protected filter: Signal<NameValueItem<ClipperUserSearch> | undefined>;
546
- protected hasAIAssistant: boolean;
547
- protected hasFilters: Signal<boolean>;
548
- protected isLaws: (allowEmpty?: boolean) => boolean;
549
- protected isReadable: () => boolean;
550
- protected isCoordination: () => boolean;
551
- protected isSortedByDate: () => boolean;
552
- protected canSearch: () => boolean;
553
- protected sectors: _angular_core.WritableSignal<SectorInfo[]>;
554
- protected hasSectors: () => boolean;
555
- protected regions: _angular_core.WritableSignal<NameValueItem<string>[]>;
556
- protected hasRegions: () => boolean;
557
- protected sources: _angular_core.WritableSignal<NameValueItem<string>[]>;
558
- protected hasSource: () => boolean;
559
- protected authors: _angular_core.WritableSignal<NameValueItem<string>[]>;
560
- protected types: _angular_core.WritableSignal<NameValueItem<string>[]>;
562
+ protected readonly filterDescription: _angular_core.WritableSignal<string>;
563
+ protected readonly filters: _angular_core.WritableSignal<NameValueItem<ClipperUserSearch>[]>;
564
+ /** Currently selected saved filter, derived from the filters list and the active search id. */
565
+ protected readonly filter: _angular_core.Signal<NameValueItem<ClipperUserSearch>>;
566
+ /** True when the user has access to the AI assistant feature. */
567
+ protected readonly hasAIAssistant: _angular_core.Signal<boolean>;
568
+ /** True when at least one saved filter is available. */
569
+ protected readonly hasFilters: _angular_core.Signal<boolean>;
570
+ /**
571
+ * Checks whether the current module selection targets law-related content.
572
+ * @param allowEmpty - When true, an empty module list also counts as law-related. Defaults to true.
573
+ * @returns True if the selection includes any law module or (when allowEmpty) is empty.
574
+ */
575
+ protected isLaws(allowEmpty?: boolean): boolean;
576
+ /**
577
+ * Checks whether the currently selected modules produce readable content.
578
+ * @returns True when the modules allow content reading.
579
+ */
580
+ protected isReadable(): boolean;
581
+ /**
582
+ * Checks whether the current selection targets the coordination module.
583
+ * @returns True when the 'ModificheAbrogazioniERinvii' module is selected.
584
+ */
585
+ protected isCoordination(): boolean;
586
+ /**
587
+ * Checks whether the current sort mode is one of the date-based sort options.
588
+ * @returns True when results are sorted by date (ascending or descending).
589
+ */
590
+ protected isSortedByDate(): boolean;
591
+ /**
592
+ * Checks whether the current filter parameters define a valid search.
593
+ * @returns True when at least one filter parameter has been set.
594
+ */
595
+ protected canSearch(): boolean;
596
+ protected readonly sectors: _angular_core.WritableSignal<SectorInfo[]>;
597
+ /**
598
+ * Checks whether sector-based filtering is available for the current selection.
599
+ * @returns True when sector filtering applies.
600
+ */
601
+ protected hasSectors(): boolean;
602
+ protected readonly regions: _angular_core.WritableSignal<NameValueItem<string>[]>;
603
+ /**
604
+ * Checks whether region-based filtering is available.
605
+ * @returns True when the selection includes sectors with regional content (LR).
606
+ */
607
+ protected readonly hasRegions: _angular_core.Signal<boolean>;
608
+ protected readonly sources: _angular_core.WritableSignal<NameValueItem<string>[]>;
609
+ /**
610
+ * Checks whether source-based filtering applies to the current module selection.
611
+ * @returns True when source filtering is available.
612
+ */
613
+ protected hasSource(): boolean;
614
+ protected readonly authors: _angular_core.WritableSignal<NameValueItem<string>[]>;
615
+ protected readonly types: _angular_core.WritableSignal<NameValueItem<string>[]>;
616
+ /** Topic tree loaded on initialization, used as input for the tree-selection dialog. */
561
617
  protected topics: INode[];
562
- protected hasTopics: () => boolean;
563
- private allowTags;
564
- protected tags: _angular_core.WritableSignal<NameValueItem<string>[]>;
565
- protected hasTags: () => boolean;
618
+ /**
619
+ * Checks whether topic-based filtering applies to the current module selection.
620
+ * @returns True when topic filtering is available.
621
+ */
622
+ protected hasTopics(): boolean;
623
+ protected readonly tags: _angular_core.WritableSignal<NameValueItem<string>[]>;
624
+ /**
625
+ * Checks whether tag-based filtering is available for the current modules.
626
+ * @returns True when tags are loaded and the selection includes news or in-depth modules.
627
+ */
628
+ protected hasTags(): boolean;
566
629
  protected reasons: _angular_core.WritableSignal<NameValueItem<number>[]>;
567
630
  protected modules: _angular_core.WritableSignal<NameValueItem<ClipperModule>[]>;
568
631
  protected interval: DateInterval;
569
632
  protected sourceInterval: DateInterval;
570
633
  protected user: ClipperUserInfo | undefined;
571
- ngOnInit(): void;
572
- ngAfterViewInit(): void;
634
+ constructor();
573
635
  /**
574
636
  * Get all available modules
575
637
  */
@@ -581,8 +643,8 @@ declare class ClipperBrowserComponent extends ClipperSearchResultManager impleme
581
643
  */
582
644
  getSnapshotDocument(id: string): ClipperDocumentInfo | undefined;
583
645
  /**
584
- * Load tags
585
- */
646
+ * Loads available tags from the server and populates the tag signal.
647
+ */
586
648
  protected loadTags(): void;
587
649
  /**
588
650
  * Load topics
@@ -614,21 +676,22 @@ declare class ClipperBrowserComponent extends ClipperSearchResultManager impleme
614
676
  */
615
677
  private updateFilterPaneFocus;
616
678
  /**
617
- * Load filters
618
- */
679
+ * Loads the user's saved searches from the server and populates the filter selector.
680
+ */
619
681
  protected loadFilters(): void;
620
682
  /**
621
- * Save a filter
622
- * @param newFilter: true to save a new filter. Default is false.
683
+ * Saves the current filter parameters as a named search.
684
+ * @param newFilter - When true, always prompts for a new filter name; otherwise updates the existing one. Defaults to false.
623
685
  */
624
686
  saveFilter(newFilter?: boolean): void;
625
687
  /**
626
- * Delete a filter
627
- */
688
+ * Prompts for confirmation and then deletes the currently active saved filter.
689
+ */
628
690
  deleteFilter(): void;
629
691
  /**
630
- * Select a filter
631
- */
692
+ * Applies a saved filter by deserializing its parameters into the current filter state.
693
+ * @param item - The saved filter to apply, or undefined to clear the filter.
694
+ */
632
695
  selectFilter(item: NameValueItem<ClipperUserSearch> | undefined): void;
633
696
  /**
634
697
  * Clear current filter params
@@ -673,64 +736,65 @@ declare class ClipperBrowserComponent extends ClipperSearchResultManager impleme
673
736
  */
674
737
  protected modulesChanged(): void;
675
738
  /**
676
- * Check modules against current selected in filter
677
- * @param modules : the modules to check for
678
- * @param mode : thc check mode: 1) exactly all elements 2) all elements 3) any of the elements specified
679
- * @returns true if the check is successfull
739
+ * Checks the current module selection against a list of expected modules.
740
+ * @param modules - The modules to check for.
741
+ * @param mode - The check mode: 1) exactly these elements, 2) all of these elements, 3) any of these elements.
742
+ * @returns True if the check passes.
680
743
  */
681
744
  private checkModules;
682
745
  /**
683
- * Prepare the module specific query
684
- * @param newSearch : true if is a new search
685
- * @returns the new search params
686
- */
746
+ * Builds the effective query parameters for the next search request.
747
+ * @param newSearch - When true, resets pagination and triggers facet loading. Defaults to false.
748
+ * @returns The resolved {@link ClipperSearchParams} ready to be sent to the API.
749
+ */
687
750
  private prepareFetch;
688
751
  /**
689
752
  * Update filter description
690
753
  */
691
754
  private updateFilterDescription;
692
755
  /**
693
- * Get facets
694
- * @param params: the clipper search params
695
- */
756
+ * Fetches and applies search facets for the current result set.
757
+ * @param params - The search parameters used to query facets.
758
+ */
696
759
  protected fetchFacets(params: ClipperSearchParams): void;
697
760
  /**
698
761
  * Hide facets
699
762
  */
700
763
  protected hideFacets(): void;
701
764
  /**
702
- * Fetch data
703
- * @param newSearch true if is a new search
765
+ * Executes the search query and updates the result snapshot.
766
+ * @param newSearch - When true, resets pagination and reloads facets. Defaults to false.
704
767
  */
705
768
  protected fetch(newSearch?: boolean): void;
706
769
  /**
707
- * Show a new page result
708
- * @param e : the MatPaginator PageEvent data
709
- */
770
+ * Navigate to a new result page.
771
+ * @param e - The paginator {@link PageEvent} containing the new page index and size.
772
+ */
710
773
  protected fetchMore(e: PageEvent): void;
711
774
  /**
712
- * Change sort
713
- * @param new sort: the new sort value
714
- */
715
- protected sort(newSort?: NameValueItem<any>): void;
775
+ * Change the current sort mode and refresh results.
776
+ * @param newSort - The new sort option to apply.
777
+ */
778
+ protected sort(newSort?: NameValueItem<ClipperSort>): void;
716
779
  /**
717
- * Show free text help
718
- */
780
+ * Open the free-text search help dialog.
781
+ */
719
782
  protected help(): void;
720
783
  /**
721
- * Compose a free text search query
784
+ * Open the query-builder dialog to compose a free-text search expression.
722
785
  */
723
786
  protected compose(): void;
724
787
  /**
725
- * Add a topic
726
- */
788
+ * Open the topic-selection dialog and append the chosen topics to the current filter.
789
+ */
727
790
  protected addTopic(): void;
728
791
  /**
729
- * Remove a topic
792
+ * Remove a topic from the current filter.
793
+ * @param item - The topic item to remove.
730
794
  */
731
795
  protected deleteTopic(item: NameValueItem<string>): void;
732
796
  /**
733
- * Clear all topics
797
+ * Remove all topics from the current filter.
734
798
  */
735
799
  protected clearTopics(): void;
736
800
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<ClipperBrowserComponent, never>;
@@ -745,22 +809,24 @@ interface ClipperBrowserDialogData {
745
809
  initialModule?: number;
746
810
  theme?: ThemeType;
747
811
  }
748
- declare class ClipperBrowserDialogComponent implements OnInit, AfterViewInit {
812
+ declare class ClipperBrowserDialogComponent {
749
813
  private readonly destroyRef;
750
814
  readonly clipperBrowser: _angular_core.Signal<ClipperBrowserComponent>;
751
815
  protected clipperService: ClipperService;
752
- private changeDetector;
753
816
  protected dialogData: ClipperBrowserDialogData;
754
817
  private dialogRef;
755
818
  private broadcastService;
756
- ngOnInit(): void;
757
- ngAfterViewInit(): void;
819
+ constructor();
758
820
  /**
759
- * Checks if documents can be selected and returned as message
821
+ * Determines whether the current selection satisfies the required selection mode
822
+ * and module constraints defined in the dialog data.
823
+ *
824
+ * @returns `true` if the selection is valid and can be confirmed; `false` otherwise.
760
825
  */
761
826
  protected canSelect(): boolean;
762
827
  /**
763
- * Send a message with current selection and close dialog
828
+ * Broadcasts the current selection as a message and closes the dialog.
829
+ * Does nothing when the selection is empty.
764
830
  */
765
831
  protected select(): void;
766
832
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<ClipperBrowserDialogComponent, never>;
@@ -777,18 +843,20 @@ interface SearchFreeTextQueryParams {
777
843
  }
778
844
  declare class ClipperSearchFreeTextQueryBuilderComponent {
779
845
  readonly done: _angular_core.OutputEmitterRef<SearchFreeTextQueryParams>;
780
- private dialogService;
846
+ private readonly dialogService;
781
847
  protected queryAnd: string;
782
848
  protected queryOr: string;
783
849
  protected queryNot: string;
784
850
  protected queryPhrase: string;
785
851
  protected queryStart: string;
786
852
  /**
787
- * Clear
853
+ * Resets all query fields to empty strings.
788
854
  */
789
855
  protected clear(): void;
790
856
  /**
791
- * Submit
857
+ * Builds the Lucene-style free-text query from the current field values and emits it via `done`.
858
+ * Shows an error dialog when only the NOT operator has been filled in, since it requires
859
+ * at least one positive term to produce a valid query.
792
860
  */
793
861
  protected ok(): void;
794
862
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<ClipperSearchFreeTextQueryBuilderComponent, never>;
@@ -800,11 +868,10 @@ declare enum ClipperSearchResultItemDisplayMode {
800
868
  Tile = 2,
801
869
  Stripe = 3
802
870
  }
803
- declare class ClipperSearchResultItemComponent implements OnInit {
871
+ declare class ClipperSearchResultItemComponent {
804
872
  private readonly destroyRef;
805
- protected screenService: ScreenService;
806
- protected broadcastService: BroadcastService;
807
- private changeDetector;
873
+ protected readonly screenService: ScreenService;
874
+ private readonly broadcastService;
808
875
  readonly parent: _angular_core.InputSignal<ClipperSearchResultManager>;
809
876
  readonly item: _angular_core.ModelSignal<ClipperDocumentInfo>;
810
877
  readonly actions: _angular_core.InputSignal<MatMenu>;
@@ -819,22 +886,22 @@ declare class ClipperSearchResultItemComponent implements OnInit {
819
886
  readonly displayMode: _angular_core.InputSignal<ClipperSearchResultItemDisplayMode>;
820
887
  protected readonly displayModesEnum: typeof ClipperSearchResultItemDisplayMode;
821
888
  protected readonly modelsEnum: typeof ClipperModel;
822
- ngOnInit(): void;
889
+ /** Incremented whenever the parent's SelectionModel changes, invalidating `isSelected`. */
890
+ private readonly selectionChangeTick;
823
891
  /**
824
- * Checks if current item is selected
825
- * @returns true if current item is selected
892
+ * Whether this item is currently selected in the parent's selection model.
893
+ * Recomputed whenever `selectionChangeTick` is updated by the selection-changed subscription.
826
894
  */
827
- protected isSelected(): boolean;
895
+ protected readonly isSelected: _angular_core.Signal<boolean>;
828
896
  /**
829
- * Checks if current item is read
830
- * @returns true if current item is read
897
+ * Whether this item has already been read by the user.
831
898
  */
832
- protected isRead(): boolean;
899
+ protected readonly isRead: _angular_core.Signal<boolean>;
833
900
  /**
834
- * Checks if current item can be read
835
- * @returns true if current item can be read
836
- */
837
- protected canBeRead(): boolean;
901
+ * Whether this item is readable but not yet read (i.e. the read-flag action should be shown).
902
+ */
903
+ protected readonly canBeRead: _angular_core.Signal<boolean>;
904
+ constructor();
838
905
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<ClipperSearchResultItemComponent, never>;
839
906
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<ClipperSearchResultItemComponent, "clipper-search-result-item", never, { "parent": { "alias": "parent"; "required": true; "isSignal": true; }; "item": { "alias": "item"; "required": true; "isSignal": true; }; "actions": { "alias": "actions"; "required": true; "isSignal": true; }; "tileNoPictureUrl": { "alias": "tileNoPictureUrl"; "required": false; "isSignal": true; }; "tilePictureUrl": { "alias": "tilePictureUrl"; "required": false; "isSignal": true; }; "isSelectable": { "alias": "isSelectable"; "required": false; "isSignal": true; }; "isReadable": { "alias": "isReadable"; "required": false; "isSignal": true; }; "isReadableModel": { "alias": "isReadableModel"; "required": false; "isSignal": true; }; "displayModifiedTitle": { "alias": "displayModifiedTitle"; "required": false; "isSignal": true; }; "displayModelName": { "alias": "displayModelName"; "required": false; "isSignal": true; }; "displayDate": { "alias": "displayDate"; "required": false; "isSignal": true; }; "displayMode": { "alias": "displayMode"; "required": false; "isSignal": true; }; }, { "item": "itemChange"; }, never, never, true, never>;
840
907
  }
@@ -849,161 +916,168 @@ interface ClipperDocumentDialogData {
849
916
  canUseArchive?: boolean;
850
917
  canHandleTooManyResults?: boolean;
851
918
  }
852
- declare class ClipperDocumentComponent extends ClipperDocumentManager implements OnInit {
919
+ declare class ClipperDocumentComponent extends ClipperDocumentManager {
853
920
  readonly relevantsPane: _angular_core.Signal<MatDrawer>;
854
921
  readonly closing: _angular_core.OutputEmitterRef<void>;
855
922
  readonly opening: _angular_core.OutputEmitterRef<string>;
856
923
  private readonly destroyRef;
857
924
  private injector;
858
- private changeDetector;
859
925
  private breakpointObserver;
860
926
  private renderer;
861
927
  private rendererListener1;
862
928
  private router;
863
929
  private dialogRef;
864
930
  protected dialogData: ClipperDocumentDialogData;
865
- protected url: _angular_core.WritableSignal<string>;
866
- protected title: _angular_core.WritableSignal<string>;
867
- protected busy: _angular_core.WritableSignal<boolean>;
931
+ protected readonly url: _angular_core.WritableSignal<string>;
932
+ protected readonly title: _angular_core.WritableSignal<string>;
933
+ protected readonly busy: _angular_core.WritableSignal<boolean>;
868
934
  protected lastQuery?: string;
869
- protected lastQueryChunks?: string;
935
+ protected lastQueryChunks: string;
870
936
  protected lastQueryType: 'fulltext' | 'semantic';
871
- protected lastDocument?: ClipperDocumentInfo;
872
- protected relevants: ClipperDocumentRelevants;
873
- protected relevantsPaneHasBackdrop: boolean;
937
+ protected readonly lastDocument: _angular_core.WritableSignal<ClipperDocumentInfo>;
938
+ protected readonly relevants: _angular_core.WritableSignal<ClipperDocumentRelevants>;
939
+ protected readonly relevantsPaneHasBackdrop: _angular_core.WritableSignal<boolean>;
874
940
  protected relevantsPaneClosed: boolean;
875
- protected relevantsBusy: _angular_core.WritableSignal<boolean>;
876
- protected hasRelevants: _angular_core.WritableSignal<boolean>;
877
- protected user: ClipperUserInfo | undefined;
878
- ngOnInit(): void;
879
- ngOnDestroy(): void;
941
+ protected readonly relevantsBusy: _angular_core.WritableSignal<boolean>;
942
+ protected readonly hasRelevants: _angular_core.WritableSignal<boolean>;
943
+ protected readonly user: ClipperUserInfo | undefined;
944
+ constructor();
880
945
  /**
881
- * Show hide relevants pane manually
882
- */
946
+ * Toggles the relevants side-pane open/closed state.
947
+ */
883
948
  protected toggleRelevantsPane(): void;
884
949
  /**
885
- * Handle filter pane visibility
950
+ * Adjusts the relevants side-pane mode and visibility based on the current viewport breakpoint.
886
951
  */
887
952
  private handleRelevantsPaneVisibility;
888
953
  /**
889
- * Close dialog
954
+ * Emits the closing event and closes the dialog after a short delay.
890
955
  */
891
956
  protected close(): void;
892
957
  /**
893
- * Navigate to a new document
894
- * @param id : the document id
958
+ * Navigates to a document or external URL received from the iframe.
959
+ * @param id - The document id or URL to navigate to.
895
960
  */
896
961
  navigate(id: string): void;
897
962
  /**
898
- * Navigate by url
899
- * @param url : the url to navigate to
963
+ * Resolves and loads a document by its fully-qualified render URL.
964
+ * Parses query, theme, and anchor information before navigating.
965
+ * @param url - The full render URL to load.
900
966
  */
901
967
  navigateByUrl(url: string): void;
902
968
  /**
903
- * Navigated callback
904
- */
905
- navigated(id: string, // Documnent id
906
- title1: string, // Title 1
907
- title2: string, // Title 2
908
- tags: string, // Tag
909
- model: number, // Model
910
- moduleId: number, // Module
911
- moduleName: string, // Module name
912
- date: string, // Date
913
- number: string, // Number
914
- author: string, // Author
915
- origin: string, // Origin
916
- originDescription: string, // Origin description
917
- bag: string, // Flags
918
- validityInfo: string, // Info about validity
919
- expiringInfo: string, // Info about expiring date
920
- primaryId: string, // Primary document id
921
- primaryModel: number, // Primary document model
922
- secondaryId: string, // Secondary document id
923
- isTrial: boolean): void;
924
- /**
925
- * goto previous document in history
969
+ * Called by the iframe when a document has finished rendering.
970
+ * Parses and stores all document metadata, then triggers auxiliary data loading.
971
+ * @param id - Document id.
972
+ * @param title1 - Primary title.
973
+ * @param title2 - Secondary title.
974
+ * @param tags - Comma-separated tag list.
975
+ * @param model - Document model identifier.
976
+ * @param moduleId - Module identifier.
977
+ * @param moduleName - Module display name.
978
+ * @param date - Publication date string.
979
+ * @param number - Document number.
980
+ * @param author - Author name.
981
+ * @param origin - Source origin code.
982
+ * @param originDescription - Human-readable origin description.
983
+ * @param bag - Encoded flags string.
984
+ * @param validityInfo - Encoded validity information.
985
+ * @param expiringInfo - Encoded expiration information.
986
+ * @param primaryId - Id of the primary linked document, if any.
987
+ * @param primaryModel - Model of the primary linked document.
988
+ * @param secondaryId - Id of the secondary linked document, if any.
989
+ * @param isTrial - True when the request is a trial/preview access.
990
+ */
991
+ navigated(id: string, title1: string, title2: string, tags: string, model: number, moduleId: number, moduleName: string, date: string, number: string, author: string, origin: string, originDescription: string, bag: string, validityInfo: string, expiringInfo: string, primaryId: string, primaryModel: number, secondaryId: string, isTrial: boolean): void;
992
+ /**
993
+ * Navigates back in the iframe's browsing history.
926
994
  */
927
995
  protected back(): void;
928
996
  /**
929
- * Goto next document in history
997
+ * Navigates forward in the iframe's browsing history.
930
998
  */
931
999
  protected forward(): void;
932
1000
  /**
933
- * Goto next relevant item
1001
+ * Moves focus to the next highlighted relevant hit inside the document.
934
1002
  */
935
1003
  protected nextRelevant(): void;
936
1004
  /**
937
- * Goto previous relevant item
1005
+ * Moves focus to the previous highlighted relevant hit inside the document.
938
1006
  */
939
1007
  protected previousRelevant(): void;
940
1008
  /**
941
- * Goto a relevant item
942
- * @param item : the item to go to
1009
+ * Scrolls to a specific relevant anchor inside the document, or opens it in a new tab.
1010
+ * @param item - The anchor item to navigate to.
943
1011
  */
944
1012
  protected gotoRelevant(item: ClipperDocumentAnchorInfo): void;
945
1013
  /**
946
- * Update relevant items
947
- * @param anchors: the optional anchor list
1014
+ * Fetches and renders full-text relevant anchors for the current document and query.
948
1015
  */
949
1016
  private updateRelevants;
950
1017
  /**
951
- * Update relevant items
952
- * @param anchors: the optional anchor list
953
- */
1018
+ * Updates the relevant anchors list from chunk-based hit data received from the iframe.
1019
+ * @param anchors - Array of chunk hit data to convert into anchor items.
1020
+ */
954
1021
  private updateRelevants2;
955
1022
  /**
956
- * Display document structure
1023
+ * Opens the document structure index dialog and scrolls to or opens the selected section.
1024
+ * @param documentId - The id of the document whose index to display.
957
1025
  */
958
1026
  protected index(documentId: string): void;
959
1027
  /**
960
- * Get the id in a query string
961
- * @param url : the url to process
962
- * @param name : the optional id paramenter name. Default is 'id'
963
- * @returns : the id parame
964
- */
1028
+ * Extracts the value of a named query-string parameter from a URL.
1029
+ * @param url - The URL string to search.
1030
+ * @param name - The parameter name to look for. Defaults to 'id'.
1031
+ * @returns The extracted parameter value.
1032
+ */
965
1033
  private getId;
966
1034
  /**
967
- * Preview a file if possible
968
- * @param url : the url to preview
1035
+ * Previews or downloads a file identified by a render URL.
1036
+ * Opens a preview dialog when the file supports embedding, otherwise triggers a browser download.
1037
+ * @param url - The file render URL to preview.
969
1038
  */
970
1039
  private previewFile;
971
1040
  /**
972
- * Show document comment
973
- */
1041
+ * Loads and displays the editorial comment associated with the current document.
1042
+ */
974
1043
  protected showComment(): void;
975
1044
  /**
976
- * Open an item
977
- * @param documentId : the document id
978
- * @param query: the current query or undefined
979
- * @param queryChunks : the query chunks for highlight as string (eg. "|1|2|3...")
980
- * @param newWindow: true if the document must be open into a new window
1045
+ * Opens a document, either inline or in a new browser tab.
1046
+ * @param documentId - The id of the document to open.
1047
+ * @param query - Optional free-text query for highlight.
1048
+ * @param queryChunks - Optional chunk offsets for semantic highlight.
1049
+ * @param newWindow - When true, opens the document in a new browser tab.
981
1050
  */
982
1051
  open(documentId: string, query?: string, queryChunks?: string, newWindow?: boolean): void;
983
1052
  /**
984
- * Open a document
985
- * @param documentId : the document id
986
- * @param query: the current query or null
987
- * @param queryChunks : the query chunks for highlight as string (eg. "|1|2|3...")
1053
+ * Opens a document inline via the {@link ClipperDocumentsUtils} helper.
1054
+ * @param documentId - The id of the document to open.
1055
+ * @param query - Optional free-text query for highlight.
1056
+ * @param queryChunks - Optional chunk offsets for semantic highlight.
988
1057
  */
989
1058
  private openDocument;
990
1059
  /**
991
- * Browse document references
992
- * @param documentId : the document id
993
- * @param mode : the mode
1060
+ * Opens the references panel for the given document.
1061
+ * @param documentId - The id of the document whose references to display.
1062
+ * @param mode - The reference query mode. Defaults to ReferencesIn.
1063
+ * @param model - Optional document model filter.
1064
+ * @param anchor - Optional anchor id to highlight.
1065
+ * @param anchorTitle - Optional anchor title to display.
1066
+ * @param update - When true, triggers a refresh of the references list. Defaults to true.
994
1067
  */
995
- openReferences(documentId: string, mode?: ClipperQueryReferencesMode, model?: number, anchor?: string, anchorTitle?: string, update?: boolean): void;
1068
+ openReferences(documentId: string, mode?: ClipperQueryReferencesMode, model?: number | null, anchor?: string | null, anchorTitle?: string | null, update?: boolean): void;
996
1069
  /**
997
- * Display a report
998
- * @param item
1070
+ * Opens the report viewer for the given document when supported by its model.
1071
+ * @param item - The document whose report to display.
999
1072
  */
1000
1073
  protected displayReport(item: ClipperDocumentInfo): void;
1001
1074
  /**
1002
- * Checks if documents can be selected and returned as message
1075
+ * Determines whether the current document satisfies the dialog's selection constraints.
1076
+ * @returns True when the document can be selected and confirmed.
1003
1077
  */
1004
1078
  protected canSelect(): boolean;
1005
1079
  /**
1006
- * Send a message with current selection and close dialog
1080
+ * Broadcasts the current document as a selection message and closes the dialog.
1007
1081
  */
1008
1082
  protected select(): void;
1009
1083
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<ClipperDocumentComponent, never>;
@@ -1018,45 +1092,53 @@ interface ClipperDocumentIndexDialogData {
1018
1092
  interface ClipperDocumentIndexDialogResult {
1019
1093
  data: ClipperDocumentAnchorInfo[];
1020
1094
  }
1021
- declare class ClipperDocumentIndexComponent implements OnInit {
1095
+ declare class ClipperDocumentIndexComponent {
1022
1096
  readonly selection: _angular_core.Signal<MatSelectionList>;
1023
1097
  readonly done: _angular_core.OutputEmitterRef<ClipperDocumentIndexDialogResult>;
1024
- private changeDetector;
1025
1098
  private clipperService;
1026
1099
  private dialogService;
1027
1100
  protected dialogData: ClipperDocumentIndexDialogData;
1028
- protected items?: ClipperDocumentAnchorInfo[];
1029
- protected okDisabled: _angular_core.WritableSignal<boolean>;
1030
- ngOnInit(): void;
1101
+ protected readonly items: _angular_core.WritableSignal<ClipperDocumentAnchorInfo[]>;
1102
+ protected readonly okDisabled: _angular_core.WritableSignal<boolean>;
1103
+ constructor();
1031
1104
  /**
1032
- * Display document structure
1105
+ * Loads the document's structural index from the server and populates the item list.
1106
+ * Items whose type appears in {@link ClipperDocumentIndexDialogData.excludedTypes} are filtered out.
1107
+ * Each item's description is built from its title, or derived from its type and text when no title is set.
1033
1108
  */
1034
1109
  private load;
1035
1110
  /**
1036
- * Handle selection/deselection of an item
1111
+ * Updates the OK button disabled state based on whether anything is selected in the list.
1037
1112
  */
1038
1113
  protected select(): void;
1039
1114
  /**
1040
- * Confirm selection
1041
- * @param item: the selected item or null to use multiple selection if allowed
1115
+ * Emits the current selection as the dialog result.
1116
+ * In single-selection mode, emits the explicitly provided item.
1117
+ * In multiple-selection mode, collects all selected items from the list.
1118
+ * @param item - The directly clicked item for single-selection mode; omit for multiple-selection mode.
1042
1119
  */
1043
1120
  protected use(item?: ClipperDocumentAnchorInfo): void;
1044
1121
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<ClipperDocumentIndexComponent, never>;
1045
1122
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<ClipperDocumentIndexComponent, "ng-component", never, {}, { "done": "done"; }, never, never, true, never>;
1046
1123
  }
1047
1124
 
1048
- declare class ClipperDocumentMenuComponent implements OnInit {
1049
- private rsMenuTrigger;
1050
- private aiAssistantMenuTrigger;
1051
- private linksMenuTrigger;
1052
- private allMenuTriggers;
1125
+ declare class ClipperDocumentMenuComponent {
1126
+ private readonly rsMenuTrigger;
1127
+ private readonly aiAssistantMenuTrigger;
1128
+ private readonly linksMenuTrigger;
1129
+ private readonly allMenuTriggers;
1053
1130
  private readonly renderer2;
1054
1131
  private readonly destroyRef;
1055
- private readonly changeDetector;
1056
1132
  private readonly clipperService;
1133
+ /** Internal counter incremented on each external selection-model change to drive signal re-evaluation. */
1134
+ private readonly selectionChangeTick;
1057
1135
  readonly useSelections: _angular_core.InputSignal<boolean>;
1058
- readonly selectionSource: _angular_core.InputSignal<"selection" | "bag" | "none">;
1059
- protected selection: () => ClipperDocumentInfo[];
1136
+ readonly selectionSource: _angular_core.InputSignal<"bag" | "selection" | "none">;
1137
+ /**
1138
+ * Computed signal that returns the current effective document selection.
1139
+ * Re-evaluates when any input signal or the underlying selection model changes.
1140
+ */
1141
+ protected readonly selection: _angular_core.Signal<ClipperDocumentInfo[]>;
1060
1142
  readonly parent: _angular_core.InputSignal<any>;
1061
1143
  readonly item: _angular_core.InputSignal<ClipperDocumentInfo>;
1062
1144
  readonly isReference: _angular_core.InputSignal<boolean>;
@@ -1069,183 +1151,217 @@ declare class ClipperDocumentMenuComponent implements OnInit {
1069
1151
  readonly canUseArchive: _angular_core.InputSignal<boolean>;
1070
1152
  readonly canUseProperties: _angular_core.InputSignal<boolean>;
1071
1153
  readonly canUseAIAssistant: _angular_core.InputSignal<boolean>;
1072
- protected canUseAIEditor: boolean;
1154
+ protected readonly canUseAIEditor: boolean;
1073
1155
  readonly canUseRS: _angular_core.InputSignal<boolean>;
1074
1156
  readonly canOpenDocument: _angular_core.InputSignal<boolean>;
1075
- protected canDeselectAll: () => boolean;
1076
- protected canManageBag: () => boolean;
1077
- protected canOpen: () => boolean;
1078
- protected canSendByEmail: () => boolean;
1079
- protected canAddProperties: () => boolean;
1080
- protected canAddToArchive: () => boolean;
1081
- protected canAddToCalendar: () => boolean;
1082
- protected canExportCalendar: () => boolean;
1083
- protected canAddToWorkingDocuments: () => boolean;
1084
- protected canSaveAsPdf: () => boolean;
1085
- protected canSetAsRead: () => boolean;
1086
- protected canSetAsUnread: () => boolean;
1087
- protected canAccessRS: () => boolean;
1088
- ngOnInit(): void;
1089
- /**
1090
- * Get a single selection
1091
- * @returns the single selection or null
1157
+ /** `true` when the current selection source is 'selection' and at least one item is selected. */
1158
+ protected readonly canDeselectAll: _angular_core.Signal<boolean>;
1159
+ /** `true` when operating in bag-management mode. */
1160
+ protected readonly canManageBag: _angular_core.Signal<boolean>;
1161
+ /** `true` when opening a document is allowed and exactly one item is selected. */
1162
+ protected readonly canOpen: _angular_core.Signal<boolean>;
1163
+ /** `true` when at least one item can be sent by email. */
1164
+ protected readonly canSendByEmail: _angular_core.Signal<boolean>;
1165
+ /** `true` when custom properties can be added to the single selected document. */
1166
+ protected readonly canAddProperties: _angular_core.Signal<boolean>;
1167
+ /** `true` when archive access is enabled and there is at least one selected item. */
1168
+ protected readonly canAddToArchive: _angular_core.Signal<boolean>;
1169
+ /** `true` when all selected items are deadline/alert documents and calendar is enabled. */
1170
+ protected readonly canAddToCalendar: _angular_core.Signal<boolean>;
1171
+ /** `true` when all selected items can be exported as an ICS calendar file. */
1172
+ protected readonly canExportCalendar: _angular_core.Signal<boolean>;
1173
+ /** `true` when the selection contains non-Coordinamento items that can be added to working documents. */
1174
+ protected readonly canAddToWorkingDocuments: _angular_core.Signal<boolean>;
1175
+ /** `true` when a single non-Coordinamento document is selected and can be saved as PDF. */
1176
+ protected readonly canSaveAsPdf: _angular_core.Signal<boolean>;
1177
+ /** `true` when the selection contains at least one unread document that supports the read state. */
1178
+ protected readonly canSetAsRead: _angular_core.Signal<boolean>;
1179
+ /** `true` when the selection contains at least one already-read document that supports the read state. */
1180
+ protected readonly canSetAsUnread: _angular_core.Signal<boolean>;
1181
+ /** `true` when the Clipper service supports RS and all selected items are RS-enabled. */
1182
+ protected readonly canAccessRS: _angular_core.Signal<boolean>;
1183
+ constructor();
1184
+ /**
1185
+ * Returns a single selected document: the bound item if present, or the sole item in the selection list.
1186
+ * @returns The selected document, or `undefined` when zero or more than one item is selected.
1092
1187
  */
1093
1188
  protected getSingleSelection(): ClipperDocumentInfo | undefined;
1094
1189
  /**
1095
- * Get multiple selection
1096
- * @returns : the multiple selection or array empty
1190
+ * Returns the full effective selection as an array.
1191
+ * If a bound item is present it is returned wrapped in a single-element array;
1192
+ * otherwise the full selection list is returned.
1193
+ * @returns An array of selected documents, or an empty array when nothing is selected.
1097
1194
  */
1098
1195
  protected getMultipleSelection(): ClipperDocumentInfo[];
1099
1196
  /**
1100
- * Check if only one element is selected
1101
- * @returns true if only one element is selectedf
1102
- */
1197
+ * Returns whether exactly one document is available for single-item operations.
1198
+ * @returns `true` if the bound item has a non-empty document ID, or if exactly one item is selected.
1199
+ */
1103
1200
  protected hasSingleSelection(): boolean;
1104
1201
  /**
1105
- * Show and hide sub menus
1106
- * @param trigger: the trigger to use or null to deselect
1107
- */
1202
+ * Closes all open sub-menu panels, then optionally opens the given trigger's menu.
1203
+ * @param trigger - The menu trigger to open after closing others; omit to only close.
1204
+ */
1108
1205
  protected showSubMenu(trigger?: MatMenuTrigger): void;
1109
1206
  /**
1110
- * Reset sub menu
1111
- * @param trigger: the trigger to use
1207
+ * Removes the CDK focus classes from the given trigger element to reset its visual state.
1208
+ * @param trigger - The menu trigger whose focus styles to clear.
1112
1209
  */
1113
1210
  protected resetSubMenu(trigger: MatMenuTrigger): void;
1114
1211
  /**
1115
- * Check if current item or selection is read
1116
- * @returns 0 if not read, 1 if read, 2 if unknown
1212
+ * Returns the read state of the current item or selection.
1213
+ * @returns `0` if unread, `1` if read, `2` if mixed or unknown.
1117
1214
  */
1118
1215
  protected isRead(): number;
1119
1216
  /**
1120
- * Set the is read flag value
1121
- * @param value: true or false
1217
+ * Delegates a read/unread state change to the parent component.
1218
+ * @param value - `true` to mark as read, `false` to mark as unread.
1122
1219
  */
1123
1220
  protected setRead(value: boolean): void;
1124
1221
  /**
1125
- * Open a document
1126
- * @param item : the item
1127
- * @param newWindow : true to open in new window
1222
+ * Opens the given document, optionally in a new browser window.
1223
+ * @param item - The document to open; no-op when `undefined`.
1224
+ * @param newWindow - When `true`, opens the document in a new window.
1128
1225
  */
1129
- protected open(item: ClipperDocumentInfo, newWindow?: boolean): void;
1226
+ protected open(item: ClipperDocumentInfo | undefined, newWindow?: boolean): void;
1130
1227
  /**
1131
- * Open document references
1132
- * @param item : the item
1133
- * @param mode: the mode
1134
- */
1135
- protected openReferences(item: ClipperDocumentInfo, mode: number): void;
1228
+ * Opens the references panel for the given document in the specified mode.
1229
+ * @param item - The document whose references to display; no-op when `undefined`.
1230
+ * @param mode - The reference query mode (e.g. 1 = referenced by, 2 = references, 4 = case law).
1231
+ */
1232
+ protected openReferences(item: ClipperDocumentInfo | undefined, mode: number): void;
1136
1233
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<ClipperDocumentMenuComponent, never>;
1137
1234
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<ClipperDocumentMenuComponent, "clipper-document-menu", never, { "useSelections": { "alias": "useSelections"; "required": false; "isSignal": true; }; "selectionSource": { "alias": "selectionSource"; "required": false; "isSignal": true; }; "parent": { "alias": "parent"; "required": true; "isSignal": true; }; "item": { "alias": "item"; "required": false; "isSignal": true; }; "isReference": { "alias": "isReference"; "required": false; "isSignal": true; }; "isReadable": { "alias": "isReadable"; "required": false; "isSignal": true; }; "isReadableModel": { "alias": "isReadableModel"; "required": false; "isSignal": true; }; "isLawInForce": { "alias": "isLawInForce"; "required": false; "isSignal": true; }; "canPrint": { "alias": "canPrint"; "required": false; "isSignal": true; }; "canFind": { "alias": "canFind"; "required": false; "isSignal": true; }; "canUseCalendar": { "alias": "canUseCalendar"; "required": false; "isSignal": true; }; "canUseArchive": { "alias": "canUseArchive"; "required": false; "isSignal": true; }; "canUseProperties": { "alias": "canUseProperties"; "required": false; "isSignal": true; }; "canUseAIAssistant": { "alias": "canUseAIAssistant"; "required": false; "isSignal": true; }; "canUseRS": { "alias": "canUseRS"; "required": false; "isSignal": true; }; "canOpenDocument": { "alias": "canOpenDocument"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
1138
1235
  }
1139
1236
 
1140
- declare class ClipperPropertyBadgeComponent implements AfterViewInit, OnDestroy {
1141
- private themeService;
1142
- private injector;
1143
- private clipperService;
1144
- private broadcastService;
1145
- private dialogService;
1146
- private destroyRef;
1147
- private overlay;
1237
+ declare class ClipperPropertyBadgeComponent {
1238
+ private readonly themeService;
1239
+ private readonly injector;
1240
+ private readonly clipperService;
1241
+ private readonly broadcastService;
1242
+ private readonly dialogService;
1243
+ private readonly destroyRef;
1244
+ private readonly overlay;
1148
1245
  private overlayRef;
1149
1246
  private resizeSub;
1150
- private viewContainerRef;
1247
+ private readonly viewContainerRef;
1151
1248
  readonly populateContacts: _angular_core.OutputEmitterRef<SendToPopulateData>;
1152
- private popupTpl;
1249
+ private readonly popupTpl;
1153
1250
  readonly property: _angular_core.ModelSignal<ClipperDocumentProperty>;
1154
- protected backgroundColor: _angular_core.WritableSignal<string>;
1155
- protected trackingUnopenedCount: _angular_core.Signal<number>;
1156
- protected trackingOpenedCount: _angular_core.Signal<number>;
1157
- protected totalTrackings: _angular_core.Signal<number>;
1158
- ngOnDestroy(): void;
1159
- ngAfterViewInit(): void;
1251
+ protected readonly backgroundColor: _angular_core.WritableSignal<string>;
1252
+ protected readonly trackingUnopenedCount: _angular_core.Signal<number>;
1253
+ protected readonly trackingOpenedCount: _angular_core.Signal<number>;
1254
+ protected readonly totalTrackings: _angular_core.Signal<number>;
1255
+ constructor();
1160
1256
  /**
1161
- * Gets the background color for the badge, which is a mix of the property color and either black or white depending on the current theme.
1162
- * @returns the calculated background color as a CSS color string
1257
+ * Computes the badge background color by blending the property colour with
1258
+ * black (dark theme) or white (light theme).
1259
+ * @returns The calculated background colour as a CSS `color-mix()` string.
1163
1260
  */
1164
1261
  private getBackgroundColor;
1165
1262
  /**
1166
- * Shows the popup with property details at the position of the mouse event. Stops the propagation of the click event to prevent triggering other click handlers.
1167
- * @param event : the mouse event that triggered the popup, used to get the cursor position for placing the popup
1263
+ * Opens the property-details popup positioned near the mouse cursor.
1264
+ * Stops event propagation to avoid triggering parent click handlers.
1265
+ * @param event - The mouse event used to determine the popup position.
1168
1266
  */
1169
1267
  protected showPopup(event: MouseEvent): void;
1170
1268
  /**
1171
- * Closes the property details popup.
1269
+ * Closes the property-details popup and cleans up overlay resources.
1270
+ * @param event - Optional mouse event; when provided, propagation is stopped.
1172
1271
  */
1173
1272
  protected closePopup(event?: MouseEvent): void;
1174
1273
  /**
1175
- * Edits the property by opening a dialog with the PropertyEditComponent. Passes the current property as data to the dialog. Subscribes to the 'done' event of the dialog component to update the property when editing is complete. Stops the propagation of the click event to prevent triggering other click handlers.
1176
- * @param event : the mouse event that triggered the edit action, used to stop propagation and prevent triggering other click handlers
1274
+ * Opens the property-edit dialog pre-populated with the current property data.
1275
+ * On confirmation, updates the model and broadcasts the change.
1276
+ * Stops event propagation to avoid triggering parent click handlers.
1277
+ * @param event - The mouse event that triggered the edit action.
1177
1278
  */
1178
1279
  protected edit(event: MouseEvent): void;
1179
1280
  /**
1180
- * Deletes the property after confirming with the user. Opens a confirmation dialog and if the user confirms, emits an event to indicate that the property should be deleted. Stops the propagation of the click event to prevent triggering other click handlers.
1181
- * @param event : the mouse event that triggered the delete action, used to stop propagation and prevent triggering other click handlers
1281
+ * Opens a confirmation dialog and, on confirmation, deletes the property via the service.
1282
+ * Broadcasts the deletion and closes the popup on success.
1283
+ * Stops event propagation to avoid triggering parent click handlers.
1284
+ * @param event - The mouse event that triggered the delete action.
1182
1285
  */
1183
1286
  protected delete(event: MouseEvent): void;
1184
1287
  /**
1185
- * Sends the document associated with the property to email. Opens a dialog to enter email details and then calls the service to send the email. Stops the propagation of the click event to prevent triggering other click handlers.
1186
- * @param event : the mouse event that triggered the send action, used to stop propagation and prevent triggering other click handlers
1288
+ * Opens the send-by-email dialog for the document linked to this property.
1289
+ * On confirmation, sends a notification via the service and updates tracking data.
1290
+ * Stops event propagation to avoid triggering parent click handlers.
1291
+ * @param event - The mouse event that triggered the send action.
1187
1292
  */
1188
1293
  protected sendTo(event: MouseEvent): void;
1189
1294
  /**
1190
- * Sends the email associated with the property again. Opens a confirmation dialog and if the user confirms, calls the service to resend the email. Stops the propagation of the click event to prevent triggering other click handlers.
1191
- * @param event The mouse event that triggered the resend action, used to stop propagation and prevent triggering other click handlers
1192
- * @param notifyIfNotOpen A boolean flag indicating whether to notify if the property is not open
1295
+ * Opens a confirmation dialog and, on confirmation, resends the email notifications
1296
+ * associated with this property.
1297
+ * Stops event propagation to avoid triggering parent click handlers.
1298
+ * @param event - The mouse event that triggered the resend action.
1299
+ * @param notifyIfNotOpen - When `true`, only recipients who have not yet opened the previous email are notified.
1193
1300
  */
1194
1301
  protected sendAgain(event: MouseEvent, notifyIfNotOpen: boolean): void;
1195
1302
  /**
1196
- * Refresh tracking information for the property by calling the service to get the latest trackings. Updates the property with the new tracking information. Stops the propagation of the click event to prevent triggering other click handlers.
1197
- * @param event : the mouse event that triggered the refresh action, used to stop propagation and prevent triggering other click handlers
1303
+ * Fetches the latest tracking data for the property from the server and updates the model.
1304
+ * Stops event propagation to avoid triggering parent click handlers.
1305
+ * @param event - The mouse event that triggered the refresh action.
1198
1306
  */
1199
1307
  protected refresh(event: MouseEvent): void;
1200
1308
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<ClipperPropertyBadgeComponent, never>;
1201
1309
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<ClipperPropertyBadgeComponent, "clipper-property-badge", never, { "property": { "alias": "property"; "required": true; "isSignal": true; }; }, { "populateContacts": "populateContacts"; "property": "propertyChange"; }, never, never, true, never>;
1202
1310
  }
1203
1311
 
1204
- declare class ClipperPropertyEditComponent implements OnInit {
1312
+ declare class ClipperPropertyEditComponent {
1205
1313
  readonly done: _angular_core.OutputEmitterRef<ClipperDocumentProperty>;
1206
- private dialogService;
1207
- protected dialogData: EditDialogData<ClipperDocumentProperty>;
1208
- protected dialogTitle: string;
1209
- private clipperService;
1210
- protected colors: NameValueItem<string>[];
1211
- protected colorName(value: string): string;
1212
- protected isNew: _angular_core.WritableSignal<boolean>;
1314
+ private readonly dialogService;
1315
+ protected readonly dialogData: EditDialogData<ClipperDocumentProperty>;
1316
+ protected readonly dialogTitle: string;
1317
+ private readonly clipperService;
1318
+ protected readonly colors: NameValueItem<string>[];
1319
+ protected readonly isNew: _angular_core.WritableSignal<boolean>;
1320
+ protected readonly availableTeams: _angular_core.WritableSignal<NameValueItem<string>[]>;
1321
+ protected selectedTeam: NameValueItem<string>;
1213
1322
  protected item: ClipperDocumentProperty;
1214
- protected availableTeams: _angular_core.WritableSignal<NameValueItem<string>[]>;
1215
- protected selectedTeam?: NameValueItem<string>;
1216
- ngOnInit(): void;
1323
+ constructor();
1324
+ /**
1325
+ * Returns the display name for the given colour value.
1326
+ * @param value - The hex/CSS colour string to look up.
1327
+ * @returns The human-readable colour name, or the raw value when not found.
1328
+ */
1329
+ protected colorName(value: string): string;
1217
1330
  /**
1218
- * Load teams
1219
- */
1331
+ * Loads the teams available for shared-workspace properties and populates the teams dropdown.
1332
+ * Pre-selects the team matching the current item's teamId, defaulting to "Personale".
1333
+ */
1220
1334
  private loadTeams;
1221
1335
  /**
1222
- * Submit
1336
+ * Saves the property via the service and emits the result through the `done` output.
1337
+ * For new properties, assigns the selected team before saving.
1223
1338
  */
1224
1339
  protected ok(): void;
1225
1340
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<ClipperPropertyEditComponent, never>;
1226
1341
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<ClipperPropertyEditComponent, "ng-component", never, {}, { "done": "done"; }, never, never, true, never>;
1227
1342
  }
1228
1343
 
1229
- declare class ClipperContactEditComponent implements OnInit {
1344
+ declare class ClipperContactEditComponent {
1230
1345
  private clipperService;
1231
1346
  private dialogService;
1232
1347
  private dialogRef;
1233
1348
  private dialogData;
1234
1349
  protected readonly f: _angular_core.Signal<NgForm>;
1235
1350
  readonly done: _angular_core.OutputEmitterRef<EditDialogCompleted<ClipperContactInfo>>;
1236
- protected dialogTitle: string;
1237
- protected isNew: _angular_core.WritableSignal<boolean>;
1351
+ protected readonly dialogTitle: string;
1352
+ protected readonly isNew: _angular_core.WritableSignal<boolean>;
1238
1353
  protected item: ClipperContactInfo;
1239
- protected availableTeams: _angular_core.WritableSignal<NameValueItem<string>[]>;
1240
- protected selectedTeam?: NameValueItem<string>;
1241
- ngOnInit(): void;
1354
+ protected readonly availableTeams: _angular_core.WritableSignal<NameValueItem<string>[]>;
1355
+ protected selectedTeam: NameValueItem<string>;
1356
+ constructor();
1242
1357
  /**
1243
- * Load teams
1244
- */
1358
+ * Loads the list of available teams from the server and populates the team selector.
1359
+ * Pre-selects the team that matches the current contact's team id, falling back to 'Personale'.
1360
+ */
1245
1361
  private loadTeams;
1246
1362
  /**
1247
- * Save
1248
- * @param save : true if data must really be submitted because changed
1363
+ * Persists the current contact to the server.
1364
+ * Closes the dialog without saving when editing an existing contact whose form is unchanged.
1249
1365
  */
1250
1366
  protected save(): void;
1251
1367
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<ClipperContactEditComponent, never>;
@@ -1253,26 +1369,48 @@ declare class ClipperContactEditComponent implements OnInit {
1253
1369
  }
1254
1370
 
1255
1371
  declare class ClipperContactsSelector {
1256
- static Show(injector: Injector, canAppend?: boolean, canEdit?: boolean, onSelect?: Function): void;
1372
+ /**
1373
+ * Builds an HTML string representing a list of email addresses separated by line breaks.
1374
+ * @param emails - A semicolon-separated string of email addresses, or undefined.
1375
+ * @returns An HTML string with each address wrapped in a `<span>` tag.
1376
+ */
1377
+ private static buildEmailsHtml;
1378
+ /**
1379
+ * Builds the HTML row template used to display a contact inside the selection dialog.
1380
+ * @param item - The contact data to render.
1381
+ * @returns An HTML string representing the contact row.
1382
+ */
1383
+ private static buildContactTemplate;
1384
+ /**
1385
+ * Opens the contacts selection/management dialog and wires up all interaction events.
1386
+ * @param injector - The Angular injector used to resolve services within the dialog context.
1387
+ * @param canAppend - When true, the dialog allows adding new contacts.
1388
+ * @param canEdit - When true, the dialog allows editing and deleting contacts.
1389
+ * @param onSelect - Optional callback invoked with the selection result when the user confirms.
1390
+ */
1391
+ static Show(injector: Injector, canAppend?: boolean, canEdit?: boolean, onSelect?: (result: unknown) => void): void;
1257
1392
  }
1258
1393
 
1259
1394
  declare class ClipperDocumentsUtils {
1260
1395
  /**
1261
- * Open a document
1262
- * @param injector: the injector
1263
- * @param documentId : the document id
1264
- * @param query : the query for highlight
1265
- * @param queryChunks : the query chunks for highlight as string (eg. "|1|2|3...")
1266
- * @param selectionMode : the clipper selection mode
1267
- * @param selectableModules : the clipper selectable modules
1268
- * @param theme: the theme to use. Default is system
1269
- * @param canUseArchive: ture if archive is available
1270
- * @param canHandleTooManyResults: true if the component should handle too many results
1396
+ * Opens the Clipper document viewer dialog for the given document.
1397
+ * @param injector - The Angular injector used to resolve `DialogService` and `ClipperService`.
1398
+ * @param documentId - The ID of the document to open.
1399
+ * @param query - The search query string used for term highlighting.
1400
+ * @param queryChunks - Pipe-separated highlight chunks (e.g. "|1|2|3...").
1401
+ * @param selectionMode - The Clipper selection mode to activate inside the viewer.
1402
+ * @param selectableModules - The list of Clipper modules available for selection.
1403
+ * @param theme - The UI theme to apply. Defaults to the system theme.
1404
+ * @param canUseArchive - When `true`, archive access is enabled inside the viewer.
1405
+ * @param canHandleTooManyResults - When `true`, the component handles oversized result sets.
1406
+ * @returns The `MatDialogRef` for the opened dialog, or `undefined` when the user is not logged in
1407
+ * or the document ID is invalid.
1271
1408
  */
1272
1409
  static openDocument(injector: Injector, documentId: string, query?: string, queryChunks?: string, selectionMode?: ClipperSelectionMode, selectableModules?: ClipperModule[], theme?: ThemeType, canUseArchive?: boolean, canHandleTooManyResults?: boolean): MatDialogRef<ClipperDocumentComponent> | undefined;
1273
1410
  /**
1274
- * Extract document title
1275
- * @param title : the full document title
1411
+ * Extracts the display title from a full document title by stripping any trailing `[...]` suffix.
1412
+ * @param title - The full document title, which may contain a bracketed qualifier.
1413
+ * @returns The portion of the title before the first `[`, or the original title when no `[` is present.
1276
1414
  */
1277
1415
  static parseDocumentTitle(title: string): string;
1278
1416
  }