@memberjunction/ng-entity-viewer 3.2.0 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/aggregate-panel/aggregate-panel.component.d.ts +118 -0
- package/dist/lib/aggregate-panel/aggregate-panel.component.d.ts.map +1 -0
- package/dist/lib/aggregate-panel/aggregate-panel.component.js +366 -0
- package/dist/lib/aggregate-panel/aggregate-panel.component.js.map +1 -0
- package/dist/lib/aggregate-setup-dialog/aggregate-setup-dialog.component.d.ts +196 -0
- package/dist/lib/aggregate-setup-dialog/aggregate-setup-dialog.component.d.ts.map +1 -0
- package/dist/lib/aggregate-setup-dialog/aggregate-setup-dialog.component.js +948 -0
- package/dist/lib/aggregate-setup-dialog/aggregate-setup-dialog.component.js.map +1 -0
- package/dist/lib/entity-data-grid/entity-data-grid.component.d.ts +134 -8
- package/dist/lib/entity-data-grid/entity-data-grid.component.d.ts.map +1 -1
- package/dist/lib/entity-data-grid/entity-data-grid.component.js +769 -150
- package/dist/lib/entity-data-grid/entity-data-grid.component.js.map +1 -1
- package/dist/lib/entity-data-grid/models/grid-types.d.ts +15 -1
- package/dist/lib/entity-data-grid/models/grid-types.d.ts.map +1 -1
- package/dist/lib/entity-data-grid/models/grid-types.js.map +1 -1
- package/dist/lib/entity-viewer/entity-viewer.component.d.ts +12 -3
- package/dist/lib/entity-viewer/entity-viewer.component.d.ts.map +1 -1
- package/dist/lib/entity-viewer/entity-viewer.component.js +29 -4
- package/dist/lib/entity-viewer/entity-viewer.component.js.map +1 -1
- package/dist/lib/types.d.ts +9 -21
- package/dist/lib/types.d.ts.map +1 -1
- package/dist/lib/types.js.map +1 -1
- package/dist/lib/view-config-panel/view-config-panel.component.d.ts +71 -3
- package/dist/lib/view-config-panel/view-config-panel.component.d.ts.map +1 -1
- package/dist/lib/view-config-panel/view-config-panel.component.js +726 -320
- package/dist/lib/view-config-panel/view-config-panel.component.js.map +1 -1
- package/dist/module.d.ts +9 -7
- package/dist/module.d.ts.map +1 -1
- package/dist/module.js +14 -4
- package/dist/module.js.map +1 -1
- package/dist/public-api.d.ts +2 -0
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +4 -0
- package/dist/public-api.js.map +1 -1
- package/package.json +9 -9
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
|
+
import { ViewGridAggregate } from '@memberjunction/core-entities';
|
|
3
|
+
import { AggregateValue } from '@memberjunction/core';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
/**
|
|
6
|
+
* AggregatePanelComponent displays aggregate values in a card-based panel.
|
|
7
|
+
* Can be positioned to the right or bottom of the grid, with various layout options.
|
|
8
|
+
*
|
|
9
|
+
* Features:
|
|
10
|
+
* - Collapsible panel with customizable title
|
|
11
|
+
* - Multiple layout options (horizontal, vertical, grid)
|
|
12
|
+
* - Value formatting (number, currency, percent, date)
|
|
13
|
+
* - Conditional styling (green/yellow/red based on value thresholds)
|
|
14
|
+
* - Icon support for visual indicators
|
|
15
|
+
*/
|
|
16
|
+
export declare class AggregatePanelComponent implements OnInit {
|
|
17
|
+
/**
|
|
18
|
+
* Array of aggregate configurations to display
|
|
19
|
+
*/
|
|
20
|
+
Aggregates: ViewGridAggregate[];
|
|
21
|
+
/**
|
|
22
|
+
* Map of aggregate values, keyed by expression or id
|
|
23
|
+
*/
|
|
24
|
+
Values: Map<string, AggregateValue>;
|
|
25
|
+
/**
|
|
26
|
+
* Panel position relative to the grid
|
|
27
|
+
*/
|
|
28
|
+
Position: 'right' | 'bottom';
|
|
29
|
+
/**
|
|
30
|
+
* Panel width in pixels (only applies when Position is 'right')
|
|
31
|
+
*/
|
|
32
|
+
Width: number;
|
|
33
|
+
/**
|
|
34
|
+
* Layout style for aggregate cards
|
|
35
|
+
*/
|
|
36
|
+
Layout: 'horizontal' | 'vertical' | 'grid';
|
|
37
|
+
/**
|
|
38
|
+
* Number of columns when Layout is 'grid'
|
|
39
|
+
*/
|
|
40
|
+
GridColumns: number;
|
|
41
|
+
/**
|
|
42
|
+
* Panel title
|
|
43
|
+
*/
|
|
44
|
+
Title: string;
|
|
45
|
+
/**
|
|
46
|
+
* Whether the panel can be collapsed
|
|
47
|
+
*/
|
|
48
|
+
Collapsible: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Whether the panel starts in collapsed state
|
|
51
|
+
*/
|
|
52
|
+
StartCollapsed: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Whether aggregates are currently loading
|
|
55
|
+
*/
|
|
56
|
+
Loading: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Emitted when panel collapsed state changes
|
|
59
|
+
*/
|
|
60
|
+
CollapsedChange: EventEmitter<boolean>;
|
|
61
|
+
/**
|
|
62
|
+
* Emitted when user clicks an aggregate card (for editing/details)
|
|
63
|
+
*/
|
|
64
|
+
AggregateClick: EventEmitter<ViewGridAggregate>;
|
|
65
|
+
IsCollapsed: boolean;
|
|
66
|
+
ngOnInit(): void;
|
|
67
|
+
/**
|
|
68
|
+
* Toggle panel collapsed state
|
|
69
|
+
*/
|
|
70
|
+
ToggleCollapse(): void;
|
|
71
|
+
/**
|
|
72
|
+
* Handle click on an aggregate card
|
|
73
|
+
*/
|
|
74
|
+
OnAggregateClick(agg: ViewGridAggregate): void;
|
|
75
|
+
/**
|
|
76
|
+
* Get the formatted value for an aggregate
|
|
77
|
+
*/
|
|
78
|
+
FormatValue(agg: ViewGridAggregate): string;
|
|
79
|
+
/**
|
|
80
|
+
* Get the CSS class for conditional styling
|
|
81
|
+
*/
|
|
82
|
+
GetStyleClass(agg: ViewGridAggregate): string;
|
|
83
|
+
/**
|
|
84
|
+
* Get enabled aggregates (filter out disabled ones)
|
|
85
|
+
*/
|
|
86
|
+
get EnabledAggregates(): ViewGridAggregate[];
|
|
87
|
+
/**
|
|
88
|
+
* Get card aggregates sorted by order
|
|
89
|
+
*/
|
|
90
|
+
get CardAggregates(): ViewGridAggregate[];
|
|
91
|
+
/**
|
|
92
|
+
* Get panel style for right position
|
|
93
|
+
*/
|
|
94
|
+
get PanelStyle(): Record<string, string>;
|
|
95
|
+
/**
|
|
96
|
+
* Get grid template columns for grid layout
|
|
97
|
+
*/
|
|
98
|
+
get GridTemplateColumns(): string;
|
|
99
|
+
/**
|
|
100
|
+
* Format value based on type configuration
|
|
101
|
+
*/
|
|
102
|
+
private formatByType;
|
|
103
|
+
/**
|
|
104
|
+
* Format a number value
|
|
105
|
+
*/
|
|
106
|
+
private formatNumber;
|
|
107
|
+
/**
|
|
108
|
+
* Format a date value
|
|
109
|
+
*/
|
|
110
|
+
private formatDate;
|
|
111
|
+
/**
|
|
112
|
+
* Evaluate a conditional styling rule
|
|
113
|
+
*/
|
|
114
|
+
private evaluateCondition;
|
|
115
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AggregatePanelComponent, never>;
|
|
116
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AggregatePanelComponent, "mj-aggregate-panel", never, { "Aggregates": { "alias": "Aggregates"; "required": false; }; "Values": { "alias": "Values"; "required": false; }; "Position": { "alias": "Position"; "required": false; }; "Width": { "alias": "Width"; "required": false; }; "Layout": { "alias": "Layout"; "required": false; }; "GridColumns": { "alias": "GridColumns"; "required": false; }; "Title": { "alias": "Title"; "required": false; }; "Collapsible": { "alias": "Collapsible"; "required": false; }; "StartCollapsed": { "alias": "StartCollapsed"; "required": false; }; "Loading": { "alias": "Loading"; "required": false; }; }, { "CollapsedChange": "CollapsedChange"; "AggregateClick": "AggregateClick"; }, never, never, false, never>;
|
|
117
|
+
}
|
|
118
|
+
//# sourceMappingURL=aggregate-panel.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aggregate-panel.component.d.ts","sourceRoot":"","sources":["../../../src/lib/aggregate-panel/aggregate-panel.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,YAAY,EACZ,MAAM,EACP,MAAM,eAAe,CAAC;AACv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mB,IAAI,MAAM,CAKhC;IAED;;OAEG;IACH,OAAO,CAAC,YAAY;IAyBpB;;OAEG;IACH,OAAO,CAAC,YAAY;IAoBpB;;OAEG;IACH,OAAO,CAAC,UAAU;IAyBlB;;OAEG;IACH,OAAO,CAAC,iBAAiB;yCA3Od,uBAAuB;2CAAvB,uBAAuB;CAiQnC"}
|
|
@@ -0,0 +1,366 @@
|
|
|
1
|
+
import { Component, Input, Output, EventEmitter } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "@angular/common";
|
|
4
|
+
const _c0 = a0 => ({ "grid-template-columns": a0 });
|
|
5
|
+
const _c1 = () => ({});
|
|
6
|
+
function AggregatePanelComponent_span_5_Template(rf, ctx) { if (rf & 1) {
|
|
7
|
+
i0.ɵɵelementStart(0, "span", 7);
|
|
8
|
+
i0.ɵɵelement(1, "i", 8);
|
|
9
|
+
i0.ɵɵelementEnd();
|
|
10
|
+
} }
|
|
11
|
+
function AggregatePanelComponent_button_6_Template(rf, ctx) { if (rf & 1) {
|
|
12
|
+
i0.ɵɵelementStart(0, "button", 9);
|
|
13
|
+
i0.ɵɵelement(1, "i", 10);
|
|
14
|
+
i0.ɵɵelementEnd();
|
|
15
|
+
} if (rf & 2) {
|
|
16
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
17
|
+
i0.ɵɵadvance();
|
|
18
|
+
i0.ɵɵclassProp("fa-chevron-up", !ctx_r0.IsCollapsed)("fa-chevron-down", ctx_r0.IsCollapsed);
|
|
19
|
+
} }
|
|
20
|
+
function AggregatePanelComponent_div_7_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
21
|
+
i0.ɵɵelementStart(0, "div", 15);
|
|
22
|
+
i0.ɵɵelement(1, "i", 16);
|
|
23
|
+
i0.ɵɵelementStart(2, "p");
|
|
24
|
+
i0.ɵɵtext(3, "No summaries configured");
|
|
25
|
+
i0.ɵɵelementEnd()();
|
|
26
|
+
} }
|
|
27
|
+
function AggregatePanelComponent_div_7_div_3_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
28
|
+
i0.ɵɵelementStart(0, "div", 22);
|
|
29
|
+
i0.ɵɵelement(1, "i");
|
|
30
|
+
i0.ɵɵelementEnd();
|
|
31
|
+
} if (rf & 2) {
|
|
32
|
+
const agg_r3 = i0.ɵɵnextContext().$implicit;
|
|
33
|
+
i0.ɵɵadvance();
|
|
34
|
+
i0.ɵɵclassMap(agg_r3.icon);
|
|
35
|
+
} }
|
|
36
|
+
function AggregatePanelComponent_div_7_div_3_Template(rf, ctx) { if (rf & 1) {
|
|
37
|
+
const _r2 = i0.ɵɵgetCurrentView();
|
|
38
|
+
i0.ɵɵelementStart(0, "div", 17);
|
|
39
|
+
i0.ɵɵlistener("click", function AggregatePanelComponent_div_7_div_3_Template_div_click_0_listener() { const agg_r3 = i0.ɵɵrestoreView(_r2).$implicit; const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.OnAggregateClick(agg_r3)); });
|
|
40
|
+
i0.ɵɵtemplate(1, AggregatePanelComponent_div_7_div_3_div_1_Template, 2, 2, "div", 18);
|
|
41
|
+
i0.ɵɵelementStart(2, "div", 19)(3, "div", 20);
|
|
42
|
+
i0.ɵɵtext(4);
|
|
43
|
+
i0.ɵɵelementEnd();
|
|
44
|
+
i0.ɵɵelementStart(5, "div", 21);
|
|
45
|
+
i0.ɵɵtext(6);
|
|
46
|
+
i0.ɵɵelementEnd()()();
|
|
47
|
+
} if (rf & 2) {
|
|
48
|
+
const agg_r3 = ctx.$implicit;
|
|
49
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
50
|
+
i0.ɵɵclassMap(ctx_r0.GetStyleClass(agg_r3));
|
|
51
|
+
i0.ɵɵproperty("title", agg_r3.description || agg_r3.label);
|
|
52
|
+
i0.ɵɵadvance();
|
|
53
|
+
i0.ɵɵproperty("ngIf", agg_r3.icon);
|
|
54
|
+
i0.ɵɵadvance(2);
|
|
55
|
+
i0.ɵɵclassProp("loading", ctx_r0.Loading);
|
|
56
|
+
i0.ɵɵadvance();
|
|
57
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r0.Loading ? "..." : ctx_r0.FormatValue(agg_r3), " ");
|
|
58
|
+
i0.ɵɵadvance(2);
|
|
59
|
+
i0.ɵɵtextInterpolate(agg_r3.label);
|
|
60
|
+
} }
|
|
61
|
+
function AggregatePanelComponent_div_7_Template(rf, ctx) { if (rf & 1) {
|
|
62
|
+
i0.ɵɵelementStart(0, "div", 11);
|
|
63
|
+
i0.ɵɵtemplate(1, AggregatePanelComponent_div_7_div_1_Template, 4, 0, "div", 12);
|
|
64
|
+
i0.ɵɵelementStart(2, "div", 13);
|
|
65
|
+
i0.ɵɵtemplate(3, AggregatePanelComponent_div_7_div_3_Template, 7, 8, "div", 14);
|
|
66
|
+
i0.ɵɵelementEnd()();
|
|
67
|
+
} if (rf & 2) {
|
|
68
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
69
|
+
i0.ɵɵadvance();
|
|
70
|
+
i0.ɵɵproperty("ngIf", ctx_r0.CardAggregates.length === 0);
|
|
71
|
+
i0.ɵɵadvance();
|
|
72
|
+
i0.ɵɵclassProp("layout-horizontal", ctx_r0.Layout === "horizontal")("layout-vertical", ctx_r0.Layout === "vertical")("layout-grid", ctx_r0.Layout === "grid");
|
|
73
|
+
i0.ɵɵproperty("ngStyle", ctx_r0.Layout === "grid" ? i0.ɵɵpureFunction1(9, _c0, ctx_r0.GridTemplateColumns) : i0.ɵɵpureFunction0(11, _c1));
|
|
74
|
+
i0.ɵɵadvance();
|
|
75
|
+
i0.ɵɵproperty("ngForOf", ctx_r0.CardAggregates);
|
|
76
|
+
} }
|
|
77
|
+
/**
|
|
78
|
+
* AggregatePanelComponent displays aggregate values in a card-based panel.
|
|
79
|
+
* Can be positioned to the right or bottom of the grid, with various layout options.
|
|
80
|
+
*
|
|
81
|
+
* Features:
|
|
82
|
+
* - Collapsible panel with customizable title
|
|
83
|
+
* - Multiple layout options (horizontal, vertical, grid)
|
|
84
|
+
* - Value formatting (number, currency, percent, date)
|
|
85
|
+
* - Conditional styling (green/yellow/red based on value thresholds)
|
|
86
|
+
* - Icon support for visual indicators
|
|
87
|
+
*/
|
|
88
|
+
export class AggregatePanelComponent {
|
|
89
|
+
/**
|
|
90
|
+
* Array of aggregate configurations to display
|
|
91
|
+
*/
|
|
92
|
+
Aggregates = [];
|
|
93
|
+
/**
|
|
94
|
+
* Map of aggregate values, keyed by expression or id
|
|
95
|
+
*/
|
|
96
|
+
Values = new Map();
|
|
97
|
+
/**
|
|
98
|
+
* Panel position relative to the grid
|
|
99
|
+
*/
|
|
100
|
+
Position = 'right';
|
|
101
|
+
/**
|
|
102
|
+
* Panel width in pixels (only applies when Position is 'right')
|
|
103
|
+
*/
|
|
104
|
+
Width = 280;
|
|
105
|
+
/**
|
|
106
|
+
* Layout style for aggregate cards
|
|
107
|
+
*/
|
|
108
|
+
Layout = 'vertical';
|
|
109
|
+
/**
|
|
110
|
+
* Number of columns when Layout is 'grid'
|
|
111
|
+
*/
|
|
112
|
+
GridColumns = 2;
|
|
113
|
+
/**
|
|
114
|
+
* Panel title
|
|
115
|
+
*/
|
|
116
|
+
Title = 'Summary';
|
|
117
|
+
/**
|
|
118
|
+
* Whether the panel can be collapsed
|
|
119
|
+
*/
|
|
120
|
+
Collapsible = true;
|
|
121
|
+
/**
|
|
122
|
+
* Whether the panel starts in collapsed state
|
|
123
|
+
*/
|
|
124
|
+
StartCollapsed = false;
|
|
125
|
+
/**
|
|
126
|
+
* Whether aggregates are currently loading
|
|
127
|
+
*/
|
|
128
|
+
Loading = false;
|
|
129
|
+
/**
|
|
130
|
+
* Emitted when panel collapsed state changes
|
|
131
|
+
*/
|
|
132
|
+
CollapsedChange = new EventEmitter();
|
|
133
|
+
/**
|
|
134
|
+
* Emitted when user clicks an aggregate card (for editing/details)
|
|
135
|
+
*/
|
|
136
|
+
AggregateClick = new EventEmitter();
|
|
137
|
+
IsCollapsed = false;
|
|
138
|
+
ngOnInit() {
|
|
139
|
+
this.IsCollapsed = this.StartCollapsed;
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Toggle panel collapsed state
|
|
143
|
+
*/
|
|
144
|
+
ToggleCollapse() {
|
|
145
|
+
if (this.Collapsible) {
|
|
146
|
+
this.IsCollapsed = !this.IsCollapsed;
|
|
147
|
+
this.CollapsedChange.emit(this.IsCollapsed);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Handle click on an aggregate card
|
|
152
|
+
*/
|
|
153
|
+
OnAggregateClick(agg) {
|
|
154
|
+
this.AggregateClick.emit(agg);
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Get the formatted value for an aggregate
|
|
158
|
+
*/
|
|
159
|
+
FormatValue(agg) {
|
|
160
|
+
const key = agg.id || agg.expression;
|
|
161
|
+
const value = this.Values.get(key);
|
|
162
|
+
if (value == null)
|
|
163
|
+
return '—';
|
|
164
|
+
const format = agg.format || {};
|
|
165
|
+
return this.formatByType(value, format);
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Get the CSS class for conditional styling
|
|
169
|
+
*/
|
|
170
|
+
GetStyleClass(agg) {
|
|
171
|
+
const key = agg.id || agg.expression;
|
|
172
|
+
const value = this.Values.get(key);
|
|
173
|
+
if (value == null || !agg.conditionalStyles?.length)
|
|
174
|
+
return '';
|
|
175
|
+
for (const rule of agg.conditionalStyles) {
|
|
176
|
+
if (this.evaluateCondition(value, rule)) {
|
|
177
|
+
return `style-${rule.style}`;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
return '';
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Get enabled aggregates (filter out disabled ones)
|
|
184
|
+
*/
|
|
185
|
+
get EnabledAggregates() {
|
|
186
|
+
return this.Aggregates.filter(a => a.enabled !== false);
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Get card aggregates sorted by order
|
|
190
|
+
*/
|
|
191
|
+
get CardAggregates() {
|
|
192
|
+
return this.EnabledAggregates
|
|
193
|
+
.filter(a => a.displayType === 'card')
|
|
194
|
+
.sort((a, b) => (a.order || 0) - (b.order || 0));
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Get panel style for right position
|
|
198
|
+
*/
|
|
199
|
+
get PanelStyle() {
|
|
200
|
+
if (this.Position === 'right') {
|
|
201
|
+
return {
|
|
202
|
+
width: `${this.Width}px`,
|
|
203
|
+
minWidth: `${this.Width}px`
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
return {};
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Get grid template columns for grid layout
|
|
210
|
+
*/
|
|
211
|
+
get GridTemplateColumns() {
|
|
212
|
+
if (this.Layout === 'grid') {
|
|
213
|
+
return `repeat(${this.GridColumns}, 1fr)`;
|
|
214
|
+
}
|
|
215
|
+
return '';
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Format value based on type configuration
|
|
219
|
+
*/
|
|
220
|
+
formatByType(value, format) {
|
|
221
|
+
if (value == null)
|
|
222
|
+
return '—';
|
|
223
|
+
// Handle prefix/suffix
|
|
224
|
+
const prefix = format.prefix || '';
|
|
225
|
+
const suffix = format.suffix || '';
|
|
226
|
+
// Handle different value types
|
|
227
|
+
if (typeof value === 'number') {
|
|
228
|
+
const formatted = this.formatNumber(value, format);
|
|
229
|
+
return `${prefix}${formatted}${suffix}`;
|
|
230
|
+
}
|
|
231
|
+
if (value instanceof Date) {
|
|
232
|
+
return this.formatDate(value, format.dateFormat);
|
|
233
|
+
}
|
|
234
|
+
if (typeof value === 'boolean') {
|
|
235
|
+
return value ? 'Yes' : 'No';
|
|
236
|
+
}
|
|
237
|
+
// String or unknown type
|
|
238
|
+
return `${prefix}${String(value)}${suffix}`;
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* Format a number value
|
|
242
|
+
*/
|
|
243
|
+
formatNumber(value, format) {
|
|
244
|
+
const options = {
|
|
245
|
+
minimumFractionDigits: format.decimals ?? 0,
|
|
246
|
+
maximumFractionDigits: format.decimals ?? 2,
|
|
247
|
+
useGrouping: format.thousandsSeparator !== false
|
|
248
|
+
};
|
|
249
|
+
// Handle currency
|
|
250
|
+
if (format.currencyCode) {
|
|
251
|
+
options.style = 'currency';
|
|
252
|
+
options.currency = format.currencyCode;
|
|
253
|
+
}
|
|
254
|
+
try {
|
|
255
|
+
return new Intl.NumberFormat('en-US', options).format(value);
|
|
256
|
+
}
|
|
257
|
+
catch {
|
|
258
|
+
return String(value);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Format a date value
|
|
263
|
+
*/
|
|
264
|
+
formatDate(value, dateFormat) {
|
|
265
|
+
try {
|
|
266
|
+
// Simple format presets
|
|
267
|
+
const options = {};
|
|
268
|
+
switch (dateFormat) {
|
|
269
|
+
case 'short':
|
|
270
|
+
options.dateStyle = 'short';
|
|
271
|
+
break;
|
|
272
|
+
case 'medium':
|
|
273
|
+
options.dateStyle = 'medium';
|
|
274
|
+
break;
|
|
275
|
+
case 'long':
|
|
276
|
+
options.dateStyle = 'long';
|
|
277
|
+
break;
|
|
278
|
+
default:
|
|
279
|
+
options.dateStyle = 'medium';
|
|
280
|
+
}
|
|
281
|
+
return new Intl.DateTimeFormat('en-US', options).format(value);
|
|
282
|
+
}
|
|
283
|
+
catch {
|
|
284
|
+
return String(value);
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* Evaluate a conditional styling rule
|
|
289
|
+
*/
|
|
290
|
+
evaluateCondition(value, rule) {
|
|
291
|
+
// For non-numeric values, only support equality checks
|
|
292
|
+
if (typeof value !== 'number') {
|
|
293
|
+
if (rule.operator === 'eq')
|
|
294
|
+
return value === rule.value;
|
|
295
|
+
if (rule.operator === 'neq')
|
|
296
|
+
return value !== rule.value;
|
|
297
|
+
return false;
|
|
298
|
+
}
|
|
299
|
+
const numValue = Number(rule.value);
|
|
300
|
+
const numValue2 = rule.value2 != null ? Number(rule.value2) : numValue;
|
|
301
|
+
switch (rule.operator) {
|
|
302
|
+
case 'gt': return value > numValue;
|
|
303
|
+
case 'gte': return value >= numValue;
|
|
304
|
+
case 'lt': return value < numValue;
|
|
305
|
+
case 'lte': return value <= numValue;
|
|
306
|
+
case 'eq': return value === numValue;
|
|
307
|
+
case 'neq': return value !== numValue;
|
|
308
|
+
case 'between': return value >= numValue && value <= numValue2;
|
|
309
|
+
default: return false;
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
static ɵfac = function AggregatePanelComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || AggregatePanelComponent)(); };
|
|
313
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: AggregatePanelComponent, selectors: [["mj-aggregate-panel"]], inputs: { Aggregates: "Aggregates", Values: "Values", Position: "Position", Width: "Width", Layout: "Layout", GridColumns: "GridColumns", Title: "Title", Collapsible: "Collapsible", StartCollapsed: "StartCollapsed", Loading: "Loading" }, outputs: { CollapsedChange: "CollapsedChange", AggregateClick: "AggregateClick" }, decls: 8, vars: 11, consts: [[1, "aggregate-panel", 3, "ngStyle"], [1, "panel-header", 3, "click"], [1, "panel-title"], [1, "panel-header-right"], ["class", "loading-indicator", 4, "ngIf"], ["class", "collapse-toggle", "type", "button", 4, "ngIf"], ["class", "panel-content", 4, "ngIf"], [1, "loading-indicator"], [1, "fa-solid", "fa-spinner", "fa-spin"], ["type", "button", 1, "collapse-toggle"], [1, "fa-solid"], [1, "panel-content"], ["class", "empty-state", 4, "ngIf"], [1, "cards-container", 3, "ngStyle"], ["class", "aggregate-card", 3, "class", "title", "click", 4, "ngFor", "ngForOf"], [1, "empty-state"], [1, "fa-solid", "fa-chart-simple"], [1, "aggregate-card", 3, "click", "title"], ["class", "card-icon", 4, "ngIf"], [1, "card-content"], [1, "card-value"], [1, "card-label"], [1, "card-icon"]], template: function AggregatePanelComponent_Template(rf, ctx) { if (rf & 1) {
|
|
314
|
+
i0.ɵɵelementStart(0, "div", 0)(1, "div", 1);
|
|
315
|
+
i0.ɵɵlistener("click", function AggregatePanelComponent_Template_div_click_1_listener() { return ctx.ToggleCollapse(); });
|
|
316
|
+
i0.ɵɵelementStart(2, "span", 2);
|
|
317
|
+
i0.ɵɵtext(3);
|
|
318
|
+
i0.ɵɵelementEnd();
|
|
319
|
+
i0.ɵɵelementStart(4, "div", 3);
|
|
320
|
+
i0.ɵɵtemplate(5, AggregatePanelComponent_span_5_Template, 2, 0, "span", 4)(6, AggregatePanelComponent_button_6_Template, 2, 4, "button", 5);
|
|
321
|
+
i0.ɵɵelementEnd()();
|
|
322
|
+
i0.ɵɵtemplate(7, AggregatePanelComponent_div_7_Template, 4, 12, "div", 6);
|
|
323
|
+
i0.ɵɵelementEnd();
|
|
324
|
+
} if (rf & 2) {
|
|
325
|
+
i0.ɵɵclassProp("position-right", ctx.Position === "right")("position-bottom", ctx.Position === "bottom")("collapsed", ctx.IsCollapsed);
|
|
326
|
+
i0.ɵɵproperty("ngStyle", ctx.PanelStyle);
|
|
327
|
+
i0.ɵɵadvance(3);
|
|
328
|
+
i0.ɵɵtextInterpolate(ctx.Title);
|
|
329
|
+
i0.ɵɵadvance(2);
|
|
330
|
+
i0.ɵɵproperty("ngIf", ctx.Loading);
|
|
331
|
+
i0.ɵɵadvance();
|
|
332
|
+
i0.ɵɵproperty("ngIf", ctx.Collapsible);
|
|
333
|
+
i0.ɵɵadvance();
|
|
334
|
+
i0.ɵɵproperty("ngIf", !ctx.IsCollapsed);
|
|
335
|
+
} }, dependencies: [i1.NgForOf, i1.NgIf, i1.NgStyle], styles: ["\n\n\n.aggregate-panel[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n background: var(--mj-panel-bg, #ffffff);\n border: 1px solid var(--mj-border-color, #e0e0e0);\n border-radius: 8px;\n overflow: hidden;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);\n}\n\n\n\n.position-right[_ngcontent-%COMP%] {\n height: 100%;\n border-left-width: 1px;\n border-radius: 0 8px 8px 0;\n}\n\n.position-bottom[_ngcontent-%COMP%] {\n width: 100%;\n border-top-width: 1px;\n border-radius: 0 0 8px 8px;\n}\n\n\n\n.collapsed[_ngcontent-%COMP%] .panel-content[_ngcontent-%COMP%] {\n display: none;\n}\n\n.collapsed.position-right[_ngcontent-%COMP%] {\n width: auto !important;\n min-width: auto !important;\n}\n\n\n\n.panel-header[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 12px 16px;\n background: var(--mj-panel-header-bg, #f8f9fa);\n border-bottom: 1px solid var(--mj-border-color, #e0e0e0);\n cursor: pointer;\n user-select: none;\n}\n\n.panel-header[_ngcontent-%COMP%]:hover {\n background: var(--mj-panel-header-hover-bg, #f0f1f2);\n}\n\n.panel-title[_ngcontent-%COMP%] {\n font-weight: 600;\n font-size: 14px;\n color: var(--mj-text-primary, #333333);\n}\n\n.panel-header-right[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.loading-indicator[_ngcontent-%COMP%] {\n color: var(--mj-primary-color, #007bff);\n font-size: 14px;\n}\n\n.collapse-toggle[_ngcontent-%COMP%] {\n background: none;\n border: none;\n padding: 4px 8px;\n cursor: pointer;\n color: var(--mj-text-secondary, #666666);\n font-size: 12px;\n border-radius: 4px;\n transition: background-color 0.2s, color 0.2s;\n}\n\n.collapse-toggle[_ngcontent-%COMP%]:hover {\n background: var(--mj-button-hover-bg, rgba(0, 0, 0, 0.05));\n color: var(--mj-text-primary, #333333);\n}\n\n\n\n.panel-content[_ngcontent-%COMP%] {\n padding: 16px;\n overflow-y: auto;\n flex: 1;\n}\n\n\n\n.empty-state[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 24px;\n color: var(--mj-text-muted, #999999);\n text-align: center;\n}\n\n.empty-state[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 32px;\n margin-bottom: 12px;\n opacity: 0.5;\n}\n\n.empty-state[_ngcontent-%COMP%] p[_ngcontent-%COMP%] {\n margin: 0;\n font-size: 13px;\n}\n\n\n\n.cards-container[_ngcontent-%COMP%] {\n display: flex;\n gap: 12px;\n}\n\n.layout-horizontal[_ngcontent-%COMP%] {\n flex-direction: row;\n flex-wrap: wrap;\n}\n\n.layout-vertical[_ngcontent-%COMP%] {\n flex-direction: column;\n}\n\n.layout-grid[_ngcontent-%COMP%] {\n display: grid;\n gap: 12px;\n}\n\n\n\n.aggregate-card[_ngcontent-%COMP%] {\n display: flex;\n align-items: flex-start;\n gap: 12px;\n padding: 12px;\n background: var(--mj-card-bg, #ffffff);\n border: 1px solid var(--mj-border-color, #e0e0e0);\n border-radius: 6px;\n cursor: pointer;\n transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;\n}\n\n.aggregate-card[_ngcontent-%COMP%]:hover {\n border-color: var(--mj-primary-color, #007bff);\n box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15);\n transform: translateY(-1px);\n}\n\n\n\n.card-icon[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 40px;\n height: 40px;\n background: var(--mj-icon-bg, #f0f4f8);\n border-radius: 8px;\n color: var(--mj-primary-color, #007bff);\n font-size: 18px;\n flex-shrink: 0;\n}\n\n\n\n.card-content[_ngcontent-%COMP%] {\n flex: 1;\n min-width: 0;\n}\n\n.card-value[_ngcontent-%COMP%] {\n font-size: 20px;\n font-weight: 700;\n color: var(--mj-text-primary, #333333);\n line-height: 1.2;\n margin-bottom: 4px;\n word-break: break-word;\n}\n\n.card-value.loading[_ngcontent-%COMP%] {\n color: var(--mj-text-muted, #999999);\n}\n\n.card-label[_ngcontent-%COMP%] {\n font-size: 12px;\n color: var(--mj-text-secondary, #666666);\n line-height: 1.3;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n\n\n.style-success[_ngcontent-%COMP%] {\n border-left: 4px solid var(--mj-success-color, #28a745);\n}\n\n.style-success[_ngcontent-%COMP%] .card-value[_ngcontent-%COMP%] {\n color: var(--mj-success-color, #28a745);\n}\n\n.style-success[_ngcontent-%COMP%] .card-icon[_ngcontent-%COMP%] {\n background: var(--mj-success-bg, #d4edda);\n color: var(--mj-success-color, #28a745);\n}\n\n.style-warning[_ngcontent-%COMP%] {\n border-left: 4px solid var(--mj-warning-color, #ffc107);\n}\n\n.style-warning[_ngcontent-%COMP%] .card-value[_ngcontent-%COMP%] {\n color: var(--mj-warning-dark, #856404);\n}\n\n.style-warning[_ngcontent-%COMP%] .card-icon[_ngcontent-%COMP%] {\n background: var(--mj-warning-bg, #fff3cd);\n color: var(--mj-warning-dark, #856404);\n}\n\n.style-danger[_ngcontent-%COMP%] {\n border-left: 4px solid var(--mj-danger-color, #dc3545);\n}\n\n.style-danger[_ngcontent-%COMP%] .card-value[_ngcontent-%COMP%] {\n color: var(--mj-danger-color, #dc3545);\n}\n\n.style-danger[_ngcontent-%COMP%] .card-icon[_ngcontent-%COMP%] {\n background: var(--mj-danger-bg, #f8d7da);\n color: var(--mj-danger-color, #dc3545);\n}\n\n.style-info[_ngcontent-%COMP%] {\n border-left: 4px solid var(--mj-info-color, #17a2b8);\n}\n\n.style-info[_ngcontent-%COMP%] .card-value[_ngcontent-%COMP%] {\n color: var(--mj-info-color, #17a2b8);\n}\n\n.style-info[_ngcontent-%COMP%] .card-icon[_ngcontent-%COMP%] {\n background: var(--mj-info-bg, #d1ecf1);\n color: var(--mj-info-color, #17a2b8);\n}\n\n.style-muted[_ngcontent-%COMP%] {\n border-left: 4px solid var(--mj-muted-color, #6c757d);\n}\n\n.style-muted[_ngcontent-%COMP%] .card-value[_ngcontent-%COMP%] {\n color: var(--mj-muted-color, #6c757d);\n}\n\n.style-muted[_ngcontent-%COMP%] .card-icon[_ngcontent-%COMP%] {\n background: var(--mj-muted-bg, #e9ecef);\n color: var(--mj-muted-color, #6c757d);\n}\n\n\n\n.position-bottom[_ngcontent-%COMP%] .cards-container.layout-vertical[_ngcontent-%COMP%] {\n flex-direction: row;\n flex-wrap: wrap;\n}\n\n.position-bottom[_ngcontent-%COMP%] .cards-container.layout-vertical[_ngcontent-%COMP%] .aggregate-card[_ngcontent-%COMP%] {\n flex: 1 1 200px;\n max-width: 300px;\n}\n\n\n\n@media (prefers-color-scheme: dark) {\n .aggregate-panel[_ngcontent-%COMP%] {\n --mj-panel-bg: #1e1e1e;\n --mj-panel-header-bg: #252525;\n --mj-panel-header-hover-bg: #2a2a2a;\n --mj-border-color: #3c3c3c;\n --mj-text-primary: #ffffff;\n --mj-text-secondary: #b0b0b0;\n --mj-text-muted: #808080;\n --mj-card-bg: #252525;\n --mj-icon-bg: #333333;\n }\n}"] });
|
|
336
|
+
}
|
|
337
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AggregatePanelComponent, [{
|
|
338
|
+
type: Component,
|
|
339
|
+
args: [{ selector: 'mj-aggregate-panel', template: "<div class=\"aggregate-panel\"\n [class.position-right]=\"Position === 'right'\"\n [class.position-bottom]=\"Position === 'bottom'\"\n [class.collapsed]=\"IsCollapsed\"\n [ngStyle]=\"PanelStyle\">\n\n <!-- Panel Header -->\n <div class=\"panel-header\" (click)=\"ToggleCollapse()\">\n <span class=\"panel-title\">{{ Title }}</span>\n\n <div class=\"panel-header-right\">\n <!-- Loading indicator -->\n <span class=\"loading-indicator\" *ngIf=\"Loading\">\n <i class=\"fa-solid fa-spinner fa-spin\"></i>\n </span>\n\n <!-- Collapse toggle -->\n <button class=\"collapse-toggle\" *ngIf=\"Collapsible\" type=\"button\">\n <i class=\"fa-solid\" [class.fa-chevron-up]=\"!IsCollapsed\" [class.fa-chevron-down]=\"IsCollapsed\"></i>\n </button>\n </div>\n </div>\n\n <!-- Panel Content -->\n <div class=\"panel-content\" *ngIf=\"!IsCollapsed\">\n <!-- Empty state -->\n <div class=\"empty-state\" *ngIf=\"CardAggregates.length === 0\">\n <i class=\"fa-solid fa-chart-simple\"></i>\n <p>No summaries configured</p>\n </div>\n\n <!-- Cards Container -->\n <div class=\"cards-container\"\n [class.layout-horizontal]=\"Layout === 'horizontal'\"\n [class.layout-vertical]=\"Layout === 'vertical'\"\n [class.layout-grid]=\"Layout === 'grid'\"\n [ngStyle]=\"Layout === 'grid' ? {'grid-template-columns': GridTemplateColumns} : {}\">\n\n <!-- Individual Aggregate Cards -->\n <div class=\"aggregate-card\"\n *ngFor=\"let agg of CardAggregates\"\n [class]=\"GetStyleClass(agg)\"\n (click)=\"OnAggregateClick(agg)\"\n [title]=\"agg.description || agg.label\">\n\n <!-- Icon -->\n <div class=\"card-icon\" *ngIf=\"agg.icon\">\n <i [class]=\"agg.icon\"></i>\n </div>\n\n <!-- Content -->\n <div class=\"card-content\">\n <div class=\"card-value\" [class.loading]=\"Loading\">\n {{ Loading ? '...' : FormatValue(agg) }}\n </div>\n <div class=\"card-label\">{{ agg.label }}</div>\n </div>\n </div>\n\n </div>\n </div>\n</div>\n", styles: ["/* Aggregate Panel Component Styles */\n\n.aggregate-panel {\n display: flex;\n flex-direction: column;\n background: var(--mj-panel-bg, #ffffff);\n border: 1px solid var(--mj-border-color, #e0e0e0);\n border-radius: 8px;\n overflow: hidden;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);\n}\n\n/* Position variants */\n.position-right {\n height: 100%;\n border-left-width: 1px;\n border-radius: 0 8px 8px 0;\n}\n\n.position-bottom {\n width: 100%;\n border-top-width: 1px;\n border-radius: 0 0 8px 8px;\n}\n\n/* Collapsed state */\n.collapsed .panel-content {\n display: none;\n}\n\n.collapsed.position-right {\n width: auto !important;\n min-width: auto !important;\n}\n\n/* Panel Header */\n.panel-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 12px 16px;\n background: var(--mj-panel-header-bg, #f8f9fa);\n border-bottom: 1px solid var(--mj-border-color, #e0e0e0);\n cursor: pointer;\n user-select: none;\n}\n\n.panel-header:hover {\n background: var(--mj-panel-header-hover-bg, #f0f1f2);\n}\n\n.panel-title {\n font-weight: 600;\n font-size: 14px;\n color: var(--mj-text-primary, #333333);\n}\n\n.panel-header-right {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.loading-indicator {\n color: var(--mj-primary-color, #007bff);\n font-size: 14px;\n}\n\n.collapse-toggle {\n background: none;\n border: none;\n padding: 4px 8px;\n cursor: pointer;\n color: var(--mj-text-secondary, #666666);\n font-size: 12px;\n border-radius: 4px;\n transition: background-color 0.2s, color 0.2s;\n}\n\n.collapse-toggle:hover {\n background: var(--mj-button-hover-bg, rgba(0, 0, 0, 0.05));\n color: var(--mj-text-primary, #333333);\n}\n\n/* Panel Content */\n.panel-content {\n padding: 16px;\n overflow-y: auto;\n flex: 1;\n}\n\n/* Empty State */\n.empty-state {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 24px;\n color: var(--mj-text-muted, #999999);\n text-align: center;\n}\n\n.empty-state i {\n font-size: 32px;\n margin-bottom: 12px;\n opacity: 0.5;\n}\n\n.empty-state p {\n margin: 0;\n font-size: 13px;\n}\n\n/* Cards Container */\n.cards-container {\n display: flex;\n gap: 12px;\n}\n\n.layout-horizontal {\n flex-direction: row;\n flex-wrap: wrap;\n}\n\n.layout-vertical {\n flex-direction: column;\n}\n\n.layout-grid {\n display: grid;\n gap: 12px;\n}\n\n/* Aggregate Card */\n.aggregate-card {\n display: flex;\n align-items: flex-start;\n gap: 12px;\n padding: 12px;\n background: var(--mj-card-bg, #ffffff);\n border: 1px solid var(--mj-border-color, #e0e0e0);\n border-radius: 6px;\n cursor: pointer;\n transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;\n}\n\n.aggregate-card:hover {\n border-color: var(--mj-primary-color, #007bff);\n box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15);\n transform: translateY(-1px);\n}\n\n/* Card Icon */\n.card-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 40px;\n height: 40px;\n background: var(--mj-icon-bg, #f0f4f8);\n border-radius: 8px;\n color: var(--mj-primary-color, #007bff);\n font-size: 18px;\n flex-shrink: 0;\n}\n\n/* Card Content */\n.card-content {\n flex: 1;\n min-width: 0;\n}\n\n.card-value {\n font-size: 20px;\n font-weight: 700;\n color: var(--mj-text-primary, #333333);\n line-height: 1.2;\n margin-bottom: 4px;\n word-break: break-word;\n}\n\n.card-value.loading {\n color: var(--mj-text-muted, #999999);\n}\n\n.card-label {\n font-size: 12px;\n color: var(--mj-text-secondary, #666666);\n line-height: 1.3;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n/* Conditional Style Classes */\n.style-success {\n border-left: 4px solid var(--mj-success-color, #28a745);\n}\n\n.style-success .card-value {\n color: var(--mj-success-color, #28a745);\n}\n\n.style-success .card-icon {\n background: var(--mj-success-bg, #d4edda);\n color: var(--mj-success-color, #28a745);\n}\n\n.style-warning {\n border-left: 4px solid var(--mj-warning-color, #ffc107);\n}\n\n.style-warning .card-value {\n color: var(--mj-warning-dark, #856404);\n}\n\n.style-warning .card-icon {\n background: var(--mj-warning-bg, #fff3cd);\n color: var(--mj-warning-dark, #856404);\n}\n\n.style-danger {\n border-left: 4px solid var(--mj-danger-color, #dc3545);\n}\n\n.style-danger .card-value {\n color: var(--mj-danger-color, #dc3545);\n}\n\n.style-danger .card-icon {\n background: var(--mj-danger-bg, #f8d7da);\n color: var(--mj-danger-color, #dc3545);\n}\n\n.style-info {\n border-left: 4px solid var(--mj-info-color, #17a2b8);\n}\n\n.style-info .card-value {\n color: var(--mj-info-color, #17a2b8);\n}\n\n.style-info .card-icon {\n background: var(--mj-info-bg, #d1ecf1);\n color: var(--mj-info-color, #17a2b8);\n}\n\n.style-muted {\n border-left: 4px solid var(--mj-muted-color, #6c757d);\n}\n\n.style-muted .card-value {\n color: var(--mj-muted-color, #6c757d);\n}\n\n.style-muted .card-icon {\n background: var(--mj-muted-bg, #e9ecef);\n color: var(--mj-muted-color, #6c757d);\n}\n\n/* Responsive adjustments for bottom position */\n.position-bottom .cards-container.layout-vertical {\n flex-direction: row;\n flex-wrap: wrap;\n}\n\n.position-bottom .cards-container.layout-vertical .aggregate-card {\n flex: 1 1 200px;\n max-width: 300px;\n}\n\n/* Dark mode support */\n@media (prefers-color-scheme: dark) {\n .aggregate-panel {\n --mj-panel-bg: #1e1e1e;\n --mj-panel-header-bg: #252525;\n --mj-panel-header-hover-bg: #2a2a2a;\n --mj-border-color: #3c3c3c;\n --mj-text-primary: #ffffff;\n --mj-text-secondary: #b0b0b0;\n --mj-text-muted: #808080;\n --mj-card-bg: #252525;\n --mj-icon-bg: #333333;\n }\n}\n"] }]
|
|
340
|
+
}], null, { Aggregates: [{
|
|
341
|
+
type: Input
|
|
342
|
+
}], Values: [{
|
|
343
|
+
type: Input
|
|
344
|
+
}], Position: [{
|
|
345
|
+
type: Input
|
|
346
|
+
}], Width: [{
|
|
347
|
+
type: Input
|
|
348
|
+
}], Layout: [{
|
|
349
|
+
type: Input
|
|
350
|
+
}], GridColumns: [{
|
|
351
|
+
type: Input
|
|
352
|
+
}], Title: [{
|
|
353
|
+
type: Input
|
|
354
|
+
}], Collapsible: [{
|
|
355
|
+
type: Input
|
|
356
|
+
}], StartCollapsed: [{
|
|
357
|
+
type: Input
|
|
358
|
+
}], Loading: [{
|
|
359
|
+
type: Input
|
|
360
|
+
}], CollapsedChange: [{
|
|
361
|
+
type: Output
|
|
362
|
+
}], AggregateClick: [{
|
|
363
|
+
type: Output
|
|
364
|
+
}] }); })();
|
|
365
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(AggregatePanelComponent, { className: "AggregatePanelComponent", filePath: "src/lib/aggregate-panel/aggregate-panel.component.ts", lineNumber: 31 }); })();
|
|
366
|
+
//# sourceMappingURL=aggregate-panel.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aggregate-panel.component.js","sourceRoot":"","sources":["../../../src/lib/aggregate-panel/aggregate-panel.component.ts","../../../src/lib/aggregate-panel/aggregate-panel.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,KAAK,EACL,MAAM,EACN,YAAY,EAEb,MAAM,eAAe,CAAC;;;;;;ICMjB,+BAAgD;IAC9C,uBAA2C;IAC7C,iBAAO;;;IAGP,iCAAkE;IAChE,wBAAmG;IACrG,iBAAS;;;IADa,cAAoC;IAAC,AAArC,oDAAoC,uCAAsC;;;IAQlG,+BAA6D;IAC3D,wBAAwC;IACxC,yBAAG;IAAA,uCAAuB;IAC5B,AAD4B,iBAAI,EAC1B;;;IAiBF,+BAAwC;IACtC,oBAA0B;IAC5B,iBAAM;;;IADD,cAAkB;IAAlB,0BAAkB;;;;IARzB,+BAI4C;IADvC,gNAAS,+BAAqB,KAAC;IAIlC,qFAAwC;IAMtC,AADF,+BAA0B,cAC0B;IAChD,YACF;IAAA,iBAAM;IACN,+BAAwB;IAAA,YAAe;IAE3C,AADE,AADyC,iBAAM,EACzC,EACF;;;;IAhBD,2CAA4B;IAE5B,0DAAsC;IAGjB,cAAc;IAAd,kCAAc;IAMZ,eAAyB;IAAzB,yCAAyB;IAC/C,cACF;IADE,oFACF;IACwB,eAAe;IAAf,kCAAe;;;IA/B/C,+BAAgD;IAE9C,+EAA6D;IAM7D,+BAIyF;IAGvF,+EAI4C;IAiBhD,AADE,iBAAM,EACF;;;IAlCsB,cAAiC;IAAjC,yDAAiC;IAOtD,cAAmD;IAEnD,AADA,AADA,mEAAmD,iDACJ,yCACR;IACvC,yIAAmF;IAIjE,cAAiB;IAAjB,+CAAiB;;AD1B5C;;;;;;;;;;GAUG;AAMH,MAAM,OAAO,uBAAuB;IAClC;;OAEG;IACM,UAAU,GAAwB,EAAE,CAAC;IAE9C;;OAEG;IACM,MAAM,GAAgC,IAAI,GAAG,EAAE,CAAC;IAEzD;;OAEG;IACM,QAAQ,GAAuB,OAAO,CAAC;IAEhD;;OAEG;IACM,KAAK,GAA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