@masterteam/dashboard-builder 0.0.101 → 0.0.102
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 +32 -4
- package/assets/i18n/ar.json +10 -1
- package/assets/i18n/en.json +10 -1
- package/fesm2022/{masterteam-dashboard-builder-dashboard-dialog.component-Qb3g4YOP.mjs → masterteam-dashboard-builder-dashboard-dialog.component-Cb6kF8k7.mjs} +2 -2
- package/fesm2022/{masterteam-dashboard-builder-dashboard-dialog.component-Qb3g4YOP.mjs.map → masterteam-dashboard-builder-dashboard-dialog.component-Cb6kF8k7.mjs.map} +1 -1
- package/fesm2022/{masterteam-dashboard-builder-masterteam-dashboard-builder-BLfRqln1.mjs → masterteam-dashboard-builder-masterteam-dashboard-builder-DfAo6fUq.mjs} +183 -435
- package/fesm2022/masterteam-dashboard-builder-masterteam-dashboard-builder-DfAo6fUq.mjs.map +1 -0
- package/fesm2022/masterteam-dashboard-builder.mjs +1 -1
- package/package.json +3 -3
- package/types/masterteam-dashboard-builder.d.ts +50 -93
- package/fesm2022/masterteam-dashboard-builder-masterteam-dashboard-builder-BLfRqln1.mjs.map +0 -1
|
@@ -2975,26 +2975,44 @@ const CHART_CAPABILITIES = [
|
|
|
2975
2975
|
name: 'Phase Gate Stepper',
|
|
2976
2976
|
icon: 'media.sliders-02',
|
|
2977
2977
|
category: 'special',
|
|
2978
|
-
// Unsupported for new dashboards; retain the capability and runtime path
|
|
2979
|
-
// for saved widgets without changing their persisted config.
|
|
2980
|
-
hideInList: true,
|
|
2981
2978
|
products: ['pplus'],
|
|
2982
2979
|
hasManageItem: true,
|
|
2983
2980
|
defaultSize: { cols: 18, rows: 3 },
|
|
2984
|
-
|
|
2981
|
+
// Reads one record's PhaseGate rows through the chart endpoint, like the
|
|
2982
|
+
// PhaseGate Table. The former `Levels/{levelId}/PhaseGates` request has no
|
|
2983
|
+
// backend route (#1664); `normalizeOnLoad` moves saved steppers off it.
|
|
2984
|
+
serviceType: 'TableView',
|
|
2985
2985
|
componentName: 'phaseGateStepperCard',
|
|
2986
2986
|
functionName: 'handlePhaseGateStepperCard',
|
|
2987
|
-
requestType: '
|
|
2988
|
-
backendChartType:
|
|
2987
|
+
requestType: 'custom',
|
|
2988
|
+
backendChartType: 'TableView',
|
|
2989
2989
|
renderer: 'phaseGateStepper',
|
|
2990
|
-
selection: { visible:
|
|
2990
|
+
selection: { visible: true, allowMultiple: false },
|
|
2991
2991
|
supportsSourceLinks: false,
|
|
2992
2992
|
supportsCustomApi: false,
|
|
2993
2993
|
supportsGroupByMultiple: false,
|
|
2994
|
-
query: {
|
|
2994
|
+
query: {
|
|
2995
|
+
editor: 'phaseGateStepper',
|
|
2996
|
+
schema: {
|
|
2997
|
+
fields: [
|
|
2998
|
+
'rowIdentityProperty',
|
|
2999
|
+
'phaseNameProperty',
|
|
3000
|
+
'phaseOrderProperty',
|
|
3001
|
+
'phaseIsCurrentProperty',
|
|
3002
|
+
'phaseIsCompletedProperty',
|
|
3003
|
+
],
|
|
3004
|
+
required: [
|
|
3005
|
+
'rowIdentityProperty',
|
|
3006
|
+
'phaseNameProperty',
|
|
3007
|
+
'phaseOrderProperty',
|
|
3008
|
+
'phaseIsCurrentProperty',
|
|
3009
|
+
],
|
|
3010
|
+
},
|
|
3011
|
+
},
|
|
2995
3012
|
display: {
|
|
2996
3013
|
fields: [...TITLE_SHARED, 'advanced', 'cardStyleConfig', ...HEADER_BLOCK],
|
|
2997
3014
|
},
|
|
3015
|
+
legacyAliases: { serviceTypes: ['phaseGate'] },
|
|
2998
3016
|
},
|
|
2999
3017
|
{
|
|
3000
3018
|
id: 'performance-gauge-card-splus',
|
|
@@ -3567,8 +3585,7 @@ function selectorFromLegacy(moduleType, moduleId) {
|
|
|
3567
3585
|
}
|
|
3568
3586
|
/**
|
|
3569
3587
|
* Extract numeric/string id from `Type:Id` selector. Used by legacy
|
|
3570
|
-
* host endpoints (`GetCards/{moduleId}
|
|
3571
|
-
* which never accepted a selector.
|
|
3588
|
+
* host endpoints (`GetCards/{moduleId}`) which never accepted a selector.
|
|
3572
3589
|
*/
|
|
3573
3590
|
function moduleIdFromSelector(selector) {
|
|
3574
3591
|
if (!selector)
|
|
@@ -3843,6 +3860,23 @@ function normalizeOnLoad(config) {
|
|
|
3843
3860
|
clientConfig['requestType'] = cap.requestType;
|
|
3844
3861
|
}
|
|
3845
3862
|
}
|
|
3863
|
+
// A Phase Gate Stepper saved before #1664 requested
|
|
3864
|
+
// `Levels/{levelId}/PhaseGates`, which the backend does not serve. It now
|
|
3865
|
+
// reads the PhaseGate module through the chart endpoint, so the old request
|
|
3866
|
+
// type and its free-text level id are dropped. Such a stepper has no
|
|
3867
|
+
// selection yet, so it asks for a data source instead of failing.
|
|
3868
|
+
if (cap?.componentName === 'phaseGateStepperCard') {
|
|
3869
|
+
if (clientConfig['requestType'] === 'phaseGate') {
|
|
3870
|
+
clientConfig['requestType'] = cap.requestType;
|
|
3871
|
+
}
|
|
3872
|
+
if (serviceConfig['chartType'] === 'phaseGate') {
|
|
3873
|
+
serviceConfig['chartType'] = cap.serviceType;
|
|
3874
|
+
}
|
|
3875
|
+
if (serviceConfig['query'] && 'levelId' in serviceConfig['query']) {
|
|
3876
|
+
const { levelId: _levelId, ...query } = serviceConfig['query'];
|
|
3877
|
+
serviceConfig['query'] = query;
|
|
3878
|
+
}
|
|
3879
|
+
}
|
|
3846
3880
|
// PhaseGate Table used the generic table query before the dedicated editor
|
|
3847
3881
|
// existed. Hydrate that saved shape once the manifest identifies the chart,
|
|
3848
3882
|
// then keep the complete backend projection deterministic on every load.
|
|
@@ -11706,7 +11740,7 @@ function validateDatasource(persisted, cap, out) {
|
|
|
11706
11740
|
// Layout/special widgets don't need a datasource.
|
|
11707
11741
|
if (cap?.category === 'layout')
|
|
11708
11742
|
return;
|
|
11709
|
-
if (cap?.requestType === 'snapShot'
|
|
11743
|
+
if (cap?.requestType === 'snapShot')
|
|
11710
11744
|
return;
|
|
11711
11745
|
const sc = persisted.serviceConfig ?? {};
|
|
11712
11746
|
const selection = Array.isArray(sc.selection) ? sc.selection : [];
|
|
@@ -12801,7 +12835,7 @@ class ItemGuidanceService {
|
|
|
12801
12835
|
if (!config)
|
|
12802
12836
|
return 'unconfigured';
|
|
12803
12837
|
const capability = this.resolveCapability(config);
|
|
12804
|
-
// Layout/special widgets (header/topbar/repeater/snapshot
|
|
12838
|
+
// Layout/special widgets (header/topbar/repeater/snapshot)
|
|
12805
12839
|
// never show the guidance overlay — they are intrinsically configured.
|
|
12806
12840
|
if (this.isLayoutOrSpecial(config)) {
|
|
12807
12841
|
return input.hasData ? 'configured' : null;
|
|
@@ -12869,9 +12903,7 @@ class ItemGuidanceService {
|
|
|
12869
12903
|
componentName === 'label' ||
|
|
12870
12904
|
componentName === 'BackgroundTextChart' ||
|
|
12871
12905
|
componentName === 'repeater' ||
|
|
12872
|
-
componentName === 'phaseGateStepperCard' ||
|
|
12873
12906
|
requestType === 'snapShot' ||
|
|
12874
|
-
requestType === 'phaseGate' ||
|
|
12875
12907
|
requestType === 'levelCards' ||
|
|
12876
12908
|
requestType === 'timelineProjectDependencies');
|
|
12877
12909
|
}
|
|
@@ -22557,328 +22589,47 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
22557
22589
|
/**
|
|
22558
22590
|
* Phase Gate Stepper Handler
|
|
22559
22591
|
*
|
|
22560
|
-
*
|
|
22561
|
-
*
|
|
22592
|
+
* Turns the PhaseGate module's `TableView` rows into the ordered steps of ONE
|
|
22593
|
+
* record. The rows arrive as `{ values: [{ [propertyKey]: PropertyValue }] }`
|
|
22594
|
+
* and the roles come from the shared PhaseGate query contract
|
|
22595
|
+
* (`registry/phase-gate-table-query.ts`): `rowIdentityProperty`,
|
|
22596
|
+
* `phaseNameProperty`, `phaseOrderProperty`, `phaseIsCurrentProperty` and,
|
|
22597
|
+
* optionally, `phaseIsCompletedProperty`.
|
|
22562
22598
|
*/
|
|
22563
22599
|
class PhaseGateStepperHandler {
|
|
22564
|
-
|
|
22565
|
-
|
|
22566
|
-
|
|
22567
|
-
|
|
22568
|
-
|
|
22569
|
-
|
|
22570
|
-
|
|
22571
|
-
|
|
22572
|
-
|
|
22573
|
-
|
|
22574
|
-
|
|
22575
|
-
|
|
22576
|
-
|
|
22577
|
-
|
|
22578
|
-
|
|
22579
|
-
|
|
22580
|
-
|
|
22581
|
-
|
|
22582
|
-
|
|
22583
|
-
|
|
22584
|
-
|
|
22585
|
-
|
|
22586
|
-
|
|
22587
|
-
|
|
22588
|
-
|
|
22589
|
-
|
|
22590
|
-
|
|
22591
|
-
|
|
22592
|
-
|
|
22593
|
-
|
|
22594
|
-
|
|
22595
|
-
|
|
22596
|
-
|
|
22597
|
-
(typeof p?.status === 'string' &&
|
|
22598
|
-
['current', 'active', 'inprogress'].includes(String(p.status).toLowerCase())));
|
|
22599
|
-
const currentPhase = currentIdx >= 0 ? arr[currentIdx] : null;
|
|
22600
|
-
return {
|
|
22601
|
-
phases: arr,
|
|
22602
|
-
checkList: currentPhase?.items ?? [],
|
|
22603
|
-
currentIndex: currentIdx,
|
|
22604
|
-
noData: false,
|
|
22605
|
-
};
|
|
22606
|
-
}
|
|
22607
|
-
/**
|
|
22608
|
-
* Handle phase gate for table display
|
|
22609
|
-
*/
|
|
22610
|
-
handleTable(dataResponse, config) {
|
|
22611
|
-
const steps = this.parsePhaseGateData(dataResponse, config);
|
|
22612
|
-
if (steps.length === 0) {
|
|
22613
|
-
return { noData: true, type: 'phaseGateTable' };
|
|
22614
|
-
}
|
|
22615
|
-
// Transform steps to table format
|
|
22616
|
-
const columns = this.buildTableColumns(steps, config);
|
|
22617
|
-
const rows = this.buildTableRows(steps);
|
|
22618
|
-
return {
|
|
22619
|
-
type: 'phaseGateTable',
|
|
22620
|
-
steps,
|
|
22621
|
-
columns,
|
|
22622
|
-
rows,
|
|
22623
|
-
config,
|
|
22624
|
-
noData: false,
|
|
22625
|
-
};
|
|
22626
|
-
}
|
|
22627
|
-
/**
|
|
22628
|
-
* Parse phase gate data from API response
|
|
22629
|
-
*/
|
|
22630
|
-
parsePhaseGateData(dataResponse, _config) {
|
|
22631
|
-
const languageCode = this.storeService.languageCode();
|
|
22632
|
-
const steps = [];
|
|
22633
|
-
// Handle array format
|
|
22634
|
-
const dataArray = Array.isArray(dataResponse)
|
|
22635
|
-
? dataResponse
|
|
22636
|
-
: dataResponse?.phaseGates ||
|
|
22637
|
-
dataResponse?.phases ||
|
|
22638
|
-
dataResponse?.steps ||
|
|
22639
|
-
[];
|
|
22640
|
-
dataArray.forEach((item, index) => {
|
|
22641
|
-
const status = this.determineStepStatus(item);
|
|
22642
|
-
const properties = this.parseStepProperties(item, languageCode);
|
|
22643
|
-
steps.push({
|
|
22644
|
-
id: item.id || item.phaseGateId || index,
|
|
22645
|
-
name: item.name?.[languageCode] ||
|
|
22646
|
-
item.name ||
|
|
22647
|
-
item.phaseName ||
|
|
22648
|
-
`Phase ${index + 1}`,
|
|
22649
|
-
order: item.order ?? item.sequence ?? index,
|
|
22650
|
-
status,
|
|
22651
|
-
date: item.date || item.dueDate || item.plannedDate,
|
|
22652
|
-
completedDate: item.completedDate || item.actualDate,
|
|
22653
|
-
color: item.color || this.getStatusColor(status),
|
|
22654
|
-
icon: item.icon,
|
|
22655
|
-
properties,
|
|
22656
|
-
});
|
|
22657
|
-
});
|
|
22658
|
-
// Sort by order
|
|
22659
|
-
return steps.sort((a, b) => a.order - b.order);
|
|
22660
|
-
}
|
|
22661
|
-
/**
|
|
22662
|
-
* Determine step status
|
|
22663
|
-
*/
|
|
22664
|
-
determineStepStatus(item) {
|
|
22665
|
-
// Check explicit status
|
|
22666
|
-
if (item.status) {
|
|
22667
|
-
const statusLower = item.status.toLowerCase();
|
|
22668
|
-
if (statusLower === 'completed' ||
|
|
22669
|
-
statusLower === 'done' ||
|
|
22670
|
-
statusLower === 'passed') {
|
|
22671
|
-
return 'completed';
|
|
22672
|
-
}
|
|
22673
|
-
if (statusLower === 'current' ||
|
|
22674
|
-
statusLower === 'active' ||
|
|
22675
|
-
statusLower === 'inprogress') {
|
|
22676
|
-
return 'current';
|
|
22677
|
-
}
|
|
22678
|
-
if (statusLower === 'skipped' || statusLower === 'bypassed') {
|
|
22679
|
-
return 'skipped';
|
|
22680
|
-
}
|
|
22681
|
-
return 'upcoming';
|
|
22682
|
-
}
|
|
22683
|
-
// Check boolean flags
|
|
22684
|
-
if (item.isCompleted || item.completed)
|
|
22685
|
-
return 'completed';
|
|
22686
|
-
if (item.isCurrent || item.current || item.isActive)
|
|
22687
|
-
return 'current';
|
|
22688
|
-
if (item.isSkipped || item.skipped)
|
|
22689
|
-
return 'skipped';
|
|
22690
|
-
// Check completion date
|
|
22691
|
-
if (item.completedDate || item.actualDate)
|
|
22692
|
-
return 'completed';
|
|
22693
|
-
return 'upcoming';
|
|
22694
|
-
}
|
|
22695
|
-
/**
|
|
22696
|
-
* Get color based on status
|
|
22697
|
-
*/
|
|
22698
|
-
getStatusColor(status) {
|
|
22699
|
-
switch (status) {
|
|
22700
|
-
case 'completed':
|
|
22701
|
-
return '#4caf50';
|
|
22702
|
-
case 'current':
|
|
22703
|
-
return '#2196f3';
|
|
22704
|
-
case 'skipped':
|
|
22705
|
-
return '#9e9e9e';
|
|
22706
|
-
case 'upcoming':
|
|
22707
|
-
default:
|
|
22708
|
-
return '#e0e0e0';
|
|
22709
|
-
}
|
|
22710
|
-
}
|
|
22711
|
-
/**
|
|
22712
|
-
* Parse step properties
|
|
22713
|
-
*/
|
|
22714
|
-
parseStepProperties(item, languageCode) {
|
|
22715
|
-
const properties = [];
|
|
22716
|
-
// Skip if no properties
|
|
22717
|
-
if (!item.properties && !item.data)
|
|
22718
|
-
return properties;
|
|
22719
|
-
const propsData = item.properties || item.data;
|
|
22720
|
-
if (Array.isArray(propsData)) {
|
|
22721
|
-
propsData.forEach((prop) => {
|
|
22722
|
-
properties.push({
|
|
22723
|
-
key: prop.key || prop.propertyKey,
|
|
22724
|
-
label: prop.label?.[languageCode] || prop.label || prop.key,
|
|
22725
|
-
value: prop.value,
|
|
22726
|
-
displayValue: this.getDisplayValue(prop),
|
|
22727
|
-
viewType: prop.viewType || prop.type,
|
|
22728
|
-
});
|
|
22729
|
-
});
|
|
22730
|
-
}
|
|
22731
|
-
else if (typeof propsData === 'object') {
|
|
22732
|
-
Object.entries(propsData).forEach(([key, value]) => {
|
|
22733
|
-
properties.push({
|
|
22734
|
-
key,
|
|
22735
|
-
label: key,
|
|
22736
|
-
value,
|
|
22737
|
-
displayValue: typeof value === 'object' ? JSON.stringify(value) : String(value),
|
|
22738
|
-
viewType: typeof value,
|
|
22739
|
-
});
|
|
22740
|
-
});
|
|
22741
|
-
}
|
|
22742
|
-
return properties;
|
|
22743
|
-
}
|
|
22744
|
-
/**
|
|
22745
|
-
* Get display value from property
|
|
22746
|
-
*/
|
|
22747
|
-
getDisplayValue(prop) {
|
|
22748
|
-
const value = prop?.value;
|
|
22749
|
-
if (value === null || value === undefined)
|
|
22750
|
-
return '-';
|
|
22751
|
-
switch (prop.viewType) {
|
|
22752
|
-
case 'Date':
|
|
22753
|
-
if (value?.actualValue)
|
|
22754
|
-
return new Date(value.actualValue).toLocaleDateString();
|
|
22755
|
-
if (typeof value === 'string')
|
|
22756
|
-
return new Date(value).toLocaleDateString();
|
|
22757
|
-
return String(value);
|
|
22758
|
-
case 'Status':
|
|
22759
|
-
return value?.name || value?.displayName || String(value);
|
|
22760
|
-
case 'User':
|
|
22761
|
-
return value?.displayName || value?.name || String(value);
|
|
22762
|
-
case 'Currency':
|
|
22763
|
-
case 'Number':
|
|
22764
|
-
const numVal = value?.value ?? value;
|
|
22765
|
-
return typeof numVal === 'number'
|
|
22766
|
-
? numVal.toLocaleString('en-US')
|
|
22767
|
-
: String(numVal);
|
|
22768
|
-
case 'Percentage':
|
|
22769
|
-
const pctVal = value?.value ?? value;
|
|
22770
|
-
return typeof pctVal === 'number'
|
|
22771
|
-
? `${pctVal.toFixed(1)}%`
|
|
22772
|
-
: String(pctVal);
|
|
22773
|
-
default:
|
|
22774
|
-
if (typeof value === 'object') {
|
|
22775
|
-
return (value?.displayValue ||
|
|
22776
|
-
value?.displayName ||
|
|
22777
|
-
value?.name ||
|
|
22778
|
-
JSON.stringify(value));
|
|
22779
|
-
}
|
|
22780
|
-
return String(value);
|
|
22781
|
-
}
|
|
22782
|
-
}
|
|
22783
|
-
/**
|
|
22784
|
-
* Build table columns from steps
|
|
22785
|
-
*/
|
|
22786
|
-
buildTableColumns(steps, _config) {
|
|
22787
|
-
const languageCode = this.storeService.languageCode();
|
|
22788
|
-
const columns = [
|
|
22789
|
-
{
|
|
22790
|
-
key: 'property',
|
|
22791
|
-
field: 'property',
|
|
22792
|
-
header: languageCode === 'ar' ? 'الخاصية' : 'Property',
|
|
22793
|
-
frozen: true,
|
|
22794
|
-
},
|
|
22795
|
-
];
|
|
22796
|
-
steps.forEach((step) => {
|
|
22797
|
-
columns.push({
|
|
22798
|
-
key: `phase_${step.id}`,
|
|
22799
|
-
field: `phase_${step.id}`,
|
|
22800
|
-
header: step.name,
|
|
22801
|
-
status: step.status,
|
|
22802
|
-
color: step.color,
|
|
22803
|
-
});
|
|
22804
|
-
});
|
|
22805
|
-
return columns;
|
|
22806
|
-
}
|
|
22807
|
-
/**
|
|
22808
|
-
* Build table rows from steps
|
|
22809
|
-
*/
|
|
22810
|
-
buildTableRows(steps) {
|
|
22811
|
-
const languageCode = this.storeService.languageCode();
|
|
22812
|
-
const rows = [];
|
|
22813
|
-
// Collect all unique property keys
|
|
22814
|
-
const allProperties = new Set();
|
|
22815
|
-
steps.forEach((step) => {
|
|
22816
|
-
step.properties?.forEach((prop) => {
|
|
22817
|
-
allProperties.add(prop.key);
|
|
22818
|
-
});
|
|
22819
|
-
});
|
|
22820
|
-
// Add status row
|
|
22821
|
-
const statusRow = {
|
|
22822
|
-
property: languageCode === 'ar' ? 'الحالة' : 'Status',
|
|
22823
|
-
propertyKey: 'status',
|
|
22824
|
-
};
|
|
22825
|
-
steps.forEach((step) => {
|
|
22826
|
-
statusRow[`phase_${step.id}`] = {
|
|
22827
|
-
value: step.status,
|
|
22828
|
-
displayValue: this.getStatusLabel(step.status, languageCode),
|
|
22829
|
-
color: step.color,
|
|
22830
|
-
type: 'status',
|
|
22831
|
-
};
|
|
22832
|
-
});
|
|
22833
|
-
rows.push(statusRow);
|
|
22834
|
-
// Add date row
|
|
22835
|
-
const dateRow = {
|
|
22836
|
-
property: languageCode === 'ar' ? 'التاريخ' : 'Date',
|
|
22837
|
-
propertyKey: 'date',
|
|
22838
|
-
};
|
|
22839
|
-
steps.forEach((step) => {
|
|
22840
|
-
dateRow[`phase_${step.id}`] = {
|
|
22841
|
-
value: step.completedDate || step.date,
|
|
22842
|
-
displayValue: step.completedDate
|
|
22843
|
-
? new Date(step.completedDate).toLocaleDateString()
|
|
22844
|
-
: step.date
|
|
22845
|
-
? new Date(step.date).toLocaleDateString()
|
|
22846
|
-
: '-',
|
|
22847
|
-
type: 'date',
|
|
22848
|
-
};
|
|
22849
|
-
});
|
|
22850
|
-
rows.push(dateRow);
|
|
22851
|
-
// Add property rows
|
|
22852
|
-
allProperties.forEach((propKey) => {
|
|
22853
|
-
const propRow = {
|
|
22854
|
-
property: propKey,
|
|
22855
|
-
propertyKey: propKey,
|
|
22856
|
-
};
|
|
22857
|
-
steps.forEach((step) => {
|
|
22858
|
-
const prop = step.properties?.find((p) => p.key === propKey);
|
|
22859
|
-
propRow[`phase_${step.id}`] = prop
|
|
22860
|
-
? {
|
|
22861
|
-
value: prop.value,
|
|
22862
|
-
displayValue: prop.displayValue || '-',
|
|
22863
|
-
type: prop.viewType,
|
|
22864
|
-
}
|
|
22865
|
-
: { value: null, displayValue: '-', type: 'text' };
|
|
22866
|
-
});
|
|
22867
|
-
rows.push(propRow);
|
|
22868
|
-
});
|
|
22869
|
-
return rows;
|
|
22870
|
-
}
|
|
22871
|
-
/**
|
|
22872
|
-
* Get localized status label
|
|
22873
|
-
*/
|
|
22874
|
-
getStatusLabel(status, languageCode) {
|
|
22875
|
-
const labels = {
|
|
22876
|
-
completed: { en: 'Completed', ar: 'مكتمل' },
|
|
22877
|
-
current: { en: 'Current', ar: 'الحالي' },
|
|
22878
|
-
upcoming: { en: 'Upcoming', ar: 'قادم' },
|
|
22879
|
-
skipped: { en: 'Skipped', ar: 'تم تخطيه' },
|
|
22880
|
-
};
|
|
22881
|
-
return labels[status]?.[languageCode] || status;
|
|
22600
|
+
/** Matches `functionName: 'handlePhaseGateStepperCard'` in the registry. */
|
|
22601
|
+
handlePhaseGateStepperCard(data, config) {
|
|
22602
|
+
const rows = Array.isArray(data?.values) ? data.values : [];
|
|
22603
|
+
if (!rows.length) {
|
|
22604
|
+
return { steps: [], currentIndex: -1, recordCount: 0, noData: true };
|
|
22605
|
+
}
|
|
22606
|
+
const query = (config.serviceConfig?.query ?? {});
|
|
22607
|
+
// The stepper draws one record. PhaseGate data that is not narrowed to a
|
|
22608
|
+
// record holds every record's phases, which would interleave into one row.
|
|
22609
|
+
const recordCount = new Set(rows.map((row) => readText(row, query.rowIdentityProperty))).size;
|
|
22610
|
+
if (recordCount > 1) {
|
|
22611
|
+
return { steps: [], currentIndex: -1, recordCount, noData: false };
|
|
22612
|
+
}
|
|
22613
|
+
// The backend does not return the phases in phase order.
|
|
22614
|
+
const ordered = rows
|
|
22615
|
+
.map((row, index) => ({
|
|
22616
|
+
row,
|
|
22617
|
+
index,
|
|
22618
|
+
order: readNumber(row, query.phaseOrderProperty),
|
|
22619
|
+
}))
|
|
22620
|
+
.sort((a, b) => compareOrder(a.order, b.order) || a.index - b.index)
|
|
22621
|
+
.map(({ row }) => row);
|
|
22622
|
+
const currentIndex = ordered.findIndex((row) => readBoolean(row, query.phaseIsCurrentProperty));
|
|
22623
|
+
const hasCompletedRole = !!query.phaseIsCompletedProperty;
|
|
22624
|
+
const steps = ordered.map((row, index) => ({
|
|
22625
|
+
name: readText(row, query.phaseNameProperty),
|
|
22626
|
+
isCurrent: index === currentIndex,
|
|
22627
|
+
// Without a completion role, every phase before the current one is done.
|
|
22628
|
+
isCompleted: hasCompletedRole
|
|
22629
|
+
? readBoolean(row, query.phaseIsCompletedProperty)
|
|
22630
|
+
: index < currentIndex,
|
|
22631
|
+
}));
|
|
22632
|
+
return { steps, currentIndex, recordCount, noData: false };
|
|
22882
22633
|
}
|
|
22883
22634
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: PhaseGateStepperHandler, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
22884
22635
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: PhaseGateStepperHandler, providedIn: 'root' });
|
|
@@ -22889,6 +22640,44 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
22889
22640
|
providedIn: 'root',
|
|
22890
22641
|
}]
|
|
22891
22642
|
}] });
|
|
22643
|
+
function readCell(row, propertyKey) {
|
|
22644
|
+
const responseKey = resolvePhaseGateResponseKey(row, propertyKey);
|
|
22645
|
+
return responseKey ? row[responseKey] : undefined;
|
|
22646
|
+
}
|
|
22647
|
+
/** Text cells carry a string; Status / Lookup cells carry `{ display }`. */
|
|
22648
|
+
function readText(row, propertyKey) {
|
|
22649
|
+
const value = readCell(row, propertyKey)?.value;
|
|
22650
|
+
if (value === null || value === undefined)
|
|
22651
|
+
return '';
|
|
22652
|
+
if (typeof value === 'object') {
|
|
22653
|
+
return String(value.display ?? '');
|
|
22654
|
+
}
|
|
22655
|
+
return String(value);
|
|
22656
|
+
}
|
|
22657
|
+
function readNumber(row, propertyKey) {
|
|
22658
|
+
const cell = readCell(row, propertyKey);
|
|
22659
|
+
const raw = cell?.rawValue ?? cell?.value;
|
|
22660
|
+
if (raw === null || raw === undefined || String(raw).trim() === '') {
|
|
22661
|
+
return null;
|
|
22662
|
+
}
|
|
22663
|
+
const value = Number(raw);
|
|
22664
|
+
return Number.isFinite(value) ? value : null;
|
|
22665
|
+
}
|
|
22666
|
+
/** Checkbox cells send `rawValue: "true" | "false"`. */
|
|
22667
|
+
function readBoolean(row, propertyKey) {
|
|
22668
|
+
const cell = readCell(row, propertyKey);
|
|
22669
|
+
return String(cell?.rawValue ?? cell?.value ?? '').toLowerCase() === 'true';
|
|
22670
|
+
}
|
|
22671
|
+
/** Ascending; a phase without an order goes last. */
|
|
22672
|
+
function compareOrder(left, right) {
|
|
22673
|
+
if (left === right)
|
|
22674
|
+
return 0;
|
|
22675
|
+
if (left === null)
|
|
22676
|
+
return 1;
|
|
22677
|
+
if (right === null)
|
|
22678
|
+
return -1;
|
|
22679
|
+
return left - right;
|
|
22680
|
+
}
|
|
22892
22681
|
|
|
22893
22682
|
/**
|
|
22894
22683
|
* Chart Data Service
|
|
@@ -23031,8 +22820,6 @@ class ChartDataService {
|
|
|
23031
22820
|
return this.fetchTimelineDependencies(config, mergedFilters);
|
|
23032
22821
|
case 'customSplus':
|
|
23033
22822
|
return this.fetchCustomSplusData(config, mergedFilters);
|
|
23034
|
-
case 'phaseGate':
|
|
23035
|
-
return this.fetchPhaseGateData(config, mergedFilters);
|
|
23036
22823
|
default:
|
|
23037
22824
|
console.warn(`Unknown request type: ${requestType}`);
|
|
23038
22825
|
return of(null);
|
|
@@ -23312,22 +23099,6 @@ class ChartDataService {
|
|
|
23312
23099
|
.get(endpoint, this.withCacheScope(config, { params }))
|
|
23313
23100
|
.pipe(map$1((res) => res?.data || res));
|
|
23314
23101
|
}
|
|
23315
|
-
/**
|
|
23316
|
-
* Fetch phase gate data
|
|
23317
|
-
* URL: ${urlPrefix}api/Levels/${levelId}/PhaseGates
|
|
23318
|
-
*/
|
|
23319
|
-
fetchPhaseGateData(config, filters) {
|
|
23320
|
-
const serviceConfig = config.serviceConfig;
|
|
23321
|
-
const levelId = dynamicTextReplace$1(serviceConfig?.query?.['levelId'], filters || {});
|
|
23322
|
-
if (!levelId) {
|
|
23323
|
-
console.warn('No levelId for phaseGate request');
|
|
23324
|
-
return of(null);
|
|
23325
|
-
}
|
|
23326
|
-
const url = `${this.urlPrefix}api/Levels/${levelId}/PhaseGates`;
|
|
23327
|
-
return this.http
|
|
23328
|
-
.get(url, this.withCacheScope(config))
|
|
23329
|
-
.pipe(map$1((res) => res?.data || res));
|
|
23330
|
-
}
|
|
23331
23102
|
/**
|
|
23332
23103
|
* Fetch data from custom API (customApi.customApiUrl)
|
|
23333
23104
|
*/
|
|
@@ -24021,7 +23792,7 @@ class ActionService {
|
|
|
24021
23792
|
// "Dialog header"), not from the chart that opened it.
|
|
24022
23793
|
const header = resolveDashboardDialogHeader(dialogConfig);
|
|
24023
23794
|
// Dynamically import DashboardDialogComponent to avoid circular dependency
|
|
24024
|
-
import('./masterteam-dashboard-builder-dashboard-dialog.component-
|
|
23795
|
+
import('./masterteam-dashboard-builder-dashboard-dialog.component-Cb6kF8k7.mjs').then(({ DashboardDialogComponent }) => {
|
|
24025
23796
|
// Open dialog using ModalService
|
|
24026
23797
|
this.modalService.openModal(DashboardDialogComponent, 'dialog', {
|
|
24027
23798
|
header: header.title,
|
|
@@ -28308,7 +28079,7 @@ class ChartCardComponent {
|
|
|
28308
28079
|
if (!config)
|
|
28309
28080
|
return false;
|
|
28310
28081
|
// Layout widgets (header/topbar) and special endpoint widgets (snapshot,
|
|
28311
|
-
//
|
|
28082
|
+
// repeater) are not "needs configuration" candidates.
|
|
28312
28083
|
const componentName = config.clientConfig?.componentName ?? '';
|
|
28313
28084
|
const requestType = config.clientConfig?.requestType ?? '';
|
|
28314
28085
|
if (componentName === 'header' ||
|
|
@@ -28316,9 +28087,7 @@ class ChartCardComponent {
|
|
|
28316
28087
|
componentName === 'footer' ||
|
|
28317
28088
|
componentName === 'label' ||
|
|
28318
28089
|
componentName === 'repeater' ||
|
|
28319
|
-
componentName === 'phaseGateStepperCard' ||
|
|
28320
28090
|
requestType === 'snapShot' ||
|
|
28321
|
-
requestType === 'phaseGate' ||
|
|
28322
28091
|
requestType === 'levelCards' ||
|
|
28323
28092
|
requestType === 'timelineProjectDependencies') {
|
|
28324
28093
|
return false;
|
|
@@ -28516,35 +28285,16 @@ class ChartCardComponent {
|
|
|
28516
28285
|
levelColor: (resource) => this.resolveTimelineColor(resource),
|
|
28517
28286
|
};
|
|
28518
28287
|
/* ---------- Phase Gate helpers ---------- */
|
|
28519
|
-
|
|
28520
|
-
|
|
28521
|
-
if (
|
|
28522
|
-
return
|
|
28523
|
-
|
|
28524
|
-
|
|
28525
|
-
|
|
28526
|
-
|
|
28527
|
-
|
|
28528
|
-
|
|
28529
|
-
if (Array.isArray(data?.values) && data.values.length)
|
|
28530
|
-
return true;
|
|
28531
|
-
return false;
|
|
28532
|
-
}, ...(ngDevMode ? [{ debugName: "hasPhaseGateData" }] : /* istanbul ignore next */ []));
|
|
28533
|
-
phaseGateSteps = computed(() => {
|
|
28534
|
-
const data = this.dataHandled();
|
|
28535
|
-
if (Array.isArray(data?.steps))
|
|
28536
|
-
return data.steps;
|
|
28537
|
-
if (Array.isArray(data?.phases))
|
|
28538
|
-
return data.phases;
|
|
28539
|
-
if (Array.isArray(data?.values))
|
|
28540
|
-
return data.values;
|
|
28541
|
-
return [];
|
|
28542
|
-
}, ...(ngDevMode ? [{ debugName: "phaseGateSteps" }] : /* istanbul ignore next */ []));
|
|
28543
|
-
phaseGateCurrentIndex = computed(() => {
|
|
28544
|
-
const data = this.dataHandled();
|
|
28545
|
-
const idx = Number(data?.currentIndex ?? data?.activeIndex ?? -1);
|
|
28546
|
-
return Number.isFinite(idx) ? idx : -1;
|
|
28547
|
-
}, ...(ngDevMode ? [{ debugName: "phaseGateCurrentIndex" }] : /* istanbul ignore next */ []));
|
|
28288
|
+
/** `PhaseGateStepperHandler` output; the stepper draws exactly one record. */
|
|
28289
|
+
phaseGateStepper = computed(() => {
|
|
28290
|
+
if (this.componentViewMode() !== 'phaseGateStepper')
|
|
28291
|
+
return null;
|
|
28292
|
+
return this.dataHandled();
|
|
28293
|
+
}, ...(ngDevMode ? [{ debugName: "phaseGateStepper" }] : /* istanbul ignore next */ []));
|
|
28294
|
+
phaseGateSteps = computed(() => this.phaseGateStepper()?.steps ?? [], ...(ngDevMode ? [{ debugName: "phaseGateSteps" }] : /* istanbul ignore next */ []));
|
|
28295
|
+
hasPhaseGateData = computed(() => this.phaseGateSteps().length > 0, ...(ngDevMode ? [{ debugName: "hasPhaseGateData" }] : /* istanbul ignore next */ []));
|
|
28296
|
+
/** More than one record in the data — the stepper asks for a narrower filter. */
|
|
28297
|
+
phaseGateRecordCount = computed(() => this.phaseGateStepper()?.recordCount ?? 0, ...(ngDevMode ? [{ debugName: "phaseGateRecordCount" }] : /* istanbul ignore next */ []));
|
|
28548
28298
|
// Pass-5: phase gate inline view honors schema controls.
|
|
28549
28299
|
phaseGateShowLabels = computed(() => {
|
|
28550
28300
|
const cat = this.configurationItem()?.clientConfig?.configAsType;
|
|
@@ -29124,7 +28874,7 @@ class ChartCardComponent {
|
|
|
29124
28874
|
'');
|
|
29125
28875
|
}
|
|
29126
28876
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ChartCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
29127
|
-
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)]] });
|
|
28877
|
+
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\" && phaseGateRecordCount() > 1\r\n ) {\r\n <div class=\"no-data-container\">\r\n <i class=\"pi pi-info-circle\"></i>\r\n <span>{{\r\n t(\"phaseGateStepperMultipleRecords\", {\r\n count: phaseGateRecordCount(),\r\n })\r\n }}</span>\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]=\"step.isCurrent\"\r\n [class.is-done]=\"step.isCompleted\"\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 || 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:.375rem;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)]] });
|
|
29128
28878
|
}
|
|
29129
28879
|
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: [{
|
|
29130
28880
|
type: Component,
|
|
@@ -29144,7 +28894,7 @@ i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "21.2.8", ng
|
|
|
29144
28894
|
EntitiesPreview,
|
|
29145
28895
|
EntityPreview,
|
|
29146
28896
|
Icon,
|
|
29147
|
-
], 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"] }]
|
|
28897
|
+
], 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\" && phaseGateRecordCount() > 1\r\n ) {\r\n <div class=\"no-data-container\">\r\n <i class=\"pi pi-info-circle\"></i>\r\n <span>{{\r\n t(\"phaseGateStepperMultipleRecords\", {\r\n count: phaseGateRecordCount(),\r\n })\r\n }}</span>\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]=\"step.isCurrent\"\r\n [class.is-done]=\"step.isCompleted\"\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 || 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:.375rem;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"] }]
|
|
29148
28898
|
}], 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"] }] } }) });
|
|
29149
28899
|
|
|
29150
28900
|
/**
|
|
@@ -33141,9 +32891,7 @@ class DashboardItem {
|
|
|
33141
32891
|
componentName === 'label' ||
|
|
33142
32892
|
componentName === 'BackgroundTextChart' ||
|
|
33143
32893
|
componentName === 'repeater' ||
|
|
33144
|
-
componentName === 'phaseGateStepperCard' ||
|
|
33145
32894
|
requestType === 'snapShot' ||
|
|
33146
|
-
requestType === 'phaseGate' ||
|
|
33147
32895
|
requestType === 'levelCards' ||
|
|
33148
32896
|
requestType === 'timelineProjectDependencies') {
|
|
33149
32897
|
return false;
|
|
@@ -33750,9 +33498,7 @@ class ChartViewer {
|
|
|
33750
33498
|
componentName === 'footer' ||
|
|
33751
33499
|
componentName === 'label' ||
|
|
33752
33500
|
componentName === 'repeater' ||
|
|
33753
|
-
componentName === 'phaseGateStepperCard' ||
|
|
33754
33501
|
requestType === 'snapShot' ||
|
|
33755
|
-
requestType === 'phaseGate' ||
|
|
33756
33502
|
requestType === 'levelCards' ||
|
|
33757
33503
|
requestType === 'timelineProjectDependencies') {
|
|
33758
33504
|
return true;
|
|
@@ -33892,7 +33638,7 @@ const CONFIG_DOMAINS = [
|
|
|
33892
33638
|
* Determine which domains apply to a given chart capability.
|
|
33893
33639
|
*
|
|
33894
33640
|
* Layout widgets (header/topbar/group) only support title + style + advanced.
|
|
33895
|
-
* Special endpoint widgets (snapshot/
|
|
33641
|
+
* Special endpoint widgets (snapshot/repeater) skip filters where
|
|
33896
33642
|
* filters are not honored. Everything else gets the full domain set.
|
|
33897
33643
|
*
|
|
33898
33644
|
* Pure: never mutates the capability.
|
|
@@ -33917,18 +33663,6 @@ function domainsForCapability(cap) {
|
|
|
33917
33663
|
],
|
|
33918
33664
|
};
|
|
33919
33665
|
}
|
|
33920
|
-
if (cap.requestType === 'phaseGate') {
|
|
33921
|
-
return [
|
|
33922
|
-
'title',
|
|
33923
|
-
'datasource',
|
|
33924
|
-
'style',
|
|
33925
|
-
'layout',
|
|
33926
|
-
'advanced',
|
|
33927
|
-
].reduce((acc, k) => {
|
|
33928
|
-
acc.domains.push(k);
|
|
33929
|
-
return acc;
|
|
33930
|
-
}, { domains: [] });
|
|
33931
|
-
}
|
|
33932
33666
|
return {
|
|
33933
33667
|
domains: [
|
|
33934
33668
|
'title',
|
|
@@ -39210,12 +38944,10 @@ class DataSourceSettings {
|
|
|
39210
38944
|
availableDashboards = signal([], ...(ngDevMode ? [{ debugName: "availableDashboards" }] : /* istanbul ignore next */ []));
|
|
39211
38945
|
/** Show source links when multiple selections exist */
|
|
39212
38946
|
showSourceLinks = computed(() => this.selections().length > 1, ...(ngDevMode ? [{ debugName: "showSourceLinks" }] : /* istanbul ignore next */ []));
|
|
39213
|
-
/** Hide selection config for layout
|
|
38947
|
+
/** Hide selection config for layout and snapshot types (they don't need data source selection) */
|
|
39214
38948
|
hideSelectionConfig = computed(() => {
|
|
39215
38949
|
const queryType = this.queryComponentType();
|
|
39216
|
-
return
|
|
39217
|
-
queryType === 'snapshot' ||
|
|
39218
|
-
queryType === 'phaseGate');
|
|
38950
|
+
return queryType === 'none' || queryType === 'snapshot';
|
|
39219
38951
|
}, ...(ngDevMode ? [{ debugName: "hideSelectionConfig" }] : /* istanbul ignore next */ []));
|
|
39220
38952
|
/** Show groupByMultiple for table queries (non-report mode) */
|
|
39221
38953
|
showGroupByMultiple = computed(() => {
|
|
@@ -39764,15 +39496,6 @@ class DataSourceSettings {
|
|
|
39764
39496
|
this.query.set(nextQuery);
|
|
39765
39497
|
this.serviceConfigChange.emit({ query: nextQuery });
|
|
39766
39498
|
}
|
|
39767
|
-
/**
|
|
39768
|
-
* Phase Gate query: a single levelId field (static or dynamic placeholder).
|
|
39769
|
-
*/
|
|
39770
|
-
onPhaseGateLevelIdChange(value) {
|
|
39771
|
-
const currentQuery = (this.query() ?? {});
|
|
39772
|
-
const nextQuery = { ...currentQuery, levelId: value ?? '' };
|
|
39773
|
-
this.query.set(nextQuery);
|
|
39774
|
-
this.serviceConfigChange.emit({ query: nextQuery });
|
|
39775
|
-
}
|
|
39776
39499
|
/**
|
|
39777
39500
|
* Timeline Multi-Level: list of per-level configurations + extra
|
|
39778
39501
|
* selected properties. Auto-fills selectedProperties.
|
|
@@ -39877,12 +39600,37 @@ class DataSourceSettings {
|
|
|
39877
39600
|
: [];
|
|
39878
39601
|
}, ...(ngDevMode ? [{ debugName: "repeaterSelectedProperties" }] : /* istanbul ignore next */ []));
|
|
39879
39602
|
/**
|
|
39880
|
-
*
|
|
39603
|
+
* Role pickers of the Phase Gate Stepper, in display order. The stepper
|
|
39604
|
+
* shares the PhaseGate Table query contract; which roles are required comes
|
|
39605
|
+
* from its capability schema.
|
|
39881
39606
|
*/
|
|
39882
|
-
|
|
39883
|
-
|
|
39884
|
-
|
|
39885
|
-
|
|
39607
|
+
phaseGateStepperRoles = [
|
|
39608
|
+
{
|
|
39609
|
+
field: 'rowIdentityProperty',
|
|
39610
|
+
label: 'phaseGateStepperRecordProperty',
|
|
39611
|
+
hint: 'phaseGateStepperRecordPropertyHint',
|
|
39612
|
+
},
|
|
39613
|
+
{
|
|
39614
|
+
field: 'phaseNameProperty',
|
|
39615
|
+
label: 'phaseGateNameProperty',
|
|
39616
|
+
hint: 'phaseGateStepperNamePropertyHint',
|
|
39617
|
+
},
|
|
39618
|
+
{
|
|
39619
|
+
field: 'phaseOrderProperty',
|
|
39620
|
+
label: 'phaseGateStepperOrderProperty',
|
|
39621
|
+
hint: 'phaseGateStepperOrderPropertyHint',
|
|
39622
|
+
},
|
|
39623
|
+
{
|
|
39624
|
+
field: 'phaseIsCurrentProperty',
|
|
39625
|
+
label: 'phaseGateStepperCurrentProperty',
|
|
39626
|
+
hint: 'phaseGateStepperCurrentPropertyHint',
|
|
39627
|
+
},
|
|
39628
|
+
{
|
|
39629
|
+
field: 'phaseIsCompletedProperty',
|
|
39630
|
+
label: 'phaseGateCompletedProperty',
|
|
39631
|
+
hint: 'phaseGateStepperCompletedPropertyHint',
|
|
39632
|
+
},
|
|
39633
|
+
];
|
|
39886
39634
|
/** Dedicated PhaseGate table query hydrated from legacy table configs. */
|
|
39887
39635
|
phaseGateTableQuery = computed(() => normalizePhaseGateTableQuery((this.query() ?? {}), { migrateLegacy: true }), ...(ngDevMode ? [{ debugName: "phaseGateTableQuery" }] : /* istanbul ignore next */ []));
|
|
39888
39636
|
/**
|
|
@@ -40092,7 +39840,7 @@ class DataSourceSettings {
|
|
|
40092
39840
|
};
|
|
40093
39841
|
}
|
|
40094
39842
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: DataSourceSettings, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
40095
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: DataSourceSettings, isStandalone: true, selector: "mt-data-source-settings", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, chartType: { classPropertyName: "chartType", publicName: "chartType", isSignal: true, isRequired: false, transformFunction: null }, informativeContext: { classPropertyName: "informativeContext", publicName: "informativeContext", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { serviceConfigChange: "serviceConfigChange" }, ngImport: i0, template: "<div class=\"flex flex-col gap-5\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\r\n <!-- Data source mode: Selection cycle OR Custom API (separated area on top) -->\r\n @if (supportsCustomApi()) {\r\n <div class=\"grid grid-cols-2 gap-3\">\r\n <button\r\n type=\"button\"\r\n class=\"flex items-start gap-2 rounded-lg border p-3 text-left transition-colors\"\r\n [class.border-primary-500]=\"dataSourceMode() === 'selection'\"\r\n [class.bg-primary-50]=\"dataSourceMode() === 'selection'\"\r\n [class.border-surface-200]=\"dataSourceMode() !== 'selection'\"\r\n [class.hover:bg-surface-50]=\"dataSourceMode() !== 'selection'\"\r\n (click)=\"onModeChange('selection')\"\r\n >\r\n <mt-icon\r\n icon=\"dev.database-01\"\r\n class=\"mt-0.5 text-lg\"\r\n [class.text-primary-600]=\"dataSourceMode() === 'selection'\"\r\n [class.text-muted-color]=\"dataSourceMode() !== 'selection'\"\r\n />\r\n <span class=\"flex flex-col\">\r\n <span class=\"text-sm font-semibold text-surface-700\">\r\n {{ t(\"dataSourceModes.selection\") }}\r\n </span>\r\n <span class=\"text-xs text-muted-color\">\r\n {{ t(\"dataSourceModes.selectionHint\") }}\r\n </span>\r\n </span>\r\n </button>\r\n\r\n <button\r\n type=\"button\"\r\n class=\"flex items-start gap-2 rounded-lg border p-3 text-left transition-colors\"\r\n [class.border-primary-500]=\"dataSourceMode() === 'customApi'\"\r\n [class.bg-primary-50]=\"dataSourceMode() === 'customApi'\"\r\n [class.border-surface-200]=\"dataSourceMode() !== 'customApi'\"\r\n [class.hover:bg-surface-50]=\"dataSourceMode() !== 'customApi'\"\r\n (click)=\"onModeChange('customApi')\"\r\n >\r\n <mt-icon\r\n icon=\"dev.code-02\"\r\n class=\"mt-0.5 text-lg\"\r\n [class.text-primary-600]=\"dataSourceMode() === 'customApi'\"\r\n [class.text-muted-color]=\"dataSourceMode() !== 'customApi'\"\r\n />\r\n <span class=\"flex flex-col\">\r\n <span class=\"text-sm font-semibold text-surface-700\">\r\n {{ t(\"dataSourceModes.customApi\") }}\r\n </span>\r\n <span class=\"text-xs text-muted-color\">\r\n {{ t(\"dataSourceModes.customApiHint\") }}\r\n </span>\r\n </span>\r\n </button>\r\n </div>\r\n }\r\n\r\n <!-- ===================== CUSTOM API MODE ===================== -->\r\n @if (supportsCustomApi() && dataSourceMode() === \"customApi\") {\r\n <mt-custom-api-configuration\r\n [ngModel]=\"customApi()\"\r\n (ngModelChange)=\"onCustomApiChange($event)\"\r\n />\r\n } @else {\r\n <!-- ===================== SELECTION CYCLE ===================== -->\r\n\r\n <!-- Workspace gate: pick ONE workspace before the tabs/config appear.\r\n The picker shows whenever no workspace is chosen yet \u2014 for a brand-new\r\n chart it also blocks the tabs (needsWorkspacePick), but an existing\r\n chart that never had a workspace still gets the picker so it can be\r\n assigned (and saved into serviceConfig.workspaceId for navigate-to). -->\r\n @if (showWorkspaceGate()) {\r\n @if (!chartWorkspace()) {\r\n <div\r\n class=\"flex flex-col items-center gap-3 rounded-lg border border-dashed border-surface-300 bg-surface-50 p-6 text-center\"\r\n >\r\n <mt-icon icon=\"dev.database-01\" class=\"text-3xl text-primary-500\" />\r\n <div class=\"flex flex-col gap-1\">\r\n <h3 class=\"text-sm font-semibold text-surface-700\">\r\n {{ t(\"workspaceGateTitle\") }}\r\n </h3>\r\n <p class=\"text-xs text-muted-color\">\r\n {{ t(\"workspaceGateHint\") }}\r\n </p>\r\n </div>\r\n <div class=\"w-full max-w-sm\">\r\n <mt-select-field\r\n [options]=\"workspaceOptions()\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [placeholder]=\"t('selectWorkspace')\"\r\n [filter]=\"true\"\r\n [ngModel]=\"chartWorkspace()\"\r\n (ngModelChange)=\"onWorkspacePick($event)\"\r\n />\r\n </div>\r\n </div>\r\n } @else if (workspaceAutoDetected()) {\r\n <!-- Old data: workspace inferred from the chart's existing config.\r\n Surface it with a Save-to-keep / Clear notice instead of a silent\r\n chip, so the user knows it must be saved (or can pick another). -->\r\n <div\r\n class=\"flex flex-wrap items-center justify-between gap-3 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2\"\r\n >\r\n <span class=\"flex items-start gap-2 text-sm\">\r\n <mt-icon\r\n icon=\"general.alert-circle\"\r\n class=\"mt-0.5 text-base text-amber-600\"\r\n />\r\n <span class=\"flex flex-col\">\r\n <span class=\"font-medium text-surface-700\">\r\n {{ t(\"workspace\") }}: {{ chartWorkspaceLabel() }}\r\n </span>\r\n <span class=\"text-xs text-amber-700\">{{\r\n t(\"workspaceAutoHint\")\r\n }}</span>\r\n </span>\r\n </span>\r\n <mt-button\r\n [label]=\"t('clear')\"\r\n severity=\"secondary\"\r\n variant=\"outlined\"\r\n size=\"small\"\r\n (onClick)=\"clearAutoDetectedWorkspace()\"\r\n />\r\n </div>\r\n } @else {\r\n <div\r\n class=\"flex flex-wrap items-center justify-between gap-2 rounded-lg border border-surface-200 bg-surface-50 px-3 py-2\"\r\n >\r\n <span class=\"flex items-center gap-2 text-sm\">\r\n <mt-icon\r\n icon=\"dev.database-01\"\r\n class=\"text-base text-primary-500\"\r\n />\r\n <span class=\"text-muted-color\">{{ t(\"workspace\") }}:</span>\r\n <span class=\"font-medium text-surface-700\">{{\r\n chartWorkspaceLabel()\r\n }}</span>\r\n </span>\r\n @if (!confirmingWorkspaceChange()) {\r\n <mt-button\r\n [label]=\"t('change')\"\r\n severity=\"secondary\"\r\n variant=\"outlined\"\r\n size=\"small\"\r\n (onClick)=\"requestChangeWorkspace()\"\r\n />\r\n } @else {\r\n <span class=\"flex flex-wrap items-center gap-2\">\r\n <span class=\"text-xs text-amber-600\">{{\r\n t(\"changeWorkspaceConfirm\")\r\n }}</span>\r\n <mt-button\r\n [label]=\"t('cancel')\"\r\n severity=\"secondary\"\r\n variant=\"outlined\"\r\n size=\"small\"\r\n (onClick)=\"cancelChangeWorkspace()\"\r\n />\r\n <mt-button\r\n [label]=\"t('changeAndClear')\"\r\n severity=\"danger\"\r\n size=\"small\"\r\n (onClick)=\"confirmChangeWorkspace()\"\r\n />\r\n </span>\r\n }\r\n </div>\r\n }\r\n }\r\n\r\n <!-- Sub-navigation: Selection \u00B7 Source Links (when >1 selection) \u00B7 Query -->\r\n @if (sectionOptions().length > 1 && !needsWorkspacePick()) {\r\n <mt-tabs\r\n [options]=\"sectionOptions()\"\r\n optionLabel=\"label\"\r\n optionValue=\"id\"\r\n [active]=\"visibleSection()\"\r\n (onChange)=\"onSectionChange($event)\"\r\n />\r\n }\r\n\r\n <!-- ===================== SELECTION ===================== -->\r\n @if (!hideSelectionConfig() && !needsWorkspacePick()) {\r\n <div\r\n [hidden]=\"visibleSection() !== 'selection'\"\r\n class=\"flex flex-col gap-5\"\r\n >\r\n @if (showInformativeSelectionMode()) {\r\n <div class=\"flex items-center justify-end\">\r\n <mt-toggle-field\r\n [label]=\"t('advancedSelection')\"\r\n [ngModel]=\"selectionMode() === 'advanced'\"\r\n (ngModelChange)=\"onAdvancedSelectionToggle($event)\"\r\n />\r\n </div>\r\n }\r\n\r\n @if (\r\n !showInformativeSelectionMode() || selectionMode() === \"advanced\"\r\n ) {\r\n <mt-selection-configuration\r\n [workspaceId]=\"selectedWorkspaceId()\"\r\n [chartWorkspace]=\"chartWorkspace()\"\r\n [modulesProperties]=\"modulesProperties()\"\r\n [propertiesFlat]=\"propertiesFlat()\"\r\n [ngModel]=\"selections()\"\r\n (ngModelChange)=\"onSelectionsChange($event)\"\r\n (moduleChange)=\"onModuleChange($event)\"\r\n />\r\n } @else {\r\n <div class=\"flex flex-col gap-5\">\r\n <mt-informative-context-selection\r\n class=\"block\"\r\n [informativeContext]=\"informativeContext()\"\r\n [currentSelection]=\"selections()\"\r\n [preferredTargetSelector]=\"contextTargetSelector()\"\r\n [applyToken]=\"contextTargetApplyToken()\"\r\n (templateApply)=\"onContextTemplateApply($event)\"\r\n />\r\n\r\n @if (selections().length) {\r\n <mt-selection-configuration\r\n [workspaceId]=\"selectedWorkspaceId()\"\r\n [chartWorkspace]=\"chartWorkspace()\"\r\n [modulesProperties]=\"modulesProperties()\"\r\n [propertiesFlat]=\"propertiesFlat()\"\r\n [structureLocked]=\"true\"\r\n [ngModel]=\"selections()\"\r\n (ngModelChange)=\"onSelectionsChange($event)\"\r\n />\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n <!-- ===================== SOURCE LINKS (only with >1 selection) ===================== -->\r\n @if (showSourceLinks() && !needsWorkspacePick()) {\r\n <div\r\n [hidden]=\"visibleSection() !== 'sourceLinks'\"\r\n class=\"flex flex-col gap-5\"\r\n >\r\n <mt-source-link-configuration\r\n [selectionModules]=\"selectionModules()\"\r\n [ngModel]=\"sourceLinks()\"\r\n (ngModelChange)=\"onSourceLinksChange($event)\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- ===================== QUERY ===================== -->\r\n @if (queryComponentType() !== \"none\" && !needsWorkspacePick()) {\r\n <div [hidden]=\"visibleSection() !== 'query'\" class=\"flex flex-col gap-5\">\r\n @if (loadingProperties()) {\r\n <div class=\"flex flex-col gap-4\">\r\n <div class=\"flex flex-col gap-2\">\r\n <p-skeleton width=\"120px\" height=\"16px\" />\r\n <p-skeleton width=\"100%\" height=\"40px\" borderRadius=\"8px\" />\r\n </div>\r\n <div class=\"grid grid-cols-2 gap-4\">\r\n <div class=\"flex flex-col gap-2\">\r\n <p-skeleton width=\"80px\" height=\"16px\" />\r\n <p-skeleton width=\"100%\" height=\"40px\" borderRadius=\"8px\" />\r\n </div>\r\n <div class=\"flex flex-col gap-2\">\r\n <p-skeleton width=\"90px\" height=\"16px\" />\r\n <p-skeleton width=\"100%\" height=\"40px\" borderRadius=\"8px\" />\r\n </div>\r\n </div>\r\n </div>\r\n } @else {\r\n <!-- Group By Multiple (table views) -->\r\n @if (showGroupByMultiple()) {\r\n <mt-string-array-input\r\n [label]=\"t('groupByMultiple')\"\r\n [options]=\"\r\n propertiesGrouped().length > 1\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"propertiesGrouped().length > 1\"\r\n [placeholder]=\"t('selectGroupByProperties')\"\r\n [ngModel]=\"groupByMultiple()\"\r\n (ngModelChange)=\"onGroupByMultipleChange($event)\"\r\n />\r\n }\r\n\r\n <!-- Query Configuration based on chart type -->\r\n @switch (queryComponentType()) {\r\n @case (\"lineChart\") {\r\n <mt-line-chart-query\r\n [propertiesFlat]=\"propertiesFlat()\"\r\n [propertiesGrouped]=\"propertiesGrouped()\"\r\n [ngModel]=\"query()\"\r\n (ngModelChange)=\"onLineChartQueryChange($event)\"\r\n />\r\n }\r\n @case (\"general\") {\r\n <mt-general-query\r\n [chartType]=\"getChartTypeId()\"\r\n [querySchema]=\"querySchema()\"\r\n [propertiesFlat]=\"propertiesFlat()\"\r\n [propertiesGrouped]=\"propertiesGrouped()\"\r\n [ngModel]=\"query()\"\r\n (ngModelChange)=\"onQueryChange($event)\"\r\n />\r\n\r\n <mt-toggle-field\r\n [label]=\"t('isNormalized')\"\r\n [ngModel]=\"isNormalized()\"\r\n (ngModelChange)=\"onIsNormalizedChange($event)\"\r\n />\r\n }\r\n @case (\"table\") {\r\n <mt-table-query\r\n [propertiesFlat]=\"propertiesFlat()\"\r\n [propertiesGrouped]=\"propertiesGrouped()\"\r\n [ngModel]=\"query()\"\r\n (ngModelChange)=\"onTableQueryChange($event)\"\r\n />\r\n }\r\n @case (\"phaseGateTable\") {\r\n @let phaseGateQuery = phaseGateTableQuery();\r\n @let groupedPhaseGateProperties = propertiesGrouped().length > 1;\r\n\r\n <div class=\"flex flex-col gap-5\">\r\n <p class=\"text-sm text-muted-color\">\r\n {{ t(\"phaseGateTableQueryDescription\") }}\r\n </p>\r\n\r\n <div class=\"grid grid-cols-1 gap-4 lg:grid-cols-2\">\r\n <mt-select-field\r\n [label]=\"t('phaseGateRowIdentityProperty')\"\r\n [hint]=\"t('phaseGateRowIdentityPropertyHint')\"\r\n [required]=\"true\"\r\n [options]=\"\r\n groupedPhaseGateProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedPhaseGateProperties\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('phaseGateSelectProperty')\"\r\n [ngModel]=\"phaseGateQuery.rowIdentityProperty\"\r\n (ngModelChange)=\"\r\n onPhaseGateTableRoleChange('rowIdentityProperty', $event)\r\n \"\r\n />\r\n\r\n <mt-select-field\r\n [label]=\"t('phaseGateNameProperty')\"\r\n [hint]=\"t('phaseGateNamePropertyHint')\"\r\n [required]=\"true\"\r\n [options]=\"\r\n groupedPhaseGateProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedPhaseGateProperties\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('phaseGateSelectProperty')\"\r\n [ngModel]=\"phaseGateQuery.phaseNameProperty\"\r\n (ngModelChange)=\"\r\n onPhaseGateTableRoleChange('phaseNameProperty', $event)\r\n \"\r\n />\r\n\r\n <mt-select-field\r\n [label]=\"t('phaseGateStatusProperty')\"\r\n [hint]=\"t('phaseGateStatusPropertyHint')\"\r\n [required]=\"true\"\r\n [options]=\"\r\n groupedPhaseGateProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedPhaseGateProperties\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('phaseGateSelectProperty')\"\r\n [ngModel]=\"phaseGateQuery.phaseStatusProperty\"\r\n (ngModelChange)=\"\r\n onPhaseGateTableRoleChange('phaseStatusProperty', $event)\r\n \"\r\n />\r\n\r\n <mt-select-field\r\n [label]=\"t('phaseGateIdProperty')\"\r\n [showClear]=\"true\"\r\n [options]=\"\r\n groupedPhaseGateProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedPhaseGateProperties\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('phaseGateSelectProperty')\"\r\n [ngModel]=\"phaseGateQuery.phaseIdProperty\"\r\n (ngModelChange)=\"\r\n onPhaseGateTableRoleChange('phaseIdProperty', $event)\r\n \"\r\n />\r\n\r\n <mt-select-field\r\n [label]=\"t('phaseGateOrderProperty')\"\r\n [showClear]=\"true\"\r\n [options]=\"\r\n groupedPhaseGateProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedPhaseGateProperties\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('phaseGateSelectProperty')\"\r\n [ngModel]=\"phaseGateQuery.phaseOrderProperty\"\r\n (ngModelChange)=\"\r\n onPhaseGateTableRoleChange('phaseOrderProperty', $event)\r\n \"\r\n />\r\n\r\n <mt-select-field\r\n [label]=\"t('phaseGateProgressProperty')\"\r\n [showClear]=\"true\"\r\n [options]=\"\r\n groupedPhaseGateProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedPhaseGateProperties\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('phaseGateSelectProperty')\"\r\n [ngModel]=\"phaseGateQuery.phaseProgressProperty\"\r\n (ngModelChange)=\"\r\n onPhaseGateTableRoleChange(\r\n 'phaseProgressProperty',\r\n $event\r\n )\r\n \"\r\n />\r\n\r\n <mt-select-field\r\n [label]=\"t('phaseGateCurrentProperty')\"\r\n [showClear]=\"true\"\r\n [options]=\"\r\n groupedPhaseGateProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedPhaseGateProperties\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('phaseGateSelectProperty')\"\r\n [ngModel]=\"phaseGateQuery.phaseIsCurrentProperty\"\r\n (ngModelChange)=\"\r\n onPhaseGateTableRoleChange(\r\n 'phaseIsCurrentProperty',\r\n $event\r\n )\r\n \"\r\n />\r\n\r\n <mt-select-field\r\n [label]=\"t('phaseGateCompletedProperty')\"\r\n [showClear]=\"true\"\r\n [options]=\"\r\n groupedPhaseGateProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedPhaseGateProperties\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('phaseGateSelectProperty')\"\r\n [ngModel]=\"phaseGateQuery.phaseIsCompletedProperty\"\r\n (ngModelChange)=\"\r\n onPhaseGateTableRoleChange(\r\n 'phaseIsCompletedProperty',\r\n $event\r\n )\r\n \"\r\n />\r\n\r\n <mt-select-field\r\n [label]=\"t('phaseGateAllItemsCompletedProperty')\"\r\n [showClear]=\"true\"\r\n [options]=\"\r\n groupedPhaseGateProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedPhaseGateProperties\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('phaseGateSelectProperty')\"\r\n [ngModel]=\"phaseGateQuery.phaseAllItemsCompletedProperty\"\r\n (ngModelChange)=\"\r\n onPhaseGateTableRoleChange(\r\n 'phaseAllItemsCompletedProperty',\r\n $event\r\n )\r\n \"\r\n />\r\n </div>\r\n\r\n <mt-string-array-input\r\n [label]=\"t('phaseGateVisibleProperties')\"\r\n [options]=\"\r\n groupedPhaseGateProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedPhaseGateProperties\"\r\n [placeholder]=\"t('phaseGateVisiblePropertiesPlaceholder')\"\r\n [ngModel]=\"phaseGateQuery.baseProperties\"\r\n (ngModelChange)=\"onPhaseGateTableBasePropertiesChange($event)\"\r\n />\r\n\r\n <p class=\"text-xs text-muted-color\">\r\n {{ t(\"phaseGateProjectionHint\") }}\r\n </p>\r\n </div>\r\n }\r\n @case (\"timeline\") {\r\n <mt-timeline-query\r\n [propertiesFlat]=\"propertiesFlat()\"\r\n [propertiesGrouped]=\"propertiesGrouped()\"\r\n [ngModel]=\"query()\"\r\n (ngModelChange)=\"onTimelineQueryChange($event)\"\r\n />\r\n }\r\n @case (\"timelineMultiLevel\") {\r\n <div class=\"flex flex-col gap-5\">\r\n <div class=\"flex items-center justify-between\">\r\n <p class=\"text-sm text-muted-color\">\r\n {{ t(\"timelineMultiLevelDescription\") }}\r\n </p>\r\n <mt-button\r\n size=\"small\"\r\n severity=\"secondary\"\r\n icon=\"general.plus\"\r\n [label]=\"t('addLevel')\"\r\n (onClick)=\"addTimelineLevel()\"\r\n />\r\n </div>\r\n\r\n <mt-select-field\r\n [label]=\"t('timeFrame')\"\r\n [options]=\"timeFrameOptions\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [ngModel]=\"timelineTimeFrame()\"\r\n (ngModelChange)=\"onTimelineTimeFrameChange($event)\"\r\n />\r\n\r\n @for (level of timelineLevels(); track $index) {\r\n <div\r\n class=\"border border-surface-300 rounded-md p-4 flex flex-col gap-3\"\r\n >\r\n <div class=\"flex items-center justify-between\">\r\n <span class=\"font-medium\">\r\n {{ t(\"level\") }} {{ level.levelNumber || $index + 1 }}\r\n </span>\r\n <mt-button\r\n size=\"small\"\r\n severity=\"danger\"\r\n [text]=\"true\"\r\n icon=\"general.trash-02\"\r\n (onClick)=\"removeTimelineLevel($index)\"\r\n />\r\n </div>\r\n\r\n <div class=\"grid grid-cols-2 gap-3\">\r\n <mt-select-field\r\n [label]=\"t('pivotProperty')\"\r\n [options]=\"\r\n propertiesGrouped().length > 1\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"propertiesGrouped().length > 1\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [ngModel]=\"level.pivotProperty\"\r\n (ngModelChange)=\"\r\n updateTimelineLevelField(\r\n $index,\r\n 'pivotProperty',\r\n $event\r\n )\r\n \"\r\n />\r\n <mt-select-field\r\n [label]=\"t('lookupProperty')\"\r\n [options]=\"\r\n propertiesGrouped().length > 1\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"propertiesGrouped().length > 1\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [ngModel]=\"level.lookupProperty\"\r\n (ngModelChange)=\"\r\n updateTimelineLevelField(\r\n $index,\r\n 'lookupProperty',\r\n $event\r\n )\r\n \"\r\n />\r\n <mt-select-field\r\n [label]=\"t('idProperty')\"\r\n [options]=\"\r\n propertiesGrouped().length > 1\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"propertiesGrouped().length > 1\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [ngModel]=\"level.idProperty\"\r\n (ngModelChange)=\"\r\n updateTimelineLevelField($index, 'idProperty', $event)\r\n \"\r\n />\r\n <mt-select-field\r\n [label]=\"t('startTimeProperty')\"\r\n [options]=\"\r\n propertiesGrouped().length > 1\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"propertiesGrouped().length > 1\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [ngModel]=\"level.startPoint_timeProperty\"\r\n (ngModelChange)=\"\r\n updateTimelineLevelField(\r\n $index,\r\n 'startPoint_timeProperty',\r\n $event\r\n )\r\n \"\r\n />\r\n <mt-select-field\r\n [label]=\"t('endTimeProperty')\"\r\n [options]=\"\r\n propertiesGrouped().length > 1\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"propertiesGrouped().length > 1\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [ngModel]=\"level.endPoint_timeProperty\"\r\n (ngModelChange)=\"\r\n updateTimelineLevelField(\r\n $index,\r\n 'endPoint_timeProperty',\r\n $event\r\n )\r\n \"\r\n />\r\n <mt-select-field\r\n [label]=\"t('progressProperty')\"\r\n [options]=\"\r\n propertiesGrouped().length > 1\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"propertiesGrouped().length > 1\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [ngModel]=\"level.progressProperty\"\r\n (ngModelChange)=\"\r\n updateTimelineLevelField(\r\n $index,\r\n 'progressProperty',\r\n $event\r\n )\r\n \"\r\n />\r\n @if (shouldShowTimelineParentProperty($index)) {\r\n <mt-select-field\r\n [label]=\"t('parentProperty')\"\r\n [options]=\"timelineParentPropertyOptions($index)\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n [ngModel]=\"level.parentProperty\"\r\n (ngModelChange)=\"\r\n updateTimelineLevelField(\r\n $index,\r\n 'parentProperty',\r\n $event\r\n )\r\n \"\r\n />\r\n }\r\n </div>\r\n\r\n <mt-string-array-input\r\n [label]=\"t('extraProperties')\"\r\n [options]=\"\r\n propertiesGrouped().length > 1\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"propertiesGrouped().length > 1\"\r\n [placeholder]=\"t('selectProperties')\"\r\n [ngModel]=\"level.extraProperties || level.extras || []\"\r\n (ngModelChange)=\"\r\n updateTimelineLevelField(\r\n $index,\r\n 'extraProperties',\r\n $event\r\n )\r\n \"\r\n />\r\n </div>\r\n }\r\n\r\n @if (timelineLevels().length === 0) {\r\n <div class=\"text-center py-4 text-muted-color text-sm\">\r\n {{ t(\"noTimelineLevelsHint\") }}\r\n </div>\r\n }\r\n </div>\r\n }\r\n @case (\"map\") {\r\n <mt-map-query\r\n [propertiesFlat]=\"propertiesFlat()\"\r\n [propertiesGrouped]=\"propertiesGrouped()\"\r\n [ngModel]=\"query()\"\r\n (ngModelChange)=\"onMapQueryChange($event)\"\r\n />\r\n }\r\n @case (\"splitter\") {\r\n <mt-splitter-query\r\n [propertiesFlat]=\"propertiesFlat()\"\r\n [propertiesGrouped]=\"propertiesGrouped()\"\r\n [ngModel]=\"query()\"\r\n (ngModelChange)=\"onSplitterQueryChange($event)\"\r\n />\r\n }\r\n @case (\"properties\") {\r\n <mt-properties-query\r\n [propertiesFlat]=\"propertiesFlat()\"\r\n [propertiesGrouped]=\"propertiesGrouped()\"\r\n [ngModel]=\"query()\"\r\n (ngModelChange)=\"onPropertiesQueryChange($event)\"\r\n />\r\n }\r\n @case (\"snapshot\") {\r\n <mt-snapshot-query\r\n [propertiesFlat]=\"propertiesFlat()\"\r\n [propertiesGrouped]=\"propertiesGrouped()\"\r\n [ngModel]=\"query()\"\r\n (ngModelChange)=\"onSnapshotQueryChange($event)\"\r\n />\r\n }\r\n @case (\"phaseGate\") {\r\n <div class=\"flex flex-col gap-2\">\r\n <mt-text-field\r\n [label]=\"t('levelId')\"\r\n [ngModel]=\"phaseGateLevelId()\"\r\n (ngModelChange)=\"onPhaseGateLevelIdChange($event)\"\r\n />\r\n <p class=\"text-xs text-muted-color\">\r\n {{ t(\"phaseGateLevelIdHint\") }}\r\n </p>\r\n </div>\r\n }\r\n @case (\"repeater\") {\r\n <div class=\"flex flex-col gap-5\">\r\n <mt-select-field\r\n [label]=\"t('repeaterDashboard')\"\r\n [options]=\"availableDashboards()\"\r\n optionLabel=\"name\"\r\n optionValue=\"id\"\r\n [ngModel]=\"repeaterDashboardId()\"\r\n (ngModelChange)=\"onRepeaterDashboardChange($event)\"\r\n />\r\n\r\n <mt-string-array-input\r\n [label]=\"t('repeaterSelectedProperties')\"\r\n [options]=\"\r\n propertiesGrouped().length > 1\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"propertiesGrouped().length > 1\"\r\n [placeholder]=\"t('repeaterSelectedPropertiesPlaceholder')\"\r\n [ngModel]=\"repeaterSelectedProperties()\"\r\n (ngModelChange)=\"onRepeaterSelectedPropertiesChange($event)\"\r\n />\r\n </div>\r\n }\r\n }\r\n }\r\n </div>\r\n }\r\n }\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "component", type: SelectField, selector: "mt-select-field", inputs: ["field", "hint", "label", "placeholder", "hasPlaceholderPrefix", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "clearAfterSelect", "required", "group", "size", "optionGroupLabel", "optionGroupChildren", "loading", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape", "markCurrentUser"], outputs: ["onChange"] }, { kind: "component", type: ToggleField, selector: "mt-toggle-field", inputs: ["label", "inputId", "labelPosition", "placeholder", "readonly", "pInputs", "required", "toggleShape", "size", "icon", "descriptionCard"], outputs: ["onChange"] }, { kind: "component", type: Tabs, selector: "mt-tabs", inputs: ["options", "optionLabel", "optionValue", "active", "mode", "moreLabel", "defaultIcon", "size", "fluid", "disabled", "searchThreshold"], outputs: ["activeChange", "onChange"] }, { kind: "component", type: TextField, selector: "mt-text-field", inputs: ["field", "hint", "label", "placeholder", "class", "type", "readonly", "pInputs", "required", "maxLength", "icon", "iconPosition"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }, { kind: "component", type: SelectionConfiguration, selector: "mt-selection-configuration", inputs: ["structureLocked", "workspaceId", "chartWorkspace", "modulesProperties", "propertiesFlat"], outputs: ["moduleChange"] }, { kind: "component", type: SourceLinkConfiguration, selector: "mt-source-link-configuration", inputs: ["selectionModules"] }, { kind: "component", type: CustomApiConfiguration, selector: "mt-custom-api-configuration" }, { kind: "component", type: GeneralQuery, selector: "mt-general-query", inputs: ["chartType", "querySchema", "propertiesFlat", "propertiesGrouped"] }, { kind: "component", type: LineChartQuery, selector: "mt-line-chart-query", inputs: ["propertiesFlat", "propertiesGrouped"] }, { kind: "component", type: TableQuery, selector: "mt-table-query", inputs: ["propertiesFlat", "propertiesGrouped"] }, { kind: "component", type: TimelineQuery, selector: "mt-timeline-query", inputs: ["propertiesFlat", "propertiesGrouped"] }, { kind: "component", type: PropertiesQuery, selector: "mt-properties-query", inputs: ["propertiesFlat", "propertiesGrouped"] }, { kind: "component", type: SnapshotQuery, selector: "mt-snapshot-query", inputs: ["propertiesFlat", "propertiesGrouped"] }, { kind: "component", type: MapQuery, selector: "mt-map-query", inputs: ["propertiesFlat", "propertiesGrouped"] }, { kind: "component", type: SplitterQuery, selector: "mt-splitter-query", inputs: ["propertiesFlat", "propertiesGrouped"] }, { kind: "component", type: InformativeContextSelection, selector: "mt-informative-context-selection", inputs: ["informativeContext", "currentSelection", "preferredTargetSelector", "applyToken"], outputs: ["templateApply"] }, { kind: "component", type: StringArrayInput, selector: "mt-string-array-input", inputs: ["label", "placeholder", "options", "group", "optionLabel", "optionValue", "optionGroupLabel", "optionGroupChildren", "filter", "emptyHint"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
39843
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: DataSourceSettings, isStandalone: true, selector: "mt-data-source-settings", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, chartType: { classPropertyName: "chartType", publicName: "chartType", isSignal: true, isRequired: false, transformFunction: null }, informativeContext: { classPropertyName: "informativeContext", publicName: "informativeContext", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { serviceConfigChange: "serviceConfigChange" }, ngImport: i0, template: "<div class=\"flex flex-col gap-5\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\r\n <!-- Data source mode: Selection cycle OR Custom API (separated area on top) -->\r\n @if (supportsCustomApi()) {\r\n <div class=\"grid grid-cols-2 gap-3\">\r\n <button\r\n type=\"button\"\r\n class=\"flex items-start gap-2 rounded-lg border p-3 text-left transition-colors\"\r\n [class.border-primary-500]=\"dataSourceMode() === 'selection'\"\r\n [class.bg-primary-50]=\"dataSourceMode() === 'selection'\"\r\n [class.border-surface-200]=\"dataSourceMode() !== 'selection'\"\r\n [class.hover:bg-surface-50]=\"dataSourceMode() !== 'selection'\"\r\n (click)=\"onModeChange('selection')\"\r\n >\r\n <mt-icon\r\n icon=\"dev.database-01\"\r\n class=\"mt-0.5 text-lg\"\r\n [class.text-primary-600]=\"dataSourceMode() === 'selection'\"\r\n [class.text-muted-color]=\"dataSourceMode() !== 'selection'\"\r\n />\r\n <span class=\"flex flex-col\">\r\n <span class=\"text-sm font-semibold text-surface-700\">\r\n {{ t(\"dataSourceModes.selection\") }}\r\n </span>\r\n <span class=\"text-xs text-muted-color\">\r\n {{ t(\"dataSourceModes.selectionHint\") }}\r\n </span>\r\n </span>\r\n </button>\r\n\r\n <button\r\n type=\"button\"\r\n class=\"flex items-start gap-2 rounded-lg border p-3 text-left transition-colors\"\r\n [class.border-primary-500]=\"dataSourceMode() === 'customApi'\"\r\n [class.bg-primary-50]=\"dataSourceMode() === 'customApi'\"\r\n [class.border-surface-200]=\"dataSourceMode() !== 'customApi'\"\r\n [class.hover:bg-surface-50]=\"dataSourceMode() !== 'customApi'\"\r\n (click)=\"onModeChange('customApi')\"\r\n >\r\n <mt-icon\r\n icon=\"dev.code-02\"\r\n class=\"mt-0.5 text-lg\"\r\n [class.text-primary-600]=\"dataSourceMode() === 'customApi'\"\r\n [class.text-muted-color]=\"dataSourceMode() !== 'customApi'\"\r\n />\r\n <span class=\"flex flex-col\">\r\n <span class=\"text-sm font-semibold text-surface-700\">\r\n {{ t(\"dataSourceModes.customApi\") }}\r\n </span>\r\n <span class=\"text-xs text-muted-color\">\r\n {{ t(\"dataSourceModes.customApiHint\") }}\r\n </span>\r\n </span>\r\n </button>\r\n </div>\r\n }\r\n\r\n <!-- ===================== CUSTOM API MODE ===================== -->\r\n @if (supportsCustomApi() && dataSourceMode() === \"customApi\") {\r\n <mt-custom-api-configuration\r\n [ngModel]=\"customApi()\"\r\n (ngModelChange)=\"onCustomApiChange($event)\"\r\n />\r\n } @else {\r\n <!-- ===================== SELECTION CYCLE ===================== -->\r\n\r\n <!-- Workspace gate: pick ONE workspace before the tabs/config appear.\r\n The picker shows whenever no workspace is chosen yet \u2014 for a brand-new\r\n chart it also blocks the tabs (needsWorkspacePick), but an existing\r\n chart that never had a workspace still gets the picker so it can be\r\n assigned (and saved into serviceConfig.workspaceId for navigate-to). -->\r\n @if (showWorkspaceGate()) {\r\n @if (!chartWorkspace()) {\r\n <div\r\n class=\"flex flex-col items-center gap-3 rounded-lg border border-dashed border-surface-300 bg-surface-50 p-6 text-center\"\r\n >\r\n <mt-icon icon=\"dev.database-01\" class=\"text-3xl text-primary-500\" />\r\n <div class=\"flex flex-col gap-1\">\r\n <h3 class=\"text-sm font-semibold text-surface-700\">\r\n {{ t(\"workspaceGateTitle\") }}\r\n </h3>\r\n <p class=\"text-xs text-muted-color\">\r\n {{ t(\"workspaceGateHint\") }}\r\n </p>\r\n </div>\r\n <div class=\"w-full max-w-sm\">\r\n <mt-select-field\r\n [options]=\"workspaceOptions()\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [placeholder]=\"t('selectWorkspace')\"\r\n [filter]=\"true\"\r\n [ngModel]=\"chartWorkspace()\"\r\n (ngModelChange)=\"onWorkspacePick($event)\"\r\n />\r\n </div>\r\n </div>\r\n } @else if (workspaceAutoDetected()) {\r\n <!-- Old data: workspace inferred from the chart's existing config.\r\n Surface it with a Save-to-keep / Clear notice instead of a silent\r\n chip, so the user knows it must be saved (or can pick another). -->\r\n <div\r\n class=\"flex flex-wrap items-center justify-between gap-3 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2\"\r\n >\r\n <span class=\"flex items-start gap-2 text-sm\">\r\n <mt-icon\r\n icon=\"general.alert-circle\"\r\n class=\"mt-0.5 text-base text-amber-600\"\r\n />\r\n <span class=\"flex flex-col\">\r\n <span class=\"font-medium text-surface-700\">\r\n {{ t(\"workspace\") }}: {{ chartWorkspaceLabel() }}\r\n </span>\r\n <span class=\"text-xs text-amber-700\">{{\r\n t(\"workspaceAutoHint\")\r\n }}</span>\r\n </span>\r\n </span>\r\n <mt-button\r\n [label]=\"t('clear')\"\r\n severity=\"secondary\"\r\n variant=\"outlined\"\r\n size=\"small\"\r\n (onClick)=\"clearAutoDetectedWorkspace()\"\r\n />\r\n </div>\r\n } @else {\r\n <div\r\n class=\"flex flex-wrap items-center justify-between gap-2 rounded-lg border border-surface-200 bg-surface-50 px-3 py-2\"\r\n >\r\n <span class=\"flex items-center gap-2 text-sm\">\r\n <mt-icon\r\n icon=\"dev.database-01\"\r\n class=\"text-base text-primary-500\"\r\n />\r\n <span class=\"text-muted-color\">{{ t(\"workspace\") }}:</span>\r\n <span class=\"font-medium text-surface-700\">{{\r\n chartWorkspaceLabel()\r\n }}</span>\r\n </span>\r\n @if (!confirmingWorkspaceChange()) {\r\n <mt-button\r\n [label]=\"t('change')\"\r\n severity=\"secondary\"\r\n variant=\"outlined\"\r\n size=\"small\"\r\n (onClick)=\"requestChangeWorkspace()\"\r\n />\r\n } @else {\r\n <span class=\"flex flex-wrap items-center gap-2\">\r\n <span class=\"text-xs text-amber-600\">{{\r\n t(\"changeWorkspaceConfirm\")\r\n }}</span>\r\n <mt-button\r\n [label]=\"t('cancel')\"\r\n severity=\"secondary\"\r\n variant=\"outlined\"\r\n size=\"small\"\r\n (onClick)=\"cancelChangeWorkspace()\"\r\n />\r\n <mt-button\r\n [label]=\"t('changeAndClear')\"\r\n severity=\"danger\"\r\n size=\"small\"\r\n (onClick)=\"confirmChangeWorkspace()\"\r\n />\r\n </span>\r\n }\r\n </div>\r\n }\r\n }\r\n\r\n <!-- Sub-navigation: Selection \u00B7 Source Links (when >1 selection) \u00B7 Query -->\r\n @if (sectionOptions().length > 1 && !needsWorkspacePick()) {\r\n <mt-tabs\r\n [options]=\"sectionOptions()\"\r\n optionLabel=\"label\"\r\n optionValue=\"id\"\r\n [active]=\"visibleSection()\"\r\n (onChange)=\"onSectionChange($event)\"\r\n />\r\n }\r\n\r\n <!-- ===================== SELECTION ===================== -->\r\n @if (!hideSelectionConfig() && !needsWorkspacePick()) {\r\n <div\r\n [hidden]=\"visibleSection() !== 'selection'\"\r\n class=\"flex flex-col gap-5\"\r\n >\r\n @if (showInformativeSelectionMode()) {\r\n <div class=\"flex items-center justify-end\">\r\n <mt-toggle-field\r\n [label]=\"t('advancedSelection')\"\r\n [ngModel]=\"selectionMode() === 'advanced'\"\r\n (ngModelChange)=\"onAdvancedSelectionToggle($event)\"\r\n />\r\n </div>\r\n }\r\n\r\n @if (\r\n !showInformativeSelectionMode() || selectionMode() === \"advanced\"\r\n ) {\r\n <mt-selection-configuration\r\n [workspaceId]=\"selectedWorkspaceId()\"\r\n [chartWorkspace]=\"chartWorkspace()\"\r\n [modulesProperties]=\"modulesProperties()\"\r\n [propertiesFlat]=\"propertiesFlat()\"\r\n [ngModel]=\"selections()\"\r\n (ngModelChange)=\"onSelectionsChange($event)\"\r\n (moduleChange)=\"onModuleChange($event)\"\r\n />\r\n } @else {\r\n <div class=\"flex flex-col gap-5\">\r\n <mt-informative-context-selection\r\n class=\"block\"\r\n [informativeContext]=\"informativeContext()\"\r\n [currentSelection]=\"selections()\"\r\n [preferredTargetSelector]=\"contextTargetSelector()\"\r\n [applyToken]=\"contextTargetApplyToken()\"\r\n (templateApply)=\"onContextTemplateApply($event)\"\r\n />\r\n\r\n @if (selections().length) {\r\n <mt-selection-configuration\r\n [workspaceId]=\"selectedWorkspaceId()\"\r\n [chartWorkspace]=\"chartWorkspace()\"\r\n [modulesProperties]=\"modulesProperties()\"\r\n [propertiesFlat]=\"propertiesFlat()\"\r\n [structureLocked]=\"true\"\r\n [ngModel]=\"selections()\"\r\n (ngModelChange)=\"onSelectionsChange($event)\"\r\n />\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n <!-- ===================== SOURCE LINKS (only with >1 selection) ===================== -->\r\n @if (showSourceLinks() && !needsWorkspacePick()) {\r\n <div\r\n [hidden]=\"visibleSection() !== 'sourceLinks'\"\r\n class=\"flex flex-col gap-5\"\r\n >\r\n <mt-source-link-configuration\r\n [selectionModules]=\"selectionModules()\"\r\n [ngModel]=\"sourceLinks()\"\r\n (ngModelChange)=\"onSourceLinksChange($event)\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- ===================== QUERY ===================== -->\r\n @if (queryComponentType() !== \"none\" && !needsWorkspacePick()) {\r\n <div [hidden]=\"visibleSection() !== 'query'\" class=\"flex flex-col gap-5\">\r\n @if (loadingProperties()) {\r\n <div class=\"flex flex-col gap-4\">\r\n <div class=\"flex flex-col gap-2\">\r\n <p-skeleton width=\"120px\" height=\"16px\" />\r\n <p-skeleton width=\"100%\" height=\"40px\" borderRadius=\"8px\" />\r\n </div>\r\n <div class=\"grid grid-cols-2 gap-4\">\r\n <div class=\"flex flex-col gap-2\">\r\n <p-skeleton width=\"80px\" height=\"16px\" />\r\n <p-skeleton width=\"100%\" height=\"40px\" borderRadius=\"8px\" />\r\n </div>\r\n <div class=\"flex flex-col gap-2\">\r\n <p-skeleton width=\"90px\" height=\"16px\" />\r\n <p-skeleton width=\"100%\" height=\"40px\" borderRadius=\"8px\" />\r\n </div>\r\n </div>\r\n </div>\r\n } @else {\r\n <!-- Group By Multiple (table views) -->\r\n @if (showGroupByMultiple()) {\r\n <mt-string-array-input\r\n [label]=\"t('groupByMultiple')\"\r\n [options]=\"\r\n propertiesGrouped().length > 1\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"propertiesGrouped().length > 1\"\r\n [placeholder]=\"t('selectGroupByProperties')\"\r\n [ngModel]=\"groupByMultiple()\"\r\n (ngModelChange)=\"onGroupByMultipleChange($event)\"\r\n />\r\n }\r\n\r\n <!-- Query Configuration based on chart type -->\r\n @switch (queryComponentType()) {\r\n @case (\"lineChart\") {\r\n <mt-line-chart-query\r\n [propertiesFlat]=\"propertiesFlat()\"\r\n [propertiesGrouped]=\"propertiesGrouped()\"\r\n [ngModel]=\"query()\"\r\n (ngModelChange)=\"onLineChartQueryChange($event)\"\r\n />\r\n }\r\n @case (\"general\") {\r\n <mt-general-query\r\n [chartType]=\"getChartTypeId()\"\r\n [querySchema]=\"querySchema()\"\r\n [propertiesFlat]=\"propertiesFlat()\"\r\n [propertiesGrouped]=\"propertiesGrouped()\"\r\n [ngModel]=\"query()\"\r\n (ngModelChange)=\"onQueryChange($event)\"\r\n />\r\n\r\n <mt-toggle-field\r\n [label]=\"t('isNormalized')\"\r\n [ngModel]=\"isNormalized()\"\r\n (ngModelChange)=\"onIsNormalizedChange($event)\"\r\n />\r\n }\r\n @case (\"table\") {\r\n <mt-table-query\r\n [propertiesFlat]=\"propertiesFlat()\"\r\n [propertiesGrouped]=\"propertiesGrouped()\"\r\n [ngModel]=\"query()\"\r\n (ngModelChange)=\"onTableQueryChange($event)\"\r\n />\r\n }\r\n @case (\"phaseGateTable\") {\r\n @let phaseGateQuery = phaseGateTableQuery();\r\n @let groupedPhaseGateProperties = propertiesGrouped().length > 1;\r\n\r\n <div class=\"flex flex-col gap-5\">\r\n <p class=\"text-sm text-muted-color\">\r\n {{ t(\"phaseGateTableQueryDescription\") }}\r\n </p>\r\n\r\n <div class=\"grid grid-cols-1 gap-4 lg:grid-cols-2\">\r\n <mt-select-field\r\n [label]=\"t('phaseGateRowIdentityProperty')\"\r\n [hint]=\"t('phaseGateRowIdentityPropertyHint')\"\r\n [required]=\"true\"\r\n [options]=\"\r\n groupedPhaseGateProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedPhaseGateProperties\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('phaseGateSelectProperty')\"\r\n [ngModel]=\"phaseGateQuery.rowIdentityProperty\"\r\n (ngModelChange)=\"\r\n onPhaseGateTableRoleChange('rowIdentityProperty', $event)\r\n \"\r\n />\r\n\r\n <mt-select-field\r\n [label]=\"t('phaseGateNameProperty')\"\r\n [hint]=\"t('phaseGateNamePropertyHint')\"\r\n [required]=\"true\"\r\n [options]=\"\r\n groupedPhaseGateProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedPhaseGateProperties\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('phaseGateSelectProperty')\"\r\n [ngModel]=\"phaseGateQuery.phaseNameProperty\"\r\n (ngModelChange)=\"\r\n onPhaseGateTableRoleChange('phaseNameProperty', $event)\r\n \"\r\n />\r\n\r\n <mt-select-field\r\n [label]=\"t('phaseGateStatusProperty')\"\r\n [hint]=\"t('phaseGateStatusPropertyHint')\"\r\n [required]=\"true\"\r\n [options]=\"\r\n groupedPhaseGateProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedPhaseGateProperties\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('phaseGateSelectProperty')\"\r\n [ngModel]=\"phaseGateQuery.phaseStatusProperty\"\r\n (ngModelChange)=\"\r\n onPhaseGateTableRoleChange('phaseStatusProperty', $event)\r\n \"\r\n />\r\n\r\n <mt-select-field\r\n [label]=\"t('phaseGateIdProperty')\"\r\n [showClear]=\"true\"\r\n [options]=\"\r\n groupedPhaseGateProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedPhaseGateProperties\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('phaseGateSelectProperty')\"\r\n [ngModel]=\"phaseGateQuery.phaseIdProperty\"\r\n (ngModelChange)=\"\r\n onPhaseGateTableRoleChange('phaseIdProperty', $event)\r\n \"\r\n />\r\n\r\n <mt-select-field\r\n [label]=\"t('phaseGateOrderProperty')\"\r\n [showClear]=\"true\"\r\n [options]=\"\r\n groupedPhaseGateProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedPhaseGateProperties\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('phaseGateSelectProperty')\"\r\n [ngModel]=\"phaseGateQuery.phaseOrderProperty\"\r\n (ngModelChange)=\"\r\n onPhaseGateTableRoleChange('phaseOrderProperty', $event)\r\n \"\r\n />\r\n\r\n <mt-select-field\r\n [label]=\"t('phaseGateProgressProperty')\"\r\n [showClear]=\"true\"\r\n [options]=\"\r\n groupedPhaseGateProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedPhaseGateProperties\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('phaseGateSelectProperty')\"\r\n [ngModel]=\"phaseGateQuery.phaseProgressProperty\"\r\n (ngModelChange)=\"\r\n onPhaseGateTableRoleChange(\r\n 'phaseProgressProperty',\r\n $event\r\n )\r\n \"\r\n />\r\n\r\n <mt-select-field\r\n [label]=\"t('phaseGateCurrentProperty')\"\r\n [showClear]=\"true\"\r\n [options]=\"\r\n groupedPhaseGateProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedPhaseGateProperties\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('phaseGateSelectProperty')\"\r\n [ngModel]=\"phaseGateQuery.phaseIsCurrentProperty\"\r\n (ngModelChange)=\"\r\n onPhaseGateTableRoleChange(\r\n 'phaseIsCurrentProperty',\r\n $event\r\n )\r\n \"\r\n />\r\n\r\n <mt-select-field\r\n [label]=\"t('phaseGateCompletedProperty')\"\r\n [showClear]=\"true\"\r\n [options]=\"\r\n groupedPhaseGateProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedPhaseGateProperties\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('phaseGateSelectProperty')\"\r\n [ngModel]=\"phaseGateQuery.phaseIsCompletedProperty\"\r\n (ngModelChange)=\"\r\n onPhaseGateTableRoleChange(\r\n 'phaseIsCompletedProperty',\r\n $event\r\n )\r\n \"\r\n />\r\n\r\n <mt-select-field\r\n [label]=\"t('phaseGateAllItemsCompletedProperty')\"\r\n [showClear]=\"true\"\r\n [options]=\"\r\n groupedPhaseGateProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedPhaseGateProperties\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('phaseGateSelectProperty')\"\r\n [ngModel]=\"phaseGateQuery.phaseAllItemsCompletedProperty\"\r\n (ngModelChange)=\"\r\n onPhaseGateTableRoleChange(\r\n 'phaseAllItemsCompletedProperty',\r\n $event\r\n )\r\n \"\r\n />\r\n </div>\r\n\r\n <mt-string-array-input\r\n [label]=\"t('phaseGateVisibleProperties')\"\r\n [options]=\"\r\n groupedPhaseGateProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedPhaseGateProperties\"\r\n [placeholder]=\"t('phaseGateVisiblePropertiesPlaceholder')\"\r\n [ngModel]=\"phaseGateQuery.baseProperties\"\r\n (ngModelChange)=\"onPhaseGateTableBasePropertiesChange($event)\"\r\n />\r\n\r\n <p class=\"text-xs text-muted-color\">\r\n {{ t(\"phaseGateProjectionHint\") }}\r\n </p>\r\n </div>\r\n }\r\n @case (\"timeline\") {\r\n <mt-timeline-query\r\n [propertiesFlat]=\"propertiesFlat()\"\r\n [propertiesGrouped]=\"propertiesGrouped()\"\r\n [ngModel]=\"query()\"\r\n (ngModelChange)=\"onTimelineQueryChange($event)\"\r\n />\r\n }\r\n @case (\"timelineMultiLevel\") {\r\n <div class=\"flex flex-col gap-5\">\r\n <div class=\"flex items-center justify-between\">\r\n <p class=\"text-sm text-muted-color\">\r\n {{ t(\"timelineMultiLevelDescription\") }}\r\n </p>\r\n <mt-button\r\n size=\"small\"\r\n severity=\"secondary\"\r\n icon=\"general.plus\"\r\n [label]=\"t('addLevel')\"\r\n (onClick)=\"addTimelineLevel()\"\r\n />\r\n </div>\r\n\r\n <mt-select-field\r\n [label]=\"t('timeFrame')\"\r\n [options]=\"timeFrameOptions\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [ngModel]=\"timelineTimeFrame()\"\r\n (ngModelChange)=\"onTimelineTimeFrameChange($event)\"\r\n />\r\n\r\n @for (level of timelineLevels(); track $index) {\r\n <div\r\n class=\"border border-surface-300 rounded-md p-4 flex flex-col gap-3\"\r\n >\r\n <div class=\"flex items-center justify-between\">\r\n <span class=\"font-medium\">\r\n {{ t(\"level\") }} {{ level.levelNumber || $index + 1 }}\r\n </span>\r\n <mt-button\r\n size=\"small\"\r\n severity=\"danger\"\r\n [text]=\"true\"\r\n icon=\"general.trash-02\"\r\n (onClick)=\"removeTimelineLevel($index)\"\r\n />\r\n </div>\r\n\r\n <div class=\"grid grid-cols-2 gap-3\">\r\n <mt-select-field\r\n [label]=\"t('pivotProperty')\"\r\n [options]=\"\r\n propertiesGrouped().length > 1\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"propertiesGrouped().length > 1\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [ngModel]=\"level.pivotProperty\"\r\n (ngModelChange)=\"\r\n updateTimelineLevelField(\r\n $index,\r\n 'pivotProperty',\r\n $event\r\n )\r\n \"\r\n />\r\n <mt-select-field\r\n [label]=\"t('lookupProperty')\"\r\n [options]=\"\r\n propertiesGrouped().length > 1\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"propertiesGrouped().length > 1\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [ngModel]=\"level.lookupProperty\"\r\n (ngModelChange)=\"\r\n updateTimelineLevelField(\r\n $index,\r\n 'lookupProperty',\r\n $event\r\n )\r\n \"\r\n />\r\n <mt-select-field\r\n [label]=\"t('idProperty')\"\r\n [options]=\"\r\n propertiesGrouped().length > 1\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"propertiesGrouped().length > 1\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [ngModel]=\"level.idProperty\"\r\n (ngModelChange)=\"\r\n updateTimelineLevelField($index, 'idProperty', $event)\r\n \"\r\n />\r\n <mt-select-field\r\n [label]=\"t('startTimeProperty')\"\r\n [options]=\"\r\n propertiesGrouped().length > 1\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"propertiesGrouped().length > 1\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [ngModel]=\"level.startPoint_timeProperty\"\r\n (ngModelChange)=\"\r\n updateTimelineLevelField(\r\n $index,\r\n 'startPoint_timeProperty',\r\n $event\r\n )\r\n \"\r\n />\r\n <mt-select-field\r\n [label]=\"t('endTimeProperty')\"\r\n [options]=\"\r\n propertiesGrouped().length > 1\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"propertiesGrouped().length > 1\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [ngModel]=\"level.endPoint_timeProperty\"\r\n (ngModelChange)=\"\r\n updateTimelineLevelField(\r\n $index,\r\n 'endPoint_timeProperty',\r\n $event\r\n )\r\n \"\r\n />\r\n <mt-select-field\r\n [label]=\"t('progressProperty')\"\r\n [options]=\"\r\n propertiesGrouped().length > 1\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"propertiesGrouped().length > 1\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [ngModel]=\"level.progressProperty\"\r\n (ngModelChange)=\"\r\n updateTimelineLevelField(\r\n $index,\r\n 'progressProperty',\r\n $event\r\n )\r\n \"\r\n />\r\n @if (shouldShowTimelineParentProperty($index)) {\r\n <mt-select-field\r\n [label]=\"t('parentProperty')\"\r\n [options]=\"timelineParentPropertyOptions($index)\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n [ngModel]=\"level.parentProperty\"\r\n (ngModelChange)=\"\r\n updateTimelineLevelField(\r\n $index,\r\n 'parentProperty',\r\n $event\r\n )\r\n \"\r\n />\r\n }\r\n </div>\r\n\r\n <mt-string-array-input\r\n [label]=\"t('extraProperties')\"\r\n [options]=\"\r\n propertiesGrouped().length > 1\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"propertiesGrouped().length > 1\"\r\n [placeholder]=\"t('selectProperties')\"\r\n [ngModel]=\"level.extraProperties || level.extras || []\"\r\n (ngModelChange)=\"\r\n updateTimelineLevelField(\r\n $index,\r\n 'extraProperties',\r\n $event\r\n )\r\n \"\r\n />\r\n </div>\r\n }\r\n\r\n @if (timelineLevels().length === 0) {\r\n <div class=\"text-center py-4 text-muted-color text-sm\">\r\n {{ t(\"noTimelineLevelsHint\") }}\r\n </div>\r\n }\r\n </div>\r\n }\r\n @case (\"map\") {\r\n <mt-map-query\r\n [propertiesFlat]=\"propertiesFlat()\"\r\n [propertiesGrouped]=\"propertiesGrouped()\"\r\n [ngModel]=\"query()\"\r\n (ngModelChange)=\"onMapQueryChange($event)\"\r\n />\r\n }\r\n @case (\"splitter\") {\r\n <mt-splitter-query\r\n [propertiesFlat]=\"propertiesFlat()\"\r\n [propertiesGrouped]=\"propertiesGrouped()\"\r\n [ngModel]=\"query()\"\r\n (ngModelChange)=\"onSplitterQueryChange($event)\"\r\n />\r\n }\r\n @case (\"properties\") {\r\n <mt-properties-query\r\n [propertiesFlat]=\"propertiesFlat()\"\r\n [propertiesGrouped]=\"propertiesGrouped()\"\r\n [ngModel]=\"query()\"\r\n (ngModelChange)=\"onPropertiesQueryChange($event)\"\r\n />\r\n }\r\n @case (\"snapshot\") {\r\n <mt-snapshot-query\r\n [propertiesFlat]=\"propertiesFlat()\"\r\n [propertiesGrouped]=\"propertiesGrouped()\"\r\n [ngModel]=\"query()\"\r\n (ngModelChange)=\"onSnapshotQueryChange($event)\"\r\n />\r\n }\r\n @case (\"phaseGateStepper\") {\r\n @let stepperQuery = phaseGateTableQuery();\r\n @let groupedStepperProperties = propertiesGrouped().length > 1;\r\n\r\n <div class=\"flex flex-col gap-5\">\r\n <p class=\"text-sm text-muted-color\">\r\n {{ t(\"phaseGateStepperQueryDescription\") }}\r\n </p>\r\n\r\n <div class=\"grid grid-cols-1 gap-4 lg:grid-cols-2\">\r\n @for (role of phaseGateStepperRoles; track role.field) {\r\n @let required =\r\n !!querySchema()?.required?.includes(role.field);\r\n <mt-select-field\r\n [label]=\"t(role.label)\"\r\n [hint]=\"t(role.hint)\"\r\n [required]=\"required\"\r\n [showClear]=\"!required\"\r\n [options]=\"\r\n groupedStepperProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedStepperProperties\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('phaseGateSelectProperty')\"\r\n [ngModel]=\"stepperQuery[role.field]\"\r\n (ngModelChange)=\"\r\n onPhaseGateTableRoleChange(role.field, $event)\r\n \"\r\n />\r\n }\r\n </div>\r\n </div>\r\n }\r\n @case (\"repeater\") {\r\n <div class=\"flex flex-col gap-5\">\r\n <mt-select-field\r\n [label]=\"t('repeaterDashboard')\"\r\n [options]=\"availableDashboards()\"\r\n optionLabel=\"name\"\r\n optionValue=\"id\"\r\n [ngModel]=\"repeaterDashboardId()\"\r\n (ngModelChange)=\"onRepeaterDashboardChange($event)\"\r\n />\r\n\r\n <mt-string-array-input\r\n [label]=\"t('repeaterSelectedProperties')\"\r\n [options]=\"\r\n propertiesGrouped().length > 1\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"propertiesGrouped().length > 1\"\r\n [placeholder]=\"t('repeaterSelectedPropertiesPlaceholder')\"\r\n [ngModel]=\"repeaterSelectedProperties()\"\r\n (ngModelChange)=\"onRepeaterSelectedPropertiesChange($event)\"\r\n />\r\n </div>\r\n }\r\n }\r\n }\r\n </div>\r\n }\r\n }\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "component", type: SelectField, selector: "mt-select-field", inputs: ["field", "hint", "label", "placeholder", "hasPlaceholderPrefix", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "clearAfterSelect", "required", "group", "size", "optionGroupLabel", "optionGroupChildren", "loading", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape", "markCurrentUser"], outputs: ["onChange"] }, { kind: "component", type: ToggleField, selector: "mt-toggle-field", inputs: ["label", "inputId", "labelPosition", "placeholder", "readonly", "pInputs", "required", "toggleShape", "size", "icon", "descriptionCard"], outputs: ["onChange"] }, { kind: "component", type: Tabs, selector: "mt-tabs", inputs: ["options", "optionLabel", "optionValue", "active", "mode", "moreLabel", "defaultIcon", "size", "fluid", "disabled", "searchThreshold"], outputs: ["activeChange", "onChange"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }, { kind: "component", type: SelectionConfiguration, selector: "mt-selection-configuration", inputs: ["structureLocked", "workspaceId", "chartWorkspace", "modulesProperties", "propertiesFlat"], outputs: ["moduleChange"] }, { kind: "component", type: SourceLinkConfiguration, selector: "mt-source-link-configuration", inputs: ["selectionModules"] }, { kind: "component", type: CustomApiConfiguration, selector: "mt-custom-api-configuration" }, { kind: "component", type: GeneralQuery, selector: "mt-general-query", inputs: ["chartType", "querySchema", "propertiesFlat", "propertiesGrouped"] }, { kind: "component", type: LineChartQuery, selector: "mt-line-chart-query", inputs: ["propertiesFlat", "propertiesGrouped"] }, { kind: "component", type: TableQuery, selector: "mt-table-query", inputs: ["propertiesFlat", "propertiesGrouped"] }, { kind: "component", type: TimelineQuery, selector: "mt-timeline-query", inputs: ["propertiesFlat", "propertiesGrouped"] }, { kind: "component", type: PropertiesQuery, selector: "mt-properties-query", inputs: ["propertiesFlat", "propertiesGrouped"] }, { kind: "component", type: SnapshotQuery, selector: "mt-snapshot-query", inputs: ["propertiesFlat", "propertiesGrouped"] }, { kind: "component", type: MapQuery, selector: "mt-map-query", inputs: ["propertiesFlat", "propertiesGrouped"] }, { kind: "component", type: SplitterQuery, selector: "mt-splitter-query", inputs: ["propertiesFlat", "propertiesGrouped"] }, { kind: "component", type: InformativeContextSelection, selector: "mt-informative-context-selection", inputs: ["informativeContext", "currentSelection", "preferredTargetSelector", "applyToken"], outputs: ["templateApply"] }, { kind: "component", type: StringArrayInput, selector: "mt-string-array-input", inputs: ["label", "placeholder", "options", "group", "optionLabel", "optionValue", "optionGroupLabel", "optionGroupChildren", "filter", "emptyHint"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
40096
39844
|
}
|
|
40097
39845
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: DataSourceSettings, decorators: [{
|
|
40098
39846
|
type: Component,
|
|
@@ -40105,7 +39853,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
40105
39853
|
SelectField,
|
|
40106
39854
|
ToggleField,
|
|
40107
39855
|
Tabs,
|
|
40108
|
-
TextField,
|
|
40109
39856
|
Button,
|
|
40110
39857
|
Icon,
|
|
40111
39858
|
SelectionConfiguration,
|
|
@@ -40121,7 +39868,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
40121
39868
|
SplitterQuery,
|
|
40122
39869
|
InformativeContextSelection,
|
|
40123
39870
|
StringArrayInput,
|
|
40124
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div class=\"flex flex-col gap-5\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\r\n <!-- Data source mode: Selection cycle OR Custom API (separated area on top) -->\r\n @if (supportsCustomApi()) {\r\n <div class=\"grid grid-cols-2 gap-3\">\r\n <button\r\n type=\"button\"\r\n class=\"flex items-start gap-2 rounded-lg border p-3 text-left transition-colors\"\r\n [class.border-primary-500]=\"dataSourceMode() === 'selection'\"\r\n [class.bg-primary-50]=\"dataSourceMode() === 'selection'\"\r\n [class.border-surface-200]=\"dataSourceMode() !== 'selection'\"\r\n [class.hover:bg-surface-50]=\"dataSourceMode() !== 'selection'\"\r\n (click)=\"onModeChange('selection')\"\r\n >\r\n <mt-icon\r\n icon=\"dev.database-01\"\r\n class=\"mt-0.5 text-lg\"\r\n [class.text-primary-600]=\"dataSourceMode() === 'selection'\"\r\n [class.text-muted-color]=\"dataSourceMode() !== 'selection'\"\r\n />\r\n <span class=\"flex flex-col\">\r\n <span class=\"text-sm font-semibold text-surface-700\">\r\n {{ t(\"dataSourceModes.selection\") }}\r\n </span>\r\n <span class=\"text-xs text-muted-color\">\r\n {{ t(\"dataSourceModes.selectionHint\") }}\r\n </span>\r\n </span>\r\n </button>\r\n\r\n <button\r\n type=\"button\"\r\n class=\"flex items-start gap-2 rounded-lg border p-3 text-left transition-colors\"\r\n [class.border-primary-500]=\"dataSourceMode() === 'customApi'\"\r\n [class.bg-primary-50]=\"dataSourceMode() === 'customApi'\"\r\n [class.border-surface-200]=\"dataSourceMode() !== 'customApi'\"\r\n [class.hover:bg-surface-50]=\"dataSourceMode() !== 'customApi'\"\r\n (click)=\"onModeChange('customApi')\"\r\n >\r\n <mt-icon\r\n icon=\"dev.code-02\"\r\n class=\"mt-0.5 text-lg\"\r\n [class.text-primary-600]=\"dataSourceMode() === 'customApi'\"\r\n [class.text-muted-color]=\"dataSourceMode() !== 'customApi'\"\r\n />\r\n <span class=\"flex flex-col\">\r\n <span class=\"text-sm font-semibold text-surface-700\">\r\n {{ t(\"dataSourceModes.customApi\") }}\r\n </span>\r\n <span class=\"text-xs text-muted-color\">\r\n {{ t(\"dataSourceModes.customApiHint\") }}\r\n </span>\r\n </span>\r\n </button>\r\n </div>\r\n }\r\n\r\n <!-- ===================== CUSTOM API MODE ===================== -->\r\n @if (supportsCustomApi() && dataSourceMode() === \"customApi\") {\r\n <mt-custom-api-configuration\r\n [ngModel]=\"customApi()\"\r\n (ngModelChange)=\"onCustomApiChange($event)\"\r\n />\r\n } @else {\r\n <!-- ===================== SELECTION CYCLE ===================== -->\r\n\r\n <!-- Workspace gate: pick ONE workspace before the tabs/config appear.\r\n The picker shows whenever no workspace is chosen yet \u2014 for a brand-new\r\n chart it also blocks the tabs (needsWorkspacePick), but an existing\r\n chart that never had a workspace still gets the picker so it can be\r\n assigned (and saved into serviceConfig.workspaceId for navigate-to). -->\r\n @if (showWorkspaceGate()) {\r\n @if (!chartWorkspace()) {\r\n <div\r\n class=\"flex flex-col items-center gap-3 rounded-lg border border-dashed border-surface-300 bg-surface-50 p-6 text-center\"\r\n >\r\n <mt-icon icon=\"dev.database-01\" class=\"text-3xl text-primary-500\" />\r\n <div class=\"flex flex-col gap-1\">\r\n <h3 class=\"text-sm font-semibold text-surface-700\">\r\n {{ t(\"workspaceGateTitle\") }}\r\n </h3>\r\n <p class=\"text-xs text-muted-color\">\r\n {{ t(\"workspaceGateHint\") }}\r\n </p>\r\n </div>\r\n <div class=\"w-full max-w-sm\">\r\n <mt-select-field\r\n [options]=\"workspaceOptions()\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [placeholder]=\"t('selectWorkspace')\"\r\n [filter]=\"true\"\r\n [ngModel]=\"chartWorkspace()\"\r\n (ngModelChange)=\"onWorkspacePick($event)\"\r\n />\r\n </div>\r\n </div>\r\n } @else if (workspaceAutoDetected()) {\r\n <!-- Old data: workspace inferred from the chart's existing config.\r\n Surface it with a Save-to-keep / Clear notice instead of a silent\r\n chip, so the user knows it must be saved (or can pick another). -->\r\n <div\r\n class=\"flex flex-wrap items-center justify-between gap-3 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2\"\r\n >\r\n <span class=\"flex items-start gap-2 text-sm\">\r\n <mt-icon\r\n icon=\"general.alert-circle\"\r\n class=\"mt-0.5 text-base text-amber-600\"\r\n />\r\n <span class=\"flex flex-col\">\r\n <span class=\"font-medium text-surface-700\">\r\n {{ t(\"workspace\") }}: {{ chartWorkspaceLabel() }}\r\n </span>\r\n <span class=\"text-xs text-amber-700\">{{\r\n t(\"workspaceAutoHint\")\r\n }}</span>\r\n </span>\r\n </span>\r\n <mt-button\r\n [label]=\"t('clear')\"\r\n severity=\"secondary\"\r\n variant=\"outlined\"\r\n size=\"small\"\r\n (onClick)=\"clearAutoDetectedWorkspace()\"\r\n />\r\n </div>\r\n } @else {\r\n <div\r\n class=\"flex flex-wrap items-center justify-between gap-2 rounded-lg border border-surface-200 bg-surface-50 px-3 py-2\"\r\n >\r\n <span class=\"flex items-center gap-2 text-sm\">\r\n <mt-icon\r\n icon=\"dev.database-01\"\r\n class=\"text-base text-primary-500\"\r\n />\r\n <span class=\"text-muted-color\">{{ t(\"workspace\") }}:</span>\r\n <span class=\"font-medium text-surface-700\">{{\r\n chartWorkspaceLabel()\r\n }}</span>\r\n </span>\r\n @if (!confirmingWorkspaceChange()) {\r\n <mt-button\r\n [label]=\"t('change')\"\r\n severity=\"secondary\"\r\n variant=\"outlined\"\r\n size=\"small\"\r\n (onClick)=\"requestChangeWorkspace()\"\r\n />\r\n } @else {\r\n <span class=\"flex flex-wrap items-center gap-2\">\r\n <span class=\"text-xs text-amber-600\">{{\r\n t(\"changeWorkspaceConfirm\")\r\n }}</span>\r\n <mt-button\r\n [label]=\"t('cancel')\"\r\n severity=\"secondary\"\r\n variant=\"outlined\"\r\n size=\"small\"\r\n (onClick)=\"cancelChangeWorkspace()\"\r\n />\r\n <mt-button\r\n [label]=\"t('changeAndClear')\"\r\n severity=\"danger\"\r\n size=\"small\"\r\n (onClick)=\"confirmChangeWorkspace()\"\r\n />\r\n </span>\r\n }\r\n </div>\r\n }\r\n }\r\n\r\n <!-- Sub-navigation: Selection \u00B7 Source Links (when >1 selection) \u00B7 Query -->\r\n @if (sectionOptions().length > 1 && !needsWorkspacePick()) {\r\n <mt-tabs\r\n [options]=\"sectionOptions()\"\r\n optionLabel=\"label\"\r\n optionValue=\"id\"\r\n [active]=\"visibleSection()\"\r\n (onChange)=\"onSectionChange($event)\"\r\n />\r\n }\r\n\r\n <!-- ===================== SELECTION ===================== -->\r\n @if (!hideSelectionConfig() && !needsWorkspacePick()) {\r\n <div\r\n [hidden]=\"visibleSection() !== 'selection'\"\r\n class=\"flex flex-col gap-5\"\r\n >\r\n @if (showInformativeSelectionMode()) {\r\n <div class=\"flex items-center justify-end\">\r\n <mt-toggle-field\r\n [label]=\"t('advancedSelection')\"\r\n [ngModel]=\"selectionMode() === 'advanced'\"\r\n (ngModelChange)=\"onAdvancedSelectionToggle($event)\"\r\n />\r\n </div>\r\n }\r\n\r\n @if (\r\n !showInformativeSelectionMode() || selectionMode() === \"advanced\"\r\n ) {\r\n <mt-selection-configuration\r\n [workspaceId]=\"selectedWorkspaceId()\"\r\n [chartWorkspace]=\"chartWorkspace()\"\r\n [modulesProperties]=\"modulesProperties()\"\r\n [propertiesFlat]=\"propertiesFlat()\"\r\n [ngModel]=\"selections()\"\r\n (ngModelChange)=\"onSelectionsChange($event)\"\r\n (moduleChange)=\"onModuleChange($event)\"\r\n />\r\n } @else {\r\n <div class=\"flex flex-col gap-5\">\r\n <mt-informative-context-selection\r\n class=\"block\"\r\n [informativeContext]=\"informativeContext()\"\r\n [currentSelection]=\"selections()\"\r\n [preferredTargetSelector]=\"contextTargetSelector()\"\r\n [applyToken]=\"contextTargetApplyToken()\"\r\n (templateApply)=\"onContextTemplateApply($event)\"\r\n />\r\n\r\n @if (selections().length) {\r\n <mt-selection-configuration\r\n [workspaceId]=\"selectedWorkspaceId()\"\r\n [chartWorkspace]=\"chartWorkspace()\"\r\n [modulesProperties]=\"modulesProperties()\"\r\n [propertiesFlat]=\"propertiesFlat()\"\r\n [structureLocked]=\"true\"\r\n [ngModel]=\"selections()\"\r\n (ngModelChange)=\"onSelectionsChange($event)\"\r\n />\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n <!-- ===================== SOURCE LINKS (only with >1 selection) ===================== -->\r\n @if (showSourceLinks() && !needsWorkspacePick()) {\r\n <div\r\n [hidden]=\"visibleSection() !== 'sourceLinks'\"\r\n class=\"flex flex-col gap-5\"\r\n >\r\n <mt-source-link-configuration\r\n [selectionModules]=\"selectionModules()\"\r\n [ngModel]=\"sourceLinks()\"\r\n (ngModelChange)=\"onSourceLinksChange($event)\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- ===================== QUERY ===================== -->\r\n @if (queryComponentType() !== \"none\" && !needsWorkspacePick()) {\r\n <div [hidden]=\"visibleSection() !== 'query'\" class=\"flex flex-col gap-5\">\r\n @if (loadingProperties()) {\r\n <div class=\"flex flex-col gap-4\">\r\n <div class=\"flex flex-col gap-2\">\r\n <p-skeleton width=\"120px\" height=\"16px\" />\r\n <p-skeleton width=\"100%\" height=\"40px\" borderRadius=\"8px\" />\r\n </div>\r\n <div class=\"grid grid-cols-2 gap-4\">\r\n <div class=\"flex flex-col gap-2\">\r\n <p-skeleton width=\"80px\" height=\"16px\" />\r\n <p-skeleton width=\"100%\" height=\"40px\" borderRadius=\"8px\" />\r\n </div>\r\n <div class=\"flex flex-col gap-2\">\r\n <p-skeleton width=\"90px\" height=\"16px\" />\r\n <p-skeleton width=\"100%\" height=\"40px\" borderRadius=\"8px\" />\r\n </div>\r\n </div>\r\n </div>\r\n } @else {\r\n <!-- Group By Multiple (table views) -->\r\n @if (showGroupByMultiple()) {\r\n <mt-string-array-input\r\n [label]=\"t('groupByMultiple')\"\r\n [options]=\"\r\n propertiesGrouped().length > 1\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"propertiesGrouped().length > 1\"\r\n [placeholder]=\"t('selectGroupByProperties')\"\r\n [ngModel]=\"groupByMultiple()\"\r\n (ngModelChange)=\"onGroupByMultipleChange($event)\"\r\n />\r\n }\r\n\r\n <!-- Query Configuration based on chart type -->\r\n @switch (queryComponentType()) {\r\n @case (\"lineChart\") {\r\n <mt-line-chart-query\r\n [propertiesFlat]=\"propertiesFlat()\"\r\n [propertiesGrouped]=\"propertiesGrouped()\"\r\n [ngModel]=\"query()\"\r\n (ngModelChange)=\"onLineChartQueryChange($event)\"\r\n />\r\n }\r\n @case (\"general\") {\r\n <mt-general-query\r\n [chartType]=\"getChartTypeId()\"\r\n [querySchema]=\"querySchema()\"\r\n [propertiesFlat]=\"propertiesFlat()\"\r\n [propertiesGrouped]=\"propertiesGrouped()\"\r\n [ngModel]=\"query()\"\r\n (ngModelChange)=\"onQueryChange($event)\"\r\n />\r\n\r\n <mt-toggle-field\r\n [label]=\"t('isNormalized')\"\r\n [ngModel]=\"isNormalized()\"\r\n (ngModelChange)=\"onIsNormalizedChange($event)\"\r\n />\r\n }\r\n @case (\"table\") {\r\n <mt-table-query\r\n [propertiesFlat]=\"propertiesFlat()\"\r\n [propertiesGrouped]=\"propertiesGrouped()\"\r\n [ngModel]=\"query()\"\r\n (ngModelChange)=\"onTableQueryChange($event)\"\r\n />\r\n }\r\n @case (\"phaseGateTable\") {\r\n @let phaseGateQuery = phaseGateTableQuery();\r\n @let groupedPhaseGateProperties = propertiesGrouped().length > 1;\r\n\r\n <div class=\"flex flex-col gap-5\">\r\n <p class=\"text-sm text-muted-color\">\r\n {{ t(\"phaseGateTableQueryDescription\") }}\r\n </p>\r\n\r\n <div class=\"grid grid-cols-1 gap-4 lg:grid-cols-2\">\r\n <mt-select-field\r\n [label]=\"t('phaseGateRowIdentityProperty')\"\r\n [hint]=\"t('phaseGateRowIdentityPropertyHint')\"\r\n [required]=\"true\"\r\n [options]=\"\r\n groupedPhaseGateProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedPhaseGateProperties\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('phaseGateSelectProperty')\"\r\n [ngModel]=\"phaseGateQuery.rowIdentityProperty\"\r\n (ngModelChange)=\"\r\n onPhaseGateTableRoleChange('rowIdentityProperty', $event)\r\n \"\r\n />\r\n\r\n <mt-select-field\r\n [label]=\"t('phaseGateNameProperty')\"\r\n [hint]=\"t('phaseGateNamePropertyHint')\"\r\n [required]=\"true\"\r\n [options]=\"\r\n groupedPhaseGateProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedPhaseGateProperties\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('phaseGateSelectProperty')\"\r\n [ngModel]=\"phaseGateQuery.phaseNameProperty\"\r\n (ngModelChange)=\"\r\n onPhaseGateTableRoleChange('phaseNameProperty', $event)\r\n \"\r\n />\r\n\r\n <mt-select-field\r\n [label]=\"t('phaseGateStatusProperty')\"\r\n [hint]=\"t('phaseGateStatusPropertyHint')\"\r\n [required]=\"true\"\r\n [options]=\"\r\n groupedPhaseGateProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedPhaseGateProperties\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('phaseGateSelectProperty')\"\r\n [ngModel]=\"phaseGateQuery.phaseStatusProperty\"\r\n (ngModelChange)=\"\r\n onPhaseGateTableRoleChange('phaseStatusProperty', $event)\r\n \"\r\n />\r\n\r\n <mt-select-field\r\n [label]=\"t('phaseGateIdProperty')\"\r\n [showClear]=\"true\"\r\n [options]=\"\r\n groupedPhaseGateProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedPhaseGateProperties\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('phaseGateSelectProperty')\"\r\n [ngModel]=\"phaseGateQuery.phaseIdProperty\"\r\n (ngModelChange)=\"\r\n onPhaseGateTableRoleChange('phaseIdProperty', $event)\r\n \"\r\n />\r\n\r\n <mt-select-field\r\n [label]=\"t('phaseGateOrderProperty')\"\r\n [showClear]=\"true\"\r\n [options]=\"\r\n groupedPhaseGateProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedPhaseGateProperties\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('phaseGateSelectProperty')\"\r\n [ngModel]=\"phaseGateQuery.phaseOrderProperty\"\r\n (ngModelChange)=\"\r\n onPhaseGateTableRoleChange('phaseOrderProperty', $event)\r\n \"\r\n />\r\n\r\n <mt-select-field\r\n [label]=\"t('phaseGateProgressProperty')\"\r\n [showClear]=\"true\"\r\n [options]=\"\r\n groupedPhaseGateProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedPhaseGateProperties\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('phaseGateSelectProperty')\"\r\n [ngModel]=\"phaseGateQuery.phaseProgressProperty\"\r\n (ngModelChange)=\"\r\n onPhaseGateTableRoleChange(\r\n 'phaseProgressProperty',\r\n $event\r\n )\r\n \"\r\n />\r\n\r\n <mt-select-field\r\n [label]=\"t('phaseGateCurrentProperty')\"\r\n [showClear]=\"true\"\r\n [options]=\"\r\n groupedPhaseGateProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedPhaseGateProperties\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('phaseGateSelectProperty')\"\r\n [ngModel]=\"phaseGateQuery.phaseIsCurrentProperty\"\r\n (ngModelChange)=\"\r\n onPhaseGateTableRoleChange(\r\n 'phaseIsCurrentProperty',\r\n $event\r\n )\r\n \"\r\n />\r\n\r\n <mt-select-field\r\n [label]=\"t('phaseGateCompletedProperty')\"\r\n [showClear]=\"true\"\r\n [options]=\"\r\n groupedPhaseGateProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedPhaseGateProperties\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('phaseGateSelectProperty')\"\r\n [ngModel]=\"phaseGateQuery.phaseIsCompletedProperty\"\r\n (ngModelChange)=\"\r\n onPhaseGateTableRoleChange(\r\n 'phaseIsCompletedProperty',\r\n $event\r\n )\r\n \"\r\n />\r\n\r\n <mt-select-field\r\n [label]=\"t('phaseGateAllItemsCompletedProperty')\"\r\n [showClear]=\"true\"\r\n [options]=\"\r\n groupedPhaseGateProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedPhaseGateProperties\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('phaseGateSelectProperty')\"\r\n [ngModel]=\"phaseGateQuery.phaseAllItemsCompletedProperty\"\r\n (ngModelChange)=\"\r\n onPhaseGateTableRoleChange(\r\n 'phaseAllItemsCompletedProperty',\r\n $event\r\n )\r\n \"\r\n />\r\n </div>\r\n\r\n <mt-string-array-input\r\n [label]=\"t('phaseGateVisibleProperties')\"\r\n [options]=\"\r\n groupedPhaseGateProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedPhaseGateProperties\"\r\n [placeholder]=\"t('phaseGateVisiblePropertiesPlaceholder')\"\r\n [ngModel]=\"phaseGateQuery.baseProperties\"\r\n (ngModelChange)=\"onPhaseGateTableBasePropertiesChange($event)\"\r\n />\r\n\r\n <p class=\"text-xs text-muted-color\">\r\n {{ t(\"phaseGateProjectionHint\") }}\r\n </p>\r\n </div>\r\n }\r\n @case (\"timeline\") {\r\n <mt-timeline-query\r\n [propertiesFlat]=\"propertiesFlat()\"\r\n [propertiesGrouped]=\"propertiesGrouped()\"\r\n [ngModel]=\"query()\"\r\n (ngModelChange)=\"onTimelineQueryChange($event)\"\r\n />\r\n }\r\n @case (\"timelineMultiLevel\") {\r\n <div class=\"flex flex-col gap-5\">\r\n <div class=\"flex items-center justify-between\">\r\n <p class=\"text-sm text-muted-color\">\r\n {{ t(\"timelineMultiLevelDescription\") }}\r\n </p>\r\n <mt-button\r\n size=\"small\"\r\n severity=\"secondary\"\r\n icon=\"general.plus\"\r\n [label]=\"t('addLevel')\"\r\n (onClick)=\"addTimelineLevel()\"\r\n />\r\n </div>\r\n\r\n <mt-select-field\r\n [label]=\"t('timeFrame')\"\r\n [options]=\"timeFrameOptions\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [ngModel]=\"timelineTimeFrame()\"\r\n (ngModelChange)=\"onTimelineTimeFrameChange($event)\"\r\n />\r\n\r\n @for (level of timelineLevels(); track $index) {\r\n <div\r\n class=\"border border-surface-300 rounded-md p-4 flex flex-col gap-3\"\r\n >\r\n <div class=\"flex items-center justify-between\">\r\n <span class=\"font-medium\">\r\n {{ t(\"level\") }} {{ level.levelNumber || $index + 1 }}\r\n </span>\r\n <mt-button\r\n size=\"small\"\r\n severity=\"danger\"\r\n [text]=\"true\"\r\n icon=\"general.trash-02\"\r\n (onClick)=\"removeTimelineLevel($index)\"\r\n />\r\n </div>\r\n\r\n <div class=\"grid grid-cols-2 gap-3\">\r\n <mt-select-field\r\n [label]=\"t('pivotProperty')\"\r\n [options]=\"\r\n propertiesGrouped().length > 1\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"propertiesGrouped().length > 1\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [ngModel]=\"level.pivotProperty\"\r\n (ngModelChange)=\"\r\n updateTimelineLevelField(\r\n $index,\r\n 'pivotProperty',\r\n $event\r\n )\r\n \"\r\n />\r\n <mt-select-field\r\n [label]=\"t('lookupProperty')\"\r\n [options]=\"\r\n propertiesGrouped().length > 1\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"propertiesGrouped().length > 1\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [ngModel]=\"level.lookupProperty\"\r\n (ngModelChange)=\"\r\n updateTimelineLevelField(\r\n $index,\r\n 'lookupProperty',\r\n $event\r\n )\r\n \"\r\n />\r\n <mt-select-field\r\n [label]=\"t('idProperty')\"\r\n [options]=\"\r\n propertiesGrouped().length > 1\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"propertiesGrouped().length > 1\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [ngModel]=\"level.idProperty\"\r\n (ngModelChange)=\"\r\n updateTimelineLevelField($index, 'idProperty', $event)\r\n \"\r\n />\r\n <mt-select-field\r\n [label]=\"t('startTimeProperty')\"\r\n [options]=\"\r\n propertiesGrouped().length > 1\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"propertiesGrouped().length > 1\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [ngModel]=\"level.startPoint_timeProperty\"\r\n (ngModelChange)=\"\r\n updateTimelineLevelField(\r\n $index,\r\n 'startPoint_timeProperty',\r\n $event\r\n )\r\n \"\r\n />\r\n <mt-select-field\r\n [label]=\"t('endTimeProperty')\"\r\n [options]=\"\r\n propertiesGrouped().length > 1\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"propertiesGrouped().length > 1\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [ngModel]=\"level.endPoint_timeProperty\"\r\n (ngModelChange)=\"\r\n updateTimelineLevelField(\r\n $index,\r\n 'endPoint_timeProperty',\r\n $event\r\n )\r\n \"\r\n />\r\n <mt-select-field\r\n [label]=\"t('progressProperty')\"\r\n [options]=\"\r\n propertiesGrouped().length > 1\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"propertiesGrouped().length > 1\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [ngModel]=\"level.progressProperty\"\r\n (ngModelChange)=\"\r\n updateTimelineLevelField(\r\n $index,\r\n 'progressProperty',\r\n $event\r\n )\r\n \"\r\n />\r\n @if (shouldShowTimelineParentProperty($index)) {\r\n <mt-select-field\r\n [label]=\"t('parentProperty')\"\r\n [options]=\"timelineParentPropertyOptions($index)\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n [ngModel]=\"level.parentProperty\"\r\n (ngModelChange)=\"\r\n updateTimelineLevelField(\r\n $index,\r\n 'parentProperty',\r\n $event\r\n )\r\n \"\r\n />\r\n }\r\n </div>\r\n\r\n <mt-string-array-input\r\n [label]=\"t('extraProperties')\"\r\n [options]=\"\r\n propertiesGrouped().length > 1\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"propertiesGrouped().length > 1\"\r\n [placeholder]=\"t('selectProperties')\"\r\n [ngModel]=\"level.extraProperties || level.extras || []\"\r\n (ngModelChange)=\"\r\n updateTimelineLevelField(\r\n $index,\r\n 'extraProperties',\r\n $event\r\n )\r\n \"\r\n />\r\n </div>\r\n }\r\n\r\n @if (timelineLevels().length === 0) {\r\n <div class=\"text-center py-4 text-muted-color text-sm\">\r\n {{ t(\"noTimelineLevelsHint\") }}\r\n </div>\r\n }\r\n </div>\r\n }\r\n @case (\"map\") {\r\n <mt-map-query\r\n [propertiesFlat]=\"propertiesFlat()\"\r\n [propertiesGrouped]=\"propertiesGrouped()\"\r\n [ngModel]=\"query()\"\r\n (ngModelChange)=\"onMapQueryChange($event)\"\r\n />\r\n }\r\n @case (\"splitter\") {\r\n <mt-splitter-query\r\n [propertiesFlat]=\"propertiesFlat()\"\r\n [propertiesGrouped]=\"propertiesGrouped()\"\r\n [ngModel]=\"query()\"\r\n (ngModelChange)=\"onSplitterQueryChange($event)\"\r\n />\r\n }\r\n @case (\"properties\") {\r\n <mt-properties-query\r\n [propertiesFlat]=\"propertiesFlat()\"\r\n [propertiesGrouped]=\"propertiesGrouped()\"\r\n [ngModel]=\"query()\"\r\n (ngModelChange)=\"onPropertiesQueryChange($event)\"\r\n />\r\n }\r\n @case (\"snapshot\") {\r\n <mt-snapshot-query\r\n [propertiesFlat]=\"propertiesFlat()\"\r\n [propertiesGrouped]=\"propertiesGrouped()\"\r\n [ngModel]=\"query()\"\r\n (ngModelChange)=\"onSnapshotQueryChange($event)\"\r\n />\r\n }\r\n @case (\"phaseGate\") {\r\n <div class=\"flex flex-col gap-2\">\r\n <mt-text-field\r\n [label]=\"t('levelId')\"\r\n [ngModel]=\"phaseGateLevelId()\"\r\n (ngModelChange)=\"onPhaseGateLevelIdChange($event)\"\r\n />\r\n <p class=\"text-xs text-muted-color\">\r\n {{ t(\"phaseGateLevelIdHint\") }}\r\n </p>\r\n </div>\r\n }\r\n @case (\"repeater\") {\r\n <div class=\"flex flex-col gap-5\">\r\n <mt-select-field\r\n [label]=\"t('repeaterDashboard')\"\r\n [options]=\"availableDashboards()\"\r\n optionLabel=\"name\"\r\n optionValue=\"id\"\r\n [ngModel]=\"repeaterDashboardId()\"\r\n (ngModelChange)=\"onRepeaterDashboardChange($event)\"\r\n />\r\n\r\n <mt-string-array-input\r\n [label]=\"t('repeaterSelectedProperties')\"\r\n [options]=\"\r\n propertiesGrouped().length > 1\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"propertiesGrouped().length > 1\"\r\n [placeholder]=\"t('repeaterSelectedPropertiesPlaceholder')\"\r\n [ngModel]=\"repeaterSelectedProperties()\"\r\n (ngModelChange)=\"onRepeaterSelectedPropertiesChange($event)\"\r\n />\r\n </div>\r\n }\r\n }\r\n }\r\n </div>\r\n }\r\n }\r\n</div>\r\n" }]
|
|
39871
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div class=\"flex flex-col gap-5\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\r\n <!-- Data source mode: Selection cycle OR Custom API (separated area on top) -->\r\n @if (supportsCustomApi()) {\r\n <div class=\"grid grid-cols-2 gap-3\">\r\n <button\r\n type=\"button\"\r\n class=\"flex items-start gap-2 rounded-lg border p-3 text-left transition-colors\"\r\n [class.border-primary-500]=\"dataSourceMode() === 'selection'\"\r\n [class.bg-primary-50]=\"dataSourceMode() === 'selection'\"\r\n [class.border-surface-200]=\"dataSourceMode() !== 'selection'\"\r\n [class.hover:bg-surface-50]=\"dataSourceMode() !== 'selection'\"\r\n (click)=\"onModeChange('selection')\"\r\n >\r\n <mt-icon\r\n icon=\"dev.database-01\"\r\n class=\"mt-0.5 text-lg\"\r\n [class.text-primary-600]=\"dataSourceMode() === 'selection'\"\r\n [class.text-muted-color]=\"dataSourceMode() !== 'selection'\"\r\n />\r\n <span class=\"flex flex-col\">\r\n <span class=\"text-sm font-semibold text-surface-700\">\r\n {{ t(\"dataSourceModes.selection\") }}\r\n </span>\r\n <span class=\"text-xs text-muted-color\">\r\n {{ t(\"dataSourceModes.selectionHint\") }}\r\n </span>\r\n </span>\r\n </button>\r\n\r\n <button\r\n type=\"button\"\r\n class=\"flex items-start gap-2 rounded-lg border p-3 text-left transition-colors\"\r\n [class.border-primary-500]=\"dataSourceMode() === 'customApi'\"\r\n [class.bg-primary-50]=\"dataSourceMode() === 'customApi'\"\r\n [class.border-surface-200]=\"dataSourceMode() !== 'customApi'\"\r\n [class.hover:bg-surface-50]=\"dataSourceMode() !== 'customApi'\"\r\n (click)=\"onModeChange('customApi')\"\r\n >\r\n <mt-icon\r\n icon=\"dev.code-02\"\r\n class=\"mt-0.5 text-lg\"\r\n [class.text-primary-600]=\"dataSourceMode() === 'customApi'\"\r\n [class.text-muted-color]=\"dataSourceMode() !== 'customApi'\"\r\n />\r\n <span class=\"flex flex-col\">\r\n <span class=\"text-sm font-semibold text-surface-700\">\r\n {{ t(\"dataSourceModes.customApi\") }}\r\n </span>\r\n <span class=\"text-xs text-muted-color\">\r\n {{ t(\"dataSourceModes.customApiHint\") }}\r\n </span>\r\n </span>\r\n </button>\r\n </div>\r\n }\r\n\r\n <!-- ===================== CUSTOM API MODE ===================== -->\r\n @if (supportsCustomApi() && dataSourceMode() === \"customApi\") {\r\n <mt-custom-api-configuration\r\n [ngModel]=\"customApi()\"\r\n (ngModelChange)=\"onCustomApiChange($event)\"\r\n />\r\n } @else {\r\n <!-- ===================== SELECTION CYCLE ===================== -->\r\n\r\n <!-- Workspace gate: pick ONE workspace before the tabs/config appear.\r\n The picker shows whenever no workspace is chosen yet \u2014 for a brand-new\r\n chart it also blocks the tabs (needsWorkspacePick), but an existing\r\n chart that never had a workspace still gets the picker so it can be\r\n assigned (and saved into serviceConfig.workspaceId for navigate-to). -->\r\n @if (showWorkspaceGate()) {\r\n @if (!chartWorkspace()) {\r\n <div\r\n class=\"flex flex-col items-center gap-3 rounded-lg border border-dashed border-surface-300 bg-surface-50 p-6 text-center\"\r\n >\r\n <mt-icon icon=\"dev.database-01\" class=\"text-3xl text-primary-500\" />\r\n <div class=\"flex flex-col gap-1\">\r\n <h3 class=\"text-sm font-semibold text-surface-700\">\r\n {{ t(\"workspaceGateTitle\") }}\r\n </h3>\r\n <p class=\"text-xs text-muted-color\">\r\n {{ t(\"workspaceGateHint\") }}\r\n </p>\r\n </div>\r\n <div class=\"w-full max-w-sm\">\r\n <mt-select-field\r\n [options]=\"workspaceOptions()\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [placeholder]=\"t('selectWorkspace')\"\r\n [filter]=\"true\"\r\n [ngModel]=\"chartWorkspace()\"\r\n (ngModelChange)=\"onWorkspacePick($event)\"\r\n />\r\n </div>\r\n </div>\r\n } @else if (workspaceAutoDetected()) {\r\n <!-- Old data: workspace inferred from the chart's existing config.\r\n Surface it with a Save-to-keep / Clear notice instead of a silent\r\n chip, so the user knows it must be saved (or can pick another). -->\r\n <div\r\n class=\"flex flex-wrap items-center justify-between gap-3 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2\"\r\n >\r\n <span class=\"flex items-start gap-2 text-sm\">\r\n <mt-icon\r\n icon=\"general.alert-circle\"\r\n class=\"mt-0.5 text-base text-amber-600\"\r\n />\r\n <span class=\"flex flex-col\">\r\n <span class=\"font-medium text-surface-700\">\r\n {{ t(\"workspace\") }}: {{ chartWorkspaceLabel() }}\r\n </span>\r\n <span class=\"text-xs text-amber-700\">{{\r\n t(\"workspaceAutoHint\")\r\n }}</span>\r\n </span>\r\n </span>\r\n <mt-button\r\n [label]=\"t('clear')\"\r\n severity=\"secondary\"\r\n variant=\"outlined\"\r\n size=\"small\"\r\n (onClick)=\"clearAutoDetectedWorkspace()\"\r\n />\r\n </div>\r\n } @else {\r\n <div\r\n class=\"flex flex-wrap items-center justify-between gap-2 rounded-lg border border-surface-200 bg-surface-50 px-3 py-2\"\r\n >\r\n <span class=\"flex items-center gap-2 text-sm\">\r\n <mt-icon\r\n icon=\"dev.database-01\"\r\n class=\"text-base text-primary-500\"\r\n />\r\n <span class=\"text-muted-color\">{{ t(\"workspace\") }}:</span>\r\n <span class=\"font-medium text-surface-700\">{{\r\n chartWorkspaceLabel()\r\n }}</span>\r\n </span>\r\n @if (!confirmingWorkspaceChange()) {\r\n <mt-button\r\n [label]=\"t('change')\"\r\n severity=\"secondary\"\r\n variant=\"outlined\"\r\n size=\"small\"\r\n (onClick)=\"requestChangeWorkspace()\"\r\n />\r\n } @else {\r\n <span class=\"flex flex-wrap items-center gap-2\">\r\n <span class=\"text-xs text-amber-600\">{{\r\n t(\"changeWorkspaceConfirm\")\r\n }}</span>\r\n <mt-button\r\n [label]=\"t('cancel')\"\r\n severity=\"secondary\"\r\n variant=\"outlined\"\r\n size=\"small\"\r\n (onClick)=\"cancelChangeWorkspace()\"\r\n />\r\n <mt-button\r\n [label]=\"t('changeAndClear')\"\r\n severity=\"danger\"\r\n size=\"small\"\r\n (onClick)=\"confirmChangeWorkspace()\"\r\n />\r\n </span>\r\n }\r\n </div>\r\n }\r\n }\r\n\r\n <!-- Sub-navigation: Selection \u00B7 Source Links (when >1 selection) \u00B7 Query -->\r\n @if (sectionOptions().length > 1 && !needsWorkspacePick()) {\r\n <mt-tabs\r\n [options]=\"sectionOptions()\"\r\n optionLabel=\"label\"\r\n optionValue=\"id\"\r\n [active]=\"visibleSection()\"\r\n (onChange)=\"onSectionChange($event)\"\r\n />\r\n }\r\n\r\n <!-- ===================== SELECTION ===================== -->\r\n @if (!hideSelectionConfig() && !needsWorkspacePick()) {\r\n <div\r\n [hidden]=\"visibleSection() !== 'selection'\"\r\n class=\"flex flex-col gap-5\"\r\n >\r\n @if (showInformativeSelectionMode()) {\r\n <div class=\"flex items-center justify-end\">\r\n <mt-toggle-field\r\n [label]=\"t('advancedSelection')\"\r\n [ngModel]=\"selectionMode() === 'advanced'\"\r\n (ngModelChange)=\"onAdvancedSelectionToggle($event)\"\r\n />\r\n </div>\r\n }\r\n\r\n @if (\r\n !showInformativeSelectionMode() || selectionMode() === \"advanced\"\r\n ) {\r\n <mt-selection-configuration\r\n [workspaceId]=\"selectedWorkspaceId()\"\r\n [chartWorkspace]=\"chartWorkspace()\"\r\n [modulesProperties]=\"modulesProperties()\"\r\n [propertiesFlat]=\"propertiesFlat()\"\r\n [ngModel]=\"selections()\"\r\n (ngModelChange)=\"onSelectionsChange($event)\"\r\n (moduleChange)=\"onModuleChange($event)\"\r\n />\r\n } @else {\r\n <div class=\"flex flex-col gap-5\">\r\n <mt-informative-context-selection\r\n class=\"block\"\r\n [informativeContext]=\"informativeContext()\"\r\n [currentSelection]=\"selections()\"\r\n [preferredTargetSelector]=\"contextTargetSelector()\"\r\n [applyToken]=\"contextTargetApplyToken()\"\r\n (templateApply)=\"onContextTemplateApply($event)\"\r\n />\r\n\r\n @if (selections().length) {\r\n <mt-selection-configuration\r\n [workspaceId]=\"selectedWorkspaceId()\"\r\n [chartWorkspace]=\"chartWorkspace()\"\r\n [modulesProperties]=\"modulesProperties()\"\r\n [propertiesFlat]=\"propertiesFlat()\"\r\n [structureLocked]=\"true\"\r\n [ngModel]=\"selections()\"\r\n (ngModelChange)=\"onSelectionsChange($event)\"\r\n />\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n <!-- ===================== SOURCE LINKS (only with >1 selection) ===================== -->\r\n @if (showSourceLinks() && !needsWorkspacePick()) {\r\n <div\r\n [hidden]=\"visibleSection() !== 'sourceLinks'\"\r\n class=\"flex flex-col gap-5\"\r\n >\r\n <mt-source-link-configuration\r\n [selectionModules]=\"selectionModules()\"\r\n [ngModel]=\"sourceLinks()\"\r\n (ngModelChange)=\"onSourceLinksChange($event)\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- ===================== QUERY ===================== -->\r\n @if (queryComponentType() !== \"none\" && !needsWorkspacePick()) {\r\n <div [hidden]=\"visibleSection() !== 'query'\" class=\"flex flex-col gap-5\">\r\n @if (loadingProperties()) {\r\n <div class=\"flex flex-col gap-4\">\r\n <div class=\"flex flex-col gap-2\">\r\n <p-skeleton width=\"120px\" height=\"16px\" />\r\n <p-skeleton width=\"100%\" height=\"40px\" borderRadius=\"8px\" />\r\n </div>\r\n <div class=\"grid grid-cols-2 gap-4\">\r\n <div class=\"flex flex-col gap-2\">\r\n <p-skeleton width=\"80px\" height=\"16px\" />\r\n <p-skeleton width=\"100%\" height=\"40px\" borderRadius=\"8px\" />\r\n </div>\r\n <div class=\"flex flex-col gap-2\">\r\n <p-skeleton width=\"90px\" height=\"16px\" />\r\n <p-skeleton width=\"100%\" height=\"40px\" borderRadius=\"8px\" />\r\n </div>\r\n </div>\r\n </div>\r\n } @else {\r\n <!-- Group By Multiple (table views) -->\r\n @if (showGroupByMultiple()) {\r\n <mt-string-array-input\r\n [label]=\"t('groupByMultiple')\"\r\n [options]=\"\r\n propertiesGrouped().length > 1\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"propertiesGrouped().length > 1\"\r\n [placeholder]=\"t('selectGroupByProperties')\"\r\n [ngModel]=\"groupByMultiple()\"\r\n (ngModelChange)=\"onGroupByMultipleChange($event)\"\r\n />\r\n }\r\n\r\n <!-- Query Configuration based on chart type -->\r\n @switch (queryComponentType()) {\r\n @case (\"lineChart\") {\r\n <mt-line-chart-query\r\n [propertiesFlat]=\"propertiesFlat()\"\r\n [propertiesGrouped]=\"propertiesGrouped()\"\r\n [ngModel]=\"query()\"\r\n (ngModelChange)=\"onLineChartQueryChange($event)\"\r\n />\r\n }\r\n @case (\"general\") {\r\n <mt-general-query\r\n [chartType]=\"getChartTypeId()\"\r\n [querySchema]=\"querySchema()\"\r\n [propertiesFlat]=\"propertiesFlat()\"\r\n [propertiesGrouped]=\"propertiesGrouped()\"\r\n [ngModel]=\"query()\"\r\n (ngModelChange)=\"onQueryChange($event)\"\r\n />\r\n\r\n <mt-toggle-field\r\n [label]=\"t('isNormalized')\"\r\n [ngModel]=\"isNormalized()\"\r\n (ngModelChange)=\"onIsNormalizedChange($event)\"\r\n />\r\n }\r\n @case (\"table\") {\r\n <mt-table-query\r\n [propertiesFlat]=\"propertiesFlat()\"\r\n [propertiesGrouped]=\"propertiesGrouped()\"\r\n [ngModel]=\"query()\"\r\n (ngModelChange)=\"onTableQueryChange($event)\"\r\n />\r\n }\r\n @case (\"phaseGateTable\") {\r\n @let phaseGateQuery = phaseGateTableQuery();\r\n @let groupedPhaseGateProperties = propertiesGrouped().length > 1;\r\n\r\n <div class=\"flex flex-col gap-5\">\r\n <p class=\"text-sm text-muted-color\">\r\n {{ t(\"phaseGateTableQueryDescription\") }}\r\n </p>\r\n\r\n <div class=\"grid grid-cols-1 gap-4 lg:grid-cols-2\">\r\n <mt-select-field\r\n [label]=\"t('phaseGateRowIdentityProperty')\"\r\n [hint]=\"t('phaseGateRowIdentityPropertyHint')\"\r\n [required]=\"true\"\r\n [options]=\"\r\n groupedPhaseGateProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedPhaseGateProperties\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('phaseGateSelectProperty')\"\r\n [ngModel]=\"phaseGateQuery.rowIdentityProperty\"\r\n (ngModelChange)=\"\r\n onPhaseGateTableRoleChange('rowIdentityProperty', $event)\r\n \"\r\n />\r\n\r\n <mt-select-field\r\n [label]=\"t('phaseGateNameProperty')\"\r\n [hint]=\"t('phaseGateNamePropertyHint')\"\r\n [required]=\"true\"\r\n [options]=\"\r\n groupedPhaseGateProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedPhaseGateProperties\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('phaseGateSelectProperty')\"\r\n [ngModel]=\"phaseGateQuery.phaseNameProperty\"\r\n (ngModelChange)=\"\r\n onPhaseGateTableRoleChange('phaseNameProperty', $event)\r\n \"\r\n />\r\n\r\n <mt-select-field\r\n [label]=\"t('phaseGateStatusProperty')\"\r\n [hint]=\"t('phaseGateStatusPropertyHint')\"\r\n [required]=\"true\"\r\n [options]=\"\r\n groupedPhaseGateProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedPhaseGateProperties\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('phaseGateSelectProperty')\"\r\n [ngModel]=\"phaseGateQuery.phaseStatusProperty\"\r\n (ngModelChange)=\"\r\n onPhaseGateTableRoleChange('phaseStatusProperty', $event)\r\n \"\r\n />\r\n\r\n <mt-select-field\r\n [label]=\"t('phaseGateIdProperty')\"\r\n [showClear]=\"true\"\r\n [options]=\"\r\n groupedPhaseGateProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedPhaseGateProperties\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('phaseGateSelectProperty')\"\r\n [ngModel]=\"phaseGateQuery.phaseIdProperty\"\r\n (ngModelChange)=\"\r\n onPhaseGateTableRoleChange('phaseIdProperty', $event)\r\n \"\r\n />\r\n\r\n <mt-select-field\r\n [label]=\"t('phaseGateOrderProperty')\"\r\n [showClear]=\"true\"\r\n [options]=\"\r\n groupedPhaseGateProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedPhaseGateProperties\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('phaseGateSelectProperty')\"\r\n [ngModel]=\"phaseGateQuery.phaseOrderProperty\"\r\n (ngModelChange)=\"\r\n onPhaseGateTableRoleChange('phaseOrderProperty', $event)\r\n \"\r\n />\r\n\r\n <mt-select-field\r\n [label]=\"t('phaseGateProgressProperty')\"\r\n [showClear]=\"true\"\r\n [options]=\"\r\n groupedPhaseGateProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedPhaseGateProperties\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('phaseGateSelectProperty')\"\r\n [ngModel]=\"phaseGateQuery.phaseProgressProperty\"\r\n (ngModelChange)=\"\r\n onPhaseGateTableRoleChange(\r\n 'phaseProgressProperty',\r\n $event\r\n )\r\n \"\r\n />\r\n\r\n <mt-select-field\r\n [label]=\"t('phaseGateCurrentProperty')\"\r\n [showClear]=\"true\"\r\n [options]=\"\r\n groupedPhaseGateProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedPhaseGateProperties\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('phaseGateSelectProperty')\"\r\n [ngModel]=\"phaseGateQuery.phaseIsCurrentProperty\"\r\n (ngModelChange)=\"\r\n onPhaseGateTableRoleChange(\r\n 'phaseIsCurrentProperty',\r\n $event\r\n )\r\n \"\r\n />\r\n\r\n <mt-select-field\r\n [label]=\"t('phaseGateCompletedProperty')\"\r\n [showClear]=\"true\"\r\n [options]=\"\r\n groupedPhaseGateProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedPhaseGateProperties\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('phaseGateSelectProperty')\"\r\n [ngModel]=\"phaseGateQuery.phaseIsCompletedProperty\"\r\n (ngModelChange)=\"\r\n onPhaseGateTableRoleChange(\r\n 'phaseIsCompletedProperty',\r\n $event\r\n )\r\n \"\r\n />\r\n\r\n <mt-select-field\r\n [label]=\"t('phaseGateAllItemsCompletedProperty')\"\r\n [showClear]=\"true\"\r\n [options]=\"\r\n groupedPhaseGateProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedPhaseGateProperties\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('phaseGateSelectProperty')\"\r\n [ngModel]=\"phaseGateQuery.phaseAllItemsCompletedProperty\"\r\n (ngModelChange)=\"\r\n onPhaseGateTableRoleChange(\r\n 'phaseAllItemsCompletedProperty',\r\n $event\r\n )\r\n \"\r\n />\r\n </div>\r\n\r\n <mt-string-array-input\r\n [label]=\"t('phaseGateVisibleProperties')\"\r\n [options]=\"\r\n groupedPhaseGateProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedPhaseGateProperties\"\r\n [placeholder]=\"t('phaseGateVisiblePropertiesPlaceholder')\"\r\n [ngModel]=\"phaseGateQuery.baseProperties\"\r\n (ngModelChange)=\"onPhaseGateTableBasePropertiesChange($event)\"\r\n />\r\n\r\n <p class=\"text-xs text-muted-color\">\r\n {{ t(\"phaseGateProjectionHint\") }}\r\n </p>\r\n </div>\r\n }\r\n @case (\"timeline\") {\r\n <mt-timeline-query\r\n [propertiesFlat]=\"propertiesFlat()\"\r\n [propertiesGrouped]=\"propertiesGrouped()\"\r\n [ngModel]=\"query()\"\r\n (ngModelChange)=\"onTimelineQueryChange($event)\"\r\n />\r\n }\r\n @case (\"timelineMultiLevel\") {\r\n <div class=\"flex flex-col gap-5\">\r\n <div class=\"flex items-center justify-between\">\r\n <p class=\"text-sm text-muted-color\">\r\n {{ t(\"timelineMultiLevelDescription\") }}\r\n </p>\r\n <mt-button\r\n size=\"small\"\r\n severity=\"secondary\"\r\n icon=\"general.plus\"\r\n [label]=\"t('addLevel')\"\r\n (onClick)=\"addTimelineLevel()\"\r\n />\r\n </div>\r\n\r\n <mt-select-field\r\n [label]=\"t('timeFrame')\"\r\n [options]=\"timeFrameOptions\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [ngModel]=\"timelineTimeFrame()\"\r\n (ngModelChange)=\"onTimelineTimeFrameChange($event)\"\r\n />\r\n\r\n @for (level of timelineLevels(); track $index) {\r\n <div\r\n class=\"border border-surface-300 rounded-md p-4 flex flex-col gap-3\"\r\n >\r\n <div class=\"flex items-center justify-between\">\r\n <span class=\"font-medium\">\r\n {{ t(\"level\") }} {{ level.levelNumber || $index + 1 }}\r\n </span>\r\n <mt-button\r\n size=\"small\"\r\n severity=\"danger\"\r\n [text]=\"true\"\r\n icon=\"general.trash-02\"\r\n (onClick)=\"removeTimelineLevel($index)\"\r\n />\r\n </div>\r\n\r\n <div class=\"grid grid-cols-2 gap-3\">\r\n <mt-select-field\r\n [label]=\"t('pivotProperty')\"\r\n [options]=\"\r\n propertiesGrouped().length > 1\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"propertiesGrouped().length > 1\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [ngModel]=\"level.pivotProperty\"\r\n (ngModelChange)=\"\r\n updateTimelineLevelField(\r\n $index,\r\n 'pivotProperty',\r\n $event\r\n )\r\n \"\r\n />\r\n <mt-select-field\r\n [label]=\"t('lookupProperty')\"\r\n [options]=\"\r\n propertiesGrouped().length > 1\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"propertiesGrouped().length > 1\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [ngModel]=\"level.lookupProperty\"\r\n (ngModelChange)=\"\r\n updateTimelineLevelField(\r\n $index,\r\n 'lookupProperty',\r\n $event\r\n )\r\n \"\r\n />\r\n <mt-select-field\r\n [label]=\"t('idProperty')\"\r\n [options]=\"\r\n propertiesGrouped().length > 1\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"propertiesGrouped().length > 1\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [ngModel]=\"level.idProperty\"\r\n (ngModelChange)=\"\r\n updateTimelineLevelField($index, 'idProperty', $event)\r\n \"\r\n />\r\n <mt-select-field\r\n [label]=\"t('startTimeProperty')\"\r\n [options]=\"\r\n propertiesGrouped().length > 1\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"propertiesGrouped().length > 1\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [ngModel]=\"level.startPoint_timeProperty\"\r\n (ngModelChange)=\"\r\n updateTimelineLevelField(\r\n $index,\r\n 'startPoint_timeProperty',\r\n $event\r\n )\r\n \"\r\n />\r\n <mt-select-field\r\n [label]=\"t('endTimeProperty')\"\r\n [options]=\"\r\n propertiesGrouped().length > 1\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"propertiesGrouped().length > 1\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [ngModel]=\"level.endPoint_timeProperty\"\r\n (ngModelChange)=\"\r\n updateTimelineLevelField(\r\n $index,\r\n 'endPoint_timeProperty',\r\n $event\r\n )\r\n \"\r\n />\r\n <mt-select-field\r\n [label]=\"t('progressProperty')\"\r\n [options]=\"\r\n propertiesGrouped().length > 1\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"propertiesGrouped().length > 1\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [ngModel]=\"level.progressProperty\"\r\n (ngModelChange)=\"\r\n updateTimelineLevelField(\r\n $index,\r\n 'progressProperty',\r\n $event\r\n )\r\n \"\r\n />\r\n @if (shouldShowTimelineParentProperty($index)) {\r\n <mt-select-field\r\n [label]=\"t('parentProperty')\"\r\n [options]=\"timelineParentPropertyOptions($index)\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n [ngModel]=\"level.parentProperty\"\r\n (ngModelChange)=\"\r\n updateTimelineLevelField(\r\n $index,\r\n 'parentProperty',\r\n $event\r\n )\r\n \"\r\n />\r\n }\r\n </div>\r\n\r\n <mt-string-array-input\r\n [label]=\"t('extraProperties')\"\r\n [options]=\"\r\n propertiesGrouped().length > 1\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"propertiesGrouped().length > 1\"\r\n [placeholder]=\"t('selectProperties')\"\r\n [ngModel]=\"level.extraProperties || level.extras || []\"\r\n (ngModelChange)=\"\r\n updateTimelineLevelField(\r\n $index,\r\n 'extraProperties',\r\n $event\r\n )\r\n \"\r\n />\r\n </div>\r\n }\r\n\r\n @if (timelineLevels().length === 0) {\r\n <div class=\"text-center py-4 text-muted-color text-sm\">\r\n {{ t(\"noTimelineLevelsHint\") }}\r\n </div>\r\n }\r\n </div>\r\n }\r\n @case (\"map\") {\r\n <mt-map-query\r\n [propertiesFlat]=\"propertiesFlat()\"\r\n [propertiesGrouped]=\"propertiesGrouped()\"\r\n [ngModel]=\"query()\"\r\n (ngModelChange)=\"onMapQueryChange($event)\"\r\n />\r\n }\r\n @case (\"splitter\") {\r\n <mt-splitter-query\r\n [propertiesFlat]=\"propertiesFlat()\"\r\n [propertiesGrouped]=\"propertiesGrouped()\"\r\n [ngModel]=\"query()\"\r\n (ngModelChange)=\"onSplitterQueryChange($event)\"\r\n />\r\n }\r\n @case (\"properties\") {\r\n <mt-properties-query\r\n [propertiesFlat]=\"propertiesFlat()\"\r\n [propertiesGrouped]=\"propertiesGrouped()\"\r\n [ngModel]=\"query()\"\r\n (ngModelChange)=\"onPropertiesQueryChange($event)\"\r\n />\r\n }\r\n @case (\"snapshot\") {\r\n <mt-snapshot-query\r\n [propertiesFlat]=\"propertiesFlat()\"\r\n [propertiesGrouped]=\"propertiesGrouped()\"\r\n [ngModel]=\"query()\"\r\n (ngModelChange)=\"onSnapshotQueryChange($event)\"\r\n />\r\n }\r\n @case (\"phaseGateStepper\") {\r\n @let stepperQuery = phaseGateTableQuery();\r\n @let groupedStepperProperties = propertiesGrouped().length > 1;\r\n\r\n <div class=\"flex flex-col gap-5\">\r\n <p class=\"text-sm text-muted-color\">\r\n {{ t(\"phaseGateStepperQueryDescription\") }}\r\n </p>\r\n\r\n <div class=\"grid grid-cols-1 gap-4 lg:grid-cols-2\">\r\n @for (role of phaseGateStepperRoles; track role.field) {\r\n @let required =\r\n !!querySchema()?.required?.includes(role.field);\r\n <mt-select-field\r\n [label]=\"t(role.label)\"\r\n [hint]=\"t(role.hint)\"\r\n [required]=\"required\"\r\n [showClear]=\"!required\"\r\n [options]=\"\r\n groupedStepperProperties\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"groupedStepperProperties\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('phaseGateSelectProperty')\"\r\n [ngModel]=\"stepperQuery[role.field]\"\r\n (ngModelChange)=\"\r\n onPhaseGateTableRoleChange(role.field, $event)\r\n \"\r\n />\r\n }\r\n </div>\r\n </div>\r\n }\r\n @case (\"repeater\") {\r\n <div class=\"flex flex-col gap-5\">\r\n <mt-select-field\r\n [label]=\"t('repeaterDashboard')\"\r\n [options]=\"availableDashboards()\"\r\n optionLabel=\"name\"\r\n optionValue=\"id\"\r\n [ngModel]=\"repeaterDashboardId()\"\r\n (ngModelChange)=\"onRepeaterDashboardChange($event)\"\r\n />\r\n\r\n <mt-string-array-input\r\n [label]=\"t('repeaterSelectedProperties')\"\r\n [options]=\"\r\n propertiesGrouped().length > 1\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"propertiesGrouped().length > 1\"\r\n [placeholder]=\"t('repeaterSelectedPropertiesPlaceholder')\"\r\n [ngModel]=\"repeaterSelectedProperties()\"\r\n (ngModelChange)=\"onRepeaterSelectedPropertiesChange($event)\"\r\n />\r\n </div>\r\n }\r\n }\r\n }\r\n </div>\r\n }\r\n }\r\n</div>\r\n" }]
|
|
40125
39872
|
}], ctorParameters: () => [], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], chartType: [{ type: i0.Input, args: [{ isSignal: true, alias: "chartType", required: false }] }], informativeContext: [{ type: i0.Input, args: [{ isSignal: true, alias: "informativeContext", required: false }] }], serviceConfigChange: [{ type: i0.Output, args: ["serviceConfigChange"] }] } });
|
|
40126
39873
|
|
|
40127
39874
|
/**
|
|
@@ -40186,23 +39933,24 @@ class ManageItem {
|
|
|
40186
39933
|
const hasTitle = !!(cfg.clientConfig?.title?.en || cfg.clientConfig?.title?.ar);
|
|
40187
39934
|
if (!hasChartType || !hasTitle)
|
|
40188
39935
|
return false;
|
|
40189
|
-
// PhaseGate Table cannot safely infer
|
|
40190
|
-
// Keep Save disabled until the dedicated editor has
|
|
40191
|
-
//
|
|
39936
|
+
// PhaseGate Table and Stepper cannot safely infer their roles from
|
|
39937
|
+
// response order. Keep Save disabled until the dedicated editor has every
|
|
39938
|
+
// role the capability schema marks as required.
|
|
40192
39939
|
const capability = resolveCapability({
|
|
40193
39940
|
chartTypeId: this.chartTypeId(),
|
|
40194
39941
|
serviceType: cfg.serviceConfig?.chartType ?? null,
|
|
40195
39942
|
componentName: cfg.clientConfig?.componentName ?? null,
|
|
40196
39943
|
functionName: cfg.clientConfig?.functionName ?? null,
|
|
40197
39944
|
});
|
|
40198
|
-
|
|
39945
|
+
const editor = capability?.query.editor;
|
|
39946
|
+
if (editor !== 'phaseGateTable' && editor !== 'phaseGateStepper') {
|
|
40199
39947
|
return true;
|
|
39948
|
+
}
|
|
40200
39949
|
const query = cfg.serviceConfig?.query;
|
|
40201
|
-
return [
|
|
40202
|
-
query?.[
|
|
40203
|
-
|
|
40204
|
-
|
|
40205
|
-
].every((value) => typeof value === 'string' && value.trim().length > 0);
|
|
39950
|
+
return (capability?.query.schema?.required ?? []).every((field) => {
|
|
39951
|
+
const value = query?.[field];
|
|
39952
|
+
return typeof value === 'string' && value.trim().length > 0;
|
|
39953
|
+
});
|
|
40206
39954
|
}, ...(ngDevMode ? [{ debugName: "isValid" }] : /* istanbul ignore next */ []));
|
|
40207
39955
|
ngOnInit() {
|
|
40208
39956
|
// Check for dialog config data (when opened via DynamicDialog)
|
|
@@ -52120,4 +51868,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
52120
51868
|
*/
|
|
52121
51869
|
|
|
52122
51870
|
export { observeNearViewport as $, mergePropertyAppearance as A, EntityPreviewCardComponent as B, CardContentComponent as C, DashboardItemStoreService as D, EChartComponent as E, FilterUtilsService as F, ListStatisticCardComponent as G, HeaderCardComponent as H, MAP_FALLBACK_COLORS as I, isPlottable as J, plottableGroups as K, LastHistoryLevelCardComponent as L, MAP_MARKER_PATH as M, buildMapChartOption as N, MAP_REGIONS as O, PropertiesCardComponent as P, DEFAULT_MAP_REGION_KEY as Q, MAP_DATA_ATTRIBUTION as R, StaticFiltersComponent as S, resolveMapRegion as T, MapViewComponent as U, SkeletonCardComponent as V, resolveStatisticIconPlacement as W, StatisticCardComponent as X, TableCardComponent as Y, TopbarCardComponent as Z, ChartDataService as _, DashboardItem as a, ColorListField as a$, loadImmediately as a0, DASHBOARD_ITEM_VISIBILITY as a1, BarChartHandler as a2, PieChartHandler as a3, StackBarChartHandler as a4, axisFormatters as a5, groupDatesByYearAndMonth as a6, GaugeChartHandler as a7, TableViewHandler as a8, OverviewCardHandler as a9, isLogClassification as aA, HTTPMethod as aB, DashboardBuilderService as aC, DashboardStoreService as aD, isManagePagesDeleteResult as aE, ManagePages as aF, ManageBreadcrumb as aG, ManageFilterOnPage as aH, DynamicFiltersConfig as aI, ChartSettingsDrawer as aJ, DisplaySettings as aK, DefaultControlUi as aL, PieControlUi as aM, BarControlUi as aN, StackBarControlUi as aO, ManageItem as aP, CHART_TYPES as aQ, ManageItemService as aR, GeneralSettings as aS, DataSourceSettings as aT, ActionsSettings as aU, ChartViewer as aV, StyleStudioDrawer as aW, StyleSettingsRenderer as aX, expandResetPatches as aY, StyleField as aZ, SegmentedField as a_, TimelineHandler as aa, LineChartHandler as ab, SnapshotHandler as ac, ComparisonChartHandler as ad, SplitterChartHandler as ae, LevelCardHandler as af, MapChartHandler as ag, RingGaugeChartHandler as ah, SPlusChartHandler as ai, PhaseGateStepperHandler as aj, formatCurrency as ak, getCurrencySuffix as al, formatPercentage as am, formatNumber as an, formatDate as ao, createAxisFormatter as ap, createTooltipFormatter as aq, formatAxisLabel as ar, formatWordsUnderBar as as, formatXAxis as at, handleFiltersForCustom as au, handleFilterForCard as av, handleFilterForSnapshot as aw, DashboardList as ax, MODULE_CLASSIFICATION_LOG as ay, MODULE_CLASSIFICATION_LOG_NAME as az, DashboardDialogHeader as b, applyControlPatchesToPersisted as b$, ArrayBuilderField as b0, KeyValueMapField as b1, LegendOrderField as b2, ItemCardMenuComponent as b3, ChartFilterDrawer as b4, ItemContextToolbarComponent as b5, ItemConfigPopoverComponent as b6, GuidedConfigDialogComponent as b7, FilterChipsBarComponent as b8, FilterBuilderComponent as b9, datasourceToUi as bA, fieldsToUi as bB, filtersToUi as bC, styleToUi as bD, applyStyleToPersisted as bE, layoutToUi as bF, applyLayoutToPersisted as bG, labelLegendFormatToUi as bH, applyLabelLegendFormatToPersisted as bI, behaviorToUi as bJ, applyBehaviorToPersisted as bK, applyFilterChipsToPersisted as bL, persistedToUi as bM, buildAssembly as bN, STYLE_PRESETS as bO, presetsForCapability as bP, findPreset as bQ, validate as bR, hasBlockingIssues as bS, groupIssuesByDomain as bT, parseAdvancedJson as bU, deepMerge$1 as bV, formatForEditor as bW, CUSTOM_COLOR_OPTION as bX, readByPath$1 as bY, setByPath as bZ, applyControlPatchToPersisted as b_, DatasourcePanelComponent as ba, SchemaControlRendererComponent as bb, FilterByGroupPipe as bc, GetChartActionsPipe as bd, CHART_CAPABILITIES as be, getCapabilityById as bf, resolveCapability as bg, toBackendChartType as bh, normalizeChartTypeForRequest as bi, normalizeFilterOperation as bj, normalizeAggregateFunction as bk, normalizeFilters as bl, selectorFromLegacy as bm, moduleIdFromSelector as bn, toBackendSourceLink as bo, toFormSourceLink as bp, normalizeOnLoad as bq, normalizeBeforeSave as br, normalizeBeforeRequest as bs, CONFIG_DOMAINS as bt, domainsForCapability as bu, findDomain as bv, POPOVER_TABS as bw, POPOVER_TAB_SPECS as bx, titleToUi as by, applyTitleToPersisted as bz, cloneDeep$1 as c, getControlSchema as c0, listControlSchemaIds as c1, listControlSchemas as c2, getFallbackControlSchema as c3, flattenSchema as c4, resolveDisplayFields as c5, buildDisplayFieldPredicate as c6, bindingKey as c7, getBinding as c8, listBindings as c9, listBindingsForChart as ca, readBoundValue as cb, ITEM_GUIDANCE_REGISTRY as cc, describeGuidance as cd, ItemGuidanceService as ce, 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 };
|
|
52123
|
-
//# sourceMappingURL=masterteam-dashboard-builder-masterteam-dashboard-builder-
|
|
51871
|
+
//# sourceMappingURL=masterteam-dashboard-builder-masterteam-dashboard-builder-DfAo6fUq.mjs.map
|