@memberjunction/ng-dashboard-viewer 6.1.4 → 6.2.0-edge.1

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 (60) hide show
  1. package/dist/lib/config-dialogs/confirm-dialog.component.d.ts +58 -8
  2. package/dist/lib/config-dialogs/confirm-dialog.component.d.ts.map +1 -1
  3. package/dist/lib/config-dialogs/confirm-dialog.component.js +119 -17
  4. package/dist/lib/config-dialogs/confirm-dialog.component.js.map +1 -1
  5. package/dist/lib/config-panels/artifact-config-panel.component.d.ts +63 -11
  6. package/dist/lib/config-panels/artifact-config-panel.component.d.ts.map +1 -1
  7. package/dist/lib/config-panels/artifact-config-panel.component.js +152 -48
  8. package/dist/lib/config-panels/artifact-config-panel.component.js.map +1 -1
  9. package/dist/lib/config-panels/query-config-panel.component.d.ts +57 -9
  10. package/dist/lib/config-panels/query-config-panel.component.d.ts.map +1 -1
  11. package/dist/lib/config-panels/query-config-panel.component.js +142 -46
  12. package/dist/lib/config-panels/query-config-panel.component.js.map +1 -1
  13. package/dist/lib/config-panels/view-config-panel.component.d.ts +69 -11
  14. package/dist/lib/config-panels/view-config-panel.component.d.ts.map +1 -1
  15. package/dist/lib/config-panels/view-config-panel.component.js +165 -49
  16. package/dist/lib/config-panels/view-config-panel.component.js.map +1 -1
  17. package/dist/lib/config-panels/weburl-config-panel.component.d.ts +42 -6
  18. package/dist/lib/config-panels/weburl-config-panel.component.d.ts.map +1 -1
  19. package/dist/lib/config-panels/weburl-config-panel.component.js +113 -41
  20. package/dist/lib/config-panels/weburl-config-panel.component.js.map +1 -1
  21. package/dist/lib/dashboard-browser/dashboard-browser.component.d.ts.map +1 -1
  22. package/dist/lib/dashboard-browser/dashboard-browser.component.js +7 -4
  23. package/dist/lib/dashboard-browser/dashboard-browser.component.js.map +1 -1
  24. package/dist/lib/dashboard-viewer/dashboard-viewer.component.d.ts +163 -12
  25. package/dist/lib/dashboard-viewer/dashboard-viewer.component.d.ts.map +1 -1
  26. package/dist/lib/dashboard-viewer/dashboard-viewer.component.js +332 -78
  27. package/dist/lib/dashboard-viewer/dashboard-viewer.component.js.map +1 -1
  28. package/dist/lib/dialogs/add-panel-dialog/add-panel-dialog.component.d.ts +63 -9
  29. package/dist/lib/dialogs/add-panel-dialog/add-panel-dialog.component.d.ts.map +1 -1
  30. package/dist/lib/dialogs/add-panel-dialog/add-panel-dialog.component.js +172 -66
  31. package/dist/lib/dialogs/add-panel-dialog/add-panel-dialog.component.js.map +1 -1
  32. package/dist/lib/dialogs/edit-part-dialog/edit-part-dialog.component.d.ts +11 -1
  33. package/dist/lib/dialogs/edit-part-dialog/edit-part-dialog.component.d.ts.map +1 -1
  34. package/dist/lib/dialogs/edit-part-dialog/edit-part-dialog.component.js +30 -10
  35. package/dist/lib/dialogs/edit-part-dialog/edit-part-dialog.component.js.map +1 -1
  36. package/dist/lib/models/dashboard-types.d.ts +8 -0
  37. package/dist/lib/models/dashboard-types.d.ts.map +1 -1
  38. package/dist/lib/models/dashboard-types.js +21 -5
  39. package/dist/lib/models/dashboard-types.js.map +1 -1
  40. package/dist/lib/parts/artifact-part.component.d.ts +63 -7
  41. package/dist/lib/parts/artifact-part.component.d.ts.map +1 -1
  42. package/dist/lib/parts/artifact-part.component.js +98 -22
  43. package/dist/lib/parts/artifact-part.component.js.map +1 -1
  44. package/dist/lib/parts/query-part.component.d.ts +26 -4
  45. package/dist/lib/parts/query-part.component.d.ts.map +1 -1
  46. package/dist/lib/parts/query-part.component.js +62 -18
  47. package/dist/lib/parts/query-part.component.js.map +1 -1
  48. package/dist/lib/parts/view-part.component.d.ts +21 -3
  49. package/dist/lib/parts/view-part.component.d.ts.map +1 -1
  50. package/dist/lib/parts/view-part.component.js +55 -19
  51. package/dist/lib/parts/view-part.component.js.map +1 -1
  52. package/dist/lib/parts/weburl-part.component.d.ts +29 -5
  53. package/dist/lib/parts/weburl-part.component.d.ts.map +1 -1
  54. package/dist/lib/parts/weburl-part.component.js +63 -15
  55. package/dist/lib/parts/weburl-part.component.js.map +1 -1
  56. package/dist/lib/services/golden-layout-wrapper.service.d.ts +65 -5
  57. package/dist/lib/services/golden-layout-wrapper.service.d.ts.map +1 -1
  58. package/dist/lib/services/golden-layout-wrapper.service.js +135 -27
  59. package/dist/lib/services/golden-layout-wrapper.service.js.map +1 -1
  60. package/package.json +13 -13
@@ -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,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAmB,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;;AAE3F;;GAEG;AACH,MAAM,WAAW,cAAc;IAC3B,QAAQ,EAAE,yBAAyB,CAAC;IACpC,MAAM,EAAE,WAAW,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,KAAK,UAAU,GAAG,aAAa,GAAG,WAAW,CAAC;AAE9C;;;;;;GAMG;AACH,qBAMa,uBAAwB,YAAW,aAAa,EAAE,SAAS;IAqExD,OAAO,CAAC,QAAQ,CAAC,GAAG;IAhEhC,0CAA0C;IACjC,SAAS,EAAE,yBAAyB,EAAE,CAAM;IAErD,oCAAoC;IACpC,IACI,OAAO,CAAC,KAAK,EAAE,OAAO,EAOzB;IACD,IAAI,OAAO,IAAI,OAAO,CAErB;IACD,OAAO,CAAC,QAAQ,CAAS;IAMzB,yDAAyD;IAC/C,UAAU,+BAAsC;IAE1D,2CAA2C;IACjC,SAAS,qBAA4B;IAO/C,oBAAoB,EAAG,gBAAgB,CAAC;IAMjC,IAAI,EAAE,UAAU,CAAiB;IACjC,gBAAgB,EAAE,yBAAyB,GAAG,IAAI,CAAQ;IAEjE,oEAAoE;IAC7D,aAAa,EAAE,iBAAiB,GAAG,IAAI,CAAQ;IAEtD,oDAAoD;IAC7C,UAAU,UAAS;IAE1B,oDAAoD;IACpD,OAAO,CAAC,cAAc,CAA8C;IAEpE,4CAA4C;IAC5C,OAAO,CAAC,eAAe,CAAS;IAEhC,qCAAqC;IAC9B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAQ;IAEvC,sCAAsC;IAC/B,cAAc,UAAS;gBAMD,GAAG,EAAE,iBAAiB;IAMnD,eAAe,IAAI,IAAI;IAIvB,WAAW,IAAI,IAAI;IAQnB;;OAEG;IACI,KAAK,IAAI,IAAI;IAWpB;;OAEG;IACI,gBAAgB,CAAC,QAAQ,EAAE,yBAAyB,GAAG,IAAI;IAYlE;;OAEG;IACI,MAAM,IAAI,IAAI;IASrB;;OAEG;IACI,eAAe,CAAC,MAAM,EAAE,iBAAiB,GAAG,IAAI;IAMvD;;OAEG;IACI,OAAO,IAAI,IAAI;IAoCtB;;OAEG;IACI,QAAQ,IAAI,IAAI;IAKvB;;OAEG;IACI,iBAAiB,IAAI,MAAM;IAOlC;;OAEG;IACI,cAAc,IAAI,OAAO;IAQhC;;OAEG;YACW,eAAe;IA+D7B;;OAEG;IACH,OAAO,CAAC,kBAAkB;yCAlRjB,uBAAuB;2CAAvB,uBAAuB;CAwRnC"}
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,EAAE,WAAW,EAAE,MAAM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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"}
@@ -198,9 +198,17 @@ export class AddPanelDialogComponent {
198
198
  // Inputs
199
199
  // ========================================
200
200
  /** Available part types to choose from */
201
- partTypes = [];
201
+ PartTypes = [];
202
+ /** @deprecated Use {@link PartTypes}. */
203
+ set partTypes(value) {
204
+ this.PartTypes = value;
205
+ }
206
+ /** @deprecated Use {@link PartTypes}. */
207
+ get partTypes() {
208
+ return this.PartTypes;
209
+ }
202
210
  /** Whether the dialog is visible */
203
- set visible(value) {
211
+ set Visible(value) {
204
212
  const previous = this._visible;
205
213
  this._visible = value;
206
214
  if (!value && previous) {
@@ -208,30 +216,86 @@ export class AddPanelDialogComponent {
208
216
  this.destroyConfigPanel();
209
217
  }
210
218
  }
211
- get visible() {
219
+ get Visible() {
212
220
  return this._visible;
213
221
  }
222
+ /** @deprecated Use {@link Visible}. */
223
+ get visible() {
224
+ return this.Visible;
225
+ }
226
+ /** @deprecated Use {@link Visible}. */
227
+ set visible(value) {
228
+ this.Visible = value;
229
+ }
214
230
  _visible = false;
215
231
  // ========================================
216
232
  // Outputs
217
233
  // ========================================
218
234
  /** Emitted when a part is configured and ready to add */
219
- panelAdded = new EventEmitter();
235
+ PanelAdded = new EventEmitter();
236
+ /**
237
+ * @deprecated Use {@link PanelAdded}.
238
+ *
239
+ * The same emitter under the old binding name, so a template still binding
240
+ * (panelAdded) keeps working. Must stay AFTER PanelAdded: class fields
241
+ * initialise in order, and the other way round this captures undefined.
242
+ */
243
+ panelAdded = this.PanelAdded;
220
244
  /** Emitted when the dialog is cancelled */
221
245
  cancelled = new EventEmitter();
222
246
  // ========================================
223
247
  // ViewChild for dynamic component loading
224
248
  // ========================================
225
- configPanelContainer;
249
+ ConfigPanelContainer;
250
+ /** @deprecated Use {@link ConfigPanelContainer}. */
251
+ get configPanelContainer() {
252
+ return this.ConfigPanelContainer;
253
+ }
254
+ /** @deprecated Use {@link ConfigPanelContainer}. */
255
+ set configPanelContainer(value) {
256
+ this.ConfigPanelContainer = value;
257
+ }
226
258
  // ========================================
227
259
  // State
228
260
  // ========================================
229
- step = 'select-type';
230
- selectedPartType = null;
261
+ Step = 'select-type';
262
+ /** @deprecated Use {@link Step}. */
263
+ get step() {
264
+ return this.Step;
265
+ }
266
+ /** @deprecated Use {@link Step}. */
267
+ set step(value) {
268
+ this.Step = value;
269
+ }
270
+ SelectedPartType = null;
271
+ /** @deprecated Use {@link SelectedPartType}. */
272
+ get selectedPartType() {
273
+ return this.SelectedPartType;
274
+ }
275
+ /** @deprecated Use {@link SelectedPartType}. */
276
+ set selectedPartType(value) {
277
+ this.SelectedPartType = value;
278
+ }
231
279
  /** Current config panel result (updated via configChanged event) */
232
- currentResult = null;
280
+ CurrentResult = null;
281
+ /** @deprecated Use {@link CurrentResult}. */
282
+ get currentResult() {
283
+ return this.CurrentResult;
284
+ }
285
+ /** @deprecated Use {@link CurrentResult}. */
286
+ set currentResult(value) {
287
+ this.CurrentResult = value;
288
+ }
233
289
  /** Whether the Add Part button should be enabled */
234
- canAddPart = false;
290
+ CanAddPart = false;
291
+ /** @deprecated Use {@link CanAddPart}. */
292
+ get canAddPart() {
293
+ return this.CanAddPart;
294
+ }
295
+ /** @deprecated Use {@link CanAddPart}. */
296
+ set canAddPart(value) {
297
+ this.CanAddPart = value;
298
+ }
235
299
  /** Reference to dynamically created config panel */
236
300
  configPanelRef = null;
237
301
  /** Whether the view has been initialized */
@@ -239,7 +303,15 @@ export class AddPanelDialogComponent {
239
303
  /** Error loading the config panel */
240
304
  loadError = null;
241
305
  /** Whether config panel is loading */
242
- isLoadingPanel = false;
306
+ IsLoadingPanel = false;
307
+ /** @deprecated Use {@link IsLoadingPanel}. */
308
+ get isLoadingPanel() {
309
+ return this.IsLoadingPanel;
310
+ }
311
+ /** @deprecated Use {@link IsLoadingPanel}. */
312
+ set isLoadingPanel(value) {
313
+ this.IsLoadingPanel = value;
314
+ }
243
315
  // ========================================
244
316
  // Constructor
245
317
  // ========================================
@@ -261,105 +333,133 @@ export class AddPanelDialogComponent {
261
333
  /**
262
334
  * Reset the dialog to initial state
263
335
  */
264
- reset() {
265
- this.step = 'select-type';
266
- this.selectedPartType = null;
267
- this.currentResult = null;
268
- this.canAddPart = false;
336
+ Reset() {
337
+ this.Step = 'select-type';
338
+ this.SelectedPartType = null;
339
+ this.CurrentResult = null;
340
+ this.CanAddPart = false;
269
341
  this.loadError = null;
270
- this.isLoadingPanel = false;
342
+ this.IsLoadingPanel = false;
271
343
  this.destroyConfigPanel();
272
344
  this.cdr.detectChanges();
273
345
  }
346
+ /** @deprecated Use {@link Reset}. */
347
+ reset() {
348
+ return this.Reset();
349
+ }
274
350
  /**
275
351
  * Select a part type and go to configuration step
276
352
  */
277
- onPartTypeSelect(partType) {
278
- this.selectedPartType = partType;
279
- this.currentResult = null;
280
- this.canAddPart = false;
353
+ OnPartTypeSelect(partType) {
354
+ this.SelectedPartType = partType;
355
+ this.CurrentResult = null;
356
+ this.CanAddPart = false;
281
357
  this.loadError = null;
282
- this.step = 'configure';
358
+ this.Step = 'configure';
283
359
  this.cdr.detectChanges();
284
360
  // Load the config panel after view updates
285
361
  setTimeout(() => this.loadConfigPanel(), 0);
286
362
  }
363
+ /** @deprecated Use {@link OnPartTypeSelect}. */
364
+ onPartTypeSelect(partType) {
365
+ return this.OnPartTypeSelect(partType);
366
+ }
287
367
  /**
288
368
  * Go back to type selection
289
369
  */
290
- goBack() {
291
- this.step = 'select-type';
292
- this.currentResult = null;
293
- this.canAddPart = false;
370
+ GoBack() {
371
+ this.Step = 'select-type';
372
+ this.CurrentResult = null;
373
+ this.CanAddPart = false;
294
374
  this.loadError = null;
295
375
  this.destroyConfigPanel();
296
376
  this.cdr.detectChanges();
297
377
  }
378
+ /** @deprecated Use {@link GoBack}. */
379
+ goBack() {
380
+ return this.GoBack();
381
+ }
298
382
  /**
299
383
  * Handle config changes from embedded config panel
300
384
  */
301
- onConfigChanged(result) {
302
- this.currentResult = result;
303
- this.canAddPart = result.isValid;
385
+ OnConfigChanged(result) {
386
+ this.CurrentResult = result;
387
+ this.CanAddPart = result.isValid;
304
388
  this.cdr.detectChanges();
305
389
  }
390
+ /** @deprecated Use {@link OnConfigChanged}. */
391
+ onConfigChanged(result) {
392
+ return this.OnConfigChanged(result);
393
+ }
306
394
  /**
307
395
  * Add the configured part
308
396
  */
309
- addPart() {
310
- if (!this.selectedPartType)
397
+ AddPart() {
398
+ if (!this.SelectedPartType)
311
399
  return;
312
400
  // Get result from the dynamic panel
313
401
  if (this.configPanelRef) {
314
402
  const panel = this.configPanelRef.instance;
315
403
  const result = panel.getResult();
316
404
  if (!result.isValid) {
317
- this.currentResult = result;
318
- this.canAddPart = false;
405
+ this.CurrentResult = result;
406
+ this.CanAddPart = false;
319
407
  this.cdr.detectChanges();
320
408
  return;
321
409
  }
322
- this.panelAdded.emit({
323
- PartType: this.selectedPartType,
410
+ this.PanelAdded.emit({
411
+ PartType: this.SelectedPartType,
324
412
  Config: result.config,
325
413
  Title: result.title,
326
- Icon: result.icon || this.selectedPartType.Icon || 'fa-solid fa-puzzle-piece'
414
+ Icon: result.icon || this.SelectedPartType.Icon || 'fa-solid fa-puzzle-piece'
327
415
  });
328
- this.reset();
416
+ this.Reset();
329
417
  return;
330
418
  }
331
419
  // Handle types without a config panel - use a generic config with just the type
332
- this.panelAdded.emit({
333
- PartType: this.selectedPartType,
334
- Config: { type: this.selectedPartType.Name },
335
- Title: this.selectedPartType.Name,
336
- Icon: this.selectedPartType.Icon || 'fa-solid fa-puzzle-piece'
420
+ this.PanelAdded.emit({
421
+ PartType: this.SelectedPartType,
422
+ Config: { type: this.SelectedPartType.Name },
423
+ Title: this.SelectedPartType.Name,
424
+ Icon: this.SelectedPartType.Icon || 'fa-solid fa-puzzle-piece'
337
425
  });
338
- this.reset();
426
+ this.Reset();
427
+ }
428
+ /** @deprecated Use {@link AddPart}. */
429
+ addPart() {
430
+ return this.AddPart();
339
431
  }
340
432
  /**
341
433
  * Cancel the dialog
342
434
  */
343
435
  onCancel() {
344
- this.reset();
436
+ this.Reset();
345
437
  this.cancelled.emit();
346
438
  }
347
439
  /**
348
440
  * Get the configuration type name
349
441
  */
350
- getConfigTypeName() {
351
- if (!this.selectedPartType)
442
+ GetConfigTypeName() {
443
+ if (!this.SelectedPartType)
352
444
  return '';
353
- const name = this.selectedPartType.Name;
445
+ const name = this.SelectedPartType.Name;
354
446
  if (name === 'WebURL')
355
447
  return 'Web URL';
356
448
  return name;
357
449
  }
450
+ /** @deprecated Use {@link GetConfigTypeName}. */
451
+ getConfigTypeName() {
452
+ return this.GetConfigTypeName();
453
+ }
358
454
  /**
359
455
  * Check if the selected part type has a config panel class
360
456
  */
457
+ HasConfigPanel() {
458
+ return !!this.SelectedPartType?.ConfigDialogClass;
459
+ }
460
+ /** @deprecated Use {@link HasConfigPanel}. */
361
461
  hasConfigPanel() {
362
- return !!this.selectedPartType?.ConfigDialogClass;
462
+ return this.HasConfigPanel();
363
463
  }
364
464
  // ========================================
365
465
  // Private Methods
@@ -369,50 +469,50 @@ export class AddPanelDialogComponent {
369
469
  */
370
470
  async loadConfigPanel() {
371
471
  this.destroyConfigPanel();
372
- if (!this.selectedPartType?.ConfigDialogClass) {
472
+ if (!this.SelectedPartType?.ConfigDialogClass) {
373
473
  // No config panel for this type - that's okay, use defaults
374
- this.canAddPart = true;
474
+ this.CanAddPart = true;
375
475
  this.cdr.detectChanges();
376
476
  return;
377
477
  }
378
- if (!this.viewInitialized || !this.configPanelContainer) {
478
+ if (!this.viewInitialized || !this.ConfigPanelContainer) {
379
479
  this.loadError = 'View container not ready';
380
480
  this.cdr.detectChanges();
381
481
  return;
382
482
  }
383
- this.isLoadingPanel = true;
483
+ this.IsLoadingPanel = true;
384
484
  this.cdr.detectChanges();
385
485
  try {
386
486
  // Use ClassFactory to create the config panel instance
387
- const panelInstance = await MJGlobal.Instance.ClassFactory.CreateInstanceAsync(BaseConfigPanel, this.selectedPartType.ConfigDialogClass);
487
+ const panelInstance = await MJGlobal.Instance.ClassFactory.CreateInstanceAsync(BaseConfigPanel, this.SelectedPartType.ConfigDialogClass);
388
488
  if (!panelInstance) {
389
- this.loadError = `Could not create config panel: ${this.selectedPartType.ConfigDialogClass}`;
390
- this.isLoadingPanel = false;
391
- this.canAddPart = true; // Allow adding with default config
489
+ this.loadError = `Could not create config panel: ${this.SelectedPartType.ConfigDialogClass}`;
490
+ this.IsLoadingPanel = false;
491
+ this.CanAddPart = true; // Allow adding with default config
392
492
  this.cdr.detectChanges();
393
493
  return;
394
494
  }
395
495
  // Get the component class from the instance
396
496
  const componentClass = panelInstance.constructor;
397
497
  // Clear the container and create the component
398
- this.configPanelContainer.clear();
399
- this.configPanelRef = this.configPanelContainer.createComponent(componentClass);
498
+ this.ConfigPanelContainer.clear();
499
+ this.configPanelRef = this.ConfigPanelContainer.createComponent(componentClass);
400
500
  // Set inputs on the component
401
501
  const panel = this.configPanelRef.instance;
402
- panel.partType = this.selectedPartType;
502
+ panel.partType = this.SelectedPartType;
403
503
  panel.panel = null; // New panel, not editing
404
504
  panel.config = null; // Start with defaults
405
505
  // Subscribe to config changes
406
506
  panel.configChanged.subscribe((result) => {
407
- this.onConfigChanged(result);
507
+ this.OnConfigChanged(result);
408
508
  });
409
- this.isLoadingPanel = false;
509
+ this.IsLoadingPanel = false;
410
510
  this.cdr.detectChanges();
411
511
  }
412
512
  catch (error) {
413
513
  this.loadError = `Failed to load config panel: ${error instanceof Error ? error.message : String(error)}`;
414
- this.isLoadingPanel = false;
415
- this.canAddPart = true; // Allow adding with default config
514
+ this.IsLoadingPanel = false;
515
+ this.CanAddPart = true; // Allow adding with default config
416
516
  this.cdr.detectChanges();
417
517
  }
418
518
  }
@@ -430,8 +530,8 @@ export class AddPanelDialogComponent {
430
530
  i0.ɵɵviewQuery(_c0, 5, ViewContainerRef);
431
531
  } if (rf & 2) {
432
532
  let _t;
433
- i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.configPanelContainer = _t.first);
434
- } }, inputs: { partTypes: "partTypes", visible: "visible" }, outputs: { panelAdded: "panelAdded", cancelled: "cancelled" }, standalone: false, decls: 1, vars: 1, consts: [["configPanelContainer", ""], [1, "add-part-dialog-overlay"], [1, "add-part-dialog-overlay", 3, "click"], [1, "add-part-dialog", 3, "click"], [1, "dialog-header"], [1, "fa-solid", "fa-plus-circle"], ["aria-label", "Close dialog", 1, "close-button", 3, "click"], [1, "fa-solid", "fa-times"], [1, "dialog-content"], [1, "instruction"], [1, "part-type-grid"], [1, "part-type-card"], [1, "no-types"], [1, "dialog-footer"], [1, "btn-secondary", 3, "click"], [1, "part-type-card", 3, "click"], [1, "card-icon"], [1, "card-content"], [1, "card-title"], [1, "card-description"], [1, "fa-solid", "fa-chevron-right", "card-arrow"], [1, "warning-icon"], [1, "fa-solid", "fa-exclamation-triangle"], ["aria-label", "Go back", 1, "back-button", 3, "click"], [1, "fa-solid", "fa-arrow-left"], [1, "dialog-content", "config-content"], [1, "loading-state"], [1, "error-state"], [1, "config-placeholder"], [1, "validation-errors"], [1, "btn-primary", 3, "click", "disabled"], [1, "fa-solid", "fa-plus"], [1, "fa-solid", "fa-spinner", "fa-spin"], [1, "error-hint"], [1, "fa-solid", "fa-cog"], [1, "error-item"], [1, "fa-solid", "fa-exclamation-circle"]], template: function AddPanelDialogComponent_Template(rf, ctx) { if (rf & 1) {
533
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.ConfigPanelContainer = _t.first);
534
+ } }, inputs: { PartTypes: "PartTypes", partTypes: "partTypes", Visible: "Visible", visible: "visible" }, outputs: { PanelAdded: "PanelAdded", panelAdded: "panelAdded", cancelled: "cancelled" }, standalone: false, decls: 1, vars: 1, consts: [["configPanelContainer", ""], [1, "add-part-dialog-overlay"], [1, "add-part-dialog-overlay", 3, "click"], [1, "add-part-dialog", 3, "click"], [1, "dialog-header"], [1, "fa-solid", "fa-plus-circle"], ["aria-label", "Close dialog", 1, "close-button", 3, "click"], [1, "fa-solid", "fa-times"], [1, "dialog-content"], [1, "instruction"], [1, "part-type-grid"], [1, "part-type-card"], [1, "no-types"], [1, "dialog-footer"], [1, "btn-secondary", 3, "click"], [1, "part-type-card", 3, "click"], [1, "card-icon"], [1, "card-content"], [1, "card-title"], [1, "card-description"], [1, "fa-solid", "fa-chevron-right", "card-arrow"], [1, "warning-icon"], [1, "fa-solid", "fa-exclamation-triangle"], ["aria-label", "Go back", 1, "back-button", 3, "click"], [1, "fa-solid", "fa-arrow-left"], [1, "dialog-content", "config-content"], [1, "loading-state"], [1, "error-state"], [1, "config-placeholder"], [1, "validation-errors"], [1, "btn-primary", 3, "click", "disabled"], [1, "fa-solid", "fa-plus"], [1, "fa-solid", "fa-spinner", "fa-spin"], [1, "error-hint"], [1, "fa-solid", "fa-cog"], [1, "error-item"], [1, "fa-solid", "fa-exclamation-circle"]], template: function AddPanelDialogComponent_Template(rf, ctx) { if (rf & 1) {
435
535
  i0.ɵɵconditionalCreate(0, AddPanelDialogComponent_Conditional_0_Template, 4, 2, "div", 1);
436
536
  } if (rf & 2) {
437
537
  i0.ɵɵconditional(ctx.visible ? 0 : -1);
@@ -440,15 +540,21 @@ export class AddPanelDialogComponent {
440
540
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AddPanelDialogComponent, [{
441
541
  type: Component,
442
542
  args: [{ standalone: false, selector: 'mj-add-panel-dialog', template: "<!-- 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", styles: ["/**\n * Add Part Dialog Styles\n */\n\n/* ========================================\n Overlay\n ======================================== */\n\n.add-part-dialog-overlay {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: rgba(0, 0, 0, 0.5);\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 10000;\n animation: fadeIn 0.15s ease;\n}\n\n@keyframes fadeIn {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n\n/* ========================================\n Dialog Container\n ======================================== */\n\n.add-part-dialog {\n display: flex;\n flex-direction: column;\n background: var(--mj-bg-surface);\n border-radius: 12px;\n box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);\n width: 560px;\n max-width: 90vw;\n max-height: 85vh;\n overflow: hidden;\n animation: slideUp 0.2s ease;\n}\n\n@keyframes slideUp {\n from {\n opacity: 0;\n transform: translateY(20px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n\n/* ========================================\n Header\n ======================================== */\n\n.dialog-header {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 20px 24px;\n border-bottom: 1px solid var(--mj-border-default);\n background: color-mix(in srgb, var(--mj-brand-primary) 8%, var(--mj-bg-surface));\n}\n\n.dialog-header h3 {\n flex: 1;\n margin: 0;\n font-size: 18px;\n font-weight: 600;\n color: var(--mj-text-primary);\n display: flex;\n align-items: center;\n gap: 10px;\n}\n\n.dialog-header h3 i {\n color: var(--mj-brand-primary);\n font-size: 16px;\n}\n\n.back-button,\n.close-button {\n width: 36px;\n height: 36px;\n display: flex;\n align-items: center;\n justify-content: center;\n border: none;\n border-radius: 8px;\n background: transparent;\n color: var(--mj-text-secondary);\n cursor: pointer;\n transition: all 0.15s ease;\n}\n\n.back-button:hover,\n.close-button:hover {\n background: rgba(0, 0, 0, 0.08);\n color: var(--mj-text-primary);\n}\n\n.back-button i,\n.close-button i {\n font-size: 16px;\n}\n\n/* ========================================\n Content\n ======================================== */\n\n.dialog-content {\n flex: 1;\n overflow-y: auto;\n padding: 24px;\n min-height: 0;\n}\n\n.instruction {\n margin: 0 0 20px 0;\n font-size: 14px;\n color: var(--mj-text-secondary);\n}\n\n/* ========================================\n Part Type Grid\n ======================================== */\n\n.part-type-grid {\n display: flex;\n flex-direction: column;\n gap: 12px;\n}\n\n.part-type-card {\n display: flex;\n align-items: center;\n gap: 16px;\n padding: 20px;\n border: 2px solid color-mix(in srgb, var(--mj-brand-primary) 15%, var(--mj-bg-surface));\n border-radius: 12px;\n cursor: pointer;\n transition: all 0.2s ease;\n background: var(--mj-bg-surface);\n}\n\n.part-type-card:hover {\n background: var(--mj-bg-page);\n border-color: var(--mj-brand-primary);\n transform: translateX(4px);\n box-shadow: 0 4px 12px color-mix(in srgb, var(--mj-brand-primary) 15%, transparent);\n}\n\n.part-type-card:hover .card-arrow {\n opacity: 1;\n transform: translateX(0);\n}\n\n.card-icon {\n width: 56px;\n height: 56px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 12px;\n background: color-mix(in srgb, var(--mj-brand-primary) 15%, var(--mj-bg-surface));\n color: var(--mj-brand-primary);\n flex-shrink: 0;\n}\n\n.card-icon i {\n font-size: 24px;\n}\n\n.card-content {\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: 6px;\n min-width: 0;\n}\n\n.card-title {\n font-size: 16px;\n font-weight: 600;\n color: var(--mj-text-primary);\n}\n\n.card-description {\n font-size: 13px;\n color: var(--mj-text-secondary);\n line-height: 1.5;\n}\n\n.card-arrow {\n flex-shrink: 0;\n color: var(--mj-brand-primary);\n opacity: 0;\n transform: translateX(-8px);\n transition: all 0.2s ease;\n font-size: 16px;\n}\n\n/* ========================================\n No Types\n ======================================== */\n\n.no-types {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 60px 40px;\n text-align: center;\n}\n\n.no-types .warning-icon {\n width: 64px;\n height: 64px;\n border-radius: 50%;\n background: color-mix(in srgb, var(--mj-status-warning) 10%, var(--mj-bg-surface));\n display: flex;\n align-items: center;\n justify-content: center;\n margin-bottom: 16px;\n}\n\n.no-types .warning-icon i {\n font-size: 28px;\n color: var(--mj-status-warning);\n}\n\n.no-types h4 {\n margin: 0 0 8px 0;\n font-size: 16px;\n font-weight: 500;\n color: var(--mj-text-primary);\n}\n\n.no-types p {\n margin: 0;\n font-size: 14px;\n color: var(--mj-text-secondary);\n}\n\n/* ========================================\n Configuration Form\n ======================================== */\n\n.config-content {\n padding: 24px;\n}\n\n.form-group {\n margin-bottom: 20px;\n}\n\n.form-group label {\n display: block;\n margin-bottom: 8px;\n font-size: 14px;\n font-weight: 500;\n color: var(--mj-text-primary);\n}\n\n.form-group input,\n.form-group select {\n width: 100%;\n padding: 12px 14px;\n border: 1px solid var(--mj-border-strong);\n border-radius: 8px;\n font-size: 14px;\n color: var(--mj-text-primary);\n background: var(--mj-bg-surface);\n transition: border-color 0.2s, box-shadow 0.2s;\n box-sizing: border-box;\n}\n\n.form-group input:focus,\n.form-group select:focus {\n outline: none;\n border-color: var(--mj-brand-primary);\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--mj-brand-primary) 10%, transparent);\n}\n\n.form-group input::placeholder {\n color: var(--mj-text-disabled);\n}\n\n.form-hint {\n display: block;\n margin-top: 6px;\n font-size: 12px;\n color: var(--mj-text-disabled);\n}\n\n.config-placeholder {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 40px;\n text-align: center;\n color: var(--mj-text-disabled);\n background: var(--mj-bg-surface-card);\n border-radius: 8px;\n margin-top: 20px;\n}\n\n.config-placeholder i {\n font-size: 32px;\n margin-bottom: 12px;\n color: var(--mj-border-strong);\n}\n\n.config-placeholder p {\n margin: 0;\n font-size: 14px;\n}\n\n/* ========================================\n Footer\n ======================================== */\n\n.dialog-footer {\n display: flex;\n justify-content: flex-end;\n gap: 12px;\n padding: 16px 24px;\n border-top: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface-card);\n}\n\n.btn-secondary {\n padding: 10px 24px;\n border-radius: 6px;\n font-size: 14px;\n font-weight: 500;\n cursor: pointer;\n transition: all 0.2s ease;\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-strong);\n color: var(--mj-text-primary);\n}\n\n.btn-secondary:hover {\n background: var(--mj-bg-surface-card);\n border-color: var(--mj-border-strong);\n}\n\n.btn-primary {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 10px 24px;\n border-radius: 6px;\n font-size: 14px;\n font-weight: 500;\n cursor: pointer;\n transition: all 0.2s ease;\n background: var(--mj-brand-primary);\n border: none;\n color: var(--mj-text-inverse);\n box-shadow: 0 2px 8px color-mix(in srgb, var(--mj-brand-primary) 30%, transparent);\n}\n\n.btn-primary:hover {\n transform: translateY(-1px);\n box-shadow: 0 4px 12px color-mix(in srgb, var(--mj-brand-primary) 40%, transparent);\n}\n\n.btn-primary i {\n font-size: 12px;\n}\n\n.btn-primary:disabled {\n background: var(--mj-border-strong);\n cursor: not-allowed;\n box-shadow: none;\n}\n\n.btn-primary:disabled:hover {\n transform: none;\n box-shadow: none;\n}\n\n/* ========================================\n Validation Errors\n ======================================== */\n\n.validation-errors {\n margin-top: 16px;\n padding: 12px 16px;\n background: color-mix(in srgb, var(--mj-status-error) 5%, var(--mj-bg-surface));\n border: 1px solid color-mix(in srgb, var(--mj-status-error) 20%, var(--mj-bg-surface));\n border-radius: 8px;\n}\n\n.error-item {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 13px;\n color: var(--mj-status-error);\n}\n\n.error-item i {\n font-size: 14px;\n}\n\n.error-item + .error-item {\n margin-top: 8px;\n}\n\n/* ========================================\n Loading State\n ======================================== */\n\n.loading-state {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 12px;\n padding: 48px 24px;\n color: var(--mj-text-secondary);\n}\n\n.loading-state i {\n font-size: 24px;\n color: var(--mj-brand-primary);\n}\n\n.loading-state span {\n font-size: 14px;\n}\n\n/* ========================================\n Error State\n ======================================== */\n\n.error-state {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 12px;\n padding: 48px 24px;\n color: var(--mj-status-warning);\n text-align: center;\n}\n\n.error-state i {\n font-size: 32px;\n}\n\n.error-state span {\n font-size: 14px;\n max-width: 300px;\n}\n\n.error-state .error-hint {\n font-size: 12px;\n color: var(--mj-text-secondary);\n margin-top: 4px;\n}\n"] }]
443
- }], () => [{ type: i0.ChangeDetectorRef }], { partTypes: [{
543
+ }], () => [{ type: i0.ChangeDetectorRef }], { PartTypes: [{
544
+ type: Input
545
+ }], partTypes: [{
546
+ type: Input
547
+ }], Visible: [{
444
548
  type: Input
445
549
  }], visible: [{
446
550
  type: Input
551
+ }], PanelAdded: [{
552
+ type: Output
447
553
  }], panelAdded: [{
448
554
  type: Output
449
555
  }], cancelled: [{
450
556
  type: Output
451
- }], configPanelContainer: [{
557
+ }], ConfigPanelContainer: [{
452
558
  type: ViewChild,
453
559
  args: ['configPanelContainer', { read: ViewContainerRef, static: false }]
454
560
  }] }); })();
@@ -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;IAK9B,iBAAM;IACN,wBAAoD;IACtD,iBAAM;;;IAXC,eAAqD;IAArD,6DAAqD;IAG/B,eAAmB;IAAnB,sCAAmB;IAC5C,cAIC;IAJD,kDAIC;;;IAQL,AADF,+BAAsB,cACM;IACxB,wBAAgD;IAClD,iBAAM;IACN,0BAAI;IAAA,uCAAuB;IAAA,iBAAK;IAChC,yBAAG;IAAA,4EAA4D;IACjE,AADiE,iBAAI,EAC/D;;;;IAtCR,AADF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;;kBAmBL,MAAM;;kBAGN,MAAM;;kBAMN,SAAS;mBAAC,sBAAsB,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,EAAE,KAAK,EAAE;;kFArCnE,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 /** 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 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 /** 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 // ========================================\n // State\n // ========================================\n\n public step: DialogStep = 'select-type';\n public selectedPartType: MJDashboardPartTypeEntity | null = null;\n\n /** Current config panel result (updated via configChanged event) */\n public currentResult: ConfigPanelResult | null = null;\n\n /** Whether the Add Part button should be enabled */\n public canAddPart = false;\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 // ========================================\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 /**\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 /**\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 /**\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 /**\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 /**\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 /**\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 // ========================================\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,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;IAK9B,iBAAM;IACN,wBAAoD;IACtD,iBAAM;;;IAXC,eAAqD;IAArD,6DAAqD;IAG/B,eAAmB;IAAnB,sCAAmB;IAC5C,cAIC;IAJD,kDAIC;;;IAQL,AADF,+BAAsB,cACM;IACxB,wBAAgD;IAClD,iBAAM;IACN,0BAAI;IAAA,uCAAuB;IAAA,iBAAK;IAChC,yBAAG;IAAA,4EAA4D;IACjE,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estroy\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"]}
@@ -54,7 +54,11 @@ export declare class EditPartDialogComponent implements OnDestroy, AfterViewInit
54
54
  /**
55
55
  * Container for dynamically loaded config panel
56
56
  */
57
- configPanelContainer: ViewContainerRef;
57
+ ConfigPanelContainer: ViewContainerRef;
58
+ /** @deprecated Use {@link ConfigPanelContainer}. */
59
+ get configPanelContainer(): ViewContainerRef;
60
+ /** @deprecated Use {@link ConfigPanelContainer}. */
61
+ set configPanelContainer(value: ViewContainerRef);
58
62
  /**
59
63
  * Reference to the dynamically created config panel component
60
64
  */
@@ -98,10 +102,14 @@ export declare class EditPartDialogComponent implements OnDestroy, AfterViewInit
98
102
  /**
99
103
  * Handle configuration changes from the embedded panel
100
104
  */
105
+ OnConfigChanged(result: ConfigPanelResult): void;
106
+ /** @deprecated Use {@link OnConfigChanged}. */
101
107
  onConfigChanged(result: ConfigPanelResult): void;
102
108
  /**
103
109
  * Get the dialog title based on part type
104
110
  */
111
+ GetDialogTitle(): string;
112
+ /** @deprecated Use {@link GetDialogTitle}. */
105
113
  getDialogTitle(): string;
106
114
  /**
107
115
  * Get the part type icon
@@ -118,6 +126,8 @@ export declare class EditPartDialogComponent implements OnDestroy, AfterViewInit
118
126
  /**
119
127
  * Get save button text
120
128
  */
129
+ GetSaveButtonText(): string;
130
+ /** @deprecated Use {@link GetSaveButtonText}. */
121
131
  getSaveButtonText(): string;
122
132
  static ɵfac: i0.ɵɵFactoryDeclaration<EditPartDialogComponent, never>;
123
133
  static ɵcmp: i0.ɵɵComponentDeclaration<EditPartDialogComponent, "mj-edit-part-dialog", never, { "Visible": { "alias": "Visible"; "required": false; }; "PartType": { "alias": "PartType"; "required": false; }; "Panel": { "alias": "Panel"; "required": false; }; "Config": { "alias": "Config"; "required": false; }; }, { "Saved": "Saved"; "Cancelled": "Cancelled"; }, never, never, false, never>;
@@ -1 +1 @@
1
- {"version":3,"file":"edit-part-dialog.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/dialogs/edit-part-dialog/edit-part-dialog.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAIH,YAAY,EACZ,iBAAiB,EAEjB,gBAAgB,EAEhB,SAAS,EACT,aAAa,EAChB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC3E,OAAO,EAAmB,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;;AAE3F;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACjC,sCAAsC;IACtC,MAAM,EAAE,WAAW,CAAC;IACpB,oBAAoB;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,8BAA8B;IAC9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,iBAAiB,IAAI,MAAM;yCAhQzB,uBAAuB;2CAAvB,uBAAuB;CAmQnC"}
1
+ {"version":3,"file":"edit-part-dialog.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/dialogs/edit-part-dialog/edit-part-dialog.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAIH,YAAY,EACZ,iBAAiB,EAEjB,gBAAgB,EAEhB,SAAS,EACT,aAAa,EAChB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC3E,OAAO,EAAmB,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;;AAE3F;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACjC,sCAAsC;IACtC,MAAM,EAAE,WAAW,CAAC;IACpB,oBAAoB;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,8BAA8B;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;GAQG;AACH,qBAMa,uBAAwB,YAAW,SAAS,EAAE,aAAa;IA2FxD,OAAO,CAAC,GAAG;IA1FvB;;OAEG;IACH,IACI,OAAO,CAAC,KAAK,EAAE,OAAO,EAazB;IACD,IAAI,OAAO,IAAI,OAAO,CAErB;IACD,OAAO,CAAC,QAAQ,CAAS;IAEzB;;OAEG;IACM,QAAQ,EAAE,yBAAyB,GAAG,IAAI,CAAQ;IAE3D;;OAEG;IACM,KAAK,EAAE,cAAc,GAAG,IAAI,CAAQ;IAE7C;;OAEG;IACM,MAAM,EAAE,WAAW,GAAG,IAAI,CAAQ;IAE3C;;OAEG;IACO,KAAK,qCAA4C;IAE3D;;OAEG;IACO,SAAS,qBAA4B;IAE/C;;OAEG;IAEH,oBAAoB,EAAG,gBAAgB,CAAC;IAExC,oDAAoD;IACpD,IAAI,oBAAoB,IAAI,gBAAgB,CAE3C;IACD,oDAAoD;IACpD,IAAI,oBA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