@arsedizioni/ars-utils 19.0.72 → 19.0.74

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,7 +6,6 @@ import * as i0 from "@angular/core";
6
6
  export declare class ClipperDocumentManager {
7
7
  protected clipboard: Clipboard;
8
8
  clipperService: ClipperService;
9
- private clipperReferencesService;
10
9
  protected broadcastService: BroadcastService;
11
10
  protected dialogService: ApplicationDialogService;
12
11
  /**
@@ -1,7 +1,5 @@
1
1
  import { ClipperQueryReferencesMode } from '@arsedizioni/ars-utils/clipper.common';
2
2
  export declare class ClipperReferencesService {
3
- private dialogService;
4
- private broacastService;
5
3
  /**
6
4
  * Browse document references
7
5
  * @param document id : the document id
@@ -1532,45 +1532,10 @@ 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
- constructor() {
1537
- this.dialogService = inject(DialogService);
1538
- this.broacastService = inject(BroadcastService);
1539
- }
1540
- /**
1541
- * Browse document references
1542
- * @param document id : the document id
1543
- * @param mode : the reference mode
1544
- */
1545
- openReferences(documentId, mode = ClipperQueryReferencesMode.ReferencesIn) {
1546
- if (!documentId)
1547
- return;
1548
- const d = this.dialogService.open(ClipperReferencesComponent, {
1549
- ariaLabel: 'riferimenti legati al documento',
1550
- autoFocus: false,
1551
- restoreFocus: false,
1552
- disableClose: false,
1553
- closeOnNavigation: false,
1554
- data: { documentId: documentId, mode: mode },
1555
- minWidth: '375px',
1556
- maxWidth: '1200px',
1557
- width: '100%',
1558
- height: '100%',
1559
- });
1560
- d.afterClosed()
1561
- .subscribe((r) => {
1562
- if (r && r.documentId) {
1563
- this.broacastService.sendMessage(ClipperMessages.DOCUMENT_NAVIGATE, { data: r.documentId });
1564
- }
1565
- });
1566
- }
1567
- }
1568
-
1569
1535
  class ClipperDocumentManager {
1570
1536
  constructor() {
1571
1537
  this.clipboard = inject(Clipboard);
1572
1538
  this.clipperService = inject(ClipperService);
1573
- this.clipperReferencesService = inject(ClipperReferencesService);
1574
1539
  this.broadcastService = inject(BroadcastService);
1575
1540
  this.dialogService = inject(ApplicationDialogService);
1576
1541
  }
@@ -1818,7 +1783,23 @@ class ClipperDocumentManager {
1818
1783
  openReferences(documentId, mode = ClipperQueryReferencesMode.ReferencesIn) {
1819
1784
  if (!documentId)
1820
1785
  return;
1821
- this.clipperReferencesService.openReferences(documentId, mode);
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
+ });
1822
1803
  }
1823
1804
  /**
1824
1805
  * Manage clipper bag
@@ -1981,14 +1962,13 @@ class ClipperDocumentManager {
1981
1962
  this.broadcastService.sendMessage(ClipperMessages.INTEROP_RS_USAGE_REPORT, document);
1982
1963
  }
1983
1964
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: ClipperDocumentManager, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1984
- 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 }); }
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 }); }
1985
1966
  }
1986
1967
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: ClipperDocumentManager, decorators: [{
1987
1968
  type: Component,
1988
1969
  args: [{
1989
1970
  template: '<div></div>',
1990
1971
  standalone: true,
1991
- providers: [ClipperReferencesService],
1992
1972
  changeDetection: ChangeDetectionStrategy.OnPush
1993
1973
  }]
1994
1974
  }] });