@masterteam/dashboard-builder 0.0.91 → 0.0.92
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +79 -0
- package/assets/i18n/ar.json +4 -0
- package/assets/i18n/en.json +4 -0
- package/fesm2022/{masterteam-dashboard-builder-dashboard-dialog.component-DuUh4kUk.mjs → masterteam-dashboard-builder-dashboard-dialog.component-OEtvg4Ep.mjs} +2 -2
- package/fesm2022/{masterteam-dashboard-builder-dashboard-dialog.component-DuUh4kUk.mjs.map → masterteam-dashboard-builder-dashboard-dialog.component-OEtvg4Ep.mjs.map} +1 -1
- package/fesm2022/{masterteam-dashboard-builder-masterteam-dashboard-builder-DIA-AjLs.mjs → masterteam-dashboard-builder-masterteam-dashboard-builder-CUB7GE24.mjs} +417 -114
- package/fesm2022/masterteam-dashboard-builder-masterteam-dashboard-builder-CUB7GE24.mjs.map +1 -0
- package/fesm2022/masterteam-dashboard-builder-riyadh.geo-CE3Amxoa.mjs +3902 -0
- package/fesm2022/masterteam-dashboard-builder-riyadh.geo-CE3Amxoa.mjs.map +1 -0
- package/fesm2022/masterteam-dashboard-builder-saudi.geo-C_9VzPCF.mjs +2530 -0
- package/fesm2022/masterteam-dashboard-builder-saudi.geo-C_9VzPCF.mjs.map +1 -0
- package/fesm2022/masterteam-dashboard-builder.mjs +1 -1
- package/package.json +4 -4
- package/types/masterteam-dashboard-builder.d.ts +164 -15
- package/fesm2022/masterteam-dashboard-builder-masterteam-dashboard-builder-DIA-AjLs.mjs.map +0 -1
|
@@ -1628,10 +1628,17 @@ class ManagePages {
|
|
|
1628
1628
|
ngOnInit() {
|
|
1629
1629
|
const editData = this.dataEdit();
|
|
1630
1630
|
if (editData) {
|
|
1631
|
-
// Map existing report data to form structure
|
|
1631
|
+
// Map existing report data to form structure.
|
|
1632
|
+
//
|
|
1633
|
+
// `name` is COPIED, not referenced: the template binds
|
|
1634
|
+
// `[(ngModel)]="report().name.ar"`, which writes straight through to the
|
|
1635
|
+
// object it was handed. A host that passes a page built from its own
|
|
1636
|
+
// state would otherwise have that state mutated from in here — and if the
|
|
1637
|
+
// state is frozen (NGXS `developmentMode`, which deep-freezes), the write
|
|
1638
|
+
// is lost outright and the drawer silently keeps the old title.
|
|
1632
1639
|
const formData = {
|
|
1633
1640
|
id: editData.id,
|
|
1634
|
-
name: editData.name
|
|
1641
|
+
name: { ...(editData.name ?? { en: '', ar: '' }) },
|
|
1635
1642
|
type: editData.type || 'Dashboard',
|
|
1636
1643
|
showInMenu: editData.showInMenu ?? false,
|
|
1637
1644
|
isActive: editData.isActive ?? true,
|
|
@@ -8445,9 +8452,14 @@ const MAP_SECTION = {
|
|
|
8445
8452
|
icon: 'map.globe-01',
|
|
8446
8453
|
domain: 'map',
|
|
8447
8454
|
scope: 'simple',
|
|
8455
|
+
// The map draws bundled boundary GeoJSON through ECharts rather than raster
|
|
8456
|
+
// tiles, so the only thing there is to configure is which boundaries. Tile
|
|
8457
|
+
// layer / clustering / zoom-bound controls used to live here; they described
|
|
8458
|
+
// a tile renderer that does not exist and were removed rather than left
|
|
8459
|
+
// pointing at nothing. Their persisted values are simply ignored.
|
|
8448
8460
|
fields: [
|
|
8449
8461
|
{
|
|
8450
|
-
// The map
|
|
8462
|
+
// The map renderer reads the region from top-level clientConfig.map.
|
|
8451
8463
|
key: 'mapRegion',
|
|
8452
8464
|
label: 'Map region',
|
|
8453
8465
|
type: 'select',
|
|
@@ -8455,50 +8467,8 @@ const MAP_SECTION = {
|
|
|
8455
8467
|
options: [
|
|
8456
8468
|
{ label: 'Saudi Arabia', value: 'SaudiArabia' },
|
|
8457
8469
|
{ label: 'Riyadh', value: 'Riyadh' },
|
|
8458
|
-
{ label: 'World', value: 'world' },
|
|
8459
8470
|
],
|
|
8460
|
-
|
|
8461
|
-
{
|
|
8462
|
-
key: 'tileLayer',
|
|
8463
|
-
label: 'Tile layer',
|
|
8464
|
-
type: 'select',
|
|
8465
|
-
path: 'clientConfig.configAsType.mapChart.tileLayer',
|
|
8466
|
-
options: [
|
|
8467
|
-
{ label: 'OpenStreetMap', value: 'osm' },
|
|
8468
|
-
{ label: 'Carto Light', value: 'carto-light' },
|
|
8469
|
-
{ label: 'Carto Dark', value: 'carto-dark' },
|
|
8470
|
-
{ label: 'Satellite', value: 'satellite' },
|
|
8471
|
-
],
|
|
8472
|
-
default: 'osm',
|
|
8473
|
-
},
|
|
8474
|
-
{
|
|
8475
|
-
key: 'showClusters',
|
|
8476
|
-
label: 'Cluster markers',
|
|
8477
|
-
type: 'boolean',
|
|
8478
|
-
path: 'clientConfig.configAsType.mapChart.showClusters',
|
|
8479
|
-
default: true,
|
|
8480
|
-
},
|
|
8481
|
-
{
|
|
8482
|
-
key: 'minZoom',
|
|
8483
|
-
label: 'Minimum zoom',
|
|
8484
|
-
type: 'number',
|
|
8485
|
-
min: 0,
|
|
8486
|
-
max: 20,
|
|
8487
|
-
step: 1,
|
|
8488
|
-
path: 'clientConfig.configAsType.mapChart.minZoom',
|
|
8489
|
-
default: 2,
|
|
8490
|
-
scope: 'advanced',
|
|
8491
|
-
},
|
|
8492
|
-
{
|
|
8493
|
-
key: 'maxZoom',
|
|
8494
|
-
label: 'Maximum zoom',
|
|
8495
|
-
type: 'number',
|
|
8496
|
-
min: 0,
|
|
8497
|
-
max: 20,
|
|
8498
|
-
step: 1,
|
|
8499
|
-
path: 'clientConfig.configAsType.mapChart.maxZoom',
|
|
8500
|
-
default: 18,
|
|
8501
|
-
scope: 'advanced',
|
|
8471
|
+
default: 'SaudiArabia',
|
|
8502
8472
|
},
|
|
8503
8473
|
],
|
|
8504
8474
|
};
|
|
@@ -10964,27 +10934,20 @@ const REPEATER_BINDINGS = [
|
|
|
10964
10934
|
simpleOrAdvanced: 'simple',
|
|
10965
10935
|
},
|
|
10966
10936
|
];
|
|
10937
|
+
// The map renders bundled boundary GeoJSON through ECharts, not raster tiles,
|
|
10938
|
+
// so the region is the only control the renderer actually reads. The former
|
|
10939
|
+
// tile-layer and marker-clustering bindings described a tile renderer that was
|
|
10940
|
+
// never built; they were removed with the matching MAP_SECTION fields.
|
|
10967
10941
|
const MAP_BINDINGS = [
|
|
10968
10942
|
{
|
|
10969
10943
|
chartId: 'chart-map-chart',
|
|
10970
|
-
controlId: '
|
|
10971
|
-
domain: 'map',
|
|
10972
|
-
label: 'Tile layer',
|
|
10973
|
-
uiPath: 'map.tileLayer',
|
|
10974
|
-
persistedPath: 'clientConfig.configAsType.mapChart.tileLayer',
|
|
10975
|
-
runtimePath: 'clientConfig.configAsType.mapChart.tileLayer',
|
|
10976
|
-
rendererReadPaths: ['clientConfig.configAsType.mapChart.tileLayer'],
|
|
10977
|
-
simpleOrAdvanced: 'simple',
|
|
10978
|
-
},
|
|
10979
|
-
{
|
|
10980
|
-
chartId: 'chart-map-chart',
|
|
10981
|
-
controlId: 'showClusters',
|
|
10944
|
+
controlId: 'mapRegion',
|
|
10982
10945
|
domain: 'map',
|
|
10983
|
-
label: '
|
|
10984
|
-
uiPath: 'map.
|
|
10985
|
-
persistedPath: 'clientConfig.
|
|
10986
|
-
runtimePath: 'clientConfig.
|
|
10987
|
-
rendererReadPaths: ['clientConfig.
|
|
10946
|
+
label: 'Map region',
|
|
10947
|
+
uiPath: 'map.mapRegion',
|
|
10948
|
+
persistedPath: 'clientConfig.map',
|
|
10949
|
+
runtimePath: 'clientConfig.map',
|
|
10950
|
+
rendererReadPaths: ['clientConfig.map'],
|
|
10988
10951
|
simpleOrAdvanced: 'simple',
|
|
10989
10952
|
},
|
|
10990
10953
|
];
|
|
@@ -20811,16 +20774,14 @@ class MapChartHandler {
|
|
|
20811
20774
|
points: points,
|
|
20812
20775
|
});
|
|
20813
20776
|
});
|
|
20814
|
-
// 5)
|
|
20815
|
-
//
|
|
20816
|
-
//
|
|
20817
|
-
//
|
|
20818
|
-
|
|
20819
|
-
|
|
20820
|
-
const mapConfig = this.buildMapConfig(config);
|
|
20821
|
-
if (Object.keys(mapConfig).length > 0) {
|
|
20777
|
+
// 5) Attach the persisted map region as a non-enumerable `mapConfig`
|
|
20778
|
+
// envelope. The array shape is preserved verbatim, so consumers that
|
|
20779
|
+
// iterate it are unaffected; `mt-map-view` reads the region from the
|
|
20780
|
+
// widget's own clientConfig and only falls back to this.
|
|
20781
|
+
const region = config?.clientConfig?.['map'];
|
|
20782
|
+
if (region !== undefined && region !== null && region !== '') {
|
|
20822
20783
|
Object.defineProperty(result, 'mapConfig', {
|
|
20823
|
-
value:
|
|
20784
|
+
value: { mapRegion: region },
|
|
20824
20785
|
enumerable: false,
|
|
20825
20786
|
configurable: true,
|
|
20826
20787
|
writable: true,
|
|
@@ -20828,43 +20789,6 @@ class MapChartHandler {
|
|
|
20828
20789
|
}
|
|
20829
20790
|
return result;
|
|
20830
20791
|
}
|
|
20831
|
-
/**
|
|
20832
|
-
* Reads the Style Studio map controls from the persisted clientConfig exactly
|
|
20833
|
-
* as the schema writes them and returns only the keys that are present.
|
|
20834
|
-
*
|
|
20835
|
-
* Schema write paths (control-schema.registry.ts MAP_SECTION):
|
|
20836
|
-
* - mapRegion -> clientConfig.map
|
|
20837
|
-
* - tileLayer -> clientConfig.configAsType.mapChart.tileLayer
|
|
20838
|
-
* - showClusters -> clientConfig.configAsType.mapChart.showClusters
|
|
20839
|
-
* - minZoom -> clientConfig.configAsType.mapChart.minZoom
|
|
20840
|
-
* - maxZoom -> clientConfig.configAsType.mapChart.maxZoom
|
|
20841
|
-
*/
|
|
20842
|
-
buildMapConfig(config) {
|
|
20843
|
-
const clientConfig = config?.clientConfig;
|
|
20844
|
-
const mapChart = clientConfig?.['configAsType']?.['mapChart'];
|
|
20845
|
-
const mapConfig = {};
|
|
20846
|
-
const region = clientConfig?.['map'];
|
|
20847
|
-
if (region !== undefined && region !== null && region !== '') {
|
|
20848
|
-
mapConfig['mapRegion'] = region;
|
|
20849
|
-
}
|
|
20850
|
-
const tileLayer = mapChart?.['tileLayer'];
|
|
20851
|
-
if (tileLayer !== undefined && tileLayer !== null && tileLayer !== '') {
|
|
20852
|
-
mapConfig['tileLayer'] = tileLayer;
|
|
20853
|
-
}
|
|
20854
|
-
const showClusters = mapChart?.['showClusters'];
|
|
20855
|
-
if (typeof showClusters === 'boolean') {
|
|
20856
|
-
mapConfig['showClusters'] = showClusters;
|
|
20857
|
-
}
|
|
20858
|
-
const minZoom = Number(mapChart?.['minZoom']);
|
|
20859
|
-
if (mapChart?.['minZoom'] !== undefined && Number.isFinite(minZoom)) {
|
|
20860
|
-
mapConfig['minZoom'] = minZoom;
|
|
20861
|
-
}
|
|
20862
|
-
const maxZoom = Number(mapChart?.['maxZoom']);
|
|
20863
|
-
if (mapChart?.['maxZoom'] !== undefined && Number.isFinite(maxZoom)) {
|
|
20864
|
-
mapConfig['maxZoom'] = maxZoom;
|
|
20865
|
-
}
|
|
20866
|
-
return mapConfig;
|
|
20867
|
-
}
|
|
20868
20792
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: MapChartHandler, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
20869
20793
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: MapChartHandler, providedIn: 'root' });
|
|
20870
20794
|
}
|
|
@@ -23932,7 +23856,7 @@ class ActionService {
|
|
|
23932
23856
|
// "Dialog header"), not from the chart that opened it.
|
|
23933
23857
|
const header = resolveDashboardDialogHeader(dialogConfig);
|
|
23934
23858
|
// Dynamically import DashboardDialogComponent to avoid circular dependency
|
|
23935
|
-
import('./masterteam-dashboard-builder-dashboard-dialog.component-
|
|
23859
|
+
import('./masterteam-dashboard-builder-dashboard-dialog.component-OEtvg4Ep.mjs').then(({ DashboardDialogComponent }) => {
|
|
23936
23860
|
// Open dialog using ModalService
|
|
23937
23861
|
this.modalService.openModal(DashboardDialogComponent, 'dialog', {
|
|
23938
23862
|
header: header.title,
|
|
@@ -27570,6 +27494,334 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
27570
27494
|
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block;width:100%;height:100%;min-height:0;position:relative}.chart-wrapper{width:100%;height:96%;display:flex;justify-content:center;align-items:center;position:relative;min-height:0}.chart-wrapper.in-group-with-header{height:86%}.scroll-wrapper{width:100%;height:96%;overflow-x:auto;overflow-y:hidden;position:relative;min-height:0}.scroll-wrapper.in-group-with-header{height:86%}.chart{width:100%;height:100%;min-height:0}.chart-scroll{width:100%;height:100%;min-height:0;overflow-y:hidden}.custom-legend{position:absolute;bottom:10px;left:0;right:0;z-index:1000;background:transparent;padding:4px 8px;display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:4px;width:100%;max-width:100%}.custom-legend.has-scroll{bottom:25px}.custom-legend.custom-legend--top{top:10px;bottom:auto}.custom-legend.custom-legend--left{top:0;bottom:0;right:auto;width:auto;max-width:45%;flex-direction:column;justify-content:center;align-items:flex-start}.custom-legend.custom-legend--right{top:0;bottom:0;left:auto;width:auto;max-width:45%;flex-direction:column;justify-content:center;align-items:flex-start}.legend-item{display:flex;align-items:center;gap:3px;padding:2px 4px;border-radius:3px;cursor:pointer;transition:all .2s ease;-webkit-user-select:none;user-select:none;font-size:11px;white-space:nowrap;background:transparent;line-height:1.2;flex-direction:row}.legend-item:hover{background-color:#0000000d}.legend-item.disabled{opacity:.5}.legend-item.disabled .legend-text{text-decoration:line-through}.legend-icon{width:10px;height:10px;border-radius:50%;flex-shrink:0}.legend-text{font-family:inherit}\n"] }]
|
|
27571
27495
|
}], ctorParameters: () => [], propDecorators: { dashboardId: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardId", required: false }] }], chartConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "chartConfig", required: false }] }], configurationItem: [{ type: i0.Input, args: [{ isSignal: true, alias: "configurationItem", required: false }] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], inGroup: [{ type: i0.Input, args: [{ isSignal: true, alias: "inGroup", required: false }] }], headerHidden: [{ type: i0.Input, args: [{ isSignal: true, alias: "headerHidden", required: false }] }], chartClick: [{ type: i0.Output, args: ["chartClick"] }] } });
|
|
27572
27496
|
|
|
27497
|
+
/**
|
|
27498
|
+
* Builds the ECharts `geo` + scatter option for the Map Chart widget.
|
|
27499
|
+
*
|
|
27500
|
+
* Kept pure and separate from the component so the grouping, colour assignment
|
|
27501
|
+
* and coordinate filtering can be unit-tested without a DOM or an ECharts
|
|
27502
|
+
* instance. Mirrors the legacy dashboardBuilder `MapChartService` option so the
|
|
27503
|
+
* widget renders the same way it always did.
|
|
27504
|
+
*/
|
|
27505
|
+
/** Marker silhouette, carried over from the legacy service's Figma export. */
|
|
27506
|
+
const MAP_MARKER_PATH = 'path://M6.99998 0.666687C5.24336 0.666599 3.55769 1.35982 2.30935 2.59568C1.06101 3.83154 0.350879 5.51016 0.333313 7.26669C0.333313 11.8334 6.20831 16.9167 6.45831 17.1334C6.60926 17.2625 6.80135 17.3334 6.99998 17.3334C7.19861 17.3334 7.3907 17.2625 7.54165 17.1334C7.83331 16.9167 13.6666 11.8334 13.6666 7.26669C13.6491 5.51016 12.939 3.83154 11.6906 2.59568C10.4423 1.35982 8.7566 0.666599 6.99998 0.666687ZM6.99998 9.83335C6.42312 9.83335 5.85921 9.66229 5.37957 9.34181C4.89992 9.02132 4.52609 8.5658 4.30533 8.03285C4.08458 7.4999 4.02682 6.91345 4.13936 6.34767C4.2519 5.7819 4.52968 5.2622 4.93758 4.85429C5.34549 4.44639 5.86519 4.1686 6.43097 4.05606C6.99674 3.94352 7.58319 4.00128 8.11614 4.22204C8.64909 4.44279 9.10461 4.81663 9.4251 5.29627C9.74559 5.77592 9.91665 6.33983 9.91665 6.91669C9.91665 7.29971 9.8412 7.67898 9.69463 8.03285C9.54805 8.38671 9.33321 8.70825 9.06237 8.97908C8.79154 9.24992 8.47001 9.46476 8.11614 9.61134C7.76227 9.75791 7.383 9.83335 6.99998 9.83335Z';
|
|
27507
|
+
/** Assigned in order to groups that carry no colour of their own. */
|
|
27508
|
+
const MAP_FALLBACK_COLORS = [
|
|
27509
|
+
'#5470c6',
|
|
27510
|
+
'#91cc75',
|
|
27511
|
+
'#fac858',
|
|
27512
|
+
'#ee6666',
|
|
27513
|
+
'#73c0de',
|
|
27514
|
+
'#3ba272',
|
|
27515
|
+
'#fc8452',
|
|
27516
|
+
'#9a60b4',
|
|
27517
|
+
'#ea7ccc',
|
|
27518
|
+
];
|
|
27519
|
+
function isPlottable(point) {
|
|
27520
|
+
const lat = Number(point?.lat);
|
|
27521
|
+
const lon = Number(point?.lon);
|
|
27522
|
+
return (Number.isFinite(lat) &&
|
|
27523
|
+
Number.isFinite(lon) &&
|
|
27524
|
+
lat >= -90 &&
|
|
27525
|
+
lat <= 90 &&
|
|
27526
|
+
lon >= -180 &&
|
|
27527
|
+
lon <= 180);
|
|
27528
|
+
}
|
|
27529
|
+
/** Groups that have at least one record with usable coordinates. */
|
|
27530
|
+
function plottableGroups(groups) {
|
|
27531
|
+
return (groups ?? [])
|
|
27532
|
+
.filter((group) => !!group)
|
|
27533
|
+
.map((group) => ({
|
|
27534
|
+
...group,
|
|
27535
|
+
groupName: group.groupName ?? '',
|
|
27536
|
+
points: (group.points ?? []).filter(isPlottable),
|
|
27537
|
+
}))
|
|
27538
|
+
.filter((group) => group.points.length > 0);
|
|
27539
|
+
}
|
|
27540
|
+
function legendLayout(position) {
|
|
27541
|
+
switch (position) {
|
|
27542
|
+
case 'top':
|
|
27543
|
+
return { top: '3%', left: 'center', orient: 'horizontal' };
|
|
27544
|
+
case 'left':
|
|
27545
|
+
return { left: '2%', top: 'middle', orient: 'vertical' };
|
|
27546
|
+
case 'right':
|
|
27547
|
+
return { right: '2%', top: 'middle', orient: 'vertical' };
|
|
27548
|
+
case 'bottom':
|
|
27549
|
+
default:
|
|
27550
|
+
return { bottom: '3%', left: 'center', orient: 'horizontal' };
|
|
27551
|
+
}
|
|
27552
|
+
}
|
|
27553
|
+
/**
|
|
27554
|
+
* The box the boundaries are laid out in.
|
|
27555
|
+
*
|
|
27556
|
+
* `geo` has no grid to keep clear of the legend, so without this the legend
|
|
27557
|
+
* prints over whichever markers happen to sit under it — southern ones for a
|
|
27558
|
+
* bottom legend. Reserving the legend's edge keeps the two apart.
|
|
27559
|
+
*/
|
|
27560
|
+
function geoLayout(legend) {
|
|
27561
|
+
const box = { top: '4%', bottom: '4%', left: '2%', right: '2%' };
|
|
27562
|
+
if (!legend.show)
|
|
27563
|
+
return box;
|
|
27564
|
+
switch (legend.position) {
|
|
27565
|
+
case 'top':
|
|
27566
|
+
return { ...box, top: '14%' };
|
|
27567
|
+
case 'left':
|
|
27568
|
+
return { ...box, left: '18%' };
|
|
27569
|
+
case 'right':
|
|
27570
|
+
return { ...box, right: '18%' };
|
|
27571
|
+
case 'bottom':
|
|
27572
|
+
default:
|
|
27573
|
+
return { ...box, bottom: '14%' };
|
|
27574
|
+
}
|
|
27575
|
+
}
|
|
27576
|
+
/**
|
|
27577
|
+
* The ECharts option for a Map Chart.
|
|
27578
|
+
*
|
|
27579
|
+
* Returns `null` when nothing is plottable, so the caller can show its own
|
|
27580
|
+
* empty state instead of an ECharts canvas with an invisible scatter series.
|
|
27581
|
+
*/
|
|
27582
|
+
function buildMapChartOption(groups, region, legend, font = {}) {
|
|
27583
|
+
const usable = plottableGroups(groups);
|
|
27584
|
+
if (!usable.length)
|
|
27585
|
+
return null;
|
|
27586
|
+
const legendNames = [];
|
|
27587
|
+
const series = usable.map((group, index) => {
|
|
27588
|
+
const color = group.color || MAP_FALLBACK_COLORS[index % MAP_FALLBACK_COLORS.length];
|
|
27589
|
+
legendNames.push(group.groupName);
|
|
27590
|
+
return {
|
|
27591
|
+
name: group.groupName,
|
|
27592
|
+
type: 'scatter',
|
|
27593
|
+
coordinateSystem: 'geo',
|
|
27594
|
+
symbol: MAP_MARKER_PATH,
|
|
27595
|
+
symbolSize: 16,
|
|
27596
|
+
itemStyle: { color },
|
|
27597
|
+
data: group.points.map((point) => ({
|
|
27598
|
+
name: point.displayName || '',
|
|
27599
|
+
// ECharts geo wants [lon, lat]; the third slot rides along for tooltips.
|
|
27600
|
+
value: [Number(point.lon), Number(point.lat), point.displayName || ''],
|
|
27601
|
+
extraValues: point.extraValues,
|
|
27602
|
+
})),
|
|
27603
|
+
label: {
|
|
27604
|
+
show: true,
|
|
27605
|
+
position: 'bottom',
|
|
27606
|
+
distance: 8,
|
|
27607
|
+
color: '#333',
|
|
27608
|
+
fontFamily: font.fontFamily,
|
|
27609
|
+
fontSize: font.labelSize ?? 10,
|
|
27610
|
+
fontWeight: 'normal',
|
|
27611
|
+
formatter: (params) => params?.data?.name ?? '',
|
|
27612
|
+
},
|
|
27613
|
+
// Records in the same city sit a few pixels apart, and their labels then
|
|
27614
|
+
// print on top of each other. ECharts drops the colliding ones rather
|
|
27615
|
+
// than stacking them; the marker itself always stays visible, and
|
|
27616
|
+
// hovering shows the name in the tooltip.
|
|
27617
|
+
labelLayout: { hideOverlap: true },
|
|
27618
|
+
emphasis: {
|
|
27619
|
+
itemStyle: { color, shadowBlur: 10, shadowColor: 'rgba(0,0,0,0.3)' },
|
|
27620
|
+
label: { fontWeight: 'bold' },
|
|
27621
|
+
},
|
|
27622
|
+
zlevel: 2,
|
|
27623
|
+
};
|
|
27624
|
+
});
|
|
27625
|
+
return {
|
|
27626
|
+
tooltip: {
|
|
27627
|
+
trigger: 'item',
|
|
27628
|
+
formatter: (params) => params?.seriesName
|
|
27629
|
+
? `${params.name}<br/>${params.seriesName}`
|
|
27630
|
+
: (params?.name ?? ''),
|
|
27631
|
+
},
|
|
27632
|
+
geo: {
|
|
27633
|
+
map: region.echartsName,
|
|
27634
|
+
roam: true,
|
|
27635
|
+
center: region.center,
|
|
27636
|
+
zoom: region.zoom,
|
|
27637
|
+
...geoLayout(legend),
|
|
27638
|
+
itemStyle: {
|
|
27639
|
+
areaColor: '#f5f5f5',
|
|
27640
|
+
borderColor: '#ccc',
|
|
27641
|
+
borderWidth: 1.5,
|
|
27642
|
+
},
|
|
27643
|
+
emphasis: { itemStyle: { areaColor: '#e6e6e6' } },
|
|
27644
|
+
label: { show: false },
|
|
27645
|
+
},
|
|
27646
|
+
legend: {
|
|
27647
|
+
type: 'scroll',
|
|
27648
|
+
...legendLayout(legend.position),
|
|
27649
|
+
data: legendNames,
|
|
27650
|
+
icon: legend.icon || 'circle',
|
|
27651
|
+
show: legend.show,
|
|
27652
|
+
textStyle: {
|
|
27653
|
+
fontFamily: font.fontFamily,
|
|
27654
|
+
fontSize: font.legendSize ?? 12,
|
|
27655
|
+
color: '#333',
|
|
27656
|
+
},
|
|
27657
|
+
},
|
|
27658
|
+
series,
|
|
27659
|
+
};
|
|
27660
|
+
}
|
|
27661
|
+
|
|
27662
|
+
/**
|
|
27663
|
+
* Map regions available to the Map Chart widget.
|
|
27664
|
+
*
|
|
27665
|
+
* The widget draws boundaries from GeoJSON registered with ECharts rather than
|
|
27666
|
+
* fetching raster tiles, so it needs no network, no API key and no third-party
|
|
27667
|
+
* usage policy — the same approach the legacy dashboardBuilder app used.
|
|
27668
|
+
*
|
|
27669
|
+
* Each region's GeoJSON is lazy-loaded: the files are a few hundred KB and only
|
|
27670
|
+
* a dashboard containing a Map Chart should pay for them.
|
|
27671
|
+
*/
|
|
27672
|
+
/**
|
|
27673
|
+
* Keyed by the lowercased persisted `clientConfig.map` value.
|
|
27674
|
+
*
|
|
27675
|
+
* `riyadhgovernorate` is the name the legacy ECharts handler used for the same
|
|
27676
|
+
* region, so configs written by either side resolve.
|
|
27677
|
+
*/
|
|
27678
|
+
const MAP_REGIONS = {
|
|
27679
|
+
saudiarabia: {
|
|
27680
|
+
echartsName: 'Saudi',
|
|
27681
|
+
center: [46.6753, 24.7136],
|
|
27682
|
+
zoom: 1.45,
|
|
27683
|
+
load: () => import('./masterteam-dashboard-builder-saudi.geo-C_9VzPCF.mjs').then((m) => m.saudiGeoJson),
|
|
27684
|
+
},
|
|
27685
|
+
riyadh: {
|
|
27686
|
+
echartsName: 'RiyadhGovernorate',
|
|
27687
|
+
center: [46.6753, 24.7136],
|
|
27688
|
+
zoom: 0.72,
|
|
27689
|
+
load: () => import('./masterteam-dashboard-builder-riyadh.geo-CE3Amxoa.mjs').then((m) => m.riyadhGeoJson),
|
|
27690
|
+
},
|
|
27691
|
+
riyadhgovernorate: {
|
|
27692
|
+
echartsName: 'RiyadhGovernorate',
|
|
27693
|
+
center: [46.6753, 24.7136],
|
|
27694
|
+
zoom: 0.72,
|
|
27695
|
+
load: () => import('./masterteam-dashboard-builder-riyadh.geo-CE3Amxoa.mjs').then((m) => m.riyadhGeoJson),
|
|
27696
|
+
},
|
|
27697
|
+
};
|
|
27698
|
+
const DEFAULT_MAP_REGION_KEY = 'saudiarabia';
|
|
27699
|
+
/** Attribution for the bundled boundaries. Rendered by the widget; keep it. */
|
|
27700
|
+
const MAP_DATA_ATTRIBUTION = '© OpenStreetMap contributors (ODbL)';
|
|
27701
|
+
function resolveMapRegion(value) {
|
|
27702
|
+
const key = String(value ?? '')
|
|
27703
|
+
.trim()
|
|
27704
|
+
.toLowerCase();
|
|
27705
|
+
return MAP_REGIONS[key] ?? MAP_REGIONS[DEFAULT_MAP_REGION_KEY];
|
|
27706
|
+
}
|
|
27707
|
+
|
|
27708
|
+
/**
|
|
27709
|
+
* Map View Component
|
|
27710
|
+
*
|
|
27711
|
+
* Renderer for the `Map Chart` widget. `MapChartHandler.handleLeafletMap`
|
|
27712
|
+
* groups the records by the configured grouping property and resolves each
|
|
27713
|
+
* record's location property into `{ lat, lon }`; this component plots those
|
|
27714
|
+
* groups over the region's boundaries.
|
|
27715
|
+
*
|
|
27716
|
+
* The boundaries are GeoJSON bundled with the package and registered with
|
|
27717
|
+
* ECharts (`echarts.registerMap`) — the same approach the legacy
|
|
27718
|
+
* dashboardBuilder app used. Nothing is fetched at runtime, so the widget has
|
|
27719
|
+
* no API key, no third-party usage policy and no dependency on the browser
|
|
27720
|
+
* reaching a tile host; it renders identically offline.
|
|
27721
|
+
*
|
|
27722
|
+
* Registration has to happen before ECharts is handed an option naming the map,
|
|
27723
|
+
* so the option stays `null` until the GeoJSON is in the registry.
|
|
27724
|
+
*/
|
|
27725
|
+
/**
|
|
27726
|
+
* ECharts' map registry is global and registration is idempotent, so the names
|
|
27727
|
+
* already registered are tracked once per module rather than per component.
|
|
27728
|
+
*/
|
|
27729
|
+
const registeredRegions = new Set();
|
|
27730
|
+
class MapViewComponent {
|
|
27731
|
+
/** Grouped records from `MapChartHandler.handleLeafletMap`. */
|
|
27732
|
+
groups = input([], ...(ngDevMode ? [{ debugName: "groups" }] : /* istanbul ignore next */ []));
|
|
27733
|
+
/** Persisted Style Studio map controls. */
|
|
27734
|
+
config = input({}, ...(ngDevMode ? [{ debugName: "config" }] : /* istanbul ignore next */ []));
|
|
27735
|
+
/** Hide the group legend when the widget's legend control is off. */
|
|
27736
|
+
showLegend = input(true, ...(ngDevMode ? [{ debugName: "showLegend" }] : /* istanbul ignore next */ []));
|
|
27737
|
+
/** Where the widget's legend control puts the legend. */
|
|
27738
|
+
legendPosition = input('bottom', ...(ngDevMode ? [{ debugName: "legendPosition" }] : /* istanbul ignore next */ []));
|
|
27739
|
+
/** Legend marker shape, from the widget's legend control. */
|
|
27740
|
+
legendIcon = input(undefined, ...(ngDevMode ? [{ debugName: "legendIcon" }] : /* istanbul ignore next */ []));
|
|
27741
|
+
/** Forwarded to `mt-echart` so it keys its chart instance per widget. */
|
|
27742
|
+
dashboardId = input('', ...(ngDevMode ? [{ debugName: "dashboardId" }] : /* istanbul ignore next */ []));
|
|
27743
|
+
configurationItem = input(null, ...(ngDevMode ? [{ debugName: "configurationItem" }] : /* istanbul ignore next */ []));
|
|
27744
|
+
inGroup = input(false, ...(ngDevMode ? [{ debugName: "inGroup" }] : /* istanbul ignore next */ []));
|
|
27745
|
+
/** Emitted when a marker is clicked, for the widget's row actions. */
|
|
27746
|
+
pointClick = output();
|
|
27747
|
+
/** The ECharts map name currently in the global registry, once loaded. */
|
|
27748
|
+
registeredName = signal(null, ...(ngDevMode ? [{ debugName: "registeredName" }] : /* istanbul ignore next */ []));
|
|
27749
|
+
attribution = MAP_DATA_ATTRIBUTION;
|
|
27750
|
+
region = computed(() => resolveMapRegion(this.config()?.mapRegion), ...(ngDevMode ? [{ debugName: "region" }] : /* istanbul ignore next */ []));
|
|
27751
|
+
hasPoints = computed(() => plottableGroups(this.groups()).length > 0, ...(ngDevMode ? [{ debugName: "hasPoints" }] : /* istanbul ignore next */ []));
|
|
27752
|
+
/**
|
|
27753
|
+
* `null` until the region's boundaries are registered — handing ECharts a
|
|
27754
|
+
* `geo.map` name it does not know renders an empty canvas with no error.
|
|
27755
|
+
*/
|
|
27756
|
+
option = computed(() => {
|
|
27757
|
+
const region = this.region();
|
|
27758
|
+
if (this.registeredName() !== region.echartsName)
|
|
27759
|
+
return null;
|
|
27760
|
+
return buildMapChartOption(this.groups(), region, {
|
|
27761
|
+
show: this.showLegend(),
|
|
27762
|
+
position: this.legendPosition(),
|
|
27763
|
+
icon: this.legendIcon(),
|
|
27764
|
+
}, {
|
|
27765
|
+
fontFamily: generalConfiguration?.fontConfig?.fontFamily,
|
|
27766
|
+
labelSize: generalConfiguration?.fontConfig?.fontSizeConfig?.category,
|
|
27767
|
+
legendSize: generalConfiguration?.fontConfig?.fontSizeConfig?.legend,
|
|
27768
|
+
});
|
|
27769
|
+
}, ...(ngDevMode ? [{ debugName: "option" }] : /* istanbul ignore next */ []));
|
|
27770
|
+
constructor() {
|
|
27771
|
+
effect(() => {
|
|
27772
|
+
const region = this.region();
|
|
27773
|
+
untracked(() => void this.ensureRegistered(region));
|
|
27774
|
+
});
|
|
27775
|
+
}
|
|
27776
|
+
/**
|
|
27777
|
+
* Loads the region's GeoJSON (lazily — the files are large) and registers it
|
|
27778
|
+
* under the name the option refers to. `import('echarts')` resolves to the
|
|
27779
|
+
* same module instance `mt-echart` uses, so the registration is visible to
|
|
27780
|
+
* the chart it renders.
|
|
27781
|
+
*/
|
|
27782
|
+
async ensureRegistered(region) {
|
|
27783
|
+
if (registeredRegions.has(region.echartsName)) {
|
|
27784
|
+
this.registeredName.set(region.echartsName);
|
|
27785
|
+
return;
|
|
27786
|
+
}
|
|
27787
|
+
try {
|
|
27788
|
+
const [echarts, geoJson] = await Promise.all([
|
|
27789
|
+
import('echarts'),
|
|
27790
|
+
region.load(),
|
|
27791
|
+
]);
|
|
27792
|
+
echarts.registerMap(region.echartsName, geoJson);
|
|
27793
|
+
registeredRegions.add(region.echartsName);
|
|
27794
|
+
this.registeredName.set(region.echartsName);
|
|
27795
|
+
}
|
|
27796
|
+
catch (error) {
|
|
27797
|
+
console.error('Failed to load map boundaries:', error);
|
|
27798
|
+
}
|
|
27799
|
+
}
|
|
27800
|
+
/**
|
|
27801
|
+
* `mt-echart` forwards ECharts' own click payload; the record that produced
|
|
27802
|
+
* the marker rides along on `extraValues`.
|
|
27803
|
+
*/
|
|
27804
|
+
onChartClick(event) {
|
|
27805
|
+
const data = event?.data;
|
|
27806
|
+
if (!data)
|
|
27807
|
+
return;
|
|
27808
|
+
const value = Array.isArray(data.value) ? data.value : [];
|
|
27809
|
+
this.pointClick.emit({
|
|
27810
|
+
displayName: data.name ?? '',
|
|
27811
|
+
lon: Number(value[0]),
|
|
27812
|
+
lat: Number(value[1]),
|
|
27813
|
+
color: '',
|
|
27814
|
+
extraValues: data.extraValues,
|
|
27815
|
+
});
|
|
27816
|
+
}
|
|
27817
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: MapViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
27818
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: MapViewComponent, isStandalone: true, selector: "mt-map-view", inputs: { groups: { classPropertyName: "groups", publicName: "groups", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, showLegend: { classPropertyName: "showLegend", publicName: "showLegend", isSignal: true, isRequired: false, transformFunction: null }, legendPosition: { classPropertyName: "legendPosition", publicName: "legendPosition", isSignal: true, isRequired: false, transformFunction: null }, legendIcon: { classPropertyName: "legendIcon", publicName: "legendIcon", isSignal: true, isRequired: false, transformFunction: null }, dashboardId: { classPropertyName: "dashboardId", publicName: "dashboardId", isSignal: true, isRequired: false, transformFunction: null }, configurationItem: { classPropertyName: "configurationItem", publicName: "configurationItem", isSignal: true, isRequired: false, transformFunction: null }, inGroup: { classPropertyName: "inGroup", publicName: "inGroup", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pointClick: "pointClick" }, host: { classAttribute: "mt-map-view" }, ngImport: i0, template: "<div\n class=\"mt-map-view__surface\"\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\n>\n @if (option(); as chartOption) {\n <mt-echart\n [dashboardId]=\"dashboardId()\"\n [chartConfig]=\"chartOption\"\n [configurationItem]=\"configurationItem()\"\n [inGroup]=\"inGroup()\"\n (chartClick)=\"onChartClick($event)\"\n />\n <!--\n ODbL requires the boundary data to be credited wherever it is shown.\n Everything is drawn from the bundled GeoJSON, so nothing is requested at\n runtime and no record data leaves the browser.\n -->\n <div class=\"mt-map-view__attribution\">{{ attribution }}</div>\n } @else if (!hasPoints()) {\n <div class=\"mt-map-view__empty\">\n <span>{{ t(\"map.noLocations\") }}</span>\n </div>\n } @else {\n <div class=\"mt-map-view__loading\" role=\"status\">\n <div class=\"mt-map-view__spinner\" aria-hidden=\"true\"></div>\n <span class=\"mt-map-view__sr\">{{ t(\"map.loadingBoundaries\") }}</span>\n </div>\n }\n</div>\n", styles: [":host{display:block;width:100%;height:100%;min-height:0}.mt-map-view__surface{position:relative;width:100%;height:100%;min-height:0}.mt-map-view__attribution{position:absolute;inset-block-end:0;inset-inline-end:0;padding:0 .25rem;color:var(--p-text-muted-color, #64748b);font-size:.625rem;line-height:1rem;pointer-events:none}.mt-map-view__empty,.mt-map-view__loading{position:absolute;inset:0;display:flex;align-items:center;justify-content:center}.mt-map-view__empty span{padding:.25rem .625rem;border:1px solid var(--p-surface-200, #e5e7eb);border-radius:.375rem;background:var(--p-surface-0, #ffffff);color:var(--p-text-muted-color, #64748b);font-size:.75rem}.mt-map-view__spinner{width:1.5rem;height:1.5rem;border:2px solid var(--p-surface-200, #e5e7eb);border-top-color:var(--p-primary-500, #2563eb);border-radius:999px;animation:mt-map-view-spin .8s linear infinite}@keyframes mt-map-view-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.mt-map-view__spinner{animation:none}}.mt-map-view__sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}\n"], dependencies: [{ kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: EChartComponent, selector: "mt-echart", inputs: ["dashboardId", "chartConfig", "configurationItem", "height", "inGroup", "headerHidden"], outputs: ["chartClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
27819
|
+
}
|
|
27820
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: MapViewComponent, decorators: [{
|
|
27821
|
+
type: Component,
|
|
27822
|
+
args: [{ selector: 'mt-map-view', standalone: true, imports: [TranslocoDirective, EChartComponent], changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'mt-map-view' }, template: "<div\n class=\"mt-map-view__surface\"\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\n>\n @if (option(); as chartOption) {\n <mt-echart\n [dashboardId]=\"dashboardId()\"\n [chartConfig]=\"chartOption\"\n [configurationItem]=\"configurationItem()\"\n [inGroup]=\"inGroup()\"\n (chartClick)=\"onChartClick($event)\"\n />\n <!--\n ODbL requires the boundary data to be credited wherever it is shown.\n Everything is drawn from the bundled GeoJSON, so nothing is requested at\n runtime and no record data leaves the browser.\n -->\n <div class=\"mt-map-view__attribution\">{{ attribution }}</div>\n } @else if (!hasPoints()) {\n <div class=\"mt-map-view__empty\">\n <span>{{ t(\"map.noLocations\") }}</span>\n </div>\n } @else {\n <div class=\"mt-map-view__loading\" role=\"status\">\n <div class=\"mt-map-view__spinner\" aria-hidden=\"true\"></div>\n <span class=\"mt-map-view__sr\">{{ t(\"map.loadingBoundaries\") }}</span>\n </div>\n }\n</div>\n", styles: [":host{display:block;width:100%;height:100%;min-height:0}.mt-map-view__surface{position:relative;width:100%;height:100%;min-height:0}.mt-map-view__attribution{position:absolute;inset-block-end:0;inset-inline-end:0;padding:0 .25rem;color:var(--p-text-muted-color, #64748b);font-size:.625rem;line-height:1rem;pointer-events:none}.mt-map-view__empty,.mt-map-view__loading{position:absolute;inset:0;display:flex;align-items:center;justify-content:center}.mt-map-view__empty span{padding:.25rem .625rem;border:1px solid var(--p-surface-200, #e5e7eb);border-radius:.375rem;background:var(--p-surface-0, #ffffff);color:var(--p-text-muted-color, #64748b);font-size:.75rem}.mt-map-view__spinner{width:1.5rem;height:1.5rem;border:2px solid var(--p-surface-200, #e5e7eb);border-top-color:var(--p-primary-500, #2563eb);border-radius:999px;animation:mt-map-view-spin .8s linear infinite}@keyframes mt-map-view-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.mt-map-view__spinner{animation:none}}.mt-map-view__sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}\n"] }]
|
|
27823
|
+
}], ctorParameters: () => [], propDecorators: { groups: [{ type: i0.Input, args: [{ isSignal: true, alias: "groups", required: false }] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], showLegend: [{ type: i0.Input, args: [{ isSignal: true, alias: "showLegend", required: false }] }], legendPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "legendPosition", required: false }] }], legendIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "legendIcon", required: false }] }], dashboardId: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardId", required: false }] }], configurationItem: [{ type: i0.Input, args: [{ isSignal: true, alias: "configurationItem", required: false }] }], inGroup: [{ type: i0.Input, args: [{ isSignal: true, alias: "inGroup", required: false }] }], pointClick: [{ type: i0.Output, args: ["pointClick"] }] } });
|
|
27824
|
+
|
|
27573
27825
|
/**
|
|
27574
27826
|
* Chart Card Component
|
|
27575
27827
|
*
|
|
@@ -27705,8 +27957,58 @@ class ChartCardComponent {
|
|
|
27705
27957
|
return 'phaseGateStepper';
|
|
27706
27958
|
if (componentName === 'performanceGaugeCard')
|
|
27707
27959
|
return 'performanceGauge';
|
|
27960
|
+
if (componentName === 'map')
|
|
27961
|
+
return 'map';
|
|
27708
27962
|
return 'echart';
|
|
27709
27963
|
}, ...(ngDevMode ? [{ debugName: "componentViewMode" }] : /* istanbul ignore next */ []));
|
|
27964
|
+
/* ---------- Map view helpers ---------- */
|
|
27965
|
+
/**
|
|
27966
|
+
* `MapChartHandler.handleLeafletMap` returns a bare array of
|
|
27967
|
+
* `{ groupName, color, points }` rather than an ECharts option, so the map
|
|
27968
|
+
* widget is rendered by `mt-map-view` instead of `mt-echart`.
|
|
27969
|
+
*/
|
|
27970
|
+
mapGroups = computed(() => {
|
|
27971
|
+
const data = this.dataHandled();
|
|
27972
|
+
if (!Array.isArray(data))
|
|
27973
|
+
return [];
|
|
27974
|
+
return data.filter((group) => !!group && Array.isArray(group.points));
|
|
27975
|
+
}, ...(ngDevMode ? [{ debugName: "mapGroups" }] : /* istanbul ignore next */ []));
|
|
27976
|
+
/**
|
|
27977
|
+
* The Style Studio "Map" control. `clientConfig.map` is the path `MAP_SECTION`
|
|
27978
|
+
* writes; the `mapConfig` envelope the handler attaches to the returned array
|
|
27979
|
+
* is honoured as a fallback for configs written by it.
|
|
27980
|
+
*/
|
|
27981
|
+
mapViewConfig = computed(() => {
|
|
27982
|
+
const clientConfig = this.configurationItem()?.clientConfig;
|
|
27983
|
+
const fromHandler = (this.dataHandled()?.mapConfig ??
|
|
27984
|
+
{});
|
|
27985
|
+
return { mapRegion: clientConfig?.['map'] ?? fromHandler.mapRegion };
|
|
27986
|
+
}, ...(ngDevMode ? [{ debugName: "mapViewConfig" }] : /* istanbul ignore next */ []));
|
|
27987
|
+
/** The widget's legend controls also govern the map's group legend. */
|
|
27988
|
+
mapLegendShow = computed(() => this.mapLegend()?.['show'] ?? true, ...(ngDevMode ? [{ debugName: "mapLegendShow" }] : /* istanbul ignore next */ []));
|
|
27989
|
+
mapLegendPosition = computed(() => {
|
|
27990
|
+
const position = this.mapLegend()?.['position'];
|
|
27991
|
+
return position === 'top' ||
|
|
27992
|
+
position === 'right' ||
|
|
27993
|
+
position === 'bottom' ||
|
|
27994
|
+
position === 'left'
|
|
27995
|
+
? position
|
|
27996
|
+
: 'bottom';
|
|
27997
|
+
}, ...(ngDevMode ? [{ debugName: "mapLegendPosition" }] : /* istanbul ignore next */ []));
|
|
27998
|
+
mapLegendIcon = computed(() => {
|
|
27999
|
+
const icon = this.mapLegend()?.['iconType'];
|
|
28000
|
+
return typeof icon === 'string' && icon ? icon : undefined;
|
|
28001
|
+
}, ...(ngDevMode ? [{ debugName: "mapLegendIcon" }] : /* istanbul ignore next */ []));
|
|
28002
|
+
mapLegend = computed(() => {
|
|
28003
|
+
const configAsType = this.configurationItem()?.clientConfig
|
|
28004
|
+
?.configAsType;
|
|
28005
|
+
return configAsType?.['legend'];
|
|
28006
|
+
}, ...(ngDevMode ? [{ debugName: "mapLegend" }] : /* istanbul ignore next */ []));
|
|
28007
|
+
onMapPointClick(point) {
|
|
28008
|
+
if (!this.hasActions())
|
|
28009
|
+
return;
|
|
28010
|
+
this.onAction.emit({ type: 'click', data: point.extraValues ?? point });
|
|
28011
|
+
}
|
|
27710
28012
|
performanceGauge = computed(() => {
|
|
27711
28013
|
const data = (this.dataHandled() ?? {});
|
|
27712
28014
|
const performance = this.resolvePerformanceGaugePerformance(data?.performance);
|
|
@@ -28580,7 +28882,7 @@ class ChartCardComponent {
|
|
|
28580
28882
|
'');
|
|
28581
28883
|
}
|
|
28582
28884
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ChartCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
28583
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: ChartCardComponent, isStandalone: true, selector: "mt-chart-card", inputs: { dashboardId: { classPropertyName: "dashboardId", publicName: "dashboardId", isSignal: true, isRequired: true, transformFunction: null }, reportId: { classPropertyName: "reportId", publicName: "reportId", isSignal: true, isRequired: false, transformFunction: null }, inGroup: { classPropertyName: "inGroup", publicName: "inGroup", isSignal: true, isRequired: false, transformFunction: null }, isConfigMode: { classPropertyName: "isConfigMode", publicName: "isConfigMode", isSignal: true, isRequired: false, transformFunction: null }, titleEditable: { classPropertyName: "titleEditable", publicName: "titleEditable", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onAction: "onAction", onConfigure: "onConfigure", onTitleChange: "onTitleChange" }, ngImport: i0, template: "<ng-template #timelineLegendList>\r\n <div\r\n class=\"dashboard-timeline-legend\"\r\n [attr.data-position]=\"timelineLegendPosition()\"\r\n >\r\n @for (label of timelineLabels(); track $index) {\r\n <span\r\n class=\"dashboard-timeline-legend-item\"\r\n [title]=\"label.label || label.name || label.key\"\r\n >\r\n <span\r\n class=\"dashboard-timeline-legend-marker\"\r\n [class.shape-rect]=\"label.shape === 'rect'\"\r\n [class.shape-roundRect]=\"label.shape === 'roundRect'\"\r\n [class.shape-diamond]=\"label.shape === 'diamond'\"\r\n [class.shape-triangle]=\"label.shape === 'triangle'\"\r\n [style.background]=\"\r\n label.shape === 'triangle' ? null : label.color || '#64748b'\r\n \"\r\n [style.border-bottom-color]=\"\r\n label.shape === 'triangle' ? label.color || '#64748b' : null\r\n \"\r\n ></span>\r\n <span class=\"dashboard-timeline-legend-label\">\r\n {{ label.label || label.name || label.key }}\r\n </span>\r\n </span>\r\n }\r\n </div>\r\n</ng-template>\r\n\r\n<mt-card-content\r\n [inGroup]=\"inGroup()\"\r\n [headerConfig]=\"\r\n configurationItem()?.clientConfig?.configAsType?.['headerCardConfig']\r\n \"\r\n [styleConfig]=\"\r\n configurationItem()?.clientConfig?.displayConfig?.['StyleConfig']\r\n \"\r\n [cardStyleConfig]=\"\r\n configurationItem()?.clientConfig?.configAsType?.['cardStyleConfig']\r\n \"\r\n [density]=\"configurationItem()?.clientConfig?.configAsType?.['density']\"\r\n [padding]=\"configurationItem()?.clientConfig?.configAsType?.['padding']\"\r\n [title]=\"title()\"\r\n [titleEditable]=\"titleEditable()\"\r\n (titleChange)=\"onTitleChange.emit($event)\"\r\n [isNoTopEnd]=\"!showTopEnd()\"\r\n [isChart]=\"true\"\r\n (headerClick)=\"onHeaderClick()\"\r\n>\r\n <ng-container topEnd>\r\n @if (showStaticFilters()) {\r\n <mt-static-filters\r\n [config]=\"staticFilterConfig()\"\r\n [dashboardId]=\"dashboardId()\"\r\n >\r\n </mt-static-filters>\r\n }\r\n @if (showDynamicFilters()) {\r\n <mt-dynamic-filters\r\n [fields]=\"dynamicFilterFields()\"\r\n [dashboardId]=\"dashboardId()\"\r\n [reportId]=\"reportId()\"\r\n [showLabels]=\"false\"\r\n >\r\n </mt-dynamic-filters>\r\n }\r\n @if (showFilter()) {\r\n <mt-card-filter [config]=\"filterConfig()\" [dashboardId]=\"dashboardId()\">\r\n </mt-card-filter>\r\n }\r\n @if (cardInfoConfig()?.show && cardInfoConfig()?.value) {\r\n <mt-card-info [cardInfo]=\"cardInfoConfig()\"></mt-card-info>\r\n }\r\n </ng-container>\r\n\r\n <ng-container body>\r\n <div\r\n class=\"chart-container\"\r\n [class.config-mode]=\"isConfigMode()\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n >\r\n @if (componentViewMode() === \"splitter\" && hasSplitterData()) {\r\n <div\r\n class=\"splitter-view\"\r\n [class.splitter-vertical]=\"splitterOrientation() === 'vertical'\"\r\n [style.gap.px]=\"splitterGap()\"\r\n >\r\n <div class=\"splitter-side splitter-positive\">\r\n <div class=\"splitter-count\">\r\n {{ dataHandled()?.positive?.groupedValue ?? 0 }}\r\n </div>\r\n <ul class=\"splitter-labels\">\r\n @for (\r\n label of dataHandled()?.positive?.labels || [];\r\n track $index\r\n ) {\r\n <li>{{ label }}</li>\r\n }\r\n </ul>\r\n </div>\r\n <div class=\"splitter-divider\"></div>\r\n <div class=\"splitter-side splitter-negative\">\r\n <div class=\"splitter-count\">\r\n {{ dataHandled()?.negative?.groupedValue ?? 0 }}\r\n </div>\r\n <ul class=\"splitter-labels\">\r\n @for (\r\n label of dataHandled()?.negative?.labels || [];\r\n track $index\r\n ) {\r\n <li>{{ label }}</li>\r\n }\r\n </ul>\r\n </div>\r\n </div>\r\n } @else if (componentViewMode() === \"timeline\" && hasTimelineData()) {\r\n <div\r\n class=\"dashboard-timeline-view\"\r\n [attr.data-legend-position]=\"timelineLegendPosition()\"\r\n [style.--timeline-header-bg]=\"timelineHeaderBgColor()\"\r\n [style.--timeline-header-color]=\"timelineHeaderTextColor()\"\r\n >\r\n @if (\r\n timelineLegendShow() &&\r\n timelineLabels().length &&\r\n (timelineLegendPosition() === \"top\" ||\r\n timelineLegendPosition() === \"left\")\r\n ) {\r\n <ng-container [ngTemplateOutlet]=\"timelineLegendList\" />\r\n }\r\n\r\n @defer (on viewport) {\r\n <mt-timeline\r\n class=\"dashboard-timeline-renderer\"\r\n [showHeader]=\"false\"\r\n [showZoomToFitControl]=\"false\"\r\n [timelineMode]=\"timelineMode()\"\r\n (timelineModeChange)=\"timelineMode.set($event)\"\r\n [ganttData]=\"timelineResources()\"\r\n [ganttMapping]=\"timelineGanttMapping\"\r\n [columns]=\"timelineColumns()\"\r\n [defaultVisibleColumns]=\"2\"\r\n [columnsPaneMinWidthPx]=\"220\"\r\n [columnsPaneMaxWidthPx]=\"520\"\r\n [enableVirtualScroll]=\"true\"\r\n [virtualScrollThreshold]=\"0\"\r\n [virtualScrollBodyHeightPx]=\"520\"\r\n [showGanttDetailsPopup]=\"true\"\r\n [emptyMessage]=\"t('noChartData')\"\r\n >\r\n <ng-template\r\n mtTimelineColumn=\"title\"\r\n let-item=\"item\"\r\n let-resolved=\"resolved\"\r\n let-canToggle=\"canToggle\"\r\n let-isCollapsed=\"isCollapsed\"\r\n let-toggle=\"toggle\"\r\n >\r\n <div\r\n class=\"dashboard-timeline-title-cell\"\r\n [style.padding-inline-start.px]=\"\r\n $any(resolved).levelDepth * 16\r\n \"\r\n >\r\n @if (canToggle) {\r\n <mt-icon\r\n class=\"dashboard-timeline-title-toggle\"\r\n [icon]=\"timelineCollapseIcon(isCollapsed)\"\r\n (click)=\"$event.stopPropagation(); toggle()\"\r\n ></mt-icon>\r\n } @else {\r\n <span class=\"dashboard-timeline-title-spacer\"></span>\r\n }\r\n\r\n <button\r\n type=\"button\"\r\n class=\"dashboard-timeline-title-action\"\r\n [title]=\"$any(resolved).title\"\r\n (click)=\"onTimelineTitleClick(item, $event)\"\r\n >\r\n {{ $any(resolved).title }}\r\n </button>\r\n </div>\r\n </ng-template>\r\n\r\n @for (column of timelineEntityColumns(); track column.key) {\r\n <ng-template [mtTimelineColumn]=\"column.key\" let-value=\"value\">\r\n <mt-entity-preview\r\n class=\"dashboard-timeline-column-entity\"\r\n [data]=\"timelineColumnEntityData(value)\"\r\n attachmentShape=\"compact\"\r\n ></mt-entity-preview>\r\n </ng-template>\r\n }\r\n\r\n <ng-template mtTimelinePopover let-item=\"item\">\r\n @if (timelinePopoverEntities(item); as entities) {\r\n @if (entities.length) {\r\n <div\r\n class=\"w-[27rem] max-w-[90vw] max-h-[24rem] overflow-auto p-2\"\r\n >\r\n <mt-entities-preview\r\n [entities]=\"entities\"\r\n [stackOnNarrow]=\"false\"\r\n />\r\n </div>\r\n }\r\n }\r\n </ng-template>\r\n </mt-timeline>\r\n } @placeholder {\r\n <div class=\"dashboard-timeline-placeholder\" aria-hidden=\"true\">\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n </div>\r\n }\r\n\r\n @if (\r\n timelineLegendShow() &&\r\n timelineLabels().length &&\r\n (timelineLegendPosition() === \"bottom\" ||\r\n timelineLegendPosition() === \"right\")\r\n ) {\r\n <ng-container [ngTemplateOutlet]=\"timelineLegendList\" />\r\n }\r\n </div>\r\n } @else if (\r\n componentViewMode() === \"phaseGateStepper\" && hasPhaseGateData()\r\n ) {\r\n <div\r\n class=\"phase-gate-view\"\r\n [class.phase-gate-compact]=\"phaseGateCompact()\"\r\n >\r\n <ol class=\"phase-steps\">\r\n @for (step of phaseGateSteps(); track $index) {\r\n <li\r\n class=\"phase-step\"\r\n [class.is-current]=\"$index === phaseGateCurrentIndex()\"\r\n [class.is-done]=\"$index < phaseGateCurrentIndex()\"\r\n >\r\n <span class=\"phase-step-number\">{{ $index + 1 }}</span>\r\n @if (phaseGateShowLabels()) {\r\n <span class=\"phase-step-name\">{{\r\n step?.name || step?.title || step?.label || t(\"phase\")\r\n }}</span>\r\n }\r\n </li>\r\n }\r\n </ol>\r\n </div>\r\n } @else if (\r\n componentViewMode() === \"performanceGauge\" &&\r\n dataHandled() &&\r\n !dataHandled()?.noData\r\n ) {\r\n @let gauge = performanceGauge();\r\n <div\r\n class=\"dashboard-performance-gauge\"\r\n [class.is-clickable]=\"hasActions()\"\r\n [style.--dashboard-performance-status-color]=\"gauge.status.color\"\r\n (click)=\"onPerformanceGaugeClick($event)\"\r\n >\r\n <div\r\n class=\"dashboard-performance-gauge__figure\"\r\n [style.width.%]=\"gauge.scalePercent\"\r\n >\r\n <svg\r\n class=\"dashboard-performance-gauge__svg\"\r\n viewBox=\"0 0 100 72\"\r\n role=\"img\"\r\n [attr.aria-label]=\"gauge.label + ' ' + gauge.display\"\r\n >\r\n <path\r\n d=\"M 8 58 A 42 42 0 0 1 92 58\"\r\n fill=\"none\"\r\n stroke=\"#e5e7eb\"\r\n stroke-width=\"6\"\r\n stroke-linecap=\"round\"\r\n pathLength=\"100\"\r\n ></path>\r\n\r\n @for (segment of performanceGaugeSegments(); track segment.key) {\r\n <path\r\n d=\"M 8 58 A 42 42 0 0 1 92 58\"\r\n fill=\"none\"\r\n [attr.stroke]=\"segment.color\"\r\n stroke-width=\"6\"\r\n stroke-linecap=\"round\"\r\n pathLength=\"100\"\r\n [attr.stroke-dasharray]=\"segment.dashArray\"\r\n [attr.stroke-dashoffset]=\"segment.dashOffset\"\r\n [style.opacity]=\"segment.opacity\"\r\n ></path>\r\n <text\r\n [attr.x]=\"segment.labelX\"\r\n [attr.y]=\"segment.labelY\"\r\n text-anchor=\"middle\"\r\n dominant-baseline=\"central\"\r\n font-size=\"5.5\"\r\n font-weight=\"700\"\r\n fill=\"#334155\"\r\n >\r\n {{ segment.label }}\r\n </text>\r\n }\r\n\r\n <circle\r\n [attr.cx]=\"gauge.marker.x\"\r\n [attr.cy]=\"gauge.marker.y\"\r\n r=\"4.5\"\r\n fill=\"#fff\"\r\n [attr.stroke]=\"gauge.status.color\"\r\n stroke-width=\"3\"\r\n ></circle>\r\n </svg>\r\n\r\n <div class=\"dashboard-performance-gauge__center\">\r\n <div class=\"dashboard-performance-gauge__value\">\r\n {{ gauge.display }}\r\n </div>\r\n <div class=\"dashboard-performance-gauge__label\">\r\n {{ gauge.label }}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div\r\n class=\"dashboard-performance-gauge__status\"\r\n [title]=\"performanceGaugeStatusName()\"\r\n >\r\n <span class=\"dashboard-performance-gauge__status-dot\"></span>\r\n <span class=\"dashboard-performance-gauge__status-text\">\r\n {{ performanceGaugeStatusName() }}\r\n </span>\r\n </div>\r\n </div>\r\n } @else if (dataHandled() && !dataHandled()?.noData) {\r\n <mt-echart\r\n [dashboardId]=\"dashboardId()\"\r\n [chartConfig]=\"dataHandled()\"\r\n [configurationItem]=\"configurationItem()\"\r\n [inGroup]=\"inGroup()\"\r\n (chartClick)=\"onChartClick($event)\"\r\n >\r\n </mt-echart>\r\n } @else if (dataHandled()?.noData) {\r\n <div class=\"no-data-container\">\r\n <i class=\"pi pi-info-circle\"></i>\r\n <span>{{ t(\"noChartData\") }}</span>\r\n </div>\r\n } @else {\r\n <div class=\"loading-container\">\r\n <div class=\"loading-spinner\"></div>\r\n </div>\r\n }\r\n </div>\r\n </ng-container>\r\n</mt-card-content>\r\n", styles: [":host{display:block;height:100%}.chart-container{height:100%;min-height:0}.chart-container.config-mode{min-height:400px}.no-data-container,.needs-config-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;min-height:0;color:#999;gap:.5rem;padding:1rem;text-align:center}.no-data-container i,.needs-config-container i{font-size:2rem}.needs-config-container .title{font-weight:600;color:#555;font-size:.95rem}.needs-config-container .hint{font-size:.8rem;max-width:28rem;line-height:1.4}.needs-config-container .configure-btn{margin-top:.5rem;display:inline-flex;align-items:center;gap:.4rem;padding:.4rem .9rem;font-size:.85rem;font-weight:600;color:#fff;background:var(--p-primary-500, #2563eb);border:0;border-radius:.375rem;cursor:pointer;box-shadow:0 1px 2px #0000000d}.needs-config-container .configure-btn:hover{background:var(--p-primary-600, #1d4ed8)}.loading-container{display:flex;align-items:center;justify-content:center;height:100%;min-height:0}.loading-spinner{width:2rem;height:2rem;border:3px solid #f0f0f0;border-top-color:#4caf50;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.splitter-view{display:flex;align-items:stretch;height:100%;gap:.5rem}.splitter-view.splitter-vertical{flex-direction:column}.splitter-view.splitter-vertical .splitter-divider{width:auto;height:1px}.splitter-side{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;padding:1rem;border-radius:.5rem}.splitter-positive{background:#22c55e14}.splitter-negative{background:#ef444414}.splitter-count{font-size:2rem;font-weight:700;margin-bottom:.5rem}.splitter-positive .splitter-count{color:#16a34a}.splitter-negative .splitter-count{color:#dc2626}.splitter-labels{list-style:none;padding:0;margin:0;text-align:center;font-size:.8rem;color:#555}.splitter-labels li{padding:.15rem 0}.splitter-divider{width:1px;background:#00000014}.dashboard-timeline-view{display:flex;flex-direction:column;gap:.625rem;height:100%;min-height:0;overflow:auto}.dashboard-timeline-view[data-legend-position=left],.dashboard-timeline-view[data-legend-position=right]{flex-direction:row;overflow:hidden}.dashboard-timeline-legend{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:.35rem .75rem;flex-shrink:0;min-width:0;max-width:100%}.dashboard-timeline-legend[data-position=left],.dashboard-timeline-legend[data-position=right]{max-width:12rem;max-height:100%;flex-direction:column;align-items:flex-start;justify-content:flex-start;flex-wrap:nowrap;overflow:auto}.dashboard-timeline-legend-item{display:inline-flex;align-items:center;gap:.25rem;max-width:12rem;padding:0;border:0;border-radius:0;font-size:.75rem;color:#475569;font-weight:500;line-height:1.2;background:transparent}.dashboard-timeline-legend-marker{display:inline-block;width:.625rem;height:.625rem;flex:0 0 auto;border-radius:999px}.dashboard-timeline-legend-marker.shape-rect{border-radius:0}.dashboard-timeline-legend-marker.shape-roundRect{border-radius:.2rem}.dashboard-timeline-legend-marker.shape-diamond{border-radius:.0625rem;transform:rotate(45deg)}.dashboard-timeline-legend-marker.shape-triangle{width:0;height:0;background:transparent!important;border-radius:0;border-left:.34rem solid transparent;border-right:.34rem solid transparent;border-bottom-width:.6rem;border-bottom-style:solid}.dashboard-timeline-legend-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dashboard-timeline-renderer{display:block;min-height:0;flex:1}.dashboard-timeline-placeholder{display:flex;min-height:260px;flex:1;flex-direction:column;gap:.75rem;padding:1rem}.dashboard-timeline-placeholder div{height:3rem;border-radius:.5rem;background:var(--p-surface-100);animation:dashboard-builder-pulse 1.2s ease-in-out infinite}@keyframes dashboard-builder-pulse{0%,to{opacity:.55}50%{opacity:1}}:host ::ng-deep .dashboard-timeline-renderer>div{margin-top:0}:host ::ng-deep .dashboard-timeline-view mt-timeline-gantt-header .bg-surface-50{background-color:var(--timeline-header-bg, var(--p-surface-50));color:var(--timeline-header-color, inherit)}.dashboard-timeline-column-entity{display:block;min-width:0}.dashboard-timeline-title-cell{display:flex;min-width:0;align-items:center;gap:.5rem;width:100%}.dashboard-timeline-title-toggle{flex:0 0 auto;cursor:pointer;color:#64748b}.dashboard-timeline-title-spacer{display:inline-block;width:1.25rem;flex:0 0 1.25rem}.dashboard-timeline-title-action{min-width:0;flex:1 1 auto;overflow:hidden;border:0;background:transparent;padding:0;color:#334155;cursor:pointer;font-size:.875rem;font-weight:600;text-align:start;text-overflow:ellipsis;white-space:nowrap}.dashboard-timeline-title-action:hover{color:var(--p-primary-600, #2563eb);text-decoration:underline}.phase-gate-view{height:100%;display:flex;align-items:center;justify-content:center;padding:1rem;overflow-x:auto}.phase-steps{display:flex;align-items:center;gap:.75rem;list-style:none;margin:0;padding:0}.phase-step{display:flex;align-items:center;gap:.5rem;padding:.4rem .75rem;border-radius:999px;background:#0000000a;font-size:.8rem;color:#555;white-space:nowrap}.phase-step-number{width:1.5rem;height:1.5rem;display:inline-flex;align-items:center;justify-content:center;border-radius:999px;font-weight:700;background:#0000000f;color:#666}.phase-step.is-done{background:#22c55e1a;color:#16a34a}.phase-step.is-done .phase-step-number{background:#16a34a;color:#fff}.phase-step.is-current{background:#2563eb1a;color:#2563eb;font-weight:600}.phase-step.is-current .phase-step-number{background:#2563eb;color:#fff}.phase-gate-view.phase-gate-compact .phase-step{padding:.2rem .45rem;font-size:.7rem;gap:.25rem}.phase-gate-view.phase-gate-compact .phase-step-number{width:1.1rem;height:1.1rem;font-size:.7rem}.dashboard-performance-gauge{display:flex;height:100%;min-height:0;width:100%;flex-direction:column;align-items:center;justify-content:center;gap:.875rem;overflow:hidden;padding:.75rem 1rem 1rem;cursor:default}.dashboard-performance-gauge.is-clickable{cursor:pointer}.dashboard-performance-gauge__figure{position:relative;width:min(100%,28rem);min-width:12rem;max-width:100%;transform-origin:center bottom}.dashboard-performance-gauge__svg{display:block;width:100%;height:auto;overflow:visible}.dashboard-performance-gauge__center{position:absolute;left:50%;top:72%;display:flex;max-width:90%;transform:translate(-50%,-50%);flex-direction:column;align-items:center;gap:.125rem;text-align:center;pointer-events:none}.dashboard-performance-gauge__value{font-size:2.75rem;font-weight:800;line-height:1;color:var(--dashboard-performance-status-color, #334155)}.dashboard-performance-gauge__label{max-width:18rem;overflow:hidden;color:#475569;font-size:.95rem;font-weight:600;text-overflow:ellipsis;white-space:nowrap}.dashboard-performance-gauge__status{display:inline-flex;max-width:min(80%,18rem);align-items:center;justify-content:center;gap:.375rem;border-radius:999px;padding:.25rem .625rem;background:color-mix(in srgb,var(--dashboard-performance-status-color, #64748b) 10%,transparent);color:var(--dashboard-performance-status-color, #475569);font-size:.8125rem;font-weight:700;line-height:1.2}.dashboard-performance-gauge__status-dot{width:.5rem;height:.5rem;flex:0 0 auto;border-radius:999px;background:currentColor}.dashboard-performance-gauge__status-text{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: CardContentComponent, selector: "mt-card-content", inputs: ["title", "inGroup", "groupHeader", "headerConfig", "styleConfig", "cardStyleConfig", "density", "padding", "showHeader", "headerClickable", "isNoTopEnd", "isChart", "titleEditable"], outputs: ["headerClick", "titleChange"] }, { kind: "component", type: CardFilterComponent, selector: "mt-card-filter", inputs: ["config", "dashboardId"], outputs: ["filterChange"] }, { kind: "component", type: StaticFiltersComponent, selector: "mt-static-filters", inputs: ["config", "dashboardId"], outputs: ["filterChange"] }, { kind: "component", type: DynamicFiltersComponent, selector: "mt-dynamic-filters", inputs: ["fields", "dashboardId", "reportId", "showLabels"], outputs: ["filterChange", "filtersChange"] }, { kind: "component", type: CardInfoComponent, selector: "mt-card-info", inputs: ["cardInfo"] }, { kind: "component", type: EChartComponent, selector: "mt-echart", inputs: ["dashboardId", "chartConfig", "configurationItem", "height", "inGroup", "headerHidden"], outputs: ["chartClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, deferBlockDependencies: [() => [import('@masterteam/timeline').then(m => m.Timeline), import('@masterteam/timeline').then(m => m.TimelineColumnTemplateDirective), import('@masterteam/timeline').then(m => m.TimelinePopoverTemplateDirective), import('@masterteam/components/entities').then(m => m.EntitiesPreview), import('@masterteam/components/entities').then(m => m.EntityPreview), import('@masterteam/icons').then(m => m.Icon)]] });
|
|
28885
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: ChartCardComponent, isStandalone: true, selector: "mt-chart-card", inputs: { dashboardId: { classPropertyName: "dashboardId", publicName: "dashboardId", isSignal: true, isRequired: true, transformFunction: null }, reportId: { classPropertyName: "reportId", publicName: "reportId", isSignal: true, isRequired: false, transformFunction: null }, inGroup: { classPropertyName: "inGroup", publicName: "inGroup", isSignal: true, isRequired: false, transformFunction: null }, isConfigMode: { classPropertyName: "isConfigMode", publicName: "isConfigMode", isSignal: true, isRequired: false, transformFunction: null }, titleEditable: { classPropertyName: "titleEditable", publicName: "titleEditable", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onAction: "onAction", onConfigure: "onConfigure", onTitleChange: "onTitleChange" }, ngImport: i0, template: "<ng-template #timelineLegendList>\r\n <div\r\n class=\"dashboard-timeline-legend\"\r\n [attr.data-position]=\"timelineLegendPosition()\"\r\n >\r\n @for (label of timelineLabels(); track $index) {\r\n <span\r\n class=\"dashboard-timeline-legend-item\"\r\n [title]=\"label.label || label.name || label.key\"\r\n >\r\n <span\r\n class=\"dashboard-timeline-legend-marker\"\r\n [class.shape-rect]=\"label.shape === 'rect'\"\r\n [class.shape-roundRect]=\"label.shape === 'roundRect'\"\r\n [class.shape-diamond]=\"label.shape === 'diamond'\"\r\n [class.shape-triangle]=\"label.shape === 'triangle'\"\r\n [style.background]=\"\r\n label.shape === 'triangle' ? null : label.color || '#64748b'\r\n \"\r\n [style.border-bottom-color]=\"\r\n label.shape === 'triangle' ? label.color || '#64748b' : null\r\n \"\r\n ></span>\r\n <span class=\"dashboard-timeline-legend-label\">\r\n {{ label.label || label.name || label.key }}\r\n </span>\r\n </span>\r\n }\r\n </div>\r\n</ng-template>\r\n\r\n<mt-card-content\r\n [inGroup]=\"inGroup()\"\r\n [headerConfig]=\"\r\n configurationItem()?.clientConfig?.configAsType?.['headerCardConfig']\r\n \"\r\n [styleConfig]=\"\r\n configurationItem()?.clientConfig?.displayConfig?.['StyleConfig']\r\n \"\r\n [cardStyleConfig]=\"\r\n configurationItem()?.clientConfig?.configAsType?.['cardStyleConfig']\r\n \"\r\n [density]=\"configurationItem()?.clientConfig?.configAsType?.['density']\"\r\n [padding]=\"configurationItem()?.clientConfig?.configAsType?.['padding']\"\r\n [title]=\"title()\"\r\n [titleEditable]=\"titleEditable()\"\r\n (titleChange)=\"onTitleChange.emit($event)\"\r\n [isNoTopEnd]=\"!showTopEnd()\"\r\n [isChart]=\"true\"\r\n (headerClick)=\"onHeaderClick()\"\r\n>\r\n <ng-container topEnd>\r\n @if (showStaticFilters()) {\r\n <mt-static-filters\r\n [config]=\"staticFilterConfig()\"\r\n [dashboardId]=\"dashboardId()\"\r\n >\r\n </mt-static-filters>\r\n }\r\n @if (showDynamicFilters()) {\r\n <mt-dynamic-filters\r\n [fields]=\"dynamicFilterFields()\"\r\n [dashboardId]=\"dashboardId()\"\r\n [reportId]=\"reportId()\"\r\n [showLabels]=\"false\"\r\n >\r\n </mt-dynamic-filters>\r\n }\r\n @if (showFilter()) {\r\n <mt-card-filter [config]=\"filterConfig()\" [dashboardId]=\"dashboardId()\">\r\n </mt-card-filter>\r\n }\r\n @if (cardInfoConfig()?.show && cardInfoConfig()?.value) {\r\n <mt-card-info [cardInfo]=\"cardInfoConfig()\"></mt-card-info>\r\n }\r\n </ng-container>\r\n\r\n <ng-container body>\r\n <div\r\n class=\"chart-container\"\r\n [class.config-mode]=\"isConfigMode()\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n >\r\n @if (componentViewMode() === \"splitter\" && hasSplitterData()) {\r\n <div\r\n class=\"splitter-view\"\r\n [class.splitter-vertical]=\"splitterOrientation() === 'vertical'\"\r\n [style.gap.px]=\"splitterGap()\"\r\n >\r\n <div class=\"splitter-side splitter-positive\">\r\n <div class=\"splitter-count\">\r\n {{ dataHandled()?.positive?.groupedValue ?? 0 }}\r\n </div>\r\n <ul class=\"splitter-labels\">\r\n @for (\r\n label of dataHandled()?.positive?.labels || [];\r\n track $index\r\n ) {\r\n <li>{{ label }}</li>\r\n }\r\n </ul>\r\n </div>\r\n <div class=\"splitter-divider\"></div>\r\n <div class=\"splitter-side splitter-negative\">\r\n <div class=\"splitter-count\">\r\n {{ dataHandled()?.negative?.groupedValue ?? 0 }}\r\n </div>\r\n <ul class=\"splitter-labels\">\r\n @for (\r\n label of dataHandled()?.negative?.labels || [];\r\n track $index\r\n ) {\r\n <li>{{ label }}</li>\r\n }\r\n </ul>\r\n </div>\r\n </div>\r\n } @else if (componentViewMode() === \"timeline\" && hasTimelineData()) {\r\n <div\r\n class=\"dashboard-timeline-view\"\r\n [attr.data-legend-position]=\"timelineLegendPosition()\"\r\n [style.--timeline-header-bg]=\"timelineHeaderBgColor()\"\r\n [style.--timeline-header-color]=\"timelineHeaderTextColor()\"\r\n >\r\n @if (\r\n timelineLegendShow() &&\r\n timelineLabels().length &&\r\n (timelineLegendPosition() === \"top\" ||\r\n timelineLegendPosition() === \"left\")\r\n ) {\r\n <ng-container [ngTemplateOutlet]=\"timelineLegendList\" />\r\n }\r\n\r\n @defer (on viewport) {\r\n <mt-timeline\r\n class=\"dashboard-timeline-renderer\"\r\n [showHeader]=\"false\"\r\n [showZoomToFitControl]=\"false\"\r\n [timelineMode]=\"timelineMode()\"\r\n (timelineModeChange)=\"timelineMode.set($event)\"\r\n [ganttData]=\"timelineResources()\"\r\n [ganttMapping]=\"timelineGanttMapping\"\r\n [columns]=\"timelineColumns()\"\r\n [defaultVisibleColumns]=\"2\"\r\n [columnsPaneMinWidthPx]=\"220\"\r\n [columnsPaneMaxWidthPx]=\"520\"\r\n [enableVirtualScroll]=\"true\"\r\n [virtualScrollThreshold]=\"0\"\r\n [virtualScrollBodyHeightPx]=\"520\"\r\n [showGanttDetailsPopup]=\"true\"\r\n [emptyMessage]=\"t('noChartData')\"\r\n >\r\n <ng-template\r\n mtTimelineColumn=\"title\"\r\n let-item=\"item\"\r\n let-resolved=\"resolved\"\r\n let-canToggle=\"canToggle\"\r\n let-isCollapsed=\"isCollapsed\"\r\n let-toggle=\"toggle\"\r\n >\r\n <div\r\n class=\"dashboard-timeline-title-cell\"\r\n [style.padding-inline-start.px]=\"\r\n $any(resolved).levelDepth * 16\r\n \"\r\n >\r\n @if (canToggle) {\r\n <mt-icon\r\n class=\"dashboard-timeline-title-toggle\"\r\n [icon]=\"timelineCollapseIcon(isCollapsed)\"\r\n (click)=\"$event.stopPropagation(); toggle()\"\r\n ></mt-icon>\r\n } @else {\r\n <span class=\"dashboard-timeline-title-spacer\"></span>\r\n }\r\n\r\n <button\r\n type=\"button\"\r\n class=\"dashboard-timeline-title-action\"\r\n [title]=\"$any(resolved).title\"\r\n (click)=\"onTimelineTitleClick(item, $event)\"\r\n >\r\n {{ $any(resolved).title }}\r\n </button>\r\n </div>\r\n </ng-template>\r\n\r\n @for (column of timelineEntityColumns(); track column.key) {\r\n <ng-template [mtTimelineColumn]=\"column.key\" let-value=\"value\">\r\n <mt-entity-preview\r\n class=\"dashboard-timeline-column-entity\"\r\n [data]=\"timelineColumnEntityData(value)\"\r\n attachmentShape=\"compact\"\r\n ></mt-entity-preview>\r\n </ng-template>\r\n }\r\n\r\n <ng-template mtTimelinePopover let-item=\"item\">\r\n @if (timelinePopoverEntities(item); as entities) {\r\n @if (entities.length) {\r\n <div\r\n class=\"w-[27rem] max-w-[90vw] max-h-[24rem] overflow-auto p-2\"\r\n >\r\n <mt-entities-preview\r\n [entities]=\"entities\"\r\n [stackOnNarrow]=\"false\"\r\n />\r\n </div>\r\n }\r\n }\r\n </ng-template>\r\n </mt-timeline>\r\n } @placeholder {\r\n <div class=\"dashboard-timeline-placeholder\" aria-hidden=\"true\">\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n </div>\r\n }\r\n\r\n @if (\r\n timelineLegendShow() &&\r\n timelineLabels().length &&\r\n (timelineLegendPosition() === \"bottom\" ||\r\n timelineLegendPosition() === \"right\")\r\n ) {\r\n <ng-container [ngTemplateOutlet]=\"timelineLegendList\" />\r\n }\r\n </div>\r\n } @else if (\r\n componentViewMode() === \"phaseGateStepper\" && hasPhaseGateData()\r\n ) {\r\n <div\r\n class=\"phase-gate-view\"\r\n [class.phase-gate-compact]=\"phaseGateCompact()\"\r\n >\r\n <ol class=\"phase-steps\">\r\n @for (step of phaseGateSteps(); track $index) {\r\n <li\r\n class=\"phase-step\"\r\n [class.is-current]=\"$index === phaseGateCurrentIndex()\"\r\n [class.is-done]=\"$index < phaseGateCurrentIndex()\"\r\n >\r\n <span class=\"phase-step-number\">{{ $index + 1 }}</span>\r\n @if (phaseGateShowLabels()) {\r\n <span class=\"phase-step-name\">{{\r\n step?.name || step?.title || step?.label || t(\"phase\")\r\n }}</span>\r\n }\r\n </li>\r\n }\r\n </ol>\r\n </div>\r\n } @else if (\r\n componentViewMode() === \"performanceGauge\" &&\r\n dataHandled() &&\r\n !dataHandled()?.noData\r\n ) {\r\n @let gauge = performanceGauge();\r\n <div\r\n class=\"dashboard-performance-gauge\"\r\n [class.is-clickable]=\"hasActions()\"\r\n [style.--dashboard-performance-status-color]=\"gauge.status.color\"\r\n (click)=\"onPerformanceGaugeClick($event)\"\r\n >\r\n <div\r\n class=\"dashboard-performance-gauge__figure\"\r\n [style.width.%]=\"gauge.scalePercent\"\r\n >\r\n <svg\r\n class=\"dashboard-performance-gauge__svg\"\r\n viewBox=\"0 0 100 72\"\r\n role=\"img\"\r\n [attr.aria-label]=\"gauge.label + ' ' + gauge.display\"\r\n >\r\n <path\r\n d=\"M 8 58 A 42 42 0 0 1 92 58\"\r\n fill=\"none\"\r\n stroke=\"#e5e7eb\"\r\n stroke-width=\"6\"\r\n stroke-linecap=\"round\"\r\n pathLength=\"100\"\r\n ></path>\r\n\r\n @for (segment of performanceGaugeSegments(); track segment.key) {\r\n <path\r\n d=\"M 8 58 A 42 42 0 0 1 92 58\"\r\n fill=\"none\"\r\n [attr.stroke]=\"segment.color\"\r\n stroke-width=\"6\"\r\n stroke-linecap=\"round\"\r\n pathLength=\"100\"\r\n [attr.stroke-dasharray]=\"segment.dashArray\"\r\n [attr.stroke-dashoffset]=\"segment.dashOffset\"\r\n [style.opacity]=\"segment.opacity\"\r\n ></path>\r\n <text\r\n [attr.x]=\"segment.labelX\"\r\n [attr.y]=\"segment.labelY\"\r\n text-anchor=\"middle\"\r\n dominant-baseline=\"central\"\r\n font-size=\"5.5\"\r\n font-weight=\"700\"\r\n fill=\"#334155\"\r\n >\r\n {{ segment.label }}\r\n </text>\r\n }\r\n\r\n <circle\r\n [attr.cx]=\"gauge.marker.x\"\r\n [attr.cy]=\"gauge.marker.y\"\r\n r=\"4.5\"\r\n fill=\"#fff\"\r\n [attr.stroke]=\"gauge.status.color\"\r\n stroke-width=\"3\"\r\n ></circle>\r\n </svg>\r\n\r\n <div class=\"dashboard-performance-gauge__center\">\r\n <div class=\"dashboard-performance-gauge__value\">\r\n {{ gauge.display }}\r\n </div>\r\n <div class=\"dashboard-performance-gauge__label\">\r\n {{ gauge.label }}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div\r\n class=\"dashboard-performance-gauge__status\"\r\n [title]=\"performanceGaugeStatusName()\"\r\n >\r\n <span class=\"dashboard-performance-gauge__status-dot\"></span>\r\n <span class=\"dashboard-performance-gauge__status-text\">\r\n {{ performanceGaugeStatusName() }}\r\n </span>\r\n </div>\r\n </div>\r\n } @else if (componentViewMode() === \"map\" && dataHandled()) {\r\n <mt-map-view\r\n [dashboardId]=\"dashboardId()\"\r\n [configurationItem]=\"configurationItem()\"\r\n [inGroup]=\"inGroup()\"\r\n [groups]=\"mapGroups()\"\r\n [config]=\"mapViewConfig()\"\r\n [showLegend]=\"mapLegendShow()\"\r\n [legendPosition]=\"mapLegendPosition()\"\r\n [legendIcon]=\"mapLegendIcon()\"\r\n (pointClick)=\"onMapPointClick($event)\"\r\n />\r\n } @else if (dataHandled() && !dataHandled()?.noData) {\r\n <mt-echart\r\n [dashboardId]=\"dashboardId()\"\r\n [chartConfig]=\"dataHandled()\"\r\n [configurationItem]=\"configurationItem()\"\r\n [inGroup]=\"inGroup()\"\r\n (chartClick)=\"onChartClick($event)\"\r\n >\r\n </mt-echart>\r\n } @else if (dataHandled()?.noData) {\r\n <div class=\"no-data-container\">\r\n <i class=\"pi pi-info-circle\"></i>\r\n <span>{{ t(\"noChartData\") }}</span>\r\n </div>\r\n } @else {\r\n <div class=\"loading-container\">\r\n <div class=\"loading-spinner\"></div>\r\n </div>\r\n }\r\n </div>\r\n </ng-container>\r\n</mt-card-content>\r\n", styles: [":host{display:block;height:100%}.chart-container{height:100%;min-height:0}.chart-container.config-mode{min-height:400px}.no-data-container,.needs-config-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;min-height:0;color:#999;gap:.5rem;padding:1rem;text-align:center}.no-data-container i,.needs-config-container i{font-size:2rem}.needs-config-container .title{font-weight:600;color:#555;font-size:.95rem}.needs-config-container .hint{font-size:.8rem;max-width:28rem;line-height:1.4}.needs-config-container .configure-btn{margin-top:.5rem;display:inline-flex;align-items:center;gap:.4rem;padding:.4rem .9rem;font-size:.85rem;font-weight:600;color:#fff;background:var(--p-primary-500, #2563eb);border:0;border-radius:.375rem;cursor:pointer;box-shadow:0 1px 2px #0000000d}.needs-config-container .configure-btn:hover{background:var(--p-primary-600, #1d4ed8)}.loading-container{display:flex;align-items:center;justify-content:center;height:100%;min-height:0}.loading-spinner{width:2rem;height:2rem;border:3px solid #f0f0f0;border-top-color:#4caf50;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.splitter-view{display:flex;align-items:stretch;height:100%;gap:.5rem}.splitter-view.splitter-vertical{flex-direction:column}.splitter-view.splitter-vertical .splitter-divider{width:auto;height:1px}.splitter-side{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;padding:1rem;border-radius:.5rem}.splitter-positive{background:#22c55e14}.splitter-negative{background:#ef444414}.splitter-count{font-size:2rem;font-weight:700;margin-bottom:.5rem}.splitter-positive .splitter-count{color:#16a34a}.splitter-negative .splitter-count{color:#dc2626}.splitter-labels{list-style:none;padding:0;margin:0;text-align:center;font-size:.8rem;color:#555}.splitter-labels li{padding:.15rem 0}.splitter-divider{width:1px;background:#00000014}.dashboard-timeline-view{display:flex;flex-direction:column;gap:.625rem;height:100%;min-height:0;overflow:auto}.dashboard-timeline-view[data-legend-position=left],.dashboard-timeline-view[data-legend-position=right]{flex-direction:row;overflow:hidden}.dashboard-timeline-legend{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:.35rem .75rem;flex-shrink:0;min-width:0;max-width:100%}.dashboard-timeline-legend[data-position=left],.dashboard-timeline-legend[data-position=right]{max-width:12rem;max-height:100%;flex-direction:column;align-items:flex-start;justify-content:flex-start;flex-wrap:nowrap;overflow:auto}.dashboard-timeline-legend-item{display:inline-flex;align-items:center;gap:.25rem;max-width:12rem;padding:0;border:0;border-radius:0;font-size:.75rem;color:#475569;font-weight:500;line-height:1.2;background:transparent}.dashboard-timeline-legend-marker{display:inline-block;width:.625rem;height:.625rem;flex:0 0 auto;border-radius:999px}.dashboard-timeline-legend-marker.shape-rect{border-radius:0}.dashboard-timeline-legend-marker.shape-roundRect{border-radius:.2rem}.dashboard-timeline-legend-marker.shape-diamond{border-radius:.0625rem;transform:rotate(45deg)}.dashboard-timeline-legend-marker.shape-triangle{width:0;height:0;background:transparent!important;border-radius:0;border-left:.34rem solid transparent;border-right:.34rem solid transparent;border-bottom-width:.6rem;border-bottom-style:solid}.dashboard-timeline-legend-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dashboard-timeline-renderer{display:block;min-height:0;flex:1}.dashboard-timeline-placeholder{display:flex;min-height:260px;flex:1;flex-direction:column;gap:.75rem;padding:1rem}.dashboard-timeline-placeholder div{height:3rem;border-radius:.5rem;background:var(--p-surface-100);animation:dashboard-builder-pulse 1.2s ease-in-out infinite}@keyframes dashboard-builder-pulse{0%,to{opacity:.55}50%{opacity:1}}:host ::ng-deep .dashboard-timeline-renderer>div{margin-top:0}:host ::ng-deep .dashboard-timeline-view mt-timeline-gantt-header .bg-surface-50{background-color:var(--timeline-header-bg, var(--p-surface-50));color:var(--timeline-header-color, inherit)}.dashboard-timeline-column-entity{display:block;min-width:0}.dashboard-timeline-title-cell{display:flex;min-width:0;align-items:center;gap:.5rem;width:100%}.dashboard-timeline-title-toggle{flex:0 0 auto;cursor:pointer;color:#64748b}.dashboard-timeline-title-spacer{display:inline-block;width:1.25rem;flex:0 0 1.25rem}.dashboard-timeline-title-action{min-width:0;flex:1 1 auto;overflow:hidden;border:0;background:transparent;padding:0;color:#334155;cursor:pointer;font-size:.875rem;font-weight:600;text-align:start;text-overflow:ellipsis;white-space:nowrap}.dashboard-timeline-title-action:hover{color:var(--p-primary-600, #2563eb);text-decoration:underline}.phase-gate-view{height:100%;display:flex;align-items:center;justify-content:center;padding:1rem;overflow-x:auto}.phase-steps{display:flex;align-items:center;gap:.75rem;list-style:none;margin:0;padding:0}.phase-step{display:flex;align-items:center;gap:.5rem;padding:.4rem .75rem;border-radius:999px;background:#0000000a;font-size:.8rem;color:#555;white-space:nowrap}.phase-step-number{width:1.5rem;height:1.5rem;display:inline-flex;align-items:center;justify-content:center;border-radius:999px;font-weight:700;background:#0000000f;color:#666}.phase-step.is-done{background:#22c55e1a;color:#16a34a}.phase-step.is-done .phase-step-number{background:#16a34a;color:#fff}.phase-step.is-current{background:#2563eb1a;color:#2563eb;font-weight:600}.phase-step.is-current .phase-step-number{background:#2563eb;color:#fff}.phase-gate-view.phase-gate-compact .phase-step{padding:.2rem .45rem;font-size:.7rem;gap:.25rem}.phase-gate-view.phase-gate-compact .phase-step-number{width:1.1rem;height:1.1rem;font-size:.7rem}.dashboard-performance-gauge{display:flex;height:100%;min-height:0;width:100%;flex-direction:column;align-items:center;justify-content:center;gap:.875rem;overflow:hidden;padding:.75rem 1rem 1rem;cursor:default}.dashboard-performance-gauge.is-clickable{cursor:pointer}.dashboard-performance-gauge__figure{position:relative;width:min(100%,28rem);min-width:12rem;max-width:100%;transform-origin:center bottom}.dashboard-performance-gauge__svg{display:block;width:100%;height:auto;overflow:visible}.dashboard-performance-gauge__center{position:absolute;left:50%;top:72%;display:flex;max-width:90%;transform:translate(-50%,-50%);flex-direction:column;align-items:center;gap:.125rem;text-align:center;pointer-events:none}.dashboard-performance-gauge__value{font-size:2.75rem;font-weight:800;line-height:1;color:var(--dashboard-performance-status-color, #334155)}.dashboard-performance-gauge__label{max-width:18rem;overflow:hidden;color:#475569;font-size:.95rem;font-weight:600;text-overflow:ellipsis;white-space:nowrap}.dashboard-performance-gauge__status{display:inline-flex;max-width:min(80%,18rem);align-items:center;justify-content:center;gap:.375rem;border-radius:999px;padding:.25rem .625rem;background:color-mix(in srgb,var(--dashboard-performance-status-color, #64748b) 10%,transparent);color:var(--dashboard-performance-status-color, #475569);font-size:.8125rem;font-weight:700;line-height:1.2}.dashboard-performance-gauge__status-dot{width:.5rem;height:.5rem;flex:0 0 auto;border-radius:999px;background:currentColor}.dashboard-performance-gauge__status-text{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: CardContentComponent, selector: "mt-card-content", inputs: ["title", "inGroup", "groupHeader", "headerConfig", "styleConfig", "cardStyleConfig", "density", "padding", "showHeader", "headerClickable", "isNoTopEnd", "isChart", "titleEditable"], outputs: ["headerClick", "titleChange"] }, { kind: "component", type: CardFilterComponent, selector: "mt-card-filter", inputs: ["config", "dashboardId"], outputs: ["filterChange"] }, { kind: "component", type: StaticFiltersComponent, selector: "mt-static-filters", inputs: ["config", "dashboardId"], outputs: ["filterChange"] }, { kind: "component", type: DynamicFiltersComponent, selector: "mt-dynamic-filters", inputs: ["fields", "dashboardId", "reportId", "showLabels"], outputs: ["filterChange", "filtersChange"] }, { kind: "component", type: CardInfoComponent, selector: "mt-card-info", inputs: ["cardInfo"] }, { kind: "component", type: EChartComponent, selector: "mt-echart", inputs: ["dashboardId", "chartConfig", "configurationItem", "height", "inGroup", "headerHidden"], outputs: ["chartClick"] }, { kind: "component", type: MapViewComponent, selector: "mt-map-view", inputs: ["groups", "config", "showLegend", "legendPosition", "legendIcon", "dashboardId", "configurationItem", "inGroup"], outputs: ["pointClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, deferBlockDependencies: [() => [import('@masterteam/timeline').then(m => m.Timeline), import('@masterteam/timeline').then(m => m.TimelineColumnTemplateDirective), import('@masterteam/timeline').then(m => m.TimelinePopoverTemplateDirective), import('@masterteam/components/entities').then(m => m.EntitiesPreview), import('@masterteam/components/entities').then(m => m.EntityPreview), import('@masterteam/icons').then(m => m.Icon)]] });
|
|
28584
28886
|
}
|
|
28585
28887
|
i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "21.2.8", ngImport: i0, type: ChartCardComponent, resolveDeferredDeps: () => [import('@masterteam/timeline').then(m => m.Timeline), import('@masterteam/timeline').then(m => m.TimelineColumnTemplateDirective), import('@masterteam/timeline').then(m => m.TimelinePopoverTemplateDirective), import('@masterteam/components/entities').then(m => m.EntitiesPreview), import('@masterteam/components/entities').then(m => m.EntityPreview), import('@masterteam/icons').then(m => m.Icon)], resolveMetadata: (Timeline, TimelineColumnTemplateDirective, TimelinePopoverTemplateDirective, EntitiesPreview, EntityPreview, Icon) => ({ decorators: [{
|
|
28586
28888
|
type: Component,
|
|
@@ -28593,13 +28895,14 @@ i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "21.2.8", ng
|
|
|
28593
28895
|
DynamicFiltersComponent,
|
|
28594
28896
|
CardInfoComponent,
|
|
28595
28897
|
EChartComponent,
|
|
28898
|
+
MapViewComponent,
|
|
28596
28899
|
TimelineComponent,
|
|
28597
28900
|
TimelineColumnTemplateDirective,
|
|
28598
28901
|
TimelinePopoverTemplateDirective,
|
|
28599
28902
|
EntitiesPreview,
|
|
28600
28903
|
EntityPreview,
|
|
28601
28904
|
Icon,
|
|
28602
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template #timelineLegendList>\r\n <div\r\n class=\"dashboard-timeline-legend\"\r\n [attr.data-position]=\"timelineLegendPosition()\"\r\n >\r\n @for (label of timelineLabels(); track $index) {\r\n <span\r\n class=\"dashboard-timeline-legend-item\"\r\n [title]=\"label.label || label.name || label.key\"\r\n >\r\n <span\r\n class=\"dashboard-timeline-legend-marker\"\r\n [class.shape-rect]=\"label.shape === 'rect'\"\r\n [class.shape-roundRect]=\"label.shape === 'roundRect'\"\r\n [class.shape-diamond]=\"label.shape === 'diamond'\"\r\n [class.shape-triangle]=\"label.shape === 'triangle'\"\r\n [style.background]=\"\r\n label.shape === 'triangle' ? null : label.color || '#64748b'\r\n \"\r\n [style.border-bottom-color]=\"\r\n label.shape === 'triangle' ? label.color || '#64748b' : null\r\n \"\r\n ></span>\r\n <span class=\"dashboard-timeline-legend-label\">\r\n {{ label.label || label.name || label.key }}\r\n </span>\r\n </span>\r\n }\r\n </div>\r\n</ng-template>\r\n\r\n<mt-card-content\r\n [inGroup]=\"inGroup()\"\r\n [headerConfig]=\"\r\n configurationItem()?.clientConfig?.configAsType?.['headerCardConfig']\r\n \"\r\n [styleConfig]=\"\r\n configurationItem()?.clientConfig?.displayConfig?.['StyleConfig']\r\n \"\r\n [cardStyleConfig]=\"\r\n configurationItem()?.clientConfig?.configAsType?.['cardStyleConfig']\r\n \"\r\n [density]=\"configurationItem()?.clientConfig?.configAsType?.['density']\"\r\n [padding]=\"configurationItem()?.clientConfig?.configAsType?.['padding']\"\r\n [title]=\"title()\"\r\n [titleEditable]=\"titleEditable()\"\r\n (titleChange)=\"onTitleChange.emit($event)\"\r\n [isNoTopEnd]=\"!showTopEnd()\"\r\n [isChart]=\"true\"\r\n (headerClick)=\"onHeaderClick()\"\r\n>\r\n <ng-container topEnd>\r\n @if (showStaticFilters()) {\r\n <mt-static-filters\r\n [config]=\"staticFilterConfig()\"\r\n [dashboardId]=\"dashboardId()\"\r\n >\r\n </mt-static-filters>\r\n }\r\n @if (showDynamicFilters()) {\r\n <mt-dynamic-filters\r\n [fields]=\"dynamicFilterFields()\"\r\n [dashboardId]=\"dashboardId()\"\r\n [reportId]=\"reportId()\"\r\n [showLabels]=\"false\"\r\n >\r\n </mt-dynamic-filters>\r\n }\r\n @if (showFilter()) {\r\n <mt-card-filter [config]=\"filterConfig()\" [dashboardId]=\"dashboardId()\">\r\n </mt-card-filter>\r\n }\r\n @if (cardInfoConfig()?.show && cardInfoConfig()?.value) {\r\n <mt-card-info [cardInfo]=\"cardInfoConfig()\"></mt-card-info>\r\n }\r\n </ng-container>\r\n\r\n <ng-container body>\r\n <div\r\n class=\"chart-container\"\r\n [class.config-mode]=\"isConfigMode()\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n >\r\n @if (componentViewMode() === \"splitter\" && hasSplitterData()) {\r\n <div\r\n class=\"splitter-view\"\r\n [class.splitter-vertical]=\"splitterOrientation() === 'vertical'\"\r\n [style.gap.px]=\"splitterGap()\"\r\n >\r\n <div class=\"splitter-side splitter-positive\">\r\n <div class=\"splitter-count\">\r\n {{ dataHandled()?.positive?.groupedValue ?? 0 }}\r\n </div>\r\n <ul class=\"splitter-labels\">\r\n @for (\r\n label of dataHandled()?.positive?.labels || [];\r\n track $index\r\n ) {\r\n <li>{{ label }}</li>\r\n }\r\n </ul>\r\n </div>\r\n <div class=\"splitter-divider\"></div>\r\n <div class=\"splitter-side splitter-negative\">\r\n <div class=\"splitter-count\">\r\n {{ dataHandled()?.negative?.groupedValue ?? 0 }}\r\n </div>\r\n <ul class=\"splitter-labels\">\r\n @for (\r\n label of dataHandled()?.negative?.labels || [];\r\n track $index\r\n ) {\r\n <li>{{ label }}</li>\r\n }\r\n </ul>\r\n </div>\r\n </div>\r\n } @else if (componentViewMode() === \"timeline\" && hasTimelineData()) {\r\n <div\r\n class=\"dashboard-timeline-view\"\r\n [attr.data-legend-position]=\"timelineLegendPosition()\"\r\n [style.--timeline-header-bg]=\"timelineHeaderBgColor()\"\r\n [style.--timeline-header-color]=\"timelineHeaderTextColor()\"\r\n >\r\n @if (\r\n timelineLegendShow() &&\r\n timelineLabels().length &&\r\n (timelineLegendPosition() === \"top\" ||\r\n timelineLegendPosition() === \"left\")\r\n ) {\r\n <ng-container [ngTemplateOutlet]=\"timelineLegendList\" />\r\n }\r\n\r\n @defer (on viewport) {\r\n <mt-timeline\r\n class=\"dashboard-timeline-renderer\"\r\n [showHeader]=\"false\"\r\n [showZoomToFitControl]=\"false\"\r\n [timelineMode]=\"timelineMode()\"\r\n (timelineModeChange)=\"timelineMode.set($event)\"\r\n [ganttData]=\"timelineResources()\"\r\n [ganttMapping]=\"timelineGanttMapping\"\r\n [columns]=\"timelineColumns()\"\r\n [defaultVisibleColumns]=\"2\"\r\n [columnsPaneMinWidthPx]=\"220\"\r\n [columnsPaneMaxWidthPx]=\"520\"\r\n [enableVirtualScroll]=\"true\"\r\n [virtualScrollThreshold]=\"0\"\r\n [virtualScrollBodyHeightPx]=\"520\"\r\n [showGanttDetailsPopup]=\"true\"\r\n [emptyMessage]=\"t('noChartData')\"\r\n >\r\n <ng-template\r\n mtTimelineColumn=\"title\"\r\n let-item=\"item\"\r\n let-resolved=\"resolved\"\r\n let-canToggle=\"canToggle\"\r\n let-isCollapsed=\"isCollapsed\"\r\n let-toggle=\"toggle\"\r\n >\r\n <div\r\n class=\"dashboard-timeline-title-cell\"\r\n [style.padding-inline-start.px]=\"\r\n $any(resolved).levelDepth * 16\r\n \"\r\n >\r\n @if (canToggle) {\r\n <mt-icon\r\n class=\"dashboard-timeline-title-toggle\"\r\n [icon]=\"timelineCollapseIcon(isCollapsed)\"\r\n (click)=\"$event.stopPropagation(); toggle()\"\r\n ></mt-icon>\r\n } @else {\r\n <span class=\"dashboard-timeline-title-spacer\"></span>\r\n }\r\n\r\n <button\r\n type=\"button\"\r\n class=\"dashboard-timeline-title-action\"\r\n [title]=\"$any(resolved).title\"\r\n (click)=\"onTimelineTitleClick(item, $event)\"\r\n >\r\n {{ $any(resolved).title }}\r\n </button>\r\n </div>\r\n </ng-template>\r\n\r\n @for (column of timelineEntityColumns(); track column.key) {\r\n <ng-template [mtTimelineColumn]=\"column.key\" let-value=\"value\">\r\n <mt-entity-preview\r\n class=\"dashboard-timeline-column-entity\"\r\n [data]=\"timelineColumnEntityData(value)\"\r\n attachmentShape=\"compact\"\r\n ></mt-entity-preview>\r\n </ng-template>\r\n }\r\n\r\n <ng-template mtTimelinePopover let-item=\"item\">\r\n @if (timelinePopoverEntities(item); as entities) {\r\n @if (entities.length) {\r\n <div\r\n class=\"w-[27rem] max-w-[90vw] max-h-[24rem] overflow-auto p-2\"\r\n >\r\n <mt-entities-preview\r\n [entities]=\"entities\"\r\n [stackOnNarrow]=\"false\"\r\n />\r\n </div>\r\n }\r\n }\r\n </ng-template>\r\n </mt-timeline>\r\n } @placeholder {\r\n <div class=\"dashboard-timeline-placeholder\" aria-hidden=\"true\">\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n </div>\r\n }\r\n\r\n @if (\r\n timelineLegendShow() &&\r\n timelineLabels().length &&\r\n (timelineLegendPosition() === \"bottom\" ||\r\n timelineLegendPosition() === \"right\")\r\n ) {\r\n <ng-container [ngTemplateOutlet]=\"timelineLegendList\" />\r\n }\r\n </div>\r\n } @else if (\r\n componentViewMode() === \"phaseGateStepper\" && hasPhaseGateData()\r\n ) {\r\n <div\r\n class=\"phase-gate-view\"\r\n [class.phase-gate-compact]=\"phaseGateCompact()\"\r\n >\r\n <ol class=\"phase-steps\">\r\n @for (step of phaseGateSteps(); track $index) {\r\n <li\r\n class=\"phase-step\"\r\n [class.is-current]=\"$index === phaseGateCurrentIndex()\"\r\n [class.is-done]=\"$index < phaseGateCurrentIndex()\"\r\n >\r\n <span class=\"phase-step-number\">{{ $index + 1 }}</span>\r\n @if (phaseGateShowLabels()) {\r\n <span class=\"phase-step-name\">{{\r\n step?.name || step?.title || step?.label || t(\"phase\")\r\n }}</span>\r\n }\r\n </li>\r\n }\r\n </ol>\r\n </div>\r\n } @else if (\r\n componentViewMode() === \"performanceGauge\" &&\r\n dataHandled() &&\r\n !dataHandled()?.noData\r\n ) {\r\n @let gauge = performanceGauge();\r\n <div\r\n class=\"dashboard-performance-gauge\"\r\n [class.is-clickable]=\"hasActions()\"\r\n [style.--dashboard-performance-status-color]=\"gauge.status.color\"\r\n (click)=\"onPerformanceGaugeClick($event)\"\r\n >\r\n <div\r\n class=\"dashboard-performance-gauge__figure\"\r\n [style.width.%]=\"gauge.scalePercent\"\r\n >\r\n <svg\r\n class=\"dashboard-performance-gauge__svg\"\r\n viewBox=\"0 0 100 72\"\r\n role=\"img\"\r\n [attr.aria-label]=\"gauge.label + ' ' + gauge.display\"\r\n >\r\n <path\r\n d=\"M 8 58 A 42 42 0 0 1 92 58\"\r\n fill=\"none\"\r\n stroke=\"#e5e7eb\"\r\n stroke-width=\"6\"\r\n stroke-linecap=\"round\"\r\n pathLength=\"100\"\r\n ></path>\r\n\r\n @for (segment of performanceGaugeSegments(); track segment.key) {\r\n <path\r\n d=\"M 8 58 A 42 42 0 0 1 92 58\"\r\n fill=\"none\"\r\n [attr.stroke]=\"segment.color\"\r\n stroke-width=\"6\"\r\n stroke-linecap=\"round\"\r\n pathLength=\"100\"\r\n [attr.stroke-dasharray]=\"segment.dashArray\"\r\n [attr.stroke-dashoffset]=\"segment.dashOffset\"\r\n [style.opacity]=\"segment.opacity\"\r\n ></path>\r\n <text\r\n [attr.x]=\"segment.labelX\"\r\n [attr.y]=\"segment.labelY\"\r\n text-anchor=\"middle\"\r\n dominant-baseline=\"central\"\r\n font-size=\"5.5\"\r\n font-weight=\"700\"\r\n fill=\"#334155\"\r\n >\r\n {{ segment.label }}\r\n </text>\r\n }\r\n\r\n <circle\r\n [attr.cx]=\"gauge.marker.x\"\r\n [attr.cy]=\"gauge.marker.y\"\r\n r=\"4.5\"\r\n fill=\"#fff\"\r\n [attr.stroke]=\"gauge.status.color\"\r\n stroke-width=\"3\"\r\n ></circle>\r\n </svg>\r\n\r\n <div class=\"dashboard-performance-gauge__center\">\r\n <div class=\"dashboard-performance-gauge__value\">\r\n {{ gauge.display }}\r\n </div>\r\n <div class=\"dashboard-performance-gauge__label\">\r\n {{ gauge.label }}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div\r\n class=\"dashboard-performance-gauge__status\"\r\n [title]=\"performanceGaugeStatusName()\"\r\n >\r\n <span class=\"dashboard-performance-gauge__status-dot\"></span>\r\n <span class=\"dashboard-performance-gauge__status-text\">\r\n {{ performanceGaugeStatusName() }}\r\n </span>\r\n </div>\r\n </div>\r\n } @else if (dataHandled() && !dataHandled()?.noData) {\r\n <mt-echart\r\n [dashboardId]=\"dashboardId()\"\r\n [chartConfig]=\"dataHandled()\"\r\n [configurationItem]=\"configurationItem()\"\r\n [inGroup]=\"inGroup()\"\r\n (chartClick)=\"onChartClick($event)\"\r\n >\r\n </mt-echart>\r\n } @else if (dataHandled()?.noData) {\r\n <div class=\"no-data-container\">\r\n <i class=\"pi pi-info-circle\"></i>\r\n <span>{{ t(\"noChartData\") }}</span>\r\n </div>\r\n } @else {\r\n <div class=\"loading-container\">\r\n <div class=\"loading-spinner\"></div>\r\n </div>\r\n }\r\n </div>\r\n </ng-container>\r\n</mt-card-content>\r\n", styles: [":host{display:block;height:100%}.chart-container{height:100%;min-height:0}.chart-container.config-mode{min-height:400px}.no-data-container,.needs-config-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;min-height:0;color:#999;gap:.5rem;padding:1rem;text-align:center}.no-data-container i,.needs-config-container i{font-size:2rem}.needs-config-container .title{font-weight:600;color:#555;font-size:.95rem}.needs-config-container .hint{font-size:.8rem;max-width:28rem;line-height:1.4}.needs-config-container .configure-btn{margin-top:.5rem;display:inline-flex;align-items:center;gap:.4rem;padding:.4rem .9rem;font-size:.85rem;font-weight:600;color:#fff;background:var(--p-primary-500, #2563eb);border:0;border-radius:.375rem;cursor:pointer;box-shadow:0 1px 2px #0000000d}.needs-config-container .configure-btn:hover{background:var(--p-primary-600, #1d4ed8)}.loading-container{display:flex;align-items:center;justify-content:center;height:100%;min-height:0}.loading-spinner{width:2rem;height:2rem;border:3px solid #f0f0f0;border-top-color:#4caf50;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.splitter-view{display:flex;align-items:stretch;height:100%;gap:.5rem}.splitter-view.splitter-vertical{flex-direction:column}.splitter-view.splitter-vertical .splitter-divider{width:auto;height:1px}.splitter-side{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;padding:1rem;border-radius:.5rem}.splitter-positive{background:#22c55e14}.splitter-negative{background:#ef444414}.splitter-count{font-size:2rem;font-weight:700;margin-bottom:.5rem}.splitter-positive .splitter-count{color:#16a34a}.splitter-negative .splitter-count{color:#dc2626}.splitter-labels{list-style:none;padding:0;margin:0;text-align:center;font-size:.8rem;color:#555}.splitter-labels li{padding:.15rem 0}.splitter-divider{width:1px;background:#00000014}.dashboard-timeline-view{display:flex;flex-direction:column;gap:.625rem;height:100%;min-height:0;overflow:auto}.dashboard-timeline-view[data-legend-position=left],.dashboard-timeline-view[data-legend-position=right]{flex-direction:row;overflow:hidden}.dashboard-timeline-legend{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:.35rem .75rem;flex-shrink:0;min-width:0;max-width:100%}.dashboard-timeline-legend[data-position=left],.dashboard-timeline-legend[data-position=right]{max-width:12rem;max-height:100%;flex-direction:column;align-items:flex-start;justify-content:flex-start;flex-wrap:nowrap;overflow:auto}.dashboard-timeline-legend-item{display:inline-flex;align-items:center;gap:.25rem;max-width:12rem;padding:0;border:0;border-radius:0;font-size:.75rem;color:#475569;font-weight:500;line-height:1.2;background:transparent}.dashboard-timeline-legend-marker{display:inline-block;width:.625rem;height:.625rem;flex:0 0 auto;border-radius:999px}.dashboard-timeline-legend-marker.shape-rect{border-radius:0}.dashboard-timeline-legend-marker.shape-roundRect{border-radius:.2rem}.dashboard-timeline-legend-marker.shape-diamond{border-radius:.0625rem;transform:rotate(45deg)}.dashboard-timeline-legend-marker.shape-triangle{width:0;height:0;background:transparent!important;border-radius:0;border-left:.34rem solid transparent;border-right:.34rem solid transparent;border-bottom-width:.6rem;border-bottom-style:solid}.dashboard-timeline-legend-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dashboard-timeline-renderer{display:block;min-height:0;flex:1}.dashboard-timeline-placeholder{display:flex;min-height:260px;flex:1;flex-direction:column;gap:.75rem;padding:1rem}.dashboard-timeline-placeholder div{height:3rem;border-radius:.5rem;background:var(--p-surface-100);animation:dashboard-builder-pulse 1.2s ease-in-out infinite}@keyframes dashboard-builder-pulse{0%,to{opacity:.55}50%{opacity:1}}:host ::ng-deep .dashboard-timeline-renderer>div{margin-top:0}:host ::ng-deep .dashboard-timeline-view mt-timeline-gantt-header .bg-surface-50{background-color:var(--timeline-header-bg, var(--p-surface-50));color:var(--timeline-header-color, inherit)}.dashboard-timeline-column-entity{display:block;min-width:0}.dashboard-timeline-title-cell{display:flex;min-width:0;align-items:center;gap:.5rem;width:100%}.dashboard-timeline-title-toggle{flex:0 0 auto;cursor:pointer;color:#64748b}.dashboard-timeline-title-spacer{display:inline-block;width:1.25rem;flex:0 0 1.25rem}.dashboard-timeline-title-action{min-width:0;flex:1 1 auto;overflow:hidden;border:0;background:transparent;padding:0;color:#334155;cursor:pointer;font-size:.875rem;font-weight:600;text-align:start;text-overflow:ellipsis;white-space:nowrap}.dashboard-timeline-title-action:hover{color:var(--p-primary-600, #2563eb);text-decoration:underline}.phase-gate-view{height:100%;display:flex;align-items:center;justify-content:center;padding:1rem;overflow-x:auto}.phase-steps{display:flex;align-items:center;gap:.75rem;list-style:none;margin:0;padding:0}.phase-step{display:flex;align-items:center;gap:.5rem;padding:.4rem .75rem;border-radius:999px;background:#0000000a;font-size:.8rem;color:#555;white-space:nowrap}.phase-step-number{width:1.5rem;height:1.5rem;display:inline-flex;align-items:center;justify-content:center;border-radius:999px;font-weight:700;background:#0000000f;color:#666}.phase-step.is-done{background:#22c55e1a;color:#16a34a}.phase-step.is-done .phase-step-number{background:#16a34a;color:#fff}.phase-step.is-current{background:#2563eb1a;color:#2563eb;font-weight:600}.phase-step.is-current .phase-step-number{background:#2563eb;color:#fff}.phase-gate-view.phase-gate-compact .phase-step{padding:.2rem .45rem;font-size:.7rem;gap:.25rem}.phase-gate-view.phase-gate-compact .phase-step-number{width:1.1rem;height:1.1rem;font-size:.7rem}.dashboard-performance-gauge{display:flex;height:100%;min-height:0;width:100%;flex-direction:column;align-items:center;justify-content:center;gap:.875rem;overflow:hidden;padding:.75rem 1rem 1rem;cursor:default}.dashboard-performance-gauge.is-clickable{cursor:pointer}.dashboard-performance-gauge__figure{position:relative;width:min(100%,28rem);min-width:12rem;max-width:100%;transform-origin:center bottom}.dashboard-performance-gauge__svg{display:block;width:100%;height:auto;overflow:visible}.dashboard-performance-gauge__center{position:absolute;left:50%;top:72%;display:flex;max-width:90%;transform:translate(-50%,-50%);flex-direction:column;align-items:center;gap:.125rem;text-align:center;pointer-events:none}.dashboard-performance-gauge__value{font-size:2.75rem;font-weight:800;line-height:1;color:var(--dashboard-performance-status-color, #334155)}.dashboard-performance-gauge__label{max-width:18rem;overflow:hidden;color:#475569;font-size:.95rem;font-weight:600;text-overflow:ellipsis;white-space:nowrap}.dashboard-performance-gauge__status{display:inline-flex;max-width:min(80%,18rem);align-items:center;justify-content:center;gap:.375rem;border-radius:999px;padding:.25rem .625rem;background:color-mix(in srgb,var(--dashboard-performance-status-color, #64748b) 10%,transparent);color:var(--dashboard-performance-status-color, #475569);font-size:.8125rem;font-weight:700;line-height:1.2}.dashboard-performance-gauge__status-dot{width:.5rem;height:.5rem;flex:0 0 auto;border-radius:999px;background:currentColor}.dashboard-performance-gauge__status-text{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n"] }]
|
|
28905
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template #timelineLegendList>\r\n <div\r\n class=\"dashboard-timeline-legend\"\r\n [attr.data-position]=\"timelineLegendPosition()\"\r\n >\r\n @for (label of timelineLabels(); track $index) {\r\n <span\r\n class=\"dashboard-timeline-legend-item\"\r\n [title]=\"label.label || label.name || label.key\"\r\n >\r\n <span\r\n class=\"dashboard-timeline-legend-marker\"\r\n [class.shape-rect]=\"label.shape === 'rect'\"\r\n [class.shape-roundRect]=\"label.shape === 'roundRect'\"\r\n [class.shape-diamond]=\"label.shape === 'diamond'\"\r\n [class.shape-triangle]=\"label.shape === 'triangle'\"\r\n [style.background]=\"\r\n label.shape === 'triangle' ? null : label.color || '#64748b'\r\n \"\r\n [style.border-bottom-color]=\"\r\n label.shape === 'triangle' ? label.color || '#64748b' : null\r\n \"\r\n ></span>\r\n <span class=\"dashboard-timeline-legend-label\">\r\n {{ label.label || label.name || label.key }}\r\n </span>\r\n </span>\r\n }\r\n </div>\r\n</ng-template>\r\n\r\n<mt-card-content\r\n [inGroup]=\"inGroup()\"\r\n [headerConfig]=\"\r\n configurationItem()?.clientConfig?.configAsType?.['headerCardConfig']\r\n \"\r\n [styleConfig]=\"\r\n configurationItem()?.clientConfig?.displayConfig?.['StyleConfig']\r\n \"\r\n [cardStyleConfig]=\"\r\n configurationItem()?.clientConfig?.configAsType?.['cardStyleConfig']\r\n \"\r\n [density]=\"configurationItem()?.clientConfig?.configAsType?.['density']\"\r\n [padding]=\"configurationItem()?.clientConfig?.configAsType?.['padding']\"\r\n [title]=\"title()\"\r\n [titleEditable]=\"titleEditable()\"\r\n (titleChange)=\"onTitleChange.emit($event)\"\r\n [isNoTopEnd]=\"!showTopEnd()\"\r\n [isChart]=\"true\"\r\n (headerClick)=\"onHeaderClick()\"\r\n>\r\n <ng-container topEnd>\r\n @if (showStaticFilters()) {\r\n <mt-static-filters\r\n [config]=\"staticFilterConfig()\"\r\n [dashboardId]=\"dashboardId()\"\r\n >\r\n </mt-static-filters>\r\n }\r\n @if (showDynamicFilters()) {\r\n <mt-dynamic-filters\r\n [fields]=\"dynamicFilterFields()\"\r\n [dashboardId]=\"dashboardId()\"\r\n [reportId]=\"reportId()\"\r\n [showLabels]=\"false\"\r\n >\r\n </mt-dynamic-filters>\r\n }\r\n @if (showFilter()) {\r\n <mt-card-filter [config]=\"filterConfig()\" [dashboardId]=\"dashboardId()\">\r\n </mt-card-filter>\r\n }\r\n @if (cardInfoConfig()?.show && cardInfoConfig()?.value) {\r\n <mt-card-info [cardInfo]=\"cardInfoConfig()\"></mt-card-info>\r\n }\r\n </ng-container>\r\n\r\n <ng-container body>\r\n <div\r\n class=\"chart-container\"\r\n [class.config-mode]=\"isConfigMode()\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n >\r\n @if (componentViewMode() === \"splitter\" && hasSplitterData()) {\r\n <div\r\n class=\"splitter-view\"\r\n [class.splitter-vertical]=\"splitterOrientation() === 'vertical'\"\r\n [style.gap.px]=\"splitterGap()\"\r\n >\r\n <div class=\"splitter-side splitter-positive\">\r\n <div class=\"splitter-count\">\r\n {{ dataHandled()?.positive?.groupedValue ?? 0 }}\r\n </div>\r\n <ul class=\"splitter-labels\">\r\n @for (\r\n label of dataHandled()?.positive?.labels || [];\r\n track $index\r\n ) {\r\n <li>{{ label }}</li>\r\n }\r\n </ul>\r\n </div>\r\n <div class=\"splitter-divider\"></div>\r\n <div class=\"splitter-side splitter-negative\">\r\n <div class=\"splitter-count\">\r\n {{ dataHandled()?.negative?.groupedValue ?? 0 }}\r\n </div>\r\n <ul class=\"splitter-labels\">\r\n @for (\r\n label of dataHandled()?.negative?.labels || [];\r\n track $index\r\n ) {\r\n <li>{{ label }}</li>\r\n }\r\n </ul>\r\n </div>\r\n </div>\r\n } @else if (componentViewMode() === \"timeline\" && hasTimelineData()) {\r\n <div\r\n class=\"dashboard-timeline-view\"\r\n [attr.data-legend-position]=\"timelineLegendPosition()\"\r\n [style.--timeline-header-bg]=\"timelineHeaderBgColor()\"\r\n [style.--timeline-header-color]=\"timelineHeaderTextColor()\"\r\n >\r\n @if (\r\n timelineLegendShow() &&\r\n timelineLabels().length &&\r\n (timelineLegendPosition() === \"top\" ||\r\n timelineLegendPosition() === \"left\")\r\n ) {\r\n <ng-container [ngTemplateOutlet]=\"timelineLegendList\" />\r\n }\r\n\r\n @defer (on viewport) {\r\n <mt-timeline\r\n class=\"dashboard-timeline-renderer\"\r\n [showHeader]=\"false\"\r\n [showZoomToFitControl]=\"false\"\r\n [timelineMode]=\"timelineMode()\"\r\n (timelineModeChange)=\"timelineMode.set($event)\"\r\n [ganttData]=\"timelineResources()\"\r\n [ganttMapping]=\"timelineGanttMapping\"\r\n [columns]=\"timelineColumns()\"\r\n [defaultVisibleColumns]=\"2\"\r\n [columnsPaneMinWidthPx]=\"220\"\r\n [columnsPaneMaxWidthPx]=\"520\"\r\n [enableVirtualScroll]=\"true\"\r\n [virtualScrollThreshold]=\"0\"\r\n [virtualScrollBodyHeightPx]=\"520\"\r\n [showGanttDetailsPopup]=\"true\"\r\n [emptyMessage]=\"t('noChartData')\"\r\n >\r\n <ng-template\r\n mtTimelineColumn=\"title\"\r\n let-item=\"item\"\r\n let-resolved=\"resolved\"\r\n let-canToggle=\"canToggle\"\r\n let-isCollapsed=\"isCollapsed\"\r\n let-toggle=\"toggle\"\r\n >\r\n <div\r\n class=\"dashboard-timeline-title-cell\"\r\n [style.padding-inline-start.px]=\"\r\n $any(resolved).levelDepth * 16\r\n \"\r\n >\r\n @if (canToggle) {\r\n <mt-icon\r\n class=\"dashboard-timeline-title-toggle\"\r\n [icon]=\"timelineCollapseIcon(isCollapsed)\"\r\n (click)=\"$event.stopPropagation(); toggle()\"\r\n ></mt-icon>\r\n } @else {\r\n <span class=\"dashboard-timeline-title-spacer\"></span>\r\n }\r\n\r\n <button\r\n type=\"button\"\r\n class=\"dashboard-timeline-title-action\"\r\n [title]=\"$any(resolved).title\"\r\n (click)=\"onTimelineTitleClick(item, $event)\"\r\n >\r\n {{ $any(resolved).title }}\r\n </button>\r\n </div>\r\n </ng-template>\r\n\r\n @for (column of timelineEntityColumns(); track column.key) {\r\n <ng-template [mtTimelineColumn]=\"column.key\" let-value=\"value\">\r\n <mt-entity-preview\r\n class=\"dashboard-timeline-column-entity\"\r\n [data]=\"timelineColumnEntityData(value)\"\r\n attachmentShape=\"compact\"\r\n ></mt-entity-preview>\r\n </ng-template>\r\n }\r\n\r\n <ng-template mtTimelinePopover let-item=\"item\">\r\n @if (timelinePopoverEntities(item); as entities) {\r\n @if (entities.length) {\r\n <div\r\n class=\"w-[27rem] max-w-[90vw] max-h-[24rem] overflow-auto p-2\"\r\n >\r\n <mt-entities-preview\r\n [entities]=\"entities\"\r\n [stackOnNarrow]=\"false\"\r\n />\r\n </div>\r\n }\r\n }\r\n </ng-template>\r\n </mt-timeline>\r\n } @placeholder {\r\n <div class=\"dashboard-timeline-placeholder\" aria-hidden=\"true\">\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n </div>\r\n }\r\n\r\n @if (\r\n timelineLegendShow() &&\r\n timelineLabels().length &&\r\n (timelineLegendPosition() === \"bottom\" ||\r\n timelineLegendPosition() === \"right\")\r\n ) {\r\n <ng-container [ngTemplateOutlet]=\"timelineLegendList\" />\r\n }\r\n </div>\r\n } @else if (\r\n componentViewMode() === \"phaseGateStepper\" && hasPhaseGateData()\r\n ) {\r\n <div\r\n class=\"phase-gate-view\"\r\n [class.phase-gate-compact]=\"phaseGateCompact()\"\r\n >\r\n <ol class=\"phase-steps\">\r\n @for (step of phaseGateSteps(); track $index) {\r\n <li\r\n class=\"phase-step\"\r\n [class.is-current]=\"$index === phaseGateCurrentIndex()\"\r\n [class.is-done]=\"$index < phaseGateCurrentIndex()\"\r\n >\r\n <span class=\"phase-step-number\">{{ $index + 1 }}</span>\r\n @if (phaseGateShowLabels()) {\r\n <span class=\"phase-step-name\">{{\r\n step?.name || step?.title || step?.label || t(\"phase\")\r\n }}</span>\r\n }\r\n </li>\r\n }\r\n </ol>\r\n </div>\r\n } @else if (\r\n componentViewMode() === \"performanceGauge\" &&\r\n dataHandled() &&\r\n !dataHandled()?.noData\r\n ) {\r\n @let gauge = performanceGauge();\r\n <div\r\n class=\"dashboard-performance-gauge\"\r\n [class.is-clickable]=\"hasActions()\"\r\n [style.--dashboard-performance-status-color]=\"gauge.status.color\"\r\n (click)=\"onPerformanceGaugeClick($event)\"\r\n >\r\n <div\r\n class=\"dashboard-performance-gauge__figure\"\r\n [style.width.%]=\"gauge.scalePercent\"\r\n >\r\n <svg\r\n class=\"dashboard-performance-gauge__svg\"\r\n viewBox=\"0 0 100 72\"\r\n role=\"img\"\r\n [attr.aria-label]=\"gauge.label + ' ' + gauge.display\"\r\n >\r\n <path\r\n d=\"M 8 58 A 42 42 0 0 1 92 58\"\r\n fill=\"none\"\r\n stroke=\"#e5e7eb\"\r\n stroke-width=\"6\"\r\n stroke-linecap=\"round\"\r\n pathLength=\"100\"\r\n ></path>\r\n\r\n @for (segment of performanceGaugeSegments(); track segment.key) {\r\n <path\r\n d=\"M 8 58 A 42 42 0 0 1 92 58\"\r\n fill=\"none\"\r\n [attr.stroke]=\"segment.color\"\r\n stroke-width=\"6\"\r\n stroke-linecap=\"round\"\r\n pathLength=\"100\"\r\n [attr.stroke-dasharray]=\"segment.dashArray\"\r\n [attr.stroke-dashoffset]=\"segment.dashOffset\"\r\n [style.opacity]=\"segment.opacity\"\r\n ></path>\r\n <text\r\n [attr.x]=\"segment.labelX\"\r\n [attr.y]=\"segment.labelY\"\r\n text-anchor=\"middle\"\r\n dominant-baseline=\"central\"\r\n font-size=\"5.5\"\r\n font-weight=\"700\"\r\n fill=\"#334155\"\r\n >\r\n {{ segment.label }}\r\n </text>\r\n }\r\n\r\n <circle\r\n [attr.cx]=\"gauge.marker.x\"\r\n [attr.cy]=\"gauge.marker.y\"\r\n r=\"4.5\"\r\n fill=\"#fff\"\r\n [attr.stroke]=\"gauge.status.color\"\r\n stroke-width=\"3\"\r\n ></circle>\r\n </svg>\r\n\r\n <div class=\"dashboard-performance-gauge__center\">\r\n <div class=\"dashboard-performance-gauge__value\">\r\n {{ gauge.display }}\r\n </div>\r\n <div class=\"dashboard-performance-gauge__label\">\r\n {{ gauge.label }}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div\r\n class=\"dashboard-performance-gauge__status\"\r\n [title]=\"performanceGaugeStatusName()\"\r\n >\r\n <span class=\"dashboard-performance-gauge__status-dot\"></span>\r\n <span class=\"dashboard-performance-gauge__status-text\">\r\n {{ performanceGaugeStatusName() }}\r\n </span>\r\n </div>\r\n </div>\r\n } @else if (componentViewMode() === \"map\" && dataHandled()) {\r\n <mt-map-view\r\n [dashboardId]=\"dashboardId()\"\r\n [configurationItem]=\"configurationItem()\"\r\n [inGroup]=\"inGroup()\"\r\n [groups]=\"mapGroups()\"\r\n [config]=\"mapViewConfig()\"\r\n [showLegend]=\"mapLegendShow()\"\r\n [legendPosition]=\"mapLegendPosition()\"\r\n [legendIcon]=\"mapLegendIcon()\"\r\n (pointClick)=\"onMapPointClick($event)\"\r\n />\r\n } @else if (dataHandled() && !dataHandled()?.noData) {\r\n <mt-echart\r\n [dashboardId]=\"dashboardId()\"\r\n [chartConfig]=\"dataHandled()\"\r\n [configurationItem]=\"configurationItem()\"\r\n [inGroup]=\"inGroup()\"\r\n (chartClick)=\"onChartClick($event)\"\r\n >\r\n </mt-echart>\r\n } @else if (dataHandled()?.noData) {\r\n <div class=\"no-data-container\">\r\n <i class=\"pi pi-info-circle\"></i>\r\n <span>{{ t(\"noChartData\") }}</span>\r\n </div>\r\n } @else {\r\n <div class=\"loading-container\">\r\n <div class=\"loading-spinner\"></div>\r\n </div>\r\n }\r\n </div>\r\n </ng-container>\r\n</mt-card-content>\r\n", styles: [":host{display:block;height:100%}.chart-container{height:100%;min-height:0}.chart-container.config-mode{min-height:400px}.no-data-container,.needs-config-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;min-height:0;color:#999;gap:.5rem;padding:1rem;text-align:center}.no-data-container i,.needs-config-container i{font-size:2rem}.needs-config-container .title{font-weight:600;color:#555;font-size:.95rem}.needs-config-container .hint{font-size:.8rem;max-width:28rem;line-height:1.4}.needs-config-container .configure-btn{margin-top:.5rem;display:inline-flex;align-items:center;gap:.4rem;padding:.4rem .9rem;font-size:.85rem;font-weight:600;color:#fff;background:var(--p-primary-500, #2563eb);border:0;border-radius:.375rem;cursor:pointer;box-shadow:0 1px 2px #0000000d}.needs-config-container .configure-btn:hover{background:var(--p-primary-600, #1d4ed8)}.loading-container{display:flex;align-items:center;justify-content:center;height:100%;min-height:0}.loading-spinner{width:2rem;height:2rem;border:3px solid #f0f0f0;border-top-color:#4caf50;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.splitter-view{display:flex;align-items:stretch;height:100%;gap:.5rem}.splitter-view.splitter-vertical{flex-direction:column}.splitter-view.splitter-vertical .splitter-divider{width:auto;height:1px}.splitter-side{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;padding:1rem;border-radius:.5rem}.splitter-positive{background:#22c55e14}.splitter-negative{background:#ef444414}.splitter-count{font-size:2rem;font-weight:700;margin-bottom:.5rem}.splitter-positive .splitter-count{color:#16a34a}.splitter-negative .splitter-count{color:#dc2626}.splitter-labels{list-style:none;padding:0;margin:0;text-align:center;font-size:.8rem;color:#555}.splitter-labels li{padding:.15rem 0}.splitter-divider{width:1px;background:#00000014}.dashboard-timeline-view{display:flex;flex-direction:column;gap:.625rem;height:100%;min-height:0;overflow:auto}.dashboard-timeline-view[data-legend-position=left],.dashboard-timeline-view[data-legend-position=right]{flex-direction:row;overflow:hidden}.dashboard-timeline-legend{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:.35rem .75rem;flex-shrink:0;min-width:0;max-width:100%}.dashboard-timeline-legend[data-position=left],.dashboard-timeline-legend[data-position=right]{max-width:12rem;max-height:100%;flex-direction:column;align-items:flex-start;justify-content:flex-start;flex-wrap:nowrap;overflow:auto}.dashboard-timeline-legend-item{display:inline-flex;align-items:center;gap:.25rem;max-width:12rem;padding:0;border:0;border-radius:0;font-size:.75rem;color:#475569;font-weight:500;line-height:1.2;background:transparent}.dashboard-timeline-legend-marker{display:inline-block;width:.625rem;height:.625rem;flex:0 0 auto;border-radius:999px}.dashboard-timeline-legend-marker.shape-rect{border-radius:0}.dashboard-timeline-legend-marker.shape-roundRect{border-radius:.2rem}.dashboard-timeline-legend-marker.shape-diamond{border-radius:.0625rem;transform:rotate(45deg)}.dashboard-timeline-legend-marker.shape-triangle{width:0;height:0;background:transparent!important;border-radius:0;border-left:.34rem solid transparent;border-right:.34rem solid transparent;border-bottom-width:.6rem;border-bottom-style:solid}.dashboard-timeline-legend-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dashboard-timeline-renderer{display:block;min-height:0;flex:1}.dashboard-timeline-placeholder{display:flex;min-height:260px;flex:1;flex-direction:column;gap:.75rem;padding:1rem}.dashboard-timeline-placeholder div{height:3rem;border-radius:.5rem;background:var(--p-surface-100);animation:dashboard-builder-pulse 1.2s ease-in-out infinite}@keyframes dashboard-builder-pulse{0%,to{opacity:.55}50%{opacity:1}}:host ::ng-deep .dashboard-timeline-renderer>div{margin-top:0}:host ::ng-deep .dashboard-timeline-view mt-timeline-gantt-header .bg-surface-50{background-color:var(--timeline-header-bg, var(--p-surface-50));color:var(--timeline-header-color, inherit)}.dashboard-timeline-column-entity{display:block;min-width:0}.dashboard-timeline-title-cell{display:flex;min-width:0;align-items:center;gap:.5rem;width:100%}.dashboard-timeline-title-toggle{flex:0 0 auto;cursor:pointer;color:#64748b}.dashboard-timeline-title-spacer{display:inline-block;width:1.25rem;flex:0 0 1.25rem}.dashboard-timeline-title-action{min-width:0;flex:1 1 auto;overflow:hidden;border:0;background:transparent;padding:0;color:#334155;cursor:pointer;font-size:.875rem;font-weight:600;text-align:start;text-overflow:ellipsis;white-space:nowrap}.dashboard-timeline-title-action:hover{color:var(--p-primary-600, #2563eb);text-decoration:underline}.phase-gate-view{height:100%;display:flex;align-items:center;justify-content:center;padding:1rem;overflow-x:auto}.phase-steps{display:flex;align-items:center;gap:.75rem;list-style:none;margin:0;padding:0}.phase-step{display:flex;align-items:center;gap:.5rem;padding:.4rem .75rem;border-radius:999px;background:#0000000a;font-size:.8rem;color:#555;white-space:nowrap}.phase-step-number{width:1.5rem;height:1.5rem;display:inline-flex;align-items:center;justify-content:center;border-radius:999px;font-weight:700;background:#0000000f;color:#666}.phase-step.is-done{background:#22c55e1a;color:#16a34a}.phase-step.is-done .phase-step-number{background:#16a34a;color:#fff}.phase-step.is-current{background:#2563eb1a;color:#2563eb;font-weight:600}.phase-step.is-current .phase-step-number{background:#2563eb;color:#fff}.phase-gate-view.phase-gate-compact .phase-step{padding:.2rem .45rem;font-size:.7rem;gap:.25rem}.phase-gate-view.phase-gate-compact .phase-step-number{width:1.1rem;height:1.1rem;font-size:.7rem}.dashboard-performance-gauge{display:flex;height:100%;min-height:0;width:100%;flex-direction:column;align-items:center;justify-content:center;gap:.875rem;overflow:hidden;padding:.75rem 1rem 1rem;cursor:default}.dashboard-performance-gauge.is-clickable{cursor:pointer}.dashboard-performance-gauge__figure{position:relative;width:min(100%,28rem);min-width:12rem;max-width:100%;transform-origin:center bottom}.dashboard-performance-gauge__svg{display:block;width:100%;height:auto;overflow:visible}.dashboard-performance-gauge__center{position:absolute;left:50%;top:72%;display:flex;max-width:90%;transform:translate(-50%,-50%);flex-direction:column;align-items:center;gap:.125rem;text-align:center;pointer-events:none}.dashboard-performance-gauge__value{font-size:2.75rem;font-weight:800;line-height:1;color:var(--dashboard-performance-status-color, #334155)}.dashboard-performance-gauge__label{max-width:18rem;overflow:hidden;color:#475569;font-size:.95rem;font-weight:600;text-overflow:ellipsis;white-space:nowrap}.dashboard-performance-gauge__status{display:inline-flex;max-width:min(80%,18rem);align-items:center;justify-content:center;gap:.375rem;border-radius:999px;padding:.25rem .625rem;background:color-mix(in srgb,var(--dashboard-performance-status-color, #64748b) 10%,transparent);color:var(--dashboard-performance-status-color, #475569);font-size:.8125rem;font-weight:700;line-height:1.2}.dashboard-performance-gauge__status-dot{width:.5rem;height:.5rem;flex:0 0 auto;border-radius:999px;background:currentColor}.dashboard-performance-gauge__status-text{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n"] }]
|
|
28603
28906
|
}], ctorParameters: null, propDecorators: { dashboardId: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardId", required: true }] }], reportId: [{ type: i0.Input, args: [{ isSignal: true, alias: "reportId", required: false }] }], inGroup: [{ type: i0.Input, args: [{ isSignal: true, alias: "inGroup", required: false }] }], isConfigMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "isConfigMode", required: false }] }], titleEditable: [{ type: i0.Input, args: [{ isSignal: true, alias: "titleEditable", required: false }] }], onAction: [{ type: i0.Output, args: ["onAction"] }], onConfigure: [{ type: i0.Output, args: ["onConfigure"] }], onTitleChange: [{ type: i0.Output, args: ["onTitleChange"] }] } }) });
|
|
28604
28907
|
|
|
28605
28908
|
/**
|
|
@@ -51131,5 +51434,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
51131
51434
|
* Generated bundle index. Do not edit.
|
|
51132
51435
|
*/
|
|
51133
51436
|
|
|
51134
|
-
export {
|
|
51135
|
-
//# sourceMappingURL=masterteam-dashboard-builder-masterteam-dashboard-builder-
|
|
51437
|
+
export { PieChartHandler as $, EntityPreviewCardComponent as A, ListStatisticCardComponent as B, CardContentComponent as C, DashboardItemStoreService as D, EChartComponent as E, FilterUtilsService as F, MAP_FALLBACK_COLORS as G, HeaderCardComponent as H, isPlottable as I, plottableGroups as J, buildMapChartOption as K, LastHistoryLevelCardComponent as L, MAP_MARKER_PATH as M, MAP_REGIONS as N, DEFAULT_MAP_REGION_KEY as O, PropertiesCardComponent as P, MAP_DATA_ATTRIBUTION as Q, resolveMapRegion as R, StaticFiltersComponent as S, MapViewComponent as T, SkeletonCardComponent as U, resolveStatisticIconPlacement as V, StatisticCardComponent as W, TableCardComponent as X, TopbarCardComponent as Y, ChartDataService as Z, BarChartHandler as _, DashboardItem as a, ItemCardMenuComponent as a$, StackBarChartHandler as a0, axisFormatters as a1, groupDatesByYearAndMonth as a2, GaugeChartHandler as a3, TableViewHandler as a4, OverviewCardHandler as a5, TimelineHandler as a6, LineChartHandler as a7, SnapshotHandler as a8, ComparisonChartHandler as a9, isManagePagesDeleteResult as aA, ManagePages as aB, ManageBreadcrumb as aC, ManageFilterOnPage as aD, DynamicFiltersConfig as aE, ChartSettingsDrawer as aF, DisplaySettings as aG, DefaultControlUi as aH, PieControlUi as aI, BarControlUi as aJ, StackBarControlUi as aK, ManageItem as aL, CHART_TYPES as aM, ManageItemService as aN, GeneralSettings as aO, DataSourceSettings as aP, ActionsSettings as aQ, ChartViewer as aR, StyleStudioDrawer as aS, StyleSettingsRenderer as aT, expandResetPatches as aU, StyleField as aV, SegmentedField as aW, ColorListField as aX, ArrayBuilderField as aY, KeyValueMapField as aZ, LegendOrderField as a_, SplitterChartHandler as aa, LevelCardHandler as ab, MapChartHandler as ac, RingGaugeChartHandler as ad, SPlusChartHandler as ae, PhaseGateStepperHandler as af, formatCurrency as ag, getCurrencySuffix as ah, formatPercentage as ai, formatNumber as aj, formatDate as ak, createAxisFormatter as al, createTooltipFormatter as am, formatAxisLabel as an, formatWordsUnderBar as ao, formatXAxis as ap, handleFiltersForCustom as aq, handleFilterForCard as ar, handleFilterForSnapshot as as, DashboardList as at, MODULE_CLASSIFICATION_LOG as au, MODULE_CLASSIFICATION_LOG_NAME as av, isLogClassification as aw, HTTPMethod as ax, DashboardBuilderService as ay, DashboardStoreService as az, DashboardDialogHeader as b, getFallbackControlSchema as b$, ChartFilterDrawer as b0, ItemContextToolbarComponent as b1, ItemConfigPopoverComponent as b2, GuidedConfigDialogComponent as b3, FilterChipsBarComponent as b4, FilterBuilderComponent as b5, DatasourcePanelComponent as b6, SchemaControlRendererComponent as b7, FilterByGroupPipe as b8, GetChartActionsPipe as b9, applyStyleToPersisted as bA, layoutToUi as bB, applyLayoutToPersisted as bC, labelLegendFormatToUi as bD, applyLabelLegendFormatToPersisted as bE, behaviorToUi as bF, applyBehaviorToPersisted as bG, applyFilterChipsToPersisted as bH, persistedToUi as bI, buildAssembly as bJ, STYLE_PRESETS as bK, presetsForCapability as bL, findPreset as bM, validate as bN, hasBlockingIssues as bO, groupIssuesByDomain as bP, parseAdvancedJson as bQ, deepMerge$1 as bR, formatForEditor as bS, CUSTOM_COLOR_OPTION as bT, readByPath$1 as bU, setByPath as bV, applyControlPatchToPersisted as bW, applyControlPatchesToPersisted as bX, getControlSchema as bY, listControlSchemaIds as bZ, listControlSchemas as b_, CHART_CAPABILITIES as ba, getCapabilityById as bb, resolveCapability as bc, toBackendChartType as bd, normalizeChartTypeForRequest as be, normalizeFilterOperation as bf, normalizeAggregateFunction as bg, normalizeFilters as bh, selectorFromLegacy as bi, moduleIdFromSelector as bj, toBackendSourceLink as bk, toFormSourceLink as bl, normalizeOnLoad as bm, normalizeBeforeSave as bn, normalizeBeforeRequest as bo, CONFIG_DOMAINS as bp, domainsForCapability as bq, findDomain as br, POPOVER_TABS as bs, POPOVER_TAB_SPECS as bt, titleToUi as bu, applyTitleToPersisted as bv, datasourceToUi as bw, fieldsToUi as bx, filtersToUi as by, styleToUi as bz, cloneDeep$1 as c, flattenSchema as c0, resolveDisplayFields as c1, buildDisplayFieldPredicate as c2, bindingKey as c3, getBinding as c4, listBindings as c5, listBindingsForChart as c6, readBoundValue as c7, ITEM_GUIDANCE_REGISTRY as c8, describeGuidance as c9, ItemGuidanceService as ca, DashboardBuilder as d, DashboardViewer as e, switchAllKeysSmall$1 as f, getNestedData as g, dynamicTextReplace as h, dynamicReorder as i, generalConfiguration as j, formatValue as k, getLocalizedTitle as l, sortChartData as m, addCommasToNumber as n, sortDataTableView as o, isMobilePlatform$1 as p, getColorFromConditions as q, resolveDashboardDialogHeader as r, switchAllKeysToLower as s, CardFilterComponent as t, DynamicFiltersComponent as u, CardInfoComponent as v, ChartCardComponent as w, resolveEntityUserPhoto as x, EntityInfoComponent as y, normalizeDashboardCardEntityValue as z };
|
|
51438
|
+
//# sourceMappingURL=masterteam-dashboard-builder-masterteam-dashboard-builder-CUB7GE24.mjs.map
|