@arsedizioni/ars-utils 19.0.71 → 19.0.73

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.
@@ -6,6 +6,7 @@ import * as i0 from "@angular/core";
6
6
  export declare class ClipperDocumentManager {
7
7
  protected clipboard: Clipboard;
8
8
  clipperService: ClipperService;
9
+ private clipperReferencesService;
9
10
  protected broadcastService: BroadcastService;
10
11
  protected dialogService: ApplicationDialogService;
11
12
  /**
@@ -0,0 +1,9 @@
1
+ import { ClipperQueryReferencesMode } from '@arsedizioni/ars-utils/clipper.common';
2
+ export declare class ClipperReferencesService {
3
+ /**
4
+ * Browse document references
5
+ * @param document id : the document id
6
+ * @param mode : the reference mode
7
+ */
8
+ openReferences(documentId: string, mode?: ClipperQueryReferencesMode): void;
9
+ }
@@ -1532,10 +1532,44 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImpor
1532
1532
  ], template: "<h2 mat-dialog-title>Indice</h2>\r\n<mat-dialog-content>\r\n @if (!items || items.length === 0) {\r\n <div>\r\n <p class=\"message\"><i>Nessun elemento da visualizzare.</i></p>\r\n </div>\r\n } @else {\r\n <mat-selection-list dense #selection (selectionChange)=\"select();\" [multiple]=\"dialogData.multiple\"\r\n hideSingleSelectionIndicator=\"true\">\r\n @for (item of items; track item) {\r\n @if (item.type > 4) {\r\n <div class=\"small uppercase truncated accent\" style=\"display: flex; align-items: center; min-height: 36px;\">\r\n <div><b>{{item.description}}</b></div>\r\n </div>\r\n } @else {\r\n <mat-list-option [selected]=\"false\" [value]=\"item\" (click)=\"use(item)\">\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxFill>\r\n <div [fxFlex]=\"(10 * item.level) + 'px'\"></div>\r\n <div fxFlex=\"*\" class=\"truncated\">\r\n <div class=\"small\" [matTooltip]=\"item.description\">{{item.description}}</div>\r\n </div>\r\n </div>\r\n </mat-list-option>\r\n }\r\n }\r\n </mat-selection-list>\r\n }\r\n</mat-dialog-content>\r\n<mat-dialog-actions>\r\n <div fxLayout=\"row\" fxLayoutAlign=\"end\" fxFill>\r\n @if (dialogData.multiple) {\r\n <button mat-flat-button color=\"primary\" [disabled]=\"okDisabled()\" (click)=\"use()\">Usa</button>\r\n }\r\n <button mat-stroked-button [mat-dialog-close]=\"true\" color=\"primary\">Chiudi</button>\r\n </div>\r\n</mat-dialog-actions>" }]
1533
1533
  }] });
1534
1534
 
1535
+ class ClipperReferencesService {
1536
+ //private dialogService = inject(DialogService);
1537
+ // private broacastService = inject(BroadcastService);
1538
+ /**
1539
+ * Browse document references
1540
+ * @param document id : the document id
1541
+ * @param mode : the reference mode
1542
+ */
1543
+ openReferences(documentId, mode = ClipperQueryReferencesMode.ReferencesIn) {
1544
+ if (!documentId)
1545
+ return;
1546
+ console.log(mode);
1547
+ /* const d = this.dialogService.open(ClipperReferencesComponent, {
1548
+ ariaLabel: 'riferimenti legati al documento',
1549
+ autoFocus: false,
1550
+ restoreFocus: false,
1551
+ disableClose: false,
1552
+ closeOnNavigation: false,
1553
+ data: { documentId: documentId, mode: mode },
1554
+ minWidth: '375px',
1555
+ maxWidth: '1200px',
1556
+ width: '100%',
1557
+ height: '100%',
1558
+ });
1559
+ d.afterClosed()
1560
+ .subscribe((r: ClipperReferenceDialogResult) => {
1561
+ if (r && r.documentId) {
1562
+ this.broacastService.sendMessage(ClipperMessages.DOCUMENT_NAVIGATE, {data: r.documentId}) ;
1563
+ }
1564
+ });*/
1565
+ }
1566
+ }
1567
+
1535
1568
  class ClipperDocumentManager {
1536
1569
  constructor() {
1537
1570
  this.clipboard = inject(Clipboard);
1538
1571
  this.clipperService = inject(ClipperService);
1572
+ this.clipperReferencesService = inject(ClipperReferencesService);
1539
1573
  this.broadcastService = inject(BroadcastService);
1540
1574
  this.dialogService = inject(ApplicationDialogService);
1541
1575
  }
@@ -1783,23 +1817,7 @@ class ClipperDocumentManager {
1783
1817
  openReferences(documentId, mode = ClipperQueryReferencesMode.ReferencesIn) {
1784
1818
  if (!documentId)
1785
1819
  return;
1786
- const d = this.dialogService.open(ClipperReferencesComponent, {
1787
- ariaLabel: 'riferimenti legati al documento',
1788
- autoFocus: false,
1789
- restoreFocus: false,
1790
- disableClose: false,
1791
- closeOnNavigation: false,
1792
- data: { documentId: documentId, mode: mode },
1793
- minWidth: '375px',
1794
- maxWidth: '1200px',
1795
- width: '100%',
1796
- height: '100%',
1797
- });
1798
- d.afterClosed()
1799
- .subscribe((r) => {
1800
- if (r && r.documentId)
1801
- this.open(r.documentId);
1802
- });
1820
+ this.clipperReferencesService.openReferences(documentId, mode);
1803
1821
  }
1804
1822
  /**
1805
1823
  * Manage clipper bag
@@ -1962,13 +1980,14 @@ class ClipperDocumentManager {
1962
1980
  this.broadcastService.sendMessage(ClipperMessages.INTEROP_RS_USAGE_REPORT, document);
1963
1981
  }
1964
1982
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: ClipperDocumentManager, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1965
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.0", type: ClipperDocumentManager, isStandalone: true, selector: "ng-component", ngImport: i0, template: '<div></div>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1983
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.0", type: ClipperDocumentManager, isStandalone: true, selector: "ng-component", providers: [ClipperReferencesService], ngImport: i0, template: '<div></div>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1966
1984
  }
1967
1985
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: ClipperDocumentManager, decorators: [{
1968
1986
  type: Component,
1969
1987
  args: [{
1970
1988
  template: '<div></div>',
1971
1989
  standalone: true,
1990
+ providers: [ClipperReferencesService],
1972
1991
  changeDetection: ChangeDetectionStrategy.OnPush
1973
1992
  }]
1974
1993
  }] });