@memberjunction/ng-dashboards 6.2.0-edge.3 → 6.2.0-edge.4
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/dist/AI/components/analytics/realtime/realtime-transcripts-data.d.ts +4 -3
- package/dist/AI/components/analytics/realtime/realtime-transcripts-data.d.ts.map +1 -1
- package/dist/AI/components/analytics/realtime/realtime-transcripts-data.js +8 -5
- package/dist/AI/components/analytics/realtime/realtime-transcripts-data.js.map +1 -1
- package/dist/AI/components/duplicates/compare-value.component.d.ts +67 -0
- package/dist/AI/components/duplicates/compare-value.component.d.ts.map +1 -0
- package/dist/AI/components/duplicates/compare-value.component.js +168 -0
- package/dist/AI/components/duplicates/compare-value.component.js.map +1 -0
- package/dist/AI/components/duplicates/duplicate-detection-resource.component.d.ts +49 -3
- package/dist/AI/components/duplicates/duplicate-detection-resource.component.d.ts.map +1 -1
- package/dist/AI/components/duplicates/duplicate-detection-resource.component.js +287 -169
- package/dist/AI/components/duplicates/duplicate-detection-resource.component.js.map +1 -1
- package/dist/AI/components/duplicates/duplicate-detection-run-scope.d.ts +77 -0
- package/dist/AI/components/duplicates/duplicate-detection-run-scope.d.ts.map +1 -0
- package/dist/AI/components/duplicates/duplicate-detection-run-scope.js +116 -0
- package/dist/AI/components/duplicates/duplicate-detection-run-scope.js.map +1 -0
- package/dist/AI/components/prompts/model-prompt-priority-matrix.component.d.ts +1 -0
- package/dist/AI/components/prompts/model-prompt-priority-matrix.component.d.ts.map +1 -1
- package/dist/AI/components/prompts/model-prompt-priority-matrix.component.js +16 -4
- package/dist/AI/components/prompts/model-prompt-priority-matrix.component.js.map +1 -1
- package/dist/AI/components/tags/tags-resource.component.d.ts +2 -0
- package/dist/AI/components/tags/tags-resource.component.d.ts.map +1 -1
- package/dist/AI/components/tags/tags-resource.component.js +12 -6
- package/dist/AI/components/tags/tags-resource.component.js.map +1 -1
- package/dist/AI/components/vectors/vector-index-auto.d.ts +29 -0
- package/dist/AI/components/vectors/vector-index-auto.d.ts.map +1 -0
- package/dist/AI/components/vectors/vector-index-auto.js +59 -0
- package/dist/AI/components/vectors/vector-index-auto.js.map +1 -0
- package/dist/AI/components/vectors/vector-management-resource.component.d.ts +9 -0
- package/dist/AI/components/vectors/vector-management-resource.component.d.ts.map +1 -1
- package/dist/AI/components/vectors/vector-management-resource.component.js +65 -20
- package/dist/AI/components/vectors/vector-management-resource.component.js.map +1 -1
- package/dist/Actions/components/actions-overview.component.d.ts.map +1 -1
- package/dist/Actions/components/actions-overview.component.js +7 -3
- package/dist/Actions/components/actions-overview.component.js.map +1 -1
- package/dist/Actions/components/categories-list-view.component.d.ts.map +1 -1
- package/dist/Actions/components/categories-list-view.component.js +3 -2
- package/dist/Actions/components/categories-list-view.component.js.map +1 -1
- package/dist/ComponentStudio/component-studio-dashboard.component.d.ts.map +1 -1
- package/dist/ComponentStudio/component-studio-dashboard.component.js +1 -0
- package/dist/ComponentStudio/component-studio-dashboard.component.js.map +1 -1
- package/dist/ComponentStudio/components/ai-assistant/ai-assistant-panel.component.d.ts +0 -3
- package/dist/ComponentStudio/components/ai-assistant/ai-assistant-panel.component.d.ts.map +1 -1
- package/dist/ComponentStudio/components/ai-assistant/ai-assistant-panel.component.js +5 -14
- package/dist/ComponentStudio/components/ai-assistant/ai-assistant-panel.component.js.map +1 -1
- package/dist/ComponentStudio/components/artifact-load-dialog.component.d.ts.map +1 -1
- package/dist/ComponentStudio/components/artifact-load-dialog.component.js +1 -0
- package/dist/ComponentStudio/components/artifact-load-dialog.component.js.map +1 -1
- package/dist/ComponentStudio/components/artifact-selection-dialog.component.d.ts.map +1 -1
- package/dist/ComponentStudio/components/artifact-selection-dialog.component.js +1 -0
- package/dist/ComponentStudio/components/artifact-selection-dialog.component.js.map +1 -1
- package/dist/Credentials/components/credentials-list-resource.component.d.ts +2 -0
- package/dist/Credentials/components/credentials-list-resource.component.d.ts.map +1 -1
- package/dist/Credentials/components/credentials-list-resource.component.js +12 -10
- package/dist/Credentials/components/credentials-list-resource.component.js.map +1 -1
- package/dist/DashboardBrowser/dashboard-browser-agent-context.d.ts +14 -43
- package/dist/DashboardBrowser/dashboard-browser-agent-context.d.ts.map +1 -1
- package/dist/DashboardBrowser/dashboard-browser-agent-context.js +6 -29
- package/dist/DashboardBrowser/dashboard-browser-agent-context.js.map +1 -1
- package/dist/DashboardBrowser/dashboard-browser-resource.component.d.ts +174 -321
- package/dist/DashboardBrowser/dashboard-browser-resource.component.d.ts.map +1 -1
- package/dist/DashboardBrowser/dashboard-browser-resource.component.js +522 -1195
- package/dist/DashboardBrowser/dashboard-browser-resource.component.js.map +1 -1
- package/dist/DashboardBrowser/dashboard-library-filter.d.ts +116 -0
- package/dist/DashboardBrowser/dashboard-library-filter.d.ts.map +1 -0
- package/dist/DashboardBrowser/dashboard-library-filter.js +277 -0
- package/dist/DashboardBrowser/dashboard-library-filter.js.map +1 -0
- package/dist/DashboardBrowser/dashboard-share-dialog.component.d.ts +1 -1
- package/dist/DashboardBrowser/dashboard-share-dialog.component.js.map +1 -1
- package/dist/DashboardBrowser/dashboards-agent-tools.d.ts +26 -0
- package/dist/DashboardBrowser/dashboards-agent-tools.d.ts.map +1 -0
- package/dist/DashboardBrowser/dashboards-agent-tools.js +32 -0
- package/dist/DashboardBrowser/dashboards-agent-tools.js.map +1 -0
- package/dist/DashboardBrowser/dashboards-categories-resource.component.d.ts +58 -0
- package/dist/DashboardBrowser/dashboards-categories-resource.component.d.ts.map +1 -0
- package/dist/DashboardBrowser/dashboards-categories-resource.component.js +391 -0
- package/dist/DashboardBrowser/dashboards-categories-resource.component.js.map +1 -0
- package/dist/DashboardBrowser/dashboards-categories.helpers.d.ts +37 -0
- package/dist/DashboardBrowser/dashboards-categories.helpers.d.ts.map +1 -0
- package/dist/DashboardBrowser/dashboards-categories.helpers.js +68 -0
- package/dist/DashboardBrowser/dashboards-categories.helpers.js.map +1 -0
- package/dist/DashboardEditor/dashboard-editor.component.d.ts +295 -0
- package/dist/DashboardEditor/dashboard-editor.component.d.ts.map +1 -0
- package/dist/DashboardEditor/dashboard-editor.component.js +1022 -0
- package/dist/DashboardEditor/dashboard-editor.component.js.map +1 -0
- package/dist/DashboardEditor/dashboard-editor.types.d.ts +23 -0
- package/dist/DashboardEditor/dashboard-editor.types.d.ts.map +1 -0
- package/dist/DashboardEditor/dashboard-editor.types.js +3 -0
- package/dist/DashboardEditor/dashboard-editor.types.js.map +1 -0
- package/dist/DashboardEditor/dashboard-viewer-factory.d.ts +11 -0
- package/dist/DashboardEditor/dashboard-viewer-factory.d.ts.map +1 -0
- package/dist/DashboardEditor/dashboard-viewer-factory.js +17 -0
- package/dist/DashboardEditor/dashboard-viewer-factory.js.map +1 -0
- package/dist/DataExplorer/data-explorer-dashboard.component.d.ts +26 -0
- package/dist/DataExplorer/data-explorer-dashboard.component.d.ts.map +1 -1
- package/dist/DataExplorer/data-explorer-dashboard.component.js +302 -219
- package/dist/DataExplorer/data-explorer-dashboard.component.js.map +1 -1
- package/dist/DataExplorer/services/explorer-state.service.d.ts +1 -1
- package/dist/DataExplorer/services/explorer-state.service.js +2 -5
- package/dist/DataExplorer/services/explorer-state.service.js.map +1 -1
- package/dist/FormBuilder/form-builder-resource.component.d.ts +0 -14
- package/dist/FormBuilder/form-builder-resource.component.d.ts.map +1 -1
- package/dist/FormBuilder/form-builder-resource.component.js +7 -29
- package/dist/FormBuilder/form-builder-resource.component.js.map +1 -1
- package/dist/Home/home-agent-context.d.ts +29 -10
- package/dist/Home/home-agent-context.d.ts.map +1 -1
- package/dist/Home/home-agent-context.js +50 -24
- package/dist/Home/home-agent-context.js.map +1 -1
- package/dist/Home/home-dashboard-switcher.component.d.ts +95 -0
- package/dist/Home/home-dashboard-switcher.component.d.ts.map +1 -0
- package/dist/Home/home-dashboard-switcher.component.js +442 -0
- package/dist/Home/home-dashboard-switcher.component.js.map +1 -0
- package/dist/Home/home-dashboard.component.d.ts +330 -17
- package/dist/Home/home-dashboard.component.d.ts.map +1 -1
- package/dist/Home/home-dashboard.component.js +1702 -1014
- package/dist/Home/home-dashboard.component.js.map +1 -1
- package/dist/Home/home-menus.d.ts +38 -0
- package/dist/Home/home-menus.d.ts.map +1 -0
- package/dist/Home/home-menus.js +53 -0
- package/dist/Home/home-menus.js.map +1 -0
- package/dist/Home/home-pinned-dashboards.d.ts +33 -0
- package/dist/Home/home-pinned-dashboards.d.ts.map +1 -0
- package/dist/Home/home-pinned-dashboards.js +76 -0
- package/dist/Home/home-pinned-dashboards.js.map +1 -0
- package/dist/PredictiveStudio/components/ps-production.component.d.ts +5 -1
- package/dist/PredictiveStudio/components/ps-production.component.d.ts.map +1 -1
- package/dist/PredictiveStudio/components/ps-production.component.js +64 -41
- package/dist/PredictiveStudio/components/ps-production.component.js.map +1 -1
- package/dist/QueryBrowser/query-browser-resource.component.d.ts.map +1 -1
- package/dist/QueryBrowser/query-browser-resource.component.js +3 -2
- package/dist/QueryBrowser/query-browser-resource.component.js.map +1 -1
- package/dist/RealtimeRecordings/realtime-recordings-dashboard.component.js +2 -2
- package/dist/RealtimeRecordings/realtime-recordings-dashboard.component.js.map +1 -1
- package/dist/TelephonyOperations/telephony-operations-dashboard.component.d.ts +1 -0
- package/dist/TelephonyOperations/telephony-operations-dashboard.component.d.ts.map +1 -1
- package/dist/TelephonyOperations/telephony-operations-dashboard.component.js +7 -0
- package/dist/TelephonyOperations/telephony-operations-dashboard.component.js.map +1 -1
- package/dist/Testing/components/testing-explorer.component.d.ts.map +1 -1
- package/dist/Testing/components/testing-explorer.component.js +7 -7
- package/dist/Testing/components/testing-explorer.component.js.map +1 -1
- package/dist/ai-dashboards.module.d.ts +21 -20
- package/dist/ai-dashboards.module.d.ts.map +1 -1
- package/dist/ai-dashboards.module.js +4 -1
- package/dist/ai-dashboards.module.js.map +1 -1
- package/dist/core-dashboards.module.d.ts +69 -62
- package/dist/core-dashboards.module.d.ts.map +1 -1
- package/dist/core-dashboards.module.js +22 -2
- package/dist/core-dashboards.module.js.map +1 -1
- package/dist/data-explorer-dashboards.module.d.ts +1 -1
- package/dist/data-explorer-dashboards.module.d.ts.map +1 -1
- package/dist/data-explorer-dashboards.module.js +3 -1
- package/dist/data-explorer-dashboards.module.js.map +1 -1
- package/dist/public-api.d.ts +2 -0
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +3 -0
- package/dist/public-api.js.map +1 -1
- package/dist/shared/dashboard-library-changes.d.ts +23 -0
- package/dist/shared/dashboard-library-changes.d.ts.map +1 -0
- package/dist/shared/dashboard-library-changes.js +26 -0
- package/dist/shared/dashboard-library-changes.js.map +1 -0
- package/dist/shared/dashboard-owner-names.d.ts +17 -0
- package/dist/shared/dashboard-owner-names.d.ts.map +1 -0
- package/dist/shared/dashboard-owner-names.js +65 -0
- package/dist/shared/dashboard-owner-names.js.map +1 -0
- package/dist/shared/dashboard-recents.d.ts +34 -0
- package/dist/shared/dashboard-recents.d.ts.map +1 -0
- package/dist/shared/dashboard-recents.js +87 -0
- package/dist/shared/dashboard-recents.js.map +1 -0
- package/dist/shared/dashboards-app-install.d.ts +59 -0
- package/dist/shared/dashboards-app-install.d.ts.map +1 -0
- package/dist/shared/dashboards-app-install.js +97 -0
- package/dist/shared/dashboards-app-install.js.map +1 -0
- package/dist/shared/dashboards-app.helpers.d.ts +42 -0
- package/dist/shared/dashboards-app.helpers.d.ts.map +1 -0
- package/dist/shared/dashboards-app.helpers.js +143 -0
- package/dist/shared/dashboards-app.helpers.js.map +1 -0
- package/package.json +69 -68
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
import { AfterViewInit, EventEmitter, OnDestroy, TemplateRef } from '@angular/core';
|
|
2
|
+
import type { DashboardUserPermissions, MJDashboardEntity, MJDashboardPartTypeEntity } from '@memberjunction/core-entities';
|
|
3
|
+
import { BaseAngularComponent } from '@memberjunction/ng-base-types';
|
|
4
|
+
import type { DashboardNavRequestEvent, DashboardPanel, DashboardPartDialogMode, DashboardPartDialogResult, DashboardViewerComponent } from '@memberjunction/ng-dashboard-viewer';
|
|
5
|
+
import type { DashboardEditorBodyStyle, DashboardEditorLoadError, DashboardEditorTitleContext, DashboardSaveOverrides } from './dashboard-editor.types';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
/**
|
|
8
|
+
* A Config dashboard with its header: view mode (title, description, favorite, host actions, Edit) and
|
|
9
|
+
* edit mode (Editing badge, name and description fields, Add part, Save, Cancel), the part dialog and the
|
|
10
|
+
* dashboard viewer. Made for the dashboard tab and Home's dashboard view, so both edit a dashboard the same
|
|
11
|
+
* way; Save asks before it replaces a save made elsewhere during the edit. It never navigates: hosts
|
|
12
|
+
* handle its events.
|
|
13
|
+
*
|
|
14
|
+
* Hosts project their own header buttons: `[headerTools]` shows in both modes, `[viewActions]` in view
|
|
15
|
+
* mode after the star.
|
|
16
|
+
*/
|
|
17
|
+
export declare class DashboardEditorComponent extends BaseAngularComponent implements AfterViewInit, OnDestroy {
|
|
18
|
+
private readonly cdr;
|
|
19
|
+
private readonly favoritesService;
|
|
20
|
+
private readonly pinService;
|
|
21
|
+
private readonly confirmService;
|
|
22
|
+
private readonly viewerFactory;
|
|
23
|
+
private _dashboardId;
|
|
24
|
+
private viewInitialized;
|
|
25
|
+
/**
|
|
26
|
+
* The Config dashboard to show. The editor reads it from DashboardEngine. The same ID again (in any
|
|
27
|
+
* case) changes nothing; another ID drops an edit in progress and shows that dashboard; null clears.
|
|
28
|
+
*/
|
|
29
|
+
set DashboardId(value: string | null);
|
|
30
|
+
get DashboardId(): string | null;
|
|
31
|
+
/** Enter edit mode when the dashboard finishes loading. Read once per load, then reset (StartInEditModeChange). */
|
|
32
|
+
StartInEditMode: boolean;
|
|
33
|
+
/** Emits false when the editor has read StartInEditMode, for a two-way binding. */
|
|
34
|
+
StartInEditModeChange: EventEmitter<boolean>;
|
|
35
|
+
/** Replaces the view-mode title, for example with Home's breadcrumb and dashboard switcher. */
|
|
36
|
+
TitleTemplate: TemplateRef<DashboardEditorTitleContext> | null;
|
|
37
|
+
/** Shows "Open in Dashboards" in view mode. */
|
|
38
|
+
ShowOpenInDashboards: boolean;
|
|
39
|
+
/** Shows the favorite star in view mode. */
|
|
40
|
+
ShowFavorite: boolean;
|
|
41
|
+
/** 'fill': the dashboard fills the editor. 'card': a padded card body. */
|
|
42
|
+
BodyStyle: DashboardEditorBodyStyle;
|
|
43
|
+
/** The dashboard's layout is ready. Once for each DashboardId. */
|
|
44
|
+
Loaded: EventEmitter<MJDashboardEntity>;
|
|
45
|
+
/**
|
|
46
|
+
* The dashboard could not be shown: DashboardEngine does not hold it, it is a Code dashboard, or its
|
|
47
|
+
* layout failed. The editor then shows no dashboard.
|
|
48
|
+
*/
|
|
49
|
+
LoadFailed: EventEmitter<DashboardEditorLoadError>;
|
|
50
|
+
/** The editor entered (true) or left (false) edit mode. Not emitted when the editor is destroyed. */
|
|
51
|
+
EditingChange: EventEmitter<boolean>;
|
|
52
|
+
/** The viewer saved the dashboard (before the editor leaves edit mode). */
|
|
53
|
+
Saved: EventEmitter<MJDashboardEntity>;
|
|
54
|
+
/** The shown dashboard's saved name changed: this editor's Save, or a save elsewhere. Never empty. */
|
|
55
|
+
NameChanged: EventEmitter<string>;
|
|
56
|
+
/** The viewer's configuration changed (parts, layout). */
|
|
57
|
+
ConfigChanged: EventEmitter<void>;
|
|
58
|
+
/** The editor rebuilt the saved layout because the dashboard was saved elsewhere. */
|
|
59
|
+
ReloadedFromSaved: EventEmitter<void>;
|
|
60
|
+
/** The user starred (true) or unstarred (false) the dashboard. */
|
|
61
|
+
FavoriteChange: EventEmitter<boolean>;
|
|
62
|
+
/** A part asked to open something: a record, another dashboard, a query. */
|
|
63
|
+
NavigationRequested: EventEmitter<DashboardNavRequestEvent>;
|
|
64
|
+
/** The user clicked "Open in Dashboards". */
|
|
65
|
+
OpenInDashboardsRequested: EventEmitter<MJDashboardEntity>;
|
|
66
|
+
/** In 'fill' style the editor takes its host's full height. */
|
|
67
|
+
get IsFill(): boolean;
|
|
68
|
+
private bodyRef;
|
|
69
|
+
private viewerHost;
|
|
70
|
+
/** True while the editor is in edit mode. */
|
|
71
|
+
IsEditing: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* True while a Save of the shown dashboard runs (the question about a save made elsewhere, the
|
|
74
|
+
* screenshot, then the save). Meanwhile Edit, Save, Cancel, Add part and part edits do nothing, and
|
|
75
|
+
* the header shows it.
|
|
76
|
+
*/
|
|
77
|
+
IsSaving: boolean;
|
|
78
|
+
/** The name field. */
|
|
79
|
+
EditingName: string;
|
|
80
|
+
/** The description field. */
|
|
81
|
+
EditingDescription: string;
|
|
82
|
+
/** The user's permissions for the shown dashboard. Nothing is allowed before a dashboard loads. */
|
|
83
|
+
Permissions: DashboardUserPermissions;
|
|
84
|
+
/** Whether the part dialog is open to add a part or to edit one. Null while it is closed. */
|
|
85
|
+
PartDialogMode: DashboardPartDialogMode | null;
|
|
86
|
+
/** The part the part dialog edits in edit mode. */
|
|
87
|
+
EditPartPanel: DashboardPanel | null;
|
|
88
|
+
private _dashboard;
|
|
89
|
+
private viewer;
|
|
90
|
+
private viewerRef;
|
|
91
|
+
/** Each load gets a number; a load whose number is no longer the latest stops at its next step. */
|
|
92
|
+
private loadGeneration;
|
|
93
|
+
/** Each edit session gets a number; a dialog answer from an ended session does nothing. */
|
|
94
|
+
private editSession;
|
|
95
|
+
/** The saved name and description when the current edit session began. */
|
|
96
|
+
private editBaseline;
|
|
97
|
+
/** The saved name last reported through NameChanged (or the name at load). */
|
|
98
|
+
private reportedName;
|
|
99
|
+
private readonly destroy$;
|
|
100
|
+
/** Ends the subscriptions to the current viewer's events. */
|
|
101
|
+
private readonly viewerChanged$;
|
|
102
|
+
/** The shown dashboard: the instance DashboardEngine holds. Null before a load. */
|
|
103
|
+
get Dashboard(): MJDashboardEntity | null;
|
|
104
|
+
/** The viewer, for hosts that drive it (the dashboard tab's agent tools). Null before a load. */
|
|
105
|
+
get Viewer(): DashboardViewerComponent | null;
|
|
106
|
+
/** The element that holds the dashboard: the Save screenshot, the pin thumbnail and the agent's screenshot capture it. */
|
|
107
|
+
get BodyElement(): HTMLElement;
|
|
108
|
+
/** True when the user can edit the shown dashboard. */
|
|
109
|
+
get CanEdit(): boolean;
|
|
110
|
+
/** The part types the part dialog offers: the viewer's part types. */
|
|
111
|
+
get PartTypes(): MJDashboardPartTypeEntity[];
|
|
112
|
+
/** True when someone else owns the dashboard and shared it with the user. */
|
|
113
|
+
get IsSharedWithUser(): boolean;
|
|
114
|
+
/** True when the shown dashboard is one of the user's favorites. False when the favorites cannot be read. */
|
|
115
|
+
get IsFavorite(): boolean;
|
|
116
|
+
/** True while editing with changes the viewer or the fields have not saved. */
|
|
117
|
+
get HasUnsavedChanges(): boolean;
|
|
118
|
+
ngAfterViewInit(): void;
|
|
119
|
+
/** Stops a load in progress at its next step, ends the subscriptions and destroys the viewer. */
|
|
120
|
+
ngOnDestroy(): void;
|
|
121
|
+
/**
|
|
122
|
+
* Shows the dashboard DashboardId names. Drops the dashboard shown before. When the dashboard cannot
|
|
123
|
+
* be shown, the editor shows none (an edit begun while the layout built ends) and emits LoadFailed.
|
|
124
|
+
*/
|
|
125
|
+
private load;
|
|
126
|
+
/** The Config dashboard with this ID in DashboardEngine. Rejects when the engine has none, or it is a Code dashboard. */
|
|
127
|
+
private findConfigDashboard;
|
|
128
|
+
/**
|
|
129
|
+
* Creates the viewer and shows the dashboard in it. The viewer is configured, and its events wired,
|
|
130
|
+
* before it gets the dashboard, because the dashboard starts the layout. Once the layout is ready the
|
|
131
|
+
* editor enters edit mode when StartInEditMode asks for it, then emits Loaded.
|
|
132
|
+
*/
|
|
133
|
+
private showDashboard;
|
|
134
|
+
/** Creates the viewer in the body. Its host element fills the body: component CSS cannot reach a created host. */
|
|
135
|
+
private createViewer;
|
|
136
|
+
/** Sets the viewer up for the editor, which shows the header, and passes the viewer's events on. */
|
|
137
|
+
private configureViewer;
|
|
138
|
+
/** Destroys the viewer and forgets the dashboard. An edit in progress is dropped, and EditingChange says so. */
|
|
139
|
+
private teardownViewer;
|
|
140
|
+
/**
|
|
141
|
+
* Destroys the viewer and forgets the dashboard and its edit. A Save of that dashboard still running
|
|
142
|
+
* stops at its next step, and IsSaving is false for the next dashboard. Returns whether an edit was in
|
|
143
|
+
* progress.
|
|
144
|
+
*/
|
|
145
|
+
private dropViewer;
|
|
146
|
+
/** Enters edit mode once when the host asked for it with StartInEditMode, and resets the input. */
|
|
147
|
+
private applyStartInEditMode;
|
|
148
|
+
/** Reads the user's permissions for the dashboard again, for example after the host's Share dialog saved. */
|
|
149
|
+
RefreshPermissions(): void;
|
|
150
|
+
/** The user's permissions for a dashboard. None without a dashboard. */
|
|
151
|
+
private readPermissions;
|
|
152
|
+
/**
|
|
153
|
+
* Enters edit mode when the user can edit. Returns true when the editor is editing afterwards, and
|
|
154
|
+
* false, changing nothing, while a Save runs: that Save reads the name and description fields.
|
|
155
|
+
*/
|
|
156
|
+
EnterEditMode(): boolean;
|
|
157
|
+
/** Leaves edit mode without saving, or enters it. */
|
|
158
|
+
ToggleEditMode(): void;
|
|
159
|
+
/**
|
|
160
|
+
* Puts the editor and its viewer in edit mode. Returns false, and changes nothing, without a dashboard
|
|
161
|
+
* or when the user cannot edit it. Takes DashboardEngine's current copy first: when the dashboard was
|
|
162
|
+
* saved elsewhere since the viewer loaded it, the viewer reloads the saved layout, so this edit's save
|
|
163
|
+
* keeps it. Notes the saved name and description, so Save can tell a save made elsewhere during the
|
|
164
|
+
* edit (see savedElsewhereSinceEditStart).
|
|
165
|
+
*/
|
|
166
|
+
private startEditing;
|
|
167
|
+
/**
|
|
168
|
+
* Leaves edit mode and drops the changes. The viewer reloads the saved layout before it leaves edit
|
|
169
|
+
* mode: it drops its layout at once, so leaving edit mode applies to the layout it rebuilds. Does
|
|
170
|
+
* nothing while a Save runs.
|
|
171
|
+
*/
|
|
172
|
+
CancelEdit(): void;
|
|
173
|
+
/**
|
|
174
|
+
* Saves the name, description and layout, then leaves edit mode. An empty name is never saved: the
|
|
175
|
+
* previous name is kept. When the save fails, the editor stays in edit mode (see onSaveFailed). One
|
|
176
|
+
* Save runs at a time (see IsSaving).
|
|
177
|
+
*/
|
|
178
|
+
SaveDashboard(): Promise<void>;
|
|
179
|
+
/**
|
|
180
|
+
* Saves like SaveDashboard. Returns null when saved, also when the editor shows another dashboard by
|
|
181
|
+
* the time the viewer has saved; else why not. Outside edit mode it saves the dashboard's own name and
|
|
182
|
+
* description. `overrides` replace the fields first. While a Save runs it refuses at once and leaves
|
|
183
|
+
* the fields as they are.
|
|
184
|
+
*/
|
|
185
|
+
Save(overrides?: DashboardSaveOverrides): Promise<string | null>;
|
|
186
|
+
/**
|
|
187
|
+
* The work of SaveDashboard and Save. Returns null when saved, else why not: no dashboard is open, a
|
|
188
|
+
* Save runs, another save of the dashboard object runs (see stopWhileSavedElsewhere), the user kept
|
|
189
|
+
* editing rather than replace a save made elsewhere, the editor showed another dashboard before the
|
|
190
|
+
* viewer saved, or the save failed (the user has seen that reason). A Save belongs to the viewer it
|
|
191
|
+
* started with: once the editor shows another dashboard, the Save changes nothing in the editor and
|
|
192
|
+
* leaves IsSaving to that dashboard. A save the viewer already made still returns null. See
|
|
193
|
+
* prepareSave for the steps before the viewer saves.
|
|
194
|
+
*/
|
|
195
|
+
private saveAndLeaveEditMode;
|
|
196
|
+
/**
|
|
197
|
+
* The steps of a Save before the viewer saves. It asks first when the dashboard was saved elsewhere
|
|
198
|
+
* since this edit began. Then it takes the screenshot and writes it, the name and the description to
|
|
199
|
+
* the dashboard; the fields are read after the screenshot, so a name typed meanwhile is saved. Returns
|
|
200
|
+
* why the Save stops, or null to save. When the editor shows another dashboard after a step, or another
|
|
201
|
+
* save of the dashboard object started meanwhile, it stops and writes nothing.
|
|
202
|
+
*/
|
|
203
|
+
private prepareSave;
|
|
204
|
+
/**
|
|
205
|
+
* When another save of the dashboard object runs (Home's rename, for example), tells the user and returns why this
|
|
206
|
+
* Save stops: BaseEntity's Save would join that save and write none of this Save's changes. The editor stays in edit
|
|
207
|
+
* mode with the user's changes. Null when no other save runs.
|
|
208
|
+
*/
|
|
209
|
+
private stopWhileSavedElsewhere;
|
|
210
|
+
/** Leaves edit mode after a successful save. A Save outside edit mode (an agent's request) emits no EditingChange. */
|
|
211
|
+
private leaveEditModeAfterSave;
|
|
212
|
+
/**
|
|
213
|
+
* The dashboard's new Thumbnail: a small screenshot of the dashboard body, or null when the layout has
|
|
214
|
+
* no panels, so the dashboard cards show the icon. Undefined when no screenshot is ready in time (too
|
|
215
|
+
* many elements, no size, or the timeout): the current Thumbnail stays. Never throws.
|
|
216
|
+
*/
|
|
217
|
+
private takeDashboardThumbnail;
|
|
218
|
+
/** Keeps the previous name when the user leaves the name field empty or with only spaces. */
|
|
219
|
+
OnNameBlur(): void;
|
|
220
|
+
/** Puts the saved name back into an empty or spaces-only name field. */
|
|
221
|
+
private restoreEmptyName;
|
|
222
|
+
/**
|
|
223
|
+
* Handles a save that did not complete. The editor stays in edit mode with the user's changes, the
|
|
224
|
+
* cached dashboard (which other pages read) goes back to its saved values, and the user sees why.
|
|
225
|
+
* Returns the message the user sees.
|
|
226
|
+
*/
|
|
227
|
+
private onSaveFailed;
|
|
228
|
+
/** Why a save failed: the thrown error, else the dashboard's failed save result. Empty when neither says. */
|
|
229
|
+
private saveFailureReason;
|
|
230
|
+
/** Passes a save of the viewer on to the host, with the new name when it changed. */
|
|
231
|
+
private onViewerSaved;
|
|
232
|
+
/** Emits NameChanged when the saved name differs from the one last reported. An empty name is never reported. */
|
|
233
|
+
private reportNameIfChanged;
|
|
234
|
+
/**
|
|
235
|
+
* Follows DashboardEngine's changes to the shown dashboard until the editor is destroyed. A burst of
|
|
236
|
+
* changes is handled once, after the current task.
|
|
237
|
+
*/
|
|
238
|
+
private watchSavedDashboard;
|
|
239
|
+
/** True for a change to the shown dashboard's record, or for a reload of all dashboards. */
|
|
240
|
+
private isChangeToShownDashboard;
|
|
241
|
+
/**
|
|
242
|
+
* Brings an idle editor in step with the saved dashboard after a change to it, and reports a rename
|
|
243
|
+
* saved elsewhere, also while editing: the host's title follows the saved name, and the name the user
|
|
244
|
+
* typed stays in the field.
|
|
245
|
+
*/
|
|
246
|
+
private onSavedDashboardChanged;
|
|
247
|
+
/**
|
|
248
|
+
* Brings the shown dashboard in step with DashboardEngine's current copy of it. The viewer rebuilds
|
|
249
|
+
* only when the saved layout differs from the one it shows. When only the copy is new (DashboardEngine
|
|
250
|
+
* reloaded its dashboards), the editor and the viewer take it without a rebuild: a save writes every
|
|
251
|
+
* field of the entity, so saving an old copy would write its old values.
|
|
252
|
+
*/
|
|
253
|
+
private syncWithSavedDashboard;
|
|
254
|
+
/** Shows the saved dashboard in the viewer: DashboardEngine's copy of it when the engine has one. */
|
|
255
|
+
private reloadSavedDashboard;
|
|
256
|
+
/** The shown dashboard as DashboardEngine holds it now. Null when the engine does not have it. */
|
|
257
|
+
private savedDashboard;
|
|
258
|
+
/**
|
|
259
|
+
* True when the dashboard was saved elsewhere after the current edit session began: another layout,
|
|
260
|
+
* name or description. False outside edit mode, where no edit session runs.
|
|
261
|
+
*/
|
|
262
|
+
private savedElsewhereSinceEditStart;
|
|
263
|
+
/** Asks whether to replace a save made elsewhere. Resolves true for Save anyway, false for Keep editing. */
|
|
264
|
+
private confirmOverwrite;
|
|
265
|
+
/** Routes the viewer's part requests. Outside edit mode, only Add part on an empty dashboard counts: it enters edit mode first. */
|
|
266
|
+
private onPanelInteraction;
|
|
267
|
+
/** Opens the part dialog to add a part. Only while editing and not saving. */
|
|
268
|
+
OpenAddPartDialog(): void;
|
|
269
|
+
/** Opens the part dialog to edit the part with this panel ID. */
|
|
270
|
+
private openEditPartDialog;
|
|
271
|
+
/** Adds the part, or applies the edited part, from the part dialog. */
|
|
272
|
+
OnPartDialogSaved(result: DashboardPartDialogResult): Promise<void>;
|
|
273
|
+
/** Closes the part dialog. */
|
|
274
|
+
ClosePartDialog(): void;
|
|
275
|
+
/** Closes every part dialog. A part dialog belongs to one edit session. */
|
|
276
|
+
private closePartDialogs;
|
|
277
|
+
/**
|
|
278
|
+
* Asks the user to confirm removing a part, then removes it. Changes nothing when the user cancels, or when the
|
|
279
|
+
* edit session, the viewer or the part changed while the confirm was open.
|
|
280
|
+
*/
|
|
281
|
+
private confirmRemovePart;
|
|
282
|
+
/**
|
|
283
|
+
* Applies one part change to the viewer, tells the user when it fails, and reports the change through
|
|
284
|
+
* ConfigChanged. The change is saved with the dashboard's Save. Does nothing while a Save runs, for
|
|
285
|
+
* example from a dialog that was open when the Save started.
|
|
286
|
+
*/
|
|
287
|
+
private applyPartChange;
|
|
288
|
+
/** Shows the star's new state when any favorite changes, also on another page, until the editor is destroyed. */
|
|
289
|
+
private watchFavorites;
|
|
290
|
+
/** Stars or unstars the shown dashboard, tells the user the new state, and emits it through FavoriteChange. */
|
|
291
|
+
ToggleFavorite(): Promise<void>;
|
|
292
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DashboardEditorComponent, never>;
|
|
293
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DashboardEditorComponent, "mj-dashboard-editor", never, { "DashboardId": { "alias": "DashboardId"; "required": false; }; "StartInEditMode": { "alias": "StartInEditMode"; "required": false; }; "TitleTemplate": { "alias": "TitleTemplate"; "required": false; }; "ShowOpenInDashboards": { "alias": "ShowOpenInDashboards"; "required": false; }; "ShowFavorite": { "alias": "ShowFavorite"; "required": false; }; "BodyStyle": { "alias": "BodyStyle"; "required": false; }; }, { "StartInEditModeChange": "StartInEditModeChange"; "Loaded": "Loaded"; "LoadFailed": "LoadFailed"; "EditingChange": "EditingChange"; "Saved": "Saved"; "NameChanged": "NameChanged"; "ConfigChanged": "ConfigChanged"; "ReloadedFromSaved": "ReloadedFromSaved"; "FavoriteChange": "FavoriteChange"; "NavigationRequested": "NavigationRequested"; "OpenInDashboardsRequested": "OpenInDashboardsRequested"; }, never, ["[headerTools]", "[viewActions]"], false, never>;
|
|
294
|
+
}
|
|
295
|
+
//# sourceMappingURL=dashboard-editor.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
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