@memberjunction/ng-dashboard-viewer 6.2.0-edge.5 → 6.2.0-edge.7

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.
Files changed (84) hide show
  1. package/README.md +17 -3
  2. package/dist/lib/config-panels/artifact-config-panel.component.js +2 -2
  3. package/dist/lib/config-panels/component-config-panel.component.d.ts +51 -0
  4. package/dist/lib/config-panels/component-config-panel.component.d.ts.map +1 -0
  5. package/dist/lib/config-panels/component-config-panel.component.js +246 -0
  6. package/dist/lib/config-panels/component-config-panel.component.js.map +1 -0
  7. package/dist/lib/config-panels/index.d.ts +1 -0
  8. package/dist/lib/config-panels/index.d.ts.map +1 -1
  9. package/dist/lib/config-panels/index.js +1 -0
  10. package/dist/lib/config-panels/index.js.map +1 -1
  11. package/dist/lib/config-panels/query-config-panel.component.js +2 -2
  12. package/dist/lib/config-panels/view-config-panel.component.js +2 -2
  13. package/dist/lib/config-panels/weburl-config-panel.component.js +2 -2
  14. package/dist/lib/dashboard-viewer/dashboard-viewer.component.d.ts +58 -1
  15. package/dist/lib/dashboard-viewer/dashboard-viewer.component.d.ts.map +1 -1
  16. package/dist/lib/dashboard-viewer/dashboard-viewer.component.js +186 -4
  17. package/dist/lib/dashboard-viewer/dashboard-viewer.component.js.map +1 -1
  18. package/dist/lib/dashboard-viewer.module.d.ts +22 -17
  19. package/dist/lib/dashboard-viewer.module.d.ts.map +1 -1
  20. package/dist/lib/dashboard-viewer.module.js +29 -4
  21. package/dist/lib/dashboard-viewer.module.js.map +1 -1
  22. package/dist/lib/dialogs/part-dialog/dashboard-part-dialog.component.d.ts +35 -1
  23. package/dist/lib/dialogs/part-dialog/dashboard-part-dialog.component.d.ts.map +1 -1
  24. package/dist/lib/dialogs/part-dialog/dashboard-part-dialog.component.js +307 -34
  25. package/dist/lib/dialogs/part-dialog/dashboard-part-dialog.component.js.map +1 -1
  26. package/dist/lib/dialogs/properties-dialog/dashboard-properties-dialog.component.d.ts +79 -0
  27. package/dist/lib/dialogs/properties-dialog/dashboard-properties-dialog.component.d.ts.map +1 -0
  28. package/dist/lib/dialogs/properties-dialog/dashboard-properties-dialog.component.js +461 -0
  29. package/dist/lib/dialogs/properties-dialog/dashboard-properties-dialog.component.js.map +1 -0
  30. package/dist/lib/dialogs/property-default-editor/property-default-editor.component.d.ts +41 -0
  31. package/dist/lib/dialogs/property-default-editor/property-default-editor.component.d.ts.map +1 -0
  32. package/dist/lib/dialogs/property-default-editor/property-default-editor.component.js +248 -0
  33. package/dist/lib/dialogs/property-default-editor/property-default-editor.component.js.map +1 -0
  34. package/dist/lib/models/dashboard-config-validator.d.ts +30 -0
  35. package/dist/lib/models/dashboard-config-validator.d.ts.map +1 -0
  36. package/dist/lib/models/dashboard-config-validator.js +107 -0
  37. package/dist/lib/models/dashboard-config-validator.js.map +1 -0
  38. package/dist/lib/models/dashboard-part-interfaces.d.ts +42 -0
  39. package/dist/lib/models/dashboard-part-interfaces.d.ts.map +1 -0
  40. package/dist/lib/models/dashboard-part-interfaces.js +181 -0
  41. package/dist/lib/models/dashboard-part-interfaces.js.map +1 -0
  42. package/dist/lib/models/dashboard-properties.d.ts +182 -0
  43. package/dist/lib/models/dashboard-properties.d.ts.map +1 -0
  44. package/dist/lib/models/dashboard-properties.js +263 -0
  45. package/dist/lib/models/dashboard-properties.js.map +1 -0
  46. package/dist/lib/models/dashboard-types.d.ts +8 -0
  47. package/dist/lib/models/dashboard-types.d.ts.map +1 -1
  48. package/dist/lib/models/dashboard-types.js.map +1 -1
  49. package/dist/lib/models/part-inputs-editor.d.ts +36 -0
  50. package/dist/lib/models/part-inputs-editor.d.ts.map +1 -0
  51. package/dist/lib/models/part-inputs-editor.js +53 -0
  52. package/dist/lib/models/part-inputs-editor.js.map +1 -0
  53. package/dist/lib/parts/artifact-part.component.d.ts.map +1 -1
  54. package/dist/lib/parts/artifact-part.component.js +5 -4
  55. package/dist/lib/parts/artifact-part.component.js.map +1 -1
  56. package/dist/lib/parts/base-dashboard-part.d.ts +50 -1
  57. package/dist/lib/parts/base-dashboard-part.d.ts.map +1 -1
  58. package/dist/lib/parts/base-dashboard-part.js +108 -1
  59. package/dist/lib/parts/base-dashboard-part.js.map +1 -1
  60. package/dist/lib/parts/component-part.component.d.ts +54 -0
  61. package/dist/lib/parts/component-part.component.d.ts.map +1 -0
  62. package/dist/lib/parts/component-part.component.js +221 -0
  63. package/dist/lib/parts/component-part.component.js.map +1 -0
  64. package/dist/lib/parts/index.d.ts +1 -0
  65. package/dist/lib/parts/index.d.ts.map +1 -1
  66. package/dist/lib/parts/index.js +1 -0
  67. package/dist/lib/parts/index.js.map +1 -1
  68. package/dist/lib/parts/query-part.component.d.ts +25 -1
  69. package/dist/lib/parts/query-part.component.d.ts.map +1 -1
  70. package/dist/lib/parts/query-part.component.js +93 -10
  71. package/dist/lib/parts/query-part.component.js.map +1 -1
  72. package/dist/lib/parts/view-part.component.d.ts +18 -1
  73. package/dist/lib/parts/view-part.component.d.ts.map +1 -1
  74. package/dist/lib/parts/view-part.component.js +74 -10
  75. package/dist/lib/parts/view-part.component.js.map +1 -1
  76. package/dist/lib/parts/weburl-part.component.d.ts +8 -0
  77. package/dist/lib/parts/weburl-part.component.d.ts.map +1 -1
  78. package/dist/lib/parts/weburl-part.component.js +29 -2
  79. package/dist/lib/parts/weburl-part.component.js.map +1 -1
  80. package/dist/public-api.d.ts +8 -0
  81. package/dist/public-api.d.ts.map +1 -1
  82. package/dist/public-api.js +8 -0
  83. package/dist/public-api.js.map +1 -1
  84. package/package.json +15 -13
@@ -1 +1 @@
1
- {"version":3,"file":"dashboard-part-dialog.component.js","sourceRoot":"","sources":["../../../../src/lib/dialogs/part-dialog/dashboard-part-dialog.component.ts","../../../../src/lib/dialogs/part-dialog/dashboard-part-dialog.component.html"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EACT,KAAK,EACL,MAAM,EACN,YAAY,EACZ,iBAAiB,EACjB,SAAS,EACT,gBAAgB,EAGhB,MAA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GN,SAAS;mBAAC,sBAAsB,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE;;kFAvCpD,4BAA4B","sourcesContent":["import {\n Component,\n Input,\n Output,\n EventEmitter,\n ChangeDetectorRef,\n ViewChild,\n ViewContainerRef,\n ComponentRef,\n OnDestroy,\n inject\n} from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { MJGlobal, UUIDsEqual } from '@memberjunction/global';\nimport { MJDashboardPartTypeEntity } from '@memberjunction/core-entities';\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\nimport { PanelConfig, DashboardPanel } from '../../models/dashboard-types';\nimport { BaseConfigPanel, ConfigPanelResult } from '../../config-panels/base-config-panel';\n\n/** Whether the part dialog adds a new part or edits an existing one. */\nexport type DashboardPartDialogMode = 'add' | 'edit';\n\n/** What the part dialog gives back on Add part or Apply. */\nexport interface DashboardPartDialogResult {\n PartType: MJDashboardPartTypeEntity;\n Config: PanelConfig;\n Title: string;\n Icon?: string;\n}\n\n/** The refresh intervals a query part offers, in seconds; the dashboard assistant accepts the same ones. */\nexport const QUERY_REFRESH_SECONDS = [30, 60, 300, 600] as const;\n\n/** The refresh interval a query part gets when the user turns automatic refresh on. */\nconst DEFAULT_QUERY_REFRESH_SECONDS = 60;\n\n/** The icon of a part whose part type has none. */\nconst DEFAULT_PART_ICON = 'fa-solid fa-puzzle-piece';\n\n/** The label and description on a part type tile. */\ninterface PartTypeTileCopy {\n Label: string;\n Description: string;\n}\n\n/** Short tile copy for the built-in part types, by part type Name. Other types show their metadata Name and Description. */\nconst PART_TYPE_TILE_COPY: Readonly<Record<string, PartTypeTileCopy | undefined>> = {\n View: { Label: 'View', Description: 'A saved view, or all records of an entity' },\n Query: { Label: 'Query', Description: 'A saved query, with its parameters' },\n Artifact: { Label: 'Artifact', Description: 'A report, chart or component from Chat' },\n WebURL: { Label: 'Web page', Description: 'An embedded page' },\n};\n\n/**\n * The dialog that adds a part to a dashboard or edits one, on `mj-dialog`.\n *\n * It shows the part type tiles, the part type's settings panel as the Source section, the title\n * and, for a query, the parameter-controls and auto refresh options. The settings panel is the\n * `BaseConfigPanel` that ClassFactory registers under the part type's `ConfigDialogClass`; the\n * dialog passes it `Provider` and hides the panel's own copies of the fields it shows itself.\n * In edit mode the part's type cannot change, so the other tiles are disabled.\n *\n * The host opens and closes it, for example with `@if` around `[Visible]=\"true\"`.\n */\n@Component({\n standalone: false,\n selector: 'mj-dashboard-part-dialog',\n templateUrl: './dashboard-part-dialog.component.html',\n styleUrls: ['./dashboard-part-dialog.component.css']\n})\nexport class DashboardPartDialogComponent extends BaseAngularComponent implements OnDestroy {\n private readonly cdr = inject(ChangeDetectorRef);\n\n /**\n * Whether the dialog shows. Opening reads Mode, Panel and PartTypes after the current input\n * pass, because inputs arrive in no fixed order. Closing removes the settings panel.\n */\n @Input()\n set Visible(value: boolean) {\n const wasVisible = this._visible;\n this._visible = value;\n if (value && !wasVisible) {\n const openId = ++this.openCount;\n Promise.resolve().then(() => this.open(openId));\n } else if (!value && wasVisible) {\n this.close();\n }\n }\n get Visible(): boolean {\n return this._visible;\n }\n private _visible = false;\n\n /** Whether the dialog adds a new part or edits {@link Panel}. */\n @Input() Mode: DashboardPartDialogMode = 'add';\n\n /** The part types to offer. The tiles show the active ones, and the edited part's type, by SortOrder. */\n @Input() PartTypes: MJDashboardPartTypeEntity[] = [];\n\n /** The part to edit in edit mode. Its part type is the one in {@link PartTypes} with its `partTypeId`. */\n @Input() Panel: DashboardPanel | null = null;\n\n /** Emitted on Add part or Apply with the part type, config, title and icon of the part. */\n @Output() Saved = new EventEmitter<DashboardPartDialogResult>();\n\n /** Emitted on Cancel, and when the user closes the dialog with Escape, the backdrop or the close button. */\n @Output() Cancelled = new EventEmitter<void>();\n\n /** Where the settings panel of the chosen part type renders. */\n @ViewChild('configPanelContainer', { read: ViewContainerRef })\n private configPanelContainer?: ViewContainerRef;\n\n /** The chosen part type. */\n public SelectedPartType: MJDashboardPartTypeEntity | null = null;\n\n /** The part's title: empty for a new part, the part's title in edit mode. An empty title means the source name. */\n public Title = '';\n\n /** The name of the chosen source, from the settings panel. A part type without one shows its tile label. */\n public SourceName = '';\n\n /** Query option: show the query's parameter controls on the part. */\n public ShowParameterControls = true;\n\n /** Query option: refresh the part on a timer. */\n public AutoRefreshEnabled = false;\n\n /** Query option: the refresh interval, in seconds. */\n public AutoRefreshSeconds = DEFAULT_QUERY_REFRESH_SECONDS;\n\n /** True while the settings panel of the chosen part type loads. */\n public IsLoadingPanel = false;\n\n /** Why the settings panel could not load, when it could not. */\n public LoadError: string | null = null;\n\n /** The settings panel's validation errors from the last Add part or Apply. */\n public Errors: string[] = [];\n\n private configPanelRef: ComponentRef<BaseConfigPanel> | null = null;\n private configChangedSubscription: Subscription | null = null;\n /** The last result the settings panel reported. */\n private latestResult: ConfigPanelResult | null = null;\n private refreshChoices: readonly number[] = QUERY_REFRESH_SECONDS;\n /** Counts opens, so an open that a close or a newer open overtook does nothing. */\n private openCount = 0;\n /** Counts settings panel loads, so a load for a part type the user has left is dropped. */\n private loadCount = 0;\n private destroyed = false;\n\n /** The dialog title. */\n get DialogTitle(): string {\n return this.Mode === 'edit' ? 'Edit part' : 'Add a part';\n }\n\n /** The label of the confirm button. */\n get SubmitLabel(): string {\n return this.Mode === 'edit' ? 'Apply' : 'Add part';\n }\n\n /** The icon of the confirm button. */\n get SubmitIcon(): string {\n return this.Mode === 'edit' ? 'fa-solid fa-check' : 'fa-solid fa-plus';\n }\n\n /** The placeholder of the title field: the title the part gets when the field is empty. */\n get TitlePlaceholder(): string {\n return `Default: ${this.SourceName}`;\n }\n\n /** Whether the chosen part type is Query, which has the query options. */\n get IsQuery(): boolean {\n return this.SelectedPartType?.Name === 'Query';\n }\n\n /** Whether the chosen part type has a settings panel, which fills the Source section. */\n get HasSettingsPanel(): boolean {\n return this.configDialogClassOf(this.SelectedPartType) != null;\n }\n\n /** The part type tiles: the active part types, and the edited part's type, by SortOrder. */\n get TypeTiles(): MJDashboardPartTypeEntity[] {\n const editedTypeId = this.Mode === 'edit' ? this.Panel?.partTypeId ?? null : null;\n return this.PartTypes\n .filter(pt => pt.IsActive !== false || (editedTypeId != null && UUIDsEqual(pt.ID, editedTypeId)))\n .sort((a, b) => (a.SortOrder ?? 0) - (b.SortOrder ?? 0));\n }\n\n /** The refresh intervals to offer: {@link QUERY_REFRESH_SECONDS}, plus the edited part's interval when it is another one. */\n get RefreshChoices(): readonly number[] {\n return this.refreshChoices;\n }\n\n /**\n * Whether Add part or Apply is enabled. Apply is enabled as soon as the part type is shown.\n * Add part waits until the settings panel reports a valid source.\n */\n get CanSubmit(): boolean {\n if (!this.SelectedPartType || this.IsLoadingPanel) return false;\n return this.Mode === 'edit' || this.configPanelRef == null || this.latestResult?.isValid === true;\n }\n\n /** Whether a tile's part type is the chosen one. */\n public IsSelected(partType: MJDashboardPartTypeEntity): boolean {\n return this.SelectedPartType != null && UUIDsEqual(partType.ID, this.SelectedPartType.ID);\n }\n\n /** The label on a part type tile. */\n public TileLabel(partType: MJDashboardPartTypeEntity): string {\n return PART_TYPE_TILE_COPY[partType.Name]?.Label ?? partType.Name;\n }\n\n /** The description on a part type tile. */\n public TileDescription(partType: MJDashboardPartTypeEntity): string {\n return PART_TYPE_TILE_COPY[partType.Name]?.Description ?? partType.Description ?? '';\n }\n\n /** Chooses a part type in add mode and loads its settings panel. */\n public SelectPartType(partType: MJDashboardPartTypeEntity): void {\n if (this.Mode === 'edit' || this.IsSelected(partType)) return;\n this.selectType(partType);\n }\n\n /** Takes a change from the settings panel: its latest result and the name of its source. */\n public OnConfigChanged(result: ConfigPanelResult): void {\n this.latestResult = result;\n const panel = this.configPanelRef?.instance;\n if (panel) {\n this.setSourceName(panel.getDefaultTitle());\n }\n this.Errors = [];\n this.cdr.markForCheck();\n }\n\n /**\n * Emits {@link Saved}, or shows the settings panel's errors when its source is not valid.\n * The config is the settings panel's config. Without a panel it names only the part type\n * (add mode) or is the part's current config (edit mode). A query part also gets the query options.\n */\n public Submit(): void {\n const partType = this.SelectedPartType;\n if (!partType || !this.CanSubmit) return;\n\n const panel = this.configPanelRef?.instance ?? null;\n let config: PanelConfig;\n let icon: string | undefined;\n if (panel) {\n const result = panel.getResult();\n if (!result.isValid) {\n this.latestResult = result;\n this.Errors = result.errors;\n this.cdr.markForCheck();\n return;\n }\n this.setSourceName(panel.getDefaultTitle());\n config = { ...result.config };\n icon = result.icon;\n } else if (this.Mode === 'edit' && this.Panel) {\n config = { ...this.Panel.config };\n icon = this.Panel.icon;\n } else {\n config = { type: partType.Name };\n }\n\n if (this.IsQuery) {\n config['showParameterControls'] = this.ShowParameterControls;\n config['autoRefreshSeconds'] = this.AutoRefreshEnabled ? this.AutoRefreshSeconds : 0;\n }\n\n this.Saved.emit({\n PartType: partType,\n Config: config,\n Title: this.Title.trim() || this.SourceName,\n Icon: icon || partType.Icon || DEFAULT_PART_ICON\n });\n }\n\n /** Emits {@link Cancelled}. */\n public Cancel(): void {\n this.Cancelled.emit();\n }\n\n ngOnDestroy(): void {\n this.destroyed = true;\n this.loadCount++;\n this.destroyConfigPanel();\n }\n\n /** Starts from the inputs: a new part with the first tile chosen, or the edited part. */\n private open(openId: number): void {\n if (this.destroyed || !this._visible || openId !== this.openCount) return;\n const editing = this.Mode === 'edit';\n this.Title = editing ? this.Panel?.title ?? '' : '';\n this.readQueryOptions(editing ? this.Panel?.config ?? null : null);\n this.selectType(editing ? this.findEditedPartType() : this.TypeTiles[0] ?? null);\n }\n\n /** Removes the settings panel and drops a load that is still running. */\n private close(): void {\n this.loadCount++;\n this.destroyConfigPanel();\n this.SelectedPartType = null;\n this.IsLoadingPanel = false;\n this.LoadError = null;\n this.Errors = [];\n this.latestResult = null;\n }\n\n /** The part type of the edited part, from {@link PartTypes}. */\n private findEditedPartType(): MJDashboardPartTypeEntity | null {\n const partTypeId = this.Panel?.partTypeId;\n if (!partTypeId) return null;\n return this.PartTypes.find(pt => UUIDsEqual(pt.ID, partTypeId)) ?? null;\n }\n\n /** Reads the query options from a part's config. A new part (no config) gets the defaults. */\n private readQueryOptions(config: PanelConfig | null): void {\n const showParameterControls = config?.['showParameterControls'];\n const seconds = config?.['autoRefreshSeconds'];\n const refreshSeconds = typeof seconds === 'number' && seconds > 0 ? seconds : 0;\n this.ShowParameterControls = typeof showParameterControls === 'boolean' ? showParameterControls : true;\n this.AutoRefreshEnabled = refreshSeconds > 0;\n this.AutoRefreshSeconds = refreshSeconds > 0 ? refreshSeconds : DEFAULT_QUERY_REFRESH_SECONDS;\n this.refreshChoices = refreshSeconds > 0 && !QUERY_REFRESH_SECONDS.some(choice => choice === refreshSeconds)\n ? [...QUERY_REFRESH_SECONDS, refreshSeconds].sort((a, b) => a - b)\n : QUERY_REFRESH_SECONDS;\n }\n\n /** Makes a part type the chosen one and starts to load its settings panel. */\n private selectType(partType: MJDashboardPartTypeEntity | null): void {\n const loadId = ++this.loadCount;\n this.destroyConfigPanel();\n this.SelectedPartType = partType;\n this.SourceName = partType ? this.TileLabel(partType) : '';\n this.latestResult = null;\n this.Errors = [];\n this.LoadError = null;\n const className = this.configDialogClassOf(partType);\n this.IsLoadingPanel = className != null;\n // Renders the Source section now, so its container exists when the panel class arrives.\n this.cdr.detectChanges();\n if (partType && className) {\n void this.loadConfigPanel(partType, className, loadId);\n }\n }\n\n /**\n * Creates the part type's settings panel in the Source section. A load that a newer load or a\n * close overtook is dropped. When the panel cannot be created, the dialog says why and still\n * submits: with a config that names only the part type (add mode) or the part's current config (edit mode).\n */\n private async loadConfigPanel(partType: MJDashboardPartTypeEntity, className: string, loadId: number): Promise<void> {\n try {\n const registration = await MJGlobal.Instance.ClassFactory.GetRegistrationAsync(BaseConfigPanel, className);\n if (loadId !== this.loadCount) return;\n const container = this.configPanelContainer;\n if (!registration || !container) {\n this.failPanelLoad(registration ? `The settings panel \"${className}\" could not be shown.` : `The settings panel \"${className}\" is not registered.`);\n return;\n }\n\n container.clear();\n const ref = container.createComponent<BaseConfigPanel>(registration.SubClass);\n this.configPanelRef = ref;\n const panel = ref.instance;\n panel.Provider = this.Provider;\n panel.ShowCommonFields = false;\n panel.partType = partType;\n if (this.Mode === 'edit' && this.Panel) {\n panel.panel = this.Panel;\n panel.config = this.Panel.config;\n }\n this.configChangedSubscription = panel.configChanged.subscribe(result => this.OnConfigChanged(result));\n this.SourceName = panel.getDefaultTitle();\n this.IsLoadingPanel = false;\n this.cdr.detectChanges();\n } catch (error) {\n if (loadId !== this.loadCount) return;\n this.failPanelLoad(`The settings panel \"${className}\" could not load (${error instanceof Error ? error.message : String(error)}).`);\n }\n }\n\n /** Shows why the settings panel could not load, and what Add part or Apply does without it. */\n private failPanelLoad(reason: string): void {\n this.destroyConfigPanel();\n this.IsLoadingPanel = false;\n const fallback = this.Mode === 'edit' ? 'Apply keeps the part\\'s current settings.' : 'The part is added with default settings.';\n this.LoadError = `${reason} ${fallback}`;\n this.cdr.detectChanges();\n }\n\n /**\n * Takes a new source name. A title that is the old source name follows the new one, as the\n * settings panels' own title fields do; a title the user changed stays.\n */\n private setSourceName(sourceName: string): void {\n const title = this.Title.trim();\n if (title !== '' && title === this.SourceName) {\n this.Title = sourceName;\n }\n this.SourceName = sourceName;\n }\n\n /** The registered class name of a part type's settings panel, if it has one. */\n private configDialogClassOf(partType: MJDashboardPartTypeEntity | null): string | null {\n return partType?.ConfigDialogClass?.trim() || null;\n }\n\n private destroyConfigPanel(): void {\n this.configChangedSubscription?.unsubscribe();\n this.configChangedSubscription = null;\n this.configPanelRef?.destroy();\n this.configPanelRef = null;\n }\n}\n","@if (Visible) {\n <mj-dialog [Visible]=\"true\" Size=\"md\" [Title]=\"DialogTitle\" (Close)=\"Cancel()\">\n <div class=\"part-dialog\">\n <section>\n <div class=\"part-dialog__label\" id=\"part-dialog-type-label\">Part type</div>\n <div class=\"part-dialog__types\" role=\"group\" aria-labelledby=\"part-dialog-type-label\">\n @for (partType of TypeTiles; track partType.ID) {\n <button type=\"button\" class=\"part-dialog__type\"\n [class.part-dialog__type--selected]=\"IsSelected(partType)\"\n [attr.aria-pressed]=\"IsSelected(partType)\"\n [attr.data-autofocus]=\"Mode === 'add' && IsSelected(partType) ? '' : null\"\n [disabled]=\"Mode === 'edit' && !IsSelected(partType)\"\n (click)=\"SelectPartType(partType)\">\n <i [class]=\"partType.Icon || 'fa-solid fa-puzzle-piece'\" aria-hidden=\"true\"></i>\n <span class=\"part-dialog__type-label\">{{ TileLabel(partType) }}</span>\n <span class=\"part-dialog__type-desc\">{{ TileDescription(partType) }}</span>\n </button>\n }\n </div>\n @if (TypeTiles.length === 0) {\n <mj-empty-state Size=\"compact\" Variant=\"warning\" Title=\"No part types available\"\n Message=\"Dashboard part types have not been set up in this system.\" />\n }\n </section>\n\n @if (SelectedPartType) {\n @if (HasSettingsPanel) {\n <section>\n <div class=\"part-dialog__label\">Source</div>\n @if (IsLoadingPanel) {\n <mj-loading Text=\"Loading...\" Size=\"small\"></mj-loading>\n }\n @if (LoadError) {\n <p class=\"part-dialog__warning\">{{ LoadError }}</p>\n }\n <ng-container #configPanelContainer></ng-container>\n @for (error of Errors; track $index) {\n <p class=\"part-dialog__error\"><i class=\"fa-solid fa-circle-exclamation\" aria-hidden=\"true\"></i> {{ error }}</p>\n }\n </section>\n }\n\n <section>\n <label class=\"part-dialog__label\" for=\"part-dialog-title\">Title</label>\n <input id=\"part-dialog-title\" class=\"mj-input\" type=\"text\" [(ngModel)]=\"Title\" [placeholder]=\"TitlePlaceholder\">\n </section>\n\n @if (IsQuery) {\n <section class=\"part-dialog__options\">\n <label class=\"part-dialog__option\">\n <input type=\"checkbox\" class=\"mj-checkbox\" [(ngModel)]=\"ShowParameterControls\"> Show parameter controls\n </label>\n <label class=\"part-dialog__option\">\n <input type=\"checkbox\" class=\"mj-checkbox\" [(ngModel)]=\"AutoRefreshEnabled\"> Refresh automatically every\n <select class=\"mj-input part-dialog__refresh\" [(ngModel)]=\"AutoRefreshSeconds\" [disabled]=\"!AutoRefreshEnabled\" aria-label=\"Refresh interval in seconds\">\n @for (seconds of RefreshChoices; track seconds) {\n <option [ngValue]=\"seconds\">{{ seconds }}</option>\n }\n </select>\n seconds\n </label>\n </section>\n }\n }\n </div>\n <mj-dialog-actions>\n <button mjButton Variant=\"primary\" type=\"button\" [disabled]=\"!CanSubmit\" (click)=\"Submit()\">\n <i [class]=\"SubmitIcon\" aria-hidden=\"true\"></i> {{ SubmitLabel }}\n </button>\n <button mjButton Variant=\"secondary\" type=\"button\" (click)=\"Cancel()\">Cancel</button>\n </mj-dialog-actions>\n </mj-dialog>\n}\n"]}
1
+ {"version":3,"file":"dashboard-part-dialog.component.js","sourceRoot":"","sources":["../../../../src/lib/dialogs/part-dialog/dashboard-part-dialog.component.ts","../../../../src/lib/dialogs/part-dialog/dashboard-part-dialog.component.html"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EACT,KAAK,EACL,MAAM,EACN,YAAY,EACZ,iBAAiB,EACjB,SAAS,EACT,gBAAgB,EAGhB,MAAM,EACT,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAE9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAErE,OAAO,EAAE,eAAe,EAAqB,MAAM,uCAAuC,CAAC;AAE3F,OAAO,EAAqB,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAC5G,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAC3E,OAAO,EAAgB,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;;;;;;;;;;;ICdrE,kCAK2C;IAAnC,qOAAS,kCAAwB,KAAC;IACxC,uBAAgF;IAChF,gCAAsC;IAAA,YAAyB;IAAA,iBAAO;IACtE,gCAAqC;IAAA,YAA+B;IACtE,AADsE,iBAAO,EACpE;;;;IARD,6EAA0D;IAG1D,oFAAqD;;IAExD,cAAqD;IAArD,6DAAqD;IAClB,eAAyB;IAAzB,mDAAyB;IAC1B,eAA+B;IAA/B,yDAA+B;;;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MAAM;;kBAGN,MAAM;;kBAGN,SAAS;mBAAC,sBAAsB,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE;;kFA1CpD,4BAA4B","sourcesContent":["import {\n Component,\n Input,\n Output,\n EventEmitter,\n ChangeDetectorRef,\n ViewChild,\n ViewContainerRef,\n ComponentRef,\n OnDestroy,\n inject\n} from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { MJGlobal, UUIDsEqual } from '@memberjunction/global';\nimport { MJDashboardPartTypeEntity } from '@memberjunction/core-entities';\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\nimport { PanelConfig, DashboardPanel } from '../../models/dashboard-types';\nimport { BaseConfigPanel, ConfigPanelResult } from '../../config-panels/base-config-panel';\nimport type { PropertyDefault } from '@memberjunction/core';\nimport { DashboardProperty, GetInputMappings, INPUT_MAPPINGS_KEY } from '../../models/dashboard-properties';\nimport { LoadPartInterface } from '../../models/dashboard-part-interfaces';\nimport { PartInputRow, PartInputsEditor } from '../../models/part-inputs-editor';\n\n/** Whether the part dialog adds a new part or edits an existing one. */\nexport type DashboardPartDialogMode = 'add' | 'edit';\n\n/** What the part dialog gives back on Add part or Apply. */\nexport interface DashboardPartDialogResult {\n PartType: MJDashboardPartTypeEntity;\n Config: PanelConfig;\n Title: string;\n Icon?: string;\n}\n\n/** The refresh intervals a query part offers, in seconds; the dashboard assistant accepts the same ones. */\nexport const QUERY_REFRESH_SECONDS = [30, 60, 300, 600] as const;\n\n/** The refresh interval a query part gets when the user turns automatic refresh on. */\nconst DEFAULT_QUERY_REFRESH_SECONDS = 60;\n\n/** The icon of a part whose part type has none. */\nconst DEFAULT_PART_ICON = 'fa-solid fa-puzzle-piece';\n\n/** The label and description on a part type tile. */\ninterface PartTypeTileCopy {\n Label: string;\n Description: string;\n}\n\n/** Short tile copy for the built-in part types, by part type Name. Other types show their metadata Name and Description. */\nconst PART_TYPE_TILE_COPY: Readonly<Record<string, PartTypeTileCopy | undefined>> = {\n View: { Label: 'View', Description: 'A saved view, or all records of an entity' },\n Query: { Label: 'Query', Description: 'A saved query, with its parameters' },\n Artifact: { Label: 'Artifact', Description: 'A report, chart or component from Chat' },\n WebURL: { Label: 'Web page', Description: 'An embedded page' },\n Component: { Label: 'Component', Description: 'An interactive component, with its props' },\n};\n\n/** The config keys that say which source a part shows; its declared inputs change only when one of them does. */\nconst SOURCE_KEYS = ['type', 'viewId', 'entityName', 'queryId', 'queryName', 'componentName', 'componentNamespace', 'componentVersion', 'url'];\n\nfunction sourceSignature(config: PanelConfig | null): string {\n return JSON.stringify(SOURCE_KEYS.map(key => config?.[key] ?? null));\n}\n\n/**\n * The dialog that adds a part to a dashboard or edits one, on `mj-dialog`.\n *\n * It shows the part type tiles, the part type's settings panel as the Source section, the title\n * and, for a query, the parameter-controls and auto refresh options. The settings panel is the\n * `BaseConfigPanel` that ClassFactory registers under the part type's `ConfigDialogClass`; the\n * dialog passes it `Provider` and hides the panel's own copies of the fields it shows itself.\n * In edit mode the part's type cannot change, so the other tiles are disabled.\n *\n * The host opens and closes it, for example with `@if` around `[Visible]=\"true\"`.\n */\n@Component({\n standalone: false,\n selector: 'mj-dashboard-part-dialog',\n templateUrl: './dashboard-part-dialog.component.html',\n styleUrls: ['./dashboard-part-dialog.component.css']\n})\nexport class DashboardPartDialogComponent extends BaseAngularComponent implements OnDestroy {\n private readonly cdr = inject(ChangeDetectorRef);\n\n /**\n * Whether the dialog shows. Opening reads Mode, Panel and PartTypes after the current input\n * pass, because inputs arrive in no fixed order. Closing removes the settings panel.\n */\n @Input()\n set Visible(value: boolean) {\n const wasVisible = this._visible;\n this._visible = value;\n if (value && !wasVisible) {\n const openId = ++this.openCount;\n Promise.resolve().then(() => this.open(openId));\n } else if (!value && wasVisible) {\n this.close();\n }\n }\n get Visible(): boolean {\n return this._visible;\n }\n private _visible = false;\n\n /** Whether the dialog adds a new part or edits {@link Panel}. */\n @Input() Mode: DashboardPartDialogMode = 'add';\n\n /** The part types to offer. The tiles show the active ones, and the edited part's type, by SortOrder. */\n @Input() PartTypes: MJDashboardPartTypeEntity[] = [];\n\n /** The part to edit in edit mode. Its part type is the one in {@link PartTypes} with its `partTypeId`. */\n @Input() Panel: DashboardPanel | null = null;\n\n /** The dashboard's properties, which the Inputs list maps onto the part's inputs. */\n @Input() DashboardProperties: DashboardProperty[] = [];\n\n /** Emitted on Add part or Apply with the part type, config, title and icon of the part. */\n @Output() Saved = new EventEmitter<DashboardPartDialogResult>();\n\n /** Emitted on Cancel, and when the user closes the dialog with Escape, the backdrop or the close button. */\n @Output() Cancelled = new EventEmitter<void>();\n\n /** Where the settings panel of the chosen part type renders. */\n @ViewChild('configPanelContainer', { read: ViewContainerRef })\n private configPanelContainer?: ViewContainerRef;\n\n /** The chosen part type. */\n public SelectedPartType: MJDashboardPartTypeEntity | null = null;\n\n /** The part's title: empty for a new part, the part's title in edit mode. An empty title means the source name. */\n public Title = '';\n\n /** The name of the chosen source, from the settings panel. A part type without one shows its tile label. */\n public SourceName = '';\n\n /** Query option: show the query's parameter controls on the part. */\n public ShowParameterControls = true;\n\n /** Query option: refresh the part on a timer. */\n public AutoRefreshEnabled = false;\n\n /** Query option: the refresh interval, in seconds. */\n public AutoRefreshSeconds = DEFAULT_QUERY_REFRESH_SECONDS;\n\n /** True while the settings panel of the chosen part type loads. */\n public IsLoadingPanel = false;\n\n /** Why the settings panel could not load, when it could not. */\n public LoadError: string | null = null;\n\n /** The settings panel's validation errors from the last Add part or Apply. */\n public Errors: string[] = [];\n\n /** The part's Inputs list, once its declared inputs are loaded. Null before then, or when they couldn't load. */\n public InputsEditor: PartInputsEditor | null = null;\n\n /** True while the part's declared inputs load. */\n public IsLoadingInputs = false;\n\n /** Why the part's declared inputs couldn't load; its mappings are then kept as they are. */\n public InputsLoadError: string | null = null;\n\n private inputsSignature: string | null = null;\n private inputsLoadCount = 0;\n\n private configPanelRef: ComponentRef<BaseConfigPanel> | null = null;\n private configChangedSubscription: Subscription | null = null;\n /** The last result the settings panel reported. */\n private latestResult: ConfigPanelResult | null = null;\n private refreshChoices: readonly number[] = QUERY_REFRESH_SECONDS;\n /** Counts opens, so an open that a close or a newer open overtook does nothing. */\n private openCount = 0;\n /** Counts settings panel loads, so a load for a part type the user has left is dropped. */\n private loadCount = 0;\n private destroyed = false;\n\n /** The dialog title. */\n get DialogTitle(): string {\n return this.Mode === 'edit' ? 'Edit part' : 'Add a part';\n }\n\n /** The label of the confirm button. */\n get SubmitLabel(): string {\n return this.Mode === 'edit' ? 'Apply' : 'Add part';\n }\n\n /** The icon of the confirm button. */\n get SubmitIcon(): string {\n return this.Mode === 'edit' ? 'fa-solid fa-check' : 'fa-solid fa-plus';\n }\n\n /** The placeholder of the title field: the title the part gets when the field is empty. */\n get TitlePlaceholder(): string {\n return `Default: ${this.SourceName}`;\n }\n\n /** Whether the chosen part type is Query, which has the query options. */\n get IsQuery(): boolean {\n return this.SelectedPartType?.Name === 'Query';\n }\n\n /** Whether the chosen part type has a settings panel, which fills the Source section. */\n get HasSettingsPanel(): boolean {\n return this.configDialogClassOf(this.SelectedPartType) != null;\n }\n\n /** The part type tiles: the active part types, and the edited part's type, by SortOrder. */\n get TypeTiles(): MJDashboardPartTypeEntity[] {\n const editedTypeId = this.Mode === 'edit' ? this.Panel?.partTypeId ?? null : null;\n return this.PartTypes\n .filter(pt => pt.IsActive !== false || (editedTypeId != null && UUIDsEqual(pt.ID, editedTypeId)))\n .sort((a, b) => (a.SortOrder ?? 0) - (b.SortOrder ?? 0));\n }\n\n /** The refresh intervals to offer: {@link QUERY_REFRESH_SECONDS}, plus the edited part's interval when it is another one. */\n get RefreshChoices(): readonly number[] {\n return this.refreshChoices;\n }\n\n /**\n * Whether Add part or Apply is enabled. Apply is enabled as soon as the part type is shown.\n * Add part waits until the settings panel reports a valid source.\n */\n get CanSubmit(): boolean {\n if (!this.SelectedPartType || this.IsLoadingPanel || this.IsLoadingInputs) return false;\n return this.Mode === 'edit' || this.configPanelRef == null || this.latestResult?.isValid === true;\n }\n\n /** Whether a tile's part type is the chosen one. */\n public IsSelected(partType: MJDashboardPartTypeEntity): boolean {\n return this.SelectedPartType != null && UUIDsEqual(partType.ID, this.SelectedPartType.ID);\n }\n\n /** The label on a part type tile. */\n public TileLabel(partType: MJDashboardPartTypeEntity): string {\n return PART_TYPE_TILE_COPY[partType.Name]?.Label ?? partType.Name;\n }\n\n /** The description on a part type tile. */\n public TileDescription(partType: MJDashboardPartTypeEntity): string {\n return PART_TYPE_TILE_COPY[partType.Name]?.Description ?? partType.Description ?? '';\n }\n\n /** Chooses a part type in add mode and loads its settings panel. */\n public SelectPartType(partType: MJDashboardPartTypeEntity): void {\n if (this.Mode === 'edit' || this.IsSelected(partType)) return;\n this.selectType(partType);\n }\n\n /** Takes a change from the settings panel: its latest result and the name of its source. */\n public OnConfigChanged(result: ConfigPanelResult): void {\n this.latestResult = result;\n const panel = this.configPanelRef?.instance;\n if (panel) {\n this.setSourceName(panel.getDefaultTitle());\n }\n this.Errors = [];\n this.refreshInputs(result.config);\n this.cdr.markForCheck();\n }\n\n /** True when the Inputs list has something to show. */\n get HasInputs(): boolean {\n return !!this.InputsEditor && (this.InputsEditor.Rows.length > 0 || this.InputsEditor.Orphans.length > 0);\n }\n\n /** The property names an input row offers: the compatible properties, plus its current one if that isn't. */\n public PropertyChoices(row: PartInputRow): string[] {\n const names = this.InputsEditor?.CompatibleProperties(row, this.DashboardProperties).map(p => p.Name) ?? [];\n return row.Property && !names.includes(row.Property) ? [...names, row.Property] : names;\n }\n\n public SetInputProperty(row: PartInputRow, property: string): void {\n row.Property = property || null;\n this.Errors = [];\n }\n\n public SetInputDefault(row: PartInputRow, value: PropertyDefault | undefined): void {\n row.Default = value;\n this.Errors = [];\n }\n\n public RemoveOrphan(index: number): void {\n this.InputsEditor?.RemoveOrphan(index);\n this.Errors = [];\n }\n\n /**\n * Emits {@link Saved}, or shows the settings panel's errors when its source is not valid.\n * The config is the settings panel's config. Without a panel it names only the part type\n * (add mode) or is the part's current config (edit mode). A query part also gets the query options.\n */\n public Submit(): void {\n const partType = this.SelectedPartType;\n if (!partType || !this.CanSubmit) return;\n\n const panel = this.configPanelRef?.instance ?? null;\n let config: PanelConfig;\n let icon: string | undefined;\n if (panel) {\n const result = panel.getResult();\n if (!result.isValid) {\n this.latestResult = result;\n this.Errors = result.errors;\n this.cdr.markForCheck();\n return;\n }\n this.setSourceName(panel.getDefaultTitle());\n config = { ...result.config };\n icon = result.icon;\n } else if (this.Mode === 'edit' && this.Panel) {\n config = { ...this.Panel.config };\n icon = this.Panel.icon;\n } else {\n config = { type: partType.Name };\n }\n\n if (this.IsQuery) {\n config['showParameterControls'] = this.ShowParameterControls;\n config['autoRefreshSeconds'] = this.AutoRefreshEnabled ? this.AutoRefreshSeconds : 0;\n }\n\n if (this.refuseInputProblems()) return;\n this.applyInputMappings(config);\n\n this.Saved.emit({\n PartType: partType,\n Config: config,\n Title: this.Title.trim() || this.SourceName,\n Icon: icon || partType.Icon || DEFAULT_PART_ICON\n });\n }\n\n /** Emits {@link Cancelled}. */\n public Cancel(): void {\n this.Cancelled.emit();\n }\n\n ngOnDestroy(): void {\n this.destroyed = true;\n this.loadCount++;\n this.inputsLoadCount++;\n this.destroyConfigPanel();\n }\n\n /** Starts from the inputs: a new part with the first tile chosen, or the edited part. */\n private open(openId: number): void {\n if (this.destroyed || !this._visible || openId !== this.openCount) return;\n const editing = this.Mode === 'edit';\n this.Title = editing ? this.Panel?.title ?? '' : '';\n this.readQueryOptions(editing ? this.Panel?.config ?? null : null);\n this.selectType(editing ? this.findEditedPartType() : this.TypeTiles[0] ?? null);\n }\n\n /** Shows what is wrong with the Inputs list and returns true, or returns false when nothing is. */\n private refuseInputProblems(): boolean {\n const problems = this.InputsEditor?.Problems(this.Title.trim() || this.SourceName, this.DashboardProperties) ?? [];\n if (problems.length === 0) return false;\n this.Errors = problems;\n this.cdr.markForCheck();\n return true;\n }\n\n /**\n * Writes the Inputs list into the config. No mappings: the key is removed, so a part without them\n * saves exactly as before. When the part's inputs couldn't load, its mappings are kept as they were.\n */\n private applyInputMappings(config: PanelConfig): void {\n const mappings = this.InputsEditor\n ? this.InputsEditor.BuildMappings()\n : GetInputMappings(this.Mode === 'edit' ? this.Panel?.config : null);\n if (mappings.length > 0) {\n config[INPUT_MAPPINGS_KEY] = mappings;\n } else {\n delete config[INPUT_MAPPINGS_KEY];\n }\n }\n\n /**\n * Loads the inputs the part declares for its source, when the source changed. The current\n * mappings carry over; those to inputs the new source doesn't declare are listed as broken.\n */\n private refreshInputs(config: PanelConfig | null): void {\n const signature = sourceSignature(config);\n if (signature === this.inputsSignature) return;\n this.inputsSignature = signature;\n const loadId = ++this.inputsLoadCount;\n const mappings = this.InputsEditor?.BuildMappings() ?? GetInputMappings(this.Mode === 'edit' ? this.Panel?.config : null);\n this.IsLoadingInputs = true;\n this.InputsLoadError = null;\n LoadPartInterface(config, this.ProviderToUse)\n .then(partInterface => {\n if (loadId === this.inputsLoadCount) this.InputsEditor = new PartInputsEditor(partInterface, mappings);\n })\n .catch((error: unknown) => {\n if (loadId !== this.inputsLoadCount) return;\n this.InputsEditor = null;\n this.InputsLoadError = `The part's inputs could not load (${error instanceof Error ? error.message : String(error)}). Its mappings are kept as they are.`;\n })\n .finally(() => {\n if (loadId !== this.inputsLoadCount || this.destroyed) return;\n this.IsLoadingInputs = false;\n this.cdr.markForCheck();\n });\n }\n\n /** Drops the Inputs list and any load of it. */\n private resetInputs(): void {\n this.inputsLoadCount++;\n this.inputsSignature = null;\n this.InputsEditor = null;\n this.IsLoadingInputs = false;\n this.InputsLoadError = null;\n }\n\n /** Removes the settings panel and drops a load that is still running. */\n private close(): void {\n this.loadCount++;\n this.resetInputs();\n this.destroyConfigPanel();\n this.SelectedPartType = null;\n this.IsLoadingPanel = false;\n this.LoadError = null;\n this.Errors = [];\n this.latestResult = null;\n }\n\n /** The part type of the edited part, from {@link PartTypes}. */\n private findEditedPartType(): MJDashboardPartTypeEntity | null {\n const partTypeId = this.Panel?.partTypeId;\n if (!partTypeId) return null;\n return this.PartTypes.find(pt => UUIDsEqual(pt.ID, partTypeId)) ?? null;\n }\n\n /** Reads the query options from a part's config. A new part (no config) gets the defaults. */\n private readQueryOptions(config: PanelConfig | null): void {\n const showParameterControls = config?.['showParameterControls'];\n const seconds = config?.['autoRefreshSeconds'];\n const refreshSeconds = typeof seconds === 'number' && seconds > 0 ? seconds : 0;\n this.ShowParameterControls = typeof showParameterControls === 'boolean' ? showParameterControls : true;\n this.AutoRefreshEnabled = refreshSeconds > 0;\n this.AutoRefreshSeconds = refreshSeconds > 0 ? refreshSeconds : DEFAULT_QUERY_REFRESH_SECONDS;\n this.refreshChoices = refreshSeconds > 0 && !QUERY_REFRESH_SECONDS.some(choice => choice === refreshSeconds)\n ? [...QUERY_REFRESH_SECONDS, refreshSeconds].sort((a, b) => a - b)\n : QUERY_REFRESH_SECONDS;\n }\n\n /** Makes a part type the chosen one and starts to load its settings panel. */\n private selectType(partType: MJDashboardPartTypeEntity | null): void {\n const loadId = ++this.loadCount;\n this.resetInputs();\n this.destroyConfigPanel();\n this.SelectedPartType = partType;\n this.SourceName = partType ? this.TileLabel(partType) : '';\n this.latestResult = null;\n this.Errors = [];\n this.LoadError = null;\n const className = this.configDialogClassOf(partType);\n this.IsLoadingPanel = className != null;\n // Renders the Source section now, so its container exists when the panel class arrives.\n this.cdr.detectChanges();\n if (partType && className) {\n void this.loadConfigPanel(partType, className, loadId);\n } else if (partType) {\n this.refreshInputs(this.Mode === 'edit' && this.Panel ? this.Panel.config : { type: partType.Name });\n }\n }\n\n /**\n * Creates the part type's settings panel in the Source section. A load that a newer load or a\n * close overtook is dropped. When the panel cannot be created, the dialog says why and still\n * submits: with a config that names only the part type (add mode) or the part's current config (edit mode).\n */\n private async loadConfigPanel(partType: MJDashboardPartTypeEntity, className: string, loadId: number): Promise<void> {\n try {\n const registration = await MJGlobal.Instance.ClassFactory.GetRegistrationAsync(BaseConfigPanel, className);\n if (loadId !== this.loadCount) return;\n const container = this.configPanelContainer;\n if (!registration || !container) {\n this.failPanelLoad(registration ? `The settings panel \"${className}\" could not be shown.` : `The settings panel \"${className}\" is not registered.`);\n return;\n }\n\n container.clear();\n const ref = container.createComponent<BaseConfigPanel>(registration.SubClass);\n this.configPanelRef = ref;\n const panel = ref.instance;\n panel.Provider = this.Provider;\n panel.ShowCommonFields = false;\n panel.partType = partType;\n if (this.Mode === 'edit' && this.Panel) {\n panel.panel = this.Panel;\n panel.config = this.Panel.config;\n }\n this.configChangedSubscription = panel.configChanged.subscribe(result => this.OnConfigChanged(result));\n this.SourceName = panel.getDefaultTitle();\n this.IsLoadingPanel = false;\n if (this.Mode === 'edit' && this.Panel) {\n this.refreshInputs(this.Panel.config);\n }\n this.cdr.detectChanges();\n } catch (error) {\n if (loadId !== this.loadCount) return;\n this.failPanelLoad(`The settings panel \"${className}\" could not load (${error instanceof Error ? error.message : String(error)}).`);\n }\n }\n\n /** Shows why the settings panel could not load, and what Add part or Apply does without it. */\n private failPanelLoad(reason: string): void {\n this.destroyConfigPanel();\n this.IsLoadingPanel = false;\n const fallback = this.Mode === 'edit' ? 'Apply keeps the part\\'s current settings.' : 'The part is added with default settings.';\n this.LoadError = `${reason} ${fallback}`;\n this.cdr.detectChanges();\n }\n\n /**\n * Takes a new source name. A title that is the old source name follows the new one, as the\n * settings panels' own title fields do; a title the user changed stays.\n */\n private setSourceName(sourceName: string): void {\n const title = this.Title.trim();\n if (title !== '' && title === this.SourceName) {\n this.Title = sourceName;\n }\n this.SourceName = sourceName;\n }\n\n /** The registered class name of a part type's settings panel, if it has one. */\n private configDialogClassOf(partType: MJDashboardPartTypeEntity | null): string | null {\n return partType?.ConfigDialogClass?.trim() || null;\n }\n\n private destroyConfigPanel(): void {\n this.configChangedSubscription?.unsubscribe();\n this.configChangedSubscription = null;\n this.configPanelRef?.destroy();\n this.configPanelRef = null;\n }\n}\n","@if (Visible) {\n <mj-dialog [Visible]=\"true\" Size=\"md\" [Title]=\"DialogTitle\" (Close)=\"Cancel()\">\n <div class=\"part-dialog\">\n <section>\n <div class=\"part-dialog__label\" id=\"part-dialog-type-label\">Part type</div>\n <div class=\"part-dialog__types\" role=\"group\" aria-labelledby=\"part-dialog-type-label\">\n @for (partType of TypeTiles; track partType.ID) {\n <button type=\"button\" class=\"part-dialog__type\"\n [class.part-dialog__type--selected]=\"IsSelected(partType)\"\n [attr.aria-pressed]=\"IsSelected(partType)\"\n [attr.data-autofocus]=\"Mode === 'add' && IsSelected(partType) ? '' : null\"\n [disabled]=\"Mode === 'edit' && !IsSelected(partType)\"\n (click)=\"SelectPartType(partType)\">\n <i [class]=\"partType.Icon || 'fa-solid fa-puzzle-piece'\" aria-hidden=\"true\"></i>\n <span class=\"part-dialog__type-label\">{{ TileLabel(partType) }}</span>\n <span class=\"part-dialog__type-desc\">{{ TileDescription(partType) }}</span>\n </button>\n }\n </div>\n @if (TypeTiles.length === 0) {\n <mj-empty-state Size=\"compact\" Variant=\"warning\" Title=\"No part types available\"\n Message=\"Dashboard part types have not been set up in this system.\" />\n }\n </section>\n\n @if (SelectedPartType) {\n @if (HasSettingsPanel) {\n <section>\n <div class=\"part-dialog__label\">Source</div>\n @if (IsLoadingPanel) {\n <mj-loading Text=\"Loading...\" Size=\"small\"></mj-loading>\n }\n @if (LoadError) {\n <p class=\"part-dialog__warning\">{{ LoadError }}</p>\n }\n <ng-container #configPanelContainer></ng-container>\n @for (error of Errors; track $index) {\n <p class=\"part-dialog__error\"><i class=\"fa-solid fa-circle-exclamation\" aria-hidden=\"true\"></i> {{ error }}</p>\n }\n </section>\n }\n\n @if (IsLoadingInputs) {\n <section>\n <div class=\"part-dialog__label\">Inputs</div>\n <mj-loading Text=\"Loading inputs...\" Size=\"small\"></mj-loading>\n </section>\n } @else if (InputsLoadError) {\n <section>\n <div class=\"part-dialog__label\">Inputs</div>\n <p class=\"part-dialog__warning\">{{ InputsLoadError }}</p>\n </section>\n }\n @if (!IsLoadingInputs && !InputsLoadError && HasInputs && InputsEditor; as editor) {\n <section class=\"part-dialog__inputs\">\n <div class=\"part-dialog__label\">Inputs</div>\n <p class=\"part-dialog__hint\">Feed an input from a dashboard property, fix it with a default, or leave it to its own default.</p>\n @for (row of editor.Rows; track row.Input.Name) {\n <div class=\"part-dialog__input\">\n <div class=\"part-dialog__input-name\">\n {{ row.Input.Name }}\n <span class=\"part-dialog__input-type\">{{ row.Input.Type }}</span>\n @if (row.Input.IsRequired) {\n <span class=\"part-dialog__input-required\" title=\"Required\">*</span>\n }\n </div>\n @if (row.Input.ServerSet) {\n <span class=\"part-dialog__input-note\"><i class=\"fa-solid fa-lock\" aria-hidden=\"true\"></i> Set by server</span>\n } @else if (!editor.CanMap(row)) {\n <span class=\"part-dialog__input-note\">Can't be mapped: a dashboard property can't fill a {{ row.Input.Type }} input</span>\n } @else {\n <div class=\"part-dialog__input-controls\">\n <select class=\"mj-input\" [attr.aria-label]=\"'Dashboard property for ' + row.Input.Name\"\n [ngModel]=\"row.Property ?? ''\" (ngModelChange)=\"SetInputProperty(row, $event)\">\n <option value=\"\">No dashboard property</option>\n @for (name of PropertyChoices(row); track name) {\n <option [value]=\"name\">{{ name }}</option>\n }\n </select>\n <mj-property-default-editor [Default]=\"row.Default\" [Type]=\"editor.DefaultType(row)\"\n [Label]=\"'Default for ' + row.Input.Name\"\n [NoneLabel]=\"row.Property ? 'No fallback' : 'Its own default'\"\n (DefaultChange)=\"SetInputDefault(row, $event)\"></mj-property-default-editor>\n </div>\n }\n </div>\n }\n @for (orphan of editor.Orphans; track $index) {\n <div class=\"part-dialog__input part-dialog__input--broken\">\n <span><i class=\"fa-solid fa-circle-exclamation\" aria-hidden=\"true\"></i> \"{{ orphan.Input }}\" is mapped but is not an input of this part</span>\n <button mjButton Variant=\"flat\" Size=\"sm\" type=\"button\" (click)=\"RemoveOrphan($index)\">Remove</button>\n </div>\n }\n </section>\n }\n\n <section>\n <label class=\"part-dialog__label\" for=\"part-dialog-title\">Title</label>\n <input id=\"part-dialog-title\" class=\"mj-input\" type=\"text\" [(ngModel)]=\"Title\" [placeholder]=\"TitlePlaceholder\">\n </section>\n\n @if (!HasSettingsPanel) {\n @for (error of Errors; track $index) {\n <p class=\"part-dialog__error\"><i class=\"fa-solid fa-circle-exclamation\" aria-hidden=\"true\"></i> {{ error }}</p>\n }\n }\n\n @if (IsQuery) {\n <section class=\"part-dialog__options\">\n <label class=\"part-dialog__option\">\n <input type=\"checkbox\" class=\"mj-checkbox\" [(ngModel)]=\"ShowParameterControls\"> Show parameter controls\n </label>\n <label class=\"part-dialog__option\">\n <input type=\"checkbox\" class=\"mj-checkbox\" [(ngModel)]=\"AutoRefreshEnabled\"> Refresh automatically every\n <select class=\"mj-input part-dialog__refresh\" [(ngModel)]=\"AutoRefreshSeconds\" [disabled]=\"!AutoRefreshEnabled\" aria-label=\"Refresh interval in seconds\">\n @for (seconds of RefreshChoices; track seconds) {\n <option [ngValue]=\"seconds\">{{ seconds }}</option>\n }\n </select>\n seconds\n </label>\n </section>\n }\n }\n </div>\n <mj-dialog-actions>\n <button mjButton Variant=\"primary\" type=\"button\" [disabled]=\"!CanSubmit\" (click)=\"Submit()\">\n <i [class]=\"SubmitIcon\" aria-hidden=\"true\"></i> {{ SubmitLabel }}\n </button>\n <button mjButton Variant=\"secondary\" type=\"button\" (click)=\"Cancel()\">Cancel</button>\n </mj-dialog-actions>\n </mj-dialog>\n}\n"]}
@@ -0,0 +1,79 @@
1
+ import { EventEmitter, OnDestroy } from '@angular/core';
2
+ import { PropertyDefault, PropertyValueType } from '@memberjunction/core';
3
+ import { BaseAngularComponent } from '@memberjunction/ng-base-types';
4
+ import type { DashboardPanel } from '../../models/dashboard-types';
5
+ import { DashboardEventValue, DashboardPartEventInfo, DashboardPartInterface, DashboardProperty, DashboardWire } from '../../models/dashboard-properties';
6
+ import * as i0 from "@angular/core";
7
+ /** What the properties dialog gives back on Apply. */
8
+ export interface DashboardPropertiesDialogResult {
9
+ Properties: DashboardProperty[];
10
+ Wires: DashboardWire[];
11
+ }
12
+ /**
13
+ * The dashboard designer's Properties panel and Wires list, on `mj-dialog`.
14
+ *
15
+ * Properties: add, edit and remove the dashboard's properties (name, type, description, required,
16
+ * and a default: a fixed value or a context token). Wires: each sets a property from one value of a
17
+ * part's event (a View part's `RecordSelected`, a Query part's `RowSelected`, a component's declared
18
+ * events). Apply is refused while a property, a wire or a part's mapping no longer fits, for
19
+ * example a property renamed while a part still maps it.
20
+ *
21
+ * The host opens and closes it, for example with `@if` around `[Visible]="true"`.
22
+ */
23
+ export declare class DashboardPropertiesDialogComponent extends BaseAngularComponent implements OnDestroy {
24
+ private readonly cdr;
25
+ /** Whether the dialog shows. Opening copies the inputs and loads what each part declares. */
26
+ set Visible(value: boolean);
27
+ get Visible(): boolean;
28
+ private _visible;
29
+ /** The dashboard's properties. */
30
+ Properties: DashboardProperty[];
31
+ /** The dashboard's wires. */
32
+ Wires: DashboardWire[];
33
+ /** The dashboard's parts. */
34
+ Panels: DashboardPanel[];
35
+ /** Emitted on Apply with the edited properties and wires. */
36
+ Saved: EventEmitter<DashboardPropertiesDialogResult>;
37
+ /** Emitted on Cancel or close. */
38
+ Cancelled: EventEmitter<void>;
39
+ readonly Types: readonly ["string", "number", "boolean", "date", "uuid"];
40
+ /** The properties being edited. */
41
+ EditProperties: DashboardProperty[];
42
+ /** The wires being edited. */
43
+ EditWires: DashboardWire[];
44
+ /** What each part declares, by panel ID; null when it couldn't load. */
45
+ Interfaces: Map<string, DashboardPartInterface | null>;
46
+ IsLoading: boolean;
47
+ private openCount;
48
+ private destroyed;
49
+ /** Everything Apply refuses: properties, wires, and the parts' mappings against the edited properties. */
50
+ get Problems(): string[];
51
+ get CanApply(): boolean;
52
+ /** The parts that raise at least one event a wire can start from. */
53
+ get WireSources(): DashboardPanel[];
54
+ /** The events a wire's part raises. */
55
+ EventsOf(wire: DashboardWire): DashboardPartEventInfo[];
56
+ /** The values a wire's event carries. */
57
+ ValuesOf(wire: DashboardWire): DashboardEventValue[];
58
+ AddProperty(): void;
59
+ RemoveProperty(index: number): void;
60
+ UpdateProperty(index: number, patch: Partial<DashboardProperty>): void;
61
+ /** A new type drops a fixed default (it may not fit) and keeps a token. */
62
+ SetPropertyType(index: number, type: PropertyValueType): void;
63
+ SetPropertyDefault(index: number, value: PropertyDefault | undefined): void;
64
+ /** Adds a wire from the first part that raises events, to the first property. */
65
+ AddWire(): void;
66
+ RemoveWire(index: number): void;
67
+ /** A new part resets the event and value to its first ones; a new event resets the value. */
68
+ UpdateWire(index: number, patch: Partial<DashboardWire>): void;
69
+ Apply(): void;
70
+ Cancel(): void;
71
+ ngOnDestroy(): void;
72
+ private patchWire;
73
+ /** Copies the inputs and loads what each part declares. */
74
+ private open;
75
+ private nextName;
76
+ static ɵfac: i0.ɵɵFactoryDeclaration<DashboardPropertiesDialogComponent, never>;
77
+ static ɵcmp: i0.ɵɵComponentDeclaration<DashboardPropertiesDialogComponent, "mj-dashboard-properties-dialog", never, { "Visible": { "alias": "Visible"; "required": false; }; "Properties": { "alias": "Properties"; "required": false; }; "Wires": { "alias": "Wires"; "required": false; }; "Panels": { "alias": "Panels"; "required": false; }; }, { "Saved": "Saved"; "Cancelled": "Cancelled"; }, never, never, false, never>;
78
+ }
79
+ //# sourceMappingURL=dashboard-properties-dialog.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dashboard-properties-dialog.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/dialogs/properties-dialog/dashboard-properties-dialog.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgC,YAAY,EAAS,SAAS,EAAkB,MAAM,eAAe,CAAC;AAC7G,OAAO,EAAwB,eAAe,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAChG,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EACH,mBAAmB,EACnB,sBAAsB,EACtB,sBAAsB,EACtB,iBAAiB,EACjB,aAAa,EAChB,MAAM,mCA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