@masterteam/dashboard-builder 0.0.57 → 0.0.58
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 +231 -143
- package/assets/dashboard-builder.css +1 -1
- package/assets/i18n/ar.json +1574 -1555
- package/assets/i18n/en.json +1299 -1280
- package/fesm2022/{masterteam-dashboard-builder-dashboard-dialog.component-BcAFvvKM.mjs → masterteam-dashboard-builder-dashboard-dialog.component-DKzJqB0X.mjs} +2 -2
- package/fesm2022/{masterteam-dashboard-builder-dashboard-dialog.component-BcAFvvKM.mjs.map → masterteam-dashboard-builder-dashboard-dialog.component-DKzJqB0X.mjs.map} +1 -1
- package/fesm2022/{masterteam-dashboard-builder-masterteam-dashboard-builder-DbySCZwd.mjs → masterteam-dashboard-builder-masterteam-dashboard-builder-F3nIcsti.mjs} +1046 -556
- package/fesm2022/masterteam-dashboard-builder-masterteam-dashboard-builder-F3nIcsti.mjs.map +1 -0
- package/fesm2022/masterteam-dashboard-builder.mjs +1 -1
- package/package.json +4 -4
- package/types/masterteam-dashboard-builder.d.ts +65 -11
- package/fesm2022/masterteam-dashboard-builder-masterteam-dashboard-builder-DbySCZwd.mjs.map +0 -1
|
@@ -1831,13 +1831,12 @@ const CHART_CAPABILITIES = [
|
|
|
1831
1831
|
fields: [
|
|
1832
1832
|
'valueProperty',
|
|
1833
1833
|
'aggregateFunction',
|
|
1834
|
-
'groupByProperties',
|
|
1835
1834
|
'color',
|
|
1836
1835
|
'formula',
|
|
1837
1836
|
'filters',
|
|
1838
|
-
'extraProperties',
|
|
1839
1837
|
],
|
|
1840
|
-
required: [
|
|
1838
|
+
required: [],
|
|
1839
|
+
requiredAnyOf: ['valueProperty', 'formula'],
|
|
1841
1840
|
},
|
|
1842
1841
|
},
|
|
1843
1842
|
display: {
|
|
@@ -2110,8 +2109,29 @@ const CHART_CAPABILITIES = [
|
|
|
2110
2109
|
selection: { visible: true, allowMultiple: true },
|
|
2111
2110
|
supportsSourceLinks: true,
|
|
2112
2111
|
supportsCustomApi: true,
|
|
2113
|
-
supportsGroupByMultiple:
|
|
2114
|
-
query: {
|
|
2112
|
+
supportsGroupByMultiple: false,
|
|
2113
|
+
query: {
|
|
2114
|
+
editor: 'phaseGateTable',
|
|
2115
|
+
schema: {
|
|
2116
|
+
fields: [
|
|
2117
|
+
'rowIdentityProperty',
|
|
2118
|
+
'phaseNameProperty',
|
|
2119
|
+
'phaseIdProperty',
|
|
2120
|
+
'phaseOrderProperty',
|
|
2121
|
+
'phaseStatusProperty',
|
|
2122
|
+
'phaseProgressProperty',
|
|
2123
|
+
'phaseIsCurrentProperty',
|
|
2124
|
+
'phaseIsCompletedProperty',
|
|
2125
|
+
'phaseAllItemsCompletedProperty',
|
|
2126
|
+
'baseProperties',
|
|
2127
|
+
],
|
|
2128
|
+
required: [
|
|
2129
|
+
'rowIdentityProperty',
|
|
2130
|
+
'phaseNameProperty',
|
|
2131
|
+
'phaseStatusProperty',
|
|
2132
|
+
],
|
|
2133
|
+
},
|
|
2134
|
+
},
|
|
2115
2135
|
display: {
|
|
2116
2136
|
fields: [
|
|
2117
2137
|
...TITLE_SHARED,
|
|
@@ -2759,6 +2779,134 @@ function normalizeChartTypeForRequest(raw) {
|
|
|
2759
2779
|
return (toBackendChartType(raw) ?? raw ?? '');
|
|
2760
2780
|
}
|
|
2761
2781
|
|
|
2782
|
+
const PHASE_GATE_TABLE_ROLE_FIELDS = [
|
|
2783
|
+
'rowIdentityProperty',
|
|
2784
|
+
'phaseNameProperty',
|
|
2785
|
+
'phaseIdProperty',
|
|
2786
|
+
'phaseOrderProperty',
|
|
2787
|
+
'phaseStatusProperty',
|
|
2788
|
+
'phaseProgressProperty',
|
|
2789
|
+
'phaseIsCurrentProperty',
|
|
2790
|
+
'phaseIsCompletedProperty',
|
|
2791
|
+
'phaseAllItemsCompletedProperty',
|
|
2792
|
+
];
|
|
2793
|
+
function isPhaseGateTableQuery(value) {
|
|
2794
|
+
if (!value || typeof value !== 'object')
|
|
2795
|
+
return false;
|
|
2796
|
+
const query = value;
|
|
2797
|
+
return PHASE_GATE_TABLE_ROLE_FIELDS.some((field) => Object.prototype.hasOwnProperty.call(query, field));
|
|
2798
|
+
}
|
|
2799
|
+
/** Stable, case/separator-insensitive identity used only for exact matches. */
|
|
2800
|
+
function normalizePhaseGatePropertyIdentity(value) {
|
|
2801
|
+
return String(value ?? '')
|
|
2802
|
+
.trim()
|
|
2803
|
+
.toLowerCase()
|
|
2804
|
+
.replace(/[\s_-]+/g, '');
|
|
2805
|
+
}
|
|
2806
|
+
function uniquePhaseGatePropertyKeys(value) {
|
|
2807
|
+
if (!Array.isArray(value))
|
|
2808
|
+
return [];
|
|
2809
|
+
const seen = new Set();
|
|
2810
|
+
const result = [];
|
|
2811
|
+
value.forEach((item) => {
|
|
2812
|
+
if (typeof item !== 'string')
|
|
2813
|
+
return;
|
|
2814
|
+
const key = item.trim();
|
|
2815
|
+
const identity = normalizePhaseGatePropertyIdentity(key);
|
|
2816
|
+
if (!identity || seen.has(identity))
|
|
2817
|
+
return;
|
|
2818
|
+
seen.add(identity);
|
|
2819
|
+
result.push(key);
|
|
2820
|
+
});
|
|
2821
|
+
return result;
|
|
2822
|
+
}
|
|
2823
|
+
/**
|
|
2824
|
+
* Create the complete property projection expected by the chart service.
|
|
2825
|
+
* Visible columns stay first and role fields are appended exactly once.
|
|
2826
|
+
*/
|
|
2827
|
+
function buildPhaseGateTableProjection(query) {
|
|
2828
|
+
const roleProperties = PHASE_GATE_TABLE_ROLE_FIELDS.map((field) => typeof query[field] === 'string' ? query[field] : '');
|
|
2829
|
+
const baseProperties = Array.isArray(query['baseProperties'])
|
|
2830
|
+
? query['baseProperties']
|
|
2831
|
+
: query['properties'];
|
|
2832
|
+
return uniquePhaseGatePropertyKeys([
|
|
2833
|
+
...uniquePhaseGatePropertyKeys(baseProperties),
|
|
2834
|
+
...roleProperties,
|
|
2835
|
+
]);
|
|
2836
|
+
}
|
|
2837
|
+
/**
|
|
2838
|
+
* Rebuild a PhaseGate table query without dropping unknown forward-compatible
|
|
2839
|
+
* fields. Legacy generic table configs can be hydrated deliberately by passing
|
|
2840
|
+
* `migrateLegacy: true`; their lookup property becomes the explicit status
|
|
2841
|
+
* role and their selected properties seed the visible business columns.
|
|
2842
|
+
*/
|
|
2843
|
+
function normalizePhaseGateTableQuery(value, options = {}) {
|
|
2844
|
+
if (!value || typeof value !== 'object') {
|
|
2845
|
+
return value;
|
|
2846
|
+
}
|
|
2847
|
+
const source = value;
|
|
2848
|
+
if (!options.migrateLegacy && !isPhaseGateTableQuery(source)) {
|
|
2849
|
+
return value;
|
|
2850
|
+
}
|
|
2851
|
+
const legacyProjection = Array.isArray(source['properties'])
|
|
2852
|
+
? uniquePhaseGatePropertyKeys(source['properties'])
|
|
2853
|
+
: uniquePhaseGatePropertyKeys(source['selectedProperties']);
|
|
2854
|
+
const roleValues = {
|
|
2855
|
+
rowIdentityProperty: readPropertyKey(source['rowIdentityProperty']),
|
|
2856
|
+
phaseNameProperty: readPropertyKey(source['phaseNameProperty']),
|
|
2857
|
+
phaseIdProperty: readPropertyKey(source['phaseIdProperty']),
|
|
2858
|
+
phaseOrderProperty: readPropertyKey(source['phaseOrderProperty']),
|
|
2859
|
+
phaseStatusProperty: readPropertyKey(source['phaseStatusProperty']) ||
|
|
2860
|
+
(options.migrateLegacy ? readPropertyKey(source['lookupProperty']) : ''),
|
|
2861
|
+
phaseProgressProperty: readPropertyKey(source['phaseProgressProperty']),
|
|
2862
|
+
phaseIsCurrentProperty: readPropertyKey(source['phaseIsCurrentProperty']),
|
|
2863
|
+
phaseIsCompletedProperty: readPropertyKey(source['phaseIsCompletedProperty']),
|
|
2864
|
+
phaseAllItemsCompletedProperty: readPropertyKey(source['phaseAllItemsCompletedProperty']),
|
|
2865
|
+
};
|
|
2866
|
+
const roleIdentities = new Set(Object.values(roleValues)
|
|
2867
|
+
.map(normalizePhaseGatePropertyIdentity)
|
|
2868
|
+
.filter(Boolean));
|
|
2869
|
+
const baseProperties = uniquePhaseGatePropertyKeys(Array.isArray(source['baseProperties'])
|
|
2870
|
+
? source['baseProperties']
|
|
2871
|
+
: legacyProjection).filter((property) => !roleIdentities.has(normalizePhaseGatePropertyIdentity(property)));
|
|
2872
|
+
const next = {
|
|
2873
|
+
...source,
|
|
2874
|
+
...roleValues,
|
|
2875
|
+
baseProperties,
|
|
2876
|
+
};
|
|
2877
|
+
const projection = buildPhaseGateTableProjection(next);
|
|
2878
|
+
next['properties'] = projection;
|
|
2879
|
+
next['selectedProperties'] = projection;
|
|
2880
|
+
return next;
|
|
2881
|
+
}
|
|
2882
|
+
/**
|
|
2883
|
+
* Resolve a configured catalog key against a response row. The response can
|
|
2884
|
+
* expose that identity as its object key or inside the property wrapper.
|
|
2885
|
+
* Matching is exact after case/separator normalization; response order is
|
|
2886
|
+
* irrelevant.
|
|
2887
|
+
*/
|
|
2888
|
+
function resolvePhaseGateResponseKey(row, configuredKey) {
|
|
2889
|
+
const target = normalizePhaseGatePropertyIdentity(configuredKey);
|
|
2890
|
+
if (!target || !row)
|
|
2891
|
+
return null;
|
|
2892
|
+
for (const key of Object.keys(row)) {
|
|
2893
|
+
const property = row[key];
|
|
2894
|
+
const identities = [
|
|
2895
|
+
key,
|
|
2896
|
+
property?.key,
|
|
2897
|
+
property?.normalizedKey,
|
|
2898
|
+
property?.label,
|
|
2899
|
+
property?.name,
|
|
2900
|
+
].map(normalizePhaseGatePropertyIdentity);
|
|
2901
|
+
if (identities.includes(target))
|
|
2902
|
+
return key;
|
|
2903
|
+
}
|
|
2904
|
+
return null;
|
|
2905
|
+
}
|
|
2906
|
+
function readPropertyKey(value) {
|
|
2907
|
+
return typeof value === 'string' ? value.trim() : '';
|
|
2908
|
+
}
|
|
2909
|
+
|
|
2762
2910
|
/**
|
|
2763
2911
|
* Chart Config Normalizer.
|
|
2764
2912
|
*
|
|
@@ -2832,6 +2980,19 @@ function normalizeTimelineTimeFrame(value) {
|
|
|
2832
2980
|
}
|
|
2833
2981
|
return value === 'daily' || value === 'weekly' ? 'monthly' : null;
|
|
2834
2982
|
}
|
|
2983
|
+
/** Remove fields that belonged to the old generic table editor. */
|
|
2984
|
+
function toCanonicalPhaseGateTableQuery(query, options = {}) {
|
|
2985
|
+
const next = normalizePhaseGateTableQuery(query, options);
|
|
2986
|
+
[
|
|
2987
|
+
'lookupProperty',
|
|
2988
|
+
'PivotProperties',
|
|
2989
|
+
'pivotProperties',
|
|
2990
|
+
'AggregationProperties',
|
|
2991
|
+
'aggregationProperties',
|
|
2992
|
+
'groupByMultiple',
|
|
2993
|
+
].forEach((field) => delete next[field]);
|
|
2994
|
+
return next;
|
|
2995
|
+
}
|
|
2835
2996
|
/** Normalize an array of filters in place (returns a new array). */
|
|
2836
2997
|
function normalizeFilters(filters) {
|
|
2837
2998
|
if (!filters)
|
|
@@ -3104,6 +3265,17 @@ function normalizeOnLoad(config) {
|
|
|
3104
3265
|
clientConfig['requestType'] = cap.requestType;
|
|
3105
3266
|
}
|
|
3106
3267
|
}
|
|
3268
|
+
// PhaseGate Table used the generic table query before the dedicated editor
|
|
3269
|
+
// existed. Hydrate that saved shape once the manifest identifies the chart,
|
|
3270
|
+
// then keep the complete backend projection deterministic on every load.
|
|
3271
|
+
const isPhaseGateTable = cap?.componentName === 'phaseGateTable' ||
|
|
3272
|
+
clientConfig['componentName'] === 'phaseGateTable' ||
|
|
3273
|
+
serviceConfig['componentName'] === 'phaseGateTable';
|
|
3274
|
+
if (serviceConfig['query'] &&
|
|
3275
|
+
(isPhaseGateTable || isPhaseGateTableQuery(serviceConfig['query']))) {
|
|
3276
|
+
serviceConfig['query'] = toCanonicalPhaseGateTableQuery(serviceConfig['query'], { migrateLegacy: isPhaseGateTable });
|
|
3277
|
+
delete serviceConfig['groupByMultiple'];
|
|
3278
|
+
}
|
|
3107
3279
|
return {
|
|
3108
3280
|
...config,
|
|
3109
3281
|
serviceConfig,
|
|
@@ -3165,6 +3337,10 @@ function normalizeBeforeSave(config) {
|
|
|
3165
3337
|
}
|
|
3166
3338
|
if (serviceConfig['query']) {
|
|
3167
3339
|
serviceConfig['query'] = normalizeTimelineMultiLevelQuery(normalizeAggregateFunctionsDeep(serviceConfig['query']));
|
|
3340
|
+
if (isPhaseGateTableQuery(serviceConfig['query'])) {
|
|
3341
|
+
serviceConfig['query'] = toCanonicalPhaseGateTableQuery(serviceConfig['query']);
|
|
3342
|
+
delete serviceConfig['groupByMultiple'];
|
|
3343
|
+
}
|
|
3168
3344
|
}
|
|
3169
3345
|
// Normalize source links to BE shape.
|
|
3170
3346
|
if (Array.isArray(serviceConfig['sourceLinks'])) {
|
|
@@ -3197,6 +3373,13 @@ function normalizeBeforeRequest(serviceConfig) {
|
|
|
3197
3373
|
}
|
|
3198
3374
|
if (next['query']) {
|
|
3199
3375
|
next['query'] = normalizeTimelineMultiLevelQuery(normalizeAggregateFunctionsDeep(next['query']));
|
|
3376
|
+
const isPhaseGateTable = next['componentName'] === 'phaseGateTable';
|
|
3377
|
+
if (isPhaseGateTable || isPhaseGateTableQuery(next['query'])) {
|
|
3378
|
+
next['query'] = toCanonicalPhaseGateTableQuery(next['query'], {
|
|
3379
|
+
migrateLegacy: isPhaseGateTable,
|
|
3380
|
+
});
|
|
3381
|
+
delete next['groupByMultiple'];
|
|
3382
|
+
}
|
|
3200
3383
|
}
|
|
3201
3384
|
if (Array.isArray(next['selection'])) {
|
|
3202
3385
|
next['selection'] = next['selection'].map((sel) => {
|
|
@@ -9799,34 +9982,95 @@ function describeGuidance(state) {
|
|
|
9799
9982
|
return ITEM_GUIDANCE_REGISTRY[state];
|
|
9800
9983
|
}
|
|
9801
9984
|
|
|
9802
|
-
|
|
9803
|
-
|
|
9804
|
-
|
|
9805
|
-
function isFieldPresent(value) {
|
|
9806
|
-
if (Array.isArray(value))
|
|
9807
|
-
return value.length > 0;
|
|
9808
|
-
if (value === undefined || value === null)
|
|
9985
|
+
/** Treat zero/false as values while rejecting blank strings and empty arrays. */
|
|
9986
|
+
function isQueryRequirementValuePresent(value) {
|
|
9987
|
+
if (value === null || value === undefined)
|
|
9809
9988
|
return false;
|
|
9810
9989
|
if (typeof value === 'string')
|
|
9811
9990
|
return value.trim().length > 0;
|
|
9991
|
+
if (Array.isArray(value)) {
|
|
9992
|
+
return value.some((item) => isQueryRequirementValuePresent(item));
|
|
9993
|
+
}
|
|
9812
9994
|
return true;
|
|
9813
9995
|
}
|
|
9996
|
+
/**
|
|
9997
|
+
* Resolve a field from the root query or any BarV2-style series entry.
|
|
9998
|
+
* A field is present when at least one of those locations has a real value.
|
|
9999
|
+
*/
|
|
10000
|
+
function hasQueryRequirementValue(query, field) {
|
|
10001
|
+
if (!query || typeof query !== 'object')
|
|
10002
|
+
return false;
|
|
10003
|
+
const queryRecord = query;
|
|
10004
|
+
if (isQueryRequirementValuePresent(queryRecord[field]))
|
|
10005
|
+
return true;
|
|
10006
|
+
const series = queryRecord['series'];
|
|
10007
|
+
if (!Array.isArray(series))
|
|
10008
|
+
return false;
|
|
10009
|
+
return series.some((entry) => !!entry &&
|
|
10010
|
+
typeof entry === 'object' &&
|
|
10011
|
+
isQueryRequirementValuePresent(entry[field]));
|
|
10012
|
+
}
|
|
10013
|
+
/**
|
|
10014
|
+
* Evaluate registry query requirements consistently across every UI/runtime
|
|
10015
|
+
* surface. `required` is an AND group; `requiredAnyOf` is one OR group.
|
|
10016
|
+
*/
|
|
10017
|
+
function evaluateQueryRequirements(query, schema) {
|
|
10018
|
+
const required = uniqueRequirementFields(schema?.required);
|
|
10019
|
+
const requiredAnyOf = uniqueRequirementFields(schema?.requiredAnyOf);
|
|
10020
|
+
const missingRequired = required.filter((field) => !hasQueryRequirementValue(query, field));
|
|
10021
|
+
const hasRequiredAlternative = requiredAnyOf.length === 0 ||
|
|
10022
|
+
requiredAnyOf.some((field) => hasQueryRequirementValue(query, field));
|
|
10023
|
+
const missingRequiredAnyOf = hasRequiredAlternative ? [] : requiredAnyOf;
|
|
10024
|
+
return {
|
|
10025
|
+
satisfied: missingRequired.length === 0 && missingRequiredAnyOf.length === 0,
|
|
10026
|
+
missingRequired,
|
|
10027
|
+
missingRequiredAnyOf,
|
|
10028
|
+
};
|
|
10029
|
+
}
|
|
10030
|
+
function uniqueRequirementFields(fields) {
|
|
10031
|
+
if (!Array.isArray(fields))
|
|
10032
|
+
return [];
|
|
10033
|
+
const seen = new Set();
|
|
10034
|
+
const result = [];
|
|
10035
|
+
fields.forEach((field) => {
|
|
10036
|
+
if (typeof field !== 'string')
|
|
10037
|
+
return;
|
|
10038
|
+
const trimmed = field.trim();
|
|
10039
|
+
if (!trimmed || seen.has(trimmed))
|
|
10040
|
+
return;
|
|
10041
|
+
seen.add(trimmed);
|
|
10042
|
+
result.push(trimmed);
|
|
10043
|
+
});
|
|
10044
|
+
return result;
|
|
10045
|
+
}
|
|
10046
|
+
|
|
10047
|
+
function readQuery(persisted) {
|
|
10048
|
+
return (persisted.serviceConfig?.query ?? {});
|
|
10049
|
+
}
|
|
9814
10050
|
function validateRequiredQueryFields(persisted, cap, out) {
|
|
9815
|
-
const
|
|
9816
|
-
if (!
|
|
10051
|
+
const schema = cap?.query?.schema;
|
|
10052
|
+
if (!schema)
|
|
9817
10053
|
return;
|
|
9818
10054
|
const query = readQuery(persisted);
|
|
9819
|
-
|
|
9820
|
-
|
|
9821
|
-
|
|
9822
|
-
|
|
9823
|
-
|
|
9824
|
-
|
|
9825
|
-
|
|
9826
|
-
|
|
9827
|
-
|
|
9828
|
-
|
|
9829
|
-
|
|
10055
|
+
const result = evaluateQueryRequirements(query, schema);
|
|
10056
|
+
for (const field of result.missingRequired) {
|
|
10057
|
+
out.push({
|
|
10058
|
+
domain: 'fields',
|
|
10059
|
+
severity: 'error',
|
|
10060
|
+
code: `missing-field:${field}`,
|
|
10061
|
+
message: `Field "${field}" is required for this chart.`,
|
|
10062
|
+
path: `serviceConfig.query.${field}`,
|
|
10063
|
+
});
|
|
10064
|
+
}
|
|
10065
|
+
if (result.missingRequiredAnyOf.length) {
|
|
10066
|
+
const alternatives = result.missingRequiredAnyOf.join(', ');
|
|
10067
|
+
out.push({
|
|
10068
|
+
domain: 'fields',
|
|
10069
|
+
severity: 'error',
|
|
10070
|
+
code: `missing-any-field:${result.missingRequiredAnyOf.join('|')}`,
|
|
10071
|
+
message: `At least one of "${alternatives}" is required for this chart.`,
|
|
10072
|
+
path: 'serviceConfig.query',
|
|
10073
|
+
});
|
|
9830
10074
|
}
|
|
9831
10075
|
}
|
|
9832
10076
|
function validateDatasource(persisted, cap, out) {
|
|
@@ -10061,32 +10305,39 @@ function datasourceToUi(persisted) {
|
|
|
10061
10305
|
* Fields domain
|
|
10062
10306
|
* ========================================================================== */
|
|
10063
10307
|
function fieldsFromQuery(query) {
|
|
10064
|
-
const
|
|
10065
|
-
const
|
|
10066
|
-
|
|
10067
|
-
const groupByRaw = query?.groupByProperties;
|
|
10068
|
-
const groupBy = Array.isArray(groupByRaw)
|
|
10069
|
-
? groupByRaw.map((k) => ({
|
|
10070
|
-
role: 'groupBy',
|
|
10071
|
-
propertyKey: toStringSafe(k),
|
|
10072
|
-
}))
|
|
10073
|
-
: groupByRaw
|
|
10074
|
-
? [{ role: 'groupBy', propertyKey: toStringSafe(groupByRaw) }]
|
|
10075
|
-
: [];
|
|
10076
|
-
const propsRaw = query?.selectedProperties ?? query?.properties;
|
|
10077
|
-
const properties = Array.isArray(propsRaw)
|
|
10078
|
-
? propsRaw.map((k) => ({
|
|
10079
|
-
role: 'property',
|
|
10080
|
-
propertyKey: toStringSafe(k),
|
|
10081
|
-
}))
|
|
10082
|
-
: [];
|
|
10083
|
-
const extrasRaw = query?.extraProperties;
|
|
10084
|
-
const extras = Array.isArray(extrasRaw)
|
|
10085
|
-
? extrasRaw.map((k) => ({
|
|
10086
|
-
role: 'extra',
|
|
10087
|
-
propertyKey: toStringSafe(k),
|
|
10088
|
-
}))
|
|
10308
|
+
const root = query && typeof query === 'object' ? query : {};
|
|
10309
|
+
const series = Array.isArray(root.series)
|
|
10310
|
+
? root.series.filter((entry) => !!entry && typeof entry === 'object')
|
|
10089
10311
|
: [];
|
|
10312
|
+
const sources = [root, ...series];
|
|
10313
|
+
const firstString = (field) => {
|
|
10314
|
+
for (const source of sources) {
|
|
10315
|
+
const candidate = toStringSafe(source[field]);
|
|
10316
|
+
if (candidate.trim())
|
|
10317
|
+
return candidate;
|
|
10318
|
+
}
|
|
10319
|
+
return '';
|
|
10320
|
+
};
|
|
10321
|
+
const assignments = (role, read) => {
|
|
10322
|
+
const keys = new Set();
|
|
10323
|
+
for (const source of sources) {
|
|
10324
|
+
const raw = read(source);
|
|
10325
|
+
const values = Array.isArray(raw) ? raw : raw == null ? [] : [raw];
|
|
10326
|
+
for (const entry of values) {
|
|
10327
|
+
const propertyKey = toStringSafe(entry).trim();
|
|
10328
|
+
if (propertyKey)
|
|
10329
|
+
keys.add(propertyKey);
|
|
10330
|
+
}
|
|
10331
|
+
}
|
|
10332
|
+
return [...keys].map((propertyKey) => ({ role, propertyKey }));
|
|
10333
|
+
};
|
|
10334
|
+
const value = firstString('valueProperty');
|
|
10335
|
+
const category = firstString('categoryProperty');
|
|
10336
|
+
const formulaValue = firstString('formula');
|
|
10337
|
+
const formula = formulaValue || undefined;
|
|
10338
|
+
const groupBy = assignments('groupBy', (source) => source['groupByProperties']);
|
|
10339
|
+
const properties = assignments('property', (source) => source['selectedProperties'] ?? source['properties']);
|
|
10340
|
+
const extras = assignments('extra', (source) => source['extraProperties']);
|
|
10090
10341
|
return {
|
|
10091
10342
|
value: value ? { role: 'value', propertyKey: value } : undefined,
|
|
10092
10343
|
groupBy,
|
|
@@ -10944,7 +11195,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
10944
11195
|
* Number, currency, and date formatting utilities.
|
|
10945
11196
|
*/
|
|
10946
11197
|
/**
|
|
10947
|
-
* Format
|
|
11198
|
+
* Format currency with the host pattern, falling back to legacy K/M/B/T
|
|
11199
|
+
* compaction when no canonical system pattern is available.
|
|
10948
11200
|
*/
|
|
10949
11201
|
function formatCurrency(value, config, langCode = 'en') {
|
|
10950
11202
|
if (value === null || value === undefined) {
|
|
@@ -10964,8 +11216,10 @@ function formatCurrency(value, config, langCode = 'en') {
|
|
|
10964
11216
|
};
|
|
10965
11217
|
const isNegative = numValue < 0;
|
|
10966
11218
|
const absValue = Math.abs(numValue);
|
|
11219
|
+
// System Settings is the global display contract. Per-chart decimals only
|
|
11220
|
+
// apply to the legacy compact formatter when no host pattern is available.
|
|
10967
11221
|
let newValue = hostCurrency.source === 'systemSettings'
|
|
10968
|
-
? formatBySystemCurrencyPattern(absValue, hostCurrency.format
|
|
11222
|
+
? formatBySystemCurrencyPattern(absValue, hostCurrency.format)
|
|
10969
11223
|
: '';
|
|
10970
11224
|
let suffix = '';
|
|
10971
11225
|
if (!newValue && absValue >= 1_000_000_000_000) {
|
|
@@ -11013,8 +11267,9 @@ function formatCurrency(value, config, langCode = 'en') {
|
|
|
11013
11267
|
*/
|
|
11014
11268
|
function getCurrencySuffix(langCode = 'en') {
|
|
11015
11269
|
const currency = getHostCurrencySettings();
|
|
11016
|
-
const
|
|
11017
|
-
|
|
11270
|
+
const useArabicUnit = langCode.trim().toLowerCase().startsWith('ar');
|
|
11271
|
+
const resolvedUnit = useArabicUnit ? currency.unit.ar : currency.unit.en;
|
|
11272
|
+
if (useArabicUnit) {
|
|
11018
11273
|
return ' ' + (resolvedUnit || DEFAULT_CURRENCY.unit.ar);
|
|
11019
11274
|
}
|
|
11020
11275
|
return ' ' + (resolvedUnit || DEFAULT_CURRENCY.unit.en);
|
|
@@ -11094,14 +11349,14 @@ function normalizeCurrencyValue(value, source) {
|
|
|
11094
11349
|
source,
|
|
11095
11350
|
};
|
|
11096
11351
|
}
|
|
11097
|
-
function formatBySystemCurrencyPattern(value, format
|
|
11352
|
+
function formatBySystemCurrencyPattern(value, format) {
|
|
11098
11353
|
const pattern = extractCurrencyPattern(format);
|
|
11099
11354
|
if (!pattern) {
|
|
11100
11355
|
return '';
|
|
11101
11356
|
}
|
|
11102
11357
|
const compactThousands = /,\s*K/i.test(pattern);
|
|
11103
11358
|
const normalizedValue = compactThousands ? value / 1000 : value;
|
|
11104
|
-
const decimals =
|
|
11359
|
+
const decimals = resolveCurrencyPatternFractionDigits(pattern);
|
|
11105
11360
|
const useGrouping = pattern.includes('#,') || /^N\d+$/i.test(pattern);
|
|
11106
11361
|
const formatted = new Intl.NumberFormat('en-US', {
|
|
11107
11362
|
useGrouping,
|
|
@@ -21087,7 +21342,7 @@ class ActionService {
|
|
|
21087
21342
|
dialogConfig?.clientConfig?.title?.['ar'] ||
|
|
21088
21343
|
'';
|
|
21089
21344
|
// Dynamically import DashboardDialogComponent to avoid circular dependency
|
|
21090
|
-
import('./masterteam-dashboard-builder-dashboard-dialog.component-
|
|
21345
|
+
import('./masterteam-dashboard-builder-dashboard-dialog.component-DKzJqB0X.mjs').then(({ DashboardDialogComponent }) => {
|
|
21091
21346
|
// Open dialog using ModalService
|
|
21092
21347
|
this.modalService.openModal(DashboardDialogComponent, 'dialog', {
|
|
21093
21348
|
header: title,
|
|
@@ -21561,128 +21816,128 @@ class CardFilterComponent {
|
|
|
21561
21816
|
}
|
|
21562
21817
|
}
|
|
21563
21818
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CardFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
21564
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: CardFilterComponent, isStandalone: true, selector: "mt-card-filter", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, dashboardId: { classPropertyName: "dashboardId", publicName: "dashboardId", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { filterChange: "filterChange" }, ngImport: i0, template: `
|
|
21565
|
-
<div class="card-filter" *transloco="let t; prefix: 'dashboard'">
|
|
21566
|
-
@switch (filterType()) {
|
|
21567
|
-
@case ('select') {
|
|
21568
|
-
<select
|
|
21569
|
-
class="filter-select"
|
|
21570
|
-
[(ngModel)]="selectedValue"
|
|
21571
|
-
(ngModelChange)="onFilterChange($event)"
|
|
21572
|
-
>
|
|
21573
|
-
@if (placeholder()) {
|
|
21574
|
-
<option [value]="null" disabled>{{ placeholder() }}</option>
|
|
21575
|
-
}
|
|
21576
|
-
@for (option of options(); track option.key) {
|
|
21577
|
-
<option [value]="option.value">
|
|
21578
|
-
{{
|
|
21579
|
-
option.label[langCode()] || option.label['en'] || option.key
|
|
21580
|
-
}}
|
|
21581
|
-
</option>
|
|
21582
|
-
}
|
|
21583
|
-
</select>
|
|
21584
|
-
}
|
|
21585
|
-
@case ('multiSelect') {
|
|
21586
|
-
<div class="multi-select-container">
|
|
21587
|
-
<!-- Simplified multi-select -->
|
|
21588
|
-
<select
|
|
21589
|
-
class="filter-select"
|
|
21590
|
-
multiple
|
|
21591
|
-
[(ngModel)]="selectedValues"
|
|
21592
|
-
(ngModelChange)="onMultiFilterChange($event)"
|
|
21593
|
-
>
|
|
21594
|
-
@for (option of options(); track option.key) {
|
|
21595
|
-
<option [value]="option.value">
|
|
21596
|
-
{{
|
|
21597
|
-
option.label[langCode()] || option.label['en'] || option.key
|
|
21598
|
-
}}
|
|
21599
|
-
</option>
|
|
21600
|
-
}
|
|
21601
|
-
</select>
|
|
21602
|
-
</div>
|
|
21603
|
-
}
|
|
21604
|
-
@case ('dateRange') {
|
|
21605
|
-
<div class="date-range-container">
|
|
21606
|
-
<input
|
|
21607
|
-
type="date"
|
|
21608
|
-
class="filter-date"
|
|
21609
|
-
[(ngModel)]="startDate"
|
|
21610
|
-
(ngModelChange)="onDateChange()"
|
|
21611
|
-
/>
|
|
21612
|
-
<span class="date-separator">-</span>
|
|
21613
|
-
<input
|
|
21614
|
-
type="date"
|
|
21615
|
-
class="filter-date"
|
|
21616
|
-
[(ngModel)]="endDate"
|
|
21617
|
-
(ngModelChange)="onDateChange()"
|
|
21618
|
-
/>
|
|
21619
|
-
</div>
|
|
21620
|
-
}
|
|
21621
|
-
}
|
|
21622
|
-
</div>
|
|
21819
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: CardFilterComponent, isStandalone: true, selector: "mt-card-filter", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, dashboardId: { classPropertyName: "dashboardId", publicName: "dashboardId", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { filterChange: "filterChange" }, ngImport: i0, template: `
|
|
21820
|
+
<div class="card-filter" *transloco="let t; prefix: 'dashboard'">
|
|
21821
|
+
@switch (filterType()) {
|
|
21822
|
+
@case ('select') {
|
|
21823
|
+
<select
|
|
21824
|
+
class="filter-select"
|
|
21825
|
+
[(ngModel)]="selectedValue"
|
|
21826
|
+
(ngModelChange)="onFilterChange($event)"
|
|
21827
|
+
>
|
|
21828
|
+
@if (placeholder()) {
|
|
21829
|
+
<option [value]="null" disabled>{{ placeholder() }}</option>
|
|
21830
|
+
}
|
|
21831
|
+
@for (option of options(); track option.key) {
|
|
21832
|
+
<option [value]="option.value">
|
|
21833
|
+
{{
|
|
21834
|
+
option.label[langCode()] || option.label['en'] || option.key
|
|
21835
|
+
}}
|
|
21836
|
+
</option>
|
|
21837
|
+
}
|
|
21838
|
+
</select>
|
|
21839
|
+
}
|
|
21840
|
+
@case ('multiSelect') {
|
|
21841
|
+
<div class="multi-select-container">
|
|
21842
|
+
<!-- Simplified multi-select -->
|
|
21843
|
+
<select
|
|
21844
|
+
class="filter-select"
|
|
21845
|
+
multiple
|
|
21846
|
+
[(ngModel)]="selectedValues"
|
|
21847
|
+
(ngModelChange)="onMultiFilterChange($event)"
|
|
21848
|
+
>
|
|
21849
|
+
@for (option of options(); track option.key) {
|
|
21850
|
+
<option [value]="option.value">
|
|
21851
|
+
{{
|
|
21852
|
+
option.label[langCode()] || option.label['en'] || option.key
|
|
21853
|
+
}}
|
|
21854
|
+
</option>
|
|
21855
|
+
}
|
|
21856
|
+
</select>
|
|
21857
|
+
</div>
|
|
21858
|
+
}
|
|
21859
|
+
@case ('dateRange') {
|
|
21860
|
+
<div class="date-range-container">
|
|
21861
|
+
<input
|
|
21862
|
+
type="date"
|
|
21863
|
+
class="filter-date"
|
|
21864
|
+
[(ngModel)]="startDate"
|
|
21865
|
+
(ngModelChange)="onDateChange()"
|
|
21866
|
+
/>
|
|
21867
|
+
<span class="date-separator">-</span>
|
|
21868
|
+
<input
|
|
21869
|
+
type="date"
|
|
21870
|
+
class="filter-date"
|
|
21871
|
+
[(ngModel)]="endDate"
|
|
21872
|
+
(ngModelChange)="onDateChange()"
|
|
21873
|
+
/>
|
|
21874
|
+
</div>
|
|
21875
|
+
}
|
|
21876
|
+
}
|
|
21877
|
+
</div>
|
|
21623
21878
|
`, isInline: true, styles: [".card-filter{display:flex;align-items:center;gap:.5rem}.filter-select{padding:.375rem .75rem;border:1px solid #e0e0e0;border-radius:.375rem;font-size:.875rem;background:#fff;color:#333;min-width:120px;cursor:pointer;transition:border-color .15s ease}.filter-select:focus{outline:none;border-color:#4caf50}.filter-select:hover{border-color:#bbb}.multi-select-container{position:relative}.date-range-container{display:flex;align-items:center;gap:.25rem}.filter-date{padding:.375rem .5rem;border:1px solid #e0e0e0;border-radius:.375rem;font-size:.875rem;background:#fff;color:#333}.filter-date:focus{outline:none;border-color:#4caf50}.date-separator{color:#999;font-size:.875rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.SelectMultipleControlValueAccessor, selector: "select[multiple][formControlName],select[multiple][formControl],select[multiple][ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
21624
21879
|
}
|
|
21625
21880
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CardFilterComponent, decorators: [{
|
|
21626
21881
|
type: Component,
|
|
21627
|
-
args: [{ selector: 'mt-card-filter', standalone: true, imports: [CommonModule, FormsModule, TranslocoDirective], template: `
|
|
21628
|
-
<div class="card-filter" *transloco="let t; prefix: 'dashboard'">
|
|
21629
|
-
@switch (filterType()) {
|
|
21630
|
-
@case ('select') {
|
|
21631
|
-
<select
|
|
21632
|
-
class="filter-select"
|
|
21633
|
-
[(ngModel)]="selectedValue"
|
|
21634
|
-
(ngModelChange)="onFilterChange($event)"
|
|
21635
|
-
>
|
|
21636
|
-
@if (placeholder()) {
|
|
21637
|
-
<option [value]="null" disabled>{{ placeholder() }}</option>
|
|
21638
|
-
}
|
|
21639
|
-
@for (option of options(); track option.key) {
|
|
21640
|
-
<option [value]="option.value">
|
|
21641
|
-
{{
|
|
21642
|
-
option.label[langCode()] || option.label['en'] || option.key
|
|
21643
|
-
}}
|
|
21644
|
-
</option>
|
|
21645
|
-
}
|
|
21646
|
-
</select>
|
|
21647
|
-
}
|
|
21648
|
-
@case ('multiSelect') {
|
|
21649
|
-
<div class="multi-select-container">
|
|
21650
|
-
<!-- Simplified multi-select -->
|
|
21651
|
-
<select
|
|
21652
|
-
class="filter-select"
|
|
21653
|
-
multiple
|
|
21654
|
-
[(ngModel)]="selectedValues"
|
|
21655
|
-
(ngModelChange)="onMultiFilterChange($event)"
|
|
21656
|
-
>
|
|
21657
|
-
@for (option of options(); track option.key) {
|
|
21658
|
-
<option [value]="option.value">
|
|
21659
|
-
{{
|
|
21660
|
-
option.label[langCode()] || option.label['en'] || option.key
|
|
21661
|
-
}}
|
|
21662
|
-
</option>
|
|
21663
|
-
}
|
|
21664
|
-
</select>
|
|
21665
|
-
</div>
|
|
21666
|
-
}
|
|
21667
|
-
@case ('dateRange') {
|
|
21668
|
-
<div class="date-range-container">
|
|
21669
|
-
<input
|
|
21670
|
-
type="date"
|
|
21671
|
-
class="filter-date"
|
|
21672
|
-
[(ngModel)]="startDate"
|
|
21673
|
-
(ngModelChange)="onDateChange()"
|
|
21674
|
-
/>
|
|
21675
|
-
<span class="date-separator">-</span>
|
|
21676
|
-
<input
|
|
21677
|
-
type="date"
|
|
21678
|
-
class="filter-date"
|
|
21679
|
-
[(ngModel)]="endDate"
|
|
21680
|
-
(ngModelChange)="onDateChange()"
|
|
21681
|
-
/>
|
|
21682
|
-
</div>
|
|
21683
|
-
}
|
|
21684
|
-
}
|
|
21685
|
-
</div>
|
|
21882
|
+
args: [{ selector: 'mt-card-filter', standalone: true, imports: [CommonModule, FormsModule, TranslocoDirective], template: `
|
|
21883
|
+
<div class="card-filter" *transloco="let t; prefix: 'dashboard'">
|
|
21884
|
+
@switch (filterType()) {
|
|
21885
|
+
@case ('select') {
|
|
21886
|
+
<select
|
|
21887
|
+
class="filter-select"
|
|
21888
|
+
[(ngModel)]="selectedValue"
|
|
21889
|
+
(ngModelChange)="onFilterChange($event)"
|
|
21890
|
+
>
|
|
21891
|
+
@if (placeholder()) {
|
|
21892
|
+
<option [value]="null" disabled>{{ placeholder() }}</option>
|
|
21893
|
+
}
|
|
21894
|
+
@for (option of options(); track option.key) {
|
|
21895
|
+
<option [value]="option.value">
|
|
21896
|
+
{{
|
|
21897
|
+
option.label[langCode()] || option.label['en'] || option.key
|
|
21898
|
+
}}
|
|
21899
|
+
</option>
|
|
21900
|
+
}
|
|
21901
|
+
</select>
|
|
21902
|
+
}
|
|
21903
|
+
@case ('multiSelect') {
|
|
21904
|
+
<div class="multi-select-container">
|
|
21905
|
+
<!-- Simplified multi-select -->
|
|
21906
|
+
<select
|
|
21907
|
+
class="filter-select"
|
|
21908
|
+
multiple
|
|
21909
|
+
[(ngModel)]="selectedValues"
|
|
21910
|
+
(ngModelChange)="onMultiFilterChange($event)"
|
|
21911
|
+
>
|
|
21912
|
+
@for (option of options(); track option.key) {
|
|
21913
|
+
<option [value]="option.value">
|
|
21914
|
+
{{
|
|
21915
|
+
option.label[langCode()] || option.label['en'] || option.key
|
|
21916
|
+
}}
|
|
21917
|
+
</option>
|
|
21918
|
+
}
|
|
21919
|
+
</select>
|
|
21920
|
+
</div>
|
|
21921
|
+
}
|
|
21922
|
+
@case ('dateRange') {
|
|
21923
|
+
<div class="date-range-container">
|
|
21924
|
+
<input
|
|
21925
|
+
type="date"
|
|
21926
|
+
class="filter-date"
|
|
21927
|
+
[(ngModel)]="startDate"
|
|
21928
|
+
(ngModelChange)="onDateChange()"
|
|
21929
|
+
/>
|
|
21930
|
+
<span class="date-separator">-</span>
|
|
21931
|
+
<input
|
|
21932
|
+
type="date"
|
|
21933
|
+
class="filter-date"
|
|
21934
|
+
[(ngModel)]="endDate"
|
|
21935
|
+
(ngModelChange)="onDateChange()"
|
|
21936
|
+
/>
|
|
21937
|
+
</div>
|
|
21938
|
+
}
|
|
21939
|
+
}
|
|
21940
|
+
</div>
|
|
21686
21941
|
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".card-filter{display:flex;align-items:center;gap:.5rem}.filter-select{padding:.375rem .75rem;border:1px solid #e0e0e0;border-radius:.375rem;font-size:.875rem;background:#fff;color:#333;min-width:120px;cursor:pointer;transition:border-color .15s ease}.filter-select:focus{outline:none;border-color:#4caf50}.filter-select:hover{border-color:#bbb}.multi-select-container{position:relative}.date-range-container{display:flex;align-items:center;gap:.25rem}.filter-date{padding:.375rem .5rem;border:1px solid #e0e0e0;border-radius:.375rem;font-size:.875rem;background:#fff;color:#333}.filter-date:focus{outline:none;border-color:#4caf50}.date-separator{color:#999;font-size:.875rem}\n"] }]
|
|
21687
21942
|
}], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], dashboardId: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardId", required: false }] }], filterChange: [{ type: i0.Output, args: ["filterChange"] }] } });
|
|
21688
21943
|
|
|
@@ -23039,30 +23294,30 @@ class CardInfoComponent {
|
|
|
23039
23294
|
return typeof info.value === 'string' ? info.value : '';
|
|
23040
23295
|
}, ...(ngDevMode ? [{ debugName: "tooltipContent" }] : /* istanbul ignore next */ []));
|
|
23041
23296
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CardInfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
23042
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: CardInfoComponent, isStandalone: true, selector: "mt-card-info", inputs: { cardInfo: { classPropertyName: "cardInfo", publicName: "cardInfo", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
23043
|
-
@if (showInfo()) {
|
|
23044
|
-
<span
|
|
23045
|
-
class="card-info-icon"
|
|
23046
|
-
[mtTooltip]="tooltipContent()"
|
|
23047
|
-
tooltipPosition="bottom"
|
|
23048
|
-
>
|
|
23049
|
-
<i class="pi pi-info-circle"></i>
|
|
23050
|
-
</span>
|
|
23051
|
-
}
|
|
23297
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: CardInfoComponent, isStandalone: true, selector: "mt-card-info", inputs: { cardInfo: { classPropertyName: "cardInfo", publicName: "cardInfo", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
23298
|
+
@if (showInfo()) {
|
|
23299
|
+
<span
|
|
23300
|
+
class="card-info-icon"
|
|
23301
|
+
[mtTooltip]="tooltipContent()"
|
|
23302
|
+
tooltipPosition="bottom"
|
|
23303
|
+
>
|
|
23304
|
+
<i class="pi pi-info-circle"></i>
|
|
23305
|
+
</span>
|
|
23306
|
+
}
|
|
23052
23307
|
`, isInline: true, styles: [".card-info-icon{display:inline-flex;align-items:center;justify-content:center;cursor:help;color:#666;font-size:1rem;transition:color .15s ease}.card-info-icon:hover{color:#333}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: Tooltip$1, selector: "[mtTooltip]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
23053
23308
|
}
|
|
23054
23309
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CardInfoComponent, decorators: [{
|
|
23055
23310
|
type: Component,
|
|
23056
|
-
args: [{ selector: 'mt-card-info', standalone: true, imports: [CommonModule, Tooltip$1], template: `
|
|
23057
|
-
@if (showInfo()) {
|
|
23058
|
-
<span
|
|
23059
|
-
class="card-info-icon"
|
|
23060
|
-
[mtTooltip]="tooltipContent()"
|
|
23061
|
-
tooltipPosition="bottom"
|
|
23062
|
-
>
|
|
23063
|
-
<i class="pi pi-info-circle"></i>
|
|
23064
|
-
</span>
|
|
23065
|
-
}
|
|
23311
|
+
args: [{ selector: 'mt-card-info', standalone: true, imports: [CommonModule, Tooltip$1], template: `
|
|
23312
|
+
@if (showInfo()) {
|
|
23313
|
+
<span
|
|
23314
|
+
class="card-info-icon"
|
|
23315
|
+
[mtTooltip]="tooltipContent()"
|
|
23316
|
+
tooltipPosition="bottom"
|
|
23317
|
+
>
|
|
23318
|
+
<i class="pi pi-info-circle"></i>
|
|
23319
|
+
</span>
|
|
23320
|
+
}
|
|
23066
23321
|
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".card-info-icon{display:inline-flex;align-items:center;justify-content:center;cursor:help;color:#666;font-size:1rem;transition:color .15s ease}.card-info-icon:hover{color:#333}\n"] }]
|
|
23067
23322
|
}], propDecorators: { cardInfo: [{ type: i0.Input, args: [{ isSignal: true, alias: "cardInfo", required: false }] }] } });
|
|
23068
23323
|
|
|
@@ -25746,10 +26001,6 @@ function fieldIdentity(prop, fallbackKey) {
|
|
|
25746
26001
|
.filter(Boolean)
|
|
25747
26002
|
.join('|');
|
|
25748
26003
|
}
|
|
25749
|
-
function matchesAnyIdentity(prop, fallbackKey, candidates) {
|
|
25750
|
-
const identity = fieldIdentity(prop, fallbackKey);
|
|
25751
|
-
return candidates.some((candidate) => identity.includes(normalizeIdentity(candidate)));
|
|
25752
|
-
}
|
|
25753
26004
|
function isIdentityField(prop, fallbackKey) {
|
|
25754
26005
|
const identities = [
|
|
25755
26006
|
normalizeIdentity(fallbackKey),
|
|
@@ -26275,23 +26526,25 @@ class TableCardComponent {
|
|
|
26275
26526
|
this.labels.set([]);
|
|
26276
26527
|
return;
|
|
26277
26528
|
}
|
|
26529
|
+
const query = (config?.serviceConfig?.query ??
|
|
26530
|
+
{});
|
|
26531
|
+
const isCanonicalQuery = this.isCanonicalPhaseGateQuery(query);
|
|
26278
26532
|
const sampleItem = this.findLargestRow(values);
|
|
26279
26533
|
const fieldKeys = Object.keys(sampleItem);
|
|
26280
|
-
const phaseFields = this.resolvePhaseGateFields(values);
|
|
26281
|
-
const
|
|
26282
|
-
.filter((value) => !!value)
|
|
26283
|
-
.map((key) => key.toLowerCase()));
|
|
26284
|
-
const configuredBaseKeys = this.resolveConfiguredTableKeys(sampleItem, config);
|
|
26534
|
+
const phaseFields = this.resolvePhaseGateFields(values, query, isCanonicalQuery);
|
|
26535
|
+
const configuredBaseKeys = this.resolveConfiguredTableKeys(values, query, isCanonicalQuery);
|
|
26285
26536
|
const baseKeys = (configuredBaseKeys ?? fieldKeys).filter((key) => {
|
|
26286
|
-
const prop =
|
|
26287
|
-
if (
|
|
26537
|
+
const prop = this.findFirstFieldValue(values, key);
|
|
26538
|
+
if (this.isConfiguredPhaseMetadataField(prop, key, phaseFields)) {
|
|
26288
26539
|
return false;
|
|
26289
|
-
|
|
26540
|
+
}
|
|
26541
|
+
if (!isCanonicalQuery && this.isLegacyPhaseGateMetaField(prop, key)) {
|
|
26290
26542
|
return false;
|
|
26543
|
+
}
|
|
26291
26544
|
return true;
|
|
26292
26545
|
});
|
|
26293
26546
|
const baseColumns = baseKeys.map((key, index) => {
|
|
26294
|
-
const prop =
|
|
26547
|
+
const prop = this.findFirstFieldValue(values, key);
|
|
26295
26548
|
const overrideLabel = overrideLabels?.[key.toLowerCase()]?.[languageCode];
|
|
26296
26549
|
return {
|
|
26297
26550
|
key: !isIdentityField(prop, key) && prop?.normalizedKey
|
|
@@ -26308,24 +26561,25 @@ class TableCardComponent {
|
|
|
26308
26561
|
};
|
|
26309
26562
|
});
|
|
26310
26563
|
const phaseOrder = new Map();
|
|
26311
|
-
values.forEach((item,
|
|
26564
|
+
values.forEach((item, encounterOrder) => {
|
|
26312
26565
|
const row = getObjectKeysInLowerCase(item);
|
|
26313
|
-
const phaseValue = phaseFields.phaseName
|
|
26314
|
-
|
|
26315
|
-
: null;
|
|
26316
|
-
const phaseIdValue = phaseFields.phaseId
|
|
26317
|
-
? row[phaseFields.phaseId.toLowerCase()]
|
|
26318
|
-
: null;
|
|
26566
|
+
const phaseValue = this.getPhaseGateFieldValue(row, phaseFields.phaseName);
|
|
26567
|
+
const phaseIdValue = this.getPhaseGateFieldValue(row, phaseFields.phaseId);
|
|
26319
26568
|
const phaseLabel = displayEntityValue(phaseValue) ||
|
|
26320
26569
|
displayEntityValue(phaseIdValue) ||
|
|
26321
|
-
|
|
26322
|
-
const
|
|
26570
|
+
'Phase';
|
|
26571
|
+
const phaseIdentity = phaseFields.phaseId ? phaseIdValue : phaseValue;
|
|
26572
|
+
const phaseKey = this.toPhaseColumnKey(phaseIdentity, phaseLabel);
|
|
26323
26573
|
if (!phaseOrder.has(phaseKey)) {
|
|
26324
|
-
phaseOrder.set(phaseKey, {
|
|
26574
|
+
phaseOrder.set(phaseKey, {
|
|
26575
|
+
label: phaseLabel,
|
|
26576
|
+
orderValue: this.getPhaseGateFieldValue(row, phaseFields.phaseOrder),
|
|
26577
|
+
encounterOrder,
|
|
26578
|
+
});
|
|
26325
26579
|
}
|
|
26326
26580
|
});
|
|
26327
26581
|
const phaseColumns = Array.from(phaseOrder.entries())
|
|
26328
|
-
.sort((a, b) => a
|
|
26582
|
+
.sort((a, b) => this.comparePhaseGateOrder(a, b, phaseFields.phaseOrder !== null))
|
|
26329
26583
|
.map(([key, value]) => ({
|
|
26330
26584
|
key,
|
|
26331
26585
|
label: value.label,
|
|
@@ -26334,33 +26588,41 @@ class TableCardComponent {
|
|
|
26334
26588
|
}));
|
|
26335
26589
|
const rowMap = new Map();
|
|
26336
26590
|
const statusLabels = new Map();
|
|
26337
|
-
values.forEach((item
|
|
26591
|
+
values.forEach((item) => {
|
|
26338
26592
|
const row = getObjectKeysInLowerCase(item);
|
|
26339
|
-
const groupKey =
|
|
26593
|
+
const groupKey = isCanonicalQuery
|
|
26594
|
+
? this.getCanonicalPhaseGateGroupKey(row, phaseFields.rowIdentity)
|
|
26595
|
+
: this.getLegacyPhaseGateGroupKey(row, baseColumns);
|
|
26340
26596
|
let rowData = rowMap.get(groupKey);
|
|
26341
26597
|
if (!rowData) {
|
|
26342
26598
|
rowData = { _index: rowMap.size, _original: item };
|
|
26343
26599
|
baseColumns.forEach((col) => {
|
|
26344
|
-
if (col.keyPure &&
|
|
26600
|
+
if (col.keyPure &&
|
|
26601
|
+
Object.prototype.hasOwnProperty.call(row, col.keyPure)) {
|
|
26345
26602
|
rowData[col.key] = row[col.keyPure];
|
|
26346
26603
|
}
|
|
26347
26604
|
});
|
|
26348
|
-
|
|
26349
|
-
|
|
26350
|
-
|
|
26605
|
+
if (isCanonicalQuery) {
|
|
26606
|
+
const identityValue = this.getPhaseGateFieldValue(row, phaseFields.rowIdentity);
|
|
26607
|
+
if (identityValue !== null && identityValue !== undefined) {
|
|
26608
|
+
rowData['Id'] = identityValue;
|
|
26609
|
+
}
|
|
26610
|
+
}
|
|
26611
|
+
else {
|
|
26612
|
+
const idKey = Object.keys(row).find((key) => isIdentityField(row[key], key));
|
|
26613
|
+
if (idKey) {
|
|
26614
|
+
rowData['Id'] = row[idKey];
|
|
26615
|
+
}
|
|
26351
26616
|
}
|
|
26352
26617
|
rowMap.set(groupKey, rowData);
|
|
26353
26618
|
}
|
|
26354
|
-
const phaseValue = phaseFields.phaseName
|
|
26355
|
-
|
|
26356
|
-
: null;
|
|
26357
|
-
const phaseIdValue = phaseFields.phaseId
|
|
26358
|
-
? row[phaseFields.phaseId.toLowerCase()]
|
|
26359
|
-
: null;
|
|
26619
|
+
const phaseValue = this.getPhaseGateFieldValue(row, phaseFields.phaseName);
|
|
26620
|
+
const phaseIdValue = this.getPhaseGateFieldValue(row, phaseFields.phaseId);
|
|
26360
26621
|
const phaseLabel = displayEntityValue(phaseValue) ||
|
|
26361
26622
|
displayEntityValue(phaseIdValue) ||
|
|
26362
|
-
|
|
26363
|
-
const
|
|
26623
|
+
'Phase';
|
|
26624
|
+
const phaseIdentity = phaseFields.phaseId ? phaseIdValue : phaseValue;
|
|
26625
|
+
const phaseColumnKey = this.toPhaseColumnKey(phaseIdentity, phaseLabel);
|
|
26364
26626
|
const cell = this.buildPhaseGateCell(row, phaseFields, item, phaseLabel);
|
|
26365
26627
|
if (cell.statusLabel) {
|
|
26366
26628
|
statusLabels.set(cell.statusLabel.toLowerCase(), {
|
|
@@ -26385,29 +26647,32 @@ class TableCardComponent {
|
|
|
26385
26647
|
}
|
|
26386
26648
|
return Array.isArray(data?.values) ? data.values : [];
|
|
26387
26649
|
}
|
|
26388
|
-
resolveConfiguredTableKeys(
|
|
26389
|
-
const
|
|
26390
|
-
|
|
26391
|
-
Object.prototype.hasOwnProperty.call(query, '
|
|
26392
|
-
|
|
26393
|
-
|
|
26394
|
-
|
|
26395
|
-
|
|
26650
|
+
resolveConfiguredTableKeys(values, query, isCanonicalQuery) {
|
|
26651
|
+
const hasConfiguredList = isCanonicalQuery
|
|
26652
|
+
? Object.prototype.hasOwnProperty.call(query, 'baseProperties')
|
|
26653
|
+
: Object.prototype.hasOwnProperty.call(query, 'selectedProperties') ||
|
|
26654
|
+
Object.prototype.hasOwnProperty.call(query, 'properties');
|
|
26655
|
+
const configured = isCanonicalQuery
|
|
26656
|
+
? this.toStringArray(query['baseProperties'])
|
|
26657
|
+
: [
|
|
26658
|
+
...this.toStringArray(query['properties']),
|
|
26659
|
+
...this.toStringArray(query['selectedProperties']),
|
|
26660
|
+
];
|
|
26396
26661
|
if (!configured.length)
|
|
26397
26662
|
return hasConfiguredList ? [] : null;
|
|
26398
|
-
const
|
|
26399
|
-
|
|
26400
|
-
|
|
26401
|
-
|
|
26402
|
-
|
|
26403
|
-
|
|
26404
|
-
|
|
26405
|
-
|
|
26406
|
-
|
|
26663
|
+
const seen = new Set();
|
|
26664
|
+
const resolved = [];
|
|
26665
|
+
configured.forEach((configuredKey) => {
|
|
26666
|
+
const responseKey = this.resolvePhaseGateFieldKey(values, configuredKey);
|
|
26667
|
+
if (!responseKey)
|
|
26668
|
+
return;
|
|
26669
|
+
const normalized = normalizePhaseGatePropertyIdentity(responseKey);
|
|
26670
|
+
if (seen.has(normalized))
|
|
26671
|
+
return;
|
|
26672
|
+
seen.add(normalized);
|
|
26673
|
+
resolved.push(responseKey.toLowerCase());
|
|
26407
26674
|
});
|
|
26408
|
-
return
|
|
26409
|
-
.map((key) => keyByIdentity.get(normalizeIdentity(key)))
|
|
26410
|
-
.filter((key) => !!key)));
|
|
26675
|
+
return resolved;
|
|
26411
26676
|
}
|
|
26412
26677
|
toStringArray(value) {
|
|
26413
26678
|
if (!Array.isArray(value))
|
|
@@ -26424,120 +26689,267 @@ class TableCardComponent {
|
|
|
26424
26689
|
});
|
|
26425
26690
|
return sample;
|
|
26426
26691
|
}
|
|
26427
|
-
|
|
26692
|
+
isCanonicalPhaseGateQuery(query) {
|
|
26693
|
+
return [
|
|
26694
|
+
query.rowIdentityProperty,
|
|
26695
|
+
query.phaseNameProperty,
|
|
26696
|
+
query.phaseStatusProperty,
|
|
26697
|
+
].every((value) => typeof value === 'string' && value.trim().length > 0);
|
|
26698
|
+
}
|
|
26699
|
+
resolvePhaseGateFields(values, query, isCanonicalQuery) {
|
|
26700
|
+
const configuredFields = {
|
|
26701
|
+
rowIdentity: this.readPhaseGateProperty(query.rowIdentityProperty),
|
|
26702
|
+
phaseName: this.readPhaseGateProperty(query.phaseNameProperty),
|
|
26703
|
+
phaseId: this.readPhaseGateProperty(query.phaseIdProperty),
|
|
26704
|
+
phaseOrder: this.readPhaseGateProperty(query.phaseOrderProperty),
|
|
26705
|
+
isCurrent: this.readPhaseGateProperty(query.phaseIsCurrentProperty),
|
|
26706
|
+
isCompleted: this.readPhaseGateProperty(query.phaseIsCompletedProperty),
|
|
26707
|
+
allItemsCompleted: this.readPhaseGateProperty(query.phaseAllItemsCompletedProperty),
|
|
26708
|
+
status: this.readPhaseGateProperty(query.phaseStatusProperty),
|
|
26709
|
+
percentage: this.readPhaseGateProperty(query.phaseProgressProperty),
|
|
26710
|
+
};
|
|
26711
|
+
if (isCanonicalQuery)
|
|
26712
|
+
return configuredFields;
|
|
26713
|
+
// A partially migrated dashboard remains on the legacy path, but any
|
|
26714
|
+
// explicit semantic role still wins and is resolved exactly.
|
|
26715
|
+
const lookupProperty = this.readPhaseGateProperty(query['lookupProperty']);
|
|
26428
26716
|
const fields = {
|
|
26429
|
-
|
|
26430
|
-
|
|
26431
|
-
isCurrent: null,
|
|
26432
|
-
isCompleted: null,
|
|
26433
|
-
allItemsCompleted: null,
|
|
26434
|
-
status: null,
|
|
26435
|
-
percentage: null,
|
|
26717
|
+
...configuredFields,
|
|
26718
|
+
status: configuredFields.status || lookupProperty,
|
|
26436
26719
|
};
|
|
26437
|
-
|
|
26438
|
-
|
|
26439
|
-
|
|
26440
|
-
|
|
26441
|
-
|
|
26442
|
-
|
|
26443
|
-
|
|
26444
|
-
|
|
26445
|
-
|
|
26446
|
-
|
|
26447
|
-
|
|
26448
|
-
|
|
26449
|
-
|
|
26450
|
-
|
|
26451
|
-
|
|
26452
|
-
|
|
26453
|
-
|
|
26454
|
-
|
|
26455
|
-
|
|
26456
|
-
|
|
26457
|
-
|
|
26458
|
-
|
|
26459
|
-
|
|
26460
|
-
|
|
26461
|
-
|
|
26462
|
-
|
|
26463
|
-
|
|
26464
|
-
|
|
26465
|
-
|
|
26466
|
-
|
|
26467
|
-
|
|
26468
|
-
|
|
26469
|
-
|
|
26470
|
-
|
|
26471
|
-
|
|
26472
|
-
|
|
26473
|
-
|
|
26474
|
-
|
|
26475
|
-
|
|
26476
|
-
|
|
26477
|
-
|
|
26478
|
-
|
|
26479
|
-
|
|
26480
|
-
|
|
26481
|
-
|
|
26482
|
-
|
|
26720
|
+
fields.phaseName ??= this.resolveLegacyPhaseGateAlias(values, [
|
|
26721
|
+
'phase_name',
|
|
26722
|
+
'phasegate_name',
|
|
26723
|
+
]);
|
|
26724
|
+
fields.phaseId ??= this.resolveLegacyPhaseGateAlias(values, [
|
|
26725
|
+
'phase_schemagateid',
|
|
26726
|
+
'phasegate_id',
|
|
26727
|
+
'phasegateid',
|
|
26728
|
+
]);
|
|
26729
|
+
fields.phaseOrder ??= this.resolveLegacyPhaseGateAlias(values, [
|
|
26730
|
+
'phase_order',
|
|
26731
|
+
'phasegate_order',
|
|
26732
|
+
'phase_sequence',
|
|
26733
|
+
]);
|
|
26734
|
+
fields.isCurrent ??= this.resolveLegacyPhaseGateAlias(values, [
|
|
26735
|
+
'phase_iscurrent',
|
|
26736
|
+
'phasegate_iscurrent',
|
|
26737
|
+
'iscurrentphase',
|
|
26738
|
+
]);
|
|
26739
|
+
fields.isCompleted ??= this.resolveLegacyPhaseGateAlias(values, [
|
|
26740
|
+
'phase_iscompleted',
|
|
26741
|
+
'phasegate_iscompleted',
|
|
26742
|
+
'iscompletedphase',
|
|
26743
|
+
]);
|
|
26744
|
+
fields.allItemsCompleted ??= this.resolveLegacyPhaseGateAlias(values, [
|
|
26745
|
+
'phase_all_items_completed',
|
|
26746
|
+
'phasegate_all_items_completed',
|
|
26747
|
+
'allitemscompleted',
|
|
26748
|
+
]);
|
|
26749
|
+
fields.status ??= this.resolveLegacyPhaseGateAlias(values, [
|
|
26750
|
+
'phase_status',
|
|
26751
|
+
'phasegate_status',
|
|
26752
|
+
'phase_request_status',
|
|
26753
|
+
'phasegate_request_status',
|
|
26754
|
+
]);
|
|
26755
|
+
fields.percentage ??= this.resolveLegacyPhaseGateAlias(values, [
|
|
26756
|
+
'phase_percentage',
|
|
26757
|
+
'phasegate_percentage',
|
|
26758
|
+
'phase_progress',
|
|
26759
|
+
'phasegate_progress',
|
|
26760
|
+
]);
|
|
26761
|
+
fields.status ??= this.resolveLegacyFieldByViewType(values, [
|
|
26762
|
+
'status',
|
|
26763
|
+
'requeststatus',
|
|
26764
|
+
]);
|
|
26765
|
+
fields.percentage ??= this.resolveLegacyFieldByViewType(values, [
|
|
26766
|
+
'percentage',
|
|
26767
|
+
'slider',
|
|
26768
|
+
]);
|
|
26483
26769
|
return fields;
|
|
26484
26770
|
}
|
|
26485
26771
|
findFirstFieldValue(values, key) {
|
|
26486
26772
|
const normalizedKey = key.toLowerCase();
|
|
26487
26773
|
for (const item of values) {
|
|
26488
26774
|
const row = getObjectKeysInLowerCase(item);
|
|
26489
|
-
if (row
|
|
26775
|
+
if (Object.prototype.hasOwnProperty.call(row, normalizedKey)) {
|
|
26490
26776
|
return row[normalizedKey];
|
|
26777
|
+
}
|
|
26778
|
+
}
|
|
26779
|
+
return null;
|
|
26780
|
+
}
|
|
26781
|
+
readPhaseGateProperty(value) {
|
|
26782
|
+
return typeof value === 'string' && value.trim() ? value.trim() : null;
|
|
26783
|
+
}
|
|
26784
|
+
resolvePhaseGateFieldKey(values, configuredKey) {
|
|
26785
|
+
if (!configuredKey)
|
|
26786
|
+
return null;
|
|
26787
|
+
for (const item of values) {
|
|
26788
|
+
const row = getObjectKeysInLowerCase(item);
|
|
26789
|
+
const key = resolvePhaseGateResponseKey(row, configuredKey);
|
|
26790
|
+
if (key)
|
|
26791
|
+
return key;
|
|
26792
|
+
}
|
|
26793
|
+
return null;
|
|
26794
|
+
}
|
|
26795
|
+
resolveLegacyPhaseGateAlias(values, aliases) {
|
|
26796
|
+
for (const alias of aliases) {
|
|
26797
|
+
const key = this.resolvePhaseGateFieldKey(values, alias);
|
|
26798
|
+
if (key)
|
|
26799
|
+
return key;
|
|
26491
26800
|
}
|
|
26492
26801
|
return null;
|
|
26493
26802
|
}
|
|
26494
|
-
|
|
26495
|
-
const
|
|
26496
|
-
|
|
26803
|
+
resolveLegacyFieldByViewType(values, viewTypes) {
|
|
26804
|
+
const allowedTypes = new Set(viewTypes.map(normalizeIdentity));
|
|
26805
|
+
const candidateKeys = Array.from(new Set(values.flatMap((item) => Object.keys(getObjectKeysInLowerCase(item))))).sort((left, right) => {
|
|
26806
|
+
const leftProp = this.findFirstFieldValue(values, left);
|
|
26807
|
+
const rightProp = this.findFirstFieldValue(values, right);
|
|
26808
|
+
const leftIdentity = fieldIdentity(leftProp, left);
|
|
26809
|
+
const rightIdentity = fieldIdentity(rightProp, right);
|
|
26810
|
+
const leftPhaseRank = leftIdentity.includes('phasegate')
|
|
26811
|
+
? 0
|
|
26812
|
+
: leftIdentity.includes('phase')
|
|
26813
|
+
? 1
|
|
26814
|
+
: 2;
|
|
26815
|
+
const rightPhaseRank = rightIdentity.includes('phasegate')
|
|
26816
|
+
? 0
|
|
26817
|
+
: rightIdentity.includes('phase')
|
|
26818
|
+
? 1
|
|
26819
|
+
: 2;
|
|
26820
|
+
if (leftPhaseRank !== rightPhaseRank) {
|
|
26821
|
+
return leftPhaseRank - rightPhaseRank;
|
|
26822
|
+
}
|
|
26823
|
+
return leftIdentity.localeCompare(rightIdentity, undefined, {
|
|
26824
|
+
numeric: true,
|
|
26825
|
+
sensitivity: 'base',
|
|
26826
|
+
});
|
|
26827
|
+
});
|
|
26828
|
+
return (candidateKeys.find((key) => {
|
|
26829
|
+
const prop = this.findFirstFieldValue(values, key);
|
|
26830
|
+
return allowedTypes.has(normalizeIdentity(prop?.viewType));
|
|
26831
|
+
}) ?? null);
|
|
26832
|
+
}
|
|
26833
|
+
getPhaseGateFieldValue(row, property) {
|
|
26834
|
+
if (!property)
|
|
26835
|
+
return null;
|
|
26836
|
+
const responseKey = resolvePhaseGateResponseKey(row, property);
|
|
26837
|
+
return responseKey ? row[responseKey] : null;
|
|
26838
|
+
}
|
|
26839
|
+
isConfiguredPhaseMetadataField(prop, key, fields) {
|
|
26840
|
+
const phaseMetadataRoles = [
|
|
26841
|
+
fields.phaseName,
|
|
26842
|
+
fields.phaseId,
|
|
26843
|
+
fields.phaseOrder,
|
|
26844
|
+
fields.status,
|
|
26845
|
+
fields.percentage,
|
|
26846
|
+
fields.isCurrent,
|
|
26847
|
+
fields.isCompleted,
|
|
26848
|
+
fields.allItemsCompleted,
|
|
26849
|
+
];
|
|
26850
|
+
const row = { [key]: prop };
|
|
26851
|
+
return phaseMetadataRoles.some((role) => !!role && resolvePhaseGateResponseKey(row, role) === key);
|
|
26852
|
+
}
|
|
26853
|
+
isLegacyPhaseGateMetaField(prop, key) {
|
|
26854
|
+
const aliases = [
|
|
26497
26855
|
'phase_name',
|
|
26856
|
+
'phasegate_name',
|
|
26498
26857
|
'phase_schemagateid',
|
|
26858
|
+
'phasegate_id',
|
|
26859
|
+
'phase_order',
|
|
26860
|
+
'phasegate_order',
|
|
26499
26861
|
'phase_iscurrent',
|
|
26862
|
+
'phasegate_iscurrent',
|
|
26500
26863
|
'phase_iscompleted',
|
|
26864
|
+
'phasegate_iscompleted',
|
|
26501
26865
|
'phase_all_items_completed',
|
|
26502
|
-
|
|
26503
|
-
|
|
26504
|
-
|
|
26505
|
-
|
|
26506
|
-
|
|
26507
|
-
|
|
26508
|
-
|
|
26509
|
-
|
|
26510
|
-
|
|
26511
|
-
|
|
26512
|
-
|
|
26513
|
-
|
|
26866
|
+
'phasegate_all_items_completed',
|
|
26867
|
+
'phase_status',
|
|
26868
|
+
'phasegate_status',
|
|
26869
|
+
'phase_request_status',
|
|
26870
|
+
'phasegate_request_status',
|
|
26871
|
+
'phase_percentage',
|
|
26872
|
+
'phasegate_percentage',
|
|
26873
|
+
'phase_progress',
|
|
26874
|
+
'phasegate_progress',
|
|
26875
|
+
];
|
|
26876
|
+
const row = { [key]: prop };
|
|
26877
|
+
return aliases.some((alias) => resolvePhaseGateResponseKey(row, alias) === key);
|
|
26878
|
+
}
|
|
26879
|
+
toPhaseColumnKey(identityValue, fallbackLabel) {
|
|
26880
|
+
const primitiveIdentity = unwrapEntityValue(identityValue);
|
|
26881
|
+
const identity = normalizePhaseGatePropertyIdentity(primitiveIdentity || fallbackLabel || 'unknown');
|
|
26882
|
+
return `_phase_${identity || 'unknown'}`;
|
|
26883
|
+
}
|
|
26884
|
+
comparePhaseGateOrder(left, right, hasConfiguredOrder) {
|
|
26885
|
+
if (!hasConfiguredOrder) {
|
|
26886
|
+
return left[1].encounterOrder - right[1].encounterOrder;
|
|
26887
|
+
}
|
|
26888
|
+
const leftOrder = displayEntityValue(left[1].orderValue);
|
|
26889
|
+
const rightOrder = displayEntityValue(right[1].orderValue);
|
|
26890
|
+
if (leftOrder && rightOrder) {
|
|
26891
|
+
const leftNumber = Number(leftOrder);
|
|
26892
|
+
const rightNumber = Number(rightOrder);
|
|
26893
|
+
if (Number.isFinite(leftNumber) && Number.isFinite(rightNumber)) {
|
|
26894
|
+
const numericComparison = leftNumber - rightNumber;
|
|
26895
|
+
if (numericComparison !== 0)
|
|
26896
|
+
return numericComparison;
|
|
26897
|
+
}
|
|
26898
|
+
else {
|
|
26899
|
+
const textComparison = leftOrder.localeCompare(rightOrder, undefined, {
|
|
26900
|
+
numeric: true,
|
|
26901
|
+
sensitivity: 'base',
|
|
26902
|
+
});
|
|
26903
|
+
if (textComparison !== 0)
|
|
26904
|
+
return textComparison;
|
|
26905
|
+
}
|
|
26906
|
+
}
|
|
26907
|
+
else if (leftOrder || rightOrder) {
|
|
26908
|
+
return leftOrder ? -1 : 1;
|
|
26909
|
+
}
|
|
26910
|
+
const labelComparison = left[1].label.localeCompare(right[1].label, undefined, { numeric: true, sensitivity: 'base' });
|
|
26911
|
+
return labelComparison || left[0].localeCompare(right[0]);
|
|
26912
|
+
}
|
|
26913
|
+
getCanonicalPhaseGateGroupKey(row, rowIdentityProperty) {
|
|
26914
|
+
const identityValue = this.getPhaseGateFieldValue(row, rowIdentityProperty);
|
|
26915
|
+
return `id:${this.toStablePhaseGateValue(identityValue)}`;
|
|
26916
|
+
}
|
|
26917
|
+
getLegacyPhaseGateGroupKey(row, baseColumns) {
|
|
26514
26918
|
const identityColumn = baseColumns.find((col) => col.keyPure && isIdentityField(row[col.keyPure], col.keyPure));
|
|
26515
26919
|
if (identityColumn?.keyPure) {
|
|
26516
|
-
return `id:${
|
|
26920
|
+
return `id:${this.toStablePhaseGateValue(row[identityColumn.keyPure])}`;
|
|
26517
26921
|
}
|
|
26518
26922
|
const parts = baseColumns
|
|
26519
26923
|
.filter((col) => col.keyPure)
|
|
26520
|
-
.map((col) =>
|
|
26521
|
-
return parts.some(Boolean)
|
|
26924
|
+
.map((col) => this.toStablePhaseGateValue(row[col.keyPure]));
|
|
26925
|
+
return parts.some(Boolean)
|
|
26926
|
+
? `values:${JSON.stringify(parts)}`
|
|
26927
|
+
: 'values:unidentified';
|
|
26928
|
+
}
|
|
26929
|
+
toStablePhaseGateValue(value) {
|
|
26930
|
+
const primitive = unwrapEntityValue(value);
|
|
26931
|
+
if (primitive === null || primitive === undefined)
|
|
26932
|
+
return '';
|
|
26933
|
+
if (typeof primitive !== 'object')
|
|
26934
|
+
return String(primitive);
|
|
26935
|
+
return displayEntityValue(primitive);
|
|
26522
26936
|
}
|
|
26523
26937
|
buildPhaseGateCell(row, fields, original, phaseName) {
|
|
26524
|
-
const statusValue =
|
|
26525
|
-
const percentageValue = fields.percentage
|
|
26526
|
-
? row[fields.percentage.toLowerCase()]
|
|
26527
|
-
: null;
|
|
26938
|
+
const statusValue = this.getPhaseGateFieldValue(row, fields.status);
|
|
26939
|
+
const percentageValue = this.getPhaseGateFieldValue(row, fields.percentage);
|
|
26528
26940
|
return {
|
|
26529
26941
|
phaseName,
|
|
26530
26942
|
statusLabel: displayEntityValue(statusValue),
|
|
26531
26943
|
statusColor: getEntityColor(statusValue),
|
|
26532
26944
|
percentage: toNumberValue(percentageValue),
|
|
26533
26945
|
isCurrent: fields.isCurrent
|
|
26534
|
-
? toBooleanValue(row
|
|
26946
|
+
? toBooleanValue(this.getPhaseGateFieldValue(row, fields.isCurrent))
|
|
26535
26947
|
: false,
|
|
26536
26948
|
isCompleted: fields.isCompleted
|
|
26537
|
-
? toBooleanValue(row
|
|
26949
|
+
? toBooleanValue(this.getPhaseGateFieldValue(row, fields.isCompleted))
|
|
26538
26950
|
: false,
|
|
26539
26951
|
allItemsCompleted: fields.allItemsCompleted
|
|
26540
|
-
? toBooleanValue(row
|
|
26952
|
+
? toBooleanValue(this.getPhaseGateFieldValue(row, fields.allItemsCompleted))
|
|
26541
26953
|
: false,
|
|
26542
26954
|
raw: original,
|
|
26543
26955
|
};
|
|
@@ -27046,11 +27458,11 @@ class ListStatisticCardComponent {
|
|
|
27046
27458
|
this.onAction.emit({ type, data: body });
|
|
27047
27459
|
}
|
|
27048
27460
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ListStatisticCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
27049
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.8", type: ListStatisticCardComponent, isStandalone: true, selector: "mt-list-statistic-card", inputs: { dashboardId: { classPropertyName: "dashboardId", publicName: "dashboardId", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { onAction: "onAction" }, ngImport: i0, template: "<div class=\"flex h-full w-full justify-between\">\
|
|
27461
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.8", type: ListStatisticCardComponent, isStandalone: true, selector: "mt-list-statistic-card", inputs: { dashboardId: { classPropertyName: "dashboardId", publicName: "dashboardId", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { onAction: "onAction" }, ngImport: i0, template: "<div class=\"flex h-full w-full justify-between\">\n <mt-statistic-card\n [config]=\"dataHandled()\"\n [style.width]=\"dataHandled()?.width\"\n [styleConfig]=\"styleConfig()\"\n [configurationItem]=\"configurationItem()\"\n (cardClick)=\"doActions($event, 'click')\"\n />\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: StatisticCardComponent, selector: "mt-statistic-card", inputs: ["config", "styleConfig", "configurationItem"], outputs: ["cardClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
27050
27462
|
}
|
|
27051
27463
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ListStatisticCardComponent, decorators: [{
|
|
27052
27464
|
type: Component,
|
|
27053
|
-
args: [{ selector: 'mt-list-statistic-card', standalone: true, imports: [CommonModule, StatisticCardComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"flex h-full w-full justify-between\">\
|
|
27465
|
+
args: [{ selector: 'mt-list-statistic-card', standalone: true, imports: [CommonModule, StatisticCardComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"flex h-full w-full justify-between\">\n <mt-statistic-card\n [config]=\"dataHandled()\"\n [style.width]=\"dataHandled()?.width\"\n [styleConfig]=\"styleConfig()\"\n [configurationItem]=\"configurationItem()\"\n (cardClick)=\"doActions($event, 'click')\"\n />\n</div>\n" }]
|
|
27054
27466
|
}], propDecorators: { dashboardId: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardId", required: true }] }], onAction: [{ type: i0.Output, args: ["onAction"] }] } });
|
|
27055
27467
|
|
|
27056
27468
|
/**
|
|
@@ -27426,34 +27838,34 @@ class SkeletonCardComponent {
|
|
|
27426
27838
|
}
|
|
27427
27839
|
}
|
|
27428
27840
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SkeletonCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
27429
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: SkeletonCardComponent, isStandalone: true, selector: "mt-skeleton-card", inputs: { dashboardId: { classPropertyName: "dashboardId", publicName: "dashboardId", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
|
|
27430
|
-
<div class="skeleton-container">
|
|
27431
|
-
@for (skeleton of skeletons(); track $index) {
|
|
27432
|
-
<div
|
|
27433
|
-
class="skeleton-item"
|
|
27434
|
-
[style.width]="skeleton.width"
|
|
27435
|
-
[style.height]="skeleton.height"
|
|
27436
|
-
>
|
|
27437
|
-
<div class="skeleton-animation"></div>
|
|
27438
|
-
</div>
|
|
27439
|
-
}
|
|
27440
|
-
</div>
|
|
27841
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: SkeletonCardComponent, isStandalone: true, selector: "mt-skeleton-card", inputs: { dashboardId: { classPropertyName: "dashboardId", publicName: "dashboardId", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
|
|
27842
|
+
<div class="skeleton-container">
|
|
27843
|
+
@for (skeleton of skeletons(); track $index) {
|
|
27844
|
+
<div
|
|
27845
|
+
class="skeleton-item"
|
|
27846
|
+
[style.width]="skeleton.width"
|
|
27847
|
+
[style.height]="skeleton.height"
|
|
27848
|
+
>
|
|
27849
|
+
<div class="skeleton-animation"></div>
|
|
27850
|
+
</div>
|
|
27851
|
+
}
|
|
27852
|
+
</div>
|
|
27441
27853
|
`, isInline: true, styles: [".skeleton-container{display:flex;flex-wrap:wrap;gap:1rem;width:100%;padding:1rem}.skeleton-item{background:#f5f5f5;border-radius:.5rem;overflow:hidden;position:relative}.skeleton-animation{position:absolute;inset:0;background:linear-gradient(90deg,transparent,rgba(255,255,255,.4),transparent);animation:shimmer 1.5s infinite}@keyframes shimmer{0%{transform:translate(-100%)}to{transform:translate(100%)}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
27442
27854
|
}
|
|
27443
27855
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SkeletonCardComponent, decorators: [{
|
|
27444
27856
|
type: Component,
|
|
27445
|
-
args: [{ selector: 'mt-skeleton-card', standalone: true, imports: [CommonModule], template: `
|
|
27446
|
-
<div class="skeleton-container">
|
|
27447
|
-
@for (skeleton of skeletons(); track $index) {
|
|
27448
|
-
<div
|
|
27449
|
-
class="skeleton-item"
|
|
27450
|
-
[style.width]="skeleton.width"
|
|
27451
|
-
[style.height]="skeleton.height"
|
|
27452
|
-
>
|
|
27453
|
-
<div class="skeleton-animation"></div>
|
|
27454
|
-
</div>
|
|
27455
|
-
}
|
|
27456
|
-
</div>
|
|
27857
|
+
args: [{ selector: 'mt-skeleton-card', standalone: true, imports: [CommonModule], template: `
|
|
27858
|
+
<div class="skeleton-container">
|
|
27859
|
+
@for (skeleton of skeletons(); track $index) {
|
|
27860
|
+
<div
|
|
27861
|
+
class="skeleton-item"
|
|
27862
|
+
[style.width]="skeleton.width"
|
|
27863
|
+
[style.height]="skeleton.height"
|
|
27864
|
+
>
|
|
27865
|
+
<div class="skeleton-animation"></div>
|
|
27866
|
+
</div>
|
|
27867
|
+
}
|
|
27868
|
+
</div>
|
|
27457
27869
|
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".skeleton-container{display:flex;flex-wrap:wrap;gap:1rem;width:100%;padding:1rem}.skeleton-item{background:#f5f5f5;border-radius:.5rem;overflow:hidden;position:relative}.skeleton-animation{position:absolute;inset:0;background:linear-gradient(90deg,transparent,rgba(255,255,255,.4),transparent);animation:shimmer 1.5s infinite}@keyframes shimmer{0%{transform:translate(-100%)}to{transform:translate(100%)}}\n"] }]
|
|
27458
27870
|
}], propDecorators: { dashboardId: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardId", required: true }] }] } });
|
|
27459
27871
|
|
|
@@ -28977,16 +29389,10 @@ class DashboardItem {
|
|
|
28977
29389
|
if (hasCustomApi)
|
|
28978
29390
|
return false;
|
|
28979
29391
|
const query = config.serviceConfig?.query;
|
|
28980
|
-
const firstSeries = Array.isArray(query?.['series'])
|
|
28981
|
-
? query?.['series']?.[0]
|
|
28982
|
-
: null;
|
|
28983
|
-
const hasFormula = !this.isMissingQueryValue(firstSeries?.['formula'] ?? query?.['formula']);
|
|
28984
29392
|
const configAsType = config.clientConfig?.configAsType;
|
|
28985
29393
|
const hasRingGaugeConfig = !!configAsType?.['ringGaugeConfig'];
|
|
28986
|
-
const isRingGaugeFormula = config.clientConfig?.functionName === 'handleRingGaugeChartWithFormula' ||
|
|
28987
|
-
String(this.chartTypeId() ?? '') === 'ring-gauge-chart-with-formula';
|
|
28988
29394
|
const isLegacyRingGaugeFormula = config.serviceConfig?.chartType === 'BarV2Chart' && hasRingGaugeConfig;
|
|
28989
|
-
if (
|
|
29395
|
+
if (isLegacyRingGaugeFormula) {
|
|
28990
29396
|
return false;
|
|
28991
29397
|
}
|
|
28992
29398
|
const cap = resolveCapability({
|
|
@@ -28995,23 +29401,19 @@ class DashboardItem {
|
|
|
28995
29401
|
componentName,
|
|
28996
29402
|
functionName: config.clientConfig?.functionName ?? null,
|
|
28997
29403
|
});
|
|
28998
|
-
const
|
|
28999
|
-
const
|
|
29000
|
-
|
|
29001
|
-
|
|
29002
|
-
|
|
29003
|
-
});
|
|
29404
|
+
const requirementSchema = cap?.query.schema;
|
|
29405
|
+
const requirementEvaluation = evaluateQueryRequirements(query, requirementSchema);
|
|
29406
|
+
const hasDeclaredQueryRequirements = !!(requirementSchema?.required?.length ||
|
|
29407
|
+
requirementSchema?.requiredAnyOf?.length);
|
|
29408
|
+
const hasRequiredQueryFields = hasDeclaredQueryRequirements && requirementEvaluation.satisfied;
|
|
29004
29409
|
if (cap?.selection.visible !== false &&
|
|
29005
29410
|
!hasSelection &&
|
|
29006
29411
|
!hasRequiredQueryFields) {
|
|
29007
29412
|
return true;
|
|
29008
29413
|
}
|
|
29009
|
-
if (!
|
|
29414
|
+
if (!hasDeclaredQueryRequirements)
|
|
29010
29415
|
return false;
|
|
29011
|
-
return
|
|
29012
|
-
const value = firstSeries?.[field] ?? query?.[field];
|
|
29013
|
-
return this.isMissingQueryValue(value);
|
|
29014
|
-
});
|
|
29416
|
+
return !requirementEvaluation.satisfied;
|
|
29015
29417
|
}, ...(ngDevMode ? [{ debugName: "missingRequiredConfiguration" }] : /* istanbul ignore next */ []));
|
|
29016
29418
|
needsConfiguration = computed(() => {
|
|
29017
29419
|
if (!this.builderMode())
|
|
@@ -29110,12 +29512,6 @@ class DashboardItem {
|
|
|
29110
29512
|
initialized = false;
|
|
29111
29513
|
/** Track current dashboardId to detect changes */
|
|
29112
29514
|
currentDashboardId = null;
|
|
29113
|
-
isMissingQueryValue(value) {
|
|
29114
|
-
return (value === null ||
|
|
29115
|
-
value === undefined ||
|
|
29116
|
-
value === '' ||
|
|
29117
|
-
(Array.isArray(value) && value.length === 0));
|
|
29118
|
-
}
|
|
29119
29515
|
// ============================================
|
|
29120
29516
|
// Lifecycle
|
|
29121
29517
|
// ============================================
|
|
@@ -29495,20 +29891,12 @@ class ChartViewer {
|
|
|
29495
29891
|
if (cap?.selection.visible !== false && !hasSelection) {
|
|
29496
29892
|
return false;
|
|
29497
29893
|
}
|
|
29498
|
-
const
|
|
29499
|
-
|
|
29894
|
+
const schema = cap?.query.schema;
|
|
29895
|
+
const hasDeclaredRequirements = !!(schema?.required?.length || schema?.requiredAnyOf?.length);
|
|
29896
|
+
if (!hasDeclaredRequirements)
|
|
29500
29897
|
return true;
|
|
29501
|
-
|
|
29502
|
-
|
|
29503
|
-
? query?.['series']?.[0]
|
|
29504
|
-
: null;
|
|
29505
|
-
return requiredFields.every((field) => {
|
|
29506
|
-
const value = firstSeries?.[field] ?? query?.[field];
|
|
29507
|
-
return !(value === null ||
|
|
29508
|
-
value === undefined ||
|
|
29509
|
-
value === '' ||
|
|
29510
|
-
(Array.isArray(value) && value.length === 0));
|
|
29511
|
-
});
|
|
29898
|
+
return evaluateQueryRequirements(config.serviceConfig?.query, schema)
|
|
29899
|
+
.satisfied;
|
|
29512
29900
|
}, ...(ngDevMode ? [{ debugName: "canPreview" }] : /* istanbul ignore next */ []));
|
|
29513
29901
|
/**
|
|
29514
29902
|
* Refresh the preview with a local overlay. The rendered chart stays mounted
|
|
@@ -32029,7 +32417,7 @@ class SourceLinkConfiguration {
|
|
|
32029
32417
|
useExisting: forwardRef(() => SourceLinkConfiguration),
|
|
32030
32418
|
multi: true,
|
|
32031
32419
|
},
|
|
32032
|
-
], ngImport: i0, template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\r\n <mt-card [title]=\"t('sourceLinks')\">\r\n <ng-template #cardEnd>\r\n <mt-button\r\n icon=\"general.plus\"\r\n [outlined]=\"true\"\r\n size=\"small\"\r\n (onClick)=\"addSourceLink()\"\r\n [disabled]=\"disabled\"\r\n [pTooltip]=\"t('addSourceLink')\"\r\n />\r\n </ng-template>\r\n\r\n <div class=\"flex flex-col gap-4\" [formGroup]=\"sourceLinksForm\">\r\n <div formArrayName=\"sourceLinks\">\r\n @for (\r\n link of sourceLinksArray.controls;\r\n track trackByIndex(i);\r\n let i = $index;\r\n let first = $first\r\n ) {\r\n <div\r\n class=\"p-4 rounded-lg border transition-all mb-4 last:mb-0\"\r\n [class.border-red-500]=\"link.invalid\"\r\n [class.border-surface-200]=\"!link.invalid\"\r\n [formGroupName]=\"i\"\r\n >\r\n <!-- Link Header with Type Tabs -->\r\n <div class=\"flex items-center justify-between mb-4\">\r\n <div class=\"flex items-center gap-3\">\r\n <span\r\n class=\"inline-flex items-center justify-center w-6 h-6 rounded-full bg-primary-100 text-primary-600 text-sm font-semibold\"\r\n >\r\n {{ i + 1 }}\r\n </span>\r\n\r\n <!-- Link Type Tabs (only show for non-first links) -->\r\n @if (!first) {\r\n <mt-tabs\r\n [active]=\"getLinkType(i)\"\r\n (activeChange)=\"onLinkTypeChange(i, $event)\"\r\n [options]=\"getLinkTypeOptions(i)\"\r\n size=\"small\"\r\n />\r\n } @else {\r\n <span class=\"text-sm font-medium text-muted-color\">\r\n {{ t(\"selectionToSelection\") }}\r\n </span>\r\n }\r\n </div>\r\n\r\n <mt-button\r\n icon=\"general.trash-01\"\r\n severity=\"danger\"\r\n [text]=\"true\"\r\n size=\"small\"\r\n [disabled]=\"disabled\"\r\n (onClick)=\"removeSourceLink(i)\"\r\n />\r\n </div>\r\n\r\n <!-- Source Selections based on link type -->\r\n @if (getLinkType(i) === \"selection\") {\r\n <!-- Selection to Selection Mode -->\r\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4\">\r\n <!-- Source 1 Selection -->\r\n <mt-select-field\r\n [label]=\"t('source1')\"\r\n formControlName=\"source1SelectionId\"\r\n [options]=\"selectionOptions()\"\r\n optionLabel=\"displayName\"\r\n optionValue=\"selectionId\"\r\n [placeholder]=\"t('selectSource')\"\r\n (ngModelChange)=\"onSourceChange(i)\"\r\n />\r\n\r\n <!-- Source 2 Selection -->\r\n <mt-select-field\r\n [label]=\"t('source2')\"\r\n formControlName=\"source2SelectionId\"\r\n [options]=\"selectionOptions()\"\r\n optionLabel=\"displayName\"\r\n optionValue=\"selectionId\"\r\n [placeholder]=\"t('selectSource')\"\r\n (ngModelChange)=\"onSourceChange(i)\"\r\n />\r\n </div>\r\n } @else {\r\n <!-- Chained Mode: Previous Link to Selection -->\r\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4\">\r\n <!-- Source Link (previous link) -->\r\n <mt-select-field\r\n [label]=\"t('previousLink')\"\r\n formControlName=\"sourceLinkId\"\r\n [options]=\"getAvailableSourceLinks(i)\"\r\n optionLabel=\"displayName\"\r\n optionValue=\"index\"\r\n [placeholder]=\"t('selectPreviousLink')\"\r\n (ngModelChange)=\"onSourceChange(i)\"\r\n />\r\n\r\n <!-- Source 2 Selection -->\r\n <mt-select-field\r\n [label]=\"t('source2')\"\r\n formControlName=\"source2SelectionId\"\r\n [options]=\"selectionOptions()\"\r\n optionLabel=\"displayName\"\r\n optionValue=\"selectionId\"\r\n [placeholder]=\"t('selectSource')\"\r\n (ngModelChange)=\"onSourceChange(i)\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- Link Properties -->\r\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4\">\r\n <!-- Source 1 Property -->\r\n <mt-select-field\r\n [label]=\"t('source1LinkProperty')\"\r\n formControlName=\"source1PropertyKey\"\r\n [options]=\"getSource1PropertiesGrouped(i)\"\r\n [group]=\"true\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [placeholder]=\"t('selectProperty')\"\r\n [filter]=\"true\"\r\n />\r\n\r\n <!-- Source 2 Property -->\r\n <mt-select-field\r\n [label]=\"t('source2LinkProperty')\"\r\n formControlName=\"source2PropertyKey\"\r\n [options]=\"getSource2PropertiesGrouped(i)\"\r\n [group]=\"true\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [placeholder]=\"t('selectProperty')\"\r\n [filter]=\"true\"\r\n />\r\n </div>\r\n\r\n <!-- Join Options -->\r\n <div class=\"flex items-center gap-6\">\r\n <mt-toggle-field\r\n [label]=\"t('isLeftJoin')\"\r\n formControlName=\"isLeftJoin\"\r\n />\r\n <mt-toggle-field\r\n [label]=\"t('isFilterLinkage')\"\r\n formControlName=\"isFilterLinkage\"\r\n />\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n\r\n @if (sourceLinksArray.length === 0) {\r\n <div class=\"text-center py-8 text-muted-color\">\r\n <i class=\"mti mti-link-01 text-3xl mb-2 block\"></i>\r\n <p class=\"mb-2\">{{ t(\"noSourceLinksConfigured\") }}</p>\r\n <mt-button\r\n icon=\"general.plus\"\r\n [label]=\"t('addSourceLink')\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [disabled]=\"disabled\"\r\n (onClick)=\"addSourceLink()\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n </mt-card>\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.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { 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"], outputs: ["onClick", "onFocus", "onBlur"] }, { 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: Card, selector: "mt-card", inputs: ["class", "title", "paddingless"] }, { kind: "component", type: Tabs, selector: "mt-tabs", inputs: ["options", "optionLabel", "optionValue", "active", "mode", "moreLabel", "defaultIcon", "size", "fluid", "disabled", "searchThreshold"], outputs: ["activeChange", "onChange"] }, { kind: "directive", type: Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "showOnEllipsis", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip", "pTooltipPT", "pTooltipUnstyled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
32420
|
+
], ngImport: i0, template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\n <mt-card [title]=\"t('sourceLinks')\">\n <ng-template #cardEnd>\n <mt-button\n icon=\"general.plus\"\n [outlined]=\"true\"\n size=\"small\"\n (onClick)=\"addSourceLink()\"\n [disabled]=\"disabled\"\n [pTooltip]=\"t('addSourceLink')\"\n />\n </ng-template>\n\n <div class=\"flex flex-col gap-4\" [formGroup]=\"sourceLinksForm\">\n <div formArrayName=\"sourceLinks\">\n @for (\n link of sourceLinksArray.controls;\n track trackByIndex(i);\n let i = $index;\n let first = $first\n ) {\n <div\n class=\"p-4 rounded-lg border transition-all mb-4 last:mb-0\"\n [class.border-red-500]=\"link.invalid\"\n [class.border-surface-200]=\"!link.invalid\"\n [formGroupName]=\"i\"\n >\n <!-- Link Header with Type Tabs -->\n <div class=\"flex items-center justify-between mb-4\">\n <div class=\"flex items-center gap-3\">\n <span\n class=\"inline-flex items-center justify-center w-6 h-6 rounded-full bg-primary-100 text-primary-600 text-sm font-semibold\"\n >\n {{ i + 1 }}\n </span>\n\n <!-- Link Type Tabs (only show for non-first links) -->\n @if (!first) {\n <mt-tabs\n [active]=\"getLinkType(i)\"\n (activeChange)=\"onLinkTypeChange(i, $event)\"\n [options]=\"getLinkTypeOptions(i)\"\n size=\"small\"\n />\n } @else {\n <span class=\"text-sm font-medium text-muted-color\">\n {{ t(\"selectionToSelection\") }}\n </span>\n }\n </div>\n\n <mt-button\n icon=\"general.trash-01\"\n severity=\"danger\"\n [text]=\"true\"\n size=\"small\"\n [disabled]=\"disabled\"\n (onClick)=\"removeSourceLink(i)\"\n />\n </div>\n\n <!-- Source Selections based on link type -->\n @if (getLinkType(i) === \"selection\") {\n <!-- Selection to Selection Mode -->\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4\">\n <!-- Source 1 Selection -->\n <mt-select-field\n [label]=\"t('source1')\"\n formControlName=\"source1SelectionId\"\n [options]=\"selectionOptions()\"\n optionLabel=\"displayName\"\n optionValue=\"selectionId\"\n [placeholder]=\"t('selectSource')\"\n (ngModelChange)=\"onSourceChange(i)\"\n />\n\n <!-- Source 2 Selection -->\n <mt-select-field\n [label]=\"t('source2')\"\n formControlName=\"source2SelectionId\"\n [options]=\"selectionOptions()\"\n optionLabel=\"displayName\"\n optionValue=\"selectionId\"\n [placeholder]=\"t('selectSource')\"\n (ngModelChange)=\"onSourceChange(i)\"\n />\n </div>\n } @else {\n <!-- Chained Mode: Previous Link to Selection -->\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4\">\n <!-- Source Link (previous link) -->\n <mt-select-field\n [label]=\"t('previousLink')\"\n formControlName=\"sourceLinkId\"\n [options]=\"getAvailableSourceLinks(i)\"\n optionLabel=\"displayName\"\n optionValue=\"index\"\n [placeholder]=\"t('selectPreviousLink')\"\n (ngModelChange)=\"onSourceChange(i)\"\n />\n\n <!-- Source 2 Selection -->\n <mt-select-field\n [label]=\"t('source2')\"\n formControlName=\"source2SelectionId\"\n [options]=\"selectionOptions()\"\n optionLabel=\"displayName\"\n optionValue=\"selectionId\"\n [placeholder]=\"t('selectSource')\"\n (ngModelChange)=\"onSourceChange(i)\"\n />\n </div>\n }\n\n <!-- Link Properties -->\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4\">\n <!-- Source 1 Property -->\n <mt-select-field\n [label]=\"t('source1LinkProperty')\"\n formControlName=\"source1PropertyKey\"\n [options]=\"getSource1PropertiesGrouped(i)\"\n [group]=\"true\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [placeholder]=\"t('selectProperty')\"\n [filter]=\"true\"\n />\n\n <!-- Source 2 Property -->\n <mt-select-field\n [label]=\"t('source2LinkProperty')\"\n formControlName=\"source2PropertyKey\"\n [options]=\"getSource2PropertiesGrouped(i)\"\n [group]=\"true\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [placeholder]=\"t('selectProperty')\"\n [filter]=\"true\"\n />\n </div>\n\n <!-- Join Options -->\n <div class=\"flex items-center gap-6\">\n <mt-toggle-field\n [label]=\"t('isLeftJoin')\"\n formControlName=\"isLeftJoin\"\n />\n <mt-toggle-field\n [label]=\"t('isFilterLinkage')\"\n formControlName=\"isFilterLinkage\"\n />\n </div>\n </div>\n }\n </div>\n\n @if (sourceLinksArray.length === 0) {\n <div class=\"text-center py-8 text-muted-color\">\n <i class=\"mti mti-link-01 text-3xl mb-2 block\"></i>\n <p class=\"mb-2\">{{ t(\"noSourceLinksConfigured\") }}</p>\n <mt-button\n icon=\"general.plus\"\n [label]=\"t('addSourceLink')\"\n severity=\"secondary\"\n size=\"small\"\n [disabled]=\"disabled\"\n (onClick)=\"addSourceLink()\"\n />\n </div>\n }\n </div>\n </mt-card>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { 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"], outputs: ["onClick", "onFocus", "onBlur"] }, { 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: Card, selector: "mt-card", inputs: ["class", "title", "paddingless"] }, { kind: "component", type: Tabs, selector: "mt-tabs", inputs: ["options", "optionLabel", "optionValue", "active", "mode", "moreLabel", "defaultIcon", "size", "fluid", "disabled", "searchThreshold"], outputs: ["activeChange", "onChange"] }, { kind: "directive", type: Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "showOnEllipsis", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip", "pTooltipPT", "pTooltipUnstyled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
32033
32421
|
}
|
|
32034
32422
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SourceLinkConfiguration, decorators: [{
|
|
32035
32423
|
type: Component,
|
|
@@ -32055,7 +32443,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
32055
32443
|
useExisting: forwardRef(() => SourceLinkConfiguration),
|
|
32056
32444
|
multi: true,
|
|
32057
32445
|
},
|
|
32058
|
-
], template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\
|
|
32446
|
+
], template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\n <mt-card [title]=\"t('sourceLinks')\">\n <ng-template #cardEnd>\n <mt-button\n icon=\"general.plus\"\n [outlined]=\"true\"\n size=\"small\"\n (onClick)=\"addSourceLink()\"\n [disabled]=\"disabled\"\n [pTooltip]=\"t('addSourceLink')\"\n />\n </ng-template>\n\n <div class=\"flex flex-col gap-4\" [formGroup]=\"sourceLinksForm\">\n <div formArrayName=\"sourceLinks\">\n @for (\n link of sourceLinksArray.controls;\n track trackByIndex(i);\n let i = $index;\n let first = $first\n ) {\n <div\n class=\"p-4 rounded-lg border transition-all mb-4 last:mb-0\"\n [class.border-red-500]=\"link.invalid\"\n [class.border-surface-200]=\"!link.invalid\"\n [formGroupName]=\"i\"\n >\n <!-- Link Header with Type Tabs -->\n <div class=\"flex items-center justify-between mb-4\">\n <div class=\"flex items-center gap-3\">\n <span\n class=\"inline-flex items-center justify-center w-6 h-6 rounded-full bg-primary-100 text-primary-600 text-sm font-semibold\"\n >\n {{ i + 1 }}\n </span>\n\n <!-- Link Type Tabs (only show for non-first links) -->\n @if (!first) {\n <mt-tabs\n [active]=\"getLinkType(i)\"\n (activeChange)=\"onLinkTypeChange(i, $event)\"\n [options]=\"getLinkTypeOptions(i)\"\n size=\"small\"\n />\n } @else {\n <span class=\"text-sm font-medium text-muted-color\">\n {{ t(\"selectionToSelection\") }}\n </span>\n }\n </div>\n\n <mt-button\n icon=\"general.trash-01\"\n severity=\"danger\"\n [text]=\"true\"\n size=\"small\"\n [disabled]=\"disabled\"\n (onClick)=\"removeSourceLink(i)\"\n />\n </div>\n\n <!-- Source Selections based on link type -->\n @if (getLinkType(i) === \"selection\") {\n <!-- Selection to Selection Mode -->\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4\">\n <!-- Source 1 Selection -->\n <mt-select-field\n [label]=\"t('source1')\"\n formControlName=\"source1SelectionId\"\n [options]=\"selectionOptions()\"\n optionLabel=\"displayName\"\n optionValue=\"selectionId\"\n [placeholder]=\"t('selectSource')\"\n (ngModelChange)=\"onSourceChange(i)\"\n />\n\n <!-- Source 2 Selection -->\n <mt-select-field\n [label]=\"t('source2')\"\n formControlName=\"source2SelectionId\"\n [options]=\"selectionOptions()\"\n optionLabel=\"displayName\"\n optionValue=\"selectionId\"\n [placeholder]=\"t('selectSource')\"\n (ngModelChange)=\"onSourceChange(i)\"\n />\n </div>\n } @else {\n <!-- Chained Mode: Previous Link to Selection -->\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4\">\n <!-- Source Link (previous link) -->\n <mt-select-field\n [label]=\"t('previousLink')\"\n formControlName=\"sourceLinkId\"\n [options]=\"getAvailableSourceLinks(i)\"\n optionLabel=\"displayName\"\n optionValue=\"index\"\n [placeholder]=\"t('selectPreviousLink')\"\n (ngModelChange)=\"onSourceChange(i)\"\n />\n\n <!-- Source 2 Selection -->\n <mt-select-field\n [label]=\"t('source2')\"\n formControlName=\"source2SelectionId\"\n [options]=\"selectionOptions()\"\n optionLabel=\"displayName\"\n optionValue=\"selectionId\"\n [placeholder]=\"t('selectSource')\"\n (ngModelChange)=\"onSourceChange(i)\"\n />\n </div>\n }\n\n <!-- Link Properties -->\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4\">\n <!-- Source 1 Property -->\n <mt-select-field\n [label]=\"t('source1LinkProperty')\"\n formControlName=\"source1PropertyKey\"\n [options]=\"getSource1PropertiesGrouped(i)\"\n [group]=\"true\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [placeholder]=\"t('selectProperty')\"\n [filter]=\"true\"\n />\n\n <!-- Source 2 Property -->\n <mt-select-field\n [label]=\"t('source2LinkProperty')\"\n formControlName=\"source2PropertyKey\"\n [options]=\"getSource2PropertiesGrouped(i)\"\n [group]=\"true\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [placeholder]=\"t('selectProperty')\"\n [filter]=\"true\"\n />\n </div>\n\n <!-- Join Options -->\n <div class=\"flex items-center gap-6\">\n <mt-toggle-field\n [label]=\"t('isLeftJoin')\"\n formControlName=\"isLeftJoin\"\n />\n <mt-toggle-field\n [label]=\"t('isFilterLinkage')\"\n formControlName=\"isFilterLinkage\"\n />\n </div>\n </div>\n }\n </div>\n\n @if (sourceLinksArray.length === 0) {\n <div class=\"text-center py-8 text-muted-color\">\n <i class=\"mti mti-link-01 text-3xl mb-2 block\"></i>\n <p class=\"mb-2\">{{ t(\"noSourceLinksConfigured\") }}</p>\n <mt-button\n icon=\"general.plus\"\n [label]=\"t('addSourceLink')\"\n severity=\"secondary\"\n size=\"small\"\n [disabled]=\"disabled\"\n (onClick)=\"addSourceLink()\"\n />\n </div>\n }\n </div>\n </mt-card>\n</div>\n" }]
|
|
32059
32447
|
}], ctorParameters: () => [], propDecorators: { selectionModules: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionModules", required: false }] }] } });
|
|
32060
32448
|
|
|
32061
32449
|
/**
|
|
@@ -32133,7 +32521,7 @@ class CustomApiConfiguration {
|
|
|
32133
32521
|
useExisting: forwardRef(() => CustomApiConfiguration),
|
|
32134
32522
|
multi: true,
|
|
32135
32523
|
},
|
|
32136
|
-
], ngImport: i0, template: "<mt-card\
|
|
32524
|
+
], ngImport: i0, template: "<mt-card\n [title]=\"t('customApi')\"\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\n>\n <div class=\"flex flex-col gap-4\">\n <p class=\"text-sm text-muted-color\">\n {{ t(\"customApiDescription\") }}\n </p>\n\n <div class=\"grid grid-cols-12 gap-4\">\n <!-- HTTP Method -->\n <div class=\"col-span-3\">\n <mt-select-field\n [label]=\"t('httpMethod')\"\n [options]=\"methodOptions\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [ngModel]=\"method()\"\n (ngModelChange)=\"onMethodChange($event)\"\n [disabled]=\"disabled()\"\n />\n </div>\n\n <!-- Custom API URL -->\n <div class=\"col-span-9\">\n <mt-text-field\n [label]=\"t('customApiUrl')\"\n [placeholder]=\"t('customApiUrlPlaceholder')\"\n [ngModel]=\"customApiUrl()\"\n (ngModelChange)=\"onUrlChange($event)\"\n [disabled]=\"disabled()\"\n />\n </div>\n </div>\n </div>\n</mt-card>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { 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: TextField, selector: "mt-text-field", inputs: ["field", "hint", "label", "placeholder", "class", "type", "readonly", "pInputs", "required", "maxLength", "icon", "iconPosition"] }, { kind: "component", type: Card, selector: "mt-card", inputs: ["class", "title", "paddingless"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
32137
32525
|
}
|
|
32138
32526
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CustomApiConfiguration, decorators: [{
|
|
32139
32527
|
type: Component,
|
|
@@ -32150,7 +32538,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
32150
32538
|
useExisting: forwardRef(() => CustomApiConfiguration),
|
|
32151
32539
|
multi: true,
|
|
32152
32540
|
},
|
|
32153
|
-
], template: "<mt-card\
|
|
32541
|
+
], template: "<mt-card\n [title]=\"t('customApi')\"\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\n>\n <div class=\"flex flex-col gap-4\">\n <p class=\"text-sm text-muted-color\">\n {{ t(\"customApiDescription\") }}\n </p>\n\n <div class=\"grid grid-cols-12 gap-4\">\n <!-- HTTP Method -->\n <div class=\"col-span-3\">\n <mt-select-field\n [label]=\"t('httpMethod')\"\n [options]=\"methodOptions\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [ngModel]=\"method()\"\n (ngModelChange)=\"onMethodChange($event)\"\n [disabled]=\"disabled()\"\n />\n </div>\n\n <!-- Custom API URL -->\n <div class=\"col-span-9\">\n <mt-text-field\n [label]=\"t('customApiUrl')\"\n [placeholder]=\"t('customApiUrlPlaceholder')\"\n [ngModel]=\"customApiUrl()\"\n (ngModelChange)=\"onUrlChange($event)\"\n [disabled]=\"disabled()\"\n />\n </div>\n </div>\n </div>\n</mt-card>\n" }]
|
|
32154
32542
|
}] });
|
|
32155
32543
|
|
|
32156
32544
|
/**
|
|
@@ -32370,6 +32758,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
32370
32758
|
], template: "<div\r\n class=\"mt-string-array-input flex flex-col gap-2\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n>\r\n @if (label()) {\r\n <label class=\"text-sm font-medium text-surface-700\">{{ label() }}</label>\r\n }\r\n\r\n <!-- Add picker: selecting an option appends it and resets the field. -->\r\n <mt-select-field\r\n [field]=\"false\"\r\n [options]=\"availableOptions()\"\r\n [group]=\"group()\"\r\n [optionLabel]=\"resolvedOptionLabelKey\"\r\n [optionValue]=\"optionValue()\"\r\n [optionGroupLabel]=\"optionGroupLabel()\"\r\n [optionGroupChildren]=\"optionGroupChildren()\"\r\n [filter]=\"filter()\"\r\n [placeholder]=\"placeholder() || t('addProperty')\"\r\n [readonly]=\"disabled()\"\r\n [ngModel]=\"addSelectValue()\"\r\n (ngModelChange)=\"onAdd($event)\"\r\n />\r\n\r\n <!-- Selected values: inline chips, drag to reorder, \u00D7 to remove. -->\r\n @if (values().length) {\r\n <div\r\n cdkDropList\r\n cdkDropListOrientation=\"mixed\"\r\n (cdkDropListDropped)=\"drop($event)\"\r\n class=\"grid grid-cols-4 gap-2\"\r\n >\r\n @for (key of values(); track key + $index; let i = $index) {\r\n <div\r\n cdkDrag\r\n [cdkDragDisabled]=\"disabled()\"\r\n class=\"mt-sai-chip group flex w-full items-center gap-1.5 rounded-md border border-surface-200 bg-surface-50 py-1 pl-2 pr-1 text-sm\"\r\n [class.cursor-grab]=\"!disabled()\"\r\n [pTooltip]=\"t('dragToReorder')\"\r\n >\r\n <mt-icon\r\n icon=\"general.dots-grid\"\r\n class=\"shrink-0 text-sm text-muted-color\"\r\n />\r\n\r\n <span\r\n class=\"inline-flex h-4 min-w-4 shrink-0 items-center justify-center rounded-full bg-surface-200 px-1 text-[10px] font-semibold text-muted-color\"\r\n >\r\n {{ i + 1 }}\r\n </span>\r\n\r\n <span\r\n class=\"min-w-0 flex-1 truncate\"\r\n mtTruncateTooltip\r\n tooltipPosition=\"top\"\r\n >{{ getLabel(key) }}</span\r\n >\r\n\r\n <button\r\n type=\"button\"\r\n class=\"inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-full text-muted-color transition-colors hover:bg-red-100 hover:text-red-600\"\r\n [disabled]=\"disabled()\"\r\n [attr.aria-label]=\"t('remove')\"\r\n (click)=\"remove(i)\"\r\n >\r\n <mt-icon icon=\"general.x-close\" class=\"text-xs\" />\r\n </button>\r\n\r\n <!-- Lifted chip shown while dragging (matches the real chip). -->\r\n <div\r\n *cdkDragPreview\r\n class=\"inline-flex items-center gap-1.5 rounded-full border border-surface-300 bg-surface-0 py-1 pl-2 pr-3 text-sm font-medium text-color\"\r\n >\r\n <mt-icon\r\n icon=\"general.dots-grid\"\r\n class=\"text-sm text-muted-color\"\r\n />\r\n {{ getLabel(key) }}\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n } @else if (emptyHint()) {\r\n <p class=\"text-xs text-muted-color\">{{ emptyHint() }}</p>\r\n }\r\n</div>\r\n", styles: [".mt-string-array-input .cdk-drag-animating,.cdk-drop-list-dragging .mt-sai-chip{transition:none}.mt-string-array-input .cdk-drag-placeholder{border-style:dashed;border-color:var(--p-primary-400, #818cf8);background:var(--p-primary-50, #eef2ff)}.mt-string-array-input .cdk-drag-placeholder>*{visibility:hidden}.mt-string-array-input .cdk-drag-preview{box-shadow:0 10px 20px -8px #00000040,0 4px 8px -4px #00000026}\n"] }]
|
|
32371
32759
|
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], group: [{ type: i0.Input, args: [{ isSignal: true, alias: "group", required: false }] }], optionLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionLabel", required: false }] }], optionValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionValue", required: false }] }], optionGroupLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionGroupLabel", required: false }] }], optionGroupChildren: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionGroupChildren", required: false }] }], filter: [{ type: i0.Input, args: [{ isSignal: true, alias: "filter", required: false }] }], emptyHint: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyHint", required: false }] }] } });
|
|
32372
32760
|
|
|
32761
|
+
/** Localized action key for the per-series advanced-settings disclosure. */
|
|
32762
|
+
function getAdvancedSettingsActionKey(expanded) {
|
|
32763
|
+
return expanded ? 'hideAdvancedSettings' : 'showAdvancedSettings';
|
|
32764
|
+
}
|
|
32765
|
+
/** Build a stable, HTML-safe base id shared by the trigger and its region. */
|
|
32766
|
+
function buildAdvancedSettingsId(chartType, seriesKey, seriesIndex) {
|
|
32767
|
+
const chart = toHtmlIdSegment(chartType) || 'chart';
|
|
32768
|
+
const series = toHtmlIdSegment(seriesKey) || String(seriesIndex);
|
|
32769
|
+
return `mt-general-query-${chart}-${series}-advanced`;
|
|
32770
|
+
}
|
|
32771
|
+
function toHtmlIdSegment(value) {
|
|
32772
|
+
return String(value ?? '')
|
|
32773
|
+
.trim()
|
|
32774
|
+
.replace(/[^a-zA-Z0-9_-]+/g, '-');
|
|
32775
|
+
}
|
|
32776
|
+
|
|
32777
|
+
/**
|
|
32778
|
+
* Adapt the shared query requirement evaluator to one GeneralQuery series.
|
|
32779
|
+
* Keeping this pure makes the editor's AND/OR requirement contract easy to
|
|
32780
|
+
* verify without constructing the Angular form component.
|
|
32781
|
+
*/
|
|
32782
|
+
function validateGeneralQuerySeriesRequirements(series, schema) {
|
|
32783
|
+
const evaluation = evaluateQueryRequirements({ series: [series] }, schema);
|
|
32784
|
+
return evaluation.satisfied ? null : { queryRequirements: evaluation };
|
|
32785
|
+
}
|
|
32786
|
+
|
|
32373
32787
|
/**
|
|
32374
32788
|
* General Query Component
|
|
32375
32789
|
*
|
|
@@ -32624,8 +33038,14 @@ class GeneralQuery {
|
|
|
32624
33038
|
formula: [s.formula || '', formulaValidators],
|
|
32625
33039
|
showAdvancedSettings: [s.showAdvancedSettings ?? false],
|
|
32626
33040
|
barType: [s.barType || 'bar'],
|
|
33041
|
+
}, {
|
|
33042
|
+
validators: [(control) => this.validateSeriesRequirements(control)],
|
|
32627
33043
|
});
|
|
32628
33044
|
}
|
|
33045
|
+
validateSeriesRequirements(control) {
|
|
33046
|
+
const value = control instanceof FormGroup ? control.getRawValue() : control.value;
|
|
33047
|
+
return validateGeneralQuerySeriesRequirements(value, this.querySchema());
|
|
33048
|
+
}
|
|
32629
33049
|
createFilterFormGroup(filter) {
|
|
32630
33050
|
const f = filter || {};
|
|
32631
33051
|
return this.fb.group({
|
|
@@ -32646,6 +33066,18 @@ class GeneralQuery {
|
|
|
32646
33066
|
const current = series.get('showAdvancedSettings')?.value;
|
|
32647
33067
|
series.patchValue({ showAdvancedSettings: !current });
|
|
32648
33068
|
}
|
|
33069
|
+
/** Stable disclosure trigger id for a series' Formula Builder. */
|
|
33070
|
+
advancedSettingsToggleId(seriesIndex) {
|
|
33071
|
+
return `${this.advancedSettingsId(seriesIndex)}-toggle`;
|
|
33072
|
+
}
|
|
33073
|
+
/** Stable region id referenced by the disclosure trigger. */
|
|
33074
|
+
advancedSettingsPanelId(seriesIndex) {
|
|
33075
|
+
return `${this.advancedSettingsId(seriesIndex)}-panel`;
|
|
33076
|
+
}
|
|
33077
|
+
/** Translation key for the disclosure's current action. */
|
|
33078
|
+
advancedSettingsActionKey(expanded) {
|
|
33079
|
+
return getAdvancedSettingsActionKey(expanded);
|
|
33080
|
+
}
|
|
32649
33081
|
// ==================== Filter Actions ====================
|
|
32650
33082
|
addFilter(seriesIndex) {
|
|
32651
33083
|
const series = this.seriesArray.at(seriesIndex);
|
|
@@ -32747,6 +33179,9 @@ class GeneralQuery {
|
|
|
32747
33179
|
normalizeAggregateFunction(value) {
|
|
32748
33180
|
return value === 'DisticntCount' ? 'DistinctCount' : value || '';
|
|
32749
33181
|
}
|
|
33182
|
+
advancedSettingsId(seriesIndex) {
|
|
33183
|
+
return buildAdvancedSettingsId(this.chartType(), this.seriesArray.at(seriesIndex)?.get('key')?.value, seriesIndex);
|
|
33184
|
+
}
|
|
32750
33185
|
generateRandomKey() {
|
|
32751
33186
|
return Math.random().toString(36).substring(2, 12);
|
|
32752
33187
|
}
|
|
@@ -32765,7 +33200,7 @@ class GeneralQuery {
|
|
|
32765
33200
|
useExisting: forwardRef(() => GeneralQuery),
|
|
32766
33201
|
multi: true,
|
|
32767
33202
|
},
|
|
32768
|
-
], ngImport: i0, template: "<div\r\n class=\"flex flex-col gap-4\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n [formGroup]=\"queryForm\"\r\n>\r\n <!-- Category Property (shown for certain chart types) -->\r\n @if (shouldShowField(\"categoryProperty\")) {\r\n <div class=\"mb-2\">\r\n <mt-select-field\r\n [label]=\"t('categoryProperty')\"\r\n formControlName=\"categoryProperty\"\r\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\r\n [group]=\"useGroupedSelect()\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [placeholder]=\"t('selectCategoryProperty')\"\r\n [filter]=\"true\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- Add Series Button -->\r\n @if (chartType() !== \"overview\" || seriesArray.length === 0) {\r\n <div class=\"flex justify-end\">\r\n <mt-button\r\n icon=\"general.plus\"\r\n [label]=\"t('addSeries')\"\r\n size=\"small\"\r\n [disabled]=\"disabled\"\r\n (onClick)=\"addSeries()\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- Series List -->\r\n <div formArrayName=\"series\" class=\"flex flex-col gap-4\">\r\n @for (\r\n series of seriesArray.controls;\r\n track trackByIndex(i);\r\n let i = $index\r\n ) {\r\n <div\r\n class=\"p-4 rounded-lg border transition-all\"\r\n [class.border-red-500]=\"series.invalid\"\r\n [class.border-surface-200]=\"!series.invalid\"\r\n [formGroupName]=\"i\"\r\n >\r\n <!-- Series Header -->\r\n <div class=\"flex items-center justify-between mb-4\">\r\n <div class=\"flex items-center gap-2\">\r\n <span\r\n class=\"inline-flex items-center justify-center w-6 h-6 rounded-full bg-primary-100 text-primary-600 text-sm font-semibold\"\r\n >\r\n {{ i + 1 }}\r\n </span>\r\n <span class=\"text-sm font-medium text-muted-color\">{{\r\n t(\"series\")\r\n }}</span>\r\n </div>\r\n <div class=\"flex items-center gap-2\">\r\n <mt-button\r\n icon=\"general.settings-02\"\r\n severity=\"secondary\"\r\n [rounded]=\"true\"\r\n size=\"small\"\r\n (onClick)=\"toggleAdvanced(i)\"\r\n [pTooltip]=\"t('advancedSettings')\"\r\n />\r\n <mt-button\r\n icon=\"general.trash-01\"\r\n severity=\"danger\"\r\n [rounded]=\"true\"\r\n size=\"small\"\r\n [disabled]=\"disabled\"\r\n (onClick)=\"deleteSeries(i)\"\r\n />\r\n </div>\r\n </div>\r\n\r\n <div class=\"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4\">\r\n <!-- Auto Stack Toggle -->\r\n @if (shouldShowField(\"autoStack\")) {\r\n <div class=\"md:col-span-2 lg:col-span-3\">\r\n <mt-toggle-field\r\n [label]=\"t('autoStack')\"\r\n formControlName=\"autoStack\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- Value Property -->\r\n @if (shouldShowField(\"valueProperty\") || series.value.autoStack) {\r\n <mt-select-field\r\n [label]=\"t('valueProperty')\"\r\n formControlName=\"valueProperty\"\r\n [options]=\"\r\n useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\r\n \"\r\n [group]=\"useGroupedSelect()\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [placeholder]=\"t('selectValueProperty')\"\r\n [filter]=\"true\"\r\n />\r\n }\r\n\r\n <!-- Aggregate Function -->\r\n @if (shouldShowField(\"aggregateFunction\")) {\r\n <mt-select-field\r\n [label]=\"t('aggregateFunction')\"\r\n formControlName=\"aggregateFunction\"\r\n [options]=\"aggregateFunctions\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n />\r\n }\r\n\r\n <!-- Color Picker -->\r\n @if (shouldShowField(\"color\")) {\r\n <mt-color-picker-field\r\n [label]=\"t('seriesColor')\"\r\n formControlName=\"color\"\r\n />\r\n }\r\n\r\n <!-- Bar Type (for stacked bar charts) -->\r\n @if (shouldShowField(\"barType\")) {\r\n <mt-select-field\r\n [label]=\"t('barType')\"\r\n formControlName=\"barType\"\r\n [options]=\"barTypes\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n />\r\n }\r\n\r\n <!-- Auto Stack By Property -->\r\n @if (\r\n shouldShowField(\"autoStackByProperty\") && series.value.autoStack\r\n ) {\r\n <mt-select-field\r\n [label]=\"t('autoStackByProperty')\"\r\n formControlName=\"autoStackByProperty\"\r\n [options]=\"\r\n useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\r\n \"\r\n [group]=\"useGroupedSelect()\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [placeholder]=\"t('selectProperty')\"\r\n [filter]=\"true\"\r\n />\r\n }\r\n\r\n <!-- Group By Properties -->\r\n @if (shouldShowField(\"groupByProperties\")) {\r\n <div class=\"col-span-full\">\r\n <mt-string-array-input\r\n [label]=\"t('groupByProperties')\"\r\n formControlName=\"groupByProperties\"\r\n [options]=\"\r\n useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\r\n \"\r\n [group]=\"useGroupedSelect()\"\r\n [placeholder]=\"t('selectProperties')\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- Stack Properties (for stacked charts) -->\r\n @if (shouldShowField(\"stackProperties\") && !series.value.autoStack) {\r\n <div class=\"col-span-full\">\r\n <mt-string-array-input\r\n [label]=\"t('stackProperties')\"\r\n formControlName=\"stackProperties\"\r\n [options]=\"\r\n useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\r\n \"\r\n [group]=\"useGroupedSelect()\"\r\n [placeholder]=\"t('selectProperties')\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- Extra Properties -->\r\n @if (shouldShowField(\"extraProperties\")) {\r\n <div class=\"col-span-full\">\r\n <mt-string-array-input\r\n [label]=\"t('extraProperties')\"\r\n formControlName=\"extraProperties\"\r\n [options]=\"\r\n useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\r\n \"\r\n [group]=\"useGroupedSelect()\"\r\n [placeholder]=\"t('selectProperties')\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n\r\n <!-- Advanced Settings (Formula) -->\r\n @if (series.value.showAdvancedSettings && shouldShowField(\"formula\")) {\r\n <div\r\n class=\"mt-4 p-3 bg-surface-50 rounded-lg border border-surface-200\"\r\n >\r\n <div class=\"text-sm font-medium mb-2\">\r\n {{ t(\"advancedSettings\") }}\r\n </div>\r\n <label class=\"mb-2 block text-sm font-medium\">\r\n {{ t(\"formula\") }}\r\n </label>\r\n <mt-formula-builder\r\n formControlName=\"formula\"\r\n valueMode=\"expression\"\r\n [builderOnly]=\"true\"\r\n [propertiesByPath]=\"formulaPropertiesByPath()\"\r\n [placeholder]=\"t('enterFormula')\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- Filters Section -->\r\n @if (shouldShowField(\"filters\")) {\r\n <div class=\"mt-4 border border-surface-200 rounded-lg p-4\">\r\n <div class=\"flex items-center justify-between mb-3\">\r\n <span class=\"text-sm font-medium\">{{ t(\"seriesFilters\") }}</span>\r\n <mt-button\r\n icon=\"general.plus\"\r\n severity=\"secondary\"\r\n [rounded]=\"true\"\r\n size=\"small\"\r\n [disabled]=\"disabled\"\r\n (onClick)=\"addFilter(i)\"\r\n [pTooltip]=\"t('addFilter')\"\r\n />\r\n </div>\r\n\r\n <div class=\"flex flex-col gap-3\" formArrayName=\"filters\">\r\n @for (\r\n filter of getFilters(series).controls;\r\n track trackByIndex(j);\r\n let j = $index\r\n ) {\r\n <div\r\n class=\"grid grid-cols-12 gap-2 p-3 bg-surface-50 rounded-lg border border-surface-100\"\r\n [formGroupName]=\"j\"\r\n >\r\n <!-- Property Key -->\r\n <div class=\"col-span-4\">\r\n <mt-select-field\r\n [label]=\"j === 0 ? t('property') : ''\"\r\n formControlName=\"propertyKey\"\r\n [options]=\"\r\n useGroupedSelect()\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"useGroupedSelect()\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [placeholder]=\"t('selectProperty')\"\r\n [filter]=\"true\"\r\n />\r\n </div>\r\n\r\n <!-- Operator -->\r\n <div class=\"col-span-2\">\r\n <mt-select-field\r\n [label]=\"j === 0 ? t('operator') : ''\"\r\n formControlName=\"operator\"\r\n [options]=\"operators\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n />\r\n </div>\r\n\r\n <!-- Value -->\r\n <div class=\"col-span-4\">\r\n <mt-text-field\r\n [label]=\"j === 0 ? t('value') : ''\"\r\n formControlName=\"value\"\r\n [placeholder]=\"t('enterValue')\"\r\n />\r\n </div>\r\n\r\n <!-- Remove Filter -->\r\n <div class=\"col-span-2 flex items-end justify-end pb-1\">\r\n <mt-button\r\n icon=\"general.trash-01\"\r\n severity=\"danger\"\r\n [rounded]=\"true\"\r\n size=\"small\"\r\n [disabled]=\"disabled\"\r\n (onClick)=\"removeFilter(i, j)\"\r\n />\r\n </div>\r\n </div>\r\n }\r\n\r\n @if (getFilters(series).length === 0) {\r\n <div class=\"text-center py-3 text-muted-color text-sm\">\r\n {{ t(\"noFiltersConfigured\") }}\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n @if (seriesArray.length === 0) {\r\n <div\r\n class=\"text-center py-8 text-muted-color border border-dashed border-surface-300 rounded-lg\"\r\n >\r\n <i class=\"mti mti-chart-bar text-3xl mb-2 block\"></i>\r\n <p class=\"mb-2\">{{ t(\"noSeriesConfigured\") }}</p>\r\n <mt-button\r\n icon=\"general.plus\"\r\n [label]=\"t('addSeries')\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [disabled]=\"disabled\"\r\n (onClick)=\"addSeries()\"\r\n />\r\n </div>\r\n }\r\n </div>\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.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { 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"], outputs: ["onClick", "onFocus", "onBlur"] }, { 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: TextField, selector: "mt-text-field", inputs: ["field", "hint", "label", "placeholder", "class", "type", "readonly", "pInputs", "required", "maxLength", "icon", "iconPosition"] }, { 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: ColorPickerField, selector: "mt-color-picker-field", inputs: ["label", "appendTo", "placeholder", "class", "variant", "readonly", "pInputs", "required"], outputs: ["onChange"] }, { kind: "component", type: FormulaBuilder, selector: "mt-formula-builder", inputs: ["propertiesByPath", "levelSchemaId", "moduleId", "contextEntityTypeKey", "templateId", "placeholder", "hideToolbar", "hideStatusBar", "toolbarTabs", "codeOnly", "builderOnly", "valueMode", "isProcessBuilder"], outputs: ["validationChange", "tokensChange"] }, { kind: "component", type: StringArrayInput, selector: "mt-string-array-input", inputs: ["label", "placeholder", "options", "group", "optionLabel", "optionValue", "optionGroupLabel", "optionGroupChildren", "filter", "emptyHint"] }, { kind: "directive", type: Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "showOnEllipsis", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip", "pTooltipPT", "pTooltipUnstyled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
33203
|
+
], ngImport: i0, template: "<div\n class=\"flex flex-col gap-4\"\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\n [formGroup]=\"queryForm\"\n>\n <!-- Category Property (shown for certain chart types) -->\n @if (shouldShowField(\"categoryProperty\")) {\n <div class=\"mb-2\">\n <mt-select-field\n [label]=\"t('categoryProperty')\"\n formControlName=\"categoryProperty\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [placeholder]=\"t('selectCategoryProperty')\"\n [filter]=\"true\"\n />\n </div>\n }\n\n <!-- Add Series Button -->\n @if (chartType() !== \"overview\" || seriesArray.length === 0) {\n <div class=\"flex justify-end\">\n <mt-button\n icon=\"general.plus\"\n [label]=\"t('addSeries')\"\n size=\"small\"\n [disabled]=\"disabled\"\n (onClick)=\"addSeries()\"\n />\n </div>\n }\n\n <!-- Series List -->\n <div formArrayName=\"series\" class=\"flex flex-col gap-4\">\n @for (\n series of seriesArray.controls;\n track trackByIndex(i);\n let i = $index\n ) {\n <div\n class=\"p-4 rounded-lg border transition-all\"\n [class.border-red-500]=\"series.invalid\"\n [class.border-surface-200]=\"!series.invalid\"\n [formGroupName]=\"i\"\n >\n <!-- Series Header -->\n <div class=\"flex items-center justify-between mb-4\">\n <div class=\"flex items-center gap-2\">\n <span\n class=\"inline-flex items-center justify-center w-6 h-6 rounded-full bg-primary-100 text-primary-600 text-sm font-semibold\"\n >\n {{ i + 1 }}\n </span>\n <span class=\"text-sm font-medium text-muted-color\">{{\n t(\"series\")\n }}</span>\n </div>\n <div class=\"flex items-center gap-2\">\n @if (shouldShowField(\"formula\")) {\n <button\n type=\"button\"\n class=\"inline-flex min-h-8 items-center justify-center gap-1.5 rounded-md border border-surface-300 bg-surface-0 px-3 py-1.5 text-sm font-medium text-color transition-colors hover:border-primary-400 hover:bg-primary-50 hover:text-primary-700 disabled:cursor-not-allowed disabled:opacity-50\"\n [id]=\"advancedSettingsToggleId(i)\"\n [attr.aria-expanded]=\"\n series.value.showAdvancedSettings ? 'true' : 'false'\n \"\n [attr.aria-controls]=\"advancedSettingsPanelId(i)\"\n [disabled]=\"disabled\"\n (click)=\"toggleAdvanced(i)\"\n >\n <mt-icon\n icon=\"general.settings-02\"\n class=\"text-base\"\n aria-hidden=\"true\"\n />\n <span>\n {{\n t(\n advancedSettingsActionKey(\n series.value.showAdvancedSettings\n )\n )\n }}\n </span>\n </button>\n }\n <mt-button\n icon=\"general.trash-01\"\n severity=\"danger\"\n [rounded]=\"true\"\n size=\"small\"\n [disabled]=\"disabled\"\n (onClick)=\"deleteSeries(i)\"\n />\n </div>\n </div>\n\n <div class=\"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4\">\n <!-- Auto Stack Toggle -->\n @if (shouldShowField(\"autoStack\")) {\n <div class=\"md:col-span-2 lg:col-span-3\">\n <mt-toggle-field\n [label]=\"t('autoStack')\"\n formControlName=\"autoStack\"\n />\n </div>\n }\n\n <!-- Value Property -->\n @if (shouldShowField(\"valueProperty\") || series.value.autoStack) {\n <mt-select-field\n [label]=\"t('valueProperty')\"\n formControlName=\"valueProperty\"\n [options]=\"\n useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\n \"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [placeholder]=\"t('selectValueProperty')\"\n [filter]=\"true\"\n />\n }\n\n <!-- Aggregate Function -->\n @if (shouldShowField(\"aggregateFunction\")) {\n <mt-select-field\n [label]=\"t('aggregateFunction')\"\n formControlName=\"aggregateFunction\"\n [options]=\"aggregateFunctions\"\n optionLabel=\"label\"\n optionValue=\"value\"\n />\n }\n\n <!-- Color Picker -->\n @if (shouldShowField(\"color\")) {\n <mt-color-picker-field\n [label]=\"t('seriesColor')\"\n formControlName=\"color\"\n />\n }\n\n <!-- Bar Type (for stacked bar charts) -->\n @if (shouldShowField(\"barType\")) {\n <mt-select-field\n [label]=\"t('barType')\"\n formControlName=\"barType\"\n [options]=\"barTypes\"\n optionLabel=\"name\"\n optionValue=\"key\"\n />\n }\n\n <!-- Auto Stack By Property -->\n @if (\n shouldShowField(\"autoStackByProperty\") && series.value.autoStack\n ) {\n <mt-select-field\n [label]=\"t('autoStackByProperty')\"\n formControlName=\"autoStackByProperty\"\n [options]=\"\n useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\n \"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [placeholder]=\"t('selectProperty')\"\n [filter]=\"true\"\n />\n }\n\n <!-- Group By Properties -->\n @if (shouldShowField(\"groupByProperties\")) {\n <div class=\"col-span-full\">\n <mt-string-array-input\n [label]=\"t('groupByProperties')\"\n formControlName=\"groupByProperties\"\n [options]=\"\n useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\n \"\n [group]=\"useGroupedSelect()\"\n [placeholder]=\"t('selectProperties')\"\n />\n </div>\n }\n\n <!-- Stack Properties (for stacked charts) -->\n @if (shouldShowField(\"stackProperties\") && !series.value.autoStack) {\n <div class=\"col-span-full\">\n <mt-string-array-input\n [label]=\"t('stackProperties')\"\n formControlName=\"stackProperties\"\n [options]=\"\n useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\n \"\n [group]=\"useGroupedSelect()\"\n [placeholder]=\"t('selectProperties')\"\n />\n </div>\n }\n\n <!-- Extra Properties -->\n @if (shouldShowField(\"extraProperties\")) {\n <div class=\"col-span-full\">\n <mt-string-array-input\n [label]=\"t('extraProperties')\"\n formControlName=\"extraProperties\"\n [options]=\"\n useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\n \"\n [group]=\"useGroupedSelect()\"\n [placeholder]=\"t('selectProperties')\"\n />\n </div>\n }\n </div>\n\n <!-- Advanced Settings (Formula) -->\n @if (series.value.showAdvancedSettings && shouldShowField(\"formula\")) {\n <div\n [id]=\"advancedSettingsPanelId(i)\"\n role=\"region\"\n [attr.aria-labelledby]=\"advancedSettingsToggleId(i)\"\n class=\"mt-4 p-3 bg-surface-50 rounded-lg border border-surface-200\"\n >\n <div class=\"text-sm font-medium mb-2\">\n {{ t(\"advancedSettings\") }}\n </div>\n <label class=\"mb-2 block text-sm font-medium\">\n {{ t(\"formula\") }}\n </label>\n <mt-formula-builder\n formControlName=\"formula\"\n valueMode=\"expression\"\n [builderOnly]=\"true\"\n [propertiesByPath]=\"formulaPropertiesByPath()\"\n [placeholder]=\"t('enterFormula')\"\n />\n </div>\n }\n\n <!-- Filters Section -->\n @if (shouldShowField(\"filters\")) {\n <div class=\"mt-4 border border-surface-200 rounded-lg p-4\">\n <div class=\"flex items-center justify-between mb-3\">\n <span class=\"text-sm font-medium\">{{ t(\"seriesFilters\") }}</span>\n <mt-button\n icon=\"general.plus\"\n severity=\"secondary\"\n [rounded]=\"true\"\n size=\"small\"\n [disabled]=\"disabled\"\n (onClick)=\"addFilter(i)\"\n [pTooltip]=\"t('addFilter')\"\n />\n </div>\n\n <div class=\"flex flex-col gap-3\" formArrayName=\"filters\">\n @for (\n filter of getFilters(series).controls;\n track trackByIndex(j);\n let j = $index\n ) {\n <div\n class=\"grid grid-cols-12 gap-2 p-3 bg-surface-50 rounded-lg border border-surface-100\"\n [formGroupName]=\"j\"\n >\n <!-- Property Key -->\n <div class=\"col-span-4\">\n <mt-select-field\n [label]=\"j === 0 ? t('property') : ''\"\n formControlName=\"propertyKey\"\n [options]=\"\n useGroupedSelect()\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [placeholder]=\"t('selectProperty')\"\n [filter]=\"true\"\n />\n </div>\n\n <!-- Operator -->\n <div class=\"col-span-2\">\n <mt-select-field\n [label]=\"j === 0 ? t('operator') : ''\"\n formControlName=\"operator\"\n [options]=\"operators\"\n optionLabel=\"label\"\n optionValue=\"value\"\n />\n </div>\n\n <!-- Value -->\n <div class=\"col-span-4\">\n <mt-text-field\n [label]=\"j === 0 ? t('value') : ''\"\n formControlName=\"value\"\n [placeholder]=\"t('enterValue')\"\n />\n </div>\n\n <!-- Remove Filter -->\n <div class=\"col-span-2 flex items-end justify-end pb-1\">\n <mt-button\n icon=\"general.trash-01\"\n severity=\"danger\"\n [rounded]=\"true\"\n size=\"small\"\n [disabled]=\"disabled\"\n (onClick)=\"removeFilter(i, j)\"\n />\n </div>\n </div>\n }\n\n @if (getFilters(series).length === 0) {\n <div class=\"text-center py-3 text-muted-color text-sm\">\n {{ t(\"noFiltersConfigured\") }}\n </div>\n }\n </div>\n </div>\n }\n </div>\n }\n\n @if (seriesArray.length === 0) {\n <div\n class=\"text-center py-8 text-muted-color border border-dashed border-surface-300 rounded-lg\"\n >\n <i class=\"mti mti-chart-bar text-3xl mb-2 block\"></i>\n <p class=\"mb-2\">{{ t(\"noSeriesConfigured\") }}</p>\n <mt-button\n icon=\"general.plus\"\n [label]=\"t('addSeries')\"\n severity=\"secondary\"\n size=\"small\"\n [disabled]=\"disabled\"\n (onClick)=\"addSeries()\"\n />\n </div>\n }\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { 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"], outputs: ["onClick", "onFocus", "onBlur"] }, { 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: TextField, selector: "mt-text-field", inputs: ["field", "hint", "label", "placeholder", "class", "type", "readonly", "pInputs", "required", "maxLength", "icon", "iconPosition"] }, { 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: ColorPickerField, selector: "mt-color-picker-field", inputs: ["label", "appendTo", "placeholder", "class", "variant", "readonly", "pInputs", "required"], outputs: ["onChange"] }, { kind: "component", type: FormulaBuilder, selector: "mt-formula-builder", inputs: ["propertiesByPath", "levelSchemaId", "moduleId", "contextEntityTypeKey", "templateId", "placeholder", "hideToolbar", "hideStatusBar", "toolbarTabs", "codeOnly", "builderOnly", "valueMode", "isProcessBuilder"], outputs: ["validationChange", "tokensChange"] }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }, { kind: "component", type: StringArrayInput, selector: "mt-string-array-input", inputs: ["label", "placeholder", "options", "group", "optionLabel", "optionValue", "optionGroupLabel", "optionGroupChildren", "filter", "emptyHint"] }, { kind: "directive", type: Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "showOnEllipsis", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip", "pTooltipPT", "pTooltipUnstyled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
32769
33204
|
}
|
|
32770
33205
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: GeneralQuery, decorators: [{
|
|
32771
33206
|
type: Component,
|
|
@@ -32780,6 +33215,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
32780
33215
|
ToggleField,
|
|
32781
33216
|
ColorPickerField,
|
|
32782
33217
|
FormulaBuilder,
|
|
33218
|
+
Icon,
|
|
32783
33219
|
StringArrayInput,
|
|
32784
33220
|
Tooltip,
|
|
32785
33221
|
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
|
|
@@ -32793,7 +33229,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
32793
33229
|
useExisting: forwardRef(() => GeneralQuery),
|
|
32794
33230
|
multi: true,
|
|
32795
33231
|
},
|
|
32796
|
-
], template: "<div\r\n class=\"flex flex-col gap-4\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n [formGroup]=\"queryForm\"\r\n>\r\n <!-- Category Property (shown for certain chart types) -->\r\n @if (shouldShowField(\"categoryProperty\")) {\r\n <div class=\"mb-2\">\r\n <mt-select-field\r\n [label]=\"t('categoryProperty')\"\r\n formControlName=\"categoryProperty\"\r\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\r\n [group]=\"useGroupedSelect()\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [placeholder]=\"t('selectCategoryProperty')\"\r\n [filter]=\"true\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- Add Series Button -->\r\n @if (chartType() !== \"overview\" || seriesArray.length === 0) {\r\n <div class=\"flex justify-end\">\r\n <mt-button\r\n icon=\"general.plus\"\r\n [label]=\"t('addSeries')\"\r\n size=\"small\"\r\n [disabled]=\"disabled\"\r\n (onClick)=\"addSeries()\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- Series List -->\r\n <div formArrayName=\"series\" class=\"flex flex-col gap-4\">\r\n @for (\r\n series of seriesArray.controls;\r\n track trackByIndex(i);\r\n let i = $index\r\n ) {\r\n <div\r\n class=\"p-4 rounded-lg border transition-all\"\r\n [class.border-red-500]=\"series.invalid\"\r\n [class.border-surface-200]=\"!series.invalid\"\r\n [formGroupName]=\"i\"\r\n >\r\n <!-- Series Header -->\r\n <div class=\"flex items-center justify-between mb-4\">\r\n <div class=\"flex items-center gap-2\">\r\n <span\r\n class=\"inline-flex items-center justify-center w-6 h-6 rounded-full bg-primary-100 text-primary-600 text-sm font-semibold\"\r\n >\r\n {{ i + 1 }}\r\n </span>\r\n <span class=\"text-sm font-medium text-muted-color\">{{\r\n t(\"series\")\r\n }}</span>\r\n </div>\r\n <div class=\"flex items-center gap-2\">\r\n <mt-button\r\n icon=\"general.settings-02\"\r\n severity=\"secondary\"\r\n [rounded]=\"true\"\r\n size=\"small\"\r\n (onClick)=\"toggleAdvanced(i)\"\r\n [pTooltip]=\"t('advancedSettings')\"\r\n />\r\n <mt-button\r\n icon=\"general.trash-01\"\r\n severity=\"danger\"\r\n [rounded]=\"true\"\r\n size=\"small\"\r\n [disabled]=\"disabled\"\r\n (onClick)=\"deleteSeries(i)\"\r\n />\r\n </div>\r\n </div>\r\n\r\n <div class=\"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4\">\r\n <!-- Auto Stack Toggle -->\r\n @if (shouldShowField(\"autoStack\")) {\r\n <div class=\"md:col-span-2 lg:col-span-3\">\r\n <mt-toggle-field\r\n [label]=\"t('autoStack')\"\r\n formControlName=\"autoStack\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- Value Property -->\r\n @if (shouldShowField(\"valueProperty\") || series.value.autoStack) {\r\n <mt-select-field\r\n [label]=\"t('valueProperty')\"\r\n formControlName=\"valueProperty\"\r\n [options]=\"\r\n useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\r\n \"\r\n [group]=\"useGroupedSelect()\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [placeholder]=\"t('selectValueProperty')\"\r\n [filter]=\"true\"\r\n />\r\n }\r\n\r\n <!-- Aggregate Function -->\r\n @if (shouldShowField(\"aggregateFunction\")) {\r\n <mt-select-field\r\n [label]=\"t('aggregateFunction')\"\r\n formControlName=\"aggregateFunction\"\r\n [options]=\"aggregateFunctions\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n />\r\n }\r\n\r\n <!-- Color Picker -->\r\n @if (shouldShowField(\"color\")) {\r\n <mt-color-picker-field\r\n [label]=\"t('seriesColor')\"\r\n formControlName=\"color\"\r\n />\r\n }\r\n\r\n <!-- Bar Type (for stacked bar charts) -->\r\n @if (shouldShowField(\"barType\")) {\r\n <mt-select-field\r\n [label]=\"t('barType')\"\r\n formControlName=\"barType\"\r\n [options]=\"barTypes\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n />\r\n }\r\n\r\n <!-- Auto Stack By Property -->\r\n @if (\r\n shouldShowField(\"autoStackByProperty\") && series.value.autoStack\r\n ) {\r\n <mt-select-field\r\n [label]=\"t('autoStackByProperty')\"\r\n formControlName=\"autoStackByProperty\"\r\n [options]=\"\r\n useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\r\n \"\r\n [group]=\"useGroupedSelect()\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [placeholder]=\"t('selectProperty')\"\r\n [filter]=\"true\"\r\n />\r\n }\r\n\r\n <!-- Group By Properties -->\r\n @if (shouldShowField(\"groupByProperties\")) {\r\n <div class=\"col-span-full\">\r\n <mt-string-array-input\r\n [label]=\"t('groupByProperties')\"\r\n formControlName=\"groupByProperties\"\r\n [options]=\"\r\n useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\r\n \"\r\n [group]=\"useGroupedSelect()\"\r\n [placeholder]=\"t('selectProperties')\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- Stack Properties (for stacked charts) -->\r\n @if (shouldShowField(\"stackProperties\") && !series.value.autoStack) {\r\n <div class=\"col-span-full\">\r\n <mt-string-array-input\r\n [label]=\"t('stackProperties')\"\r\n formControlName=\"stackProperties\"\r\n [options]=\"\r\n useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\r\n \"\r\n [group]=\"useGroupedSelect()\"\r\n [placeholder]=\"t('selectProperties')\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- Extra Properties -->\r\n @if (shouldShowField(\"extraProperties\")) {\r\n <div class=\"col-span-full\">\r\n <mt-string-array-input\r\n [label]=\"t('extraProperties')\"\r\n formControlName=\"extraProperties\"\r\n [options]=\"\r\n useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\r\n \"\r\n [group]=\"useGroupedSelect()\"\r\n [placeholder]=\"t('selectProperties')\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n\r\n <!-- Advanced Settings (Formula) -->\r\n @if (series.value.showAdvancedSettings && shouldShowField(\"formula\")) {\r\n <div\r\n class=\"mt-4 p-3 bg-surface-50 rounded-lg border border-surface-200\"\r\n >\r\n <div class=\"text-sm font-medium mb-2\">\r\n {{ t(\"advancedSettings\") }}\r\n </div>\r\n <label class=\"mb-2 block text-sm font-medium\">\r\n {{ t(\"formula\") }}\r\n </label>\r\n <mt-formula-builder\r\n formControlName=\"formula\"\r\n valueMode=\"expression\"\r\n [builderOnly]=\"true\"\r\n [propertiesByPath]=\"formulaPropertiesByPath()\"\r\n [placeholder]=\"t('enterFormula')\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- Filters Section -->\r\n @if (shouldShowField(\"filters\")) {\r\n <div class=\"mt-4 border border-surface-200 rounded-lg p-4\">\r\n <div class=\"flex items-center justify-between mb-3\">\r\n <span class=\"text-sm font-medium\">{{ t(\"seriesFilters\") }}</span>\r\n <mt-button\r\n icon=\"general.plus\"\r\n severity=\"secondary\"\r\n [rounded]=\"true\"\r\n size=\"small\"\r\n [disabled]=\"disabled\"\r\n (onClick)=\"addFilter(i)\"\r\n [pTooltip]=\"t('addFilter')\"\r\n />\r\n </div>\r\n\r\n <div class=\"flex flex-col gap-3\" formArrayName=\"filters\">\r\n @for (\r\n filter of getFilters(series).controls;\r\n track trackByIndex(j);\r\n let j = $index\r\n ) {\r\n <div\r\n class=\"grid grid-cols-12 gap-2 p-3 bg-surface-50 rounded-lg border border-surface-100\"\r\n [formGroupName]=\"j\"\r\n >\r\n <!-- Property Key -->\r\n <div class=\"col-span-4\">\r\n <mt-select-field\r\n [label]=\"j === 0 ? t('property') : ''\"\r\n formControlName=\"propertyKey\"\r\n [options]=\"\r\n useGroupedSelect()\r\n ? propertiesGrouped()\r\n : propertiesFlat()\r\n \"\r\n [group]=\"useGroupedSelect()\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [placeholder]=\"t('selectProperty')\"\r\n [filter]=\"true\"\r\n />\r\n </div>\r\n\r\n <!-- Operator -->\r\n <div class=\"col-span-2\">\r\n <mt-select-field\r\n [label]=\"j === 0 ? t('operator') : ''\"\r\n formControlName=\"operator\"\r\n [options]=\"operators\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n />\r\n </div>\r\n\r\n <!-- Value -->\r\n <div class=\"col-span-4\">\r\n <mt-text-field\r\n [label]=\"j === 0 ? t('value') : ''\"\r\n formControlName=\"value\"\r\n [placeholder]=\"t('enterValue')\"\r\n />\r\n </div>\r\n\r\n <!-- Remove Filter -->\r\n <div class=\"col-span-2 flex items-end justify-end pb-1\">\r\n <mt-button\r\n icon=\"general.trash-01\"\r\n severity=\"danger\"\r\n [rounded]=\"true\"\r\n size=\"small\"\r\n [disabled]=\"disabled\"\r\n (onClick)=\"removeFilter(i, j)\"\r\n />\r\n </div>\r\n </div>\r\n }\r\n\r\n @if (getFilters(series).length === 0) {\r\n <div class=\"text-center py-3 text-muted-color text-sm\">\r\n {{ t(\"noFiltersConfigured\") }}\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n @if (seriesArray.length === 0) {\r\n <div\r\n class=\"text-center py-8 text-muted-color border border-dashed border-surface-300 rounded-lg\"\r\n >\r\n <i class=\"mti mti-chart-bar text-3xl mb-2 block\"></i>\r\n <p class=\"mb-2\">{{ t(\"noSeriesConfigured\") }}</p>\r\n <mt-button\r\n icon=\"general.plus\"\r\n [label]=\"t('addSeries')\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [disabled]=\"disabled\"\r\n (onClick)=\"addSeries()\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n" }]
|
|
33232
|
+
], template: "<div\n class=\"flex flex-col gap-4\"\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\n [formGroup]=\"queryForm\"\n>\n <!-- Category Property (shown for certain chart types) -->\n @if (shouldShowField(\"categoryProperty\")) {\n <div class=\"mb-2\">\n <mt-select-field\n [label]=\"t('categoryProperty')\"\n formControlName=\"categoryProperty\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [placeholder]=\"t('selectCategoryProperty')\"\n [filter]=\"true\"\n />\n </div>\n }\n\n <!-- Add Series Button -->\n @if (chartType() !== \"overview\" || seriesArray.length === 0) {\n <div class=\"flex justify-end\">\n <mt-button\n icon=\"general.plus\"\n [label]=\"t('addSeries')\"\n size=\"small\"\n [disabled]=\"disabled\"\n (onClick)=\"addSeries()\"\n />\n </div>\n }\n\n <!-- Series List -->\n <div formArrayName=\"series\" class=\"flex flex-col gap-4\">\n @for (\n series of seriesArray.controls;\n track trackByIndex(i);\n let i = $index\n ) {\n <div\n class=\"p-4 rounded-lg border transition-all\"\n [class.border-red-500]=\"series.invalid\"\n [class.border-surface-200]=\"!series.invalid\"\n [formGroupName]=\"i\"\n >\n <!-- Series Header -->\n <div class=\"flex items-center justify-between mb-4\">\n <div class=\"flex items-center gap-2\">\n <span\n class=\"inline-flex items-center justify-center w-6 h-6 rounded-full bg-primary-100 text-primary-600 text-sm font-semibold\"\n >\n {{ i + 1 }}\n </span>\n <span class=\"text-sm font-medium text-muted-color\">{{\n t(\"series\")\n }}</span>\n </div>\n <div class=\"flex items-center gap-2\">\n @if (shouldShowField(\"formula\")) {\n <button\n type=\"button\"\n class=\"inline-flex min-h-8 items-center justify-center gap-1.5 rounded-md border border-surface-300 bg-surface-0 px-3 py-1.5 text-sm font-medium text-color transition-colors hover:border-primary-400 hover:bg-primary-50 hover:text-primary-700 disabled:cursor-not-allowed disabled:opacity-50\"\n [id]=\"advancedSettingsToggleId(i)\"\n [attr.aria-expanded]=\"\n series.value.showAdvancedSettings ? 'true' : 'false'\n \"\n [attr.aria-controls]=\"advancedSettingsPanelId(i)\"\n [disabled]=\"disabled\"\n (click)=\"toggleAdvanced(i)\"\n >\n <mt-icon\n icon=\"general.settings-02\"\n class=\"text-base\"\n aria-hidden=\"true\"\n />\n <span>\n {{\n t(\n advancedSettingsActionKey(\n series.value.showAdvancedSettings\n )\n )\n }}\n </span>\n </button>\n }\n <mt-button\n icon=\"general.trash-01\"\n severity=\"danger\"\n [rounded]=\"true\"\n size=\"small\"\n [disabled]=\"disabled\"\n (onClick)=\"deleteSeries(i)\"\n />\n </div>\n </div>\n\n <div class=\"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4\">\n <!-- Auto Stack Toggle -->\n @if (shouldShowField(\"autoStack\")) {\n <div class=\"md:col-span-2 lg:col-span-3\">\n <mt-toggle-field\n [label]=\"t('autoStack')\"\n formControlName=\"autoStack\"\n />\n </div>\n }\n\n <!-- Value Property -->\n @if (shouldShowField(\"valueProperty\") || series.value.autoStack) {\n <mt-select-field\n [label]=\"t('valueProperty')\"\n formControlName=\"valueProperty\"\n [options]=\"\n useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\n \"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [placeholder]=\"t('selectValueProperty')\"\n [filter]=\"true\"\n />\n }\n\n <!-- Aggregate Function -->\n @if (shouldShowField(\"aggregateFunction\")) {\n <mt-select-field\n [label]=\"t('aggregateFunction')\"\n formControlName=\"aggregateFunction\"\n [options]=\"aggregateFunctions\"\n optionLabel=\"label\"\n optionValue=\"value\"\n />\n }\n\n <!-- Color Picker -->\n @if (shouldShowField(\"color\")) {\n <mt-color-picker-field\n [label]=\"t('seriesColor')\"\n formControlName=\"color\"\n />\n }\n\n <!-- Bar Type (for stacked bar charts) -->\n @if (shouldShowField(\"barType\")) {\n <mt-select-field\n [label]=\"t('barType')\"\n formControlName=\"barType\"\n [options]=\"barTypes\"\n optionLabel=\"name\"\n optionValue=\"key\"\n />\n }\n\n <!-- Auto Stack By Property -->\n @if (\n shouldShowField(\"autoStackByProperty\") && series.value.autoStack\n ) {\n <mt-select-field\n [label]=\"t('autoStackByProperty')\"\n formControlName=\"autoStackByProperty\"\n [options]=\"\n useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\n \"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [placeholder]=\"t('selectProperty')\"\n [filter]=\"true\"\n />\n }\n\n <!-- Group By Properties -->\n @if (shouldShowField(\"groupByProperties\")) {\n <div class=\"col-span-full\">\n <mt-string-array-input\n [label]=\"t('groupByProperties')\"\n formControlName=\"groupByProperties\"\n [options]=\"\n useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\n \"\n [group]=\"useGroupedSelect()\"\n [placeholder]=\"t('selectProperties')\"\n />\n </div>\n }\n\n <!-- Stack Properties (for stacked charts) -->\n @if (shouldShowField(\"stackProperties\") && !series.value.autoStack) {\n <div class=\"col-span-full\">\n <mt-string-array-input\n [label]=\"t('stackProperties')\"\n formControlName=\"stackProperties\"\n [options]=\"\n useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\n \"\n [group]=\"useGroupedSelect()\"\n [placeholder]=\"t('selectProperties')\"\n />\n </div>\n }\n\n <!-- Extra Properties -->\n @if (shouldShowField(\"extraProperties\")) {\n <div class=\"col-span-full\">\n <mt-string-array-input\n [label]=\"t('extraProperties')\"\n formControlName=\"extraProperties\"\n [options]=\"\n useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\n \"\n [group]=\"useGroupedSelect()\"\n [placeholder]=\"t('selectProperties')\"\n />\n </div>\n }\n </div>\n\n <!-- Advanced Settings (Formula) -->\n @if (series.value.showAdvancedSettings && shouldShowField(\"formula\")) {\n <div\n [id]=\"advancedSettingsPanelId(i)\"\n role=\"region\"\n [attr.aria-labelledby]=\"advancedSettingsToggleId(i)\"\n class=\"mt-4 p-3 bg-surface-50 rounded-lg border border-surface-200\"\n >\n <div class=\"text-sm font-medium mb-2\">\n {{ t(\"advancedSettings\") }}\n </div>\n <label class=\"mb-2 block text-sm font-medium\">\n {{ t(\"formula\") }}\n </label>\n <mt-formula-builder\n formControlName=\"formula\"\n valueMode=\"expression\"\n [builderOnly]=\"true\"\n [propertiesByPath]=\"formulaPropertiesByPath()\"\n [placeholder]=\"t('enterFormula')\"\n />\n </div>\n }\n\n <!-- Filters Section -->\n @if (shouldShowField(\"filters\")) {\n <div class=\"mt-4 border border-surface-200 rounded-lg p-4\">\n <div class=\"flex items-center justify-between mb-3\">\n <span class=\"text-sm font-medium\">{{ t(\"seriesFilters\") }}</span>\n <mt-button\n icon=\"general.plus\"\n severity=\"secondary\"\n [rounded]=\"true\"\n size=\"small\"\n [disabled]=\"disabled\"\n (onClick)=\"addFilter(i)\"\n [pTooltip]=\"t('addFilter')\"\n />\n </div>\n\n <div class=\"flex flex-col gap-3\" formArrayName=\"filters\">\n @for (\n filter of getFilters(series).controls;\n track trackByIndex(j);\n let j = $index\n ) {\n <div\n class=\"grid grid-cols-12 gap-2 p-3 bg-surface-50 rounded-lg border border-surface-100\"\n [formGroupName]=\"j\"\n >\n <!-- Property Key -->\n <div class=\"col-span-4\">\n <mt-select-field\n [label]=\"j === 0 ? t('property') : ''\"\n formControlName=\"propertyKey\"\n [options]=\"\n useGroupedSelect()\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [placeholder]=\"t('selectProperty')\"\n [filter]=\"true\"\n />\n </div>\n\n <!-- Operator -->\n <div class=\"col-span-2\">\n <mt-select-field\n [label]=\"j === 0 ? t('operator') : ''\"\n formControlName=\"operator\"\n [options]=\"operators\"\n optionLabel=\"label\"\n optionValue=\"value\"\n />\n </div>\n\n <!-- Value -->\n <div class=\"col-span-4\">\n <mt-text-field\n [label]=\"j === 0 ? t('value') : ''\"\n formControlName=\"value\"\n [placeholder]=\"t('enterValue')\"\n />\n </div>\n\n <!-- Remove Filter -->\n <div class=\"col-span-2 flex items-end justify-end pb-1\">\n <mt-button\n icon=\"general.trash-01\"\n severity=\"danger\"\n [rounded]=\"true\"\n size=\"small\"\n [disabled]=\"disabled\"\n (onClick)=\"removeFilter(i, j)\"\n />\n </div>\n </div>\n }\n\n @if (getFilters(series).length === 0) {\n <div class=\"text-center py-3 text-muted-color text-sm\">\n {{ t(\"noFiltersConfigured\") }}\n </div>\n }\n </div>\n </div>\n }\n </div>\n }\n\n @if (seriesArray.length === 0) {\n <div\n class=\"text-center py-8 text-muted-color border border-dashed border-surface-300 rounded-lg\"\n >\n <i class=\"mti mti-chart-bar text-3xl mb-2 block\"></i>\n <p class=\"mb-2\">{{ t(\"noSeriesConfigured\") }}</p>\n <mt-button\n icon=\"general.plus\"\n [label]=\"t('addSeries')\"\n severity=\"secondary\"\n size=\"small\"\n [disabled]=\"disabled\"\n (onClick)=\"addSeries()\"\n />\n </div>\n }\n </div>\n</div>\n" }]
|
|
32797
33233
|
}], ctorParameters: () => [], propDecorators: { chartType: [{ type: i0.Input, args: [{ isSignal: true, alias: "chartType", required: false }] }], querySchema: [{ type: i0.Input, args: [{ isSignal: true, alias: "querySchema", required: false }] }], propertiesFlat: [{ type: i0.Input, args: [{ isSignal: true, alias: "propertiesFlat", required: false }] }], propertiesGrouped: [{ type: i0.Input, args: [{ isSignal: true, alias: "propertiesGrouped", required: false }] }] } });
|
|
32798
33234
|
|
|
32799
33235
|
/**
|
|
@@ -33020,7 +33456,7 @@ class TimelineQuery {
|
|
|
33020
33456
|
useExisting: forwardRef(() => TimelineQuery),
|
|
33021
33457
|
multi: true,
|
|
33022
33458
|
},
|
|
33023
|
-
], ngImport: i0, template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\
|
|
33459
|
+
], ngImport: i0, template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n <!-- Pivot Property -->\n <mt-select-field\n [label]=\"t('pivotProperty')\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('selectProperty')\"\n [ngModel]=\"query().pivotProperty\"\n (ngModelChange)=\"updateField('pivotProperty', $event)\"\n [disabled]=\"disabled\"\n />\n\n <!-- Lookup Property -->\n <mt-select-field\n [label]=\"t('lookupProperty')\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('selectProperty')\"\n [ngModel]=\"query().lookupProperty\"\n (ngModelChange)=\"updateField('lookupProperty', $event)\"\n [disabled]=\"disabled\"\n />\n\n <!-- Time Frame -->\n <mt-select-field\n [label]=\"t('timeFrame')\"\n [options]=\"timeFrameOptions\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [placeholder]=\"t('selectTimeFrame')\"\n [ngModel]=\"query().timeFrame\"\n (ngModelChange)=\"updateField('timeFrame', $event)\"\n [disabled]=\"disabled\"\n />\n\n <!-- Start Point Time Property -->\n <mt-select-field\n [label]=\"t('startPointTimeProperty')\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('selectProperty')\"\n [ngModel]=\"query().startPoint_timeProperty\"\n (ngModelChange)=\"updateField('startPoint_timeProperty', $event)\"\n [disabled]=\"disabled\"\n />\n\n <!-- End Point Time Property -->\n <mt-select-field\n [label]=\"t('endPointTimeProperty')\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('selectProperty')\"\n [ngModel]=\"query().endPoint_timeProperty\"\n (ngModelChange)=\"updateField('endPoint_timeProperty', $event)\"\n [disabled]=\"disabled\"\n />\n </div>\n\n <!-- Extra Properties -->\n <div class=\"w-full\">\n <mt-multi-select-field\n [label]=\"t('extraProperties')\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('selectProperties')\"\n [ngModel]=\"query().extraProperties\"\n (ngModelChange)=\"updateField('extraProperties', $event)\"\n [disabled]=\"disabled\"\n />\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { 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: MultiSelectField, selector: "mt-multi-select-field", inputs: ["field", "label", "placeholder", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "display", "required", "maxSelectedLabels", "group", "virtualScroll", "virtualScrollItemSize", "optionGroupLabel", "optionGroupChildren", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape"], outputs: ["onChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
33024
33460
|
}
|
|
33025
33461
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TimelineQuery, decorators: [{
|
|
33026
33462
|
type: Component,
|
|
@@ -33036,7 +33472,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
33036
33472
|
useExisting: forwardRef(() => TimelineQuery),
|
|
33037
33473
|
multi: true,
|
|
33038
33474
|
},
|
|
33039
|
-
], template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\
|
|
33475
|
+
], template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n <!-- Pivot Property -->\n <mt-select-field\n [label]=\"t('pivotProperty')\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('selectProperty')\"\n [ngModel]=\"query().pivotProperty\"\n (ngModelChange)=\"updateField('pivotProperty', $event)\"\n [disabled]=\"disabled\"\n />\n\n <!-- Lookup Property -->\n <mt-select-field\n [label]=\"t('lookupProperty')\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('selectProperty')\"\n [ngModel]=\"query().lookupProperty\"\n (ngModelChange)=\"updateField('lookupProperty', $event)\"\n [disabled]=\"disabled\"\n />\n\n <!-- Time Frame -->\n <mt-select-field\n [label]=\"t('timeFrame')\"\n [options]=\"timeFrameOptions\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [placeholder]=\"t('selectTimeFrame')\"\n [ngModel]=\"query().timeFrame\"\n (ngModelChange)=\"updateField('timeFrame', $event)\"\n [disabled]=\"disabled\"\n />\n\n <!-- Start Point Time Property -->\n <mt-select-field\n [label]=\"t('startPointTimeProperty')\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('selectProperty')\"\n [ngModel]=\"query().startPoint_timeProperty\"\n (ngModelChange)=\"updateField('startPoint_timeProperty', $event)\"\n [disabled]=\"disabled\"\n />\n\n <!-- End Point Time Property -->\n <mt-select-field\n [label]=\"t('endPointTimeProperty')\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('selectProperty')\"\n [ngModel]=\"query().endPoint_timeProperty\"\n (ngModelChange)=\"updateField('endPoint_timeProperty', $event)\"\n [disabled]=\"disabled\"\n />\n </div>\n\n <!-- Extra Properties -->\n <div class=\"w-full\">\n <mt-multi-select-field\n [label]=\"t('extraProperties')\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('selectProperties')\"\n [ngModel]=\"query().extraProperties\"\n (ngModelChange)=\"updateField('extraProperties', $event)\"\n [disabled]=\"disabled\"\n />\n </div>\n</div>\n" }]
|
|
33040
33476
|
}], propDecorators: { propertiesFlat: [{ type: i0.Input, args: [{ isSignal: true, alias: "propertiesFlat", required: false }] }], propertiesGrouped: [{ type: i0.Input, args: [{ isSignal: true, alias: "propertiesGrouped", required: false }] }] } });
|
|
33041
33477
|
|
|
33042
33478
|
/**
|
|
@@ -33465,7 +33901,7 @@ class MapQuery {
|
|
|
33465
33901
|
useExisting: forwardRef(() => MapQuery),
|
|
33466
33902
|
multi: true,
|
|
33467
33903
|
},
|
|
33468
|
-
], ngImport: i0, template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\
|
|
33904
|
+
], ngImport: i0, template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n <!-- Location Property -->\n <mt-select-field\n [label]=\"t('locationProperty')\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('selectProperty')\"\n [ngModel]=\"query().locationProperty\"\n (ngModelChange)=\"updateField('locationProperty', $event)\"\n [disabled]=\"disabled\"\n />\n\n <!-- Grouping Property -->\n <mt-select-field\n [label]=\"t('groupingProperty')\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('selectProperty')\"\n [ngModel]=\"query().groupingProperty\"\n (ngModelChange)=\"updateField('groupingProperty', $event)\"\n [disabled]=\"disabled\"\n />\n </div>\n\n <!-- Extra Properties -->\n <div class=\"w-full\">\n <mt-multi-select-field\n [label]=\"t('extraProperties')\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('selectProperties')\"\n [ngModel]=\"query().extraProperties\"\n (ngModelChange)=\"updateField('extraProperties', $event)\"\n [disabled]=\"disabled\"\n />\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { 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: MultiSelectField, selector: "mt-multi-select-field", inputs: ["field", "label", "placeholder", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "display", "required", "maxSelectedLabels", "group", "virtualScroll", "virtualScrollItemSize", "optionGroupLabel", "optionGroupChildren", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape"], outputs: ["onChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
33469
33905
|
}
|
|
33470
33906
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: MapQuery, decorators: [{
|
|
33471
33907
|
type: Component,
|
|
@@ -33481,7 +33917,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
33481
33917
|
useExisting: forwardRef(() => MapQuery),
|
|
33482
33918
|
multi: true,
|
|
33483
33919
|
},
|
|
33484
|
-
], template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\
|
|
33920
|
+
], template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n <!-- Location Property -->\n <mt-select-field\n [label]=\"t('locationProperty')\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('selectProperty')\"\n [ngModel]=\"query().locationProperty\"\n (ngModelChange)=\"updateField('locationProperty', $event)\"\n [disabled]=\"disabled\"\n />\n\n <!-- Grouping Property -->\n <mt-select-field\n [label]=\"t('groupingProperty')\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('selectProperty')\"\n [ngModel]=\"query().groupingProperty\"\n (ngModelChange)=\"updateField('groupingProperty', $event)\"\n [disabled]=\"disabled\"\n />\n </div>\n\n <!-- Extra Properties -->\n <div class=\"w-full\">\n <mt-multi-select-field\n [label]=\"t('extraProperties')\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('selectProperties')\"\n [ngModel]=\"query().extraProperties\"\n (ngModelChange)=\"updateField('extraProperties', $event)\"\n [disabled]=\"disabled\"\n />\n </div>\n</div>\n" }]
|
|
33485
33921
|
}], propDecorators: { propertiesFlat: [{ type: i0.Input, args: [{ isSignal: true, alias: "propertiesFlat", required: false }] }], propertiesGrouped: [{ type: i0.Input, args: [{ isSignal: true, alias: "propertiesGrouped", required: false }] }] } });
|
|
33486
33922
|
|
|
33487
33923
|
/**
|
|
@@ -33555,7 +33991,7 @@ class SplitterQuery {
|
|
|
33555
33991
|
useExisting: forwardRef(() => SplitterQuery),
|
|
33556
33992
|
multi: true,
|
|
33557
33993
|
},
|
|
33558
|
-
], ngImport: i0, template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\
|
|
33994
|
+
], ngImport: i0, template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\n <!-- Pivot Property -->\n <mt-select-field\n [label]=\"t('pivotProperty')\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('selectProperty')\"\n [ngModel]=\"query().pivotProperty\"\n (ngModelChange)=\"updateField('pivotProperty', $event)\"\n [disabled]=\"disabled\"\n />\n\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n <!-- Positive Values -->\n <mt-text-field\n [label]=\"t('positiveValues')\"\n [placeholder]=\"t('enterValuesCommaSeparated')\"\n [ngModel]=\"getArrayAsString('PositiveValues')\"\n (ngModelChange)=\"updateArrayFromString('PositiveValues', $event)\"\n [disabled]=\"disabled\"\n />\n\n <!-- Negative Values -->\n <mt-text-field\n [label]=\"t('negativeValues')\"\n [placeholder]=\"t('enterValuesCommaSeparated')\"\n [ngModel]=\"getArrayAsString('NegativeValues')\"\n (ngModelChange)=\"updateArrayFromString('NegativeValues', $event)\"\n [disabled]=\"disabled\"\n />\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { 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: TextField, selector: "mt-text-field", inputs: ["field", "hint", "label", "placeholder", "class", "type", "readonly", "pInputs", "required", "maxLength", "icon", "iconPosition"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
33559
33995
|
}
|
|
33560
33996
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SplitterQuery, decorators: [{
|
|
33561
33997
|
type: Component,
|
|
@@ -33571,7 +34007,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
33571
34007
|
useExisting: forwardRef(() => SplitterQuery),
|
|
33572
34008
|
multi: true,
|
|
33573
34009
|
},
|
|
33574
|
-
], template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\
|
|
34010
|
+
], template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\n <!-- Pivot Property -->\n <mt-select-field\n [label]=\"t('pivotProperty')\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('selectProperty')\"\n [ngModel]=\"query().pivotProperty\"\n (ngModelChange)=\"updateField('pivotProperty', $event)\"\n [disabled]=\"disabled\"\n />\n\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n <!-- Positive Values -->\n <mt-text-field\n [label]=\"t('positiveValues')\"\n [placeholder]=\"t('enterValuesCommaSeparated')\"\n [ngModel]=\"getArrayAsString('PositiveValues')\"\n (ngModelChange)=\"updateArrayFromString('PositiveValues', $event)\"\n [disabled]=\"disabled\"\n />\n\n <!-- Negative Values -->\n <mt-text-field\n [label]=\"t('negativeValues')\"\n [placeholder]=\"t('enterValuesCommaSeparated')\"\n [ngModel]=\"getArrayAsString('NegativeValues')\"\n (ngModelChange)=\"updateArrayFromString('NegativeValues', $event)\"\n [disabled]=\"disabled\"\n />\n </div>\n</div>\n" }]
|
|
33575
34011
|
}], propDecorators: { propertiesFlat: [{ type: i0.Input, args: [{ isSignal: true, alias: "propertiesFlat", required: false }] }], propertiesGrouped: [{ type: i0.Input, args: [{ isSignal: true, alias: "propertiesGrouped", required: false }] }] } });
|
|
33576
34012
|
|
|
33577
34013
|
class InformativeContextSelection {
|
|
@@ -34458,6 +34894,45 @@ class DataSourceSettings {
|
|
|
34458
34894
|
this.query.set(query);
|
|
34459
34895
|
this.serviceConfigChange.emit({ query: query });
|
|
34460
34896
|
}
|
|
34897
|
+
/**
|
|
34898
|
+
* Update one semantic PhaseGate table role by property key.
|
|
34899
|
+
*
|
|
34900
|
+
* The backend projection is rebuilt on every edit so it always contains the
|
|
34901
|
+
* visible columns and every runtime role, independent of picker order.
|
|
34902
|
+
*/
|
|
34903
|
+
onPhaseGateTableRoleChange(field, value) {
|
|
34904
|
+
this.commitPhaseGateTableQuery({ [field]: value ?? '' });
|
|
34905
|
+
}
|
|
34906
|
+
/** Update the ordered business columns rendered before the phase columns. */
|
|
34907
|
+
onPhaseGateTableBasePropertiesChange(values) {
|
|
34908
|
+
this.commitPhaseGateTableQuery({ baseProperties: values ?? [] });
|
|
34909
|
+
}
|
|
34910
|
+
/**
|
|
34911
|
+
* Persist the dedicated PhaseGate query and remove fields left by the old
|
|
34912
|
+
* generic table editor. `baseProperties` is the ordered visible-column list;
|
|
34913
|
+
* both backend projection aliases are rebuilt by the shared normalizer.
|
|
34914
|
+
*/
|
|
34915
|
+
commitPhaseGateTableQuery(patch) {
|
|
34916
|
+
const migrated = normalizePhaseGateTableQuery((this.query() ?? {}), { migrateLegacy: true });
|
|
34917
|
+
const nextSource = { ...migrated, ...patch };
|
|
34918
|
+
// These belong to the former generic Table query UI and must not continue
|
|
34919
|
+
// influencing either the backend request or runtime interpretation.
|
|
34920
|
+
delete nextSource['lookupProperty'];
|
|
34921
|
+
delete nextSource['PivotProperties'];
|
|
34922
|
+
delete nextSource['pivotProperties'];
|
|
34923
|
+
delete nextSource['AggregationProperties'];
|
|
34924
|
+
delete nextSource['aggregationProperties'];
|
|
34925
|
+
delete nextSource['groupByMultiple'];
|
|
34926
|
+
const next = normalizePhaseGateTableQuery(nextSource, {
|
|
34927
|
+
migrateLegacy: true,
|
|
34928
|
+
});
|
|
34929
|
+
this.query.set(next);
|
|
34930
|
+
this.groupByMultiple.set([]);
|
|
34931
|
+
this.serviceConfigChange.emit({
|
|
34932
|
+
query: next,
|
|
34933
|
+
groupByMultiple: undefined,
|
|
34934
|
+
});
|
|
34935
|
+
}
|
|
34461
34936
|
/**
|
|
34462
34937
|
* Handle timeline query change
|
|
34463
34938
|
*/
|
|
@@ -34656,6 +35131,8 @@ class DataSourceSettings {
|
|
|
34656
35131
|
const q = this.query();
|
|
34657
35132
|
return typeof q?.['levelId'] === 'string' ? q['levelId'] : '';
|
|
34658
35133
|
}, ...(ngDevMode ? [{ debugName: "phaseGateLevelId" }] : /* istanbul ignore next */ []));
|
|
35134
|
+
/** Dedicated PhaseGate table query hydrated from legacy table configs. */
|
|
35135
|
+
phaseGateTableQuery = computed(() => normalizePhaseGateTableQuery((this.query() ?? {}), { migrateLegacy: true }), ...(ngDevMode ? [{ debugName: "phaseGateTableQuery" }] : /* istanbul ignore next */ []));
|
|
34659
35136
|
/**
|
|
34660
35137
|
* Reads the current timeline-multi-level query for the template.
|
|
34661
35138
|
*/
|
|
@@ -34863,7 +35340,7 @@ class DataSourceSettings {
|
|
|
34863
35340
|
};
|
|
34864
35341
|
}
|
|
34865
35342
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: DataSourceSettings, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
34866
|
-
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 (\"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 (\"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.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"], 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: 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 });
|
|
35343
|
+
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'\">\n <!-- Data source mode: Selection cycle OR Custom API (separated area on top) -->\n @if (supportsCustomApi()) {\n <div class=\"grid grid-cols-2 gap-3\">\n <button\n type=\"button\"\n class=\"flex items-start gap-2 rounded-lg border p-3 text-left transition-colors\"\n [class.border-primary-500]=\"dataSourceMode() === 'selection'\"\n [class.bg-primary-50]=\"dataSourceMode() === 'selection'\"\n [class.border-surface-200]=\"dataSourceMode() !== 'selection'\"\n [class.hover:bg-surface-50]=\"dataSourceMode() !== 'selection'\"\n (click)=\"onModeChange('selection')\"\n >\n <mt-icon\n icon=\"dev.database-01\"\n class=\"mt-0.5 text-lg\"\n [class.text-primary-600]=\"dataSourceMode() === 'selection'\"\n [class.text-muted-color]=\"dataSourceMode() !== 'selection'\"\n />\n <span class=\"flex flex-col\">\n <span class=\"text-sm font-semibold text-surface-700\">\n {{ t(\"dataSourceModes.selection\") }}\n </span>\n <span class=\"text-xs text-muted-color\">\n {{ t(\"dataSourceModes.selectionHint\") }}\n </span>\n </span>\n </button>\n\n <button\n type=\"button\"\n class=\"flex items-start gap-2 rounded-lg border p-3 text-left transition-colors\"\n [class.border-primary-500]=\"dataSourceMode() === 'customApi'\"\n [class.bg-primary-50]=\"dataSourceMode() === 'customApi'\"\n [class.border-surface-200]=\"dataSourceMode() !== 'customApi'\"\n [class.hover:bg-surface-50]=\"dataSourceMode() !== 'customApi'\"\n (click)=\"onModeChange('customApi')\"\n >\n <mt-icon\n icon=\"dev.code-02\"\n class=\"mt-0.5 text-lg\"\n [class.text-primary-600]=\"dataSourceMode() === 'customApi'\"\n [class.text-muted-color]=\"dataSourceMode() !== 'customApi'\"\n />\n <span class=\"flex flex-col\">\n <span class=\"text-sm font-semibold text-surface-700\">\n {{ t(\"dataSourceModes.customApi\") }}\n </span>\n <span class=\"text-xs text-muted-color\">\n {{ t(\"dataSourceModes.customApiHint\") }}\n </span>\n </span>\n </button>\n </div>\n }\n\n <!-- ===================== CUSTOM API MODE ===================== -->\n @if (supportsCustomApi() && dataSourceMode() === \"customApi\") {\n <mt-custom-api-configuration\n [ngModel]=\"customApi()\"\n (ngModelChange)=\"onCustomApiChange($event)\"\n />\n } @else {\n <!-- ===================== SELECTION CYCLE ===================== -->\n\n <!-- Workspace gate: pick ONE workspace before the tabs/config appear.\n The picker shows whenever no workspace is chosen yet \u2014 for a brand-new\n chart it also blocks the tabs (needsWorkspacePick), but an existing\n chart that never had a workspace still gets the picker so it can be\n assigned (and saved into serviceConfig.workspaceId for navigate-to). -->\n @if (showWorkspaceGate()) {\n @if (!chartWorkspace()) {\n <div\n class=\"flex flex-col items-center gap-3 rounded-lg border border-dashed border-surface-300 bg-surface-50 p-6 text-center\"\n >\n <mt-icon icon=\"dev.database-01\" class=\"text-3xl text-primary-500\" />\n <div class=\"flex flex-col gap-1\">\n <h3 class=\"text-sm font-semibold text-surface-700\">\n {{ t(\"workspaceGateTitle\") }}\n </h3>\n <p class=\"text-xs text-muted-color\">\n {{ t(\"workspaceGateHint\") }}\n </p>\n </div>\n <div class=\"w-full max-w-sm\">\n <mt-select-field\n [options]=\"workspaceOptions()\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [placeholder]=\"t('selectWorkspace')\"\n [filter]=\"true\"\n [ngModel]=\"chartWorkspace()\"\n (ngModelChange)=\"onWorkspacePick($event)\"\n />\n </div>\n </div>\n } @else if (workspaceAutoDetected()) {\n <!-- Old data: workspace inferred from the chart's existing config.\n Surface it with a Save-to-keep / Clear notice instead of a silent\n chip, so the user knows it must be saved (or can pick another). -->\n <div\n class=\"flex flex-wrap items-center justify-between gap-3 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2\"\n >\n <span class=\"flex items-start gap-2 text-sm\">\n <mt-icon\n icon=\"general.alert-circle\"\n class=\"mt-0.5 text-base text-amber-600\"\n />\n <span class=\"flex flex-col\">\n <span class=\"font-medium text-surface-700\">\n {{ t(\"workspace\") }}: {{ chartWorkspaceLabel() }}\n </span>\n <span class=\"text-xs text-amber-700\">{{\n t(\"workspaceAutoHint\")\n }}</span>\n </span>\n </span>\n <mt-button\n [label]=\"t('clear')\"\n severity=\"secondary\"\n variant=\"outlined\"\n size=\"small\"\n (onClick)=\"clearAutoDetectedWorkspace()\"\n />\n </div>\n } @else {\n <div\n class=\"flex flex-wrap items-center justify-between gap-2 rounded-lg border border-surface-200 bg-surface-50 px-3 py-2\"\n >\n <span class=\"flex items-center gap-2 text-sm\">\n <mt-icon\n icon=\"dev.database-01\"\n class=\"text-base text-primary-500\"\n />\n <span class=\"text-muted-color\">{{ t(\"workspace\") }}:</span>\n <span class=\"font-medium text-surface-700\">{{\n chartWorkspaceLabel()\n }}</span>\n </span>\n @if (!confirmingWorkspaceChange()) {\n <mt-button\n [label]=\"t('change')\"\n severity=\"secondary\"\n variant=\"outlined\"\n size=\"small\"\n (onClick)=\"requestChangeWorkspace()\"\n />\n } @else {\n <span class=\"flex flex-wrap items-center gap-2\">\n <span class=\"text-xs text-amber-600\">{{\n t(\"changeWorkspaceConfirm\")\n }}</span>\n <mt-button\n [label]=\"t('cancel')\"\n severity=\"secondary\"\n variant=\"outlined\"\n size=\"small\"\n (onClick)=\"cancelChangeWorkspace()\"\n />\n <mt-button\n [label]=\"t('changeAndClear')\"\n severity=\"danger\"\n size=\"small\"\n (onClick)=\"confirmChangeWorkspace()\"\n />\n </span>\n }\n </div>\n }\n }\n\n <!-- Sub-navigation: Selection \u00B7 Source Links (when >1 selection) \u00B7 Query -->\n @if (sectionOptions().length > 1 && !needsWorkspacePick()) {\n <mt-tabs\n [options]=\"sectionOptions()\"\n optionLabel=\"label\"\n optionValue=\"id\"\n [active]=\"visibleSection()\"\n (onChange)=\"onSectionChange($event)\"\n />\n }\n\n <!-- ===================== SELECTION ===================== -->\n @if (!hideSelectionConfig() && !needsWorkspacePick()) {\n <div\n [hidden]=\"visibleSection() !== 'selection'\"\n class=\"flex flex-col gap-5\"\n >\n @if (showInformativeSelectionMode()) {\n <div class=\"flex items-center justify-end\">\n <mt-toggle-field\n [label]=\"t('advancedSelection')\"\n [ngModel]=\"selectionMode() === 'advanced'\"\n (ngModelChange)=\"onAdvancedSelectionToggle($event)\"\n />\n </div>\n }\n\n @if (\n !showInformativeSelectionMode() || selectionMode() === \"advanced\"\n ) {\n <mt-selection-configuration\n [workspaceId]=\"selectedWorkspaceId()\"\n [chartWorkspace]=\"chartWorkspace()\"\n [modulesProperties]=\"modulesProperties()\"\n [propertiesFlat]=\"propertiesFlat()\"\n [ngModel]=\"selections()\"\n (ngModelChange)=\"onSelectionsChange($event)\"\n (moduleChange)=\"onModuleChange($event)\"\n />\n } @else {\n <div class=\"flex flex-col gap-5\">\n <mt-informative-context-selection\n class=\"block\"\n [informativeContext]=\"informativeContext()\"\n [currentSelection]=\"selections()\"\n [preferredTargetSelector]=\"contextTargetSelector()\"\n [applyToken]=\"contextTargetApplyToken()\"\n (templateApply)=\"onContextTemplateApply($event)\"\n />\n\n @if (selections().length) {\n <mt-selection-configuration\n [workspaceId]=\"selectedWorkspaceId()\"\n [chartWorkspace]=\"chartWorkspace()\"\n [modulesProperties]=\"modulesProperties()\"\n [propertiesFlat]=\"propertiesFlat()\"\n [structureLocked]=\"true\"\n [ngModel]=\"selections()\"\n (ngModelChange)=\"onSelectionsChange($event)\"\n />\n }\n </div>\n }\n </div>\n }\n\n <!-- ===================== SOURCE LINKS (only with >1 selection) ===================== -->\n @if (showSourceLinks() && !needsWorkspacePick()) {\n <div\n [hidden]=\"visibleSection() !== 'sourceLinks'\"\n class=\"flex flex-col gap-5\"\n >\n <mt-source-link-configuration\n [selectionModules]=\"selectionModules()\"\n [ngModel]=\"sourceLinks()\"\n (ngModelChange)=\"onSourceLinksChange($event)\"\n />\n </div>\n }\n\n <!-- ===================== QUERY ===================== -->\n @if (queryComponentType() !== \"none\" && !needsWorkspacePick()) {\n <div [hidden]=\"visibleSection() !== 'query'\" class=\"flex flex-col gap-5\">\n @if (loadingProperties()) {\n <div class=\"flex flex-col gap-4\">\n <div class=\"flex flex-col gap-2\">\n <p-skeleton width=\"120px\" height=\"16px\" />\n <p-skeleton width=\"100%\" height=\"40px\" borderRadius=\"8px\" />\n </div>\n <div class=\"grid grid-cols-2 gap-4\">\n <div class=\"flex flex-col gap-2\">\n <p-skeleton width=\"80px\" height=\"16px\" />\n <p-skeleton width=\"100%\" height=\"40px\" borderRadius=\"8px\" />\n </div>\n <div class=\"flex flex-col gap-2\">\n <p-skeleton width=\"90px\" height=\"16px\" />\n <p-skeleton width=\"100%\" height=\"40px\" borderRadius=\"8px\" />\n </div>\n </div>\n </div>\n } @else {\n <!-- Group By Multiple (table views) -->\n @if (showGroupByMultiple()) {\n <mt-string-array-input\n [label]=\"t('groupByMultiple')\"\n [options]=\"\n propertiesGrouped().length > 1\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"propertiesGrouped().length > 1\"\n [placeholder]=\"t('selectGroupByProperties')\"\n [ngModel]=\"groupByMultiple()\"\n (ngModelChange)=\"onGroupByMultipleChange($event)\"\n />\n }\n\n <!-- Query Configuration based on chart type -->\n @switch (queryComponentType()) {\n @case (\"general\") {\n <mt-general-query\n [chartType]=\"getChartTypeId()\"\n [querySchema]=\"querySchema()\"\n [propertiesFlat]=\"propertiesFlat()\"\n [propertiesGrouped]=\"propertiesGrouped()\"\n [ngModel]=\"query()\"\n (ngModelChange)=\"onQueryChange($event)\"\n />\n\n <mt-toggle-field\n [label]=\"t('isNormalized')\"\n [ngModel]=\"isNormalized()\"\n (ngModelChange)=\"onIsNormalizedChange($event)\"\n />\n }\n @case (\"table\") {\n <mt-table-query\n [propertiesFlat]=\"propertiesFlat()\"\n [propertiesGrouped]=\"propertiesGrouped()\"\n [ngModel]=\"query()\"\n (ngModelChange)=\"onTableQueryChange($event)\"\n />\n }\n @case (\"phaseGateTable\") {\n @let phaseGateQuery = phaseGateTableQuery();\n @let groupedPhaseGateProperties = propertiesGrouped().length > 1;\n\n <div class=\"flex flex-col gap-5\">\n <p class=\"text-sm text-muted-color\">\n {{ t(\"phaseGateTableQueryDescription\") }}\n </p>\n\n <div class=\"grid grid-cols-1 gap-4 lg:grid-cols-2\">\n <mt-select-field\n [label]=\"t('phaseGateRowIdentityProperty')\"\n [hint]=\"t('phaseGateRowIdentityPropertyHint')\"\n [required]=\"true\"\n [options]=\"\n groupedPhaseGateProperties\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"groupedPhaseGateProperties\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('phaseGateSelectProperty')\"\n [ngModel]=\"phaseGateQuery.rowIdentityProperty\"\n (ngModelChange)=\"\n onPhaseGateTableRoleChange('rowIdentityProperty', $event)\n \"\n />\n\n <mt-select-field\n [label]=\"t('phaseGateNameProperty')\"\n [hint]=\"t('phaseGateNamePropertyHint')\"\n [required]=\"true\"\n [options]=\"\n groupedPhaseGateProperties\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"groupedPhaseGateProperties\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('phaseGateSelectProperty')\"\n [ngModel]=\"phaseGateQuery.phaseNameProperty\"\n (ngModelChange)=\"\n onPhaseGateTableRoleChange('phaseNameProperty', $event)\n \"\n />\n\n <mt-select-field\n [label]=\"t('phaseGateStatusProperty')\"\n [hint]=\"t('phaseGateStatusPropertyHint')\"\n [required]=\"true\"\n [options]=\"\n groupedPhaseGateProperties\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"groupedPhaseGateProperties\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('phaseGateSelectProperty')\"\n [ngModel]=\"phaseGateQuery.phaseStatusProperty\"\n (ngModelChange)=\"\n onPhaseGateTableRoleChange('phaseStatusProperty', $event)\n \"\n />\n\n <mt-select-field\n [label]=\"t('phaseGateIdProperty')\"\n [showClear]=\"true\"\n [options]=\"\n groupedPhaseGateProperties\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"groupedPhaseGateProperties\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('phaseGateSelectProperty')\"\n [ngModel]=\"phaseGateQuery.phaseIdProperty\"\n (ngModelChange)=\"\n onPhaseGateTableRoleChange('phaseIdProperty', $event)\n \"\n />\n\n <mt-select-field\n [label]=\"t('phaseGateOrderProperty')\"\n [showClear]=\"true\"\n [options]=\"\n groupedPhaseGateProperties\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"groupedPhaseGateProperties\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('phaseGateSelectProperty')\"\n [ngModel]=\"phaseGateQuery.phaseOrderProperty\"\n (ngModelChange)=\"\n onPhaseGateTableRoleChange('phaseOrderProperty', $event)\n \"\n />\n\n <mt-select-field\n [label]=\"t('phaseGateProgressProperty')\"\n [showClear]=\"true\"\n [options]=\"\n groupedPhaseGateProperties\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"groupedPhaseGateProperties\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('phaseGateSelectProperty')\"\n [ngModel]=\"phaseGateQuery.phaseProgressProperty\"\n (ngModelChange)=\"\n onPhaseGateTableRoleChange(\n 'phaseProgressProperty',\n $event\n )\n \"\n />\n\n <mt-select-field\n [label]=\"t('phaseGateCurrentProperty')\"\n [showClear]=\"true\"\n [options]=\"\n groupedPhaseGateProperties\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"groupedPhaseGateProperties\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('phaseGateSelectProperty')\"\n [ngModel]=\"phaseGateQuery.phaseIsCurrentProperty\"\n (ngModelChange)=\"\n onPhaseGateTableRoleChange(\n 'phaseIsCurrentProperty',\n $event\n )\n \"\n />\n\n <mt-select-field\n [label]=\"t('phaseGateCompletedProperty')\"\n [showClear]=\"true\"\n [options]=\"\n groupedPhaseGateProperties\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"groupedPhaseGateProperties\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('phaseGateSelectProperty')\"\n [ngModel]=\"phaseGateQuery.phaseIsCompletedProperty\"\n (ngModelChange)=\"\n onPhaseGateTableRoleChange(\n 'phaseIsCompletedProperty',\n $event\n )\n \"\n />\n\n <mt-select-field\n [label]=\"t('phaseGateAllItemsCompletedProperty')\"\n [showClear]=\"true\"\n [options]=\"\n groupedPhaseGateProperties\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"groupedPhaseGateProperties\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('phaseGateSelectProperty')\"\n [ngModel]=\"phaseGateQuery.phaseAllItemsCompletedProperty\"\n (ngModelChange)=\"\n onPhaseGateTableRoleChange(\n 'phaseAllItemsCompletedProperty',\n $event\n )\n \"\n />\n </div>\n\n <mt-string-array-input\n [label]=\"t('phaseGateVisibleProperties')\"\n [options]=\"\n groupedPhaseGateProperties\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"groupedPhaseGateProperties\"\n [placeholder]=\"t('phaseGateVisiblePropertiesPlaceholder')\"\n [ngModel]=\"phaseGateQuery.baseProperties\"\n (ngModelChange)=\"onPhaseGateTableBasePropertiesChange($event)\"\n />\n\n <p class=\"text-xs text-muted-color\">\n {{ t(\"phaseGateProjectionHint\") }}\n </p>\n </div>\n }\n @case (\"timeline\") {\n <mt-timeline-query\n [propertiesFlat]=\"propertiesFlat()\"\n [propertiesGrouped]=\"propertiesGrouped()\"\n [ngModel]=\"query()\"\n (ngModelChange)=\"onTimelineQueryChange($event)\"\n />\n }\n @case (\"timelineMultiLevel\") {\n <div class=\"flex flex-col gap-5\">\n <div class=\"flex items-center justify-between\">\n <p class=\"text-sm text-muted-color\">\n {{ t(\"timelineMultiLevelDescription\") }}\n </p>\n <mt-button\n size=\"small\"\n severity=\"secondary\"\n icon=\"general.plus\"\n [label]=\"t('addLevel')\"\n (onClick)=\"addTimelineLevel()\"\n />\n </div>\n\n <mt-select-field\n [label]=\"t('timeFrame')\"\n [options]=\"timeFrameOptions\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [ngModel]=\"timelineTimeFrame()\"\n (ngModelChange)=\"onTimelineTimeFrameChange($event)\"\n />\n\n @for (level of timelineLevels(); track $index) {\n <div\n class=\"border border-surface-300 rounded-md p-4 flex flex-col gap-3\"\n >\n <div class=\"flex items-center justify-between\">\n <span class=\"font-medium\">\n {{ t(\"level\") }} {{ level.levelNumber || $index + 1 }}\n </span>\n <mt-button\n size=\"small\"\n severity=\"danger\"\n [text]=\"true\"\n icon=\"general.trash-02\"\n (onClick)=\"removeTimelineLevel($index)\"\n />\n </div>\n\n <div class=\"grid grid-cols-2 gap-3\">\n <mt-select-field\n [label]=\"t('pivotProperty')\"\n [options]=\"\n propertiesGrouped().length > 1\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"propertiesGrouped().length > 1\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [ngModel]=\"level.pivotProperty\"\n (ngModelChange)=\"\n updateTimelineLevelField(\n $index,\n 'pivotProperty',\n $event\n )\n \"\n />\n <mt-select-field\n [label]=\"t('lookupProperty')\"\n [options]=\"\n propertiesGrouped().length > 1\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"propertiesGrouped().length > 1\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [ngModel]=\"level.lookupProperty\"\n (ngModelChange)=\"\n updateTimelineLevelField(\n $index,\n 'lookupProperty',\n $event\n )\n \"\n />\n <mt-select-field\n [label]=\"t('idProperty')\"\n [options]=\"\n propertiesGrouped().length > 1\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"propertiesGrouped().length > 1\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [ngModel]=\"level.idProperty\"\n (ngModelChange)=\"\n updateTimelineLevelField($index, 'idProperty', $event)\n \"\n />\n <mt-select-field\n [label]=\"t('startTimeProperty')\"\n [options]=\"\n propertiesGrouped().length > 1\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"propertiesGrouped().length > 1\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [ngModel]=\"level.startPoint_timeProperty\"\n (ngModelChange)=\"\n updateTimelineLevelField(\n $index,\n 'startPoint_timeProperty',\n $event\n )\n \"\n />\n <mt-select-field\n [label]=\"t('endTimeProperty')\"\n [options]=\"\n propertiesGrouped().length > 1\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"propertiesGrouped().length > 1\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [ngModel]=\"level.endPoint_timeProperty\"\n (ngModelChange)=\"\n updateTimelineLevelField(\n $index,\n 'endPoint_timeProperty',\n $event\n )\n \"\n />\n <mt-select-field\n [label]=\"t('progressProperty')\"\n [options]=\"\n propertiesGrouped().length > 1\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"propertiesGrouped().length > 1\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [ngModel]=\"level.progressProperty\"\n (ngModelChange)=\"\n updateTimelineLevelField(\n $index,\n 'progressProperty',\n $event\n )\n \"\n />\n @if (shouldShowTimelineParentProperty($index)) {\n <mt-select-field\n [label]=\"t('parentProperty')\"\n [options]=\"timelineParentPropertyOptions($index)\"\n optionLabel=\"name\"\n optionValue=\"key\"\n [ngModel]=\"level.parentProperty\"\n (ngModelChange)=\"\n updateTimelineLevelField(\n $index,\n 'parentProperty',\n $event\n )\n \"\n />\n }\n </div>\n\n <mt-string-array-input\n [label]=\"t('extraProperties')\"\n [options]=\"\n propertiesGrouped().length > 1\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"propertiesGrouped().length > 1\"\n [placeholder]=\"t('selectProperties')\"\n [ngModel]=\"level.extraProperties || level.extras || []\"\n (ngModelChange)=\"\n updateTimelineLevelField(\n $index,\n 'extraProperties',\n $event\n )\n \"\n />\n </div>\n }\n\n @if (timelineLevels().length === 0) {\n <div class=\"text-center py-4 text-muted-color text-sm\">\n {{ t(\"noTimelineLevelsHint\") }}\n </div>\n }\n </div>\n }\n @case (\"map\") {\n <mt-map-query\n [propertiesFlat]=\"propertiesFlat()\"\n [propertiesGrouped]=\"propertiesGrouped()\"\n [ngModel]=\"query()\"\n (ngModelChange)=\"onMapQueryChange($event)\"\n />\n }\n @case (\"splitter\") {\n <mt-splitter-query\n [propertiesFlat]=\"propertiesFlat()\"\n [propertiesGrouped]=\"propertiesGrouped()\"\n [ngModel]=\"query()\"\n (ngModelChange)=\"onSplitterQueryChange($event)\"\n />\n }\n @case (\"properties\") {\n <mt-properties-query\n [propertiesFlat]=\"propertiesFlat()\"\n [propertiesGrouped]=\"propertiesGrouped()\"\n [ngModel]=\"query()\"\n (ngModelChange)=\"onPropertiesQueryChange($event)\"\n />\n }\n @case (\"snapshot\") {\n <mt-snapshot-query\n [propertiesFlat]=\"propertiesFlat()\"\n [propertiesGrouped]=\"propertiesGrouped()\"\n [ngModel]=\"query()\"\n (ngModelChange)=\"onSnapshotQueryChange($event)\"\n />\n }\n @case (\"phaseGate\") {\n <div class=\"flex flex-col gap-2\">\n <mt-text-field\n [label]=\"t('levelId')\"\n [ngModel]=\"phaseGateLevelId()\"\n (ngModelChange)=\"onPhaseGateLevelIdChange($event)\"\n />\n <p class=\"text-xs text-muted-color\">\n {{ t(\"phaseGateLevelIdHint\") }}\n </p>\n </div>\n }\n @case (\"repeater\") {\n <div class=\"flex flex-col gap-5\">\n <mt-select-field\n [label]=\"t('repeaterDashboard')\"\n [options]=\"availableDashboards()\"\n optionLabel=\"name\"\n optionValue=\"id\"\n [ngModel]=\"repeaterDashboardId()\"\n (ngModelChange)=\"onRepeaterDashboardChange($event)\"\n />\n\n <mt-string-array-input\n [label]=\"t('repeaterSelectedProperties')\"\n [options]=\"\n propertiesGrouped().length > 1\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"propertiesGrouped().length > 1\"\n [placeholder]=\"t('repeaterSelectedPropertiesPlaceholder')\"\n [ngModel]=\"repeaterSelectedProperties()\"\n (ngModelChange)=\"onRepeaterSelectedPropertiesChange($event)\"\n />\n </div>\n }\n }\n }\n </div>\n }\n }\n</div>\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"], 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: 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 });
|
|
34867
35344
|
}
|
|
34868
35345
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: DataSourceSettings, decorators: [{
|
|
34869
35346
|
type: Component,
|
|
@@ -34891,7 +35368,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
34891
35368
|
SplitterQuery,
|
|
34892
35369
|
InformativeContextSelection,
|
|
34893
35370
|
StringArrayInput,
|
|
34894
|
-
], 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 (\"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 (\"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" }]
|
|
35371
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div class=\"flex flex-col gap-5\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\n <!-- Data source mode: Selection cycle OR Custom API (separated area on top) -->\n @if (supportsCustomApi()) {\n <div class=\"grid grid-cols-2 gap-3\">\n <button\n type=\"button\"\n class=\"flex items-start gap-2 rounded-lg border p-3 text-left transition-colors\"\n [class.border-primary-500]=\"dataSourceMode() === 'selection'\"\n [class.bg-primary-50]=\"dataSourceMode() === 'selection'\"\n [class.border-surface-200]=\"dataSourceMode() !== 'selection'\"\n [class.hover:bg-surface-50]=\"dataSourceMode() !== 'selection'\"\n (click)=\"onModeChange('selection')\"\n >\n <mt-icon\n icon=\"dev.database-01\"\n class=\"mt-0.5 text-lg\"\n [class.text-primary-600]=\"dataSourceMode() === 'selection'\"\n [class.text-muted-color]=\"dataSourceMode() !== 'selection'\"\n />\n <span class=\"flex flex-col\">\n <span class=\"text-sm font-semibold text-surface-700\">\n {{ t(\"dataSourceModes.selection\") }}\n </span>\n <span class=\"text-xs text-muted-color\">\n {{ t(\"dataSourceModes.selectionHint\") }}\n </span>\n </span>\n </button>\n\n <button\n type=\"button\"\n class=\"flex items-start gap-2 rounded-lg border p-3 text-left transition-colors\"\n [class.border-primary-500]=\"dataSourceMode() === 'customApi'\"\n [class.bg-primary-50]=\"dataSourceMode() === 'customApi'\"\n [class.border-surface-200]=\"dataSourceMode() !== 'customApi'\"\n [class.hover:bg-surface-50]=\"dataSourceMode() !== 'customApi'\"\n (click)=\"onModeChange('customApi')\"\n >\n <mt-icon\n icon=\"dev.code-02\"\n class=\"mt-0.5 text-lg\"\n [class.text-primary-600]=\"dataSourceMode() === 'customApi'\"\n [class.text-muted-color]=\"dataSourceMode() !== 'customApi'\"\n />\n <span class=\"flex flex-col\">\n <span class=\"text-sm font-semibold text-surface-700\">\n {{ t(\"dataSourceModes.customApi\") }}\n </span>\n <span class=\"text-xs text-muted-color\">\n {{ t(\"dataSourceModes.customApiHint\") }}\n </span>\n </span>\n </button>\n </div>\n }\n\n <!-- ===================== CUSTOM API MODE ===================== -->\n @if (supportsCustomApi() && dataSourceMode() === \"customApi\") {\n <mt-custom-api-configuration\n [ngModel]=\"customApi()\"\n (ngModelChange)=\"onCustomApiChange($event)\"\n />\n } @else {\n <!-- ===================== SELECTION CYCLE ===================== -->\n\n <!-- Workspace gate: pick ONE workspace before the tabs/config appear.\n The picker shows whenever no workspace is chosen yet \u2014 for a brand-new\n chart it also blocks the tabs (needsWorkspacePick), but an existing\n chart that never had a workspace still gets the picker so it can be\n assigned (and saved into serviceConfig.workspaceId for navigate-to). -->\n @if (showWorkspaceGate()) {\n @if (!chartWorkspace()) {\n <div\n class=\"flex flex-col items-center gap-3 rounded-lg border border-dashed border-surface-300 bg-surface-50 p-6 text-center\"\n >\n <mt-icon icon=\"dev.database-01\" class=\"text-3xl text-primary-500\" />\n <div class=\"flex flex-col gap-1\">\n <h3 class=\"text-sm font-semibold text-surface-700\">\n {{ t(\"workspaceGateTitle\") }}\n </h3>\n <p class=\"text-xs text-muted-color\">\n {{ t(\"workspaceGateHint\") }}\n </p>\n </div>\n <div class=\"w-full max-w-sm\">\n <mt-select-field\n [options]=\"workspaceOptions()\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [placeholder]=\"t('selectWorkspace')\"\n [filter]=\"true\"\n [ngModel]=\"chartWorkspace()\"\n (ngModelChange)=\"onWorkspacePick($event)\"\n />\n </div>\n </div>\n } @else if (workspaceAutoDetected()) {\n <!-- Old data: workspace inferred from the chart's existing config.\n Surface it with a Save-to-keep / Clear notice instead of a silent\n chip, so the user knows it must be saved (or can pick another). -->\n <div\n class=\"flex flex-wrap items-center justify-between gap-3 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2\"\n >\n <span class=\"flex items-start gap-2 text-sm\">\n <mt-icon\n icon=\"general.alert-circle\"\n class=\"mt-0.5 text-base text-amber-600\"\n />\n <span class=\"flex flex-col\">\n <span class=\"font-medium text-surface-700\">\n {{ t(\"workspace\") }}: {{ chartWorkspaceLabel() }}\n </span>\n <span class=\"text-xs text-amber-700\">{{\n t(\"workspaceAutoHint\")\n }}</span>\n </span>\n </span>\n <mt-button\n [label]=\"t('clear')\"\n severity=\"secondary\"\n variant=\"outlined\"\n size=\"small\"\n (onClick)=\"clearAutoDetectedWorkspace()\"\n />\n </div>\n } @else {\n <div\n class=\"flex flex-wrap items-center justify-between gap-2 rounded-lg border border-surface-200 bg-surface-50 px-3 py-2\"\n >\n <span class=\"flex items-center gap-2 text-sm\">\n <mt-icon\n icon=\"dev.database-01\"\n class=\"text-base text-primary-500\"\n />\n <span class=\"text-muted-color\">{{ t(\"workspace\") }}:</span>\n <span class=\"font-medium text-surface-700\">{{\n chartWorkspaceLabel()\n }}</span>\n </span>\n @if (!confirmingWorkspaceChange()) {\n <mt-button\n [label]=\"t('change')\"\n severity=\"secondary\"\n variant=\"outlined\"\n size=\"small\"\n (onClick)=\"requestChangeWorkspace()\"\n />\n } @else {\n <span class=\"flex flex-wrap items-center gap-2\">\n <span class=\"text-xs text-amber-600\">{{\n t(\"changeWorkspaceConfirm\")\n }}</span>\n <mt-button\n [label]=\"t('cancel')\"\n severity=\"secondary\"\n variant=\"outlined\"\n size=\"small\"\n (onClick)=\"cancelChangeWorkspace()\"\n />\n <mt-button\n [label]=\"t('changeAndClear')\"\n severity=\"danger\"\n size=\"small\"\n (onClick)=\"confirmChangeWorkspace()\"\n />\n </span>\n }\n </div>\n }\n }\n\n <!-- Sub-navigation: Selection \u00B7 Source Links (when >1 selection) \u00B7 Query -->\n @if (sectionOptions().length > 1 && !needsWorkspacePick()) {\n <mt-tabs\n [options]=\"sectionOptions()\"\n optionLabel=\"label\"\n optionValue=\"id\"\n [active]=\"visibleSection()\"\n (onChange)=\"onSectionChange($event)\"\n />\n }\n\n <!-- ===================== SELECTION ===================== -->\n @if (!hideSelectionConfig() && !needsWorkspacePick()) {\n <div\n [hidden]=\"visibleSection() !== 'selection'\"\n class=\"flex flex-col gap-5\"\n >\n @if (showInformativeSelectionMode()) {\n <div class=\"flex items-center justify-end\">\n <mt-toggle-field\n [label]=\"t('advancedSelection')\"\n [ngModel]=\"selectionMode() === 'advanced'\"\n (ngModelChange)=\"onAdvancedSelectionToggle($event)\"\n />\n </div>\n }\n\n @if (\n !showInformativeSelectionMode() || selectionMode() === \"advanced\"\n ) {\n <mt-selection-configuration\n [workspaceId]=\"selectedWorkspaceId()\"\n [chartWorkspace]=\"chartWorkspace()\"\n [modulesProperties]=\"modulesProperties()\"\n [propertiesFlat]=\"propertiesFlat()\"\n [ngModel]=\"selections()\"\n (ngModelChange)=\"onSelectionsChange($event)\"\n (moduleChange)=\"onModuleChange($event)\"\n />\n } @else {\n <div class=\"flex flex-col gap-5\">\n <mt-informative-context-selection\n class=\"block\"\n [informativeContext]=\"informativeContext()\"\n [currentSelection]=\"selections()\"\n [preferredTargetSelector]=\"contextTargetSelector()\"\n [applyToken]=\"contextTargetApplyToken()\"\n (templateApply)=\"onContextTemplateApply($event)\"\n />\n\n @if (selections().length) {\n <mt-selection-configuration\n [workspaceId]=\"selectedWorkspaceId()\"\n [chartWorkspace]=\"chartWorkspace()\"\n [modulesProperties]=\"modulesProperties()\"\n [propertiesFlat]=\"propertiesFlat()\"\n [structureLocked]=\"true\"\n [ngModel]=\"selections()\"\n (ngModelChange)=\"onSelectionsChange($event)\"\n />\n }\n </div>\n }\n </div>\n }\n\n <!-- ===================== SOURCE LINKS (only with >1 selection) ===================== -->\n @if (showSourceLinks() && !needsWorkspacePick()) {\n <div\n [hidden]=\"visibleSection() !== 'sourceLinks'\"\n class=\"flex flex-col gap-5\"\n >\n <mt-source-link-configuration\n [selectionModules]=\"selectionModules()\"\n [ngModel]=\"sourceLinks()\"\n (ngModelChange)=\"onSourceLinksChange($event)\"\n />\n </div>\n }\n\n <!-- ===================== QUERY ===================== -->\n @if (queryComponentType() !== \"none\" && !needsWorkspacePick()) {\n <div [hidden]=\"visibleSection() !== 'query'\" class=\"flex flex-col gap-5\">\n @if (loadingProperties()) {\n <div class=\"flex flex-col gap-4\">\n <div class=\"flex flex-col gap-2\">\n <p-skeleton width=\"120px\" height=\"16px\" />\n <p-skeleton width=\"100%\" height=\"40px\" borderRadius=\"8px\" />\n </div>\n <div class=\"grid grid-cols-2 gap-4\">\n <div class=\"flex flex-col gap-2\">\n <p-skeleton width=\"80px\" height=\"16px\" />\n <p-skeleton width=\"100%\" height=\"40px\" borderRadius=\"8px\" />\n </div>\n <div class=\"flex flex-col gap-2\">\n <p-skeleton width=\"90px\" height=\"16px\" />\n <p-skeleton width=\"100%\" height=\"40px\" borderRadius=\"8px\" />\n </div>\n </div>\n </div>\n } @else {\n <!-- Group By Multiple (table views) -->\n @if (showGroupByMultiple()) {\n <mt-string-array-input\n [label]=\"t('groupByMultiple')\"\n [options]=\"\n propertiesGrouped().length > 1\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"propertiesGrouped().length > 1\"\n [placeholder]=\"t('selectGroupByProperties')\"\n [ngModel]=\"groupByMultiple()\"\n (ngModelChange)=\"onGroupByMultipleChange($event)\"\n />\n }\n\n <!-- Query Configuration based on chart type -->\n @switch (queryComponentType()) {\n @case (\"general\") {\n <mt-general-query\n [chartType]=\"getChartTypeId()\"\n [querySchema]=\"querySchema()\"\n [propertiesFlat]=\"propertiesFlat()\"\n [propertiesGrouped]=\"propertiesGrouped()\"\n [ngModel]=\"query()\"\n (ngModelChange)=\"onQueryChange($event)\"\n />\n\n <mt-toggle-field\n [label]=\"t('isNormalized')\"\n [ngModel]=\"isNormalized()\"\n (ngModelChange)=\"onIsNormalizedChange($event)\"\n />\n }\n @case (\"table\") {\n <mt-table-query\n [propertiesFlat]=\"propertiesFlat()\"\n [propertiesGrouped]=\"propertiesGrouped()\"\n [ngModel]=\"query()\"\n (ngModelChange)=\"onTableQueryChange($event)\"\n />\n }\n @case (\"phaseGateTable\") {\n @let phaseGateQuery = phaseGateTableQuery();\n @let groupedPhaseGateProperties = propertiesGrouped().length > 1;\n\n <div class=\"flex flex-col gap-5\">\n <p class=\"text-sm text-muted-color\">\n {{ t(\"phaseGateTableQueryDescription\") }}\n </p>\n\n <div class=\"grid grid-cols-1 gap-4 lg:grid-cols-2\">\n <mt-select-field\n [label]=\"t('phaseGateRowIdentityProperty')\"\n [hint]=\"t('phaseGateRowIdentityPropertyHint')\"\n [required]=\"true\"\n [options]=\"\n groupedPhaseGateProperties\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"groupedPhaseGateProperties\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('phaseGateSelectProperty')\"\n [ngModel]=\"phaseGateQuery.rowIdentityProperty\"\n (ngModelChange)=\"\n onPhaseGateTableRoleChange('rowIdentityProperty', $event)\n \"\n />\n\n <mt-select-field\n [label]=\"t('phaseGateNameProperty')\"\n [hint]=\"t('phaseGateNamePropertyHint')\"\n [required]=\"true\"\n [options]=\"\n groupedPhaseGateProperties\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"groupedPhaseGateProperties\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('phaseGateSelectProperty')\"\n [ngModel]=\"phaseGateQuery.phaseNameProperty\"\n (ngModelChange)=\"\n onPhaseGateTableRoleChange('phaseNameProperty', $event)\n \"\n />\n\n <mt-select-field\n [label]=\"t('phaseGateStatusProperty')\"\n [hint]=\"t('phaseGateStatusPropertyHint')\"\n [required]=\"true\"\n [options]=\"\n groupedPhaseGateProperties\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"groupedPhaseGateProperties\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('phaseGateSelectProperty')\"\n [ngModel]=\"phaseGateQuery.phaseStatusProperty\"\n (ngModelChange)=\"\n onPhaseGateTableRoleChange('phaseStatusProperty', $event)\n \"\n />\n\n <mt-select-field\n [label]=\"t('phaseGateIdProperty')\"\n [showClear]=\"true\"\n [options]=\"\n groupedPhaseGateProperties\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"groupedPhaseGateProperties\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('phaseGateSelectProperty')\"\n [ngModel]=\"phaseGateQuery.phaseIdProperty\"\n (ngModelChange)=\"\n onPhaseGateTableRoleChange('phaseIdProperty', $event)\n \"\n />\n\n <mt-select-field\n [label]=\"t('phaseGateOrderProperty')\"\n [showClear]=\"true\"\n [options]=\"\n groupedPhaseGateProperties\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"groupedPhaseGateProperties\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('phaseGateSelectProperty')\"\n [ngModel]=\"phaseGateQuery.phaseOrderProperty\"\n (ngModelChange)=\"\n onPhaseGateTableRoleChange('phaseOrderProperty', $event)\n \"\n />\n\n <mt-select-field\n [label]=\"t('phaseGateProgressProperty')\"\n [showClear]=\"true\"\n [options]=\"\n groupedPhaseGateProperties\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"groupedPhaseGateProperties\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('phaseGateSelectProperty')\"\n [ngModel]=\"phaseGateQuery.phaseProgressProperty\"\n (ngModelChange)=\"\n onPhaseGateTableRoleChange(\n 'phaseProgressProperty',\n $event\n )\n \"\n />\n\n <mt-select-field\n [label]=\"t('phaseGateCurrentProperty')\"\n [showClear]=\"true\"\n [options]=\"\n groupedPhaseGateProperties\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"groupedPhaseGateProperties\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('phaseGateSelectProperty')\"\n [ngModel]=\"phaseGateQuery.phaseIsCurrentProperty\"\n (ngModelChange)=\"\n onPhaseGateTableRoleChange(\n 'phaseIsCurrentProperty',\n $event\n )\n \"\n />\n\n <mt-select-field\n [label]=\"t('phaseGateCompletedProperty')\"\n [showClear]=\"true\"\n [options]=\"\n groupedPhaseGateProperties\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"groupedPhaseGateProperties\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('phaseGateSelectProperty')\"\n [ngModel]=\"phaseGateQuery.phaseIsCompletedProperty\"\n (ngModelChange)=\"\n onPhaseGateTableRoleChange(\n 'phaseIsCompletedProperty',\n $event\n )\n \"\n />\n\n <mt-select-field\n [label]=\"t('phaseGateAllItemsCompletedProperty')\"\n [showClear]=\"true\"\n [options]=\"\n groupedPhaseGateProperties\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"groupedPhaseGateProperties\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('phaseGateSelectProperty')\"\n [ngModel]=\"phaseGateQuery.phaseAllItemsCompletedProperty\"\n (ngModelChange)=\"\n onPhaseGateTableRoleChange(\n 'phaseAllItemsCompletedProperty',\n $event\n )\n \"\n />\n </div>\n\n <mt-string-array-input\n [label]=\"t('phaseGateVisibleProperties')\"\n [options]=\"\n groupedPhaseGateProperties\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"groupedPhaseGateProperties\"\n [placeholder]=\"t('phaseGateVisiblePropertiesPlaceholder')\"\n [ngModel]=\"phaseGateQuery.baseProperties\"\n (ngModelChange)=\"onPhaseGateTableBasePropertiesChange($event)\"\n />\n\n <p class=\"text-xs text-muted-color\">\n {{ t(\"phaseGateProjectionHint\") }}\n </p>\n </div>\n }\n @case (\"timeline\") {\n <mt-timeline-query\n [propertiesFlat]=\"propertiesFlat()\"\n [propertiesGrouped]=\"propertiesGrouped()\"\n [ngModel]=\"query()\"\n (ngModelChange)=\"onTimelineQueryChange($event)\"\n />\n }\n @case (\"timelineMultiLevel\") {\n <div class=\"flex flex-col gap-5\">\n <div class=\"flex items-center justify-between\">\n <p class=\"text-sm text-muted-color\">\n {{ t(\"timelineMultiLevelDescription\") }}\n </p>\n <mt-button\n size=\"small\"\n severity=\"secondary\"\n icon=\"general.plus\"\n [label]=\"t('addLevel')\"\n (onClick)=\"addTimelineLevel()\"\n />\n </div>\n\n <mt-select-field\n [label]=\"t('timeFrame')\"\n [options]=\"timeFrameOptions\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [ngModel]=\"timelineTimeFrame()\"\n (ngModelChange)=\"onTimelineTimeFrameChange($event)\"\n />\n\n @for (level of timelineLevels(); track $index) {\n <div\n class=\"border border-surface-300 rounded-md p-4 flex flex-col gap-3\"\n >\n <div class=\"flex items-center justify-between\">\n <span class=\"font-medium\">\n {{ t(\"level\") }} {{ level.levelNumber || $index + 1 }}\n </span>\n <mt-button\n size=\"small\"\n severity=\"danger\"\n [text]=\"true\"\n icon=\"general.trash-02\"\n (onClick)=\"removeTimelineLevel($index)\"\n />\n </div>\n\n <div class=\"grid grid-cols-2 gap-3\">\n <mt-select-field\n [label]=\"t('pivotProperty')\"\n [options]=\"\n propertiesGrouped().length > 1\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"propertiesGrouped().length > 1\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [ngModel]=\"level.pivotProperty\"\n (ngModelChange)=\"\n updateTimelineLevelField(\n $index,\n 'pivotProperty',\n $event\n )\n \"\n />\n <mt-select-field\n [label]=\"t('lookupProperty')\"\n [options]=\"\n propertiesGrouped().length > 1\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"propertiesGrouped().length > 1\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [ngModel]=\"level.lookupProperty\"\n (ngModelChange)=\"\n updateTimelineLevelField(\n $index,\n 'lookupProperty',\n $event\n )\n \"\n />\n <mt-select-field\n [label]=\"t('idProperty')\"\n [options]=\"\n propertiesGrouped().length > 1\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"propertiesGrouped().length > 1\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [ngModel]=\"level.idProperty\"\n (ngModelChange)=\"\n updateTimelineLevelField($index, 'idProperty', $event)\n \"\n />\n <mt-select-field\n [label]=\"t('startTimeProperty')\"\n [options]=\"\n propertiesGrouped().length > 1\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"propertiesGrouped().length > 1\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [ngModel]=\"level.startPoint_timeProperty\"\n (ngModelChange)=\"\n updateTimelineLevelField(\n $index,\n 'startPoint_timeProperty',\n $event\n )\n \"\n />\n <mt-select-field\n [label]=\"t('endTimeProperty')\"\n [options]=\"\n propertiesGrouped().length > 1\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"propertiesGrouped().length > 1\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [ngModel]=\"level.endPoint_timeProperty\"\n (ngModelChange)=\"\n updateTimelineLevelField(\n $index,\n 'endPoint_timeProperty',\n $event\n )\n \"\n />\n <mt-select-field\n [label]=\"t('progressProperty')\"\n [options]=\"\n propertiesGrouped().length > 1\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"propertiesGrouped().length > 1\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [ngModel]=\"level.progressProperty\"\n (ngModelChange)=\"\n updateTimelineLevelField(\n $index,\n 'progressProperty',\n $event\n )\n \"\n />\n @if (shouldShowTimelineParentProperty($index)) {\n <mt-select-field\n [label]=\"t('parentProperty')\"\n [options]=\"timelineParentPropertyOptions($index)\"\n optionLabel=\"name\"\n optionValue=\"key\"\n [ngModel]=\"level.parentProperty\"\n (ngModelChange)=\"\n updateTimelineLevelField(\n $index,\n 'parentProperty',\n $event\n )\n \"\n />\n }\n </div>\n\n <mt-string-array-input\n [label]=\"t('extraProperties')\"\n [options]=\"\n propertiesGrouped().length > 1\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"propertiesGrouped().length > 1\"\n [placeholder]=\"t('selectProperties')\"\n [ngModel]=\"level.extraProperties || level.extras || []\"\n (ngModelChange)=\"\n updateTimelineLevelField(\n $index,\n 'extraProperties',\n $event\n )\n \"\n />\n </div>\n }\n\n @if (timelineLevels().length === 0) {\n <div class=\"text-center py-4 text-muted-color text-sm\">\n {{ t(\"noTimelineLevelsHint\") }}\n </div>\n }\n </div>\n }\n @case (\"map\") {\n <mt-map-query\n [propertiesFlat]=\"propertiesFlat()\"\n [propertiesGrouped]=\"propertiesGrouped()\"\n [ngModel]=\"query()\"\n (ngModelChange)=\"onMapQueryChange($event)\"\n />\n }\n @case (\"splitter\") {\n <mt-splitter-query\n [propertiesFlat]=\"propertiesFlat()\"\n [propertiesGrouped]=\"propertiesGrouped()\"\n [ngModel]=\"query()\"\n (ngModelChange)=\"onSplitterQueryChange($event)\"\n />\n }\n @case (\"properties\") {\n <mt-properties-query\n [propertiesFlat]=\"propertiesFlat()\"\n [propertiesGrouped]=\"propertiesGrouped()\"\n [ngModel]=\"query()\"\n (ngModelChange)=\"onPropertiesQueryChange($event)\"\n />\n }\n @case (\"snapshot\") {\n <mt-snapshot-query\n [propertiesFlat]=\"propertiesFlat()\"\n [propertiesGrouped]=\"propertiesGrouped()\"\n [ngModel]=\"query()\"\n (ngModelChange)=\"onSnapshotQueryChange($event)\"\n />\n }\n @case (\"phaseGate\") {\n <div class=\"flex flex-col gap-2\">\n <mt-text-field\n [label]=\"t('levelId')\"\n [ngModel]=\"phaseGateLevelId()\"\n (ngModelChange)=\"onPhaseGateLevelIdChange($event)\"\n />\n <p class=\"text-xs text-muted-color\">\n {{ t(\"phaseGateLevelIdHint\") }}\n </p>\n </div>\n }\n @case (\"repeater\") {\n <div class=\"flex flex-col gap-5\">\n <mt-select-field\n [label]=\"t('repeaterDashboard')\"\n [options]=\"availableDashboards()\"\n optionLabel=\"name\"\n optionValue=\"id\"\n [ngModel]=\"repeaterDashboardId()\"\n (ngModelChange)=\"onRepeaterDashboardChange($event)\"\n />\n\n <mt-string-array-input\n [label]=\"t('repeaterSelectedProperties')\"\n [options]=\"\n propertiesGrouped().length > 1\n ? propertiesGrouped()\n : propertiesFlat()\n \"\n [group]=\"propertiesGrouped().length > 1\"\n [placeholder]=\"t('repeaterSelectedPropertiesPlaceholder')\"\n [ngModel]=\"repeaterSelectedProperties()\"\n (ngModelChange)=\"onRepeaterSelectedPropertiesChange($event)\"\n />\n </div>\n }\n }\n }\n </div>\n }\n }\n</div>\n" }]
|
|
34895
35372
|
}], 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"] }] } });
|
|
34896
35373
|
|
|
34897
35374
|
/**
|
|
@@ -34954,7 +35431,25 @@ class ManageItem {
|
|
|
34954
35431
|
// Basic validation: must have chart type and title
|
|
34955
35432
|
const hasChartType = !!cfg.serviceConfig?.chartType;
|
|
34956
35433
|
const hasTitle = !!(cfg.clientConfig?.title?.en || cfg.clientConfig?.title?.ar);
|
|
34957
|
-
|
|
35434
|
+
if (!hasChartType || !hasTitle)
|
|
35435
|
+
return false;
|
|
35436
|
+
// PhaseGate Table cannot safely infer these roles from response order.
|
|
35437
|
+
// Keep Save disabled until the dedicated editor has the minimum semantic
|
|
35438
|
+
// keys that its runtime contract requires.
|
|
35439
|
+
const capability = resolveCapability({
|
|
35440
|
+
chartTypeId: this.chartTypeId(),
|
|
35441
|
+
serviceType: cfg.serviceConfig?.chartType ?? null,
|
|
35442
|
+
componentName: cfg.clientConfig?.componentName ?? null,
|
|
35443
|
+
functionName: cfg.clientConfig?.functionName ?? null,
|
|
35444
|
+
});
|
|
35445
|
+
if (capability?.query.editor !== 'phaseGateTable')
|
|
35446
|
+
return true;
|
|
35447
|
+
const query = cfg.serviceConfig?.query;
|
|
35448
|
+
return [
|
|
35449
|
+
query?.['rowIdentityProperty'],
|
|
35450
|
+
query?.['phaseNameProperty'],
|
|
35451
|
+
query?.['phaseStatusProperty'],
|
|
35452
|
+
].every((value) => typeof value === 'string' && value.trim().length > 0);
|
|
34958
35453
|
}, ...(ngDevMode ? [{ debugName: "isValid" }] : /* istanbul ignore next */ []));
|
|
34959
35454
|
ngOnInit() {
|
|
34960
35455
|
// Check for dialog config data (when opened via DynamicDialog)
|
|
@@ -35159,7 +35654,7 @@ class GeneralSettings {
|
|
|
35159
35654
|
return labels[category] || category;
|
|
35160
35655
|
}
|
|
35161
35656
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: GeneralSettings, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
35162
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: GeneralSettings, isStandalone: true, selector: "mt-general-settings", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, isDialog: { classPropertyName: "isDialog", publicName: "isDialog", isSignal: true, isRequired: false, transformFunction: null }, hasPreselectedType: { classPropertyName: "hasPreselectedType", publicName: "hasPreselectedType", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { configChange: "configChange", chartTypeChange: "chartTypeChange" }, ngImport: i0, template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\
|
|
35657
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: GeneralSettings, isStandalone: true, selector: "mt-general-settings", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, isDialog: { classPropertyName: "isDialog", publicName: "isDialog", isSignal: true, isRequired: false, transformFunction: null }, hasPreselectedType: { classPropertyName: "hasPreselectedType", publicName: "hasPreselectedType", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { configChange: "configChange", chartTypeChange: "chartTypeChange" }, ngImport: i0, template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\n <!-- Basic Info Card -->\n <mt-card [title]=\"t('basicInfo')\">\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n <!-- English Title -->\n <mt-text-field\n [label]=\"t('titleEn')\"\n [ngModel]=\"config()?.clientConfig?.title?.en || ''\"\n (ngModelChange)=\"updateTitle('en', $event)\"\n [placeholder]=\"t('enterTitleEn')\"\n />\n\n <!-- Arabic Title -->\n <mt-text-field\n [label]=\"t('titleAr')\"\n [ngModel]=\"config()?.clientConfig?.title?.ar || ''\"\n (ngModelChange)=\"updateTitle('ar', $event)\"\n [placeholder]=\"t('enterTitleAr')\"\n dir=\"rtl\"\n />\n\n <!-- Component Name (readonly info) -->\n @if (selectedChartType(); as chartType) {\n <div class=\"md:col-span-2\">\n <div class=\"text-sm text-muted-color mb-1\">\n {{ t(\"selectedType\") }}\n </div>\n <div\n class=\"flex items-center gap-2 p-3 bg-surface-50 rounded-lg border border-surface-200\"\n >\n <mt-icon\n [icon]=\"chartType.icon\"\n class=\"text-lg text-primary-500\"\n ></mt-icon>\n <span class=\"font-medium\">{{ chartType.name }}</span>\n <span class=\"text-sm text-muted-color\"\n >({{ chartType.serviceType }})</span\n >\n </div>\n </div>\n }\n </div>\n </mt-card>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: TextField, selector: "mt-text-field", inputs: ["field", "hint", "label", "placeholder", "class", "type", "readonly", "pInputs", "required", "maxLength", "icon", "iconPosition"] }, { kind: "component", type: Card, selector: "mt-card", inputs: ["class", "title", "paddingless"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
35163
35658
|
}
|
|
35164
35659
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: GeneralSettings, decorators: [{
|
|
35165
35660
|
type: Component,
|
|
@@ -35171,7 +35666,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
35171
35666
|
Card,
|
|
35172
35667
|
TooltipModule,
|
|
35173
35668
|
Icon,
|
|
35174
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\
|
|
35669
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\n <!-- Basic Info Card -->\n <mt-card [title]=\"t('basicInfo')\">\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n <!-- English Title -->\n <mt-text-field\n [label]=\"t('titleEn')\"\n [ngModel]=\"config()?.clientConfig?.title?.en || ''\"\n (ngModelChange)=\"updateTitle('en', $event)\"\n [placeholder]=\"t('enterTitleEn')\"\n />\n\n <!-- Arabic Title -->\n <mt-text-field\n [label]=\"t('titleAr')\"\n [ngModel]=\"config()?.clientConfig?.title?.ar || ''\"\n (ngModelChange)=\"updateTitle('ar', $event)\"\n [placeholder]=\"t('enterTitleAr')\"\n dir=\"rtl\"\n />\n\n <!-- Component Name (readonly info) -->\n @if (selectedChartType(); as chartType) {\n <div class=\"md:col-span-2\">\n <div class=\"text-sm text-muted-color mb-1\">\n {{ t(\"selectedType\") }}\n </div>\n <div\n class=\"flex items-center gap-2 p-3 bg-surface-50 rounded-lg border border-surface-200\"\n >\n <mt-icon\n [icon]=\"chartType.icon\"\n class=\"text-lg text-primary-500\"\n ></mt-icon>\n <span class=\"font-medium\">{{ chartType.name }}</span>\n <span class=\"text-sm text-muted-color\"\n >({{ chartType.serviceType }})</span\n >\n </div>\n </div>\n }\n </div>\n </mt-card>\n</div>\n" }]
|
|
35175
35670
|
}], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], isDialog: [{ type: i0.Input, args: [{ isSignal: true, alias: "isDialog", required: false }] }], hasPreselectedType: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasPreselectedType", required: false }] }], configChange: [{ type: i0.Output, args: ["configChange"] }], chartTypeChange: [{ type: i0.Output, args: ["chartTypeChange"] }] } });
|
|
35176
35671
|
|
|
35177
35672
|
/**
|
|
@@ -37428,17 +37923,20 @@ class DatasourcePanelComponent {
|
|
|
37428
37923
|
const i = this.item();
|
|
37429
37924
|
return i?.config ?? null;
|
|
37430
37925
|
}, ...(ngDevMode ? [{ debugName: "config" }] : /* istanbul ignore next */ []));
|
|
37431
|
-
|
|
37926
|
+
capability = computed(() => {
|
|
37432
37927
|
const i = this.item();
|
|
37433
37928
|
if (!i?.config)
|
|
37434
37929
|
return null;
|
|
37435
37930
|
const cfg = i.config;
|
|
37436
|
-
|
|
37931
|
+
return resolveCapability({
|
|
37437
37932
|
chartTypeId: i.chartTypeId ?? null,
|
|
37438
37933
|
serviceType: cfg.serviceConfig?.chartType ?? null,
|
|
37439
37934
|
componentName: cfg.clientConfig?.componentName ?? null,
|
|
37440
37935
|
functionName: cfg.clientConfig?.functionName ?? null,
|
|
37441
37936
|
});
|
|
37937
|
+
}, ...(ngDevMode ? [{ debugName: "capability" }] : /* istanbul ignore next */ []));
|
|
37938
|
+
chartTypeConfig = computed(() => {
|
|
37939
|
+
const cap = this.capability();
|
|
37442
37940
|
if (!cap)
|
|
37443
37941
|
return null;
|
|
37444
37942
|
return CHART_TYPES.find((ct) => ct.id === cap.id) ?? null;
|
|
@@ -37446,7 +37944,7 @@ class DatasourcePanelComponent {
|
|
|
37446
37944
|
summary = computed(() => {
|
|
37447
37945
|
const i = this.item();
|
|
37448
37946
|
const cfg = i?.config;
|
|
37449
|
-
const cap = this.
|
|
37947
|
+
const cap = this.capability();
|
|
37450
37948
|
if (!cfg) {
|
|
37451
37949
|
return {
|
|
37452
37950
|
chartType: '',
|
|
@@ -37473,18 +37971,14 @@ class DatasourcePanelComponent {
|
|
|
37473
37971
|
if (sourceStatus !== 'ok') {
|
|
37474
37972
|
missing.push(this.t('panel.pickDataSource'));
|
|
37475
37973
|
}
|
|
37476
|
-
const requiredFields = cap?.id
|
|
37477
|
-
? extractRequiredFields(cap)
|
|
37478
|
-
: [];
|
|
37479
37974
|
const queryRecord = cfg.serviceConfig?.query ?? {};
|
|
37480
|
-
const
|
|
37481
|
-
|
|
37482
|
-
|
|
37483
|
-
|
|
37484
|
-
|
|
37485
|
-
|
|
37486
|
-
|
|
37487
|
-
});
|
|
37975
|
+
const requirementResult = evaluateQueryRequirements(queryRecord, cap?.query.schema);
|
|
37976
|
+
const missingRequired = [
|
|
37977
|
+
...requirementResult.missingRequired,
|
|
37978
|
+
...(requirementResult.missingRequiredAnyOf.length
|
|
37979
|
+
? [requirementResult.missingRequiredAnyOf.join(' / ')]
|
|
37980
|
+
: []),
|
|
37981
|
+
];
|
|
37488
37982
|
let fieldsStatus = 'ok';
|
|
37489
37983
|
let fieldsLabel = this.t('panel.fieldsReady');
|
|
37490
37984
|
let fieldsIcon = 'general.check-circle';
|
|
@@ -37533,68 +38027,68 @@ class DatasourcePanelComponent {
|
|
|
37533
38027
|
return this.transloco.translate(`dashboardBuilder.pass4.${key}`, params);
|
|
37534
38028
|
}
|
|
37535
38029
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: DatasourcePanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
37536
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: DatasourcePanelComponent, isStandalone: true, selector: "mt-datasource-panel", inputs: { item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { serviceConfigChange: "serviceConfigChange", openAdvanced: "openAdvanced" }, ngImport: i0, template: `
|
|
37537
|
-
<ng-container *transloco="let t; prefix: 'dashboardBuilder.pass4'">
|
|
37538
|
-
<div class="db-datasource-panel">
|
|
37539
|
-
<header class="db-datasource-panel__status">
|
|
37540
|
-
<div class="db-datasource-panel__chip">
|
|
37541
|
-
<i class="mti mti-development.database-01"></i>
|
|
37542
|
-
<span class="db-datasource-panel__chip-text">
|
|
37543
|
-
{{ summary().chartType || t('panel.unknownType') }}
|
|
37544
|
-
</span>
|
|
37545
|
-
</div>
|
|
37546
|
-
<div
|
|
37547
|
-
class="db-datasource-panel__chip"
|
|
37548
|
-
[attr.data-status]="summary().sourceStatus"
|
|
37549
|
-
>
|
|
37550
|
-
<i [class]="'mti mti-' + summary().sourceIcon"></i>
|
|
37551
|
-
<span class="db-datasource-panel__chip-text">
|
|
37552
|
-
{{ summary().sourceLabel }}
|
|
37553
|
-
</span>
|
|
37554
|
-
</div>
|
|
37555
|
-
<div
|
|
37556
|
-
class="db-datasource-panel__chip"
|
|
37557
|
-
[attr.data-status]="summary().fieldsStatus"
|
|
37558
|
-
>
|
|
37559
|
-
<i [class]="'mti mti-' + summary().fieldsIcon"></i>
|
|
37560
|
-
<span class="db-datasource-panel__chip-text">
|
|
37561
|
-
{{ summary().fieldsLabel }}
|
|
37562
|
-
</span>
|
|
37563
|
-
</div>
|
|
37564
|
-
</header>
|
|
37565
|
-
|
|
37566
|
-
@if (summary().missing.length) {
|
|
37567
|
-
<ul class="db-datasource-panel__hints">
|
|
37568
|
-
@for (msg of summary().missing; track msg) {
|
|
37569
|
-
<li class="db-datasource-panel__hint">
|
|
37570
|
-
<i class="mti mti-general.alert-circle"></i>
|
|
37571
|
-
<span>{{ msg }}</span>
|
|
37572
|
-
</li>
|
|
37573
|
-
}
|
|
37574
|
-
</ul>
|
|
37575
|
-
}
|
|
37576
|
-
|
|
37577
|
-
<div class="db-datasource-panel__inner">
|
|
37578
|
-
<mt-data-source-settings
|
|
37579
|
-
[config]="config()"
|
|
37580
|
-
[chartType]="chartTypeConfig()"
|
|
37581
|
-
(serviceConfigChange)="onServiceConfigChange($event)"
|
|
37582
|
-
/>
|
|
37583
|
-
</div>
|
|
37584
|
-
|
|
37585
|
-
<!-- Open advanced data editor fallback. -->
|
|
37586
|
-
<footer class="db-datasource-panel__footer">
|
|
37587
|
-
<mt-button
|
|
37588
|
-
[label]="t('panel.openLegacyEditor')"
|
|
37589
|
-
icon="general.edit-05"
|
|
37590
|
-
severity="secondary"
|
|
37591
|
-
size="small"
|
|
37592
|
-
[outlined]="true"
|
|
37593
|
-
(onClick)="openAdvanced.emit()"
|
|
37594
|
-
/>
|
|
37595
|
-
</footer>
|
|
37596
|
-
</div>
|
|
37597
|
-
</ng-container>
|
|
38030
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: DatasourcePanelComponent, isStandalone: true, selector: "mt-datasource-panel", inputs: { item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { serviceConfigChange: "serviceConfigChange", openAdvanced: "openAdvanced" }, ngImport: i0, template: `
|
|
38031
|
+
<ng-container *transloco="let t; prefix: 'dashboardBuilder.pass4'">
|
|
38032
|
+
<div class="db-datasource-panel">
|
|
38033
|
+
<header class="db-datasource-panel__status">
|
|
38034
|
+
<div class="db-datasource-panel__chip">
|
|
38035
|
+
<i class="mti mti-development.database-01"></i>
|
|
38036
|
+
<span class="db-datasource-panel__chip-text">
|
|
38037
|
+
{{ summary().chartType || t('panel.unknownType') }}
|
|
38038
|
+
</span>
|
|
38039
|
+
</div>
|
|
38040
|
+
<div
|
|
38041
|
+
class="db-datasource-panel__chip"
|
|
38042
|
+
[attr.data-status]="summary().sourceStatus"
|
|
38043
|
+
>
|
|
38044
|
+
<i [class]="'mti mti-' + summary().sourceIcon"></i>
|
|
38045
|
+
<span class="db-datasource-panel__chip-text">
|
|
38046
|
+
{{ summary().sourceLabel }}
|
|
38047
|
+
</span>
|
|
38048
|
+
</div>
|
|
38049
|
+
<div
|
|
38050
|
+
class="db-datasource-panel__chip"
|
|
38051
|
+
[attr.data-status]="summary().fieldsStatus"
|
|
38052
|
+
>
|
|
38053
|
+
<i [class]="'mti mti-' + summary().fieldsIcon"></i>
|
|
38054
|
+
<span class="db-datasource-panel__chip-text">
|
|
38055
|
+
{{ summary().fieldsLabel }}
|
|
38056
|
+
</span>
|
|
38057
|
+
</div>
|
|
38058
|
+
</header>
|
|
38059
|
+
|
|
38060
|
+
@if (summary().missing.length) {
|
|
38061
|
+
<ul class="db-datasource-panel__hints">
|
|
38062
|
+
@for (msg of summary().missing; track msg) {
|
|
38063
|
+
<li class="db-datasource-panel__hint">
|
|
38064
|
+
<i class="mti mti-general.alert-circle"></i>
|
|
38065
|
+
<span>{{ msg }}</span>
|
|
38066
|
+
</li>
|
|
38067
|
+
}
|
|
38068
|
+
</ul>
|
|
38069
|
+
}
|
|
38070
|
+
|
|
38071
|
+
<div class="db-datasource-panel__inner">
|
|
38072
|
+
<mt-data-source-settings
|
|
38073
|
+
[config]="config()"
|
|
38074
|
+
[chartType]="chartTypeConfig()"
|
|
38075
|
+
(serviceConfigChange)="onServiceConfigChange($event)"
|
|
38076
|
+
/>
|
|
38077
|
+
</div>
|
|
38078
|
+
|
|
38079
|
+
<!-- Open advanced data editor fallback. -->
|
|
38080
|
+
<footer class="db-datasource-panel__footer">
|
|
38081
|
+
<mt-button
|
|
38082
|
+
[label]="t('panel.openLegacyEditor')"
|
|
38083
|
+
icon="general.edit-05"
|
|
38084
|
+
severity="secondary"
|
|
38085
|
+
size="small"
|
|
38086
|
+
[outlined]="true"
|
|
38087
|
+
(onClick)="openAdvanced.emit()"
|
|
38088
|
+
/>
|
|
38089
|
+
</footer>
|
|
38090
|
+
</div>
|
|
38091
|
+
</ng-container>
|
|
37598
38092
|
`, isInline: true, styles: [".db-datasource-panel{display:flex;flex-direction:column;gap:.75rem}.db-datasource-panel__status{display:flex;flex-wrap:wrap;gap:.5rem}.db-datasource-panel__chip{display:inline-flex;align-items:center;gap:.4rem;padding:.35rem .6rem;font-size:.75rem;background:var(--p-surface-50, #f9fafb);border:1px solid var(--p-surface-200, #e5e7eb);border-radius:999px;color:var(--p-text-color, #1f2937)}.db-datasource-panel__chip[data-status=ok]{background:var(--p-green-50, #f0fdf4);border-color:var(--p-green-200, #bbf7d0);color:var(--p-green-700, #15803d)}.db-datasource-panel__chip[data-status=missing]{background:var(--p-amber-50, #fffbeb);border-color:var(--p-amber-200, #fde68a);color:var(--p-amber-700, #b45309)}.db-datasource-panel__hints{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.25rem}.db-datasource-panel__hint{display:flex;align-items:center;gap:.4rem;padding:.4rem .6rem;background:var(--p-amber-50, #fffbeb);border:1px solid var(--p-amber-200, #fde68a);border-radius:.375rem;color:var(--p-amber-700, #b45309);font-size:.75rem}.db-datasource-panel__inner{background:var(--p-surface-0, #fff);border:1px solid var(--p-surface-200, #e5e7eb);border-radius:.5rem;padding:.75rem;max-height:50vh;overflow-y:auto}.db-datasource-panel__footer{display:flex;justify-content:flex-end}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { 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"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: DataSourceSettings, selector: "mt-data-source-settings", inputs: ["config", "chartType", "informativeContext"], outputs: ["serviceConfigChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
37599
38093
|
}
|
|
37600
38094
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: DatasourcePanelComponent, decorators: [{
|
|
@@ -37605,74 +38099,70 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
37605
38099
|
TranslocoDirective,
|
|
37606
38100
|
Button,
|
|
37607
38101
|
DataSourceSettings,
|
|
37608
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: `
|
|
37609
|
-
<ng-container *transloco="let t; prefix: 'dashboardBuilder.pass4'">
|
|
37610
|
-
<div class="db-datasource-panel">
|
|
37611
|
-
<header class="db-datasource-panel__status">
|
|
37612
|
-
<div class="db-datasource-panel__chip">
|
|
37613
|
-
<i class="mti mti-development.database-01"></i>
|
|
37614
|
-
<span class="db-datasource-panel__chip-text">
|
|
37615
|
-
{{ summary().chartType || t('panel.unknownType') }}
|
|
37616
|
-
</span>
|
|
37617
|
-
</div>
|
|
37618
|
-
<div
|
|
37619
|
-
class="db-datasource-panel__chip"
|
|
37620
|
-
[attr.data-status]="summary().sourceStatus"
|
|
37621
|
-
>
|
|
37622
|
-
<i [class]="'mti mti-' + summary().sourceIcon"></i>
|
|
37623
|
-
<span class="db-datasource-panel__chip-text">
|
|
37624
|
-
{{ summary().sourceLabel }}
|
|
37625
|
-
</span>
|
|
37626
|
-
</div>
|
|
37627
|
-
<div
|
|
37628
|
-
class="db-datasource-panel__chip"
|
|
37629
|
-
[attr.data-status]="summary().fieldsStatus"
|
|
37630
|
-
>
|
|
37631
|
-
<i [class]="'mti mti-' + summary().fieldsIcon"></i>
|
|
37632
|
-
<span class="db-datasource-panel__chip-text">
|
|
37633
|
-
{{ summary().fieldsLabel }}
|
|
37634
|
-
</span>
|
|
37635
|
-
</div>
|
|
37636
|
-
</header>
|
|
37637
|
-
|
|
37638
|
-
@if (summary().missing.length) {
|
|
37639
|
-
<ul class="db-datasource-panel__hints">
|
|
37640
|
-
@for (msg of summary().missing; track msg) {
|
|
37641
|
-
<li class="db-datasource-panel__hint">
|
|
37642
|
-
<i class="mti mti-general.alert-circle"></i>
|
|
37643
|
-
<span>{{ msg }}</span>
|
|
37644
|
-
</li>
|
|
37645
|
-
}
|
|
37646
|
-
</ul>
|
|
37647
|
-
}
|
|
37648
|
-
|
|
37649
|
-
<div class="db-datasource-panel__inner">
|
|
37650
|
-
<mt-data-source-settings
|
|
37651
|
-
[config]="config()"
|
|
37652
|
-
[chartType]="chartTypeConfig()"
|
|
37653
|
-
(serviceConfigChange)="onServiceConfigChange($event)"
|
|
37654
|
-
/>
|
|
37655
|
-
</div>
|
|
37656
|
-
|
|
37657
|
-
<!-- Open advanced data editor fallback. -->
|
|
37658
|
-
<footer class="db-datasource-panel__footer">
|
|
37659
|
-
<mt-button
|
|
37660
|
-
[label]="t('panel.openLegacyEditor')"
|
|
37661
|
-
icon="general.edit-05"
|
|
37662
|
-
severity="secondary"
|
|
37663
|
-
size="small"
|
|
37664
|
-
[outlined]="true"
|
|
37665
|
-
(onClick)="openAdvanced.emit()"
|
|
37666
|
-
/>
|
|
37667
|
-
</footer>
|
|
37668
|
-
</div>
|
|
37669
|
-
</ng-container>
|
|
38102
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: `
|
|
38103
|
+
<ng-container *transloco="let t; prefix: 'dashboardBuilder.pass4'">
|
|
38104
|
+
<div class="db-datasource-panel">
|
|
38105
|
+
<header class="db-datasource-panel__status">
|
|
38106
|
+
<div class="db-datasource-panel__chip">
|
|
38107
|
+
<i class="mti mti-development.database-01"></i>
|
|
38108
|
+
<span class="db-datasource-panel__chip-text">
|
|
38109
|
+
{{ summary().chartType || t('panel.unknownType') }}
|
|
38110
|
+
</span>
|
|
38111
|
+
</div>
|
|
38112
|
+
<div
|
|
38113
|
+
class="db-datasource-panel__chip"
|
|
38114
|
+
[attr.data-status]="summary().sourceStatus"
|
|
38115
|
+
>
|
|
38116
|
+
<i [class]="'mti mti-' + summary().sourceIcon"></i>
|
|
38117
|
+
<span class="db-datasource-panel__chip-text">
|
|
38118
|
+
{{ summary().sourceLabel }}
|
|
38119
|
+
</span>
|
|
38120
|
+
</div>
|
|
38121
|
+
<div
|
|
38122
|
+
class="db-datasource-panel__chip"
|
|
38123
|
+
[attr.data-status]="summary().fieldsStatus"
|
|
38124
|
+
>
|
|
38125
|
+
<i [class]="'mti mti-' + summary().fieldsIcon"></i>
|
|
38126
|
+
<span class="db-datasource-panel__chip-text">
|
|
38127
|
+
{{ summary().fieldsLabel }}
|
|
38128
|
+
</span>
|
|
38129
|
+
</div>
|
|
38130
|
+
</header>
|
|
38131
|
+
|
|
38132
|
+
@if (summary().missing.length) {
|
|
38133
|
+
<ul class="db-datasource-panel__hints">
|
|
38134
|
+
@for (msg of summary().missing; track msg) {
|
|
38135
|
+
<li class="db-datasource-panel__hint">
|
|
38136
|
+
<i class="mti mti-general.alert-circle"></i>
|
|
38137
|
+
<span>{{ msg }}</span>
|
|
38138
|
+
</li>
|
|
38139
|
+
}
|
|
38140
|
+
</ul>
|
|
38141
|
+
}
|
|
38142
|
+
|
|
38143
|
+
<div class="db-datasource-panel__inner">
|
|
38144
|
+
<mt-data-source-settings
|
|
38145
|
+
[config]="config()"
|
|
38146
|
+
[chartType]="chartTypeConfig()"
|
|
38147
|
+
(serviceConfigChange)="onServiceConfigChange($event)"
|
|
38148
|
+
/>
|
|
38149
|
+
</div>
|
|
38150
|
+
|
|
38151
|
+
<!-- Open advanced data editor fallback. -->
|
|
38152
|
+
<footer class="db-datasource-panel__footer">
|
|
38153
|
+
<mt-button
|
|
38154
|
+
[label]="t('panel.openLegacyEditor')"
|
|
38155
|
+
icon="general.edit-05"
|
|
38156
|
+
severity="secondary"
|
|
38157
|
+
size="small"
|
|
38158
|
+
[outlined]="true"
|
|
38159
|
+
(onClick)="openAdvanced.emit()"
|
|
38160
|
+
/>
|
|
38161
|
+
</footer>
|
|
38162
|
+
</div>
|
|
38163
|
+
</ng-container>
|
|
37670
38164
|
`, styles: [".db-datasource-panel{display:flex;flex-direction:column;gap:.75rem}.db-datasource-panel__status{display:flex;flex-wrap:wrap;gap:.5rem}.db-datasource-panel__chip{display:inline-flex;align-items:center;gap:.4rem;padding:.35rem .6rem;font-size:.75rem;background:var(--p-surface-50, #f9fafb);border:1px solid var(--p-surface-200, #e5e7eb);border-radius:999px;color:var(--p-text-color, #1f2937)}.db-datasource-panel__chip[data-status=ok]{background:var(--p-green-50, #f0fdf4);border-color:var(--p-green-200, #bbf7d0);color:var(--p-green-700, #15803d)}.db-datasource-panel__chip[data-status=missing]{background:var(--p-amber-50, #fffbeb);border-color:var(--p-amber-200, #fde68a);color:var(--p-amber-700, #b45309)}.db-datasource-panel__hints{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.25rem}.db-datasource-panel__hint{display:flex;align-items:center;gap:.4rem;padding:.4rem .6rem;background:var(--p-amber-50, #fffbeb);border:1px solid var(--p-amber-200, #fde68a);border-radius:.375rem;color:var(--p-amber-700, #b45309);font-size:.75rem}.db-datasource-panel__inner{background:var(--p-surface-0, #fff);border:1px solid var(--p-surface-200, #e5e7eb);border-radius:.5rem;padding:.75rem;max-height:50vh;overflow-y:auto}.db-datasource-panel__footer{display:flex;justify-content:flex-end}\n"] }]
|
|
37671
38165
|
}], propDecorators: { item: [{ type: i0.Input, args: [{ isSignal: true, alias: "item", required: true }] }], serviceConfigChange: [{ type: i0.Output, args: ["serviceConfigChange"] }], openAdvanced: [{ type: i0.Output, args: ["openAdvanced"] }] } });
|
|
37672
|
-
function extractRequiredFields(cap) {
|
|
37673
|
-
const required = cap?.query?.schema?.required;
|
|
37674
|
-
return Array.isArray(required) ? required.map(String) : [];
|
|
37675
|
-
}
|
|
37676
38166
|
|
|
37677
38167
|
/**
|
|
37678
38168
|
* Pass 4 - Schema Control Renderer
|
|
@@ -46563,4 +47053,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
46563
47053
|
*/
|
|
46564
47054
|
|
|
46565
47055
|
export { RingGaugeChartHandler as $, StatisticCardComponent as A, TopbarCardComponent as B, CardContentComponent as C, DashboardItemStoreService as D, EChartComponent as E, FilterUtilsService as F, ChartDataService as G, HeaderCardComponent as H, BarChartHandler as I, PieChartHandler as J, StackBarChartHandler as K, LastHistoryLevelCardComponent as L, axisFormatters as M, groupDatesByYearAndMonth as N, GaugeChartHandler as O, PropertiesCardComponent as P, TableViewHandler as Q, OverviewCardHandler as R, StaticFiltersComponent as S, TableCardComponent as T, TimelineHandler as U, LineChartHandler as V, SnapshotHandler as W, ComparisonChartHandler as X, SplitterChartHandler as Y, LevelCardHandler as Z, MapChartHandler as _, DashboardItem as a, normalizeFilters as a$, SPlusChartHandler as a0, PhaseGateStepperHandler as a1, formatCurrency as a2, getCurrencySuffix as a3, formatPercentage as a4, formatNumber as a5, formatDate as a6, createAxisFormatter as a7, createTooltipFormatter as a8, formatWordsUnderBar as a9, StyleStudioDrawer as aA, StyleSettingsRenderer as aB, expandResetPatches as aC, StyleField as aD, SegmentedField as aE, ColorListField as aF, ArrayBuilderField as aG, KeyValueMapField as aH, LegendOrderField as aI, ItemCardMenuComponent as aJ, ChartFilterDrawer as aK, ItemContextToolbarComponent as aL, ItemConfigPopoverComponent as aM, GuidedConfigDialogComponent as aN, FilterChipsBarComponent as aO, FilterBuilderComponent as aP, DatasourcePanelComponent as aQ, SchemaControlRendererComponent as aR, FilterByGroupPipe as aS, GetChartActionsPipe as aT, CHART_CAPABILITIES as aU, getCapabilityById as aV, resolveCapability as aW, toBackendChartType as aX, normalizeChartTypeForRequest as aY, normalizeFilterOperation as aZ, normalizeAggregateFunction as a_, formatXAxis as aa, handleFiltersForCustom as ab, handleFilterForCard as ac, handleFilterForSnapshot as ad, DashboardList as ae, HTTPMethod as af, DashboardBuilderService as ag, DashboardStoreService as ah, isManagePagesDeleteResult as ai, ManagePages as aj, ManageBreadcrumb as ak, ManageFilterOnPage as al, DynamicFiltersConfig as am, ChartSettingsDrawer as an, DisplaySettings as ao, DefaultControlUi as ap, PieControlUi as aq, BarControlUi as ar, StackBarControlUi as as, ManageItem as at, CHART_TYPES as au, ManageItemService as av, GeneralSettings as aw, DataSourceSettings as ax, ActionsSettings as ay, ChartViewer as az, DashboardBuilder as b, selectorFromLegacy as b0, moduleIdFromSelector as b1, toBackendSourceLink as b2, toFormSourceLink as b3, normalizeOnLoad as b4, normalizeBeforeSave as b5, normalizeBeforeRequest as b6, CONFIG_DOMAINS as b7, domainsForCapability as b8, findDomain as b9, formatForEditor as bA, readByPath$1 as bB, setByPath as bC, applyControlPatchToPersisted as bD, applyControlPatchesToPersisted as bE, getControlSchema as bF, listControlSchemaIds as bG, listControlSchemas as bH, getFallbackControlSchema as bI, flattenSchema as bJ, resolveDisplayFields as bK, buildDisplayFieldPredicate as bL, bindingKey as bM, getBinding as bN, listBindings as bO, listBindingsForChart as bP, readBoundValue as bQ, ITEM_GUIDANCE_REGISTRY as bR, describeGuidance as bS, ItemGuidanceService as bT, POPOVER_TABS as ba, POPOVER_TAB_SPECS as bb, titleToUi as bc, applyTitleToPersisted as bd, datasourceToUi as be, fieldsToUi as bf, filtersToUi as bg, styleToUi as bh, applyStyleToPersisted as bi, layoutToUi as bj, applyLayoutToPersisted as bk, labelLegendFormatToUi as bl, applyLabelLegendFormatToPersisted as bm, behaviorToUi as bn, applyBehaviorToPersisted as bo, applyFilterChipsToPersisted as bp, persistedToUi as bq, buildAssembly as br, STYLE_PRESETS as bs, presetsForCapability as bt, findPreset as bu, validate as bv, hasBlockingIssues as bw, groupIssuesByDomain as bx, parseAdvancedJson as by, deepMerge$1 as bz, cloneDeep$1 as c, DashboardViewer as d, switchAllKeysSmall$1 as e, dynamicTextReplace as f, getNestedData as g, dynamicReorder as h, generalConfiguration as i, formatValue as j, getLocalizedTitle as k, sortChartData as l, addCommasToNumber as m, sortDataTableView as n, isMobilePlatform$1 as o, getColorFromConditions as p, CardFilterComponent as q, DynamicFiltersComponent as r, switchAllKeysToLower as s, CardInfoComponent as t, ChartCardComponent as u, EntityInfoComponent as v, normalizeDashboardCardEntityValue as w, EntityPreviewCardComponent as x, ListStatisticCardComponent as y, SkeletonCardComponent as z };
|
|
46566
|
-
//# sourceMappingURL=masterteam-dashboard-builder-masterteam-dashboard-builder-
|
|
47056
|
+
//# sourceMappingURL=masterteam-dashboard-builder-masterteam-dashboard-builder-F3nIcsti.mjs.map
|