@arsedizioni/ars-utils 21.2.209 → 21.2.221
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.
- package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs +179 -159
- package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs +2939 -2939
- package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-core.mjs +101 -101
- package/fesm2022/arsedizioni-ars-utils-core.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs +280 -252
- package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-help.mjs +115 -102
- package/fesm2022/arsedizioni-ars-utils-help.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-support.common.mjs +43 -36
- package/fesm2022/arsedizioni-ars-utils-support.common.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-support.ui.mjs +68 -77
- package/fesm2022/arsedizioni-ars-utils-support.ui.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-tinymce.mjs +41 -26
- package/fesm2022/arsedizioni-ars-utils-tinymce.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.application.mjs +1461 -1390
- package/fesm2022/arsedizioni-ars-utils-ui.application.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.mjs +1349 -1204
- package/fesm2022/arsedizioni-ars-utils-ui.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.oauth.mjs +29 -25
- package/fesm2022/arsedizioni-ars-utils-ui.oauth.mjs.map +1 -1
- package/package.json +1 -1
- package/types/arsedizioni-ars-utils-clipper.common.d.ts +88 -62
- package/types/arsedizioni-ars-utils-clipper.ui.d.ts +196 -196
- package/types/arsedizioni-ars-utils-core.d.ts +16 -16
- package/types/arsedizioni-ars-utils-evolution.common.d.ts +131 -70
- package/types/arsedizioni-ars-utils-help.d.ts +76 -66
- package/types/arsedizioni-ars-utils-support.common.d.ts +29 -19
- package/types/arsedizioni-ars-utils-support.ui.d.ts +29 -25
- package/types/arsedizioni-ars-utils-tinymce.d.ts +25 -10
- package/types/arsedizioni-ars-utils-ui.application.d.ts +597 -467
- package/types/arsedizioni-ars-utils-ui.d.ts +474 -337
- package/types/arsedizioni-ars-utils-ui.oauth.d.ts +25 -18
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arsedizioni-ars-utils-help.mjs","sources":["../../../projects/ars-utils/help/components/help-viewer/help-viewer.component.ts","../../../projects/ars-utils/help/components/help-viewer/help-viewer.component.html","../../../projects/ars-utils/help/services/help.service.ts","../../../projects/ars-utils/help/help.module.ts","../../../projects/ars-utils/help/public_api.ts","../../../projects/ars-utils/help/arsedizioni-ars-utils-help.ts"],"sourcesContent":["import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';\r\nimport { FlatTreeControl } from '@angular/cdk/tree';\r\nimport { AfterViewInit, ChangeDetectionStrategy, ChangeDetectorRef, Component, Injectable, OnDestroy, OnInit, Signal, ViewEncapsulation, computed, inject, signal, viewChild } from '@angular/core';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MAT_DIALOG_DATA, MatDialogContent, MatDialogRef, MatDialogTitle } from '@angular/material/dialog';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\r\nimport { MatSidenav, MatSidenavModule } from '@angular/material/sidenav';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\nimport { MatTreeFlatDataSource, MatTreeFlattener, MatTreeModule } from '@angular/material/tree';\r\nimport { SafeHtmlPipe, SystemUtils } from '@arsedizioni/ars-utils/core';\r\nimport { DialogService } from '@arsedizioni/ars-utils/ui';\r\nimport { FlexLayoutModule } from '@ngbracket/ngx-layout';\r\nimport { BehaviorSubject, Observable, Subject, of as observableOf } from 'rxjs';\r\nimport { takeUntil } from 'rxjs/operators';\r\nimport { HelpService } from '../../services/help.service';\r\n\r\nexport interface HelpViewerDialogData {\r\n id?: string;\r\n}\r\n\r\nexport class IndexInfo {\r\n id: string;\r\n parent?: IndexInfo;\r\n name: string;\r\n itemsCount?: number;\r\n children?: IndexInfo[];\r\n}\r\n\r\nexport class IndexNode extends IndexInfo {\r\n expandable: boolean;\r\n level: number;\r\n\r\n constructor(item: IndexInfo, level: number) {\r\n super();\r\n\r\n // Flattened implementation\r\n this.expandable = item.children && item.children.length > 0;\r\n this.level = level;\r\n\r\n // Data\r\n this.id = item.id;\r\n this.name = item.name;\r\n this.itemsCount = item.itemsCount;\r\n this.parent = item.parent;\r\n }\r\n}\r\n\r\n@Injectable()\r\nexport class IndexTreeDataSource implements OnDestroy {\r\n dataChange = new BehaviorSubject<IndexInfo[]>([]);\r\n\r\n get data(): IndexInfo[] {\r\n return this.dataChange.value;\r\n }\r\n\r\n ngOnDestroy() {\r\n this.dataChange.unsubscribe();\r\n }\r\n\r\n /**\r\n * Initialzie the data source\r\n * @param data : data\r\n */\r\n initialize(data: IndexInfo[]) {\r\n this.dataChange.next(data);\r\n }\r\n\r\n /**\r\n * Find a node by id recursively\r\n * @param node: the source node\r\n * @param id : the id to search for\r\n */\r\n findNode(node: IndexInfo, id: string): IndexInfo {\r\n let children;\r\n if (node && node.id === id) return node;\r\n if (node) children = node.children;\r\n else children = this.data;\r\n if (children) {\r\n let _n = undefined;\r\n children.some(n => {\r\n n.parent = node;\r\n _n = this.findNode(n, id);\r\n if (_n) return true;\r\n return false;\r\n });\r\n return _n;\r\n }\r\n return null;\r\n }\r\n\r\n /**\r\n * Remove a node\r\n * @param id : the node id to remove\r\n */\r\n removeNode(id: string) {\r\n let n = this.findNode(null, id);\r\n if (!n) return;\r\n if (n.parent) {\r\n const p = n.parent.children.findIndex(n => n.id === id);\r\n if (p !== -1) {\r\n n.parent.children.splice(p, 1);\r\n n.parent.itemsCount--;\r\n }\r\n } else {\r\n const p = this.data.findIndex(n => n.id === id);\r\n if (p !== -1) {\r\n this.data.splice(p, 1);\r\n }\r\n }\r\n\r\n this.dataChange.next(this.data);\r\n }\r\n\r\n /**\r\n * Insert a new node\r\n * @param node : the new node\r\n */\r\n insertNode(node: IndexInfo) {\r\n if (node.parent) {\r\n node.parent.children.unshift(node);\r\n node.parent.itemsCount++;\r\n } else this.data.unshift(node);\r\n\r\n this.dataChange.next(this.data);\r\n }\r\n\r\n /**\r\n * Rename a node\r\n * @param id : the node id\r\n * @param name : the new node name\r\n */\r\n renameNode(id: string, name: string) {\r\n let n = this.findNode(null, id);\r\n if (n) {\r\n n.name = name;\r\n this.dataChange.next(this.data);\r\n }\r\n }\r\n\r\n /**\r\n * Update data\r\n */\r\n update() {\r\n this.dataChange.next(this.data);\r\n }\r\n}\r\n\r\n@Component({\r\n host: { 'Bind': SystemUtils.generateUUID() },\r\n templateUrl: './help-viewer.component.html',\r\n styleUrls: ['./help-viewer.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [IndexTreeDataSource],\r\n standalone: true,\r\n imports: [FlexLayoutModule, MatButtonModule, MatTooltipModule, MatIconModule, MatProgressBarModule, MatDialogTitle, MatDialogContent,\r\n MatSidenavModule, MatTreeModule, SafeHtmlPipe]\r\n})\r\nexport class HelpViewerComponent implements OnInit, OnDestroy, AfterViewInit {\r\n readonly indexPane = viewChild.required<MatSidenav>('indexPane');\r\n\r\n private unsubscribe: Subject<void> = new Subject<void>();\r\n private changeDetector = inject(ChangeDetectorRef);\r\n private dialogRef = inject(MatDialogRef<HelpViewerComponent>);\r\n protected dialogData: HelpViewerDialogData = inject(MAT_DIALOG_DATA) ?? { id: \"1\" };\r\n private dialogService = inject(DialogService);\r\n private helpService = inject(HelpService);\r\n protected breakpointObserver = inject(BreakpointObserver);\r\n protected busy = signal<boolean>(false);\r\n protected page = signal<string>(null);\r\n private indexId: string = undefined;\r\n private indexPaneClosed: boolean = false;\r\n protected indexNode: IndexInfo = undefined;\r\n private history = signal([]);\r\n protected canGoBack: Signal<boolean> = computed(() => {\r\n return this.history()?.length > 1;\r\n })\r\n\r\n /**\r\n * Manage flat tree view\r\n */\r\n private tree = inject(IndexTreeDataSource);\r\n private treeFlattener: MatTreeFlattener<IndexInfo, IndexNode>;\r\n protected treeControl: FlatTreeControl<IndexNode>;\r\n protected treeData: MatTreeFlatDataSource<IndexInfo, IndexNode>;\r\n private folders?: IndexInfo[];\r\n private getChildren = (node: IndexInfo): Observable<IndexInfo[]> =>\r\n observableOf(node.children);\r\n private getLevel = (node: IndexNode) => node.level;\r\n private isExpandable = (node: IndexNode) => node.expandable;\r\n protected hasChild = (_: number, _node: IndexNode) => _node.expandable;\r\n protected transformer = (item: IndexInfo, level: number) => {\r\n return new IndexNode(item, level);\r\n };\r\n\r\n ngOnInit(): void {\r\n\r\n // Setup tree structure\r\n this.treeFlattener = new MatTreeFlattener(\r\n this.transformer,\r\n this.getLevel,\r\n this.isExpandable,\r\n this.getChildren\r\n );\r\n this.treeControl = new FlatTreeControl<IndexNode>(\r\n this.getLevel,\r\n this.isExpandable\r\n );\r\n this.treeData = new MatTreeFlatDataSource(\r\n this.treeControl,\r\n this.treeFlattener\r\n );\r\n\r\n // Subscribe data change\r\n this.tree.dataChange\r\n .pipe(takeUntil(this.unsubscribe))\r\n .subscribe(data => (this.treeData.data = data));\r\n\r\n // Observe layout changes\r\n this.breakpointObserver\r\n .observe([\r\n Breakpoints.XSmall,\r\n Breakpoints.Small,\r\n Breakpoints.Medium,\r\n Breakpoints.Large,\r\n Breakpoints.XLarge,\r\n ])\r\n .pipe(takeUntil(this.unsubscribe))\r\n .subscribe(result => {\r\n for (const query of Object.keys(result.breakpoints)) {\r\n if (result.breakpoints[query]) {\r\n this.handleFilterPaneVisibility();\r\n }\r\n }\r\n });\r\n\r\n this.getToc();\r\n\r\n this.indexId = this.dialogData.id;\r\n if (this.indexId) {\r\n this.getChapter(this.indexId);\r\n }\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.unsubscribe.next();\r\n this.unsubscribe.complete();\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n setTimeout(() => {\r\n this.handleFilterPaneVisibility();\r\n this.indexPaneClosed = !this.indexPane().opened;\r\n }, 0);\r\n this.changeDetector.detectChanges();\r\n }\r\n\r\n\r\n /**\r\n* Handle filter pane visibility\r\n*/\r\n private handleFilterPaneVisibility() {\r\n const indexPane = this.indexPane();\r\n if (indexPane) {\r\n if (this.breakpointObserver.isMatched(Breakpoints.XSmall) ||\r\n this.breakpointObserver.isMatched(Breakpoints.Small) ||\r\n this.breakpointObserver.isMatched(Breakpoints.Medium)) {\r\n if (indexPane.opened) {\r\n indexPane.close();\r\n }\r\n } else {\r\n if (!indexPane.opened && !this.indexPaneClosed) {\r\n indexPane.open();\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Show hide index pane manually\r\n */\r\n protected toggleIndexPane() {\r\n this.indexPaneClosed = !this.indexPaneClosed;\r\n this.indexPane()?.toggle();\r\n }\r\n\r\n\r\n /**\r\n * Close dialog\r\n */\r\n protected close(): void {\r\n this.dialogRef.close();\r\n }\r\n\r\n /**\r\n * Get the toc\r\n */\r\n protected getToc(): void {\r\n this.busy.set(true);\r\n this.helpService\r\n .getToc()\r\n .subscribe({\r\n next: r => {\r\n if (!r.success) {\r\n this.dialogService.error(r.message);\r\n } else {\r\n this.folders = r.value.children;\r\n if (this.folders.length > 0) {\r\n this.tree.initialize(this.folders);\r\n this.indexNode = this.folders[0];\r\n this.expandCurrentFolder(); \r\n }\r\n }\r\n },\r\n complete: () => {\r\n this.busy.set(false);\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * React to click event and find new help target to go to\r\n * @param event : the click event\r\n * @returns : always false, to stop navigation\r\n */\r\n protected gotoChapter(e: any): boolean {\r\n if (e.srcElement.nodeName !== 'A') return false;\r\n let tag = e.srcElement.outerHTML;\r\n let id = '';\r\n let p = tag.indexOf('help-target=\"');\r\n if (p !== -1) {\r\n p += 13;\r\n while (tag[p] !== '\"') {\r\n id += tag[p];\r\n p++;\r\n }\r\n }\r\n if (id) this.getChapter(id);\r\n return false;\r\n }\r\n\r\n /**\r\n * Find a node by id\r\n * @param id : folder id\r\n * @returns: the folder info\r\n */\r\n private findFolder(id: string): IndexInfo {\r\n let node = undefined;\r\n if (this.folders) {\r\n this.folders.some(n => {\r\n node = this.tree.findNode(n, id);\r\n if (node) return true;\r\n return false;\r\n });\r\n }\r\n return node;\r\n }\r\n\r\n /**\r\n * Expand current fodler node\r\n */\r\n private expandCurrentFolder(): void {\r\n if (this.indexNode) {\r\n this.treeControl.expand(\r\n this.treeControl.dataNodes.find(n => n.id === this.indexNode.id)\r\n );\r\n if (this.indexNode.parent) {\r\n // Apply previous selection\r\n let n = this.indexNode.parent;\r\n while (n) {\r\n this.treeControl.expand(\r\n this.treeControl.dataNodes.find(x => x.id === n.id)\r\n );\r\n n = n.parent;\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Retrieve a new chapter\r\n * @param id the chapter id#anchor\r\n * @param position : the position to scroll to\r\n */\r\n protected getChapter(id: string, position: number = 0): void {\r\n // Detect anchor if exists\r\n let anchor: string = undefined;\r\n const p = id.indexOf('#');\r\n if (p !== -1) {\r\n anchor = id.substring(p + 1);\r\n id = id.substring(0, p);\r\n }\r\n if (id !== '.') {\r\n this.busy.set(true);\r\n this.helpService.getChapter(id)\r\n .subscribe({\r\n next: r => {\r\n let found = false;\r\n if (!r.success) {\r\n this.dialogService.error(\"Capitolo non trovato.\");\r\n } else {\r\n if (!position)\r\n this.history().push({ id: this.indexId, position: this.getPosition() });\r\n this.indexId = id;\r\n this.page.set(r.value.data);\r\n found = r.value.chapter?.name?.length > 0;\r\n if (found) {\r\n // Update folder\r\n this.indexNode = this.findFolder(id);\r\n this.expandCurrentFolder();\r\n // Handle positioning\r\n this.gotoPosition(anchor, position);\r\n }\r\n }\r\n\r\n if (!found) {\r\n this.getChapter(\"1\");\r\n }\r\n },\r\n complete: () => {\r\n this.busy.set(false);\r\n }\r\n });\r\n } else {\r\n if (!position)\r\n this.history().push({ id: this.indexId, position: this.getPosition() });\r\n // Move on the same chapter\r\n this.gotoPosition(anchor, position);\r\n }\r\n }\r\n\r\n /**\r\n * Goto position\r\n * @param anchor the anchor to go to\r\n * @param position the offset to go to\r\n */\r\n protected gotoPosition(anchor: string, position: number = 0): void {\r\n // Handle positioning\r\n setTimeout(() => {\r\n // Handle anchor first\r\n if (anchor) {\r\n let elms = document.getElementsByName(anchor.toUpperCase());\r\n if (elms) position = elms[0].offsetTop;\r\n }\r\n // Then position\r\n if (position > 0) this.setPosition(position - 1);\r\n else this.setPosition(0);\r\n }, 50);\r\n }\r\n\r\n /**\r\n * Get scroll position\r\n * @returns: the new scroll top\r\n */\r\n protected getPosition(): number {\r\n let elem = document.getElementById('helpviewer-scroller');\r\n if (elem) {\r\n return elem.scrollTop;\r\n }\r\n return 0;\r\n }\r\n\r\n /**\r\n * Set scroll position\r\n * @param position : the position to go to\r\n */\r\n protected setPosition(position: number): void {\r\n let elem = document.getElementById('helpviewer-scroller');\r\n if (elem) {\r\n elem.scrollTo(0, position);\r\n }\r\n }\r\n\r\n /**\r\n * Go back\r\n */\r\n protected back(): void {\r\n if (!this.history || this.history.length === 0) return;\r\n let n = this.history().pop();\r\n this.getChapter(n.id, n.position + 1);\r\n }\r\n\r\n\r\n\r\n\r\n\r\n}\r\n","<div class=\"helpviewer-fixed\">\r\n <div style=\"height:6px\">\r\n @if (busy()) {\r\n <mat-progress-bar z-index=\"11\" mode=\"indeterminate\"></mat-progress-bar>\r\n }\r\n </div>\r\n <div class=\"dialog-header\">\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutGap=\"10px\" fxFill>\r\n <div class=\"dialog-menu\">\r\n <button type=\"button\" mat-icon-button matTooltip=\"Mostra menu\" [attr.aria-label]=\"'Mostra indice'\"\r\n (click)=\"toggleIndexPane()\">\r\n <mat-icon>menu</mat-icon>\r\n </button>\r\n </div>\r\n <div fxFlex=\"*\">\r\n <h2 mat-dialog-title>Guida</h2>\r\n </div>\r\n <div fxFlex=\"100px\" fxLayoutAlign=\"end\" class=\"dialog-close\">\r\n @if (canGoBack()) {\r\n <button fxFlexAlign=\"start\" type=\"button\" mat-icon-button matTooltip=\"Indietro\" (click)=\"back()\">\r\n <mat-icon>arrow_back</mat-icon>\r\n </button>\r\n }\r\n <button fxFlexAlign=\"start\" type=\"button\" mat-icon-button matTooltip=\"Chiudi\" (click)=\"close()\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n</div>\r\n<mat-dialog-content id=\"helpviewer-scrollable\">\r\n <mat-drawer-container class=\"fill\">\r\n <mat-drawer #indexPane mode=\"side\" [autoFocus]=\"false\" class=\"drawer-small drawer-transparent\">\r\n <div fxLayout=\"column\" fxFill>\r\n <div fxFlex=\"*\">\r\n <mat-tree [dataSource]=\"treeData\" [treeControl]=\"treeControl\" class=\"tree \" style=\"max-width:310px\">\r\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodeToggle matTreeNodePadding\r\n [matTreeNodePaddingIndent]=\"20\" class=\"tree-node tree-node-simple tree-node-style\"\r\n (click)=\"getChapter(node.id);\" [class.tree-node-activated]=\"indexNode && indexNode.id === node.id\"\r\n [disabled]=\"busy()\">\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxFill class=\"small uppercase\">\r\n <button type=\"button\" fxFlexAlign=\"center\" mat-icon-button disabled class=\"small-icon-button\"></button>\r\n <div fxFlex=\"*\" fxFlexAlign=\"center\">{{node.name}}</div>\r\n </div>\r\n </mat-tree-node>\r\n <mat-tree-node *matTreeNodeDef=\"let node;when: hasChild\" matTreeNodePadding [matTreeNodePaddingIndent]=\"20\"\r\n class=\"tree-node tree-node-simple tree-node-style\"\r\n [class.tree-node-activated]=\"indexNode && indexNode.id === node.id\" (click)=\"getChapter(node.id)\"\r\n [disabled]=\"busy()\">\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxFill class=\"small uppercase\">\r\n <button type=\"button\" fxFlexAlign=\"center\" mat-icon-button matTreeNodeToggle\r\n [attr.aria-label]=\"'Apri/chiudi ' + node.name\" class=\"small-icon-button\">\r\n <mat-icon class=\"mat-icon-rtl-mirror\">\r\n {{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}\r\n </mat-icon>\r\n </button>\r\n <div fxFlex=\"*\" fxFlexAlign=\"center\">{{node.name}}</div>\r\n </div>\r\n </mat-tree-node>\r\n </mat-tree>\r\n </div>\r\n </div>\r\n </mat-drawer>\r\n <mat-drawer-content id=\"helpviewer-scroller\">\r\n <div style=\"padding: 0 24px;\">\r\n <div fxLayout=\"column\" fxFill>\r\n <div class=\"fill\" (click)=\"gotoChapter($event)\" [innerHtml]=\"(page() ?? '') | safeHtml\"></div>\r\n </div>\r\n </div>\r\n </mat-drawer-content>\r\n </mat-drawer-container>\r\n</mat-dialog-content>","import { Injectable, inject } from '@angular/core';\r\nimport { DialogService } from '@arsedizioni/ars-utils/ui';\r\nimport { ApiResult } from '@arsedizioni/ars-utils/core';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { HelpViewerComponent, IndexInfo } from '../components/help-viewer/help-viewer.component';\r\nimport { Chapter, ChapterBag } from '../definitions';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class HelpService {\r\n \r\n private httpClient = inject(HttpClient); \r\n private dialogService = inject(DialogService);\r\n private serviceUri: string;\r\n\r\n /**\r\n * Initialize help service\r\n * @param serviceUri : the service uri\r\n */\r\n initialize(serviceUri: string) {\r\n this.serviceUri = serviceUri;\r\n }\r\n\r\n /**\r\n * Retrieve an help chapter\r\n * @param id the chapter id\r\n * @param query the search query\r\n */\r\n getChapter(id: string, query: string = null) {\r\n return this.httpClient.get<ApiResult<ChapterBag>>(\r\n this.serviceUri +\r\n '/help/chapter/' +\r\n id +\r\n '/?query=' +\r\n (query == null ? '' : query)\r\n );\r\n }\r\n\r\n /**\r\n * Retrieve an help chapater info\r\n * @param id the chapter id\r\n */\r\n getChapterInfo(id: string) {\r\n return this.httpClient.get<ApiResult<Chapter>>(\r\n this.serviceUri + '/help/chapter/info/' + id\r\n );\r\n }\r\n\r\n /**\r\n * Retrieve a repository item\r\n * @param id the file id\r\n */\r\n getRepo(id: string) {\r\n return this.httpClient.get<ApiResult<any>>(\r\n this.serviceUri + '/help/repo/' + id\r\n );\r\n }\r\n\r\n /**\r\n * Retrieve an help toc\r\n */\r\n getToc() {\r\n return this.httpClient.get<ApiResult<IndexInfo>>(\r\n this.serviceUri + '/help/toc'\r\n );\r\n }\r\n\r\n\r\n /**\r\n * Open help viewer\r\n */\r\n show(id: string = '1') {\r\n this.dialogService.open(HelpViewerComponent, {\r\n ariaLabel: 'guida',\r\n autoFocus: false,\r\n restoreFocus: false,\r\n disableClose: true,\r\n data: {\r\n id: id\r\n },\r\n minWidth: '375px',\r\n maxWidth: '1200px',\r\n width: '100%',\r\n height: '100%'\r\n });\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\n\r\n@NgModule()\r\nexport class ArsHelpModule { }\r\n\r\nexport * from './services/help.service';\r\n","/*\r\n * Public API Surface \r\n */\r\nexport * from './help.module';\r\nexport * from './definitions';\r\nexport * from './components/help-viewer/help-viewer.component';\r\n\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["observableOf"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;MAqBa,SAAS,CAAA;AAMrB;AAEK,MAAO,SAAU,SAAQ,SAAS,CAAA;IAItC,WAAA,CAAY,IAAe,EAAE,KAAa,EAAA;AACxC,QAAA,KAAK,EAAE;;AAGP,QAAA,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC;AAC3D,QAAA,IAAI,CAAC,KAAK,GA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help.mjs","sources":["../../../projects/ars-utils/help/components/help-viewer/help-viewer.component.ts","../../../projects/ars-utils/help/components/help-viewer/help-viewer.component.html","../../../projects/ars-utils/help/services/help.service.ts","../../../projects/ars-utils/help/help.module.ts","../../../projects/ars-utils/help/public_api.ts","../../../projects/ars-utils/help/arsedizioni-ars-utils-help.ts"],"sourcesContent":["import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';\r\nimport { FlatTreeControl } from '@angular/cdk/tree';\r\nimport { AfterViewInit, ChangeDetectionStrategy, ChangeDetectorRef, Component, Injectable, OnDestroy, OnInit, ViewEncapsulation, computed, inject, signal, viewChild } from '@angular/core';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MAT_DIALOG_DATA, MatDialogContent, MatDialogRef, MatDialogTitle } from '@angular/material/dialog';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\r\nimport { MatSidenav, MatSidenavModule } from '@angular/material/sidenav';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\nimport { MatTreeFlatDataSource, MatTreeFlattener, MatTreeModule } from '@angular/material/tree';\r\nimport { SafeHtmlPipe, SystemUtils } from '@arsedizioni/ars-utils/core';\r\nimport { DialogService } from '@arsedizioni/ars-utils/ui';\r\nimport { FlexLayoutModule } from '@ngbracket/ngx-layout';\r\nimport { BehaviorSubject, Observable, Subject, of as observableOf } from 'rxjs';\r\nimport { takeUntil } from 'rxjs/operators';\r\nimport { HelpService } from '../../services/help.service';\r\n\r\nexport interface HelpViewerDialogData {\r\n id?: string;\r\n}\r\n\r\nexport class IndexInfo {\r\n id: string;\r\n parent?: IndexInfo;\r\n name: string;\r\n itemsCount?: number;\r\n children?: IndexInfo[];\r\n}\r\n\r\nexport class IndexNode extends IndexInfo {\r\n expandable: boolean;\r\n level: number;\r\n\r\n constructor(item: IndexInfo, level: number) {\r\n super();\r\n\r\n // Flattened implementation\r\n this.expandable = !!item.children && item.children.length > 0;\r\n this.level = level;\r\n\r\n // Data\r\n this.id = item.id;\r\n this.name = item.name;\r\n this.itemsCount = item.itemsCount;\r\n this.parent = item.parent;\r\n }\r\n}\r\n\r\n@Injectable()\r\nexport class IndexTreeDataSource implements OnDestroy {\r\n dataChange = new BehaviorSubject<IndexInfo[]>([]);\r\n\r\n get data(): IndexInfo[] {\r\n return this.dataChange.value;\r\n }\r\n\r\n ngOnDestroy() {\r\n this.dataChange.unsubscribe();\r\n }\r\n\r\n /**\r\n * Initialises the data source with a flat list of root nodes.\r\n * @param data - Array of root `IndexInfo` items to display in the tree.\r\n */\r\n initialize(data: IndexInfo[]) {\r\n this.dataChange.next(data);\r\n }\r\n\r\n /**\r\n * Recursively searches the tree for a node with the given id.\r\n * @param node - The node to start from, or `null`/`undefined` to search from the root.\r\n * @param id - The id of the node to find.\r\n * @returns The matching `IndexInfo`, or `undefined` if not found.\r\n */\r\n findNode(node: IndexInfo | undefined | null, id: string): IndexInfo | undefined {\r\n let children: IndexInfo[] | undefined;\r\n if (node && node.id === id) return node;\r\n if (node) children = node.children;\r\n else children = this.data;\r\n if (children) {\r\n let _n: IndexInfo | undefined;\r\n children.some(n => {\r\n n.parent = node ?? undefined;\r\n _n = this.findNode(n, id);\r\n if (_n) return true;\r\n return false;\r\n });\r\n return _n;\r\n }\r\n return undefined;\r\n }\r\n\r\n /**\r\n * Removes the node with the given id from the tree.\r\n * @param id - The id of the node to remove.\r\n */\r\n removeNode(id: string): void {\r\n const n = this.findNode(null, id);\r\n if (!n) return;\r\n if (n.parent) {\r\n const siblings = n.parent.children;\r\n if (siblings) {\r\n const p = siblings.findIndex(c => c.id === id);\r\n if (p !== -1) {\r\n siblings.splice(p, 1);\r\n if (n.parent.itemsCount !== undefined) {\r\n n.parent.itemsCount--;\r\n }\r\n }\r\n }\r\n } else {\r\n const p = this.data.findIndex(c => c.id === id);\r\n if (p !== -1) {\r\n this.data.splice(p, 1);\r\n }\r\n }\r\n this.dataChange.next(this.data);\r\n }\r\n\r\n /**\r\n * Inserts a new node at the beginning of its parent's children, or at the root.\r\n * @param node - The `IndexInfo` node to insert.\r\n */\r\n insertNode(node: IndexInfo): void {\r\n if (node.parent) {\r\n node.parent.children ??= [];\r\n node.parent.children.unshift(node);\r\n node.parent.itemsCount = (node.parent.itemsCount ?? 0) + 1;\r\n } else {\r\n this.data.unshift(node);\r\n }\r\n this.dataChange.next(this.data);\r\n }\r\n\r\n /**\r\n * Renames a node in the tree.\r\n * @param id - The id of the node to rename.\r\n * @param name - The new display name.\r\n */\r\n renameNode(id: string, name: string): void {\r\n const n = this.findNode(null, id);\r\n if (n) {\r\n n.name = name;\r\n this.dataChange.next(this.data);\r\n }\r\n }\r\n\r\n /**\r\n * Re-emits the current data to all subscribers, triggering a tree refresh.\r\n */\r\n update(): void {\r\n this.dataChange.next(this.data);\r\n }\r\n}\r\n\r\n@Component({\r\n host: { 'Bind': SystemUtils.generateUUID() },\r\n templateUrl: './help-viewer.component.html',\r\n styleUrls: ['./help-viewer.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [IndexTreeDataSource],\r\n standalone: true,\r\n imports: [FlexLayoutModule, MatButtonModule, MatTooltipModule, MatIconModule, MatProgressBarModule, MatDialogTitle, MatDialogContent,\r\n MatSidenavModule, MatTreeModule, SafeHtmlPipe]\r\n})\r\nexport class HelpViewerComponent implements OnInit, OnDestroy, AfterViewInit {\r\n readonly indexPane = viewChild.required<MatSidenav>('indexPane');\r\n\r\n private readonly unsubscribe = new Subject<void>();\r\n private readonly changeDetector = inject(ChangeDetectorRef);\r\n private readonly dialogRef = inject(MatDialogRef<HelpViewerComponent>);\r\n protected readonly dialogData: HelpViewerDialogData = inject(MAT_DIALOG_DATA) ?? { id: '1' };\r\n private readonly dialogService = inject(DialogService);\r\n private readonly helpService = inject(HelpService);\r\n protected readonly breakpointObserver = inject(BreakpointObserver);\r\n protected readonly busy = signal<boolean>(false);\r\n protected readonly page = signal<string | null>(null);\r\n private indexId: string | undefined;\r\n private indexPaneClosed = false;\r\n protected indexNode: IndexInfo | undefined;\r\n private readonly history = signal<Array<{ id: string; position: number }>>([]);\r\n protected readonly canGoBack = computed(() => this.history().length > 1);\r\n\r\n /**\r\n * Manage flat tree view\r\n */\r\n private tree = inject(IndexTreeDataSource);\r\n private treeFlattener: MatTreeFlattener<IndexInfo, IndexNode>;\r\n protected treeControl: FlatTreeControl<IndexNode>;\r\n protected treeData: MatTreeFlatDataSource<IndexInfo, IndexNode>;\r\n private folders?: IndexInfo[];\r\n private getChildren = (node: IndexInfo): Observable<IndexInfo[]> =>\r\n observableOf(node.children);\r\n private getLevel = (node: IndexNode) => node.level;\r\n private isExpandable = (node: IndexNode) => node.expandable;\r\n protected hasChild = (_: number, _node: IndexNode) => _node.expandable;\r\n protected transformer = (item: IndexInfo, level: number) => {\r\n return new IndexNode(item, level);\r\n };\r\n\r\n ngOnInit(): void {\r\n\r\n // Setup tree structure\r\n this.treeFlattener = new MatTreeFlattener(\r\n this.transformer,\r\n this.getLevel,\r\n this.isExpandable,\r\n this.getChildren\r\n );\r\n this.treeControl = new FlatTreeControl<IndexNode>(\r\n this.getLevel,\r\n this.isExpandable\r\n );\r\n this.treeData = new MatTreeFlatDataSource(\r\n this.treeControl,\r\n this.treeFlattener\r\n );\r\n\r\n // Subscribe data change\r\n this.tree.dataChange\r\n .pipe(takeUntil(this.unsubscribe))\r\n .subscribe(data => (this.treeData.data = data));\r\n\r\n // Observe layout changes\r\n this.breakpointObserver\r\n .observe([\r\n Breakpoints.XSmall,\r\n Breakpoints.Small,\r\n Breakpoints.Medium,\r\n Breakpoints.Large,\r\n Breakpoints.XLarge,\r\n ])\r\n .pipe(takeUntil(this.unsubscribe))\r\n .subscribe(result => {\r\n for (const query of Object.keys(result.breakpoints)) {\r\n if (result.breakpoints[query]) {\r\n this.handleFilterPaneVisibility();\r\n }\r\n }\r\n });\r\n\r\n this.getToc();\r\n\r\n this.indexId = this.dialogData.id;\r\n if (this.indexId) {\r\n this.getChapter(this.indexId);\r\n }\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.unsubscribe.next();\r\n this.unsubscribe.complete();\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n setTimeout(() => {\r\n this.handleFilterPaneVisibility();\r\n this.indexPaneClosed = !this.indexPane().opened;\r\n }, 0);\r\n this.changeDetector.detectChanges();\r\n }\r\n\r\n\r\n /**\r\n* Handle filter pane visibility\r\n*/\r\n private handleFilterPaneVisibility() {\r\n const indexPane = this.indexPane();\r\n if (indexPane) {\r\n if (this.breakpointObserver.isMatched(Breakpoints.XSmall) ||\r\n this.breakpointObserver.isMatched(Breakpoints.Small) ||\r\n this.breakpointObserver.isMatched(Breakpoints.Medium)) {\r\n if (indexPane.opened) {\r\n indexPane.close();\r\n }\r\n } else {\r\n if (!indexPane.opened && !this.indexPaneClosed) {\r\n indexPane.open();\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Shows or hides the index pane when the user clicks the toggle button.\r\n * Also tracks the user's explicit intent so the pane is not auto-reopened.\r\n */\r\n protected toggleIndexPane() {\r\n this.indexPaneClosed = !this.indexPaneClosed;\r\n this.indexPane()?.toggle();\r\n }\r\n\r\n\r\n /**\r\n * Closes the help viewer dialog.\r\n */\r\n protected close(): void {\r\n this.dialogRef.close();\r\n }\r\n\r\n /**\r\n * Loads the table of contents from the help service and populates the tree.\r\n */\r\n protected getToc(): void {\r\n this.busy.set(true);\r\n this.helpService\r\n .getToc()\r\n .subscribe({\r\n next: r => {\r\n if (!r.success) {\r\n this.dialogService.error(r.message);\r\n } else {\r\n this.folders = r.value.children;\r\n if (this.folders.length > 0) {\r\n this.tree.initialize(this.folders);\r\n this.indexNode = this.folders[0];\r\n this.expandCurrentFolder(); \r\n }\r\n }\r\n },\r\n complete: () => {\r\n this.busy.set(false);\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Intercepts anchor clicks inside the help page and navigates to the referenced chapter.\r\n * @param e - The click `MouseEvent` from the page content area.\r\n * @returns `false` to prevent default browser navigation.\r\n */\r\n protected gotoChapter(e: MouseEvent): boolean {\r\n const el = e.target as HTMLElement | null;\r\n if (el?.nodeName !== 'A') return false;\r\n const tag = el.outerHTML;\r\n let id = '';\r\n let p = tag.indexOf('help-target=\"');\r\n if (p !== -1) {\r\n p += 13;\r\n while (p < tag.length && tag[p] !== '\"') {\r\n id += tag[p];\r\n p++;\r\n }\r\n }\r\n if (id) this.getChapter(id);\r\n return false;\r\n }\r\n\r\n /**\r\n * Searches the folder list for a node matching the given id.\r\n * @param id - The id of the folder to locate.\r\n * @returns The matching `IndexInfo`, or `undefined` if not found.\r\n */\r\n private findFolder(id: string): IndexInfo | undefined {\r\n let node = undefined;\r\n if (this.folders) {\r\n this.folders.some(n => {\r\n node = this.tree.findNode(n, id);\r\n if (node) return true;\r\n return false;\r\n });\r\n }\r\n return node;\r\n }\r\n\r\n /**\r\n * Expands the tree node that corresponds to the currently selected chapter,\r\n * and all its ancestor nodes.\r\n */\r\n private expandCurrentFolder(): void {\r\n if (this.indexNode) {\r\n const current = this.treeControl.dataNodes.find(n => n.id === this.indexNode!.id);\r\n if (current) {\r\n this.treeControl.expand(current);\r\n }\r\n if (this.indexNode.parent) {\r\n // Expand all ancestors\r\n let n: IndexInfo | undefined = this.indexNode.parent;\r\n while (n) {\r\n const ancestor = this.treeControl.dataNodes.find(x => x.id === n!.id);\r\n if (ancestor) this.treeControl.expand(ancestor);\r\n n = n.parent;\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Retrieves and displays a help chapter by id.\r\n * Optionally scrolls to an anchor or pixel offset after loading.\r\n * @param id - Chapter id, optionally followed by an anchor (`id#anchor`).\r\n * @param position - Pixel scroll offset to restore (default `0`, meaning top).\r\n */\r\n protected getChapter(id: string, position: number = 0): void {\r\n // Detect anchor if exists\r\n let anchor: string = undefined;\r\n const p = id.indexOf('#');\r\n if (p !== -1) {\r\n anchor = id.substring(p + 1);\r\n id = id.substring(0, p);\r\n }\r\n if (id !== '.') {\r\n this.busy.set(true);\r\n this.helpService.getChapter(id)\r\n .subscribe({\r\n next: r => {\r\n let found = false;\r\n if (!r.success) {\r\n this.dialogService.error(\"Capitolo non trovato.\");\r\n } else {\r\n if (!position)\r\n this.history.update(h => [...h, { id: this.indexId ?? '', position: this.getPosition() }]);\r\n this.indexId = id;\r\n this.page.set(r.value.data);\r\n found = (r.value.chapter?.name?.length ?? 0) > 0;\r\n if (found) {\r\n // Update folder\r\n this.indexNode = this.findFolder(id);\r\n this.expandCurrentFolder();\r\n // Handle positioning\r\n this.gotoPosition(anchor, position);\r\n }\r\n }\r\n\r\n if (!found) {\r\n this.getChapter(\"1\");\r\n }\r\n },\r\n complete: () => {\r\n this.busy.set(false);\r\n }\r\n });\r\n } else {\r\n if (!position)\r\n this.history.update(h => [...h, { id: this.indexId ?? '', position: this.getPosition() }]);\r\n // Move on the same chapter\r\n this.gotoPosition(anchor, position);\r\n }\r\n }\r\n\r\n /**\r\n * Scrolls the help content to a named anchor or a numeric pixel offset.\r\n * @param anchor - Named anchor (`<a name=\"…\">`) to scroll to, if any.\r\n * @param position - Fallback pixel offset (default `0`).\r\n */\r\n protected gotoPosition(anchor: string | undefined, position: number = 0): void {\r\n setTimeout(() => {\r\n if (anchor) {\r\n const elms = document.getElementsByName(anchor.toUpperCase());\r\n if (elms && elms.length > 0) position = elms[0].offsetTop;\r\n }\r\n this.setPosition(position > 0 ? position - 1 : 0);\r\n }, 50);\r\n }\r\n\r\n /**\r\n * Returns the current vertical scroll offset of the help content scroller.\r\n * @returns The `scrollTop` value in pixels, or `0` if the element is not found.\r\n */\r\n protected getPosition(): number {\r\n let elem = document.getElementById('helpviewer-scroller');\r\n if (elem) {\r\n return elem.scrollTop;\r\n }\r\n return 0;\r\n }\r\n\r\n /**\r\n * Scrolls the help content scroller to the specified pixel offset.\r\n * @param position - The vertical pixel offset to scroll to.\r\n */\r\n protected setPosition(position: number): void {\r\n let elem = document.getElementById('helpviewer-scroller');\r\n if (elem) {\r\n elem.scrollTo(0, position);\r\n }\r\n }\r\n\r\n /**\r\n * Navigates back to the previous chapter in the browsing history.\r\n */\r\n protected back(): void {\r\n const entries = this.history();\r\n if (entries.length === 0) return;\r\n const n = entries[entries.length - 1];\r\n this.history.update(h => h.slice(0, -1));\r\n this.getChapter(n.id, n.position + 1);\r\n }\r\n\r\n\r\n\r\n\r\n\r\n}\r\n","<div class=\"helpviewer-fixed\">\r\n <div style=\"height:6px\">\r\n @if (busy()) {\r\n <mat-progress-bar z-index=\"11\" mode=\"indeterminate\"></mat-progress-bar>\r\n }\r\n </div>\r\n <div class=\"dialog-header\">\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutGap=\"10px\" fxFill>\r\n <div class=\"dialog-menu\">\r\n <button type=\"button\" mat-icon-button matTooltip=\"Mostra menu\" [attr.aria-label]=\"'Mostra indice'\"\r\n (click)=\"toggleIndexPane()\">\r\n <mat-icon>menu</mat-icon>\r\n </button>\r\n </div>\r\n <div fxFlex=\"*\">\r\n <h2 mat-dialog-title>Guida</h2>\r\n </div>\r\n <div fxFlex=\"100px\" fxLayoutAlign=\"end\" class=\"dialog-close\">\r\n @if (canGoBack()) {\r\n <button fxFlexAlign=\"start\" type=\"button\" mat-icon-button matTooltip=\"Indietro\" (click)=\"back()\">\r\n <mat-icon>arrow_back</mat-icon>\r\n </button>\r\n }\r\n <button fxFlexAlign=\"start\" type=\"button\" mat-icon-button matTooltip=\"Chiudi\" (click)=\"close()\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n</div>\r\n<mat-dialog-content id=\"helpviewer-scrollable\">\r\n <mat-drawer-container class=\"fill\">\r\n <mat-drawer #indexPane mode=\"side\" [autoFocus]=\"false\" class=\"drawer-small drawer-transparent\">\r\n <div fxLayout=\"column\" fxFill>\r\n <div fxFlex=\"*\">\r\n <mat-tree [dataSource]=\"treeData\" [treeControl]=\"treeControl\" class=\"tree \" style=\"max-width:310px\">\r\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodeToggle matTreeNodePadding\r\n [matTreeNodePaddingIndent]=\"20\" class=\"tree-node tree-node-simple tree-node-style\"\r\n (click)=\"getChapter(node.id);\" [class.tree-node-activated]=\"indexNode && indexNode.id === node.id\"\r\n [disabled]=\"busy()\">\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxFill class=\"small uppercase\">\r\n <button type=\"button\" fxFlexAlign=\"center\" mat-icon-button disabled class=\"small-icon-button\"></button>\r\n <div fxFlex=\"*\" fxFlexAlign=\"center\">{{node.name}}</div>\r\n </div>\r\n </mat-tree-node>\r\n <mat-tree-node *matTreeNodeDef=\"let node;when: hasChild\" matTreeNodePadding [matTreeNodePaddingIndent]=\"20\"\r\n class=\"tree-node tree-node-simple tree-node-style\"\r\n [class.tree-node-activated]=\"indexNode && indexNode.id === node.id\" (click)=\"getChapter(node.id)\"\r\n [disabled]=\"busy()\">\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxFill class=\"small uppercase\">\r\n <button type=\"button\" fxFlexAlign=\"center\" mat-icon-button matTreeNodeToggle\r\n [attr.aria-label]=\"'Apri/chiudi ' + node.name\" class=\"small-icon-button\">\r\n <mat-icon class=\"mat-icon-rtl-mirror\">\r\n {{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}\r\n </mat-icon>\r\n </button>\r\n <div fxFlex=\"*\" fxFlexAlign=\"center\">{{node.name}}</div>\r\n </div>\r\n </mat-tree-node>\r\n </mat-tree>\r\n </div>\r\n </div>\r\n </mat-drawer>\r\n <mat-drawer-content id=\"helpviewer-scroller\">\r\n <div style=\"padding: 0 24px;\">\r\n <div fxLayout=\"column\" fxFill>\r\n <div class=\"fill\" (click)=\"gotoChapter($event)\" [innerHtml]=\"(page() ?? '') | safeHtml\"></div>\r\n </div>\r\n </div>\r\n </mat-drawer-content>\r\n </mat-drawer-container>\r\n</mat-dialog-content>","import { Injectable, inject } from '@angular/core';\r\nimport { DialogService } from '@arsedizioni/ars-utils/ui';\r\nimport { ApiResult } from '@arsedizioni/ars-utils/core';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { HelpViewerComponent, IndexInfo } from '../components/help-viewer/help-viewer.component';\r\nimport { Chapter, ChapterBag } from '../definitions';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class HelpService {\r\n\r\n private readonly httpClient = inject(HttpClient);\r\n private readonly dialogService = inject(DialogService);\r\n private serviceUri: string | undefined;\r\n\r\n /**\r\n * Initialises the service with the back-end base URI.\r\n * Must be called once during application bootstrap before any other method.\r\n * @param serviceUri - Base URL of the help service (e.g. `'https://api.example.com'`).\r\n */\r\n initialize(serviceUri: string): void {\r\n this.serviceUri = serviceUri;\r\n }\r\n\r\n /**\r\n * Retrieves the HTML content and metadata of a help chapter.\r\n * @param id - The chapter id.\r\n * @param query - Optional search query to highlight within the chapter content.\r\n * @returns An observable that emits `ApiResult<ChapterBag>`.\r\n */\r\n getChapter(id: string, query: string | undefined = undefined) {\r\n return this.httpClient.get<ApiResult<ChapterBag>>(\r\n this.serviceUri +\r\n '/help/chapter/' +\r\n id +\r\n '/?query=' +\r\n (query ?? '')\r\n );\r\n }\r\n\r\n /**\r\n * Retrieves metadata (title, path, etc.) for a help chapter without its content.\r\n * @param id - The chapter id.\r\n * @returns An observable that emits `ApiResult<Chapter>`.\r\n */\r\n getChapterInfo(id: string) {\r\n return this.httpClient.get<ApiResult<Chapter>>(\r\n this.serviceUri + '/help/chapter/info/' + id\r\n );\r\n }\r\n\r\n /**\r\n * Retrieves a raw repository file by id.\r\n * @param id - The repository file id.\r\n * @returns An observable that emits `ApiResult<unknown>`.\r\n */\r\n getRepo(id: string) {\r\n return this.httpClient.get<ApiResult<unknown>>(\r\n this.serviceUri + '/help/repo/' + id\r\n );\r\n }\r\n\r\n /**\r\n * Retrieves the table of contents as a hierarchical `IndexInfo` tree.\r\n * @returns An observable that emits `ApiResult<IndexInfo>`.\r\n */\r\n getToc() {\r\n return this.httpClient.get<ApiResult<IndexInfo>>(\r\n this.serviceUri + '/help/toc'\r\n );\r\n }\r\n\r\n /**\r\n * Opens the help viewer dialog, optionally pre-navigated to a specific chapter.\r\n * @param id - The chapter id to open (default: `'1'`, the root chapter).\r\n */\r\n show(id: string = '1'): void {\r\n this.dialogService.open(HelpViewerComponent, {\r\n ariaLabel: 'guida',\r\n autoFocus: false,\r\n restoreFocus: false,\r\n disableClose: true,\r\n data: { id },\r\n minWidth: '375px',\r\n maxWidth: '1200px',\r\n width: '100%',\r\n height: '100%'\r\n });\r\n }\r\n}\r\n\r\n","import { NgModule } from '@angular/core';\r\n\r\n@NgModule()\r\nexport class ArsHelpModule { }\r\n\r\nexport * from './services/help.service';\r\n","/*\r\n * Public API Surface \r\n */\r\nexport * from './help.module';\r\nexport * from './definitions';\r\nexport * from './components/help-viewer/help-viewer.component';\r\n\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["observableOf"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;MAqBa,SAAS,CAAA;AAMrB;AAEK,MAAO,SAAU,SAAQ,SAAS,CAAA;IAItC,WAAA,CAAY,IAAe,EAAE,KAAa,EAAA;AACxC,QAAA,KAAK,EAAE;;AAGP,QAAA,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC;AAC7D,QAAA,IAAI,CAAC,KAAK,GAAG,KAAK;;AAGlB,QAAA,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE;AACjB,QAAA,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI;AACrB,QAAA,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU;AACjC,QAAA,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM;IAC3B;AACD;MAGY,mBAAmB,CAAA;AADhC,IAAA,WAAA,GAAA;AAEE,QAAA,IAAA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EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;gHAAb,aAAa,EAAA,CAAA,CAAA;gHAAb,aAAa,EAAA,CAAA,CAAA;;4FAAb,aAAa,EAAA,UAAA,EAAA,CAAA;kBADzB;;;ACFD;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -49,53 +49,59 @@ class SupportService {
|
|
|
49
49
|
this.broadcastService = inject(BroadcastService);
|
|
50
50
|
this.products = SupportProduct.None;
|
|
51
51
|
this.productModules = SupportProductModule.None;
|
|
52
|
+
/** Number of unread notifications, or `undefined` when there are none. */
|
|
52
53
|
this.unreadNotifications = signal(undefined, ...(ngDevMode ? [{ debugName: "unreadNotifications" }] : /* istanbul ignore next */ []));
|
|
53
54
|
}
|
|
55
|
+
/** Base URI of the Support back-end service. */
|
|
54
56
|
get serviceUri() {
|
|
55
57
|
return this._serviceUri;
|
|
56
58
|
}
|
|
57
59
|
ngOnDestroy() {
|
|
58
|
-
|
|
59
|
-
if (this.broadcastServiceSubscription) {
|
|
60
|
-
this.broadcastServiceSubscription.unsubscribe();
|
|
61
|
-
}
|
|
60
|
+
this.broadcastServiceSubscription?.unsubscribe();
|
|
62
61
|
}
|
|
63
62
|
/**
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
* @param
|
|
67
|
-
* @param
|
|
63
|
+
* Initialises the service with the back-end URI and the products/modules it should track.
|
|
64
|
+
* Must be called once during application bootstrap before any other method.
|
|
65
|
+
* @param serviceUri - Base URL of the support service.
|
|
66
|
+
* @param products - Bitmask of `SupportProduct` values to scope notifications (default: `None`).
|
|
67
|
+
* @param productModules - Bitmask of `SupportProductModule` values to scope notifications (default: `None`).
|
|
68
68
|
*/
|
|
69
69
|
initialize(serviceUri, products = SupportProduct.None, productModules = SupportProductModule.None) {
|
|
70
|
-
// Initialize
|
|
71
70
|
this._serviceUri = serviceUri;
|
|
72
71
|
this.products = products;
|
|
73
72
|
this.productModules = productModules;
|
|
74
|
-
// React to message broadcasting
|
|
75
73
|
if (!this.broadcastServiceSubscription) {
|
|
76
|
-
this.broadcastServiceSubscription = this.broadcastService
|
|
74
|
+
this.broadcastServiceSubscription = this.broadcastService
|
|
75
|
+
.getMessage()
|
|
76
|
+
.subscribe((message) => {
|
|
77
77
|
if (message.id === SupportMessages.NOTIFICATION_READ) {
|
|
78
78
|
this.countUnreadNotifications();
|
|
79
79
|
}
|
|
80
80
|
});
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
|
-
|
|
84
|
-
// NOTIFICATIONS
|
|
85
|
-
////
|
|
83
|
+
// ── Notifications ──────────────────────────────────────────────────────────
|
|
86
84
|
/**
|
|
87
|
-
*
|
|
85
|
+
* Fetches the count of unread notifications from the server and updates
|
|
86
|
+
* the `unreadNotifications` signal. Sets `undefined` when the count is zero.
|
|
88
87
|
*/
|
|
89
88
|
countUnreadNotifications() {
|
|
90
|
-
this.httpClient
|
|
89
|
+
this.httpClient
|
|
90
|
+
.get(this._serviceUri +
|
|
91
|
+
'/notifications/unread/?products=' + (this.products ?? 0) +
|
|
92
|
+
'&modules=' + (this.productModules ?? 0))
|
|
93
|
+
.subscribe((r) => {
|
|
91
94
|
if (r.success) {
|
|
92
95
|
this.unreadNotifications.set(r.value > 0 ? r.value : undefined);
|
|
93
96
|
}
|
|
94
97
|
});
|
|
95
98
|
}
|
|
96
99
|
/**
|
|
97
|
-
*
|
|
98
|
-
*
|
|
100
|
+
* Queries the notification list using the supplied filter parameters.
|
|
101
|
+
* The `products` and `productModules` fields are automatically populated
|
|
102
|
+
* from the service configuration before the request is sent.
|
|
103
|
+
* @param params - Search parameters for the notification query.
|
|
104
|
+
* @returns An observable that emits `ApiResult<SupportNotificationsSearchResult>`.
|
|
99
105
|
*/
|
|
100
106
|
queryNotifications(params) {
|
|
101
107
|
params.products = this.products ?? 0;
|
|
@@ -103,32 +109,33 @@ class SupportService {
|
|
|
103
109
|
return this.httpClient.post(this._serviceUri + '/notifications', params);
|
|
104
110
|
}
|
|
105
111
|
/**
|
|
106
|
-
*
|
|
107
|
-
* @param id
|
|
112
|
+
* Retrieves a single notification by id.
|
|
113
|
+
* @param id - The notification id.
|
|
114
|
+
* @returns An observable that emits `ApiResult<SupportNotificationInfo>`.
|
|
108
115
|
*/
|
|
109
116
|
getNotification(id) {
|
|
110
|
-
return this.httpClient.get(this._serviceUri +
|
|
111
|
-
'/notifications/' +
|
|
112
|
-
id);
|
|
117
|
+
return this.httpClient.get(this._serviceUri + '/notifications/' + id);
|
|
113
118
|
}
|
|
114
119
|
/**
|
|
115
|
-
*
|
|
116
|
-
* @param
|
|
120
|
+
* Marks one or more notifications as read.
|
|
121
|
+
* @param params - Parameters identifying the notifications to mark.
|
|
122
|
+
* @returns An observable that emits `ApiResult<boolean>`.
|
|
117
123
|
*/
|
|
118
124
|
markNotifications(params) {
|
|
119
125
|
return this.httpClient.post(this._serviceUri + '/notifications/mark', params);
|
|
120
126
|
}
|
|
121
127
|
/**
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
128
|
+
* Downloads a notification attachment as a binary blob.
|
|
129
|
+
* @param documentId - The id of the document to download.
|
|
130
|
+
* @returns An observable that emits the binary blob response.
|
|
131
|
+
*/
|
|
132
|
+
downloadNotificationDocument(documentId) {
|
|
126
133
|
return this.httpClient.get(this._serviceUri + '/documents/download/' + documentId, { responseType: 'blob' });
|
|
127
134
|
}
|
|
128
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
129
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.
|
|
135
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: SupportService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
136
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: SupportService, providedIn: 'root' }); }
|
|
130
137
|
}
|
|
131
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
138
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: SupportService, decorators: [{
|
|
132
139
|
type: Injectable,
|
|
133
140
|
args: [{
|
|
134
141
|
providedIn: 'root',
|
|
@@ -136,11 +143,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
136
143
|
}] });
|
|
137
144
|
|
|
138
145
|
class ArsSupportCommonModule {
|
|
139
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
140
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.
|
|
141
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.
|
|
146
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ArsSupportCommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
147
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.10", ngImport: i0, type: ArsSupportCommonModule }); }
|
|
148
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ArsSupportCommonModule }); }
|
|
142
149
|
}
|
|
143
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
150
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ArsSupportCommonModule, decorators: [{
|
|
144
151
|
type: NgModule
|
|
145
152
|
}] });
|
|
146
153
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arsedizioni-ars-utils-support.common.mjs","sources":["../../../projects/ars-utils/support.common/common/messages.ts","../../../projects/ars-utils/support.common/common/definitions.ts","../../../projects/ars-utils/support.common/common/services/support.service.ts","../../../projects/ars-utils/support.common/common/common.module.ts","../../../projects/ars-utils/support.common/public_api.ts","../../../projects/ars-utils/support.common/arsedizioni-ars-utils-support.common.ts"],"sourcesContent":["export const SupportMessages = {\r\n /**\r\n * Messages\r\n */\r\n // Error\r\n ERROR: '§support-error',\r\n\r\n // Login\r\n LOGIN_CHANGED: '§support-login-changed',\r\n LOGIN_COMPLETED: '§support-login-completed',\r\n LOGOUT_COMPLETED: '§support-logout-completed',\r\n LOGIN_PENDING: '§support-login-pending',\r\n LOGIN_FAILED: '§support-login-failed', \r\n LOGOUT: '§support-logout',\r\n\r\n // Notifications\r\n NOTIFICATION_READ: '§support-notification-read',\r\n};\r\n","import { LoginResult } from '@arsedizioni/ars-utils/core';\r\nimport { LoginOAuthType } from '@arsedizioni/ars-utils/ui.oauth';\r\n\r\n\r\nexport interface SupportUserInfo {\r\n id: number;\r\n groups?: number;\r\n groupNames?: string;\r\n displayName?: string;\r\n dashboard?: string;\r\n sessionId?: string;\r\n email?: string;\r\n customerId?: number;\r\n companyName?: string;\r\n role: number;\r\n scopes?: string[];\r\n sla: number;\r\n isCommercial?: boolean;\r\n isAdministrator: boolean;\r\n isGuest: boolean;\r\n isUser: boolean;\r\n isOperator: boolean;\r\n isTemporary: boolean;\r\n}\r\n\r\n\r\nexport interface SupportLoginResult extends LoginResult<SupportUserInfo> {\r\n}\r\n\r\nexport interface SupportLoginInfo {\r\n context: SupportUserInfo;\r\n oauth?: LoginOAuthType;\r\n remember?: boolean;\r\n}\r\n\r\nexport interface SupportNotificationsSearchParams {\r\n any?: string;\r\n products?: number;\r\n productModules?: number;\r\n first?: number;\r\n count?: number;\r\n}\r\n\r\nexport interface SupportNotificationsSearchResult {\r\n interval?: string;\r\n items?: SupportNotificationInfo[];\r\n total?: number;\r\n}\r\n\r\nexport interface Notification {\r\n id: number;\r\n products: number;\r\n productModules?: number;\r\n publishingDate?: Date;\r\n title: string;\r\n text: string;\r\n state: number;\r\n created: Date;\r\n createdBy: string;\r\n lastUpdated?: Date;\r\n lastUpdatedBy?: string;\r\n productNames?: string;\r\n productModuleNames?: string;\r\n isPublished: boolean;\r\n isInternal: boolean;\r\n stateName: string;\r\n documents?: SupportDocumentInfo[];\r\n isRead: boolean;\r\n totalRead: number;\r\n}\r\n\r\nexport interface SupportDocumentInfo {\r\n id?: number;\r\n origin?: number;\r\n ownerId?: number;\r\n name?: string;\r\n description?: string;\r\n size?: number;\r\n binaryId?: number;\r\n url?: string;\r\n customerId?: number;\r\n created?: Date;\r\n createdBy?: string;\r\n lastUpdated?: Date;\r\n lastUpdatedBy?: string;\r\n isBinary?: boolean;\r\n}\r\n\r\nexport interface SupportNotificationInfo {\r\n id: number;\r\n products?: number;\r\n productModules?: number;\r\n publishingDate?: Date;\r\n title: string;\r\n text: string;\r\n state: number;\r\n created: Date;\r\n createdBy: string;\r\n lastUpdated?: Date;\r\n lastUpdatedBy?: string;\r\n productNames?: string;\r\n productModuleNames?: string;\r\n isPublished: boolean;\r\n isInternal: boolean;\r\n stateName: string;\r\n documents?: SupportDocumentInfo[];\r\n isRead: boolean;\r\n totalRead: number;\r\n isMenuOpen?: boolean;\r\n isOver?: boolean;\r\n\r\n}\r\n\r\nexport interface SupportNotificationsMarkParams {\r\n ids: number[];\r\n unmark: boolean;\r\n}\r\n\r\nexport enum SupportProduct {\r\n None = 0,\r\n Clipper = 1,\r\n Evolution = 1 << 1,\r\n DGInfo = 1 << 2\r\n}\r\n\r\nexport enum SupportProductModule {\r\n None = 0,\r\n EvoFormazione = 1,\r\n EvoDPI = 1 << 1,\r\n EvoSorveglianzaSanitaria = 1 << 2,\r\n EvoRegistroEScadenzario = 1 << 3,\r\n EvoAttrezzatureEImpianti = 1 << 4,\r\n EvoMonitoraggio = 1 << 5,\r\n EvoBollettino = 1 << 6,\r\n DgiADR = 1 << 7,\r\n DgiRID = 1 << 8,\r\n DgiIMDG = 1 << 9,\r\n DgiCLP = 1 << 10,\r\n}\r\n","import { HttpClient } from '@angular/common/http';\r\nimport { Injectable, OnDestroy, inject, signal } from '@angular/core';\r\nimport { ApiResult, BroadcastMessageInfo, BroadcastService } from '@arsedizioni/ars-utils/core';\r\nimport { Subscription } from 'rxjs';\r\nimport { SupportMessages } from '../messages';\r\nimport { SupportNotificationInfo, SupportNotificationsMarkParams, SupportNotificationsSearchParams, SupportNotificationsSearchResult, SupportProduct, SupportProductModule } from '../definitions';\r\n\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class SupportService implements OnDestroy {\r\n\r\n private httpClient = inject(HttpClient);\r\n private broadcastService = inject(BroadcastService);\r\n private broadcastServiceSubscription?: Subscription;\r\n private _serviceUri?: string;\r\n get serviceUri(): string {\r\n return this._serviceUri;\r\n }\r\n public products: SupportProduct = SupportProduct.None;\r\n public productModules: SupportProductModule = SupportProductModule.None;\r\n\r\n public readonly unreadNotifications = signal<number | undefined>(undefined);\r\n\r\n ngOnDestroy() {\r\n // Clean-up\r\n if (this.broadcastServiceSubscription) {\r\n this.broadcastServiceSubscription.unsubscribe();\r\n }\r\n\r\n }\r\n\r\n /**\r\n * Initialize service\r\n * @param serviceUri : the service uri\r\n * @param products: the supported products\r\n * @param productModules: the supported product modules\r\n */\r\n initialize(\r\n serviceUri: string,\r\n products: SupportProduct = SupportProduct.None,\r\n productModules: SupportProductModule = SupportProductModule.None) {\r\n\r\n // Initialize\r\n this._serviceUri = serviceUri;\r\n this.products = products;\r\n this.productModules = productModules;\r\n\r\n // React to message broadcasting\r\n if (!this.broadcastServiceSubscription) {\r\n this.broadcastServiceSubscription = this.broadcastService.getMessage().subscribe((message: BroadcastMessageInfo) => {\r\n if (message.id === SupportMessages.NOTIFICATION_READ) {\r\n this.countUnreadNotifications();\r\n }\r\n });\r\n }\r\n }\r\n\r\n ////\r\n // NOTIFICATIONS\r\n ////\r\n\r\n /**\r\n * Count unread notifications\r\n */\r\n countUnreadNotifications() {\r\n this.httpClient.get<ApiResult<number>>(\r\n this._serviceUri + '/notifications/unread/?products=' + (this.products ?? 0) + \"&modules=\" + (this.productModules ?? 0)\r\n ).subscribe((r: ApiResult<number>) => {\r\n if (r.success) {\r\n this.unreadNotifications.set(r.value > 0 ? r.value : undefined)\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Query notifications\r\n * @param params: query parameters\r\n */\r\n queryNotifications(params: SupportNotificationsSearchParams) {\r\n params.products = this.products ?? 0;\r\n params.productModules = this.productModules ?? 0;\r\n return this.httpClient.post<ApiResult<SupportNotificationsSearchResult>>(\r\n this._serviceUri + '/notifications',\r\n params\r\n );\r\n }\r\n\r\n /**\r\n * Retrieve a notification\r\n * @param id: the notification id\r\n */\r\n getNotification(id: number) {\r\n return this.httpClient.get<ApiResult<SupportNotificationInfo>>(\r\n this._serviceUri +\r\n '/notifications/' +\r\n id\r\n );\r\n }\r\n\r\n /**\r\n * Mark a group of notifications as read\r\n * @param ids: the array of notification's ids to set as read\r\n */\r\n markNotifications(params: SupportNotificationsMarkParams) {\r\n return this.httpClient.post<ApiResult<boolean>>(\r\n this._serviceUri + '/notifications/mark',\r\n params\r\n );\r\n }\r\n\r\n /**\r\n * Download a notification document\r\n * @param documentId : the notification document id\r\n */\r\n dowloadNotificationDocument(documentId: number) {\r\n return this.httpClient.get(\r\n this._serviceUri + '/documents/download/' + documentId,\r\n { responseType: 'blob' }\r\n );\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\n\r\n@NgModule()\r\nexport class ArsSupportCommonModule {}\r\n\r\n// Other exports\r\nexport * from './messages';\r\nexport * from './definitions';\r\nexport * from './services/support.service';\r\n","/*\r\n * Public API Surface of ars-utils\r\n */\r\nexport * from './common/common.module';\r\nexport * from './common/messages';\r\nexport * from './common/definitions';\r\nexport * from './common/services/support.service';\r\n\r\n\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mapp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"arsedizioni-ars-utils-support.common.mjs","sources":["../../../projects/ars-utils/support.common/common/messages.ts","../../../projects/ars-utils/support.common/common/definitions.ts","../../../projects/ars-utils/support.common/common/services/support.service.ts","../../../projects/ars-utils/support.common/common/common.module.ts","../../../projects/ars-utils/support.common/public_api.ts","../../../projects/ars-utils/support.common/arsedizioni-ars-utils-support.common.ts"],"sourcesContent":["export const SupportMessages = {\r\n /**\r\n * Messages\r\n */\r\n // Error\r\n ERROR: '§support-error',\r\n\r\n // Login\r\n LOGIN_CHANGED: '§support-login-changed',\r\n LOGIN_COMPLETED: '§support-login-completed',\r\n LOGOUT_COMPLETED: '§support-logout-completed',\r\n LOGIN_PENDING: '§support-login-pending',\r\n LOGIN_FAILED: '§support-login-failed', \r\n LOGOUT: '§support-logout',\r\n\r\n // Notifications\r\n NOTIFICATION_READ: '§support-notification-read',\r\n};\r\n","import { LoginResult } from '@arsedizioni/ars-utils/core';\r\nimport { LoginOAuthType } from '@arsedizioni/ars-utils/ui.oauth';\r\n\r\n\r\nexport interface SupportUserInfo {\r\n id: number;\r\n groups?: number;\r\n groupNames?: string;\r\n displayName?: string;\r\n dashboard?: string;\r\n sessionId?: string;\r\n email?: string;\r\n customerId?: number;\r\n companyName?: string;\r\n role: number;\r\n scopes?: string[];\r\n sla: number;\r\n isCommercial?: boolean;\r\n isAdministrator: boolean;\r\n isGuest: boolean;\r\n isUser: boolean;\r\n isOperator: boolean;\r\n isTemporary: boolean;\r\n}\r\n\r\n\r\nexport interface SupportLoginResult extends LoginResult<SupportUserInfo> {\r\n}\r\n\r\nexport interface SupportLoginInfo {\r\n context: SupportUserInfo;\r\n oauth?: LoginOAuthType;\r\n remember?: boolean;\r\n}\r\n\r\nexport interface SupportNotificationsSearchParams {\r\n any?: string;\r\n products?: number;\r\n productModules?: number;\r\n first?: number;\r\n count?: number;\r\n}\r\n\r\nexport interface SupportNotificationsSearchResult {\r\n interval?: string;\r\n items?: SupportNotificationInfo[];\r\n total?: number;\r\n}\r\n\r\nexport interface Notification {\r\n id: number;\r\n products: number;\r\n productModules?: number;\r\n publishingDate?: Date;\r\n title: string;\r\n text: string;\r\n state: number;\r\n created: Date;\r\n createdBy: string;\r\n lastUpdated?: Date;\r\n lastUpdatedBy?: string;\r\n productNames?: string;\r\n productModuleNames?: string;\r\n isPublished: boolean;\r\n isInternal: boolean;\r\n stateName: string;\r\n documents?: SupportDocumentInfo[];\r\n isRead: boolean;\r\n totalRead: number;\r\n}\r\n\r\nexport interface SupportDocumentInfo {\r\n id?: number;\r\n origin?: number;\r\n ownerId?: number;\r\n name?: string;\r\n description?: string;\r\n size?: number;\r\n binaryId?: number;\r\n url?: string;\r\n customerId?: number;\r\n created?: Date;\r\n createdBy?: string;\r\n lastUpdated?: Date;\r\n lastUpdatedBy?: string;\r\n isBinary?: boolean;\r\n}\r\n\r\nexport interface SupportNotificationInfo {\r\n id: number;\r\n products?: number;\r\n productModules?: number;\r\n publishingDate?: Date;\r\n title: string;\r\n text: string;\r\n state: number;\r\n created: Date;\r\n createdBy: string;\r\n lastUpdated?: Date;\r\n lastUpdatedBy?: string;\r\n productNames?: string;\r\n productModuleNames?: string;\r\n isPublished: boolean;\r\n isInternal: boolean;\r\n stateName: string;\r\n documents?: SupportDocumentInfo[];\r\n isRead: boolean;\r\n totalRead: number;\r\n isMenuOpen?: boolean;\r\n isOver?: boolean;\r\n\r\n}\r\n\r\nexport interface SupportNotificationsMarkParams {\r\n ids: number[];\r\n unmark: boolean;\r\n}\r\n\r\nexport enum SupportProduct {\r\n None = 0,\r\n Clipper = 1,\r\n Evolution = 1 << 1,\r\n DGInfo = 1 << 2\r\n}\r\n\r\nexport enum SupportProductModule {\r\n None = 0,\r\n EvoFormazione = 1,\r\n EvoDPI = 1 << 1,\r\n EvoSorveglianzaSanitaria = 1 << 2,\r\n EvoRegistroEScadenzario = 1 << 3,\r\n EvoAttrezzatureEImpianti = 1 << 4,\r\n EvoMonitoraggio = 1 << 5,\r\n EvoBollettino = 1 << 6,\r\n DgiADR = 1 << 7,\r\n DgiRID = 1 << 8,\r\n DgiIMDG = 1 << 9,\r\n DgiCLP = 1 << 10,\r\n}\r\n","import { HttpClient } from '@angular/common/http';\r\nimport { Injectable, OnDestroy, inject, signal } from '@angular/core';\r\nimport { ApiResult, BroadcastMessageInfo, BroadcastService } from '@arsedizioni/ars-utils/core';\r\nimport { Subscription } from 'rxjs';\r\nimport { SupportMessages } from '../messages';\r\nimport { SupportNotificationInfo, SupportNotificationsMarkParams, SupportNotificationsSearchParams, SupportNotificationsSearchResult, SupportProduct, SupportProductModule } from '../definitions';\r\n\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class SupportService implements OnDestroy {\r\n\r\n private readonly httpClient = inject(HttpClient);\r\n private readonly broadcastService = inject(BroadcastService);\r\n private broadcastServiceSubscription?: Subscription;\r\n\r\n private _serviceUri: string | undefined;\r\n\r\n /** Base URI of the Support back-end service. */\r\n get serviceUri(): string | undefined {\r\n return this._serviceUri;\r\n }\r\n\r\n public products: SupportProduct = SupportProduct.None;\r\n public productModules: SupportProductModule = SupportProductModule.None;\r\n\r\n /** Number of unread notifications, or `undefined` when there are none. */\r\n public readonly unreadNotifications = signal<number | undefined>(undefined);\r\n\r\n ngOnDestroy(): void {\r\n this.broadcastServiceSubscription?.unsubscribe();\r\n }\r\n\r\n /**\r\n * Initialises the service with the back-end URI and the products/modules it should track.\r\n * Must be called once during application bootstrap before any other method.\r\n * @param serviceUri - Base URL of the support service.\r\n * @param products - Bitmask of `SupportProduct` values to scope notifications (default: `None`).\r\n * @param productModules - Bitmask of `SupportProductModule` values to scope notifications (default: `None`).\r\n */\r\n initialize(\r\n serviceUri: string,\r\n products: SupportProduct = SupportProduct.None,\r\n productModules: SupportProductModule = SupportProductModule.None\r\n ): void {\r\n this._serviceUri = serviceUri;\r\n this.products = products;\r\n this.productModules = productModules;\r\n\r\n if (!this.broadcastServiceSubscription) {\r\n this.broadcastServiceSubscription = this.broadcastService\r\n .getMessage()\r\n .subscribe((message: BroadcastMessageInfo) => {\r\n if (message.id === SupportMessages.NOTIFICATION_READ) {\r\n this.countUnreadNotifications();\r\n }\r\n });\r\n }\r\n }\r\n\r\n // ── Notifications ──────────────────────────────────────────────────────────\r\n\r\n /**\r\n * Fetches the count of unread notifications from the server and updates\r\n * the `unreadNotifications` signal. Sets `undefined` when the count is zero.\r\n */\r\n countUnreadNotifications(): void {\r\n this.httpClient\r\n .get<ApiResult<number>>(\r\n this._serviceUri +\r\n '/notifications/unread/?products=' + (this.products ?? 0) +\r\n '&modules=' + (this.productModules ?? 0)\r\n )\r\n .subscribe((r: ApiResult<number>) => {\r\n if (r.success) {\r\n this.unreadNotifications.set(r.value > 0 ? r.value : undefined);\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Queries the notification list using the supplied filter parameters.\r\n * The `products` and `productModules` fields are automatically populated\r\n * from the service configuration before the request is sent.\r\n * @param params - Search parameters for the notification query.\r\n * @returns An observable that emits `ApiResult<SupportNotificationsSearchResult>`.\r\n */\r\n queryNotifications(params: SupportNotificationsSearchParams) {\r\n params.products = this.products ?? 0;\r\n params.productModules = this.productModules ?? 0;\r\n return this.httpClient.post<ApiResult<SupportNotificationsSearchResult>>(\r\n this._serviceUri + '/notifications',\r\n params\r\n );\r\n }\r\n\r\n /**\r\n * Retrieves a single notification by id.\r\n * @param id - The notification id.\r\n * @returns An observable that emits `ApiResult<SupportNotificationInfo>`.\r\n */\r\n getNotification(id: number) {\r\n return this.httpClient.get<ApiResult<SupportNotificationInfo>>(\r\n this._serviceUri + '/notifications/' + id\r\n );\r\n }\r\n\r\n /**\r\n * Marks one or more notifications as read.\r\n * @param params - Parameters identifying the notifications to mark.\r\n * @returns An observable that emits `ApiResult<boolean>`.\r\n */\r\n markNotifications(params: SupportNotificationsMarkParams) {\r\n return this.httpClient.post<ApiResult<boolean>>(\r\n this._serviceUri + '/notifications/mark',\r\n params\r\n );\r\n }\r\n\r\n /**\r\n * Downloads a notification attachment as a binary blob.\r\n * @param documentId - The id of the document to download.\r\n * @returns An observable that emits the binary blob response.\r\n */\r\n downloadNotificationDocument(documentId: number) {\r\n return this.httpClient.get(\r\n this._serviceUri + '/documents/download/' + documentId,\r\n { responseType: 'blob' }\r\n );\r\n }\r\n}\r\n\r\n","import { NgModule } from '@angular/core';\r\n\r\n@NgModule()\r\nexport class ArsSupportCommonModule {}\r\n\r\n// Other exports\r\nexport * from './messages';\r\nexport * from './definitions';\r\nexport * from './services/support.service';\r\n","/*\r\n * Public API Surface of ars-utils\r\n */\r\nexport * from './common/common.module';\r\nexport * from './common/messages';\r\nexport * from './common/definitions';\r\nexport * from './common/services/support.service';\r\n\r\n\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;AAAO,MAAM,eAAe,GAAG;AAC7B;;AAEG;;AAEH,IAAA,KAAK,EAAE,gBAAgB;;AAGvB,IAAA,aAAa,EAAE,wBAAwB;AACvC,IAAA,eAAe,EAAE,0BAA0B;AAC3C,IAAA,gBAAgB,EAAE,2BAA2B;AAC7C,IAAA,aAAa,EAAE,wBAAwB;AACvC,IAAA,YAAY,EAAE,uBAAuB;AACrC,IAAA,MAAM,EAAE,iBAAiB;;AAGzB,IAAA,iBAAiB,EAAE,4BAA4B;;;ICsGrC;AAAZ,CAAA,UAAY,cAAc,EAAA;AACtB,IAAA,cAAA,CAAA,cAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAQ;AACR,IAAA,cAAA,CAAA,cAAA,CAAA,SAAA,CAAA,GAAA,CAAA,CAAA,GAAA,SAAW;AACX,IAAA,cAAA,CAAA,cAAA,CAAA,WAAA,CAAA,GAAA,CAAA,CAAA,GAAA,WAAkB;AAClB,IAAA,cAAA,CAAA,cAAA,CAAA,QAAA,CAAA,GAAA,CAAA,CAAA,GAAA,QAAe;AACnB,CAAC,EALW,cAAc,KAAd,cAAc,GAAA,EAAA,CAAA,CAAA;IAOd;AAAZ,CAAA,UAAY,oBAA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