@masterteam/dashboard-builder 0.0.115 → 0.0.117
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/assets/dashboard-builder.css +2 -2
- package/fesm2022/{masterteam-dashboard-builder-dashboard-dialog.component-CA4nvx2c.mjs → masterteam-dashboard-builder-dashboard-dialog.component-C3tEnWfy.mjs} +2 -2
- package/fesm2022/{masterteam-dashboard-builder-dashboard-dialog.component-CA4nvx2c.mjs.map → masterteam-dashboard-builder-dashboard-dialog.component-C3tEnWfy.mjs.map} +1 -1
- package/fesm2022/{masterteam-dashboard-builder-masterteam-dashboard-builder-CaX0Tj_g.mjs → masterteam-dashboard-builder-masterteam-dashboard-builder-CMWrKUhw.mjs} +535 -1953
- package/fesm2022/masterteam-dashboard-builder-masterteam-dashboard-builder-CMWrKUhw.mjs.map +1 -0
- package/fesm2022/masterteam-dashboard-builder-table-card.component-kHPxfvAb.mjs +1431 -0
- package/fesm2022/masterteam-dashboard-builder-table-card.component-kHPxfvAb.mjs.map +1 -0
- package/fesm2022/masterteam-dashboard-builder.mjs +1 -1
- package/package.json +4 -2
- package/types/masterteam-dashboard-builder.d.ts +70 -80
- package/fesm2022/masterteam-dashboard-builder-masterteam-dashboard-builder-CaX0Tj_g.mjs.map +0 -1
|
@@ -51,8 +51,6 @@ import { DynamicDrawerConfig, DrawerController } from '@masterteam/components/dy
|
|
|
51
51
|
import { Tooltip as Tooltip$1, TruncateTooltip } from '@masterteam/components/tooltip';
|
|
52
52
|
import { DateField } from '@masterteam/components/date-field';
|
|
53
53
|
import { UserSearchField } from '@masterteam/components/user-search-field';
|
|
54
|
-
import { TableValueResolver, Table } from '@masterteam/components/table';
|
|
55
|
-
import { SecureImagePipe } from '@masterteam/components/upload-field';
|
|
56
54
|
import * as mtIcons from '@masterteam/icons/assets/select-icons.json';
|
|
57
55
|
import { Avatar } from '@masterteam/components/avatar';
|
|
58
56
|
import { EntitiesPreview } from '@masterteam/components/entities';
|
|
@@ -66,6 +64,8 @@ import { createOperatorToken, createTextToken, createPropertyToken, FormulaToolb
|
|
|
66
64
|
import { RadioCards } from '@masterteam/components/radio-cards';
|
|
67
65
|
import { Menu } from '@masterteam/components/menu';
|
|
68
66
|
import { Chip } from '@masterteam/components/chip';
|
|
67
|
+
import { TableValueResolver, Table } from '@masterteam/components/table';
|
|
68
|
+
import { SecureImagePipe } from '@masterteam/components/upload-field';
|
|
69
69
|
import * as i2$4 from 'primeng/button';
|
|
70
70
|
import { ButtonModule } from 'primeng/button';
|
|
71
71
|
import * as i2$5 from 'primeng/inputnumber';
|
|
@@ -14303,7 +14303,7 @@ function switchAllKeysToLower(obj) {
|
|
|
14303
14303
|
/**
|
|
14304
14304
|
* Alias for switchAllKeysToLower (matches old generalFuctions naming)
|
|
14305
14305
|
*/
|
|
14306
|
-
const switchAllKeysSmall
|
|
14306
|
+
const switchAllKeysSmall = switchAllKeysToLower;
|
|
14307
14307
|
/**
|
|
14308
14308
|
* Get nested data from object using dot notation path
|
|
14309
14309
|
*/
|
|
@@ -19360,7 +19360,7 @@ class TimelineHandler {
|
|
|
19360
19360
|
let extraPropSmall;
|
|
19361
19361
|
let groupValue;
|
|
19362
19362
|
if (groupKey) {
|
|
19363
|
-
extraPropSmall = switchAllKeysSmall
|
|
19363
|
+
extraPropSmall = switchAllKeysSmall(value.extraValues);
|
|
19364
19364
|
groupValue = extraPropSmall[groupKey?.toLowerCase()]?.value;
|
|
19365
19365
|
groupValue = groupValue?.name || groupValue;
|
|
19366
19366
|
}
|
|
@@ -25087,7 +25087,7 @@ class ActionService {
|
|
|
25087
25087
|
// "Dialog header"), not from the chart that opened it.
|
|
25088
25088
|
const header = resolveDashboardDialogHeader(dialogConfig);
|
|
25089
25089
|
// Dynamically import DashboardDialogComponent to avoid circular dependency
|
|
25090
|
-
import('./masterteam-dashboard-builder-dashboard-dialog.component-
|
|
25090
|
+
import('./masterteam-dashboard-builder-dashboard-dialog.component-C3tEnWfy.mjs').then(({ DashboardDialogComponent }) => {
|
|
25091
25091
|
// Open dialog using ModalService
|
|
25092
25092
|
this.modalService.openModal(DashboardDialogComponent, 'dialog', {
|
|
25093
25093
|
header: header.title,
|
|
@@ -25712,128 +25712,128 @@ class CardFilterComponent {
|
|
|
25712
25712
|
}
|
|
25713
25713
|
}
|
|
25714
25714
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CardFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
25715
|
-
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: `
|
|
25716
|
-
<div class="card-filter" *transloco="let t; prefix: 'dashboard'">
|
|
25717
|
-
@switch (filterType()) {
|
|
25718
|
-
@case ('select') {
|
|
25719
|
-
<select
|
|
25720
|
-
class="filter-select"
|
|
25721
|
-
[(ngModel)]="selectedValue"
|
|
25722
|
-
(ngModelChange)="onFilterChange($event)"
|
|
25723
|
-
>
|
|
25724
|
-
@if (placeholder()) {
|
|
25725
|
-
<option [value]="null" disabled>{{ placeholder() }}</option>
|
|
25726
|
-
}
|
|
25727
|
-
@for (option of options(); track option.key) {
|
|
25728
|
-
<option [value]="option.value">
|
|
25729
|
-
{{
|
|
25730
|
-
option.label[langCode()] || option.label['en'] || option.key
|
|
25731
|
-
}}
|
|
25732
|
-
</option>
|
|
25733
|
-
}
|
|
25734
|
-
</select>
|
|
25735
|
-
}
|
|
25736
|
-
@case ('multiSelect') {
|
|
25737
|
-
<div class="multi-select-container">
|
|
25738
|
-
<!-- Simplified multi-select -->
|
|
25739
|
-
<select
|
|
25740
|
-
class="filter-select"
|
|
25741
|
-
multiple
|
|
25742
|
-
[(ngModel)]="selectedValues"
|
|
25743
|
-
(ngModelChange)="onMultiFilterChange($event)"
|
|
25744
|
-
>
|
|
25745
|
-
@for (option of options(); track option.key) {
|
|
25746
|
-
<option [value]="option.value">
|
|
25747
|
-
{{
|
|
25748
|
-
option.label[langCode()] || option.label['en'] || option.key
|
|
25749
|
-
}}
|
|
25750
|
-
</option>
|
|
25751
|
-
}
|
|
25752
|
-
</select>
|
|
25753
|
-
</div>
|
|
25754
|
-
}
|
|
25755
|
-
@case ('dateRange') {
|
|
25756
|
-
<div class="date-range-container">
|
|
25757
|
-
<input
|
|
25758
|
-
type="date"
|
|
25759
|
-
class="filter-date"
|
|
25760
|
-
[(ngModel)]="startDate"
|
|
25761
|
-
(ngModelChange)="onDateChange()"
|
|
25762
|
-
/>
|
|
25763
|
-
<span class="date-separator">-</span>
|
|
25764
|
-
<input
|
|
25765
|
-
type="date"
|
|
25766
|
-
class="filter-date"
|
|
25767
|
-
[(ngModel)]="endDate"
|
|
25768
|
-
(ngModelChange)="onDateChange()"
|
|
25769
|
-
/>
|
|
25770
|
-
</div>
|
|
25771
|
-
}
|
|
25772
|
-
}
|
|
25773
|
-
</div>
|
|
25715
|
+
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: `
|
|
25716
|
+
<div class="card-filter" *transloco="let t; prefix: 'dashboard'">
|
|
25717
|
+
@switch (filterType()) {
|
|
25718
|
+
@case ('select') {
|
|
25719
|
+
<select
|
|
25720
|
+
class="filter-select"
|
|
25721
|
+
[(ngModel)]="selectedValue"
|
|
25722
|
+
(ngModelChange)="onFilterChange($event)"
|
|
25723
|
+
>
|
|
25724
|
+
@if (placeholder()) {
|
|
25725
|
+
<option [value]="null" disabled>{{ placeholder() }}</option>
|
|
25726
|
+
}
|
|
25727
|
+
@for (option of options(); track option.key) {
|
|
25728
|
+
<option [value]="option.value">
|
|
25729
|
+
{{
|
|
25730
|
+
option.label[langCode()] || option.label['en'] || option.key
|
|
25731
|
+
}}
|
|
25732
|
+
</option>
|
|
25733
|
+
}
|
|
25734
|
+
</select>
|
|
25735
|
+
}
|
|
25736
|
+
@case ('multiSelect') {
|
|
25737
|
+
<div class="multi-select-container">
|
|
25738
|
+
<!-- Simplified multi-select -->
|
|
25739
|
+
<select
|
|
25740
|
+
class="filter-select"
|
|
25741
|
+
multiple
|
|
25742
|
+
[(ngModel)]="selectedValues"
|
|
25743
|
+
(ngModelChange)="onMultiFilterChange($event)"
|
|
25744
|
+
>
|
|
25745
|
+
@for (option of options(); track option.key) {
|
|
25746
|
+
<option [value]="option.value">
|
|
25747
|
+
{{
|
|
25748
|
+
option.label[langCode()] || option.label['en'] || option.key
|
|
25749
|
+
}}
|
|
25750
|
+
</option>
|
|
25751
|
+
}
|
|
25752
|
+
</select>
|
|
25753
|
+
</div>
|
|
25754
|
+
}
|
|
25755
|
+
@case ('dateRange') {
|
|
25756
|
+
<div class="date-range-container">
|
|
25757
|
+
<input
|
|
25758
|
+
type="date"
|
|
25759
|
+
class="filter-date"
|
|
25760
|
+
[(ngModel)]="startDate"
|
|
25761
|
+
(ngModelChange)="onDateChange()"
|
|
25762
|
+
/>
|
|
25763
|
+
<span class="date-separator">-</span>
|
|
25764
|
+
<input
|
|
25765
|
+
type="date"
|
|
25766
|
+
class="filter-date"
|
|
25767
|
+
[(ngModel)]="endDate"
|
|
25768
|
+
(ngModelChange)="onDateChange()"
|
|
25769
|
+
/>
|
|
25770
|
+
</div>
|
|
25771
|
+
}
|
|
25772
|
+
}
|
|
25773
|
+
</div>
|
|
25774
25774
|
`, 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 });
|
|
25775
25775
|
}
|
|
25776
25776
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CardFilterComponent, decorators: [{
|
|
25777
25777
|
type: Component,
|
|
25778
|
-
args: [{ selector: 'mt-card-filter', standalone: true, imports: [CommonModule, FormsModule, TranslocoDirective], template: `
|
|
25779
|
-
<div class="card-filter" *transloco="let t; prefix: 'dashboard'">
|
|
25780
|
-
@switch (filterType()) {
|
|
25781
|
-
@case ('select') {
|
|
25782
|
-
<select
|
|
25783
|
-
class="filter-select"
|
|
25784
|
-
[(ngModel)]="selectedValue"
|
|
25785
|
-
(ngModelChange)="onFilterChange($event)"
|
|
25786
|
-
>
|
|
25787
|
-
@if (placeholder()) {
|
|
25788
|
-
<option [value]="null" disabled>{{ placeholder() }}</option>
|
|
25789
|
-
}
|
|
25790
|
-
@for (option of options(); track option.key) {
|
|
25791
|
-
<option [value]="option.value">
|
|
25792
|
-
{{
|
|
25793
|
-
option.label[langCode()] || option.label['en'] || option.key
|
|
25794
|
-
}}
|
|
25795
|
-
</option>
|
|
25796
|
-
}
|
|
25797
|
-
</select>
|
|
25798
|
-
}
|
|
25799
|
-
@case ('multiSelect') {
|
|
25800
|
-
<div class="multi-select-container">
|
|
25801
|
-
<!-- Simplified multi-select -->
|
|
25802
|
-
<select
|
|
25803
|
-
class="filter-select"
|
|
25804
|
-
multiple
|
|
25805
|
-
[(ngModel)]="selectedValues"
|
|
25806
|
-
(ngModelChange)="onMultiFilterChange($event)"
|
|
25807
|
-
>
|
|
25808
|
-
@for (option of options(); track option.key) {
|
|
25809
|
-
<option [value]="option.value">
|
|
25810
|
-
{{
|
|
25811
|
-
option.label[langCode()] || option.label['en'] || option.key
|
|
25812
|
-
}}
|
|
25813
|
-
</option>
|
|
25814
|
-
}
|
|
25815
|
-
</select>
|
|
25816
|
-
</div>
|
|
25817
|
-
}
|
|
25818
|
-
@case ('dateRange') {
|
|
25819
|
-
<div class="date-range-container">
|
|
25820
|
-
<input
|
|
25821
|
-
type="date"
|
|
25822
|
-
class="filter-date"
|
|
25823
|
-
[(ngModel)]="startDate"
|
|
25824
|
-
(ngModelChange)="onDateChange()"
|
|
25825
|
-
/>
|
|
25826
|
-
<span class="date-separator">-</span>
|
|
25827
|
-
<input
|
|
25828
|
-
type="date"
|
|
25829
|
-
class="filter-date"
|
|
25830
|
-
[(ngModel)]="endDate"
|
|
25831
|
-
(ngModelChange)="onDateChange()"
|
|
25832
|
-
/>
|
|
25833
|
-
</div>
|
|
25834
|
-
}
|
|
25835
|
-
}
|
|
25836
|
-
</div>
|
|
25778
|
+
args: [{ selector: 'mt-card-filter', standalone: true, imports: [CommonModule, FormsModule, TranslocoDirective], template: `
|
|
25779
|
+
<div class="card-filter" *transloco="let t; prefix: 'dashboard'">
|
|
25780
|
+
@switch (filterType()) {
|
|
25781
|
+
@case ('select') {
|
|
25782
|
+
<select
|
|
25783
|
+
class="filter-select"
|
|
25784
|
+
[(ngModel)]="selectedValue"
|
|
25785
|
+
(ngModelChange)="onFilterChange($event)"
|
|
25786
|
+
>
|
|
25787
|
+
@if (placeholder()) {
|
|
25788
|
+
<option [value]="null" disabled>{{ placeholder() }}</option>
|
|
25789
|
+
}
|
|
25790
|
+
@for (option of options(); track option.key) {
|
|
25791
|
+
<option [value]="option.value">
|
|
25792
|
+
{{
|
|
25793
|
+
option.label[langCode()] || option.label['en'] || option.key
|
|
25794
|
+
}}
|
|
25795
|
+
</option>
|
|
25796
|
+
}
|
|
25797
|
+
</select>
|
|
25798
|
+
}
|
|
25799
|
+
@case ('multiSelect') {
|
|
25800
|
+
<div class="multi-select-container">
|
|
25801
|
+
<!-- Simplified multi-select -->
|
|
25802
|
+
<select
|
|
25803
|
+
class="filter-select"
|
|
25804
|
+
multiple
|
|
25805
|
+
[(ngModel)]="selectedValues"
|
|
25806
|
+
(ngModelChange)="onMultiFilterChange($event)"
|
|
25807
|
+
>
|
|
25808
|
+
@for (option of options(); track option.key) {
|
|
25809
|
+
<option [value]="option.value">
|
|
25810
|
+
{{
|
|
25811
|
+
option.label[langCode()] || option.label['en'] || option.key
|
|
25812
|
+
}}
|
|
25813
|
+
</option>
|
|
25814
|
+
}
|
|
25815
|
+
</select>
|
|
25816
|
+
</div>
|
|
25817
|
+
}
|
|
25818
|
+
@case ('dateRange') {
|
|
25819
|
+
<div class="date-range-container">
|
|
25820
|
+
<input
|
|
25821
|
+
type="date"
|
|
25822
|
+
class="filter-date"
|
|
25823
|
+
[(ngModel)]="startDate"
|
|
25824
|
+
(ngModelChange)="onDateChange()"
|
|
25825
|
+
/>
|
|
25826
|
+
<span class="date-separator">-</span>
|
|
25827
|
+
<input
|
|
25828
|
+
type="date"
|
|
25829
|
+
class="filter-date"
|
|
25830
|
+
[(ngModel)]="endDate"
|
|
25831
|
+
(ngModelChange)="onDateChange()"
|
|
25832
|
+
/>
|
|
25833
|
+
</div>
|
|
25834
|
+
}
|
|
25835
|
+
}
|
|
25836
|
+
</div>
|
|
25837
25837
|
`, 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"] }]
|
|
25838
25838
|
}], 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"] }] } });
|
|
25839
25839
|
|
|
@@ -27744,30 +27744,30 @@ class CardInfoComponent {
|
|
|
27744
27744
|
return typeof info.value === 'string' ? info.value : '';
|
|
27745
27745
|
}, ...(ngDevMode ? [{ debugName: "tooltipContent" }] : /* istanbul ignore next */ []));
|
|
27746
27746
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CardInfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
27747
|
-
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: `
|
|
27748
|
-
@if (showInfo()) {
|
|
27749
|
-
<span
|
|
27750
|
-
class="card-info-icon"
|
|
27751
|
-
[mtTooltip]="tooltipContent()"
|
|
27752
|
-
tooltipPosition="bottom"
|
|
27753
|
-
>
|
|
27754
|
-
<i class="pi pi-info-circle"></i>
|
|
27755
|
-
</span>
|
|
27756
|
-
}
|
|
27747
|
+
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: `
|
|
27748
|
+
@if (showInfo()) {
|
|
27749
|
+
<span
|
|
27750
|
+
class="card-info-icon"
|
|
27751
|
+
[mtTooltip]="tooltipContent()"
|
|
27752
|
+
tooltipPosition="bottom"
|
|
27753
|
+
>
|
|
27754
|
+
<i class="pi pi-info-circle"></i>
|
|
27755
|
+
</span>
|
|
27756
|
+
}
|
|
27757
27757
|
`, 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 });
|
|
27758
27758
|
}
|
|
27759
27759
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CardInfoComponent, decorators: [{
|
|
27760
27760
|
type: Component,
|
|
27761
|
-
args: [{ selector: 'mt-card-info', standalone: true, imports: [CommonModule, Tooltip$1], template: `
|
|
27762
|
-
@if (showInfo()) {
|
|
27763
|
-
<span
|
|
27764
|
-
class="card-info-icon"
|
|
27765
|
-
[mtTooltip]="tooltipContent()"
|
|
27766
|
-
tooltipPosition="bottom"
|
|
27767
|
-
>
|
|
27768
|
-
<i class="pi pi-info-circle"></i>
|
|
27769
|
-
</span>
|
|
27770
|
-
}
|
|
27761
|
+
args: [{ selector: 'mt-card-info', standalone: true, imports: [CommonModule, Tooltip$1], template: `
|
|
27762
|
+
@if (showInfo()) {
|
|
27763
|
+
<span
|
|
27764
|
+
class="card-info-icon"
|
|
27765
|
+
[mtTooltip]="tooltipContent()"
|
|
27766
|
+
tooltipPosition="bottom"
|
|
27767
|
+
>
|
|
27768
|
+
<i class="pi pi-info-circle"></i>
|
|
27769
|
+
</span>
|
|
27770
|
+
}
|
|
27771
27771
|
`, 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"] }]
|
|
27772
27772
|
}], propDecorators: { cardInfo: [{ type: i0.Input, args: [{ isSignal: true, alias: "cardInfo", required: false }] }] } });
|
|
27773
27773
|
|
|
@@ -30857,1757 +30857,6 @@ i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "21.2.8", ng
|
|
|
30857
30857
|
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template #timelineLegendList>\r\n <div\r\n class=\"dashboard-timeline-legend\"\r\n [attr.data-position]=\"timelineLegendPosition()\"\r\n >\r\n @for (label of timelineLabels(); track $index) {\r\n <span\r\n class=\"dashboard-timeline-legend-item\"\r\n [title]=\"label.label || label.name || label.key\"\r\n >\r\n <span\r\n class=\"dashboard-timeline-legend-marker\"\r\n [class.shape-rect]=\"label.shape === 'rect'\"\r\n [class.shape-roundRect]=\"label.shape === 'roundRect'\"\r\n [class.shape-diamond]=\"label.shape === 'diamond'\"\r\n [class.shape-triangle]=\"label.shape === 'triangle'\"\r\n [style.background]=\"\r\n label.shape === 'triangle' ? null : label.color || '#64748b'\r\n \"\r\n [style.border-bottom-color]=\"\r\n label.shape === 'triangle' ? label.color || '#64748b' : null\r\n \"\r\n ></span>\r\n <span class=\"dashboard-timeline-legend-label\">\r\n {{ label.label || label.name || label.key }}\r\n </span>\r\n </span>\r\n }\r\n </div>\r\n</ng-template>\r\n\r\n<mt-card-content\r\n [inGroup]=\"inGroup()\"\r\n [headerConfig]=\"\r\n configurationItem()?.clientConfig?.configAsType?.['headerCardConfig']\r\n \"\r\n [styleConfig]=\"\r\n configurationItem()?.clientConfig?.displayConfig?.['StyleConfig']\r\n \"\r\n [cardStyleConfig]=\"\r\n configurationItem()?.clientConfig?.configAsType?.['cardStyleConfig']\r\n \"\r\n [density]=\"configurationItem()?.clientConfig?.configAsType?.['density']\"\r\n [padding]=\"configurationItem()?.clientConfig?.configAsType?.['padding']\"\r\n [title]=\"title()\"\r\n [titleEditable]=\"titleEditable()\"\r\n (titleChange)=\"onTitleChange.emit($event)\"\r\n [isNoTopEnd]=\"!showTopEnd()\"\r\n [isChart]=\"true\"\r\n (headerClick)=\"onHeaderClick()\"\r\n>\r\n <ng-container topEnd>\r\n @if (showStaticFilters()) {\r\n <mt-static-filters\r\n [config]=\"staticFilterConfig()\"\r\n [dashboardId]=\"dashboardId()\"\r\n >\r\n </mt-static-filters>\r\n }\r\n @if (showDynamicFilters()) {\r\n <mt-dynamic-filters\r\n [fields]=\"dynamicFilterFields()\"\r\n [dashboardId]=\"dashboardId()\"\r\n [reportId]=\"reportId()\"\r\n [showLabels]=\"false\"\r\n >\r\n </mt-dynamic-filters>\r\n }\r\n @if (showFilter()) {\r\n <mt-card-filter [config]=\"filterConfig()\" [dashboardId]=\"dashboardId()\">\r\n </mt-card-filter>\r\n }\r\n @if (cardInfoConfig()?.show && cardInfoConfig()?.value) {\r\n <mt-card-info [cardInfo]=\"cardInfoConfig()\"></mt-card-info>\r\n }\r\n </ng-container>\r\n\r\n <ng-container body>\r\n <div\r\n class=\"chart-container\"\r\n [class.config-mode]=\"isConfigMode()\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n >\r\n @if (componentViewMode() === \"splitter\" && hasSplitterData()) {\r\n <div\r\n class=\"splitter-view\"\r\n [class.splitter-vertical]=\"splitterOrientation() === 'vertical'\"\r\n [style.gap.px]=\"splitterGap()\"\r\n >\r\n <div class=\"splitter-side splitter-positive\">\r\n <div class=\"splitter-count\">\r\n {{ dataHandled()?.positive?.groupedValue ?? 0 }}\r\n </div>\r\n <ul class=\"splitter-labels\">\r\n @for (\r\n label of dataHandled()?.positive?.labels || [];\r\n track $index\r\n ) {\r\n <li>{{ label }}</li>\r\n }\r\n </ul>\r\n </div>\r\n <div class=\"splitter-divider\"></div>\r\n <div class=\"splitter-side splitter-negative\">\r\n <div class=\"splitter-count\">\r\n {{ dataHandled()?.negative?.groupedValue ?? 0 }}\r\n </div>\r\n <ul class=\"splitter-labels\">\r\n @for (\r\n label of dataHandled()?.negative?.labels || [];\r\n track $index\r\n ) {\r\n <li>{{ label }}</li>\r\n }\r\n </ul>\r\n </div>\r\n </div>\r\n } @else if (componentViewMode() === \"timeline\" && hasTimelineData()) {\r\n <div\r\n class=\"dashboard-timeline-view\"\r\n [attr.data-legend-position]=\"timelineLegendPosition()\"\r\n [style.--timeline-header-bg]=\"timelineHeaderBgColor()\"\r\n [style.--timeline-header-color]=\"timelineHeaderTextColor()\"\r\n >\r\n @if (\r\n timelineLegendShow() &&\r\n timelineLabels().length &&\r\n (timelineLegendPosition() === \"top\" ||\r\n timelineLegendPosition() === \"left\")\r\n ) {\r\n <ng-container [ngTemplateOutlet]=\"timelineLegendList\" />\r\n }\r\n\r\n @defer (on viewport) {\r\n <mt-timeline\r\n class=\"dashboard-timeline-renderer\"\r\n [showHeader]=\"false\"\r\n [showZoomToFitControl]=\"false\"\r\n [scrollToToday]=\"true\"\r\n [timelineMode]=\"timelineMode()\"\r\n (timelineModeChange)=\"timelineMode.set($event)\"\r\n [ganttData]=\"timelineResources()\"\r\n [ganttMapping]=\"timelineGanttMapping\"\r\n [columns]=\"timelineColumns()\"\r\n [defaultVisibleColumns]=\"2\"\r\n [columnsPaneMinWidthPx]=\"220\"\r\n [columnsPaneMaxWidthPx]=\"520\"\r\n [enableVirtualScroll]=\"true\"\r\n [virtualScrollThreshold]=\"0\"\r\n [virtualScrollBodyHeightPx]=\"520\"\r\n [showGanttDetailsPopup]=\"true\"\r\n [emptyMessage]=\"t('noChartData')\"\r\n >\r\n <ng-template\r\n mtTimelineColumn=\"title\"\r\n let-item=\"item\"\r\n let-resolved=\"resolved\"\r\n let-canToggle=\"canToggle\"\r\n let-isCollapsed=\"isCollapsed\"\r\n let-toggle=\"toggle\"\r\n >\r\n <div\r\n class=\"dashboard-timeline-title-cell\"\r\n [style.padding-inline-start.px]=\"\r\n $any(resolved).levelDepth * 16\r\n \"\r\n >\r\n @if (canToggle) {\r\n <mt-icon\r\n class=\"dashboard-timeline-title-toggle\"\r\n [icon]=\"timelineCollapseIcon(isCollapsed)\"\r\n (click)=\"$event.stopPropagation(); toggle()\"\r\n ></mt-icon>\r\n } @else {\r\n <span class=\"dashboard-timeline-title-spacer\"></span>\r\n }\r\n\r\n <button\r\n type=\"button\"\r\n class=\"dashboard-timeline-title-action\"\r\n [title]=\"$any(resolved).title\"\r\n (click)=\"onTimelineTitleClick(item, $event)\"\r\n >\r\n {{ $any(resolved).title }}\r\n </button>\r\n </div>\r\n </ng-template>\r\n\r\n @for (column of timelineEntityColumns(); track column.key) {\r\n <ng-template [mtTimelineColumn]=\"column.key\" let-value=\"value\">\r\n <mt-entity-preview\r\n class=\"dashboard-timeline-column-entity\"\r\n [data]=\"timelineColumnEntityData(value)\"\r\n attachmentShape=\"compact\"\r\n ></mt-entity-preview>\r\n </ng-template>\r\n }\r\n\r\n <ng-template mtTimelinePopover let-item=\"item\">\r\n @if (timelinePopoverEntities(item); as entities) {\r\n @if (entities.length) {\r\n <div\r\n class=\"w-[27rem] max-w-[90vw] max-h-[24rem] overflow-auto p-2\"\r\n >\r\n <mt-entities-preview\r\n [entities]=\"entities\"\r\n [stackOnNarrow]=\"false\"\r\n />\r\n </div>\r\n }\r\n }\r\n </ng-template>\r\n </mt-timeline>\r\n } @placeholder {\r\n <div class=\"dashboard-timeline-placeholder\" aria-hidden=\"true\">\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n </div>\r\n }\r\n\r\n @if (\r\n timelineLegendShow() &&\r\n timelineLabels().length &&\r\n (timelineLegendPosition() === \"bottom\" ||\r\n timelineLegendPosition() === \"right\")\r\n ) {\r\n <ng-container [ngTemplateOutlet]=\"timelineLegendList\" />\r\n }\r\n </div>\r\n } @else if (\r\n componentViewMode() === \"phaseGateStepper\" && phaseGateRecordCount() > 1\r\n ) {\r\n <div class=\"no-data-container\">\r\n <i class=\"pi pi-info-circle\"></i>\r\n <span>{{\r\n t(\"phaseGateStepperMultipleRecords\", {\r\n count: phaseGateRecordCount(),\r\n })\r\n }}</span>\r\n </div>\r\n } @else if (\r\n componentViewMode() === \"phaseGateStepper\" && hasPhaseGateData()\r\n ) {\r\n <div\r\n class=\"phase-gate-view\"\r\n [class.phase-gate-compact]=\"phaseGateCompact()\"\r\n >\r\n <ol class=\"phase-steps\">\r\n @for (step of phaseGateSteps(); track $index) {\r\n <li\r\n class=\"phase-step\"\r\n [class.is-current]=\"step.isCurrent\"\r\n [class.is-done]=\"step.isCompleted\"\r\n >\r\n <span class=\"phase-step-number\">{{ $index + 1 }}</span>\r\n @if (phaseGateShowLabels()) {\r\n <span class=\"phase-step-name\">{{\r\n step.name || t(\"phase\")\r\n }}</span>\r\n }\r\n </li>\r\n }\r\n </ol>\r\n </div>\r\n } @else if (\r\n componentViewMode() === \"performanceGauge\" &&\r\n dataHandled() &&\r\n !dataHandled()?.noData\r\n ) {\r\n @let gauge = performanceGauge();\r\n <div\r\n class=\"dashboard-performance-gauge\"\r\n [class.is-clickable]=\"hasActions()\"\r\n [style.--dashboard-performance-status-color]=\"gauge.status.color\"\r\n (click)=\"onPerformanceGaugeClick($event)\"\r\n >\r\n <div\r\n class=\"dashboard-performance-gauge__figure\"\r\n [style.width.%]=\"gauge.scalePercent\"\r\n >\r\n <svg\r\n class=\"dashboard-performance-gauge__svg\"\r\n viewBox=\"0 0 100 72\"\r\n role=\"img\"\r\n [attr.aria-label]=\"gauge.label + ' ' + gauge.display\"\r\n >\r\n <path\r\n d=\"M 8 58 A 42 42 0 0 1 92 58\"\r\n fill=\"none\"\r\n stroke=\"#e5e7eb\"\r\n stroke-width=\"6\"\r\n stroke-linecap=\"round\"\r\n pathLength=\"100\"\r\n ></path>\r\n\r\n @for (segment of performanceGaugeSegments(); track segment.key) {\r\n <path\r\n d=\"M 8 58 A 42 42 0 0 1 92 58\"\r\n fill=\"none\"\r\n [attr.stroke]=\"segment.color\"\r\n stroke-width=\"6\"\r\n stroke-linecap=\"round\"\r\n pathLength=\"100\"\r\n [attr.stroke-dasharray]=\"segment.dashArray\"\r\n [attr.stroke-dashoffset]=\"segment.dashOffset\"\r\n [style.opacity]=\"segment.opacity\"\r\n ></path>\r\n <text\r\n [attr.x]=\"segment.labelX\"\r\n [attr.y]=\"segment.labelY\"\r\n text-anchor=\"middle\"\r\n dominant-baseline=\"central\"\r\n font-size=\"5.5\"\r\n font-weight=\"700\"\r\n fill=\"#334155\"\r\n >\r\n {{ segment.label }}\r\n </text>\r\n }\r\n\r\n <circle\r\n [attr.cx]=\"gauge.marker.x\"\r\n [attr.cy]=\"gauge.marker.y\"\r\n r=\"4.5\"\r\n fill=\"#fff\"\r\n [attr.stroke]=\"gauge.status.color\"\r\n stroke-width=\"3\"\r\n ></circle>\r\n </svg>\r\n\r\n <div class=\"dashboard-performance-gauge__center\">\r\n <div class=\"dashboard-performance-gauge__value\">\r\n {{ gauge.display }}\r\n </div>\r\n <div class=\"dashboard-performance-gauge__label\">\r\n {{ gauge.label }}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div\r\n class=\"dashboard-performance-gauge__status\"\r\n [title]=\"performanceGaugeStatusName()\"\r\n >\r\n <span class=\"dashboard-performance-gauge__status-dot\"></span>\r\n <span class=\"dashboard-performance-gauge__status-text\">\r\n {{ performanceGaugeStatusName() }}\r\n </span>\r\n </div>\r\n </div>\r\n } @else if (componentViewMode() === \"map\" && dataHandled()) {\r\n <mt-map-view\r\n [dashboardId]=\"dashboardId()\"\r\n [configurationItem]=\"configurationItem()\"\r\n [inGroup]=\"inGroup()\"\r\n [groups]=\"mapGroups()\"\r\n [config]=\"mapViewConfig()\"\r\n [showLegend]=\"mapLegendShow()\"\r\n [legendPosition]=\"mapLegendPosition()\"\r\n [legendIcon]=\"mapLegendIcon()\"\r\n (pointClick)=\"onMapPointClick($event)\"\r\n (pointDblClick)=\"onMapPointDblClick($event)\"\r\n />\r\n } @else if (dataHandled() && !dataHandled()?.noData) {\r\n <mt-echart\r\n [dashboardId]=\"dashboardId()\"\r\n [chartConfig]=\"dataHandled()\"\r\n [configurationItem]=\"configurationItem()\"\r\n [inGroup]=\"inGroup()\"\r\n (chartClick)=\"onChartClick($event)\"\r\n (chartDblClick)=\"onChartDblClick($event)\"\r\n >\r\n </mt-echart>\r\n } @else if (dataHandled()?.noData) {\r\n <div class=\"no-data-container\">\r\n <i class=\"pi pi-info-circle\"></i>\r\n <span>{{ t(\"noChartData\") }}</span>\r\n </div>\r\n } @else {\r\n <div class=\"loading-container\">\r\n <div class=\"loading-spinner\"></div>\r\n </div>\r\n }\r\n </div>\r\n </ng-container>\r\n</mt-card-content>\r\n", styles: [":host{display:block;height:100%}.chart-container{height:100%;min-height:0}.chart-container.config-mode{min-height:400px}.no-data-container,.needs-config-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;min-height:0;color:#999;gap:.5rem;padding:1rem;text-align:center}.no-data-container i,.needs-config-container i{font-size:2rem}.needs-config-container .title{font-weight:600;color:#555;font-size:.95rem}.needs-config-container .hint{font-size:.8rem;max-width:28rem;line-height:1.4}.needs-config-container .configure-btn{margin-top:.5rem;display:inline-flex;align-items:center;gap:.4rem;padding:.4rem .9rem;font-size:.85rem;font-weight:600;color:#fff;background:var(--p-primary-500, #2563eb);border:0;border-radius:.375rem;cursor:pointer;box-shadow:0 1px 2px #0000000d}.needs-config-container .configure-btn:hover{background:var(--p-primary-600, #1d4ed8)}.loading-container{display:flex;align-items:center;justify-content:center;height:100%;min-height:0}.loading-spinner{width:2rem;height:2rem;border:3px solid #f0f0f0;border-top-color:#4caf50;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.splitter-view{display:flex;align-items:stretch;height:100%;gap:.5rem}.splitter-view.splitter-vertical{flex-direction:column}.splitter-view.splitter-vertical .splitter-divider{width:auto;height:1px}.splitter-side{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;padding:1rem;border-radius:.5rem}.splitter-positive{background:#22c55e14}.splitter-negative{background:#ef444414}.splitter-count{font-size:2rem;font-weight:700;margin-bottom:.5rem}.splitter-positive .splitter-count{color:#16a34a}.splitter-negative .splitter-count{color:#dc2626}.splitter-labels{list-style:none;padding:0;margin:0;text-align:center;font-size:.8rem;color:#555}.splitter-labels li{padding:.15rem 0}.splitter-divider{width:1px;background:#00000014}.dashboard-timeline-view{display:flex;flex-direction:column;gap:.625rem;height:100%;min-height:0;overflow:auto}.dashboard-timeline-view[data-legend-position=left],.dashboard-timeline-view[data-legend-position=right]{flex-direction:row;overflow:hidden}.dashboard-timeline-legend{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:.35rem .75rem;flex-shrink:0;min-width:0;max-width:100%}.dashboard-timeline-legend[data-position=left],.dashboard-timeline-legend[data-position=right]{max-width:12rem;max-height:100%;flex-direction:column;align-items:flex-start;justify-content:flex-start;flex-wrap:nowrap;overflow:auto}.dashboard-timeline-legend-item{display:inline-flex;align-items:center;gap:.25rem;max-width:12rem;padding:0;border:0;border-radius:0;font-size:.75rem;color:#475569;font-weight:500;line-height:1.2;background:transparent}.dashboard-timeline-legend-marker{display:inline-block;width:.625rem;height:.625rem;flex:0 0 auto;border-radius:999px}.dashboard-timeline-legend-marker.shape-rect{border-radius:0}.dashboard-timeline-legend-marker.shape-roundRect{border-radius:.2rem}.dashboard-timeline-legend-marker.shape-diamond{border-radius:.0625rem;transform:rotate(45deg)}.dashboard-timeline-legend-marker.shape-triangle{width:0;height:0;background:transparent!important;border-radius:0;border-left:.34rem solid transparent;border-right:.34rem solid transparent;border-bottom-width:.6rem;border-bottom-style:solid}.dashboard-timeline-legend-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dashboard-timeline-renderer{display:block;min-height:0;flex:1}.dashboard-timeline-placeholder{display:flex;min-height:260px;flex:1;flex-direction:column;gap:.75rem;padding:1rem}.dashboard-timeline-placeholder div{height:3rem;border-radius:.5rem;background:var(--p-surface-100);animation:dashboard-builder-pulse 1.2s ease-in-out infinite}@keyframes dashboard-builder-pulse{0%,to{opacity:.55}50%{opacity:1}}:host ::ng-deep .dashboard-timeline-renderer>div{margin-top:0}:host ::ng-deep .dashboard-timeline-view mt-timeline-gantt-header .bg-surface-50{background-color:var(--timeline-header-bg, var(--p-surface-50));color:var(--timeline-header-color, inherit)}.dashboard-timeline-column-entity{display:block;min-width:0}.dashboard-timeline-title-cell{display:flex;min-width:0;align-items:center;gap:.5rem;width:100%}.dashboard-timeline-title-toggle{flex:0 0 auto;cursor:pointer;color:#64748b}.dashboard-timeline-title-spacer{display:inline-block;width:1.25rem;flex:0 0 1.25rem}.dashboard-timeline-title-action{min-width:0;flex:1 1 auto;overflow:hidden;border:0;background:transparent;padding:0;color:#334155;cursor:pointer;font-size:.875rem;font-weight:600;text-align:start;text-overflow:ellipsis;white-space:nowrap}.dashboard-timeline-title-action:hover{color:var(--p-primary-600, #2563eb);text-decoration:underline}.phase-gate-view{height:100%;display:flex;align-items:center;justify-content:safe center;padding:1rem;overflow-x:auto}.phase-steps{display:flex;align-items:center;gap:.75rem;list-style:none;margin:0;padding:0}.phase-step{display:flex;align-items:center;gap:.5rem;padding:.4rem .75rem;border-radius:.375rem;background:#0000000a;font-size:.8rem;color:#555;white-space:nowrap}.phase-step-number{width:1.5rem;height:1.5rem;display:inline-flex;align-items:center;justify-content:center;border-radius:999px;font-weight:700;background:#0000000f;color:#666}.phase-step.is-done{background:#22c55e1a;color:#16a34a}.phase-step.is-done .phase-step-number{background:#16a34a;color:#fff}.phase-step.is-current{background:#2563eb1a;color:#2563eb;font-weight:600}.phase-step.is-current .phase-step-number{background:#2563eb;color:#fff}.phase-gate-view.phase-gate-compact .phase-step{padding:.2rem .45rem;font-size:.7rem;gap:.25rem}.phase-gate-view.phase-gate-compact .phase-step-number{width:1.1rem;height:1.1rem;font-size:.7rem}.dashboard-performance-gauge{display:flex;height:100%;min-height:0;width:100%;flex-direction:column;align-items:center;justify-content:center;gap:.875rem;overflow:hidden;padding:.75rem 1rem 1rem;cursor:default}.dashboard-performance-gauge.is-clickable{cursor:pointer}.dashboard-performance-gauge__figure{position:relative;width:min(100%,28rem);min-width:12rem;max-width:100%;transform-origin:center bottom}.dashboard-performance-gauge__svg{display:block;width:100%;height:auto;overflow:visible}.dashboard-performance-gauge__center{position:absolute;left:50%;top:72%;display:flex;max-width:90%;transform:translate(-50%,-50%);flex-direction:column;align-items:center;gap:.125rem;text-align:center;pointer-events:none}.dashboard-performance-gauge__value{font-size:2.75rem;font-weight:800;line-height:1;color:var(--dashboard-performance-status-color, #334155)}.dashboard-performance-gauge__label{max-width:18rem;overflow:hidden;color:#475569;font-size:.95rem;font-weight:600;text-overflow:ellipsis;white-space:nowrap}.dashboard-performance-gauge__status{display:inline-flex;max-width:min(80%,18rem);align-items:center;justify-content:center;gap:.375rem;border-radius:999px;padding:.25rem .625rem;background:color-mix(in srgb,var(--dashboard-performance-status-color, #64748b) 10%,transparent);color:var(--dashboard-performance-status-color, #475569);font-size:.8125rem;font-weight:700;line-height:1.2}.dashboard-performance-gauge__status-dot{width:.5rem;height:.5rem;flex:0 0 auto;border-radius:999px;background:currentColor}.dashboard-performance-gauge__status-text{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n"] }]
|
|
30858
30858
|
}], ctorParameters: null, propDecorators: { dashboardId: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardId", required: true }] }], reportId: [{ type: i0.Input, args: [{ isSignal: true, alias: "reportId", required: false }] }], inGroup: [{ type: i0.Input, args: [{ isSignal: true, alias: "inGroup", required: false }] }], isConfigMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "isConfigMode", required: false }] }], titleEditable: [{ type: i0.Input, args: [{ isSignal: true, alias: "titleEditable", required: false }] }], onAction: [{ type: i0.Output, args: ["onAction"] }], onConfigure: [{ type: i0.Output, args: ["onConfigure"] }], onTitleChange: [{ type: i0.Output, args: ["onTitleChange"] }] } }) });
|
|
30859
30859
|
|
|
30860
|
-
/**
|
|
30861
|
-
* Entity Info Component
|
|
30862
|
-
*
|
|
30863
|
-
* Renders property values based on their viewType.
|
|
30864
|
-
* Matches old app-entity-info behavior with viewType-based rendering.
|
|
30865
|
-
*
|
|
30866
|
-
* Supported viewTypes:
|
|
30867
|
-
* - text, float, title, phasegate → text display
|
|
30868
|
-
* - longtext → rich-text HTML display
|
|
30869
|
-
* - number → formatted number
|
|
30870
|
-
* - date, datetime → date display
|
|
30871
|
-
* - currency → currency display
|
|
30872
|
-
* - time → time display
|
|
30873
|
-
* - lookup, lookupmatrix → lookup display with color indicator
|
|
30874
|
-
* - checkbox → checkbox display
|
|
30875
|
-
* - status, request_status → status display with color
|
|
30876
|
-
* - percentage → percentage with progress bar
|
|
30877
|
-
* - slider → slider/progress display
|
|
30878
|
-
* - user → user avatar display
|
|
30879
|
-
* - lookupmultiselect → multi-select tags
|
|
30880
|
-
* - multiuser → multiple user avatars
|
|
30881
|
-
* - dynamiclist → list of properties
|
|
30882
|
-
* - api → API fetched value
|
|
30883
|
-
* - integrated → integrated value display
|
|
30884
|
-
*/
|
|
30885
|
-
function resolveEntityUserPhoto(value) {
|
|
30886
|
-
if (!value || typeof value !== 'object' || Array.isArray(value))
|
|
30887
|
-
return '';
|
|
30888
|
-
const user = value;
|
|
30889
|
-
for (const key of ['photoUrl', 'image', 'avatar']) {
|
|
30890
|
-
const candidate = user[key];
|
|
30891
|
-
if (typeof candidate === 'string' && candidate.trim()) {
|
|
30892
|
-
return candidate.trim();
|
|
30893
|
-
}
|
|
30894
|
-
}
|
|
30895
|
-
return '';
|
|
30896
|
-
}
|
|
30897
|
-
/**
|
|
30898
|
-
* The dashboard backend sends a Checkbox value as text (`"True"` / `"False"`),
|
|
30899
|
-
* so `Boolean(value)` read every non-empty string, `"False"` included, as
|
|
30900
|
-
* checked. Parsed the same way as the table card's `toBooleanValue`.
|
|
30901
|
-
*/
|
|
30902
|
-
function resolveEntityCheckbox(value) {
|
|
30903
|
-
if (typeof value === 'boolean')
|
|
30904
|
-
return value;
|
|
30905
|
-
if (typeof value === 'number')
|
|
30906
|
-
return value === 1;
|
|
30907
|
-
if (typeof value === 'string') {
|
|
30908
|
-
const text = value.trim().toLowerCase();
|
|
30909
|
-
return text === 'true' || text === '1' || text === 'yes';
|
|
30910
|
-
}
|
|
30911
|
-
if (value && typeof value === 'object' && 'value' in value) {
|
|
30912
|
-
return resolveEntityCheckbox(value.value);
|
|
30913
|
-
}
|
|
30914
|
-
return false;
|
|
30915
|
-
}
|
|
30916
|
-
class EntityInfoComponent {
|
|
30917
|
-
transloco = inject(TranslocoService);
|
|
30918
|
-
httpContext = new HttpContext().set(REQUEST_CONTEXT, {
|
|
30919
|
-
useBaseUrl: true,
|
|
30920
|
-
});
|
|
30921
|
-
/** Entity data to display */
|
|
30922
|
-
data = input(null, ...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
|
|
30923
|
-
/** Display type: 'entity' shows label, 'inTable' shows value only */
|
|
30924
|
-
displayType = input('entity', ...(ngDevMode ? [{ debugName: "displayType" }] : /* istanbul ignore next */ []));
|
|
30925
|
-
/** Extra configuration */
|
|
30926
|
-
extraInfoData = input({}, ...(ngDevMode ? [{ debugName: "extraInfoData" }] : /* istanbul ignore next */ []));
|
|
30927
|
-
/** Whether to limit words with ellipsis */
|
|
30928
|
-
limitWords = input(false, ...(ngDevMode ? [{ debugName: "limitWords" }] : /* istanbul ignore next */ []));
|
|
30929
|
-
/** Custom CSS class */
|
|
30930
|
-
customClass = input('', ...(ngDevMode ? [{ debugName: "customClass" }] : /* istanbul ignore next */ []));
|
|
30931
|
-
/** Computed viewType in lowercase */
|
|
30932
|
-
viewTypeLower = computed(() => {
|
|
30933
|
-
return this.data()?.viewType?.toLowerCase() || 'text';
|
|
30934
|
-
}, ...(ngDevMode ? [{ debugName: "viewTypeLower" }] : /* istanbul ignore next */ []));
|
|
30935
|
-
// === Text values ===
|
|
30936
|
-
textValue = computed(() => {
|
|
30937
|
-
const value = this.data()?.value;
|
|
30938
|
-
if (value === null || value === undefined)
|
|
30939
|
-
return '';
|
|
30940
|
-
if (typeof value === 'object') {
|
|
30941
|
-
return value.displayName || value.display || value.name || String(value);
|
|
30942
|
-
}
|
|
30943
|
-
return String(value);
|
|
30944
|
-
}, ...(ngDevMode ? [{ debugName: "textValue" }] : /* istanbul ignore next */ []));
|
|
30945
|
-
// === Long text values ===
|
|
30946
|
-
/**
|
|
30947
|
-
* A `LongText` property stores rich-text HTML authored in the editor, so the
|
|
30948
|
-
* cell has to render it as markup — interpolating it printed the raw
|
|
30949
|
-
* `<p>…</p>` source into the table. Angular sanitizes `[innerHTML]`, and this
|
|
30950
|
-
* matches `mt-entity-long-text`, which is what the level-workspace table
|
|
30951
|
-
* renders the same property with.
|
|
30952
|
-
*/
|
|
30953
|
-
longTextHtml = computed(() => this.textValue(), ...(ngDevMode ? [{ debugName: "longTextHtml" }] : /* istanbul ignore next */ []));
|
|
30954
|
-
/** Tag-stripped text for the `title` tooltip — an attribute can't hold markup. */
|
|
30955
|
-
longTextTooltip = computed(() => {
|
|
30956
|
-
const text = TableValueResolver.stripHtml(this.longTextHtml());
|
|
30957
|
-
return typeof text === 'string' ? text : '';
|
|
30958
|
-
}, ...(ngDevMode ? [{ debugName: "longTextTooltip" }] : /* istanbul ignore next */ []));
|
|
30959
|
-
// === Number values ===
|
|
30960
|
-
numericValue = computed(() => {
|
|
30961
|
-
const value = this.data()?.value;
|
|
30962
|
-
if (value === null || value === undefined)
|
|
30963
|
-
return null;
|
|
30964
|
-
const num = parseFloat(value);
|
|
30965
|
-
return isNaN(num) ? null : num;
|
|
30966
|
-
}, ...(ngDevMode ? [{ debugName: "numericValue" }] : /* istanbul ignore next */ []));
|
|
30967
|
-
// === Date values ===
|
|
30968
|
-
dateDisplayValue = computed(() => {
|
|
30969
|
-
const value = this.data()?.value;
|
|
30970
|
-
if (!value)
|
|
30971
|
-
return '';
|
|
30972
|
-
if (typeof value === 'object') {
|
|
30973
|
-
return value.displayValue || value.display || '';
|
|
30974
|
-
}
|
|
30975
|
-
// Try to format as date
|
|
30976
|
-
try {
|
|
30977
|
-
const date = new Date(value);
|
|
30978
|
-
if (!isNaN(date.getTime())) {
|
|
30979
|
-
return date.toLocaleDateString();
|
|
30980
|
-
}
|
|
30981
|
-
}
|
|
30982
|
-
catch {
|
|
30983
|
-
// ignore
|
|
30984
|
-
}
|
|
30985
|
-
return String(value);
|
|
30986
|
-
}, ...(ngDevMode ? [{ debugName: "dateDisplayValue" }] : /* istanbul ignore next */ []));
|
|
30987
|
-
// === Currency values ===
|
|
30988
|
-
currencyDisplayValue = computed(() => {
|
|
30989
|
-
const value = this.data()?.value;
|
|
30990
|
-
if (!value)
|
|
30991
|
-
return '';
|
|
30992
|
-
if (typeof value === 'object') {
|
|
30993
|
-
return value.display || this.formatCurrency(value.value);
|
|
30994
|
-
}
|
|
30995
|
-
return this.formatCurrency(value);
|
|
30996
|
-
}, ...(ngDevMode ? [{ debugName: "currencyDisplayValue" }] : /* istanbul ignore next */ []));
|
|
30997
|
-
// === Time values ===
|
|
30998
|
-
timeDisplayValue = computed(() => {
|
|
30999
|
-
const value = this.data()?.value;
|
|
31000
|
-
if (!value)
|
|
31001
|
-
return '';
|
|
31002
|
-
if (typeof value === 'object') {
|
|
31003
|
-
return value.displayValue || value.display || '';
|
|
31004
|
-
}
|
|
31005
|
-
return String(value);
|
|
31006
|
-
}, ...(ngDevMode ? [{ debugName: "timeDisplayValue" }] : /* istanbul ignore next */ []));
|
|
31007
|
-
// === Lookup values ===
|
|
31008
|
-
lookupName = computed(() => {
|
|
31009
|
-
const value = this.data()?.value;
|
|
31010
|
-
if (!value)
|
|
31011
|
-
return '';
|
|
31012
|
-
if (typeof value === 'object') {
|
|
31013
|
-
return value.name || value.display?.name || value.display || '';
|
|
31014
|
-
}
|
|
31015
|
-
return String(value);
|
|
31016
|
-
}, ...(ngDevMode ? [{ debugName: "lookupName" }] : /* istanbul ignore next */ []));
|
|
31017
|
-
lookupColor = computed(() => {
|
|
31018
|
-
const value = this.data()?.value;
|
|
31019
|
-
if (!value || typeof value !== 'object')
|
|
31020
|
-
return '';
|
|
31021
|
-
return value.details?.color || value.color || '';
|
|
31022
|
-
}, ...(ngDevMode ? [{ debugName: "lookupColor" }] : /* istanbul ignore next */ []));
|
|
31023
|
-
// === Checkbox values ===
|
|
31024
|
-
checkboxValue = computed(() => resolveEntityCheckbox(this.data()?.value), ...(ngDevMode ? [{ debugName: "checkboxValue" }] : /* istanbul ignore next */ []));
|
|
31025
|
-
checkboxLabel = computed(() => this.transloco.translate(this.checkboxValue() ? 'dashboardBuilder.yes' : 'dashboardBuilder.no'), ...(ngDevMode ? [{ debugName: "checkboxLabel" }] : /* istanbul ignore next */ []));
|
|
31026
|
-
// === Status values ===
|
|
31027
|
-
statusName = computed(() => {
|
|
31028
|
-
const value = this.data()?.value;
|
|
31029
|
-
if (!value)
|
|
31030
|
-
return '';
|
|
31031
|
-
if (typeof value === 'object') {
|
|
31032
|
-
const languageCode = document.dir === 'rtl' ? 'ar' : 'en';
|
|
31033
|
-
const display = typeof value.display === 'object'
|
|
31034
|
-
? value.display?.[languageCode] ||
|
|
31035
|
-
value.display?.en ||
|
|
31036
|
-
value.display?.ar ||
|
|
31037
|
-
value.display?.name ||
|
|
31038
|
-
value.display?.displayName ||
|
|
31039
|
-
value.display?.label
|
|
31040
|
-
: value.display;
|
|
31041
|
-
return (value.displayName ||
|
|
31042
|
-
value.name ||
|
|
31043
|
-
display ||
|
|
31044
|
-
value[languageCode] ||
|
|
31045
|
-
value.en ||
|
|
31046
|
-
value.ar ||
|
|
31047
|
-
value.label ||
|
|
31048
|
-
value.key ||
|
|
31049
|
-
'');
|
|
31050
|
-
}
|
|
31051
|
-
return String(value);
|
|
31052
|
-
}, ...(ngDevMode ? [{ debugName: "statusName" }] : /* istanbul ignore next */ []));
|
|
31053
|
-
statusColor = computed(() => {
|
|
31054
|
-
const value = this.data()?.value;
|
|
31055
|
-
if (!value || typeof value !== 'object')
|
|
31056
|
-
return '';
|
|
31057
|
-
return value.details?.color || value.color || '';
|
|
31058
|
-
}, ...(ngDevMode ? [{ debugName: "statusColor" }] : /* istanbul ignore next */ []));
|
|
31059
|
-
// === Percentage values ===
|
|
31060
|
-
percentageValue = computed(() => {
|
|
31061
|
-
let value = this.data()?.value;
|
|
31062
|
-
if (value === null || value === undefined)
|
|
31063
|
-
return null;
|
|
31064
|
-
// Unwrap nested { value: { value: N } } / { value: "49%" } shapes (up to a
|
|
31065
|
-
// couple of levels) so the progress-bar fill width parses correctly.
|
|
31066
|
-
for (let i = 0; i < 3 && value && typeof value === 'object'; i++) {
|
|
31067
|
-
value =
|
|
31068
|
-
value.value ??
|
|
31069
|
-
value.actualValue ??
|
|
31070
|
-
value.displayValue ??
|
|
31071
|
-
value.display ??
|
|
31072
|
-
null;
|
|
31073
|
-
}
|
|
31074
|
-
if (value === null || value === undefined)
|
|
31075
|
-
return null;
|
|
31076
|
-
const num = parseFloat(String(value).replace('%', '').trim());
|
|
31077
|
-
return Number.isNaN(num) ? 0 : num;
|
|
31078
|
-
}, ...(ngDevMode ? [{ debugName: "percentageValue" }] : /* istanbul ignore next */ []));
|
|
31079
|
-
percentageColor = computed(() => {
|
|
31080
|
-
// "% status color": the table injects the row's status colour as
|
|
31081
|
-
// data().statusColor and sets extraInfoData.showPercentageStatus — prefer
|
|
31082
|
-
// it so the progress bar / dot reflects the row's status (Delayed -> red…).
|
|
31083
|
-
const statusColor = this.data()?.statusColor;
|
|
31084
|
-
if (this.extraInfoData()?.showPercentageStatus && statusColor) {
|
|
31085
|
-
return statusColor;
|
|
31086
|
-
}
|
|
31087
|
-
// Otherwise use any colour carried on the value (incl. one level of nesting).
|
|
31088
|
-
const value = this.data()?.value;
|
|
31089
|
-
if (!value || typeof value !== 'object')
|
|
31090
|
-
return '';
|
|
31091
|
-
return value.color || value.details?.color || value.value?.color || '';
|
|
31092
|
-
}, ...(ngDevMode ? [{ debugName: "percentageColor" }] : /* istanbul ignore next */ []));
|
|
31093
|
-
// === Slider values ===
|
|
31094
|
-
sliderValue = computed(() => {
|
|
31095
|
-
const value = this.data()?.value;
|
|
31096
|
-
if (!value)
|
|
31097
|
-
return 0;
|
|
31098
|
-
if (typeof value === 'object') {
|
|
31099
|
-
return parseFloat(value.value) || 0;
|
|
31100
|
-
}
|
|
31101
|
-
return parseFloat(value) || 0;
|
|
31102
|
-
}, ...(ngDevMode ? [{ debugName: "sliderValue" }] : /* istanbul ignore next */ []));
|
|
31103
|
-
// === User values ===
|
|
31104
|
-
userData = computed(() => {
|
|
31105
|
-
const value = this.data()?.value;
|
|
31106
|
-
if (!value || typeof value !== 'object')
|
|
31107
|
-
return null;
|
|
31108
|
-
return value;
|
|
31109
|
-
}, ...(ngDevMode ? [{ debugName: "userData" }] : /* istanbul ignore next */ []));
|
|
31110
|
-
userName = computed(() => {
|
|
31111
|
-
const user = this.userData();
|
|
31112
|
-
if (!user)
|
|
31113
|
-
return '';
|
|
31114
|
-
return user.displayName || user.name || user.fullName || '';
|
|
31115
|
-
}, ...(ngDevMode ? [{ debugName: "userName" }] : /* istanbul ignore next */ []));
|
|
31116
|
-
userPhoto = computed(() => resolveEntityUserPhoto(this.userData()), ...(ngDevMode ? [{ debugName: "userPhoto" }] : /* istanbul ignore next */ []));
|
|
31117
|
-
userInitials = computed(() => {
|
|
31118
|
-
const name = this.userName();
|
|
31119
|
-
return this.getInitials(name);
|
|
31120
|
-
}, ...(ngDevMode ? [{ debugName: "userInitials" }] : /* istanbul ignore next */ []));
|
|
31121
|
-
// === Multiselect values ===
|
|
31122
|
-
multiselectValues = computed(() => {
|
|
31123
|
-
const value = this.data()?.value;
|
|
31124
|
-
if (!value)
|
|
31125
|
-
return [];
|
|
31126
|
-
return Array.isArray(value) ? value : [];
|
|
31127
|
-
}, ...(ngDevMode ? [{ debugName: "multiselectValues" }] : /* istanbul ignore next */ []));
|
|
31128
|
-
// === Multi user values ===
|
|
31129
|
-
multiUserValues = computed(() => {
|
|
31130
|
-
const value = this.data()?.value;
|
|
31131
|
-
if (!value)
|
|
31132
|
-
return [];
|
|
31133
|
-
return Array.isArray(value) ? value : [];
|
|
31134
|
-
}, ...(ngDevMode ? [{ debugName: "multiUserValues" }] : /* istanbul ignore next */ []));
|
|
31135
|
-
getUserPhoto(user) {
|
|
31136
|
-
return resolveEntityUserPhoto(user);
|
|
31137
|
-
}
|
|
31138
|
-
// === Dynamic list values ===
|
|
31139
|
-
dynamicListValues = computed(() => {
|
|
31140
|
-
const value = this.data()?.value;
|
|
31141
|
-
if (!value)
|
|
31142
|
-
return [];
|
|
31143
|
-
return Array.isArray(value) ? value : [];
|
|
31144
|
-
}, ...(ngDevMode ? [{ debugName: "dynamicListValues" }] : /* istanbul ignore next */ []));
|
|
31145
|
-
// === Location values ===
|
|
31146
|
-
locationDisplayValue = computed(() => {
|
|
31147
|
-
const value = this.data()?.value;
|
|
31148
|
-
if (!value)
|
|
31149
|
-
return '';
|
|
31150
|
-
if (typeof value === 'object') {
|
|
31151
|
-
return value.display_name || value.displayName || value.name || '';
|
|
31152
|
-
}
|
|
31153
|
-
return String(value);
|
|
31154
|
-
}, ...(ngDevMode ? [{ debugName: "locationDisplayValue" }] : /* istanbul ignore next */ []));
|
|
31155
|
-
/** Get initials from name */
|
|
31156
|
-
getInitials(name) {
|
|
31157
|
-
if (!name)
|
|
31158
|
-
return '?';
|
|
31159
|
-
const parts = name.split(' ').filter(Boolean);
|
|
31160
|
-
if (parts.length === 1) {
|
|
31161
|
-
return parts[0].charAt(0).toUpperCase();
|
|
31162
|
-
}
|
|
31163
|
-
return (parts[0].charAt(0) + parts[parts.length - 1].charAt(0)).toUpperCase();
|
|
31164
|
-
}
|
|
31165
|
-
/** Format currency value */
|
|
31166
|
-
formatCurrency(value) {
|
|
31167
|
-
if (value === null || value === undefined || value === '')
|
|
31168
|
-
return '';
|
|
31169
|
-
const num = parseFloat(value);
|
|
31170
|
-
if (isNaN(num))
|
|
31171
|
-
return String(value);
|
|
31172
|
-
return num.toLocaleString(undefined, {
|
|
31173
|
-
minimumFractionDigits: 2,
|
|
31174
|
-
maximumFractionDigits: 2,
|
|
31175
|
-
});
|
|
31176
|
-
}
|
|
31177
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntityInfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
31178
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: EntityInfoComponent, isStandalone: true, selector: "mt-entity-info", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, displayType: { classPropertyName: "displayType", publicName: "displayType", isSignal: true, isRequired: false, transformFunction: null }, extraInfoData: { classPropertyName: "extraInfoData", publicName: "extraInfoData", isSignal: true, isRequired: false, transformFunction: null }, limitWords: { classPropertyName: "limitWords", publicName: "limitWords", isSignal: true, isRequired: false, transformFunction: null }, customClass: { classPropertyName: "customClass", publicName: "customClass", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div\r\n class=\"entity-info-wrapper w-full\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n>\r\n @switch (viewTypeLower()) {\r\n <!-- Text Types -->\r\n @case (\"text\") {\r\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\r\n }\r\n @case (\"float\") {\r\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\r\n }\r\n @case (\"longtext\") {\r\n <ng-container *ngTemplateOutlet=\"longTextTemplate\"></ng-container>\r\n }\r\n @case (\"title\") {\r\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\r\n }\r\n @case (\"phasegate\") {\r\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Number -->\r\n @case (\"number\") {\r\n <ng-container *ngTemplateOutlet=\"numberTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Date Types -->\r\n @case (\"date\") {\r\n <ng-container *ngTemplateOutlet=\"dateTemplate\"></ng-container>\r\n }\r\n @case (\"datetime\") {\r\n <ng-container *ngTemplateOutlet=\"dateTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Currency -->\r\n @case (\"currency\") {\r\n <ng-container *ngTemplateOutlet=\"currencyTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Time -->\r\n @case (\"time\") {\r\n <ng-container *ngTemplateOutlet=\"timeTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Lookup -->\r\n @case (\"lookup\") {\r\n <ng-container *ngTemplateOutlet=\"lookupTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Lookup Matrix (same value shape as lookup: key/display/color) -->\r\n @case (\"lookupmatrix\") {\r\n <ng-container *ngTemplateOutlet=\"lookupTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Checkbox -->\r\n @case (\"checkbox\") {\r\n <ng-container *ngTemplateOutlet=\"checkboxTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Status -->\r\n @case (\"status\") {\r\n <ng-container *ngTemplateOutlet=\"statusTemplate\"></ng-container>\r\n }\r\n @case (\"request_status\") {\r\n <ng-container *ngTemplateOutlet=\"statusTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Percentage -->\r\n @case (\"percentage\") {\r\n <ng-container *ngTemplateOutlet=\"percentageTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Slider -->\r\n @case (\"slider\") {\r\n <ng-container *ngTemplateOutlet=\"sliderTemplate\"></ng-container>\r\n }\r\n\r\n <!-- User -->\r\n @case (\"user\") {\r\n <ng-container *ngTemplateOutlet=\"userTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Multi-select lookup -->\r\n @case (\"lookupmultiselect\") {\r\n <ng-container\r\n *ngTemplateOutlet=\"lookupMultiselectTemplate\"\r\n ></ng-container>\r\n }\r\n\r\n <!-- Multi user -->\r\n @case (\"multiuser\") {\r\n <ng-container *ngTemplateOutlet=\"multiUserTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Dynamic List -->\r\n @case (\"dynamiclist\") {\r\n <ng-container *ngTemplateOutlet=\"dynamicListTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Location -->\r\n @case (\"location\") {\r\n <ng-container *ngTemplateOutlet=\"locationTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Default: treat as text -->\r\n @default {\r\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\r\n }\r\n }\r\n</div>\r\n\r\n<!-- Text Template -->\r\n<ng-template #textTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div\r\n class=\"font-semibold\"\r\n [class.text-ellipsis]=\"limitWords()\"\r\n [class.overflow-hidden]=\"limitWords()\"\r\n [class.whitespace-nowrap]=\"limitWords()\"\r\n [style.max-width]=\"limitWords() ? '200px' : 'auto'\"\r\n [title]=\"textValue()\"\r\n >\r\n {{ textValue() || \"__\" }}\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Long Text Template: the value is rich-text HTML, so render it as markup\r\n (Angular sanitizes [innerHTML]) instead of printing the tags. -->\r\n<ng-template #longTextTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n @if (longTextTooltip()) {\r\n <div\r\n class=\"entity-long-text font-semibold break-words\"\r\n [class.entity-long-text-clamped]=\"displayType() === 'inTable'\"\r\n [title]=\"longTextTooltip()\"\r\n [innerHTML]=\"longTextHtml()\"\r\n ></div>\r\n } @else {\r\n <div class=\"font-semibold\">__</div>\r\n }\r\n</ng-template>\r\n\r\n<!-- Number Template -->\r\n<ng-template #numberTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"font-semibold\">\r\n {{ numericValue() !== null ? (numericValue() | number) : \"__\" }}\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Date Template -->\r\n<ng-template #dateTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"font-semibold\">\r\n {{ dateDisplayValue() || \"__\" }}\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Currency Template -->\r\n<ng-template #currencyTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"font-semibold\">\r\n {{ currencyDisplayValue() || \"__\" }}\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Time Template -->\r\n<ng-template #timeTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"font-semibold\">\r\n {{ timeDisplayValue() || \"__\" }}\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Lookup Template -->\r\n<ng-template #lookupTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n @if (lookupName()) {\r\n <span class=\"flex items-center gap-1\" [style.color]=\"lookupColor()\">\r\n @if (displayType() === \"entity\" && lookupColor()) {\r\n <span\r\n class=\"w-2 h-2 rounded-full inline-block\"\r\n [style.backgroundColor]=\"lookupColor()\"\r\n ></span>\r\n }\r\n {{ lookupName() }}\r\n </span>\r\n } @else {\r\n <span class=\"font-semibold\">__</span>\r\n }\r\n</ng-template>\r\n\r\n<!-- Checkbox Template -->\r\n<ng-template #checkboxTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"flex items-center\">\r\n <i\r\n [class]=\"\r\n checkboxValue()\r\n ? 'pi pi-check-square text-primary'\r\n : 'pi pi-stop text-muted-color'\r\n \"\r\n ></i>\r\n <span class=\"ml-2\">{{ checkboxLabel() }}</span>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Status Template -->\r\n<ng-template #statusTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"flex items-center gap-2\">\r\n @if (statusColor()) {\r\n <span\r\n class=\"w-2.5 h-2.5 rounded-full flex-shrink-0\"\r\n [style.backgroundColor]=\"statusColor()\"\r\n ></span>\r\n }\r\n <span [style.color]=\"statusColor()\">\r\n {{ statusName() || \"__\" }}\r\n </span>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Percentage Template -->\r\n<ng-template #percentageTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"flex items-center gap-2\">\r\n @if (\r\n displayType() !== \"inTable\" ||\r\n extraInfoData()?.showPercentageAsProgressBar\r\n ) {\r\n <div\r\n class=\"flex-1 h-2 bg-surface-200 rounded-full overflow-hidden max-w-24\"\r\n >\r\n <div\r\n class=\"h-full rounded-full transition-all\"\r\n [style.width.%]=\"percentageValue() || 0\"\r\n [style.backgroundColor]=\"percentageColor() || 'var(--primary-color)'\"\r\n ></div>\r\n </div>\r\n }\r\n @if (\r\n extraInfoData()?.showPercentageStatus &&\r\n !extraInfoData()?.showPercentageAsProgressBar\r\n ) {\r\n <span\r\n class=\"w-2.5 h-2.5 rounded-full\"\r\n [style.backgroundColor]=\"percentageColor() || '#000'\"\r\n ></span>\r\n }\r\n <span [style.color]=\"percentageColor()\">\r\n {{\r\n percentageValue() !== null\r\n ? (percentageValue() | number: \"1.0-0\") + \"%\"\r\n : \"__\"\r\n }}\r\n </span>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Slider Template -->\r\n<ng-template #sliderTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"flex items-center gap-2\">\r\n <div\r\n class=\"flex-1 h-2 bg-surface-200 rounded-full overflow-hidden max-w-32\"\r\n >\r\n <div\r\n class=\"h-full bg-primary rounded-full transition-all\"\r\n [style.width.%]=\"sliderValue() || 0\"\r\n ></div>\r\n </div>\r\n <span class=\"text-sm\">{{ sliderValue() || 0 }}%</span>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- User Template -->\r\n<ng-template #userTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n @if (userData()) {\r\n <div class=\"flex items-center gap-2\">\r\n @if (userPhoto()) {\r\n <img\r\n [src]=\"userPhoto() | secureImage: true : httpContext : 'avatar/'\"\r\n alt=\"User avatar\"\r\n class=\"w-8 h-8 rounded-full object-cover\"\r\n />\r\n } @else {\r\n <div\r\n class=\"w-8 h-8 rounded-full bg-primary/20 flex items-center justify-center text-primary font-semibold text-sm\"\r\n >\r\n {{ userInitials() }}\r\n </div>\r\n }\r\n <span class=\"font-medium\">{{ userName() }}</span>\r\n </div>\r\n } @else {\r\n <span class=\"font-semibold\">__</span>\r\n }\r\n</ng-template>\r\n\r\n<!-- Lookup Multiselect Template -->\r\n<ng-template #lookupMultiselectTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n @if (multiselectValues()?.length) {\r\n <div class=\"flex flex-wrap gap-1\">\r\n @for (item of multiselectValues(); track item.key || $index) {\r\n <!-- A lookup value is { key, display, color } \u2014 `details.color` alone\r\n left every chip on the grey fallback. Same order as lookupColor(). -->\r\n <span\r\n class=\"px-2 py-0.5 rounded-full text-xs font-medium\"\r\n [style.backgroundColor]=\"\r\n (item.details?.color || item.color || '#6b7280') + '20'\r\n \"\r\n [style.color]=\"item.details?.color || item.color || '#6b7280'\"\r\n >\r\n {{ item.name || item.display || item.key || item }}\r\n </span>\r\n }\r\n </div>\r\n } @else {\r\n <span class=\"font-semibold\">__</span>\r\n }\r\n</ng-template>\r\n\r\n<!-- Multi User Template -->\r\n<ng-template #multiUserTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n @if (multiUserValues()?.length) {\r\n <div class=\"flex items-center -space-x-2\">\r\n @for (user of multiUserValues().slice(0, 5); track user.id || $index) {\r\n @if (getUserPhoto(user); as userPhoto) {\r\n <img\r\n [src]=\"userPhoto | secureImage: true : httpContext : 'avatar/'\"\r\n [alt]=\"user.name || user.displayName\"\r\n class=\"w-7 h-7 rounded-full border-2 border-white object-cover\"\r\n />\r\n } @else {\r\n <div\r\n class=\"w-7 h-7 rounded-full border-2 border-white bg-primary/20 flex items-center justify-center text-primary font-semibold text-xs\"\r\n >\r\n {{ getInitials(user.name || user.displayName) }}\r\n </div>\r\n }\r\n }\r\n @if (multiUserValues().length > 5) {\r\n <div\r\n class=\"w-7 h-7 rounded-full border-2 border-white bg-surface-300 flex items-center justify-center text-xs font-medium\"\r\n >\r\n +{{ multiUserValues().length - 5 }}\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <span class=\"font-semibold\">__</span>\r\n }\r\n</ng-template>\r\n\r\n<!-- Dynamic List Template -->\r\n<ng-template #dynamicListTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n @if (dynamicListValues()?.length) {\r\n <div class=\"flex flex-col gap-1\">\r\n @for (item of dynamicListValues(); track $index) {\r\n <div class=\"text-sm\">\r\n {{ item?.label || item?.name || item }}\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <span class=\"font-semibold\">__</span>\r\n }\r\n</ng-template>\r\n\r\n<!-- Location Template -->\r\n<ng-template #locationTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"font-semibold\">\r\n {{ locationDisplayValue() || \"__\" }}\r\n </div>\r\n</ng-template>\r\n", styles: [":host{display:block}.text-ellipsis{text-overflow:ellipsis}.entity-long-text ::ng-deep :is(p,ul,ol,h1,h2,h3,h4,h5,h6){margin:0}.entity-long-text-clamped{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.entity-long-text-clamped ::ng-deep :is(p,div,li,h1,h2,h3,h4,h5,h6){display:inline}.entity-long-text-clamped ::ng-deep :is(p,div,li,h1,h2,h3,h4,h5,h6):after{content:\" \"}\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: "pipe", type: i1$1.DecimalPipe, name: "number" }, { kind: "pipe", type: SecureImagePipe, name: "secureImage" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
31179
|
-
}
|
|
31180
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntityInfoComponent, decorators: [{
|
|
31181
|
-
type: Component,
|
|
31182
|
-
args: [{ selector: 'mt-entity-info', standalone: true, imports: [CommonModule, TranslocoDirective, DecimalPipe, SecureImagePipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\r\n class=\"entity-info-wrapper w-full\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n>\r\n @switch (viewTypeLower()) {\r\n <!-- Text Types -->\r\n @case (\"text\") {\r\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\r\n }\r\n @case (\"float\") {\r\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\r\n }\r\n @case (\"longtext\") {\r\n <ng-container *ngTemplateOutlet=\"longTextTemplate\"></ng-container>\r\n }\r\n @case (\"title\") {\r\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\r\n }\r\n @case (\"phasegate\") {\r\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Number -->\r\n @case (\"number\") {\r\n <ng-container *ngTemplateOutlet=\"numberTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Date Types -->\r\n @case (\"date\") {\r\n <ng-container *ngTemplateOutlet=\"dateTemplate\"></ng-container>\r\n }\r\n @case (\"datetime\") {\r\n <ng-container *ngTemplateOutlet=\"dateTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Currency -->\r\n @case (\"currency\") {\r\n <ng-container *ngTemplateOutlet=\"currencyTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Time -->\r\n @case (\"time\") {\r\n <ng-container *ngTemplateOutlet=\"timeTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Lookup -->\r\n @case (\"lookup\") {\r\n <ng-container *ngTemplateOutlet=\"lookupTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Lookup Matrix (same value shape as lookup: key/display/color) -->\r\n @case (\"lookupmatrix\") {\r\n <ng-container *ngTemplateOutlet=\"lookupTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Checkbox -->\r\n @case (\"checkbox\") {\r\n <ng-container *ngTemplateOutlet=\"checkboxTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Status -->\r\n @case (\"status\") {\r\n <ng-container *ngTemplateOutlet=\"statusTemplate\"></ng-container>\r\n }\r\n @case (\"request_status\") {\r\n <ng-container *ngTemplateOutlet=\"statusTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Percentage -->\r\n @case (\"percentage\") {\r\n <ng-container *ngTemplateOutlet=\"percentageTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Slider -->\r\n @case (\"slider\") {\r\n <ng-container *ngTemplateOutlet=\"sliderTemplate\"></ng-container>\r\n }\r\n\r\n <!-- User -->\r\n @case (\"user\") {\r\n <ng-container *ngTemplateOutlet=\"userTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Multi-select lookup -->\r\n @case (\"lookupmultiselect\") {\r\n <ng-container\r\n *ngTemplateOutlet=\"lookupMultiselectTemplate\"\r\n ></ng-container>\r\n }\r\n\r\n <!-- Multi user -->\r\n @case (\"multiuser\") {\r\n <ng-container *ngTemplateOutlet=\"multiUserTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Dynamic List -->\r\n @case (\"dynamiclist\") {\r\n <ng-container *ngTemplateOutlet=\"dynamicListTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Location -->\r\n @case (\"location\") {\r\n <ng-container *ngTemplateOutlet=\"locationTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Default: treat as text -->\r\n @default {\r\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\r\n }\r\n }\r\n</div>\r\n\r\n<!-- Text Template -->\r\n<ng-template #textTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div\r\n class=\"font-semibold\"\r\n [class.text-ellipsis]=\"limitWords()\"\r\n [class.overflow-hidden]=\"limitWords()\"\r\n [class.whitespace-nowrap]=\"limitWords()\"\r\n [style.max-width]=\"limitWords() ? '200px' : 'auto'\"\r\n [title]=\"textValue()\"\r\n >\r\n {{ textValue() || \"__\" }}\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Long Text Template: the value is rich-text HTML, so render it as markup\r\n (Angular sanitizes [innerHTML]) instead of printing the tags. -->\r\n<ng-template #longTextTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n @if (longTextTooltip()) {\r\n <div\r\n class=\"entity-long-text font-semibold break-words\"\r\n [class.entity-long-text-clamped]=\"displayType() === 'inTable'\"\r\n [title]=\"longTextTooltip()\"\r\n [innerHTML]=\"longTextHtml()\"\r\n ></div>\r\n } @else {\r\n <div class=\"font-semibold\">__</div>\r\n }\r\n</ng-template>\r\n\r\n<!-- Number Template -->\r\n<ng-template #numberTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"font-semibold\">\r\n {{ numericValue() !== null ? (numericValue() | number) : \"__\" }}\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Date Template -->\r\n<ng-template #dateTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"font-semibold\">\r\n {{ dateDisplayValue() || \"__\" }}\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Currency Template -->\r\n<ng-template #currencyTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"font-semibold\">\r\n {{ currencyDisplayValue() || \"__\" }}\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Time Template -->\r\n<ng-template #timeTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"font-semibold\">\r\n {{ timeDisplayValue() || \"__\" }}\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Lookup Template -->\r\n<ng-template #lookupTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n @if (lookupName()) {\r\n <span class=\"flex items-center gap-1\" [style.color]=\"lookupColor()\">\r\n @if (displayType() === \"entity\" && lookupColor()) {\r\n <span\r\n class=\"w-2 h-2 rounded-full inline-block\"\r\n [style.backgroundColor]=\"lookupColor()\"\r\n ></span>\r\n }\r\n {{ lookupName() }}\r\n </span>\r\n } @else {\r\n <span class=\"font-semibold\">__</span>\r\n }\r\n</ng-template>\r\n\r\n<!-- Checkbox Template -->\r\n<ng-template #checkboxTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"flex items-center\">\r\n <i\r\n [class]=\"\r\n checkboxValue()\r\n ? 'pi pi-check-square text-primary'\r\n : 'pi pi-stop text-muted-color'\r\n \"\r\n ></i>\r\n <span class=\"ml-2\">{{ checkboxLabel() }}</span>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Status Template -->\r\n<ng-template #statusTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"flex items-center gap-2\">\r\n @if (statusColor()) {\r\n <span\r\n class=\"w-2.5 h-2.5 rounded-full flex-shrink-0\"\r\n [style.backgroundColor]=\"statusColor()\"\r\n ></span>\r\n }\r\n <span [style.color]=\"statusColor()\">\r\n {{ statusName() || \"__\" }}\r\n </span>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Percentage Template -->\r\n<ng-template #percentageTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"flex items-center gap-2\">\r\n @if (\r\n displayType() !== \"inTable\" ||\r\n extraInfoData()?.showPercentageAsProgressBar\r\n ) {\r\n <div\r\n class=\"flex-1 h-2 bg-surface-200 rounded-full overflow-hidden max-w-24\"\r\n >\r\n <div\r\n class=\"h-full rounded-full transition-all\"\r\n [style.width.%]=\"percentageValue() || 0\"\r\n [style.backgroundColor]=\"percentageColor() || 'var(--primary-color)'\"\r\n ></div>\r\n </div>\r\n }\r\n @if (\r\n extraInfoData()?.showPercentageStatus &&\r\n !extraInfoData()?.showPercentageAsProgressBar\r\n ) {\r\n <span\r\n class=\"w-2.5 h-2.5 rounded-full\"\r\n [style.backgroundColor]=\"percentageColor() || '#000'\"\r\n ></span>\r\n }\r\n <span [style.color]=\"percentageColor()\">\r\n {{\r\n percentageValue() !== null\r\n ? (percentageValue() | number: \"1.0-0\") + \"%\"\r\n : \"__\"\r\n }}\r\n </span>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Slider Template -->\r\n<ng-template #sliderTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"flex items-center gap-2\">\r\n <div\r\n class=\"flex-1 h-2 bg-surface-200 rounded-full overflow-hidden max-w-32\"\r\n >\r\n <div\r\n class=\"h-full bg-primary rounded-full transition-all\"\r\n [style.width.%]=\"sliderValue() || 0\"\r\n ></div>\r\n </div>\r\n <span class=\"text-sm\">{{ sliderValue() || 0 }}%</span>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- User Template -->\r\n<ng-template #userTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n @if (userData()) {\r\n <div class=\"flex items-center gap-2\">\r\n @if (userPhoto()) {\r\n <img\r\n [src]=\"userPhoto() | secureImage: true : httpContext : 'avatar/'\"\r\n alt=\"User avatar\"\r\n class=\"w-8 h-8 rounded-full object-cover\"\r\n />\r\n } @else {\r\n <div\r\n class=\"w-8 h-8 rounded-full bg-primary/20 flex items-center justify-center text-primary font-semibold text-sm\"\r\n >\r\n {{ userInitials() }}\r\n </div>\r\n }\r\n <span class=\"font-medium\">{{ userName() }}</span>\r\n </div>\r\n } @else {\r\n <span class=\"font-semibold\">__</span>\r\n }\r\n</ng-template>\r\n\r\n<!-- Lookup Multiselect Template -->\r\n<ng-template #lookupMultiselectTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n @if (multiselectValues()?.length) {\r\n <div class=\"flex flex-wrap gap-1\">\r\n @for (item of multiselectValues(); track item.key || $index) {\r\n <!-- A lookup value is { key, display, color } \u2014 `details.color` alone\r\n left every chip on the grey fallback. Same order as lookupColor(). -->\r\n <span\r\n class=\"px-2 py-0.5 rounded-full text-xs font-medium\"\r\n [style.backgroundColor]=\"\r\n (item.details?.color || item.color || '#6b7280') + '20'\r\n \"\r\n [style.color]=\"item.details?.color || item.color || '#6b7280'\"\r\n >\r\n {{ item.name || item.display || item.key || item }}\r\n </span>\r\n }\r\n </div>\r\n } @else {\r\n <span class=\"font-semibold\">__</span>\r\n }\r\n</ng-template>\r\n\r\n<!-- Multi User Template -->\r\n<ng-template #multiUserTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n @if (multiUserValues()?.length) {\r\n <div class=\"flex items-center -space-x-2\">\r\n @for (user of multiUserValues().slice(0, 5); track user.id || $index) {\r\n @if (getUserPhoto(user); as userPhoto) {\r\n <img\r\n [src]=\"userPhoto | secureImage: true : httpContext : 'avatar/'\"\r\n [alt]=\"user.name || user.displayName\"\r\n class=\"w-7 h-7 rounded-full border-2 border-white object-cover\"\r\n />\r\n } @else {\r\n <div\r\n class=\"w-7 h-7 rounded-full border-2 border-white bg-primary/20 flex items-center justify-center text-primary font-semibold text-xs\"\r\n >\r\n {{ getInitials(user.name || user.displayName) }}\r\n </div>\r\n }\r\n }\r\n @if (multiUserValues().length > 5) {\r\n <div\r\n class=\"w-7 h-7 rounded-full border-2 border-white bg-surface-300 flex items-center justify-center text-xs font-medium\"\r\n >\r\n +{{ multiUserValues().length - 5 }}\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <span class=\"font-semibold\">__</span>\r\n }\r\n</ng-template>\r\n\r\n<!-- Dynamic List Template -->\r\n<ng-template #dynamicListTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n @if (dynamicListValues()?.length) {\r\n <div class=\"flex flex-col gap-1\">\r\n @for (item of dynamicListValues(); track $index) {\r\n <div class=\"text-sm\">\r\n {{ item?.label || item?.name || item }}\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <span class=\"font-semibold\">__</span>\r\n }\r\n</ng-template>\r\n\r\n<!-- Location Template -->\r\n<ng-template #locationTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"font-semibold\">\r\n {{ locationDisplayValue() || \"__\" }}\r\n </div>\r\n</ng-template>\r\n", styles: [":host{display:block}.text-ellipsis{text-overflow:ellipsis}.entity-long-text ::ng-deep :is(p,ul,ol,h1,h2,h3,h4,h5,h6){margin:0}.entity-long-text-clamped{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.entity-long-text-clamped ::ng-deep :is(p,div,li,h1,h2,h3,h4,h5,h6){display:inline}.entity-long-text-clamped ::ng-deep :is(p,div,li,h1,h2,h3,h4,h5,h6):after{content:\" \"}\n"] }]
|
|
31183
|
-
}], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], displayType: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayType", required: false }] }], extraInfoData: [{ type: i0.Input, args: [{ isSignal: true, alias: "extraInfoData", required: false }] }], limitWords: [{ type: i0.Input, args: [{ isSignal: true, alias: "limitWords", required: false }] }], customClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "customClass", required: false }] }] } });
|
|
31184
|
-
|
|
31185
|
-
/**
|
|
31186
|
-
* Table Card Component
|
|
31187
|
-
*
|
|
31188
|
-
* Displays data in a table format with entity-info rendering.
|
|
31189
|
-
* Matches old app-table-card + app-table behavior.
|
|
31190
|
-
*
|
|
31191
|
-
* Features:
|
|
31192
|
-
* - Grouped and non-grouped modes
|
|
31193
|
-
* - Entity-info rendering for each cell viewType
|
|
31194
|
-
* - Column sorting
|
|
31195
|
-
* - Row click actions
|
|
31196
|
-
* - Style configuration
|
|
31197
|
-
* - Status labels
|
|
31198
|
-
*/
|
|
31199
|
-
/**
|
|
31200
|
-
* Helper: switch all keys to lowercase
|
|
31201
|
-
*/
|
|
31202
|
-
function switchAllKeysSmall(obj) {
|
|
31203
|
-
if (!obj || typeof obj !== 'object')
|
|
31204
|
-
return obj;
|
|
31205
|
-
const result = {};
|
|
31206
|
-
Object.keys(obj).forEach((key) => {
|
|
31207
|
-
result[key.toLowerCase()] = obj[key];
|
|
31208
|
-
});
|
|
31209
|
-
return result;
|
|
31210
|
-
}
|
|
31211
|
-
/**
|
|
31212
|
-
* Helper: get object with keys in lowercase
|
|
31213
|
-
*/
|
|
31214
|
-
function getObjectKeysInLowerCase(obj) {
|
|
31215
|
-
if (!obj || typeof obj !== 'object')
|
|
31216
|
-
return obj;
|
|
31217
|
-
const result = {};
|
|
31218
|
-
Object.keys(obj).forEach((key) => {
|
|
31219
|
-
result[key.toLowerCase()] = obj[key];
|
|
31220
|
-
});
|
|
31221
|
-
return result;
|
|
31222
|
-
}
|
|
31223
|
-
function unwrapEntityValue(value) {
|
|
31224
|
-
if (value === null || value === undefined)
|
|
31225
|
-
return value;
|
|
31226
|
-
if (typeof value !== 'object')
|
|
31227
|
-
return value;
|
|
31228
|
-
const wrapped = value.value;
|
|
31229
|
-
if (wrapped !== undefined && wrapped !== null) {
|
|
31230
|
-
if (typeof wrapped !== 'object')
|
|
31231
|
-
return wrapped;
|
|
31232
|
-
return (wrapped.value ??
|
|
31233
|
-
wrapped.key ??
|
|
31234
|
-
wrapped.id ??
|
|
31235
|
-
wrapped.actualValue ??
|
|
31236
|
-
wrapped.displayValue ??
|
|
31237
|
-
wrapped.name ??
|
|
31238
|
-
wrapped.displayName ??
|
|
31239
|
-
wrapped.display ??
|
|
31240
|
-
wrapped);
|
|
31241
|
-
}
|
|
31242
|
-
return (value.rawValue ??
|
|
31243
|
-
value.actualValue ??
|
|
31244
|
-
value.key ??
|
|
31245
|
-
value.id ??
|
|
31246
|
-
value.displayValue ??
|
|
31247
|
-
value.displayName ??
|
|
31248
|
-
value.name ??
|
|
31249
|
-
value.display ??
|
|
31250
|
-
value);
|
|
31251
|
-
}
|
|
31252
|
-
function displayEntityValue(value) {
|
|
31253
|
-
if (value === null || value === undefined)
|
|
31254
|
-
return '';
|
|
31255
|
-
if (typeof value !== 'object')
|
|
31256
|
-
return String(value);
|
|
31257
|
-
const wrapped = value.value;
|
|
31258
|
-
if (wrapped && typeof wrapped === 'object') {
|
|
31259
|
-
const display = wrapped.display;
|
|
31260
|
-
return String(wrapped.displayName ??
|
|
31261
|
-
wrapped.name ??
|
|
31262
|
-
(typeof display === 'object'
|
|
31263
|
-
? display?.name || display?.displayName || display?.label
|
|
31264
|
-
: display) ??
|
|
31265
|
-
wrapped.value ??
|
|
31266
|
-
wrapped.key ??
|
|
31267
|
-
'');
|
|
31268
|
-
}
|
|
31269
|
-
return String(value.displayName ??
|
|
31270
|
-
value.name ??
|
|
31271
|
-
value.display ??
|
|
31272
|
-
value.label ??
|
|
31273
|
-
unwrapEntityValue(value) ??
|
|
31274
|
-
'');
|
|
31275
|
-
}
|
|
31276
|
-
/**
|
|
31277
|
-
* One entry per property key across ALL rows, in first-seen order. Rows from
|
|
31278
|
-
* different sources of a multi-source table carry different keys (milestone_*
|
|
31279
|
-
* on some, deliverable_* on others); building columns from a single "widest"
|
|
31280
|
-
* row dropped every other source's columns and showed their values as empty.
|
|
31281
|
-
*/
|
|
31282
|
-
function columnSample(values) {
|
|
31283
|
-
const sample = {};
|
|
31284
|
-
values.forEach((item) => {
|
|
31285
|
-
const itemLower = getObjectKeysInLowerCase(item || {});
|
|
31286
|
-
Object.keys(itemLower).forEach((key) => {
|
|
31287
|
-
if (!(key in sample))
|
|
31288
|
-
sample[key] = itemLower[key];
|
|
31289
|
-
});
|
|
31290
|
-
});
|
|
31291
|
-
return sample;
|
|
31292
|
-
}
|
|
31293
|
-
function normalizeIdentity(value) {
|
|
31294
|
-
return String(value ?? '')
|
|
31295
|
-
.trim()
|
|
31296
|
-
.toLowerCase()
|
|
31297
|
-
.replace(/[\s_-]+/g, '');
|
|
31298
|
-
}
|
|
31299
|
-
function fieldIdentity(prop, fallbackKey) {
|
|
31300
|
-
return [prop?.normalizedKey, prop?.key, fallbackKey, prop?.label, prop?.name]
|
|
31301
|
-
.map(normalizeIdentity)
|
|
31302
|
-
.filter(Boolean)
|
|
31303
|
-
.join('|');
|
|
31304
|
-
}
|
|
31305
|
-
function isIdentityField(prop, fallbackKey) {
|
|
31306
|
-
const identities = [
|
|
31307
|
-
normalizeIdentity(fallbackKey),
|
|
31308
|
-
normalizeIdentity(prop?.normalizedKey),
|
|
31309
|
-
normalizeIdentity(prop?.key),
|
|
31310
|
-
normalizeIdentity(prop?.label),
|
|
31311
|
-
].filter(Boolean);
|
|
31312
|
-
return identities.some((identity) => identity === 'id' ||
|
|
31313
|
-
identity.endsWith('id') ||
|
|
31314
|
-
identity === 'identifier' ||
|
|
31315
|
-
identity.includes('leveldataid') ||
|
|
31316
|
-
identity.includes('moduledataid') ||
|
|
31317
|
-
identity.includes('entityid'));
|
|
31318
|
-
}
|
|
31319
|
-
function toBooleanValue(value) {
|
|
31320
|
-
const primitive = unwrapEntityValue(value);
|
|
31321
|
-
if (typeof primitive === 'boolean')
|
|
31322
|
-
return primitive;
|
|
31323
|
-
if (typeof primitive === 'number')
|
|
31324
|
-
return primitive === 1;
|
|
31325
|
-
const text = String(primitive ?? '')
|
|
31326
|
-
.trim()
|
|
31327
|
-
.toLowerCase();
|
|
31328
|
-
return text === 'true' || text === '1' || text === 'yes';
|
|
31329
|
-
}
|
|
31330
|
-
function toNumberValue(value) {
|
|
31331
|
-
const primitive = unwrapEntityValue(value);
|
|
31332
|
-
if (primitive === null ||
|
|
31333
|
-
primitive === undefined ||
|
|
31334
|
-
(typeof primitive === 'string' && !primitive.trim())) {
|
|
31335
|
-
return null;
|
|
31336
|
-
}
|
|
31337
|
-
const num = Number(primitive);
|
|
31338
|
-
return Number.isFinite(num) ? num : null;
|
|
31339
|
-
}
|
|
31340
|
-
function getEntityColor(value) {
|
|
31341
|
-
const wrapped = value?.value;
|
|
31342
|
-
return (wrapped?.details?.color ||
|
|
31343
|
-
wrapped?.display?.color ||
|
|
31344
|
-
wrapped?.color ||
|
|
31345
|
-
value?.details?.color ||
|
|
31346
|
-
value?.display?.color ||
|
|
31347
|
-
value?.color ||
|
|
31348
|
-
'');
|
|
31349
|
-
}
|
|
31350
|
-
class TableCardComponent {
|
|
31351
|
-
virtualRowHeightPx = 48;
|
|
31352
|
-
virtualOverscanRows = 8;
|
|
31353
|
-
storeService = inject(DashboardItemStoreService);
|
|
31354
|
-
transloco = inject(TranslocoService);
|
|
31355
|
-
subscription = new Subscription();
|
|
31356
|
-
/** Dashboard ID */
|
|
31357
|
-
dashboardId = input.required(...(ngDevMode ? [{ debugName: "dashboardId" }] : /* istanbul ignore next */ []));
|
|
31358
|
-
/** Whether card is in a group */
|
|
31359
|
-
inGroup = input(false, ...(ngDevMode ? [{ debugName: "inGroup" }] : /* istanbul ignore next */ []));
|
|
31360
|
-
/** Hide the card header (e.g. inside a dialog where the dialog header suffices). */
|
|
31361
|
-
hideHeader = input(false, ...(ngDevMode ? [{ debugName: "hideHeader" }] : /* istanbul ignore next */ []));
|
|
31362
|
-
/** Action event output */
|
|
31363
|
-
onAction = output();
|
|
31364
|
-
/** Configuration item */
|
|
31365
|
-
configurationItem = signal(null, ...(ngDevMode ? [{ debugName: "configurationItem" }] : /* istanbul ignore next */ []));
|
|
31366
|
-
/** Raw data from handler */
|
|
31367
|
-
rawData = signal(null, ...(ngDevMode ? [{ debugName: "rawData" }] : /* istanbul ignore next */ []));
|
|
31368
|
-
/** Loading state */
|
|
31369
|
-
loading = signal(false, ...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
|
|
31370
|
-
/** Columns */
|
|
31371
|
-
columns = signal([], ...(ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []));
|
|
31372
|
-
/** Labels for status display */
|
|
31373
|
-
labels = signal([], ...(ngDevMode ? [{ debugName: "labels" }] : /* istanbul ignore next */ []));
|
|
31374
|
-
/** Table legends are visible by default for backward compatibility. */
|
|
31375
|
-
showLegend = computed(() => this.configurationItem()?.clientConfig?.configAsType?.['legend']?.['show'] !== false, ...(ngDevMode ? [{ debugName: "showLegend" }] : /* istanbul ignore next */ []));
|
|
31376
|
-
/**
|
|
31377
|
-
* Whether there is a legend to render at all. Shared by both hosts (the card
|
|
31378
|
-
* header's top-end slot and, when the header is hidden, the card body) so the
|
|
31379
|
-
* two never disagree about visibility.
|
|
31380
|
-
*/
|
|
31381
|
-
hasLegend = computed(() => this.showLegend() && this.labels().length > 0, ...(ngDevMode ? [{ debugName: "hasLegend" }] : /* istanbul ignore next */ []));
|
|
31382
|
-
legendPosition = computed(() => {
|
|
31383
|
-
const position = this.configurationItem()?.clientConfig?.configAsType?.['legend']?.['position'];
|
|
31384
|
-
return position === 'right' ||
|
|
31385
|
-
position === 'bottom' ||
|
|
31386
|
-
position === 'left'
|
|
31387
|
-
? position
|
|
31388
|
-
: 'top';
|
|
31389
|
-
}, ...(ngDevMode ? [{ debugName: "legendPosition" }] : /* istanbul ignore next */ []));
|
|
31390
|
-
legendIconType = computed(() => {
|
|
31391
|
-
const iconType = this.configurationItem()?.clientConfig?.configAsType?.['legend']?.['iconType'];
|
|
31392
|
-
return typeof iconType === 'string' && iconType ? iconType : 'circle';
|
|
31393
|
-
}, ...(ngDevMode ? [{ debugName: "legendIconType" }] : /* istanbul ignore next */ []));
|
|
31394
|
-
isSideLegend = computed(() => this.legendPosition() === 'left' || this.legendPosition() === 'right', ...(ngDevMode ? [{ debugName: "isSideLegend" }] : /* istanbul ignore next */ []));
|
|
31395
|
-
/** Processed table rows */
|
|
31396
|
-
tableRows = signal([], ...(ngDevMode ? [{ debugName: "tableRows" }] : /* istanbul ignore next */ []));
|
|
31397
|
-
/** Grouped data */
|
|
31398
|
-
groupedData = signal([], ...(ngDevMode ? [{ debugName: "groupedData" }] : /* istanbul ignore next */ []));
|
|
31399
|
-
/** Totals the backend calculated for a flat table's aggregations. */
|
|
31400
|
-
tableAggregates = signal([], ...(ngDevMode ? [{ debugName: "tableAggregates" }] : /* istanbul ignore next */ []));
|
|
31401
|
-
static AGGREGATE_LABEL_KEYS = {
|
|
31402
|
-
sum: 'sum',
|
|
31403
|
-
avg: 'average',
|
|
31404
|
-
average: 'average',
|
|
31405
|
-
count: 'count',
|
|
31406
|
-
min: 'min',
|
|
31407
|
-
max: 'max',
|
|
31408
|
-
formula: 'formula',
|
|
31409
|
-
};
|
|
31410
|
-
/**
|
|
31411
|
-
* "Sum · Actual Progress: 138.55" per aggregation (`{ propertyKey,
|
|
31412
|
-
* aggregateFunction, alias, value }`); an alias replaces the generated name.
|
|
31413
|
-
*/
|
|
31414
|
-
aggregateSummary(aggregates) {
|
|
31415
|
-
if (!Array.isArray(aggregates) || !aggregates.length)
|
|
31416
|
-
return '';
|
|
31417
|
-
const lang = this.transloco.getActiveLang();
|
|
31418
|
-
return aggregates
|
|
31419
|
-
.map((aggregate) => {
|
|
31420
|
-
const alias = String(aggregate?.alias ?? '').trim();
|
|
31421
|
-
const key = String(aggregate?.propertyKey ?? '').toLowerCase();
|
|
31422
|
-
const column = this.columns().find((col) => (col.keyPure ?? col.key)?.toLowerCase() === key);
|
|
31423
|
-
const fnKey = TableCardComponent.AGGREGATE_LABEL_KEYS[String(aggregate?.aggregateFunction ?? '').toLowerCase()];
|
|
31424
|
-
const name = alias ||
|
|
31425
|
-
[
|
|
31426
|
-
fnKey
|
|
31427
|
-
? this.transloco.translate(`dashboardBuilder.${fnKey}`)
|
|
31428
|
-
: aggregate?.aggregateFunction,
|
|
31429
|
-
column?.label ?? aggregate?.propertyKey,
|
|
31430
|
-
]
|
|
31431
|
-
.filter(Boolean)
|
|
31432
|
-
.join(' · ');
|
|
31433
|
-
const value = aggregate?.value === null || aggregate?.value === undefined
|
|
31434
|
-
? '-'
|
|
31435
|
-
: formatValue(aggregate.value, undefined, lang);
|
|
31436
|
-
return `${name}: ${value}`;
|
|
31437
|
-
})
|
|
31438
|
-
.join(' ');
|
|
31439
|
-
}
|
|
31440
|
-
/** Virtual scroll offset for the native dashboard table renderer. */
|
|
31441
|
-
tableScrollTop = signal(0, ...(ngDevMode ? [{ debugName: "tableScrollTop" }] : /* istanbul ignore next */ []));
|
|
31442
|
-
/** Current table viewport height. Defaults to the timeline/card body size. */
|
|
31443
|
-
tableViewportHeight = signal(520, ...(ngDevMode ? [{ debugName: "tableViewportHeight" }] : /* istanbul ignore next */ []));
|
|
31444
|
-
/** Title */
|
|
31445
|
-
title = computed(() => {
|
|
31446
|
-
const config = this.configurationItem();
|
|
31447
|
-
const lang = this.transloco.getActiveLang();
|
|
31448
|
-
return config?.clientConfig?.title?.[lang] || '';
|
|
31449
|
-
}, ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
31450
|
-
/** Table style config */
|
|
31451
|
-
tableStyleConfig = computed(() => {
|
|
31452
|
-
const config = this.configurationItem();
|
|
31453
|
-
return config?.clientConfig?.['tableFormat'] || null;
|
|
31454
|
-
}, ...(ngDevMode ? [{ debugName: "tableStyleConfig" }] : /* istanbul ignore next */ []));
|
|
31455
|
-
/** Last applied `column|direction` signature, to ignore unrelated edits. */
|
|
31456
|
-
lastSortSig = '';
|
|
31457
|
-
/**
|
|
31458
|
-
* Re-apply the configured sort live whenever `tableFormat.sortConfig`
|
|
31459
|
-
* changes. buildTable() only sorts on data load, so edits to the sort
|
|
31460
|
-
* column/direction in the settings drawer would otherwise not reflect in the
|
|
31461
|
-
* preview until the next data refresh. Reads/writes of rows + columns run
|
|
31462
|
-
* untracked so this never loops, and a signature guard skips unrelated config
|
|
31463
|
-
* edits (colors, labels) plus manual header sorts, which don't touch the
|
|
31464
|
-
* persisted sort config.
|
|
31465
|
-
*/
|
|
31466
|
-
_sortConfigSync = effect(() => {
|
|
31467
|
-
const sortConfig = this.tableStyleConfig()?.sortConfig;
|
|
31468
|
-
const column = sortConfig?.column ?? '';
|
|
31469
|
-
const direction = sortConfig?.direction ?? 'asc';
|
|
31470
|
-
const sig = `${column}|${direction}`;
|
|
31471
|
-
untracked(() => {
|
|
31472
|
-
if (sig === this.lastSortSig)
|
|
31473
|
-
return;
|
|
31474
|
-
const hadColumn = Boolean(this.lastSortSig.split('|')[0]);
|
|
31475
|
-
this.lastSortSig = sig;
|
|
31476
|
-
const data = this.rawData();
|
|
31477
|
-
if (!data)
|
|
31478
|
-
return;
|
|
31479
|
-
if (column) {
|
|
31480
|
-
this.applyDefaultSort();
|
|
31481
|
-
}
|
|
31482
|
-
else if (hadColumn) {
|
|
31483
|
-
// A configured sort column was cleared → rebuild to restore the
|
|
31484
|
-
// natural (data) order.
|
|
31485
|
-
this.buildTable(data);
|
|
31486
|
-
}
|
|
31487
|
-
});
|
|
31488
|
-
}, ...(ngDevMode ? [{ debugName: "_sortConfigSync" }] : /* istanbul ignore next */ []));
|
|
31489
|
-
/**
|
|
31490
|
-
* Hide the table's column-header (subheader) row.
|
|
31491
|
-
* Reads `clientConfig.tableFormat.hideTableSubheader`. Gated: defaults to
|
|
31492
|
-
* showing the header (current behavior) unless the flag is explicitly true.
|
|
31493
|
-
*/
|
|
31494
|
-
hideSubheader = computed(() => this.tableStyleConfig()?.hideTableSubheader === true, ...(ngDevMode ? [{ debugName: "hideSubheader" }] : /* istanbul ignore next */ []));
|
|
31495
|
-
/**
|
|
31496
|
-
* Whether to skip currency formatting on cells.
|
|
31497
|
-
* Reads `clientConfig.tableFormat.disableCurrencyFormat`. Gated: only true
|
|
31498
|
-
* when the flag is explicitly set.
|
|
31499
|
-
*/
|
|
31500
|
-
disableCurrencyFormat = computed(() => this.tableStyleConfig()?.disableCurrencyFormat === true, ...(ngDevMode ? [{ debugName: "disableCurrencyFormat" }] : /* istanbul ignore next */ []));
|
|
31501
|
-
/** "% status color" toggle — color percentage cells by the row's status. */
|
|
31502
|
-
showPercentageStatus = computed(() => this.tableStyleConfig()?.showPercentageStatus === true, ...(ngDevMode ? [{ debugName: "showPercentageStatus" }] : /* istanbul ignore next */ []));
|
|
31503
|
-
/**
|
|
31504
|
-
* Resolve the row's status colour from the column whose viewType is 'status'
|
|
31505
|
-
* (e.g. Delayed -> red, Completed -> green). Used to tint percentage cells.
|
|
31506
|
-
*/
|
|
31507
|
-
getRowStatusColor(row) {
|
|
31508
|
-
for (const col of this.columns()) {
|
|
31509
|
-
if (String(col.viewType || '').toLowerCase() !== 'status')
|
|
31510
|
-
continue;
|
|
31511
|
-
const cell = row?.[col.key] ?? row?.[col.keyPure || ''];
|
|
31512
|
-
const value = cell && typeof cell === 'object' ? cell.value : cell;
|
|
31513
|
-
const color = value?.details?.color || value?.color || cell?.color;
|
|
31514
|
-
if (color)
|
|
31515
|
-
return String(color);
|
|
31516
|
-
}
|
|
31517
|
-
return '';
|
|
31518
|
-
}
|
|
31519
|
-
/**
|
|
31520
|
-
* Extra-columns-from-lookup config persisted at `clientConfig.tableCoulmns`
|
|
31521
|
-
* (misspelling preserved on purpose). Shape: { extraCoulmnFromLookup,
|
|
31522
|
-
* lookupId, groupedBy, propKey }. Read here so the renderer can react to it;
|
|
31523
|
-
* the data-join itself is performed in buildTable when present.
|
|
31524
|
-
*/
|
|
31525
|
-
extraColumnsConfig = computed(() => {
|
|
31526
|
-
const config = this.configurationItem();
|
|
31527
|
-
return config?.clientConfig?.['tableCoulmns'] || null;
|
|
31528
|
-
}, ...(ngDevMode ? [{ debugName: "extraColumnsConfig" }] : /* istanbul ignore next */ []));
|
|
31529
|
-
/** Whether to show index column */
|
|
31530
|
-
showIndex = computed(() => {
|
|
31531
|
-
const config = this.configurationItem();
|
|
31532
|
-
return config?.clientConfig?.configAsType?.['hideIndex'] !== true;
|
|
31533
|
-
}, ...(ngDevMode ? [{ debugName: "showIndex" }] : /* istanbul ignore next */ []));
|
|
31534
|
-
/** Whether table is grouped */
|
|
31535
|
-
isGrouped = computed(() => {
|
|
31536
|
-
const config = this.configurationItem();
|
|
31537
|
-
return !!(config?.serviceConfig?.['groupBy'] ||
|
|
31538
|
-
config?.serviceConfig?.['groupByMultiple']?.length);
|
|
31539
|
-
}, ...(ngDevMode ? [{ debugName: "isGrouped" }] : /* istanbul ignore next */ []));
|
|
31540
|
-
/** Has data */
|
|
31541
|
-
hasData = computed(() => {
|
|
31542
|
-
if (this.isGrouped()) {
|
|
31543
|
-
return this.groupedData()?.some((g) => g.data?.length > 0);
|
|
31544
|
-
}
|
|
31545
|
-
return this.tableRows()?.length > 0;
|
|
31546
|
-
}, ...(ngDevMode ? [{ debugName: "hasData" }] : /* istanbul ignore next */ []));
|
|
31547
|
-
/** Visible columns (not hidden) */
|
|
31548
|
-
visibleColumns = computed(() => {
|
|
31549
|
-
const cols = this.columns();
|
|
31550
|
-
const hiddenCols = this.tableStyleConfig()?.hiddenColumns?.map((c) => c.toLowerCase()) || [];
|
|
31551
|
-
return cols.filter((col) => !col.hideColumn &&
|
|
31552
|
-
!hiddenCols.includes(col.key?.toLowerCase()) &&
|
|
31553
|
-
!hiddenCols.includes(col.keyPure?.toLowerCase() || ''));
|
|
31554
|
-
}, ...(ngDevMode ? [{ debugName: "visibleColumns" }] : /* istanbul ignore next */ []));
|
|
31555
|
-
/** Total columns (for colspan) */
|
|
31556
|
-
totalColumns = computed(() => {
|
|
31557
|
-
const base = this.visibleColumns().length;
|
|
31558
|
-
const hasIndex = !this.tableStyleConfig()?.hideIndex && this.showIndex();
|
|
31559
|
-
return hasIndex ? base + 1 : base;
|
|
31560
|
-
}, ...(ngDevMode ? [{ debugName: "totalColumns" }] : /* istanbul ignore next */ []));
|
|
31561
|
-
flatVirtualWindow = computed(() => this.resolveVirtualWindow(this.tableRows().length), ...(ngDevMode ? [{ debugName: "flatVirtualWindow" }] : /* istanbul ignore next */ []));
|
|
31562
|
-
visibleTableRows = computed(() => {
|
|
31563
|
-
const rows = this.tableRows();
|
|
31564
|
-
const { startIndex, endIndex } = this.flatVirtualWindow();
|
|
31565
|
-
return rows.slice(startIndex, endIndex).map((row, index) => {
|
|
31566
|
-
const rowIndex = startIndex + index;
|
|
31567
|
-
return {
|
|
31568
|
-
trackId: this.resolveRowTrackId(row, rowIndex),
|
|
31569
|
-
row,
|
|
31570
|
-
rowIndex,
|
|
31571
|
-
};
|
|
31572
|
-
});
|
|
31573
|
-
}, ...(ngDevMode ? [{ debugName: "visibleTableRows" }] : /* istanbul ignore next */ []));
|
|
31574
|
-
flatVirtualTopSpacerHeightPx = computed(() => this.flatVirtualWindow().startIndex * this.virtualRowHeightPx, ...(ngDevMode ? [{ debugName: "flatVirtualTopSpacerHeightPx" }] : /* istanbul ignore next */ []));
|
|
31575
|
-
flatVirtualBottomSpacerHeightPx = computed(() => {
|
|
31576
|
-
const { endIndex } = this.flatVirtualWindow();
|
|
31577
|
-
return Math.max(0, (this.tableRows().length - endIndex) * this.virtualRowHeightPx);
|
|
31578
|
-
}, ...(ngDevMode ? [{ debugName: "flatVirtualBottomSpacerHeightPx" }] : /* istanbul ignore next */ []));
|
|
31579
|
-
flattenedGroupedRows = computed(() => {
|
|
31580
|
-
const items = [];
|
|
31581
|
-
this.groupedData().forEach((group, groupIndex) => {
|
|
31582
|
-
const rows = Array.isArray(group?.data) ? group.data : [];
|
|
31583
|
-
if (!rows.length)
|
|
31584
|
-
return;
|
|
31585
|
-
items.push({
|
|
31586
|
-
kind: 'group',
|
|
31587
|
-
trackId: `group-${groupIndex}-${this.resolveGroupTrackId(group)}`,
|
|
31588
|
-
group,
|
|
31589
|
-
groupIndex,
|
|
31590
|
-
});
|
|
31591
|
-
rows.forEach((row, rowIndex) => {
|
|
31592
|
-
items.push({
|
|
31593
|
-
kind: 'row',
|
|
31594
|
-
trackId: `row-${groupIndex}-${this.resolveRowTrackId(row, rowIndex)}`,
|
|
31595
|
-
group,
|
|
31596
|
-
groupIndex,
|
|
31597
|
-
row,
|
|
31598
|
-
rowIndex,
|
|
31599
|
-
});
|
|
31600
|
-
});
|
|
31601
|
-
});
|
|
31602
|
-
return items;
|
|
31603
|
-
}, ...(ngDevMode ? [{ debugName: "flattenedGroupedRows" }] : /* istanbul ignore next */ []));
|
|
31604
|
-
groupedVirtualWindow = computed(() => this.resolveVirtualWindow(this.flattenedGroupedRows().length), ...(ngDevMode ? [{ debugName: "groupedVirtualWindow" }] : /* istanbul ignore next */ []));
|
|
31605
|
-
visibleGroupedRows = computed(() => {
|
|
31606
|
-
const rows = this.flattenedGroupedRows();
|
|
31607
|
-
const { startIndex, endIndex } = this.groupedVirtualWindow();
|
|
31608
|
-
return rows.slice(startIndex, endIndex);
|
|
31609
|
-
}, ...(ngDevMode ? [{ debugName: "visibleGroupedRows" }] : /* istanbul ignore next */ []));
|
|
31610
|
-
groupedVirtualTopSpacerHeightPx = computed(() => this.groupedVirtualWindow().startIndex * this.virtualRowHeightPx, ...(ngDevMode ? [{ debugName: "groupedVirtualTopSpacerHeightPx" }] : /* istanbul ignore next */ []));
|
|
31611
|
-
groupedVirtualBottomSpacerHeightPx = computed(() => {
|
|
31612
|
-
const { endIndex } = this.groupedVirtualWindow();
|
|
31613
|
-
return Math.max(0, (this.flattenedGroupedRows().length - endIndex) * this.virtualRowHeightPx);
|
|
31614
|
-
}, ...(ngDevMode ? [{ debugName: "groupedVirtualBottomSpacerHeightPx" }] : /* istanbul ignore next */ []));
|
|
31615
|
-
/** Row clickable */
|
|
31616
|
-
isRowClickable = computed(() => {
|
|
31617
|
-
const config = this.configurationItem();
|
|
31618
|
-
return config?.clientConfig?.actions?.some((a) => a.type === 'click' || a.type === 'dblclick' || a.type === 'rowClick');
|
|
31619
|
-
}, ...(ngDevMode ? [{ debugName: "isRowClickable" }] : /* istanbul ignore next */ []));
|
|
31620
|
-
ngOnInit() {
|
|
31621
|
-
const id = this.dashboardId();
|
|
31622
|
-
// Subscribe to configuration
|
|
31623
|
-
this.subscription.add(this.storeService
|
|
31624
|
-
.selectItemProperty$(id, 'ConfigurationItem')
|
|
31625
|
-
.subscribe((config) => {
|
|
31626
|
-
if (config) {
|
|
31627
|
-
this.configurationItem.set(config);
|
|
31628
|
-
}
|
|
31629
|
-
}));
|
|
31630
|
-
// Subscribe to data
|
|
31631
|
-
this.subscription.add(this.storeService
|
|
31632
|
-
.selectItemProperty$(id, 'DataHandled')
|
|
31633
|
-
.subscribe((data) => {
|
|
31634
|
-
this.rawData.set(data);
|
|
31635
|
-
this.buildTable(data);
|
|
31636
|
-
}));
|
|
31637
|
-
}
|
|
31638
|
-
ngOnDestroy() {
|
|
31639
|
-
this.clicks.cancel();
|
|
31640
|
-
this.subscription.unsubscribe();
|
|
31641
|
-
}
|
|
31642
|
-
onTableScroll(event) {
|
|
31643
|
-
const target = event.target;
|
|
31644
|
-
if (!target)
|
|
31645
|
-
return;
|
|
31646
|
-
this.tableScrollTop.set(target.scrollTop);
|
|
31647
|
-
this.tableViewportHeight.set(target.clientHeight || 520);
|
|
31648
|
-
}
|
|
31649
|
-
resolveVirtualWindow(totalRows) {
|
|
31650
|
-
if (totalRows <= 0) {
|
|
31651
|
-
return { startIndex: 0, endIndex: 0 };
|
|
31652
|
-
}
|
|
31653
|
-
const viewportRows = Math.max(1, Math.ceil(this.tableViewportHeight() / this.virtualRowHeightPx));
|
|
31654
|
-
const firstVisibleRow = Math.max(0, Math.floor(this.tableScrollTop() / this.virtualRowHeightPx));
|
|
31655
|
-
const startIndex = Math.max(0, firstVisibleRow - this.virtualOverscanRows);
|
|
31656
|
-
const endIndex = Math.min(totalRows, firstVisibleRow + viewportRows + this.virtualOverscanRows);
|
|
31657
|
-
return { startIndex, endIndex };
|
|
31658
|
-
}
|
|
31659
|
-
resolveRowTrackId(row, index) {
|
|
31660
|
-
const rawId = row?.Id?.value ??
|
|
31661
|
-
row?.Id ??
|
|
31662
|
-
row?.id?.value ??
|
|
31663
|
-
row?.id ??
|
|
31664
|
-
row?._index ??
|
|
31665
|
-
index;
|
|
31666
|
-
return String(rawId);
|
|
31667
|
-
}
|
|
31668
|
-
resolveGroupTrackId(group) {
|
|
31669
|
-
const prop = group?.prop;
|
|
31670
|
-
return String(prop?.key ??
|
|
31671
|
-
prop?.value?.key ??
|
|
31672
|
-
prop?.value ??
|
|
31673
|
-
prop?.label ??
|
|
31674
|
-
prop?.name ??
|
|
31675
|
-
'');
|
|
31676
|
-
}
|
|
31677
|
-
/**
|
|
31678
|
-
* Build table columns and rows from raw data
|
|
31679
|
-
* Matches old buildTable logic in table-card.component.ts
|
|
31680
|
-
*/
|
|
31681
|
-
buildTable(data) {
|
|
31682
|
-
this.tableScrollTop.set(0);
|
|
31683
|
-
if (!data) {
|
|
31684
|
-
this.columns.set([]);
|
|
31685
|
-
this.tableRows.set([]);
|
|
31686
|
-
this.groupedData.set([]);
|
|
31687
|
-
this.labels.set([]);
|
|
31688
|
-
return;
|
|
31689
|
-
}
|
|
31690
|
-
const config = this.configurationItem();
|
|
31691
|
-
const languageCode = this.transloco.getActiveLang() || 'en';
|
|
31692
|
-
// Apply color overrides from percentage properties
|
|
31693
|
-
const colorConfig = config?.clientConfig?.configAsType?.['overrideSelectedPropertiesColors'];
|
|
31694
|
-
if (colorConfig && data.values) {
|
|
31695
|
-
data.values = fillColorForPercentageProperty(data.values, colorConfig);
|
|
31696
|
-
}
|
|
31697
|
-
// Get localization config
|
|
31698
|
-
const configLocalization = this.storeService.getLocalization?.() || {};
|
|
31699
|
-
const localization = switchAllKeysSmall(configLocalization);
|
|
31700
|
-
// Get label overrides
|
|
31701
|
-
const overrideLabels = switchAllKeysSmall(config?.clientConfig?.configAsType?.['overrideSelectedPropertiesLabels'] || {});
|
|
31702
|
-
if (this.isPhaseGateTable(config)) {
|
|
31703
|
-
this.buildPhaseGateTable(data, languageCode, localization, overrideLabels, config);
|
|
31704
|
-
return;
|
|
31705
|
-
}
|
|
31706
|
-
// Totals of the Aggregation Properties: the response root carries them
|
|
31707
|
-
// for a flat table, each group's data for a grouped one (#1850).
|
|
31708
|
-
this.tableAggregates.set(!this.isGrouped() && Array.isArray(data?.aggregates)
|
|
31709
|
-
? data.aggregates
|
|
31710
|
-
: []);
|
|
31711
|
-
if (this.isGrouped()) {
|
|
31712
|
-
// Grouped mode
|
|
31713
|
-
this.buildGroupedTable(data, languageCode, localization, overrideLabels);
|
|
31714
|
-
}
|
|
31715
|
-
else {
|
|
31716
|
-
// Non-grouped mode
|
|
31717
|
-
this.buildFlatTable(data, languageCode, localization, overrideLabels);
|
|
31718
|
-
}
|
|
31719
|
-
// Set labels. Grouped table responses are arrays, so labels may live on
|
|
31720
|
-
// the first group data block rather than at the response root.
|
|
31721
|
-
const dataLabels = this.extractLabels(data);
|
|
31722
|
-
this.labels.set(this.applyLegendOrder(dataLabels.map((l) => ({
|
|
31723
|
-
...l,
|
|
31724
|
-
shape: 'circle',
|
|
31725
|
-
}))));
|
|
31726
|
-
}
|
|
31727
|
-
/**
|
|
31728
|
-
* Build flat (non-grouped) table
|
|
31729
|
-
*/
|
|
31730
|
-
buildFlatTable(data, languageCode, localization, overrideLabels) {
|
|
31731
|
-
let values = data?.values || [];
|
|
31732
|
-
if (!values.length) {
|
|
31733
|
-
this.columns.set([]);
|
|
31734
|
-
this.tableRows.set([]);
|
|
31735
|
-
return;
|
|
31736
|
-
}
|
|
31737
|
-
// Apply lookupProperty ordering if configured
|
|
31738
|
-
const config = this.configurationItem();
|
|
31739
|
-
const lookupProperty = config?.serviceConfig?.query?.['lookupProperty'] ||
|
|
31740
|
-
config?.serviceConfig?.['lookupProperty'];
|
|
31741
|
-
const orderConfig = config?.clientConfig?.['orderConfig'];
|
|
31742
|
-
if (lookupProperty && orderConfig) {
|
|
31743
|
-
values = dynamicReorder({
|
|
31744
|
-
array: values,
|
|
31745
|
-
orderConfig: orderConfig,
|
|
31746
|
-
path: lookupProperty + '.value.key',
|
|
31747
|
-
});
|
|
31748
|
-
}
|
|
31749
|
-
const sampleItem = columnSample(values);
|
|
31750
|
-
// Build columns
|
|
31751
|
-
const cols = Object.keys(sampleItem).map((key, index) => {
|
|
31752
|
-
const prop = sampleItem[key];
|
|
31753
|
-
const overrideLabel = overrideLabels?.[key.toLowerCase()]?.[languageCode];
|
|
31754
|
-
return {
|
|
31755
|
-
key: prop?.normalizedKey !== 'Id'
|
|
31756
|
-
? (prop?.normalizedKey || key) + index
|
|
31757
|
-
: prop?.normalizedKey,
|
|
31758
|
-
keyPure: key,
|
|
31759
|
-
label: overrideLabel ||
|
|
31760
|
-
localization?.[key.toLowerCase()]?.[languageCode] ||
|
|
31761
|
-
prop?.label ||
|
|
31762
|
-
key,
|
|
31763
|
-
viewType: prop?.viewType,
|
|
31764
|
-
columnType: 'entity',
|
|
31765
|
-
hideColumn: isIdentityField(prop, key),
|
|
31766
|
-
};
|
|
31767
|
-
});
|
|
31768
|
-
this.columns.set(cols);
|
|
31769
|
-
// Build rows - store full entity data for each cell
|
|
31770
|
-
const rows = values.map((item, rowIndex) => {
|
|
31771
|
-
const itemLower = getObjectKeysInLowerCase(item);
|
|
31772
|
-
const rowData = { _index: rowIndex, _original: item };
|
|
31773
|
-
cols.forEach((col) => {
|
|
31774
|
-
// Find matching key in item by keyPure
|
|
31775
|
-
if (col.keyPure && itemLower[col.keyPure]) {
|
|
31776
|
-
rowData[col.key] = itemLower[col.keyPure];
|
|
31777
|
-
}
|
|
31778
|
-
});
|
|
31779
|
-
// Add Id for row click
|
|
31780
|
-
const idKey = Object.keys(item).find((k) => isIdentityField(item[k], k));
|
|
31781
|
-
if (idKey) {
|
|
31782
|
-
rowData['Id'] = item[idKey];
|
|
31783
|
-
}
|
|
31784
|
-
return rowData;
|
|
31785
|
-
});
|
|
31786
|
-
this.tableRows.set(rows);
|
|
31787
|
-
this.applyDefaultSort();
|
|
31788
|
-
}
|
|
31789
|
-
/**
|
|
31790
|
-
* Apply the configured default sort (tableFormat.sortConfig) on load. The
|
|
31791
|
-
* configured column is a selected-property key; match it against the built
|
|
31792
|
-
* columns (by keyPure / key prefix, case-insensitive) and sort the flat rows.
|
|
31793
|
-
* No-op when no sortConfig.column is set.
|
|
31794
|
-
*/
|
|
31795
|
-
applyDefaultSort() {
|
|
31796
|
-
const sortConfig = this.tableStyleConfig()?.sortConfig;
|
|
31797
|
-
const column = sortConfig?.column;
|
|
31798
|
-
if (!column)
|
|
31799
|
-
return;
|
|
31800
|
-
// Normalize like the hidden-columns match (strip separators + the trailing
|
|
31801
|
-
// index suffix on `key`) so the configured property key reliably resolves to
|
|
31802
|
-
// a built column whether it was stored as the key, normalizedKey or label.
|
|
31803
|
-
const norm = (s) => String(s ?? '')
|
|
31804
|
-
.toLowerCase()
|
|
31805
|
-
.replace(/[\s_-]+/g, '')
|
|
31806
|
-
.replace(/\d+$/, '');
|
|
31807
|
-
const target = norm(column);
|
|
31808
|
-
const cols = this.columns();
|
|
31809
|
-
const match = cols.find((c) => norm(c.keyPure) === target ||
|
|
31810
|
-
norm(c.key) === target ||
|
|
31811
|
-
norm(c.label) === target);
|
|
31812
|
-
if (!match)
|
|
31813
|
-
return;
|
|
31814
|
-
const asc = sortConfig?.direction !== 'desc';
|
|
31815
|
-
this.columns.set(cols.map((c) => ({
|
|
31816
|
-
...c,
|
|
31817
|
-
isSort: c.key === match.key,
|
|
31818
|
-
isAsc: c.key === match.key ? asc : c.isAsc,
|
|
31819
|
-
})));
|
|
31820
|
-
const rows = [...this.tableRows()];
|
|
31821
|
-
rows.sort((a, b) => {
|
|
31822
|
-
const aVal = this.getSortValue(a, match);
|
|
31823
|
-
const bVal = this.getSortValue(b, match);
|
|
31824
|
-
if (aVal === bVal)
|
|
31825
|
-
return 0;
|
|
31826
|
-
if (aVal === null || aVal === undefined)
|
|
31827
|
-
return 1;
|
|
31828
|
-
if (bVal === null || bVal === undefined)
|
|
31829
|
-
return -1;
|
|
31830
|
-
const comparison = aVal < bVal ? -1 : 1;
|
|
31831
|
-
return asc ? comparison : -comparison;
|
|
31832
|
-
});
|
|
31833
|
-
this.tableRows.set(rows);
|
|
31834
|
-
}
|
|
31835
|
-
/**
|
|
31836
|
-
* Build grouped table
|
|
31837
|
-
*/
|
|
31838
|
-
buildGroupedTable(data, languageCode, localization, overrideLabels) {
|
|
31839
|
-
if (!Array.isArray(data)) {
|
|
31840
|
-
this.columns.set([]);
|
|
31841
|
-
this.groupedData.set([]);
|
|
31842
|
-
return;
|
|
31843
|
-
}
|
|
31844
|
-
// Find first group with data to build columns
|
|
31845
|
-
let sampleItem = null;
|
|
31846
|
-
let sampleLabels = null;
|
|
31847
|
-
for (const groupItem of data) {
|
|
31848
|
-
if (groupItem.data?.values?.length > 0) {
|
|
31849
|
-
sampleItem = columnSample(groupItem.data.values);
|
|
31850
|
-
sampleLabels = groupItem.data.labels;
|
|
31851
|
-
break;
|
|
31852
|
-
}
|
|
31853
|
-
}
|
|
31854
|
-
if (!sampleItem) {
|
|
31855
|
-
this.columns.set([]);
|
|
31856
|
-
this.groupedData.set([]);
|
|
31857
|
-
return;
|
|
31858
|
-
}
|
|
31859
|
-
// Build columns
|
|
31860
|
-
const cols = Object.keys(sampleItem).map((key) => {
|
|
31861
|
-
const prop = sampleItem[key];
|
|
31862
|
-
const overrideLabel = overrideLabels?.[key.toLowerCase()]?.[languageCode];
|
|
31863
|
-
return {
|
|
31864
|
-
key: key,
|
|
31865
|
-
keyPure: key,
|
|
31866
|
-
label: overrideLabel ||
|
|
31867
|
-
localization?.[key.toLowerCase()]?.[languageCode] ||
|
|
31868
|
-
prop?.label ||
|
|
31869
|
-
key,
|
|
31870
|
-
viewType: prop?.viewType,
|
|
31871
|
-
columnType: 'entity',
|
|
31872
|
-
hideColumn: isIdentityField(prop, key),
|
|
31873
|
-
};
|
|
31874
|
-
});
|
|
31875
|
-
this.columns.set(cols);
|
|
31876
|
-
// Get lookupProperty ordering config
|
|
31877
|
-
const config = this.configurationItem();
|
|
31878
|
-
const lookupProperty = config?.serviceConfig?.query?.['lookupProperty'] ||
|
|
31879
|
-
config?.serviceConfig?.['lookupProperty'];
|
|
31880
|
-
const orderConfig = config?.clientConfig?.['orderConfig'];
|
|
31881
|
-
// Build grouped data
|
|
31882
|
-
const groups = data.map((groupItem) => {
|
|
31883
|
-
let groupValues = groupItem.data?.values || [];
|
|
31884
|
-
// Apply lookupProperty ordering to each group
|
|
31885
|
-
if (lookupProperty && orderConfig && groupValues.length) {
|
|
31886
|
-
groupValues = dynamicReorder({
|
|
31887
|
-
array: groupValues,
|
|
31888
|
-
orderConfig: orderConfig,
|
|
31889
|
-
path: lookupProperty + '.key',
|
|
31890
|
-
});
|
|
31891
|
-
}
|
|
31892
|
-
const processedData = groupValues.map((item) => {
|
|
31893
|
-
const itemLower = getObjectKeysInLowerCase(item);
|
|
31894
|
-
const rowData = { _original: item };
|
|
31895
|
-
Object.keys(itemLower).forEach((key) => {
|
|
31896
|
-
rowData[key] = itemLower[key];
|
|
31897
|
-
});
|
|
31898
|
-
return rowData;
|
|
31899
|
-
});
|
|
31900
|
-
return {
|
|
31901
|
-
prop: groupItem.groupByKey,
|
|
31902
|
-
data: processedData,
|
|
31903
|
-
aggregates: Array.isArray(groupItem.data?.aggregates)
|
|
31904
|
-
? groupItem.data.aggregates
|
|
31905
|
-
: [],
|
|
31906
|
-
};
|
|
31907
|
-
});
|
|
31908
|
-
this.groupedData.set(groups);
|
|
31909
|
-
this.labels.set(this.extractLabels(data, sampleLabels));
|
|
31910
|
-
}
|
|
31911
|
-
isPhaseGateTable(config) {
|
|
31912
|
-
return (config?.clientConfig?.componentName === 'phaseGateTable' ||
|
|
31913
|
-
config?.serviceConfig?.['componentName'] === 'phaseGateTable' ||
|
|
31914
|
-
config?.serviceConfig?.['serviceType'] === 'phaseGate');
|
|
31915
|
-
}
|
|
31916
|
-
buildPhaseGateTable(data, languageCode, localization, overrideLabels, config) {
|
|
31917
|
-
const values = this.extractPhaseGateValues(data);
|
|
31918
|
-
if (!values.length) {
|
|
31919
|
-
this.columns.set([]);
|
|
31920
|
-
this.tableRows.set([]);
|
|
31921
|
-
this.groupedData.set([]);
|
|
31922
|
-
this.labels.set([]);
|
|
31923
|
-
return;
|
|
31924
|
-
}
|
|
31925
|
-
const query = (config?.serviceConfig?.query ??
|
|
31926
|
-
{});
|
|
31927
|
-
const isCanonicalQuery = this.isCanonicalPhaseGateQuery(query);
|
|
31928
|
-
const sampleItem = this.findLargestRow(values);
|
|
31929
|
-
const fieldKeys = Object.keys(sampleItem);
|
|
31930
|
-
const phaseFields = this.resolvePhaseGateFields(values, query, isCanonicalQuery);
|
|
31931
|
-
const configuredBaseKeys = this.resolveConfiguredTableKeys(values, query, isCanonicalQuery);
|
|
31932
|
-
const baseKeys = (configuredBaseKeys ?? fieldKeys).filter((key) => {
|
|
31933
|
-
const prop = this.findFirstFieldValue(values, key);
|
|
31934
|
-
if (this.isConfiguredPhaseMetadataField(prop, key, phaseFields)) {
|
|
31935
|
-
return false;
|
|
31936
|
-
}
|
|
31937
|
-
if (!isCanonicalQuery && this.isLegacyPhaseGateMetaField(prop, key)) {
|
|
31938
|
-
return false;
|
|
31939
|
-
}
|
|
31940
|
-
return true;
|
|
31941
|
-
});
|
|
31942
|
-
const baseColumns = baseKeys.map((key, index) => {
|
|
31943
|
-
const prop = this.findFirstFieldValue(values, key);
|
|
31944
|
-
const overrideLabel = overrideLabels?.[key.toLowerCase()]?.[languageCode];
|
|
31945
|
-
return {
|
|
31946
|
-
key: !isIdentityField(prop, key) && prop?.normalizedKey
|
|
31947
|
-
? `${prop.normalizedKey}${index}`
|
|
31948
|
-
: key,
|
|
31949
|
-
keyPure: key,
|
|
31950
|
-
label: overrideLabel ||
|
|
31951
|
-
localization?.[key.toLowerCase()]?.[languageCode] ||
|
|
31952
|
-
prop?.label ||
|
|
31953
|
-
key,
|
|
31954
|
-
viewType: prop?.viewType,
|
|
31955
|
-
columnType: 'entity',
|
|
31956
|
-
hideColumn: isIdentityField(prop, key),
|
|
31957
|
-
};
|
|
31958
|
-
});
|
|
31959
|
-
const phaseOrder = new Map();
|
|
31960
|
-
values.forEach((item, encounterOrder) => {
|
|
31961
|
-
const row = getObjectKeysInLowerCase(item);
|
|
31962
|
-
const phaseValue = this.getPhaseGateFieldValue(row, phaseFields.phaseName);
|
|
31963
|
-
const phaseIdValue = this.getPhaseGateFieldValue(row, phaseFields.phaseId);
|
|
31964
|
-
const phaseLabel = this.getPhaseGateIdentityText(phaseValue) ||
|
|
31965
|
-
displayEntityValue(phaseIdValue) ||
|
|
31966
|
-
'Phase';
|
|
31967
|
-
const phaseIdentity = phaseFields.phaseId ? phaseIdValue : phaseValue;
|
|
31968
|
-
const phaseKey = this.toPhaseColumnKey(phaseIdentity, phaseLabel);
|
|
31969
|
-
if (!phaseOrder.has(phaseKey)) {
|
|
31970
|
-
phaseOrder.set(phaseKey, {
|
|
31971
|
-
label: phaseLabel,
|
|
31972
|
-
orderValue: this.getPhaseGateFieldValue(row, phaseFields.phaseOrder),
|
|
31973
|
-
encounterOrder,
|
|
31974
|
-
});
|
|
31975
|
-
}
|
|
31976
|
-
});
|
|
31977
|
-
const phaseColumns = Array.from(phaseOrder.entries())
|
|
31978
|
-
.sort((a, b) => this.comparePhaseGateOrder(a, b, phaseFields.phaseOrder !== null))
|
|
31979
|
-
.map(([key, value]) => ({
|
|
31980
|
-
key,
|
|
31981
|
-
label: value.label,
|
|
31982
|
-
columnType: 'phaseGate',
|
|
31983
|
-
width: '10rem',
|
|
31984
|
-
}));
|
|
31985
|
-
const rowMap = new Map();
|
|
31986
|
-
const statusLabels = new Map();
|
|
31987
|
-
values.forEach((item) => {
|
|
31988
|
-
const row = getObjectKeysInLowerCase(item);
|
|
31989
|
-
const groupKey = isCanonicalQuery
|
|
31990
|
-
? this.getCanonicalPhaseGateGroupKey(row, phaseFields.rowIdentity)
|
|
31991
|
-
: this.getLegacyPhaseGateGroupKey(row, baseColumns);
|
|
31992
|
-
let rowData = rowMap.get(groupKey);
|
|
31993
|
-
if (!rowData) {
|
|
31994
|
-
rowData = { _index: rowMap.size, _original: item };
|
|
31995
|
-
baseColumns.forEach((col) => {
|
|
31996
|
-
if (col.keyPure &&
|
|
31997
|
-
Object.prototype.hasOwnProperty.call(row, col.keyPure)) {
|
|
31998
|
-
rowData[col.key] = row[col.keyPure];
|
|
31999
|
-
}
|
|
32000
|
-
});
|
|
32001
|
-
if (isCanonicalQuery) {
|
|
32002
|
-
const identityValue = this.getPhaseGateFieldValue(row, phaseFields.rowIdentity);
|
|
32003
|
-
if (identityValue !== null && identityValue !== undefined) {
|
|
32004
|
-
rowData['Id'] = identityValue;
|
|
32005
|
-
}
|
|
32006
|
-
}
|
|
32007
|
-
else {
|
|
32008
|
-
const idKey = Object.keys(row).find((key) => isIdentityField(row[key], key));
|
|
32009
|
-
if (idKey) {
|
|
32010
|
-
rowData['Id'] = row[idKey];
|
|
32011
|
-
}
|
|
32012
|
-
}
|
|
32013
|
-
rowMap.set(groupKey, rowData);
|
|
32014
|
-
}
|
|
32015
|
-
const phaseValue = this.getPhaseGateFieldValue(row, phaseFields.phaseName);
|
|
32016
|
-
const phaseIdValue = this.getPhaseGateFieldValue(row, phaseFields.phaseId);
|
|
32017
|
-
const phaseLabel = this.getPhaseGateIdentityText(phaseValue) ||
|
|
32018
|
-
displayEntityValue(phaseIdValue) ||
|
|
32019
|
-
'Phase';
|
|
32020
|
-
const phaseIdentity = phaseFields.phaseId ? phaseIdValue : phaseValue;
|
|
32021
|
-
const phaseColumnKey = this.toPhaseColumnKey(phaseIdentity, phaseLabel);
|
|
32022
|
-
const cell = this.buildPhaseGateCell(row, phaseFields, item, phaseLabel);
|
|
32023
|
-
if (cell.statusLabel) {
|
|
32024
|
-
statusLabels.set(cell.statusLabel.toLowerCase(), {
|
|
32025
|
-
key: cell.statusLabel,
|
|
32026
|
-
label: cell.statusLabel,
|
|
32027
|
-
color: cell.statusColor || this.getPhaseGateCellColor(cell),
|
|
32028
|
-
});
|
|
32029
|
-
}
|
|
32030
|
-
rowData[phaseColumnKey] = cell;
|
|
32031
|
-
});
|
|
32032
|
-
this.columns.set([...baseColumns, ...phaseColumns]);
|
|
32033
|
-
this.tableRows.set(Array.from(rowMap.values()));
|
|
32034
|
-
this.groupedData.set([]);
|
|
32035
|
-
this.labels.set(this.applyLegendOrder(Array.from(statusLabels.values()).map((label) => ({
|
|
32036
|
-
...label,
|
|
32037
|
-
shape: 'circle',
|
|
32038
|
-
}))));
|
|
32039
|
-
}
|
|
32040
|
-
extractPhaseGateValues(data) {
|
|
32041
|
-
if (Array.isArray(data)) {
|
|
32042
|
-
return data.flatMap((group) => group?.data?.values || group?.values || []);
|
|
32043
|
-
}
|
|
32044
|
-
return Array.isArray(data?.values) ? data.values : [];
|
|
32045
|
-
}
|
|
32046
|
-
resolveConfiguredTableKeys(values, query, isCanonicalQuery) {
|
|
32047
|
-
const hasConfiguredList = isCanonicalQuery
|
|
32048
|
-
? Object.prototype.hasOwnProperty.call(query, 'baseProperties')
|
|
32049
|
-
: Object.prototype.hasOwnProperty.call(query, 'selectedProperties') ||
|
|
32050
|
-
Object.prototype.hasOwnProperty.call(query, 'properties');
|
|
32051
|
-
const configured = isCanonicalQuery
|
|
32052
|
-
? this.toStringArray(query['baseProperties'])
|
|
32053
|
-
: [
|
|
32054
|
-
...this.toStringArray(query['properties']),
|
|
32055
|
-
...this.toStringArray(query['selectedProperties']),
|
|
32056
|
-
];
|
|
32057
|
-
if (!configured.length)
|
|
32058
|
-
return hasConfiguredList ? [] : null;
|
|
32059
|
-
const seen = new Set();
|
|
32060
|
-
const resolved = [];
|
|
32061
|
-
configured.forEach((configuredKey) => {
|
|
32062
|
-
const responseKey = this.resolvePhaseGateFieldKey(values, configuredKey);
|
|
32063
|
-
if (!responseKey)
|
|
32064
|
-
return;
|
|
32065
|
-
const normalized = normalizePhaseGatePropertyIdentity(responseKey);
|
|
32066
|
-
if (seen.has(normalized))
|
|
32067
|
-
return;
|
|
32068
|
-
seen.add(normalized);
|
|
32069
|
-
resolved.push(responseKey.toLowerCase());
|
|
32070
|
-
});
|
|
32071
|
-
return resolved;
|
|
32072
|
-
}
|
|
32073
|
-
toStringArray(value) {
|
|
32074
|
-
if (!Array.isArray(value))
|
|
32075
|
-
return [];
|
|
32076
|
-
return value.filter((item) => typeof item === 'string');
|
|
32077
|
-
}
|
|
32078
|
-
findLargestRow(values) {
|
|
32079
|
-
let sample = getObjectKeysInLowerCase(values[0] || {});
|
|
32080
|
-
values.forEach((item) => {
|
|
32081
|
-
const itemLower = getObjectKeysInLowerCase(item);
|
|
32082
|
-
if (Object.keys(itemLower).length > Object.keys(sample).length) {
|
|
32083
|
-
sample = itemLower;
|
|
32084
|
-
}
|
|
32085
|
-
});
|
|
32086
|
-
return sample;
|
|
32087
|
-
}
|
|
32088
|
-
isCanonicalPhaseGateQuery(query) {
|
|
32089
|
-
return [
|
|
32090
|
-
query.rowIdentityProperty,
|
|
32091
|
-
query.phaseNameProperty,
|
|
32092
|
-
query.phaseStatusProperty,
|
|
32093
|
-
].every((value) => typeof value === 'string' && value.trim().length > 0);
|
|
32094
|
-
}
|
|
32095
|
-
resolvePhaseGateFields(values, query, isCanonicalQuery) {
|
|
32096
|
-
const configuredFields = {
|
|
32097
|
-
rowIdentity: this.readPhaseGateProperty(query.rowIdentityProperty),
|
|
32098
|
-
phaseName: this.readPhaseGateProperty(query.phaseNameProperty),
|
|
32099
|
-
phaseId: this.readPhaseGateProperty(query.phaseIdProperty),
|
|
32100
|
-
phaseOrder: this.readPhaseGateProperty(query.phaseOrderProperty),
|
|
32101
|
-
isCurrent: this.readPhaseGateProperty(query.phaseIsCurrentProperty),
|
|
32102
|
-
isCompleted: this.readPhaseGateProperty(query.phaseIsCompletedProperty),
|
|
32103
|
-
allItemsCompleted: this.readPhaseGateProperty(query.phaseAllItemsCompletedProperty),
|
|
32104
|
-
status: this.readPhaseGateProperty(query.phaseStatusProperty),
|
|
32105
|
-
percentage: this.readPhaseGateProperty(query.phaseProgressProperty),
|
|
32106
|
-
};
|
|
32107
|
-
if (isCanonicalQuery)
|
|
32108
|
-
return configuredFields;
|
|
32109
|
-
// A partially migrated dashboard remains on the legacy path, but any
|
|
32110
|
-
// explicit semantic role still wins and is resolved exactly.
|
|
32111
|
-
const lookupProperty = this.readPhaseGateProperty(query['lookupProperty']);
|
|
32112
|
-
const fields = {
|
|
32113
|
-
...configuredFields,
|
|
32114
|
-
status: configuredFields.status || lookupProperty,
|
|
32115
|
-
};
|
|
32116
|
-
fields.phaseName ??= this.resolveLegacyPhaseGateAlias(values, [
|
|
32117
|
-
'phase_name',
|
|
32118
|
-
'phasegate_name',
|
|
32119
|
-
]);
|
|
32120
|
-
fields.phaseId ??= this.resolveLegacyPhaseGateAlias(values, [
|
|
32121
|
-
'phase_schemagateid',
|
|
32122
|
-
'phasegate_id',
|
|
32123
|
-
'phasegateid',
|
|
32124
|
-
]);
|
|
32125
|
-
fields.phaseOrder ??= this.resolveLegacyPhaseGateAlias(values, [
|
|
32126
|
-
'phase_order',
|
|
32127
|
-
'phasegate_order',
|
|
32128
|
-
'phase_sequence',
|
|
32129
|
-
]);
|
|
32130
|
-
fields.isCurrent ??= this.resolveLegacyPhaseGateAlias(values, [
|
|
32131
|
-
'phase_iscurrent',
|
|
32132
|
-
'phasegate_iscurrent',
|
|
32133
|
-
'iscurrentphase',
|
|
32134
|
-
]);
|
|
32135
|
-
fields.isCompleted ??= this.resolveLegacyPhaseGateAlias(values, [
|
|
32136
|
-
'phase_iscompleted',
|
|
32137
|
-
'phasegate_iscompleted',
|
|
32138
|
-
'iscompletedphase',
|
|
32139
|
-
]);
|
|
32140
|
-
fields.allItemsCompleted ??= this.resolveLegacyPhaseGateAlias(values, [
|
|
32141
|
-
'phase_all_items_completed',
|
|
32142
|
-
'phasegate_all_items_completed',
|
|
32143
|
-
'allitemscompleted',
|
|
32144
|
-
]);
|
|
32145
|
-
fields.status ??= this.resolveLegacyPhaseGateAlias(values, [
|
|
32146
|
-
'phase_status',
|
|
32147
|
-
'phasegate_status',
|
|
32148
|
-
'phase_request_status',
|
|
32149
|
-
'phasegate_request_status',
|
|
32150
|
-
]);
|
|
32151
|
-
fields.percentage ??= this.resolveLegacyPhaseGateAlias(values, [
|
|
32152
|
-
'phase_percentage',
|
|
32153
|
-
'phasegate_percentage',
|
|
32154
|
-
'phase_progress',
|
|
32155
|
-
'phasegate_progress',
|
|
32156
|
-
]);
|
|
32157
|
-
fields.status ??= this.resolveLegacyFieldByViewType(values, [
|
|
32158
|
-
'status',
|
|
32159
|
-
'requeststatus',
|
|
32160
|
-
]);
|
|
32161
|
-
fields.percentage ??= this.resolveLegacyFieldByViewType(values, [
|
|
32162
|
-
'percentage',
|
|
32163
|
-
'slider',
|
|
32164
|
-
]);
|
|
32165
|
-
return fields;
|
|
32166
|
-
}
|
|
32167
|
-
findFirstFieldValue(values, key) {
|
|
32168
|
-
const normalizedKey = key.toLowerCase();
|
|
32169
|
-
for (const item of values) {
|
|
32170
|
-
const row = getObjectKeysInLowerCase(item);
|
|
32171
|
-
if (Object.prototype.hasOwnProperty.call(row, normalizedKey)) {
|
|
32172
|
-
return row[normalizedKey];
|
|
32173
|
-
}
|
|
32174
|
-
}
|
|
32175
|
-
return null;
|
|
32176
|
-
}
|
|
32177
|
-
readPhaseGateProperty(value) {
|
|
32178
|
-
return typeof value === 'string' && value.trim() ? value.trim() : null;
|
|
32179
|
-
}
|
|
32180
|
-
resolvePhaseGateFieldKey(values, configuredKey) {
|
|
32181
|
-
if (!configuredKey)
|
|
32182
|
-
return null;
|
|
32183
|
-
for (const item of values) {
|
|
32184
|
-
const row = getObjectKeysInLowerCase(item);
|
|
32185
|
-
const key = resolvePhaseGateResponseKey(row, configuredKey);
|
|
32186
|
-
if (key)
|
|
32187
|
-
return key;
|
|
32188
|
-
}
|
|
32189
|
-
return null;
|
|
32190
|
-
}
|
|
32191
|
-
resolveLegacyPhaseGateAlias(values, aliases) {
|
|
32192
|
-
for (const alias of aliases) {
|
|
32193
|
-
const key = this.resolvePhaseGateFieldKey(values, alias);
|
|
32194
|
-
if (key)
|
|
32195
|
-
return key;
|
|
32196
|
-
}
|
|
32197
|
-
return null;
|
|
32198
|
-
}
|
|
32199
|
-
resolveLegacyFieldByViewType(values, viewTypes) {
|
|
32200
|
-
const allowedTypes = new Set(viewTypes.map(normalizeIdentity));
|
|
32201
|
-
const candidateKeys = Array.from(new Set(values.flatMap((item) => Object.keys(getObjectKeysInLowerCase(item))))).sort((left, right) => {
|
|
32202
|
-
const leftProp = this.findFirstFieldValue(values, left);
|
|
32203
|
-
const rightProp = this.findFirstFieldValue(values, right);
|
|
32204
|
-
const leftIdentity = fieldIdentity(leftProp, left);
|
|
32205
|
-
const rightIdentity = fieldIdentity(rightProp, right);
|
|
32206
|
-
const leftPhaseRank = leftIdentity.includes('phasegate')
|
|
32207
|
-
? 0
|
|
32208
|
-
: leftIdentity.includes('phase')
|
|
32209
|
-
? 1
|
|
32210
|
-
: 2;
|
|
32211
|
-
const rightPhaseRank = rightIdentity.includes('phasegate')
|
|
32212
|
-
? 0
|
|
32213
|
-
: rightIdentity.includes('phase')
|
|
32214
|
-
? 1
|
|
32215
|
-
: 2;
|
|
32216
|
-
if (leftPhaseRank !== rightPhaseRank) {
|
|
32217
|
-
return leftPhaseRank - rightPhaseRank;
|
|
32218
|
-
}
|
|
32219
|
-
return leftIdentity.localeCompare(rightIdentity, undefined, {
|
|
32220
|
-
numeric: true,
|
|
32221
|
-
sensitivity: 'base',
|
|
32222
|
-
});
|
|
32223
|
-
});
|
|
32224
|
-
return (candidateKeys.find((key) => {
|
|
32225
|
-
const prop = this.findFirstFieldValue(values, key);
|
|
32226
|
-
return allowedTypes.has(normalizeIdentity(prop?.viewType));
|
|
32227
|
-
}) ?? null);
|
|
32228
|
-
}
|
|
32229
|
-
getPhaseGateFieldValue(row, property) {
|
|
32230
|
-
if (!property)
|
|
32231
|
-
return null;
|
|
32232
|
-
const responseKey = resolvePhaseGateResponseKey(row, property);
|
|
32233
|
-
return responseKey ? row[responseKey] : null;
|
|
32234
|
-
}
|
|
32235
|
-
getPhaseGateIdentityText(value) {
|
|
32236
|
-
const runtimeValue = unwrapEntityValue(value);
|
|
32237
|
-
if (runtimeValue !== null &&
|
|
32238
|
-
runtimeValue !== undefined &&
|
|
32239
|
-
typeof runtimeValue !== 'object') {
|
|
32240
|
-
return String(runtimeValue);
|
|
32241
|
-
}
|
|
32242
|
-
return displayEntityValue(value);
|
|
32243
|
-
}
|
|
32244
|
-
isConfiguredPhaseMetadataField(prop, key, fields) {
|
|
32245
|
-
const phaseMetadataRoles = [
|
|
32246
|
-
fields.phaseName,
|
|
32247
|
-
fields.phaseId,
|
|
32248
|
-
fields.phaseOrder,
|
|
32249
|
-
fields.status,
|
|
32250
|
-
fields.percentage,
|
|
32251
|
-
fields.isCurrent,
|
|
32252
|
-
fields.isCompleted,
|
|
32253
|
-
fields.allItemsCompleted,
|
|
32254
|
-
];
|
|
32255
|
-
const row = { [key]: prop };
|
|
32256
|
-
return phaseMetadataRoles.some((role) => !!role && resolvePhaseGateResponseKey(row, role) === key);
|
|
32257
|
-
}
|
|
32258
|
-
isLegacyPhaseGateMetaField(prop, key) {
|
|
32259
|
-
const aliases = [
|
|
32260
|
-
'phase_name',
|
|
32261
|
-
'phasegate_name',
|
|
32262
|
-
'phase_schemagateid',
|
|
32263
|
-
'phasegate_id',
|
|
32264
|
-
'phase_order',
|
|
32265
|
-
'phasegate_order',
|
|
32266
|
-
'phase_iscurrent',
|
|
32267
|
-
'phasegate_iscurrent',
|
|
32268
|
-
'phase_iscompleted',
|
|
32269
|
-
'phasegate_iscompleted',
|
|
32270
|
-
'phase_all_items_completed',
|
|
32271
|
-
'phasegate_all_items_completed',
|
|
32272
|
-
'phase_status',
|
|
32273
|
-
'phasegate_status',
|
|
32274
|
-
'phase_request_status',
|
|
32275
|
-
'phasegate_request_status',
|
|
32276
|
-
'phase_percentage',
|
|
32277
|
-
'phasegate_percentage',
|
|
32278
|
-
'phase_progress',
|
|
32279
|
-
'phasegate_progress',
|
|
32280
|
-
];
|
|
32281
|
-
const row = { [key]: prop };
|
|
32282
|
-
return aliases.some((alias) => resolvePhaseGateResponseKey(row, alias) === key);
|
|
32283
|
-
}
|
|
32284
|
-
toPhaseColumnKey(identityValue, fallbackLabel) {
|
|
32285
|
-
const primitiveIdentity = unwrapEntityValue(identityValue);
|
|
32286
|
-
const identity = normalizePhaseGatePropertyIdentity(primitiveIdentity || fallbackLabel || 'unknown');
|
|
32287
|
-
return `_phase_${identity || 'unknown'}`;
|
|
32288
|
-
}
|
|
32289
|
-
comparePhaseGateOrder(left, right, hasConfiguredOrder) {
|
|
32290
|
-
if (!hasConfiguredOrder) {
|
|
32291
|
-
return left[1].encounterOrder - right[1].encounterOrder;
|
|
32292
|
-
}
|
|
32293
|
-
// The order is the cell's own value. displayEntityValue would prefer the
|
|
32294
|
-
// wrapper's `label` — the property name ("Order") — making every phase
|
|
32295
|
-
// tie and the columns fall back to alphabetical order.
|
|
32296
|
-
const orderText = (value) => {
|
|
32297
|
-
const raw = unwrapEntityValue(value);
|
|
32298
|
-
return raw === null || raw === undefined || typeof raw === 'object'
|
|
32299
|
-
? ''
|
|
32300
|
-
: String(raw).trim();
|
|
32301
|
-
};
|
|
32302
|
-
const leftOrder = orderText(left[1].orderValue);
|
|
32303
|
-
const rightOrder = orderText(right[1].orderValue);
|
|
32304
|
-
if (leftOrder && rightOrder) {
|
|
32305
|
-
const leftNumber = Number(leftOrder);
|
|
32306
|
-
const rightNumber = Number(rightOrder);
|
|
32307
|
-
if (Number.isFinite(leftNumber) && Number.isFinite(rightNumber)) {
|
|
32308
|
-
const numericComparison = leftNumber - rightNumber;
|
|
32309
|
-
if (numericComparison !== 0)
|
|
32310
|
-
return numericComparison;
|
|
32311
|
-
}
|
|
32312
|
-
else {
|
|
32313
|
-
const textComparison = leftOrder.localeCompare(rightOrder, undefined, {
|
|
32314
|
-
numeric: true,
|
|
32315
|
-
sensitivity: 'base',
|
|
32316
|
-
});
|
|
32317
|
-
if (textComparison !== 0)
|
|
32318
|
-
return textComparison;
|
|
32319
|
-
}
|
|
32320
|
-
}
|
|
32321
|
-
else if (leftOrder || rightOrder) {
|
|
32322
|
-
return leftOrder ? -1 : 1;
|
|
32323
|
-
}
|
|
32324
|
-
const labelComparison = left[1].label.localeCompare(right[1].label, undefined, { numeric: true, sensitivity: 'base' });
|
|
32325
|
-
return labelComparison || left[0].localeCompare(right[0]);
|
|
32326
|
-
}
|
|
32327
|
-
getCanonicalPhaseGateGroupKey(row, rowIdentityProperty) {
|
|
32328
|
-
const identityValue = this.getPhaseGateFieldValue(row, rowIdentityProperty);
|
|
32329
|
-
return `id:${this.toStablePhaseGateValue(identityValue)}`;
|
|
32330
|
-
}
|
|
32331
|
-
getLegacyPhaseGateGroupKey(row, baseColumns) {
|
|
32332
|
-
const identityColumn = baseColumns.find((col) => col.keyPure && isIdentityField(row[col.keyPure], col.keyPure));
|
|
32333
|
-
if (identityColumn?.keyPure) {
|
|
32334
|
-
return `id:${this.toStablePhaseGateValue(row[identityColumn.keyPure])}`;
|
|
32335
|
-
}
|
|
32336
|
-
const parts = baseColumns
|
|
32337
|
-
.filter((col) => col.keyPure)
|
|
32338
|
-
.map((col) => this.toStablePhaseGateValue(row[col.keyPure]));
|
|
32339
|
-
return parts.some(Boolean)
|
|
32340
|
-
? `values:${JSON.stringify(parts)}`
|
|
32341
|
-
: 'values:unidentified';
|
|
32342
|
-
}
|
|
32343
|
-
toStablePhaseGateValue(value) {
|
|
32344
|
-
const primitive = unwrapEntityValue(value);
|
|
32345
|
-
if (primitive === null || primitive === undefined)
|
|
32346
|
-
return '';
|
|
32347
|
-
if (typeof primitive !== 'object')
|
|
32348
|
-
return String(primitive);
|
|
32349
|
-
return displayEntityValue(primitive);
|
|
32350
|
-
}
|
|
32351
|
-
buildPhaseGateCell(row, fields, original, phaseName) {
|
|
32352
|
-
const statusValue = this.getPhaseGateFieldValue(row, fields.status);
|
|
32353
|
-
const percentageValue = this.getPhaseGateFieldValue(row, fields.percentage);
|
|
32354
|
-
return {
|
|
32355
|
-
phaseName,
|
|
32356
|
-
statusLabel: displayEntityValue(statusValue),
|
|
32357
|
-
statusColor: getEntityColor(statusValue),
|
|
32358
|
-
percentage: toNumberValue(percentageValue),
|
|
32359
|
-
isCurrent: fields.isCurrent
|
|
32360
|
-
? toBooleanValue(this.getPhaseGateFieldValue(row, fields.isCurrent))
|
|
32361
|
-
: false,
|
|
32362
|
-
isCompleted: fields.isCompleted
|
|
32363
|
-
? toBooleanValue(this.getPhaseGateFieldValue(row, fields.isCompleted))
|
|
32364
|
-
: false,
|
|
32365
|
-
allItemsCompleted: fields.allItemsCompleted
|
|
32366
|
-
? toBooleanValue(this.getPhaseGateFieldValue(row, fields.allItemsCompleted))
|
|
32367
|
-
: false,
|
|
32368
|
-
raw: original,
|
|
32369
|
-
};
|
|
32370
|
-
}
|
|
32371
|
-
getLegendColor(label) {
|
|
32372
|
-
const override = resolveLegendColorOverride(this.configurationItem()?.clientConfig?.configAsType?.['legend']?.['colorOverrides'], this.getLegendText(label));
|
|
32373
|
-
return (override ||
|
|
32374
|
-
label?.details?.color ||
|
|
32375
|
-
label?.value?.details?.color ||
|
|
32376
|
-
label?.color ||
|
|
32377
|
-
label?.backgroundColor ||
|
|
32378
|
-
'#999');
|
|
32379
|
-
}
|
|
32380
|
-
getLegendText(label) {
|
|
32381
|
-
const languageCode = this.transloco.getActiveLang() || 'en';
|
|
32382
|
-
const localizedLabel = label?.label && typeof label.label === 'object'
|
|
32383
|
-
? label.label?.[languageCode] || label.label?.en || label.label?.ar
|
|
32384
|
-
: label?.label;
|
|
32385
|
-
const value = label?.value;
|
|
32386
|
-
return (localizedLabel ||
|
|
32387
|
-
label?.name ||
|
|
32388
|
-
label?.display ||
|
|
32389
|
-
label?.title ||
|
|
32390
|
-
value?.name ||
|
|
32391
|
-
value?.display ||
|
|
32392
|
-
value?.label ||
|
|
32393
|
-
value?.key ||
|
|
32394
|
-
label?.key ||
|
|
32395
|
-
'');
|
|
32396
|
-
}
|
|
32397
|
-
applyLegendOrder(labels) {
|
|
32398
|
-
return orderLegendItems(labels, getLegendOverrideOrder(this.configurationItem()), (label) => this.getLegendText(label));
|
|
32399
|
-
}
|
|
32400
|
-
extractLabels(data, fallback = null) {
|
|
32401
|
-
if (Array.isArray(fallback) && fallback.length) {
|
|
32402
|
-
return fallback;
|
|
32403
|
-
}
|
|
32404
|
-
if (Array.isArray(data)) {
|
|
32405
|
-
for (const groupItem of data) {
|
|
32406
|
-
const labels = groupItem?.data?.labels;
|
|
32407
|
-
if (Array.isArray(labels) && labels.length) {
|
|
32408
|
-
return labels;
|
|
32409
|
-
}
|
|
32410
|
-
}
|
|
32411
|
-
return [];
|
|
32412
|
-
}
|
|
32413
|
-
return Array.isArray(data?.labels) ? data.labels : [];
|
|
32414
|
-
}
|
|
32415
|
-
/**
|
|
32416
|
-
* Get cell data for entity-info component
|
|
32417
|
-
* Returns the full entity data object { viewType, value, label }
|
|
32418
|
-
*/
|
|
32419
|
-
getCellData(row, column) {
|
|
32420
|
-
const cellData = row[column.key] || row[column.keyPure || ''];
|
|
32421
|
-
if (!cellData) {
|
|
32422
|
-
return { viewType: column.viewType || 'text', value: null };
|
|
32423
|
-
}
|
|
32424
|
-
// If it's already an entity object with viewType
|
|
32425
|
-
if (typeof cellData === 'object' && cellData !== null) {
|
|
32426
|
-
const viewType = cellData.viewType || column.viewType || 'text';
|
|
32427
|
-
// disableCurrencyFormat: render currency cells as a plain number so no
|
|
32428
|
-
// currency formatting / symbol is applied. Gated — only when the flag is
|
|
32429
|
-
// set AND the cell is currency, otherwise behavior is unchanged.
|
|
32430
|
-
if (this.disableCurrencyFormat() &&
|
|
32431
|
-
String(viewType).toLowerCase() === 'currency') {
|
|
32432
|
-
return {
|
|
32433
|
-
viewType: 'number',
|
|
32434
|
-
value: unwrapEntityValue(cellData),
|
|
32435
|
-
label: cellData.label,
|
|
32436
|
-
};
|
|
32437
|
-
}
|
|
32438
|
-
const base = {
|
|
32439
|
-
viewType,
|
|
32440
|
-
value: cellData.value,
|
|
32441
|
-
label: cellData.label,
|
|
32442
|
-
};
|
|
32443
|
-
// "% status color": tint the percentage progress bar / dot by the ROW's
|
|
32444
|
-
// status property color (the column whose viewType is 'status'), instead
|
|
32445
|
-
// of the percentage cell's own (usually empty) color. Gated on the toggle.
|
|
32446
|
-
if (this.showPercentageStatus() &&
|
|
32447
|
-
String(viewType).toLowerCase() === 'percentage') {
|
|
32448
|
-
return { ...base, statusColor: this.getRowStatusColor(row) };
|
|
32449
|
-
}
|
|
32450
|
-
return base;
|
|
32451
|
-
}
|
|
32452
|
-
// Primitive value
|
|
32453
|
-
const primitiveViewType = column.viewType || 'text';
|
|
32454
|
-
if (this.disableCurrencyFormat() &&
|
|
32455
|
-
String(primitiveViewType).toLowerCase() === 'currency') {
|
|
32456
|
-
return { viewType: 'number', value: cellData };
|
|
32457
|
-
}
|
|
32458
|
-
return {
|
|
32459
|
-
viewType: primitiveViewType,
|
|
32460
|
-
value: cellData,
|
|
32461
|
-
};
|
|
32462
|
-
}
|
|
32463
|
-
isPhaseGateColumn(column) {
|
|
32464
|
-
return column.columnType === 'phaseGate';
|
|
32465
|
-
}
|
|
32466
|
-
getPhaseGateCell(row, column) {
|
|
32467
|
-
return row?.[column.key] || null;
|
|
32468
|
-
}
|
|
32469
|
-
getPhaseGateCellColor(cell) {
|
|
32470
|
-
if (!cell)
|
|
32471
|
-
return '#9ca3af';
|
|
32472
|
-
if (cell.statusColor)
|
|
32473
|
-
return cell.statusColor;
|
|
32474
|
-
if (cell.isCompleted && cell.allItemsCompleted)
|
|
32475
|
-
return '#16a34a';
|
|
32476
|
-
if (cell.isCompleted)
|
|
32477
|
-
return '#22c55e';
|
|
32478
|
-
if (cell.isCurrent)
|
|
32479
|
-
return 'var(--primary-color, #3b82f6)';
|
|
32480
|
-
return '#9ca3af';
|
|
32481
|
-
}
|
|
32482
|
-
getPhaseGateCellText(cell) {
|
|
32483
|
-
if (!cell)
|
|
32484
|
-
return '__';
|
|
32485
|
-
if (cell.statusLabel)
|
|
32486
|
-
return cell.statusLabel;
|
|
32487
|
-
if (cell.isCompleted)
|
|
32488
|
-
return 'Completed';
|
|
32489
|
-
if (cell.isCurrent)
|
|
32490
|
-
return 'Current';
|
|
32491
|
-
return 'Pending';
|
|
32492
|
-
}
|
|
32493
|
-
getPhaseGatePercentage(cell) {
|
|
32494
|
-
if (cell?.percentage === null || cell?.percentage === undefined) {
|
|
32495
|
-
return null;
|
|
32496
|
-
}
|
|
32497
|
-
return Math.max(0, Math.min(100, cell.percentage));
|
|
32498
|
-
}
|
|
32499
|
-
getPhaseGateCellTooltip(cell) {
|
|
32500
|
-
if (!cell)
|
|
32501
|
-
return '';
|
|
32502
|
-
const parts = [cell.phaseName, this.getPhaseGateCellText(cell)].filter(Boolean);
|
|
32503
|
-
const percentage = this.getPhaseGatePercentage(cell);
|
|
32504
|
-
if (percentage !== null) {
|
|
32505
|
-
parts.push(`${percentage}%`);
|
|
32506
|
-
}
|
|
32507
|
-
return parts.join(' - ');
|
|
32508
|
-
}
|
|
32509
|
-
/**
|
|
32510
|
-
* Sort column
|
|
32511
|
-
*/
|
|
32512
|
-
onSort(column) {
|
|
32513
|
-
if (this.isPhaseGateColumn(column))
|
|
32514
|
-
return;
|
|
32515
|
-
const cols = this.columns();
|
|
32516
|
-
const updatedCols = cols.map((col) => {
|
|
32517
|
-
if (col.key === column.key) {
|
|
32518
|
-
return {
|
|
32519
|
-
...col,
|
|
32520
|
-
isSort: true,
|
|
32521
|
-
isAsc: col.isSort ? !col.isAsc : true,
|
|
32522
|
-
};
|
|
32523
|
-
}
|
|
32524
|
-
return { ...col, isSort: false };
|
|
32525
|
-
});
|
|
32526
|
-
this.columns.set(updatedCols);
|
|
32527
|
-
// Sort rows
|
|
32528
|
-
const sortedColumn = updatedCols.find((c) => c.isSort);
|
|
32529
|
-
if (sortedColumn) {
|
|
32530
|
-
const rows = [...this.tableRows()];
|
|
32531
|
-
rows.sort((a, b) => {
|
|
32532
|
-
const aVal = this.getSortValue(a, sortedColumn);
|
|
32533
|
-
const bVal = this.getSortValue(b, sortedColumn);
|
|
32534
|
-
if (aVal === bVal)
|
|
32535
|
-
return 0;
|
|
32536
|
-
if (aVal === null || aVal === undefined)
|
|
32537
|
-
return 1;
|
|
32538
|
-
if (bVal === null || bVal === undefined)
|
|
32539
|
-
return -1;
|
|
32540
|
-
const comparison = aVal < bVal ? -1 : 1;
|
|
32541
|
-
return sortedColumn.isAsc ? comparison : -comparison;
|
|
32542
|
-
});
|
|
32543
|
-
this.tableRows.set(rows);
|
|
32544
|
-
}
|
|
32545
|
-
}
|
|
32546
|
-
/**
|
|
32547
|
-
* Get sortable value from row
|
|
32548
|
-
*/
|
|
32549
|
-
getSortValue(row, column) {
|
|
32550
|
-
const cellData = row[column.key] || row[column.keyPure || ''];
|
|
32551
|
-
if (!cellData)
|
|
32552
|
-
return null;
|
|
32553
|
-
if (typeof cellData === 'object') {
|
|
32554
|
-
// For entity values, get the actual value
|
|
32555
|
-
const val = cellData.value;
|
|
32556
|
-
if (typeof val === 'object') {
|
|
32557
|
-
return val.name || val.displayName || val.display || '';
|
|
32558
|
-
}
|
|
32559
|
-
return val;
|
|
32560
|
-
}
|
|
32561
|
-
return cellData;
|
|
32562
|
-
}
|
|
32563
|
-
/** Delays a click only while a Double Click action is configured (#1905). */
|
|
32564
|
-
clicks = new ClickDispatcher();
|
|
32565
|
-
/**
|
|
32566
|
-
* Handle row click
|
|
32567
|
-
*/
|
|
32568
|
-
onRowClick(row) {
|
|
32569
|
-
this.clicks.click(hasDoubleClickAction(this.configurationItem()), () => this.emitRowAction('click', row));
|
|
32570
|
-
}
|
|
32571
|
-
/** Handle row double click — the Actions drawer offers it for tables too. */
|
|
32572
|
-
onRowDblClick(row) {
|
|
32573
|
-
this.clicks.doubleClick(() => this.emitRowAction('dblclick', row));
|
|
32574
|
-
}
|
|
32575
|
-
emitRowAction(type, row) {
|
|
32576
|
-
if (!this.isRowClickable())
|
|
32577
|
-
return;
|
|
32578
|
-
const config = this.configurationItem();
|
|
32579
|
-
if (!config)
|
|
32580
|
-
return;
|
|
32581
|
-
// Build body with key from Id
|
|
32582
|
-
const body = {
|
|
32583
|
-
...row,
|
|
32584
|
-
key: row.Id?.value,
|
|
32585
|
-
};
|
|
32586
|
-
// Emit action — routed through dashboard-item.doActions -> ActionService.
|
|
32587
|
-
this.onAction.emit({ type, data: body });
|
|
32588
|
-
}
|
|
32589
|
-
/**
|
|
32590
|
-
* Handle header click
|
|
32591
|
-
*/
|
|
32592
|
-
onHeaderClick() {
|
|
32593
|
-
const config = this.configurationItem();
|
|
32594
|
-
if (!config)
|
|
32595
|
-
return;
|
|
32596
|
-
this.onAction.emit({ type: 'clickOnHeader', data: {} });
|
|
32597
|
-
}
|
|
32598
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TableCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
32599
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: TableCardComponent, isStandalone: true, selector: "mt-table-card", inputs: { dashboardId: { classPropertyName: "dashboardId", publicName: "dashboardId", isSignal: true, isRequired: true, transformFunction: null }, inGroup: { classPropertyName: "inGroup", publicName: "inGroup", isSignal: true, isRequired: false, transformFunction: null }, hideHeader: { classPropertyName: "hideHeader", publicName: "hideHeader", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onAction: "onAction" }, ngImport: i0, template: "<!-- One legend definition; the body grid places it on any configured edge. -->\r\n<ng-template #legendList>\r\n <div\r\n class=\"flex flex-wrap items-center gap-2\"\r\n [class.flex-col]=\"isSideLegend()\"\r\n [class.items-start]=\"isSideLegend()\"\r\n >\r\n @for (label of labels(); track label.key || $index) {\r\n <div class=\"flex items-center gap-1 text-xs\">\r\n <span\r\n class=\"table-legend-marker\"\r\n [class.shape-rect]=\"legendIconType() === 'rect'\"\r\n [class.shape-roundRect]=\"legendIconType() === 'roundRect'\"\r\n [class.shape-diamond]=\"legendIconType() === 'diamond'\"\r\n [class.shape-triangle]=\"legendIconType() === 'triangle'\"\r\n [style.backgroundColor]=\"\r\n legendIconType() === 'triangle' ? null : getLegendColor(label)\r\n \"\r\n [style.border-bottom-color]=\"\r\n legendIconType() === 'triangle' ? getLegendColor(label) : null\r\n \"\r\n ></span>\r\n <span>{{ getLegendText(label) }}</span>\r\n </div>\r\n }\r\n </div>\r\n</ng-template>\r\n\r\n<mt-card-content\r\n [inGroup]=\"inGroup()\"\r\n [showHeader]=\"!hideHeader()\"\r\n [title]=\"title()\"\r\n [styleConfig]=\"\r\n configurationItem()?.clientConfig?.displayConfig?.['StyleConfig']\r\n \"\r\n [cardStyleConfig]=\"\r\n configurationItem()?.clientConfig?.configAsType?.['cardStyleConfig']\r\n \"\r\n [headerConfig]=\"\r\n configurationItem()?.clientConfig?.configAsType?.['headerCardConfig']\r\n \"\r\n [padding]=\"configurationItem()?.clientConfig?.configAsType?.['padding']\"\r\n (headerClick)=\"onHeaderClick()\"\r\n>\r\n <ng-container body>\r\n <div\r\n class=\"table-wrapper h-full\"\r\n [attr.data-legend-position]=\"legendPosition()\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n >\r\n @if (hasLegend()) {\r\n <div class=\"table-legend-host\">\r\n <ng-container [ngTemplateOutlet]=\"legendList\" />\r\n </div>\r\n }\r\n\r\n <div class=\"table-content\">\r\n @if (loading()) {\r\n <div class=\"flex items-center justify-center h-32\">\r\n <i class=\"pi pi-spin pi-spinner text-2xl\"></i>\r\n </div>\r\n } @else if (hasData()) {\r\n <div\r\n class=\"table-scroll-container overflow-auto h-full\"\r\n (scroll)=\"onTableScroll($event)\"\r\n >\r\n <table class=\"w-full border-collapse text-sm\">\r\n <thead class=\"sticky top-0 z-10\" [hidden]=\"hideSubheader()\">\r\n <tr>\r\n <!-- Index column -->\r\n @if (!tableStyleConfig()?.hideIndex && showIndex()) {\r\n <th\r\n class=\"px-3 py-2 text-left font-semibold bg-surface-100 border-b-2 border-surface-200\"\r\n [style.color]=\"tableStyleConfig()?.thTextColor\"\r\n [style.backgroundColor]=\"\r\n tableStyleConfig()?.thBackgroundColor\r\n \"\r\n [style.fontWeight]=\"\r\n tableStyleConfig()?.thFontBold ? 'bold' : null\r\n \"\r\n [style.fontSize.px]=\"tableStyleConfig()?.thFontSize\"\r\n >\r\n #\r\n </th>\r\n }\r\n\r\n <!-- Data columns -->\r\n @for (column of visibleColumns(); track column.key) {\r\n <th\r\n class=\"px-3 py-2 text-left font-semibold bg-surface-100 border-b-2 border-surface-200 whitespace-nowrap\"\r\n [style.minWidth]=\"column.width || 'auto'\"\r\n [style.color]=\"tableStyleConfig()?.thTextColor\"\r\n [style.backgroundColor]=\"\r\n tableStyleConfig()?.thBackgroundColor\r\n \"\r\n [style.fontWeight]=\"\r\n tableStyleConfig()?.thFontBold ? 'bold' : null\r\n \"\r\n [style.fontSize.px]=\"tableStyleConfig()?.thFontSize\"\r\n [class.cursor-pointer]=\"!isPhaseGateColumn(column)\"\r\n (click)=\"onSort(column)\"\r\n >\r\n <div class=\"flex items-center gap-2\">\r\n <span>{{ column.label }}</span>\r\n @if (column.isSort) {\r\n <i\r\n class=\"text-xs\"\r\n [class]=\"\r\n column.isAsc\r\n ? 'pi pi-sort-amount-up'\r\n : 'pi pi-sort-amount-down'\r\n \"\r\n ></i>\r\n }\r\n </div>\r\n </th>\r\n }\r\n </tr>\r\n </thead>\r\n\r\n <tbody>\r\n <!-- Grouped Mode -->\r\n @if (isGrouped()) {\r\n @if (groupedVirtualTopSpacerHeightPx() > 0) {\r\n <tr class=\"dashboard-table-spacer\" aria-hidden=\"true\">\r\n <td\r\n [attr.colspan]=\"totalColumns()\"\r\n [style.height.px]=\"groupedVirtualTopSpacerHeightPx()\"\r\n ></td>\r\n </tr>\r\n }\r\n\r\n @for (item of visibleGroupedRows(); track item.trackId) {\r\n @if (item.kind === \"group\") {\r\n <tr class=\"dashboard-table-row\">\r\n <td\r\n [attr.colspan]=\"totalColumns()\"\r\n class=\"px-3 py-2 font-semibold\"\r\n [style.backgroundColor]=\"\r\n tableStyleConfig()?.groupBackgroundColor ||\r\n '#e4d1ac'\r\n \"\r\n [style.color]=\"tableStyleConfig()?.groupTextColor\"\r\n >\r\n <div\r\n class=\"flex flex-wrap items-center gap-x-4 gap-y-1\"\r\n >\r\n <mt-entity-info\r\n [data]=\"{\r\n viewType: item.group.prop?.viewType,\r\n value: item.group.prop?.value,\r\n }\"\r\n [displayType]=\"'inTable'\"\r\n ></mt-entity-info>\r\n @if (\r\n aggregateSummary(item.group.aggregates);\r\n as totals\r\n ) {\r\n <span\r\n class=\"text-xs font-medium whitespace-pre-wrap\"\r\n >{{ totals }}</span\r\n >\r\n }\r\n </div>\r\n </td>\r\n </tr>\r\n } @else {\r\n <tr\r\n class=\"dashboard-table-row hover:bg-surface-50 transition-colors\"\r\n [class.cursor-pointer]=\"isRowClickable()\"\r\n [class.bg-surface-100]=\"\r\n tableStyleConfig()?.striped &&\r\n (item.rowIndex ?? 0) % 2 === 1\r\n \"\r\n (click)=\"onRowClick(item.row)\"\r\n (dblclick)=\"onRowDblClick(item.row)\"\r\n >\r\n @if (!tableStyleConfig()?.hideIndex && showIndex()) {\r\n <td\r\n class=\"px-3 py-2 text-center border-b border-surface-100\"\r\n [style.color]=\"tableStyleConfig()?.tdTextColor\"\r\n [style.fontWeight]=\"\r\n tableStyleConfig()?.tdFontBold ? 'bold' : null\r\n \"\r\n [style.fontSize.px]=\"tableStyleConfig()?.tdFontSize\"\r\n >\r\n {{ (item.rowIndex ?? 0) + 1 }}\r\n </td>\r\n }\r\n\r\n @for (column of visibleColumns(); track column.key) {\r\n <td\r\n class=\"px-3 py-2 border-b border-surface-100\"\r\n [style.color]=\"tableStyleConfig()?.tdTextColor\"\r\n [style.fontWeight]=\"\r\n tableStyleConfig()?.tdFontBold ? 'bold' : null\r\n \"\r\n [style.fontSize.px]=\"tableStyleConfig()?.tdFontSize\"\r\n >\r\n @if (isPhaseGateColumn(column)) {\r\n @let phaseCell =\r\n getPhaseGateCell(item.row, column);\r\n <div\r\n class=\"min-w-36\"\r\n [title]=\"getPhaseGateCellTooltip(phaseCell)\"\r\n >\r\n <div class=\"flex items-center gap-2\">\r\n <span\r\n class=\"w-2.5 h-2.5 rounded-full flex-shrink-0\"\r\n [style.backgroundColor]=\"\r\n getPhaseGateCellColor(phaseCell)\r\n \"\r\n ></span>\r\n <span class=\"font-medium truncate\">\r\n {{ getPhaseGateCellText(phaseCell) }}\r\n </span>\r\n </div>\r\n @if (\r\n getPhaseGatePercentage(phaseCell) !== null\r\n ) {\r\n <div\r\n class=\"mt-1 h-1.5 overflow-hidden rounded-full bg-surface-200\"\r\n >\r\n <div\r\n class=\"h-full rounded-full\"\r\n [style.width.%]=\"\r\n getPhaseGatePercentage(phaseCell)\r\n \"\r\n [style.backgroundColor]=\"\r\n getPhaseGateCellColor(phaseCell)\r\n \"\r\n ></div>\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <mt-entity-info\r\n [data]=\"getCellData(item.row, column)\"\r\n [displayType]=\"'inTable'\"\r\n [extraInfoData]=\"tableStyleConfig()\"\r\n ></mt-entity-info>\r\n }\r\n </td>\r\n }\r\n </tr>\r\n }\r\n }\r\n\r\n @if (groupedVirtualBottomSpacerHeightPx() > 0) {\r\n <tr class=\"dashboard-table-spacer\" aria-hidden=\"true\">\r\n <td\r\n [attr.colspan]=\"totalColumns()\"\r\n [style.height.px]=\"groupedVirtualBottomSpacerHeightPx()\"\r\n ></td>\r\n </tr>\r\n }\r\n } @else {\r\n <!-- Non-Grouped Mode -->\r\n @if (flatVirtualTopSpacerHeightPx() > 0) {\r\n <tr class=\"dashboard-table-spacer\" aria-hidden=\"true\">\r\n <td\r\n [attr.colspan]=\"totalColumns()\"\r\n [style.height.px]=\"flatVirtualTopSpacerHeightPx()\"\r\n ></td>\r\n </tr>\r\n }\r\n\r\n @for (rowView of visibleTableRows(); track rowView.trackId) {\r\n <tr\r\n class=\"dashboard-table-row hover:bg-surface-50 transition-colors\"\r\n [class.cursor-pointer]=\"isRowClickable()\"\r\n [class.bg-surface-100]=\"\r\n tableStyleConfig()?.striped &&\r\n rowView.rowIndex % 2 === 1\r\n \"\r\n (click)=\"onRowClick(rowView.row)\"\r\n (dblclick)=\"onRowDblClick(rowView.row)\"\r\n >\r\n @if (!tableStyleConfig()?.hideIndex && showIndex()) {\r\n <td\r\n class=\"px-3 py-2 text-center border-b border-surface-100\"\r\n [style.color]=\"tableStyleConfig()?.tdTextColor\"\r\n [style.fontWeight]=\"\r\n tableStyleConfig()?.tdFontBold ? 'bold' : null\r\n \"\r\n [style.fontSize.px]=\"tableStyleConfig()?.tdFontSize\"\r\n >\r\n {{ rowView.rowIndex + 1 }}\r\n </td>\r\n }\r\n\r\n @for (column of visibleColumns(); track column.key) {\r\n <td\r\n class=\"px-3 py-2 border-b border-surface-100\"\r\n [style.color]=\"tableStyleConfig()?.tdTextColor\"\r\n [style.fontWeight]=\"\r\n tableStyleConfig()?.tdFontBold ? 'bold' : null\r\n \"\r\n [style.fontSize.px]=\"tableStyleConfig()?.tdFontSize\"\r\n >\r\n @if (isPhaseGateColumn(column)) {\r\n @let phaseCell =\r\n getPhaseGateCell(rowView.row, column);\r\n <div\r\n class=\"min-w-36\"\r\n [title]=\"getPhaseGateCellTooltip(phaseCell)\"\r\n >\r\n <div class=\"flex items-center gap-2\">\r\n <span\r\n class=\"w-2.5 h-2.5 rounded-full flex-shrink-0\"\r\n [style.backgroundColor]=\"\r\n getPhaseGateCellColor(phaseCell)\r\n \"\r\n ></span>\r\n <span class=\"font-medium truncate\">\r\n {{ getPhaseGateCellText(phaseCell) }}\r\n </span>\r\n </div>\r\n @if (getPhaseGatePercentage(phaseCell) !== null) {\r\n <div\r\n class=\"mt-1 h-1.5 overflow-hidden rounded-full bg-surface-200\"\r\n >\r\n <div\r\n class=\"h-full rounded-full\"\r\n [style.width.%]=\"\r\n getPhaseGatePercentage(phaseCell)\r\n \"\r\n [style.backgroundColor]=\"\r\n getPhaseGateCellColor(phaseCell)\r\n \"\r\n ></div>\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <mt-entity-info\r\n [data]=\"getCellData(rowView.row, column)\"\r\n [displayType]=\"'inTable'\"\r\n [extraInfoData]=\"tableStyleConfig()\"\r\n ></mt-entity-info>\r\n }\r\n </td>\r\n }\r\n </tr>\r\n }\r\n\r\n @if (flatVirtualBottomSpacerHeightPx() > 0) {\r\n <tr class=\"dashboard-table-spacer\" aria-hidden=\"true\">\r\n <td\r\n [attr.colspan]=\"totalColumns()\"\r\n [style.height.px]=\"flatVirtualBottomSpacerHeightPx()\"\r\n ></td>\r\n </tr>\r\n }\r\n }\r\n </tbody>\r\n @if (aggregateSummary(tableAggregates()); as totals) {\r\n <tfoot class=\"sticky bottom-0 z-10\">\r\n <tr>\r\n <td\r\n [attr.colspan]=\"totalColumns()\"\r\n class=\"px-3 py-2 text-sm font-semibold bg-surface-100 border-t-2 border-surface-200 whitespace-pre-wrap\"\r\n >\r\n {{ totals }}\r\n </td>\r\n </tr>\r\n </tfoot>\r\n }\r\n </table>\r\n </div>\r\n } @else {\r\n <!-- No Data -->\r\n <div\r\n class=\"flex flex-col items-center justify-center h-32 text-muted-color gap-2\"\r\n >\r\n <i class=\"pi pi-info-circle text-2xl\"></i>\r\n <span>{{ t(\"noData\") }}</span>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n </ng-container>\r\n</mt-card-content>\r\n", styles: [":host{display:block;height:100%}.table-wrapper{display:grid;grid-template-areas:\"legend\" \"content\";grid-template-rows:auto minmax(0,1fr);min-height:0}.table-wrapper[data-legend-position=bottom]{grid-template-areas:\"content\" \"legend\";grid-template-rows:minmax(0,1fr) auto}.table-wrapper[data-legend-position=left]{grid-template-areas:\"legend content\";grid-template-columns:auto minmax(0,1fr);grid-template-rows:minmax(0,1fr)}.table-wrapper[data-legend-position=right]{grid-template-areas:\"content legend\";grid-template-columns:minmax(0,1fr) auto;grid-template-rows:minmax(0,1fr)}.table-content{grid-area:content;min-height:0;min-width:0;display:flex;flex-direction:column}.table-legend-host{grid-area:legend;min-width:0;padding:.25rem .5rem}.table-wrapper[data-legend-position=left] .table-legend-host,.table-wrapper[data-legend-position=right] .table-legend-host{max-width:12rem;overflow:auto}.table-legend-marker{display:inline-block;width:.625rem;height:.625rem;flex:0 0 auto;border-radius:999px}.table-legend-marker.shape-rect{border-radius:0}.table-legend-marker.shape-roundRect{border-radius:.2rem}.table-legend-marker.shape-diamond{border-radius:.0625rem;transform:rotate(45deg)}.table-legend-marker.shape-triangle{width:0;height:0;background:transparent!important;border-radius:0;border-left:.34rem solid transparent;border-right:.34rem solid transparent;border-bottom-width:.6rem;border-bottom-style:solid}.table-scroll-container{flex:1;min-height:0}table{border-collapse:collapse}.dashboard-table-row{height:48px}.dashboard-table-spacer td{border:0;padding:0}th,td{text-align:start}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: CardContentComponent, selector: "mt-card-content", inputs: ["title", "inGroup", "groupHeader", "headerConfig", "styleConfig", "cardStyleConfig", "density", "padding", "showHeader", "headerClickable", "isNoTopEnd", "isChart", "titleEditable"], outputs: ["headerClick", "titleChange"] }, { kind: "component", type: EntityInfoComponent, selector: "mt-entity-info", inputs: ["data", "displayType", "extraInfoData", "limitWords", "customClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
32600
|
-
}
|
|
32601
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TableCardComponent, decorators: [{
|
|
32602
|
-
type: Component,
|
|
32603
|
-
args: [{ selector: 'mt-table-card', standalone: true, imports: [
|
|
32604
|
-
CommonModule,
|
|
32605
|
-
TranslocoDirective,
|
|
32606
|
-
CardContentComponent,
|
|
32607
|
-
EntityInfoComponent,
|
|
32608
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- One legend definition; the body grid places it on any configured edge. -->\r\n<ng-template #legendList>\r\n <div\r\n class=\"flex flex-wrap items-center gap-2\"\r\n [class.flex-col]=\"isSideLegend()\"\r\n [class.items-start]=\"isSideLegend()\"\r\n >\r\n @for (label of labels(); track label.key || $index) {\r\n <div class=\"flex items-center gap-1 text-xs\">\r\n <span\r\n class=\"table-legend-marker\"\r\n [class.shape-rect]=\"legendIconType() === 'rect'\"\r\n [class.shape-roundRect]=\"legendIconType() === 'roundRect'\"\r\n [class.shape-diamond]=\"legendIconType() === 'diamond'\"\r\n [class.shape-triangle]=\"legendIconType() === 'triangle'\"\r\n [style.backgroundColor]=\"\r\n legendIconType() === 'triangle' ? null : getLegendColor(label)\r\n \"\r\n [style.border-bottom-color]=\"\r\n legendIconType() === 'triangle' ? getLegendColor(label) : null\r\n \"\r\n ></span>\r\n <span>{{ getLegendText(label) }}</span>\r\n </div>\r\n }\r\n </div>\r\n</ng-template>\r\n\r\n<mt-card-content\r\n [inGroup]=\"inGroup()\"\r\n [showHeader]=\"!hideHeader()\"\r\n [title]=\"title()\"\r\n [styleConfig]=\"\r\n configurationItem()?.clientConfig?.displayConfig?.['StyleConfig']\r\n \"\r\n [cardStyleConfig]=\"\r\n configurationItem()?.clientConfig?.configAsType?.['cardStyleConfig']\r\n \"\r\n [headerConfig]=\"\r\n configurationItem()?.clientConfig?.configAsType?.['headerCardConfig']\r\n \"\r\n [padding]=\"configurationItem()?.clientConfig?.configAsType?.['padding']\"\r\n (headerClick)=\"onHeaderClick()\"\r\n>\r\n <ng-container body>\r\n <div\r\n class=\"table-wrapper h-full\"\r\n [attr.data-legend-position]=\"legendPosition()\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n >\r\n @if (hasLegend()) {\r\n <div class=\"table-legend-host\">\r\n <ng-container [ngTemplateOutlet]=\"legendList\" />\r\n </div>\r\n }\r\n\r\n <div class=\"table-content\">\r\n @if (loading()) {\r\n <div class=\"flex items-center justify-center h-32\">\r\n <i class=\"pi pi-spin pi-spinner text-2xl\"></i>\r\n </div>\r\n } @else if (hasData()) {\r\n <div\r\n class=\"table-scroll-container overflow-auto h-full\"\r\n (scroll)=\"onTableScroll($event)\"\r\n >\r\n <table class=\"w-full border-collapse text-sm\">\r\n <thead class=\"sticky top-0 z-10\" [hidden]=\"hideSubheader()\">\r\n <tr>\r\n <!-- Index column -->\r\n @if (!tableStyleConfig()?.hideIndex && showIndex()) {\r\n <th\r\n class=\"px-3 py-2 text-left font-semibold bg-surface-100 border-b-2 border-surface-200\"\r\n [style.color]=\"tableStyleConfig()?.thTextColor\"\r\n [style.backgroundColor]=\"\r\n tableStyleConfig()?.thBackgroundColor\r\n \"\r\n [style.fontWeight]=\"\r\n tableStyleConfig()?.thFontBold ? 'bold' : null\r\n \"\r\n [style.fontSize.px]=\"tableStyleConfig()?.thFontSize\"\r\n >\r\n #\r\n </th>\r\n }\r\n\r\n <!-- Data columns -->\r\n @for (column of visibleColumns(); track column.key) {\r\n <th\r\n class=\"px-3 py-2 text-left font-semibold bg-surface-100 border-b-2 border-surface-200 whitespace-nowrap\"\r\n [style.minWidth]=\"column.width || 'auto'\"\r\n [style.color]=\"tableStyleConfig()?.thTextColor\"\r\n [style.backgroundColor]=\"\r\n tableStyleConfig()?.thBackgroundColor\r\n \"\r\n [style.fontWeight]=\"\r\n tableStyleConfig()?.thFontBold ? 'bold' : null\r\n \"\r\n [style.fontSize.px]=\"tableStyleConfig()?.thFontSize\"\r\n [class.cursor-pointer]=\"!isPhaseGateColumn(column)\"\r\n (click)=\"onSort(column)\"\r\n >\r\n <div class=\"flex items-center gap-2\">\r\n <span>{{ column.label }}</span>\r\n @if (column.isSort) {\r\n <i\r\n class=\"text-xs\"\r\n [class]=\"\r\n column.isAsc\r\n ? 'pi pi-sort-amount-up'\r\n : 'pi pi-sort-amount-down'\r\n \"\r\n ></i>\r\n }\r\n </div>\r\n </th>\r\n }\r\n </tr>\r\n </thead>\r\n\r\n <tbody>\r\n <!-- Grouped Mode -->\r\n @if (isGrouped()) {\r\n @if (groupedVirtualTopSpacerHeightPx() > 0) {\r\n <tr class=\"dashboard-table-spacer\" aria-hidden=\"true\">\r\n <td\r\n [attr.colspan]=\"totalColumns()\"\r\n [style.height.px]=\"groupedVirtualTopSpacerHeightPx()\"\r\n ></td>\r\n </tr>\r\n }\r\n\r\n @for (item of visibleGroupedRows(); track item.trackId) {\r\n @if (item.kind === \"group\") {\r\n <tr class=\"dashboard-table-row\">\r\n <td\r\n [attr.colspan]=\"totalColumns()\"\r\n class=\"px-3 py-2 font-semibold\"\r\n [style.backgroundColor]=\"\r\n tableStyleConfig()?.groupBackgroundColor ||\r\n '#e4d1ac'\r\n \"\r\n [style.color]=\"tableStyleConfig()?.groupTextColor\"\r\n >\r\n <div\r\n class=\"flex flex-wrap items-center gap-x-4 gap-y-1\"\r\n >\r\n <mt-entity-info\r\n [data]=\"{\r\n viewType: item.group.prop?.viewType,\r\n value: item.group.prop?.value,\r\n }\"\r\n [displayType]=\"'inTable'\"\r\n ></mt-entity-info>\r\n @if (\r\n aggregateSummary(item.group.aggregates);\r\n as totals\r\n ) {\r\n <span\r\n class=\"text-xs font-medium whitespace-pre-wrap\"\r\n >{{ totals }}</span\r\n >\r\n }\r\n </div>\r\n </td>\r\n </tr>\r\n } @else {\r\n <tr\r\n class=\"dashboard-table-row hover:bg-surface-50 transition-colors\"\r\n [class.cursor-pointer]=\"isRowClickable()\"\r\n [class.bg-surface-100]=\"\r\n tableStyleConfig()?.striped &&\r\n (item.rowIndex ?? 0) % 2 === 1\r\n \"\r\n (click)=\"onRowClick(item.row)\"\r\n (dblclick)=\"onRowDblClick(item.row)\"\r\n >\r\n @if (!tableStyleConfig()?.hideIndex && showIndex()) {\r\n <td\r\n class=\"px-3 py-2 text-center border-b border-surface-100\"\r\n [style.color]=\"tableStyleConfig()?.tdTextColor\"\r\n [style.fontWeight]=\"\r\n tableStyleConfig()?.tdFontBold ? 'bold' : null\r\n \"\r\n [style.fontSize.px]=\"tableStyleConfig()?.tdFontSize\"\r\n >\r\n {{ (item.rowIndex ?? 0) + 1 }}\r\n </td>\r\n }\r\n\r\n @for (column of visibleColumns(); track column.key) {\r\n <td\r\n class=\"px-3 py-2 border-b border-surface-100\"\r\n [style.color]=\"tableStyleConfig()?.tdTextColor\"\r\n [style.fontWeight]=\"\r\n tableStyleConfig()?.tdFontBold ? 'bold' : null\r\n \"\r\n [style.fontSize.px]=\"tableStyleConfig()?.tdFontSize\"\r\n >\r\n @if (isPhaseGateColumn(column)) {\r\n @let phaseCell =\r\n getPhaseGateCell(item.row, column);\r\n <div\r\n class=\"min-w-36\"\r\n [title]=\"getPhaseGateCellTooltip(phaseCell)\"\r\n >\r\n <div class=\"flex items-center gap-2\">\r\n <span\r\n class=\"w-2.5 h-2.5 rounded-full flex-shrink-0\"\r\n [style.backgroundColor]=\"\r\n getPhaseGateCellColor(phaseCell)\r\n \"\r\n ></span>\r\n <span class=\"font-medium truncate\">\r\n {{ getPhaseGateCellText(phaseCell) }}\r\n </span>\r\n </div>\r\n @if (\r\n getPhaseGatePercentage(phaseCell) !== null\r\n ) {\r\n <div\r\n class=\"mt-1 h-1.5 overflow-hidden rounded-full bg-surface-200\"\r\n >\r\n <div\r\n class=\"h-full rounded-full\"\r\n [style.width.%]=\"\r\n getPhaseGatePercentage(phaseCell)\r\n \"\r\n [style.backgroundColor]=\"\r\n getPhaseGateCellColor(phaseCell)\r\n \"\r\n ></div>\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <mt-entity-info\r\n [data]=\"getCellData(item.row, column)\"\r\n [displayType]=\"'inTable'\"\r\n [extraInfoData]=\"tableStyleConfig()\"\r\n ></mt-entity-info>\r\n }\r\n </td>\r\n }\r\n </tr>\r\n }\r\n }\r\n\r\n @if (groupedVirtualBottomSpacerHeightPx() > 0) {\r\n <tr class=\"dashboard-table-spacer\" aria-hidden=\"true\">\r\n <td\r\n [attr.colspan]=\"totalColumns()\"\r\n [style.height.px]=\"groupedVirtualBottomSpacerHeightPx()\"\r\n ></td>\r\n </tr>\r\n }\r\n } @else {\r\n <!-- Non-Grouped Mode -->\r\n @if (flatVirtualTopSpacerHeightPx() > 0) {\r\n <tr class=\"dashboard-table-spacer\" aria-hidden=\"true\">\r\n <td\r\n [attr.colspan]=\"totalColumns()\"\r\n [style.height.px]=\"flatVirtualTopSpacerHeightPx()\"\r\n ></td>\r\n </tr>\r\n }\r\n\r\n @for (rowView of visibleTableRows(); track rowView.trackId) {\r\n <tr\r\n class=\"dashboard-table-row hover:bg-surface-50 transition-colors\"\r\n [class.cursor-pointer]=\"isRowClickable()\"\r\n [class.bg-surface-100]=\"\r\n tableStyleConfig()?.striped &&\r\n rowView.rowIndex % 2 === 1\r\n \"\r\n (click)=\"onRowClick(rowView.row)\"\r\n (dblclick)=\"onRowDblClick(rowView.row)\"\r\n >\r\n @if (!tableStyleConfig()?.hideIndex && showIndex()) {\r\n <td\r\n class=\"px-3 py-2 text-center border-b border-surface-100\"\r\n [style.color]=\"tableStyleConfig()?.tdTextColor\"\r\n [style.fontWeight]=\"\r\n tableStyleConfig()?.tdFontBold ? 'bold' : null\r\n \"\r\n [style.fontSize.px]=\"tableStyleConfig()?.tdFontSize\"\r\n >\r\n {{ rowView.rowIndex + 1 }}\r\n </td>\r\n }\r\n\r\n @for (column of visibleColumns(); track column.key) {\r\n <td\r\n class=\"px-3 py-2 border-b border-surface-100\"\r\n [style.color]=\"tableStyleConfig()?.tdTextColor\"\r\n [style.fontWeight]=\"\r\n tableStyleConfig()?.tdFontBold ? 'bold' : null\r\n \"\r\n [style.fontSize.px]=\"tableStyleConfig()?.tdFontSize\"\r\n >\r\n @if (isPhaseGateColumn(column)) {\r\n @let phaseCell =\r\n getPhaseGateCell(rowView.row, column);\r\n <div\r\n class=\"min-w-36\"\r\n [title]=\"getPhaseGateCellTooltip(phaseCell)\"\r\n >\r\n <div class=\"flex items-center gap-2\">\r\n <span\r\n class=\"w-2.5 h-2.5 rounded-full flex-shrink-0\"\r\n [style.backgroundColor]=\"\r\n getPhaseGateCellColor(phaseCell)\r\n \"\r\n ></span>\r\n <span class=\"font-medium truncate\">\r\n {{ getPhaseGateCellText(phaseCell) }}\r\n </span>\r\n </div>\r\n @if (getPhaseGatePercentage(phaseCell) !== null) {\r\n <div\r\n class=\"mt-1 h-1.5 overflow-hidden rounded-full bg-surface-200\"\r\n >\r\n <div\r\n class=\"h-full rounded-full\"\r\n [style.width.%]=\"\r\n getPhaseGatePercentage(phaseCell)\r\n \"\r\n [style.backgroundColor]=\"\r\n getPhaseGateCellColor(phaseCell)\r\n \"\r\n ></div>\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <mt-entity-info\r\n [data]=\"getCellData(rowView.row, column)\"\r\n [displayType]=\"'inTable'\"\r\n [extraInfoData]=\"tableStyleConfig()\"\r\n ></mt-entity-info>\r\n }\r\n </td>\r\n }\r\n </tr>\r\n }\r\n\r\n @if (flatVirtualBottomSpacerHeightPx() > 0) {\r\n <tr class=\"dashboard-table-spacer\" aria-hidden=\"true\">\r\n <td\r\n [attr.colspan]=\"totalColumns()\"\r\n [style.height.px]=\"flatVirtualBottomSpacerHeightPx()\"\r\n ></td>\r\n </tr>\r\n }\r\n }\r\n </tbody>\r\n @if (aggregateSummary(tableAggregates()); as totals) {\r\n <tfoot class=\"sticky bottom-0 z-10\">\r\n <tr>\r\n <td\r\n [attr.colspan]=\"totalColumns()\"\r\n class=\"px-3 py-2 text-sm font-semibold bg-surface-100 border-t-2 border-surface-200 whitespace-pre-wrap\"\r\n >\r\n {{ totals }}\r\n </td>\r\n </tr>\r\n </tfoot>\r\n }\r\n </table>\r\n </div>\r\n } @else {\r\n <!-- No Data -->\r\n <div\r\n class=\"flex flex-col items-center justify-center h-32 text-muted-color gap-2\"\r\n >\r\n <i class=\"pi pi-info-circle text-2xl\"></i>\r\n <span>{{ t(\"noData\") }}</span>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n </ng-container>\r\n</mt-card-content>\r\n", styles: [":host{display:block;height:100%}.table-wrapper{display:grid;grid-template-areas:\"legend\" \"content\";grid-template-rows:auto minmax(0,1fr);min-height:0}.table-wrapper[data-legend-position=bottom]{grid-template-areas:\"content\" \"legend\";grid-template-rows:minmax(0,1fr) auto}.table-wrapper[data-legend-position=left]{grid-template-areas:\"legend content\";grid-template-columns:auto minmax(0,1fr);grid-template-rows:minmax(0,1fr)}.table-wrapper[data-legend-position=right]{grid-template-areas:\"content legend\";grid-template-columns:minmax(0,1fr) auto;grid-template-rows:minmax(0,1fr)}.table-content{grid-area:content;min-height:0;min-width:0;display:flex;flex-direction:column}.table-legend-host{grid-area:legend;min-width:0;padding:.25rem .5rem}.table-wrapper[data-legend-position=left] .table-legend-host,.table-wrapper[data-legend-position=right] .table-legend-host{max-width:12rem;overflow:auto}.table-legend-marker{display:inline-block;width:.625rem;height:.625rem;flex:0 0 auto;border-radius:999px}.table-legend-marker.shape-rect{border-radius:0}.table-legend-marker.shape-roundRect{border-radius:.2rem}.table-legend-marker.shape-diamond{border-radius:.0625rem;transform:rotate(45deg)}.table-legend-marker.shape-triangle{width:0;height:0;background:transparent!important;border-radius:0;border-left:.34rem solid transparent;border-right:.34rem solid transparent;border-bottom-width:.6rem;border-bottom-style:solid}.table-scroll-container{flex:1;min-height:0}table{border-collapse:collapse}.dashboard-table-row{height:48px}.dashboard-table-spacer td{border:0;padding:0}th,td{text-align:start}\n"] }]
|
|
32609
|
-
}], propDecorators: { dashboardId: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardId", required: true }] }], inGroup: [{ type: i0.Input, args: [{ isSignal: true, alias: "inGroup", required: false }] }], hideHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideHeader", required: false }] }], onAction: [{ type: i0.Output, args: ["onAction"] }] } });
|
|
32610
|
-
|
|
32611
30860
|
/**
|
|
32612
30861
|
* Statistic Card Component
|
|
32613
30862
|
*
|
|
@@ -32888,11 +31137,11 @@ class ListStatisticCardComponent {
|
|
|
32888
31137
|
this.onAction.emit({ type, data: body });
|
|
32889
31138
|
}
|
|
32890
31139
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ListStatisticCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
32891
|
-
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\">\
|
|
31140
|
+
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 });
|
|
32892
31141
|
}
|
|
32893
31142
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ListStatisticCardComponent, decorators: [{
|
|
32894
31143
|
type: Component,
|
|
32895
|
-
args: [{ selector: 'mt-list-statistic-card', standalone: true, imports: [CommonModule, StatisticCardComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"flex h-full w-full justify-between\">\
|
|
31144
|
+
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" }]
|
|
32896
31145
|
}], propDecorators: { dashboardId: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardId", required: true }] }], onAction: [{ type: i0.Output, args: ["onAction"] }] } });
|
|
32897
31146
|
|
|
32898
31147
|
/**
|
|
@@ -33284,34 +31533,34 @@ class SkeletonCardComponent {
|
|
|
33284
31533
|
}
|
|
33285
31534
|
}
|
|
33286
31535
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SkeletonCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
33287
|
-
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: `
|
|
33288
|
-
<div class="skeleton-container">
|
|
33289
|
-
@for (skeleton of skeletons(); track $index) {
|
|
33290
|
-
<div
|
|
33291
|
-
class="skeleton-item"
|
|
33292
|
-
[style.width]="skeleton.width"
|
|
33293
|
-
[style.height]="skeleton.height"
|
|
33294
|
-
>
|
|
33295
|
-
<div class="skeleton-animation"></div>
|
|
33296
|
-
</div>
|
|
33297
|
-
}
|
|
33298
|
-
</div>
|
|
31536
|
+
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: `
|
|
31537
|
+
<div class="skeleton-container">
|
|
31538
|
+
@for (skeleton of skeletons(); track $index) {
|
|
31539
|
+
<div
|
|
31540
|
+
class="skeleton-item"
|
|
31541
|
+
[style.width]="skeleton.width"
|
|
31542
|
+
[style.height]="skeleton.height"
|
|
31543
|
+
>
|
|
31544
|
+
<div class="skeleton-animation"></div>
|
|
31545
|
+
</div>
|
|
31546
|
+
}
|
|
31547
|
+
</div>
|
|
33299
31548
|
`, 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 });
|
|
33300
31549
|
}
|
|
33301
31550
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SkeletonCardComponent, decorators: [{
|
|
33302
31551
|
type: Component,
|
|
33303
|
-
args: [{ selector: 'mt-skeleton-card', standalone: true, imports: [CommonModule], template: `
|
|
33304
|
-
<div class="skeleton-container">
|
|
33305
|
-
@for (skeleton of skeletons(); track $index) {
|
|
33306
|
-
<div
|
|
33307
|
-
class="skeleton-item"
|
|
33308
|
-
[style.width]="skeleton.width"
|
|
33309
|
-
[style.height]="skeleton.height"
|
|
33310
|
-
>
|
|
33311
|
-
<div class="skeleton-animation"></div>
|
|
33312
|
-
</div>
|
|
33313
|
-
}
|
|
33314
|
-
</div>
|
|
31552
|
+
args: [{ selector: 'mt-skeleton-card', standalone: true, imports: [CommonModule], template: `
|
|
31553
|
+
<div class="skeleton-container">
|
|
31554
|
+
@for (skeleton of skeletons(); track $index) {
|
|
31555
|
+
<div
|
|
31556
|
+
class="skeleton-item"
|
|
31557
|
+
[style.width]="skeleton.width"
|
|
31558
|
+
[style.height]="skeleton.height"
|
|
31559
|
+
>
|
|
31560
|
+
<div class="skeleton-animation"></div>
|
|
31561
|
+
</div>
|
|
31562
|
+
}
|
|
31563
|
+
</div>
|
|
33315
31564
|
`, 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"] }]
|
|
33316
31565
|
}], propDecorators: { dashboardId: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardId", required: true }] }] } });
|
|
33317
31566
|
|
|
@@ -33985,7 +32234,7 @@ class PropertiesCardComponent {
|
|
|
33985
32234
|
return '';
|
|
33986
32235
|
}
|
|
33987
32236
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: PropertiesCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
33988
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: PropertiesCardComponent, isStandalone: true, selector: "mt-properties-card, mt-entities-preview-card", inputs: { dashboardId: { classPropertyName: "dashboardId", publicName: "dashboardId", isSignal: true, isRequired: true, transformFunction: null }, inGroup: { classPropertyName: "inGroup", publicName: "inGroup", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onAction: "onAction" }, ngImport: i0, template: "<mt-card-content\
|
|
32237
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: PropertiesCardComponent, isStandalone: true, selector: "mt-properties-card, mt-entities-preview-card", inputs: { dashboardId: { classPropertyName: "dashboardId", publicName: "dashboardId", isSignal: true, isRequired: true, transformFunction: null }, inGroup: { classPropertyName: "inGroup", publicName: "inGroup", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onAction: "onAction" }, ngImport: i0, template: "<mt-card-content\n [inGroup]=\"inGroup()\"\n [headerConfig]=\"\n configurationItem()?.clientConfig?.configAsType?.['headerCardConfig']\n \"\n [styleConfig]=\"\n configurationItem()?.clientConfig?.displayConfig?.['StyleConfig']\n \"\n [cardStyleConfig]=\"\n configurationItem()?.clientConfig?.configAsType?.['cardStyleConfig']\n \"\n [density]=\"configurationItem()?.clientConfig?.configAsType?.['density']\"\n [padding]=\"configurationItem()?.clientConfig?.configAsType?.['padding']\"\n [title]=\"title()\"\n>\n <ng-container body>\n <ng-container *transloco=\"let t; prefix: 'dashboardBuilder'\">\n @if (showTabs()) {\n <div class=\"mb-3\">\n <mt-tabs\n [(active)]=\"tabSelected\"\n [options]=\"tabOptions()\"\n size=\"small\"\n />\n </div>\n }\n\n <div\n class=\"overflow-y-auto overflow-x-hidden\"\n [style.max-height]=\"inGroup() ? '500px' : null\"\n >\n @if (currentTabCards().length === 0) {\n <div class=\"py-6 text-center text-sm text-gray-400\">\n {{ t(\"noData\") }}\n </div>\n } @else {\n <div\n class=\"db-cards-grid\"\n [class.db-cards-grid--gallery]=\"galleryMode()\"\n >\n @for (cardView of currentTabCards(); track cardView.trackId) {\n <div\n class=\"mb-2 cursor-pointer p-2\"\n (click)=\"onCardClick(cardView.card)\"\n >\n <div class=\"rounded-lg bg-white p-3 shadow-sm\">\n @defer (on viewport) {\n <ng-container>\n @if (cardView.entities.length > 0) {\n <mt-entities-preview\n [entities]=\"cardView.entities\"\n [stackOnNarrow]=\"false\"\n />\n } @else {\n <div class=\"py-6 text-center text-sm text-gray-400\">\n {{ t(\"noData\") }}\n </div>\n }\n </ng-container>\n } @placeholder {\n <div class=\"min-h-24 p-2\">\n <div class=\"flex animate-pulse flex-col gap-3\">\n <div class=\"h-4 w-2/3 rounded bg-surface-200\"></div>\n <div class=\"h-4 w-full rounded bg-surface-100\"></div>\n <div class=\"h-4 w-5/6 rounded bg-surface-100\"></div>\n </div>\n </div>\n }\n </div>\n </div>\n }\n </div>\n }\n </div>\n </ng-container>\n </ng-container>\n</mt-card-content>\n", styles: [":host{display:block;height:100%}.db-cards-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:.25rem}.db-cards-grid--gallery{grid-template-columns:repeat(auto-fit,minmax(210px,1fr))}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Tabs, selector: "mt-tabs", inputs: ["options", "optionLabel", "optionValue", "active", "mode", "moreLabel", "defaultIcon", "size", "fluid", "disabled", "searchThreshold"], outputs: ["activeChange", "onChange"] }, { kind: "component", type: CardContentComponent, selector: "mt-card-content", inputs: ["title", "inGroup", "groupHeader", "headerConfig", "styleConfig", "cardStyleConfig", "density", "padding", "showHeader", "headerClickable", "isNoTopEnd", "isChart", "titleEditable"], outputs: ["headerClick", "titleChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, deferBlockDependencies: [() => [EntitiesPreview]] });
|
|
33989
32238
|
}
|
|
33990
32239
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: PropertiesCardComponent, decorators: [{
|
|
33991
32240
|
type: Component,
|
|
@@ -33995,7 +32244,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
33995
32244
|
Tabs,
|
|
33996
32245
|
EntitiesPreview,
|
|
33997
32246
|
CardContentComponent,
|
|
33998
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mt-card-content\
|
|
32247
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mt-card-content\n [inGroup]=\"inGroup()\"\n [headerConfig]=\"\n configurationItem()?.clientConfig?.configAsType?.['headerCardConfig']\n \"\n [styleConfig]=\"\n configurationItem()?.clientConfig?.displayConfig?.['StyleConfig']\n \"\n [cardStyleConfig]=\"\n configurationItem()?.clientConfig?.configAsType?.['cardStyleConfig']\n \"\n [density]=\"configurationItem()?.clientConfig?.configAsType?.['density']\"\n [padding]=\"configurationItem()?.clientConfig?.configAsType?.['padding']\"\n [title]=\"title()\"\n>\n <ng-container body>\n <ng-container *transloco=\"let t; prefix: 'dashboardBuilder'\">\n @if (showTabs()) {\n <div class=\"mb-3\">\n <mt-tabs\n [(active)]=\"tabSelected\"\n [options]=\"tabOptions()\"\n size=\"small\"\n />\n </div>\n }\n\n <div\n class=\"overflow-y-auto overflow-x-hidden\"\n [style.max-height]=\"inGroup() ? '500px' : null\"\n >\n @if (currentTabCards().length === 0) {\n <div class=\"py-6 text-center text-sm text-gray-400\">\n {{ t(\"noData\") }}\n </div>\n } @else {\n <div\n class=\"db-cards-grid\"\n [class.db-cards-grid--gallery]=\"galleryMode()\"\n >\n @for (cardView of currentTabCards(); track cardView.trackId) {\n <div\n class=\"mb-2 cursor-pointer p-2\"\n (click)=\"onCardClick(cardView.card)\"\n >\n <div class=\"rounded-lg bg-white p-3 shadow-sm\">\n @defer (on viewport) {\n <ng-container>\n @if (cardView.entities.length > 0) {\n <mt-entities-preview\n [entities]=\"cardView.entities\"\n [stackOnNarrow]=\"false\"\n />\n } @else {\n <div class=\"py-6 text-center text-sm text-gray-400\">\n {{ t(\"noData\") }}\n </div>\n }\n </ng-container>\n } @placeholder {\n <div class=\"min-h-24 p-2\">\n <div class=\"flex animate-pulse flex-col gap-3\">\n <div class=\"h-4 w-2/3 rounded bg-surface-200\"></div>\n <div class=\"h-4 w-full rounded bg-surface-100\"></div>\n <div class=\"h-4 w-5/6 rounded bg-surface-100\"></div>\n </div>\n </div>\n }\n </div>\n </div>\n }\n </div>\n }\n </div>\n </ng-container>\n </ng-container>\n</mt-card-content>\n", styles: [":host{display:block;height:100%}.db-cards-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:.25rem}.db-cards-grid--gallery{grid-template-columns:repeat(auto-fit,minmax(210px,1fr))}\n"] }]
|
|
33999
32248
|
}], ctorParameters: () => [], propDecorators: { dashboardId: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardId", required: true }] }], inGroup: [{ type: i0.Input, args: [{ isSignal: true, alias: "inGroup", required: false }] }], onAction: [{ type: i0.Output, args: ["onAction"] }] } });
|
|
34000
32249
|
|
|
34001
32250
|
/**
|
|
@@ -35543,26 +33792,26 @@ class DashboardItem {
|
|
|
35543
33792
|
return merged;
|
|
35544
33793
|
}
|
|
35545
33794
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: DashboardItem, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
35546
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: DashboardItem, isStandalone: true, selector: "mt-dashboard-item", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, chartTypeId: { classPropertyName: "chartTypeId", publicName: "chartTypeId", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, useCachedDataOnly: { classPropertyName: "useCachedDataOnly", publicName: "useCachedDataOnly", isSignal: true, isRequired: false, transformFunction: null }, pageName: { classPropertyName: "pageName", publicName: "pageName", isSignal: true, isRequired: false, transformFunction: null }, inGroup: { classPropertyName: "inGroup", publicName: "inGroup", isSignal: true, isRequired: false, transformFunction: null }, isDialog: { classPropertyName: "isDialog", publicName: "isDialog", isSignal: true, isRequired: false, transformFunction: null }, queryParams: { classPropertyName: "queryParams", publicName: "queryParams", isSignal: true, isRequired: false, transformFunction: null }, extraFilters: { classPropertyName: "extraFilters", publicName: "extraFilters", isSignal: true, isRequired: false, transformFunction: null }, reportId: { classPropertyName: "reportId", publicName: "reportId", isSignal: true, isRequired: false, transformFunction: null }, ignoreQueryFilter: { classPropertyName: "ignoreQueryFilter", publicName: "ignoreQueryFilter", isSignal: true, isRequired: false, transformFunction: null }, builderMode: { classPropertyName: "builderMode", publicName: "builderMode", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { actionTriggered: "actionTriggered", configureRequested: "configureRequested", titleEdited: "titleEdited" }, ngImport: i0, template: "@if (isLoading()) {\r\n <mt-skeleton-card [dashboardId]=\"dashboardId()\"></mt-skeleton-card>\r\n} @else if (hasError()) {\r\n <div\r\n class=\"db-item-state db-item-state--error flex flex-col items-center justify-center h-full p-4 text-center\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n data-dashboard-ux-state=\"data-error\"\r\n >\r\n <mt-icon\r\n icon=\"general.alert-circle\"\r\n class=\"text-4xl text-red-500 mb-2\"\r\n ></mt-icon>\r\n <p class=\"text-red-500 font-medium\">\r\n {{ t(\"guided.dataError\") }}\r\n </p>\r\n <p class=\"text-xs text-muted-color max-w-md leading-snug mt-1\">\r\n {{ errorMessage() || t(\"guided.dataErrorHint\") }}\r\n </p>\r\n <mt-button\r\n class=\"mt-2\"\r\n [label]=\"t('guided.retry')\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n icon=\"arrow.refresh-cw-01\"\r\n (onClick)=\"refresh()\"\r\n data-dashboard-action=\"retry\"\r\n />\r\n </div>\r\n} @else if (needsConfiguration()) {\r\n <div\r\n class=\"db-item-state db-item-state--unconfigured flex h-full flex-col items-center justify-center gap-3 p-6 text-center bg-surface-50 rounded-md border border-dashed border-surface-300 relative\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n [attr.data-dashboard-ux-state]=\"guidanceUxState()\"\r\n data-dashboard-primary-action=\"configure-datasource\"\r\n >\r\n <mt-icon\r\n [icon]=\"guidanceIcon()\"\r\n class=\"text-4xl text-primary-500\"\r\n ></mt-icon>\r\n\r\n <div class=\"flex flex-col items-center gap-1\">\r\n <h3 class=\"text-base font-semibold text-surface-700\">\r\n {{ guidanceTitle() }}\r\n </h3>\r\n <p class=\"text-xs text-muted-color max-w-md leading-relaxed\">\r\n {{ guidanceHint() }}\r\n </p>\r\n </div>\r\n\r\n <mt-button\r\n [label]=\"guidancePrimaryLabel()\"\r\n [icon]=\"guidancePrimaryIcon()\"\r\n severity=\"primary\"\r\n size=\"small\"\r\n (onClick)=\"onConfigureRequested()\"\r\n data-dashboard-action=\"configure-datasource\"\r\n [attr.aria-label]=\"guidancePrimaryLabel()\"\r\n />\r\n\r\n @if (guidanceSecondaryLabel()) {\r\n <mt-button\r\n [label]=\"guidanceSecondaryLabel()\"\r\n [icon]=\"guidanceSecondaryIcon()\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [text]=\"true\"\r\n (onClick)=\"onSecondaryRequested()\"\r\n [attr.aria-label]=\"guidanceSecondaryLabel()\"\r\n />\r\n }\r\n </div>\r\n} @else {\r\n @switch (componentName()) {\r\n <!-- Chart Types -->\r\n @case (\"chart\") {\r\n <mt-chart-card\r\n [dashboardId]=\"dashboardId()\"\r\n [reportId]=\"reportId()\"\r\n [inGroup]=\"inGroup()\"\r\n [titleEditable]=\"false\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n (onConfigure)=\"onConfigureRequested()\"\r\n (onTitleChange)=\"onTitleChange($event)\"\r\n >\r\n </mt-chart-card>\r\n }\r\n\r\n <!-- Map Chart -->\r\n @case (\"map\") {\r\n <mt-chart-card\r\n [dashboardId]=\"dashboardId()\"\r\n [reportId]=\"reportId()\"\r\n [inGroup]=\"inGroup()\"\r\n [titleEditable]=\"false\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n (onConfigure)=\"onConfigureRequested()\"\r\n (onTitleChange)=\"onTitleChange($event)\"\r\n >\r\n </mt-chart-card>\r\n }\r\n\r\n <!-- Background Text -->\r\n @case (\"BackgroundTextChart\") {\r\n <mt-header-card\r\n [dashboardId]=\"dashboardId()\"\r\n [titleEditable]=\"false\"\r\n (titleChange)=\"onTitleChange($event)\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n >\r\n </mt-header-card>\r\n }\r\n\r\n <!-- Chart Custom With Card Info -->\r\n @case (\"chartCustomWithCardInfo\") {\r\n <mt-chart-card\r\n [dashboardId]=\"dashboardId()\"\r\n [reportId]=\"reportId()\"\r\n [inGroup]=\"inGroup()\"\r\n [titleEditable]=\"false\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n (onConfigure)=\"onConfigureRequested()\"\r\n (onTitleChange)=\"onTitleChange($event)\"\r\n >\r\n </mt-chart-card>\r\n }\r\n\r\n <!-- List of Charts -->\r\n @case (\"listOfcharts\") {\r\n <mt-chart-card\r\n [dashboardId]=\"dashboardId()\"\r\n [reportId]=\"reportId()\"\r\n [inGroup]=\"inGroup()\"\r\n [titleEditable]=\"false\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n (onConfigure)=\"onConfigureRequested()\"\r\n (onTitleChange)=\"onTitleChange($event)\"\r\n >\r\n </mt-chart-card>\r\n }\r\n\r\n <!-- List of Cards Statistic -->\r\n @case (\"listOfCardsStatistic\") {\r\n <mt-list-statistic-card\r\n [dashboardId]=\"dashboardId()\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n >\r\n </mt-list-statistic-card>\r\n }\r\n\r\n <!-- Cards Statistic (single) -->\r\n @case (\"cardsStatistic\") {\r\n <mt-list-statistic-card\r\n [dashboardId]=\"dashboardId()\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n >\r\n </mt-list-statistic-card>\r\n }\r\n\r\n <!-- Header -->\r\n @case (\"header\") {\r\n <mt-header-card\r\n [dashboardId]=\"dashboardId()\"\r\n [titleEditable]=\"false\"\r\n (titleChange)=\"onTitleChange($event)\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n >\r\n </mt-header-card>\r\n }\r\n\r\n <!-- Footer (same as header) -->\r\n @case (\"footer\") {\r\n <mt-header-card\r\n [dashboardId]=\"dashboardId()\"\r\n [titleEditable]=\"false\"\r\n (titleChange)=\"onTitleChange($event)\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n >\r\n </mt-header-card>\r\n }\r\n\r\n <!-- Label (same as header) -->\r\n @case (\"label\") {\r\n <mt-header-card\r\n [dashboardId]=\"dashboardId()\"\r\n [titleEditable]=\"false\"\r\n (titleChange)=\"onTitleChange($event)\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n >\r\n </mt-header-card>\r\n }\r\n\r\n <!-- List of Level Cards -->\r\n @case (\"listOfLevelCards\") {\r\n <mt-properties-card\r\n [dashboardId]=\"dashboardId()\"\r\n [inGroup]=\"inGroup()\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n >\r\n </mt-properties-card>\r\n }\r\n\r\n @case (\"entitiesPreview\") {\r\n <mt-properties-card\r\n [dashboardId]=\"dashboardId()\"\r\n [inGroup]=\"inGroup()\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n >\r\n </mt-properties-card>\r\n }\r\n\r\n <!-- Table -->\r\n @case (\"table\") {\r\n <mt-table-card\r\n [dashboardId]=\"dashboardId()\"\r\n [inGroup]=\"inGroup()\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n >\r\n </mt-table-card>\r\n }\r\n\r\n <!-- Phase Gate Table -->\r\n @case (\"phaseGateTable\") {\r\n <mt-table-card\r\n [dashboardId]=\"dashboardId()\"\r\n [inGroup]=\"inGroup()\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n >\r\n </mt-table-card>\r\n }\r\n\r\n <!-- Topbar -->\r\n @case (\"topbar\") {\r\n <mt-topbar-card\r\n [dashboardId]=\"dashboardId()\"\r\n [defaultBreadcrumbLabel]=\"pageName()\"\r\n [titleEditable]=\"false\"\r\n (titleChange)=\"onTitleChange($event)\"\r\n ></mt-topbar-card>\r\n }\r\n\r\n <!-- Timeline -->\r\n @case (\"timeline\") {\r\n <mt-chart-card\r\n [dashboardId]=\"dashboardId()\"\r\n [reportId]=\"reportId()\"\r\n [inGroup]=\"inGroup()\"\r\n [titleEditable]=\"false\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n (onConfigure)=\"onConfigureRequested()\"\r\n (onTitleChange)=\"onTitleChange($event)\"\r\n >\r\n </mt-chart-card>\r\n }\r\n\r\n <!-- Timeline Project Dependencies -->\r\n @case (\"timelineProjectDependencies\") {\r\n <mt-chart-card\r\n [dashboardId]=\"dashboardId()\"\r\n [reportId]=\"reportId()\"\r\n [inGroup]=\"inGroup()\"\r\n [titleEditable]=\"false\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n (onConfigure)=\"onConfigureRequested()\"\r\n (onTitleChange)=\"onTitleChange($event)\"\r\n >\r\n </mt-chart-card>\r\n }\r\n\r\n <!-- Last History Level Card (TableView shape) -->\r\n @case (\"lastHistoryLevelCard\") {\r\n <mt-last-history-level-card\r\n [dashboardId]=\"dashboardId()\"\r\n [reportId]=\"reportId()\"\r\n [inGroup]=\"inGroup()\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n >\r\n </mt-last-history-level-card>\r\n }\r\n\r\n <!-- Entity Preview -->\r\n @case (\"entityPreview\") {\r\n <mt-entity-preview-card [dashboardId]=\"dashboardId()\">\r\n </mt-entity-preview-card>\r\n }\r\n\r\n <!-- Entity Preview With Formula -->\r\n @case (\"entityPreviewWithFormula\") {\r\n <mt-entity-preview-card [dashboardId]=\"dashboardId()\">\r\n </mt-entity-preview-card>\r\n }\r\n\r\n <!-- Performance Card (BarV2Chart formula -> entity preview style) -->\r\n @case (\"performanceCard\") {\r\n <mt-entity-preview-card [dashboardId]=\"dashboardId()\">\r\n </mt-entity-preview-card>\r\n }\r\n\r\n <!-- Performance Gauge Card (S+) -->\r\n @case (\"performanceGaugeCard\") {\r\n <mt-chart-card\r\n [dashboardId]=\"dashboardId()\"\r\n [reportId]=\"reportId()\"\r\n [inGroup]=\"inGroup()\"\r\n [titleEditable]=\"false\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n (onConfigure)=\"onConfigureRequested()\"\r\n (onTitleChange)=\"onTitleChange($event)\"\r\n >\r\n </mt-chart-card>\r\n }\r\n\r\n <!-- Cluster Stacked Chart -->\r\n @case (\"clusterStackedChart\") {\r\n <mt-chart-card\r\n [dashboardId]=\"dashboardId()\"\r\n [reportId]=\"reportId()\"\r\n [inGroup]=\"inGroup()\"\r\n [titleEditable]=\"false\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n (onConfigure)=\"onConfigureRequested()\"\r\n (onTitleChange)=\"onTitleChange($event)\"\r\n >\r\n </mt-chart-card>\r\n }\r\n\r\n <!-- List Component S+ Card -->\r\n @case (\"listComponentSplusCard\") {\r\n <mt-list-statistic-card\r\n [dashboardId]=\"dashboardId()\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n >\r\n </mt-list-statistic-card>\r\n }\r\n\r\n <!-- Splitter Chart -->\r\n @case (\"splitterChart\") {\r\n <mt-chart-card\r\n [dashboardId]=\"dashboardId()\"\r\n [reportId]=\"reportId()\"\r\n [inGroup]=\"inGroup()\"\r\n [titleEditable]=\"false\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n (onConfigure)=\"onConfigureRequested()\"\r\n (onTitleChange)=\"onTitleChange($event)\"\r\n >\r\n </mt-chart-card>\r\n }\r\n\r\n <!-- Repeater (same as header) -->\r\n @case (\"repeater\") {\r\n <mt-header-card\r\n [dashboardId]=\"dashboardId()\"\r\n [titleEditable]=\"false\"\r\n (titleChange)=\"onTitleChange($event)\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n >\r\n </mt-header-card>\r\n }\r\n\r\n <!-- Level Cards With Static -->\r\n @case (\"levelCardsWithStatic\") {\r\n <mt-list-statistic-card\r\n [dashboardId]=\"dashboardId()\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n >\r\n </mt-list-statistic-card>\r\n }\r\n\r\n <!-- Phase Gate Stepper Card -->\r\n @case (\"phaseGateStepperCard\") {\r\n <mt-chart-card\r\n [dashboardId]=\"dashboardId()\"\r\n [reportId]=\"reportId()\"\r\n [inGroup]=\"inGroup()\"\r\n [titleEditable]=\"false\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n (onConfigure)=\"onConfigureRequested()\"\r\n (onTitleChange)=\"onTitleChange($event)\"\r\n >\r\n </mt-chart-card>\r\n }\r\n\r\n <!-- Dialog: rendered inside DashboardDialogComponent as a Table view.\r\n Header hidden \u2014 the dialog header already names it. -->\r\n @case (\"dialog\") {\r\n <mt-table-card\r\n [dashboardId]=\"dashboardId()\"\r\n [inGroup]=\"inGroup()\"\r\n [hideHeader]=\"true\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n >\r\n </mt-table-card>\r\n }\r\n\r\n <!-- Default: try chart -->\r\n @default {\r\n <mt-chart-card\r\n [dashboardId]=\"dashboardId()\"\r\n [reportId]=\"reportId()\"\r\n [inGroup]=\"inGroup()\"\r\n [titleEditable]=\"false\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n (onConfigure)=\"onConfigureRequested()\"\r\n (onTitleChange)=\"onTitleChange($event)\"\r\n >\r\n </mt-chart-card>\r\n }\r\n }\r\n}\r\n", styles: [":host{display:block;width:100%;height:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }, { kind: "component", type: ChartCardComponent, selector: "mt-chart-card", inputs: ["dashboardId", "reportId", "inGroup", "isConfigMode", "titleEditable"], outputs: ["onAction", "onConfigure", "onTitleChange"] }, { kind: "component", type: TableCardComponent, selector: "mt-table-card", inputs: ["dashboardId", "inGroup", "hideHeader"], outputs: ["onAction"] }, { kind: "component", type: ListStatisticCardComponent, selector: "mt-list-statistic-card", inputs: ["dashboardId"], outputs: ["onAction"] }, { kind: "component", type: HeaderCardComponent, selector: "mt-header-card", inputs: ["dashboardId", "titleEditable"], outputs: ["onAction", "titleChange"] }, { kind: "component", type: TopbarCardComponent, selector: "mt-topbar-card", inputs: ["dashboardId", "defaultBreadcrumbLabel", "titleEditable"], outputs: ["titleChange"] }, { kind: "component", type: SkeletonCardComponent, selector: "mt-skeleton-card", inputs: ["dashboardId"] }, { kind: "component", type: PropertiesCardComponent, selector: "mt-properties-card, mt-entities-preview-card", inputs: ["dashboardId", "inGroup"], outputs: ["onAction"] }, { kind: "component", type: EntityPreviewCardComponent, selector: "mt-entity-preview-card", inputs: ["dashboardId"] }, { kind: "component", type: LastHistoryLevelCardComponent, selector: "mt-last-history-level-card", inputs: ["dashboardId", "reportId", "inGroup"], outputs: ["onAction"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
33795
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: DashboardItem, isStandalone: true, selector: "mt-dashboard-item", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, chartTypeId: { classPropertyName: "chartTypeId", publicName: "chartTypeId", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, useCachedDataOnly: { classPropertyName: "useCachedDataOnly", publicName: "useCachedDataOnly", isSignal: true, isRequired: false, transformFunction: null }, pageName: { classPropertyName: "pageName", publicName: "pageName", isSignal: true, isRequired: false, transformFunction: null }, inGroup: { classPropertyName: "inGroup", publicName: "inGroup", isSignal: true, isRequired: false, transformFunction: null }, isDialog: { classPropertyName: "isDialog", publicName: "isDialog", isSignal: true, isRequired: false, transformFunction: null }, queryParams: { classPropertyName: "queryParams", publicName: "queryParams", isSignal: true, isRequired: false, transformFunction: null }, extraFilters: { classPropertyName: "extraFilters", publicName: "extraFilters", isSignal: true, isRequired: false, transformFunction: null }, reportId: { classPropertyName: "reportId", publicName: "reportId", isSignal: true, isRequired: false, transformFunction: null }, ignoreQueryFilter: { classPropertyName: "ignoreQueryFilter", publicName: "ignoreQueryFilter", isSignal: true, isRequired: false, transformFunction: null }, builderMode: { classPropertyName: "builderMode", publicName: "builderMode", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { actionTriggered: "actionTriggered", configureRequested: "configureRequested", titleEdited: "titleEdited" }, ngImport: i0, template: "@if (isLoading()) {\r\n <mt-skeleton-card [dashboardId]=\"dashboardId()\"></mt-skeleton-card>\r\n} @else if (hasError()) {\r\n <div\r\n class=\"db-item-state db-item-state--error flex flex-col items-center justify-center h-full p-4 text-center\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n data-dashboard-ux-state=\"data-error\"\r\n >\r\n <mt-icon\r\n icon=\"general.alert-circle\"\r\n class=\"text-4xl text-red-500 mb-2\"\r\n ></mt-icon>\r\n <p class=\"text-red-500 font-medium\">\r\n {{ t(\"guided.dataError\") }}\r\n </p>\r\n <p class=\"text-xs text-muted-color max-w-md leading-snug mt-1\">\r\n {{ errorMessage() || t(\"guided.dataErrorHint\") }}\r\n </p>\r\n <mt-button\r\n class=\"mt-2\"\r\n [label]=\"t('guided.retry')\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n icon=\"arrow.refresh-cw-01\"\r\n (onClick)=\"refresh()\"\r\n data-dashboard-action=\"retry\"\r\n />\r\n </div>\r\n} @else if (needsConfiguration()) {\r\n <div\r\n class=\"db-item-state db-item-state--unconfigured flex h-full flex-col items-center justify-center gap-3 p-6 text-center bg-surface-50 rounded-md border border-dashed border-surface-300 relative\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n [attr.data-dashboard-ux-state]=\"guidanceUxState()\"\r\n data-dashboard-primary-action=\"configure-datasource\"\r\n >\r\n <mt-icon\r\n [icon]=\"guidanceIcon()\"\r\n class=\"text-4xl text-primary-500\"\r\n ></mt-icon>\r\n\r\n <div class=\"flex flex-col items-center gap-1\">\r\n <h3 class=\"text-base font-semibold text-surface-700\">\r\n {{ guidanceTitle() }}\r\n </h3>\r\n <p class=\"text-xs text-muted-color max-w-md leading-relaxed\">\r\n {{ guidanceHint() }}\r\n </p>\r\n </div>\r\n\r\n <mt-button\r\n [label]=\"guidancePrimaryLabel()\"\r\n [icon]=\"guidancePrimaryIcon()\"\r\n severity=\"primary\"\r\n size=\"small\"\r\n (onClick)=\"onConfigureRequested()\"\r\n data-dashboard-action=\"configure-datasource\"\r\n [attr.aria-label]=\"guidancePrimaryLabel()\"\r\n />\r\n\r\n @if (guidanceSecondaryLabel()) {\r\n <mt-button\r\n [label]=\"guidanceSecondaryLabel()\"\r\n [icon]=\"guidanceSecondaryIcon()\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [text]=\"true\"\r\n (onClick)=\"onSecondaryRequested()\"\r\n [attr.aria-label]=\"guidanceSecondaryLabel()\"\r\n />\r\n }\r\n </div>\r\n} @else {\r\n @switch (componentName()) {\r\n <!-- Chart Types -->\r\n @case (\"chart\") {\r\n <mt-chart-card\r\n [dashboardId]=\"dashboardId()\"\r\n [reportId]=\"reportId()\"\r\n [inGroup]=\"inGroup()\"\r\n [titleEditable]=\"false\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n (onConfigure)=\"onConfigureRequested()\"\r\n (onTitleChange)=\"onTitleChange($event)\"\r\n >\r\n </mt-chart-card>\r\n }\r\n\r\n <!-- Map Chart -->\r\n @case (\"map\") {\r\n <mt-chart-card\r\n [dashboardId]=\"dashboardId()\"\r\n [reportId]=\"reportId()\"\r\n [inGroup]=\"inGroup()\"\r\n [titleEditable]=\"false\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n (onConfigure)=\"onConfigureRequested()\"\r\n (onTitleChange)=\"onTitleChange($event)\"\r\n >\r\n </mt-chart-card>\r\n }\r\n\r\n <!-- Background Text -->\r\n @case (\"BackgroundTextChart\") {\r\n <mt-header-card\r\n [dashboardId]=\"dashboardId()\"\r\n [titleEditable]=\"false\"\r\n (titleChange)=\"onTitleChange($event)\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n >\r\n </mt-header-card>\r\n }\r\n\r\n <!-- Chart Custom With Card Info -->\r\n @case (\"chartCustomWithCardInfo\") {\r\n <mt-chart-card\r\n [dashboardId]=\"dashboardId()\"\r\n [reportId]=\"reportId()\"\r\n [inGroup]=\"inGroup()\"\r\n [titleEditable]=\"false\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n (onConfigure)=\"onConfigureRequested()\"\r\n (onTitleChange)=\"onTitleChange($event)\"\r\n >\r\n </mt-chart-card>\r\n }\r\n\r\n <!-- List of Charts -->\r\n @case (\"listOfcharts\") {\r\n <mt-chart-card\r\n [dashboardId]=\"dashboardId()\"\r\n [reportId]=\"reportId()\"\r\n [inGroup]=\"inGroup()\"\r\n [titleEditable]=\"false\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n (onConfigure)=\"onConfigureRequested()\"\r\n (onTitleChange)=\"onTitleChange($event)\"\r\n >\r\n </mt-chart-card>\r\n }\r\n\r\n <!-- List of Cards Statistic -->\r\n @case (\"listOfCardsStatistic\") {\r\n <mt-list-statistic-card\r\n [dashboardId]=\"dashboardId()\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n >\r\n </mt-list-statistic-card>\r\n }\r\n\r\n <!-- Cards Statistic (single) -->\r\n @case (\"cardsStatistic\") {\r\n <mt-list-statistic-card\r\n [dashboardId]=\"dashboardId()\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n >\r\n </mt-list-statistic-card>\r\n }\r\n\r\n <!-- Header -->\r\n @case (\"header\") {\r\n <mt-header-card\r\n [dashboardId]=\"dashboardId()\"\r\n [titleEditable]=\"false\"\r\n (titleChange)=\"onTitleChange($event)\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n >\r\n </mt-header-card>\r\n }\r\n\r\n <!-- Footer (same as header) -->\r\n @case (\"footer\") {\r\n <mt-header-card\r\n [dashboardId]=\"dashboardId()\"\r\n [titleEditable]=\"false\"\r\n (titleChange)=\"onTitleChange($event)\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n >\r\n </mt-header-card>\r\n }\r\n\r\n <!-- Label (same as header) -->\r\n @case (\"label\") {\r\n <mt-header-card\r\n [dashboardId]=\"dashboardId()\"\r\n [titleEditable]=\"false\"\r\n (titleChange)=\"onTitleChange($event)\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n >\r\n </mt-header-card>\r\n }\r\n\r\n <!-- List of Level Cards -->\r\n @case (\"listOfLevelCards\") {\r\n <mt-properties-card\r\n [dashboardId]=\"dashboardId()\"\r\n [inGroup]=\"inGroup()\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n >\r\n </mt-properties-card>\r\n }\r\n\r\n @case (\"entitiesPreview\") {\r\n <mt-properties-card\r\n [dashboardId]=\"dashboardId()\"\r\n [inGroup]=\"inGroup()\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n >\r\n </mt-properties-card>\r\n }\r\n\r\n <!-- Table. The table card renders the data grid, so it loads on demand\r\n (@defer) and the grid stays out of every host bundle that only imports\r\n the dashboard-builder main entry. -->\r\n @case (\"table\") {\r\n @defer (on immediate) {\r\n <mt-table-card\r\n [dashboardId]=\"dashboardId()\"\r\n [inGroup]=\"inGroup()\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n >\r\n </mt-table-card>\r\n } @placeholder {\r\n <mt-skeleton-card [dashboardId]=\"dashboardId()\"></mt-skeleton-card>\r\n }\r\n }\r\n\r\n <!-- Phase Gate Table -->\r\n @case (\"phaseGateTable\") {\r\n @defer (on immediate) {\r\n <mt-table-card\r\n [dashboardId]=\"dashboardId()\"\r\n [inGroup]=\"inGroup()\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n >\r\n </mt-table-card>\r\n } @placeholder {\r\n <mt-skeleton-card [dashboardId]=\"dashboardId()\"></mt-skeleton-card>\r\n }\r\n }\r\n\r\n <!-- Topbar -->\r\n @case (\"topbar\") {\r\n <mt-topbar-card\r\n [dashboardId]=\"dashboardId()\"\r\n [defaultBreadcrumbLabel]=\"pageName()\"\r\n [titleEditable]=\"false\"\r\n (titleChange)=\"onTitleChange($event)\"\r\n ></mt-topbar-card>\r\n }\r\n\r\n <!-- Timeline -->\r\n @case (\"timeline\") {\r\n <mt-chart-card\r\n [dashboardId]=\"dashboardId()\"\r\n [reportId]=\"reportId()\"\r\n [inGroup]=\"inGroup()\"\r\n [titleEditable]=\"false\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n (onConfigure)=\"onConfigureRequested()\"\r\n (onTitleChange)=\"onTitleChange($event)\"\r\n >\r\n </mt-chart-card>\r\n }\r\n\r\n <!-- Timeline Project Dependencies -->\r\n @case (\"timelineProjectDependencies\") {\r\n <mt-chart-card\r\n [dashboardId]=\"dashboardId()\"\r\n [reportId]=\"reportId()\"\r\n [inGroup]=\"inGroup()\"\r\n [titleEditable]=\"false\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n (onConfigure)=\"onConfigureRequested()\"\r\n (onTitleChange)=\"onTitleChange($event)\"\r\n >\r\n </mt-chart-card>\r\n }\r\n\r\n <!-- Last History Level Card (TableView shape) -->\r\n @case (\"lastHistoryLevelCard\") {\r\n <mt-last-history-level-card\r\n [dashboardId]=\"dashboardId()\"\r\n [reportId]=\"reportId()\"\r\n [inGroup]=\"inGroup()\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n >\r\n </mt-last-history-level-card>\r\n }\r\n\r\n <!-- Entity Preview -->\r\n @case (\"entityPreview\") {\r\n <mt-entity-preview-card [dashboardId]=\"dashboardId()\">\r\n </mt-entity-preview-card>\r\n }\r\n\r\n <!-- Entity Preview With Formula -->\r\n @case (\"entityPreviewWithFormula\") {\r\n <mt-entity-preview-card [dashboardId]=\"dashboardId()\">\r\n </mt-entity-preview-card>\r\n }\r\n\r\n <!-- Performance Card (BarV2Chart formula -> entity preview style) -->\r\n @case (\"performanceCard\") {\r\n <mt-entity-preview-card [dashboardId]=\"dashboardId()\">\r\n </mt-entity-preview-card>\r\n }\r\n\r\n <!-- Performance Gauge Card (S+) -->\r\n @case (\"performanceGaugeCard\") {\r\n <mt-chart-card\r\n [dashboardId]=\"dashboardId()\"\r\n [reportId]=\"reportId()\"\r\n [inGroup]=\"inGroup()\"\r\n [titleEditable]=\"false\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n (onConfigure)=\"onConfigureRequested()\"\r\n (onTitleChange)=\"onTitleChange($event)\"\r\n >\r\n </mt-chart-card>\r\n }\r\n\r\n <!-- Cluster Stacked Chart -->\r\n @case (\"clusterStackedChart\") {\r\n <mt-chart-card\r\n [dashboardId]=\"dashboardId()\"\r\n [reportId]=\"reportId()\"\r\n [inGroup]=\"inGroup()\"\r\n [titleEditable]=\"false\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n (onConfigure)=\"onConfigureRequested()\"\r\n (onTitleChange)=\"onTitleChange($event)\"\r\n >\r\n </mt-chart-card>\r\n }\r\n\r\n <!-- List Component S+ Card -->\r\n @case (\"listComponentSplusCard\") {\r\n <mt-list-statistic-card\r\n [dashboardId]=\"dashboardId()\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n >\r\n </mt-list-statistic-card>\r\n }\r\n\r\n <!-- Splitter Chart -->\r\n @case (\"splitterChart\") {\r\n <mt-chart-card\r\n [dashboardId]=\"dashboardId()\"\r\n [reportId]=\"reportId()\"\r\n [inGroup]=\"inGroup()\"\r\n [titleEditable]=\"false\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n (onConfigure)=\"onConfigureRequested()\"\r\n (onTitleChange)=\"onTitleChange($event)\"\r\n >\r\n </mt-chart-card>\r\n }\r\n\r\n <!-- Repeater (same as header) -->\r\n @case (\"repeater\") {\r\n <mt-header-card\r\n [dashboardId]=\"dashboardId()\"\r\n [titleEditable]=\"false\"\r\n (titleChange)=\"onTitleChange($event)\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n >\r\n </mt-header-card>\r\n }\r\n\r\n <!-- Level Cards With Static -->\r\n @case (\"levelCardsWithStatic\") {\r\n <mt-list-statistic-card\r\n [dashboardId]=\"dashboardId()\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n >\r\n </mt-list-statistic-card>\r\n }\r\n\r\n <!-- Phase Gate Stepper Card -->\r\n @case (\"phaseGateStepperCard\") {\r\n <mt-chart-card\r\n [dashboardId]=\"dashboardId()\"\r\n [reportId]=\"reportId()\"\r\n [inGroup]=\"inGroup()\"\r\n [titleEditable]=\"false\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n (onConfigure)=\"onConfigureRequested()\"\r\n (onTitleChange)=\"onTitleChange($event)\"\r\n >\r\n </mt-chart-card>\r\n }\r\n\r\n <!-- Dialog: rendered inside DashboardDialogComponent as a Table view.\r\n Header hidden \u2014 the dialog header already names it. -->\r\n @case (\"dialog\") {\r\n @defer (on immediate) {\r\n <mt-table-card\r\n [dashboardId]=\"dashboardId()\"\r\n [inGroup]=\"inGroup()\"\r\n [hideHeader]=\"true\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n >\r\n </mt-table-card>\r\n } @placeholder {\r\n <mt-skeleton-card [dashboardId]=\"dashboardId()\"></mt-skeleton-card>\r\n }\r\n }\r\n\r\n <!-- Default: try chart -->\r\n @default {\r\n <mt-chart-card\r\n [dashboardId]=\"dashboardId()\"\r\n [reportId]=\"reportId()\"\r\n [inGroup]=\"inGroup()\"\r\n [titleEditable]=\"false\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n (onConfigure)=\"onConfigureRequested()\"\r\n (onTitleChange)=\"onTitleChange($event)\"\r\n >\r\n </mt-chart-card>\r\n }\r\n }\r\n}\r\n", styles: [":host{display:block;width:100%;height:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }, { kind: "component", type: ChartCardComponent, selector: "mt-chart-card", inputs: ["dashboardId", "reportId", "inGroup", "isConfigMode", "titleEditable"], outputs: ["onAction", "onConfigure", "onTitleChange"] }, { kind: "component", type: ListStatisticCardComponent, selector: "mt-list-statistic-card", inputs: ["dashboardId"], outputs: ["onAction"] }, { kind: "component", type: HeaderCardComponent, selector: "mt-header-card", inputs: ["dashboardId", "titleEditable"], outputs: ["onAction", "titleChange"] }, { kind: "component", type: TopbarCardComponent, selector: "mt-topbar-card", inputs: ["dashboardId", "defaultBreadcrumbLabel", "titleEditable"], outputs: ["titleChange"] }, { kind: "component", type: SkeletonCardComponent, selector: "mt-skeleton-card", inputs: ["dashboardId"] }, { kind: "component", type: PropertiesCardComponent, selector: "mt-properties-card, mt-entities-preview-card", inputs: ["dashboardId", "inGroup"], outputs: ["onAction"] }, { kind: "component", type: EntityPreviewCardComponent, selector: "mt-entity-preview-card", inputs: ["dashboardId"] }, { kind: "component", type: LastHistoryLevelCardComponent, selector: "mt-last-history-level-card", inputs: ["dashboardId", "reportId", "inGroup"], outputs: ["onAction"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None, deferBlockDependencies: [() => [import('./masterteam-dashboard-builder-table-card.component-kHPxfvAb.mjs').then(m => m.TableCardComponent)], () => [import('./masterteam-dashboard-builder-table-card.component-kHPxfvAb.mjs').then(m => m.TableCardComponent)], () => [import('./masterteam-dashboard-builder-table-card.component-kHPxfvAb.mjs').then(m => m.TableCardComponent)]] });
|
|
35547
33796
|
}
|
|
35548
|
-
i0.ɵɵ
|
|
35549
|
-
|
|
35550
|
-
|
|
35551
|
-
|
|
35552
|
-
|
|
35553
|
-
|
|
35554
|
-
|
|
35555
|
-
|
|
35556
|
-
|
|
35557
|
-
|
|
35558
|
-
|
|
35559
|
-
|
|
35560
|
-
|
|
35561
|
-
|
|
35562
|
-
|
|
35563
|
-
|
|
35564
|
-
], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (isLoading()) {\r\n <mt-skeleton-card [dashboardId]=\"dashboardId()\"></mt-skeleton-card>\r\n} @else if (hasError()) {\r\n <div\r\n class=\"db-item-state db-item-state--error flex flex-col items-center justify-center h-full p-4 text-center\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n data-dashboard-ux-state=\"data-error\"\r\n >\r\n <mt-icon\r\n icon=\"general.alert-circle\"\r\n class=\"text-4xl text-red-500 mb-2\"\r\n ></mt-icon>\r\n <p class=\"text-red-500 font-medium\">\r\n {{ t(\"guided.dataError\") }}\r\n </p>\r\n <p class=\"text-xs text-muted-color max-w-md leading-snug mt-1\">\r\n {{ errorMessage() || t(\"guided.dataErrorHint\") }}\r\n </p>\r\n <mt-button\r\n class=\"mt-2\"\r\n [label]=\"t('guided.retry')\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n icon=\"arrow.refresh-cw-01\"\r\n (onClick)=\"refresh()\"\r\n data-dashboard-action=\"retry\"\r\n />\r\n </div>\r\n} @else if (needsConfiguration()) {\r\n <div\r\n class=\"db-item-state db-item-state--unconfigured flex h-full flex-col items-center justify-center gap-3 p-6 text-center bg-surface-50 rounded-md border border-dashed border-surface-300 relative\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n [attr.data-dashboard-ux-state]=\"guidanceUxState()\"\r\n data-dashboard-primary-action=\"configure-datasource\"\r\n >\r\n <mt-icon\r\n [icon]=\"guidanceIcon()\"\r\n class=\"text-4xl text-primary-500\"\r\n ></mt-icon>\r\n\r\n <div class=\"flex flex-col items-center gap-1\">\r\n <h3 class=\"text-base font-semibold text-surface-700\">\r\n {{ guidanceTitle() }}\r\n </h3>\r\n <p class=\"text-xs text-muted-color max-w-md leading-relaxed\">\r\n {{ guidanceHint() }}\r\n </p>\r\n </div>\r\n\r\n <mt-button\r\n [label]=\"guidancePrimaryLabel()\"\r\n [icon]=\"guidancePrimaryIcon()\"\r\n severity=\"primary\"\r\n size=\"small\"\r\n (onClick)=\"onConfigureRequested()\"\r\n data-dashboard-action=\"configure-datasource\"\r\n [attr.aria-label]=\"guidancePrimaryLabel()\"\r\n />\r\n\r\n @if (guidanceSecondaryLabel()) {\r\n <mt-button\r\n [label]=\"guidanceSecondaryLabel()\"\r\n [icon]=\"guidanceSecondaryIcon()\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [text]=\"true\"\r\n (onClick)=\"onSecondaryRequested()\"\r\n [attr.aria-label]=\"guidanceSecondaryLabel()\"\r\n />\r\n }\r\n </div>\r\n} @else {\r\n @switch (componentName()) {\r\n <!-- Chart Types -->\r\n @case (\"chart\") {\r\n <mt-chart-card\r\n [dashboardId]=\"dashboardId()\"\r\n [reportId]=\"reportId()\"\r\n [inGroup]=\"inGroup()\"\r\n [titleEditable]=\"false\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n (onConfigure)=\"onConfigureRequested()\"\r\n (onTitleChange)=\"onTitleChange($event)\"\r\n >\r\n </mt-chart-card>\r\n }\r\n\r\n <!-- Map Chart -->\r\n @case (\"map\") {\r\n <mt-chart-card\r\n [dashboardId]=\"dashboardId()\"\r\n [reportId]=\"reportId()\"\r\n [inGroup]=\"inGroup()\"\r\n [titleEditable]=\"false\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n (onConfigure)=\"onConfigureRequested()\"\r\n (onTitleChange)=\"onTitleChange($event)\"\r\n >\r\n </mt-chart-card>\r\n }\r\n\r\n <!-- Background Text -->\r\n @case (\"BackgroundTextChart\") {\r\n <mt-header-card\r\n [dashboardId]=\"dashboardId()\"\r\n [titleEditable]=\"false\"\r\n (titleChange)=\"onTitleChange($event)\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n >\r\n </mt-header-card>\r\n }\r\n\r\n <!-- Chart Custom With Card Info -->\r\n @case (\"chartCustomWithCardInfo\") {\r\n <mt-chart-card\r\n [dashboardId]=\"dashboardId()\"\r\n [reportId]=\"reportId()\"\r\n [inGroup]=\"inGroup()\"\r\n [titleEditable]=\"false\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n (onConfigure)=\"onConfigureRequested()\"\r\n (onTitleChange)=\"onTitleChange($event)\"\r\n >\r\n </mt-chart-card>\r\n }\r\n\r\n <!-- List of Charts -->\r\n @case (\"listOfcharts\") {\r\n <mt-chart-card\r\n [dashboardId]=\"dashboardId()\"\r\n [reportId]=\"reportId()\"\r\n [inGroup]=\"inGroup()\"\r\n [titleEditable]=\"false\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n (onConfigure)=\"onConfigureRequested()\"\r\n (onTitleChange)=\"onTitleChange($event)\"\r\n >\r\n </mt-chart-card>\r\n }\r\n\r\n <!-- List of Cards Statistic -->\r\n @case (\"listOfCardsStatistic\") {\r\n <mt-list-statistic-card\r\n [dashboardId]=\"dashboardId()\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n >\r\n </mt-list-statistic-card>\r\n }\r\n\r\n <!-- Cards Statistic (single) -->\r\n @case (\"cardsStatistic\") {\r\n <mt-list-statistic-card\r\n [dashboardId]=\"dashboardId()\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n >\r\n </mt-list-statistic-card>\r\n }\r\n\r\n <!-- Header -->\r\n @case (\"header\") {\r\n <mt-header-card\r\n [dashboardId]=\"dashboardId()\"\r\n [titleEditable]=\"false\"\r\n (titleChange)=\"onTitleChange($event)\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n >\r\n </mt-header-card>\r\n }\r\n\r\n <!-- Footer (same as header) -->\r\n @case (\"footer\") {\r\n <mt-header-card\r\n [dashboardId]=\"dashboardId()\"\r\n [titleEditable]=\"false\"\r\n (titleChange)=\"onTitleChange($event)\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n >\r\n </mt-header-card>\r\n }\r\n\r\n <!-- Label (same as header) -->\r\n @case (\"label\") {\r\n <mt-header-card\r\n [dashboardId]=\"dashboardId()\"\r\n [titleEditable]=\"false\"\r\n (titleChange)=\"onTitleChange($event)\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n >\r\n </mt-header-card>\r\n }\r\n\r\n <!-- List of Level Cards -->\r\n @case (\"listOfLevelCards\") {\r\n <mt-properties-card\r\n [dashboardId]=\"dashboardId()\"\r\n [inGroup]=\"inGroup()\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n >\r\n </mt-properties-card>\r\n }\r\n\r\n @case (\"entitiesPreview\") {\r\n <mt-properties-card\r\n [dashboardId]=\"dashboardId()\"\r\n [inGroup]=\"inGroup()\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n >\r\n </mt-properties-card>\r\n }\r\n\r\n <!-- Table -->\r\n @case (\"table\") {\r\n <mt-table-card\r\n [dashboardId]=\"dashboardId()\"\r\n [inGroup]=\"inGroup()\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n >\r\n </mt-table-card>\r\n }\r\n\r\n <!-- Phase Gate Table -->\r\n @case (\"phaseGateTable\") {\r\n <mt-table-card\r\n [dashboardId]=\"dashboardId()\"\r\n [inGroup]=\"inGroup()\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n >\r\n </mt-table-card>\r\n }\r\n\r\n <!-- Topbar -->\r\n @case (\"topbar\") {\r\n <mt-topbar-card\r\n [dashboardId]=\"dashboardId()\"\r\n [defaultBreadcrumbLabel]=\"pageName()\"\r\n [titleEditable]=\"false\"\r\n (titleChange)=\"onTitleChange($event)\"\r\n ></mt-topbar-card>\r\n }\r\n\r\n <!-- Timeline -->\r\n @case (\"timeline\") {\r\n <mt-chart-card\r\n [dashboardId]=\"dashboardId()\"\r\n [reportId]=\"reportId()\"\r\n [inGroup]=\"inGroup()\"\r\n [titleEditable]=\"false\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n (onConfigure)=\"onConfigureRequested()\"\r\n (onTitleChange)=\"onTitleChange($event)\"\r\n >\r\n </mt-chart-card>\r\n }\r\n\r\n <!-- Timeline Project Dependencies -->\r\n @case (\"timelineProjectDependencies\") {\r\n <mt-chart-card\r\n [dashboardId]=\"dashboardId()\"\r\n [reportId]=\"reportId()\"\r\n [inGroup]=\"inGroup()\"\r\n [titleEditable]=\"false\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n (onConfigure)=\"onConfigureRequested()\"\r\n (onTitleChange)=\"onTitleChange($event)\"\r\n >\r\n </mt-chart-card>\r\n }\r\n\r\n <!-- Last History Level Card (TableView shape) -->\r\n @case (\"lastHistoryLevelCard\") {\r\n <mt-last-history-level-card\r\n [dashboardId]=\"dashboardId()\"\r\n [reportId]=\"reportId()\"\r\n [inGroup]=\"inGroup()\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n >\r\n </mt-last-history-level-card>\r\n }\r\n\r\n <!-- Entity Preview -->\r\n @case (\"entityPreview\") {\r\n <mt-entity-preview-card [dashboardId]=\"dashboardId()\">\r\n </mt-entity-preview-card>\r\n }\r\n\r\n <!-- Entity Preview With Formula -->\r\n @case (\"entityPreviewWithFormula\") {\r\n <mt-entity-preview-card [dashboardId]=\"dashboardId()\">\r\n </mt-entity-preview-card>\r\n }\r\n\r\n <!-- Performance Card (BarV2Chart formula -> entity preview style) -->\r\n @case (\"performanceCard\") {\r\n <mt-entity-preview-card [dashboardId]=\"dashboardId()\">\r\n </mt-entity-preview-card>\r\n }\r\n\r\n <!-- Performance Gauge Card (S+) -->\r\n @case (\"performanceGaugeCard\") {\r\n <mt-chart-card\r\n [dashboardId]=\"dashboardId()\"\r\n [reportId]=\"reportId()\"\r\n [inGroup]=\"inGroup()\"\r\n [titleEditable]=\"false\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n (onConfigure)=\"onConfigureRequested()\"\r\n (onTitleChange)=\"onTitleChange($event)\"\r\n >\r\n </mt-chart-card>\r\n }\r\n\r\n <!-- Cluster Stacked Chart -->\r\n @case (\"clusterStackedChart\") {\r\n <mt-chart-card\r\n [dashboardId]=\"dashboardId()\"\r\n [reportId]=\"reportId()\"\r\n [inGroup]=\"inGroup()\"\r\n [titleEditable]=\"false\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n (onConfigure)=\"onConfigureRequested()\"\r\n (onTitleChange)=\"onTitleChange($event)\"\r\n >\r\n </mt-chart-card>\r\n }\r\n\r\n <!-- List Component S+ Card -->\r\n @case (\"listComponentSplusCard\") {\r\n <mt-list-statistic-card\r\n [dashboardId]=\"dashboardId()\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n >\r\n </mt-list-statistic-card>\r\n }\r\n\r\n <!-- Splitter Chart -->\r\n @case (\"splitterChart\") {\r\n <mt-chart-card\r\n [dashboardId]=\"dashboardId()\"\r\n [reportId]=\"reportId()\"\r\n [inGroup]=\"inGroup()\"\r\n [titleEditable]=\"false\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n (onConfigure)=\"onConfigureRequested()\"\r\n (onTitleChange)=\"onTitleChange($event)\"\r\n >\r\n </mt-chart-card>\r\n }\r\n\r\n <!-- Repeater (same as header) -->\r\n @case (\"repeater\") {\r\n <mt-header-card\r\n [dashboardId]=\"dashboardId()\"\r\n [titleEditable]=\"false\"\r\n (titleChange)=\"onTitleChange($event)\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n >\r\n </mt-header-card>\r\n }\r\n\r\n <!-- Level Cards With Static -->\r\n @case (\"levelCardsWithStatic\") {\r\n <mt-list-statistic-card\r\n [dashboardId]=\"dashboardId()\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n >\r\n </mt-list-statistic-card>\r\n }\r\n\r\n <!-- Phase Gate Stepper Card -->\r\n @case (\"phaseGateStepperCard\") {\r\n <mt-chart-card\r\n [dashboardId]=\"dashboardId()\"\r\n [reportId]=\"reportId()\"\r\n [inGroup]=\"inGroup()\"\r\n [titleEditable]=\"false\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n (onConfigure)=\"onConfigureRequested()\"\r\n (onTitleChange)=\"onTitleChange($event)\"\r\n >\r\n </mt-chart-card>\r\n }\r\n\r\n <!-- Dialog: rendered inside DashboardDialogComponent as a Table view.\r\n Header hidden \u2014 the dialog header already names it. -->\r\n @case (\"dialog\") {\r\n <mt-table-card\r\n [dashboardId]=\"dashboardId()\"\r\n [inGroup]=\"inGroup()\"\r\n [hideHeader]=\"true\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n >\r\n </mt-table-card>\r\n }\r\n\r\n <!-- Default: try chart -->\r\n @default {\r\n <mt-chart-card\r\n [dashboardId]=\"dashboardId()\"\r\n [reportId]=\"reportId()\"\r\n [inGroup]=\"inGroup()\"\r\n [titleEditable]=\"false\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n (onConfigure)=\"onConfigureRequested()\"\r\n (onTitleChange)=\"onTitleChange($event)\"\r\n >\r\n </mt-chart-card>\r\n }\r\n }\r\n}\r\n", styles: [":host{display:block;width:100%;height:100%}\n"] }]
|
|
35565
|
-
|
|
33797
|
+
i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "21.2.8", ngImport: i0, type: DashboardItem, resolveDeferredDeps: () => [import('./masterteam-dashboard-builder-table-card.component-kHPxfvAb.mjs').then(m => m.TableCardComponent)], resolveMetadata: TableCardComponent => ({ decorators: [{
|
|
33798
|
+
type: Component,
|
|
33799
|
+
args: [{ selector: 'mt-dashboard-item', standalone: true, imports: [
|
|
33800
|
+
CommonModule,
|
|
33801
|
+
TranslocoDirective,
|
|
33802
|
+
Button,
|
|
33803
|
+
Icon,
|
|
33804
|
+
ChartCardComponent,
|
|
33805
|
+
TableCardComponent,
|
|
33806
|
+
ListStatisticCardComponent,
|
|
33807
|
+
HeaderCardComponent,
|
|
33808
|
+
TopbarCardComponent,
|
|
33809
|
+
SkeletonCardComponent,
|
|
33810
|
+
PropertiesCardComponent,
|
|
33811
|
+
EntityPreviewCardComponent,
|
|
33812
|
+
LastHistoryLevelCardComponent,
|
|
33813
|
+
], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (isLoading()) {\r\n <mt-skeleton-card [dashboardId]=\"dashboardId()\"></mt-skeleton-card>\r\n} @else if (hasError()) {\r\n <div\r\n class=\"db-item-state db-item-state--error flex flex-col items-center justify-center h-full p-4 text-center\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n data-dashboard-ux-state=\"data-error\"\r\n >\r\n <mt-icon\r\n icon=\"general.alert-circle\"\r\n class=\"text-4xl text-red-500 mb-2\"\r\n ></mt-icon>\r\n <p class=\"text-red-500 font-medium\">\r\n {{ t(\"guided.dataError\") }}\r\n </p>\r\n <p class=\"text-xs text-muted-color max-w-md leading-snug mt-1\">\r\n {{ errorMessage() || t(\"guided.dataErrorHint\") }}\r\n </p>\r\n <mt-button\r\n class=\"mt-2\"\r\n [label]=\"t('guided.retry')\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n icon=\"arrow.refresh-cw-01\"\r\n (onClick)=\"refresh()\"\r\n data-dashboard-action=\"retry\"\r\n />\r\n </div>\r\n} @else if (needsConfiguration()) {\r\n <div\r\n class=\"db-item-state db-item-state--unconfigured flex h-full flex-col items-center justify-center gap-3 p-6 text-center bg-surface-50 rounded-md border border-dashed border-surface-300 relative\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n [attr.data-dashboard-ux-state]=\"guidanceUxState()\"\r\n data-dashboard-primary-action=\"configure-datasource\"\r\n >\r\n <mt-icon\r\n [icon]=\"guidanceIcon()\"\r\n class=\"text-4xl text-primary-500\"\r\n ></mt-icon>\r\n\r\n <div class=\"flex flex-col items-center gap-1\">\r\n <h3 class=\"text-base font-semibold text-surface-700\">\r\n {{ guidanceTitle() }}\r\n </h3>\r\n <p class=\"text-xs text-muted-color max-w-md leading-relaxed\">\r\n {{ guidanceHint() }}\r\n </p>\r\n </div>\r\n\r\n <mt-button\r\n [label]=\"guidancePrimaryLabel()\"\r\n [icon]=\"guidancePrimaryIcon()\"\r\n severity=\"primary\"\r\n size=\"small\"\r\n (onClick)=\"onConfigureRequested()\"\r\n data-dashboard-action=\"configure-datasource\"\r\n [attr.aria-label]=\"guidancePrimaryLabel()\"\r\n />\r\n\r\n @if (guidanceSecondaryLabel()) {\r\n <mt-button\r\n [label]=\"guidanceSecondaryLabel()\"\r\n [icon]=\"guidanceSecondaryIcon()\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [text]=\"true\"\r\n (onClick)=\"onSecondaryRequested()\"\r\n [attr.aria-label]=\"guidanceSecondaryLabel()\"\r\n />\r\n }\r\n </div>\r\n} @else {\r\n @switch (componentName()) {\r\n <!-- Chart Types -->\r\n @case (\"chart\") {\r\n <mt-chart-card\r\n [dashboardId]=\"dashboardId()\"\r\n [reportId]=\"reportId()\"\r\n [inGroup]=\"inGroup()\"\r\n [titleEditable]=\"false\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n (onConfigure)=\"onConfigureRequested()\"\r\n (onTitleChange)=\"onTitleChange($event)\"\r\n >\r\n </mt-chart-card>\r\n }\r\n\r\n <!-- Map Chart -->\r\n @case (\"map\") {\r\n <mt-chart-card\r\n [dashboardId]=\"dashboardId()\"\r\n [reportId]=\"reportId()\"\r\n [inGroup]=\"inGroup()\"\r\n [titleEditable]=\"false\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n (onConfigure)=\"onConfigureRequested()\"\r\n (onTitleChange)=\"onTitleChange($event)\"\r\n >\r\n </mt-chart-card>\r\n }\r\n\r\n <!-- Background Text -->\r\n @case (\"BackgroundTextChart\") {\r\n <mt-header-card\r\n [dashboardId]=\"dashboardId()\"\r\n [titleEditable]=\"false\"\r\n (titleChange)=\"onTitleChange($event)\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n >\r\n </mt-header-card>\r\n }\r\n\r\n <!-- Chart Custom With Card Info -->\r\n @case (\"chartCustomWithCardInfo\") {\r\n <mt-chart-card\r\n [dashboardId]=\"dashboardId()\"\r\n [reportId]=\"reportId()\"\r\n [inGroup]=\"inGroup()\"\r\n [titleEditable]=\"false\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n (onConfigure)=\"onConfigureRequested()\"\r\n (onTitleChange)=\"onTitleChange($event)\"\r\n >\r\n </mt-chart-card>\r\n }\r\n\r\n <!-- List of Charts -->\r\n @case (\"listOfcharts\") {\r\n <mt-chart-card\r\n [dashboardId]=\"dashboardId()\"\r\n [reportId]=\"reportId()\"\r\n [inGroup]=\"inGroup()\"\r\n [titleEditable]=\"false\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n (onConfigure)=\"onConfigureRequested()\"\r\n (onTitleChange)=\"onTitleChange($event)\"\r\n >\r\n </mt-chart-card>\r\n }\r\n\r\n <!-- List of Cards Statistic -->\r\n @case (\"listOfCardsStatistic\") {\r\n <mt-list-statistic-card\r\n [dashboardId]=\"dashboardId()\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n >\r\n </mt-list-statistic-card>\r\n }\r\n\r\n <!-- Cards Statistic (single) -->\r\n @case (\"cardsStatistic\") {\r\n <mt-list-statistic-card\r\n [dashboardId]=\"dashboardId()\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n >\r\n </mt-list-statistic-card>\r\n }\r\n\r\n <!-- Header -->\r\n @case (\"header\") {\r\n <mt-header-card\r\n [dashboardId]=\"dashboardId()\"\r\n [titleEditable]=\"false\"\r\n (titleChange)=\"onTitleChange($event)\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n >\r\n </mt-header-card>\r\n }\r\n\r\n <!-- Footer (same as header) -->\r\n @case (\"footer\") {\r\n <mt-header-card\r\n [dashboardId]=\"dashboardId()\"\r\n [titleEditable]=\"false\"\r\n (titleChange)=\"onTitleChange($event)\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n >\r\n </mt-header-card>\r\n }\r\n\r\n <!-- Label (same as header) -->\r\n @case (\"label\") {\r\n <mt-header-card\r\n [dashboardId]=\"dashboardId()\"\r\n [titleEditable]=\"false\"\r\n (titleChange)=\"onTitleChange($event)\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n >\r\n </mt-header-card>\r\n }\r\n\r\n <!-- List of Level Cards -->\r\n @case (\"listOfLevelCards\") {\r\n <mt-properties-card\r\n [dashboardId]=\"dashboardId()\"\r\n [inGroup]=\"inGroup()\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n >\r\n </mt-properties-card>\r\n }\r\n\r\n @case (\"entitiesPreview\") {\r\n <mt-properties-card\r\n [dashboardId]=\"dashboardId()\"\r\n [inGroup]=\"inGroup()\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n >\r\n </mt-properties-card>\r\n }\r\n\r\n <!-- Table. The table card renders the data grid, so it loads on demand\r\n (@defer) and the grid stays out of every host bundle that only imports\r\n the dashboard-builder main entry. -->\r\n @case (\"table\") {\r\n @defer (on immediate) {\r\n <mt-table-card\r\n [dashboardId]=\"dashboardId()\"\r\n [inGroup]=\"inGroup()\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n >\r\n </mt-table-card>\r\n } @placeholder {\r\n <mt-skeleton-card [dashboardId]=\"dashboardId()\"></mt-skeleton-card>\r\n }\r\n }\r\n\r\n <!-- Phase Gate Table -->\r\n @case (\"phaseGateTable\") {\r\n @defer (on immediate) {\r\n <mt-table-card\r\n [dashboardId]=\"dashboardId()\"\r\n [inGroup]=\"inGroup()\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n >\r\n </mt-table-card>\r\n } @placeholder {\r\n <mt-skeleton-card [dashboardId]=\"dashboardId()\"></mt-skeleton-card>\r\n }\r\n }\r\n\r\n <!-- Topbar -->\r\n @case (\"topbar\") {\r\n <mt-topbar-card\r\n [dashboardId]=\"dashboardId()\"\r\n [defaultBreadcrumbLabel]=\"pageName()\"\r\n [titleEditable]=\"false\"\r\n (titleChange)=\"onTitleChange($event)\"\r\n ></mt-topbar-card>\r\n }\r\n\r\n <!-- Timeline -->\r\n @case (\"timeline\") {\r\n <mt-chart-card\r\n [dashboardId]=\"dashboardId()\"\r\n [reportId]=\"reportId()\"\r\n [inGroup]=\"inGroup()\"\r\n [titleEditable]=\"false\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n (onConfigure)=\"onConfigureRequested()\"\r\n (onTitleChange)=\"onTitleChange($event)\"\r\n >\r\n </mt-chart-card>\r\n }\r\n\r\n <!-- Timeline Project Dependencies -->\r\n @case (\"timelineProjectDependencies\") {\r\n <mt-chart-card\r\n [dashboardId]=\"dashboardId()\"\r\n [reportId]=\"reportId()\"\r\n [inGroup]=\"inGroup()\"\r\n [titleEditable]=\"false\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n (onConfigure)=\"onConfigureRequested()\"\r\n (onTitleChange)=\"onTitleChange($event)\"\r\n >\r\n </mt-chart-card>\r\n }\r\n\r\n <!-- Last History Level Card (TableView shape) -->\r\n @case (\"lastHistoryLevelCard\") {\r\n <mt-last-history-level-card\r\n [dashboardId]=\"dashboardId()\"\r\n [reportId]=\"reportId()\"\r\n [inGroup]=\"inGroup()\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n >\r\n </mt-last-history-level-card>\r\n }\r\n\r\n <!-- Entity Preview -->\r\n @case (\"entityPreview\") {\r\n <mt-entity-preview-card [dashboardId]=\"dashboardId()\">\r\n </mt-entity-preview-card>\r\n }\r\n\r\n <!-- Entity Preview With Formula -->\r\n @case (\"entityPreviewWithFormula\") {\r\n <mt-entity-preview-card [dashboardId]=\"dashboardId()\">\r\n </mt-entity-preview-card>\r\n }\r\n\r\n <!-- Performance Card (BarV2Chart formula -> entity preview style) -->\r\n @case (\"performanceCard\") {\r\n <mt-entity-preview-card [dashboardId]=\"dashboardId()\">\r\n </mt-entity-preview-card>\r\n }\r\n\r\n <!-- Performance Gauge Card (S+) -->\r\n @case (\"performanceGaugeCard\") {\r\n <mt-chart-card\r\n [dashboardId]=\"dashboardId()\"\r\n [reportId]=\"reportId()\"\r\n [inGroup]=\"inGroup()\"\r\n [titleEditable]=\"false\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n (onConfigure)=\"onConfigureRequested()\"\r\n (onTitleChange)=\"onTitleChange($event)\"\r\n >\r\n </mt-chart-card>\r\n }\r\n\r\n <!-- Cluster Stacked Chart -->\r\n @case (\"clusterStackedChart\") {\r\n <mt-chart-card\r\n [dashboardId]=\"dashboardId()\"\r\n [reportId]=\"reportId()\"\r\n [inGroup]=\"inGroup()\"\r\n [titleEditable]=\"false\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n (onConfigure)=\"onConfigureRequested()\"\r\n (onTitleChange)=\"onTitleChange($event)\"\r\n >\r\n </mt-chart-card>\r\n }\r\n\r\n <!-- List Component S+ Card -->\r\n @case (\"listComponentSplusCard\") {\r\n <mt-list-statistic-card\r\n [dashboardId]=\"dashboardId()\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n >\r\n </mt-list-statistic-card>\r\n }\r\n\r\n <!-- Splitter Chart -->\r\n @case (\"splitterChart\") {\r\n <mt-chart-card\r\n [dashboardId]=\"dashboardId()\"\r\n [reportId]=\"reportId()\"\r\n [inGroup]=\"inGroup()\"\r\n [titleEditable]=\"false\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n (onConfigure)=\"onConfigureRequested()\"\r\n (onTitleChange)=\"onTitleChange($event)\"\r\n >\r\n </mt-chart-card>\r\n }\r\n\r\n <!-- Repeater (same as header) -->\r\n @case (\"repeater\") {\r\n <mt-header-card\r\n [dashboardId]=\"dashboardId()\"\r\n [titleEditable]=\"false\"\r\n (titleChange)=\"onTitleChange($event)\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n >\r\n </mt-header-card>\r\n }\r\n\r\n <!-- Level Cards With Static -->\r\n @case (\"levelCardsWithStatic\") {\r\n <mt-list-statistic-card\r\n [dashboardId]=\"dashboardId()\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n >\r\n </mt-list-statistic-card>\r\n }\r\n\r\n <!-- Phase Gate Stepper Card -->\r\n @case (\"phaseGateStepperCard\") {\r\n <mt-chart-card\r\n [dashboardId]=\"dashboardId()\"\r\n [reportId]=\"reportId()\"\r\n [inGroup]=\"inGroup()\"\r\n [titleEditable]=\"false\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n (onConfigure)=\"onConfigureRequested()\"\r\n (onTitleChange)=\"onTitleChange($event)\"\r\n >\r\n </mt-chart-card>\r\n }\r\n\r\n <!-- Dialog: rendered inside DashboardDialogComponent as a Table view.\r\n Header hidden \u2014 the dialog header already names it. -->\r\n @case (\"dialog\") {\r\n @defer (on immediate) {\r\n <mt-table-card\r\n [dashboardId]=\"dashboardId()\"\r\n [inGroup]=\"inGroup()\"\r\n [hideHeader]=\"true\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n >\r\n </mt-table-card>\r\n } @placeholder {\r\n <mt-skeleton-card [dashboardId]=\"dashboardId()\"></mt-skeleton-card>\r\n }\r\n }\r\n\r\n <!-- Default: try chart -->\r\n @default {\r\n <mt-chart-card\r\n [dashboardId]=\"dashboardId()\"\r\n [reportId]=\"reportId()\"\r\n [inGroup]=\"inGroup()\"\r\n [titleEditable]=\"false\"\r\n (onAction)=\"doActions($event.data, $event.type)\"\r\n (onConfigure)=\"onConfigureRequested()\"\r\n (onTitleChange)=\"onTitleChange($event)\"\r\n >\r\n </mt-chart-card>\r\n }\r\n }\r\n}\r\n", styles: [":host{display:block;width:100%;height:100%}\n"] }]
|
|
33814
|
+
}], ctorParameters: () => [], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], chartTypeId: [{ type: i0.Input, args: [{ isSignal: true, alias: "chartTypeId", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], useCachedDataOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "useCachedDataOnly", required: false }] }], pageName: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageName", required: false }] }], inGroup: [{ type: i0.Input, args: [{ isSignal: true, alias: "inGroup", required: false }] }], isDialog: [{ type: i0.Input, args: [{ isSignal: true, alias: "isDialog", required: false }] }], queryParams: [{ type: i0.Input, args: [{ isSignal: true, alias: "queryParams", required: false }] }], extraFilters: [{ type: i0.Input, args: [{ isSignal: true, alias: "extraFilters", required: false }] }], reportId: [{ type: i0.Input, args: [{ isSignal: true, alias: "reportId", required: false }] }], ignoreQueryFilter: [{ type: i0.Input, args: [{ isSignal: true, alias: "ignoreQueryFilter", required: false }] }], builderMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "builderMode", required: false }] }], actionTriggered: [{ type: i0.Output, args: ["actionTriggered"] }], configureRequested: [{ type: i0.Output, args: ["configureRequested"] }], titleEdited: [{ type: i0.Output, args: ["titleEdited"] }] } }) });
|
|
35566
33815
|
|
|
35567
33816
|
/**
|
|
35568
33817
|
* Chart Viewer Component
|
|
@@ -37897,7 +36146,7 @@ class StyleStudioDrawer {
|
|
|
37897
36146
|
return out === full ? fallback : out;
|
|
37898
36147
|
}
|
|
37899
36148
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: StyleStudioDrawer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
37900
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: StyleStudioDrawer, isStandalone: true, selector: "mt-style-studio-drawer", viewQueries: [{ propertyName: "scrollPane", first: true, predicate: ["scrollPane"], descendants: true, isSignal: true }, { propertyName: "previewViewer", first: true, predicate: ChartViewer, descendants: true, isSignal: true }], ngImport: i0, template: "<div\
|
|
36149
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: StyleStudioDrawer, isStandalone: true, selector: "mt-style-studio-drawer", viewQueries: [{ propertyName: "scrollPane", first: true, predicate: ["scrollPane"], descendants: true, isSignal: true }, { propertyName: "previewViewer", first: true, predicate: ChartViewer, descendants: true, isSignal: true }], ngImport: i0, template: "<div\n [class]=\"modal.contentClass + ' db-style-studio flex h-full min-h-0 flex-col'\"\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\n>\n <!-- Header -->\n <div\n class=\"flex flex-wrap items-center gap-3 border-b border-surface-200 bg-surface-0 px-4 py-3\"\n >\n <span\n class=\"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-primary-100 text-primary-600\"\n >\n <mt-icon [icon]=\"chartIcon()\" class=\"text-lg\" />\n </span>\n <div class=\"mr-auto min-w-0\">\n <h3 class=\"truncate text-sm font-semibold text-color\">\n {{ t(\"styleStudio.title\") }}\n </h3>\n <p class=\"truncate text-xs text-muted-color\" mtTruncateTooltip>\n {{ chartName() }}\n </p>\n </div>\n\n <mt-segmented-field\n [options]=\"scopeOptions()\"\n [value]=\"scope()\"\n [ariaLabel]=\"t('styleStudio.detailLevel')\"\n (valueChange)=\"onScopeChange($event)\"\n />\n\n <mt-text-field\n class=\"w-56 self-center\"\n icon=\"general.search-md\"\n iconPosition=\"start\"\n [placeholder]=\"t('styleStudio.findSetting')\"\n [field]=\"false\"\n [formControl]=\"searchControl\"\n />\n </div>\n\n <!-- Body -->\n <div class=\"flex min-h-0 flex-1\">\n <!-- Left rail (sections grouped under category headers) -->\n <nav\n class=\"db-style-studio__rail hidden w-52 shrink-0 flex-col gap-1 overflow-y-auto border-r border-surface-200 bg-surface-50 p-2 md:flex\"\n >\n @for (group of navGroups(); track group.label) {\n <div class=\"mt-2 first:mt-0\">\n <p\n class=\"px-3 pb-1 pt-1 text-[0.65rem] font-semibold uppercase tracking-wider text-muted-color\"\n >\n {{ group.label }}\n </p>\n @for (section of group.sections; track section.key) {\n <button\n type=\"button\"\n class=\"flex w-full items-center gap-2 rounded-lg px-3 py-1.5 text-left text-sm font-medium transition-colors duration-200\"\n [class.bg-surface-0]=\"activeSection() === section.key\"\n [class.text-primary-600]=\"activeSection() === section.key\"\n [class.shadow-sm]=\"activeSection() === section.key\"\n [class.text-muted-color]=\"activeSection() !== section.key\"\n [class.hover:bg-surface-100]=\"activeSection() !== section.key\"\n (click)=\"scrollTo(section)\"\n >\n <mt-icon [icon]=\"section.icon\" class=\"text-base\" />\n <span class=\"truncate\" mtTruncateTooltip>{{\n section.label\n }}</span>\n </button>\n }\n </div>\n }\n </nav>\n\n <!-- Settings pane -->\n <div\n #scrollPane\n class=\"min-w-0 flex-1 overflow-y-auto p-4\"\n (scroll)=\"onScroll()\"\n >\n <mt-style-settings-renderer\n [visibleSections]=\"navSections()\"\n [persisted]=\"itemConfig()\"\n [capability]=\"capability()\"\n [scope]=\"scope()\"\n [legendItems]=\"legendItems()\"\n (patch)=\"onPatch($event)\"\n (requestScope)=\"scope.set($event)\"\n />\n </div>\n\n <!-- Resizable splitter (config \u2194 preview) -->\n <div\n class=\"db-style-studio__splitter hidden w-1.5 shrink-0 cursor-col-resize touch-none bg-surface-200 transition-colors hover:bg-primary-400 lg:block\"\n role=\"separator\"\n aria-orientation=\"vertical\"\n [attr.aria-label]=\"t('styleStudio.messages.resizePreview')\"\n (pointerdown)=\"startResize($event)\"\n (pointermove)=\"onResizeMove($event)\"\n (pointerup)=\"endResize()\"\n (pointercancel)=\"endResize()\"\n ></div>\n\n <!-- Live preview (renders ALL widget types via the dashboard item) -->\n <div\n class=\"db-style-studio__preview hidden shrink-0 flex-col bg-surface-50 p-4 lg:flex\"\n [style.width.px]=\"previewWidth()\"\n >\n <div\n class=\"mb-2 flex items-center gap-1.5 text-xs font-semibold uppercase tracking-wide text-muted-color\"\n >\n <mt-icon icon=\"general.eye\" class=\"text-sm\" />\n <span>{{ t(\"styleStudio.livePreview\") }}</span>\n </div>\n <div class=\"min-h-0 flex-1 overflow-auto\">\n <!-- Dialog chrome. A linked dialog opens in a modal, so its header \u2014\n not a card header \u2014 is what the \"Dialog header\" section edits.\n Both wrappers collapse to `contents` for every other widget, so\n the ordinary preview layout is untouched. -->\n <div [class]=\"previewFrameClass()\">\n @if (isDialogPreview()) {\n <div\n class=\"flex shrink-0 items-center gap-2 border-b border-surface-200 bg-surface-100 px-5 py-4\"\n >\n @if (dialogHeaderPreview().icon) {\n <mt-icon\n [icon]=\"$any(dialogHeaderPreview().icon)\"\n class=\"shrink-0 text-lg\"\n [style.color]=\"dialogHeaderPreview().iconColor || 'inherit'\"\n />\n }\n <span\n class=\"min-w-0 flex-1 truncate font-semibold text-color\"\n mtTruncateTooltip\n >{{\n dialogHeaderPreview().title ||\n t(\"styleStudio.messages.untitledDialog\")\n }}</span\n >\n <span\n class=\"flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-surface-0 text-muted-color\"\n aria-hidden=\"true\"\n >\n <mt-icon icon=\"general.x-close\" class=\"text-sm\" />\n </span>\n </div>\n }\n <div [class]=\"previewBodyClass()\">\n <mt-chart-viewer\n [config]=\"previewConfig()\"\n [chartTypeId]=\"previewChartTypeId()\"\n [hideHeader]=\"isDialogPreview()\"\n [useCachedDataOnly]=\"true\"\n />\n </div>\n </div>\n </div>\n </div>\n </div>\n</div>\n\n<!-- Footer \u2014 sibling of content so the drawer pins it to the bottom -->\n<div\n [class]=\"\n modal.footerClass + ' border-t border-surface-200 bg-surface-0 px-4 py-3'\n \"\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\n>\n <mt-button\n [label]=\"t('styleStudio.resetAll')\"\n icon=\"arrow.refresh-ccw-01\"\n severity=\"secondary\"\n variant=\"text\"\n class=\"mr-auto\"\n (onClick)=\"resetAll()\"\n />\n <mt-button [label]=\"t('cancel')\" variant=\"outlined\" (onClick)=\"close()\" />\n <mt-button [label]=\"t('apply')\" icon=\"general.check\" (onClick)=\"apply()\" />\n</div>\n", styles: ["@charset \"UTF-8\";.db-style-studio mt-style-field,.db-style-studio mt-text-field,.db-style-studio mt-number-field,.db-style-studio mt-select-field,.db-style-studio mt-multi-select-field,.db-style-studio mt-textarea-field,.db-style-studio mt-slider-field,.db-style-studio mt-color-picker-field{display:block;width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { 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", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: TextField, selector: "mt-text-field", inputs: ["field", "hint", "label", "placeholder", "class", "type", "readonly", "pInputs", "required", "maxLength", "icon", "iconPosition"] }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }, { kind: "directive", type: TruncateTooltip, selector: "[mtTruncateTooltip]" }, { kind: "component", type: StyleSettingsRenderer, selector: "mt-style-settings-renderer", inputs: ["visibleSections", "persisted", "capability", "scope", "legendItems"], outputs: ["patch", "requestScope"] }, { kind: "component", type: SegmentedField, selector: "mt-segmented-field", inputs: ["options", "value", "disabled", "ariaLabel"], outputs: ["valueChange"] }, { kind: "component", type: ChartViewer, selector: "mt-chart-viewer", inputs: ["config", "chartTypeId", "hideHeader", "useCachedDataOnly"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
37901
36150
|
}
|
|
37902
36151
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: StyleStudioDrawer, decorators: [{
|
|
37903
36152
|
type: Component,
|
|
@@ -37912,7 +36161,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
37912
36161
|
StyleSettingsRenderer,
|
|
37913
36162
|
SegmentedField,
|
|
37914
36163
|
ChartViewer,
|
|
37915
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div\
|
|
36164
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div\n [class]=\"modal.contentClass + ' db-style-studio flex h-full min-h-0 flex-col'\"\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\n>\n <!-- Header -->\n <div\n class=\"flex flex-wrap items-center gap-3 border-b border-surface-200 bg-surface-0 px-4 py-3\"\n >\n <span\n class=\"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-primary-100 text-primary-600\"\n >\n <mt-icon [icon]=\"chartIcon()\" class=\"text-lg\" />\n </span>\n <div class=\"mr-auto min-w-0\">\n <h3 class=\"truncate text-sm font-semibold text-color\">\n {{ t(\"styleStudio.title\") }}\n </h3>\n <p class=\"truncate text-xs text-muted-color\" mtTruncateTooltip>\n {{ chartName() }}\n </p>\n </div>\n\n <mt-segmented-field\n [options]=\"scopeOptions()\"\n [value]=\"scope()\"\n [ariaLabel]=\"t('styleStudio.detailLevel')\"\n (valueChange)=\"onScopeChange($event)\"\n />\n\n <mt-text-field\n class=\"w-56 self-center\"\n icon=\"general.search-md\"\n iconPosition=\"start\"\n [placeholder]=\"t('styleStudio.findSetting')\"\n [field]=\"false\"\n [formControl]=\"searchControl\"\n />\n </div>\n\n <!-- Body -->\n <div class=\"flex min-h-0 flex-1\">\n <!-- Left rail (sections grouped under category headers) -->\n <nav\n class=\"db-style-studio__rail hidden w-52 shrink-0 flex-col gap-1 overflow-y-auto border-r border-surface-200 bg-surface-50 p-2 md:flex\"\n >\n @for (group of navGroups(); track group.label) {\n <div class=\"mt-2 first:mt-0\">\n <p\n class=\"px-3 pb-1 pt-1 text-[0.65rem] font-semibold uppercase tracking-wider text-muted-color\"\n >\n {{ group.label }}\n </p>\n @for (section of group.sections; track section.key) {\n <button\n type=\"button\"\n class=\"flex w-full items-center gap-2 rounded-lg px-3 py-1.5 text-left text-sm font-medium transition-colors duration-200\"\n [class.bg-surface-0]=\"activeSection() === section.key\"\n [class.text-primary-600]=\"activeSection() === section.key\"\n [class.shadow-sm]=\"activeSection() === section.key\"\n [class.text-muted-color]=\"activeSection() !== section.key\"\n [class.hover:bg-surface-100]=\"activeSection() !== section.key\"\n (click)=\"scrollTo(section)\"\n >\n <mt-icon [icon]=\"section.icon\" class=\"text-base\" />\n <span class=\"truncate\" mtTruncateTooltip>{{\n section.label\n }}</span>\n </button>\n }\n </div>\n }\n </nav>\n\n <!-- Settings pane -->\n <div\n #scrollPane\n class=\"min-w-0 flex-1 overflow-y-auto p-4\"\n (scroll)=\"onScroll()\"\n >\n <mt-style-settings-renderer\n [visibleSections]=\"navSections()\"\n [persisted]=\"itemConfig()\"\n [capability]=\"capability()\"\n [scope]=\"scope()\"\n [legendItems]=\"legendItems()\"\n (patch)=\"onPatch($event)\"\n (requestScope)=\"scope.set($event)\"\n />\n </div>\n\n <!-- Resizable splitter (config \u2194 preview) -->\n <div\n class=\"db-style-studio__splitter hidden w-1.5 shrink-0 cursor-col-resize touch-none bg-surface-200 transition-colors hover:bg-primary-400 lg:block\"\n role=\"separator\"\n aria-orientation=\"vertical\"\n [attr.aria-label]=\"t('styleStudio.messages.resizePreview')\"\n (pointerdown)=\"startResize($event)\"\n (pointermove)=\"onResizeMove($event)\"\n (pointerup)=\"endResize()\"\n (pointercancel)=\"endResize()\"\n ></div>\n\n <!-- Live preview (renders ALL widget types via the dashboard item) -->\n <div\n class=\"db-style-studio__preview hidden shrink-0 flex-col bg-surface-50 p-4 lg:flex\"\n [style.width.px]=\"previewWidth()\"\n >\n <div\n class=\"mb-2 flex items-center gap-1.5 text-xs font-semibold uppercase tracking-wide text-muted-color\"\n >\n <mt-icon icon=\"general.eye\" class=\"text-sm\" />\n <span>{{ t(\"styleStudio.livePreview\") }}</span>\n </div>\n <div class=\"min-h-0 flex-1 overflow-auto\">\n <!-- Dialog chrome. A linked dialog opens in a modal, so its header \u2014\n not a card header \u2014 is what the \"Dialog header\" section edits.\n Both wrappers collapse to `contents` for every other widget, so\n the ordinary preview layout is untouched. -->\n <div [class]=\"previewFrameClass()\">\n @if (isDialogPreview()) {\n <div\n class=\"flex shrink-0 items-center gap-2 border-b border-surface-200 bg-surface-100 px-5 py-4\"\n >\n @if (dialogHeaderPreview().icon) {\n <mt-icon\n [icon]=\"$any(dialogHeaderPreview().icon)\"\n class=\"shrink-0 text-lg\"\n [style.color]=\"dialogHeaderPreview().iconColor || 'inherit'\"\n />\n }\n <span\n class=\"min-w-0 flex-1 truncate font-semibold text-color\"\n mtTruncateTooltip\n >{{\n dialogHeaderPreview().title ||\n t(\"styleStudio.messages.untitledDialog\")\n }}</span\n >\n <span\n class=\"flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-surface-0 text-muted-color\"\n aria-hidden=\"true\"\n >\n <mt-icon icon=\"general.x-close\" class=\"text-sm\" />\n </span>\n </div>\n }\n <div [class]=\"previewBodyClass()\">\n <mt-chart-viewer\n [config]=\"previewConfig()\"\n [chartTypeId]=\"previewChartTypeId()\"\n [hideHeader]=\"isDialogPreview()\"\n [useCachedDataOnly]=\"true\"\n />\n </div>\n </div>\n </div>\n </div>\n </div>\n</div>\n\n<!-- Footer \u2014 sibling of content so the drawer pins it to the bottom -->\n<div\n [class]=\"\n modal.footerClass + ' border-t border-surface-200 bg-surface-0 px-4 py-3'\n \"\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\n>\n <mt-button\n [label]=\"t('styleStudio.resetAll')\"\n icon=\"arrow.refresh-ccw-01\"\n severity=\"secondary\"\n variant=\"text\"\n class=\"mr-auto\"\n (onClick)=\"resetAll()\"\n />\n <mt-button [label]=\"t('cancel')\" variant=\"outlined\" (onClick)=\"close()\" />\n <mt-button [label]=\"t('apply')\" icon=\"general.check\" (onClick)=\"apply()\" />\n</div>\n", styles: ["@charset \"UTF-8\";.db-style-studio mt-style-field,.db-style-studio mt-text-field,.db-style-studio mt-number-field,.db-style-studio mt-select-field,.db-style-studio mt-multi-select-field,.db-style-studio mt-textarea-field,.db-style-studio mt-slider-field,.db-style-studio mt-color-picker-field{display:block;width:100%}\n"] }]
|
|
37916
36165
|
}], ctorParameters: () => [], propDecorators: { scrollPane: [{ type: i0.ViewChild, args: ['scrollPane', { isSignal: true }] }], previewViewer: [{ type: i0.ViewChild, args: [i0.forwardRef(() => ChartViewer), { isSignal: true }] }] } });
|
|
37917
36166
|
|
|
37918
36167
|
/**
|
|
@@ -38836,7 +37085,7 @@ class CustomApiConfiguration {
|
|
|
38836
37085
|
useExisting: forwardRef(() => CustomApiConfiguration),
|
|
38837
37086
|
multi: true,
|
|
38838
37087
|
},
|
|
38839
|
-
], ngImport: i0, template: "<mt-card\
|
|
37088
|
+
], 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 });
|
|
38840
37089
|
}
|
|
38841
37090
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CustomApiConfiguration, decorators: [{
|
|
38842
37091
|
type: Component,
|
|
@@ -38853,7 +37102,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
38853
37102
|
useExisting: forwardRef(() => CustomApiConfiguration),
|
|
38854
37103
|
multi: true,
|
|
38855
37104
|
},
|
|
38856
|
-
], template: "<mt-card\
|
|
37105
|
+
], 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" }]
|
|
38857
37106
|
}] });
|
|
38858
37107
|
|
|
38859
37108
|
const NUMERIC_VIEW_TYPES = new Set(['number', 'percentage', 'currency']);
|
|
@@ -40404,7 +38653,7 @@ class TimelineQuery {
|
|
|
40404
38653
|
useExisting: forwardRef(() => TimelineQuery),
|
|
40405
38654
|
multi: true,
|
|
40406
38655
|
},
|
|
40407
|
-
], ngImport: i0, template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\
|
|
38656
|
+
], 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 });
|
|
40408
38657
|
}
|
|
40409
38658
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TimelineQuery, decorators: [{
|
|
40410
38659
|
type: Component,
|
|
@@ -40420,7 +38669,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
40420
38669
|
useExisting: forwardRef(() => TimelineQuery),
|
|
40421
38670
|
multi: true,
|
|
40422
38671
|
},
|
|
40423
|
-
], template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\
|
|
38672
|
+
], 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" }]
|
|
40424
38673
|
}], propDecorators: { propertiesFlat: [{ type: i0.Input, args: [{ isSignal: true, alias: "propertiesFlat", required: false }] }], propertiesGrouped: [{ type: i0.Input, args: [{ isSignal: true, alias: "propertiesGrouped", required: false }] }] } });
|
|
40425
38674
|
|
|
40426
38675
|
/**
|
|
@@ -42879,7 +41128,7 @@ class GeneralSettings {
|
|
|
42879
41128
|
return labels[category] || category;
|
|
42880
41129
|
}
|
|
42881
41130
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: GeneralSettings, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
42882
|
-
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'\">\
|
|
41131
|
+
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 });
|
|
42883
41132
|
}
|
|
42884
41133
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: GeneralSettings, decorators: [{
|
|
42885
41134
|
type: Component,
|
|
@@ -42891,7 +41140,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
42891
41140
|
Card,
|
|
42892
41141
|
TooltipModule,
|
|
42893
41142
|
Icon,
|
|
42894
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\
|
|
41143
|
+
], 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" }]
|
|
42895
41144
|
}], 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"] }] } });
|
|
42896
41145
|
|
|
42897
41146
|
/**
|
|
@@ -47728,6 +45977,339 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
47728
45977
|
* preserved.
|
|
47729
45978
|
*/
|
|
47730
45979
|
|
|
45980
|
+
/**
|
|
45981
|
+
* Entity Info Component
|
|
45982
|
+
*
|
|
45983
|
+
* Renders property values based on their viewType.
|
|
45984
|
+
* Matches old app-entity-info behavior with viewType-based rendering.
|
|
45985
|
+
*
|
|
45986
|
+
* Supported viewTypes:
|
|
45987
|
+
* - text, float, title, phasegate → text display
|
|
45988
|
+
* - longtext → rich-text HTML display
|
|
45989
|
+
* - number → formatted number
|
|
45990
|
+
* - date, datetime → date display
|
|
45991
|
+
* - currency → currency display
|
|
45992
|
+
* - time → time display
|
|
45993
|
+
* - lookup, lookupmatrix → lookup display with color indicator
|
|
45994
|
+
* - checkbox → checkbox display
|
|
45995
|
+
* - status, request_status → status display with color
|
|
45996
|
+
* - percentage → percentage with progress bar
|
|
45997
|
+
* - slider → slider/progress display
|
|
45998
|
+
* - user → user avatar display
|
|
45999
|
+
* - lookupmultiselect → multi-select tags
|
|
46000
|
+
* - multiuser → multiple user avatars
|
|
46001
|
+
* - dynamiclist → list of properties
|
|
46002
|
+
* - api → API fetched value
|
|
46003
|
+
* - integrated → integrated value display
|
|
46004
|
+
*/
|
|
46005
|
+
function resolveEntityUserPhoto(value) {
|
|
46006
|
+
if (!value || typeof value !== 'object' || Array.isArray(value))
|
|
46007
|
+
return '';
|
|
46008
|
+
const user = value;
|
|
46009
|
+
for (const key of ['photoUrl', 'image', 'avatar']) {
|
|
46010
|
+
const candidate = user[key];
|
|
46011
|
+
if (typeof candidate === 'string' && candidate.trim()) {
|
|
46012
|
+
return candidate.trim();
|
|
46013
|
+
}
|
|
46014
|
+
}
|
|
46015
|
+
return '';
|
|
46016
|
+
}
|
|
46017
|
+
/**
|
|
46018
|
+
* The dashboard backend sends a Checkbox value as text (`"True"` / `"False"`),
|
|
46019
|
+
* so `Boolean(value)` read every non-empty string, `"False"` included, as
|
|
46020
|
+
* checked. Parsed the same way as the table card's `toBooleanValue`.
|
|
46021
|
+
*/
|
|
46022
|
+
function resolveEntityCheckbox(value) {
|
|
46023
|
+
if (typeof value === 'boolean')
|
|
46024
|
+
return value;
|
|
46025
|
+
if (typeof value === 'number')
|
|
46026
|
+
return value === 1;
|
|
46027
|
+
if (typeof value === 'string') {
|
|
46028
|
+
const text = value.trim().toLowerCase();
|
|
46029
|
+
return text === 'true' || text === '1' || text === 'yes';
|
|
46030
|
+
}
|
|
46031
|
+
if (value && typeof value === 'object' && 'value' in value) {
|
|
46032
|
+
return resolveEntityCheckbox(value.value);
|
|
46033
|
+
}
|
|
46034
|
+
return false;
|
|
46035
|
+
}
|
|
46036
|
+
class EntityInfoComponent {
|
|
46037
|
+
transloco = inject(TranslocoService);
|
|
46038
|
+
httpContext = new HttpContext().set(REQUEST_CONTEXT, {
|
|
46039
|
+
useBaseUrl: true,
|
|
46040
|
+
});
|
|
46041
|
+
/** Entity data to display */
|
|
46042
|
+
data = input(null, ...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
|
|
46043
|
+
/** Display type: 'entity' shows label, 'inTable' shows value only */
|
|
46044
|
+
displayType = input('entity', ...(ngDevMode ? [{ debugName: "displayType" }] : /* istanbul ignore next */ []));
|
|
46045
|
+
/** Extra configuration */
|
|
46046
|
+
extraInfoData = input({}, ...(ngDevMode ? [{ debugName: "extraInfoData" }] : /* istanbul ignore next */ []));
|
|
46047
|
+
/** Whether to limit words with ellipsis */
|
|
46048
|
+
limitWords = input(false, ...(ngDevMode ? [{ debugName: "limitWords" }] : /* istanbul ignore next */ []));
|
|
46049
|
+
/** Custom CSS class */
|
|
46050
|
+
customClass = input('', ...(ngDevMode ? [{ debugName: "customClass" }] : /* istanbul ignore next */ []));
|
|
46051
|
+
/** Computed viewType in lowercase */
|
|
46052
|
+
viewTypeLower = computed(() => {
|
|
46053
|
+
return this.data()?.viewType?.toLowerCase() || 'text';
|
|
46054
|
+
}, ...(ngDevMode ? [{ debugName: "viewTypeLower" }] : /* istanbul ignore next */ []));
|
|
46055
|
+
// === Text values ===
|
|
46056
|
+
textValue = computed(() => {
|
|
46057
|
+
const value = this.data()?.value;
|
|
46058
|
+
if (value === null || value === undefined)
|
|
46059
|
+
return '';
|
|
46060
|
+
if (typeof value === 'object') {
|
|
46061
|
+
return value.displayName || value.display || value.name || String(value);
|
|
46062
|
+
}
|
|
46063
|
+
return String(value);
|
|
46064
|
+
}, ...(ngDevMode ? [{ debugName: "textValue" }] : /* istanbul ignore next */ []));
|
|
46065
|
+
// === Long text values ===
|
|
46066
|
+
/**
|
|
46067
|
+
* A `LongText` property stores rich-text HTML authored in the editor, so the
|
|
46068
|
+
* cell has to render it as markup — interpolating it printed the raw
|
|
46069
|
+
* `<p>…</p>` source into the table. Angular sanitizes `[innerHTML]`, and this
|
|
46070
|
+
* matches `mt-entity-long-text`, which is what the level-workspace table
|
|
46071
|
+
* renders the same property with.
|
|
46072
|
+
*/
|
|
46073
|
+
longTextHtml = computed(() => this.textValue(), ...(ngDevMode ? [{ debugName: "longTextHtml" }] : /* istanbul ignore next */ []));
|
|
46074
|
+
/** Tag-stripped text for the `title` tooltip — an attribute can't hold markup. */
|
|
46075
|
+
longTextTooltip = computed(() => {
|
|
46076
|
+
const text = TableValueResolver.stripHtml(this.longTextHtml());
|
|
46077
|
+
return typeof text === 'string' ? text : '';
|
|
46078
|
+
}, ...(ngDevMode ? [{ debugName: "longTextTooltip" }] : /* istanbul ignore next */ []));
|
|
46079
|
+
// === Number values ===
|
|
46080
|
+
numericValue = computed(() => {
|
|
46081
|
+
const value = this.data()?.value;
|
|
46082
|
+
if (value === null || value === undefined)
|
|
46083
|
+
return null;
|
|
46084
|
+
const num = parseFloat(value);
|
|
46085
|
+
return isNaN(num) ? null : num;
|
|
46086
|
+
}, ...(ngDevMode ? [{ debugName: "numericValue" }] : /* istanbul ignore next */ []));
|
|
46087
|
+
// === Date values ===
|
|
46088
|
+
dateDisplayValue = computed(() => {
|
|
46089
|
+
const value = this.data()?.value;
|
|
46090
|
+
if (!value)
|
|
46091
|
+
return '';
|
|
46092
|
+
if (typeof value === 'object') {
|
|
46093
|
+
return value.displayValue || value.display || '';
|
|
46094
|
+
}
|
|
46095
|
+
// Try to format as date
|
|
46096
|
+
try {
|
|
46097
|
+
const date = new Date(value);
|
|
46098
|
+
if (!isNaN(date.getTime())) {
|
|
46099
|
+
return date.toLocaleDateString();
|
|
46100
|
+
}
|
|
46101
|
+
}
|
|
46102
|
+
catch {
|
|
46103
|
+
// ignore
|
|
46104
|
+
}
|
|
46105
|
+
return String(value);
|
|
46106
|
+
}, ...(ngDevMode ? [{ debugName: "dateDisplayValue" }] : /* istanbul ignore next */ []));
|
|
46107
|
+
// === Currency values ===
|
|
46108
|
+
currencyDisplayValue = computed(() => {
|
|
46109
|
+
const value = this.data()?.value;
|
|
46110
|
+
if (!value)
|
|
46111
|
+
return '';
|
|
46112
|
+
if (typeof value === 'object') {
|
|
46113
|
+
return value.display || this.formatCurrency(value.value);
|
|
46114
|
+
}
|
|
46115
|
+
return this.formatCurrency(value);
|
|
46116
|
+
}, ...(ngDevMode ? [{ debugName: "currencyDisplayValue" }] : /* istanbul ignore next */ []));
|
|
46117
|
+
// === Time values ===
|
|
46118
|
+
timeDisplayValue = computed(() => {
|
|
46119
|
+
const value = this.data()?.value;
|
|
46120
|
+
if (!value)
|
|
46121
|
+
return '';
|
|
46122
|
+
if (typeof value === 'object') {
|
|
46123
|
+
return value.displayValue || value.display || '';
|
|
46124
|
+
}
|
|
46125
|
+
return String(value);
|
|
46126
|
+
}, ...(ngDevMode ? [{ debugName: "timeDisplayValue" }] : /* istanbul ignore next */ []));
|
|
46127
|
+
// === Lookup values ===
|
|
46128
|
+
lookupName = computed(() => {
|
|
46129
|
+
const value = this.data()?.value;
|
|
46130
|
+
if (!value)
|
|
46131
|
+
return '';
|
|
46132
|
+
if (typeof value === 'object') {
|
|
46133
|
+
return value.name || value.display?.name || value.display || '';
|
|
46134
|
+
}
|
|
46135
|
+
return String(value);
|
|
46136
|
+
}, ...(ngDevMode ? [{ debugName: "lookupName" }] : /* istanbul ignore next */ []));
|
|
46137
|
+
lookupColor = computed(() => {
|
|
46138
|
+
const value = this.data()?.value;
|
|
46139
|
+
if (!value || typeof value !== 'object')
|
|
46140
|
+
return '';
|
|
46141
|
+
return value.details?.color || value.color || '';
|
|
46142
|
+
}, ...(ngDevMode ? [{ debugName: "lookupColor" }] : /* istanbul ignore next */ []));
|
|
46143
|
+
// === Checkbox values ===
|
|
46144
|
+
checkboxValue = computed(() => resolveEntityCheckbox(this.data()?.value), ...(ngDevMode ? [{ debugName: "checkboxValue" }] : /* istanbul ignore next */ []));
|
|
46145
|
+
checkboxLabel = computed(() => this.transloco.translate(this.checkboxValue() ? 'dashboardBuilder.yes' : 'dashboardBuilder.no'), ...(ngDevMode ? [{ debugName: "checkboxLabel" }] : /* istanbul ignore next */ []));
|
|
46146
|
+
// === Status values ===
|
|
46147
|
+
statusName = computed(() => {
|
|
46148
|
+
const value = this.data()?.value;
|
|
46149
|
+
if (!value)
|
|
46150
|
+
return '';
|
|
46151
|
+
if (typeof value === 'object') {
|
|
46152
|
+
const languageCode = document.dir === 'rtl' ? 'ar' : 'en';
|
|
46153
|
+
const display = typeof value.display === 'object'
|
|
46154
|
+
? value.display?.[languageCode] ||
|
|
46155
|
+
value.display?.en ||
|
|
46156
|
+
value.display?.ar ||
|
|
46157
|
+
value.display?.name ||
|
|
46158
|
+
value.display?.displayName ||
|
|
46159
|
+
value.display?.label
|
|
46160
|
+
: value.display;
|
|
46161
|
+
return (value.displayName ||
|
|
46162
|
+
value.name ||
|
|
46163
|
+
display ||
|
|
46164
|
+
value[languageCode] ||
|
|
46165
|
+
value.en ||
|
|
46166
|
+
value.ar ||
|
|
46167
|
+
value.label ||
|
|
46168
|
+
value.key ||
|
|
46169
|
+
'');
|
|
46170
|
+
}
|
|
46171
|
+
return String(value);
|
|
46172
|
+
}, ...(ngDevMode ? [{ debugName: "statusName" }] : /* istanbul ignore next */ []));
|
|
46173
|
+
statusColor = computed(() => {
|
|
46174
|
+
const value = this.data()?.value;
|
|
46175
|
+
if (!value || typeof value !== 'object')
|
|
46176
|
+
return '';
|
|
46177
|
+
return value.details?.color || value.color || '';
|
|
46178
|
+
}, ...(ngDevMode ? [{ debugName: "statusColor" }] : /* istanbul ignore next */ []));
|
|
46179
|
+
// === Percentage values ===
|
|
46180
|
+
percentageValue = computed(() => {
|
|
46181
|
+
let value = this.data()?.value;
|
|
46182
|
+
if (value === null || value === undefined)
|
|
46183
|
+
return null;
|
|
46184
|
+
// Unwrap nested { value: { value: N } } / { value: "49%" } shapes (up to a
|
|
46185
|
+
// couple of levels) so the progress-bar fill width parses correctly.
|
|
46186
|
+
for (let i = 0; i < 3 && value && typeof value === 'object'; i++) {
|
|
46187
|
+
value =
|
|
46188
|
+
value.value ??
|
|
46189
|
+
value.actualValue ??
|
|
46190
|
+
value.displayValue ??
|
|
46191
|
+
value.display ??
|
|
46192
|
+
null;
|
|
46193
|
+
}
|
|
46194
|
+
if (value === null || value === undefined)
|
|
46195
|
+
return null;
|
|
46196
|
+
const num = parseFloat(String(value).replace('%', '').trim());
|
|
46197
|
+
return Number.isNaN(num) ? 0 : num;
|
|
46198
|
+
}, ...(ngDevMode ? [{ debugName: "percentageValue" }] : /* istanbul ignore next */ []));
|
|
46199
|
+
percentageColor = computed(() => {
|
|
46200
|
+
// "% status color": the table injects the row's status colour as
|
|
46201
|
+
// data().statusColor and sets extraInfoData.showPercentageStatus — prefer
|
|
46202
|
+
// it so the progress bar / dot reflects the row's status (Delayed -> red…).
|
|
46203
|
+
const statusColor = this.data()?.statusColor;
|
|
46204
|
+
if (this.extraInfoData()?.showPercentageStatus && statusColor) {
|
|
46205
|
+
return statusColor;
|
|
46206
|
+
}
|
|
46207
|
+
// Otherwise use any colour carried on the value (incl. one level of nesting).
|
|
46208
|
+
const value = this.data()?.value;
|
|
46209
|
+
if (!value || typeof value !== 'object')
|
|
46210
|
+
return '';
|
|
46211
|
+
return value.color || value.details?.color || value.value?.color || '';
|
|
46212
|
+
}, ...(ngDevMode ? [{ debugName: "percentageColor" }] : /* istanbul ignore next */ []));
|
|
46213
|
+
// === Slider values ===
|
|
46214
|
+
sliderValue = computed(() => {
|
|
46215
|
+
const value = this.data()?.value;
|
|
46216
|
+
if (!value)
|
|
46217
|
+
return 0;
|
|
46218
|
+
if (typeof value === 'object') {
|
|
46219
|
+
return parseFloat(value.value) || 0;
|
|
46220
|
+
}
|
|
46221
|
+
return parseFloat(value) || 0;
|
|
46222
|
+
}, ...(ngDevMode ? [{ debugName: "sliderValue" }] : /* istanbul ignore next */ []));
|
|
46223
|
+
// === User values ===
|
|
46224
|
+
userData = computed(() => {
|
|
46225
|
+
const value = this.data()?.value;
|
|
46226
|
+
if (!value || typeof value !== 'object')
|
|
46227
|
+
return null;
|
|
46228
|
+
return value;
|
|
46229
|
+
}, ...(ngDevMode ? [{ debugName: "userData" }] : /* istanbul ignore next */ []));
|
|
46230
|
+
userName = computed(() => {
|
|
46231
|
+
const user = this.userData();
|
|
46232
|
+
if (!user)
|
|
46233
|
+
return '';
|
|
46234
|
+
return user.displayName || user.name || user.fullName || '';
|
|
46235
|
+
}, ...(ngDevMode ? [{ debugName: "userName" }] : /* istanbul ignore next */ []));
|
|
46236
|
+
userPhoto = computed(() => resolveEntityUserPhoto(this.userData()), ...(ngDevMode ? [{ debugName: "userPhoto" }] : /* istanbul ignore next */ []));
|
|
46237
|
+
userInitials = computed(() => {
|
|
46238
|
+
const name = this.userName();
|
|
46239
|
+
return this.getInitials(name);
|
|
46240
|
+
}, ...(ngDevMode ? [{ debugName: "userInitials" }] : /* istanbul ignore next */ []));
|
|
46241
|
+
// === Multiselect values ===
|
|
46242
|
+
multiselectValues = computed(() => {
|
|
46243
|
+
const value = this.data()?.value;
|
|
46244
|
+
if (!value)
|
|
46245
|
+
return [];
|
|
46246
|
+
return Array.isArray(value) ? value : [];
|
|
46247
|
+
}, ...(ngDevMode ? [{ debugName: "multiselectValues" }] : /* istanbul ignore next */ []));
|
|
46248
|
+
// === Multi user values ===
|
|
46249
|
+
multiUserValues = computed(() => {
|
|
46250
|
+
const value = this.data()?.value;
|
|
46251
|
+
if (!value)
|
|
46252
|
+
return [];
|
|
46253
|
+
return Array.isArray(value) ? value : [];
|
|
46254
|
+
}, ...(ngDevMode ? [{ debugName: "multiUserValues" }] : /* istanbul ignore next */ []));
|
|
46255
|
+
getUserPhoto(user) {
|
|
46256
|
+
return resolveEntityUserPhoto(user);
|
|
46257
|
+
}
|
|
46258
|
+
// === Dynamic list values ===
|
|
46259
|
+
dynamicListValues = computed(() => {
|
|
46260
|
+
const value = this.data()?.value;
|
|
46261
|
+
if (!value)
|
|
46262
|
+
return [];
|
|
46263
|
+
return Array.isArray(value) ? value : [];
|
|
46264
|
+
}, ...(ngDevMode ? [{ debugName: "dynamicListValues" }] : /* istanbul ignore next */ []));
|
|
46265
|
+
// === Location values ===
|
|
46266
|
+
locationDisplayValue = computed(() => {
|
|
46267
|
+
const value = this.data()?.value;
|
|
46268
|
+
if (!value)
|
|
46269
|
+
return '';
|
|
46270
|
+
if (typeof value === 'object') {
|
|
46271
|
+
return value.display_name || value.displayName || value.name || '';
|
|
46272
|
+
}
|
|
46273
|
+
return String(value);
|
|
46274
|
+
}, ...(ngDevMode ? [{ debugName: "locationDisplayValue" }] : /* istanbul ignore next */ []));
|
|
46275
|
+
/** Get initials from name */
|
|
46276
|
+
getInitials(name) {
|
|
46277
|
+
if (!name)
|
|
46278
|
+
return '?';
|
|
46279
|
+
const parts = name.split(' ').filter(Boolean);
|
|
46280
|
+
if (parts.length === 1) {
|
|
46281
|
+
return parts[0].charAt(0).toUpperCase();
|
|
46282
|
+
}
|
|
46283
|
+
return (parts[0].charAt(0) + parts[parts.length - 1].charAt(0)).toUpperCase();
|
|
46284
|
+
}
|
|
46285
|
+
/** Format currency value */
|
|
46286
|
+
formatCurrency(value) {
|
|
46287
|
+
if (value === null || value === undefined || value === '')
|
|
46288
|
+
return '';
|
|
46289
|
+
const num = parseFloat(value);
|
|
46290
|
+
if (isNaN(num))
|
|
46291
|
+
return String(value);
|
|
46292
|
+
return num.toLocaleString(undefined, {
|
|
46293
|
+
minimumFractionDigits: 2,
|
|
46294
|
+
maximumFractionDigits: 2,
|
|
46295
|
+
});
|
|
46296
|
+
}
|
|
46297
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntityInfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
46298
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: EntityInfoComponent, isStandalone: true, selector: "mt-entity-info", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, displayType: { classPropertyName: "displayType", publicName: "displayType", isSignal: true, isRequired: false, transformFunction: null }, extraInfoData: { classPropertyName: "extraInfoData", publicName: "extraInfoData", isSignal: true, isRequired: false, transformFunction: null }, limitWords: { classPropertyName: "limitWords", publicName: "limitWords", isSignal: true, isRequired: false, transformFunction: null }, customClass: { classPropertyName: "customClass", publicName: "customClass", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div\r\n class=\"entity-info-wrapper w-full\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n>\r\n @switch (viewTypeLower()) {\r\n <!-- Text Types -->\r\n @case (\"text\") {\r\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\r\n }\r\n @case (\"float\") {\r\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\r\n }\r\n @case (\"longtext\") {\r\n <ng-container *ngTemplateOutlet=\"longTextTemplate\"></ng-container>\r\n }\r\n @case (\"title\") {\r\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\r\n }\r\n @case (\"phasegate\") {\r\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Number -->\r\n @case (\"number\") {\r\n <ng-container *ngTemplateOutlet=\"numberTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Date Types -->\r\n @case (\"date\") {\r\n <ng-container *ngTemplateOutlet=\"dateTemplate\"></ng-container>\r\n }\r\n @case (\"datetime\") {\r\n <ng-container *ngTemplateOutlet=\"dateTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Currency -->\r\n @case (\"currency\") {\r\n <ng-container *ngTemplateOutlet=\"currencyTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Time -->\r\n @case (\"time\") {\r\n <ng-container *ngTemplateOutlet=\"timeTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Lookup -->\r\n @case (\"lookup\") {\r\n <ng-container *ngTemplateOutlet=\"lookupTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Lookup Matrix (same value shape as lookup: key/display/color) -->\r\n @case (\"lookupmatrix\") {\r\n <ng-container *ngTemplateOutlet=\"lookupTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Checkbox -->\r\n @case (\"checkbox\") {\r\n <ng-container *ngTemplateOutlet=\"checkboxTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Status -->\r\n @case (\"status\") {\r\n <ng-container *ngTemplateOutlet=\"statusTemplate\"></ng-container>\r\n }\r\n @case (\"request_status\") {\r\n <ng-container *ngTemplateOutlet=\"statusTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Percentage -->\r\n @case (\"percentage\") {\r\n <ng-container *ngTemplateOutlet=\"percentageTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Slider -->\r\n @case (\"slider\") {\r\n <ng-container *ngTemplateOutlet=\"sliderTemplate\"></ng-container>\r\n }\r\n\r\n <!-- User -->\r\n @case (\"user\") {\r\n <ng-container *ngTemplateOutlet=\"userTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Multi-select lookup -->\r\n @case (\"lookupmultiselect\") {\r\n <ng-container\r\n *ngTemplateOutlet=\"lookupMultiselectTemplate\"\r\n ></ng-container>\r\n }\r\n\r\n <!-- Multi user -->\r\n @case (\"multiuser\") {\r\n <ng-container *ngTemplateOutlet=\"multiUserTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Dynamic List -->\r\n @case (\"dynamiclist\") {\r\n <ng-container *ngTemplateOutlet=\"dynamicListTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Location -->\r\n @case (\"location\") {\r\n <ng-container *ngTemplateOutlet=\"locationTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Default: treat as text -->\r\n @default {\r\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\r\n }\r\n }\r\n</div>\r\n\r\n<!-- Text Template -->\r\n<ng-template #textTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div\r\n class=\"font-semibold\"\r\n [class.text-ellipsis]=\"limitWords()\"\r\n [class.overflow-hidden]=\"limitWords()\"\r\n [class.whitespace-nowrap]=\"limitWords()\"\r\n [style.max-width]=\"limitWords() ? '200px' : 'auto'\"\r\n [title]=\"textValue()\"\r\n >\r\n {{ textValue() || \"__\" }}\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Long Text Template: the value is rich-text HTML, so render it as markup\r\n (Angular sanitizes [innerHTML]) instead of printing the tags. -->\r\n<ng-template #longTextTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n @if (longTextTooltip()) {\r\n <div\r\n class=\"entity-long-text font-semibold break-words\"\r\n [class.entity-long-text-clamped]=\"displayType() === 'inTable'\"\r\n [title]=\"longTextTooltip()\"\r\n [innerHTML]=\"longTextHtml()\"\r\n ></div>\r\n } @else {\r\n <div class=\"font-semibold\">__</div>\r\n }\r\n</ng-template>\r\n\r\n<!-- Number Template -->\r\n<ng-template #numberTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"font-semibold\">\r\n {{ numericValue() !== null ? (numericValue() | number) : \"__\" }}\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Date Template -->\r\n<ng-template #dateTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"font-semibold\">\r\n {{ dateDisplayValue() || \"__\" }}\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Currency Template -->\r\n<ng-template #currencyTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"font-semibold\">\r\n {{ currencyDisplayValue() || \"__\" }}\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Time Template -->\r\n<ng-template #timeTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"font-semibold\">\r\n {{ timeDisplayValue() || \"__\" }}\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Lookup Template -->\r\n<ng-template #lookupTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n @if (lookupName()) {\r\n <span class=\"flex items-center gap-1\" [style.color]=\"lookupColor()\">\r\n @if (displayType() === \"entity\" && lookupColor()) {\r\n <span\r\n class=\"w-2 h-2 rounded-full inline-block\"\r\n [style.backgroundColor]=\"lookupColor()\"\r\n ></span>\r\n }\r\n {{ lookupName() }}\r\n </span>\r\n } @else {\r\n <span class=\"font-semibold\">__</span>\r\n }\r\n</ng-template>\r\n\r\n<!-- Checkbox Template -->\r\n<ng-template #checkboxTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"flex items-center\">\r\n <i\r\n [class]=\"\r\n checkboxValue()\r\n ? 'pi pi-check-square text-primary'\r\n : 'pi pi-stop text-muted-color'\r\n \"\r\n ></i>\r\n <span class=\"ml-2\">{{ checkboxLabel() }}</span>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Status Template -->\r\n<ng-template #statusTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"flex items-center gap-2\">\r\n @if (statusColor()) {\r\n <span\r\n class=\"w-2.5 h-2.5 rounded-full flex-shrink-0\"\r\n [style.backgroundColor]=\"statusColor()\"\r\n ></span>\r\n }\r\n <span [style.color]=\"statusColor()\">\r\n {{ statusName() || \"__\" }}\r\n </span>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Percentage Template -->\r\n<ng-template #percentageTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"flex items-center gap-2\">\r\n @if (\r\n displayType() !== \"inTable\" ||\r\n extraInfoData()?.showPercentageAsProgressBar\r\n ) {\r\n <div\r\n class=\"flex-1 h-2 bg-surface-200 rounded-full overflow-hidden max-w-24\"\r\n >\r\n <div\r\n class=\"h-full rounded-full transition-all\"\r\n [style.width.%]=\"percentageValue() || 0\"\r\n [style.backgroundColor]=\"percentageColor() || 'var(--primary-color)'\"\r\n ></div>\r\n </div>\r\n }\r\n @if (\r\n extraInfoData()?.showPercentageStatus &&\r\n !extraInfoData()?.showPercentageAsProgressBar\r\n ) {\r\n <span\r\n class=\"w-2.5 h-2.5 rounded-full\"\r\n [style.backgroundColor]=\"percentageColor() || '#000'\"\r\n ></span>\r\n }\r\n <span [style.color]=\"percentageColor()\">\r\n {{\r\n percentageValue() !== null\r\n ? (percentageValue() | number: \"1.0-0\") + \"%\"\r\n : \"__\"\r\n }}\r\n </span>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Slider Template -->\r\n<ng-template #sliderTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"flex items-center gap-2\">\r\n <div\r\n class=\"flex-1 h-2 bg-surface-200 rounded-full overflow-hidden max-w-32\"\r\n >\r\n <div\r\n class=\"h-full bg-primary rounded-full transition-all\"\r\n [style.width.%]=\"sliderValue() || 0\"\r\n ></div>\r\n </div>\r\n <span class=\"text-sm\">{{ sliderValue() || 0 }}%</span>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- User Template -->\r\n<ng-template #userTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n @if (userData()) {\r\n <div class=\"flex items-center gap-2\">\r\n @if (userPhoto()) {\r\n <img\r\n [src]=\"userPhoto() | secureImage: true : httpContext : 'avatar/'\"\r\n alt=\"User avatar\"\r\n class=\"w-8 h-8 rounded-full object-cover\"\r\n />\r\n } @else {\r\n <div\r\n class=\"w-8 h-8 rounded-full bg-primary/20 flex items-center justify-center text-primary font-semibold text-sm\"\r\n >\r\n {{ userInitials() }}\r\n </div>\r\n }\r\n <span class=\"font-medium\">{{ userName() }}</span>\r\n </div>\r\n } @else {\r\n <span class=\"font-semibold\">__</span>\r\n }\r\n</ng-template>\r\n\r\n<!-- Lookup Multiselect Template -->\r\n<ng-template #lookupMultiselectTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n @if (multiselectValues()?.length) {\r\n <div class=\"flex flex-wrap gap-1\">\r\n @for (item of multiselectValues(); track item.key || $index) {\r\n <!-- A lookup value is { key, display, color } \u2014 `details.color` alone\r\n left every chip on the grey fallback. Same order as lookupColor(). -->\r\n <span\r\n class=\"px-2 py-0.5 rounded-full text-xs font-medium\"\r\n [style.backgroundColor]=\"\r\n (item.details?.color || item.color || '#6b7280') + '20'\r\n \"\r\n [style.color]=\"item.details?.color || item.color || '#6b7280'\"\r\n >\r\n {{ item.name || item.display || item.key || item }}\r\n </span>\r\n }\r\n </div>\r\n } @else {\r\n <span class=\"font-semibold\">__</span>\r\n }\r\n</ng-template>\r\n\r\n<!-- Multi User Template -->\r\n<ng-template #multiUserTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n @if (multiUserValues()?.length) {\r\n <div class=\"flex items-center -space-x-2\">\r\n @for (user of multiUserValues().slice(0, 5); track user.id || $index) {\r\n @if (getUserPhoto(user); as userPhoto) {\r\n <img\r\n [src]=\"userPhoto | secureImage: true : httpContext : 'avatar/'\"\r\n [alt]=\"user.name || user.displayName\"\r\n class=\"w-7 h-7 rounded-full border-2 border-white object-cover\"\r\n />\r\n } @else {\r\n <div\r\n class=\"w-7 h-7 rounded-full border-2 border-white bg-primary/20 flex items-center justify-center text-primary font-semibold text-xs\"\r\n >\r\n {{ getInitials(user.name || user.displayName) }}\r\n </div>\r\n }\r\n }\r\n @if (multiUserValues().length > 5) {\r\n <div\r\n class=\"w-7 h-7 rounded-full border-2 border-white bg-surface-300 flex items-center justify-center text-xs font-medium\"\r\n >\r\n +{{ multiUserValues().length - 5 }}\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <span class=\"font-semibold\">__</span>\r\n }\r\n</ng-template>\r\n\r\n<!-- Dynamic List Template -->\r\n<ng-template #dynamicListTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n @if (dynamicListValues()?.length) {\r\n <div class=\"flex flex-col gap-1\">\r\n @for (item of dynamicListValues(); track $index) {\r\n <div class=\"text-sm\">\r\n {{ item?.label || item?.name || item }}\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <span class=\"font-semibold\">__</span>\r\n }\r\n</ng-template>\r\n\r\n<!-- Location Template -->\r\n<ng-template #locationTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"font-semibold\">\r\n {{ locationDisplayValue() || \"__\" }}\r\n </div>\r\n</ng-template>\r\n", styles: [":host{display:block}.text-ellipsis{text-overflow:ellipsis}.entity-long-text ::ng-deep :is(p,ul,ol,h1,h2,h3,h4,h5,h6){margin:0}.entity-long-text-clamped{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.entity-long-text-clamped ::ng-deep :is(p,div,li,h1,h2,h3,h4,h5,h6){display:inline}.entity-long-text-clamped ::ng-deep :is(p,div,li,h1,h2,h3,h4,h5,h6):after{content:\" \"}\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: "pipe", type: i1$1.DecimalPipe, name: "number" }, { kind: "pipe", type: SecureImagePipe, name: "secureImage" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
46299
|
+
}
|
|
46300
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntityInfoComponent, decorators: [{
|
|
46301
|
+
type: Component,
|
|
46302
|
+
args: [{ selector: 'mt-entity-info', standalone: true, imports: [CommonModule, TranslocoDirective, DecimalPipe, SecureImagePipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\r\n class=\"entity-info-wrapper w-full\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n>\r\n @switch (viewTypeLower()) {\r\n <!-- Text Types -->\r\n @case (\"text\") {\r\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\r\n }\r\n @case (\"float\") {\r\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\r\n }\r\n @case (\"longtext\") {\r\n <ng-container *ngTemplateOutlet=\"longTextTemplate\"></ng-container>\r\n }\r\n @case (\"title\") {\r\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\r\n }\r\n @case (\"phasegate\") {\r\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Number -->\r\n @case (\"number\") {\r\n <ng-container *ngTemplateOutlet=\"numberTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Date Types -->\r\n @case (\"date\") {\r\n <ng-container *ngTemplateOutlet=\"dateTemplate\"></ng-container>\r\n }\r\n @case (\"datetime\") {\r\n <ng-container *ngTemplateOutlet=\"dateTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Currency -->\r\n @case (\"currency\") {\r\n <ng-container *ngTemplateOutlet=\"currencyTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Time -->\r\n @case (\"time\") {\r\n <ng-container *ngTemplateOutlet=\"timeTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Lookup -->\r\n @case (\"lookup\") {\r\n <ng-container *ngTemplateOutlet=\"lookupTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Lookup Matrix (same value shape as lookup: key/display/color) -->\r\n @case (\"lookupmatrix\") {\r\n <ng-container *ngTemplateOutlet=\"lookupTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Checkbox -->\r\n @case (\"checkbox\") {\r\n <ng-container *ngTemplateOutlet=\"checkboxTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Status -->\r\n @case (\"status\") {\r\n <ng-container *ngTemplateOutlet=\"statusTemplate\"></ng-container>\r\n }\r\n @case (\"request_status\") {\r\n <ng-container *ngTemplateOutlet=\"statusTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Percentage -->\r\n @case (\"percentage\") {\r\n <ng-container *ngTemplateOutlet=\"percentageTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Slider -->\r\n @case (\"slider\") {\r\n <ng-container *ngTemplateOutlet=\"sliderTemplate\"></ng-container>\r\n }\r\n\r\n <!-- User -->\r\n @case (\"user\") {\r\n <ng-container *ngTemplateOutlet=\"userTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Multi-select lookup -->\r\n @case (\"lookupmultiselect\") {\r\n <ng-container\r\n *ngTemplateOutlet=\"lookupMultiselectTemplate\"\r\n ></ng-container>\r\n }\r\n\r\n <!-- Multi user -->\r\n @case (\"multiuser\") {\r\n <ng-container *ngTemplateOutlet=\"multiUserTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Dynamic List -->\r\n @case (\"dynamiclist\") {\r\n <ng-container *ngTemplateOutlet=\"dynamicListTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Location -->\r\n @case (\"location\") {\r\n <ng-container *ngTemplateOutlet=\"locationTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Default: treat as text -->\r\n @default {\r\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\r\n }\r\n }\r\n</div>\r\n\r\n<!-- Text Template -->\r\n<ng-template #textTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div\r\n class=\"font-semibold\"\r\n [class.text-ellipsis]=\"limitWords()\"\r\n [class.overflow-hidden]=\"limitWords()\"\r\n [class.whitespace-nowrap]=\"limitWords()\"\r\n [style.max-width]=\"limitWords() ? '200px' : 'auto'\"\r\n [title]=\"textValue()\"\r\n >\r\n {{ textValue() || \"__\" }}\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Long Text Template: the value is rich-text HTML, so render it as markup\r\n (Angular sanitizes [innerHTML]) instead of printing the tags. -->\r\n<ng-template #longTextTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n @if (longTextTooltip()) {\r\n <div\r\n class=\"entity-long-text font-semibold break-words\"\r\n [class.entity-long-text-clamped]=\"displayType() === 'inTable'\"\r\n [title]=\"longTextTooltip()\"\r\n [innerHTML]=\"longTextHtml()\"\r\n ></div>\r\n } @else {\r\n <div class=\"font-semibold\">__</div>\r\n }\r\n</ng-template>\r\n\r\n<!-- Number Template -->\r\n<ng-template #numberTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"font-semibold\">\r\n {{ numericValue() !== null ? (numericValue() | number) : \"__\" }}\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Date Template -->\r\n<ng-template #dateTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"font-semibold\">\r\n {{ dateDisplayValue() || \"__\" }}\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Currency Template -->\r\n<ng-template #currencyTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"font-semibold\">\r\n {{ currencyDisplayValue() || \"__\" }}\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Time Template -->\r\n<ng-template #timeTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"font-semibold\">\r\n {{ timeDisplayValue() || \"__\" }}\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Lookup Template -->\r\n<ng-template #lookupTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n @if (lookupName()) {\r\n <span class=\"flex items-center gap-1\" [style.color]=\"lookupColor()\">\r\n @if (displayType() === \"entity\" && lookupColor()) {\r\n <span\r\n class=\"w-2 h-2 rounded-full inline-block\"\r\n [style.backgroundColor]=\"lookupColor()\"\r\n ></span>\r\n }\r\n {{ lookupName() }}\r\n </span>\r\n } @else {\r\n <span class=\"font-semibold\">__</span>\r\n }\r\n</ng-template>\r\n\r\n<!-- Checkbox Template -->\r\n<ng-template #checkboxTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"flex items-center\">\r\n <i\r\n [class]=\"\r\n checkboxValue()\r\n ? 'pi pi-check-square text-primary'\r\n : 'pi pi-stop text-muted-color'\r\n \"\r\n ></i>\r\n <span class=\"ml-2\">{{ checkboxLabel() }}</span>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Status Template -->\r\n<ng-template #statusTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"flex items-center gap-2\">\r\n @if (statusColor()) {\r\n <span\r\n class=\"w-2.5 h-2.5 rounded-full flex-shrink-0\"\r\n [style.backgroundColor]=\"statusColor()\"\r\n ></span>\r\n }\r\n <span [style.color]=\"statusColor()\">\r\n {{ statusName() || \"__\" }}\r\n </span>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Percentage Template -->\r\n<ng-template #percentageTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"flex items-center gap-2\">\r\n @if (\r\n displayType() !== \"inTable\" ||\r\n extraInfoData()?.showPercentageAsProgressBar\r\n ) {\r\n <div\r\n class=\"flex-1 h-2 bg-surface-200 rounded-full overflow-hidden max-w-24\"\r\n >\r\n <div\r\n class=\"h-full rounded-full transition-all\"\r\n [style.width.%]=\"percentageValue() || 0\"\r\n [style.backgroundColor]=\"percentageColor() || 'var(--primary-color)'\"\r\n ></div>\r\n </div>\r\n }\r\n @if (\r\n extraInfoData()?.showPercentageStatus &&\r\n !extraInfoData()?.showPercentageAsProgressBar\r\n ) {\r\n <span\r\n class=\"w-2.5 h-2.5 rounded-full\"\r\n [style.backgroundColor]=\"percentageColor() || '#000'\"\r\n ></span>\r\n }\r\n <span [style.color]=\"percentageColor()\">\r\n {{\r\n percentageValue() !== null\r\n ? (percentageValue() | number: \"1.0-0\") + \"%\"\r\n : \"__\"\r\n }}\r\n </span>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Slider Template -->\r\n<ng-template #sliderTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"flex items-center gap-2\">\r\n <div\r\n class=\"flex-1 h-2 bg-surface-200 rounded-full overflow-hidden max-w-32\"\r\n >\r\n <div\r\n class=\"h-full bg-primary rounded-full transition-all\"\r\n [style.width.%]=\"sliderValue() || 0\"\r\n ></div>\r\n </div>\r\n <span class=\"text-sm\">{{ sliderValue() || 0 }}%</span>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- User Template -->\r\n<ng-template #userTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n @if (userData()) {\r\n <div class=\"flex items-center gap-2\">\r\n @if (userPhoto()) {\r\n <img\r\n [src]=\"userPhoto() | secureImage: true : httpContext : 'avatar/'\"\r\n alt=\"User avatar\"\r\n class=\"w-8 h-8 rounded-full object-cover\"\r\n />\r\n } @else {\r\n <div\r\n class=\"w-8 h-8 rounded-full bg-primary/20 flex items-center justify-center text-primary font-semibold text-sm\"\r\n >\r\n {{ userInitials() }}\r\n </div>\r\n }\r\n <span class=\"font-medium\">{{ userName() }}</span>\r\n </div>\r\n } @else {\r\n <span class=\"font-semibold\">__</span>\r\n }\r\n</ng-template>\r\n\r\n<!-- Lookup Multiselect Template -->\r\n<ng-template #lookupMultiselectTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n @if (multiselectValues()?.length) {\r\n <div class=\"flex flex-wrap gap-1\">\r\n @for (item of multiselectValues(); track item.key || $index) {\r\n <!-- A lookup value is { key, display, color } \u2014 `details.color` alone\r\n left every chip on the grey fallback. Same order as lookupColor(). -->\r\n <span\r\n class=\"px-2 py-0.5 rounded-full text-xs font-medium\"\r\n [style.backgroundColor]=\"\r\n (item.details?.color || item.color || '#6b7280') + '20'\r\n \"\r\n [style.color]=\"item.details?.color || item.color || '#6b7280'\"\r\n >\r\n {{ item.name || item.display || item.key || item }}\r\n </span>\r\n }\r\n </div>\r\n } @else {\r\n <span class=\"font-semibold\">__</span>\r\n }\r\n</ng-template>\r\n\r\n<!-- Multi User Template -->\r\n<ng-template #multiUserTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n @if (multiUserValues()?.length) {\r\n <div class=\"flex items-center -space-x-2\">\r\n @for (user of multiUserValues().slice(0, 5); track user.id || $index) {\r\n @if (getUserPhoto(user); as userPhoto) {\r\n <img\r\n [src]=\"userPhoto | secureImage: true : httpContext : 'avatar/'\"\r\n [alt]=\"user.name || user.displayName\"\r\n class=\"w-7 h-7 rounded-full border-2 border-white object-cover\"\r\n />\r\n } @else {\r\n <div\r\n class=\"w-7 h-7 rounded-full border-2 border-white bg-primary/20 flex items-center justify-center text-primary font-semibold text-xs\"\r\n >\r\n {{ getInitials(user.name || user.displayName) }}\r\n </div>\r\n }\r\n }\r\n @if (multiUserValues().length > 5) {\r\n <div\r\n class=\"w-7 h-7 rounded-full border-2 border-white bg-surface-300 flex items-center justify-center text-xs font-medium\"\r\n >\r\n +{{ multiUserValues().length - 5 }}\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <span class=\"font-semibold\">__</span>\r\n }\r\n</ng-template>\r\n\r\n<!-- Dynamic List Template -->\r\n<ng-template #dynamicListTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n @if (dynamicListValues()?.length) {\r\n <div class=\"flex flex-col gap-1\">\r\n @for (item of dynamicListValues(); track $index) {\r\n <div class=\"text-sm\">\r\n {{ item?.label || item?.name || item }}\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <span class=\"font-semibold\">__</span>\r\n }\r\n</ng-template>\r\n\r\n<!-- Location Template -->\r\n<ng-template #locationTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"font-semibold\">\r\n {{ locationDisplayValue() || \"__\" }}\r\n </div>\r\n</ng-template>\r\n", styles: [":host{display:block}.text-ellipsis{text-overflow:ellipsis}.entity-long-text ::ng-deep :is(p,ul,ol,h1,h2,h3,h4,h5,h6){margin:0}.entity-long-text-clamped{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.entity-long-text-clamped ::ng-deep :is(p,div,li,h1,h2,h3,h4,h5,h6){display:inline}.entity-long-text-clamped ::ng-deep :is(p,div,li,h1,h2,h3,h4,h5,h6):after{content:\" \"}\n"] }]
|
|
46303
|
+
}], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], displayType: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayType", required: false }] }], extraInfoData: [{ type: i0.Input, args: [{ isSignal: true, alias: "extraInfoData", required: false }] }], limitWords: [{ type: i0.Input, args: [{ isSignal: true, alias: "limitWords", required: false }] }], customClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "customClass", required: false }] }] } });
|
|
46304
|
+
|
|
46305
|
+
/**
|
|
46306
|
+
* The table card renders the data grid, so the package's main entry never imports it
|
|
46307
|
+
* statically: `DashboardItem` defers it, and other callers load it with this function.
|
|
46308
|
+
* A static import here would put the whole grid in every host bundle that imports
|
|
46309
|
+
* `@masterteam/dashboard-builder`.
|
|
46310
|
+
*/
|
|
46311
|
+
const loadTableCard = () => import('./masterteam-dashboard-builder-table-card.component-kHPxfvAb.mjs').then((m) => m.TableCardComponent);
|
|
46312
|
+
|
|
47731
46313
|
/**
|
|
47732
46314
|
* Dashboard Item Components Index
|
|
47733
46315
|
*
|
|
@@ -51876,11 +50458,11 @@ class DashboardList {
|
|
|
51876
50458
|
this.dashboards.reload();
|
|
51877
50459
|
}
|
|
51878
50460
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: DashboardList, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
51879
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: DashboardList, isStandalone: true, selector: "mt-dashboard-list", inputs: { isPage: { classPropertyName: "isPage", publicName: "isPage", isSignal: true, isRequired: false, transformFunction: null }, pageTitle: { classPropertyName: "pageTitle", publicName: "pageTitle", isSignal: true, isRequired: false, transformFunction: null }, baseRoute: { classPropertyName: "baseRoute", publicName: "baseRoute", isSignal: true, isRequired: false, transformFunction: null }, showCreateButton: { classPropertyName: "showCreateButton", publicName: "showCreateButton", isSignal: true, isRequired: false, transformFunction: null }, showViewButton: { classPropertyName: "showViewButton", publicName: "showViewButton", isSignal: true, isRequired: false, transformFunction: null }, showEditButton: { classPropertyName: "showEditButton", publicName: "showEditButton", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dashboardAction: "dashboardAction", dashboardCreated: "dashboardCreated" }, queries: [{ propertyName: "headerEnd", first: true, predicate: ["headerEnd"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "nameTpl", first: true, predicate: ["nameTpl"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'dashboardBuilder.dashboard'\">\
|
|
50461
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: DashboardList, isStandalone: true, selector: "mt-dashboard-list", inputs: { isPage: { classPropertyName: "isPage", publicName: "isPage", isSignal: true, isRequired: false, transformFunction: null }, pageTitle: { classPropertyName: "pageTitle", publicName: "pageTitle", isSignal: true, isRequired: false, transformFunction: null }, baseRoute: { classPropertyName: "baseRoute", publicName: "baseRoute", isSignal: true, isRequired: false, transformFunction: null }, showCreateButton: { classPropertyName: "showCreateButton", publicName: "showCreateButton", isSignal: true, isRequired: false, transformFunction: null }, showViewButton: { classPropertyName: "showViewButton", publicName: "showViewButton", isSignal: true, isRequired: false, transformFunction: null }, showEditButton: { classPropertyName: "showEditButton", publicName: "showEditButton", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dashboardAction: "dashboardAction", dashboardCreated: "dashboardCreated" }, queries: [{ propertyName: "headerEnd", first: true, predicate: ["headerEnd"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "nameTpl", first: true, predicate: ["nameTpl"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'dashboardBuilder.dashboard'\">\n <!-- Page mode -->\n @if (isPage()) {\n <mt-page\n [title]=\"pageTitle() || t('dashboards')\"\n [avatarIcon]=\"'chart.bar-chart-square-03'\"\n [avatarStyle]=\"{\n '--p-avatar-background': 'var(--p-cyan-100)',\n '--p-avatar-color': 'var(--p-cyan-700)',\n }\"\n >\n @if (headerEnd(); as hostActions) {\n <ng-template #headerEnd>\n <ng-container *ngTemplateOutlet=\"hostActions\" />\n </ng-template>\n }\n <!-- Content -->\n <ng-container *ngTemplateOutlet=\"tableContent\" />\n </mt-page>\n } @else {\n <!-- Non-page mode -->\n <div class=\"dashboard-list space-y-3\">\n <!-- Header -->\n <h2 class=\"text-2xl font-semibold text-surface-900 dark:text-surface-0\">\n {{ t(\"dashboards\") }}\n </h2>\n\n <!-- Content -->\n <ng-container *ngTemplateOutlet=\"tableContent\" />\n </div>\n }\n\n <!-- Reusable table content template -->\n <ng-template #tableContent>\n <!-- Custom cell templates -->\n <ng-template #nameTpl let-row>\n <span class=\"font-semibold text-surface-900 dark:text-surface-0\">\n {{ getDashboardName(row) }}\n </span>\n </ng-template>\n\n <!-- Dashboard Table -->\n <mt-table\n [data]=\"dashboardList()\"\n [columns]=\"tableColumns()\"\n [actions]=\"tableActions()\"\n [rowActions]=\"rowActions()\"\n [loading]=\"isLoading()\"\n [showFilters]=\"true\"\n [generalSearch]=\"true\"\n dataKey=\"id\"\n storageKey=\"dashboard-list-table\"\n (cellChange)=\"onToggleChange($event)\"\n />\n </ng-template>\n</ng-container>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Table, selector: "mt-table", inputs: ["filters", "data", "columns", "rowActions", "size", "showGridlines", "stripedRows", "selectableRows", "clickableRows", "generalSearch", "lazyLocalSearch", "showFilters", "filterMode", "filterCloseOnOutsideClick", "loading", "updating", "lazy", "lazyLocalSort", "lazyTotalRecords", "reorderableColumns", "reorderableRows", "dataKey", "storageKey", "storageMode", "persistStateExclude", "exportable", "printable", "groupable", "groupCountMap", "cellClickFilter", "freezeActions", "virtualScroll", "virtualScrollItemSize", "scrollHeight", "printTitle", "exportFilename", "actionShape", "rowActionsLoadingFn", "tableLayout", "noCard", "tabs", "tabsOptionLabel", "tabsOptionValue", "activeTab", "actions", "captionStartTemplate", "captionEndTemplate", "emptyTitle", "emptyDescription", "emptyActionLabel", "emptyActionIcon", "externalFiltersActive", "paginatorPosition", "alwaysShowPaginator", "rowsPerPageOptions", "pageSize", "currentPage", "first", "filterTerm", "groupBy", "sortField", "sortDirection"], outputs: ["selectionChange", "cellChange", "lazyLoad", "columnReorder", "rowReorder", "rowClick", "emptyAction", "filtersCleared", "rowActionsRequested", "filtersChange", "activeTabChange", "onTabChange", "pageSizeChange", "currentPageChange", "firstChange", "filterTermChange", "groupByChange", "sortFieldChange", "sortDirectionChange"] }, { kind: "component", type: Page, selector: "mt-page", inputs: ["backButton", "backButtonIcon", "avatarIcon", "avatarStyle", "avatarShape", "title", "tabs", "activeTab", "contentClass", "contentId"], outputs: ["backButtonClick", "tabChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
51880
50462
|
}
|
|
51881
50463
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: DashboardList, decorators: [{
|
|
51882
50464
|
type: Component,
|
|
51883
|
-
args: [{ selector: 'mt-dashboard-list', standalone: true, imports: [CommonModule, TranslocoDirective, Table, Page], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *transloco=\"let t; prefix: 'dashboardBuilder.dashboard'\">\
|
|
50465
|
+
args: [{ selector: 'mt-dashboard-list', standalone: true, imports: [CommonModule, TranslocoDirective, Table, Page], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *transloco=\"let t; prefix: 'dashboardBuilder.dashboard'\">\n <!-- Page mode -->\n @if (isPage()) {\n <mt-page\n [title]=\"pageTitle() || t('dashboards')\"\n [avatarIcon]=\"'chart.bar-chart-square-03'\"\n [avatarStyle]=\"{\n '--p-avatar-background': 'var(--p-cyan-100)',\n '--p-avatar-color': 'var(--p-cyan-700)',\n }\"\n >\n @if (headerEnd(); as hostActions) {\n <ng-template #headerEnd>\n <ng-container *ngTemplateOutlet=\"hostActions\" />\n </ng-template>\n }\n <!-- Content -->\n <ng-container *ngTemplateOutlet=\"tableContent\" />\n </mt-page>\n } @else {\n <!-- Non-page mode -->\n <div class=\"dashboard-list space-y-3\">\n <!-- Header -->\n <h2 class=\"text-2xl font-semibold text-surface-900 dark:text-surface-0\">\n {{ t(\"dashboards\") }}\n </h2>\n\n <!-- Content -->\n <ng-container *ngTemplateOutlet=\"tableContent\" />\n </div>\n }\n\n <!-- Reusable table content template -->\n <ng-template #tableContent>\n <!-- Custom cell templates -->\n <ng-template #nameTpl let-row>\n <span class=\"font-semibold text-surface-900 dark:text-surface-0\">\n {{ getDashboardName(row) }}\n </span>\n </ng-template>\n\n <!-- Dashboard Table -->\n <mt-table\n [data]=\"dashboardList()\"\n [columns]=\"tableColumns()\"\n [actions]=\"tableActions()\"\n [rowActions]=\"rowActions()\"\n [loading]=\"isLoading()\"\n [showFilters]=\"true\"\n [generalSearch]=\"true\"\n dataKey=\"id\"\n storageKey=\"dashboard-list-table\"\n (cellChange)=\"onToggleChange($event)\"\n />\n </ng-template>\n</ng-container>\n" }]
|
|
51884
50466
|
}], propDecorators: { nameTpl: [{ type: i0.ViewChild, args: ['nameTpl', { isSignal: true }] }], headerEnd: [{ type: i0.ContentChild, args: ['headerEnd', { isSignal: true }] }], isPage: [{ type: i0.Input, args: [{ isSignal: true, alias: "isPage", required: false }] }], pageTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageTitle", required: false }] }], baseRoute: [{ type: i0.Input, args: [{ isSignal: true, alias: "baseRoute", required: false }] }], showCreateButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCreateButton", required: false }] }], showViewButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showViewButton", required: false }] }], showEditButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showEditButton", required: false }] }], dashboardAction: [{ type: i0.Output, args: ["dashboardAction"] }], dashboardCreated: [{ type: i0.Output, args: ["dashboardCreated"] }] } });
|
|
51885
50467
|
|
|
51886
50468
|
/**
|
|
@@ -54895,5 +53477,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
54895
53477
|
* Generated bundle index. Do not edit.
|
|
54896
53478
|
*/
|
|
54897
53479
|
|
|
54898
|
-
export {
|
|
54899
|
-
//# sourceMappingURL=masterteam-dashboard-builder-masterteam-dashboard-builder-
|
|
53480
|
+
export { DEFAULT_MAP_REGION_KEY as $, getColorFromConditions as A, CardFilterComponent as B, ClickDispatcher as C, DashboardItemStoreService as D, EntityInfoComponent as E, FilterUtilsService as F, DynamicFiltersComponent as G, CardInfoComponent as H, ChartCardComponent as I, EChartComponent as J, resolveEntityUserPhoto as K, resolveEntityCheckbox as L, dateDisplayRawValue as M, normalizeDashboardCardEntityValue as N, mergePropertyAppearance as O, PropertiesCardComponent as P, EntityPreviewCardComponent as Q, HeaderCardComponent as R, StaticFiltersComponent as S, LastHistoryLevelCardComponent as T, ListStatisticCardComponent as U, MAP_MARKER_PATH as V, MAP_FALLBACK_COLORS as W, isPlottable as X, plottableGroups as Y, buildMapChartOption as Z, MAP_REGIONS as _, fillColorForPercentageProperty as a, CHART_TYPES as a$, MAP_DATA_ATTRIBUTION as a0, resolveMapRegion as a1, MapViewComponent as a2, SkeletonCardComponent as a3, resolveStatisticIconPlacement as a4, StatisticCardComponent as a5, loadTableCard as a6, TopbarCardComponent as a7, ChartDataService as a8, observeNearViewport as a9, createTooltipFormatter as aA, formatAxisLabel as aB, formatWordsUnderBar as aC, formatXAxis as aD, handleFiltersForCustom as aE, handleFilterForCard as aF, handleFilterForSnapshot as aG, applyBuiltInConditions as aH, DashboardList as aI, MODULE_CLASSIFICATION_LOG as aJ, MODULE_CLASSIFICATION_LOG_NAME as aK, isLogClassification as aL, HTTPMethod as aM, DashboardBuilderService as aN, DashboardStoreService as aO, isManagePagesDeleteResult as aP, ManagePages as aQ, ManageBreadcrumb as aR, ManageFilterOnPage as aS, DynamicFiltersConfig as aT, ChartSettingsDrawer as aU, DisplaySettings as aV, DefaultControlUi as aW, PieControlUi as aX, BarControlUi as aY, StackBarControlUi as aZ, ManageItem as a_, loadImmediately as aa, DASHBOARD_ITEM_VISIBILITY as ab, BarChartHandler as ac, PieChartHandler as ad, StackBarChartHandler as ae, axisFormatters as af, groupDatesByYearAndMonth as ag, GaugeChartHandler as ah, TableViewHandler as ai, OverviewCardHandler as aj, TimelineHandler as ak, LineChartHandler as al, SnapshotHandler as am, ComparisonChartHandler as an, SplitterChartHandler as ao, LevelCardHandler as ap, MapChartHandler as aq, RingGaugeChartHandler as ar, SPlusChartHandler as as, PhaseGateStepperHandler as at, formatCurrency as au, getCurrencySuffix as av, formatPercentage as aw, formatNumber as ax, formatDate as ay, createAxisFormatter as az, resolveLegendColorOverride as b, findPreset as b$, ManageItemService as b0, GeneralSettings as b1, DataSourceSettings as b2, ActionsSettings as b3, ChartViewer as b4, StyleStudioDrawer as b5, StyleSettingsRenderer as b6, expandResetPatches as b7, StyleField as b8, SegmentedField as b9, toFormSourceLink as bA, normalizeOnLoad as bB, normalizeBeforeSave as bC, normalizeBeforeRequest as bD, CONFIG_DOMAINS as bE, domainsForCapability as bF, findDomain as bG, POPOVER_TABS as bH, POPOVER_TAB_SPECS as bI, titleToUi as bJ, applyTitleToPersisted as bK, datasourceToUi as bL, fieldsToUi as bM, filtersToUi as bN, styleToUi as bO, applyStyleToPersisted as bP, layoutToUi as bQ, applyLayoutToPersisted as bR, labelLegendFormatToUi as bS, applyLabelLegendFormatToPersisted as bT, behaviorToUi as bU, applyBehaviorToPersisted as bV, applyFilterChipsToPersisted as bW, persistedToUi as bX, buildAssembly as bY, STYLE_PRESETS as bZ, presetsForCapability as b_, ColorListField as ba, ArrayBuilderField as bb, KeyValueMapField as bc, LegendOrderField as bd, ItemCardMenuComponent as be, ChartFilterDrawer as bf, ItemContextToolbarComponent as bg, ItemConfigPopoverComponent as bh, GuidedConfigDialogComponent as bi, FilterChipsBarComponent as bj, FilterBuilderComponent as bk, DatasourcePanelComponent as bl, SchemaControlRendererComponent as bm, FilterByGroupPipe as bn, GetChartActionsPipe as bo, CHART_CAPABILITIES as bp, getCapabilityById as bq, resolveCapability as br, toBackendChartType as bs, normalizeChartTypeForRequest as bt, normalizeFilterOperation as bu, normalizeAggregateFunction as bv, normalizeFilters as bw, selectorFromLegacy as bx, moduleIdFromSelector as by, toBackendSourceLink as bz, CardContentComponent as c, validate as c0, hasBlockingIssues as c1, groupIssuesByDomain as c2, parseAdvancedJson as c3, deepMerge$1 as c4, formatForEditor as c5, CUSTOM_COLOR_OPTION as c6, readByPath$1 as c7, setByPath as c8, applyControlPatchToPersisted as c9, applyControlPatchesToPersisted as ca, getControlSchema as cb, listControlSchemaIds as cc, listControlSchemas as cd, getFallbackControlSchema as ce, flattenSchema as cf, resolveDisplayFields as cg, buildDisplayFieldPredicate as ch, bindingKey as ci, getBinding as cj, listBindings as ck, listBindingsForChart as cl, readBoundValue as cm, ITEM_GUIDANCE_REGISTRY as cn, describeGuidance as co, ItemGuidanceService as cp, dynamicReorder as d, DashboardItem as e, formatValue as f, getLegendOverrideOrder as g, hasDoubleClickAction as h, resolveDashboardDialogHeader as i, DashboardDialogHeader as j, cloneDeep$1 as k, DashboardBuilder as l, DashboardViewer as m, normalizePhaseGatePropertyIdentity as n, orderLegendItems as o, switchAllKeysSmall as p, getNestedData as q, resolvePhaseGateResponseKey as r, switchAllKeysToLower as s, dynamicTextReplace as t, generalConfiguration as u, getLocalizedTitle as v, sortChartData as w, addCommasToNumber as x, sortDataTableView as y, isMobilePlatform$1 as z };
|
|
53481
|
+
//# sourceMappingURL=masterteam-dashboard-builder-masterteam-dashboard-builder-CMWrKUhw.mjs.map
|