@arsedizioni/ars-utils 22.1.5 → 22.5.2
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/README.md +158 -10
- package/clipper.ui/clipper.scss +564 -0
- package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs +1 -1
- package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs +11 -7
- package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-core.date.mjs +609 -0
- package/fesm2022/arsedizioni-ars-utils-core.date.mjs.map +1 -0
- package/fesm2022/arsedizioni-ars-utils-core.markdown.mjs +591 -0
- package/fesm2022/arsedizioni-ars-utils-core.markdown.mjs.map +1 -0
- package/fesm2022/arsedizioni-ars-utils-core.mjs +270 -1449
- package/fesm2022/arsedizioni-ars-utils-core.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs +1 -1
- package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-support.common.mjs +1 -1
- package/fesm2022/arsedizioni-ars-utils-support.common.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.application.mjs +14 -4108
- package/fesm2022/arsedizioni-ars-utils-ui.application.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.controls.mjs +962 -0
- package/fesm2022/arsedizioni-ars-utils-ui.controls.mjs.map +1 -0
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.auth.mjs +506 -0
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.auth.mjs.map +1 -0
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.mjs +450 -0
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.mjs.map +1 -0
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.prompt.mjs +184 -0
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.prompt.mjs.map +1 -0
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.select.mjs +825 -0
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.select.mjs.map +1 -0
- package/fesm2022/arsedizioni-ars-utils-ui.files.mjs +708 -0
- package/fesm2022/arsedizioni-ars-utils-ui.files.mjs.map +1 -0
- package/fesm2022/arsedizioni-ars-utils-ui.filters.mjs +426 -0
- package/fesm2022/arsedizioni-ars-utils-ui.filters.mjs.map +1 -0
- package/fesm2022/arsedizioni-ars-utils-ui.help.mjs +531 -0
- package/fesm2022/arsedizioni-ars-utils-ui.help.mjs.map +1 -0
- package/fesm2022/arsedizioni-ars-utils-ui.mjs +54 -1227
- package/fesm2022/arsedizioni-ars-utils-ui.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.navigation.mjs +1049 -0
- package/fesm2022/arsedizioni-ars-utils-ui.navigation.mjs.map +1 -0
- package/fesm2022/arsedizioni-ars-utils-ui.notifications.mjs +263 -0
- package/fesm2022/arsedizioni-ars-utils-ui.notifications.mjs.map +1 -0
- package/fesm2022/arsedizioni-ars-utils-ui.oauth.mjs +4 -3
- package/fesm2022/arsedizioni-ars-utils-ui.oauth.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.paginator.mjs +53 -0
- package/fesm2022/arsedizioni-ars-utils-ui.paginator.mjs.map +1 -0
- package/fesm2022/arsedizioni-ars-utils-ui.shell.mjs +517 -0
- package/fesm2022/arsedizioni-ars-utils-ui.shell.mjs.map +1 -0
- package/fesm2022/arsedizioni-ars-utils-ui.tinymce.mjs +246 -0
- package/fesm2022/arsedizioni-ars-utils-ui.tinymce.mjs.map +1 -0
- package/fesm2022/arsedizioni-ars-utils.mjs +13 -12
- package/fesm2022/arsedizioni-ars-utils.mjs.map +1 -1
- package/help/package.json +4 -0
- package/package.json +80 -14
- package/styles/ui.colors.scss +23 -0
- package/support.ui/package.json +4 -0
- package/tinymce/package.json +4 -0
- package/types/arsedizioni-ars-utils-clipper.common.d.ts +1 -2
- package/types/arsedizioni-ars-utils-clipper.ui.d.ts +4 -1
- package/types/arsedizioni-ars-utils-core.d.ts +684 -1004
- package/types/arsedizioni-ars-utils-core.date.d.ts +304 -0
- package/types/arsedizioni-ars-utils-core.markdown.d.ts +159 -0
- package/types/arsedizioni-ars-utils-ui.application.d.ts +10 -2022
- package/types/arsedizioni-ars-utils-ui.controls.d.ts +413 -0
- package/types/arsedizioni-ars-utils-ui.d.ts +183 -566
- package/types/arsedizioni-ars-utils-ui.dialogs.auth.d.ts +224 -0
- package/types/arsedizioni-ars-utils-ui.dialogs.d.ts +228 -0
- package/types/arsedizioni-ars-utils-ui.dialogs.prompt.d.ts +47 -0
- package/types/arsedizioni-ars-utils-ui.dialogs.select.d.ts +309 -0
- package/types/arsedizioni-ars-utils-ui.files.d.ts +271 -0
- package/types/arsedizioni-ars-utils-ui.filters.d.ts +163 -0
- package/types/arsedizioni-ars-utils-ui.help.d.ts +220 -0
- package/types/arsedizioni-ars-utils-ui.navigation.d.ts +650 -0
- package/types/arsedizioni-ars-utils-ui.notifications.d.ts +73 -0
- package/types/arsedizioni-ars-utils-ui.paginator.d.ts +23 -0
- package/types/arsedizioni-ars-utils-ui.shell.d.ts +345 -0
- package/types/arsedizioni-ars-utils-ui.tinymce.d.ts +63 -0
- package/types/arsedizioni-ars-utils.d.ts +4 -10
- package/ui.tinymce/README.md +12 -0
- package/ui.tinymce/langs/it.js +466 -0
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
|
|
3
|
+
/** Constants identifying each filter group slot and text filter channels. */
|
|
4
|
+
declare const Filters: {
|
|
5
|
+
FLT_1: number;
|
|
6
|
+
FLT_2: number;
|
|
7
|
+
FLT_3: number;
|
|
8
|
+
FLT_4: number;
|
|
9
|
+
FLT_5: number;
|
|
10
|
+
FLT_TEXT: number;
|
|
11
|
+
FLT_TEXT_1: number;
|
|
12
|
+
FLT_TEXT_2: number;
|
|
13
|
+
FLT_TEXT_3: number;
|
|
14
|
+
};
|
|
15
|
+
/** Describes a top-level filter group with optional items or a custom action. */
|
|
16
|
+
interface FilterGroup {
|
|
17
|
+
group?: number;
|
|
18
|
+
title?: string;
|
|
19
|
+
tooltip?: string;
|
|
20
|
+
items?: FilterItem[];
|
|
21
|
+
action?: any;
|
|
22
|
+
}
|
|
23
|
+
/** A single selectable entry within a FilterGroup. */
|
|
24
|
+
interface FilterItem {
|
|
25
|
+
group?: number;
|
|
26
|
+
title?: string;
|
|
27
|
+
titleSelected?: string;
|
|
28
|
+
description?: string;
|
|
29
|
+
divider?: boolean;
|
|
30
|
+
value?: any;
|
|
31
|
+
}
|
|
32
|
+
/** Event payload emitted when an active filter changes. */
|
|
33
|
+
declare class CurrentFilterChanged {
|
|
34
|
+
/** The updated filter state. */
|
|
35
|
+
filter: CurrentFilter;
|
|
36
|
+
/** The group slot that changed (see Filters constants). */
|
|
37
|
+
group: number;
|
|
38
|
+
}
|
|
39
|
+
/** Holds the current state of all active filters for a filter-bar component. */
|
|
40
|
+
declare class CurrentFilter {
|
|
41
|
+
flt1?: any;
|
|
42
|
+
flt1Name?: string;
|
|
43
|
+
flt2?: any;
|
|
44
|
+
flt2Name?: string;
|
|
45
|
+
flt3?: any;
|
|
46
|
+
flt3Name?: string;
|
|
47
|
+
flt4?: any;
|
|
48
|
+
flt4Name?: string;
|
|
49
|
+
flt5?: any;
|
|
50
|
+
flt5Name?: string;
|
|
51
|
+
text?: string;
|
|
52
|
+
text2?: string;
|
|
53
|
+
text3?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Returns true if any filter slot or text field is currently active.
|
|
56
|
+
* @returns Whether at least one filter is applied.
|
|
57
|
+
*/
|
|
58
|
+
filtered(): boolean;
|
|
59
|
+
}
|
|
60
|
+
/** Holds the selected value and display state for a single typed filter slot. */
|
|
61
|
+
declare class CurrentFilterItem<T> {
|
|
62
|
+
items?: any[];
|
|
63
|
+
value?: T;
|
|
64
|
+
enabled?: boolean;
|
|
65
|
+
title?: string;
|
|
66
|
+
selectedTitle?: string;
|
|
67
|
+
/**
|
|
68
|
+
* Reset the filter to its empty state.
|
|
69
|
+
*/
|
|
70
|
+
clear(): void;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
declare class FilterBarComponent {
|
|
74
|
+
/** Emitted whenever any filter value changes. */
|
|
75
|
+
readonly changed: _angular_core.OutputEmitterRef<CurrentFilterChanged>;
|
|
76
|
+
/** The list of filter groups to display. */
|
|
77
|
+
readonly filters: _angular_core.InputSignal<FilterGroup[]>;
|
|
78
|
+
readonly canFilterByText: _angular_core.InputSignal<boolean>;
|
|
79
|
+
readonly canFilterByText2: _angular_core.InputSignal<boolean>;
|
|
80
|
+
readonly canFilterByText3: _angular_core.InputSignal<boolean>;
|
|
81
|
+
/** Initial text values for the search inputs — synced into the model signals on change. */
|
|
82
|
+
readonly initialText: _angular_core.InputSignal<string>;
|
|
83
|
+
readonly initialText2: _angular_core.InputSignal<string>;
|
|
84
|
+
readonly initialText3: _angular_core.InputSignal<string>;
|
|
85
|
+
readonly textName: _angular_core.InputSignal<string>;
|
|
86
|
+
readonly text2Name: _angular_core.InputSignal<string>;
|
|
87
|
+
readonly text3Name: _angular_core.InputSignal<string>;
|
|
88
|
+
readonly textLength: _angular_core.InputSignal<string>;
|
|
89
|
+
readonly text2Length: _angular_core.InputSignal<string>;
|
|
90
|
+
readonly text3Length: _angular_core.InputSignal<string>;
|
|
91
|
+
readonly showTextSearchButton: _angular_core.InputSignal<boolean>;
|
|
92
|
+
readonly appearance: _angular_core.InputSignal<"fill" | "outline">;
|
|
93
|
+
/** Two-way bindable text filter values. */
|
|
94
|
+
protected readonly text: _angular_core.WritableSignal<string>;
|
|
95
|
+
protected readonly text2: _angular_core.WritableSignal<string>;
|
|
96
|
+
protected readonly text3: _angular_core.WritableSignal<string>;
|
|
97
|
+
/** Filter group for slot 1, derived reactively from the `filters` input. */
|
|
98
|
+
protected readonly flt1: _angular_core.Signal<FilterGroup>;
|
|
99
|
+
/** Filter group for slot 2, derived reactively from the `filters` input. */
|
|
100
|
+
protected readonly flt2: _angular_core.Signal<FilterGroup>;
|
|
101
|
+
/** Filter group for slot 3, derived reactively from the `filters` input. */
|
|
102
|
+
protected readonly flt3: _angular_core.Signal<FilterGroup>;
|
|
103
|
+
/** Filter group for slot 4, derived reactively from the `filters` input. */
|
|
104
|
+
protected readonly flt4: _angular_core.Signal<FilterGroup>;
|
|
105
|
+
/** Filter group for slot 5, derived reactively from the `filters` input. */
|
|
106
|
+
protected readonly flt5: _angular_core.Signal<FilterGroup>;
|
|
107
|
+
/** True when filter slot 1 has an action or item list. */
|
|
108
|
+
protected readonly canFilterByFlt1: _angular_core.Signal<boolean>;
|
|
109
|
+
/** True when filter slot 2 has an action or item list. */
|
|
110
|
+
protected readonly canFilterByFlt2: _angular_core.Signal<boolean>;
|
|
111
|
+
/** True when filter slot 3 has an action or item list. */
|
|
112
|
+
protected readonly canFilterByFlt3: _angular_core.Signal<boolean>;
|
|
113
|
+
/** True when filter slot 4 has an action or item list. */
|
|
114
|
+
protected readonly canFilterByFlt4: _angular_core.Signal<boolean>;
|
|
115
|
+
/** True when filter slot 5 has an action or item list. */
|
|
116
|
+
protected readonly canFilterByFlt5: _angular_core.Signal<boolean>;
|
|
117
|
+
readonly currentFilter: CurrentFilter;
|
|
118
|
+
private readonly cdr;
|
|
119
|
+
constructor();
|
|
120
|
+
/**
|
|
121
|
+
* No-op kept for API compatibility.
|
|
122
|
+
* Filter groups are now computed reactively from the `filters()` input.
|
|
123
|
+
*/
|
|
124
|
+
initializeFilters(): void;
|
|
125
|
+
/**
|
|
126
|
+
* Applies the selected filter item to the current filter state and emits the change.
|
|
127
|
+
* @param filter - The filter item to apply.
|
|
128
|
+
*/
|
|
129
|
+
applyFilter(filter: FilterItem): void;
|
|
130
|
+
/**
|
|
131
|
+
* Executes the action associated with a filter group, or clears the filter.
|
|
132
|
+
* @param group - The filter group number.
|
|
133
|
+
* @param clear - When `true`, clears the filter instead of triggering its action.
|
|
134
|
+
*/
|
|
135
|
+
applyFilterAction(group: number, clear?: boolean): void;
|
|
136
|
+
/** Commits the current text inputs to the filter state and emits the change. */
|
|
137
|
+
applyTextFilter(): void;
|
|
138
|
+
/**
|
|
139
|
+
* Clears the active filter for the specified group and emits the change if it was set.
|
|
140
|
+
* @param group - The filter group number to clear.
|
|
141
|
+
*/
|
|
142
|
+
clearFilter(group: number): void;
|
|
143
|
+
/** Resets all active filters and text inputs, then emits the change. */
|
|
144
|
+
clearAllFilters(): void;
|
|
145
|
+
/**
|
|
146
|
+
* Returns `true` when more than one filter type is active, showing the "clear all" button.
|
|
147
|
+
* @returns True when the clear-all button should be visible.
|
|
148
|
+
*/
|
|
149
|
+
canClearAllFilters(): boolean;
|
|
150
|
+
/**
|
|
151
|
+
* Returns the filter group matching the given id, or `undefined` if not found.
|
|
152
|
+
* @param id - The group id to look up.
|
|
153
|
+
* @returns The matching `FilterGroup`, or `undefined`.
|
|
154
|
+
*/
|
|
155
|
+
private getFilterGroup;
|
|
156
|
+
/** Synchronises the filter bar display with the values currently stored in `currentFilter`. */
|
|
157
|
+
syncFilter(): void;
|
|
158
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FilterBarComponent, never>;
|
|
159
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FilterBarComponent, "filter-bar", never, { "filters": { "alias": "filters"; "required": false; "isSignal": true; }; "canFilterByText": { "alias": "canFilterByText"; "required": false; "isSignal": true; }; "canFilterByText2": { "alias": "canFilterByText2"; "required": false; "isSignal": true; }; "canFilterByText3": { "alias": "canFilterByText3"; "required": false; "isSignal": true; }; "initialText": { "alias": "initialText"; "required": false; "isSignal": true; }; "initialText2": { "alias": "initialText2"; "required": false; "isSignal": true; }; "initialText3": { "alias": "initialText3"; "required": false; "isSignal": true; }; "textName": { "alias": "textName"; "required": false; "isSignal": true; }; "text2Name": { "alias": "text2Name"; "required": false; "isSignal": true; }; "text3Name": { "alias": "text3Name"; "required": false; "isSignal": true; }; "textLength": { "alias": "textLength"; "required": false; "isSignal": true; }; "text2Length": { "alias": "text2Length"; "required": false; "isSignal": true; }; "text3Length": { "alias": "text3Length"; "required": false; "isSignal": true; }; "showTextSearchButton": { "alias": "showTextSearchButton"; "required": false; "isSignal": true; }; "appearance": { "alias": "appearance"; "required": false; "isSignal": true; }; }, { "changed": "changed"; }, never, never, true, never>;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
export { CurrentFilter, CurrentFilterChanged, CurrentFilterItem, FilterBarComponent, Filters };
|
|
163
|
+
export type { FilterGroup, FilterItem };
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
import { Folder, ApiResult } from '@arsedizioni/ars-utils/core';
|
|
2
|
+
import * as rxjs from 'rxjs';
|
|
3
|
+
import { BehaviorSubject } from 'rxjs';
|
|
4
|
+
import * as _angular_core from '@angular/core';
|
|
5
|
+
import { OnDestroy } from '@angular/core';
|
|
6
|
+
import { BreakpointObserver } from '@angular/cdk/layout';
|
|
7
|
+
import { MatSidenav } from '@angular/material/sidenav';
|
|
8
|
+
import { MatTree } from '@angular/material/tree';
|
|
9
|
+
|
|
10
|
+
interface ChapterParentInfo {
|
|
11
|
+
id: string;
|
|
12
|
+
name: string;
|
|
13
|
+
}
|
|
14
|
+
interface Chapter extends Folder {
|
|
15
|
+
parents?: ChapterParentInfo[];
|
|
16
|
+
}
|
|
17
|
+
interface ChapterBag {
|
|
18
|
+
chapter: Chapter;
|
|
19
|
+
data: string;
|
|
20
|
+
hits: number;
|
|
21
|
+
}
|
|
22
|
+
interface ChapterTree extends Chapter {
|
|
23
|
+
subFolders: ChapterTree[];
|
|
24
|
+
path: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
interface HelpViewerDialogData {
|
|
28
|
+
id?: string;
|
|
29
|
+
}
|
|
30
|
+
declare class IndexInfo {
|
|
31
|
+
id: string;
|
|
32
|
+
parent?: IndexInfo;
|
|
33
|
+
name: string;
|
|
34
|
+
itemsCount?: number;
|
|
35
|
+
children?: IndexInfo[];
|
|
36
|
+
}
|
|
37
|
+
declare class IndexNode extends IndexInfo {
|
|
38
|
+
expandable: boolean;
|
|
39
|
+
level: number;
|
|
40
|
+
constructor(item: IndexInfo, level: number);
|
|
41
|
+
}
|
|
42
|
+
declare class IndexTreeDataSource implements OnDestroy {
|
|
43
|
+
dataChange: BehaviorSubject<IndexInfo[]>;
|
|
44
|
+
get data(): IndexInfo[];
|
|
45
|
+
ngOnDestroy(): void;
|
|
46
|
+
/**
|
|
47
|
+
* Initialises the data source with a flat list of root nodes.
|
|
48
|
+
* @param data - Array of root `IndexInfo` items to display in the tree.
|
|
49
|
+
*/
|
|
50
|
+
initialize(data: IndexInfo[]): void;
|
|
51
|
+
/**
|
|
52
|
+
* Recursively searches the tree for a node with the given id.
|
|
53
|
+
* @param node - The node to start from, or `null`/`undefined` to search from the root.
|
|
54
|
+
* @param id - The id of the node to find.
|
|
55
|
+
* @returns The matching `IndexInfo`, or `undefined` if not found.
|
|
56
|
+
*/
|
|
57
|
+
findNode(node: IndexInfo | undefined | null, id: string): IndexInfo | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* Removes the node with the given id from the tree.
|
|
60
|
+
* @param id - The id of the node to remove.
|
|
61
|
+
*/
|
|
62
|
+
removeNode(id: string): void;
|
|
63
|
+
/**
|
|
64
|
+
* Inserts a new node at the beginning of its parent's children, or at the root.
|
|
65
|
+
* @param node - The `IndexInfo` node to insert.
|
|
66
|
+
*/
|
|
67
|
+
insertNode(node: IndexInfo): void;
|
|
68
|
+
/**
|
|
69
|
+
* Renames a node in the tree.
|
|
70
|
+
* @param id - The id of the node to rename.
|
|
71
|
+
* @param name - The new display name.
|
|
72
|
+
*/
|
|
73
|
+
renameNode(id: string, name: string): void;
|
|
74
|
+
/**
|
|
75
|
+
* Re-emits the current data to all subscribers, triggering a tree refresh.
|
|
76
|
+
*/
|
|
77
|
+
update(): void;
|
|
78
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<IndexTreeDataSource, never>;
|
|
79
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<IndexTreeDataSource>;
|
|
80
|
+
}
|
|
81
|
+
declare class HelpViewerComponent {
|
|
82
|
+
readonly indexPane: _angular_core.Signal<MatSidenav>;
|
|
83
|
+
private readonly destroyRef;
|
|
84
|
+
private readonly dialogRef;
|
|
85
|
+
protected readonly dialogData: HelpViewerDialogData;
|
|
86
|
+
private readonly dialogService;
|
|
87
|
+
private readonly helpService;
|
|
88
|
+
protected readonly breakpointObserver: BreakpointObserver;
|
|
89
|
+
protected readonly busy: _angular_core.WritableSignal<boolean>;
|
|
90
|
+
protected readonly page: _angular_core.WritableSignal<string>;
|
|
91
|
+
private indexId;
|
|
92
|
+
private indexPaneClosed;
|
|
93
|
+
protected indexNode: IndexInfo | undefined;
|
|
94
|
+
private readonly history;
|
|
95
|
+
protected readonly canGoBack: _angular_core.Signal<boolean>;
|
|
96
|
+
private tree;
|
|
97
|
+
readonly matTree: _angular_core.Signal<MatTree<IndexNode, IndexNode>>;
|
|
98
|
+
/** Provides the level of a flat node to the tree component. */
|
|
99
|
+
protected readonly levelAccessor: (node: IndexNode) => number;
|
|
100
|
+
/** Flat list of all tree nodes used as the tree data source. */
|
|
101
|
+
protected readonly flatNodes: _angular_core.WritableSignal<IndexNode[]>;
|
|
102
|
+
private folders?;
|
|
103
|
+
protected hasChild: (_: number, _node: IndexNode) => boolean;
|
|
104
|
+
constructor();
|
|
105
|
+
/**
|
|
106
|
+
* Handle filter pane visibility
|
|
107
|
+
*/
|
|
108
|
+
private handleFilterPaneVisibility;
|
|
109
|
+
/**
|
|
110
|
+
* Shows or hides the index pane when the user clicks the toggle button.
|
|
111
|
+
* Also tracks the user's explicit intent so the pane is not auto-reopened.
|
|
112
|
+
*/
|
|
113
|
+
protected toggleIndexPane(): void;
|
|
114
|
+
/**
|
|
115
|
+
* Closes the help viewer dialog.
|
|
116
|
+
*/
|
|
117
|
+
protected close(): void;
|
|
118
|
+
/**
|
|
119
|
+
* Loads the table of contents from the help service and populates the tree.
|
|
120
|
+
*/
|
|
121
|
+
protected getToc(): void;
|
|
122
|
+
/**
|
|
123
|
+
* Intercepts anchor clicks inside the help page and navigates to the referenced chapter.
|
|
124
|
+
* @param e - The click `MouseEvent` from the page content area.
|
|
125
|
+
* @returns `false` to prevent default browser navigation.
|
|
126
|
+
*/
|
|
127
|
+
protected gotoChapter(e: MouseEvent): boolean;
|
|
128
|
+
/**
|
|
129
|
+
* Searches the folder list for a node matching the given id.
|
|
130
|
+
* @param id - The id of the folder to locate.
|
|
131
|
+
* @returns The matching `IndexInfo`, or `undefined` if not found.
|
|
132
|
+
*/
|
|
133
|
+
private findFolder;
|
|
134
|
+
/**
|
|
135
|
+
* Expands the tree node that corresponds to the currently selected chapter,
|
|
136
|
+
* and all its ancestor nodes.
|
|
137
|
+
*/
|
|
138
|
+
private expandCurrentFolder;
|
|
139
|
+
/**
|
|
140
|
+
* Recursively flattens a nested IndexInfo tree into a depth-first ordered array of IndexNodes.
|
|
141
|
+
* @param items - Root-level nodes to flatten.
|
|
142
|
+
* @param level - Current depth level.
|
|
143
|
+
*/
|
|
144
|
+
private flattenNodes;
|
|
145
|
+
/**
|
|
146
|
+
* Retrieves and displays a help chapter by id.
|
|
147
|
+
* Optionally scrolls to an anchor or pixel offset after loading.
|
|
148
|
+
* @param id - Chapter id, optionally followed by an anchor (`id#anchor`).
|
|
149
|
+
* @param position - Pixel scroll offset to restore (default `0`, meaning top).
|
|
150
|
+
*/
|
|
151
|
+
protected getChapter(id: string, position?: number): void;
|
|
152
|
+
/**
|
|
153
|
+
* Scrolls the help content to a named anchor or a numeric pixel offset.
|
|
154
|
+
* @param anchor - Named anchor (`<a name="…">`) to scroll to, if any.
|
|
155
|
+
* @param position - Fallback pixel offset (default `0`).
|
|
156
|
+
*/
|
|
157
|
+
protected gotoPosition(anchor: string | undefined, position?: number): void;
|
|
158
|
+
/**
|
|
159
|
+
* Returns the current vertical scroll offset of the help content scroller.
|
|
160
|
+
* @returns The `scrollTop` value in pixels, or `0` if the element is not found.
|
|
161
|
+
*/
|
|
162
|
+
protected getPosition(): number;
|
|
163
|
+
/**
|
|
164
|
+
* Scrolls the help content scroller to the specified pixel offset.
|
|
165
|
+
* @param position - The vertical pixel offset to scroll to.
|
|
166
|
+
*/
|
|
167
|
+
protected setPosition(position: number): void;
|
|
168
|
+
/**
|
|
169
|
+
* Navigates back to the previous chapter in the browsing history.
|
|
170
|
+
*/
|
|
171
|
+
protected back(): void;
|
|
172
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<HelpViewerComponent, never>;
|
|
173
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<HelpViewerComponent, "ng-component", never, {}, {}, never, never, true, never>;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
declare class HelpService {
|
|
177
|
+
private readonly httpClient;
|
|
178
|
+
private readonly dialogService;
|
|
179
|
+
private serviceUri;
|
|
180
|
+
/**
|
|
181
|
+
* Initialises the service with the back-end base URI.
|
|
182
|
+
* Must be called once during application bootstrap before any other method.
|
|
183
|
+
* @param serviceUri - Base URL of the help service (e.g. `'https://api.example.com'`).
|
|
184
|
+
*/
|
|
185
|
+
initialize(serviceUri: string): void;
|
|
186
|
+
/**
|
|
187
|
+
* Retrieves the HTML content and metadata of a help chapter.
|
|
188
|
+
* @param id - The chapter id.
|
|
189
|
+
* @param query - Optional search query to highlight within the chapter content.
|
|
190
|
+
* @returns An observable that emits `ApiResult<ChapterBag>`.
|
|
191
|
+
*/
|
|
192
|
+
getChapter(id: string, query?: string | undefined): rxjs.Observable<ApiResult<ChapterBag>>;
|
|
193
|
+
/**
|
|
194
|
+
* Retrieves metadata (title, path, etc.) for a help chapter without its content.
|
|
195
|
+
* @param id - The chapter id.
|
|
196
|
+
* @returns An observable that emits `ApiResult<Chapter>`.
|
|
197
|
+
*/
|
|
198
|
+
getChapterInfo(id: string): rxjs.Observable<ApiResult<Chapter>>;
|
|
199
|
+
/**
|
|
200
|
+
* Retrieves a raw repository file by id.
|
|
201
|
+
* @param id - The repository file id.
|
|
202
|
+
* @returns An observable that emits `ApiResult<unknown>`.
|
|
203
|
+
*/
|
|
204
|
+
getRepo(id: string): rxjs.Observable<ApiResult<unknown>>;
|
|
205
|
+
/**
|
|
206
|
+
* Retrieves the table of contents as a hierarchical `IndexInfo` tree.
|
|
207
|
+
* @returns An observable that emits `ApiResult<IndexInfo>`.
|
|
208
|
+
*/
|
|
209
|
+
getToc(): rxjs.Observable<ApiResult<IndexInfo>>;
|
|
210
|
+
/**
|
|
211
|
+
* Opens the help viewer dialog, optionally pre-navigated to a specific chapter.
|
|
212
|
+
* @param id - The chapter id to open (default: `'1'`, the root chapter).
|
|
213
|
+
*/
|
|
214
|
+
show(id?: string): void;
|
|
215
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<HelpService, never>;
|
|
216
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<HelpService>;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
export { HelpService, HelpViewerComponent, IndexInfo, IndexNode, IndexTreeDataSource };
|
|
220
|
+
export type { Chapter, ChapterBag, ChapterParentInfo, ChapterTree, HelpViewerDialogData };
|