@memberjunction/ng-dashboard-viewer 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/README.md +165 -17
- package/dist/lib/config-dialogs/confirm-dialog.component.d.ts +3 -4
- package/dist/lib/config-dialogs/confirm-dialog.component.d.ts.map +1 -1
- package/dist/lib/config-dialogs/confirm-dialog.component.js +3 -2
- package/dist/lib/config-dialogs/confirm-dialog.component.js.map +1 -1
- package/dist/lib/config-panels/artifact-config-panel.component.d.ts.map +1 -1
- package/dist/lib/config-panels/artifact-config-panel.component.js +59 -50
- package/dist/lib/config-panels/artifact-config-panel.component.js.map +1 -1
- package/dist/lib/config-panels/base-config-panel.d.ts +8 -3
- package/dist/lib/config-panels/base-config-panel.d.ts.map +1 -1
- package/dist/lib/config-panels/base-config-panel.js +10 -3
- package/dist/lib/config-panels/base-config-panel.js.map +1 -1
- package/dist/lib/config-panels/query-config-panel.component.js +124 -99
- package/dist/lib/config-panels/query-config-panel.component.js.map +1 -1
- package/dist/lib/config-panels/view-config-panel.component.js +111 -103
- package/dist/lib/config-panels/view-config-panel.component.js.map +1 -1
- package/dist/lib/config-panels/weburl-config-panel.component.js +89 -80
- package/dist/lib/config-panels/weburl-config-panel.component.js.map +1 -1
- package/dist/lib/dashboard-browser/dashboard-browser.component.d.ts +79 -28
- package/dist/lib/dashboard-browser/dashboard-browser.component.d.ts.map +1 -1
- package/dist/lib/dashboard-browser/dashboard-browser.component.js +446 -447
- package/dist/lib/dashboard-browser/dashboard-browser.component.js.map +1 -1
- package/dist/lib/dashboard-card/dashboard-card.component.d.ts +69 -0
- package/dist/lib/dashboard-card/dashboard-card.component.d.ts.map +1 -0
- package/dist/lib/dashboard-card/dashboard-card.component.js +281 -0
- package/dist/lib/dashboard-card/dashboard-card.component.js.map +1 -0
- package/dist/lib/dashboard-card/dashboard-card.helpers.d.ts +18 -0
- package/dist/lib/dashboard-card/dashboard-card.helpers.d.ts.map +1 -0
- package/dist/lib/dashboard-card/dashboard-card.helpers.js +43 -0
- package/dist/lib/dashboard-card/dashboard-card.helpers.js.map +1 -0
- package/dist/lib/dashboard-card/layout-preview-cache.d.ts +15 -0
- package/dist/lib/dashboard-card/layout-preview-cache.d.ts.map +1 -0
- package/dist/lib/dashboard-card/layout-preview-cache.js +22 -0
- package/dist/lib/dashboard-card/layout-preview-cache.js.map +1 -0
- package/dist/lib/dashboard-viewer/dashboard-viewer.component.d.ts +69 -12
- package/dist/lib/dashboard-viewer/dashboard-viewer.component.d.ts.map +1 -1
- package/dist/lib/dashboard-viewer/dashboard-viewer.component.js +173 -145
- package/dist/lib/dashboard-viewer/dashboard-viewer.component.js.map +1 -1
- package/dist/lib/dashboard-viewer.module.d.ts +24 -20
- package/dist/lib/dashboard-viewer.module.d.ts.map +1 -1
- package/dist/lib/dashboard-viewer.module.js +42 -5
- package/dist/lib/dashboard-viewer.module.js.map +1 -1
- package/dist/lib/dialogs/add-panel-dialog/add-panel-dialog.component.d.ts +7 -12
- package/dist/lib/dialogs/add-panel-dialog/add-panel-dialog.component.d.ts.map +1 -1
- package/dist/lib/dialogs/add-panel-dialog/add-panel-dialog.component.js +3 -1
- package/dist/lib/dialogs/add-panel-dialog/add-panel-dialog.component.js.map +1 -1
- package/dist/lib/dialogs/dashboard-name-dialog/dashboard-name-dialog.component.d.ts +54 -0
- package/dist/lib/dialogs/dashboard-name-dialog/dashboard-name-dialog.component.d.ts.map +1 -0
- package/dist/lib/dialogs/dashboard-name-dialog/dashboard-name-dialog.component.js +156 -0
- package/dist/lib/dialogs/dashboard-name-dialog/dashboard-name-dialog.component.js.map +1 -0
- package/dist/lib/dialogs/edit-part-dialog/edit-part-dialog.component.d.ts +5 -11
- package/dist/lib/dialogs/edit-part-dialog/edit-part-dialog.component.d.ts.map +1 -1
- package/dist/lib/dialogs/edit-part-dialog/edit-part-dialog.component.js +3 -1
- package/dist/lib/dialogs/edit-part-dialog/edit-part-dialog.component.js.map +1 -1
- package/dist/lib/dialogs/part-dialog/dashboard-part-dialog.component.d.ts +147 -0
- package/dist/lib/dialogs/part-dialog/dashboard-part-dialog.component.d.ts.map +1 -0
- package/dist/lib/dialogs/part-dialog/dashboard-part-dialog.component.js +536 -0
- package/dist/lib/dialogs/part-dialog/dashboard-part-dialog.component.js.map +1 -0
- package/dist/lib/layout-preview/dashboard-layout-preview-node.component.d.ts +20 -0
- package/dist/lib/layout-preview/dashboard-layout-preview-node.component.d.ts.map +1 -0
- package/dist/lib/layout-preview/dashboard-layout-preview-node.component.js +80 -0
- package/dist/lib/layout-preview/dashboard-layout-preview-node.component.js.map +1 -0
- package/dist/lib/layout-preview/dashboard-layout-preview.component.d.ts +28 -0
- package/dist/lib/layout-preview/dashboard-layout-preview.component.d.ts.map +1 -0
- package/dist/lib/layout-preview/dashboard-layout-preview.component.js +62 -0
- package/dist/lib/layout-preview/dashboard-layout-preview.component.js.map +1 -0
- package/dist/lib/layout-preview/dashboard-layout-preview.d.ts +33 -0
- package/dist/lib/layout-preview/dashboard-layout-preview.d.ts.map +1 -0
- package/dist/lib/layout-preview/dashboard-layout-preview.js +138 -0
- package/dist/lib/layout-preview/dashboard-layout-preview.js.map +1 -0
- package/dist/lib/models/dashboard-layout-editor.d.ts +78 -0
- package/dist/lib/models/dashboard-layout-editor.d.ts.map +1 -0
- package/dist/lib/models/dashboard-layout-editor.js +374 -0
- package/dist/lib/models/dashboard-layout-editor.js.map +1 -0
- package/dist/lib/models/remove-part-confirm.d.ts +8 -0
- package/dist/lib/models/remove-part-confirm.d.ts.map +1 -0
- package/dist/lib/models/remove-part-confirm.js +23 -0
- package/dist/lib/models/remove-part-confirm.js.map +1 -0
- package/dist/lib/parts/artifact-part.component.js +2 -2
- package/dist/lib/parts/artifact-part.component.js.map +1 -1
- package/dist/lib/parts/query-part.component.js +2 -2
- package/dist/lib/parts/query-part.component.js.map +1 -1
- package/dist/lib/parts/view-part.component.js +2 -2
- package/dist/lib/parts/view-part.component.js.map +1 -1
- package/dist/lib/parts/weburl-part.component.js +2 -2
- package/dist/lib/parts/weburl-part.component.js.map +1 -1
- package/dist/lib/services/golden-layout-wrapper.service.d.ts +40 -0
- package/dist/lib/services/golden-layout-wrapper.service.d.ts.map +1 -1
- package/dist/lib/services/golden-layout-wrapper.service.js +117 -9
- package/dist/lib/services/golden-layout-wrapper.service.js.map +1 -1
- package/dist/lib/services/stack-part-actions.d.ts +11 -0
- package/dist/lib/services/stack-part-actions.d.ts.map +1 -0
- package/dist/lib/services/stack-part-actions.js +41 -0
- package/dist/lib/services/stack-part-actions.js.map +1 -0
- package/dist/public-api.d.ts +9 -0
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +13 -0
- package/dist/public-api.js.map +1 -1
- package/package.json +13 -13
|
@@ -11,11 +11,13 @@ import { EntityViewerModule } from '@memberjunction/ng-entity-viewer';
|
|
|
11
11
|
import { QueryViewerModule } from '@memberjunction/ng-query-viewer';
|
|
12
12
|
// MJ Artifacts for displaying conversation artifacts
|
|
13
13
|
import { ArtifactsModule } from '@memberjunction/ng-artifacts';
|
|
14
|
-
// MJ UI Components for the canonical empty-state placeholder
|
|
15
|
-
|
|
14
|
+
// MJ UI Components for the canonical empty-state placeholder, collapsible config-panel sections,
|
|
15
|
+
// and the dialog and buttons of the part dialog
|
|
16
|
+
import { MJEmptyStateComponent, MJAccordionModule, MJDialogComponent, MJDialogActionsComponent, MJButtonDirective } from '@memberjunction/ng-ui-components';
|
|
16
17
|
// Main Component
|
|
17
18
|
import { DashboardViewerComponent } from './dashboard-viewer/dashboard-viewer.component';
|
|
18
19
|
// Dialogs
|
|
20
|
+
import { DashboardPartDialogComponent } from './dialogs/part-dialog/dashboard-part-dialog.component';
|
|
19
21
|
import { AddPanelDialogComponent } from './dialogs/add-panel-dialog/add-panel-dialog.component';
|
|
20
22
|
import { EditPartDialogComponent } from './dialogs/edit-part-dialog/edit-part-dialog.component';
|
|
21
23
|
// Confirm Dialog (generic utility)
|
|
@@ -34,6 +36,11 @@ import { ArtifactPartComponent } from './parts/artifact-part.component';
|
|
|
34
36
|
import { DashboardBrowserComponent } from './dashboard-browser/dashboard-browser.component';
|
|
35
37
|
// Breadcrumb Component (reusable navigation component)
|
|
36
38
|
import { DashboardBreadcrumbComponent } from './breadcrumb/dashboard-breadcrumb.component';
|
|
39
|
+
// Layout Preview (a miniature of a saved dashboard layout, for dashboard cards)
|
|
40
|
+
import { DashboardLayoutPreviewComponent } from './layout-preview/dashboard-layout-preview.component';
|
|
41
|
+
import { DashboardLayoutPreviewNodeComponent } from './layout-preview/dashboard-layout-preview-node.component';
|
|
42
|
+
// Dashboard Card (one dashboard: picture, name, owner, Shared marker, favorite star)
|
|
43
|
+
import { DashboardCardComponent } from './dashboard-card/dashboard-card.component';
|
|
37
44
|
import * as i0 from "@angular/core";
|
|
38
45
|
export class DashboardViewerModule {
|
|
39
46
|
static ɵfac = function DashboardViewerModule_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || DashboardViewerModule)(); };
|
|
@@ -46,7 +53,9 @@ export class DashboardViewerModule {
|
|
|
46
53
|
QueryViewerModule,
|
|
47
54
|
ArtifactsModule,
|
|
48
55
|
MJEmptyStateComponent,
|
|
49
|
-
MJAccordionModule
|
|
56
|
+
MJAccordionModule,
|
|
57
|
+
MJDialogComponent,
|
|
58
|
+
MJDialogActionsComponent] });
|
|
50
59
|
}
|
|
51
60
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DashboardViewerModule, [{
|
|
52
61
|
type: NgModule,
|
|
@@ -58,7 +67,13 @@ export class DashboardViewerModule {
|
|
|
58
67
|
DashboardBrowserComponent,
|
|
59
68
|
// Breadcrumb Component
|
|
60
69
|
DashboardBreadcrumbComponent,
|
|
70
|
+
// Layout Preview (the node component draws the preview's rows, columns and panels)
|
|
71
|
+
DashboardLayoutPreviewComponent,
|
|
72
|
+
DashboardLayoutPreviewNodeComponent,
|
|
73
|
+
// Dashboard Card
|
|
74
|
+
DashboardCardComponent,
|
|
61
75
|
// Generic Dialogs
|
|
76
|
+
DashboardPartDialogComponent,
|
|
62
77
|
AddPanelDialogComponent,
|
|
63
78
|
EditPartDialogComponent,
|
|
64
79
|
ConfirmDialogComponent,
|
|
@@ -84,7 +99,10 @@ export class DashboardViewerModule {
|
|
|
84
99
|
QueryViewerModule,
|
|
85
100
|
ArtifactsModule,
|
|
86
101
|
MJEmptyStateComponent,
|
|
87
|
-
MJAccordionModule
|
|
102
|
+
MJAccordionModule,
|
|
103
|
+
MJDialogComponent,
|
|
104
|
+
MJDialogActionsComponent,
|
|
105
|
+
MJButtonDirective
|
|
88
106
|
],
|
|
89
107
|
exports: [
|
|
90
108
|
// Main Component
|
|
@@ -93,7 +111,12 @@ export class DashboardViewerModule {
|
|
|
93
111
|
DashboardBrowserComponent,
|
|
94
112
|
// Breadcrumb Component
|
|
95
113
|
DashboardBreadcrumbComponent,
|
|
114
|
+
// Layout Preview
|
|
115
|
+
DashboardLayoutPreviewComponent,
|
|
116
|
+
// Dashboard Card
|
|
117
|
+
DashboardCardComponent,
|
|
96
118
|
// Generic Dialogs
|
|
119
|
+
DashboardPartDialogComponent,
|
|
97
120
|
AddPanelDialogComponent,
|
|
98
121
|
EditPartDialogComponent,
|
|
99
122
|
ConfirmDialogComponent,
|
|
@@ -117,7 +140,13 @@ export class DashboardViewerModule {
|
|
|
117
140
|
DashboardBrowserComponent,
|
|
118
141
|
// Breadcrumb Component
|
|
119
142
|
DashboardBreadcrumbComponent,
|
|
143
|
+
// Layout Preview (the node component draws the preview's rows, columns and panels)
|
|
144
|
+
DashboardLayoutPreviewComponent,
|
|
145
|
+
DashboardLayoutPreviewNodeComponent,
|
|
146
|
+
// Dashboard Card
|
|
147
|
+
DashboardCardComponent,
|
|
120
148
|
// Generic Dialogs
|
|
149
|
+
DashboardPartDialogComponent,
|
|
121
150
|
AddPanelDialogComponent,
|
|
122
151
|
EditPartDialogComponent,
|
|
123
152
|
ConfirmDialogComponent,
|
|
@@ -140,14 +169,22 @@ export class DashboardViewerModule {
|
|
|
140
169
|
QueryViewerModule,
|
|
141
170
|
ArtifactsModule,
|
|
142
171
|
MJEmptyStateComponent,
|
|
143
|
-
MJAccordionModule
|
|
172
|
+
MJAccordionModule,
|
|
173
|
+
MJDialogComponent,
|
|
174
|
+
MJDialogActionsComponent,
|
|
175
|
+
MJButtonDirective], exports: [
|
|
144
176
|
// Main Component
|
|
145
177
|
DashboardViewerComponent,
|
|
146
178
|
// Dashboard Browser Component
|
|
147
179
|
DashboardBrowserComponent,
|
|
148
180
|
// Breadcrumb Component
|
|
149
181
|
DashboardBreadcrumbComponent,
|
|
182
|
+
// Layout Preview
|
|
183
|
+
DashboardLayoutPreviewComponent,
|
|
184
|
+
// Dashboard Card
|
|
185
|
+
DashboardCardComponent,
|
|
150
186
|
// Generic Dialogs
|
|
187
|
+
DashboardPartDialogComponent,
|
|
151
188
|
AddPanelDialogComponent,
|
|
152
189
|
EditPartDialogComponent,
|
|
153
190
|
ConfirmDialogComponent,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard-viewer.module.js","sourceRoot":"","sources":["../../src/lib/dashboard-viewer.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,uBAAuB;AACvB,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAExE,sCAAsC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD,qEAAqE;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAEtE,+CAA+C;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAEpE,qDAAqD;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,8B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Aa;QACb,kBAAkB;QAClB,iBAAiB;QACjB,eAAe;QACf,qBAAqB;QACrB,iBAAiB;QACjB,iBAAiB;QACjB,wBAAwB;QACxB,iBAAiB;QAGjB,iBAAiB;QACjB,wBAAwB;QAExB,8BAA8B;QAC9B,yBAAyB;QAEzB,uBAAuB;QACvB,4BAA4B;QAE5B,iBAAiB;QACjB,+BAA+B;QAE/B,iBAAiB;QACjB,sBAAsB;QAEtB,kBAAkB;QAClB,4BAA4B;QAC5B,uBAAuB;QACvB,uBAAuB;QACvB,sBAAsB;QAEtB,oDAAoD;QACpD,0BAA0B;QAC1B,wBAAwB;QACxB,yBAAyB;QACzB,4BAA4B;QAE5B,8DAA8D;QAC9D,mBAAmB;QACnB,iBAAiB;QACjB,kBAAkB;QAClB,qBAAqB","sourcesContent":["import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\n\n// MJ Shared Components\nimport { SharedGenericModule } from '@memberjunction/ng-shared-generic';\n\n// MJ Trees for hierarchical selection\nimport { NgTreesModule } from '@memberjunction/ng-trees';\n\n// MJ Entity Viewer for displaying entity data in grid/cards/timeline\nimport { EntityViewerModule } from '@memberjunction/ng-entity-viewer';\n\n// MJ Query Viewer for displaying query results\nimport { QueryViewerModule } from '@memberjunction/ng-query-viewer';\n\n// MJ Artifacts for displaying conversation artifacts\nimport { ArtifactsModule } from '@memberjunction/ng-artifacts';\n\n// MJ UI Components for the canonical empty-state placeholder, collapsible config-panel sections,\n// and the dialog and buttons of the part dialog\nimport {\n MJEmptyStateComponent,\n MJAccordionModule,\n MJDialogComponent,\n MJDialogActionsComponent,\n MJButtonDirective\n} from '@memberjunction/ng-ui-components';\n\n// Main Component\nimport { DashboardViewerComponent } from './dashboard-viewer/dashboard-viewer.component';\n\n// Dialogs\nimport { DashboardPartDialogComponent } from './dialogs/part-dialog/dashboard-part-dialog.component';\nimport { AddPanelDialogComponent } from './dialogs/add-panel-dialog/add-panel-dialog.component';\nimport { EditPartDialogComponent } from './dialogs/edit-part-dialog/edit-part-dialog.component';\n\n// Confirm Dialog (generic utility)\nimport { ConfirmDialogComponent } from './config-dialogs/confirm-dialog.component';\n\n// Config Panels (pluggable form components for each part type)\nimport { WebURLConfigPanelComponent } from './config-panels/weburl-config-panel.component';\nimport { ViewConfigPanelComponent } from './config-panels/view-config-panel.component';\nimport { QueryConfigPanelComponent } from './config-panels/query-config-panel.component';\nimport { ArtifactConfigPanelComponent } from './config-panels/artifact-config-panel.component';\n\n// Runtime Part Components (pluggable renderers for each part type)\nimport { WebURLPartComponent } from './parts/weburl-part.component';\nimport { ViewPartComponent } from './parts/view-part.component';\nimport { QueryPartComponent } from './parts/query-part.component';\nimport { ArtifactPartComponent } from './parts/artifact-part.component';\n\n// Dashboard Browser Component (generic, no routing dependencies)\nimport { DashboardBrowserComponent } from './dashboard-browser/dashboard-browser.component';\n\n// Breadcrumb Component (reusable navigation component)\nimport { DashboardBreadcrumbComponent } from './breadcrumb/dashboard-breadcrumb.component';\n\n// Layout Preview (a miniature of a saved dashboard layout, for dashboard cards)\nimport { DashboardLayoutPreviewComponent } from './layout-preview/dashboard-layout-preview.component';\nimport { DashboardLayoutPreviewNodeComponent } from './layout-preview/dashboard-layout-preview-node.component';\n\n// Dashboard Card (one dashboard: picture, name, owner, Shared marker, favorite star)\nimport { DashboardCardComponent } from './dashboard-card/dashboard-card.component';\n\n@NgModule({\n declarations: [\n // Main Component\n DashboardViewerComponent,\n\n // Dashboard Browser Component\n DashboardBrowserComponent,\n\n // Breadcrumb Component\n DashboardBreadcrumbComponent,\n\n // Layout Preview (the node component draws the preview's rows, columns and panels)\n DashboardLayoutPreviewComponent,\n DashboardLayoutPreviewNodeComponent,\n\n // Dashboard Card\n DashboardCardComponent,\n\n // Generic Dialogs\n DashboardPartDialogComponent,\n AddPanelDialogComponent,\n EditPartDialogComponent,\n ConfirmDialogComponent,\n\n // Config Panels (pluggable form components)\n // These are registered with @RegisterClass and loaded dynamically via ClassFactory\n WebURLConfigPanelComponent,\n ViewConfigPanelComponent,\n QueryConfigPanelComponent,\n ArtifactConfigPanelComponent,\n\n // Runtime Part Components (pluggable renderers)\n // These are registered with @RegisterClass and loaded dynamically via ClassFactory\n WebURLPartComponent,\n ViewPartComponent,\n QueryPartComponent,\n ArtifactPartComponent\n ],\n imports: [\n CommonModule,\n FormsModule,\n SharedGenericModule,\n NgTreesModule,\n EntityViewerModule,\n QueryViewerModule,\n ArtifactsModule,\n MJEmptyStateComponent,\n MJAccordionModule,\n MJDialogComponent,\n MJDialogActionsComponent,\n MJButtonDirective\n ],\n exports: [\n // Main Component\n DashboardViewerComponent,\n\n // Dashboard Browser Component\n DashboardBrowserComponent,\n\n // Breadcrumb Component\n DashboardBreadcrumbComponent,\n\n // Layout Preview\n DashboardLayoutPreviewComponent,\n\n // Dashboard Card\n DashboardCardComponent,\n\n // Generic Dialogs\n DashboardPartDialogComponent,\n AddPanelDialogComponent,\n EditPartDialogComponent,\n ConfirmDialogComponent,\n\n // Config Panels - exported for potential direct use\n WebURLConfigPanelComponent,\n ViewConfigPanelComponent,\n QueryConfigPanelComponent,\n ArtifactConfigPanelComponent,\n\n // Runtime Part Components - exported for potential direct use\n WebURLPartComponent,\n ViewPartComponent,\n QueryPartComponent,\n ArtifactPartComponent\n ]\n})\nexport class DashboardViewerModule { }\n"]}
|
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
import { EventEmitter, ChangeDetectorRef, ViewContainerRef, AfterViewInit, OnDestroy } from '@angular/core';
|
|
2
2
|
import { MJDashboardPartTypeEntity } from '@memberjunction/core-entities';
|
|
3
|
-
import { PanelConfig } from '../../models/dashboard-types';
|
|
4
3
|
import { ConfigPanelResult } from '../../config-panels/base-config-panel';
|
|
4
|
+
import type { DashboardPartDialogResult } from '../part-dialog/dashboard-part-dialog.component';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
|
-
/**
|
|
7
|
-
|
|
8
|
-
*/
|
|
9
|
-
export interface AddPanelResult {
|
|
10
|
-
PartType: MJDashboardPartTypeEntity;
|
|
11
|
-
Config: PanelConfig;
|
|
12
|
-
Title: string;
|
|
13
|
-
Icon?: string;
|
|
14
|
-
}
|
|
6
|
+
/** @deprecated Use {@link DashboardPartDialogResult}. */
|
|
7
|
+
export type AddPanelResult = DashboardPartDialogResult;
|
|
15
8
|
/**
|
|
16
9
|
* Dialog step type
|
|
17
10
|
*/
|
|
@@ -22,6 +15,8 @@ type DialogStep = 'select-type' | 'configure';
|
|
|
22
15
|
*
|
|
23
16
|
* Config panels are loaded via ClassFactory using DashboardPartType.ConfigDialogClass,
|
|
24
17
|
* allowing new part types to be added without modifying this component.
|
|
18
|
+
*
|
|
19
|
+
* @deprecated Use `DashboardPartDialogComponent` (`<mj-dashboard-part-dialog Mode="add">`), which adds and edits parts on `mj-dialog`.
|
|
25
20
|
*/
|
|
26
21
|
export declare class AddPanelDialogComponent implements AfterViewInit, OnDestroy {
|
|
27
22
|
private readonly cdr;
|
|
@@ -40,7 +35,7 @@ export declare class AddPanelDialogComponent implements AfterViewInit, OnDestroy
|
|
|
40
35
|
set visible(value: boolean);
|
|
41
36
|
private _visible;
|
|
42
37
|
/** Emitted when a part is configured and ready to add */
|
|
43
|
-
PanelAdded: EventEmitter<
|
|
38
|
+
PanelAdded: EventEmitter<DashboardPartDialogResult>;
|
|
44
39
|
/**
|
|
45
40
|
* @deprecated Use {@link PanelAdded}.
|
|
46
41
|
*
|
|
@@ -48,7 +43,7 @@ export declare class AddPanelDialogComponent implements AfterViewInit, OnDestroy
|
|
|
48
43
|
* (panelAdded) keeps working. Must stay AFTER PanelAdded: class fields
|
|
49
44
|
* initialise in order, and the other way round this captures undefined.
|
|
50
45
|
*/
|
|
51
|
-
panelAdded: EventEmitter<
|
|
46
|
+
panelAdded: EventEmitter<DashboardPartDialogResult>;
|
|
52
47
|
/** Emitted when the dialog is cancelled */
|
|
53
48
|
cancelled: EventEmitter<void>;
|
|
54
49
|
ConfigPanelContainer: ViewContainerRef;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-panel-dialog.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/dialogs/add-panel-dialog/add-panel-dialog.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAIH,YAAY,EACZ,iBAAiB,EAEjB,gBAAgB,EAEhB,aAAa,EACb,SAAS,EACZ,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,
|
|
1
|
+
{"version":3,"file":"add-panel-dialog.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/dialogs/add-panel-dialog/add-panel-dialog.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAIH,YAAY,EACZ,iBAAiB,EAEjB,gBAAgB,EAEhB,aAAa,EACb,SAAS,EACZ,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,EAAmB,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAC3F,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gDAAgD,CAAC;;AAEhG,yDAAyD;AACzD,MAAM,MAAM,cAAc,GAAG,yBAAyB,CAAC;AAEvD;;GAEG;AACH,KAAK,UAAU,GAAG,aAAa,GAAG,WAAW,CAAC;AAE9C;;;;;;;;GAQG;AACH,qBAMa,uBAAwB,YAAW,aAAa,EAAE,SAAS;IAsJxD,OAAO,CAAC,QAAQ,CAAC,GAAG;IAjJhC,0CAA0C;IACjC,SAAS,EAAE,yBAAyB,EAAE,CAAM;IAErD,yCAAyC;IACzC,IAAa,SAAS,CAAC,KAAK,EAAE,yBAAyB,EAAE,EAExD;IACD,yCAAyC;IACzC,IAAI,SAAS,IAAI,yBAAyB,EAAE,CAE3C;IAED,oCAAoC;IACpC,IACI,OAAO,CAAC,KAAK,EAAE,OAAO,EAOzB;IACD,IAAI,OAAO,IAAI,OAAO,CAErB;IAED,uCAAuC;IACvC,IAAI,OA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IAC/B,cAAc,UAAS;IAE9B,8CAA8C;IAC9C,IAAW,cAAc,YAExB;IACD,8CAA8C;IAC9C,IAAW,cAAc,CAAC,KAAK,SAAA,EAE9B;gBAM4B,GAAG,EAAE,iBAAiB;IAMnD,eAAe,IAAI,IAAI;IAIvB,WAAW,IAAI,IAAI;IAQnB;;OAEG;IACI,KAAK,IAAI,IAAI;IAWpB,qCAAqC;IAC9B,KAAK,IAAI,IAAI;IAIpB;;OAEG;IACI,gBAAgB,CAAC,QAAQ,EAAE,yBAAyB,GAAG,IAAI;IAYlE,gDAAgD;IACzC,gBAAgB,CAAC,QAAQ,EAAE,yBAAyB,GAAG,IAAI;IAIlE;;OAEG;IACI,MAAM,IAAI,IAAI;IASrB,sCAAsC;IAC/B,MAAM,IAAI,IAAI;IAIrB;;OAEG;IACI,eAAe,CAAC,MAAM,EAAE,iBAAiB,GAAG,IAAI;IAMvD,+CAA+C;IACxC,eAAe,CAAC,MAAM,EAAE,iBAAiB,GAAG,IAAI;IAIvD;;OAEG;IACI,OAAO,IAAI,IAAI;IAoCtB,uCAAuC;IAChC,OAAO,IAAI,IAAI;IAItB;;OAEG;IACI,QAAQ,IAAI,IAAI;IAKvB;;OAEG;IACI,iBAAiB,IAAI,MAAM;IAOlC,iDAAiD;IAC1C,iBAAiB,IAAI,MAAM;IAIlC;;OAEG;IACI,cAAc,IAAI,OAAO;IAIhC,8CAA8C;IACvC,cAAc,IAAI,OAAO;IAQhC;;OAEG;YACW,eAAe;IA+D7B;;OAEG;IACH,OAAO,CAAC,kBAAkB;yCAtYjB,uBAAuB;2CAAvB,uBAAuB;CA4YnC"}
|
|
@@ -191,6 +191,8 @@ function AddPanelDialogComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
|
191
191
|
*
|
|
192
192
|
* Config panels are loaded via ClassFactory using DashboardPartType.ConfigDialogClass,
|
|
193
193
|
* allowing new part types to be added without modifying this component.
|
|
194
|
+
*
|
|
195
|
+
* @deprecated Use `DashboardPartDialogComponent` (`<mj-dashboard-part-dialog Mode="add">`), which adds and edits parts on `mj-dialog`.
|
|
194
196
|
*/
|
|
195
197
|
export class AddPanelDialogComponent {
|
|
196
198
|
cdr;
|
|
@@ -558,5 +560,5 @@ export class AddPanelDialogComponent {
|
|
|
558
560
|
type: ViewChild,
|
|
559
561
|
args: ['configPanelContainer', { read: ViewContainerRef, static: false }]
|
|
560
562
|
}] }); })();
|
|
561
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(AddPanelDialogComponent, { className: "AddPanelDialogComponent", filePath: "src/lib/dialogs/add-panel-dialog/add-panel-dialog.component.ts", lineNumber:
|
|
563
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(AddPanelDialogComponent, { className: "AddPanelDialogComponent", filePath: "src/lib/dialogs/add-panel-dialog/add-panel-dialog.component.ts", lineNumber: 41 }); })();
|
|
562
564
|
//# sourceMappingURL=add-panel-dialog.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-panel-dialog.component.js","sourceRoot":"","sources":["../../../../src/lib/dialogs/add-panel-dialog/add-panel-dialog.component.ts","../../../../src/lib/dialogs/add-panel-dialog/add-panel-dialog.component.html"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EACT,KAAK,EACL,MAAM,EACN,YAAY,EAEZ,SAAS,EACT,gBAAgB,EAInB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAGlD,OAAO,EAAE,eAAe,EAAqB,MAAM,uCAAuC,CAAC;;;;ICevE,gCAA+B;IAC7B,YACF;IAAA,iBAAO;;;IADL,cACF;IADE,wDACF;;;;IAXN,+BAEuC;IAArC,4OAAS,oCAA0B,KAAC;IACpC,+BAAuB;IACrB,oBAA6D;IAC/D,iBAAM;IAEJ,AADF,+BAA0B,eACC;IAAA,YAAmB;IAAA,iBAAO;IACnD,8HAA4B;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,MAAM;;kBASN,MAAM;;kBAGN,MAAM;;kBAMN,SAAS;mBAAC,sBAAsB,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,EAAE,KAAK,EAAE;;kFAhEnE,uBAAuB","sourcesContent":["import {\n Component,\n Input,\n Output,\n EventEmitter,\n ChangeDetectorRef,\n ViewChild,\n ViewContainerRef,\n ComponentRef,\n AfterViewInit,\n OnDestroy\n} from '@angular/core';\nimport { MJGlobal } from '@memberjunction/global';\nimport { MJDashboardPartTypeEntity } from '@memberjunction/core-entities';\nimport { PanelConfig } from '../../models/dashboard-types';\nimport { BaseConfigPanel, ConfigPanelResult } from '../../config-panels/base-config-panel';\n\n/**\n * Result when a panel is added\n */\nexport interface AddPanelResult {\n PartType: MJDashboardPartTypeEntity;\n Config: PanelConfig;\n Title: string;\n Icon?: string;\n}\n\n/**\n * Dialog step type\n */\ntype DialogStep = 'select-type' | 'configure';\n\n/**\n * Dialog for adding a new part to the dashboard.\n * Two-step flow: first select the part type, then configure using dynamically loaded config panels.\n *\n * Config panels are loaded via ClassFactory using DashboardPartType.ConfigDialogClass,\n * allowing new part types to be added without modifying this component.\n */\n@Component({\n standalone: false,\n selector: 'mj-add-panel-dialog',\n templateUrl: './add-panel-dialog.component.html',\n styleUrls: ['./add-panel-dialog.component.css']\n})\nexport class AddPanelDialogComponent implements AfterViewInit, OnDestroy {\n // ========================================\n // Inputs\n // ========================================\n\n /** Available part types to choose from */\n @Input() PartTypes: MJDashboardPartTypeEntity[] = [];\n\n /** @deprecated Use {@link PartTypes}. */\n @Input() set partTypes(value: MJDashboardPartTypeEntity[]) {\n this.PartTypes = value;\n }\n /** @deprecated Use {@link PartTypes}. */\n get partTypes(): MJDashboardPartTypeEntity[] {\n return this.PartTypes;\n }\n\n /** Whether the dialog is visible */\n @Input()\n set Visible(value: boolean) {\n const previous = this._visible;\n this._visible = value;\n if (!value && previous) {\n // Dialog closing - cleanup\n this.destroyConfigPanel();\n }\n }\n get Visible(): boolean {\n return this._visible;\n }\n\n /** @deprecated Use {@link Visible}. */\n get visible(): boolean {\n return this.Visible;\n }\n /** @deprecated Use {@link Visible}. */\n @Input() set visible(value: boolean) {\n this.Visible = value;\n }\n private _visible = false;\n\n // ========================================\n // Outputs\n // ========================================\n\n /** Emitted when a part is configured and ready to add */\n @Output() PanelAdded = new EventEmitter<AddPanelResult>();\n\n /**\n * @deprecated Use {@link PanelAdded}.\n *\n * The same emitter under the old binding name, so a template still binding\n * (panelAdded) keeps working. Must stay AFTER PanelAdded: class fields\n * initialise in order, and the other way round this captures undefined.\n */\n @Output() panelAdded = this.PanelAdded;\n\n /** Emitted when the dialog is cancelled */\n @Output() cancelled = new EventEmitter<void>();\n\n // ========================================\n // ViewChild for dynamic component loading\n // ========================================\n\n @ViewChild('configPanelContainer', { read: ViewContainerRef, static: false })\n ConfigPanelContainer!: ViewContainerRef;\n\n /** @deprecated Use {@link ConfigPanelContainer}. */\n get configPanelContainer(): ViewContainerRef {\n return this.ConfigPanelContainer;\n }\n /** @deprecated Use {@link ConfigPanelContainer}. */\n set configPanelContainer(value: ViewContainerRef) {\n this.ConfigPanelContainer = value;\n }\n\n // ========================================\n // State\n // ========================================\n\n public Step: DialogStep = 'select-type';\n\n /** @deprecated Use {@link Step}. */\n public get step(): DialogStep {\n return this.Step;\n }\n /** @deprecated Use {@link Step}. */\n public set step(value: DialogStep) {\n this.Step = value;\n }\n public SelectedPartType: MJDashboardPartTypeEntity | null = null;\n\n /** @deprecated Use {@link SelectedPartType}. */\n public get selectedPartType(): MJDashboardPartTypeEntity | null {\n return this.SelectedPartType;\n }\n /** @deprecated Use {@link SelectedPartType}. */\n public set selectedPartType(value: MJDashboardPartTypeEntity | null) {\n this.SelectedPartType = value;\n }\n\n /** Current config panel result (updated via configChanged event) */\n public CurrentResult: ConfigPanelResult | null = null;\n\n /** @deprecated Use {@link CurrentResult}. */\n public get currentResult(): ConfigPanelResult | null {\n return this.CurrentResult;\n }\n /** @deprecated Use {@link CurrentResult}. */\n public set currentResult(value: ConfigPanelResult | null) {\n this.CurrentResult = value;\n }\n\n /** Whether the Add Part button should be enabled */\n public CanAddPart = false;\n\n /** @deprecated Use {@link CanAddPart}. */\n public get canAddPart() {\n return this.CanAddPart;\n }\n /** @deprecated Use {@link CanAddPart}. */\n public set canAddPart(value) {\n this.CanAddPart = value;\n }\n\n /** Reference to dynamically created config panel */\n private configPanelRef: ComponentRef<BaseConfigPanel> | null = null;\n\n /** Whether the view has been initialized */\n private viewInitialized = false;\n\n /** Error loading the config panel */\n public loadError: string | null = null;\n\n /** Whether config panel is loading */\n public IsLoadingPanel = false;\n\n /** @deprecated Use {@link IsLoadingPanel}. */\n public get isLoadingPanel() {\n return this.IsLoadingPanel;\n }\n /** @deprecated Use {@link IsLoadingPanel}. */\n public set isLoadingPanel(value) {\n this.IsLoadingPanel = value;\n }\n\n // ========================================\n // Constructor\n // ========================================\n\n constructor(private readonly cdr: ChangeDetectorRef) {}\n\n // ========================================\n // Lifecycle\n // ========================================\n\n ngAfterViewInit(): void {\n this.viewInitialized = true;\n }\n\n ngOnDestroy(): void {\n this.destroyConfigPanel();\n }\n\n // ========================================\n // Public Methods\n // ========================================\n\n /**\n * Reset the dialog to initial state\n */\n public Reset(): void {\n this.Step = 'select-type';\n this.SelectedPartType = null;\n this.CurrentResult = null;\n this.CanAddPart = false;\n this.loadError = null;\n this.IsLoadingPanel = false;\n this.destroyConfigPanel();\n this.cdr.detectChanges();\n }\n\n /** @deprecated Use {@link Reset}. */\n public reset(): void {\n return this.Reset();\n }\n\n /**\n * Select a part type and go to configuration step\n */\n public OnPartTypeSelect(partType: MJDashboardPartTypeEntity): void {\n this.SelectedPartType = partType;\n this.CurrentResult = null;\n this.CanAddPart = false;\n this.loadError = null;\n this.Step = 'configure';\n this.cdr.detectChanges();\n\n // Load the config panel after view updates\n setTimeout(() => this.loadConfigPanel(), 0);\n }\n\n /** @deprecated Use {@link OnPartTypeSelect}. */\n public onPartTypeSelect(partType: MJDashboardPartTypeEntity): void {\n return this.OnPartTypeSelect(partType);\n }\n\n /**\n * Go back to type selection\n */\n public GoBack(): void {\n this.Step = 'select-type';\n this.CurrentResult = null;\n this.CanAddPart = false;\n this.loadError = null;\n this.destroyConfigPanel();\n this.cdr.detectChanges();\n }\n\n /** @deprecated Use {@link GoBack}. */\n public goBack(): void {\n return this.GoBack();\n }\n\n /**\n * Handle config changes from embedded config panel\n */\n public OnConfigChanged(result: ConfigPanelResult): void {\n this.CurrentResult = result;\n this.CanAddPart = result.isValid;\n this.cdr.detectChanges();\n }\n\n /** @deprecated Use {@link OnConfigChanged}. */\n public onConfigChanged(result: ConfigPanelResult): void {\n return this.OnConfigChanged(result);\n }\n\n /**\n * Add the configured part\n */\n public AddPart(): void {\n if (!this.SelectedPartType) return;\n\n // Get result from the dynamic panel\n if (this.configPanelRef) {\n const panel = this.configPanelRef.instance;\n const result = panel.getResult();\n\n if (!result.isValid) {\n this.CurrentResult = result;\n this.CanAddPart = false;\n this.cdr.detectChanges();\n return;\n }\n\n this.PanelAdded.emit({\n PartType: this.SelectedPartType,\n Config: result.config,\n Title: result.title,\n Icon: result.icon || this.SelectedPartType.Icon || 'fa-solid fa-puzzle-piece'\n });\n\n this.Reset();\n return;\n }\n\n // Handle types without a config panel - use a generic config with just the type\n this.PanelAdded.emit({\n PartType: this.SelectedPartType,\n Config: { type: this.SelectedPartType.Name },\n Title: this.SelectedPartType.Name,\n Icon: this.SelectedPartType.Icon || 'fa-solid fa-puzzle-piece'\n });\n this.Reset();\n }\n\n /** @deprecated Use {@link AddPart}. */\n public addPart(): void {\n return this.AddPart();\n }\n\n /**\n * Cancel the dialog\n */\n public onCancel(): void {\n this.Reset();\n this.cancelled.emit();\n }\n\n /**\n * Get the configuration type name\n */\n public GetConfigTypeName(): string {\n if (!this.SelectedPartType) return '';\n const name = this.SelectedPartType.Name;\n if (name === 'WebURL') return 'Web URL';\n return name;\n }\n\n /** @deprecated Use {@link GetConfigTypeName}. */\n public getConfigTypeName(): string {\n return this.GetConfigTypeName();\n }\n\n /**\n * Check if the selected part type has a config panel class\n */\n public HasConfigPanel(): boolean {\n return !!this.SelectedPartType?.ConfigDialogClass;\n }\n\n /** @deprecated Use {@link HasConfigPanel}. */\n public hasConfigPanel(): boolean {\n return this.HasConfigPanel();\n }\n\n // ========================================\n // Private Methods\n // ========================================\n\n /**\n * Dynamically load the config panel component\n */\n private async loadConfigPanel(): Promise<void> {\n this.destroyConfigPanel();\n\n if (!this.SelectedPartType?.ConfigDialogClass) {\n // No config panel for this type - that's okay, use defaults\n this.CanAddPart = true;\n this.cdr.detectChanges();\n return;\n }\n\n if (!this.viewInitialized || !this.ConfigPanelContainer) {\n this.loadError = 'View container not ready';\n this.cdr.detectChanges();\n return;\n }\n\n this.IsLoadingPanel = true;\n this.cdr.detectChanges();\n\n try {\n // Use ClassFactory to create the config panel instance\n const panelInstance = await MJGlobal.Instance.ClassFactory.CreateInstanceAsync<BaseConfigPanel>(\n BaseConfigPanel,\n this.SelectedPartType.ConfigDialogClass\n );\n\n if (!panelInstance) {\n this.loadError = `Could not create config panel: ${this.SelectedPartType.ConfigDialogClass}`;\n this.IsLoadingPanel = false;\n this.CanAddPart = true; // Allow adding with default config\n this.cdr.detectChanges();\n return;\n }\n\n // Get the component class from the instance\n const componentClass = (panelInstance as object).constructor as typeof BaseConfigPanel;\n\n // Clear the container and create the component\n this.ConfigPanelContainer.clear();\n this.configPanelRef = this.ConfigPanelContainer.createComponent(componentClass as never);\n\n // Set inputs on the component\n const panel = this.configPanelRef.instance;\n panel.partType = this.SelectedPartType;\n panel.panel = null; // New panel, not editing\n panel.config = null; // Start with defaults\n\n // Subscribe to config changes\n panel.configChanged.subscribe((result: ConfigPanelResult) => {\n this.OnConfigChanged(result);\n });\n\n this.IsLoadingPanel = false;\n this.cdr.detectChanges();\n\n } catch (error) {\n this.loadError = `Failed to load config panel: ${error instanceof Error ? error.message : String(error)}`;\n this.IsLoadingPanel = false;\n this.CanAddPart = true; // Allow adding with default config\n this.cdr.detectChanges();\n }\n }\n\n /**\n * Destroy the dynamically created config panel\n */\n private destroyConfigPanel(): void {\n if (this.configPanelRef) {\n this.configPanelRef.destroy();\n this.configPanelRef = null;\n }\n }\n}\n","<!-- Add Part Dialog -->\n@if (visible) {\n <div class=\"add-part-dialog-overlay\" (click)=\"onCancel()\">\n <div class=\"add-part-dialog\" (click)=\"$event.stopPropagation()\">\n <!-- Step 1: Select Part Type -->\n @if (step === 'select-type') {\n <!-- Header -->\n <div class=\"dialog-header\">\n <h3>\n <i class=\"fa-solid fa-plus-circle\"></i>\n Add Part\n </h3>\n <button class=\"close-button\" aria-label=\"Close dialog\" (click)=\"onCancel()\">\n <i class=\"fa-solid fa-times\"></i>\n </button>\n </div>\n <!-- Content -->\n <div class=\"dialog-content\">\n <p class=\"instruction\">Select a part type to add to your dashboard:</p>\n <div class=\"part-type-grid\">\n @for (partType of partTypes; track partType) {\n <div\n class=\"part-type-card\"\n (click)=\"onPartTypeSelect(partType)\">\n <div class=\"card-icon\">\n <i [class]=\"partType.Icon || 'fa-solid fa-puzzle-piece'\"></i>\n </div>\n <div class=\"card-content\">\n <span class=\"card-title\">{{ partType.Name }}</span>\n @if (partType.Description) {\n <span class=\"card-description\">\n {{ partType.Description }}\n </span>\n }\n </div>\n <i class=\"fa-solid fa-chevron-right card-arrow\"></i>\n </div>\n }\n </div>\n @if (partTypes.length === 0) {\n <div class=\"no-types\">\n <div class=\"warning-icon\">\n <i class=\"fa-solid fa-exclamation-triangle\"></i>\n </div>\n <h4>No part types available</h4>\n <p>Dashboard part types have not been configured in the system.</p>\n </div>\n }\n </div>\n <!-- Footer -->\n <div class=\"dialog-footer\">\n <button class=\"btn-secondary\" (click)=\"onCancel()\">Cancel</button>\n </div>\n }\n <!-- Step 2: Configure Part -->\n @if (step === 'configure') {\n <!-- Header -->\n <div class=\"dialog-header\">\n <button class=\"back-button\" aria-label=\"Go back\" (click)=\"goBack()\">\n <i class=\"fa-solid fa-arrow-left\"></i>\n </button>\n <h3>\n <i [class]=\"selectedPartType?.Icon || 'fa-solid fa-puzzle-piece'\"></i>\n Configure {{ getConfigTypeName() }} Part\n </h3>\n <button class=\"close-button\" aria-label=\"Close dialog\" (click)=\"onCancel()\">\n <i class=\"fa-solid fa-times\"></i>\n </button>\n </div>\n <!-- Content - Dynamic Config Panel -->\n <div class=\"dialog-content config-content\">\n <!-- Loading state -->\n @if (isLoadingPanel) {\n <div class=\"loading-state\">\n <i class=\"fa-solid fa-spinner fa-spin\"></i>\n <span>Loading configuration panel...</span>\n </div>\n }\n <!-- Error state -->\n @if (loadError && !isLoadingPanel) {\n <div class=\"error-state\">\n <i class=\"fa-solid fa-exclamation-triangle\"></i>\n <span>{{ loadError }}</span>\n <p class=\"error-hint\">You can still add this part with default settings.</p>\n </div>\n }\n <!-- Dynamic config panel container -->\n <ng-container #configPanelContainer></ng-container>\n <!-- No config panel available (custom type) -->\n @if (!hasConfigPanel() && !isLoadingPanel && !loadError) {\n <div class=\"config-placeholder\">\n <i class=\"fa-solid fa-cog\"></i>\n <p>This part type uses default configuration.</p>\n </div>\n }\n <!-- Validation Errors -->\n @if (currentResult && currentResult.errors.length > 0) {\n <div class=\"validation-errors\">\n @for (error of currentResult.errors; track error) {\n <div class=\"error-item\">\n <i class=\"fa-solid fa-exclamation-circle\"></i>\n {{ error }}\n </div>\n }\n </div>\n }\n </div>\n <!-- Footer -->\n <div class=\"dialog-footer\">\n <button class=\"btn-primary\" (click)=\"addPart()\" [disabled]=\"!canAddPart && !loadError\">\n <i class=\"fa-solid fa-plus\"></i>\n Add Part\n </button>\n <button class=\"btn-secondary\" (click)=\"onCancel()\">Cancel</button>\n </div>\n }\n </div>\n </div>\n}\n"]}
|
|
1
|
+
{"version":3,"file":"add-panel-dialog.component.js","sourceRoot":"","sources":["../../../../src/lib/dialogs/add-panel-dialog/add-panel-dialog.component.ts","../../../../src/lib/dialogs/add-panel-dialog/add-panel-dialog.component.html"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS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7B,CAAC;IACL,CAAC;IAED;;OAEG;IACK,kBAAkB;QACtB,IAAI,IAAI,CAAC,cAAc,EAAE,CAAC;YACtB,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,CAAC;YAC9B,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;QAC/B,CAAC;IACL,CAAC;iHA3YQ,uBAAuB;6DAAvB,uBAAuB;mCAgEW,gBAAgB;;;;;YCvG/D,yFAAe;;YAAf,sCAqHC;;;iFD9EY,uBAAuB;cANnC,SAAS;6BACI,KAAK,YACL,qBAAqB;;kBAU9B,KAAK;;kBAGL,KAAK;;kBASL,KAAK;;kBAkBL,KAAK;;kBAUL,MAAM;;kBASN,MAAM;;kBAGN,MAAM;;kBAMN,SAAS;mBAAC,sBAAsB,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,EAAE,KAAK,EAAE;;kFAhEnE,uBAAuB","sourcesContent":["import {\n Component,\n Input,\n Output,\n EventEmitter,\n ChangeDetectorRef,\n ViewChild,\n ViewContainerRef,\n ComponentRef,\n AfterViewInit,\n OnDestroy\n} from '@angular/core';\nimport { MJGlobal } from '@memberjunction/global';\nimport { MJDashboardPartTypeEntity } from '@memberjunction/core-entities';\nimport { BaseConfigPanel, ConfigPanelResult } from '../../config-panels/base-config-panel';\nimport type { DashboardPartDialogResult } from '../part-dialog/dashboard-part-dialog.component';\n\n/** @deprecated Use {@link DashboardPartDialogResult}. */\nexport type AddPanelResult = DashboardPartDialogResult;\n\n/**\n * Dialog step type\n */\ntype DialogStep = 'select-type' | 'configure';\n\n/**\n * Dialog for adding a new part to the dashboard.\n * Two-step flow: first select the part type, then configure using dynamically loaded config panels.\n *\n * Config panels are loaded via ClassFactory using DashboardPartType.ConfigDialogClass,\n * allowing new part types to be added without modifying this component.\n *\n * @deprecated Use `DashboardPartDialogComponent` (`<mj-dashboard-part-dialog Mode=\"add\">`), which adds and edits parts on `mj-dialog`.\n */\n@Component({\n standalone: false,\n selector: 'mj-add-panel-dialog',\n templateUrl: './add-panel-dialog.component.html',\n styleUrls: ['./add-panel-dialog.component.css']\n})\nexport class AddPanelDialogComponent implements AfterViewInit, OnDestroy {\n // ========================================\n // Inputs\n // ========================================\n\n /** Available part types to choose from */\n @Input() PartTypes: MJDashboardPartTypeEntity[] = [];\n\n /** @deprecated Use {@link PartTypes}. */\n @Input() set partTypes(value: MJDashboardPartTypeEntity[]) {\n this.PartTypes = value;\n }\n /** @deprecated Use {@link PartTypes}. */\n get partTypes(): MJDashboardPartTypeEntity[] {\n return this.PartTypes;\n }\n\n /** Whether the dialog is visible */\n @Input()\n set Visible(value: boolean) {\n const previous = this._visible;\n this._visible = value;\n if (!value && previous) {\n // Dialog closing - cleanup\n this.destroyConfigPanel();\n }\n }\n get Visible(): boolean {\n return this._visible;\n }\n\n /** @deprecated Use {@link Visible}. */\n get visible(): boolean {\n return this.Visible;\n }\n /** @deprecated Use {@link Visible}. */\n @Input() set visible(value: boolean) {\n this.Visible = value;\n }\n private _visible = false;\n\n // ========================================\n // Outputs\n // ========================================\n\n /** Emitted when a part is configured and ready to add */\n @Output() PanelAdded = new EventEmitter<AddPanelResult>();\n\n /**\n * @deprecated Use {@link PanelAdded}.\n *\n * The same emitter under the old binding name, so a template still binding\n * (panelAdded) keeps working. Must stay AFTER PanelAdded: class fields\n * initialise in order, and the other way round this captures undefined.\n */\n @Output() panelAdded = this.PanelAdded;\n\n /** Emitted when the dialog is cancelled */\n @Output() cancelled = new EventEmitter<void>();\n\n // ========================================\n // ViewChild for dynamic component loading\n // ========================================\n\n @ViewChild('configPanelContainer', { read: ViewContainerRef, static: false })\n ConfigPanelContainer!: ViewContainerRef;\n\n /** @deprecated Use {@link ConfigPanelContainer}. */\n get configPanelContainer(): ViewContainerRef {\n return this.ConfigPanelContainer;\n }\n /** @deprecated Use {@link ConfigPanelContainer}. */\n set configPanelContainer(value: ViewContainerRef) {\n this.ConfigPanelContainer = value;\n }\n\n // ========================================\n // State\n // ========================================\n\n public Step: DialogStep = 'select-type';\n\n /** @deprecated Use {@link Step}. */\n public get step(): DialogStep {\n return this.Step;\n }\n /** @deprecated Use {@link Step}. */\n public set step(value: DialogStep) {\n this.Step = value;\n }\n public SelectedPartType: MJDashboardPartTypeEntity | null = null;\n\n /** @deprecated Use {@link SelectedPartType}. */\n public get selectedPartType(): MJDashboardPartTypeEntity | null {\n return this.SelectedPartType;\n }\n /** @deprecated Use {@link SelectedPartType}. */\n public set selectedPartType(value: MJDashboardPartTypeEntity | null) {\n this.SelectedPartType = value;\n }\n\n /** Current config panel result (updated via configChanged event) */\n public CurrentResult: ConfigPanelResult | null = null;\n\n /** @deprecated Use {@link CurrentResult}. */\n public get currentResult(): ConfigPanelResult | null {\n return this.CurrentResult;\n }\n /** @deprecated Use {@link CurrentResult}. */\n public set currentResult(value: ConfigPanelResult | null) {\n this.CurrentResult = value;\n }\n\n /** Whether the Add Part button should be enabled */\n public CanAddPart = false;\n\n /** @deprecated Use {@link CanAddPart}. */\n public get canAddPart() {\n return this.CanAddPart;\n }\n /** @deprecated Use {@link CanAddPart}. */\n public set canAddPart(value) {\n this.CanAddPart = value;\n }\n\n /** Reference to dynamically created config panel */\n private configPanelRef: ComponentRef<BaseConfigPanel> | null = null;\n\n /** Whether the view has been initialized */\n private viewInitialized = false;\n\n /** Error loading the config panel */\n public loadError: string | null = null;\n\n /** Whether config panel is loading */\n public IsLoadingPanel = false;\n\n /** @deprecated Use {@link IsLoadingPanel}. */\n public get isLoadingPanel() {\n return this.IsLoadingPanel;\n }\n /** @deprecated Use {@link IsLoadingPanel}. */\n public set isLoadingPanel(value) {\n this.IsLoadingPanel = value;\n }\n\n // ========================================\n // Constructor\n // ========================================\n\n constructor(private readonly cdr: ChangeDetectorRef) {}\n\n // ========================================\n // Lifecycle\n // ========================================\n\n ngAfterViewInit(): void {\n this.viewInitialized = true;\n }\n\n ngOnDestroy(): void {\n this.destroyConfigPanel();\n }\n\n // ========================================\n // Public Methods\n // ========================================\n\n /**\n * Reset the dialog to initial state\n */\n public Reset(): void {\n this.Step = 'select-type';\n this.SelectedPartType = null;\n this.CurrentResult = null;\n this.CanAddPart = false;\n this.loadError = null;\n this.IsLoadingPanel = false;\n this.destroyConfigPanel();\n this.cdr.detectChanges();\n }\n\n /** @deprecated Use {@link Reset}. */\n public reset(): void {\n return this.Reset();\n }\n\n /**\n * Select a part type and go to configuration step\n */\n public OnPartTypeSelect(partType: MJDashboardPartTypeEntity): void {\n this.SelectedPartType = partType;\n this.CurrentResult = null;\n this.CanAddPart = false;\n this.loadError = null;\n this.Step = 'configure';\n this.cdr.detectChanges();\n\n // Load the config panel after view updates\n setTimeout(() => this.loadConfigPanel(), 0);\n }\n\n /** @deprecated Use {@link OnPartTypeSelect}. */\n public onPartTypeSelect(partType: MJDashboardPartTypeEntity): void {\n return this.OnPartTypeSelect(partType);\n }\n\n /**\n * Go back to type selection\n */\n public GoBack(): void {\n this.Step = 'select-type';\n this.CurrentResult = null;\n this.CanAddPart = false;\n this.loadError = null;\n this.destroyConfigPanel();\n this.cdr.detectChanges();\n }\n\n /** @deprecated Use {@link GoBack}. */\n public goBack(): void {\n return this.GoBack();\n }\n\n /**\n * Handle config changes from embedded config panel\n */\n public OnConfigChanged(result: ConfigPanelResult): void {\n this.CurrentResult = result;\n this.CanAddPart = result.isValid;\n this.cdr.detectChanges();\n }\n\n /** @deprecated Use {@link OnConfigChanged}. */\n public onConfigChanged(result: ConfigPanelResult): void {\n return this.OnConfigChanged(result);\n }\n\n /**\n * Add the configured part\n */\n public AddPart(): void {\n if (!this.SelectedPartType) return;\n\n // Get result from the dynamic panel\n if (this.configPanelRef) {\n const panel = this.configPanelRef.instance;\n const result = panel.getResult();\n\n if (!result.isValid) {\n this.CurrentResult = result;\n this.CanAddPart = false;\n this.cdr.detectChanges();\n return;\n }\n\n this.PanelAdded.emit({\n PartType: this.SelectedPartType,\n Config: result.config,\n Title: result.title,\n Icon: result.icon || this.SelectedPartType.Icon || 'fa-solid fa-puzzle-piece'\n });\n\n this.Reset();\n return;\n }\n\n // Handle types without a config panel - use a generic config with just the type\n this.PanelAdded.emit({\n PartType: this.SelectedPartType,\n Config: { type: this.SelectedPartType.Name },\n Title: this.SelectedPartType.Name,\n Icon: this.SelectedPartType.Icon || 'fa-solid fa-puzzle-piece'\n });\n this.Reset();\n }\n\n /** @deprecated Use {@link AddPart}. */\n public addPart(): void {\n return this.AddPart();\n }\n\n /**\n * Cancel the dialog\n */\n public onCancel(): void {\n this.Reset();\n this.cancelled.emit();\n }\n\n /**\n * Get the configuration type name\n */\n public GetConfigTypeName(): string {\n if (!this.SelectedPartType) return '';\n const name = this.SelectedPartType.Name;\n if (name === 'WebURL') return 'Web URL';\n return name;\n }\n\n /** @deprecated Use {@link GetConfigTypeName}. */\n public getConfigTypeName(): string {\n return this.GetConfigTypeName();\n }\n\n /**\n * Check if the selected part type has a config panel class\n */\n public HasConfigPanel(): boolean {\n return !!this.SelectedPartType?.ConfigDialogClass;\n }\n\n /** @deprecated Use {@link HasConfigPanel}. */\n public hasConfigPanel(): boolean {\n return this.HasConfigPanel();\n }\n\n // ========================================\n // Private Methods\n // ========================================\n\n /**\n * Dynamically load the config panel component\n */\n private async loadConfigPanel(): Promise<void> {\n this.destroyConfigPanel();\n\n if (!this.SelectedPartType?.ConfigDialogClass) {\n // No config panel for this type - that's okay, use defaults\n this.CanAddPart = true;\n this.cdr.detectChanges();\n return;\n }\n\n if (!this.viewInitialized || !this.ConfigPanelContainer) {\n this.loadError = 'View container not ready';\n this.cdr.detectChanges();\n return;\n }\n\n this.IsLoadingPanel = true;\n this.cdr.detectChanges();\n\n try {\n // Use ClassFactory to create the config panel instance\n const panelInstance = await MJGlobal.Instance.ClassFactory.CreateInstanceAsync<BaseConfigPanel>(\n BaseConfigPanel,\n this.SelectedPartType.ConfigDialogClass\n );\n\n if (!panelInstance) {\n this.loadError = `Could not create config panel: ${this.SelectedPartType.ConfigDialogClass}`;\n this.IsLoadingPanel = false;\n this.CanAddPart = true; // Allow adding with default config\n this.cdr.detectChanges();\n return;\n }\n\n // Get the component class from the instance\n const componentClass = (panelInstance as object).constructor as typeof BaseConfigPanel;\n\n // Clear the container and create the component\n this.ConfigPanelContainer.clear();\n this.configPanelRef = this.ConfigPanelContainer.createComponent(componentClass as never);\n\n // Set inputs on the component\n const panel = this.configPanelRef.instance;\n panel.partType = this.SelectedPartType;\n panel.panel = null; // New panel, not editing\n panel.config = null; // Start with defaults\n\n // Subscribe to config changes\n panel.configChanged.subscribe((result: ConfigPanelResult) => {\n this.OnConfigChanged(result);\n });\n\n this.IsLoadingPanel = false;\n this.cdr.detectChanges();\n\n } catch (error) {\n this.loadError = `Failed to load config panel: ${error instanceof Error ? error.message : String(error)}`;\n this.IsLoadingPanel = false;\n this.CanAddPart = true; // Allow adding with default config\n this.cdr.detectChanges();\n }\n }\n\n /**\n * Destroy the dynamically created config panel\n */\n private destroyConfigPanel(): void {\n if (this.configPanelRef) {\n this.configPanelRef.destroy();\n this.configPanelRef = null;\n }\n }\n}\n","<!-- Add Part Dialog -->\n@if (visible) {\n <div class=\"add-part-dialog-overlay\" (click)=\"onCancel()\">\n <div class=\"add-part-dialog\" (click)=\"$event.stopPropagation()\">\n <!-- Step 1: Select Part Type -->\n @if (step === 'select-type') {\n <!-- Header -->\n <div class=\"dialog-header\">\n <h3>\n <i class=\"fa-solid fa-plus-circle\"></i>\n Add Part\n </h3>\n <button class=\"close-button\" aria-label=\"Close dialog\" (click)=\"onCancel()\">\n <i class=\"fa-solid fa-times\"></i>\n </button>\n </div>\n <!-- Content -->\n <div class=\"dialog-content\">\n <p class=\"instruction\">Select a part type to add to your dashboard:</p>\n <div class=\"part-type-grid\">\n @for (partType of partTypes; track partType) {\n <div\n class=\"part-type-card\"\n (click)=\"onPartTypeSelect(partType)\">\n <div class=\"card-icon\">\n <i [class]=\"partType.Icon || 'fa-solid fa-puzzle-piece'\"></i>\n </div>\n <div class=\"card-content\">\n <span class=\"card-title\">{{ partType.Name }}</span>\n @if (partType.Description) {\n <span class=\"card-description\">\n {{ partType.Description }}\n </span>\n }\n </div>\n <i class=\"fa-solid fa-chevron-right card-arrow\"></i>\n </div>\n }\n </div>\n @if (partTypes.length === 0) {\n <div class=\"no-types\">\n <div class=\"warning-icon\">\n <i class=\"fa-solid fa-exclamation-triangle\"></i>\n </div>\n <h4>No part types available</h4>\n <p>Dashboard part types have not been configured in the system.</p>\n </div>\n }\n </div>\n <!-- Footer -->\n <div class=\"dialog-footer\">\n <button class=\"btn-secondary\" (click)=\"onCancel()\">Cancel</button>\n </div>\n }\n <!-- Step 2: Configure Part -->\n @if (step === 'configure') {\n <!-- Header -->\n <div class=\"dialog-header\">\n <button class=\"back-button\" aria-label=\"Go back\" (click)=\"goBack()\">\n <i class=\"fa-solid fa-arrow-left\"></i>\n </button>\n <h3>\n <i [class]=\"selectedPartType?.Icon || 'fa-solid fa-puzzle-piece'\"></i>\n Configure {{ getConfigTypeName() }} Part\n </h3>\n <button class=\"close-button\" aria-label=\"Close dialog\" (click)=\"onCancel()\">\n <i class=\"fa-solid fa-times\"></i>\n </button>\n </div>\n <!-- Content - Dynamic Config Panel -->\n <div class=\"dialog-content config-content\">\n <!-- Loading state -->\n @if (isLoadingPanel) {\n <div class=\"loading-state\">\n <i class=\"fa-solid fa-spinner fa-spin\"></i>\n <span>Loading configuration panel...</span>\n </div>\n }\n <!-- Error state -->\n @if (loadError && !isLoadingPanel) {\n <div class=\"error-state\">\n <i class=\"fa-solid fa-exclamation-triangle\"></i>\n <span>{{ loadError }}</span>\n <p class=\"error-hint\">You can still add this part with default settings.</p>\n </div>\n }\n <!-- Dynamic config panel container -->\n <ng-container #configPanelContainer></ng-container>\n <!-- No config panel available (custom type) -->\n @if (!hasConfigPanel() && !isLoadingPanel && !loadError) {\n <div class=\"config-placeholder\">\n <i class=\"fa-solid fa-cog\"></i>\n <p>This part type uses default configuration.</p>\n </div>\n }\n <!-- Validation Errors -->\n @if (currentResult && currentResult.errors.length > 0) {\n <div class=\"validation-errors\">\n @for (error of currentResult.errors; track error) {\n <div class=\"error-item\">\n <i class=\"fa-solid fa-exclamation-circle\"></i>\n {{ error }}\n </div>\n }\n </div>\n }\n </div>\n <!-- Footer -->\n <div class=\"dialog-footer\">\n <button class=\"btn-primary\" (click)=\"addPart()\" [disabled]=\"!canAddPart && !loadError\">\n <i class=\"fa-solid fa-plus\"></i>\n Add Part\n </button>\n <button class=\"btn-secondary\" (click)=\"onCancel()\">Cancel</button>\n </div>\n }\n </div>\n </div>\n}\n"]}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/** The longest dashboard name when the host gives no MaxLength: MJ: Dashboards.Name is nvarchar(255). */
|
|
4
|
+
export declare const DASHBOARD_NAME_MAX_LENGTH = 255;
|
|
5
|
+
/**
|
|
6
|
+
* mj-dashboard-name-dialog — asks for the name of a new dashboard before it is created.
|
|
7
|
+
*
|
|
8
|
+
* Create stays disabled until the trimmed name has 1 to MaxLength characters. Create, or Enter in the
|
|
9
|
+
* field, emits `Confirmed` with the trimmed name and leaves the dialog open: the host creates the
|
|
10
|
+
* dashboard, sets `Processing` meanwhile, and closes the dialog through `Visible`. Cancel, Esc, the
|
|
11
|
+
* backdrop and the close button emit `Cancelled`; the host closes the dialog and creates nothing.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```html
|
|
15
|
+
* <mj-dashboard-name-dialog
|
|
16
|
+
* [Visible]="ShowNewDashboardDialog"
|
|
17
|
+
* [MaxLength]="NewDashboardNameMaxLength"
|
|
18
|
+
* [Processing]="IsCreatingDashboard"
|
|
19
|
+
* (Confirmed)="OnNewDashboardNamed($event)"
|
|
20
|
+
* (Cancelled)="OnNewDashboardCancelled()">
|
|
21
|
+
* </mj-dashboard-name-dialog>
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export declare class DashboardNameDialogComponent {
|
|
25
|
+
private _visible;
|
|
26
|
+
/** Shows the dialog. Each time it opens, the name field starts empty. */
|
|
27
|
+
set Visible(value: boolean);
|
|
28
|
+
get Visible(): boolean;
|
|
29
|
+
/** The dialog title. */
|
|
30
|
+
Title: string;
|
|
31
|
+
/** The label of the confirm button. */
|
|
32
|
+
ConfirmText: string;
|
|
33
|
+
/** The placeholder of the name field. */
|
|
34
|
+
Placeholder: string;
|
|
35
|
+
/** The longest name accepted: the MaxLength of MJ: Dashboards.Name. */
|
|
36
|
+
MaxLength: number;
|
|
37
|
+
/** True while the host creates the dashboard: Create shows a spinner, and the dialog cannot be changed or closed. */
|
|
38
|
+
Processing: boolean;
|
|
39
|
+
/** The trimmed name, when the user clicks Create or presses Enter. The dialog stays open. */
|
|
40
|
+
Confirmed: EventEmitter<string>;
|
|
41
|
+
/** The user cancelled: Cancel, Esc, the backdrop or the close button. */
|
|
42
|
+
Cancelled: EventEmitter<void>;
|
|
43
|
+
/** The name in the field. */
|
|
44
|
+
Name: string;
|
|
45
|
+
/** True when the trimmed name has 1 to MaxLength characters and nothing is being created. */
|
|
46
|
+
get CanCreate(): boolean;
|
|
47
|
+
/** Emits the trimmed name when it is valid. */
|
|
48
|
+
OnCreate(): void;
|
|
49
|
+
/** Emits Cancelled, unless the host is creating the dashboard. */
|
|
50
|
+
OnCancel(): void;
|
|
51
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DashboardNameDialogComponent, never>;
|
|
52
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DashboardNameDialogComponent, "mj-dashboard-name-dialog", never, { "Visible": { "alias": "Visible"; "required": false; }; "Title": { "alias": "Title"; "required": false; }; "ConfirmText": { "alias": "ConfirmText"; "required": false; }; "Placeholder": { "alias": "Placeholder"; "required": false; }; "MaxLength": { "alias": "MaxLength"; "required": false; }; "Processing": { "alias": "Processing"; "required": false; }; }, { "Confirmed": "Confirmed"; "Cancelled": "Cancelled"; }, never, never, true, never>;
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=dashboard-name-dialog.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboard-name-dialog.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/dialogs/dashboard-name-dialog/dashboard-name-dialog.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,YAAY,EAAiB,MAAM,eAAe,CAAC;;AAIvE,yGAAyG;AACzG,eAAO,MAAM,yBAAyB,MAAM,CAAC;AAE7C;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBA2Ca,4BAA4B;IACrC,OAAO,CAAC,QAAQ,CAAS;IAEzB,yEAAyE;IACzE,IACI,OAAO,CAAC,KAAK,EAAE,OAAO,EAKzB;IACD,IAAI,OAAO,IAAI,OAAO,CAErB;IAED,wBAAwB;IACf,KAAK,SAAmB;IAEjC,uCAAuC;IAC9B,WAAW,SAAY;IAEhC,yCAAyC;IAChC,WAAW,SAAyB;IAE7C,uEAAuE;IAC9D,SAAS,SAA6B;IAE/C,qHAAqH;IAC5G,UAAU,UAAS;IAE5B,6FAA6F;IACnF,SAAS,uBAA8B;IAEjD,yEAAyE;IAC/D,SAAS,qBAA4B;IAE/C,6BAA6B;IACtB,IAAI,SAAM;IAEjB,6FAA6F;IAC7F,IAAW,SAAS,IAAI,OAAO,CAG9B;IAED,+CAA+C;IACxC,QAAQ,IAAI,IAAI;IAMvB,kEAAkE;IAC3D,QAAQ,IAAI,IAAI;yCArDd,4BAA4B;2CAA5B,4BAA4B;CA0DxC"}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
2
|
+
import { FormsModule } from '@angular/forms';
|
|
3
|
+
import { MJButtonDirective, MJDialogActionsComponent, MJDialogComponent } from '@memberjunction/ng-ui-components';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "@angular/forms";
|
|
6
|
+
function DashboardNameDialogComponent_Conditional_7_Template(rf, ctx) { if (rf & 1) {
|
|
7
|
+
i0.ɵɵelement(0, "i", 5);
|
|
8
|
+
} }
|
|
9
|
+
/** The longest dashboard name when the host gives no MaxLength: MJ: Dashboards.Name is nvarchar(255). */
|
|
10
|
+
export const DASHBOARD_NAME_MAX_LENGTH = 255;
|
|
11
|
+
/**
|
|
12
|
+
* mj-dashboard-name-dialog — asks for the name of a new dashboard before it is created.
|
|
13
|
+
*
|
|
14
|
+
* Create stays disabled until the trimmed name has 1 to MaxLength characters. Create, or Enter in the
|
|
15
|
+
* field, emits `Confirmed` with the trimmed name and leaves the dialog open: the host creates the
|
|
16
|
+
* dashboard, sets `Processing` meanwhile, and closes the dialog through `Visible`. Cancel, Esc, the
|
|
17
|
+
* backdrop and the close button emit `Cancelled`; the host closes the dialog and creates nothing.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```html
|
|
21
|
+
* <mj-dashboard-name-dialog
|
|
22
|
+
* [Visible]="ShowNewDashboardDialog"
|
|
23
|
+
* [MaxLength]="NewDashboardNameMaxLength"
|
|
24
|
+
* [Processing]="IsCreatingDashboard"
|
|
25
|
+
* (Confirmed)="OnNewDashboardNamed($event)"
|
|
26
|
+
* (Cancelled)="OnNewDashboardCancelled()">
|
|
27
|
+
* </mj-dashboard-name-dialog>
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export class DashboardNameDialogComponent {
|
|
31
|
+
_visible = false;
|
|
32
|
+
/** Shows the dialog. Each time it opens, the name field starts empty. */
|
|
33
|
+
set Visible(value) {
|
|
34
|
+
if (value && !this._visible) {
|
|
35
|
+
this.Name = '';
|
|
36
|
+
}
|
|
37
|
+
this._visible = value;
|
|
38
|
+
}
|
|
39
|
+
get Visible() {
|
|
40
|
+
return this._visible;
|
|
41
|
+
}
|
|
42
|
+
/** The dialog title. */
|
|
43
|
+
Title = 'New dashboard';
|
|
44
|
+
/** The label of the confirm button. */
|
|
45
|
+
ConfirmText = 'Create';
|
|
46
|
+
/** The placeholder of the name field. */
|
|
47
|
+
Placeholder = 'Name this dashboard';
|
|
48
|
+
/** The longest name accepted: the MaxLength of MJ: Dashboards.Name. */
|
|
49
|
+
MaxLength = DASHBOARD_NAME_MAX_LENGTH;
|
|
50
|
+
/** True while the host creates the dashboard: Create shows a spinner, and the dialog cannot be changed or closed. */
|
|
51
|
+
Processing = false;
|
|
52
|
+
/** The trimmed name, when the user clicks Create or presses Enter. The dialog stays open. */
|
|
53
|
+
Confirmed = new EventEmitter();
|
|
54
|
+
/** The user cancelled: Cancel, Esc, the backdrop or the close button. */
|
|
55
|
+
Cancelled = new EventEmitter();
|
|
56
|
+
/** The name in the field. */
|
|
57
|
+
Name = '';
|
|
58
|
+
/** True when the trimmed name has 1 to MaxLength characters and nothing is being created. */
|
|
59
|
+
get CanCreate() {
|
|
60
|
+
const length = this.Name.trim().length;
|
|
61
|
+
return length > 0 && length <= this.MaxLength && !this.Processing;
|
|
62
|
+
}
|
|
63
|
+
/** Emits the trimmed name when it is valid. */
|
|
64
|
+
OnCreate() {
|
|
65
|
+
if (this.CanCreate) {
|
|
66
|
+
this.Confirmed.emit(this.Name.trim());
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
/** Emits Cancelled, unless the host is creating the dashboard. */
|
|
70
|
+
OnCancel() {
|
|
71
|
+
if (!this.Processing) {
|
|
72
|
+
this.Cancelled.emit();
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
static ɵfac = function DashboardNameDialogComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || DashboardNameDialogComponent)(); };
|
|
76
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: DashboardNameDialogComponent, selectors: [["mj-dashboard-name-dialog"]], inputs: { Visible: "Visible", Title: "Title", ConfirmText: "ConfirmText", Placeholder: "Placeholder", MaxLength: "MaxLength", Processing: "Processing" }, outputs: { Confirmed: "Confirmed", Cancelled: "Cancelled" }, decls: 11, vars: 11, consts: [["Size", "sm", 3, "Close", "Visible", "Title", "Closeable"], [1, "dn-field"], [1, "dn-label"], ["type", "text", "autocomplete", "off", "data-autofocus", "", 1, "mj-input", "dn-name", 3, "ngModelChange", "keydown.enter", "placeholder", "maxlength", "disabled", "ngModel"], ["type", "button", "mjButton", "", "Variant", "primary", 1, "dn-create", 3, "click", "disabled"], ["aria-hidden", "true", 1, "fa-solid", "fa-spinner", "fa-spin"], ["type", "button", "mjButton", "", "Variant", "secondary", 1, "dn-cancel", 3, "click", "disabled"]], template: function DashboardNameDialogComponent_Template(rf, ctx) { if (rf & 1) {
|
|
77
|
+
i0.ɵɵelementStart(0, "mj-dialog", 0);
|
|
78
|
+
i0.ɵɵlistener("Close", function DashboardNameDialogComponent_Template_mj_dialog_Close_0_listener() { return ctx.OnCancel(); });
|
|
79
|
+
i0.ɵɵelementStart(1, "label", 1)(2, "span", 2);
|
|
80
|
+
i0.ɵɵtext(3, "Name");
|
|
81
|
+
i0.ɵɵelementEnd();
|
|
82
|
+
i0.ɵɵelementStart(4, "input", 3);
|
|
83
|
+
i0.ɵɵtwoWayListener("ngModelChange", function DashboardNameDialogComponent_Template_input_ngModelChange_4_listener($event) { i0.ɵɵtwoWayBindingSet(ctx.Name, $event) || (ctx.Name = $event); return $event; });
|
|
84
|
+
i0.ɵɵlistener("keydown.enter", function DashboardNameDialogComponent_Template_input_keydown_enter_4_listener() { return ctx.OnCreate(); });
|
|
85
|
+
i0.ɵɵelementEnd()();
|
|
86
|
+
i0.ɵɵelementStart(5, "mj-dialog-actions")(6, "button", 4);
|
|
87
|
+
i0.ɵɵlistener("click", function DashboardNameDialogComponent_Template_button_click_6_listener() { return ctx.OnCreate(); });
|
|
88
|
+
i0.ɵɵconditionalCreate(7, DashboardNameDialogComponent_Conditional_7_Template, 1, 0, "i", 5);
|
|
89
|
+
i0.ɵɵtext(8);
|
|
90
|
+
i0.ɵɵelementEnd();
|
|
91
|
+
i0.ɵɵelementStart(9, "button", 6);
|
|
92
|
+
i0.ɵɵlistener("click", function DashboardNameDialogComponent_Template_button_click_9_listener() { return ctx.OnCancel(); });
|
|
93
|
+
i0.ɵɵtext(10, "Cancel");
|
|
94
|
+
i0.ɵɵelementEnd()()();
|
|
95
|
+
} if (rf & 2) {
|
|
96
|
+
i0.ɵɵproperty("Visible", ctx.Visible)("Title", ctx.Title)("Closeable", !ctx.Processing);
|
|
97
|
+
i0.ɵɵadvance(4);
|
|
98
|
+
i0.ɵɵproperty("placeholder", ctx.Placeholder)("maxlength", ctx.MaxLength)("disabled", ctx.Processing);
|
|
99
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx.Name);
|
|
100
|
+
i0.ɵɵadvance(2);
|
|
101
|
+
i0.ɵɵproperty("disabled", !ctx.CanCreate);
|
|
102
|
+
i0.ɵɵadvance();
|
|
103
|
+
i0.ɵɵconditional(ctx.Processing ? 7 : -1);
|
|
104
|
+
i0.ɵɵadvance();
|
|
105
|
+
i0.ɵɵtextInterpolate1(" ", ctx.ConfirmText, " ");
|
|
106
|
+
i0.ɵɵadvance();
|
|
107
|
+
i0.ɵɵproperty("disabled", ctx.Processing);
|
|
108
|
+
} }, dependencies: [FormsModule, i1.DefaultValueAccessor, i1.NgControlStatus, i1.MaxLengthValidator, i1.NgModel, MJDialogComponent, MJDialogActionsComponent, MJButtonDirective], styles: [".dn-field[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: var(--mj-space-2);\n }\n .dn-label[_ngcontent-%COMP%] {\n font-size: var(--mj-text-sm);\n font-weight: var(--mj-font-semibold);\n color: var(--mj-text-secondary);\n }"] });
|
|
109
|
+
}
|
|
110
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DashboardNameDialogComponent, [{
|
|
111
|
+
type: Component,
|
|
112
|
+
args: [{ standalone: true, selector: 'mj-dashboard-name-dialog', imports: [FormsModule, MJDialogComponent, MJDialogActionsComponent, MJButtonDirective], template: `
|
|
113
|
+
<mj-dialog [Visible]="Visible" [Title]="Title" Size="sm" [Closeable]="!Processing" (Close)="OnCancel()">
|
|
114
|
+
<label class="dn-field">
|
|
115
|
+
<span class="dn-label">Name</span>
|
|
116
|
+
<input
|
|
117
|
+
class="mj-input dn-name"
|
|
118
|
+
type="text"
|
|
119
|
+
autocomplete="off"
|
|
120
|
+
data-autofocus
|
|
121
|
+
[placeholder]="Placeholder"
|
|
122
|
+
[maxlength]="MaxLength"
|
|
123
|
+
[disabled]="Processing"
|
|
124
|
+
[(ngModel)]="Name"
|
|
125
|
+
(keydown.enter)="OnCreate()" />
|
|
126
|
+
</label>
|
|
127
|
+
<mj-dialog-actions>
|
|
128
|
+
<button type="button" mjButton Variant="primary" class="dn-create" [disabled]="!CanCreate" (click)="OnCreate()">
|
|
129
|
+
@if (Processing) {
|
|
130
|
+
<i class="fa-solid fa-spinner fa-spin" aria-hidden="true"></i>
|
|
131
|
+
}
|
|
132
|
+
{{ ConfirmText }}
|
|
133
|
+
</button>
|
|
134
|
+
<button type="button" mjButton Variant="secondary" class="dn-cancel" [disabled]="Processing" (click)="OnCancel()">Cancel</button>
|
|
135
|
+
</mj-dialog-actions>
|
|
136
|
+
</mj-dialog>
|
|
137
|
+
`, styles: ["\n .dn-field {\n display: flex;\n flex-direction: column;\n gap: var(--mj-space-2);\n }\n .dn-label {\n font-size: var(--mj-text-sm);\n font-weight: var(--mj-font-semibold);\n color: var(--mj-text-secondary);\n }\n "] }]
|
|
138
|
+
}], null, { Visible: [{
|
|
139
|
+
type: Input
|
|
140
|
+
}], Title: [{
|
|
141
|
+
type: Input
|
|
142
|
+
}], ConfirmText: [{
|
|
143
|
+
type: Input
|
|
144
|
+
}], Placeholder: [{
|
|
145
|
+
type: Input
|
|
146
|
+
}], MaxLength: [{
|
|
147
|
+
type: Input
|
|
148
|
+
}], Processing: [{
|
|
149
|
+
type: Input
|
|
150
|
+
}], Confirmed: [{
|
|
151
|
+
type: Output
|
|
152
|
+
}], Cancelled: [{
|
|
153
|
+
type: Output
|
|
154
|
+
}] }); })();
|
|
155
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(DashboardNameDialogComponent, { className: "DashboardNameDialogComponent", filePath: "src/lib/dialogs/dashboard-name-dialog/dashboard-name-dialog.component.ts", lineNumber: 70 }); })();
|
|
156
|
+
//# sourceMappingURL=dashboard-name-dialog.component.js.map
|