@arsedizioni/ars-utils 21.2.310 → 21.2.313
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-help.mjs +19 -36
- package/fesm2022/arsedizioni-ars-utils-help.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-support.ui.mjs +4 -10
- package/fesm2022/arsedizioni-ars-utils-support.ui.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.application.mjs +173 -88
- package/fesm2022/arsedizioni-ars-utils-ui.application.mjs.map +1 -1
- package/package.json +1 -1
- package/types/arsedizioni-ars-utils-clipper.ui.d.ts +1 -1
- package/types/arsedizioni-ars-utils-help.d.ts +4 -7
- package/types/arsedizioni-ars-utils-support.ui.d.ts +2 -4
- package/types/arsedizioni-ars-utils-ui.application.d.ts +51 -24
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, viewChild, inject,
|
|
2
|
+
import { Injectable, viewChild, inject, DestroyRef, signal, computed, afterNextRender, ChangeDetectionStrategy, ViewEncapsulation, Component, NgModule } from '@angular/core';
|
|
3
3
|
import { DialogService } from '@arsedizioni/ars-utils/ui';
|
|
4
4
|
import { HttpClient } from '@angular/common/http';
|
|
5
5
|
import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';
|
|
6
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
6
7
|
import * as i2 from '@angular/material/button';
|
|
7
8
|
import { MatButtonModule } from '@angular/material/button';
|
|
8
9
|
import { MatDialogRef, MAT_DIALOG_DATA, MatDialogTitle, MatDialogContent } from '@angular/material/dialog';
|
|
@@ -18,8 +19,7 @@ import * as i7 from '@angular/material/tree';
|
|
|
18
19
|
import { MatTree, MatTreeModule } from '@angular/material/tree';
|
|
19
20
|
import { SafeHtmlPipe, SystemUtils } from '@arsedizioni/ars-utils/core';
|
|
20
21
|
import { FlexLayoutModule } from '@ngbracket/ngx-layout';
|
|
21
|
-
import { BehaviorSubject
|
|
22
|
-
import { takeUntil } from 'rxjs/operators';
|
|
22
|
+
import { BehaviorSubject } from 'rxjs';
|
|
23
23
|
import * as i1 from '@ngbracket/ngx-layout/flex';
|
|
24
24
|
|
|
25
25
|
class IndexInfo {
|
|
@@ -151,8 +151,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
151
151
|
class HelpViewerComponent {
|
|
152
152
|
constructor() {
|
|
153
153
|
this.indexPane = viewChild.required('indexPane');
|
|
154
|
-
this.
|
|
155
|
-
this.changeDetector = inject(ChangeDetectorRef);
|
|
154
|
+
this.destroyRef = inject(DestroyRef);
|
|
156
155
|
this.dialogRef = inject((MatDialogRef));
|
|
157
156
|
this.dialogData = inject(MAT_DIALOG_DATA) ?? { id: '1' };
|
|
158
157
|
this.dialogService = inject(DialogService);
|
|
@@ -170,45 +169,29 @@ class HelpViewerComponent {
|
|
|
170
169
|
/** Flat list of all tree nodes used as the tree data source. */
|
|
171
170
|
this.flatNodes = signal([], ...(ngDevMode ? [{ debugName: "flatNodes" }] : /* istanbul ignore next */ []));
|
|
172
171
|
this.hasChild = (_, _node) => _node.expandable;
|
|
173
|
-
}
|
|
174
|
-
ngOnInit() {
|
|
175
172
|
// Subscribe data change
|
|
176
173
|
this.tree.dataChange
|
|
177
|
-
.pipe(
|
|
174
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
178
175
|
.subscribe(data => this.flatNodes.set(this.flattenNodes(data)));
|
|
179
|
-
// Observe layout changes
|
|
180
|
-
this.breakpointObserver
|
|
181
|
-
.observe([
|
|
182
|
-
Breakpoints.XSmall,
|
|
183
|
-
Breakpoints.Small,
|
|
184
|
-
Breakpoints.Medium,
|
|
185
|
-
Breakpoints.Large,
|
|
186
|
-
Breakpoints.XLarge,
|
|
187
|
-
])
|
|
188
|
-
.pipe(takeUntil(this.unsubscribe))
|
|
189
|
-
.subscribe(result => {
|
|
190
|
-
for (const query of Object.keys(result.breakpoints)) {
|
|
191
|
-
if (result.breakpoints[query]) {
|
|
192
|
-
this.handleFilterPaneVisibility();
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
});
|
|
196
176
|
this.getToc();
|
|
197
177
|
this.indexId = this.dialogData.id;
|
|
198
178
|
if (this.indexId) {
|
|
199
179
|
this.getChapter(this.indexId);
|
|
200
180
|
}
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
181
|
+
afterNextRender(() => {
|
|
182
|
+
// Observe layout changes — must run after view init so indexPane is available
|
|
183
|
+
this.breakpointObserver
|
|
184
|
+
.observe([
|
|
185
|
+
Breakpoints.XSmall,
|
|
186
|
+
Breakpoints.Small,
|
|
187
|
+
Breakpoints.Medium,
|
|
188
|
+
Breakpoints.Large,
|
|
189
|
+
Breakpoints.XLarge,
|
|
190
|
+
])
|
|
191
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
192
|
+
.subscribe(() => this.handleFilterPaneVisibility());
|
|
209
193
|
this.indexPaneClosed = !this.indexPane().opened;
|
|
210
|
-
}
|
|
211
|
-
this.changeDetector.detectChanges();
|
|
194
|
+
});
|
|
212
195
|
}
|
|
213
196
|
/**
|
|
214
197
|
* Handle filter pane visibility
|
|
@@ -454,7 +437,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
454
437
|
type: Component,
|
|
455
438
|
args: [{ host: { 'Bind': SystemUtils.generateUUID() }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [IndexTreeDataSource], standalone: true, imports: [FlexLayoutModule, MatButtonModule, MatTooltipModule, MatIconModule, MatProgressBarModule, MatDialogTitle, MatDialogContent,
|
|
456
439
|
MatSidenavModule, MatTreeModule, SafeHtmlPipe], template: "<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]=\"flatNodes()\" [levelAccessor]=\"levelAccessor\" 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 #treeNodeRef=\"matTreeNode\" *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 {{treeNodeRef.isExpanded ? '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>", styles: [".dialog-info{font-size:x-small;font-weight:700;text-align:right;padding:10px}.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #388E3C)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #a80710)}.dialog-header{padding-bottom:20px}.dialog-toolbar{padding:0 5px 0 24px;height:48px;min-height:48px}.dialog-close{margin-right:5px;margin-top:0}.dialog-menu{margin-left:10px;margin-top:10px}.dialog-title{padding:0 24px}.section-title{font-size:large;font-weight:600;padding-top:10px;padding-bottom:8px}.center{text-align:center}.wide{min-width:100%!important;max-width:100%!important;width:100%!important}.fill{min-width:100%!important;max-width:100%!important;width:100%!important;min-height:100%!important;max-height:100%!important;height:100%!important}.scroll-auto{overflow:auto;height:100%}.scroll-hidden{overflow:hidden;height:100%}b{font-weight:700}.large{font-size:large!important}.smaller{font-size:smaller!important}.small{font-size:small!important;line-height:16px!important}.small-icon-button{width:1.5rem!important;height:1.5rem!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center}.small-icon-button .mat-mdc-button-touch-target{width:1.5rem!important;height:1.5rem!important}.x-small{font-size:x-small!important;line-height:14px!important}.bold{font-weight:700}.uppercase{text-transform:uppercase!important}.lowercase{text-transform:lowercase!important}.truncated{min-width:0;max-width:100%}@supports (-webkit-line-clamp: 2){.truncated{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.truncated span,.truncated div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@supports (-webkit-line-clamp: 2){.truncated span,.truncated div{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.clipped{min-width:0;max-width:100%}.clipped span,.clipped div{white-space:nowrap;overflow:hidden;text-overflow:clip}.accent{color:var(--ars-color-accent, #7894ae)!important}.primary{color:var(--ars-color-primary, #00a293)!important}.secondary{color:var(--ars-color-secondary, #4a635f)!important}.error{color:var(--ars-color-error, #ff5449)!important}.success{color:var(--ars-color-ok, #388E3C)!important}.warning{color:var(--ars-color-warning, #FFC107)!important}.text{color:var(--ars-color-text, #191c1b)!important}.overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10;background-color:var(--ars-color-overlay, rgba(255, 255, 255, .75))}.drawer-content{padding-top:10px}.drawer .title-container,.drawer-small .title-container{padding:20px 5px 20px 0}.drawer .title-container-with-loader,.drawer-small .title-container-with-loader{padding:14px 5px 20px 0}.drawer .title,.drawer-small .title{font-size:19.2px!important;font-weight:600;padding-left:15px;min-width:150px;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.drawer .accordion-panel,.drawer-small .accordion-panel{background-color:transparent!important}.drawer .accordion-header,.drawer-small .accordion-header{padding-left:10px;padding-right:10px;border-radius:var(--mat-expansion-container-shape)}.drawer .mat-expansion-panel-body,.drawer-small .mat-expansion-panel-body{padding-left:10px!important;padding-right:10px!important;padding-bottom:20px!important}@media screen and (min-width:0px)and (max-width:430px){.drawer,.drawer-small{border-radius:0!important;min-width:100%!important;max-width:100%!important}}@media screen and (min-width:431px){.drawer{min-width:420px!important;max-width:420px!important}.drawer .title{min-width:200px}.drawer .mat-expansion-panel-body{padding-left:15px!important;padding-right:15px!important;padding-bottom:20px!important}.drawer-small{min-width:360px!important;max-width:360px!important}}.drawer-with-loader{padding-top:0!important}.drawer-transparent{background-color:transparent}.fade-in{animation:fadein .5s linear}@keyframes fadein{0%{opacity:0}to{opacity:1}}.bright{filter:brightness(.7)!important}@media(prefers-color-scheme:dark){.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #4CAF50)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #ff5449)}b,.bold{font-weight:600}.bright{filter:brightness(1.5)!important}}.dialog-menu{margin-top:4px!important}.tree{overflow-x:hidden}.tree-node{min-height:36px!important;padding-right:12px;margin-right:0}.tree-node .small-icon-button{width:2rem!important;height:2rem!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center}.tree-node .small-icon-button .mat-mdc-button-touch-target{width:2rem!important;height:2rem!important}.tree-node:hover{cursor:pointer;background-color:var(--mat-menu-item-hover-state-layer-color, transparent);border-radius:24px}.tree-node-simple,.tree-node-simple>div{min-height:32px!important}.tree-node-activated,.tree-node-activated>div{font-weight:700!important;color:var(--ars-color-accent, #7894ae)!important}a.help-link,.help-link>a{text-decoration:none;color:#2a91e0}.help-title-2,.help-title-1{font-weight:600!important}.help-word-hit{font-size:inherit;background-color:var(--ars-word-hit-background-color, yellow);padding:0 4px}.help-hint{margin:10px;padding:5px 20px;background-color:var(--ars-help-hint-background-color, lightgoldenrodyellow);border-radius:12px}.help-summary{margin:10px;padding:5px 20px;background-color:var(--ars-help-summary-background-color, lavender);border-radius:12px}.help-img{display:flex;align-items:center;justify-content:center;margin:10px}.help-img-200,.help-img-300,.help-img-400,.help-img-500,.help-img-700,.help-img-800{width:100%}.help-img-200{max-width:200px}.help-img-300{max-width:300px}.help-img-400{max-width:400px}.help-img-500{max-width:500px}.help-img-600{max-width:600px}.help-img-700{max-width:700px}.help-img-800{max-width:800px}.help-filter-box{background-color:var(--ars-filterbox-filtered-background-color, #f9fbe7);border-radius:12px;padding:6px;display:inline-block;margin:0 0 8px 10px}.mat-mdc-dialog-content{max-height:unset!important;padding:0!important}\n"] }]
|
|
457
|
-
}], propDecorators: { indexPane: [{ type: i0.ViewChild, args: ['indexPane', { isSignal: true }] }], matTree: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatTree), { isSignal: true }] }] } });
|
|
440
|
+
}], ctorParameters: () => [], propDecorators: { indexPane: [{ type: i0.ViewChild, args: ['indexPane', { isSignal: true }] }], matTree: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatTree), { isSignal: true }] }] } });
|
|
458
441
|
|
|
459
442
|
class HelpService {
|
|
460
443
|
constructor() {
|
|
@@ -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 { 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 { MatTree, 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, Subject } 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 private tree = inject(IndexTreeDataSource);\r\n readonly matTree = viewChild<MatTree<IndexNode>>(MatTree);\r\n /** Provides the level of a flat node to the tree component. */\r\n protected readonly levelAccessor = (node: IndexNode) => node.level;\r\n /** Flat list of all tree nodes used as the tree data source. */\r\n protected readonly flatNodes = signal<IndexNode[]>([]);\r\n private folders?: IndexInfo[];\r\n protected hasChild = (_: number, _node: IndexNode) => _node.expandable;\r\n\r\n ngOnInit(): void {\r\n\r\n // Subscribe data change\r\n this.tree.dataChange\r\n .pipe(takeUntil(this.unsubscribe))\r\n .subscribe(data => this.flatNodes.set(this.flattenNodes(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.flatNodes().find(n => n.id === this.indexNode!.id);\r\n if (current) {\r\n this.matTree()?.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.flatNodes().find(x => x.id === n!.id);\r\n if (ancestor) this.matTree()?.expand(ancestor);\r\n n = n.parent;\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Recursively flattens a nested IndexInfo tree into a depth-first ordered array of IndexNodes.\r\n * @param items - Root-level nodes to flatten.\r\n * @param level - Current depth level.\r\n */\r\n private flattenNodes(items: IndexInfo[], level = 0): IndexNode[] {\r\n const result: IndexNode[] = [];\r\n for (const node of items) {\r\n result.push(new IndexNode(node, level));\r\n if (node.children?.length) {\r\n result.push(...this.flattenNodes(node.children, level + 1));\r\n }\r\n }\r\n return result;\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]=\"flatNodes()\" [levelAccessor]=\"levelAccessor\" 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 #treeNodeRef=\"matTreeNode\" *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 {{treeNodeRef.isExpanded ? '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":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;MAoBa,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,CAAA,UAAU,GAAG,IAAI,eAAe,CAAc,EAAE,CAAC;AAuGlD,IAAA;AArGC,IAAA,IAAI,IAAI,GAAA;AACN,QAAA,OAAO,IAAI,CAAC,UAAU,CAAC,KAAK;IAC9B;IAEA,WAAW,GAAA;AACT,QAAA,IAAI,CAAC,UAAU,CAAC,WAAW,EAAE;IAC/B;AAEA;;;AAGG;AACH,IAAA,UAAU,CAAC,IAAiB,EAAA;AAC1B,QAAA,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC;IAC5B;AAEA;;;;;AAKG;IACH,QAAQ,CAAC,IAAkC,EAAE,EAAU,EAAA;AACrD,QAAA,IAAI,QAAiC;AACrC,QAAA,IA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AG,WAAW,CAC9B;IACH;AAEA;;;AAGG;IACH,IAAI,CAAC,KAAa,GAAG,EAAA;AACnB,QAAA,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,mBAAmB,EAAE;AAC3C,YAAA,SAAS,EAAE,OAAO;AAClB,YAAA,SAAS,EAAE,KAAK;AAChB,YAAA,YAAY,EAAE,KAAK;AACnB,YAAA,YAAY,EAAE,IAAI;YAClB,IAAI,EAAE,EAAE,EAAE,EAAE;AACZ,YAAA,QAAQ,EAAE,OAAO;AACjB,YAAA,QAAQ,EAAE,QAAQ;AAClB,YAAA,KAAK,EAAE,MAAM;AACb,YAAA,MAAM,EAAE;AACT,SAAA,CAAC;IACJ;+GA/EW,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAX,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAW,cAFV,MAAM,EAAA,CAAA,CAAA;;4FAEP,WAAW,EAAA,UAAA,EAAA,CAAA;kBAHvB,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE;AACb,iBAAA;;;MCNY,aAAa,CAAA;+GAAb,aAAa,EAAA,IAAA,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;;;;"}
|
|
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 { ChangeDetectionStrategy, Component, DestroyRef, Injectable, OnDestroy, ViewEncapsulation, afterNextRender, computed, inject, signal, viewChild } from '@angular/core';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\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 { MatTree, 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 } from 'rxjs';\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 {\r\n readonly indexPane = viewChild.required<MatSidenav>('indexPane');\r\n\r\n private readonly destroyRef = inject(DestroyRef);\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 private tree = inject(IndexTreeDataSource);\r\n readonly matTree = viewChild<MatTree<IndexNode>>(MatTree);\r\n /** Provides the level of a flat node to the tree component. */\r\n protected readonly levelAccessor = (node: IndexNode) => node.level;\r\n /** Flat list of all tree nodes used as the tree data source. */\r\n protected readonly flatNodes = signal<IndexNode[]>([]);\r\n private folders?: IndexInfo[];\r\n protected hasChild = (_: number, _node: IndexNode) => _node.expandable;\r\n\r\n constructor() {\r\n // Subscribe data change\r\n this.tree.dataChange\r\n .pipe(takeUntilDestroyed(this.destroyRef))\r\n .subscribe(data => this.flatNodes.set(this.flattenNodes(data)));\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 afterNextRender(() => {\r\n // Observe layout changes — must run after view init so indexPane is available\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(takeUntilDestroyed(this.destroyRef))\r\n .subscribe(() => this.handleFilterPaneVisibility());\r\n\r\n this.indexPaneClosed = !this.indexPane().opened;\r\n });\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.flatNodes().find(n => n.id === this.indexNode!.id);\r\n if (current) {\r\n this.matTree()?.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.flatNodes().find(x => x.id === n!.id);\r\n if (ancestor) this.matTree()?.expand(ancestor);\r\n n = n.parent;\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Recursively flattens a nested IndexInfo tree into a depth-first ordered array of IndexNodes.\r\n * @param items - Root-level nodes to flatten.\r\n * @param level - Current depth level.\r\n */\r\n private flattenNodes(items: IndexInfo[], level = 0): IndexNode[] {\r\n const result: IndexNode[] = [];\r\n for (const node of items) {\r\n result.push(new IndexNode(node, level));\r\n if (node.children?.length) {\r\n result.push(...this.flattenNodes(node.children, level + 1));\r\n }\r\n }\r\n return result;\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]=\"flatNodes()\" [levelAccessor]=\"levelAccessor\" 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 #treeNodeRef=\"matTreeNode\" *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 {{treeNodeRef.isExpanded ? '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":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;MAoBa,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,CAAA,UAAU,GAAG,IAAI,eAAe,CAAc,EAAE,CAAC;AAuGlD,IAAA;AArGC,IAAA,IAAI,IAAI,GAAA;AACN,QAAA,OAAO,IAAI,CAAC,UAAU,CAAC,KAAK;IAC9B;IAEA,WAAW,GAAA;AACT,QAAA,IAAI,CAAC,UAAU,CAAC,WAAW,EAAE;IAC/B;AAEA;;;AAGG;AACH,IAAA,UAAU,CAAC,IAAiB,EAAA;AAC1B,QAAA,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC;IAC5B;AAEA;;;;;AAKG;IACH,QAAQ,CAAC,IAAkC,EAAE,EAAU,EAAA;AACrD,QAAA,IAAI,QAAiC;AACrC,QAAA,IAAI,IAAI,IAAI,IAAI,CAAC,EAAE,KAAK,EAAE;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UAAA,EAAA,CAAA,CAAA;AAAX,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAW,cAFV,MAAM,EAAA,CAAA,CAAA;;4FAEP,WAAW,EAAA,UAAA,EAAA,CAAA;kBAHvB,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE;AACb,iBAAA;;;MCNY,aAAa,CAAA;+GAAb,aAAa,EAAA,IAAA,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;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, signal, ChangeDetectionStrategy, Component, viewChild, DestroyRef } from '@angular/core';
|
|
2
|
+
import { inject, signal, ChangeDetectionStrategy, Component, viewChild, DestroyRef, afterNextRender } from '@angular/core';
|
|
3
3
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
4
4
|
import * as i7 from '@angular/forms';
|
|
5
5
|
import { FormsModule } from '@angular/forms';
|
|
@@ -44,8 +44,6 @@ class SupportNotificationComponent {
|
|
|
44
44
|
this.id = this.dialogData?.id ?? -1;
|
|
45
45
|
/** The loaded notification; `undefined` until the fetch completes. */
|
|
46
46
|
this.item = signal(undefined, ...(ngDevMode ? [{ debugName: "item" }] : /* istanbul ignore next */ []));
|
|
47
|
-
}
|
|
48
|
-
ngOnInit() {
|
|
49
47
|
this.fetch();
|
|
50
48
|
}
|
|
51
49
|
/**
|
|
@@ -88,7 +86,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
88
86
|
type: Component,
|
|
89
87
|
args: [{ host: { 'Bind': SystemUtils.generateUUID() }, standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [FlexModule, MatDialogTitle, MatButtonModule, MatTooltipModule, MatDialogClose, MatIconModule, MatDialogContent,
|
|
90
88
|
MatDialogActions, MatMenuModule, SafeHtmlPipe], template: "<div class=\"support-notification-fixed\">\r\n <div class=\"support-notification-header\">\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutGap=\"10px\" fxFill >\r\n <div fxFlex=\"*\">\r\n <h2 mat-dialog-title>{{item()?.title}}</h2>\r\n </div>\r\n <div fxLayoutAlign=\"end\">\r\n <button fxFlexAlign=\"start\" type=\"button\" mat-icon-button matTooltip=\"Chiudi\"\r\n aria-label=\"Chiudi\" [mat-dialog-close]=\"true\" class=\"dialog-close\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n<mat-dialog-content id=\"notification-scrollable\">\r\n <div id=\"notification-scroller\">\r\n <div [innerHtml]=\"(item()?.text ?? 'Caricamento in corso...') | safeHtml\"></div>\r\n </div>\r\n</mat-dialog-content>\r\n@if (item()?.documents && item()!.documents!.length > 0) {\r\n<mat-dialog-actions class=\"notification-fixed\">\r\n <div style=\"padding: 10px 0\">\r\n <button type=\"button\" mat-button [attr.aria-label]=\"'Documenti scaricabili'\" [matMenuTriggerFor]=\"documentsMenu\">\r\n {{item()!.documents!.length}}\r\n @if (item()!.documents!.length === 1) {\r\n <span>Documento scaricabile</span>\r\n } @else {\r\n <span>Documenti scaricabili</span>\r\n }\r\n <mat-icon class=\"icon-menu-drop-down\">arrow_drop_down</mat-icon>\r\n </button>\r\n <mat-menu #documentsMenu=\"matMenu\">\r\n <ng-template matMenuContent>\r\n @for (doc of item()!.documents; track doc.id) {\r\n <button mat-menu-item (click)=\"downloadDocument(doc)\">\r\n @if (doc.isBinary) {\r\n <mat-icon>attach_file</mat-icon>\r\n } @else {\r\n <mat-icon>link</mat-icon>\r\n }\r\n {{doc.name}}\r\n </button>\r\n }\r\n </ng-template>\r\n </mat-menu>\r\n </div>\r\n</mat-dialog-actions>\r\n}", styles: [".dialog-info{font-size:x-small;font-weight:700;text-align:right;padding:10px}.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #388E3C)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #a80710)}.dialog-header{padding-bottom:20px}.dialog-toolbar{padding:0 5px 0 24px;height:48px;min-height:48px}.dialog-close{margin-right:5px;margin-top:0}.dialog-menu{margin-left:10px;margin-top:10px}.dialog-title{padding:0 24px}.section-title{font-size:large;font-weight:600;padding-top:10px;padding-bottom:8px}.center{text-align:center}.wide{min-width:100%!important;max-width:100%!important;width:100%!important}.fill{min-width:100%!important;max-width:100%!important;width:100%!important;min-height:100%!important;max-height:100%!important;height:100%!important}.scroll-auto{overflow:auto;height:100%}.scroll-hidden{overflow:hidden;height:100%}b{font-weight:700}.large{font-size:large!important}.smaller{font-size:smaller!important}.small{font-size:small!important;line-height:16px!important}.small-icon-button{width:1.5rem!important;height:1.5rem!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center}.small-icon-button .mat-mdc-button-touch-target{width:1.5rem!important;height:1.5rem!important}.x-small{font-size:x-small!important;line-height:14px!important}.bold{font-weight:700}.uppercase{text-transform:uppercase!important}.lowercase{text-transform:lowercase!important}.truncated{min-width:0;max-width:100%}@supports (-webkit-line-clamp: 2){.truncated{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.truncated span,.truncated div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@supports (-webkit-line-clamp: 2){.truncated span,.truncated div{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.clipped{min-width:0;max-width:100%}.clipped span,.clipped div{white-space:nowrap;overflow:hidden;text-overflow:clip}.accent{color:var(--ars-color-accent, #7894ae)!important}.primary{color:var(--ars-color-primary, #00a293)!important}.secondary{color:var(--ars-color-secondary, #4a635f)!important}.error{color:var(--ars-color-error, #ff5449)!important}.success{color:var(--ars-color-ok, #388E3C)!important}.warning{color:var(--ars-color-warning, #FFC107)!important}.text{color:var(--ars-color-text, #191c1b)!important}.overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10;background-color:var(--ars-color-overlay, rgba(255, 255, 255, .75))}.drawer-content{padding-top:10px}.drawer .title-container,.drawer-small .title-container{padding:20px 5px 20px 0}.drawer .title-container-with-loader,.drawer-small .title-container-with-loader{padding:14px 5px 20px 0}.drawer .title,.drawer-small .title{font-size:19.2px!important;font-weight:600;padding-left:15px;min-width:150px;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.drawer .accordion-panel,.drawer-small .accordion-panel{background-color:transparent!important}.drawer .accordion-header,.drawer-small .accordion-header{padding-left:10px;padding-right:10px;border-radius:var(--mat-expansion-container-shape)}.drawer .mat-expansion-panel-body,.drawer-small .mat-expansion-panel-body{padding-left:10px!important;padding-right:10px!important;padding-bottom:20px!important}@media screen and (min-width:0px)and (max-width:430px){.drawer,.drawer-small{border-radius:0!important;min-width:100%!important;max-width:100%!important}}@media screen and (min-width:431px){.drawer{min-width:420px!important;max-width:420px!important}.drawer .title{min-width:200px}.drawer .mat-expansion-panel-body{padding-left:15px!important;padding-right:15px!important;padding-bottom:20px!important}.drawer-small{min-width:360px!important;max-width:360px!important}}.drawer-with-loader{padding-top:0!important}.drawer-transparent{background-color:transparent}.fade-in{animation:fadein .5s linear}@keyframes fadein{0%{opacity:0}to{opacity:1}}.bright{filter:brightness(.7)!important}@media(prefers-color-scheme:dark){.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #4CAF50)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #ff5449)}b,.bold{font-weight:600}.bright{filter:brightness(1.5)!important}}.mat-mdc-dialog-content{max-height:unset!important}img{border-radius:12px!important;transition:box-shadow .3s ease!important}@media(prefers-color-scheme:light){img{box-shadow:0 25px 25px #0000004d!important}}@media(prefers-color-scheme:dark){img{box-shadow:0 25px 25px #ffffff1a!important}}\n"] }]
|
|
91
|
-
}] });
|
|
89
|
+
}], ctorParameters: () => [] });
|
|
92
90
|
|
|
93
91
|
class SupportNotificationsBrowserComponent {
|
|
94
92
|
constructor() {
|
|
@@ -105,8 +103,6 @@ class SupportNotificationsBrowserComponent {
|
|
|
105
103
|
};
|
|
106
104
|
this.total = signal(-1, ...(ngDevMode ? [{ debugName: "total" }] : /* istanbul ignore next */ []));
|
|
107
105
|
this.items = signal([], ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
108
|
-
}
|
|
109
|
-
ngOnInit() {
|
|
110
106
|
// React to message broadcasting
|
|
111
107
|
this.broadcastService.getMessage()
|
|
112
108
|
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
@@ -115,9 +111,7 @@ class SupportNotificationsBrowserComponent {
|
|
|
115
111
|
this.items.update(list => list.map(n => n.id === message.data ? { ...n, isRead: true } : n));
|
|
116
112
|
}
|
|
117
113
|
});
|
|
118
|
-
|
|
119
|
-
ngAfterViewInit() {
|
|
120
|
-
this.find();
|
|
114
|
+
afterNextRender(() => this.find());
|
|
121
115
|
}
|
|
122
116
|
/**
|
|
123
117
|
* Scrolls the notifications list back to the top.
|
|
@@ -252,7 +246,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
252
246
|
args: [{ host: { 'Bind': SystemUtils.generateUUID() }, standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [FlexLayoutModule, MatDialogTitle, MatButtonModule, MatTooltipModule, MatDialogClose,
|
|
253
247
|
MatIconModule, MatFormFieldModule, MatInputModule, FormsModule, MatMenuModule, MatBadgeModule, MatDividerModule, MatDialogContent,
|
|
254
248
|
MatCheckboxModule, MatDialogActions, MatPaginatorModule, FormatPipe], template: "<div class=\"notifications-browser-fixed\">\r\n <div class=\"notifications-browser-header\">\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutGap=\"10px\" fxFill>\r\n <div fxFlex=\"*\">\r\n <h2 mat-dialog-title>Novit\u00E0 e informazioni</h2>\r\n </div>\r\n <div fxLayoutAlign=\"end\">\r\n <button fxFlexAlign=\"start\" type=\"button\" mat-icon-button matTooltip=\"Chiudi\" aria-label=\"Chiudi\"\r\n [mat-dialog-close]=\"true\" class=\"dialog-close\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n <div style=\"padding-left: 24px; padding-right: 24px; padding-bottom: 10px;\">\r\n <div fxLayout=\"row wrap\" fxFill fxLayoutAlign=\"space-between\">\r\n <div fxFlex=\"200px\" fxFlexAlign=\"end\">\r\n <mat-form-field style=\"width:200px\" subscriptSizing=\"dynamic\" appearance=\"outline\">\r\n <mat-label>Cerca</mat-label>\r\n <input matInput #searchInput=\"matInput\" type=\"text\" [(ngModel)]=\"searchParams.any\" maxlength=\"200\"\r\n (keyup.Enter)=\"find()\" autofocus placeholder=\"Inserisci testo + INVIO...\" />\r\n @if (searchParams.any) {\r\n <button type=\"button\" tabindex=\"-1\" matSuffix mat-icon-button aria-label=\"Pulisci\"\r\n (click)=\"searchParams.any = ''\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n }\r\n </mat-form-field>\r\n </div>\r\n <div fxFlex=\"*\" fxLayoutAlign=\"end\">\r\n <div fxFlexAlign=\"center\">\r\n @if (selection.hasValue()) {\r\n <button type=\"button\" mat-icon-button matTooltip=\"Azioni da eseguire sugli elementi selezionati\"\r\n [attr.aria-label]=\"'Menu opzioni per elementi selezionati'\" [matMenuTriggerFor]=\"menuSelections\">\r\n <mat-icon aria-hidden=\"false\" [matBadge]=\"selection.all.length\">checklist</mat-icon>\r\n </button>\r\n }\r\n <mat-menu #menuSelections=\"matMenu\">\r\n <button mat-menu-item (click)=\"selection.clear()\" [attr.aria-label]=\"'Deseleziona tutti'\">\r\n <mat-icon>clear</mat-icon>Deseleziona tutti\r\n </button>\r\n <mat-divider></mat-divider>\r\n <button mat-menu-item [attr.aria-label]=\"'Segna come da leggere'\" (click)=\"mark(undefined, true)\">\r\n <mat-icon>outlined_flag</mat-icon>Segna come da leggere\r\n </button>\r\n <button mat-menu-item [attr.aria-label]=\"'Segna come gi\u00E0 letto'\" (click)=\"mark(undefined)\">\r\n <mat-icon>flag</mat-icon>Segna come gi\u00E0 letto\r\n </button>\r\n </mat-menu>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n<mat-dialog-content id=\"notifications-browser-scrollable\">\r\n <div id=\"notifications-browser-scroller\">\r\n @if (total() === 0) {\r\n <div>\r\n <p class=\"message\"><i>Nessun elemento da visualizzare.</i></p>\r\n </div>\r\n } @else {\r\n <div>\r\n @for (item of items(); track item.id; let i = $index) {\r\n <div (mouseenter)=\"item.isOver = true;\" (mouseleave)=\"item.isOver = false\"\r\n [matContextMenuTriggerFor]=\"contextMenu\" [matContextMenuTriggerData]=\"{item: item}\">\r\n <div class=\"news\" fxLayout=\"row\" fxLayoutGap=\"6px\" fxFill [class.news-selected]=\"selection.isSelected(item.id)\"\r\n [class.news-read]=\"item.isRead\">\r\n <div fxFlex=\"6px\" [class]=\"getItemStateCssClass(item)\" [matTooltip]=\"getItemStateTooltip(item)\">\r\n </div>\r\n <div fxFlex=\"48px\" fxFlexAlign=\"center\" fxLayoutAlign=\"center\">\r\n @if (screenService.isTouchable || item.isOver || selection.isSelected(item.id)) {\r\n <mat-checkbox (change)=\"$event ? selection.toggle(item, item.id) : null\"\r\n [checked]=\"selection.isSelected(item.id)\">\r\n </mat-checkbox>\r\n }\r\n </div>\r\n <div fxFlex=\"*\" fxFlexAlign=\"center\" (click)=\"show(item); $event.stopPropagation()\">\r\n <div class=\"info-1 uppercase\">\r\n {{ (item.publishingDate ?? item.created) | format:'D':'dd/MM/yyyy'}}</div>\r\n <div>{{item.title}}</div>\r\n <div class=\"info-2 uppercase\">\r\n {{item.productNames}}\r\n @if (item.productModuleNames) {\r\n <span> | {{item.productModuleNames}}</span>\r\n }\r\n </div>\r\n </div>\r\n <div fxFlex=\"50px\" fxFlexAlign=\"center\">\r\n <button type=\"button\" mat-icon-button matTooltip=\"Menu\" [attr.aria-label]=\"'Menu opzioni'\"\r\n [matMenuTriggerFor]=\"contextMenu\" [matMenuTriggerData]=\"{item: item}\" (click)=\"item.isMenuOpen = true\"\r\n [hidden]=\"!(item.isOver || item.isMenuOpen || selection.isSelected(item.id))\">\r\n <mat-icon>more_vert</mat-icon>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n <mat-menu #contextMenu=\"matMenu\" (closed)=\"updateMenuButtonsVisibility()\">\r\n <ng-template matMenuContent let-item=\"item\">\r\n @if (item.isRead) {\r\n <button mat-menu-item [attr.aria-label]=\"'Segna come da leggere'\" (click)=\"mark(item, true)\">\r\n <mat-icon>flag</mat-icon>Segna come da leggere\r\n </button>\r\n } @else {\r\n <button mat-menu-item [attr.aria-label]=\"'Segna come da gi\u00E0 letto'\" (click)=\"mark(item)\">\r\n <mat-icon>outlined_flag</mat-icon>Segna come gi\u00E0 letto\r\n </button>\r\n }\r\n </ng-template>\r\n </mat-menu>\r\n </div>\r\n }\r\n </div>\r\n</mat-dialog-content>\r\n<mat-dialog-actions class=\"notifications-browser-fixed\">\r\n <div fxLayout=\"row wrap\" fxLayoutGap=\"10px\" fxLayoutAlign=\"space-between\" fxFill>\r\n <!-- legend -->\r\n <div fxFlex.lt-md=\"100\" class=\"legend-container\">\r\n <div class=\"legend unread-bg\"></div>\r\n da leggere\r\n </div>\r\n <div fxFlex.lt-md=\"100\" fxLayoutAlign=\"end\">\r\n <mat-paginator #paginator [hidePageSize]=\"true\" [length]=\"total()\" [pageSize]=\"searchParams.count\"\r\n [showFirstLastButtons]=\"true\" (page)=\"fetchMore($event)\"></mat-paginator>\r\n </div>\r\n </div>\r\n</mat-dialog-actions>", styles: [".dialog-info{font-size:x-small;font-weight:700;text-align:right;padding:10px}.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #388E3C)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #a80710)}.dialog-header{padding-bottom:20px}.dialog-toolbar{padding:0 5px 0 24px;height:48px;min-height:48px}.dialog-close{margin-right:5px;margin-top:0}.dialog-menu{margin-left:10px;margin-top:10px}.dialog-title{padding:0 24px}.section-title{font-size:large;font-weight:600;padding-top:10px;padding-bottom:8px}.center{text-align:center}.wide{min-width:100%!important;max-width:100%!important;width:100%!important}.fill{min-width:100%!important;max-width:100%!important;width:100%!important;min-height:100%!important;max-height:100%!important;height:100%!important}.scroll-auto{overflow:auto;height:100%}.scroll-hidden{overflow:hidden;height:100%}b{font-weight:700}.large{font-size:large!important}.smaller{font-size:smaller!important}.small{font-size:small!important;line-height:16px!important}.small-icon-button{width:1.5rem!important;height:1.5rem!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center}.small-icon-button .mat-mdc-button-touch-target{width:1.5rem!important;height:1.5rem!important}.x-small{font-size:x-small!important;line-height:14px!important}.bold{font-weight:700}.uppercase{text-transform:uppercase!important}.lowercase{text-transform:lowercase!important}.truncated{min-width:0;max-width:100%}@supports (-webkit-line-clamp: 2){.truncated{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.truncated span,.truncated div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@supports (-webkit-line-clamp: 2){.truncated span,.truncated div{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.clipped{min-width:0;max-width:100%}.clipped span,.clipped div{white-space:nowrap;overflow:hidden;text-overflow:clip}.accent{color:var(--ars-color-accent, #7894ae)!important}.primary{color:var(--ars-color-primary, #00a293)!important}.secondary{color:var(--ars-color-secondary, #4a635f)!important}.error{color:var(--ars-color-error, #ff5449)!important}.success{color:var(--ars-color-ok, #388E3C)!important}.warning{color:var(--ars-color-warning, #FFC107)!important}.text{color:var(--ars-color-text, #191c1b)!important}.overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10;background-color:var(--ars-color-overlay, rgba(255, 255, 255, .75))}.drawer-content{padding-top:10px}.drawer .title-container,.drawer-small .title-container{padding:20px 5px 20px 0}.drawer .title-container-with-loader,.drawer-small .title-container-with-loader{padding:14px 5px 20px 0}.drawer .title,.drawer-small .title{font-size:19.2px!important;font-weight:600;padding-left:15px;min-width:150px;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.drawer .accordion-panel,.drawer-small .accordion-panel{background-color:transparent!important}.drawer .accordion-header,.drawer-small .accordion-header{padding-left:10px;padding-right:10px;border-radius:var(--mat-expansion-container-shape)}.drawer .mat-expansion-panel-body,.drawer-small .mat-expansion-panel-body{padding-left:10px!important;padding-right:10px!important;padding-bottom:20px!important}@media screen and (min-width:0px)and (max-width:430px){.drawer,.drawer-small{border-radius:0!important;min-width:100%!important;max-width:100%!important}}@media screen and (min-width:431px){.drawer{min-width:420px!important;max-width:420px!important}.drawer .title{min-width:200px}.drawer .mat-expansion-panel-body{padding-left:15px!important;padding-right:15px!important;padding-bottom:20px!important}.drawer-small{min-width:360px!important;max-width:360px!important}}.drawer-with-loader{padding-top:0!important}.drawer-transparent{background-color:transparent}.fade-in{animation:fadein .5s linear}@keyframes fadein{0%{opacity:0}to{opacity:1}}.bright{filter:brightness(.7)!important}@media(prefers-color-scheme:dark){.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #4CAF50)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #ff5449)}b,.bold{font-weight:600}.bright{filter:brightness(1.5)!important}}.news{border-radius:12px;padding:10px 0;min-height:60px!important;margin-bottom:2px;font-weight:600}.news .info-1{font-size:small;text-transform:uppercase;color:var(--ars-color-accent, #7894ae)}.news .info-2{font-size:x-small;text-transform:uppercase;color:var(--ars-color-accent-low, #456179)}.news:hover{background-color:var(--ars-item-hover-background-color, #eaecef);cursor:pointer!important}.news-read{font-weight:400}.news-selected{background-color:var(--ars-item-selected-background-color, #ced1d2);border-radius:0}.message{color:var(--ars-color-secondary, #4a635f);padding:20px;text-align:center}.unread-bg{background-color:var(--ars-color-warning-low, #FFA000)}.legend-container{display:flex;flex-direction:row;align-items:center;font-size:x-small;text-transform:uppercase;font-weight:500;margin-left:16px}.legend-container .legend{display:inline-block;height:8px;width:8px;margin-right:4px}.legend-container .legend:not(:first-of-type){margin-left:10px}.mat-mdc-dialog-content{max-height:unset!important;padding:0!important}\n"] }]
|
|
255
|
-
}], propDecorators: { paginator: [{ type: i0.ViewChild, args: ['paginator', { isSignal: true }] }] } });
|
|
249
|
+
}], ctorParameters: () => [], propDecorators: { paginator: [{ type: i0.ViewChild, args: ['paginator', { isSignal: true }] }] } });
|
|
256
250
|
|
|
257
251
|
/*
|
|
258
252
|
* Public API Surface of ars-utils
|