@memberjunction/ng-dashboard-viewer 6.2.0-edge.2 → 6.2.0-edge.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/README.md +165 -17
  2. package/dist/lib/config-dialogs/confirm-dialog.component.d.ts +3 -4
  3. package/dist/lib/config-dialogs/confirm-dialog.component.d.ts.map +1 -1
  4. package/dist/lib/config-dialogs/confirm-dialog.component.js +3 -2
  5. package/dist/lib/config-dialogs/confirm-dialog.component.js.map +1 -1
  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 +59 -50
  8. package/dist/lib/config-panels/artifact-config-panel.component.js.map +1 -1
  9. package/dist/lib/config-panels/base-config-panel.d.ts +8 -3
  10. package/dist/lib/config-panels/base-config-panel.d.ts.map +1 -1
  11. package/dist/lib/config-panels/base-config-panel.js +10 -3
  12. package/dist/lib/config-panels/base-config-panel.js.map +1 -1
  13. package/dist/lib/config-panels/query-config-panel.component.js +124 -99
  14. package/dist/lib/config-panels/query-config-panel.component.js.map +1 -1
  15. package/dist/lib/config-panels/view-config-panel.component.js +111 -103
  16. package/dist/lib/config-panels/view-config-panel.component.js.map +1 -1
  17. package/dist/lib/config-panels/weburl-config-panel.component.js +89 -80
  18. package/dist/lib/config-panels/weburl-config-panel.component.js.map +1 -1
  19. package/dist/lib/dashboard-browser/dashboard-browser.component.d.ts +79 -28
  20. package/dist/lib/dashboard-browser/dashboard-browser.component.d.ts.map +1 -1
  21. package/dist/lib/dashboard-browser/dashboard-browser.component.js +446 -447
  22. package/dist/lib/dashboard-browser/dashboard-browser.component.js.map +1 -1
  23. package/dist/lib/dashboard-card/dashboard-card.component.d.ts +69 -0
  24. package/dist/lib/dashboard-card/dashboard-card.component.d.ts.map +1 -0
  25. package/dist/lib/dashboard-card/dashboard-card.component.js +281 -0
  26. package/dist/lib/dashboard-card/dashboard-card.component.js.map +1 -0
  27. package/dist/lib/dashboard-card/dashboard-card.helpers.d.ts +18 -0
  28. package/dist/lib/dashboard-card/dashboard-card.helpers.d.ts.map +1 -0
  29. package/dist/lib/dashboard-card/dashboard-card.helpers.js +43 -0
  30. package/dist/lib/dashboard-card/dashboard-card.helpers.js.map +1 -0
  31. package/dist/lib/dashboard-card/layout-preview-cache.d.ts +15 -0
  32. package/dist/lib/dashboard-card/layout-preview-cache.d.ts.map +1 -0
  33. package/dist/lib/dashboard-card/layout-preview-cache.js +22 -0
  34. package/dist/lib/dashboard-card/layout-preview-cache.js.map +1 -0
  35. package/dist/lib/dashboard-viewer/dashboard-viewer.component.d.ts +69 -12
  36. package/dist/lib/dashboard-viewer/dashboard-viewer.component.d.ts.map +1 -1
  37. package/dist/lib/dashboard-viewer/dashboard-viewer.component.js +173 -145
  38. package/dist/lib/dashboard-viewer/dashboard-viewer.component.js.map +1 -1
  39. package/dist/lib/dashboard-viewer.module.d.ts +24 -20
  40. package/dist/lib/dashboard-viewer.module.d.ts.map +1 -1
  41. package/dist/lib/dashboard-viewer.module.js +42 -5
  42. package/dist/lib/dashboard-viewer.module.js.map +1 -1
  43. package/dist/lib/dialogs/add-panel-dialog/add-panel-dialog.component.d.ts +7 -12
  44. package/dist/lib/dialogs/add-panel-dialog/add-panel-dialog.component.d.ts.map +1 -1
  45. package/dist/lib/dialogs/add-panel-dialog/add-panel-dialog.component.js +3 -1
  46. package/dist/lib/dialogs/add-panel-dialog/add-panel-dialog.component.js.map +1 -1
  47. package/dist/lib/dialogs/dashboard-name-dialog/dashboard-name-dialog.component.d.ts +54 -0
  48. package/dist/lib/dialogs/dashboard-name-dialog/dashboard-name-dialog.component.d.ts.map +1 -0
  49. package/dist/lib/dialogs/dashboard-name-dialog/dashboard-name-dialog.component.js +156 -0
  50. package/dist/lib/dialogs/dashboard-name-dialog/dashboard-name-dialog.component.js.map +1 -0
  51. package/dist/lib/dialogs/edit-part-dialog/edit-part-dialog.component.d.ts +5 -11
  52. package/dist/lib/dialogs/edit-part-dialog/edit-part-dialog.component.d.ts.map +1 -1
  53. package/dist/lib/dialogs/edit-part-dialog/edit-part-dialog.component.js +3 -1
  54. package/dist/lib/dialogs/edit-part-dialog/edit-part-dialog.component.js.map +1 -1
  55. package/dist/lib/dialogs/part-dialog/dashboard-part-dialog.component.d.ts +147 -0
  56. package/dist/lib/dialogs/part-dialog/dashboard-part-dialog.component.d.ts.map +1 -0
  57. package/dist/lib/dialogs/part-dialog/dashboard-part-dialog.component.js +536 -0
  58. package/dist/lib/dialogs/part-dialog/dashboard-part-dialog.component.js.map +1 -0
  59. package/dist/lib/layout-preview/dashboard-layout-preview-node.component.d.ts +20 -0
  60. package/dist/lib/layout-preview/dashboard-layout-preview-node.component.d.ts.map +1 -0
  61. package/dist/lib/layout-preview/dashboard-layout-preview-node.component.js +80 -0
  62. package/dist/lib/layout-preview/dashboard-layout-preview-node.component.js.map +1 -0
  63. package/dist/lib/layout-preview/dashboard-layout-preview.component.d.ts +28 -0
  64. package/dist/lib/layout-preview/dashboard-layout-preview.component.d.ts.map +1 -0
  65. package/dist/lib/layout-preview/dashboard-layout-preview.component.js +62 -0
  66. package/dist/lib/layout-preview/dashboard-layout-preview.component.js.map +1 -0
  67. package/dist/lib/layout-preview/dashboard-layout-preview.d.ts +33 -0
  68. package/dist/lib/layout-preview/dashboard-layout-preview.d.ts.map +1 -0
  69. package/dist/lib/layout-preview/dashboard-layout-preview.js +138 -0
  70. package/dist/lib/layout-preview/dashboard-layout-preview.js.map +1 -0
  71. package/dist/lib/models/dashboard-layout-editor.d.ts +78 -0
  72. package/dist/lib/models/dashboard-layout-editor.d.ts.map +1 -0
  73. package/dist/lib/models/dashboard-layout-editor.js +374 -0
  74. package/dist/lib/models/dashboard-layout-editor.js.map +1 -0
  75. package/dist/lib/models/remove-part-confirm.d.ts +8 -0
  76. package/dist/lib/models/remove-part-confirm.d.ts.map +1 -0
  77. package/dist/lib/models/remove-part-confirm.js +23 -0
  78. package/dist/lib/models/remove-part-confirm.js.map +1 -0
  79. package/dist/lib/parts/artifact-part.component.js +2 -2
  80. package/dist/lib/parts/artifact-part.component.js.map +1 -1
  81. package/dist/lib/parts/query-part.component.js +2 -2
  82. package/dist/lib/parts/query-part.component.js.map +1 -1
  83. package/dist/lib/parts/view-part.component.js +2 -2
  84. package/dist/lib/parts/view-part.component.js.map +1 -1
  85. package/dist/lib/parts/weburl-part.component.js +2 -2
  86. package/dist/lib/parts/weburl-part.component.js.map +1 -1
  87. package/dist/lib/services/golden-layout-wrapper.service.d.ts +40 -0
  88. package/dist/lib/services/golden-layout-wrapper.service.d.ts.map +1 -1
  89. package/dist/lib/services/golden-layout-wrapper.service.js +117 -9
  90. package/dist/lib/services/golden-layout-wrapper.service.js.map +1 -1
  91. package/dist/lib/services/stack-part-actions.d.ts +11 -0
  92. package/dist/lib/services/stack-part-actions.d.ts.map +1 -0
  93. package/dist/lib/services/stack-part-actions.js +41 -0
  94. package/dist/lib/services/stack-part-actions.js.map +1 -0
  95. package/dist/public-api.d.ts +9 -0
  96. package/dist/public-api.d.ts.map +1 -1
  97. package/dist/public-api.js +13 -0
  98. package/dist/public-api.js.map +1 -1
  99. package/package.json +13 -13
@@ -0,0 +1,20 @@
1
+ import { DashboardLayoutPreviewGroup, DashboardLayoutPreviewNode, DashboardLayoutPreviewPanel } from './dashboard-layout-preview';
2
+ import * as i0 from "@angular/core";
3
+ /**
4
+ * One node of a dashboard layout preview: a panel box, or a row or column that draws its children
5
+ * with this component. The host takes the node's share of its parent as its flex-grow.
6
+ */
7
+ export declare class DashboardLayoutPreviewNodeComponent {
8
+ /** The node when it is a panel, else null. */
9
+ Panel: DashboardLayoutPreviewPanel | null;
10
+ /** The node when it is a row or column, else null. */
11
+ Group: DashboardLayoutPreviewGroup | null;
12
+ /** The node's share of its parent, from 0 to 1. */
13
+ Weight: number;
14
+ private _node;
15
+ set Node(value: DashboardLayoutPreviewNode);
16
+ get Node(): DashboardLayoutPreviewNode | null;
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<DashboardLayoutPreviewNodeComponent, never>;
18
+ static ɵcmp: i0.ɵɵComponentDeclaration<DashboardLayoutPreviewNodeComponent, "mj-dashboard-layout-preview-node", never, { "Node": { "alias": "Node"; "required": true; }; }, {}, never, never, false, never>;
19
+ }
20
+ //# sourceMappingURL=dashboard-layout-preview-node.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dashboard-layout-preview-node.component.d.ts","sourceRoot":"","sources":["../../../src/lib/layout-preview/dashboard-layout-preview-node.component.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,2BAA2B,EAAE,0BAA0B,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;;AAElI;;;GAGG;AACH,qBAYa,mCAAmC;IAC5C,8CAA8C;IACvC,KAAK,EAAE,2BAA2B,GAAG,IAAI,CAAQ;IACxD,sDAAsD;IAC/C,KAAK,EAAE,2BAA2B,GAAG,IAAI,CAAQ;IACxD,mDAAmD;IAC5C,MAAM,SAAK;IAElB,OAAO,CAAC,KAAK,CAA2C;IAExD,IACI,IAAI,CAAC,KAAK,EAAE,0BAA0B,EAKzC;IACD,IAAI,IAAI,IAAI,0BAA0B,GAAG,IAAI,CAE5C;yCAnBQ,mCAAmC;2CAAnC,mCAAmC;CAoB/C"}
@@ -0,0 +1,80 @@
1
+ import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ function DashboardLayoutPreviewNodeComponent_Conditional_0_Conditional_1_Template(rf, ctx) { if (rf & 1) {
4
+ i0.ɵɵelementStart(0, "span", 1);
5
+ i0.ɵɵelement(1, "i");
6
+ i0.ɵɵelementEnd();
7
+ } if (rf & 2) {
8
+ const panel_r1 = i0.ɵɵnextContext();
9
+ i0.ɵɵadvance();
10
+ i0.ɵɵclassMap(panel_r1.Icon);
11
+ } }
12
+ function DashboardLayoutPreviewNodeComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
13
+ i0.ɵɵelementStart(0, "span", 0);
14
+ i0.ɵɵconditionalCreate(1, DashboardLayoutPreviewNodeComponent_Conditional_0_Conditional_1_Template, 2, 2, "span", 1);
15
+ i0.ɵɵelementStart(2, "span", 2);
16
+ i0.ɵɵtext(3);
17
+ i0.ɵɵelementEnd()();
18
+ } if (rf & 2) {
19
+ const panel_r1 = ctx;
20
+ i0.ɵɵadvance();
21
+ i0.ɵɵconditional(panel_r1.Icon ? 1 : -1);
22
+ i0.ɵɵadvance(2);
23
+ i0.ɵɵtextInterpolate(panel_r1.Title);
24
+ } }
25
+ function DashboardLayoutPreviewNodeComponent_Conditional_1_For_1_Template(rf, ctx) { if (rf & 1) {
26
+ i0.ɵɵelement(0, "mj-dashboard-layout-preview-node", 3);
27
+ } if (rf & 2) {
28
+ const child_r2 = ctx.$implicit;
29
+ i0.ɵɵproperty("Node", child_r2);
30
+ } }
31
+ function DashboardLayoutPreviewNodeComponent_Conditional_1_Template(rf, ctx) { if (rf & 1) {
32
+ i0.ɵɵrepeaterCreate(0, DashboardLayoutPreviewNodeComponent_Conditional_1_For_1_Template, 1, 1, "mj-dashboard-layout-preview-node", 3, i0.ɵɵrepeaterTrackByIndex);
33
+ } if (rf & 2) {
34
+ i0.ɵɵrepeater(ctx.Children);
35
+ } }
36
+ /**
37
+ * One node of a dashboard layout preview: a panel box, or a row or column that draws its children
38
+ * with this component. The host takes the node's share of its parent as its flex-grow.
39
+ */
40
+ export class DashboardLayoutPreviewNodeComponent {
41
+ /** The node when it is a panel, else null. */
42
+ Panel = null;
43
+ /** The node when it is a row or column, else null. */
44
+ Group = null;
45
+ /** The node's share of its parent, from 0 to 1. */
46
+ Weight = 1;
47
+ _node = null;
48
+ set Node(value) {
49
+ this._node = value;
50
+ this.Weight = value.Weight;
51
+ this.Panel = value.Kind === 'panel' ? value : null;
52
+ this.Group = value.Kind === 'panel' ? null : value;
53
+ }
54
+ get Node() {
55
+ return this._node;
56
+ }
57
+ static ɵfac = function DashboardLayoutPreviewNodeComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || DashboardLayoutPreviewNodeComponent)(); };
58
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: DashboardLayoutPreviewNodeComponent, selectors: [["mj-dashboard-layout-preview-node"]], hostVars: 6, hostBindings: function DashboardLayoutPreviewNodeComponent_HostBindings(rf, ctx) { if (rf & 2) {
59
+ i0.ɵɵstyleProp("flex-grow", ctx.Weight);
60
+ i0.ɵɵclassProp("dlp-row", (ctx.Group == null ? null : ctx.Group.Kind) === "row")("dlp-column", (ctx.Group == null ? null : ctx.Group.Kind) === "column");
61
+ } }, inputs: { Node: "Node" }, standalone: false, decls: 2, vars: 1, consts: [[1, "dlp-panel"], [1, "dlp-icon"], [1, "dlp-title"], [3, "Node"]], template: function DashboardLayoutPreviewNodeComponent_Template(rf, ctx) { if (rf & 1) {
62
+ i0.ɵɵconditionalCreate(0, DashboardLayoutPreviewNodeComponent_Conditional_0_Template, 4, 2, "span", 0)(1, DashboardLayoutPreviewNodeComponent_Conditional_1_Template, 2, 0);
63
+ } if (rf & 2) {
64
+ let tmp_0_0;
65
+ i0.ɵɵconditional((tmp_0_0 = ctx.Panel) ? 0 : (tmp_0_0 = ctx.Group) ? 1 : -1, tmp_0_0);
66
+ } }, dependencies: [DashboardLayoutPreviewNodeComponent], styles: ["\n[_nghost-%COMP%] {\n display: flex;\n flex: 1 1 0;\n min-width: 0;\n min-height: 0;\n gap: 4px;\n}\n\n.dlp-row[_nghost-%COMP%] {\n flex-direction: row;\n}\n\n.dlp-column[_nghost-%COMP%] {\n flex-direction: column;\n}\n\n\n.dlp-panel[_ngcontent-%COMP%] {\n flex: 1 1 0;\n min-width: 0;\n min-height: 0;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 3px;\n padding: 4px;\n overflow: hidden;\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-default);\n border-top: 3px solid color-mix(in srgb, var(--mj-brand-primary) 45%, var(--mj-border-default));\n border-radius: var(--mj-radius-sm);\n color: var(--mj-text-secondary);\n}\n\n.dlp-icon[_ngcontent-%COMP%] {\n font-size: 12px;\n line-height: 1;\n color: var(--mj-brand-primary);\n}\n\n.dlp-title[_ngcontent-%COMP%] {\n max-width: 100%;\n font-size: 10px;\n font-weight: var(--mj-font-semibold);\n line-height: 1.2;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}"], changeDetection: 0 });
67
+ }
68
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DashboardLayoutPreviewNodeComponent, [{
69
+ type: Component,
70
+ args: [{ standalone: false, selector: 'mj-dashboard-layout-preview-node', changeDetection: ChangeDetectionStrategy.OnPush, host: {
71
+ '[class.dlp-row]': "Group?.Kind === 'row'",
72
+ '[class.dlp-column]': "Group?.Kind === 'column'",
73
+ '[style.flex-grow]': 'Weight',
74
+ }, template: "@if (Panel; as panel) {\n <span class=\"dlp-panel\">\n @if (panel.Icon) {\n <span class=\"dlp-icon\"><i [class]=\"panel.Icon\"></i></span>\n }\n <span class=\"dlp-title\">{{ panel.Title }}</span>\n </span>\n} @else if (Group; as group) {\n @for (child of group.Children; track $index) {\n <mj-dashboard-layout-preview-node [Node]=\"child\"></mj-dashboard-layout-preview-node>\n }\n}\n", styles: ["/* A node grows by its share of the parent (flex-grow is bound to its weight). */\n:host {\n display: flex;\n flex: 1 1 0;\n min-width: 0;\n min-height: 0;\n gap: 4px;\n}\n\n:host(.dlp-row) {\n flex-direction: row;\n}\n\n:host(.dlp-column) {\n flex-direction: column;\n}\n\n/* A panel box: the panel's icon above its title, in small text. The top edge stands for the panel header. */\n.dlp-panel {\n flex: 1 1 0;\n min-width: 0;\n min-height: 0;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 3px;\n padding: 4px;\n overflow: hidden;\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-default);\n border-top: 3px solid color-mix(in srgb, var(--mj-brand-primary) 45%, var(--mj-border-default));\n border-radius: var(--mj-radius-sm);\n color: var(--mj-text-secondary);\n}\n\n.dlp-icon {\n font-size: 12px;\n line-height: 1;\n color: var(--mj-brand-primary);\n}\n\n.dlp-title {\n max-width: 100%;\n font-size: 10px;\n font-weight: var(--mj-font-semibold);\n line-height: 1.2;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n"] }]
75
+ }], null, { Node: [{
76
+ type: Input,
77
+ args: [{ required: true }]
78
+ }] }); })();
79
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(DashboardLayoutPreviewNodeComponent, { className: "DashboardLayoutPreviewNodeComponent", filePath: "src/lib/layout-preview/dashboard-layout-preview-node.component.ts", lineNumber: 20 }); })();
80
+ //# sourceMappingURL=dashboard-layout-preview-node.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dashboard-layout-preview-node.component.js","sourceRoot":"","sources":["../../../src/lib/layout-preview/dashboard-layout-preview-node.component.ts","../../../src/lib/layout-preview/dashboard-layout-preview-node.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;;;ICGpE,+BAAuB;IAAA,oBAA4B;IAAA,iBAAO;;;IAAhC,cAAoB;IAApB,4BAAoB;;;IAFlD,+BAAwB;IACtB,oHAAkB;IAGlB,+BAAwB;IAAA,YAAiB;IAC3C,AAD2C,iBAAO,EAC3C;;;IAJL,cAEC;IAFD,wCAEC;IACuB,eAAiB;IAAjB,oCAAiB;;;IAIzC,sDAAoF;;;IAAlD,+BAAc;;;IADlD,gKAEC;;IAFD,2BAEC;;ADPH;;;GAGG;AAaH,MAAM,OAAO,mCAAmC;IAC5C,8CAA8C;IACvC,KAAK,GAAuC,IAAI,CAAC;IACxD,sDAAsD;IAC/C,KAAK,GAAuC,IAAI,CAAC;IACxD,mDAAmD;IAC5C,MAAM,GAAG,CAAC,CAAC;IAEV,KAAK,GAAsC,IAAI,CAAC;IAExD,IACI,IAAI,CAAC,KAAiC;QACtC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;QAC3B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;QACnD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC;IACvD,CAAC;IACD,IAAI,IAAI;QACJ,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;6HAnBQ,mCAAmC;6DAAnC,mCAAmC;YAAnC,uCAAmC;YAAnC,0EAAgB,KAAK,CAAc,+DAAnB,QAAQ,CAAW;;YCZ9C,AAPF,sGAAuB,qEAOO;;;YAP9B,qFAWC;4BDQY,mCAAmC;;iFAAnC,mCAAmC;cAZ/C,SAAS;6BACM,KAAK,YACP,kCAAkC,mBAG3B,uBAAuB,CAAC,MAAM,QACzC;oBACF,iBAAiB,EAAE,uBAAuB;oBAC1C,oBAAoB,EAAE,0BAA0B;oBAChD,mBAAmB,EAAE,QAAQ;iBAChC;;kBAYA,KAAK;mBAAC,EAAE,QAAQ,EAAE,IAAI,EAAE;;kFAVhB,mCAAmC","sourcesContent":["import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\nimport { DashboardLayoutPreviewGroup, DashboardLayoutPreviewNode, DashboardLayoutPreviewPanel } from './dashboard-layout-preview';\n\n/**\n * One node of a dashboard layout preview: a panel box, or a row or column that draws its children\n * with this component. The host takes the node's share of its parent as its flex-grow.\n */\n@Component({\n standalone: false,\n selector: 'mj-dashboard-layout-preview-node',\n templateUrl: './dashboard-layout-preview-node.component.html',\n styleUrls: ['./dashboard-layout-preview-node.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class.dlp-row]': \"Group?.Kind === 'row'\",\n '[class.dlp-column]': \"Group?.Kind === 'column'\",\n '[style.flex-grow]': 'Weight',\n },\n})\nexport class DashboardLayoutPreviewNodeComponent {\n /** The node when it is a panel, else null. */\n public Panel: DashboardLayoutPreviewPanel | null = null;\n /** The node when it is a row or column, else null. */\n public Group: DashboardLayoutPreviewGroup | null = null;\n /** The node's share of its parent, from 0 to 1. */\n public Weight = 1;\n\n private _node: DashboardLayoutPreviewNode | null = null;\n\n @Input({ required: true })\n set Node(value: DashboardLayoutPreviewNode) {\n this._node = value;\n this.Weight = value.Weight;\n this.Panel = value.Kind === 'panel' ? value : null;\n this.Group = value.Kind === 'panel' ? null : value;\n }\n get Node(): DashboardLayoutPreviewNode | null {\n return this._node;\n }\n}\n","@if (Panel; as panel) {\n <span class=\"dlp-panel\">\n @if (panel.Icon) {\n <span class=\"dlp-icon\"><i [class]=\"panel.Icon\"></i></span>\n }\n <span class=\"dlp-title\">{{ panel.Title }}</span>\n </span>\n} @else if (Group; as group) {\n @for (child of group.Children; track $index) {\n <mj-dashboard-layout-preview-node [Node]=\"child\"></mj-dashboard-layout-preview-node>\n }\n}\n"]}
@@ -0,0 +1,28 @@
1
+ import { DashboardLayoutPreviewNode } from './dashboard-layout-preview';
2
+ import * as i0 from "@angular/core";
3
+ /**
4
+ * A miniature of a dashboard's saved panel layout: nested boxes sized like the saved rows, columns
5
+ * and panels, each box with its panel's icon and title. It fills its container and renders only
6
+ * phrasing elements, so it can sit inside a button. It is decorative (aria-hidden), so the host
7
+ * must name the dashboard. It draws nothing when there is no panel layout.
8
+ */
9
+ export declare class DashboardLayoutPreviewComponent {
10
+ /** The tree drawn: Preview when it is set, else the tree built from UIConfigDetails, else null. */
11
+ Root: DashboardLayoutPreviewNode | null;
12
+ private _uiConfigDetails;
13
+ private _parsed;
14
+ private _preview;
15
+ /** The dashboard's saved configuration (`MJ: Dashboards.UIConfigDetails`). Not used while Preview is set. */
16
+ set UIConfigDetails(value: string | null | undefined);
17
+ get UIConfigDetails(): string | null;
18
+ /**
19
+ * A tree the host already built with BuildDashboardLayoutPreview, so the saved configuration is
20
+ * not parsed again.
21
+ */
22
+ set Preview(value: DashboardLayoutPreviewNode | null | undefined);
23
+ get Preview(): DashboardLayoutPreviewNode | null;
24
+ private updateRoot;
25
+ static ɵfac: i0.ɵɵFactoryDeclaration<DashboardLayoutPreviewComponent, never>;
26
+ static ɵcmp: i0.ɵɵComponentDeclaration<DashboardLayoutPreviewComponent, "mj-dashboard-layout-preview", never, { "UIConfigDetails": { "alias": "UIConfigDetails"; "required": false; }; "Preview": { "alias": "Preview"; "required": false; }; }, {}, never, never, false, never>;
27
+ }
28
+ //# sourceMappingURL=dashboard-layout-preview.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dashboard-layout-preview.component.d.ts","sourceRoot":"","sources":["../../../src/lib/layout-preview/dashboard-layout-preview.component.ts"],"names":[],"mappings":"AACA,OAAO,EAA+B,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;;AAErG;;;;;GAKG;AACH,qBAQa,+BAA+B;IACxC,mGAAmG;IAC5F,IAAI,EAAE,0BAA0B,GAAG,IAAI,CAAQ;IAEtD,OAAO,CAAC,gBAAgB,CAAuB;IAC/C,OAAO,CAAC,OAAO,CAA2C;IAC1D,OAAO,CAAC,QAAQ,CAA2C;IAE3D,6GAA6G;IAC7G,IACI,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAInD;IACD,IAAI,eAAe,IAAI,MAAM,GAAG,IAAI,CAEnC;IAED;;;OAGG;IACH,IACI,OAAO,CAAC,KAAK,EAAE,0BAA0B,GAAG,IAAI,GAAG,SAAS,EAG/D;IACD,IAAI,OAAO,IAAI,0BAA0B,GAAG,IAAI,CAE/C;IAED,OAAO,CAAC,UAAU;yCAhCT,+BAA+B;2CAA/B,+BAA+B;CAmC3C"}
@@ -0,0 +1,62 @@
1
+ import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
2
+ import { BuildDashboardLayoutPreview } from './dashboard-layout-preview';
3
+ import * as i0 from "@angular/core";
4
+ import * as i1 from "./dashboard-layout-preview-node.component";
5
+ function DashboardLayoutPreviewComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
6
+ i0.ɵɵelement(0, "mj-dashboard-layout-preview-node", 0);
7
+ } if (rf & 2) {
8
+ i0.ɵɵproperty("Node", ctx);
9
+ } }
10
+ /**
11
+ * A miniature of a dashboard's saved panel layout: nested boxes sized like the saved rows, columns
12
+ * and panels, each box with its panel's icon and title. It fills its container and renders only
13
+ * phrasing elements, so it can sit inside a button. It is decorative (aria-hidden), so the host
14
+ * must name the dashboard. It draws nothing when there is no panel layout.
15
+ */
16
+ export class DashboardLayoutPreviewComponent {
17
+ /** The tree drawn: Preview when it is set, else the tree built from UIConfigDetails, else null. */
18
+ Root = null;
19
+ _uiConfigDetails = null;
20
+ _parsed = null;
21
+ _preview = null;
22
+ /** The dashboard's saved configuration (`MJ: Dashboards.UIConfigDetails`). Not used while Preview is set. */
23
+ set UIConfigDetails(value) {
24
+ this._uiConfigDetails = value ?? null;
25
+ this._parsed = BuildDashboardLayoutPreview(this._uiConfigDetails);
26
+ this.updateRoot();
27
+ }
28
+ get UIConfigDetails() {
29
+ return this._uiConfigDetails;
30
+ }
31
+ /**
32
+ * A tree the host already built with BuildDashboardLayoutPreview, so the saved configuration is
33
+ * not parsed again.
34
+ */
35
+ set Preview(value) {
36
+ this._preview = value ?? null;
37
+ this.updateRoot();
38
+ }
39
+ get Preview() {
40
+ return this._preview;
41
+ }
42
+ updateRoot() {
43
+ this.Root = this._preview ?? this._parsed;
44
+ }
45
+ static ɵfac = function DashboardLayoutPreviewComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || DashboardLayoutPreviewComponent)(); };
46
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: DashboardLayoutPreviewComponent, selectors: [["mj-dashboard-layout-preview"]], hostAttrs: ["aria-hidden", "true"], inputs: { UIConfigDetails: "UIConfigDetails", Preview: "Preview" }, standalone: false, decls: 1, vars: 1, consts: [[3, "Node"]], template: function DashboardLayoutPreviewComponent_Template(rf, ctx) { if (rf & 1) {
47
+ i0.ɵɵconditionalCreate(0, DashboardLayoutPreviewComponent_Conditional_0_Template, 1, 1, "mj-dashboard-layout-preview-node", 0);
48
+ } if (rf & 2) {
49
+ let tmp_0_0;
50
+ i0.ɵɵconditional((tmp_0_0 = ctx.Root) ? 0 : -1, tmp_0_0);
51
+ } }, dependencies: [i1.DashboardLayoutPreviewNodeComponent], styles: ["\n\n[_nghost-%COMP%] {\n display: flex;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n padding: 8px;\n overflow: hidden;\n font-family: var(--mj-font-family);\n}"], changeDetection: 0 });
52
+ }
53
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DashboardLayoutPreviewComponent, [{
54
+ type: Component,
55
+ args: [{ standalone: false, selector: 'mj-dashboard-layout-preview', changeDetection: ChangeDetectionStrategy.OnPush, host: { 'aria-hidden': 'true' }, template: "@if (Root; as root) {\n <mj-dashboard-layout-preview-node [Node]=\"root\"></mj-dashboard-layout-preview-node>\n}\n", styles: ["/* Fills its container. The root node grows to fill the space inside the margin.\n The font is set here because a container such as a button does not pass its font down. */\n:host {\n display: flex;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n padding: 8px;\n overflow: hidden;\n font-family: var(--mj-font-family);\n}\n"] }]
56
+ }], null, { UIConfigDetails: [{
57
+ type: Input
58
+ }], Preview: [{
59
+ type: Input
60
+ }] }); })();
61
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(DashboardLayoutPreviewComponent, { className: "DashboardLayoutPreviewComponent", filePath: "src/lib/layout-preview/dashboard-layout-preview.component.ts", lineNumber: 18 }); })();
62
+ //# sourceMappingURL=dashboard-layout-preview.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dashboard-layout-preview.component.js","sourceRoot":"","sources":["../../../src/lib/layout-preview/dashboard-layout-preview.component.ts","../../../src/lib/layout-preview/dashboard-layout-preview.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC1E,OAAO,EAAE,2BAA2B,EAA8B,MAAM,4BAA4B,CAAC;;;;ICAnG,sDAAmF;;IAAjD,0BAAa;;ADEjD;;;;;GAKG;AASH,MAAM,OAAO,+BAA+B;IACxC,mGAAmG;IAC5F,IAAI,GAAsC,IAAI,CAAC;IAE9C,gBAAgB,GAAkB,IAAI,CAAC;IACvC,OAAO,GAAsC,IAAI,CAAC;IAClD,QAAQ,GAAsC,IAAI,CAAC;IAE3D,6GAA6G;IAC7G,IACI,eAAe,CAAC,KAAgC;QAChD,IAAI,CAAC,gBAAgB,GAAG,KAAK,IAAI,IAAI,CAAC;QACtC,IAAI,CAAC,OAAO,GAAG,2BAA2B,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;QAClE,IAAI,CAAC,UAAU,EAAE,CAAC;IACtB,CAAC;IACD,IAAI,eAAe;QACf,OAAO,IAAI,CAAC,gBAAgB,CAAC;IACjC,CAAC;IAED;;;OAGG;IACH,IACI,OAAO,CAAC,KAAoD;QAC5D,IAAI,CAAC,QAAQ,GAAG,KAAK,IAAI,IAAI,CAAC;QAC9B,IAAI,CAAC,UAAU,EAAE,CAAC;IACtB,CAAC;IACD,IAAI,OAAO;QACP,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IAEO,UAAU;QACd,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,OAAO,CAAC;IAC9C,CAAC;yHAlCQ,+BAA+B;6DAA/B,+BAA+B;YCjB5C,8HAAqB;;;YAArB,wDAEC;;;iFDeY,+BAA+B;cAR3C,SAAS;6BACM,KAAK,YACP,6BAA6B,mBAGtB,uBAAuB,CAAC,MAAM,QACzC,EAAE,aAAa,EAAE,MAAM,EAAE;;kBAW9B,KAAK;;kBAcL,KAAK;;kFAvBG,+BAA+B","sourcesContent":["import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\nimport { BuildDashboardLayoutPreview, DashboardLayoutPreviewNode } from './dashboard-layout-preview';\n\n/**\n * A miniature of a dashboard's saved panel layout: nested boxes sized like the saved rows, columns\n * and panels, each box with its panel's icon and title. It fills its container and renders only\n * phrasing elements, so it can sit inside a button. It is decorative (aria-hidden), so the host\n * must name the dashboard. It draws nothing when there is no panel layout.\n */\n@Component({\n standalone: false,\n selector: 'mj-dashboard-layout-preview',\n templateUrl: './dashboard-layout-preview.component.html',\n styleUrls: ['./dashboard-layout-preview.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { 'aria-hidden': 'true' },\n})\nexport class DashboardLayoutPreviewComponent {\n /** The tree drawn: Preview when it is set, else the tree built from UIConfigDetails, else null. */\n public Root: DashboardLayoutPreviewNode | null = null;\n\n private _uiConfigDetails: string | null = null;\n private _parsed: DashboardLayoutPreviewNode | null = null;\n private _preview: DashboardLayoutPreviewNode | null = null;\n\n /** The dashboard's saved configuration (`MJ: Dashboards.UIConfigDetails`). Not used while Preview is set. */\n @Input()\n set UIConfigDetails(value: string | null | undefined) {\n this._uiConfigDetails = value ?? null;\n this._parsed = BuildDashboardLayoutPreview(this._uiConfigDetails);\n this.updateRoot();\n }\n get UIConfigDetails(): string | null {\n return this._uiConfigDetails;\n }\n\n /**\n * A tree the host already built with BuildDashboardLayoutPreview, so the saved configuration is\n * not parsed again.\n */\n @Input()\n set Preview(value: DashboardLayoutPreviewNode | null | undefined) {\n this._preview = value ?? null;\n this.updateRoot();\n }\n get Preview(): DashboardLayoutPreviewNode | null {\n return this._preview;\n }\n\n private updateRoot(): void {\n this.Root = this._preview ?? this._parsed;\n }\n}\n","@if (Root; as root) {\n <mj-dashboard-layout-preview-node [Node]=\"root\"></mj-dashboard-layout-preview-node>\n}\n"]}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * @fileoverview Pure logic for a dashboard's layout preview: a small tree of the rows, columns and
3
+ * panels in a saved dashboard configuration (`MJ: Dashboards.UIConfigDetails`), which
4
+ * DashboardLayoutPreviewComponent draws as a miniature of the dashboard.
5
+ */
6
+ /** A row or column of a layout preview: its children side by side (row) or top to bottom (column). */
7
+ export interface DashboardLayoutPreviewGroup {
8
+ Kind: 'row' | 'column';
9
+ /** Share of the parent's length, from 0 to 1. The shares of one parent's children add up to 1. */
10
+ Weight: number;
11
+ Children: DashboardLayoutPreviewNode[];
12
+ }
13
+ /** One panel box of a layout preview. */
14
+ export interface DashboardLayoutPreviewPanel {
15
+ Kind: 'panel';
16
+ /** Share of the parent's length, from 0 to 1. The shares of one parent's children add up to 1. */
17
+ Weight: number;
18
+ Title: string;
19
+ /** Font Awesome classes, or null when the panel has no icon. */
20
+ Icon: string | null;
21
+ }
22
+ /** A node of a layout preview tree. */
23
+ export type DashboardLayoutPreviewNode = DashboardLayoutPreviewGroup | DashboardLayoutPreviewPanel;
24
+ /**
25
+ * Builds the layout preview of a saved dashboard configuration (`{ layout, settings }`, where
26
+ * `layout` is Golden Layout's saved layout). A stack shows as one panel: its active item, or its
27
+ * first. Each node's weight is its share of its parent, from the saved `size` and `sizeUnit`.
28
+ * Draws at most 24 panels and 8 levels of nesting; the rest is left out.
29
+ * @returns The tree, or null when there is nothing to draw: no, empty or invalid JSON, the legacy
30
+ * tile format, a null layout, or a layout with no panels.
31
+ */
32
+ export declare function BuildDashboardLayoutPreview(uiConfigDetails: string | null | undefined): DashboardLayoutPreviewNode | null;
33
+ //# sourceMappingURL=dashboard-layout-preview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dashboard-layout-preview.d.ts","sourceRoot":"","sources":["../../../src/lib/layout-preview/dashboard-layout-preview.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,sGAAsG;AACtG,MAAM,WAAW,2BAA2B;IACxC,IAAI,EAAE,KAAK,GAAG,QAAQ,CAAC;IACvB,kGAAkG;IAClG,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,0BAA0B,EAAE,CAAC;CAC1C;AAED,yCAAyC;AACzC,MAAM,WAAW,2BAA2B;IACxC,IAAI,EAAE,OAAO,CAAC;IACd,kGAAkG;IAClG,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,gEAAgE;IAChE,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAED,uCAAuC;AACvC,MAAM,MAAM,0BAA0B,GAAG,2BAA2B,GAAG,2BAA2B,CAAC;AA0BnG;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CAAC,eAAe,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,0BAA0B,GAAG,IAAI,CAIzH"}
@@ -0,0 +1,138 @@
1
+ /**
2
+ * @fileoverview Pure logic for a dashboard's layout preview: a small tree of the rows, columns and
3
+ * panels in a saved dashboard configuration (`MJ: Dashboards.UIConfigDetails`), which
4
+ * DashboardLayoutPreviewComponent draws as a miniature of the dashboard.
5
+ */
6
+ /** Most panel boxes a preview draws. Later panels are left out. */
7
+ const MAX_PREVIEW_PANELS = 24;
8
+ /** Deepest row or column nesting a preview follows. Deeper items are left out. */
9
+ const MAX_PREVIEW_DEPTH = 8;
10
+ /**
11
+ * Builds the layout preview of a saved dashboard configuration (`{ layout, settings }`, where
12
+ * `layout` is Golden Layout's saved layout). A stack shows as one panel: its active item, or its
13
+ * first. Each node's weight is its share of its parent, from the saved `size` and `sizeUnit`.
14
+ * Draws at most 24 panels and 8 levels of nesting; the rest is left out.
15
+ * @returns The tree, or null when there is nothing to draw: no, empty or invalid JSON, the legacy
16
+ * tile format, a null layout, or a layout with no panels.
17
+ */
18
+ export function BuildDashboardLayoutPreview(uiConfigDetails) {
19
+ const root = savedLayoutRoot(uiConfigDetails);
20
+ const node = root ? toPreviewNode(root, 0, { left: MAX_PREVIEW_PANELS }) : null;
21
+ return node ? { ...node, Weight: 1 } : null;
22
+ }
23
+ /** The root item of the saved layout, or null when the configuration has none. */
24
+ function savedLayoutRoot(uiConfigDetails) {
25
+ if (!uiConfigDetails?.trim())
26
+ return null;
27
+ const config = parseJson(uiConfigDetails);
28
+ if (!isJsonObject(config))
29
+ return null;
30
+ const layout = config['layout'];
31
+ if (!isJsonObject(layout))
32
+ return null;
33
+ const root = layout['root'];
34
+ return isJsonObject(root) ? root : null;
35
+ }
36
+ function parseJson(text) {
37
+ try {
38
+ return JSON.parse(text);
39
+ }
40
+ catch {
41
+ return undefined;
42
+ }
43
+ }
44
+ function isJsonObject(value) {
45
+ return typeof value === 'object' && value !== null && !Array.isArray(value);
46
+ }
47
+ /** A saved layout item as a preview node, or null when it has no panel to draw. */
48
+ function toPreviewNode(item, depth, budget) {
49
+ if (budget.left <= 0 || depth > MAX_PREVIEW_DEPTH)
50
+ return null;
51
+ const type = item['type'];
52
+ switch (type) {
53
+ case 'row':
54
+ case 'column':
55
+ return toGroup(type, item, depth, budget);
56
+ case 'stack':
57
+ return toPanel(activeItem(item), budget);
58
+ case 'component':
59
+ return toPanel(item, budget);
60
+ default:
61
+ return null;
62
+ }
63
+ }
64
+ /** A row or column with the children that have panels to draw, or null when none has. */
65
+ function toGroup(kind, item, depth, budget) {
66
+ const content = item['content'];
67
+ if (!Array.isArray(content))
68
+ return null;
69
+ const kept = [];
70
+ for (const child of content) {
71
+ if (budget.left <= 0)
72
+ break;
73
+ if (!isJsonObject(child))
74
+ continue;
75
+ const node = toPreviewNode(child, depth + 1, budget);
76
+ if (node) {
77
+ kept.push({ node, size: itemSize(child) });
78
+ }
79
+ }
80
+ if (kept.length === 0)
81
+ return null;
82
+ const weights = shares(kept.map(k => k.size));
83
+ return { Kind: kind, Weight: 1, Children: kept.map((k, i) => ({ ...k.node, Weight: weights[i] })) };
84
+ }
85
+ /** The item a stack shows: its active item, else its first. Null for an empty stack. */
86
+ function activeItem(stack) {
87
+ const content = stack['content'];
88
+ if (!Array.isArray(content))
89
+ return null;
90
+ const index = stack['activeItemIndex'];
91
+ const active = typeof index === 'number' ? content[index] : undefined;
92
+ if (isJsonObject(active))
93
+ return active;
94
+ return content.find(isJsonObject) ?? null;
95
+ }
96
+ /** A panel with the title and icon from the component's panel data (componentState). */
97
+ function toPanel(component, budget) {
98
+ if (!component)
99
+ return null;
100
+ budget.left--;
101
+ const state = component['componentState'];
102
+ const panel = isJsonObject(state) ? state : {};
103
+ return {
104
+ Kind: 'panel',
105
+ Weight: 1,
106
+ Title: nonEmptyText(panel['title']) ?? nonEmptyText(component['title']) ?? '',
107
+ Icon: nonEmptyText(panel['icon']),
108
+ };
109
+ }
110
+ function nonEmptyText(value) {
111
+ return typeof value === 'string' && value.trim() ? value.trim() : null;
112
+ }
113
+ /** A saved item's size. A missing size, or one in px or em, counts as one fr. */
114
+ function itemSize(item) {
115
+ const value = item['size'];
116
+ const unit = item['sizeUnit'];
117
+ if (typeof value === 'number' && Number.isFinite(value) && value > 0 && (unit === '%' || unit === 'fr')) {
118
+ return { unit, value };
119
+ }
120
+ return { unit: 'fr', value: 1 };
121
+ }
122
+ /**
123
+ * Each item's share of its row or column, the way Golden Layout sizes them: % sizes first, then
124
+ * the fr items share the space the % sizes leave (50 more when they leave nothing). The shares
125
+ * add up to 1.
126
+ */
127
+ function shares(sizes) {
128
+ const percentTotal = sum(sizes.filter(s => s.unit === '%').map(s => s.value));
129
+ const frTotal = sum(sizes.filter(s => s.unit === 'fr').map(s => s.value));
130
+ const frSpace = Math.round(percentTotal) < 100 ? 100 - percentTotal : 50;
131
+ const amounts = sizes.map(s => (s.unit === '%' ? s.value : (frSpace * s.value) / frTotal));
132
+ const total = sum(amounts);
133
+ return amounts.map(amount => amount / total);
134
+ }
135
+ function sum(values) {
136
+ return values.reduce((total, value) => total + value, 0);
137
+ }
138
+ //# sourceMappingURL=dashboard-layout-preview.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dashbo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AAG,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;IAC9E,MAAM,OAAO,GAAG,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;IAC1E,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;IACzE,MAAM,OAAO,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;IAC3F,MAAM,KAAK,GAAG,GAAG,CAAC,OAAO,CAAC,CAAC;IAC3B,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,GAAG,KAAK,CAAC,CAAC;AACjD,CAAC;AAED,SAAS,GAAG,CAAC,MAAgB;IACzB,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,GAAG,KAAK,EAAE,CAAC,CAAC,CAAC;AAC7D,CAAC","sourcesContent":["/**\n * @fileoverview Pure logic for a dashboard's layout preview: a small tree of the rows, columns and\n * panels in a saved dashboard configuration (`MJ: Dashboards.UIConfigDetails`), which\n * DashboardLayoutPreviewComponent draws as a miniature of the dashboard.\n */\n\n/** A row or column of a layout preview: its children side by side (row) or top to bottom (column). */\nexport interface DashboardLayoutPreviewGroup {\n Kind: 'row' | 'column';\n /** Share of the parent's length, from 0 to 1. The shares of one parent's children add up to 1. */\n Weight: number;\n Children: DashboardLayoutPreviewNode[];\n}\n\n/** One panel box of a layout preview. */\nexport interface DashboardLayoutPreviewPanel {\n Kind: 'panel';\n /** Share of the parent's length, from 0 to 1. The shares of one parent's children add up to 1. */\n Weight: number;\n Title: string;\n /** Font Awesome classes, or null when the panel has no icon. */\n Icon: string | null;\n}\n\n/** A node of a layout preview tree. */\nexport type DashboardLayoutPreviewNode = DashboardLayoutPreviewGroup | DashboardLayoutPreviewPanel;\n\n/** Most panel boxes a preview draws. Later panels are left out. */\nconst MAX_PREVIEW_PANELS = 24;\n\n/** Deepest row or column nesting a preview follows. Deeper items are left out. */\nconst MAX_PREVIEW_DEPTH = 8;\n\n/** A value JSON.parse can return. */\ntype JsonValue = string | number | boolean | null | JsonValue[] | JsonObject;\n\ninterface JsonObject {\n [key: string]: JsonValue;\n}\n\n/** The size of a saved item in its row or column. */\ninterface ItemSize {\n unit: '%' | 'fr';\n value: number;\n}\n\n/** How many more panels one tree walk may add. */\ninterface PanelBudget {\n left: number;\n}\n\n/**\n * Builds the layout preview of a saved dashboard configuration (`{ layout, settings }`, where\n * `layout` is Golden Layout's saved layout). A stack shows as one panel: its active item, or its\n * first. Each node's weight is its share of its parent, from the saved `size` and `sizeUnit`.\n * Draws at most 24 panels and 8 levels of nesting; the rest is left out.\n * @returns The tree, or null when there is nothing to draw: no, empty or invalid JSON, the legacy\n * tile format, a null layout, or a layout with no panels.\n */\nexport function BuildDashboardLayoutPreview(uiConfigDetails: string | null | undefined): DashboardLayoutPreviewNode | null {\n const root = savedLayoutRoot(uiConfigDetails);\n const node = root ? toPreviewNode(root, 0, { left: MAX_PREVIEW_PANELS }) : null;\n return node ? { ...node, Weight: 1 } : null;\n}\n\n/** The root item of the saved layout, or null when the configuration has none. */\nfunction savedLayoutRoot(uiConfigDetails: string | null | undefined): JsonObject | null {\n if (!uiConfigDetails?.trim()) return null;\n const config = parseJson(uiConfigDetails);\n if (!isJsonObject(config)) return null;\n const layout = config['layout'];\n if (!isJsonObject(layout)) return null;\n const root = layout['root'];\n return isJsonObject(root) ? root : null;\n}\n\nfunction parseJson(text: string): JsonValue | undefined {\n try {\n return JSON.parse(text) as JsonValue;\n } catch {\n return undefined;\n }\n}\n\nfunction isJsonObject(value: JsonValue | undefined): value is JsonObject {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\n/** A saved layout item as a preview node, or null when it has no panel to draw. */\nfunction toPreviewNode(item: JsonObject, depth: number, budget: PanelBudget): DashboardLayoutPreviewNode | null {\n if (budget.left <= 0 || depth > MAX_PREVIEW_DEPTH) return null;\n const type = item['type'];\n switch (type) {\n case 'row':\n case 'column':\n return toGroup(type, item, depth, budget);\n case 'stack':\n return toPanel(activeItem(item), budget);\n case 'component':\n return toPanel(item, budget);\n default:\n return null;\n }\n}\n\n/** A row or column with the children that have panels to draw, or null when none has. */\nfunction toGroup(kind: 'row' | 'column', item: JsonObject, depth: number, budget: PanelBudget): DashboardLayoutPreviewGroup | null {\n const content = item['content'];\n if (!Array.isArray(content)) return null;\n const kept: Array<{ node: DashboardLayoutPreviewNode; size: ItemSize }> = [];\n for (const child of content) {\n if (budget.left <= 0) break;\n if (!isJsonObject(child)) continue;\n const node = toPreviewNode(child, depth + 1, budget);\n if (node) {\n kept.push({ node, size: itemSize(child) });\n }\n }\n if (kept.length === 0) return null;\n const weights = shares(kept.map(k => k.size));\n return { Kind: kind, Weight: 1, Children: kept.map((k, i) => ({ ...k.node, Weight: weights[i] })) };\n}\n\n/** The item a stack shows: its active item, else its first. Null for an empty stack. */\nfunction activeItem(stack: JsonObject): JsonObject | null {\n const content = stack['content'];\n if (!Array.isArray(content)) return null;\n const index = stack['activeItemIndex'];\n const active = typeof index === 'number' ? content[index] : undefined;\n if (isJsonObject(active)) return active;\n return content.find(isJsonObject) ?? null;\n}\n\n/** A panel with the title and icon from the component's panel data (componentState). */\nfunction toPanel(component: JsonObject | null, budget: PanelBudget): DashboardLayoutPreviewPanel | null {\n if (!component) return null;\n budget.left--;\n const state = component['componentState'];\n const panel: JsonObject = isJsonObject(state) ? state : {};\n return {\n Kind: 'panel',\n Weight: 1,\n Title: nonEmptyText(panel['title']) ?? nonEmptyText(component['title']) ?? '',\n Icon: nonEmptyText(panel['icon']),\n };\n}\n\nfunction nonEmptyText(value: JsonValue | undefined): string | null {\n return typeof value === 'string' && value.trim() ? value.trim() : null;\n}\n\n/** A saved item's size. A missing size, or one in px or em, counts as one fr. */\nfunction itemSize(item: JsonObject): ItemSize {\n const value = item['size'];\n const unit = item['sizeUnit'];\n if (typeof value === 'number' && Number.isFinite(value) && value > 0 && (unit === '%' || unit === 'fr')) {\n return { unit, value };\n }\n return { unit: 'fr', value: 1 };\n}\n\n/**\n * Each item's share of its row or column, the way Golden Layout sizes them: % sizes first, then\n * the fr items share the space the % sizes leave (50 more when they leave nothing). The shares\n * add up to 1.\n */\nfunction shares(sizes: ItemSize[]): number[] {\n const percentTotal = sum(sizes.filter(s => s.unit === '%').map(s => s.value));\n const frTotal = sum(sizes.filter(s => s.unit === 'fr').map(s => s.value));\n const frSpace = Math.round(percentTotal) < 100 ? 100 - percentTotal : 50;\n const amounts = sizes.map(s => (s.unit === '%' ? s.value : (frSpace * s.value) / frTotal));\n const total = sum(amounts);\n return amounts.map(amount => amount / total);\n}\n\nfunction sum(values: number[]): number {\n return values.reduce((total, value) => total + value, 0);\n}\n"]}
@@ -0,0 +1,78 @@
1
+ /**
2
+ * @fileoverview Pure edits of a dashboard's saved Golden Layout tree (`ResolvedLayoutConfig`):
3
+ * find a panel, insert, remove, move and resize panels, and describe the layout for an agent.
4
+ * Every edit works on a copy and returns a new layout; the input is never changed.
5
+ */
6
+ import { ResolvedLayoutConfig } from 'golden-layout';
7
+ import type { DashboardPanel } from './dashboard-types';
8
+ /** The placements beside another panel, and `tab` to join that panel's stack. */
9
+ export declare const PANEL_PLACEMENTS: readonly ["left", "right", "above", "below", "tab"];
10
+ /** Where a panel goes beside another panel, or `tab` to join that panel's stack. */
11
+ export type PanelPlacement = (typeof PANEL_PLACEMENTS)[number];
12
+ /** Where a panel goes, relative to another panel or at the end of the root. */
13
+ export type PanelPosition = {
14
+ relativeTo: string;
15
+ placement: PanelPlacement;
16
+ } | {
17
+ placement: 'end';
18
+ };
19
+ /** One step from the root to a panel: the container kind and the child index taken. */
20
+ export interface LayoutPathStep {
21
+ kind: 'row' | 'column' | 'stack';
22
+ index: number;
23
+ }
24
+ /** A compact description of a layout for an agent. */
25
+ export interface SimplifiedLayoutNode {
26
+ kind: 'row' | 'column' | 'stack' | 'panel';
27
+ sizePct?: number;
28
+ panelId?: string;
29
+ title?: string;
30
+ children?: SimplifiedLayoutNode[];
31
+ }
32
+ /** A layout edit that cannot be applied: an unknown panel, an invalid position or axis. */
33
+ export declare class LayoutEditError extends Error {
34
+ constructor(message: string);
35
+ }
36
+ /** The path from the root to the panel; the last step is the panel's tab in its stack. Null when the panel is not in the layout. */
37
+ export declare function FindPanelPath(layout: ResolvedLayoutConfig | null, panelId: string): LayoutPathStep[] | null;
38
+ /** A readable address for a path, for example `row/1 › column/0 › tab 2`. */
39
+ export declare function DescribePath(path: LayoutPathStep[]): string;
40
+ /**
41
+ * The layout with a copy of `panel` added at `position`. Beside another panel, the new panel joins
42
+ * the target's row or column, or the target is wrapped in a new one; the items of that container
43
+ * share it evenly as integer percentages. `tab` adds the panel to the target's stack and shows it;
44
+ * `end` adds it at the right end of the root, and an empty layout gets a root stack.
45
+ * @throws LayoutEditError when the placement is not one of PANEL_PLACEMENTS or `end`, when a placement
46
+ * other than `end` has no `relativeTo`, or when `relativeTo` is not in the layout.
47
+ */
48
+ export declare function InsertPanel(layout: ResolvedLayoutConfig | null, panel: DashboardPanel, position: PanelPosition): ResolvedLayoutConfig;
49
+ /**
50
+ * The layout without the panel. Its stack keeps showing the same tab when that tab remains. An
51
+ * empty stack is removed, a container left with one item is replaced by that item, and the items of
52
+ * a container that lost one share it evenly unless their sizes still add up to 100%. A layout left
53
+ * with no panels has no root.
54
+ * @throws LayoutEditError when the panel is not in the layout.
55
+ */
56
+ export declare function RemovePanelFromLayout(layout: ResolvedLayoutConfig | null, panelId: string): ResolvedLayoutConfig;
57
+ /**
58
+ * The layout with the panel removed from where it is and inserted at `position`.
59
+ * @throws LayoutEditError when the position is not valid (as for InsertPanel), when the panel or
60
+ * `relativeTo` is not in the layout, or when `relativeTo` is the panel itself.
61
+ */
62
+ export declare function MovePanel(layout: ResolvedLayoutConfig | null, panelId: string, position: PanelPosition): ResolvedLayoutConfig;
63
+ /**
64
+ * The layout with the panel resized. `widthPct` sets the panel's share of the nearest row that it
65
+ * shares with other items, and `heightPct` its share of the nearest such column; give either or both.
66
+ * The share is kept between 5% and 95%, and low enough that every other item in the container keeps
67
+ * at least 5%. The other items share the rest in proportion to their current shares. Sizes are integer
68
+ * percentages that add up to 100.
69
+ * @throws LayoutEditError when the panel is not in the layout, no size or a non-finite size is given,
70
+ * or the panel shares no row (for a width) or column (for a height) with other items.
71
+ */
72
+ export declare function ResizePanel(layout: ResolvedLayoutConfig | null, panelId: string, size: {
73
+ widthPct?: number;
74
+ heightPct?: number;
75
+ }): ResolvedLayoutConfig;
76
+ /** A compact tree of the layout: containers with integer percentage sizes and panels with their IDs. */
77
+ export declare function SimplifyLayout(layout: ResolvedLayoutConfig | null): SimplifiedLayoutNode | null;
78
+ //# sourceMappingURL=dashboard-layout-editor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dashboard-layout-editor.d.ts","sourceRoot":"","sources":["../../../src/lib/models/dashboard-layout-editor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAExD,iFAAiF;AACjF,eAAO,MAAM,gB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