@masterteam/dashboard-builder 0.0.53 → 0.0.56
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 +16 -6
- package/assets/dashboard-builder.css +1 -1
- package/assets/i18n/ar.json +14 -0
- package/fesm2022/{masterteam-dashboard-builder-dashboard-dialog.component-B_g_lLDx.mjs → masterteam-dashboard-builder-dashboard-dialog.component-C1N4w9Dz.mjs} +2 -2
- package/fesm2022/{masterteam-dashboard-builder-dashboard-dialog.component-B_g_lLDx.mjs.map → masterteam-dashboard-builder-dashboard-dialog.component-C1N4w9Dz.mjs.map} +1 -1
- package/fesm2022/{masterteam-dashboard-builder-masterteam-dashboard-builder-BlBnHwDv.mjs → masterteam-dashboard-builder-masterteam-dashboard-builder-DMDAO3cb.mjs} +994 -313
- package/fesm2022/masterteam-dashboard-builder-masterteam-dashboard-builder-DMDAO3cb.mjs.map +1 -0
- package/fesm2022/masterteam-dashboard-builder.mjs +1 -1
- package/package.json +3 -2
- package/types/masterteam-dashboard-builder.d.ts +71 -6
- package/fesm2022/masterteam-dashboard-builder-masterteam-dashboard-builder-BlBnHwDv.mjs.map +0 -1
|
@@ -47,6 +47,7 @@ import { SelectModule } from 'primeng/select';
|
|
|
47
47
|
import { DynamicDialogRef, DynamicDialogConfig } from 'primeng/dynamicdialog';
|
|
48
48
|
import { DynamicDrawerConfig, DrawerController } from '@masterteam/components/dynamic-drawer';
|
|
49
49
|
import { Tooltip as Tooltip$1, TruncateTooltip } from '@masterteam/components/tooltip';
|
|
50
|
+
import { ToastService } from '@masterteam/components/toast';
|
|
50
51
|
import * as mtIcons from '@masterteam/icons/assets/select-icons.json';
|
|
51
52
|
import { Avatar } from '@masterteam/components/avatar';
|
|
52
53
|
import { EntitiesPreview } from '@masterteam/components/entities';
|
|
@@ -55,6 +56,7 @@ import { ColorPickerField } from '@masterteam/components/color-picker-field';
|
|
|
55
56
|
import { IconField } from '@masterteam/components/icon-field';
|
|
56
57
|
import * as i2$2 from '@angular/cdk/drag-drop';
|
|
57
58
|
import { moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
|
|
59
|
+
import { FormulaBuilder } from '@masterteam/formula-builder';
|
|
58
60
|
import { RadioCards } from '@masterteam/components/radio-cards';
|
|
59
61
|
import { Menu } from '@masterteam/components/menu';
|
|
60
62
|
import { Chip } from '@masterteam/components/chip';
|
|
@@ -608,10 +610,11 @@ function mapBulkPropertiesResponseItem(item) {
|
|
|
608
610
|
}
|
|
609
611
|
function mapCatalogPropertyToPropertyItem(property) {
|
|
610
612
|
const configuration = readPropertyConfiguration(property.configuration);
|
|
613
|
+
const displayName = resolvePropertyDisplayName(property, configuration);
|
|
611
614
|
return {
|
|
612
615
|
id: property.id,
|
|
613
|
-
name:
|
|
614
|
-
label:
|
|
616
|
+
name: displayName,
|
|
617
|
+
label: displayName,
|
|
615
618
|
key: property.key,
|
|
616
619
|
normalizedKey: property.normalizedKey,
|
|
617
620
|
configuration,
|
|
@@ -628,6 +631,52 @@ function mapCatalogPropertyToPropertyItem(property) {
|
|
|
628
631
|
isSystem: property.isSystem,
|
|
629
632
|
};
|
|
630
633
|
}
|
|
634
|
+
function resolvePropertyDisplayName(property, configuration) {
|
|
635
|
+
const candidates = [
|
|
636
|
+
configuration?.['displayName'],
|
|
637
|
+
configuration?.['label'],
|
|
638
|
+
configuration?.['name'],
|
|
639
|
+
configuration?.['title'],
|
|
640
|
+
property.name,
|
|
641
|
+
property.normalizedKey,
|
|
642
|
+
property.key,
|
|
643
|
+
];
|
|
644
|
+
for (const candidate of candidates) {
|
|
645
|
+
const text = readPropertyDisplayCandidate(candidate);
|
|
646
|
+
if (text && text.trim().toLowerCase() !== 'property') {
|
|
647
|
+
return text;
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
return titleizePropertyKey(property.normalizedKey || property.key);
|
|
651
|
+
}
|
|
652
|
+
function readPropertyDisplayCandidate(candidate) {
|
|
653
|
+
if (candidate === null || candidate === undefined)
|
|
654
|
+
return null;
|
|
655
|
+
if (typeof candidate === 'string' || typeof candidate === 'number') {
|
|
656
|
+
const text = String(candidate).trim();
|
|
657
|
+
return text || null;
|
|
658
|
+
}
|
|
659
|
+
if (typeof candidate === 'object') {
|
|
660
|
+
const record = candidate;
|
|
661
|
+
return (readPropertyDisplayCandidate(record['en']) ||
|
|
662
|
+
readPropertyDisplayCandidate(record['ar']) ||
|
|
663
|
+
readPropertyDisplayCandidate(record['name']) ||
|
|
664
|
+
readPropertyDisplayCandidate(record['label']) ||
|
|
665
|
+
readPropertyDisplayCandidate(record['value']));
|
|
666
|
+
}
|
|
667
|
+
return null;
|
|
668
|
+
}
|
|
669
|
+
function titleizePropertyKey(value) {
|
|
670
|
+
const text = String(value ?? '').trim();
|
|
671
|
+
if (!text)
|
|
672
|
+
return '';
|
|
673
|
+
return text
|
|
674
|
+
.replace(/([a-z0-9])([A-Z])/g, '$1 $2')
|
|
675
|
+
.replace(/[_\-.]+/g, ' ')
|
|
676
|
+
.replace(/\s+/g, ' ')
|
|
677
|
+
.trim()
|
|
678
|
+
.replace(/\b\w/g, (char) => char.toUpperCase());
|
|
679
|
+
}
|
|
631
680
|
function readPropertyConfiguration(value) {
|
|
632
681
|
if (!value) {
|
|
633
682
|
return null;
|
|
@@ -675,6 +724,7 @@ class LimitedHttpService {
|
|
|
675
724
|
cache = new Map();
|
|
676
725
|
// In-flight requests (for deduplication)
|
|
677
726
|
inFlightRequests = new Map();
|
|
727
|
+
inFlightRequestScopes = new Map();
|
|
678
728
|
// Active requests tracking
|
|
679
729
|
_activeRequestsCount = signal(0, ...(ngDevMode ? [{ debugName: "_activeRequestsCount" }] : /* istanbul ignore next */ []));
|
|
680
730
|
reportReadyTimeout = null;
|
|
@@ -723,6 +773,7 @@ class LimitedHttpService {
|
|
|
723
773
|
*/
|
|
724
774
|
post(url, body, options) {
|
|
725
775
|
const dashboardId = this.getDashboardIdFromRoute();
|
|
776
|
+
const cacheScopeId = this.readCacheScopeId(options);
|
|
726
777
|
const finalBody = {
|
|
727
778
|
...body,
|
|
728
779
|
dashboardId,
|
|
@@ -731,8 +782,9 @@ class LimitedHttpService {
|
|
|
731
782
|
const request = {
|
|
732
783
|
url,
|
|
733
784
|
body: finalBody,
|
|
734
|
-
options:
|
|
785
|
+
options: this.stripInternalOptions(options),
|
|
735
786
|
dashboardId,
|
|
787
|
+
cacheScopeId,
|
|
736
788
|
};
|
|
737
789
|
// Notify pipeline of new request
|
|
738
790
|
this.requestSubject.next(request);
|
|
@@ -749,11 +801,13 @@ class LimitedHttpService {
|
|
|
749
801
|
*/
|
|
750
802
|
get(url, options) {
|
|
751
803
|
const dashboardId = this.getDashboardIdFromRoute();
|
|
804
|
+
const cacheScopeId = this.readCacheScopeId(options);
|
|
752
805
|
return new Observable((observer) => {
|
|
753
806
|
const request = {
|
|
754
807
|
url,
|
|
755
|
-
options:
|
|
808
|
+
options: this.stripInternalOptions(options),
|
|
756
809
|
dashboardId,
|
|
810
|
+
cacheScopeId,
|
|
757
811
|
};
|
|
758
812
|
this.requestSubject.next(request);
|
|
759
813
|
this.executeRequest(request).subscribe({
|
|
@@ -770,10 +824,30 @@ class LimitedHttpService {
|
|
|
770
824
|
this.debounceTimeMs = time;
|
|
771
825
|
}
|
|
772
826
|
/**
|
|
773
|
-
* Clear
|
|
827
|
+
* Clear cached responses. Pass a chart item id to scope the clear to that
|
|
828
|
+
* item's entries only; omit it to clear everything.
|
|
774
829
|
*/
|
|
775
|
-
clearCache() {
|
|
776
|
-
|
|
830
|
+
clearCache(cacheScopeId) {
|
|
831
|
+
if (cacheScopeId === undefined) {
|
|
832
|
+
this.cache.clear();
|
|
833
|
+
this.inFlightRequests.clear();
|
|
834
|
+
this.inFlightRequestScopes.clear();
|
|
835
|
+
}
|
|
836
|
+
else {
|
|
837
|
+
const target = String(cacheScopeId);
|
|
838
|
+
for (const [key, entry] of this.cache.entries()) {
|
|
839
|
+
if (entry.cacheScopeId !== undefined &&
|
|
840
|
+
String(entry.cacheScopeId) === target) {
|
|
841
|
+
this.cache.delete(key);
|
|
842
|
+
}
|
|
843
|
+
}
|
|
844
|
+
for (const [key, scope] of this.inFlightRequestScopes.entries()) {
|
|
845
|
+
if (scope !== undefined && String(scope) === target) {
|
|
846
|
+
this.inFlightRequests.delete(key);
|
|
847
|
+
this.inFlightRequestScopes.delete(key);
|
|
848
|
+
}
|
|
849
|
+
}
|
|
850
|
+
}
|
|
777
851
|
if (this.reportReadyTimeout) {
|
|
778
852
|
clearTimeout(this.reportReadyTimeout);
|
|
779
853
|
this.reportReadyTimeout = null;
|
|
@@ -836,7 +910,7 @@ class LimitedHttpService {
|
|
|
836
910
|
params.toString !== Object.prototype.toString
|
|
837
911
|
? params.toString()
|
|
838
912
|
: this.stableStringify(params);
|
|
839
|
-
return `${request.url}-${request.dashboardId}-${bodyKey}-${paramsKey}`;
|
|
913
|
+
return `${request.url}-${request.dashboardId}-${request.cacheScopeId ?? ''}-${bodyKey}-${paramsKey}`;
|
|
840
914
|
}
|
|
841
915
|
/**
|
|
842
916
|
* Execute HTTP request with caching and deduplication
|
|
@@ -870,10 +944,15 @@ class LimitedHttpService {
|
|
|
870
944
|
// Create shared observable with caching
|
|
871
945
|
const request$ = http$.pipe(retry(2), tap((response) => {
|
|
872
946
|
// Store in cache
|
|
873
|
-
this.cache.set(key, {
|
|
947
|
+
this.cache.set(key, {
|
|
948
|
+
data: response,
|
|
949
|
+
timestamp: Date.now(),
|
|
950
|
+
cacheScopeId: request.cacheScopeId,
|
|
951
|
+
});
|
|
874
952
|
}), finalize(() => {
|
|
875
953
|
// Remove from in-flight
|
|
876
954
|
this.inFlightRequests.delete(key);
|
|
955
|
+
this.inFlightRequestScopes.delete(key);
|
|
877
956
|
// Decrement active count
|
|
878
957
|
this._activeRequestsCount.update((count) => Math.max(0, count - 1));
|
|
879
958
|
// Check if all done
|
|
@@ -881,8 +960,18 @@ class LimitedHttpService {
|
|
|
881
960
|
}), shareReplay(1));
|
|
882
961
|
// Store in in-flight map
|
|
883
962
|
this.inFlightRequests.set(key, request$);
|
|
963
|
+
this.inFlightRequestScopes.set(key, request.cacheScopeId);
|
|
884
964
|
return request$;
|
|
885
965
|
}
|
|
966
|
+
readCacheScopeId(options) {
|
|
967
|
+
return options?.cacheScopeId;
|
|
968
|
+
}
|
|
969
|
+
stripInternalOptions(options) {
|
|
970
|
+
if (!options || typeof options !== 'object')
|
|
971
|
+
return options;
|
|
972
|
+
const { cacheScopeId: _cacheScopeId, ...httpOptions } = options;
|
|
973
|
+
return httpOptions;
|
|
974
|
+
}
|
|
886
975
|
/**
|
|
887
976
|
* Check if all requests finished and set report ready after delay
|
|
888
977
|
*/
|
|
@@ -5292,6 +5381,19 @@ const TITLE_STYLE_SECTION = {
|
|
|
5292
5381
|
mirrorPaths: ['clientConfig.configAsType.headerCardConfig.icon'],
|
|
5293
5382
|
description: 'Icon shown next to the title.',
|
|
5294
5383
|
},
|
|
5384
|
+
{
|
|
5385
|
+
key: 'iconPlacement',
|
|
5386
|
+
label: 'Icon placement',
|
|
5387
|
+
type: 'select',
|
|
5388
|
+
path: 'clientConfig.configAsType.headerCardConfig.iconPlacement',
|
|
5389
|
+
default: 'start',
|
|
5390
|
+
options: [
|
|
5391
|
+
{ label: 'Start', value: 'start' },
|
|
5392
|
+
{ label: 'End', value: 'end' },
|
|
5393
|
+
{ label: 'Above title', value: 'top' },
|
|
5394
|
+
],
|
|
5395
|
+
description: 'Position of the title icon inside the card header.',
|
|
5396
|
+
},
|
|
5295
5397
|
{
|
|
5296
5398
|
key: 'titleColor',
|
|
5297
5399
|
label: 'Title color',
|
|
@@ -5426,12 +5528,18 @@ const CARD_STYLE_SECTION = {
|
|
|
5426
5528
|
{
|
|
5427
5529
|
key: 'padding',
|
|
5428
5530
|
label: 'Padding',
|
|
5429
|
-
type: '
|
|
5430
|
-
min: 0,
|
|
5431
|
-
max: 48,
|
|
5432
|
-
step: 1,
|
|
5531
|
+
type: 'select',
|
|
5433
5532
|
path: 'clientConfig.configAsType.padding',
|
|
5434
5533
|
default: 16,
|
|
5534
|
+
options: [
|
|
5535
|
+
{ label: 'None', value: 0 },
|
|
5536
|
+
{ label: 'XS', value: 4 },
|
|
5537
|
+
{ label: 'S', value: 8 },
|
|
5538
|
+
{ label: 'M', value: 16 },
|
|
5539
|
+
{ label: 'L', value: 24 },
|
|
5540
|
+
{ label: 'XL', value: 32 },
|
|
5541
|
+
{ label: 'XXL', value: 48 },
|
|
5542
|
+
],
|
|
5435
5543
|
},
|
|
5436
5544
|
{
|
|
5437
5545
|
key: 'shadow',
|
|
@@ -5509,6 +5617,23 @@ const LEGEND_SECTION = {
|
|
|
5509
5617
|
scope: 'advanced',
|
|
5510
5618
|
visibleWhen: (cfg) => cfg.clientConfig?.configAsType?.legend?.show !== false,
|
|
5511
5619
|
},
|
|
5620
|
+
{
|
|
5621
|
+
key: 'legend.colors',
|
|
5622
|
+
label: 'Legend colors',
|
|
5623
|
+
type: 'keyValueMap',
|
|
5624
|
+
path: 'clientConfig.configAsType.legend.colorOverrides',
|
|
5625
|
+
description: 'Override colors for the current legend entries.',
|
|
5626
|
+
scope: 'advanced',
|
|
5627
|
+
valueFields: [
|
|
5628
|
+
{
|
|
5629
|
+
key: 'color',
|
|
5630
|
+
label: 'Color',
|
|
5631
|
+
type: 'color',
|
|
5632
|
+
path: 'color',
|
|
5633
|
+
},
|
|
5634
|
+
],
|
|
5635
|
+
visibleWhen: (cfg) => cfg.clientConfig?.configAsType?.legend?.show !== false,
|
|
5636
|
+
},
|
|
5512
5637
|
],
|
|
5513
5638
|
};
|
|
5514
5639
|
const LABEL_SECTION = {
|
|
@@ -6915,7 +7040,20 @@ const PROPERTY_CONFIG_FIELD = {
|
|
|
6915
7040
|
// which indexes propsConfigAsIndex strictly by selectedProperties order.
|
|
6916
7041
|
keysFrom: (cfg) => selectedPropertyOptions(cfg, { selectedOnly: true }),
|
|
6917
7042
|
valueFields: [
|
|
6918
|
-
{
|
|
7043
|
+
{
|
|
7044
|
+
key: 'width',
|
|
7045
|
+
label: 'Width',
|
|
7046
|
+
type: 'select',
|
|
7047
|
+
path: 'width',
|
|
7048
|
+
options: [
|
|
7049
|
+
{ label: 'Auto', value: '' },
|
|
7050
|
+
{ label: 'Quarter', value: '25%' },
|
|
7051
|
+
{ label: 'Third', value: '33.333%' },
|
|
7052
|
+
{ label: 'Half', value: '50%' },
|
|
7053
|
+
{ label: 'Two thirds', value: '66.667%' },
|
|
7054
|
+
{ label: 'Full', value: '100%' },
|
|
7055
|
+
],
|
|
7056
|
+
},
|
|
6919
7057
|
{
|
|
6920
7058
|
key: 'colorAsProperty',
|
|
6921
7059
|
label: 'Color from',
|
|
@@ -6961,7 +7099,34 @@ const PROPERTY_SETTINGS_SECTION = {
|
|
|
6961
7099
|
icon: 'general.dots-grid',
|
|
6962
7100
|
domain: 'entity',
|
|
6963
7101
|
scope: 'simple',
|
|
6964
|
-
fields: [
|
|
7102
|
+
fields: [
|
|
7103
|
+
{
|
|
7104
|
+
key: 'cardOrderProperty',
|
|
7105
|
+
label: 'Order cards by',
|
|
7106
|
+
type: 'select',
|
|
7107
|
+
path: 'clientConfig.configAsType.cardOrder.propertyKey',
|
|
7108
|
+
description: 'Sort the rendered cards by a selected property value.',
|
|
7109
|
+
optionsFrom: (cfg) => [
|
|
7110
|
+
{ label: 'No order', value: '' },
|
|
7111
|
+
...selectedPropertyOptions(cfg, { selectedOnly: true }),
|
|
7112
|
+
],
|
|
7113
|
+
},
|
|
7114
|
+
{
|
|
7115
|
+
key: 'cardOrderDirection',
|
|
7116
|
+
label: 'Order direction',
|
|
7117
|
+
type: 'select',
|
|
7118
|
+
path: 'clientConfig.configAsType.cardOrder.direction',
|
|
7119
|
+
default: 'asc',
|
|
7120
|
+
options: [
|
|
7121
|
+
{ label: 'Ascending', value: 'asc' },
|
|
7122
|
+
{ label: 'Descending', value: 'desc' },
|
|
7123
|
+
],
|
|
7124
|
+
visibleWhen: (cfg) => !!cfg.clientConfig?.configAsType?.cardOrder?.propertyKey,
|
|
7125
|
+
},
|
|
7126
|
+
PROPERTY_LABELS_FIELD,
|
|
7127
|
+
PROPERTY_CONFIG_FIELD,
|
|
7128
|
+
PROPERTY_COLORS_FIELD,
|
|
7129
|
+
],
|
|
6965
7130
|
};
|
|
6966
7131
|
// The performance card renders via entity-preview-card, which has no trend
|
|
6967
7132
|
// concept — every former field here wrote a path no renderer read. Left empty
|
|
@@ -11261,7 +11426,21 @@ function isMobilePlatform$1() {
|
|
|
11261
11426
|
* Matches old getColorFromConditions behavior
|
|
11262
11427
|
*/
|
|
11263
11428
|
function getColorFromConditions(conditions, index, value) {
|
|
11264
|
-
if (!conditions
|
|
11429
|
+
if (!conditions)
|
|
11430
|
+
return undefined;
|
|
11431
|
+
const indexedConditions = !Array.isArray(conditions)
|
|
11432
|
+
? conditions[index]
|
|
11433
|
+
: null;
|
|
11434
|
+
if (indexedConditions?.length) {
|
|
11435
|
+
const numericValue = parseNumericValue(value);
|
|
11436
|
+
for (const condition of indexedConditions) {
|
|
11437
|
+
if (matchesColorCondition(condition, numericValue)) {
|
|
11438
|
+
return condition.color;
|
|
11439
|
+
}
|
|
11440
|
+
}
|
|
11441
|
+
return undefined;
|
|
11442
|
+
}
|
|
11443
|
+
if (!Array.isArray(conditions))
|
|
11265
11444
|
return undefined;
|
|
11266
11445
|
for (const condition of conditions) {
|
|
11267
11446
|
if (!condition)
|
|
@@ -11306,6 +11485,39 @@ function getColorFromConditions(conditions, index, value) {
|
|
|
11306
11485
|
}
|
|
11307
11486
|
return undefined;
|
|
11308
11487
|
}
|
|
11488
|
+
function matchesColorCondition(condition, numericValue) {
|
|
11489
|
+
if (!condition)
|
|
11490
|
+
return false;
|
|
11491
|
+
const value1 = parseNumericValue(condition.value1);
|
|
11492
|
+
const value2 = parseNumericValue(condition.value2);
|
|
11493
|
+
if (condition.type === ColorConditionType.Equal &&
|
|
11494
|
+
condition.value1 !== undefined &&
|
|
11495
|
+
condition.value1 !== null &&
|
|
11496
|
+
value1 === numericValue) {
|
|
11497
|
+
return true;
|
|
11498
|
+
}
|
|
11499
|
+
if (condition.type === ColorConditionType.GreaterThan &&
|
|
11500
|
+
numericValue > value1) {
|
|
11501
|
+
return true;
|
|
11502
|
+
}
|
|
11503
|
+
if (condition.type === ColorConditionType.GreaterThanOrEqual &&
|
|
11504
|
+
numericValue >= value1) {
|
|
11505
|
+
return true;
|
|
11506
|
+
}
|
|
11507
|
+
if (condition.type === ColorConditionType.LessThan && numericValue < value1) {
|
|
11508
|
+
return true;
|
|
11509
|
+
}
|
|
11510
|
+
if (condition.type === ColorConditionType.LessThanOrEqual &&
|
|
11511
|
+
numericValue <= value1) {
|
|
11512
|
+
return true;
|
|
11513
|
+
}
|
|
11514
|
+
if (condition.type === ColorConditionType.Between &&
|
|
11515
|
+
numericValue >= value1 &&
|
|
11516
|
+
numericValue <= value2) {
|
|
11517
|
+
return true;
|
|
11518
|
+
}
|
|
11519
|
+
return false;
|
|
11520
|
+
}
|
|
11309
11521
|
/**
|
|
11310
11522
|
* Create a GUID v4 string
|
|
11311
11523
|
* Used for unique resource IDs in timeline
|
|
@@ -11357,33 +11569,7 @@ function getLabelFromConditions(conditionsByIndex, barIndex, value, language = '
|
|
|
11357
11569
|
if (conditions?.length) {
|
|
11358
11570
|
const numericValue = parseNumericValue(value);
|
|
11359
11571
|
for (const condition of conditions) {
|
|
11360
|
-
|
|
11361
|
-
if (condition.type === ColorConditionType.Equal &&
|
|
11362
|
-
condition.value1 === numericValue) {
|
|
11363
|
-
matches = true;
|
|
11364
|
-
}
|
|
11365
|
-
else if (condition.type === ColorConditionType.GreaterThan &&
|
|
11366
|
-
numericValue > (condition.value1 ?? 0)) {
|
|
11367
|
-
matches = true;
|
|
11368
|
-
}
|
|
11369
|
-
else if (condition.type === ColorConditionType.GreaterThanOrEqual &&
|
|
11370
|
-
numericValue >= (condition.value1 ?? 0)) {
|
|
11371
|
-
matches = true;
|
|
11372
|
-
}
|
|
11373
|
-
else if (condition.type === ColorConditionType.LessThan &&
|
|
11374
|
-
numericValue < (condition.value1 ?? 0)) {
|
|
11375
|
-
matches = true;
|
|
11376
|
-
}
|
|
11377
|
-
else if (condition.type === ColorConditionType.LessThanOrEqual &&
|
|
11378
|
-
numericValue <= (condition.value1 ?? 0)) {
|
|
11379
|
-
matches = true;
|
|
11380
|
-
}
|
|
11381
|
-
else if (condition.type === ColorConditionType.Between &&
|
|
11382
|
-
numericValue >= (condition.value1 ?? 0) &&
|
|
11383
|
-
numericValue <= (condition.value2 ?? 0)) {
|
|
11384
|
-
matches = true;
|
|
11385
|
-
}
|
|
11386
|
-
if (matches) {
|
|
11572
|
+
if (matchesColorCondition(condition, numericValue)) {
|
|
11387
11573
|
const label = language === 'ar' ? condition.labelAr : condition.labelEn;
|
|
11388
11574
|
return label || undefined;
|
|
11389
11575
|
}
|
|
@@ -19676,7 +19862,6 @@ class ChartDataService {
|
|
|
19676
19862
|
*/
|
|
19677
19863
|
buildRequest(config, filters) {
|
|
19678
19864
|
const serviceConfig = config.serviceConfig;
|
|
19679
|
-
const clientConfig = config.clientConfig;
|
|
19680
19865
|
// requestType is persisted on clientConfig. Legacy/generated configs can
|
|
19681
19866
|
// omit it, so fall back to the registry capability for data-backed charts.
|
|
19682
19867
|
const requestType = this.resolveRequestType(config);
|
|
@@ -19760,6 +19945,14 @@ class ChartDataService {
|
|
|
19760
19945
|
}
|
|
19761
19946
|
return params;
|
|
19762
19947
|
}
|
|
19948
|
+
withCacheScope(config, options = {}) {
|
|
19949
|
+
const cacheScopeId = config.serviceConfig?.dashboardId;
|
|
19950
|
+
return cacheScopeId === undefined ||
|
|
19951
|
+
cacheScopeId === null ||
|
|
19952
|
+
cacheScopeId === ''
|
|
19953
|
+
? options
|
|
19954
|
+
: { ...options, cacheScopeId };
|
|
19955
|
+
}
|
|
19763
19956
|
/**
|
|
19764
19957
|
* Fetch level data
|
|
19765
19958
|
*/
|
|
@@ -19776,7 +19969,7 @@ class ChartDataService {
|
|
|
19776
19969
|
// Add filters
|
|
19777
19970
|
params = this.buildHttpParams(params, filters);
|
|
19778
19971
|
return this.http
|
|
19779
|
-
.get(endpoint, { params })
|
|
19972
|
+
.get(endpoint, this.withCacheScope(config, { params }))
|
|
19780
19973
|
.pipe(map$1((res) => res?.data || res));
|
|
19781
19974
|
}
|
|
19782
19975
|
/**
|
|
@@ -19791,7 +19984,7 @@ class ChartDataService {
|
|
|
19791
19984
|
}
|
|
19792
19985
|
params = this.buildHttpParams(params, filters);
|
|
19793
19986
|
return this.http
|
|
19794
|
-
.get(endpoint, { params })
|
|
19987
|
+
.get(endpoint, this.withCacheScope(config, { params }))
|
|
19795
19988
|
.pipe(map$1((res) => res?.data || res));
|
|
19796
19989
|
}
|
|
19797
19990
|
/**
|
|
@@ -19802,7 +19995,7 @@ class ChartDataService {
|
|
|
19802
19995
|
const endpoint = serviceConfig?.['endpoint'] || '/dashboards/log';
|
|
19803
19996
|
const params = this.buildHttpParams(new HttpParams(), filters);
|
|
19804
19997
|
return this.http
|
|
19805
|
-
.get(endpoint, { params })
|
|
19998
|
+
.get(endpoint, this.withCacheScope(config, { params }))
|
|
19806
19999
|
.pipe(map$1((res) => res?.data || res));
|
|
19807
20000
|
}
|
|
19808
20001
|
/**
|
|
@@ -19827,7 +20020,7 @@ class ChartDataService {
|
|
|
19827
20020
|
: handleFiltersForCustom(svcConfig, filters);
|
|
19828
20021
|
const body = normalizeBeforeRequest(substituted);
|
|
19829
20022
|
return this.http
|
|
19830
|
-
.post(url, body, { headers })
|
|
20023
|
+
.post(url, body, this.withCacheScope(config, { headers }))
|
|
19831
20024
|
.pipe(map$1((value) => value?.data));
|
|
19832
20025
|
});
|
|
19833
20026
|
return forkJoin(requests$);
|
|
@@ -19846,7 +20039,7 @@ class ChartDataService {
|
|
|
19846
20039
|
// splitChart→SplitChart), source-link DTO keys, selector backfill.
|
|
19847
20040
|
const payload = normalizeBeforeRequest(substituted);
|
|
19848
20041
|
return this.http
|
|
19849
|
-
.post(url, payload, { headers })
|
|
20042
|
+
.post(url, payload, this.withCacheScope(config, { headers }))
|
|
19850
20043
|
.pipe(map$1((res) => res?.data || res));
|
|
19851
20044
|
}
|
|
19852
20045
|
/**
|
|
@@ -19888,7 +20081,7 @@ class ChartDataService {
|
|
|
19888
20081
|
// Build URL exactly like old implementation
|
|
19889
20082
|
const url = `${this.urlPrefix}dashboards/${this.apiVersion}GetSnapShotInfo/${levelIdSegment?.length ? levelIdSegment + '/' : ''}${timeFrame}?year=${year}`;
|
|
19890
20083
|
return this.http
|
|
19891
|
-
.post(url, { AvgPerPeriod: !!query?.['getAveragePerPeriod'] }, { headers })
|
|
20084
|
+
.post(url, { AvgPerPeriod: !!query?.['getAveragePerPeriod'] }, this.withCacheScope(config, { headers }))
|
|
19892
20085
|
.pipe(map$1((res) => res?.data || res));
|
|
19893
20086
|
}
|
|
19894
20087
|
/**
|
|
@@ -19926,7 +20119,7 @@ class ChartDataService {
|
|
|
19926
20119
|
})();
|
|
19927
20120
|
const url = `${this.urlPrefix}Dashboards/${this.apiVersion}GetCards/${moduleIdSegment}`;
|
|
19928
20121
|
return this.http
|
|
19929
|
-
.post(url, {}, { headers, params: cardFilters })
|
|
20122
|
+
.post(url, {}, this.withCacheScope(config, { headers, params: cardFilters }))
|
|
19930
20123
|
.pipe(map$1((value) => value?.data));
|
|
19931
20124
|
});
|
|
19932
20125
|
return forkJoin(requests$);
|
|
@@ -19935,11 +20128,11 @@ class ChartDataService {
|
|
|
19935
20128
|
* Fetch timeline dependencies
|
|
19936
20129
|
* URL: ${urlPrefix}dashboards/${apiVersion}ProjectsDependancies
|
|
19937
20130
|
*/
|
|
19938
|
-
fetchTimelineDependencies(
|
|
20131
|
+
fetchTimelineDependencies(config, _filters) {
|
|
19939
20132
|
const headers = { noMessage: 'true' };
|
|
19940
20133
|
const url = `${this.urlPrefix}dashboards/${this.apiVersion}ProjectsDependancies`;
|
|
19941
20134
|
return this.http
|
|
19942
|
-
.get(url, { headers })
|
|
20135
|
+
.get(url, this.withCacheScope(config, { headers }))
|
|
19943
20136
|
.pipe(map$1((res) => res?.data || res));
|
|
19944
20137
|
}
|
|
19945
20138
|
/**
|
|
@@ -19953,7 +20146,7 @@ class ChartDataService {
|
|
|
19953
20146
|
}
|
|
19954
20147
|
const params = this.buildHttpParams(new HttpParams(), filters);
|
|
19955
20148
|
return this.http
|
|
19956
|
-
.get(endpoint, { params })
|
|
20149
|
+
.get(endpoint, this.withCacheScope(config, { params }))
|
|
19957
20150
|
.pipe(map$1((res) => res?.data || res));
|
|
19958
20151
|
}
|
|
19959
20152
|
/**
|
|
@@ -19968,7 +20161,9 @@ class ChartDataService {
|
|
|
19968
20161
|
return of(null);
|
|
19969
20162
|
}
|
|
19970
20163
|
const url = `${this.urlPrefix}api/Levels/${levelId}/PhaseGates`;
|
|
19971
|
-
return this.http
|
|
20164
|
+
return this.http
|
|
20165
|
+
.get(url, this.withCacheScope(config))
|
|
20166
|
+
.pipe(map$1((res) => res?.data || res));
|
|
19972
20167
|
}
|
|
19973
20168
|
/**
|
|
19974
20169
|
* Fetch data from custom API (customApi.customApiUrl)
|
|
@@ -19998,11 +20193,11 @@ class ChartDataService {
|
|
|
19998
20193
|
: handleFiltersForCustom(baseConfig, filters || {});
|
|
19999
20194
|
const body = normalizeBeforeRequest(substituted);
|
|
20000
20195
|
return this.http
|
|
20001
|
-
.post(fullUrl, body, { headers })
|
|
20196
|
+
.post(fullUrl, body, this.withCacheScope(config, { headers }))
|
|
20002
20197
|
.pipe(map$1((res) => res?.data || res));
|
|
20003
20198
|
}
|
|
20004
20199
|
return this.http
|
|
20005
|
-
.get(fullUrl, { headers })
|
|
20200
|
+
.get(fullUrl, this.withCacheScope(config, { headers }))
|
|
20006
20201
|
.pipe(map$1((res) => res?.data || res));
|
|
20007
20202
|
}
|
|
20008
20203
|
/**
|
|
@@ -20039,6 +20234,14 @@ class ChartDataService {
|
|
|
20039
20234
|
refreshItem(dashboardId) {
|
|
20040
20235
|
this.itemStore.updateStoreForItem(dashboardId, { GetData: true });
|
|
20041
20236
|
}
|
|
20237
|
+
/**
|
|
20238
|
+
* Clear cached chart responses so the next fetchChartData() call hits the
|
|
20239
|
+
* network instead of serving a stale cached response. Pass a dashboardId to
|
|
20240
|
+
* scope the clear to one chart's data source, or omit it to clear everything.
|
|
20241
|
+
*/
|
|
20242
|
+
clearCache(dashboardId) {
|
|
20243
|
+
this.http.clearCache(dashboardId);
|
|
20244
|
+
}
|
|
20042
20245
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ChartDataService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
20043
20246
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ChartDataService, providedIn: 'root' });
|
|
20044
20247
|
}
|
|
@@ -20073,6 +20276,7 @@ class ActionService {
|
|
|
20073
20276
|
itemStore = inject(DashboardItemStoreService);
|
|
20074
20277
|
modalService = inject(ModalService);
|
|
20075
20278
|
dashboardService = inject(DashboardBuilderService);
|
|
20279
|
+
toast = inject(ToastService);
|
|
20076
20280
|
/**
|
|
20077
20281
|
* Handle actions for a component based on event type
|
|
20078
20282
|
*/
|
|
@@ -20210,7 +20414,7 @@ class ActionService {
|
|
|
20210
20414
|
navigateToEntity(action, data, config) {
|
|
20211
20415
|
const recordId = this.findEntityId(data);
|
|
20212
20416
|
if (!recordId) {
|
|
20213
|
-
|
|
20417
|
+
this.warnNavigateToEntityBlocked('Cannot open the project workspace because the clicked row has no Id value.');
|
|
20214
20418
|
return;
|
|
20215
20419
|
}
|
|
20216
20420
|
const workspaceId = this.findWorkspaceId(config);
|
|
@@ -20219,12 +20423,12 @@ class ActionService {
|
|
|
20219
20423
|
if (workspaceId === null ||
|
|
20220
20424
|
workspaceId === undefined ||
|
|
20221
20425
|
workspaceId === '') {
|
|
20222
|
-
|
|
20426
|
+
this.warnNavigateToEntityBlocked('Cannot open the project workspace because this chart has no workspace selected.');
|
|
20223
20427
|
return;
|
|
20224
20428
|
}
|
|
20225
20429
|
const levelId = this.findLevelId(data, config, action);
|
|
20226
20430
|
if (!levelId) {
|
|
20227
|
-
|
|
20431
|
+
this.warnNavigateToEntityBlocked('Cannot open the project workspace because no Level selection was found on this chart.');
|
|
20228
20432
|
return;
|
|
20229
20433
|
}
|
|
20230
20434
|
const urlTree = this.router.createUrlTree([
|
|
@@ -20250,7 +20454,7 @@ class ActionService {
|
|
|
20250
20454
|
return direct;
|
|
20251
20455
|
}
|
|
20252
20456
|
const fromWorkspaceSelector = this.parseIdFromSelector(serviceConfig['workspace']);
|
|
20253
|
-
if (fromWorkspaceSelector)
|
|
20457
|
+
if (fromWorkspaceSelector !== null)
|
|
20254
20458
|
return fromWorkspaceSelector;
|
|
20255
20459
|
const selections = Array.isArray(serviceConfig['selection'])
|
|
20256
20460
|
? serviceConfig['selection']
|
|
@@ -20258,10 +20462,13 @@ class ActionService {
|
|
|
20258
20462
|
for (const selection of selections) {
|
|
20259
20463
|
const fromSelection = selection?.workspaceId ??
|
|
20260
20464
|
this.parseIdFromSelector(selection?.workspace);
|
|
20261
|
-
if (fromSelection
|
|
20465
|
+
if (fromSelection !== null &&
|
|
20466
|
+
fromSelection !== undefined &&
|
|
20467
|
+
fromSelection !== '') {
|
|
20262
20468
|
return fromSelection;
|
|
20469
|
+
}
|
|
20263
20470
|
}
|
|
20264
|
-
return
|
|
20471
|
+
return this.findWorkspaceIdFromLevelSelection(selections);
|
|
20265
20472
|
}
|
|
20266
20473
|
/** Parse the trailing numeric id from a selector like "Template:48" -> "48". */
|
|
20267
20474
|
parseIdFromSelector(selector) {
|
|
@@ -20275,21 +20482,21 @@ class ActionService {
|
|
|
20275
20482
|
this.unwrapActionValue(data?.LevelId) ??
|
|
20276
20483
|
this.unwrapActionValue(data?.levelID) ??
|
|
20277
20484
|
this.unwrapActionValue(data?.LEVEL_ID);
|
|
20278
|
-
if (direct)
|
|
20485
|
+
if (this.hasResolvedValue(direct))
|
|
20279
20486
|
return direct;
|
|
20280
20487
|
const extraValues = data?.extraValues ?? data?.extraValue ?? data?._original?.extraValues;
|
|
20281
20488
|
const extraLevelId = this.findValueByIdentity(extraValues, [
|
|
20282
20489
|
'levelId',
|
|
20283
20490
|
'level_id',
|
|
20284
20491
|
]);
|
|
20285
|
-
if (extraLevelId)
|
|
20492
|
+
if (this.hasResolvedValue(extraLevelId))
|
|
20286
20493
|
return extraLevelId;
|
|
20287
20494
|
const configured = this.findLevelIdFromSelections(config) ??
|
|
20288
20495
|
this.parseLevelIdFromSelector(action.config?.['selector']) ??
|
|
20289
20496
|
this.parseLevelIdFromSelector(config.serviceConfig?.['selector']) ??
|
|
20290
20497
|
this.parseLevelIdFromSelector(config.serviceConfig?.['moduleSelector']) ??
|
|
20291
20498
|
this.parseLevelIdFromSelector(config.serviceConfig?.query?.['selector']);
|
|
20292
|
-
if (configured)
|
|
20499
|
+
if (this.hasResolvedValue(configured))
|
|
20293
20500
|
return configured;
|
|
20294
20501
|
const moduleType = String(config.serviceConfig?.['moduleType'] ??
|
|
20295
20502
|
config.serviceConfig?.query?.['moduleType'] ??
|
|
@@ -20318,6 +20525,26 @@ class ActionService {
|
|
|
20318
20525
|
const match = String(selector).match(/^Level:(\d+)/i);
|
|
20319
20526
|
return match?.[1] ?? null;
|
|
20320
20527
|
}
|
|
20528
|
+
findWorkspaceIdFromLevelSelection(selections) {
|
|
20529
|
+
const levelSelector = selections
|
|
20530
|
+
.map((selection) => selection?.selector)
|
|
20531
|
+
.find((selector) => this.parseLevelIdFromSelector(selector));
|
|
20532
|
+
if (!levelSelector)
|
|
20533
|
+
return null;
|
|
20534
|
+
const tree = this.dashboardService.getCachedModulesTree() ??
|
|
20535
|
+
this.dashboardService.getCachedModulesTree({ services: ['pplus'] }) ??
|
|
20536
|
+
[];
|
|
20537
|
+
for (const service of tree) {
|
|
20538
|
+
for (const module of service.modules ?? []) {
|
|
20539
|
+
for (const value of module.values ?? []) {
|
|
20540
|
+
if ((value.children ?? []).some((child) => child.selector === levelSelector)) {
|
|
20541
|
+
return this.parseIdFromSelector(value.selector);
|
|
20542
|
+
}
|
|
20543
|
+
}
|
|
20544
|
+
}
|
|
20545
|
+
}
|
|
20546
|
+
return null;
|
|
20547
|
+
}
|
|
20321
20548
|
findValueByIdentity(collection, identities) {
|
|
20322
20549
|
if (!collection || typeof collection !== 'object')
|
|
20323
20550
|
return null;
|
|
@@ -20338,7 +20565,7 @@ class ActionService {
|
|
|
20338
20565
|
.map((candidate) => this.normalizeIdentity(candidate));
|
|
20339
20566
|
if (candidates.some((candidate) => normalizedIdentities.includes(candidate))) {
|
|
20340
20567
|
const unwrapped = this.unwrapActionValue(value);
|
|
20341
|
-
if (unwrapped)
|
|
20568
|
+
if (this.hasResolvedValue(unwrapped))
|
|
20342
20569
|
return unwrapped;
|
|
20343
20570
|
}
|
|
20344
20571
|
}
|
|
@@ -20351,14 +20578,14 @@ class ActionService {
|
|
|
20351
20578
|
this.unwrapActionValue(data?.id) ??
|
|
20352
20579
|
this.unwrapActionValue(data?.ID) ??
|
|
20353
20580
|
this.unwrapActionValue(data?.key);
|
|
20354
|
-
if (direct)
|
|
20581
|
+
if (this.hasResolvedValue(direct))
|
|
20355
20582
|
return direct;
|
|
20356
20583
|
const extraValues = data?.extraValues ?? data?.extraValue ?? data?._original?.extraValues;
|
|
20357
20584
|
const extraId = this.findIdInCollection(extraValues);
|
|
20358
|
-
if (extraId)
|
|
20585
|
+
if (this.hasResolvedValue(extraId))
|
|
20359
20586
|
return extraId;
|
|
20360
20587
|
const originalId = this.findIdInCollection(data?._original);
|
|
20361
|
-
if (originalId)
|
|
20588
|
+
if (this.hasResolvedValue(originalId))
|
|
20362
20589
|
return originalId;
|
|
20363
20590
|
return this.findIdInCollection(data);
|
|
20364
20591
|
}
|
|
@@ -20371,14 +20598,14 @@ class ActionService {
|
|
|
20371
20598
|
for (const [key, value] of entries) {
|
|
20372
20599
|
if (this.isIdField(key, value)) {
|
|
20373
20600
|
const unwrapped = this.unwrapActionValue(value);
|
|
20374
|
-
if (unwrapped)
|
|
20601
|
+
if (this.hasResolvedValue(unwrapped))
|
|
20375
20602
|
return unwrapped;
|
|
20376
20603
|
}
|
|
20377
20604
|
}
|
|
20378
20605
|
for (const [, value] of entries) {
|
|
20379
20606
|
if (value && typeof value === 'object') {
|
|
20380
20607
|
const nested = this.findIdInCollection(value);
|
|
20381
|
-
if (nested)
|
|
20608
|
+
if (this.hasResolvedValue(nested))
|
|
20382
20609
|
return nested;
|
|
20383
20610
|
}
|
|
20384
20611
|
}
|
|
@@ -20407,6 +20634,9 @@ class ActionService {
|
|
|
20407
20634
|
.toLowerCase()
|
|
20408
20635
|
.replace(/[\s_-]+/g, '');
|
|
20409
20636
|
}
|
|
20637
|
+
hasResolvedValue(value) {
|
|
20638
|
+
return value !== null && value !== undefined && value !== '';
|
|
20639
|
+
}
|
|
20410
20640
|
unwrapActionValue(value) {
|
|
20411
20641
|
if (value === null || value === undefined)
|
|
20412
20642
|
return null;
|
|
@@ -20433,6 +20663,10 @@ class ActionService {
|
|
|
20433
20663
|
value.displayName ??
|
|
20434
20664
|
value.name);
|
|
20435
20665
|
}
|
|
20666
|
+
warnNavigateToEntityBlocked(detail) {
|
|
20667
|
+
this.toast.warn(detail, 'Navigation blocked');
|
|
20668
|
+
console.warn(`[ActionService] navigateTo blocked: ${detail}`);
|
|
20669
|
+
}
|
|
20436
20670
|
/**
|
|
20437
20671
|
* Navigate to a dynamic route
|
|
20438
20672
|
*/
|
|
@@ -20535,7 +20769,7 @@ class ActionService {
|
|
|
20535
20769
|
dialogConfig?.clientConfig?.title?.['ar'] ||
|
|
20536
20770
|
'';
|
|
20537
20771
|
// Dynamically import DashboardDialogComponent to avoid circular dependency
|
|
20538
|
-
import('./masterteam-dashboard-builder-dashboard-dialog.component-
|
|
20772
|
+
import('./masterteam-dashboard-builder-dashboard-dialog.component-C1N4w9Dz.mjs').then(({ DashboardDialogComponent }) => {
|
|
20539
20773
|
// Open dialog using ModalService
|
|
20540
20774
|
this.modalService.openModal(DashboardDialogComponent, 'dialog', {
|
|
20541
20775
|
header: title,
|
|
@@ -20847,11 +21081,11 @@ class CardContentComponent {
|
|
|
20847
21081
|
}
|
|
20848
21082
|
}
|
|
20849
21083
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CardContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
20850
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: CardContentComponent, isStandalone: true, selector: "mt-card-content", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, inGroup: { classPropertyName: "inGroup", publicName: "inGroup", isSignal: true, isRequired: false, transformFunction: null }, headerConfig: { classPropertyName: "headerConfig", publicName: "headerConfig", isSignal: true, isRequired: false, transformFunction: null }, styleConfig: { classPropertyName: "styleConfig", publicName: "styleConfig", isSignal: true, isRequired: false, transformFunction: null }, cardStyleConfig: { classPropertyName: "cardStyleConfig", publicName: "cardStyleConfig", isSignal: true, isRequired: false, transformFunction: null }, density: { classPropertyName: "density", publicName: "density", isSignal: true, isRequired: false, transformFunction: null }, padding: { classPropertyName: "padding", publicName: "padding", isSignal: true, isRequired: false, transformFunction: null }, showHeader: { classPropertyName: "showHeader", publicName: "showHeader", isSignal: true, isRequired: false, transformFunction: null }, headerClickable: { classPropertyName: "headerClickable", publicName: "headerClickable", isSignal: true, isRequired: false, transformFunction: null }, isNoTopEnd: { classPropertyName: "isNoTopEnd", publicName: "isNoTopEnd", isSignal: true, isRequired: false, transformFunction: null }, isChart: { classPropertyName: "isChart", publicName: "isChart", isSignal: true, isRequired: false, transformFunction: null }, titleEditable: { classPropertyName: "titleEditable", publicName: "titleEditable", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { headerClick: "headerClick", titleChange: "titleChange" }, ngImport: i0, template: "<div\r\n class=\"db-card-content\"\r\n [class.in-group]=\"inGroup()\"\r\n [class.no-header]=\"!showHeaderState()\"\r\n [attr.data-density]=\"density() || null\"\r\n [ngStyle]=\"cardStyles()\"\r\n [style]=\"borderRadiusStyle()\"\r\n>\r\n <!-- Header -->\r\n @if (showHeaderState()) {\r\n <div\r\n class=\"db-card-header\"\r\n [class.clickable]=\"headerClickableState()\"\r\n [class.center-title]=\"headerConfig()?.isHeaderCentered && isNoTopEnd()\"\r\n [ngStyle]=\"headerRowStyles()\"\r\n (click)=\"onHeaderClick()\"\r\n >\r\n <div\r\n class=\"db-card-title-section\"\r\n [class.center-mode]=\"headerConfig()?.isHeaderCentered\"\r\n [class.force-full-width]=\"isNoTopEnd()\"\r\n >\r\n @if (headerConfig()?.icon; as cardIcon) {\r\n <span\r\n
|
|
21084
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: CardContentComponent, isStandalone: true, selector: "mt-card-content", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, inGroup: { classPropertyName: "inGroup", publicName: "inGroup", isSignal: true, isRequired: false, transformFunction: null }, headerConfig: { classPropertyName: "headerConfig", publicName: "headerConfig", isSignal: true, isRequired: false, transformFunction: null }, styleConfig: { classPropertyName: "styleConfig", publicName: "styleConfig", isSignal: true, isRequired: false, transformFunction: null }, cardStyleConfig: { classPropertyName: "cardStyleConfig", publicName: "cardStyleConfig", isSignal: true, isRequired: false, transformFunction: null }, density: { classPropertyName: "density", publicName: "density", isSignal: true, isRequired: false, transformFunction: null }, padding: { classPropertyName: "padding", publicName: "padding", isSignal: true, isRequired: false, transformFunction: null }, showHeader: { classPropertyName: "showHeader", publicName: "showHeader", isSignal: true, isRequired: false, transformFunction: null }, headerClickable: { classPropertyName: "headerClickable", publicName: "headerClickable", isSignal: true, isRequired: false, transformFunction: null }, isNoTopEnd: { classPropertyName: "isNoTopEnd", publicName: "isNoTopEnd", isSignal: true, isRequired: false, transformFunction: null }, isChart: { classPropertyName: "isChart", publicName: "isChart", isSignal: true, isRequired: false, transformFunction: null }, titleEditable: { classPropertyName: "titleEditable", publicName: "titleEditable", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { headerClick: "headerClick", titleChange: "titleChange" }, ngImport: i0, template: "<div\r\n class=\"db-card-content\"\r\n [class.in-group]=\"inGroup()\"\r\n [class.no-header]=\"!showHeaderState()\"\r\n [attr.data-density]=\"density() || null\"\r\n [ngStyle]=\"cardStyles()\"\r\n [style]=\"borderRadiusStyle()\"\r\n>\r\n <!-- Header -->\r\n @if (showHeaderState()) {\r\n <div\r\n class=\"db-card-header\"\r\n [class.clickable]=\"headerClickableState()\"\r\n [class.center-title]=\"headerConfig()?.isHeaderCentered && isNoTopEnd()\"\r\n [ngStyle]=\"headerRowStyles()\"\r\n (click)=\"onHeaderClick()\"\r\n >\r\n <div\r\n class=\"db-card-title-section\"\r\n [class.center-mode]=\"headerConfig()?.isHeaderCentered\"\r\n [class.force-full-width]=\"isNoTopEnd()\"\r\n [attr.data-icon-placement]=\"headerConfig()?.iconPlacement || 'start'\"\r\n >\r\n @if (headerConfig()?.icon; as cardIcon) {\r\n @if (headerConfig()?.iconPlacement !== \"end\") {\r\n <span\r\n class=\"db-card-icon\"\r\n [style.color]=\"\r\n headerConfig()?.iconColor ||\r\n styleConfig()?.iconColor ||\r\n 'inherit'\r\n \"\r\n [style.background-color]=\"styleConfig()?.iconBgColor\"\r\n >\r\n <!-- @masterteam icon names are \"category.name\"; legacy values are\r\n CSS/font classes (e.g. \"fa fa-x\") rendered on an <i>. -->\r\n @if (cardIcon.includes(\".\")) {\r\n <mt-icon [icon]=\"$any(cardIcon)\" />\r\n } @else {\r\n <i [class]=\"cardIcon\"></i>\r\n }\r\n </span>\r\n }\r\n }\r\n <h3\r\n class=\"db-card-title\"\r\n [style.color]=\"\r\n headerConfig()?.headerColor ||\r\n headerConfig()?.titleColor ||\r\n 'inherit'\r\n \"\r\n [style.font-size]=\"\r\n headerConfig()?.headerFontSize\r\n ? headerConfig()?.headerFontSize + 'px'\r\n : null\r\n \"\r\n [attr.title]=\"title()\"\r\n >\r\n {{ title() }}\r\n </h3>\r\n @if (headerConfig()?.icon; as cardIcon) {\r\n @if (headerConfig()?.iconPlacement === \"end\") {\r\n <span\r\n class=\"db-card-icon\"\r\n [style.color]=\"\r\n headerConfig()?.iconColor ||\r\n styleConfig()?.iconColor ||\r\n 'inherit'\r\n \"\r\n [style.background-color]=\"styleConfig()?.iconBgColor\"\r\n >\r\n @if (cardIcon.includes(\".\")) {\r\n <mt-icon [icon]=\"$any(cardIcon)\" />\r\n } @else {\r\n <i [class]=\"cardIcon\"></i>\r\n }\r\n </span>\r\n }\r\n }\r\n </div>\r\n\r\n <div class=\"db-card-top-end\">\r\n <ng-content select=\"[topEnd]\"></ng-content>\r\n </div>\r\n </div>\r\n }\r\n\r\n <!-- Body -->\r\n <div\r\n class=\"db-card-body\"\r\n [class.no-top-end]=\"isNoTopEnd()\"\r\n [class.is-chart]=\"isChart()\"\r\n [style.padding.px]=\"padding() ?? null\"\r\n >\r\n <ng-content select=\"[body]\"></ng-content>\r\n </div>\r\n\r\n <!-- Footer (optional) -->\r\n <div class=\"db-card-footer\">\r\n <ng-content select=\"[footer]\"></ng-content>\r\n </div>\r\n</div>\r\n", styles: [":host{display:block;height:100%}.db-card-content{display:flex;flex-direction:column;height:100%;background:#fff;border-radius:.5rem;box-shadow:0 1px 3px #0000001a;overflow:hidden}.db-card-content.in-group{box-shadow:none;border-radius:0}.db-card-content.in-group.no-header .db-card-body{padding:0}.db-card-content.in-group .db-card-body.is-chart{overflow:hidden}.db-card-content.no-header .db-card-body{padding-top:1rem}.db-card-header{display:flex;align-items:center;justify-content:space-between;padding:.75rem 1rem;border-bottom:1px solid #f0f0f0;min-height:3rem}.db-card-header.clickable{cursor:pointer;transition:background-color .15s ease}.db-card-header.clickable:hover{background-color:#f9f9f9}.db-card-title-section{display:flex;align-items:center;gap:.5rem;flex:1;min-width:0}.db-card-title-section[data-icon-placement=end]{flex-direction:row}.db-card-title-section[data-icon-placement=top]{flex-direction:column;align-items:flex-start;gap:.25rem}.db-card-title-section.center-mode{justify-content:center}.db-card-title-section.center-mode[data-icon-placement=top]{align-items:center}.db-card-title-section.force-full-width{width:100%}.db-card-header.center-title{justify-content:center}.db-card-icon{font-size:1.25rem;flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;min-width:1.5rem;min-height:1.5rem;border-radius:.375rem}.db-card-title{margin:0;font-size:.95rem;font-weight:600;color:#333;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.db-card-top-end{display:flex;align-items:center;gap:.5rem;flex-shrink:0;max-width:45%}.db-card-body{flex:1;padding:.75rem 1rem;overflow:auto;min-height:0}.db-card-body.is-chart{overflow-y:hidden}.db-card-body.no-top-end{padding-top:1rem}.db-card-footer:empty{display:none}.db-card-footer{padding:.5rem 1rem;border-top:1px solid #f0f0f0}.db-card-content[data-density=compact] .db-card-header{padding:.4rem .6rem;min-height:2.25rem}.db-card-content[data-density=compact] .db-card-body{padding:.4rem .6rem}.db-card-content[data-density=compact] .db-card-title{font-size:.85rem}.db-card-content[data-density=presentation] .db-card-header{padding:1.1rem 1.4rem;min-height:4rem}.db-card-content[data-density=presentation] .db-card-body{padding:1.1rem 1.4rem}.db-card-content[data-density=presentation] .db-card-title{font-size:1.15rem;font-weight:700}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
20851
21085
|
}
|
|
20852
21086
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CardContentComponent, decorators: [{
|
|
20853
21087
|
type: Component,
|
|
20854
|
-
args: [{ selector: 'mt-card-content', standalone: true, imports: [CommonModule, Icon], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\r\n class=\"db-card-content\"\r\n [class.in-group]=\"inGroup()\"\r\n [class.no-header]=\"!showHeaderState()\"\r\n [attr.data-density]=\"density() || null\"\r\n [ngStyle]=\"cardStyles()\"\r\n [style]=\"borderRadiusStyle()\"\r\n>\r\n <!-- Header -->\r\n @if (showHeaderState()) {\r\n <div\r\n class=\"db-card-header\"\r\n [class.clickable]=\"headerClickableState()\"\r\n [class.center-title]=\"headerConfig()?.isHeaderCentered && isNoTopEnd()\"\r\n [ngStyle]=\"headerRowStyles()\"\r\n (click)=\"onHeaderClick()\"\r\n >\r\n <div\r\n class=\"db-card-title-section\"\r\n [class.center-mode]=\"headerConfig()?.isHeaderCentered\"\r\n [class.force-full-width]=\"isNoTopEnd()\"\r\n >\r\n @if (headerConfig()?.icon; as cardIcon) {\r\n <span\r\n
|
|
21088
|
+
args: [{ selector: 'mt-card-content', standalone: true, imports: [CommonModule, Icon], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\r\n class=\"db-card-content\"\r\n [class.in-group]=\"inGroup()\"\r\n [class.no-header]=\"!showHeaderState()\"\r\n [attr.data-density]=\"density() || null\"\r\n [ngStyle]=\"cardStyles()\"\r\n [style]=\"borderRadiusStyle()\"\r\n>\r\n <!-- Header -->\r\n @if (showHeaderState()) {\r\n <div\r\n class=\"db-card-header\"\r\n [class.clickable]=\"headerClickableState()\"\r\n [class.center-title]=\"headerConfig()?.isHeaderCentered && isNoTopEnd()\"\r\n [ngStyle]=\"headerRowStyles()\"\r\n (click)=\"onHeaderClick()\"\r\n >\r\n <div\r\n class=\"db-card-title-section\"\r\n [class.center-mode]=\"headerConfig()?.isHeaderCentered\"\r\n [class.force-full-width]=\"isNoTopEnd()\"\r\n [attr.data-icon-placement]=\"headerConfig()?.iconPlacement || 'start'\"\r\n >\r\n @if (headerConfig()?.icon; as cardIcon) {\r\n @if (headerConfig()?.iconPlacement !== \"end\") {\r\n <span\r\n class=\"db-card-icon\"\r\n [style.color]=\"\r\n headerConfig()?.iconColor ||\r\n styleConfig()?.iconColor ||\r\n 'inherit'\r\n \"\r\n [style.background-color]=\"styleConfig()?.iconBgColor\"\r\n >\r\n <!-- @masterteam icon names are \"category.name\"; legacy values are\r\n CSS/font classes (e.g. \"fa fa-x\") rendered on an <i>. -->\r\n @if (cardIcon.includes(\".\")) {\r\n <mt-icon [icon]=\"$any(cardIcon)\" />\r\n } @else {\r\n <i [class]=\"cardIcon\"></i>\r\n }\r\n </span>\r\n }\r\n }\r\n <h3\r\n class=\"db-card-title\"\r\n [style.color]=\"\r\n headerConfig()?.headerColor ||\r\n headerConfig()?.titleColor ||\r\n 'inherit'\r\n \"\r\n [style.font-size]=\"\r\n headerConfig()?.headerFontSize\r\n ? headerConfig()?.headerFontSize + 'px'\r\n : null\r\n \"\r\n [attr.title]=\"title()\"\r\n >\r\n {{ title() }}\r\n </h3>\r\n @if (headerConfig()?.icon; as cardIcon) {\r\n @if (headerConfig()?.iconPlacement === \"end\") {\r\n <span\r\n class=\"db-card-icon\"\r\n [style.color]=\"\r\n headerConfig()?.iconColor ||\r\n styleConfig()?.iconColor ||\r\n 'inherit'\r\n \"\r\n [style.background-color]=\"styleConfig()?.iconBgColor\"\r\n >\r\n @if (cardIcon.includes(\".\")) {\r\n <mt-icon [icon]=\"$any(cardIcon)\" />\r\n } @else {\r\n <i [class]=\"cardIcon\"></i>\r\n }\r\n </span>\r\n }\r\n }\r\n </div>\r\n\r\n <div class=\"db-card-top-end\">\r\n <ng-content select=\"[topEnd]\"></ng-content>\r\n </div>\r\n </div>\r\n }\r\n\r\n <!-- Body -->\r\n <div\r\n class=\"db-card-body\"\r\n [class.no-top-end]=\"isNoTopEnd()\"\r\n [class.is-chart]=\"isChart()\"\r\n [style.padding.px]=\"padding() ?? null\"\r\n >\r\n <ng-content select=\"[body]\"></ng-content>\r\n </div>\r\n\r\n <!-- Footer (optional) -->\r\n <div class=\"db-card-footer\">\r\n <ng-content select=\"[footer]\"></ng-content>\r\n </div>\r\n</div>\r\n", styles: [":host{display:block;height:100%}.db-card-content{display:flex;flex-direction:column;height:100%;background:#fff;border-radius:.5rem;box-shadow:0 1px 3px #0000001a;overflow:hidden}.db-card-content.in-group{box-shadow:none;border-radius:0}.db-card-content.in-group.no-header .db-card-body{padding:0}.db-card-content.in-group .db-card-body.is-chart{overflow:hidden}.db-card-content.no-header .db-card-body{padding-top:1rem}.db-card-header{display:flex;align-items:center;justify-content:space-between;padding:.75rem 1rem;border-bottom:1px solid #f0f0f0;min-height:3rem}.db-card-header.clickable{cursor:pointer;transition:background-color .15s ease}.db-card-header.clickable:hover{background-color:#f9f9f9}.db-card-title-section{display:flex;align-items:center;gap:.5rem;flex:1;min-width:0}.db-card-title-section[data-icon-placement=end]{flex-direction:row}.db-card-title-section[data-icon-placement=top]{flex-direction:column;align-items:flex-start;gap:.25rem}.db-card-title-section.center-mode{justify-content:center}.db-card-title-section.center-mode[data-icon-placement=top]{align-items:center}.db-card-title-section.force-full-width{width:100%}.db-card-header.center-title{justify-content:center}.db-card-icon{font-size:1.25rem;flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;min-width:1.5rem;min-height:1.5rem;border-radius:.375rem}.db-card-title{margin:0;font-size:.95rem;font-weight:600;color:#333;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.db-card-top-end{display:flex;align-items:center;gap:.5rem;flex-shrink:0;max-width:45%}.db-card-body{flex:1;padding:.75rem 1rem;overflow:auto;min-height:0}.db-card-body.is-chart{overflow-y:hidden}.db-card-body.no-top-end{padding-top:1rem}.db-card-footer:empty{display:none}.db-card-footer{padding:.5rem 1rem;border-top:1px solid #f0f0f0}.db-card-content[data-density=compact] .db-card-header{padding:.4rem .6rem;min-height:2.25rem}.db-card-content[data-density=compact] .db-card-body{padding:.4rem .6rem}.db-card-content[data-density=compact] .db-card-title{font-size:.85rem}.db-card-content[data-density=presentation] .db-card-header{padding:1.1rem 1.4rem;min-height:4rem}.db-card-content[data-density=presentation] .db-card-body{padding:1.1rem 1.4rem}.db-card-content[data-density=presentation] .db-card-title{font-size:1.15rem;font-weight:700}\n"] }]
|
|
20855
21089
|
}], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], inGroup: [{ type: i0.Input, args: [{ isSignal: true, alias: "inGroup", required: false }] }], headerConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "headerConfig", required: false }] }], styleConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleConfig", required: false }] }], cardStyleConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "cardStyleConfig", required: false }] }], density: [{ type: i0.Input, args: [{ isSignal: true, alias: "density", required: false }] }], padding: [{ type: i0.Input, args: [{ isSignal: true, alias: "padding", required: false }] }], showHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "showHeader", required: false }] }], headerClickable: [{ type: i0.Input, args: [{ isSignal: true, alias: "headerClickable", required: false }] }], isNoTopEnd: [{ type: i0.Input, args: [{ isSignal: true, alias: "isNoTopEnd", required: false }] }], isChart: [{ type: i0.Input, args: [{ isSignal: true, alias: "isChart", required: false }] }], headerClick: [{ type: i0.Output, args: ["headerClick"] }], titleEditable: [{ type: i0.Input, args: [{ isSignal: true, alias: "titleEditable", required: false }] }], titleChange: [{ type: i0.Output, args: ["titleChange"] }] } });
|
|
20856
21090
|
|
|
20857
21091
|
/**
|
|
@@ -20934,128 +21168,128 @@ class CardFilterComponent {
|
|
|
20934
21168
|
}
|
|
20935
21169
|
}
|
|
20936
21170
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CardFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
20937
|
-
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: `
|
|
20938
|
-
<div class="card-filter" *transloco="let t; prefix: 'dashboard'">
|
|
20939
|
-
@switch (filterType()) {
|
|
20940
|
-
@case ('select') {
|
|
20941
|
-
<select
|
|
20942
|
-
class="filter-select"
|
|
20943
|
-
[(ngModel)]="selectedValue"
|
|
20944
|
-
(ngModelChange)="onFilterChange($event)"
|
|
20945
|
-
>
|
|
20946
|
-
@if (placeholder()) {
|
|
20947
|
-
<option [value]="null" disabled>{{ placeholder() }}</option>
|
|
20948
|
-
}
|
|
20949
|
-
@for (option of options(); track option.key) {
|
|
20950
|
-
<option [value]="option.value">
|
|
20951
|
-
{{
|
|
20952
|
-
option.label[langCode()] || option.label['en'] || option.key
|
|
20953
|
-
}}
|
|
20954
|
-
</option>
|
|
20955
|
-
}
|
|
20956
|
-
</select>
|
|
20957
|
-
}
|
|
20958
|
-
@case ('multiSelect') {
|
|
20959
|
-
<div class="multi-select-container">
|
|
20960
|
-
<!-- Simplified multi-select -->
|
|
20961
|
-
<select
|
|
20962
|
-
class="filter-select"
|
|
20963
|
-
multiple
|
|
20964
|
-
[(ngModel)]="selectedValues"
|
|
20965
|
-
(ngModelChange)="onMultiFilterChange($event)"
|
|
20966
|
-
>
|
|
20967
|
-
@for (option of options(); track option.key) {
|
|
20968
|
-
<option [value]="option.value">
|
|
20969
|
-
{{
|
|
20970
|
-
option.label[langCode()] || option.label['en'] || option.key
|
|
20971
|
-
}}
|
|
20972
|
-
</option>
|
|
20973
|
-
}
|
|
20974
|
-
</select>
|
|
20975
|
-
</div>
|
|
20976
|
-
}
|
|
20977
|
-
@case ('dateRange') {
|
|
20978
|
-
<div class="date-range-container">
|
|
20979
|
-
<input
|
|
20980
|
-
type="date"
|
|
20981
|
-
class="filter-date"
|
|
20982
|
-
[(ngModel)]="startDate"
|
|
20983
|
-
(ngModelChange)="onDateChange()"
|
|
20984
|
-
/>
|
|
20985
|
-
<span class="date-separator">-</span>
|
|
20986
|
-
<input
|
|
20987
|
-
type="date"
|
|
20988
|
-
class="filter-date"
|
|
20989
|
-
[(ngModel)]="endDate"
|
|
20990
|
-
(ngModelChange)="onDateChange()"
|
|
20991
|
-
/>
|
|
20992
|
-
</div>
|
|
20993
|
-
}
|
|
20994
|
-
}
|
|
20995
|
-
</div>
|
|
21171
|
+
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: `
|
|
21172
|
+
<div class="card-filter" *transloco="let t; prefix: 'dashboard'">
|
|
21173
|
+
@switch (filterType()) {
|
|
21174
|
+
@case ('select') {
|
|
21175
|
+
<select
|
|
21176
|
+
class="filter-select"
|
|
21177
|
+
[(ngModel)]="selectedValue"
|
|
21178
|
+
(ngModelChange)="onFilterChange($event)"
|
|
21179
|
+
>
|
|
21180
|
+
@if (placeholder()) {
|
|
21181
|
+
<option [value]="null" disabled>{{ placeholder() }}</option>
|
|
21182
|
+
}
|
|
21183
|
+
@for (option of options(); track option.key) {
|
|
21184
|
+
<option [value]="option.value">
|
|
21185
|
+
{{
|
|
21186
|
+
option.label[langCode()] || option.label['en'] || option.key
|
|
21187
|
+
}}
|
|
21188
|
+
</option>
|
|
21189
|
+
}
|
|
21190
|
+
</select>
|
|
21191
|
+
}
|
|
21192
|
+
@case ('multiSelect') {
|
|
21193
|
+
<div class="multi-select-container">
|
|
21194
|
+
<!-- Simplified multi-select -->
|
|
21195
|
+
<select
|
|
21196
|
+
class="filter-select"
|
|
21197
|
+
multiple
|
|
21198
|
+
[(ngModel)]="selectedValues"
|
|
21199
|
+
(ngModelChange)="onMultiFilterChange($event)"
|
|
21200
|
+
>
|
|
21201
|
+
@for (option of options(); track option.key) {
|
|
21202
|
+
<option [value]="option.value">
|
|
21203
|
+
{{
|
|
21204
|
+
option.label[langCode()] || option.label['en'] || option.key
|
|
21205
|
+
}}
|
|
21206
|
+
</option>
|
|
21207
|
+
}
|
|
21208
|
+
</select>
|
|
21209
|
+
</div>
|
|
21210
|
+
}
|
|
21211
|
+
@case ('dateRange') {
|
|
21212
|
+
<div class="date-range-container">
|
|
21213
|
+
<input
|
|
21214
|
+
type="date"
|
|
21215
|
+
class="filter-date"
|
|
21216
|
+
[(ngModel)]="startDate"
|
|
21217
|
+
(ngModelChange)="onDateChange()"
|
|
21218
|
+
/>
|
|
21219
|
+
<span class="date-separator">-</span>
|
|
21220
|
+
<input
|
|
21221
|
+
type="date"
|
|
21222
|
+
class="filter-date"
|
|
21223
|
+
[(ngModel)]="endDate"
|
|
21224
|
+
(ngModelChange)="onDateChange()"
|
|
21225
|
+
/>
|
|
21226
|
+
</div>
|
|
21227
|
+
}
|
|
21228
|
+
}
|
|
21229
|
+
</div>
|
|
20996
21230
|
`, 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 });
|
|
20997
21231
|
}
|
|
20998
21232
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CardFilterComponent, decorators: [{
|
|
20999
21233
|
type: Component,
|
|
21000
|
-
args: [{ selector: 'mt-card-filter', standalone: true, imports: [CommonModule, FormsModule, TranslocoDirective], template: `
|
|
21001
|
-
<div class="card-filter" *transloco="let t; prefix: 'dashboard'">
|
|
21002
|
-
@switch (filterType()) {
|
|
21003
|
-
@case ('select') {
|
|
21004
|
-
<select
|
|
21005
|
-
class="filter-select"
|
|
21006
|
-
[(ngModel)]="selectedValue"
|
|
21007
|
-
(ngModelChange)="onFilterChange($event)"
|
|
21008
|
-
>
|
|
21009
|
-
@if (placeholder()) {
|
|
21010
|
-
<option [value]="null" disabled>{{ placeholder() }}</option>
|
|
21011
|
-
}
|
|
21012
|
-
@for (option of options(); track option.key) {
|
|
21013
|
-
<option [value]="option.value">
|
|
21014
|
-
{{
|
|
21015
|
-
option.label[langCode()] || option.label['en'] || option.key
|
|
21016
|
-
}}
|
|
21017
|
-
</option>
|
|
21018
|
-
}
|
|
21019
|
-
</select>
|
|
21020
|
-
}
|
|
21021
|
-
@case ('multiSelect') {
|
|
21022
|
-
<div class="multi-select-container">
|
|
21023
|
-
<!-- Simplified multi-select -->
|
|
21024
|
-
<select
|
|
21025
|
-
class="filter-select"
|
|
21026
|
-
multiple
|
|
21027
|
-
[(ngModel)]="selectedValues"
|
|
21028
|
-
(ngModelChange)="onMultiFilterChange($event)"
|
|
21029
|
-
>
|
|
21030
|
-
@for (option of options(); track option.key) {
|
|
21031
|
-
<option [value]="option.value">
|
|
21032
|
-
{{
|
|
21033
|
-
option.label[langCode()] || option.label['en'] || option.key
|
|
21034
|
-
}}
|
|
21035
|
-
</option>
|
|
21036
|
-
}
|
|
21037
|
-
</select>
|
|
21038
|
-
</div>
|
|
21039
|
-
}
|
|
21040
|
-
@case ('dateRange') {
|
|
21041
|
-
<div class="date-range-container">
|
|
21042
|
-
<input
|
|
21043
|
-
type="date"
|
|
21044
|
-
class="filter-date"
|
|
21045
|
-
[(ngModel)]="startDate"
|
|
21046
|
-
(ngModelChange)="onDateChange()"
|
|
21047
|
-
/>
|
|
21048
|
-
<span class="date-separator">-</span>
|
|
21049
|
-
<input
|
|
21050
|
-
type="date"
|
|
21051
|
-
class="filter-date"
|
|
21052
|
-
[(ngModel)]="endDate"
|
|
21053
|
-
(ngModelChange)="onDateChange()"
|
|
21054
|
-
/>
|
|
21055
|
-
</div>
|
|
21056
|
-
}
|
|
21057
|
-
}
|
|
21058
|
-
</div>
|
|
21234
|
+
args: [{ selector: 'mt-card-filter', standalone: true, imports: [CommonModule, FormsModule, TranslocoDirective], template: `
|
|
21235
|
+
<div class="card-filter" *transloco="let t; prefix: 'dashboard'">
|
|
21236
|
+
@switch (filterType()) {
|
|
21237
|
+
@case ('select') {
|
|
21238
|
+
<select
|
|
21239
|
+
class="filter-select"
|
|
21240
|
+
[(ngModel)]="selectedValue"
|
|
21241
|
+
(ngModelChange)="onFilterChange($event)"
|
|
21242
|
+
>
|
|
21243
|
+
@if (placeholder()) {
|
|
21244
|
+
<option [value]="null" disabled>{{ placeholder() }}</option>
|
|
21245
|
+
}
|
|
21246
|
+
@for (option of options(); track option.key) {
|
|
21247
|
+
<option [value]="option.value">
|
|
21248
|
+
{{
|
|
21249
|
+
option.label[langCode()] || option.label['en'] || option.key
|
|
21250
|
+
}}
|
|
21251
|
+
</option>
|
|
21252
|
+
}
|
|
21253
|
+
</select>
|
|
21254
|
+
}
|
|
21255
|
+
@case ('multiSelect') {
|
|
21256
|
+
<div class="multi-select-container">
|
|
21257
|
+
<!-- Simplified multi-select -->
|
|
21258
|
+
<select
|
|
21259
|
+
class="filter-select"
|
|
21260
|
+
multiple
|
|
21261
|
+
[(ngModel)]="selectedValues"
|
|
21262
|
+
(ngModelChange)="onMultiFilterChange($event)"
|
|
21263
|
+
>
|
|
21264
|
+
@for (option of options(); track option.key) {
|
|
21265
|
+
<option [value]="option.value">
|
|
21266
|
+
{{
|
|
21267
|
+
option.label[langCode()] || option.label['en'] || option.key
|
|
21268
|
+
}}
|
|
21269
|
+
</option>
|
|
21270
|
+
}
|
|
21271
|
+
</select>
|
|
21272
|
+
</div>
|
|
21273
|
+
}
|
|
21274
|
+
@case ('dateRange') {
|
|
21275
|
+
<div class="date-range-container">
|
|
21276
|
+
<input
|
|
21277
|
+
type="date"
|
|
21278
|
+
class="filter-date"
|
|
21279
|
+
[(ngModel)]="startDate"
|
|
21280
|
+
(ngModelChange)="onDateChange()"
|
|
21281
|
+
/>
|
|
21282
|
+
<span class="date-separator">-</span>
|
|
21283
|
+
<input
|
|
21284
|
+
type="date"
|
|
21285
|
+
class="filter-date"
|
|
21286
|
+
[(ngModel)]="endDate"
|
|
21287
|
+
(ngModelChange)="onDateChange()"
|
|
21288
|
+
/>
|
|
21289
|
+
</div>
|
|
21290
|
+
}
|
|
21291
|
+
}
|
|
21292
|
+
</div>
|
|
21059
21293
|
`, 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"] }]
|
|
21060
21294
|
}], 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"] }] } });
|
|
21061
21295
|
|
|
@@ -22412,30 +22646,30 @@ class CardInfoComponent {
|
|
|
22412
22646
|
return typeof info.value === 'string' ? info.value : '';
|
|
22413
22647
|
}, ...(ngDevMode ? [{ debugName: "tooltipContent" }] : /* istanbul ignore next */ []));
|
|
22414
22648
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CardInfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
22415
|
-
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: `
|
|
22416
|
-
@if (showInfo()) {
|
|
22417
|
-
<span
|
|
22418
|
-
class="card-info-icon"
|
|
22419
|
-
[mtTooltip]="tooltipContent()"
|
|
22420
|
-
tooltipPosition="bottom"
|
|
22421
|
-
>
|
|
22422
|
-
<i class="pi pi-info-circle"></i>
|
|
22423
|
-
</span>
|
|
22424
|
-
}
|
|
22649
|
+
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: `
|
|
22650
|
+
@if (showInfo()) {
|
|
22651
|
+
<span
|
|
22652
|
+
class="card-info-icon"
|
|
22653
|
+
[mtTooltip]="tooltipContent()"
|
|
22654
|
+
tooltipPosition="bottom"
|
|
22655
|
+
>
|
|
22656
|
+
<i class="pi pi-info-circle"></i>
|
|
22657
|
+
</span>
|
|
22658
|
+
}
|
|
22425
22659
|
`, 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 });
|
|
22426
22660
|
}
|
|
22427
22661
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CardInfoComponent, decorators: [{
|
|
22428
22662
|
type: Component,
|
|
22429
|
-
args: [{ selector: 'mt-card-info', standalone: true, imports: [CommonModule, Tooltip$1], template: `
|
|
22430
|
-
@if (showInfo()) {
|
|
22431
|
-
<span
|
|
22432
|
-
class="card-info-icon"
|
|
22433
|
-
[mtTooltip]="tooltipContent()"
|
|
22434
|
-
tooltipPosition="bottom"
|
|
22435
|
-
>
|
|
22436
|
-
<i class="pi pi-info-circle"></i>
|
|
22437
|
-
</span>
|
|
22438
|
-
}
|
|
22663
|
+
args: [{ selector: 'mt-card-info', standalone: true, imports: [CommonModule, Tooltip$1], template: `
|
|
22664
|
+
@if (showInfo()) {
|
|
22665
|
+
<span
|
|
22666
|
+
class="card-info-icon"
|
|
22667
|
+
[mtTooltip]="tooltipContent()"
|
|
22668
|
+
tooltipPosition="bottom"
|
|
22669
|
+
>
|
|
22670
|
+
<i class="pi pi-info-circle"></i>
|
|
22671
|
+
</span>
|
|
22672
|
+
}
|
|
22439
22673
|
`, 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"] }]
|
|
22440
22674
|
}], propDecorators: { cardInfo: [{ type: i0.Input, args: [{ isSignal: true, alias: "cardInfo", required: false }] }] } });
|
|
22441
22675
|
|
|
@@ -22916,7 +23150,7 @@ class EChartComponent {
|
|
|
22916
23150
|
return this.chart;
|
|
22917
23151
|
}
|
|
22918
23152
|
applyResponsiveOptions(option, bounds) {
|
|
22919
|
-
const next = this.applyLegendOverrideOrder({ ...option });
|
|
23153
|
+
const next = this.applyLegendColorOverrides(this.applyLegendOverrideOrder({ ...option }));
|
|
22920
23154
|
// If the user enabled "Show Legend" but the handler emitted no legend
|
|
22921
23155
|
// object, seed one so the configured position + icon are honored. Charts
|
|
22922
23156
|
// that render the custom HTML legend are positioned separately.
|
|
@@ -22931,19 +23165,33 @@ class EChartComponent {
|
|
|
22931
23165
|
}
|
|
22932
23166
|
const configuredLegendSide = this.resolveConfiguredLegendSide();
|
|
22933
23167
|
let legendSide = this.resolveEffectiveLegendSide(configuredLegendSide, this.resolveLegendSide(next.legend));
|
|
22934
|
-
|
|
22935
|
-
|
|
23168
|
+
const initialLegendSide = legendSide ?? (this.hasVisibleLegend(next.legend) ? 'bottom' : null);
|
|
23169
|
+
if (next.legend && initialLegendSide) {
|
|
23170
|
+
next.legend = this.mapLegendConfig(next.legend, configuredLegendSide, initialLegendSide, (legend, side) => this.applyLegendSideCoordinates(legend, side, false));
|
|
22936
23171
|
}
|
|
22937
23172
|
if (!bounds)
|
|
22938
23173
|
return next;
|
|
22939
23174
|
const width = bounds.width || 0;
|
|
22940
23175
|
const height = bounds.height || 0;
|
|
23176
|
+
if (width <= 0 || height <= 0)
|
|
23177
|
+
return next;
|
|
22941
23178
|
const compact = width < 420 || height < 260;
|
|
22942
23179
|
const veryCompact = width < 320 || height < 220;
|
|
22943
23180
|
legendSide = this.resolveEffectiveLegendSide(configuredLegendSide, this.resolveLegendSide(next.legend));
|
|
22944
23181
|
const hasVisibleLegend = this.hasVisibleLegend(next.legend);
|
|
22945
23182
|
const fontFamily = this.resolveChartFontFamily();
|
|
22946
23183
|
const fontSizes = this.resolveChartFontSizes();
|
|
23184
|
+
if (next.legend) {
|
|
23185
|
+
const legends = Array.isArray(next.legend) ? next.legend : [next.legend];
|
|
23186
|
+
const mappedLegends = legends.map((legend) => this.applyResponsiveLegend(legend, this.resolveEffectiveLegendSide(configuredLegendSide, this.resolveLegendSide(legend)) ??
|
|
23187
|
+
legendSide ??
|
|
23188
|
+
'bottom', width, height, compact, veryCompact));
|
|
23189
|
+
next.legend = Array.isArray(next.legend)
|
|
23190
|
+
? mappedLegends
|
|
23191
|
+
: mappedLegends[0];
|
|
23192
|
+
legendSide =
|
|
23193
|
+
this.resolveEffectiveLegendSide(configuredLegendSide, this.resolveLegendSide(next.legend)) ?? (hasVisibleLegend ? 'bottom' : null);
|
|
23194
|
+
}
|
|
22947
23195
|
if (next.tooltip) {
|
|
22948
23196
|
next.tooltip = {
|
|
22949
23197
|
...next.tooltip,
|
|
@@ -22955,16 +23203,7 @@ class EChartComponent {
|
|
|
22955
23203
|
};
|
|
22956
23204
|
}
|
|
22957
23205
|
if (next.grid || next.xAxis || next.yAxis) {
|
|
22958
|
-
next.grid = this.applyResponsiveGrid(Array.isArray(next.grid) ? next.grid[0] : next.grid || {}, hasVisibleLegend ? legendSide : null, compact);
|
|
22959
|
-
}
|
|
22960
|
-
if (next.legend) {
|
|
22961
|
-
const legends = Array.isArray(next.legend) ? next.legend : [next.legend];
|
|
22962
|
-
const mappedLegends = legends.map((legend) => this.applyResponsiveLegend(legend, this.resolveEffectiveLegendSide(configuredLegendSide, this.resolveLegendSide(legend)) ??
|
|
22963
|
-
legendSide ??
|
|
22964
|
-
'bottom', width, height, compact, veryCompact));
|
|
22965
|
-
next.legend = Array.isArray(next.legend)
|
|
22966
|
-
? mappedLegends
|
|
22967
|
-
: mappedLegends[0];
|
|
23206
|
+
next.grid = this.applyResponsiveGrid(Array.isArray(next.grid) ? next.grid[0] : next.grid || {}, hasVisibleLegend ? legendSide : null, compact, next.legend, width, height);
|
|
22968
23207
|
}
|
|
22969
23208
|
const xAxes = Array.isArray(next.xAxis)
|
|
22970
23209
|
? next.xAxis
|
|
@@ -23064,13 +23303,13 @@ class EChartComponent {
|
|
|
23064
23303
|
}
|
|
23065
23304
|
return next;
|
|
23066
23305
|
}
|
|
23067
|
-
applyResponsiveGrid(baseGrid, legendSide, compact) {
|
|
23306
|
+
applyResponsiveGrid(baseGrid, legendSide, compact, legendConfig, width, height) {
|
|
23068
23307
|
const grid = {
|
|
23069
23308
|
...(baseGrid || {}),
|
|
23070
23309
|
containLabel: true,
|
|
23071
23310
|
};
|
|
23072
23311
|
const hasBaseGrid = Object.keys(baseGrid || {}).length > 0;
|
|
23073
|
-
const offsets = this.getResponsiveGridOffsets(legendSide, compact);
|
|
23312
|
+
const offsets = this.getResponsiveGridOffsets(legendSide, compact, legendConfig, width, height);
|
|
23074
23313
|
if (!hasBaseGrid) {
|
|
23075
23314
|
return {
|
|
23076
23315
|
...grid,
|
|
@@ -23078,23 +23317,24 @@ class EChartComponent {
|
|
|
23078
23317
|
};
|
|
23079
23318
|
}
|
|
23080
23319
|
if (legendSide) {
|
|
23081
|
-
this.ensureGridSide(grid, legendSide, offsets[legendSide]);
|
|
23320
|
+
this.ensureGridSide(grid, legendSide, offsets[legendSide], width, height);
|
|
23082
23321
|
}
|
|
23083
23322
|
return grid;
|
|
23084
23323
|
}
|
|
23085
|
-
ensureGridSide(grid, side, minimum) {
|
|
23324
|
+
ensureGridSide(grid, side, minimum, width, height) {
|
|
23086
23325
|
const value = grid?.[side];
|
|
23087
23326
|
if (value === undefined || value === null || value === '') {
|
|
23088
23327
|
grid[side] = minimum;
|
|
23089
23328
|
return;
|
|
23090
23329
|
}
|
|
23091
|
-
|
|
23330
|
+
const measured = this.readDimensionValue(value, side === 'top' || side === 'bottom' ? height : width);
|
|
23331
|
+
if (measured !== null && measured < minimum) {
|
|
23092
23332
|
grid[side] = minimum;
|
|
23093
23333
|
return;
|
|
23094
23334
|
}
|
|
23095
23335
|
if (typeof value === 'string') {
|
|
23096
|
-
const
|
|
23097
|
-
if (
|
|
23336
|
+
const percentMatch = value.trim().match(/^(\d+(?:\.\d+)?)%$/);
|
|
23337
|
+
if (percentMatch && Number(percentMatch[1]) < 10) {
|
|
23098
23338
|
grid[side] = minimum;
|
|
23099
23339
|
}
|
|
23100
23340
|
}
|
|
@@ -23229,30 +23469,102 @@ class EChartComponent {
|
|
|
23229
23469
|
isCenteredLegendCoordinate(value) {
|
|
23230
23470
|
return value === 'center' || value === 'middle';
|
|
23231
23471
|
}
|
|
23232
|
-
|
|
23472
|
+
getLegendReservedSpace(legendConfig, side, compact, width, height) {
|
|
23473
|
+
if (!side || !legendConfig)
|
|
23474
|
+
return null;
|
|
23475
|
+
const legend = this.getLegendForSide(legendConfig, side);
|
|
23476
|
+
if (!legend)
|
|
23477
|
+
return null;
|
|
23478
|
+
const horizontal = side === 'top' || side === 'bottom';
|
|
23479
|
+
const base = horizontal ? height : width;
|
|
23480
|
+
const coordinate = this.readDimensionValue(legend?.[side], base) ?? (compact ? 0 : 4);
|
|
23481
|
+
if (horizontal) {
|
|
23482
|
+
const legendHeight = this.readDimensionValue(legend?.height, height) ??
|
|
23483
|
+
this.getHorizontalLegendHeight(legend, compact, false, height);
|
|
23484
|
+
const lineHeight = this.readDimensionValue(legend?.textStyle?.lineHeight, height) ??
|
|
23485
|
+
(compact ? 13 : 15);
|
|
23486
|
+
const itemHeight = this.readDimensionValue(legend?.itemHeight, height) ??
|
|
23487
|
+
(compact ? 8 : 14);
|
|
23488
|
+
const pageIconSize = this.readDimensionValue(legend?.pageIconSize, height) ??
|
|
23489
|
+
(compact ? 10 : 12);
|
|
23490
|
+
const renderedHeight = Math.max(legendHeight, lineHeight + 8, itemHeight + 12, pageIconSize + 12);
|
|
23491
|
+
return Math.ceil(coordinate + renderedHeight + (compact ? 8 : 12));
|
|
23492
|
+
}
|
|
23493
|
+
const legendWidth = this.readDimensionValue(legend?.width, width) ??
|
|
23494
|
+
this.getResponsiveSideLegendWidth(width, compact);
|
|
23495
|
+
const textWidth = this.readDimensionValue(legend?.textStyle?.width, width) ??
|
|
23496
|
+
(compact ? 96 : 140);
|
|
23497
|
+
const itemWidth = this.readDimensionValue(legend?.itemWidth, width) ?? (compact ? 10 : 14);
|
|
23498
|
+
const itemGap = this.readDimensionValue(legend?.itemGap, width) ?? (compact ? 8 : 12);
|
|
23499
|
+
const renderedWidth = Math.max(legendWidth, textWidth + itemWidth + itemGap + (compact ? 16 : 20));
|
|
23500
|
+
return Math.ceil(coordinate + renderedWidth + (compact ? 8 : 12));
|
|
23501
|
+
}
|
|
23502
|
+
getLegendForSide(legendConfig, side) {
|
|
23503
|
+
const legends = Array.isArray(legendConfig) ? legendConfig : [legendConfig];
|
|
23504
|
+
return (legends.find((legend) => legend &&
|
|
23505
|
+
legend.show !== false &&
|
|
23506
|
+
(this.resolveSingleLegendSide(legend) ?? side) === side) ??
|
|
23507
|
+
legends.find((legend) => legend && legend.show !== false) ??
|
|
23508
|
+
null);
|
|
23509
|
+
}
|
|
23510
|
+
readDimensionValue(value, percentBase) {
|
|
23511
|
+
if (typeof value === 'number') {
|
|
23512
|
+
return Number.isFinite(value) ? Math.max(0, value) : null;
|
|
23513
|
+
}
|
|
23514
|
+
if (typeof value !== 'string')
|
|
23515
|
+
return null;
|
|
23516
|
+
const trimmed = value.trim();
|
|
23517
|
+
if (!trimmed)
|
|
23518
|
+
return null;
|
|
23519
|
+
const pxMatch = trimmed.match(/^(\d+(?:\.\d+)?)px$/);
|
|
23520
|
+
if (pxMatch)
|
|
23521
|
+
return Number(pxMatch[1]);
|
|
23522
|
+
const percentMatch = trimmed.match(/^(\d+(?:\.\d+)?)%$/);
|
|
23523
|
+
if (percentMatch && percentBase && percentBase > 0) {
|
|
23524
|
+
return (Number(percentMatch[1]) / 100) * percentBase;
|
|
23525
|
+
}
|
|
23526
|
+
const numeric = Number(trimmed);
|
|
23527
|
+
return Number.isFinite(numeric) ? Math.max(0, numeric) : null;
|
|
23528
|
+
}
|
|
23529
|
+
getResponsiveSideLegendWidth(width, compact) {
|
|
23530
|
+
const preferred = compact ? 120 : 160;
|
|
23531
|
+
const maxByChart = Math.max(88, Math.floor(width * (compact ? 0.42 : 0.34)));
|
|
23532
|
+
return Math.max(88, Math.min(preferred, maxByChart));
|
|
23533
|
+
}
|
|
23534
|
+
getHorizontalLegendHeight(legend, compact, veryCompact, height) {
|
|
23535
|
+
const configured = this.readDimensionValue(legend?.height, height);
|
|
23536
|
+
const minimum = veryCompact ? 30 : compact ? 34 : 40;
|
|
23537
|
+
return Math.max(minimum, configured ?? 0);
|
|
23538
|
+
}
|
|
23539
|
+
getResponsiveGridOffsets(legendSide, compact, legendConfig, width, height) {
|
|
23540
|
+
const legendReserve = this.getLegendReservedSpace(legendConfig, legendSide, compact, width, height);
|
|
23233
23541
|
const offsets = {
|
|
23234
23542
|
top: compact ? 24 : 36,
|
|
23235
23543
|
right: compact ? 8 : 24,
|
|
23236
|
-
bottom:
|
|
23544
|
+
bottom: legendSide === 'bottom'
|
|
23545
|
+
? Math.max(compact ? 44 : 56, legendReserve ?? 0)
|
|
23546
|
+
: compact
|
|
23547
|
+
? 44
|
|
23548
|
+
: 56,
|
|
23237
23549
|
left: compact ? 8 : 24,
|
|
23238
23550
|
};
|
|
23239
23551
|
switch (legendSide) {
|
|
23240
23552
|
case 'top':
|
|
23241
23553
|
return {
|
|
23242
23554
|
...offsets,
|
|
23243
|
-
top: compact ? 44 : 56,
|
|
23555
|
+
top: Math.max(compact ? 44 : 56, legendReserve ?? 0),
|
|
23244
23556
|
bottom: compact ? 28 : 36,
|
|
23245
23557
|
};
|
|
23246
23558
|
case 'left':
|
|
23247
23559
|
return {
|
|
23248
23560
|
...offsets,
|
|
23249
|
-
left: compact ?
|
|
23561
|
+
left: Math.max(compact ? 96 : 128, legendReserve ?? 0),
|
|
23250
23562
|
bottom: compact ? 28 : 36,
|
|
23251
23563
|
};
|
|
23252
23564
|
case 'right':
|
|
23253
23565
|
return {
|
|
23254
23566
|
...offsets,
|
|
23255
|
-
right: compact ?
|
|
23567
|
+
right: Math.max(compact ? 96 : 128, legendReserve ?? 0),
|
|
23256
23568
|
bottom: compact ? 28 : 36,
|
|
23257
23569
|
};
|
|
23258
23570
|
case 'bottom':
|
|
@@ -23262,22 +23574,30 @@ class EChartComponent {
|
|
|
23262
23574
|
}
|
|
23263
23575
|
applyResponsiveLegend(legend, side, width, height, compact, veryCompact) {
|
|
23264
23576
|
const horizontal = side === 'top' || side === 'bottom';
|
|
23265
|
-
const availableWidth = Math.max(
|
|
23577
|
+
const availableWidth = Math.max(64, width - (compact ? 16 : 32));
|
|
23578
|
+
const sideLegendWidth = this.getResponsiveSideLegendWidth(width, compact);
|
|
23579
|
+
const itemWidth = compact
|
|
23580
|
+
? 10
|
|
23581
|
+
: (this.readDimensionValue(legend?.itemWidth, width) ?? 14);
|
|
23582
|
+
const itemGap = compact
|
|
23583
|
+
? 8
|
|
23584
|
+
: (this.readDimensionValue(legend?.itemGap, width) ?? 12);
|
|
23585
|
+
const horizontalHeight = this.getHorizontalLegendHeight(legend, compact, veryCompact, height);
|
|
23266
23586
|
const verticalHeight = Math.max(120, height - (compact ? 24 : 48));
|
|
23267
23587
|
const fontFamily = this.resolveChartFontFamily();
|
|
23268
23588
|
const fontSizes = this.resolveChartFontSizes();
|
|
23269
23589
|
const next = this.applyLegendSideCoordinates({
|
|
23270
23590
|
...legend,
|
|
23271
23591
|
type: horizontal || compact ? 'scroll' : legend?.type,
|
|
23272
|
-
width: horizontal ? availableWidth : legend?.width,
|
|
23592
|
+
width: horizontal ? availableWidth : (legend?.width ?? sideLegendWidth),
|
|
23273
23593
|
height: horizontal
|
|
23274
|
-
?
|
|
23594
|
+
? horizontalHeight
|
|
23275
23595
|
: (legend?.height ?? verticalHeight),
|
|
23276
|
-
itemGap
|
|
23277
|
-
itemWidth
|
|
23596
|
+
itemGap,
|
|
23597
|
+
itemWidth,
|
|
23278
23598
|
itemHeight: compact ? 8 : legend?.itemHeight,
|
|
23279
23599
|
pageButtonPosition: horizontal ? 'end' : legend?.pageButtonPosition,
|
|
23280
|
-
pageIconSize: compact ? 10 : legend?.pageIconSize,
|
|
23600
|
+
pageIconSize: compact ? 10 : (legend?.pageIconSize ?? 12),
|
|
23281
23601
|
textStyle: {
|
|
23282
23602
|
...(legend?.textStyle || {}),
|
|
23283
23603
|
fontSize: veryCompact
|
|
@@ -23291,8 +23611,9 @@ class EChartComponent {
|
|
|
23291
23611
|
width: horizontal
|
|
23292
23612
|
? undefined
|
|
23293
23613
|
: compact
|
|
23294
|
-
?
|
|
23295
|
-
: (legend?.textStyle?.width ??
|
|
23614
|
+
? Math.max(72, sideLegendWidth - itemWidth - itemGap - 16)
|
|
23615
|
+
: (legend?.textStyle?.width ??
|
|
23616
|
+
Math.max(96, sideLegendWidth - itemWidth - itemGap - 20)),
|
|
23296
23617
|
},
|
|
23297
23618
|
}, side, compact);
|
|
23298
23619
|
return next;
|
|
@@ -23308,7 +23629,7 @@ class EChartComponent {
|
|
|
23308
23629
|
return {
|
|
23309
23630
|
...legend,
|
|
23310
23631
|
data: Array.isArray(legend.data)
|
|
23311
|
-
? orderLegendData(legend.data, overrideOrder)
|
|
23632
|
+
? this.applyLegendDataColorOverrides(orderLegendData(legend.data, overrideOrder))
|
|
23312
23633
|
: legend.data,
|
|
23313
23634
|
show: this.showCustomLegend()
|
|
23314
23635
|
? false
|
|
@@ -23322,6 +23643,124 @@ class EChartComponent {
|
|
|
23322
23643
|
? legendConfig.map(mapLegend)
|
|
23323
23644
|
: mapLegend(legendConfig);
|
|
23324
23645
|
}
|
|
23646
|
+
applyLegendColorOverrides(option) {
|
|
23647
|
+
const colorOverrides = this.getLegendColorOverrides();
|
|
23648
|
+
if (!Object.keys(colorOverrides).length)
|
|
23649
|
+
return option;
|
|
23650
|
+
const next = { ...option };
|
|
23651
|
+
const series = Array.isArray(next.series)
|
|
23652
|
+
? next.series
|
|
23653
|
+
: next.series
|
|
23654
|
+
? [next.series]
|
|
23655
|
+
: [];
|
|
23656
|
+
if (series.length) {
|
|
23657
|
+
const mappedSeries = series.map((seriesItem) => {
|
|
23658
|
+
if (!seriesItem || seriesItem.isStaticProperty || seriesItem.isTotal) {
|
|
23659
|
+
return seriesItem;
|
|
23660
|
+
}
|
|
23661
|
+
const seriesColor = this.getLegendOverrideColor(seriesItem.name, colorOverrides);
|
|
23662
|
+
const mapped = seriesColor
|
|
23663
|
+
? {
|
|
23664
|
+
...seriesItem,
|
|
23665
|
+
color: seriesColor,
|
|
23666
|
+
itemStyle: {
|
|
23667
|
+
...(seriesItem.itemStyle || {}),
|
|
23668
|
+
color: seriesColor,
|
|
23669
|
+
},
|
|
23670
|
+
lineStyle: seriesItem.lineStyle
|
|
23671
|
+
? {
|
|
23672
|
+
...seriesItem.lineStyle,
|
|
23673
|
+
color: seriesColor,
|
|
23674
|
+
}
|
|
23675
|
+
: seriesItem.lineStyle,
|
|
23676
|
+
}
|
|
23677
|
+
: { ...seriesItem };
|
|
23678
|
+
if (Array.isArray(seriesItem.data)) {
|
|
23679
|
+
mapped.data = seriesItem.data.map((dataItem) => {
|
|
23680
|
+
const color = this.getLegendOverrideColor(legendDataName(dataItem), colorOverrides);
|
|
23681
|
+
if (!color)
|
|
23682
|
+
return dataItem;
|
|
23683
|
+
return {
|
|
23684
|
+
...dataItem,
|
|
23685
|
+
itemStyle: {
|
|
23686
|
+
...(dataItem?.itemStyle || {}),
|
|
23687
|
+
color,
|
|
23688
|
+
},
|
|
23689
|
+
};
|
|
23690
|
+
});
|
|
23691
|
+
}
|
|
23692
|
+
return mapped;
|
|
23693
|
+
});
|
|
23694
|
+
next.series = Array.isArray(next.series) ? mappedSeries : mappedSeries[0];
|
|
23695
|
+
}
|
|
23696
|
+
if (next.legend) {
|
|
23697
|
+
const legends = Array.isArray(next.legend) ? next.legend : [next.legend];
|
|
23698
|
+
const mappedLegends = legends.map((legend) => ({
|
|
23699
|
+
...legend,
|
|
23700
|
+
data: Array.isArray(legend?.data)
|
|
23701
|
+
? this.applyLegendDataColorOverrides(legend.data)
|
|
23702
|
+
: legend?.data,
|
|
23703
|
+
}));
|
|
23704
|
+
next.legend = Array.isArray(next.legend)
|
|
23705
|
+
? mappedLegends
|
|
23706
|
+
: mappedLegends[0];
|
|
23707
|
+
}
|
|
23708
|
+
return next;
|
|
23709
|
+
}
|
|
23710
|
+
applyLegendDataColorOverrides(data) {
|
|
23711
|
+
const colorOverrides = this.getLegendColorOverrides();
|
|
23712
|
+
if (!Object.keys(colorOverrides).length)
|
|
23713
|
+
return data;
|
|
23714
|
+
return data.map((item) => {
|
|
23715
|
+
const name = legendDataName(item);
|
|
23716
|
+
const color = this.getLegendOverrideColor(name, colorOverrides);
|
|
23717
|
+
if (!color)
|
|
23718
|
+
return item;
|
|
23719
|
+
if (typeof item === 'string') {
|
|
23720
|
+
return {
|
|
23721
|
+
name: item,
|
|
23722
|
+
itemStyle: { color },
|
|
23723
|
+
};
|
|
23724
|
+
}
|
|
23725
|
+
return {
|
|
23726
|
+
...item,
|
|
23727
|
+
itemStyle: {
|
|
23728
|
+
...(item?.itemStyle || {}),
|
|
23729
|
+
color,
|
|
23730
|
+
},
|
|
23731
|
+
};
|
|
23732
|
+
});
|
|
23733
|
+
}
|
|
23734
|
+
getLegendColorOverrides() {
|
|
23735
|
+
const raw = this.configurationItem()?.clientConfig?.configAsType?.['legend']?.['colorOverrides'];
|
|
23736
|
+
if (!raw || typeof raw !== 'object' || Array.isArray(raw))
|
|
23737
|
+
return {};
|
|
23738
|
+
return Object.fromEntries(Object.entries(raw)
|
|
23739
|
+
.map(([key, value]) => [key, this.readLegendColor(value)])
|
|
23740
|
+
.filter((entry) => !!entry[1]));
|
|
23741
|
+
}
|
|
23742
|
+
readLegendColor(value) {
|
|
23743
|
+
if (typeof value === 'string')
|
|
23744
|
+
return value || null;
|
|
23745
|
+
if (!value || typeof value !== 'object')
|
|
23746
|
+
return null;
|
|
23747
|
+
const record = value;
|
|
23748
|
+
const color = record['color'] ?? record['value'];
|
|
23749
|
+
return typeof color === 'string' && color ? color : null;
|
|
23750
|
+
}
|
|
23751
|
+
getLegendOverrideColor(name, overrides) {
|
|
23752
|
+
const label = String(name ?? '').trim();
|
|
23753
|
+
if (!label)
|
|
23754
|
+
return null;
|
|
23755
|
+
if (overrides[label])
|
|
23756
|
+
return overrides[label];
|
|
23757
|
+
const normalized = this.normalizeLegendName(label);
|
|
23758
|
+
const match = Object.entries(overrides).find(([key]) => this.normalizeLegendName(key) === normalized);
|
|
23759
|
+
return match?.[1] ?? null;
|
|
23760
|
+
}
|
|
23761
|
+
normalizeLegendName(name) {
|
|
23762
|
+
return name.trim().toLowerCase().replace(/\s+/g, ' ');
|
|
23763
|
+
}
|
|
23325
23764
|
applyLegendOverrideOrder(option) {
|
|
23326
23765
|
const overrideOrder = getLegendOverrideOrder(this.configurationItem());
|
|
23327
23766
|
if (!overrideOrder.length)
|
|
@@ -25230,10 +25669,10 @@ class TableCardComponent {
|
|
|
25230
25669
|
// Set labels. Grouped table responses are arrays, so labels may live on
|
|
25231
25670
|
// the first group data block rather than at the response root.
|
|
25232
25671
|
const dataLabels = this.extractLabels(data);
|
|
25233
|
-
this.labels.set(dataLabels.map((l) => ({
|
|
25672
|
+
this.labels.set(this.applyLegendOrder(dataLabels.map((l) => ({
|
|
25234
25673
|
...l,
|
|
25235
25674
|
shape: 'circle',
|
|
25236
|
-
})));
|
|
25675
|
+
}))));
|
|
25237
25676
|
}
|
|
25238
25677
|
/**
|
|
25239
25678
|
* Build flat (non-grouped) table
|
|
@@ -25542,10 +25981,10 @@ class TableCardComponent {
|
|
|
25542
25981
|
this.columns.set([...baseColumns, ...phaseColumns]);
|
|
25543
25982
|
this.tableRows.set(Array.from(rowMap.values()));
|
|
25544
25983
|
this.groupedData.set([]);
|
|
25545
|
-
this.labels.set(Array.from(statusLabels.values()).map((label) => ({
|
|
25984
|
+
this.labels.set(this.applyLegendOrder(Array.from(statusLabels.values()).map((label) => ({
|
|
25546
25985
|
...label,
|
|
25547
25986
|
shape: 'circle',
|
|
25548
|
-
})));
|
|
25987
|
+
}))));
|
|
25549
25988
|
}
|
|
25550
25989
|
extractPhaseGateValues(data) {
|
|
25551
25990
|
if (Array.isArray(data)) {
|
|
@@ -25734,6 +26173,9 @@ class TableCardComponent {
|
|
|
25734
26173
|
label?.key ||
|
|
25735
26174
|
'');
|
|
25736
26175
|
}
|
|
26176
|
+
applyLegendOrder(labels) {
|
|
26177
|
+
return orderLegendItems(labels, getLegendOverrideOrder(this.configurationItem()), (label) => this.getLegendText(label));
|
|
26178
|
+
}
|
|
25737
26179
|
extractLabels(data, fallback = null) {
|
|
25738
26180
|
if (Array.isArray(fallback) && fallback.length) {
|
|
25739
26181
|
return fallback;
|
|
@@ -26209,11 +26651,11 @@ class ListStatisticCardComponent {
|
|
|
26209
26651
|
this.onAction.emit({ type, data: body });
|
|
26210
26652
|
}
|
|
26211
26653
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ListStatisticCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
26212
|
-
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\">\
|
|
26654
|
+
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 });
|
|
26213
26655
|
}
|
|
26214
26656
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ListStatisticCardComponent, decorators: [{
|
|
26215
26657
|
type: Component,
|
|
26216
|
-
args: [{ selector: 'mt-list-statistic-card', standalone: true, imports: [CommonModule, StatisticCardComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"flex h-full w-full justify-between\">\
|
|
26658
|
+
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" }]
|
|
26217
26659
|
}], propDecorators: { dashboardId: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardId", required: true }] }], onAction: [{ type: i0.Output, args: ["onAction"] }] } });
|
|
26218
26660
|
|
|
26219
26661
|
/**
|
|
@@ -26589,34 +27031,34 @@ class SkeletonCardComponent {
|
|
|
26589
27031
|
}
|
|
26590
27032
|
}
|
|
26591
27033
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SkeletonCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
26592
|
-
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: `
|
|
26593
|
-
<div class="skeleton-container">
|
|
26594
|
-
@for (skeleton of skeletons(); track $index) {
|
|
26595
|
-
<div
|
|
26596
|
-
class="skeleton-item"
|
|
26597
|
-
[style.width]="skeleton.width"
|
|
26598
|
-
[style.height]="skeleton.height"
|
|
26599
|
-
>
|
|
26600
|
-
<div class="skeleton-animation"></div>
|
|
26601
|
-
</div>
|
|
26602
|
-
}
|
|
26603
|
-
</div>
|
|
27034
|
+
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: `
|
|
27035
|
+
<div class="skeleton-container">
|
|
27036
|
+
@for (skeleton of skeletons(); track $index) {
|
|
27037
|
+
<div
|
|
27038
|
+
class="skeleton-item"
|
|
27039
|
+
[style.width]="skeleton.width"
|
|
27040
|
+
[style.height]="skeleton.height"
|
|
27041
|
+
>
|
|
27042
|
+
<div class="skeleton-animation"></div>
|
|
27043
|
+
</div>
|
|
27044
|
+
}
|
|
27045
|
+
</div>
|
|
26604
27046
|
`, 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 });
|
|
26605
27047
|
}
|
|
26606
27048
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SkeletonCardComponent, decorators: [{
|
|
26607
27049
|
type: Component,
|
|
26608
|
-
args: [{ selector: 'mt-skeleton-card', standalone: true, imports: [CommonModule], template: `
|
|
26609
|
-
<div class="skeleton-container">
|
|
26610
|
-
@for (skeleton of skeletons(); track $index) {
|
|
26611
|
-
<div
|
|
26612
|
-
class="skeleton-item"
|
|
26613
|
-
[style.width]="skeleton.width"
|
|
26614
|
-
[style.height]="skeleton.height"
|
|
26615
|
-
>
|
|
26616
|
-
<div class="skeleton-animation"></div>
|
|
26617
|
-
</div>
|
|
26618
|
-
}
|
|
26619
|
-
</div>
|
|
27050
|
+
args: [{ selector: 'mt-skeleton-card', standalone: true, imports: [CommonModule], template: `
|
|
27051
|
+
<div class="skeleton-container">
|
|
27052
|
+
@for (skeleton of skeletons(); track $index) {
|
|
27053
|
+
<div
|
|
27054
|
+
class="skeleton-item"
|
|
27055
|
+
[style.width]="skeleton.width"
|
|
27056
|
+
[style.height]="skeleton.height"
|
|
27057
|
+
>
|
|
27058
|
+
<div class="skeleton-animation"></div>
|
|
27059
|
+
</div>
|
|
27060
|
+
}
|
|
27061
|
+
</div>
|
|
26620
27062
|
`, 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"] }]
|
|
26621
27063
|
}], propDecorators: { dashboardId: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardId", required: true }] }] } });
|
|
26622
27064
|
|
|
@@ -26754,6 +27196,10 @@ class PropertiesCardComponent {
|
|
|
26754
27196
|
propertyColorOverrides = computed(() => this.configurationItem()?.clientConfig?.configAsType?.['overrideSelectedPropertiesColors'], ...(ngDevMode ? [{ debugName: "propertyColorOverrides" }] : /* istanbul ignore next */ []));
|
|
26755
27197
|
// Style Studio "Number format" — clientConfig.format. Absent => no change.
|
|
26756
27198
|
numberFormat = computed(() => this.configurationItem()?.clientConfig?.['format'], ...(ngDevMode ? [{ debugName: "numberFormat" }] : /* istanbul ignore next */ []));
|
|
27199
|
+
cardOrderConfig = computed(() => {
|
|
27200
|
+
const raw = this.configurationItem()?.clientConfig?.configAsType?.['cardOrder'];
|
|
27201
|
+
return raw && typeof raw === 'object' ? raw : {};
|
|
27202
|
+
}, ...(ngDevMode ? [{ debugName: "cardOrderConfig" }] : /* istanbul ignore next */ []));
|
|
26757
27203
|
legacyHiddenPropertyKeys = computed(() => {
|
|
26758
27204
|
if (this.propsConfigAsIndex().length > 0)
|
|
26759
27205
|
return [];
|
|
@@ -26768,7 +27214,7 @@ class PropertiesCardComponent {
|
|
|
26768
27214
|
})), ...(ngDevMode ? [{ debugName: "tabOptions" }] : /* istanbul ignore next */ []));
|
|
26769
27215
|
showTabs = computed(() => !this.inGroup() && this.tabOptions().length > 1, ...(ngDevMode ? [{ debugName: "showTabs" }] : /* istanbul ignore next */ []));
|
|
26770
27216
|
currentTabCards = computed(() => {
|
|
26771
|
-
const cards = this.extractCards(this.currentTabItems());
|
|
27217
|
+
const cards = this.sortCards(this.extractCards(this.currentTabItems()), this.cardOrderConfig());
|
|
26772
27218
|
const selectedProperties = this.selectedProperties();
|
|
26773
27219
|
const propsConfigAsIndex = this.propsConfigAsIndex();
|
|
26774
27220
|
const legacyHiddenPropertyKeys = this.legacyHiddenPropertyKeys();
|
|
@@ -26882,6 +27328,78 @@ class PropertiesCardComponent {
|
|
|
26882
27328
|
return card.properties;
|
|
26883
27329
|
return [];
|
|
26884
27330
|
}
|
|
27331
|
+
sortCards(cards, orderConfig) {
|
|
27332
|
+
const propertyKey = orderConfig.propertyKey;
|
|
27333
|
+
if (!propertyKey)
|
|
27334
|
+
return cards;
|
|
27335
|
+
const direction = orderConfig.direction === 'desc' ? -1 : 1;
|
|
27336
|
+
const indexed = cards.map((card, index) => ({ card, index }));
|
|
27337
|
+
indexed.sort((first, second) => {
|
|
27338
|
+
const a = this.resolveCardSortValue(first.card, propertyKey);
|
|
27339
|
+
const b = this.resolveCardSortValue(second.card, propertyKey);
|
|
27340
|
+
if (a.missing && b.missing)
|
|
27341
|
+
return first.index - second.index;
|
|
27342
|
+
if (a.missing)
|
|
27343
|
+
return 1;
|
|
27344
|
+
if (b.missing)
|
|
27345
|
+
return -1;
|
|
27346
|
+
let result = 0;
|
|
27347
|
+
if (typeof a.value === 'number' && typeof b.value === 'number') {
|
|
27348
|
+
result = a.value - b.value;
|
|
27349
|
+
}
|
|
27350
|
+
else {
|
|
27351
|
+
result = String(a.value).localeCompare(String(b.value), undefined, {
|
|
27352
|
+
numeric: true,
|
|
27353
|
+
sensitivity: 'base',
|
|
27354
|
+
});
|
|
27355
|
+
}
|
|
27356
|
+
return result === 0 ? first.index - second.index : result * direction;
|
|
27357
|
+
});
|
|
27358
|
+
return indexed.map((item) => item.card);
|
|
27359
|
+
}
|
|
27360
|
+
resolveCardSortValue(card, propertyKey) {
|
|
27361
|
+
const normalizedTarget = normalizePropertyKey(propertyKey);
|
|
27362
|
+
const prop = this.getCardProps(card).find((item) => [item.normalizedKey, item.key].some((key) => normalizePropertyKey(key) === normalizedTarget));
|
|
27363
|
+
if (!prop)
|
|
27364
|
+
return { value: '', missing: true };
|
|
27365
|
+
const raw = this.unwrapSortValue(prop.value);
|
|
27366
|
+
if (raw === null || raw === undefined || raw === '') {
|
|
27367
|
+
return { value: '', missing: true };
|
|
27368
|
+
}
|
|
27369
|
+
if (typeof raw === 'number')
|
|
27370
|
+
return { value: raw, missing: false };
|
|
27371
|
+
const numeric = Number(raw);
|
|
27372
|
+
if (Number.isFinite(numeric) && String(raw).trim() !== '') {
|
|
27373
|
+
return { value: numeric, missing: false };
|
|
27374
|
+
}
|
|
27375
|
+
return { value: String(raw), missing: false };
|
|
27376
|
+
}
|
|
27377
|
+
unwrapSortValue(value) {
|
|
27378
|
+
if (value === null || value === undefined)
|
|
27379
|
+
return value;
|
|
27380
|
+
if (typeof value !== 'object')
|
|
27381
|
+
return value;
|
|
27382
|
+
const record = value;
|
|
27383
|
+
const order = record['order'] ??
|
|
27384
|
+
record['details']?.['order'] ??
|
|
27385
|
+
record['display']?.['order'] ??
|
|
27386
|
+
record['value']?.['order'] ??
|
|
27387
|
+
record['value']?.['details']?.['order'] ??
|
|
27388
|
+
record['value']?.['display']?.['order'];
|
|
27389
|
+
if (order !== null && order !== undefined && order !== '')
|
|
27390
|
+
return order;
|
|
27391
|
+
const candidate = record['name'] ??
|
|
27392
|
+
record['label'] ??
|
|
27393
|
+
record['displayName'] ??
|
|
27394
|
+
record['display'] ??
|
|
27395
|
+
record['en'] ??
|
|
27396
|
+
record['ar'] ??
|
|
27397
|
+
record['key'] ??
|
|
27398
|
+
record['value'];
|
|
27399
|
+
return typeof candidate === 'object'
|
|
27400
|
+
? this.unwrapSortValue(candidate)
|
|
27401
|
+
: candidate;
|
|
27402
|
+
}
|
|
26885
27403
|
orderProperties(props, selectedProperties, propertyTemplates) {
|
|
26886
27404
|
if (!selectedProperties.length)
|
|
26887
27405
|
return props;
|
|
@@ -29702,6 +30220,12 @@ class StyleField {
|
|
|
29702
30220
|
}
|
|
29703
30221
|
mapKeys() {
|
|
29704
30222
|
const field = this.field();
|
|
30223
|
+
if (field.key === 'legend.colors') {
|
|
30224
|
+
return this.legendItems().map((item) => ({
|
|
30225
|
+
label: item.name || item.key,
|
|
30226
|
+
value: item.name || item.key,
|
|
30227
|
+
}));
|
|
30228
|
+
}
|
|
29705
30229
|
return field.keysFrom
|
|
29706
30230
|
? field.keysFrom(this.persisted(), this.capability() ?? null)
|
|
29707
30231
|
: [];
|
|
@@ -31057,7 +31581,7 @@ class SourceLinkConfiguration {
|
|
|
31057
31581
|
useExisting: forwardRef(() => SourceLinkConfiguration),
|
|
31058
31582
|
multi: true,
|
|
31059
31583
|
},
|
|
31060
|
-
], 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 });
|
|
31584
|
+
], 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 });
|
|
31061
31585
|
}
|
|
31062
31586
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SourceLinkConfiguration, decorators: [{
|
|
31063
31587
|
type: Component,
|
|
@@ -31083,7 +31607,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
31083
31607
|
useExisting: forwardRef(() => SourceLinkConfiguration),
|
|
31084
31608
|
multi: true,
|
|
31085
31609
|
},
|
|
31086
|
-
], template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\
|
|
31610
|
+
], 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" }]
|
|
31087
31611
|
}], ctorParameters: () => [], propDecorators: { selectionModules: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionModules", required: false }] }] } });
|
|
31088
31612
|
|
|
31089
31613
|
/**
|
|
@@ -31161,7 +31685,7 @@ class CustomApiConfiguration {
|
|
|
31161
31685
|
useExisting: forwardRef(() => CustomApiConfiguration),
|
|
31162
31686
|
multi: true,
|
|
31163
31687
|
},
|
|
31164
|
-
], ngImport: i0, template: "<mt-card\
|
|
31688
|
+
], 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 });
|
|
31165
31689
|
}
|
|
31166
31690
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CustomApiConfiguration, decorators: [{
|
|
31167
31691
|
type: Component,
|
|
@@ -31178,7 +31702,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
31178
31702
|
useExisting: forwardRef(() => CustomApiConfiguration),
|
|
31179
31703
|
multi: true,
|
|
31180
31704
|
},
|
|
31181
|
-
], template: "<mt-card\
|
|
31705
|
+
], 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" }]
|
|
31182
31706
|
}] });
|
|
31183
31707
|
|
|
31184
31708
|
/**
|
|
@@ -31196,6 +31720,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
31196
31720
|
* (keys). Tailwind-only styling, matched to the design system tokens.
|
|
31197
31721
|
*/
|
|
31198
31722
|
class StringArrayInput {
|
|
31723
|
+
resolvedOptionLabelKey = '__mtResolvedLabel';
|
|
31199
31724
|
/** Field label rendered above the control. Optional. */
|
|
31200
31725
|
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
31201
31726
|
/** Placeholder for the add picker. */
|
|
@@ -31228,9 +31753,9 @@ class StringArrayInput {
|
|
|
31228
31753
|
const opts = (this.options() ?? []);
|
|
31229
31754
|
if (this.group()) {
|
|
31230
31755
|
const childrenKey = this.optionGroupChildren();
|
|
31231
|
-
return opts.flatMap((g) => g?.[childrenKey] ?? []);
|
|
31756
|
+
return opts.flatMap((g) => (g?.[childrenKey] ?? []).map((item) => this.withResolvedOptionLabel(item)));
|
|
31232
31757
|
}
|
|
31233
|
-
return opts;
|
|
31758
|
+
return opts.map((item) => this.withResolvedOptionLabel(item));
|
|
31234
31759
|
}, ...(ngDevMode ? [{ debugName: "flatOptions" }] : /* istanbul ignore next */ []));
|
|
31235
31760
|
/** Options still available to add (already-selected are filtered out). */
|
|
31236
31761
|
availableOptions = computed(() => {
|
|
@@ -31241,18 +31766,86 @@ class StringArrayInput {
|
|
|
31241
31766
|
return this.options()
|
|
31242
31767
|
.map((g) => ({
|
|
31243
31768
|
...g,
|
|
31244
|
-
[childrenKey]: (g?.[childrenKey] ?? [])
|
|
31769
|
+
[childrenKey]: (g?.[childrenKey] ?? [])
|
|
31770
|
+
.filter((item) => !selected.has(item?.[valueKey]))
|
|
31771
|
+
.map((item) => this.withResolvedOptionLabel(item)),
|
|
31245
31772
|
}))
|
|
31246
31773
|
.filter((g) => (g?.[childrenKey] ?? []).length > 0);
|
|
31247
31774
|
}
|
|
31248
|
-
return this.options()
|
|
31775
|
+
return this.options()
|
|
31776
|
+
.filter((item) => !selected.has(item?.[valueKey]))
|
|
31777
|
+
.map((item) => this.withResolvedOptionLabel(item));
|
|
31249
31778
|
}, ...(ngDevMode ? [{ debugName: "availableOptions" }] : /* istanbul ignore next */ []));
|
|
31250
31779
|
/** Resolve the display label for a stored value key. */
|
|
31251
31780
|
getLabel(key) {
|
|
31252
31781
|
const valueKey = this.optionValue();
|
|
31253
|
-
const labelKey = this.optionLabel();
|
|
31254
31782
|
const match = this.flatOptions().find((o) => o[valueKey] === key);
|
|
31255
|
-
return match?.[
|
|
31783
|
+
return match?.[this.resolvedOptionLabelKey] ?? this.titleizeKey(key);
|
|
31784
|
+
}
|
|
31785
|
+
withResolvedOptionLabel(item) {
|
|
31786
|
+
return {
|
|
31787
|
+
...item,
|
|
31788
|
+
[this.resolvedOptionLabelKey]: this.resolveOptionLabel(item),
|
|
31789
|
+
};
|
|
31790
|
+
}
|
|
31791
|
+
resolveOptionLabel(item) {
|
|
31792
|
+
const labelKey = this.optionLabel();
|
|
31793
|
+
const config = item?.['configuration'] && typeof item['configuration'] === 'object'
|
|
31794
|
+
? item['configuration']
|
|
31795
|
+
: {};
|
|
31796
|
+
const candidates = [
|
|
31797
|
+
item?.['displayName'],
|
|
31798
|
+
item?.['display'],
|
|
31799
|
+
item?.['title'],
|
|
31800
|
+
config?.['displayName'],
|
|
31801
|
+
config?.['name'],
|
|
31802
|
+
config?.['label'],
|
|
31803
|
+
config?.['title'],
|
|
31804
|
+
config?.['display'] && typeof config?.['display'] === 'object'
|
|
31805
|
+
? config?.['display']?.['name'] || config?.['display']?.['label']
|
|
31806
|
+
: config?.['display'],
|
|
31807
|
+
item?.[labelKey],
|
|
31808
|
+
item?.['label'],
|
|
31809
|
+
item?.['name'],
|
|
31810
|
+
];
|
|
31811
|
+
for (const candidate of candidates) {
|
|
31812
|
+
const value = this.readLabelCandidate(candidate);
|
|
31813
|
+
if (value && !this.isWeakPropertyLabel(value)) {
|
|
31814
|
+
return value;
|
|
31815
|
+
}
|
|
31816
|
+
}
|
|
31817
|
+
return this.titleizeKey(item?.['normalizedKey'] || item?.['key'] || '');
|
|
31818
|
+
}
|
|
31819
|
+
readLabelCandidate(candidate) {
|
|
31820
|
+
if (candidate === null || candidate === undefined)
|
|
31821
|
+
return null;
|
|
31822
|
+
if (typeof candidate === 'string' || typeof candidate === 'number') {
|
|
31823
|
+
const text = String(candidate).trim();
|
|
31824
|
+
return text || null;
|
|
31825
|
+
}
|
|
31826
|
+
if (typeof candidate === 'object') {
|
|
31827
|
+
const record = candidate;
|
|
31828
|
+
return (this.readLabelCandidate(record['en']) ||
|
|
31829
|
+
this.readLabelCandidate(record['ar']) ||
|
|
31830
|
+
this.readLabelCandidate(record['name']) ||
|
|
31831
|
+
this.readLabelCandidate(record['label']) ||
|
|
31832
|
+
this.readLabelCandidate(record['value']));
|
|
31833
|
+
}
|
|
31834
|
+
return null;
|
|
31835
|
+
}
|
|
31836
|
+
isWeakPropertyLabel(value) {
|
|
31837
|
+
return value.trim().toLowerCase() === 'property';
|
|
31838
|
+
}
|
|
31839
|
+
titleizeKey(value) {
|
|
31840
|
+
const text = String(value ?? '').trim();
|
|
31841
|
+
if (!text)
|
|
31842
|
+
return '';
|
|
31843
|
+
return text
|
|
31844
|
+
.replace(/([a-z0-9])([A-Z])/g, '$1 $2')
|
|
31845
|
+
.replace(/[_\-.]+/g, ' ')
|
|
31846
|
+
.replace(/\s+/g, ' ')
|
|
31847
|
+
.trim()
|
|
31848
|
+
.replace(/\b\w/g, (char) => char.toUpperCase());
|
|
31256
31849
|
}
|
|
31257
31850
|
// ==================== ControlValueAccessor ====================
|
|
31258
31851
|
writeValue(value) {
|
|
@@ -31307,7 +31900,7 @@ class StringArrayInput {
|
|
|
31307
31900
|
useExisting: forwardRef(() => StringArrayInput),
|
|
31308
31901
|
multi: true,
|
|
31309
31902
|
},
|
|
31310
|
-
], ngImport: i0, 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]=\"
|
|
31903
|
+
], ngImport: i0, 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"], 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: DragDropModule }, { kind: "directive", type: i2$2.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i2$2.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i2$2.CdkDragPreview, selector: "ng-template[cdkDragPreview]", inputs: ["data", "matchSize"] }, { 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: "directive", type: TruncateTooltip, selector: "[mtTruncateTooltip]" }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }, { 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 });
|
|
31311
31904
|
}
|
|
31312
31905
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: StringArrayInput, decorators: [{
|
|
31313
31906
|
type: Component,
|
|
@@ -31326,7 +31919,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
31326
31919
|
useExisting: forwardRef(() => StringArrayInput),
|
|
31327
31920
|
multi: true,
|
|
31328
31921
|
},
|
|
31329
|
-
], 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]=\"
|
|
31922
|
+
], 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"] }]
|
|
31330
31923
|
}], 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 }] }] } });
|
|
31331
31924
|
|
|
31332
31925
|
/**
|
|
@@ -31353,6 +31946,14 @@ class GeneralQuery {
|
|
|
31353
31946
|
optionLabel: 'name',
|
|
31354
31947
|
items: this.propertiesFlat(),
|
|
31355
31948
|
}), ...(ngDevMode ? [{ debugName: "optionsConfig" }] : /* istanbul ignore next */ []));
|
|
31949
|
+
/** Local formula-builder context for chart query formulas. */
|
|
31950
|
+
formulaPropertiesByPath = computed(() => ({
|
|
31951
|
+
Current: this.propertiesFlat().map((property) => ({
|
|
31952
|
+
key: property.key,
|
|
31953
|
+
name: property.name || property.label || property.key,
|
|
31954
|
+
viewType: property.viewType,
|
|
31955
|
+
})),
|
|
31956
|
+
}), ...(ngDevMode ? [{ debugName: "formulaPropertiesByPath" }] : /* istanbul ignore next */ []));
|
|
31356
31957
|
/** Aggregate function options */
|
|
31357
31958
|
aggregateFunctions = [
|
|
31358
31959
|
{ value: 'Sum', label: 'Sum' },
|
|
@@ -31716,7 +32317,7 @@ class GeneralQuery {
|
|
|
31716
32317
|
useExisting: forwardRef(() => GeneralQuery),
|
|
31717
32318
|
multi: true,
|
|
31718
32319
|
},
|
|
31719
|
-
], 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 <mt-text-field\r\n [label]=\"t('formula')\"\r\n formControlName=\"formula\"\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: 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 });
|
|
32320
|
+
], 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 });
|
|
31720
32321
|
}
|
|
31721
32322
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: GeneralQuery, decorators: [{
|
|
31722
32323
|
type: Component,
|
|
@@ -31730,6 +32331,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
31730
32331
|
TextField,
|
|
31731
32332
|
ToggleField,
|
|
31732
32333
|
ColorPickerField,
|
|
32334
|
+
FormulaBuilder,
|
|
31733
32335
|
StringArrayInput,
|
|
31734
32336
|
Tooltip,
|
|
31735
32337
|
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
|
|
@@ -31743,7 +32345,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
31743
32345
|
useExisting: forwardRef(() => GeneralQuery),
|
|
31744
32346
|
multi: true,
|
|
31745
32347
|
},
|
|
31746
|
-
], 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 <mt-text-field\r\n [label]=\"t('formula')\"\r\n formControlName=\"formula\"\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" }]
|
|
32348
|
+
], 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" }]
|
|
31747
32349
|
}], 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 }] }] } });
|
|
31748
32350
|
|
|
31749
32351
|
/**
|
|
@@ -31970,7 +32572,7 @@ class TimelineQuery {
|
|
|
31970
32572
|
useExisting: forwardRef(() => TimelineQuery),
|
|
31971
32573
|
multi: true,
|
|
31972
32574
|
},
|
|
31973
|
-
], ngImport: i0, template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\
|
|
32575
|
+
], 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 });
|
|
31974
32576
|
}
|
|
31975
32577
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TimelineQuery, decorators: [{
|
|
31976
32578
|
type: Component,
|
|
@@ -31986,7 +32588,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
31986
32588
|
useExisting: forwardRef(() => TimelineQuery),
|
|
31987
32589
|
multi: true,
|
|
31988
32590
|
},
|
|
31989
|
-
], template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\
|
|
32591
|
+
], 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" }]
|
|
31990
32592
|
}], propDecorators: { propertiesFlat: [{ type: i0.Input, args: [{ isSignal: true, alias: "propertiesFlat", required: false }] }], propertiesGrouped: [{ type: i0.Input, args: [{ isSignal: true, alias: "propertiesGrouped", required: false }] }] } });
|
|
31991
32593
|
|
|
31992
32594
|
/**
|
|
@@ -32415,7 +33017,7 @@ class MapQuery {
|
|
|
32415
33017
|
useExisting: forwardRef(() => MapQuery),
|
|
32416
33018
|
multi: true,
|
|
32417
33019
|
},
|
|
32418
|
-
], ngImport: i0, template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\
|
|
33020
|
+
], 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 });
|
|
32419
33021
|
}
|
|
32420
33022
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: MapQuery, decorators: [{
|
|
32421
33023
|
type: Component,
|
|
@@ -32431,7 +33033,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
32431
33033
|
useExisting: forwardRef(() => MapQuery),
|
|
32432
33034
|
multi: true,
|
|
32433
33035
|
},
|
|
32434
|
-
], template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\
|
|
33036
|
+
], 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" }]
|
|
32435
33037
|
}], propDecorators: { propertiesFlat: [{ type: i0.Input, args: [{ isSignal: true, alias: "propertiesFlat", required: false }] }], propertiesGrouped: [{ type: i0.Input, args: [{ isSignal: true, alias: "propertiesGrouped", required: false }] }] } });
|
|
32436
33038
|
|
|
32437
33039
|
/**
|
|
@@ -32505,7 +33107,7 @@ class SplitterQuery {
|
|
|
32505
33107
|
useExisting: forwardRef(() => SplitterQuery),
|
|
32506
33108
|
multi: true,
|
|
32507
33109
|
},
|
|
32508
|
-
], ngImport: i0, template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\
|
|
33110
|
+
], 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 });
|
|
32509
33111
|
}
|
|
32510
33112
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SplitterQuery, decorators: [{
|
|
32511
33113
|
type: Component,
|
|
@@ -32521,7 +33123,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
32521
33123
|
useExisting: forwardRef(() => SplitterQuery),
|
|
32522
33124
|
multi: true,
|
|
32523
33125
|
},
|
|
32524
|
-
], template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\
|
|
33126
|
+
], 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" }]
|
|
32525
33127
|
}], propDecorators: { propertiesFlat: [{ type: i0.Input, args: [{ isSignal: true, alias: "propertiesFlat", required: false }] }], propertiesGrouped: [{ type: i0.Input, args: [{ isSignal: true, alias: "propertiesGrouped", required: false }] }] } });
|
|
32526
33128
|
|
|
32527
33129
|
class InformativeContextSelection {
|
|
@@ -34147,7 +34749,7 @@ class GeneralSettings {
|
|
|
34147
34749
|
return labels[category] || category;
|
|
34148
34750
|
}
|
|
34149
34751
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: GeneralSettings, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
34150
|
-
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'\">\
|
|
34752
|
+
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 });
|
|
34151
34753
|
}
|
|
34152
34754
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: GeneralSettings, decorators: [{
|
|
34153
34755
|
type: Component,
|
|
@@ -34159,7 +34761,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
34159
34761
|
Card,
|
|
34160
34762
|
TooltipModule,
|
|
34161
34763
|
Icon,
|
|
34162
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\
|
|
34764
|
+
], 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" }]
|
|
34163
34765
|
}], 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"] }] } });
|
|
34164
34766
|
|
|
34165
34767
|
/**
|
|
@@ -39267,6 +39869,41 @@ class DashboardBuilder {
|
|
|
39267
39869
|
},
|
|
39268
39870
|
});
|
|
39269
39871
|
}
|
|
39872
|
+
/**
|
|
39873
|
+
* Persist the page-level filters through the dashboard (report) endpoint —
|
|
39874
|
+
* the canonical carrier of `dashboardConfig.filters`. In API-backed mode
|
|
39875
|
+
* `saveDash()` only links charts/dialogs via `linkChartsBulk` and never writes
|
|
39876
|
+
* the page config, so configured filters were lost on reload and never reached
|
|
39877
|
+
* the runtime sidebar (#1141). Standalone mode already emits filters via
|
|
39878
|
+
* `emitDashboardDataChange`, so this no-ops there.
|
|
39879
|
+
*/
|
|
39880
|
+
persistPageFilters() {
|
|
39881
|
+
if (this.standalone())
|
|
39882
|
+
return;
|
|
39883
|
+
const id = this.pageId();
|
|
39884
|
+
const report = this.pageConfig();
|
|
39885
|
+
if (!id || !report)
|
|
39886
|
+
return;
|
|
39887
|
+
// Normalize before persisting so an empty/legacy `[{}]` is never written
|
|
39888
|
+
// back to the report (mirrors what the viewer/loader accept as real).
|
|
39889
|
+
const filters = this.normalizeFiltersConfig(this.filtersConfig());
|
|
39890
|
+
const dashboardConfig = { ...(report.dashboardConfig ?? {}), filters };
|
|
39891
|
+
// Keep the in-memory report in sync so later saves/reloads carry the filters.
|
|
39892
|
+
this.pageConfig.set({ ...report, dashboardConfig });
|
|
39893
|
+
this.dashboardService
|
|
39894
|
+
.updateReport({
|
|
39895
|
+
name: report.name,
|
|
39896
|
+
type: report.type,
|
|
39897
|
+
icon: report.icon,
|
|
39898
|
+
url: report.url,
|
|
39899
|
+
showInMenu: report.showInMenu,
|
|
39900
|
+
isActive: report.isActive,
|
|
39901
|
+
dashboardConfig,
|
|
39902
|
+
}, id)
|
|
39903
|
+
.subscribe({
|
|
39904
|
+
error: (err) => console.error('[DashboardBuilder] Failed to persist page filters via updateReport', err),
|
|
39905
|
+
});
|
|
39906
|
+
}
|
|
39270
39907
|
// ============================================
|
|
39271
39908
|
// Page Management
|
|
39272
39909
|
// ============================================
|
|
@@ -40214,6 +40851,7 @@ class DashboardBuilder {
|
|
|
40214
40851
|
return;
|
|
40215
40852
|
if (Array.isArray(result)) {
|
|
40216
40853
|
this.filtersConfig.set(result);
|
|
40854
|
+
this.persistPageFilters();
|
|
40217
40855
|
this.saveDash({ silent: true });
|
|
40218
40856
|
return;
|
|
40219
40857
|
}
|
|
@@ -40230,6 +40868,7 @@ class DashboardBuilder {
|
|
|
40230
40868
|
if (labels && Object.keys(labels).length) {
|
|
40231
40869
|
changed = this.applyBulkPropertyTranslations(labels) || changed;
|
|
40232
40870
|
}
|
|
40871
|
+
this.persistPageFilters();
|
|
40233
40872
|
this.saveDash({ silent: true });
|
|
40234
40873
|
if (changed) {
|
|
40235
40874
|
this.chartsChange.emit(this.charts());
|
|
@@ -40655,6 +41294,10 @@ class DashboardBuilder {
|
|
|
40655
41294
|
this.openQuickManage(new MouseEvent('click'), this.toDialogChartItem(dialog));
|
|
40656
41295
|
}
|
|
40657
41296
|
deleteDialogFromChart(chart) {
|
|
41297
|
+
const dialog = this.getLinkedDialog(chart);
|
|
41298
|
+
this.confirmDelete(dialog ? this.toDialogChartItem(dialog) : chart, 'item', () => this.removeDialogFromChart(chart));
|
|
41299
|
+
}
|
|
41300
|
+
removeDialogFromChart(chart) {
|
|
40658
41301
|
const dialogId = chart.config.clientConfig.actions?.find((a) => a.actionType === 'openDialog')?.id;
|
|
40659
41302
|
if (!dialogId)
|
|
40660
41303
|
return;
|
|
@@ -40962,13 +41605,20 @@ class DashboardBuilder {
|
|
|
40962
41605
|
}
|
|
40963
41606
|
normalizeFiltersConfig(filters) {
|
|
40964
41607
|
const parsed = this.parseSerializedValue(filters);
|
|
41608
|
+
// Flatten + drop empties: older saves wrapped an already-array filters
|
|
41609
|
+
// value into `[[...]]`, and the BE may return a legacy/default `[{}]`. A
|
|
41610
|
+
// real page filter has a `key` (input) or a `type` (section/separator); an
|
|
41611
|
+
// empty `{}` is truthy so `.filter(Boolean)` would keep it and render a
|
|
41612
|
+
// broken keyless control (mirrors the viewer's normalizeFilters).
|
|
41613
|
+
const isMeaningful = (f) => !!f &&
|
|
41614
|
+
typeof f === 'object' &&
|
|
41615
|
+
!Array.isArray(f) &&
|
|
41616
|
+
(!!f['key'] ||
|
|
41617
|
+
!!f['type']);
|
|
40965
41618
|
if (Array.isArray(parsed)) {
|
|
40966
|
-
|
|
40967
|
-
// value into `[[...]]`, which must not reach the filter config as a
|
|
40968
|
-
// nested array (mirrors the viewer's normalizeFilters).
|
|
40969
|
-
return parsed.flat(Infinity).filter(Boolean);
|
|
41619
|
+
return parsed.flat(Infinity).filter(isMeaningful);
|
|
40970
41620
|
}
|
|
40971
|
-
return parsed ? [parsed] : [];
|
|
41621
|
+
return isMeaningful(parsed) ? [parsed] : [];
|
|
40972
41622
|
}
|
|
40973
41623
|
readSerializedObject(value) {
|
|
40974
41624
|
const parsed = this.parseSerializedValue(value);
|
|
@@ -41047,6 +41697,8 @@ class PageFilterSidebar {
|
|
|
41047
41697
|
initialValues = input({}, ...(ngDevMode ? [{ debugName: "initialValues" }] : /* istanbul ignore next */ []));
|
|
41048
41698
|
/** Emitted (on Apply / Clear) with the query-params object to merge. */
|
|
41049
41699
|
filtersApplied = output();
|
|
41700
|
+
/** Emitted when the user closes the runtime filter drawer. */
|
|
41701
|
+
closeRequested = output();
|
|
41050
41702
|
/** One control per keyed filter field (dynamic same-type record). */
|
|
41051
41703
|
form = new FormRecord({});
|
|
41052
41704
|
/** Loaded option lists per field key. */
|
|
@@ -41444,7 +42096,7 @@ class PageFilterSidebar {
|
|
|
41444
42096
|
return String(value);
|
|
41445
42097
|
}
|
|
41446
42098
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: PageFilterSidebar, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
41447
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: PageFilterSidebar, isStandalone: true, selector: "mt-page-filter-sidebar", inputs: { filters: { classPropertyName: "filters", publicName: "filters", isSignal: true, isRequired: false, transformFunction: null }, initialValues: { classPropertyName: "initialValues", publicName: "initialValues", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { filtersApplied: "filtersApplied" }, ngImport: i0, template: "<div\r\n class=\"mt-page-filter-sidebar flex h-full min-h-0 flex-col\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n>\r\n <header class=\"flex items-center gap-2 border-b border-surface-200 px-4 py-3\">\r\n <mt-icon icon=\"general.filter-funnel-01\" class=\"text-primary-600\" />\r\n <h4 class=\"text-sm font-semibold text-surface-700\"
|
|
42099
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: PageFilterSidebar, isStandalone: true, selector: "mt-page-filter-sidebar", inputs: { filters: { classPropertyName: "filters", publicName: "filters", isSignal: true, isRequired: false, transformFunction: null }, initialValues: { classPropertyName: "initialValues", publicName: "initialValues", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { filtersApplied: "filtersApplied", closeRequested: "closeRequested" }, ngImport: i0, template: "<div\r\n class=\"mt-page-filter-sidebar flex h-full min-h-0 flex-col\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n>\r\n <header class=\"flex items-center gap-2 border-b border-surface-200 px-4 py-3\">\r\n <mt-icon icon=\"general.filter-funnel-01\" class=\"text-primary-600\" />\r\n <h4 class=\"min-w-0 flex-1 text-sm font-semibold text-surface-700\">\r\n {{ t(\"filters\") }}\r\n </h4>\r\n <mt-button\r\n icon=\"general.x-close\"\r\n variant=\"text\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [tooltip]=\"t('close')\"\r\n (onClick)=\"closeRequested.emit()\"\r\n />\r\n </header>\r\n\r\n <div class=\"min-h-0 flex-1 overflow-y-auto px-4 py-4\" [formGroup]=\"form\">\r\n @for (field of filters(); track $index) {\r\n @if (field.type === \"section\") {\r\n <h5 class=\"mt-2 mb-2 text-xs font-semibold uppercase text-muted-color\">\r\n {{ label(field) }}\r\n </h5>\r\n } @else if (field.type === \"separator\") {\r\n <hr class=\"my-3 border-surface-200\" />\r\n } @else if (isInput(field)) {\r\n <div class=\"mb-3\">\r\n @switch (true) {\r\n @case (field.type === \"date\") {\r\n <mt-date-field\r\n [label]=\"label(field)\"\r\n [formControlName]=\"field.key\"\r\n [showClear]=\"true\"\r\n />\r\n }\r\n @case (field.type === \"user\") {\r\n <mt-user-search-field\r\n [label]=\"label(field)\"\r\n [formControlName]=\"field.key\"\r\n [apiUrl]=\"userApiUrl\"\r\n [isMultiple]=\"isMulti(field)\"\r\n />\r\n }\r\n @case (isMulti(field)) {\r\n <mt-multi-select-field\r\n [label]=\"label(field)\"\r\n [formControlName]=\"field.key\"\r\n [options]=\"optionsFor(field)\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('selectProperty')\"\r\n />\r\n }\r\n @default {\r\n <mt-select-field\r\n [label]=\"label(field)\"\r\n [formControlName]=\"field.key\"\r\n [options]=\"optionsFor(field)\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [filter]=\"true\"\r\n [showClear]=\"!field.configuration?.isRequird\"\r\n [placeholder]=\"t('selectProperty')\"\r\n />\r\n }\r\n }\r\n </div>\r\n }\r\n }\r\n\r\n @if (filters().length === 0) {\r\n <div class=\"py-8 text-center text-sm text-muted-color\">\r\n {{ t(\"noFiltersConfigured\") }}\r\n </div>\r\n }\r\n </div>\r\n\r\n <footer\r\n class=\"flex items-center justify-end gap-2 border-t border-surface-200 px-4 py-3\"\r\n >\r\n <mt-button\r\n [label]=\"t('clear')\"\r\n variant=\"outlined\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n (onClick)=\"clear()\"\r\n />\r\n <mt-button\r\n [label]=\"t('apply')\"\r\n icon=\"general.check\"\r\n size=\"small\"\r\n (onClick)=\"apply()\"\r\n />\r\n </footer>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { 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: "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: 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: Icon, selector: "mt-icon", inputs: ["icon"] }, { 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"] }, { kind: "component", type: DateField, selector: "mt-date-field", inputs: ["field", "hint", "label", "placeholder", "class", "readonly", "showIcon", "showOnFocus", "showClear", "showTime", "minDate", "maxDate", "pInputs", "required"] }, { kind: "component", type: UserSearchField, selector: "mt-user-search-field", inputs: ["hint", "hideUnlinkedHint", "label", "placeholder", "class", "readonly", "required", "isMultiple", "apiUrl", "dataKey", "paramName", "context", "size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
41448
42100
|
}
|
|
41449
42101
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: PageFilterSidebar, decorators: [{
|
|
41450
42102
|
type: Component,
|
|
@@ -41458,8 +42110,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
41458
42110
|
MultiSelectField,
|
|
41459
42111
|
DateField,
|
|
41460
42112
|
UserSearchField,
|
|
41461
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div\r\n class=\"mt-page-filter-sidebar flex h-full min-h-0 flex-col\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n>\r\n <header class=\"flex items-center gap-2 border-b border-surface-200 px-4 py-3\">\r\n <mt-icon icon=\"general.filter-funnel-01\" class=\"text-primary-600\" />\r\n <h4 class=\"text-sm font-semibold text-surface-700\"
|
|
41462
|
-
}], ctorParameters: () => [], propDecorators: { filters: [{ type: i0.Input, args: [{ isSignal: true, alias: "filters", required: false }] }], initialValues: [{ type: i0.Input, args: [{ isSignal: true, alias: "initialValues", required: false }] }], filtersApplied: [{ type: i0.Output, args: ["filtersApplied"] }] } });
|
|
42113
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div\r\n class=\"mt-page-filter-sidebar flex h-full min-h-0 flex-col\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n>\r\n <header class=\"flex items-center gap-2 border-b border-surface-200 px-4 py-3\">\r\n <mt-icon icon=\"general.filter-funnel-01\" class=\"text-primary-600\" />\r\n <h4 class=\"min-w-0 flex-1 text-sm font-semibold text-surface-700\">\r\n {{ t(\"filters\") }}\r\n </h4>\r\n <mt-button\r\n icon=\"general.x-close\"\r\n variant=\"text\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [tooltip]=\"t('close')\"\r\n (onClick)=\"closeRequested.emit()\"\r\n />\r\n </header>\r\n\r\n <div class=\"min-h-0 flex-1 overflow-y-auto px-4 py-4\" [formGroup]=\"form\">\r\n @for (field of filters(); track $index) {\r\n @if (field.type === \"section\") {\r\n <h5 class=\"mt-2 mb-2 text-xs font-semibold uppercase text-muted-color\">\r\n {{ label(field) }}\r\n </h5>\r\n } @else if (field.type === \"separator\") {\r\n <hr class=\"my-3 border-surface-200\" />\r\n } @else if (isInput(field)) {\r\n <div class=\"mb-3\">\r\n @switch (true) {\r\n @case (field.type === \"date\") {\r\n <mt-date-field\r\n [label]=\"label(field)\"\r\n [formControlName]=\"field.key\"\r\n [showClear]=\"true\"\r\n />\r\n }\r\n @case (field.type === \"user\") {\r\n <mt-user-search-field\r\n [label]=\"label(field)\"\r\n [formControlName]=\"field.key\"\r\n [apiUrl]=\"userApiUrl\"\r\n [isMultiple]=\"isMulti(field)\"\r\n />\r\n }\r\n @case (isMulti(field)) {\r\n <mt-multi-select-field\r\n [label]=\"label(field)\"\r\n [formControlName]=\"field.key\"\r\n [options]=\"optionsFor(field)\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [filter]=\"true\"\r\n [placeholder]=\"t('selectProperty')\"\r\n />\r\n }\r\n @default {\r\n <mt-select-field\r\n [label]=\"label(field)\"\r\n [formControlName]=\"field.key\"\r\n [options]=\"optionsFor(field)\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [filter]=\"true\"\r\n [showClear]=\"!field.configuration?.isRequird\"\r\n [placeholder]=\"t('selectProperty')\"\r\n />\r\n }\r\n }\r\n </div>\r\n }\r\n }\r\n\r\n @if (filters().length === 0) {\r\n <div class=\"py-8 text-center text-sm text-muted-color\">\r\n {{ t(\"noFiltersConfigured\") }}\r\n </div>\r\n }\r\n </div>\r\n\r\n <footer\r\n class=\"flex items-center justify-end gap-2 border-t border-surface-200 px-4 py-3\"\r\n >\r\n <mt-button\r\n [label]=\"t('clear')\"\r\n variant=\"outlined\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n (onClick)=\"clear()\"\r\n />\r\n <mt-button\r\n [label]=\"t('apply')\"\r\n icon=\"general.check\"\r\n size=\"small\"\r\n (onClick)=\"apply()\"\r\n />\r\n </footer>\r\n</div>\r\n" }]
|
|
42114
|
+
}], ctorParameters: () => [], propDecorators: { filters: [{ type: i0.Input, args: [{ isSignal: true, alias: "filters", required: false }] }], initialValues: [{ type: i0.Input, args: [{ isSignal: true, alias: "initialValues", required: false }] }], filtersApplied: [{ type: i0.Output, args: ["filtersApplied"] }], closeRequested: [{ type: i0.Output, args: ["closeRequested"] }] } });
|
|
41463
42115
|
|
|
41464
42116
|
/**
|
|
41465
42117
|
* Repeater Runtime Expansion.
|
|
@@ -41761,6 +42413,7 @@ class DashboardViewer {
|
|
|
41761
42413
|
charts = signal([], ...(ngDevMode ? [{ debugName: "charts" }] : /* istanbul ignore next */ []));
|
|
41762
42414
|
dialogs = signal([], ...(ngDevMode ? [{ debugName: "dialogs" }] : /* istanbul ignore next */ []));
|
|
41763
42415
|
filters = signal([], ...(ngDevMode ? [{ debugName: "filters" }] : /* istanbul ignore next */ []));
|
|
42416
|
+
filtersPanelOpen = signal(true, ...(ngDevMode ? [{ debugName: "filtersPanelOpen" }] : /* istanbul ignore next */ []));
|
|
41764
42417
|
// ============================================
|
|
41765
42418
|
// Computed
|
|
41766
42419
|
// ============================================
|
|
@@ -41772,6 +42425,7 @@ class DashboardViewer {
|
|
|
41772
42425
|
this.dialogs().length > 0 ||
|
|
41773
42426
|
this.filters().length > 0);
|
|
41774
42427
|
}, ...(ngDevMode ? [{ debugName: "hasRenderableContent" }] : /* istanbul ignore next */ []));
|
|
42428
|
+
hasPageFilters = computed(() => this.filters().length > 0, ...(ngDevMode ? [{ debugName: "hasPageFilters" }] : /* istanbul ignore next */ []));
|
|
41775
42429
|
visibleItems = computed(() => {
|
|
41776
42430
|
return [...this.charts()]
|
|
41777
42431
|
.filter((item) => this.shouldShowItem(item))
|
|
@@ -41856,6 +42510,11 @@ class DashboardViewer {
|
|
|
41856
42510
|
this.pageConfig.set(null);
|
|
41857
42511
|
this.loading.set(false);
|
|
41858
42512
|
}, ...(ngDevMode ? [{ debugName: "preloadedInputsEffect" }] : /* istanbul ignore next */ []));
|
|
42513
|
+
pageFiltersVisibilityEffect = effect(() => {
|
|
42514
|
+
if (this.filters().length > 0) {
|
|
42515
|
+
this.filtersPanelOpen.set(true);
|
|
42516
|
+
}
|
|
42517
|
+
}, ...(ngDevMode ? [{ debugName: "pageFiltersVisibilityEffect" }] : /* istanbul ignore next */ []));
|
|
41859
42518
|
// Reactively load page when pageId input changes (important for dynamic preview pages)
|
|
41860
42519
|
pageIdEffect = effect(() => {
|
|
41861
42520
|
const id = this.pageId();
|
|
@@ -41915,6 +42574,12 @@ class DashboardViewer {
|
|
|
41915
42574
|
});
|
|
41916
42575
|
this.refreshAllItems();
|
|
41917
42576
|
}
|
|
42577
|
+
toggleFiltersPanel() {
|
|
42578
|
+
this.filtersPanelOpen.update((open) => !open);
|
|
42579
|
+
}
|
|
42580
|
+
closeFiltersPanel() {
|
|
42581
|
+
this.filtersPanelOpen.set(false);
|
|
42582
|
+
}
|
|
41918
42583
|
// ============================================
|
|
41919
42584
|
// Page Loading
|
|
41920
42585
|
// ============================================
|
|
@@ -42026,10 +42691,19 @@ class DashboardViewer {
|
|
|
42026
42691
|
parsed = [];
|
|
42027
42692
|
}
|
|
42028
42693
|
}
|
|
42694
|
+
// Drop meaningless/empty filter objects (legacy/default `[{}]` the BE can
|
|
42695
|
+
// return): a real page filter has a `key` (input) or a `type`
|
|
42696
|
+
// (section/separator); an empty `{}` is truthy so `.filter(Boolean)` would
|
|
42697
|
+
// keep it and render a broken keyless control in the sidebar.
|
|
42698
|
+
const isMeaningful = (f) => !!f &&
|
|
42699
|
+
typeof f === 'object' &&
|
|
42700
|
+
!Array.isArray(f) &&
|
|
42701
|
+
(!!f['key'] ||
|
|
42702
|
+
!!f['type']);
|
|
42029
42703
|
if (Array.isArray(parsed)) {
|
|
42030
|
-
return parsed.flat(Infinity).filter(
|
|
42704
|
+
return parsed.flat(Infinity).filter(isMeaningful);
|
|
42031
42705
|
}
|
|
42032
|
-
return parsed ? [parsed] : [];
|
|
42706
|
+
return isMeaningful(parsed) ? [parsed] : [];
|
|
42033
42707
|
}
|
|
42034
42708
|
applyDashboardData(data) {
|
|
42035
42709
|
const filters = data.filters ?? data.page?.dashboardConfig?.filters;
|
|
@@ -42045,7 +42719,13 @@ class DashboardViewer {
|
|
|
42045
42719
|
}
|
|
42046
42720
|
this.cdr.detectChanges();
|
|
42047
42721
|
}
|
|
42722
|
+
/**
|
|
42723
|
+
* Public host API for refreshing the current dashboard view after host-owned
|
|
42724
|
+
* mutations. Always clear chart HTTP cache first so every item sends a fresh
|
|
42725
|
+
* backend request; hosts should not need to know dashboard-builder internals.
|
|
42726
|
+
*/
|
|
42048
42727
|
reloadPage() {
|
|
42728
|
+
this.limitedHttp.clearCache();
|
|
42049
42729
|
this.refreshAllItems();
|
|
42050
42730
|
this.cdr.detectChanges();
|
|
42051
42731
|
}
|
|
@@ -42174,7 +42854,7 @@ class DashboardViewer {
|
|
|
42174
42854
|
});
|
|
42175
42855
|
}
|
|
42176
42856
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: DashboardViewer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
42177
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: DashboardViewer, isStandalone: true, selector: "mt-dashboard-viewer", inputs: { isPage: { classPropertyName: "isPage", publicName: "isPage", isSignal: true, isRequired: false, transformFunction: null }, pageTitle: { classPropertyName: "pageTitle", publicName: "pageTitle", isSignal: true, isRequired: false, transformFunction: null }, backButton: { classPropertyName: "backButton", publicName: "backButton", isSignal: true, isRequired: false, transformFunction: null }, pageId: { classPropertyName: "pageId", publicName: "pageId", isSignal: true, isRequired: false, transformFunction: null }, dashboardData: { classPropertyName: "dashboardData", publicName: "dashboardData", isSignal: true, isRequired: false, transformFunction: null }, chartsData: { classPropertyName: "chartsData", publicName: "chartsData", isSignal: true, isRequired: false, transformFunction: null }, dialogsData: { classPropertyName: "dialogsData", publicName: "dialogsData", isSignal: true, isRequired: false, transformFunction: null }, filtersData: { classPropertyName: "filtersData", publicName: "filtersData", isSignal: true, isRequired: false, transformFunction: null }, extraFilters: { classPropertyName: "extraFilters", publicName: "extraFilters", isSignal: true, isRequired: false, transformFunction: null }, showFilters: { classPropertyName: "showFilters", publicName: "showFilters", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pageLoaded: "pageLoaded", onBack: "onBack", chartClick: "chartClick" }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'dashboardBuilder'\">\r\n <!-- Page mode -->\r\n @if (isPage()) {\r\n <mt-page\r\n [title]=\"\r\n pageTitle() ||\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n t('dashboard')\r\n \"\r\n [backButton]=\"backButton()\"\r\n (backButtonClick)=\"onBack.emit()\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"viewerContent\" />\r\n </mt-page>\r\n } @else {\r\n <!-- Non-page mode -->\r\n <ng-container *ngTemplateOutlet=\"viewerContent\" />\r\n }\r\n\r\n <!-- Reusable viewer content template -->\r\n <ng-template #viewerContent>\r\n <div class=\"relative h-full min-h-[600px] mt-dashboard-viewer\">\r\n @if (!loading() && hasRenderableContent()) {\r\n <div class=\"dashboard-viewer-layout-wrapper\">\r\n <div\r\n class=\"dashboard-viewer-layout\"\r\n [style.min-height]=\"layoutHeight()\"\r\n >\r\n @for (\r\n item of visibleItems();\r\n track trackByDashboardId($index, item)\r\n ) {\r\n <div\r\n class=\"dashboard-viewer-item\"\r\n [class.dashboard-viewer-item--group]=\"isGroup(item)\"\r\n [class.dashboard-viewer-item--header]=\"isHeader(item)\"\r\n [class.dashboard-viewer-item--topbar]=\"isTopbar(item)\"\r\n [style.grid-column]=\"getGridColumn(item)\"\r\n [style.grid-row]=\"getGridRow(item)\"\r\n >\r\n <!-- Group Container -->\r\n @if (isGroup(item)) {\r\n @if (!item.loading) {\r\n <div\r\n class=\"group-container h-full flex flex-col rounded-lg border border-surface-200 overflow-hidden\"\r\n [style.background-color]=\"\r\n getStyleConfig(item)['background-color'] ||\r\n 'var(--surface-card)'\r\n \"\r\n >\r\n <!-- Group Header with Tabs -->\r\n <div\r\n class=\"group-header flex items-center justify-between px-4 py-2 bg-surface-50 border-b border-surface-200\"\r\n >\r\n <span class=\"font-medium text-sm\">{{\r\n getGroupTitle(item)\r\n }}</span>\r\n <div class=\"group-tabs flex items-center gap-1\">\r\n @for (\r\n child of getGroupChildren(item);\r\n track child.config?.serviceConfig?.dashboardId;\r\n let gIndex = $index\r\n ) {\r\n @if (getItemIcon(child); as icon) {\r\n <button\r\n type=\"button\"\r\n class=\"w-8 h-8 flex items-center justify-center rounded transition-colors\"\r\n [class.bg-primary-100]=\"\r\n item.selectedGroupIndex === gIndex\r\n \"\r\n [class.text-primary-600]=\"\r\n item.selectedGroupIndex === gIndex\r\n \"\r\n [class.text-muted-color]=\"\r\n item.selectedGroupIndex !== gIndex\r\n \"\r\n [class.hover:bg-surface-100]=\"\r\n item.selectedGroupIndex !== gIndex\r\n \"\r\n (click)=\"selectGroupChild(item, gIndex)\"\r\n >\r\n <i class=\"mti mti-{{ icon }}\"></i>\r\n </button>\r\n } @else {\r\n <button\r\n pButton\r\n type=\"button\"\r\n class=\"p-button-text p-button-sm\"\r\n [class.p-button-primary]=\"\r\n item.selectedGroupIndex === gIndex\r\n \"\r\n [class.p-button-secondary]=\"\r\n item.selectedGroupIndex !== gIndex\r\n \"\r\n [label]=\"getItemTitle(child)\"\r\n (click)=\"selectGroupChild(item, gIndex)\"\r\n ></button>\r\n }\r\n }\r\n </div>\r\n </div>\r\n\r\n <!-- Group Body - Selected Child Content -->\r\n <div class=\"group-body flex-1 min-h-0\">\r\n @if (\r\n item.selectedGroupIndex !== null &&\r\n item.selectedGroupIndex !== undefined\r\n ) {\r\n @for (\r\n child of getGroupChildren(item);\r\n track child.config?.serviceConfig?.dashboardId;\r\n let cIndex = $index\r\n ) {\r\n @if (\r\n cIndex === item.selectedGroupIndex &&\r\n !child.loading\r\n ) {\r\n <mt-dashboard-item\r\n class=\"dashboard-viewer-content-item\"\r\n [config]=\"child.config\"\r\n [chartTypeId]=\"child.chartTypeId\"\r\n [pageName]=\"\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n pageConfig()?.name?.['ar'] ||\r\n ''\r\n \"\r\n [extraFilters]=\"extraFilters()\"\r\n [ignoreQueryFilter]=\"\r\n pageConfig()?.dashboardConfig\r\n ?.ignoreQueryFilter ?? false\r\n \"\r\n [inGroup]=\"true\"\r\n >\r\n </mt-dashboard-item>\r\n }\r\n }\r\n }\r\n </div>\r\n </div>\r\n }\r\n }\r\n <!-- Header Item -->\r\n @else if (isHeader(item)) {\r\n @if (!item.loading) {\r\n <mt-dashboard-item\r\n class=\"dashboard-viewer-content-item\"\r\n [config]=\"item.config\"\r\n [chartTypeId]=\"item.chartTypeId\"\r\n [pageName]=\"\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n pageConfig()?.name?.['ar'] ||\r\n ''\r\n \"\r\n [extraFilters]=\"extraFilters()\"\r\n [ignoreQueryFilter]=\"\r\n pageConfig()?.dashboardConfig?.ignoreQueryFilter ??\r\n false\r\n \"\r\n [inGroup]=\"false\"\r\n >\r\n </mt-dashboard-item>\r\n }\r\n }\r\n <!-- Topbar Item -->\r\n @else if (isTopbar(item)) {\r\n @if (!item.loading) {\r\n <mt-dashboard-item\r\n class=\"dashboard-viewer-content-item\"\r\n [config]=\"item.config\"\r\n [chartTypeId]=\"item.chartTypeId\"\r\n [pageName]=\"\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n pageConfig()?.name?.['ar'] ||\r\n ''\r\n \"\r\n [extraFilters]=\"extraFilters()\"\r\n [ignoreQueryFilter]=\"\r\n pageConfig()?.dashboardConfig?.ignoreQueryFilter ??\r\n false\r\n \"\r\n [inGroup]=\"false\"\r\n >\r\n </mt-dashboard-item>\r\n }\r\n }\r\n <!-- Regular Chart Item -->\r\n @else {\r\n @if (!item.loading) {\r\n <mt-dashboard-item\r\n class=\"dashboard-viewer-content-item\"\r\n [config]=\"item.config\"\r\n [chartTypeId]=\"item.chartTypeId\"\r\n [pageName]=\"\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n pageConfig()?.name?.['ar'] ||\r\n ''\r\n \"\r\n [extraFilters]=\"extraFilters()\"\r\n [ignoreQueryFilter]=\"\r\n pageConfig()?.dashboardConfig?.ignoreQueryFilter ??\r\n false\r\n \"\r\n [inGroup]=\"false\"\r\n >\r\n </mt-dashboard-item>\r\n }\r\n }\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n\r\n <!-- Hidden Dialogs (for modal rendering) -->\r\n @if (dialogs().length > 0) {\r\n <div class=\"hidden\">\r\n @for (\r\n dialog of dialogs();\r\n track dialog.config?.serviceConfig?.dashboardId\r\n ) {\r\n <!-- Dialog placeholder - will be rendered in modal when triggered -->\r\n <div\r\n [attr.data-dialog-id]=\"\r\n dialog.config?.serviceConfig?.dashboardId\r\n \"\r\n ></div>\r\n }\r\n </div>\r\n }\r\n\r\n <!-- Runtime page-filter sidebar: renders the configured filters and,\r\n on Apply, pushes their values onto the URL so charts reload. -->\r\n @if (showFilters() && filters().length > 0) {\r\n <mt-page-filter-sidebar\r\n class=\"filters-sidebar fixed end-0 top-0 bottom-0 z-40 w-72 border-s border-surface-200 bg-surface-card shadow-lg\"\r\n [filters]=\"filters()\"\r\n [initialValues]=\"store.getQueryParams()\"\r\n (filtersApplied)=\"onPageFilterChange($event)\"\r\n />\r\n }\r\n } @else if (loading()) {\r\n <!-- Loading State -->\r\n <div class=\"flex items-center justify-center h-64\">\r\n <div class=\"text-center\">\r\n <i\r\n class=\"mti mti-loader-2 text-4xl text-primary animate-spin mb-2\"\r\n ></i>\r\n <p class=\"text-muted-color\">{{ t(\"loading\") }}</p>\r\n </div>\r\n </div>\r\n } @else {\r\n <div\r\n class=\"flex flex-col items-center justify-center h-64 text-muted-color\"\r\n >\r\n <i class=\"mti mti-layout text-6xl mb-4\"></i>\r\n <p class=\"text-lg\">{{ t(\"noPageSelected\") }}</p>\r\n <p class=\"text-sm\">{{ t(\"selectPageToStart\") }}</p>\r\n </div>\r\n }\r\n </div>\r\n </ng-template>\r\n</ng-container>\r\n", styles: [".mt-dashboard-viewer{width:100%;height:100%}.dashboard-viewer-layout-wrapper{width:100%}.dashboard-viewer-layout{display:grid;grid-template-columns:repeat(36,minmax(0,1fr));grid-auto-rows:60px;gap:10px;width:100%;align-items:stretch}.dashboard-viewer-item{display:flex;min-width:0;min-height:0}.dashboard-viewer-item>*{width:100%;height:100%}.dashboard-viewer-content-item{display:block;flex:1 1 auto;min-width:0;min-height:0;width:100%;height:100%}.dashboard-viewer-item--header{z-index:1;overflow:hidden;border:1px solid var(--p-surface-200, #e5e7eb);border-radius:.5rem;background:var(--p-surface-0, #fff);box-shadow:0 1px 2px #0f172a14}.dashboard-viewer-item--topbar{z-index:2;overflow:visible;border:0;border-radius:0;background:transparent;box-shadow:none}.group-container{background-color:var(--surface-card)}.group-header{flex-shrink:0}.group-tabs{flex-wrap:wrap}.group-body{background-color:var(--surface-0)}.header-item{background-color:transparent}.topbar-item{background-color:var(--surface-50)}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.filters-sidebar{transform:translate(100%);transition:transform .3s ease-in-out}.filters-sidebar.open{transform:translate(0)}[dir=rtl] .filters-sidebar{transform:translate(-100%)}[dir=rtl] .filters-sidebar.open{transform:translate(0)}.table-responsive{max-height:75vh;overflow-y:auto;overflow-x:auto}.modal-content{border:0!important}.custom-donut-chart{display:flex;justify-content:center;height:auto!important}.custom-donut-chart canvas{margin-top:-1.5rem!important}@media(max-width:768px){.dashboard-viewer-layout{display:flex;flex-direction:column;min-height:0!important}.dashboard-viewer-item{min-height:220px}.dashboard-viewer-item--header,.dashboard-viewer-item--topbar{min-height:72px}.dashboard-viewer-item--group{min-height:280px}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i2$4.ButtonDirective, selector: "[pButton]", inputs: ["ptButtonDirective", "pButtonPT", "pButtonUnstyled", "hostName", "text", "plain", "raised", "size", "outlined", "rounded", "iconPos", "loadingIcon", "fluid", "label", "icon", "loading", "buttonProps", "severity"] }, { kind: "component", type: DashboardItem, selector: "mt-dashboard-item", inputs: ["config", "chartTypeId", "readonly", "pageName", "inGroup", "isDialog", "queryParams", "extraFilters", "ignoreQueryFilter", "builderMode"], outputs: ["actionTriggered", "configureRequested", "titleEdited"] }, { kind: "component", type: Page, selector: "mt-page", inputs: ["backButton", "backButtonIcon", "avatarIcon", "avatarStyle", "avatarShape", "title", "tabs", "activeTab", "contentClass", "contentId"], outputs: ["backButtonClick", "tabChange"] }, { kind: "component", type: PageFilterSidebar, selector: "mt-page-filter-sidebar", inputs: ["filters", "initialValues"], outputs: ["filtersApplied"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
42857
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: DashboardViewer, isStandalone: true, selector: "mt-dashboard-viewer", inputs: { isPage: { classPropertyName: "isPage", publicName: "isPage", isSignal: true, isRequired: false, transformFunction: null }, pageTitle: { classPropertyName: "pageTitle", publicName: "pageTitle", isSignal: true, isRequired: false, transformFunction: null }, backButton: { classPropertyName: "backButton", publicName: "backButton", isSignal: true, isRequired: false, transformFunction: null }, pageId: { classPropertyName: "pageId", publicName: "pageId", isSignal: true, isRequired: false, transformFunction: null }, dashboardData: { classPropertyName: "dashboardData", publicName: "dashboardData", isSignal: true, isRequired: false, transformFunction: null }, chartsData: { classPropertyName: "chartsData", publicName: "chartsData", isSignal: true, isRequired: false, transformFunction: null }, dialogsData: { classPropertyName: "dialogsData", publicName: "dialogsData", isSignal: true, isRequired: false, transformFunction: null }, filtersData: { classPropertyName: "filtersData", publicName: "filtersData", isSignal: true, isRequired: false, transformFunction: null }, extraFilters: { classPropertyName: "extraFilters", publicName: "extraFilters", isSignal: true, isRequired: false, transformFunction: null }, showFilters: { classPropertyName: "showFilters", publicName: "showFilters", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pageLoaded: "pageLoaded", onBack: "onBack", chartClick: "chartClick" }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'dashboardBuilder'\">\r\n <!-- Page mode -->\r\n @if (isPage()) {\r\n <mt-page\r\n [title]=\"\r\n pageTitle() ||\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n t('dashboard')\r\n \"\r\n [backButton]=\"backButton()\"\r\n (backButtonClick)=\"onBack.emit()\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"viewerContent\" />\r\n </mt-page>\r\n } @else {\r\n <!-- Non-page mode -->\r\n <ng-container *ngTemplateOutlet=\"viewerContent\" />\r\n }\r\n\r\n <!-- Reusable viewer content template -->\r\n <ng-template #viewerContent>\r\n <div class=\"relative h-full min-h-[600px] mt-dashboard-viewer\">\r\n @if (!loading() && hasRenderableContent()) {\r\n <div class=\"dashboard-viewer-layout-wrapper\">\r\n <div\r\n class=\"dashboard-viewer-layout\"\r\n [style.min-height]=\"layoutHeight()\"\r\n >\r\n @for (\r\n item of visibleItems();\r\n track trackByDashboardId($index, item)\r\n ) {\r\n <div\r\n class=\"dashboard-viewer-item\"\r\n [class.dashboard-viewer-item--group]=\"isGroup(item)\"\r\n [class.dashboard-viewer-item--header]=\"isHeader(item)\"\r\n [class.dashboard-viewer-item--topbar]=\"isTopbar(item)\"\r\n [style.grid-column]=\"getGridColumn(item)\"\r\n [style.grid-row]=\"getGridRow(item)\"\r\n >\r\n <!-- Group Container -->\r\n @if (isGroup(item)) {\r\n @if (!item.loading) {\r\n <div\r\n class=\"group-container h-full flex flex-col rounded-lg border border-surface-200 overflow-hidden\"\r\n [style.background-color]=\"\r\n getStyleConfig(item)['background-color'] ||\r\n 'var(--surface-card)'\r\n \"\r\n >\r\n <!-- Group Header with Tabs -->\r\n <div\r\n class=\"group-header flex items-center justify-between px-4 py-2 bg-surface-50 border-b border-surface-200\"\r\n >\r\n <span class=\"font-medium text-sm\">{{\r\n getGroupTitle(item)\r\n }}</span>\r\n <div class=\"group-tabs flex items-center gap-1\">\r\n @for (\r\n child of getGroupChildren(item);\r\n track child.config?.serviceConfig?.dashboardId;\r\n let gIndex = $index\r\n ) {\r\n @if (getItemIcon(child); as icon) {\r\n <button\r\n type=\"button\"\r\n class=\"w-8 h-8 flex items-center justify-center rounded transition-colors\"\r\n [class.bg-primary-100]=\"\r\n item.selectedGroupIndex === gIndex\r\n \"\r\n [class.text-primary-600]=\"\r\n item.selectedGroupIndex === gIndex\r\n \"\r\n [class.text-muted-color]=\"\r\n item.selectedGroupIndex !== gIndex\r\n \"\r\n [class.hover:bg-surface-100]=\"\r\n item.selectedGroupIndex !== gIndex\r\n \"\r\n (click)=\"selectGroupChild(item, gIndex)\"\r\n >\r\n <i class=\"mti mti-{{ icon }}\"></i>\r\n </button>\r\n } @else {\r\n <button\r\n pButton\r\n type=\"button\"\r\n class=\"p-button-text p-button-sm\"\r\n [class.p-button-primary]=\"\r\n item.selectedGroupIndex === gIndex\r\n \"\r\n [class.p-button-secondary]=\"\r\n item.selectedGroupIndex !== gIndex\r\n \"\r\n [label]=\"getItemTitle(child)\"\r\n (click)=\"selectGroupChild(item, gIndex)\"\r\n ></button>\r\n }\r\n }\r\n </div>\r\n </div>\r\n\r\n <!-- Group Body - Selected Child Content -->\r\n <div class=\"group-body flex-1 min-h-0\">\r\n @if (\r\n item.selectedGroupIndex !== null &&\r\n item.selectedGroupIndex !== undefined\r\n ) {\r\n @for (\r\n child of getGroupChildren(item);\r\n track child.config?.serviceConfig?.dashboardId;\r\n let cIndex = $index\r\n ) {\r\n @if (\r\n cIndex === item.selectedGroupIndex &&\r\n !child.loading\r\n ) {\r\n <mt-dashboard-item\r\n class=\"dashboard-viewer-content-item\"\r\n [config]=\"child.config\"\r\n [chartTypeId]=\"child.chartTypeId\"\r\n [pageName]=\"\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n pageConfig()?.name?.['ar'] ||\r\n ''\r\n \"\r\n [extraFilters]=\"extraFilters()\"\r\n [ignoreQueryFilter]=\"\r\n pageConfig()?.dashboardConfig\r\n ?.ignoreQueryFilter ?? false\r\n \"\r\n [inGroup]=\"true\"\r\n >\r\n </mt-dashboard-item>\r\n }\r\n }\r\n }\r\n </div>\r\n </div>\r\n }\r\n }\r\n <!-- Header Item -->\r\n @else if (isHeader(item)) {\r\n @if (!item.loading) {\r\n <mt-dashboard-item\r\n class=\"dashboard-viewer-content-item\"\r\n [config]=\"item.config\"\r\n [chartTypeId]=\"item.chartTypeId\"\r\n [pageName]=\"\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n pageConfig()?.name?.['ar'] ||\r\n ''\r\n \"\r\n [extraFilters]=\"extraFilters()\"\r\n [ignoreQueryFilter]=\"\r\n pageConfig()?.dashboardConfig?.ignoreQueryFilter ??\r\n false\r\n \"\r\n [inGroup]=\"false\"\r\n >\r\n </mt-dashboard-item>\r\n }\r\n }\r\n <!-- Topbar Item -->\r\n @else if (isTopbar(item)) {\r\n @if (!item.loading) {\r\n <mt-dashboard-item\r\n class=\"dashboard-viewer-content-item\"\r\n [config]=\"item.config\"\r\n [chartTypeId]=\"item.chartTypeId\"\r\n [pageName]=\"\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n pageConfig()?.name?.['ar'] ||\r\n ''\r\n \"\r\n [extraFilters]=\"extraFilters()\"\r\n [ignoreQueryFilter]=\"\r\n pageConfig()?.dashboardConfig?.ignoreQueryFilter ??\r\n false\r\n \"\r\n [inGroup]=\"false\"\r\n >\r\n </mt-dashboard-item>\r\n }\r\n }\r\n <!-- Regular Chart Item -->\r\n @else {\r\n @if (!item.loading) {\r\n <mt-dashboard-item\r\n class=\"dashboard-viewer-content-item\"\r\n [config]=\"item.config\"\r\n [chartTypeId]=\"item.chartTypeId\"\r\n [pageName]=\"\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n pageConfig()?.name?.['ar'] ||\r\n ''\r\n \"\r\n [extraFilters]=\"extraFilters()\"\r\n [ignoreQueryFilter]=\"\r\n pageConfig()?.dashboardConfig?.ignoreQueryFilter ??\r\n false\r\n \"\r\n [inGroup]=\"false\"\r\n >\r\n </mt-dashboard-item>\r\n }\r\n }\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n\r\n <!-- Hidden Dialogs (for modal rendering) -->\r\n @if (dialogs().length > 0) {\r\n <div class=\"hidden\">\r\n @for (\r\n dialog of dialogs();\r\n track dialog.config?.serviceConfig?.dashboardId\r\n ) {\r\n <!-- Dialog placeholder - will be rendered in modal when triggered -->\r\n <div\r\n [attr.data-dialog-id]=\"\r\n dialog.config?.serviceConfig?.dashboardId\r\n \"\r\n ></div>\r\n }\r\n </div>\r\n }\r\n\r\n <!-- Runtime page-filter sidebar: renders the configured filters and,\r\n on Apply, pushes their values onto the URL so charts reload. -->\r\n @if (showFilters() && hasPageFilters()) {\r\n @if (!filtersPanelOpen()) {\r\n <mt-button\r\n class=\"filters-toggle fixed end-4 top-4 z-50\"\r\n [label]=\"t('filters')\"\r\n icon=\"general.filter-funnel-01\"\r\n size=\"small\"\r\n [tooltip]=\"t('filters')\"\r\n (onClick)=\"toggleFiltersPanel()\"\r\n />\r\n }\r\n\r\n @if (filtersPanelOpen()) {\r\n <button\r\n type=\"button\"\r\n class=\"filters-sidebar-backdrop fixed inset-0 z-30 border-0 bg-black/20 md:hidden\"\r\n [attr.aria-label]=\"t('close')\"\r\n (click)=\"closeFiltersPanel()\"\r\n ></button>\r\n }\r\n\r\n <mt-page-filter-sidebar\r\n class=\"filters-sidebar fixed end-0 top-0 bottom-0 z-40 w-72 border-s border-surface-200 bg-surface-card shadow-lg\"\r\n [class.open]=\"filtersPanelOpen()\"\r\n [filters]=\"filters()\"\r\n [initialValues]=\"store.getQueryParams()\"\r\n (filtersApplied)=\"onPageFilterChange($event)\"\r\n (closeRequested)=\"closeFiltersPanel()\"\r\n />\r\n }\r\n } @else if (loading()) {\r\n <!-- Loading State -->\r\n <div class=\"flex items-center justify-center h-64\">\r\n <div class=\"text-center\">\r\n <i\r\n class=\"mti mti-loader-2 text-4xl text-primary animate-spin mb-2\"\r\n ></i>\r\n <p class=\"text-muted-color\">{{ t(\"loading\") }}</p>\r\n </div>\r\n </div>\r\n } @else {\r\n <div\r\n class=\"flex flex-col items-center justify-center h-64 text-muted-color\"\r\n >\r\n <i class=\"mti mti-layout text-6xl mb-4\"></i>\r\n <p class=\"text-lg\">{{ t(\"noPageSelected\") }}</p>\r\n <p class=\"text-sm\">{{ t(\"selectPageToStart\") }}</p>\r\n </div>\r\n }\r\n </div>\r\n </ng-template>\r\n</ng-container>\r\n", styles: [".mt-dashboard-viewer{width:100%;height:100%}.dashboard-viewer-layout-wrapper{width:100%}.dashboard-viewer-layout{display:grid;grid-template-columns:repeat(36,minmax(0,1fr));grid-auto-rows:60px;gap:10px;width:100%;align-items:stretch}.dashboard-viewer-item{display:flex;min-width:0;min-height:0}.dashboard-viewer-item>*{width:100%;height:100%}.dashboard-viewer-content-item{display:block;flex:1 1 auto;min-width:0;min-height:0;width:100%;height:100%}.dashboard-viewer-item--header{z-index:1;overflow:hidden;border:1px solid var(--p-surface-200, #e5e7eb);border-radius:.5rem;background:var(--p-surface-0, #fff);box-shadow:0 1px 2px #0f172a14}.dashboard-viewer-item--topbar{z-index:2;overflow:visible;border:0;border-radius:0;background:transparent;box-shadow:none}.group-container{background-color:var(--surface-card)}.group-header{flex-shrink:0}.group-tabs{flex-wrap:wrap}.group-body{background-color:var(--surface-0)}.header-item{background-color:transparent}.topbar-item{background-color:var(--surface-50)}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.filters-sidebar{max-width:calc(100vw - 1rem);pointer-events:none;transform:translate(100%);transition:transform .3s ease-in-out}.filters-sidebar.open{pointer-events:auto;transform:translate(0)}.filters-toggle{max-width:calc(100vw - 2rem)}[dir=rtl] .filters-sidebar{transform:translate(-100%)}[dir=rtl] .filters-sidebar.open{transform:translate(0)}.table-responsive{max-height:75vh;overflow-y:auto;overflow-x:auto}.modal-content{border:0!important}.custom-donut-chart{display:flex;justify-content:center;height:auto!important}.custom-donut-chart canvas{margin-top:-1.5rem!important}@media(max-width:768px){.dashboard-viewer-layout{display:flex;flex-direction:column;min-height:0!important}.dashboard-viewer-item{min-height:220px}.dashboard-viewer-item--header,.dashboard-viewer-item--topbar{min-height:72px}.dashboard-viewer-item--group{min-height:280px}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i2$4.ButtonDirective, selector: "[pButton]", inputs: ["ptButtonDirective", "pButtonPT", "pButtonUnstyled", "hostName", "text", "plain", "raised", "size", "outlined", "rounded", "iconPos", "loadingIcon", "fluid", "label", "icon", "loading", "buttonProps", "severity"] }, { 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: DashboardItem, selector: "mt-dashboard-item", inputs: ["config", "chartTypeId", "readonly", "pageName", "inGroup", "isDialog", "queryParams", "extraFilters", "ignoreQueryFilter", "builderMode"], outputs: ["actionTriggered", "configureRequested", "titleEdited"] }, { kind: "component", type: Page, selector: "mt-page", inputs: ["backButton", "backButtonIcon", "avatarIcon", "avatarStyle", "avatarShape", "title", "tabs", "activeTab", "contentClass", "contentId"], outputs: ["backButtonClick", "tabChange"] }, { kind: "component", type: PageFilterSidebar, selector: "mt-page-filter-sidebar", inputs: ["filters", "initialValues"], outputs: ["filtersApplied", "closeRequested"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
42178
42858
|
}
|
|
42179
42859
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: DashboardViewer, decorators: [{
|
|
42180
42860
|
type: Component,
|
|
@@ -42182,10 +42862,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
42182
42862
|
CommonModule,
|
|
42183
42863
|
TranslocoDirective,
|
|
42184
42864
|
ButtonModule,
|
|
42865
|
+
Button,
|
|
42185
42866
|
DashboardItem,
|
|
42186
42867
|
Page,
|
|
42187
42868
|
PageFilterSidebar,
|
|
42188
|
-
], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *transloco=\"let t; prefix: 'dashboardBuilder'\">\r\n <!-- Page mode -->\r\n @if (isPage()) {\r\n <mt-page\r\n [title]=\"\r\n pageTitle() ||\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n t('dashboard')\r\n \"\r\n [backButton]=\"backButton()\"\r\n (backButtonClick)=\"onBack.emit()\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"viewerContent\" />\r\n </mt-page>\r\n } @else {\r\n <!-- Non-page mode -->\r\n <ng-container *ngTemplateOutlet=\"viewerContent\" />\r\n }\r\n\r\n <!-- Reusable viewer content template -->\r\n <ng-template #viewerContent>\r\n <div class=\"relative h-full min-h-[600px] mt-dashboard-viewer\">\r\n @if (!loading() && hasRenderableContent()) {\r\n <div class=\"dashboard-viewer-layout-wrapper\">\r\n <div\r\n class=\"dashboard-viewer-layout\"\r\n [style.min-height]=\"layoutHeight()\"\r\n >\r\n @for (\r\n item of visibleItems();\r\n track trackByDashboardId($index, item)\r\n ) {\r\n <div\r\n class=\"dashboard-viewer-item\"\r\n [class.dashboard-viewer-item--group]=\"isGroup(item)\"\r\n [class.dashboard-viewer-item--header]=\"isHeader(item)\"\r\n [class.dashboard-viewer-item--topbar]=\"isTopbar(item)\"\r\n [style.grid-column]=\"getGridColumn(item)\"\r\n [style.grid-row]=\"getGridRow(item)\"\r\n >\r\n <!-- Group Container -->\r\n @if (isGroup(item)) {\r\n @if (!item.loading) {\r\n <div\r\n class=\"group-container h-full flex flex-col rounded-lg border border-surface-200 overflow-hidden\"\r\n [style.background-color]=\"\r\n getStyleConfig(item)['background-color'] ||\r\n 'var(--surface-card)'\r\n \"\r\n >\r\n <!-- Group Header with Tabs -->\r\n <div\r\n class=\"group-header flex items-center justify-between px-4 py-2 bg-surface-50 border-b border-surface-200\"\r\n >\r\n <span class=\"font-medium text-sm\">{{\r\n getGroupTitle(item)\r\n }}</span>\r\n <div class=\"group-tabs flex items-center gap-1\">\r\n @for (\r\n child of getGroupChildren(item);\r\n track child.config?.serviceConfig?.dashboardId;\r\n let gIndex = $index\r\n ) {\r\n @if (getItemIcon(child); as icon) {\r\n <button\r\n type=\"button\"\r\n class=\"w-8 h-8 flex items-center justify-center rounded transition-colors\"\r\n [class.bg-primary-100]=\"\r\n item.selectedGroupIndex === gIndex\r\n \"\r\n [class.text-primary-600]=\"\r\n item.selectedGroupIndex === gIndex\r\n \"\r\n [class.text-muted-color]=\"\r\n item.selectedGroupIndex !== gIndex\r\n \"\r\n [class.hover:bg-surface-100]=\"\r\n item.selectedGroupIndex !== gIndex\r\n \"\r\n (click)=\"selectGroupChild(item, gIndex)\"\r\n >\r\n <i class=\"mti mti-{{ icon }}\"></i>\r\n </button>\r\n } @else {\r\n <button\r\n pButton\r\n type=\"button\"\r\n class=\"p-button-text p-button-sm\"\r\n [class.p-button-primary]=\"\r\n item.selectedGroupIndex === gIndex\r\n \"\r\n [class.p-button-secondary]=\"\r\n item.selectedGroupIndex !== gIndex\r\n \"\r\n [label]=\"getItemTitle(child)\"\r\n (click)=\"selectGroupChild(item, gIndex)\"\r\n ></button>\r\n }\r\n }\r\n </div>\r\n </div>\r\n\r\n <!-- Group Body - Selected Child Content -->\r\n <div class=\"group-body flex-1 min-h-0\">\r\n @if (\r\n item.selectedGroupIndex !== null &&\r\n item.selectedGroupIndex !== undefined\r\n ) {\r\n @for (\r\n child of getGroupChildren(item);\r\n track child.config?.serviceConfig?.dashboardId;\r\n let cIndex = $index\r\n ) {\r\n @if (\r\n cIndex === item.selectedGroupIndex &&\r\n !child.loading\r\n ) {\r\n <mt-dashboard-item\r\n class=\"dashboard-viewer-content-item\"\r\n [config]=\"child.config\"\r\n [chartTypeId]=\"child.chartTypeId\"\r\n [pageName]=\"\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n pageConfig()?.name?.['ar'] ||\r\n ''\r\n \"\r\n [extraFilters]=\"extraFilters()\"\r\n [ignoreQueryFilter]=\"\r\n pageConfig()?.dashboardConfig\r\n ?.ignoreQueryFilter ?? false\r\n \"\r\n [inGroup]=\"true\"\r\n >\r\n </mt-dashboard-item>\r\n }\r\n }\r\n }\r\n </div>\r\n </div>\r\n }\r\n }\r\n <!-- Header Item -->\r\n @else if (isHeader(item)) {\r\n @if (!item.loading) {\r\n <mt-dashboard-item\r\n class=\"dashboard-viewer-content-item\"\r\n [config]=\"item.config\"\r\n [chartTypeId]=\"item.chartTypeId\"\r\n [pageName]=\"\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n pageConfig()?.name?.['ar'] ||\r\n ''\r\n \"\r\n [extraFilters]=\"extraFilters()\"\r\n [ignoreQueryFilter]=\"\r\n pageConfig()?.dashboardConfig?.ignoreQueryFilter ??\r\n false\r\n \"\r\n [inGroup]=\"false\"\r\n >\r\n </mt-dashboard-item>\r\n }\r\n }\r\n <!-- Topbar Item -->\r\n @else if (isTopbar(item)) {\r\n @if (!item.loading) {\r\n <mt-dashboard-item\r\n class=\"dashboard-viewer-content-item\"\r\n [config]=\"item.config\"\r\n [chartTypeId]=\"item.chartTypeId\"\r\n [pageName]=\"\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n pageConfig()?.name?.['ar'] ||\r\n ''\r\n \"\r\n [extraFilters]=\"extraFilters()\"\r\n [ignoreQueryFilter]=\"\r\n pageConfig()?.dashboardConfig?.ignoreQueryFilter ??\r\n false\r\n \"\r\n [inGroup]=\"false\"\r\n >\r\n </mt-dashboard-item>\r\n }\r\n }\r\n <!-- Regular Chart Item -->\r\n @else {\r\n @if (!item.loading) {\r\n <mt-dashboard-item\r\n class=\"dashboard-viewer-content-item\"\r\n [config]=\"item.config\"\r\n [chartTypeId]=\"item.chartTypeId\"\r\n [pageName]=\"\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n pageConfig()?.name?.['ar'] ||\r\n ''\r\n \"\r\n [extraFilters]=\"extraFilters()\"\r\n [ignoreQueryFilter]=\"\r\n pageConfig()?.dashboardConfig?.ignoreQueryFilter ??\r\n false\r\n \"\r\n [inGroup]=\"false\"\r\n >\r\n </mt-dashboard-item>\r\n }\r\n }\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n\r\n <!-- Hidden Dialogs (for modal rendering) -->\r\n @if (dialogs().length > 0) {\r\n <div class=\"hidden\">\r\n @for (\r\n dialog of dialogs();\r\n track dialog.config?.serviceConfig?.dashboardId\r\n ) {\r\n <!-- Dialog placeholder - will be rendered in modal when triggered -->\r\n <div\r\n [attr.data-dialog-id]=\"\r\n dialog.config?.serviceConfig?.dashboardId\r\n \"\r\n ></div>\r\n }\r\n </div>\r\n }\r\n\r\n <!-- Runtime page-filter sidebar: renders the configured filters and,\r\n on Apply, pushes their values onto the URL so charts reload. -->\r\n @if (showFilters() && filters().length > 0) {\r\n <mt-page-filter-sidebar\r\n class=\"filters-sidebar fixed end-0 top-0 bottom-0 z-40 w-72 border-s border-surface-200 bg-surface-card shadow-lg\"\r\n [filters]=\"filters()\"\r\n [initialValues]=\"store.getQueryParams()\"\r\n (filtersApplied)=\"onPageFilterChange($event)\"\r\n />\r\n }\r\n } @else if (loading()) {\r\n <!-- Loading State -->\r\n <div class=\"flex items-center justify-center h-64\">\r\n <div class=\"text-center\">\r\n <i\r\n class=\"mti mti-loader-2 text-4xl text-primary animate-spin mb-2\"\r\n ></i>\r\n <p class=\"text-muted-color\">{{ t(\"loading\") }}</p>\r\n </div>\r\n </div>\r\n } @else {\r\n <div\r\n class=\"flex flex-col items-center justify-center h-64 text-muted-color\"\r\n >\r\n <i class=\"mti mti-layout text-6xl mb-4\"></i>\r\n <p class=\"text-lg\">{{ t(\"noPageSelected\") }}</p>\r\n <p class=\"text-sm\">{{ t(\"selectPageToStart\") }}</p>\r\n </div>\r\n }\r\n </div>\r\n </ng-template>\r\n</ng-container>\r\n", styles: [".mt-dashboard-viewer{width:100%;height:100%}.dashboard-viewer-layout-wrapper{width:100%}.dashboard-viewer-layout{display:grid;grid-template-columns:repeat(36,minmax(0,1fr));grid-auto-rows:60px;gap:10px;width:100%;align-items:stretch}.dashboard-viewer-item{display:flex;min-width:0;min-height:0}.dashboard-viewer-item>*{width:100%;height:100%}.dashboard-viewer-content-item{display:block;flex:1 1 auto;min-width:0;min-height:0;width:100%;height:100%}.dashboard-viewer-item--header{z-index:1;overflow:hidden;border:1px solid var(--p-surface-200, #e5e7eb);border-radius:.5rem;background:var(--p-surface-0, #fff);box-shadow:0 1px 2px #0f172a14}.dashboard-viewer-item--topbar{z-index:2;overflow:visible;border:0;border-radius:0;background:transparent;box-shadow:none}.group-container{background-color:var(--surface-card)}.group-header{flex-shrink:0}.group-tabs{flex-wrap:wrap}.group-body{background-color:var(--surface-0)}.header-item{background-color:transparent}.topbar-item{background-color:var(--surface-50)}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.filters-sidebar{transform:translate(100%);transition:transform .3s ease-in-out}.filters-sidebar.open{transform:translate(0)}[dir=rtl] .filters-sidebar{transform:translate(-100%)}[dir=rtl] .filters-sidebar.open{transform:translate(0)}.table-responsive{max-height:75vh;overflow-y:auto;overflow-x:auto}.modal-content{border:0!important}.custom-donut-chart{display:flex;justify-content:center;height:auto!important}.custom-donut-chart canvas{margin-top:-1.5rem!important}@media(max-width:768px){.dashboard-viewer-layout{display:flex;flex-direction:column;min-height:0!important}.dashboard-viewer-item{min-height:220px}.dashboard-viewer-item--header,.dashboard-viewer-item--topbar{min-height:72px}.dashboard-viewer-item--group{min-height:280px}}\n"] }]
|
|
42869
|
+
], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *transloco=\"let t; prefix: 'dashboardBuilder'\">\r\n <!-- Page mode -->\r\n @if (isPage()) {\r\n <mt-page\r\n [title]=\"\r\n pageTitle() ||\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n t('dashboard')\r\n \"\r\n [backButton]=\"backButton()\"\r\n (backButtonClick)=\"onBack.emit()\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"viewerContent\" />\r\n </mt-page>\r\n } @else {\r\n <!-- Non-page mode -->\r\n <ng-container *ngTemplateOutlet=\"viewerContent\" />\r\n }\r\n\r\n <!-- Reusable viewer content template -->\r\n <ng-template #viewerContent>\r\n <div class=\"relative h-full min-h-[600px] mt-dashboard-viewer\">\r\n @if (!loading() && hasRenderableContent()) {\r\n <div class=\"dashboard-viewer-layout-wrapper\">\r\n <div\r\n class=\"dashboard-viewer-layout\"\r\n [style.min-height]=\"layoutHeight()\"\r\n >\r\n @for (\r\n item of visibleItems();\r\n track trackByDashboardId($index, item)\r\n ) {\r\n <div\r\n class=\"dashboard-viewer-item\"\r\n [class.dashboard-viewer-item--group]=\"isGroup(item)\"\r\n [class.dashboard-viewer-item--header]=\"isHeader(item)\"\r\n [class.dashboard-viewer-item--topbar]=\"isTopbar(item)\"\r\n [style.grid-column]=\"getGridColumn(item)\"\r\n [style.grid-row]=\"getGridRow(item)\"\r\n >\r\n <!-- Group Container -->\r\n @if (isGroup(item)) {\r\n @if (!item.loading) {\r\n <div\r\n class=\"group-container h-full flex flex-col rounded-lg border border-surface-200 overflow-hidden\"\r\n [style.background-color]=\"\r\n getStyleConfig(item)['background-color'] ||\r\n 'var(--surface-card)'\r\n \"\r\n >\r\n <!-- Group Header with Tabs -->\r\n <div\r\n class=\"group-header flex items-center justify-between px-4 py-2 bg-surface-50 border-b border-surface-200\"\r\n >\r\n <span class=\"font-medium text-sm\">{{\r\n getGroupTitle(item)\r\n }}</span>\r\n <div class=\"group-tabs flex items-center gap-1\">\r\n @for (\r\n child of getGroupChildren(item);\r\n track child.config?.serviceConfig?.dashboardId;\r\n let gIndex = $index\r\n ) {\r\n @if (getItemIcon(child); as icon) {\r\n <button\r\n type=\"button\"\r\n class=\"w-8 h-8 flex items-center justify-center rounded transition-colors\"\r\n [class.bg-primary-100]=\"\r\n item.selectedGroupIndex === gIndex\r\n \"\r\n [class.text-primary-600]=\"\r\n item.selectedGroupIndex === gIndex\r\n \"\r\n [class.text-muted-color]=\"\r\n item.selectedGroupIndex !== gIndex\r\n \"\r\n [class.hover:bg-surface-100]=\"\r\n item.selectedGroupIndex !== gIndex\r\n \"\r\n (click)=\"selectGroupChild(item, gIndex)\"\r\n >\r\n <i class=\"mti mti-{{ icon }}\"></i>\r\n </button>\r\n } @else {\r\n <button\r\n pButton\r\n type=\"button\"\r\n class=\"p-button-text p-button-sm\"\r\n [class.p-button-primary]=\"\r\n item.selectedGroupIndex === gIndex\r\n \"\r\n [class.p-button-secondary]=\"\r\n item.selectedGroupIndex !== gIndex\r\n \"\r\n [label]=\"getItemTitle(child)\"\r\n (click)=\"selectGroupChild(item, gIndex)\"\r\n ></button>\r\n }\r\n }\r\n </div>\r\n </div>\r\n\r\n <!-- Group Body - Selected Child Content -->\r\n <div class=\"group-body flex-1 min-h-0\">\r\n @if (\r\n item.selectedGroupIndex !== null &&\r\n item.selectedGroupIndex !== undefined\r\n ) {\r\n @for (\r\n child of getGroupChildren(item);\r\n track child.config?.serviceConfig?.dashboardId;\r\n let cIndex = $index\r\n ) {\r\n @if (\r\n cIndex === item.selectedGroupIndex &&\r\n !child.loading\r\n ) {\r\n <mt-dashboard-item\r\n class=\"dashboard-viewer-content-item\"\r\n [config]=\"child.config\"\r\n [chartTypeId]=\"child.chartTypeId\"\r\n [pageName]=\"\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n pageConfig()?.name?.['ar'] ||\r\n ''\r\n \"\r\n [extraFilters]=\"extraFilters()\"\r\n [ignoreQueryFilter]=\"\r\n pageConfig()?.dashboardConfig\r\n ?.ignoreQueryFilter ?? false\r\n \"\r\n [inGroup]=\"true\"\r\n >\r\n </mt-dashboard-item>\r\n }\r\n }\r\n }\r\n </div>\r\n </div>\r\n }\r\n }\r\n <!-- Header Item -->\r\n @else if (isHeader(item)) {\r\n @if (!item.loading) {\r\n <mt-dashboard-item\r\n class=\"dashboard-viewer-content-item\"\r\n [config]=\"item.config\"\r\n [chartTypeId]=\"item.chartTypeId\"\r\n [pageName]=\"\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n pageConfig()?.name?.['ar'] ||\r\n ''\r\n \"\r\n [extraFilters]=\"extraFilters()\"\r\n [ignoreQueryFilter]=\"\r\n pageConfig()?.dashboardConfig?.ignoreQueryFilter ??\r\n false\r\n \"\r\n [inGroup]=\"false\"\r\n >\r\n </mt-dashboard-item>\r\n }\r\n }\r\n <!-- Topbar Item -->\r\n @else if (isTopbar(item)) {\r\n @if (!item.loading) {\r\n <mt-dashboard-item\r\n class=\"dashboard-viewer-content-item\"\r\n [config]=\"item.config\"\r\n [chartTypeId]=\"item.chartTypeId\"\r\n [pageName]=\"\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n pageConfig()?.name?.['ar'] ||\r\n ''\r\n \"\r\n [extraFilters]=\"extraFilters()\"\r\n [ignoreQueryFilter]=\"\r\n pageConfig()?.dashboardConfig?.ignoreQueryFilter ??\r\n false\r\n \"\r\n [inGroup]=\"false\"\r\n >\r\n </mt-dashboard-item>\r\n }\r\n }\r\n <!-- Regular Chart Item -->\r\n @else {\r\n @if (!item.loading) {\r\n <mt-dashboard-item\r\n class=\"dashboard-viewer-content-item\"\r\n [config]=\"item.config\"\r\n [chartTypeId]=\"item.chartTypeId\"\r\n [pageName]=\"\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n pageConfig()?.name?.['ar'] ||\r\n ''\r\n \"\r\n [extraFilters]=\"extraFilters()\"\r\n [ignoreQueryFilter]=\"\r\n pageConfig()?.dashboardConfig?.ignoreQueryFilter ??\r\n false\r\n \"\r\n [inGroup]=\"false\"\r\n >\r\n </mt-dashboard-item>\r\n }\r\n }\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n\r\n <!-- Hidden Dialogs (for modal rendering) -->\r\n @if (dialogs().length > 0) {\r\n <div class=\"hidden\">\r\n @for (\r\n dialog of dialogs();\r\n track dialog.config?.serviceConfig?.dashboardId\r\n ) {\r\n <!-- Dialog placeholder - will be rendered in modal when triggered -->\r\n <div\r\n [attr.data-dialog-id]=\"\r\n dialog.config?.serviceConfig?.dashboardId\r\n \"\r\n ></div>\r\n }\r\n </div>\r\n }\r\n\r\n <!-- Runtime page-filter sidebar: renders the configured filters and,\r\n on Apply, pushes their values onto the URL so charts reload. -->\r\n @if (showFilters() && hasPageFilters()) {\r\n @if (!filtersPanelOpen()) {\r\n <mt-button\r\n class=\"filters-toggle fixed end-4 top-4 z-50\"\r\n [label]=\"t('filters')\"\r\n icon=\"general.filter-funnel-01\"\r\n size=\"small\"\r\n [tooltip]=\"t('filters')\"\r\n (onClick)=\"toggleFiltersPanel()\"\r\n />\r\n }\r\n\r\n @if (filtersPanelOpen()) {\r\n <button\r\n type=\"button\"\r\n class=\"filters-sidebar-backdrop fixed inset-0 z-30 border-0 bg-black/20 md:hidden\"\r\n [attr.aria-label]=\"t('close')\"\r\n (click)=\"closeFiltersPanel()\"\r\n ></button>\r\n }\r\n\r\n <mt-page-filter-sidebar\r\n class=\"filters-sidebar fixed end-0 top-0 bottom-0 z-40 w-72 border-s border-surface-200 bg-surface-card shadow-lg\"\r\n [class.open]=\"filtersPanelOpen()\"\r\n [filters]=\"filters()\"\r\n [initialValues]=\"store.getQueryParams()\"\r\n (filtersApplied)=\"onPageFilterChange($event)\"\r\n (closeRequested)=\"closeFiltersPanel()\"\r\n />\r\n }\r\n } @else if (loading()) {\r\n <!-- Loading State -->\r\n <div class=\"flex items-center justify-center h-64\">\r\n <div class=\"text-center\">\r\n <i\r\n class=\"mti mti-loader-2 text-4xl text-primary animate-spin mb-2\"\r\n ></i>\r\n <p class=\"text-muted-color\">{{ t(\"loading\") }}</p>\r\n </div>\r\n </div>\r\n } @else {\r\n <div\r\n class=\"flex flex-col items-center justify-center h-64 text-muted-color\"\r\n >\r\n <i class=\"mti mti-layout text-6xl mb-4\"></i>\r\n <p class=\"text-lg\">{{ t(\"noPageSelected\") }}</p>\r\n <p class=\"text-sm\">{{ t(\"selectPageToStart\") }}</p>\r\n </div>\r\n }\r\n </div>\r\n </ng-template>\r\n</ng-container>\r\n", styles: [".mt-dashboard-viewer{width:100%;height:100%}.dashboard-viewer-layout-wrapper{width:100%}.dashboard-viewer-layout{display:grid;grid-template-columns:repeat(36,minmax(0,1fr));grid-auto-rows:60px;gap:10px;width:100%;align-items:stretch}.dashboard-viewer-item{display:flex;min-width:0;min-height:0}.dashboard-viewer-item>*{width:100%;height:100%}.dashboard-viewer-content-item{display:block;flex:1 1 auto;min-width:0;min-height:0;width:100%;height:100%}.dashboard-viewer-item--header{z-index:1;overflow:hidden;border:1px solid var(--p-surface-200, #e5e7eb);border-radius:.5rem;background:var(--p-surface-0, #fff);box-shadow:0 1px 2px #0f172a14}.dashboard-viewer-item--topbar{z-index:2;overflow:visible;border:0;border-radius:0;background:transparent;box-shadow:none}.group-container{background-color:var(--surface-card)}.group-header{flex-shrink:0}.group-tabs{flex-wrap:wrap}.group-body{background-color:var(--surface-0)}.header-item{background-color:transparent}.topbar-item{background-color:var(--surface-50)}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.filters-sidebar{max-width:calc(100vw - 1rem);pointer-events:none;transform:translate(100%);transition:transform .3s ease-in-out}.filters-sidebar.open{pointer-events:auto;transform:translate(0)}.filters-toggle{max-width:calc(100vw - 2rem)}[dir=rtl] .filters-sidebar{transform:translate(-100%)}[dir=rtl] .filters-sidebar.open{transform:translate(0)}.table-responsive{max-height:75vh;overflow-y:auto;overflow-x:auto}.modal-content{border:0!important}.custom-donut-chart{display:flex;justify-content:center;height:auto!important}.custom-donut-chart canvas{margin-top:-1.5rem!important}@media(max-width:768px){.dashboard-viewer-layout{display:flex;flex-direction:column;min-height:0!important}.dashboard-viewer-item{min-height:220px}.dashboard-viewer-item--header,.dashboard-viewer-item--topbar{min-height:72px}.dashboard-viewer-item--group{min-height:280px}}\n"] }]
|
|
42189
42870
|
}], propDecorators: { isPage: [{ type: i0.Input, args: [{ isSignal: true, alias: "isPage", required: false }] }], pageTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageTitle", required: false }] }], backButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "backButton", required: false }] }], pageId: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageId", required: false }] }], dashboardData: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardData", required: false }] }], chartsData: [{ type: i0.Input, args: [{ isSignal: true, alias: "chartsData", required: false }] }], dialogsData: [{ type: i0.Input, args: [{ isSignal: true, alias: "dialogsData", required: false }] }], filtersData: [{ type: i0.Input, args: [{ isSignal: true, alias: "filtersData", required: false }] }], extraFilters: [{ type: i0.Input, args: [{ isSignal: true, alias: "extraFilters", required: false }] }], showFilters: [{ type: i0.Input, args: [{ isSignal: true, alias: "showFilters", required: false }] }], pageLoaded: [{ type: i0.Output, args: ["pageLoaded"] }], onBack: [{ type: i0.Output, args: ["onBack"] }], chartClick: [{ type: i0.Output, args: ["chartClick"] }] } });
|
|
42190
42871
|
|
|
42191
42872
|
/**
|
|
@@ -45378,4 +46059,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
45378
46059
|
*/
|
|
45379
46060
|
|
|
45380
46061
|
export { SPlusChartHandler as $, TopbarCardComponent as A, ChartDataService as B, CardContentComponent as C, DashboardItemStoreService as D, EChartComponent as E, FilterUtilsService as F, BarChartHandler as G, HeaderCardComponent as H, PieChartHandler as I, StackBarChartHandler as J, axisFormatters as K, LastHistoryLevelCardComponent as L, groupDatesByYearAndMonth as M, GaugeChartHandler as N, TableViewHandler as O, PropertiesCardComponent as P, OverviewCardHandler as Q, TimelineHandler as R, StaticFiltersComponent as S, TableCardComponent as T, LineChartHandler as U, SnapshotHandler as V, ComparisonChartHandler as W, SplitterChartHandler as X, LevelCardHandler as Y, MapChartHandler as Z, RingGaugeChartHandler as _, DashboardItem as a, moduleIdFromSelector as a$, PhaseGateStepperHandler as a0, formatCurrency as a1, getCurrencySuffix as a2, formatPercentage as a3, formatNumber as a4, formatDate as a5, createAxisFormatter as a6, createTooltipFormatter as a7, formatWordsUnderBar as a8, formatXAxis as a9, expandResetPatches as aA, StyleField as aB, SegmentedField as aC, ColorListField as aD, ArrayBuilderField as aE, KeyValueMapField as aF, LegendOrderField as aG, ItemCardMenuComponent as aH, ChartFilterDrawer as aI, ItemContextToolbarComponent as aJ, ItemConfigPopoverComponent as aK, GuidedConfigDialogComponent as aL, FilterChipsBarComponent as aM, FilterBuilderComponent as aN, DatasourcePanelComponent as aO, SchemaControlRendererComponent as aP, FilterByGroupPipe as aQ, GetChartActionsPipe as aR, CHART_CAPABILITIES as aS, getCapabilityById as aT, resolveCapability as aU, toBackendChartType as aV, normalizeChartTypeForRequest as aW, normalizeFilterOperation as aX, normalizeAggregateFunction as aY, normalizeFilters as aZ, selectorFromLegacy as a_, handleFiltersForCustom as aa, handleFilterForCard as ab, handleFilterForSnapshot as ac, DashboardList as ad, HTTPMethod as ae, DashboardBuilderService as af, DashboardStoreService as ag, ManagePages as ah, ManageBreadcrumb as ai, ManageFilterOnPage as aj, DynamicFiltersConfig as ak, ChartSettingsDrawer as al, DisplaySettings as am, DefaultControlUi as an, PieControlUi as ao, BarControlUi as ap, StackBarControlUi as aq, ManageItem as ar, CHART_TYPES as as, ManageItemService as at, GeneralSettings as au, DataSourceSettings as av, ActionsSettings as aw, ChartViewer as ax, StyleStudioDrawer as ay, StyleSettingsRenderer as az, DashboardBuilder as b, toBackendSourceLink as b0, toFormSourceLink as b1, normalizeOnLoad as b2, normalizeBeforeSave as b3, normalizeBeforeRequest as b4, CONFIG_DOMAINS as b5, domainsForCapability as b6, findDomain as b7, POPOVER_TABS as b8, POPOVER_TAB_SPECS as b9, setByPath as bA, applyControlPatchToPersisted as bB, applyControlPatchesToPersisted as bC, getControlSchema as bD, listControlSchemaIds as bE, listControlSchemas as bF, getFallbackControlSchema as bG, flattenSchema as bH, resolveDisplayFields as bI, buildDisplayFieldPredicate as bJ, bindingKey as bK, getBinding as bL, listBindings as bM, listBindingsForChart as bN, readBoundValue as bO, ITEM_GUIDANCE_REGISTRY as bP, describeGuidance as bQ, ItemGuidanceService as bR, titleToUi as ba, applyTitleToPersisted as bb, datasourceToUi as bc, fieldsToUi as bd, filtersToUi as be, styleToUi as bf, applyStyleToPersisted as bg, layoutToUi as bh, applyLayoutToPersisted as bi, labelLegendFormatToUi as bj, applyLabelLegendFormatToPersisted as bk, behaviorToUi as bl, applyBehaviorToPersisted as bm, applyFilterChipsToPersisted as bn, persistedToUi as bo, buildAssembly as bp, STYLE_PRESETS as bq, presetsForCapability as br, findPreset as bs, validate as bt, hasBlockingIssues as bu, groupIssuesByDomain as bv, parseAdvancedJson as bw, deepMerge$1 as bx, formatForEditor as by, readByPath$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, EntityPreviewCardComponent as w, ListStatisticCardComponent as x, SkeletonCardComponent as y, StatisticCardComponent as z };
|
|
45381
|
-
//# sourceMappingURL=masterteam-dashboard-builder-masterteam-dashboard-builder-
|
|
46062
|
+
//# sourceMappingURL=masterteam-dashboard-builder-masterteam-dashboard-builder-DMDAO3cb.mjs.map
|