@arsedizioni/ars-utils 18.1.74 → 18.1.76

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. package/clipper.common/common/common.module.d.ts +1 -2
  2. package/clipper.common/common/definitions.d.ts +317 -0
  3. package/clipper.common/common/interceptors/auth.interceptor.d.ts +2 -5
  4. package/clipper.common/common/messages.d.ts +4 -0
  5. package/clipper.common/common/services/clipper.service.d.ts +12 -36
  6. package/clipper.ui/{ui/document/documents.d.ts → documents.d.ts} +2 -6
  7. package/clipper.ui/public_api.d.ts +6 -5
  8. package/clipper.ui/ui/browser-dialog/browser-dialog.component.d.ts +30 -143
  9. package/clipper.ui/ui/clipper.scss +270 -106
  10. package/clipper.ui/ui/document/document.component.d.ts +64 -118
  11. package/clipper.ui/ui/document-index/document-index.component.d.ts +34 -0
  12. package/clipper.ui/ui/document-manager/document-manager.d.ts +126 -0
  13. package/clipper.ui/ui/document-menu/document-menu.component.d.ts +28 -0
  14. package/clipper.ui/ui/references/references.component.d.ts +39 -73
  15. package/clipper.ui/ui/search-calendar/search-calendar.component.d.ts +40 -0
  16. package/clipper.ui/ui/search-dialog/search-dialog.component.d.ts +37 -40
  17. package/clipper.ui/ui/search-facets/search-facets.component.d.ts +22 -70
  18. package/clipper.ui/ui/search-free-text-help/search-free-text-help.component.d.ts +0 -1
  19. package/clipper.ui/ui/search-free-text-query-builder/search-free-text-query-builder.component.d.ts +8 -12
  20. package/clipper.ui/ui/search-result-item/search-result-item.component.d.ts +6 -4
  21. package/clipper.ui/ui/search-result-manager/search-result-manager.d.ts +147 -0
  22. package/esm2022/clipper.common/common/common.module.mjs +2 -3
  23. package/esm2022/clipper.common/common/definitions.mjs +1536 -0
  24. package/esm2022/clipper.common/common/interceptors/auth.interceptor.mjs +15 -15
  25. package/esm2022/clipper.common/common/messages.mjs +6 -1
  26. package/esm2022/clipper.common/common/services/clipper.service.mjs +65 -65
  27. package/esm2022/clipper.ui/documents.mjs +51 -0
  28. package/esm2022/clipper.ui/public_api.mjs +7 -6
  29. package/esm2022/clipper.ui/ui/browser-dialog/browser-dialog.component.mjs +320 -785
  30. package/esm2022/clipper.ui/ui/document/document.component.mjs +213 -320
  31. package/esm2022/clipper.ui/ui/document-index/document-index.component.mjs +121 -0
  32. package/esm2022/clipper.ui/ui/document-manager/document-manager.mjs +431 -0
  33. package/esm2022/clipper.ui/ui/document-menu/document-menu.component.mjs +56 -0
  34. package/esm2022/clipper.ui/ui/references/references.component.mjs +244 -438
  35. package/esm2022/clipper.ui/ui/search-calendar/search-calendar.component.mjs +116 -0
  36. package/esm2022/clipper.ui/ui/search-dialog/search-dialog.component.mjs +216 -205
  37. package/esm2022/clipper.ui/ui/search-facets/search-facets.component.mjs +157 -209
  38. package/esm2022/clipper.ui/ui/search-free-text-help/search-free-text-help.component.mjs +7 -8
  39. package/esm2022/clipper.ui/ui/search-free-text-query-builder/search-free-text-query-builder.component.mjs +22 -23
  40. package/esm2022/clipper.ui/ui/search-result-item/search-result-item.component.mjs +12 -10
  41. package/esm2022/clipper.ui/ui/search-result-manager/search-result-manager.mjs +462 -0
  42. package/esm2022/help/components/help-viewer/help-viewer.component.mjs +25 -28
  43. package/esm2022/support.common/common/definitions.mjs +21 -0
  44. package/esm2022/support.common/common/services/support.service.mjs +9 -7
  45. package/esm2022/support.common/public_api.mjs +2 -2
  46. package/esm2022/support.ui/ui/notifications-browser/notification/notification.component.mjs +3 -3
  47. package/esm2022/support.ui/ui/notifications-browser/notifications-browser.component.mjs +4 -5
  48. package/esm2022/ui/ui/dialogs/busy/busy-dialog.component.mjs +3 -3
  49. package/esm2022/ui/ui/dialogs/confirm/confirm-dialog.component.mjs +3 -3
  50. package/esm2022/ui/ui/dialogs/credentials/credentials-dialog.component.mjs +3 -3
  51. package/esm2022/ui/ui/dialogs/info/info-dialog.component.mjs +3 -3
  52. package/esm2022/ui/ui/dialogs/recover-password/recover-password-dialog.component.mjs +3 -3
  53. package/esm2022/ui/ui/dialogs/reset-password/reset-password-dialog.component.mjs +3 -3
  54. package/esm2022/ui.application/public_api.mjs +4 -1
  55. package/esm2022/ui.application/ui/components/button-selector/button-selector.component.mjs +163 -0
  56. package/esm2022/ui.application/ui/components/button-toggle/button-toggle.component.mjs +47 -0
  57. package/esm2022/ui.application/ui/components/chips-selector/chips-selector.component.mjs +239 -0
  58. package/esm2022/ui.application/ui/components/file-preview/file-preview.component.mjs +23 -24
  59. package/esm2022/ui.application/ui/components/filter-bar/filter-bar.component.mjs +3 -3
  60. package/esm2022/ui.application/ui/dialogs/prompt/prompt-dialog.component.mjs +3 -3
  61. package/esm2022/ui.application/ui/dialogs/prompt-date/prompt-date-dialog.component.mjs +3 -3
  62. package/esm2022/ui.application/ui/dialogs/prompt-time/prompt-time-dialog.component.mjs +3 -3
  63. package/esm2022/ui.application/ui/dialogs/select/select-dialog.component.mjs +3 -3
  64. package/esm2022/ui.application/ui/dialogs/select-file/select-file-dialog.component.mjs +3 -3
  65. package/esm2022/ui.application/ui/dialogs/select-picture/select-picture-dialog.component.mjs +3 -3
  66. package/esm2022/ui.application/ui/dialogs/select-tree/select-tree-dialog.component.mjs +3 -3
  67. package/esm2022/ui.application/ui/dialogs/send-to/send-to-dialog.component.mjs +3 -3
  68. package/esm2022/ui.application/ui/messages.mjs +3 -3
  69. package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs +1608 -1507
  70. package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs.map +1 -1
  71. package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs +2283 -2407
  72. package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs.map +1 -1
  73. package/fesm2022/arsedizioni-ars-utils-help.mjs +25 -28
  74. package/fesm2022/arsedizioni-ars-utils-help.mjs.map +1 -1
  75. package/fesm2022/arsedizioni-ars-utils-support.common.mjs +8 -6
  76. package/fesm2022/arsedizioni-ars-utils-support.common.mjs.map +1 -1
  77. package/fesm2022/arsedizioni-ars-utils-support.ui.mjs +5 -6
  78. package/fesm2022/arsedizioni-ars-utils-support.ui.mjs.map +1 -1
  79. package/fesm2022/arsedizioni-ars-utils-ui.application.mjs +450 -47
  80. package/fesm2022/arsedizioni-ars-utils-ui.application.mjs.map +1 -1
  81. package/fesm2022/arsedizioni-ars-utils-ui.mjs +12 -12
  82. package/fesm2022/arsedizioni-ars-utils-ui.mjs.map +1 -1
  83. package/help/components/help-viewer/help-viewer.component.d.ts +6 -10
  84. package/package.json +13 -13
  85. package/styles/ui.scss +140 -0
  86. package/support.common/common/services/support.service.d.ts +2 -2
  87. package/support.common/public_api.d.ts +1 -1
  88. package/ui.application/public_api.d.ts +3 -0
  89. package/ui.application/ui/components/button-selector/button-selector.component.d.ts +49 -0
  90. package/ui.application/ui/components/button-toggle/button-toggle.component.d.ts +26 -0
  91. package/ui.application/ui/components/chips-selector/chips-selector.component.d.ts +70 -0
  92. package/ui.application/ui/components/file-preview/file-preview.component.d.ts +4 -8
  93. package/ui.application/ui/messages.d.ts +2 -2
  94. package/clipper.common/common/clipper.d.ts +0 -119
  95. package/clipper.common/common/search.d.ts +0 -49
  96. package/clipper.ui/ui/document/base/document-base.component.d.ts +0 -38
  97. package/clipper.ui/ui/document/document-index/document-index.component.d.ts +0 -38
  98. package/clipper.ui/ui/document/document-menu/document-menu.component.d.ts +0 -30
  99. package/clipper.ui/ui/last-15-days/last-15-days.component.d.ts +0 -41
  100. package/esm2022/clipper.common/common/clipper.mjs +0 -1371
  101. package/esm2022/clipper.common/common/search.mjs +0 -69
  102. package/esm2022/clipper.ui/ui/document/base/document-base.component.mjs +0 -194
  103. package/esm2022/clipper.ui/ui/document/document-index/document-index.component.mjs +0 -121
  104. package/esm2022/clipper.ui/ui/document/document-menu/document-menu.component.mjs +0 -88
  105. package/esm2022/clipper.ui/ui/document/documents.mjs +0 -49
  106. package/esm2022/clipper.ui/ui/last-15-days/last-15-days.component.mjs +0 -107
  107. package/esm2022/help/components/help-search-query-builder/help-search-query-builder.component.mjs +0 -114
  108. package/esm2022/support.common/common/support.mjs +0 -21
  109. package/esm2022/ui.oauth/ui/components/login/loginOAuth.component.mjs +0 -198
  110. package/help/components/help-search-query-builder/help-search-query-builder.component.d.ts +0 -29
  111. package/help/help.scss +0 -72
  112. package/ui.oauth/ui/components/login/loginOAuth.component.d.ts +0 -38
  113. /package/support.common/common/{support.d.ts → definitions.d.ts} +0 -0
@@ -0,0 +1,34 @@
1
+ import { EventEmitter, OnInit } from '@angular/core';
2
+ import { MatSelectionList } from '@angular/material/list';
3
+ import { ClipperDocumentIndexInfo } from '@arsedizioni/ars-utils/clipper.common';
4
+ import * as i0 from "@angular/core";
5
+ export interface ClipperDocumentIndexDialogData {
6
+ documentId: string;
7
+ excludedTypes?: number[] | null;
8
+ multiple?: boolean | null;
9
+ }
10
+ export declare class ClipperDocumentIndexComponent implements OnInit {
11
+ selection: MatSelectionList;
12
+ done: EventEmitter<any>;
13
+ private clipperService;
14
+ private dialogService;
15
+ protected dialogData: ClipperDocumentIndexDialogData;
16
+ protected items: ClipperDocumentIndexInfo[] | null;
17
+ protected okDisabled: import("@angular/core").WritableSignal<boolean>;
18
+ ngOnInit(): void;
19
+ /**
20
+ * Display document structure
21
+ */
22
+ private load;
23
+ /**
24
+ * Handle selection/deselection of an item
25
+ */
26
+ protected select(): void;
27
+ /**
28
+ * Confirm selection
29
+ * @param item: the selected item or null to use multiple selection if allowed
30
+ */
31
+ protected use(item?: ClipperDocumentIndexInfo): void;
32
+ static ɵfac: i0.ɵɵFactoryDeclaration<ClipperDocumentIndexComponent, never>;
33
+ static ɵcmp: i0.ɵɵComponentDeclaration<ClipperDocumentIndexComponent, "ng-component", never, {}, { "done": "done"; }, never, never, true, never>;
34
+ }
@@ -0,0 +1,126 @@
1
+ import { Clipboard } from '@angular/cdk/clipboard';
2
+ import { ClipperDocumentInfo, ClipperDocumentSnapshotMode, ClipperModel, ClipperModule, ClipperSearchParams, ClipperService } from '@arsedizioni/ars-utils/clipper.common';
3
+ import { BroadcastService } from '@arsedizioni/ars-utils/core';
4
+ import { ApplicationDialogService } from '@arsedizioni/ars-utils/ui.application';
5
+ import * as i0 from "@angular/core";
6
+ export declare class ClipperDocumentManager {
7
+ protected clipboard: Clipboard;
8
+ clipperService: ClipperService;
9
+ protected broadcastService: BroadcastService;
10
+ protected dialogService: ApplicationDialogService;
11
+ /**
12
+ * Export a document in pdf format
13
+ * @param item : the document to export
14
+ */
15
+ exportPdf(item: ClipperDocumentInfo): void;
16
+ /**
17
+ * Save current document list or just the selected documents as a csv
18
+ * @param items: the item list
19
+ * @param searchParams: the search params
20
+ */
21
+ exportItems(items: ClipperDocumentInfo[], searchParams?: ClipperSearchParams | null): void;
22
+ /**
23
+ * Archive a list of items
24
+ * @param items: the item list
25
+ */
26
+ addToArchive(items: ClipperDocumentInfo[]): void;
27
+ /**
28
+ * Create a new deadline
29
+ * @param item : the item to add
30
+ */
31
+ addToCalendar(item: ClipperDocumentInfo): void;
32
+ /**
33
+ * Add a list of items to working documents
34
+ * @param items : the item list
35
+ */
36
+ addItemsToWorkingDocuments(items: ClipperDocumentInfo[]): void;
37
+ /**
38
+ * Add a list of items to working documents
39
+ * @param items : the item list
40
+ */
41
+ addItemsToBag(items: ClipperDocumentInfo[]): void;
42
+ /**
43
+ * Copy metadata to clipboard
44
+ * @param item : the item to copy
45
+ */
46
+ copyMetadataToClipboard(item: ClipperDocumentInfo): void;
47
+ /**
48
+ * Show a document permalink
49
+ * @param item : the item to show the link for
50
+ */
51
+ showLink(item: any): void;
52
+ /**
53
+ * Send documents links by email
54
+ * @param items : the document list
55
+ */
56
+ sendItemsTo(items: ClipperDocumentInfo[]): void;
57
+ /**
58
+ * Display a document report
59
+ * @param documentId : the document id
60
+ * @param title: the document short title
61
+ */
62
+ openReport(documentId: string, title?: string | null): void;
63
+ /**
64
+ * Open an item
65
+ * This should be always overridden
66
+ * @param documentId : the document id
67
+ * @param newWindow: true if the document must be open into a new window
68
+ */
69
+ open(documentId: string, newWindow?: boolean): void;
70
+ /**
71
+ * Display a document report
72
+ * @param item : the document
73
+ */
74
+ report(item: ClipperDocumentInfo): void;
75
+ /**
76
+ * Browse document references
77
+ * @param item : the document item
78
+ * @param mode : the snapshot mode
79
+ */
80
+ references(item: ClipperDocumentInfo, mode?: ClipperDocumentSnapshotMode): void;
81
+ /**
82
+ * Manage clipper bag
83
+ */
84
+ manageBag(): void;
85
+ /**
86
+ * Checks if a module is supported by RS
87
+ * @param module : the module to check
88
+ * @returns: true if the module is supported
89
+ */
90
+ isModuleSupportedByRS(module: ClipperModule): boolean;
91
+ /**
92
+ * Checks if a model is supported by RS
93
+ * @param model : the model to check
94
+ * @returns: true if the model is supported
95
+ */
96
+ isModelSupportedByRS(model: ClipperModel): boolean;
97
+ /**
98
+ * Checks if all documents are supported by RS
99
+ * @param items : the list of documens
100
+ * @returns: true if all documents supports RS
101
+ */
102
+ canSupportRS(items: []): boolean;
103
+ /**
104
+ * Checks if RS is enabled for all given documents
105
+ * @param documents : the documents to check
106
+ * @returns true if alla documents ar RS enabled
107
+ */
108
+ RS_enabled(documents: ClipperDocumentInfo[]): boolean;
109
+ /**
110
+ * New law
111
+ * @param documents: the array of documents to link to the law
112
+ */
113
+ RS_newLaw(documents: ClipperDocumentInfo[]): void;
114
+ /**
115
+ * New activity
116
+ * @param document: the document to link to the activity
117
+ */
118
+ RS_newActivity(document: ClipperDocumentInfo): void;
119
+ /**
120
+ * Document usage report
121
+ * @param document: the law
122
+ */
123
+ RS_usageReport(document: ClipperDocumentInfo): void;
124
+ static ɵfac: i0.ɵɵFactoryDeclaration<ClipperDocumentManager, never>;
125
+ static ɵcmp: i0.ɵɵComponentDeclaration<ClipperDocumentManager, "ng-component", never, {}, {}, never, never, true, never>;
126
+ }
@@ -0,0 +1,28 @@
1
+ import { Signal } from '@angular/core';
2
+ import { ClipperDocumentInfo } from '@arsedizioni/ars-utils/clipper.common';
3
+ import { ClipperSearchResultManager } from '../search-result-manager/search-result-manager';
4
+ import * as i0 from "@angular/core";
5
+ export declare class ClipperDocumentMenuComponent {
6
+ parent: import("@angular/core").InputSignal<ClipperSearchResultManager>;
7
+ selectionSource: import("@angular/core").InputSignal<"bag" | "selection">;
8
+ protected selection: Signal<ClipperDocumentInfo[]>;
9
+ useSelections: import("@angular/core").InputSignal<boolean>;
10
+ item: import("@angular/core").InputSignal<ClipperDocumentInfo>;
11
+ isReference: import("@angular/core").InputSignal<boolean>;
12
+ isReadable: import("@angular/core").InputSignal<boolean>;
13
+ isDeadline: import("@angular/core").InputSignal<boolean>;
14
+ isLawInForce: import("@angular/core").InputSignal<boolean>;
15
+ isLaw: import("@angular/core").InputSignal<boolean>;
16
+ /**
17
+ * Check if current item or selection is read
18
+ * @returns 0 if not read, 1 if read, 2 if unknown
19
+ */
20
+ isRead(): number;
21
+ /**
22
+ * Set the is read flag value
23
+ * @param value: true or false
24
+ */
25
+ setRead(value: boolean): void;
26
+ static ɵfac: i0.ɵɵFactoryDeclaration<ClipperDocumentMenuComponent, never>;
27
+ static ɵcmp: i0.ɵɵComponentDeclaration<ClipperDocumentMenuComponent, "clipper-document-menu", never, { "parent": { "alias": "parent"; "required": false; "isSignal": true; }; "selectionSource": { "alias": "selectionSource"; "required": false; "isSignal": true; }; "useSelections": { "alias": "useSelections"; "required": false; "isSignal": true; }; "item": { "alias": "item"; "required": false; "isSignal": true; }; "isReference": { "alias": "isReference"; "required": false; "isSignal": true; }; "isReadable": { "alias": "isReadable"; "required": false; "isSignal": true; }; "isDeadline": { "alias": "isDeadline"; "required": false; "isSignal": true; }; "isLawInForce": { "alias": "isLawInForce"; "required": false; "isSignal": true; }; "isLaw": { "alias": "isLaw"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
28
+ }
@@ -1,43 +1,37 @@
1
- import { OnDestroy, OnInit } from '@angular/core';
2
- import { MediaObserver } from '@ngbracket/ngx-layout';
3
- import { MatDialogRef } from '@angular/material/dialog';
4
- import { MatMenuTrigger } from '@angular/material/menu';
5
- import { MatPaginator } from '@angular/material/paginator';
6
- import { ScreenService, SelectableModel } from '@arsedizioni/ars-utils/core';
7
- import { ClipperDocumentBaseComponent } from '../document/base/document-base.component';
8
- import { ClipperService, DocumentReferenceSnapshot } from '@arsedizioni/ars-utils/clipper.common';
9
- import { MatSidenav } from '@angular/material/sidenav';
10
- import { ClipperSearchFacetsComponent } from '../search-facets/search-facets.component';
11
- import { DialogService } from '@arsedizioni/ars-utils/ui';
1
+ import { AfterViewInit, OnDestroy, OnInit } from '@angular/core';
2
+ import { MatDrawer } from '@angular/material/sidenav';
3
+ import { ClipperDocumentInfo, ClipperDocumentSnapshotMode } from '@arsedizioni/ars-utils/clipper.common';
4
+ import { ClipperSearchResultManager } from '../search-result-manager/search-result-manager';
12
5
  import * as i0 from "@angular/core";
13
- export declare class ClipperReferencesComponent extends ClipperDocumentBaseComponent implements OnInit, OnDestroy {
14
- $dialog: DialogService;
15
- $clipper: ClipperService;
16
- $screen: ScreenService;
17
- private media;
6
+ export interface ClipperReferencesDialogData {
7
+ mode?: ClipperDocumentSnapshotMode | null;
8
+ anchor?: string | null;
9
+ anchorTitle?: string | null;
10
+ id: string;
11
+ model: number;
12
+ }
13
+ export declare class ClipperReferencesComponent extends ClipperSearchResultManager implements OnInit, OnDestroy, AfterViewInit {
14
+ filterPane: MatDrawer;
15
+ private height;
18
16
  private dialogRef;
19
- facetsSidenav: MatSidenav;
20
- facetsSearch: ClipperSearchFacetsComponent;
21
- paginator: MatPaginator;
22
- contextMenu: MatMenuTrigger;
23
- private __d$;
24
- title: string;
25
- selection: SelectableModel<any, string>;
26
- snapshot: DocumentReferenceSnapshot;
27
- facetsMode: string;
28
- facetsClosed: boolean;
29
- contentHeight: number;
30
- contextMenuPosition: {
31
- x: string;
32
- y: string;
33
- };
34
- mq: string;
35
- anchor: string;
36
- item: any;
37
- constructor($dialog: DialogService, $clipper: ClipperService, $screen: ScreenService, media: MediaObserver, dialogRef: MatDialogRef<ClipperReferencesComponent>, _data: any);
17
+ protected dialogData: ClipperReferencesDialogData;
18
+ protected title: string | null;
19
+ protected item: ClipperDocumentInfo | null;
38
20
  ngOnInit(): void;
39
21
  ngOnDestroy(): void;
40
- onContextMenu(event: MouseEvent, item: any): void;
22
+ ngAfterViewInit(): void;
23
+ /**
24
+ * Resize
25
+ */
26
+ private resize;
27
+ /**
28
+ * Show hide filter pane manually
29
+ */
30
+ protected toggleFilterPane(): void;
31
+ /**
32
+ * Handle filter pane visibility
33
+ */
34
+ private handleFilterPaneVisibility;
41
35
  /**
42
36
  * Close dialog
43
37
  */
@@ -49,42 +43,11 @@ export declare class ClipperReferencesComponent extends ClipperDocumentBaseCompo
49
43
  /**
50
44
  * Reset scroll position
51
45
  */
52
- resetScrollPosition(): void;
46
+ private resetScrollPosition;
53
47
  /**
54
48
  * Restore scroll position
55
49
  */
56
- restoreScrollPosition(): void;
57
- /**
58
- * Update menu buttons visibility when the menu is closed
59
- */
60
- updateMenuButtonsVisibility(): void;
61
- /**
62
- * Adjust view
63
- */
64
- adjustView(): void;
65
- /**
66
- * Update view
67
- */
68
- updateView(): void;
69
- /**
70
- * Update sidenav visibility
71
- * @param mq : the current media query
72
- */
73
- updateFacetsVisibility(): void;
74
- /**
75
- * Open facetsSidenav sidebar
76
- */
77
- facetsOpen(): void;
78
- /**
79
- * Close facets sidebar
80
- * @param closedManually : ture if facets has been closed manually by clicking the button
81
- */
82
- facetsClose(closedManually?: boolean): void;
83
- /**
84
- * Export a document in pdf format
85
- * @param item : the document to export
86
- */
87
- exportPdf(item: any): void;
50
+ private restoreScrollPosition;
88
51
  /**
89
52
  * Send document links by email
90
53
  * @param item : the item to add
@@ -102,14 +65,17 @@ export declare class ClipperReferencesComponent extends ClipperDocumentBaseCompo
102
65
  fetchMore(e: any): void;
103
66
  /**
104
67
  * Get facets
105
- * @param searchParams : the current search params to use to gather facets or null to use current snapshot
106
68
  */
107
- displayFacets(searchParams?: any): void;
69
+ fetchFacets(): void;
70
+ /**
71
+ * Try to restore stored facets
72
+ */
73
+ restoreFacets(): void;
108
74
  /**
109
75
  * Close current dialog and return the id to navigate to
110
- * @param id : the document id
76
+ * @param documentId : the document id
111
77
  */
112
- open(id: string): void;
78
+ open(documentId: string): void;
113
79
  static ɵfac: i0.ɵɵFactoryDeclaration<ClipperReferencesComponent, never>;
114
80
  static ɵcmp: i0.ɵɵComponentDeclaration<ClipperReferencesComponent, "ng-component", never, {}, {}, never, never, true, never>;
115
81
  }
@@ -0,0 +1,40 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import { DateInterval } from '@arsedizioni/ars-utils/core';
3
+ import { MatCalendar, MatCalendarCellClassFunction } from '@angular/material/datepicker';
4
+ import { CalendarEmptyHeader } from '@arsedizioni/ars-utils/ui.application';
5
+ import { ClipperSearchCalendarSnapshotMonth, ClipperSearchCalendarSnapshotResult } from '@arsedizioni/ars-utils/clipper.common';
6
+ import * as i0 from "@angular/core";
7
+ export declare class ClipperSearchCalendarComponent {
8
+ calendar: MatCalendar<any>;
9
+ changed: EventEmitter<DateInterval>;
10
+ protected busy: import("@angular/core").WritableSignal<boolean>;
11
+ protected months?: ClipperSearchCalendarSnapshotMonth[] | null;
12
+ protected calendarSpecialDays?: number[] | null;
13
+ protected calendarEmptyHeader: typeof CalendarEmptyHeader;
14
+ protected calendarDate: Date;
15
+ protected calendarDateClass: MatCalendarCellClassFunction<Date>;
16
+ protected calendarDateFilter: () => boolean;
17
+ /**
18
+ * Update calendar
19
+ * @param value : the snapshot
20
+ * @param view : view to update 'month' or ' months'. Default is 'months'
21
+ * @param date : the new current date
22
+ */
23
+ update(value: ClipperSearchCalendarSnapshotResult | null, view: 'month' | 'months', date: Date): void;
24
+ /**
25
+ * Filter by date
26
+ * @param date : the date to filter to or "month" to filter by the whole month.
27
+ */
28
+ protected filterByDate(date: Date | string | null): void;
29
+ /**
30
+ * Filter by month
31
+ * @param monthInfo: the month info
32
+ */
33
+ protected filterByMonth(monthInfo: ClipperSearchCalendarSnapshotMonth): void;
34
+ /**
35
+ * Disable date selection from calendar
36
+ */
37
+ protected filterCalendarDates: () => boolean;
38
+ static ɵfac: i0.ɵɵFactoryDeclaration<ClipperSearchCalendarComponent, never>;
39
+ static ɵcmp: i0.ɵɵComponentDeclaration<ClipperSearchCalendarComponent, "clipper-search-calendar", never, {}, { "changed": "changed"; }, never, never, true, never>;
40
+ }
@@ -1,64 +1,61 @@
1
- import { EventEmitter, OnInit } from '@angular/core';
2
- import { MatDialog } from '@angular/material/dialog';
3
- import { DateInterval } from '@arsedizioni/ars-utils/core';
4
- import { ClipperService, ClipperSearchParams } from '@arsedizioni/ars-utils/clipper.common';
5
- import { ApplicationDialogService } from '@arsedizioni/ars-utils/ui.application';
1
+ import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
2
+ import { ClipperModule, ClipperSearchParams, SectorInfo } from '@arsedizioni/ars-utils/clipper.common';
3
+ import { DateInterval, NameValueItem } from '@arsedizioni/ars-utils/core';
6
4
  import * as i0 from "@angular/core";
7
- export declare class ClipperSearchDialogComponent implements OnInit {
8
- private $dialog;
9
- private $clipper;
10
- dialog: MatDialog;
5
+ export interface ClipperSearchDialogData extends ClipperSearchParams {
6
+ displayMode?: 'laws' | 'news' | 'module' | 'simple';
7
+ }
8
+ export declare class ClipperSearchDialogComponent implements OnInit, OnDestroy {
11
9
  okButton: HTMLButtonElement;
12
10
  done: EventEmitter<ClipperSearchParams>;
13
- params: ClipperSearchParams;
11
+ private unsubscribe;
12
+ private clipperService;
13
+ private dialogService;
14
+ protected dialogData: ClipperSearchDialogData;
15
+ protected params: ClipperSearchParams;
16
+ protected readonly modulesEnum: typeof ClipperModule;
17
+ protected sectors: SectorInfo[];
18
+ protected isLaws: () => boolean;
19
+ protected isNews: () => boolean;
20
+ protected isModule: (module: ClipperModule) => boolean;
21
+ protected hasRegions: () => boolean;
22
+ protected hasAuthorOrType: () => boolean;
23
+ protected regions: NameValueItem<string>[];
24
+ protected channels: NameValueItem<string>[];
25
+ protected sources: NameValueItem<string>[] | null;
26
+ protected authors: NameValueItem<string>[] | null;
27
+ protected types: NameValueItem<string>[] | null;
28
+ protected topics: NameValueItem<string>[] | null;
14
29
  interval: DateInterval;
15
- models: any;
16
- sectors: any;
17
- sources: any;
18
30
  sourceInterval: DateInterval;
19
- topics: any;
20
- types: any;
21
- authors: any;
22
- enableAuthor: boolean;
23
- enableTopic: boolean;
24
- enableTaxonomy: boolean;
25
- enableType: boolean;
26
- enableText: boolean;
27
- enableModel: boolean;
28
- enableSector: boolean;
29
- enableSource: boolean;
30
- enableDocument: boolean;
31
- enableDeadline: boolean;
32
- enablePublication: boolean;
33
- enableChanges: boolean;
34
- enableRead: boolean;
35
- enableComments: boolean;
36
- constructor($dialog: ApplicationDialogService, $clipper: ClipperService, dialog: MatDialog, _data: any);
37
31
  ngOnInit(): void;
32
+ ngOnDestroy(): void;
38
33
  /**
39
- * Update authors when selected sectors changed
34
+ * Updates other lists when sectors changes
40
35
  */
41
- sectorChanged(): void;
36
+ sectorsChanged(): void;
42
37
  /**
43
38
  * Clear search
44
39
  */
45
- clear(): void;
40
+ protected clear(): void;
46
41
  /**
47
42
  * Show free text help
48
43
  */
49
- help(): void;
44
+ protected help(): void;
50
45
  /**
51
46
  * Compose a free text search query
52
47
  */
53
- compose(): void;
48
+ protected compose(): void;
54
49
  /**
55
50
  * Submit search
56
51
  */
57
- ok(): void;
52
+ protected ok(): void;
58
53
  /**
59
- * Select a taxonomy topic
60
- */
61
- selectTaxonomy(): void;
54
+ * Check if a block of expandable options has a filter on
55
+ * @param block : the block id
56
+ * @returns true if at least a value is set
57
+ */
58
+ hasFilter(block: 'source' | 'other' | 'modifier'): boolean;
62
59
  static ɵfac: i0.ɵɵFactoryDeclaration<ClipperSearchDialogComponent, never>;
63
60
  static ɵcmp: i0.ɵɵComponentDeclaration<ClipperSearchDialogComponent, "ng-component", never, {}, { "done": "done"; }, never, never, true, never>;
64
61
  }
@@ -1,84 +1,28 @@
1
1
  import { EventEmitter } from '@angular/core';
2
+ import { ClipperSearchFacet, ClipperSearchFacetGroup, ClipperSearchFacetsSnapshot } from '@arsedizioni/ars-utils/clipper.common';
2
3
  import * as i0 from "@angular/core";
3
- export interface ClipperFacet {
4
- type: number;
5
- typeName: string;
6
- title: string;
7
- value: string;
8
- count: number;
9
- }
10
- interface ClipperFacetGroup {
11
- name: string;
12
- selectedValue: string;
13
- selectedValueDescription: string;
14
- values: ClipperFacet[];
15
- index: number;
16
- }
17
- export declare class ClipperSearchFacetsSnapshot {
18
- groups: ClipperFacetGroup[];
19
- usedGroups: ClipperFacetGroup[];
20
- hasFacets: boolean;
21
- sector?: string;
22
- author?: string;
23
- anchor?: string;
24
- type?: string;
25
- reason?: string;
26
- fromDate?: Date;
27
- toDate?: Date;
28
- interval?: string;
29
- }
30
4
  export declare class ClipperSearchFacetsComponent {
31
- busy: boolean;
32
- changed: EventEmitter<void>;
33
- groups: ClipperFacetGroup[];
34
- usedGroups: ClipperFacetGroup[];
35
- hasFacets: boolean;
36
- hasTooManyResults: boolean;
37
- sector: string;
38
- author: string;
39
- anchor: string;
40
- type: string;
41
- reason: string;
42
- fromDate: Date;
43
- toDate: Date;
44
- interval: string;
45
- changedInterval: boolean;
46
- changedSector: boolean;
47
- changedAuthor: boolean;
48
- changedAnchor: boolean;
49
- changedType: boolean;
50
- changedReason: boolean;
51
- constructor();
52
- /**
53
- * Update facets
54
- * @param values : the facets values
55
- * @param interval : the date interval for YEAR facets
56
- */
57
- update(values?: ClipperFacet[][], interval?: string): void;
5
+ changed: EventEmitter<ClipperSearchFacetsSnapshot>;
6
+ busy: import("@angular/core").WritableSignal<boolean>;
7
+ protected snapshot: ClipperSearchFacetsSnapshot;
58
8
  /**
59
- * Save snapshot
60
- */
61
- saveSnapshot(): ClipperSearchFacetsSnapshot;
62
- /**
63
- * Restore from snapshot
64
- */
65
- restoreFromSnapshot(snapshot: ClipperSearchFacetsSnapshot): void;
66
- /**
67
- * Reset current object using a previous one
68
- */
69
- restoreFrom(old: ClipperSearchFacetsComponent): void;
9
+ * Update facets
10
+ * @param values : the facets values
11
+ * @param interval : the date interval for YEAR facets
12
+ */
13
+ update(values?: ClipperSearchFacet[][] | null, interval?: string | null): void;
70
14
  /**
71
15
  * Use a facet item as filter
72
16
  * @param group : the facet group
73
17
  * @param item : the facet item
74
18
  */
75
- use(group: ClipperFacetGroup, item: ClipperFacet): void;
19
+ protected use(group: ClipperSearchFacetGroup, item: ClipperSearchFacet): void;
76
20
  /**
77
21
  * dismiss a facet group filter
78
22
  * @param group : the facet group
79
23
  * @param apply : true to emit changed event and generate a new search, false just for update
80
24
  */
81
- dismiss(group: ClipperFacetGroup, apply?: boolean): void;
25
+ protected dismiss(group: ClipperSearchFacetGroup, apply?: boolean): void;
82
26
  /**
83
27
  * Apply filter
84
28
  */
@@ -88,12 +32,20 @@ export declare class ClipperSearchFacetsComponent {
88
32
  * @param index : the group index to clear. Use -1 to clear all groups at once
89
33
  * @returns : the number of groups dismissed
90
34
  */
91
- clear(index?: number): number;
35
+ protected clear(index?: number): number;
92
36
  /**
93
37
  * Reset
94
38
  */
95
39
  reset(): void;
40
+ /**
41
+ * Restore data
42
+ * @param data : the data to restore
43
+ */
44
+ restore(data: ClipperSearchFacetsSnapshot): void;
45
+ /**
46
+ * Save data
47
+ */
48
+ save(): ClipperSearchFacetsSnapshot;
96
49
  static ɵfac: i0.ɵɵFactoryDeclaration<ClipperSearchFacetsComponent, never>;
97
- static ɵcmp: i0.ɵɵComponentDeclaration<ClipperSearchFacetsComponent, "clipper-search-facets", never, { "busy": { "alias": "busy"; "required": false; }; }, { "changed": "changed"; }, never, never, true, never>;
50
+ static ɵcmp: i0.ɵɵComponentDeclaration<ClipperSearchFacetsComponent, "clipper-search-facets", never, {}, { "changed": "changed"; }, never, never, true, never>;
98
51
  }
99
- export {};
@@ -1,6 +1,5 @@
1
1
  import * as i0 from "@angular/core";
2
2
  export declare class ClipperSearchFreeTextHelpComponent {
3
- constructor();
4
3
  static ɵfac: i0.ɵɵFactoryDeclaration<ClipperSearchFreeTextHelpComponent, never>;
5
4
  static ɵcmp: i0.ɵɵComponentDeclaration<ClipperSearchFreeTextHelpComponent, "ng-component", never, {}, {}, never, never, true, never>;
6
5
  }
@@ -1,28 +1,24 @@
1
1
  import { EventEmitter } from '@angular/core';
2
- import { MatDialog } from '@angular/material/dialog';
3
- import { DialogService } from '@arsedizioni/ars-utils/ui';
4
2
  import * as i0 from "@angular/core";
5
3
  export interface SearchFreeTextQueryParams {
6
4
  query: string;
7
5
  }
8
6
  export declare class ClipperSearchFreeTextQueryBuilderComponent {
9
- private $dialog;
10
- dialog: MatDialog;
11
7
  done: EventEmitter<SearchFreeTextQueryParams>;
12
- queryAnd: string;
13
- queryOr: string;
14
- queryNot: string;
15
- queryPhrase: string;
16
- queryStart: string;
17
- constructor($dialog: DialogService, dialog: MatDialog);
8
+ private dialogService;
9
+ protected queryAnd: string;
10
+ protected queryOr: string;
11
+ protected queryNot: string;
12
+ protected queryPhrase: string;
13
+ protected queryStart: string;
18
14
  /**
19
15
  * Clear
20
16
  */
21
- clear(): void;
17
+ protected clear(): void;
22
18
  /**
23
19
  * Submit
24
20
  */
25
- ok(): void;
21
+ protected ok(): void;
26
22
  static ɵfac: i0.ɵɵFactoryDeclaration<ClipperSearchFreeTextQueryBuilderComponent, never>;
27
23
  static ɵcmp: i0.ɵɵComponentDeclaration<ClipperSearchFreeTextQueryBuilderComponent, "ng-component", never, {}, { "done": "done"; }, never, never, true, never>;
28
24
  }
@@ -1,12 +1,14 @@
1
+ import { ClipperDocumentInfo } from '@arsedizioni/ars-utils/clipper.common';
2
+ import { ClipperSearchResultManager } from '../search-result-manager/search-result-manager';
1
3
  import * as i0 from "@angular/core";
2
4
  export declare class ClipperSearchResultItemComponent {
3
- parent: any;
4
- item: any;
5
+ parent: import("@angular/core").InputSignal<ClipperSearchResultManager>;
6
+ item: import("@angular/core").InputSignal<ClipperDocumentInfo>;
5
7
  /**
6
8
  * Open an item
7
9
  * @param documentId : the document id
8
10
  */
9
- open(documentId: string): void;
11
+ protected open(documentId: string): void;
10
12
  static ɵfac: i0.ɵɵFactoryDeclaration<ClipperSearchResultItemComponent, never>;
11
- static ɵcmp: i0.ɵɵComponentDeclaration<ClipperSearchResultItemComponent, "clipper-search-result-item", never, { "parent": { "alias": "parent"; "required": false; }; "item": { "alias": "item"; "required": false; }; }, {}, never, never, true, never>;
13
+ static ɵcmp: i0.ɵɵComponentDeclaration<ClipperSearchResultItemComponent, "clipper-search-result-item", never, { "parent": { "alias": "parent"; "required": false; "isSignal": true; }; "item": { "alias": "item"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
12
14
  }