@masterteam/dashboard-builder 0.0.92 → 0.0.93
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +41 -15
- package/assets/dashboard-builder.css +1 -1
- package/assets/i18n/ar.json +1635 -1621
- package/assets/i18n/en.json +1357 -1343
- package/fesm2022/{masterteam-dashboard-builder-dashboard-dialog.component-OEtvg4Ep.mjs → masterteam-dashboard-builder-dashboard-dialog.component-BjZJhI06.mjs} +3 -3
- package/fesm2022/{masterteam-dashboard-builder-dashboard-dialog.component-OEtvg4Ep.mjs.map → masterteam-dashboard-builder-dashboard-dialog.component-BjZJhI06.mjs.map} +1 -1
- package/fesm2022/{masterteam-dashboard-builder-masterteam-dashboard-builder-CUB7GE24.mjs → masterteam-dashboard-builder-masterteam-dashboard-builder-CLvaME2w.mjs} +433 -270
- package/fesm2022/masterteam-dashboard-builder-masterteam-dashboard-builder-CLvaME2w.mjs.map +1 -0
- package/fesm2022/masterteam-dashboard-builder.mjs +1 -1
- package/package.json +3 -3
- package/types/masterteam-dashboard-builder.d.ts +42 -15
- package/fesm2022/masterteam-dashboard-builder-masterteam-dashboard-builder-CUB7GE24.mjs.map +0 -1
|
@@ -326,10 +326,14 @@ class DashboardBuilderService {
|
|
|
326
326
|
levelLogsCache = new Map();
|
|
327
327
|
/** Host-owned level-log resolver; preferred over the package's own request. */
|
|
328
328
|
levelLogsResolver = signal(null, ...(ngDevMode ? [{ debugName: "levelLogsResolver" }] : /* istanbul ignore next */ []));
|
|
329
|
-
/** HTTP context for gateway requests */
|
|
329
|
+
/** HTTP context for gateway-owned metadata requests. */
|
|
330
330
|
gatewayContext = new HttpContext().set(REQUEST_CONTEXT, {
|
|
331
331
|
useBaseUrl: true,
|
|
332
332
|
});
|
|
333
|
+
/** HTTP context for application-owned runtime requests. */
|
|
334
|
+
applicationContext = new HttpContext().set(REQUEST_CONTEXT, {
|
|
335
|
+
useBaseUrl: false,
|
|
336
|
+
});
|
|
333
337
|
constructor() {
|
|
334
338
|
this.loadConfig();
|
|
335
339
|
}
|
|
@@ -612,7 +616,7 @@ class DashboardBuilderService {
|
|
|
612
616
|
projection: 'Card',
|
|
613
617
|
display: { areas: ['card'] },
|
|
614
618
|
}, {
|
|
615
|
-
context: this.
|
|
619
|
+
context: this.applicationContext,
|
|
616
620
|
headers: new HttpHeaders({ noMessage: 'true' }),
|
|
617
621
|
})
|
|
618
622
|
.pipe(map((response) => (response.data?.records ?? []).map((record) => ({
|
|
@@ -2959,6 +2963,9 @@ const CHART_CAPABILITIES = [
|
|
|
2959
2963
|
name: 'Phase Gate Stepper',
|
|
2960
2964
|
icon: 'media.sliders-02',
|
|
2961
2965
|
category: 'special',
|
|
2966
|
+
// Unsupported for new dashboards; retain the capability and runtime path
|
|
2967
|
+
// for saved widgets without changing their persisted config.
|
|
2968
|
+
hideInList: true,
|
|
2962
2969
|
products: ['pplus'],
|
|
2963
2970
|
hasManageItem: true,
|
|
2964
2971
|
defaultSize: { cols: 18, rows: 3 },
|
|
@@ -6412,7 +6419,8 @@ const PADDING_OPTIONS = [
|
|
|
6412
6419
|
{ label: 'XL', value: 32 },
|
|
6413
6420
|
{ label: 'XXL', value: 48 },
|
|
6414
6421
|
];
|
|
6415
|
-
const CARD_CONTENT_ICON_VISIBLE = (_cfg, capability) => ['chart', 'table', 'entityPreview'].includes(capability?.renderer ?? '')
|
|
6422
|
+
const CARD_CONTENT_ICON_VISIBLE = (_cfg, capability) => ['chart', 'table', 'entityPreview'].includes(capability?.renderer ?? '') ||
|
|
6423
|
+
['entity-preview-levelCards', 'entity-preview-levelCards2'].includes(capability?.id ?? '');
|
|
6416
6424
|
const LABEL_POSITION_BAR_OPTIONS = [
|
|
6417
6425
|
{ label: 'Top', value: 'top' },
|
|
6418
6426
|
{ label: 'Inside', value: 'inside' },
|
|
@@ -8538,6 +8546,78 @@ const PROPERTY_CONFIG_FIELD = {
|
|
|
8538
8546
|
{ key: 'hidden', label: 'Hidden', type: 'boolean', path: 'hidden' },
|
|
8539
8547
|
],
|
|
8540
8548
|
};
|
|
8549
|
+
/**
|
|
8550
|
+
* Properties Card uses the same entity renderer as Customization. Its
|
|
8551
|
+
* per-property presentation options live alongside the existing positional
|
|
8552
|
+
* width/visibility entries so the query order remains the single index source.
|
|
8553
|
+
* The shared Entity Preview field stays smaller: that renderer does not read
|
|
8554
|
+
* these additional options.
|
|
8555
|
+
*/
|
|
8556
|
+
const CARD_PROPERTY_CONFIG_FIELD = {
|
|
8557
|
+
...PROPERTY_CONFIG_FIELD,
|
|
8558
|
+
label: 'Property appearance',
|
|
8559
|
+
description: 'Configure each selected property, as in Customization.',
|
|
8560
|
+
collapsibleRows: true,
|
|
8561
|
+
valueFields: [
|
|
8562
|
+
...(PROPERTY_CONFIG_FIELD.valueFields ?? []),
|
|
8563
|
+
{
|
|
8564
|
+
key: 'hideLabel',
|
|
8565
|
+
label: 'Hide name',
|
|
8566
|
+
type: 'boolean',
|
|
8567
|
+
path: 'hideLabel',
|
|
8568
|
+
},
|
|
8569
|
+
{
|
|
8570
|
+
key: 'labelPosition',
|
|
8571
|
+
label: 'Label position',
|
|
8572
|
+
type: 'select',
|
|
8573
|
+
path: 'labelPosition',
|
|
8574
|
+
default: 'top',
|
|
8575
|
+
options: [
|
|
8576
|
+
{ label: 'Above value', value: 'top' },
|
|
8577
|
+
{ label: 'Below value', value: 'bottom' },
|
|
8578
|
+
],
|
|
8579
|
+
},
|
|
8580
|
+
{ key: 'alignEnd', label: 'Align end', type: 'boolean', path: 'alignEnd' },
|
|
8581
|
+
{
|
|
8582
|
+
key: 'infoEn',
|
|
8583
|
+
label: 'Info · English',
|
|
8584
|
+
type: 'multilineText',
|
|
8585
|
+
path: 'infoEn',
|
|
8586
|
+
},
|
|
8587
|
+
{
|
|
8588
|
+
key: 'infoAr',
|
|
8589
|
+
label: 'Info · Arabic',
|
|
8590
|
+
type: 'multilineText',
|
|
8591
|
+
path: 'infoAr',
|
|
8592
|
+
},
|
|
8593
|
+
{
|
|
8594
|
+
key: 'showDisplayName',
|
|
8595
|
+
label: 'Show display name (User)',
|
|
8596
|
+
type: 'boolean',
|
|
8597
|
+
path: 'showDisplayName',
|
|
8598
|
+
default: true,
|
|
8599
|
+
},
|
|
8600
|
+
{
|
|
8601
|
+
key: 'showPhoneNumber',
|
|
8602
|
+
label: 'Show phone number (User)',
|
|
8603
|
+
type: 'boolean',
|
|
8604
|
+
path: 'showPhoneNumber',
|
|
8605
|
+
},
|
|
8606
|
+
{
|
|
8607
|
+
key: 'showEmail',
|
|
8608
|
+
label: 'Show email (User)',
|
|
8609
|
+
type: 'boolean',
|
|
8610
|
+
path: 'showEmail',
|
|
8611
|
+
},
|
|
8612
|
+
{
|
|
8613
|
+
key: 'showAvatar',
|
|
8614
|
+
label: 'Show avatar (User)',
|
|
8615
|
+
type: 'boolean',
|
|
8616
|
+
path: 'showAvatar',
|
|
8617
|
+
default: true,
|
|
8618
|
+
},
|
|
8619
|
+
],
|
|
8620
|
+
};
|
|
8541
8621
|
const PROPERTY_COLORS_FIELD = {
|
|
8542
8622
|
key: 'propertyColors',
|
|
8543
8623
|
label: 'Property colors (JSON)',
|
|
@@ -8598,7 +8678,7 @@ const PROPERTY_SETTINGS_SECTION = {
|
|
|
8598
8678
|
visibleWhen: (cfg) => !!cfg.clientConfig?.configAsType?.cardOrder?.propertyKey,
|
|
8599
8679
|
},
|
|
8600
8680
|
PROPERTY_LABELS_FIELD,
|
|
8601
|
-
|
|
8681
|
+
CARD_PROPERTY_CONFIG_FIELD,
|
|
8602
8682
|
PROPERTY_COLORS_FIELD,
|
|
8603
8683
|
],
|
|
8604
8684
|
};
|
|
@@ -23856,7 +23936,7 @@ class ActionService {
|
|
|
23856
23936
|
// "Dialog header"), not from the chart that opened it.
|
|
23857
23937
|
const header = resolveDashboardDialogHeader(dialogConfig);
|
|
23858
23938
|
// Dynamically import DashboardDialogComponent to avoid circular dependency
|
|
23859
|
-
import('./masterteam-dashboard-builder-dashboard-dialog.component-
|
|
23939
|
+
import('./masterteam-dashboard-builder-dashboard-dialog.component-BjZJhI06.mjs').then(({ DashboardDialogComponent }) => {
|
|
23860
23940
|
// Open dialog using ModalService
|
|
23861
23941
|
this.modalService.openModal(DashboardDialogComponent, 'dialog', {
|
|
23862
23942
|
header: header.title,
|
|
@@ -24365,128 +24445,128 @@ class CardFilterComponent {
|
|
|
24365
24445
|
}
|
|
24366
24446
|
}
|
|
24367
24447
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CardFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
24368
|
-
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: `
|
|
24369
|
-
<div class="card-filter" *transloco="let t; prefix: 'dashboard'">
|
|
24370
|
-
@switch (filterType()) {
|
|
24371
|
-
@case ('select') {
|
|
24372
|
-
<select
|
|
24373
|
-
class="filter-select"
|
|
24374
|
-
[(ngModel)]="selectedValue"
|
|
24375
|
-
(ngModelChange)="onFilterChange($event)"
|
|
24376
|
-
>
|
|
24377
|
-
@if (placeholder()) {
|
|
24378
|
-
<option [value]="null" disabled>{{ placeholder() }}</option>
|
|
24379
|
-
}
|
|
24380
|
-
@for (option of options(); track option.key) {
|
|
24381
|
-
<option [value]="option.value">
|
|
24382
|
-
{{
|
|
24383
|
-
option.label[langCode()] || option.label['en'] || option.key
|
|
24384
|
-
}}
|
|
24385
|
-
</option>
|
|
24386
|
-
}
|
|
24387
|
-
</select>
|
|
24388
|
-
}
|
|
24389
|
-
@case ('multiSelect') {
|
|
24390
|
-
<div class="multi-select-container">
|
|
24391
|
-
<!-- Simplified multi-select -->
|
|
24392
|
-
<select
|
|
24393
|
-
class="filter-select"
|
|
24394
|
-
multiple
|
|
24395
|
-
[(ngModel)]="selectedValues"
|
|
24396
|
-
(ngModelChange)="onMultiFilterChange($event)"
|
|
24397
|
-
>
|
|
24398
|
-
@for (option of options(); track option.key) {
|
|
24399
|
-
<option [value]="option.value">
|
|
24400
|
-
{{
|
|
24401
|
-
option.label[langCode()] || option.label['en'] || option.key
|
|
24402
|
-
}}
|
|
24403
|
-
</option>
|
|
24404
|
-
}
|
|
24405
|
-
</select>
|
|
24406
|
-
</div>
|
|
24407
|
-
}
|
|
24408
|
-
@case ('dateRange') {
|
|
24409
|
-
<div class="date-range-container">
|
|
24410
|
-
<input
|
|
24411
|
-
type="date"
|
|
24412
|
-
class="filter-date"
|
|
24413
|
-
[(ngModel)]="startDate"
|
|
24414
|
-
(ngModelChange)="onDateChange()"
|
|
24415
|
-
/>
|
|
24416
|
-
<span class="date-separator">-</span>
|
|
24417
|
-
<input
|
|
24418
|
-
type="date"
|
|
24419
|
-
class="filter-date"
|
|
24420
|
-
[(ngModel)]="endDate"
|
|
24421
|
-
(ngModelChange)="onDateChange()"
|
|
24422
|
-
/>
|
|
24423
|
-
</div>
|
|
24424
|
-
}
|
|
24425
|
-
}
|
|
24426
|
-
</div>
|
|
24448
|
+
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: `
|
|
24449
|
+
<div class="card-filter" *transloco="let t; prefix: 'dashboard'">
|
|
24450
|
+
@switch (filterType()) {
|
|
24451
|
+
@case ('select') {
|
|
24452
|
+
<select
|
|
24453
|
+
class="filter-select"
|
|
24454
|
+
[(ngModel)]="selectedValue"
|
|
24455
|
+
(ngModelChange)="onFilterChange($event)"
|
|
24456
|
+
>
|
|
24457
|
+
@if (placeholder()) {
|
|
24458
|
+
<option [value]="null" disabled>{{ placeholder() }}</option>
|
|
24459
|
+
}
|
|
24460
|
+
@for (option of options(); track option.key) {
|
|
24461
|
+
<option [value]="option.value">
|
|
24462
|
+
{{
|
|
24463
|
+
option.label[langCode()] || option.label['en'] || option.key
|
|
24464
|
+
}}
|
|
24465
|
+
</option>
|
|
24466
|
+
}
|
|
24467
|
+
</select>
|
|
24468
|
+
}
|
|
24469
|
+
@case ('multiSelect') {
|
|
24470
|
+
<div class="multi-select-container">
|
|
24471
|
+
<!-- Simplified multi-select -->
|
|
24472
|
+
<select
|
|
24473
|
+
class="filter-select"
|
|
24474
|
+
multiple
|
|
24475
|
+
[(ngModel)]="selectedValues"
|
|
24476
|
+
(ngModelChange)="onMultiFilterChange($event)"
|
|
24477
|
+
>
|
|
24478
|
+
@for (option of options(); track option.key) {
|
|
24479
|
+
<option [value]="option.value">
|
|
24480
|
+
{{
|
|
24481
|
+
option.label[langCode()] || option.label['en'] || option.key
|
|
24482
|
+
}}
|
|
24483
|
+
</option>
|
|
24484
|
+
}
|
|
24485
|
+
</select>
|
|
24486
|
+
</div>
|
|
24487
|
+
}
|
|
24488
|
+
@case ('dateRange') {
|
|
24489
|
+
<div class="date-range-container">
|
|
24490
|
+
<input
|
|
24491
|
+
type="date"
|
|
24492
|
+
class="filter-date"
|
|
24493
|
+
[(ngModel)]="startDate"
|
|
24494
|
+
(ngModelChange)="onDateChange()"
|
|
24495
|
+
/>
|
|
24496
|
+
<span class="date-separator">-</span>
|
|
24497
|
+
<input
|
|
24498
|
+
type="date"
|
|
24499
|
+
class="filter-date"
|
|
24500
|
+
[(ngModel)]="endDate"
|
|
24501
|
+
(ngModelChange)="onDateChange()"
|
|
24502
|
+
/>
|
|
24503
|
+
</div>
|
|
24504
|
+
}
|
|
24505
|
+
}
|
|
24506
|
+
</div>
|
|
24427
24507
|
`, 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 });
|
|
24428
24508
|
}
|
|
24429
24509
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CardFilterComponent, decorators: [{
|
|
24430
24510
|
type: Component,
|
|
24431
|
-
args: [{ selector: 'mt-card-filter', standalone: true, imports: [CommonModule, FormsModule, TranslocoDirective], template: `
|
|
24432
|
-
<div class="card-filter" *transloco="let t; prefix: 'dashboard'">
|
|
24433
|
-
@switch (filterType()) {
|
|
24434
|
-
@case ('select') {
|
|
24435
|
-
<select
|
|
24436
|
-
class="filter-select"
|
|
24437
|
-
[(ngModel)]="selectedValue"
|
|
24438
|
-
(ngModelChange)="onFilterChange($event)"
|
|
24439
|
-
>
|
|
24440
|
-
@if (placeholder()) {
|
|
24441
|
-
<option [value]="null" disabled>{{ placeholder() }}</option>
|
|
24442
|
-
}
|
|
24443
|
-
@for (option of options(); track option.key) {
|
|
24444
|
-
<option [value]="option.value">
|
|
24445
|
-
{{
|
|
24446
|
-
option.label[langCode()] || option.label['en'] || option.key
|
|
24447
|
-
}}
|
|
24448
|
-
</option>
|
|
24449
|
-
}
|
|
24450
|
-
</select>
|
|
24451
|
-
}
|
|
24452
|
-
@case ('multiSelect') {
|
|
24453
|
-
<div class="multi-select-container">
|
|
24454
|
-
<!-- Simplified multi-select -->
|
|
24455
|
-
<select
|
|
24456
|
-
class="filter-select"
|
|
24457
|
-
multiple
|
|
24458
|
-
[(ngModel)]="selectedValues"
|
|
24459
|
-
(ngModelChange)="onMultiFilterChange($event)"
|
|
24460
|
-
>
|
|
24461
|
-
@for (option of options(); track option.key) {
|
|
24462
|
-
<option [value]="option.value">
|
|
24463
|
-
{{
|
|
24464
|
-
option.label[langCode()] || option.label['en'] || option.key
|
|
24465
|
-
}}
|
|
24466
|
-
</option>
|
|
24467
|
-
}
|
|
24468
|
-
</select>
|
|
24469
|
-
</div>
|
|
24470
|
-
}
|
|
24471
|
-
@case ('dateRange') {
|
|
24472
|
-
<div class="date-range-container">
|
|
24473
|
-
<input
|
|
24474
|
-
type="date"
|
|
24475
|
-
class="filter-date"
|
|
24476
|
-
[(ngModel)]="startDate"
|
|
24477
|
-
(ngModelChange)="onDateChange()"
|
|
24478
|
-
/>
|
|
24479
|
-
<span class="date-separator">-</span>
|
|
24480
|
-
<input
|
|
24481
|
-
type="date"
|
|
24482
|
-
class="filter-date"
|
|
24483
|
-
[(ngModel)]="endDate"
|
|
24484
|
-
(ngModelChange)="onDateChange()"
|
|
24485
|
-
/>
|
|
24486
|
-
</div>
|
|
24487
|
-
}
|
|
24488
|
-
}
|
|
24489
|
-
</div>
|
|
24511
|
+
args: [{ selector: 'mt-card-filter', standalone: true, imports: [CommonModule, FormsModule, TranslocoDirective], template: `
|
|
24512
|
+
<div class="card-filter" *transloco="let t; prefix: 'dashboard'">
|
|
24513
|
+
@switch (filterType()) {
|
|
24514
|
+
@case ('select') {
|
|
24515
|
+
<select
|
|
24516
|
+
class="filter-select"
|
|
24517
|
+
[(ngModel)]="selectedValue"
|
|
24518
|
+
(ngModelChange)="onFilterChange($event)"
|
|
24519
|
+
>
|
|
24520
|
+
@if (placeholder()) {
|
|
24521
|
+
<option [value]="null" disabled>{{ placeholder() }}</option>
|
|
24522
|
+
}
|
|
24523
|
+
@for (option of options(); track option.key) {
|
|
24524
|
+
<option [value]="option.value">
|
|
24525
|
+
{{
|
|
24526
|
+
option.label[langCode()] || option.label['en'] || option.key
|
|
24527
|
+
}}
|
|
24528
|
+
</option>
|
|
24529
|
+
}
|
|
24530
|
+
</select>
|
|
24531
|
+
}
|
|
24532
|
+
@case ('multiSelect') {
|
|
24533
|
+
<div class="multi-select-container">
|
|
24534
|
+
<!-- Simplified multi-select -->
|
|
24535
|
+
<select
|
|
24536
|
+
class="filter-select"
|
|
24537
|
+
multiple
|
|
24538
|
+
[(ngModel)]="selectedValues"
|
|
24539
|
+
(ngModelChange)="onMultiFilterChange($event)"
|
|
24540
|
+
>
|
|
24541
|
+
@for (option of options(); track option.key) {
|
|
24542
|
+
<option [value]="option.value">
|
|
24543
|
+
{{
|
|
24544
|
+
option.label[langCode()] || option.label['en'] || option.key
|
|
24545
|
+
}}
|
|
24546
|
+
</option>
|
|
24547
|
+
}
|
|
24548
|
+
</select>
|
|
24549
|
+
</div>
|
|
24550
|
+
}
|
|
24551
|
+
@case ('dateRange') {
|
|
24552
|
+
<div class="date-range-container">
|
|
24553
|
+
<input
|
|
24554
|
+
type="date"
|
|
24555
|
+
class="filter-date"
|
|
24556
|
+
[(ngModel)]="startDate"
|
|
24557
|
+
(ngModelChange)="onDateChange()"
|
|
24558
|
+
/>
|
|
24559
|
+
<span class="date-separator">-</span>
|
|
24560
|
+
<input
|
|
24561
|
+
type="date"
|
|
24562
|
+
class="filter-date"
|
|
24563
|
+
[(ngModel)]="endDate"
|
|
24564
|
+
(ngModelChange)="onDateChange()"
|
|
24565
|
+
/>
|
|
24566
|
+
</div>
|
|
24567
|
+
}
|
|
24568
|
+
}
|
|
24569
|
+
</div>
|
|
24490
24570
|
`, 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"] }]
|
|
24491
24571
|
}], 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"] }] } });
|
|
24492
24572
|
|
|
@@ -26210,30 +26290,30 @@ class CardInfoComponent {
|
|
|
26210
26290
|
return typeof info.value === 'string' ? info.value : '';
|
|
26211
26291
|
}, ...(ngDevMode ? [{ debugName: "tooltipContent" }] : /* istanbul ignore next */ []));
|
|
26212
26292
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CardInfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
26213
|
-
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: `
|
|
26214
|
-
@if (showInfo()) {
|
|
26215
|
-
<span
|
|
26216
|
-
class="card-info-icon"
|
|
26217
|
-
[mtTooltip]="tooltipContent()"
|
|
26218
|
-
tooltipPosition="bottom"
|
|
26219
|
-
>
|
|
26220
|
-
<i class="pi pi-info-circle"></i>
|
|
26221
|
-
</span>
|
|
26222
|
-
}
|
|
26293
|
+
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: `
|
|
26294
|
+
@if (showInfo()) {
|
|
26295
|
+
<span
|
|
26296
|
+
class="card-info-icon"
|
|
26297
|
+
[mtTooltip]="tooltipContent()"
|
|
26298
|
+
tooltipPosition="bottom"
|
|
26299
|
+
>
|
|
26300
|
+
<i class="pi pi-info-circle"></i>
|
|
26301
|
+
</span>
|
|
26302
|
+
}
|
|
26223
26303
|
`, 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 });
|
|
26224
26304
|
}
|
|
26225
26305
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CardInfoComponent, decorators: [{
|
|
26226
26306
|
type: Component,
|
|
26227
|
-
args: [{ selector: 'mt-card-info', standalone: true, imports: [CommonModule, Tooltip$1], template: `
|
|
26228
|
-
@if (showInfo()) {
|
|
26229
|
-
<span
|
|
26230
|
-
class="card-info-icon"
|
|
26231
|
-
[mtTooltip]="tooltipContent()"
|
|
26232
|
-
tooltipPosition="bottom"
|
|
26233
|
-
>
|
|
26234
|
-
<i class="pi pi-info-circle"></i>
|
|
26235
|
-
</span>
|
|
26236
|
-
}
|
|
26307
|
+
args: [{ selector: 'mt-card-info', standalone: true, imports: [CommonModule, Tooltip$1], template: `
|
|
26308
|
+
@if (showInfo()) {
|
|
26309
|
+
<span
|
|
26310
|
+
class="card-info-icon"
|
|
26311
|
+
[mtTooltip]="tooltipContent()"
|
|
26312
|
+
tooltipPosition="bottom"
|
|
26313
|
+
>
|
|
26314
|
+
<i class="pi pi-info-circle"></i>
|
|
26315
|
+
</span>
|
|
26316
|
+
}
|
|
26237
26317
|
`, 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"] }]
|
|
26238
26318
|
}], propDecorators: { cardInfo: [{ type: i0.Input, args: [{ isSignal: true, alias: "cardInfo", required: false }] }] } });
|
|
26239
26319
|
|
|
@@ -27815,11 +27895,11 @@ class MapViewComponent {
|
|
|
27815
27895
|
});
|
|
27816
27896
|
}
|
|
27817
27897
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: MapViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
27818
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: MapViewComponent, isStandalone: true, selector: "mt-map-view", inputs: { groups: { classPropertyName: "groups", publicName: "groups", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, showLegend: { classPropertyName: "showLegend", publicName: "showLegend", isSignal: true, isRequired: false, transformFunction: null }, legendPosition: { classPropertyName: "legendPosition", publicName: "legendPosition", isSignal: true, isRequired: false, transformFunction: null }, legendIcon: { classPropertyName: "legendIcon", publicName: "legendIcon", isSignal: true, isRequired: false, transformFunction: null }, dashboardId: { classPropertyName: "dashboardId", publicName: "dashboardId", isSignal: true, isRequired: false, transformFunction: null }, configurationItem: { classPropertyName: "configurationItem", publicName: "configurationItem", isSignal: true, isRequired: false, transformFunction: null }, inGroup: { classPropertyName: "inGroup", publicName: "inGroup", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pointClick: "pointClick" }, host: { classAttribute: "mt-map-view" }, ngImport: i0, template: "<div\n class=\"mt-map-view__surface\"\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\n>\n @if (option(); as chartOption) {\n <mt-echart\n [dashboardId]=\"dashboardId()\"\n [chartConfig]=\"chartOption\"\n [configurationItem]=\"configurationItem()\"\n [inGroup]=\"inGroup()\"\n (chartClick)=\"onChartClick($event)\"\n />\n <!--\n ODbL requires the boundary data to be credited wherever it is shown.\n Everything is drawn from the bundled GeoJSON, so nothing is requested at\n runtime and no record data leaves the browser.\n -->\n <div class=\"mt-map-view__attribution\">{{ attribution }}</div>\n } @else if (!hasPoints()) {\n <div class=\"mt-map-view__empty\">\n <span>{{ t(\"map.noLocations\") }}</span>\n </div>\n } @else {\n <div class=\"mt-map-view__loading\" role=\"status\">\n <div class=\"mt-map-view__spinner\" aria-hidden=\"true\"></div>\n <span class=\"mt-map-view__sr\">{{ t(\"map.loadingBoundaries\") }}</span>\n </div>\n }\n</div>\n", styles: [":host{display:block;width:100%;height:100%;min-height:0}.mt-map-view__surface{position:relative;width:100%;height:100%;min-height:0}.mt-map-view__attribution{position:absolute;inset-block-end:0;inset-inline-end:0;padding:0 .25rem;color:var(--p-text-muted-color, #64748b);font-size:.625rem;line-height:1rem;pointer-events:none}.mt-map-view__empty,.mt-map-view__loading{position:absolute;inset:0;display:flex;align-items:center;justify-content:center}.mt-map-view__empty span{padding:.25rem .625rem;border:1px solid var(--p-surface-200, #e5e7eb);border-radius:.375rem;background:var(--p-surface-0, #ffffff);color:var(--p-text-muted-color, #64748b);font-size:.75rem}.mt-map-view__spinner{width:1.5rem;height:1.5rem;border:2px solid var(--p-surface-200, #e5e7eb);border-top-color:var(--p-primary-500, #2563eb);border-radius:999px;animation:mt-map-view-spin .8s linear infinite}@keyframes mt-map-view-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.mt-map-view__spinner{animation:none}}.mt-map-view__sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}\n"], dependencies: [{ kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: EChartComponent, selector: "mt-echart", inputs: ["dashboardId", "chartConfig", "configurationItem", "height", "inGroup", "headerHidden"], outputs: ["chartClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
27898
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: MapViewComponent, isStandalone: true, selector: "mt-map-view", inputs: { groups: { classPropertyName: "groups", publicName: "groups", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, showLegend: { classPropertyName: "showLegend", publicName: "showLegend", isSignal: true, isRequired: false, transformFunction: null }, legendPosition: { classPropertyName: "legendPosition", publicName: "legendPosition", isSignal: true, isRequired: false, transformFunction: null }, legendIcon: { classPropertyName: "legendIcon", publicName: "legendIcon", isSignal: true, isRequired: false, transformFunction: null }, dashboardId: { classPropertyName: "dashboardId", publicName: "dashboardId", isSignal: true, isRequired: false, transformFunction: null }, configurationItem: { classPropertyName: "configurationItem", publicName: "configurationItem", isSignal: true, isRequired: false, transformFunction: null }, inGroup: { classPropertyName: "inGroup", publicName: "inGroup", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pointClick: "pointClick" }, host: { classAttribute: "mt-map-view" }, ngImport: i0, template: "<div\r\n class=\"mt-map-view__surface\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n>\r\n @if (option(); as chartOption) {\r\n <mt-echart\r\n [dashboardId]=\"dashboardId()\"\r\n [chartConfig]=\"chartOption\"\r\n [configurationItem]=\"configurationItem()\"\r\n [inGroup]=\"inGroup()\"\r\n (chartClick)=\"onChartClick($event)\"\r\n />\r\n <!--\r\n ODbL requires the boundary data to be credited wherever it is shown.\r\n Everything is drawn from the bundled GeoJSON, so nothing is requested at\r\n runtime and no record data leaves the browser.\r\n -->\r\n <div class=\"mt-map-view__attribution\">{{ attribution }}</div>\r\n } @else if (!hasPoints()) {\r\n <div class=\"mt-map-view__empty\">\r\n <span>{{ t(\"map.noLocations\") }}</span>\r\n </div>\r\n } @else {\r\n <div class=\"mt-map-view__loading\" role=\"status\">\r\n <div class=\"mt-map-view__spinner\" aria-hidden=\"true\"></div>\r\n <span class=\"mt-map-view__sr\">{{ t(\"map.loadingBoundaries\") }}</span>\r\n </div>\r\n }\r\n</div>\r\n", styles: [":host{display:block;width:100%;height:100%;min-height:0}.mt-map-view__surface{position:relative;width:100%;height:100%;min-height:0}.mt-map-view__attribution{position:absolute;inset-block-end:0;inset-inline-end:0;padding:0 .25rem;color:var(--p-text-muted-color, #64748b);font-size:.625rem;line-height:1rem;pointer-events:none}.mt-map-view__empty,.mt-map-view__loading{position:absolute;inset:0;display:flex;align-items:center;justify-content:center}.mt-map-view__empty span{padding:.25rem .625rem;border:1px solid var(--p-surface-200, #e5e7eb);border-radius:.375rem;background:var(--p-surface-0, #ffffff);color:var(--p-text-muted-color, #64748b);font-size:.75rem}.mt-map-view__spinner{width:1.5rem;height:1.5rem;border:2px solid var(--p-surface-200, #e5e7eb);border-top-color:var(--p-primary-500, #2563eb);border-radius:999px;animation:mt-map-view-spin .8s linear infinite}@keyframes mt-map-view-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.mt-map-view__spinner{animation:none}}.mt-map-view__sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}\n"], dependencies: [{ kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: EChartComponent, selector: "mt-echart", inputs: ["dashboardId", "chartConfig", "configurationItem", "height", "inGroup", "headerHidden"], outputs: ["chartClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
27819
27899
|
}
|
|
27820
27900
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: MapViewComponent, decorators: [{
|
|
27821
27901
|
type: Component,
|
|
27822
|
-
args: [{ selector: 'mt-map-view', standalone: true, imports: [TranslocoDirective, EChartComponent], changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'mt-map-view' }, template: "<div\n class=\"mt-map-view__surface\"\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\n>\n @if (option(); as chartOption) {\n <mt-echart\n [dashboardId]=\"dashboardId()\"\n [chartConfig]=\"chartOption\"\n [configurationItem]=\"configurationItem()\"\n [inGroup]=\"inGroup()\"\n (chartClick)=\"onChartClick($event)\"\n />\n <!--\n ODbL requires the boundary data to be credited wherever it is shown.\n Everything is drawn from the bundled GeoJSON, so nothing is requested at\n runtime and no record data leaves the browser.\n -->\n <div class=\"mt-map-view__attribution\">{{ attribution }}</div>\n } @else if (!hasPoints()) {\n <div class=\"mt-map-view__empty\">\n <span>{{ t(\"map.noLocations\") }}</span>\n </div>\n } @else {\n <div class=\"mt-map-view__loading\" role=\"status\">\n <div class=\"mt-map-view__spinner\" aria-hidden=\"true\"></div>\n <span class=\"mt-map-view__sr\">{{ t(\"map.loadingBoundaries\") }}</span>\n </div>\n }\n</div>\n", styles: [":host{display:block;width:100%;height:100%;min-height:0}.mt-map-view__surface{position:relative;width:100%;height:100%;min-height:0}.mt-map-view__attribution{position:absolute;inset-block-end:0;inset-inline-end:0;padding:0 .25rem;color:var(--p-text-muted-color, #64748b);font-size:.625rem;line-height:1rem;pointer-events:none}.mt-map-view__empty,.mt-map-view__loading{position:absolute;inset:0;display:flex;align-items:center;justify-content:center}.mt-map-view__empty span{padding:.25rem .625rem;border:1px solid var(--p-surface-200, #e5e7eb);border-radius:.375rem;background:var(--p-surface-0, #ffffff);color:var(--p-text-muted-color, #64748b);font-size:.75rem}.mt-map-view__spinner{width:1.5rem;height:1.5rem;border:2px solid var(--p-surface-200, #e5e7eb);border-top-color:var(--p-primary-500, #2563eb);border-radius:999px;animation:mt-map-view-spin .8s linear infinite}@keyframes mt-map-view-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.mt-map-view__spinner{animation:none}}.mt-map-view__sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}\n"] }]
|
|
27902
|
+
args: [{ selector: 'mt-map-view', standalone: true, imports: [TranslocoDirective, EChartComponent], changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'mt-map-view' }, template: "<div\r\n class=\"mt-map-view__surface\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n>\r\n @if (option(); as chartOption) {\r\n <mt-echart\r\n [dashboardId]=\"dashboardId()\"\r\n [chartConfig]=\"chartOption\"\r\n [configurationItem]=\"configurationItem()\"\r\n [inGroup]=\"inGroup()\"\r\n (chartClick)=\"onChartClick($event)\"\r\n />\r\n <!--\r\n ODbL requires the boundary data to be credited wherever it is shown.\r\n Everything is drawn from the bundled GeoJSON, so nothing is requested at\r\n runtime and no record data leaves the browser.\r\n -->\r\n <div class=\"mt-map-view__attribution\">{{ attribution }}</div>\r\n } @else if (!hasPoints()) {\r\n <div class=\"mt-map-view__empty\">\r\n <span>{{ t(\"map.noLocations\") }}</span>\r\n </div>\r\n } @else {\r\n <div class=\"mt-map-view__loading\" role=\"status\">\r\n <div class=\"mt-map-view__spinner\" aria-hidden=\"true\"></div>\r\n <span class=\"mt-map-view__sr\">{{ t(\"map.loadingBoundaries\") }}</span>\r\n </div>\r\n }\r\n</div>\r\n", styles: [":host{display:block;width:100%;height:100%;min-height:0}.mt-map-view__surface{position:relative;width:100%;height:100%;min-height:0}.mt-map-view__attribution{position:absolute;inset-block-end:0;inset-inline-end:0;padding:0 .25rem;color:var(--p-text-muted-color, #64748b);font-size:.625rem;line-height:1rem;pointer-events:none}.mt-map-view__empty,.mt-map-view__loading{position:absolute;inset:0;display:flex;align-items:center;justify-content:center}.mt-map-view__empty span{padding:.25rem .625rem;border:1px solid var(--p-surface-200, #e5e7eb);border-radius:.375rem;background:var(--p-surface-0, #ffffff);color:var(--p-text-muted-color, #64748b);font-size:.75rem}.mt-map-view__spinner{width:1.5rem;height:1.5rem;border:2px solid var(--p-surface-200, #e5e7eb);border-top-color:var(--p-primary-500, #2563eb);border-radius:999px;animation:mt-map-view-spin .8s linear infinite}@keyframes mt-map-view-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.mt-map-view__spinner{animation:none}}.mt-map-view__sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}\n"] }]
|
|
27823
27903
|
}], ctorParameters: () => [], propDecorators: { groups: [{ type: i0.Input, args: [{ isSignal: true, alias: "groups", required: false }] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], showLegend: [{ type: i0.Input, args: [{ isSignal: true, alias: "showLegend", required: false }] }], legendPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "legendPosition", required: false }] }], legendIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "legendIcon", required: false }] }], dashboardId: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardId", required: false }] }], configurationItem: [{ type: i0.Input, args: [{ isSignal: true, alias: "configurationItem", required: false }] }], inGroup: [{ type: i0.Input, args: [{ isSignal: true, alias: "inGroup", required: false }] }], pointClick: [{ type: i0.Output, args: ["pointClick"] }] } });
|
|
27824
27904
|
|
|
27825
27905
|
/**
|
|
@@ -30855,11 +30935,11 @@ class ListStatisticCardComponent {
|
|
|
30855
30935
|
this.onAction.emit({ type, data: body });
|
|
30856
30936
|
}
|
|
30857
30937
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ListStatisticCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
30858
|
-
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\">\
|
|
30938
|
+
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 });
|
|
30859
30939
|
}
|
|
30860
30940
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ListStatisticCardComponent, decorators: [{
|
|
30861
30941
|
type: Component,
|
|
30862
|
-
args: [{ selector: 'mt-list-statistic-card', standalone: true, imports: [CommonModule, StatisticCardComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"flex h-full w-full justify-between\">\
|
|
30942
|
+
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" }]
|
|
30863
30943
|
}], propDecorators: { dashboardId: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardId", required: true }] }], onAction: [{ type: i0.Output, args: ["onAction"] }] } });
|
|
30864
30944
|
|
|
30865
30945
|
/**
|
|
@@ -31251,34 +31331,34 @@ class SkeletonCardComponent {
|
|
|
31251
31331
|
}
|
|
31252
31332
|
}
|
|
31253
31333
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SkeletonCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
31254
|
-
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: `
|
|
31255
|
-
<div class="skeleton-container">
|
|
31256
|
-
@for (skeleton of skeletons(); track $index) {
|
|
31257
|
-
<div
|
|
31258
|
-
class="skeleton-item"
|
|
31259
|
-
[style.width]="skeleton.width"
|
|
31260
|
-
[style.height]="skeleton.height"
|
|
31261
|
-
>
|
|
31262
|
-
<div class="skeleton-animation"></div>
|
|
31263
|
-
</div>
|
|
31264
|
-
}
|
|
31265
|
-
</div>
|
|
31334
|
+
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: `
|
|
31335
|
+
<div class="skeleton-container">
|
|
31336
|
+
@for (skeleton of skeletons(); track $index) {
|
|
31337
|
+
<div
|
|
31338
|
+
class="skeleton-item"
|
|
31339
|
+
[style.width]="skeleton.width"
|
|
31340
|
+
[style.height]="skeleton.height"
|
|
31341
|
+
>
|
|
31342
|
+
<div class="skeleton-animation"></div>
|
|
31343
|
+
</div>
|
|
31344
|
+
}
|
|
31345
|
+
</div>
|
|
31266
31346
|
`, 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 });
|
|
31267
31347
|
}
|
|
31268
31348
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SkeletonCardComponent, decorators: [{
|
|
31269
31349
|
type: Component,
|
|
31270
|
-
args: [{ selector: 'mt-skeleton-card', standalone: true, imports: [CommonModule], template: `
|
|
31271
|
-
<div class="skeleton-container">
|
|
31272
|
-
@for (skeleton of skeletons(); track $index) {
|
|
31273
|
-
<div
|
|
31274
|
-
class="skeleton-item"
|
|
31275
|
-
[style.width]="skeleton.width"
|
|
31276
|
-
[style.height]="skeleton.height"
|
|
31277
|
-
>
|
|
31278
|
-
<div class="skeleton-animation"></div>
|
|
31279
|
-
</div>
|
|
31280
|
-
}
|
|
31281
|
-
</div>
|
|
31350
|
+
args: [{ selector: 'mt-skeleton-card', standalone: true, imports: [CommonModule], template: `
|
|
31351
|
+
<div class="skeleton-container">
|
|
31352
|
+
@for (skeleton of skeletons(); track $index) {
|
|
31353
|
+
<div
|
|
31354
|
+
class="skeleton-item"
|
|
31355
|
+
[style.width]="skeleton.width"
|
|
31356
|
+
[style.height]="skeleton.height"
|
|
31357
|
+
>
|
|
31358
|
+
<div class="skeleton-animation"></div>
|
|
31359
|
+
</div>
|
|
31360
|
+
}
|
|
31361
|
+
</div>
|
|
31282
31362
|
`, 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"] }]
|
|
31283
31363
|
}], propDecorators: { dashboardId: [{ type: i0.Input, args: [{ isSignal: true, alias: "dashboardId", required: true }] }] } });
|
|
31284
31364
|
|
|
@@ -31417,9 +31497,48 @@ function normalizeDashboardCardEntityValue(value, rawValue, viewType) {
|
|
|
31417
31497
|
}
|
|
31418
31498
|
return { value: '-', rawValue: undefined };
|
|
31419
31499
|
}
|
|
31500
|
+
/** Apply only authored overrides; absent fields retain the entity's defaults. */
|
|
31501
|
+
function mergePropertyAppearance(base, appearance, viewType) {
|
|
31502
|
+
return {
|
|
31503
|
+
...base,
|
|
31504
|
+
...(appearance.hideLabel !== undefined
|
|
31505
|
+
? { hideLabel: appearance.hideLabel }
|
|
31506
|
+
: {}),
|
|
31507
|
+
...(appearance.labelPosition
|
|
31508
|
+
? { labelPosition: appearance.labelPosition }
|
|
31509
|
+
: {}),
|
|
31510
|
+
...(appearance.alignEnd !== undefined
|
|
31511
|
+
? { alignEnd: appearance.alignEnd }
|
|
31512
|
+
: {}),
|
|
31513
|
+
...(appearance.infoEn || appearance.infoAr
|
|
31514
|
+
? {
|
|
31515
|
+
info: {
|
|
31516
|
+
en: appearance.infoEn ?? '',
|
|
31517
|
+
ar: appearance.infoAr ?? '',
|
|
31518
|
+
},
|
|
31519
|
+
}
|
|
31520
|
+
: {}),
|
|
31521
|
+
...(viewType === 'User'
|
|
31522
|
+
? {
|
|
31523
|
+
...(appearance.showDisplayName !== undefined
|
|
31524
|
+
? { showDisplayName: appearance.showDisplayName }
|
|
31525
|
+
: {}),
|
|
31526
|
+
...(appearance.showPhoneNumber !== undefined
|
|
31527
|
+
? { showPhoneNumber: appearance.showPhoneNumber }
|
|
31528
|
+
: {}),
|
|
31529
|
+
...(appearance.showEmail !== undefined
|
|
31530
|
+
? { showEmail: appearance.showEmail }
|
|
31531
|
+
: {}),
|
|
31532
|
+
...(appearance.showAvatar !== undefined
|
|
31533
|
+
? { showAvatar: appearance.showAvatar }
|
|
31534
|
+
: {}),
|
|
31535
|
+
}
|
|
31536
|
+
: {}),
|
|
31537
|
+
};
|
|
31538
|
+
}
|
|
31420
31539
|
class PropertiesCardComponent {
|
|
31421
31540
|
storeService = inject(DashboardItemStoreService);
|
|
31422
|
-
|
|
31541
|
+
dashboardStore = inject(DashboardStoreService);
|
|
31423
31542
|
subscription = new Subscription();
|
|
31424
31543
|
dashboardId = input.required(...(ngDevMode ? [{ debugName: "dashboardId" }] : /* istanbul ignore next */ []));
|
|
31425
31544
|
inGroup = input(false, ...(ngDevMode ? [{ debugName: "inGroup" }] : /* istanbul ignore next */ []));
|
|
@@ -31427,7 +31546,12 @@ class PropertiesCardComponent {
|
|
|
31427
31546
|
configurationItem = signal(null, ...(ngDevMode ? [{ debugName: "configurationItem" }] : /* istanbul ignore next */ []));
|
|
31428
31547
|
cardData = signal([], ...(ngDevMode ? [{ debugName: "cardData" }] : /* istanbul ignore next */ []));
|
|
31429
31548
|
tabSelected = signal(0, ...(ngDevMode ? [{ debugName: "tabSelected" }] : /* istanbul ignore next */ []));
|
|
31430
|
-
langCode = computed(() => this.
|
|
31549
|
+
langCode = computed(() => this.dashboardStore.languageCode() || 'en', ...(ngDevMode ? [{ debugName: "langCode" }] : /* istanbul ignore next */ []));
|
|
31550
|
+
title = computed(() => {
|
|
31551
|
+
const titles = this.configurationItem()?.clientConfig?.title;
|
|
31552
|
+
const lang = this.langCode();
|
|
31553
|
+
return titles?.[lang] || titles?.['en'] || titles?.['ar'] || '';
|
|
31554
|
+
}, ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
31431
31555
|
galleryMode = computed(() => !!this.configurationItem()?.clientConfig?.configAsType?.['galleryMode'], ...(ngDevMode ? [{ debugName: "galleryMode" }] : /* istanbul ignore next */ []));
|
|
31432
31556
|
currentTabItems = computed(() => {
|
|
31433
31557
|
const data = this.cardData();
|
|
@@ -31714,7 +31838,7 @@ class PropertiesCardComponent {
|
|
|
31714
31838
|
viewType: resolvedViewType,
|
|
31715
31839
|
order: index,
|
|
31716
31840
|
configuration: {
|
|
31717
|
-
...baseConfiguration,
|
|
31841
|
+
...mergePropertyAppearance(baseConfiguration, uiConfig, resolvedViewType),
|
|
31718
31842
|
// Per-property width is always honored; responsive column collapse
|
|
31719
31843
|
// (3 -> 2 -> 1 on narrow cards) is handled by the entities grid's
|
|
31720
31844
|
// container queries, not by overriding the configured size here.
|
|
@@ -31894,11 +32018,17 @@ class PropertiesCardComponent {
|
|
|
31894
32018
|
return '';
|
|
31895
32019
|
}
|
|
31896
32020
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: PropertiesCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
31897
|
-
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: "<ng-container *transloco=\"let t; prefix: 'dashboardBuilder'\">\
|
|
32021
|
+
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]] });
|
|
31898
32022
|
}
|
|
31899
32023
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: PropertiesCardComponent, decorators: [{
|
|
31900
32024
|
type: Component,
|
|
31901
|
-
args: [{ selector: 'mt-properties-card, mt-entities-preview-card', standalone: true, imports: [
|
|
32025
|
+
args: [{ selector: 'mt-properties-card, mt-entities-preview-card', standalone: true, imports: [
|
|
32026
|
+
CommonModule,
|
|
32027
|
+
TranslocoDirective,
|
|
32028
|
+
Tabs,
|
|
32029
|
+
EntitiesPreview,
|
|
32030
|
+
CardContentComponent,
|
|
32031
|
+
], 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"] }]
|
|
31902
32032
|
}], 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"] }] } });
|
|
31903
32033
|
|
|
31904
32034
|
const VIEW_TYPE_MAP = {
|
|
@@ -32744,6 +32874,8 @@ class DashboardItem {
|
|
|
32744
32874
|
chartTypeId = input(undefined, ...(ngDevMode ? [{ debugName: "chartTypeId" }] : /* istanbul ignore next */ []));
|
|
32745
32875
|
/** Read-only mode */
|
|
32746
32876
|
readonly = input(false, ...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
|
|
32877
|
+
/** Render host-supplied preview data without issuing chart requests. */
|
|
32878
|
+
useCachedDataOnly = input(false, ...(ngDevMode ? [{ debugName: "useCachedDataOnly" }] : /* istanbul ignore next */ []));
|
|
32747
32879
|
/** Parent page/dashboard name for topbar breadcrumb fallbacks */
|
|
32748
32880
|
pageName = input('', ...(ngDevMode ? [{ debugName: "pageName" }] : /* istanbul ignore next */ []));
|
|
32749
32881
|
/** Whether this item is inside a group */
|
|
@@ -33153,6 +33285,13 @@ class DashboardItem {
|
|
|
33153
33285
|
this.isLoading.set(false);
|
|
33154
33286
|
return;
|
|
33155
33287
|
}
|
|
33288
|
+
// Style Studio owns the isolated preview store and pushes processed data
|
|
33289
|
+
// into it. Fetching here would request the same chart again on every
|
|
33290
|
+
// draft style edit, even though the datasource has not changed.
|
|
33291
|
+
if (this.useCachedDataOnly()) {
|
|
33292
|
+
this.isLoading.set(false);
|
|
33293
|
+
return;
|
|
33294
|
+
}
|
|
33156
33295
|
const filters = this.buildRequestFilters(dashboardId);
|
|
33157
33296
|
this.dataRequestSubscription = this.chartDataService
|
|
33158
33297
|
.fetchChartData(config, filters, this.reportId())
|
|
@@ -33338,7 +33477,7 @@ class DashboardItem {
|
|
|
33338
33477
|
return merged;
|
|
33339
33478
|
}
|
|
33340
33479
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: DashboardItem, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
33341
|
-
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 }, 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 });
|
|
33480
|
+
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 });
|
|
33342
33481
|
}
|
|
33343
33482
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: DashboardItem, decorators: [{
|
|
33344
33483
|
type: Component,
|
|
@@ -33357,7 +33496,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
33357
33496
|
EntityPreviewCardComponent,
|
|
33358
33497
|
LastHistoryLevelCardComponent,
|
|
33359
33498
|
], 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"] }]
|
|
33360
|
-
}], 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 }] }], 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"] }] } });
|
|
33499
|
+
}], 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"] }] } });
|
|
33361
33500
|
|
|
33362
33501
|
/**
|
|
33363
33502
|
* Chart Viewer Component
|
|
@@ -33379,6 +33518,8 @@ class ChartViewer {
|
|
|
33379
33518
|
* `refresh()`, which is how the Style Studio drives it anyway.
|
|
33380
33519
|
*/
|
|
33381
33520
|
hideHeader = input(false, ...(ngDevMode ? [{ debugName: "hideHeader" }] : /* istanbul ignore next */ []));
|
|
33521
|
+
/** Style Studio supplies data from its isolated store instead of fetching. */
|
|
33522
|
+
useCachedDataOnly = input(false, ...(ngDevMode ? [{ debugName: "useCachedDataOnly" }] : /* istanbul ignore next */ []));
|
|
33382
33523
|
/** Loading state for refresh */
|
|
33383
33524
|
loading = signal(false, ...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
|
|
33384
33525
|
destroyRef = inject(DestroyRef);
|
|
@@ -33445,12 +33586,12 @@ class ChartViewer {
|
|
|
33445
33586
|
}, 450);
|
|
33446
33587
|
}
|
|
33447
33588
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ChartViewer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
33448
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: ChartViewer, isStandalone: true, selector: "mt-chart-viewer", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, chartTypeId: { classPropertyName: "chartTypeId", publicName: "chartTypeId", isSignal: true, isRequired: false, transformFunction: null }, hideHeader: { classPropertyName: "hideHeader", publicName: "hideHeader", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'dashboardBuilder'\">\
|
|
33589
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: ChartViewer, isStandalone: true, selector: "mt-chart-viewer", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, chartTypeId: { classPropertyName: "chartTypeId", publicName: "chartTypeId", isSignal: true, isRequired: false, transformFunction: null }, hideHeader: { classPropertyName: "hideHeader", publicName: "hideHeader", isSignal: true, isRequired: false, transformFunction: null }, useCachedDataOnly: { classPropertyName: "useCachedDataOnly", publicName: "useCachedDataOnly", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'dashboardBuilder'\">\n <div\n class=\"h-full flex flex-col\"\n [class.bg-surface-50]=\"!hideHeader()\"\n [class.border-l]=\"!hideHeader()\"\n [class.border-surface-200]=\"!hideHeader()\"\n >\n <!-- Header -->\n @if (!hideHeader()) {\n <div\n class=\"flex items-center justify-between px-4 py-3 bg-surface-0 border-b border-surface-200\"\n >\n <span class=\"text-sm font-medium text-surface-700\">{{\n t(\"preview\")\n }}</span>\n <mt-button\n icon=\"arrow.refresh-cw-01\"\n [rounded]=\"true\"\n size=\"small\"\n severity=\"help\"\n [tooltip]=\"t('refresh')\"\n (onClick)=\"refresh()\"\n />\n </div>\n }\n\n <!-- Preview Content. The inset is the panel's own presentation: a host that\n framed the preview itself (hideHeader) renders edge-to-edge, matching\n the dialog body, which is `p-0`. -->\n <div class=\"relative flex-1 overflow-auto\" [class.p-4]=\"!hideHeader()\">\n @if (config() && chartTypeId() && canPreview()) {\n <!-- The card frame is the panel's own presentation. A host that already\n framed the preview (hideHeader) would otherwise show a card inside\n its frame. -->\n <div\n class=\"h-full overflow-hidden\"\n [class.bg-surface-0]=\"!hideHeader()\"\n [class.rounded-lg]=\"!hideHeader()\"\n [class.shadow-sm]=\"!hideHeader()\"\n [class.border]=\"!hideHeader()\"\n [class.border-surface-200]=\"!hideHeader()\"\n >\n <mt-dashboard-item\n [config]=\"config()\"\n [chartTypeId]=\"chartTypeId()\"\n [readonly]=\"true\"\n [useCachedDataOnly]=\"useCachedDataOnly()\"\n [pageName]=\"\n config()?.clientConfig?.title?.['en'] ||\n config()?.clientConfig?.title?.['ar'] ||\n ''\n \"\n />\n </div>\n } @else {\n <div\n class=\"flex flex-col items-center justify-center h-full text-muted-color\"\n >\n <mt-icon icon=\"chart.bar-chart-10\" class=\"text-4xl mb-3 opacity-50\" />\n <p class=\"text-sm\">{{ t(\"noPreviewAvailable\") }}</p>\n <p class=\"text-xs opacity-70\">{{ t(\"configureChartToPreview\") }}</p>\n </div>\n }\n\n @if (loading()) {\n <div\n class=\"pointer-events-none absolute z-10 flex items-center justify-center rounded-lg bg-surface-0/70\"\n [class.inset-4]=\"!hideHeader()\"\n [class.inset-0]=\"hideHeader()\"\n role=\"status\"\n aria-live=\"polite\"\n [attr.aria-label]=\"t('styleStudio.refreshing')\"\n >\n <mt-icon\n icon=\"general.loading-02\"\n class=\"animate-spin text-3xl text-primary\"\n />\n <span class=\"sr-only\">{{ t(\"styleStudio.refreshing\") }}</span>\n </div>\n }\n </div>\n </div>\n</ng-container>\n", styles: [":host{display:block;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: DashboardItem, selector: "mt-dashboard-item", inputs: ["config", "chartTypeId", "readonly", "useCachedDataOnly", "pageName", "inGroup", "isDialog", "queryParams", "extraFilters", "reportId", "ignoreQueryFilter", "builderMode"], outputs: ["actionTriggered", "configureRequested", "titleEdited"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
33449
33590
|
}
|
|
33450
33591
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ChartViewer, decorators: [{
|
|
33451
33592
|
type: Component,
|
|
33452
|
-
args: [{ selector: 'mt-chart-viewer', standalone: true, imports: [CommonModule, TranslocoDirective, Button, Icon, DashboardItem], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<ng-container *transloco=\"let t; prefix: 'dashboardBuilder'\">\
|
|
33453
|
-
}], ctorParameters: () => [], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], chartTypeId: [{ type: i0.Input, args: [{ isSignal: true, alias: "chartTypeId", required: false }] }], hideHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideHeader", required: false }] }] } });
|
|
33593
|
+
args: [{ selector: 'mt-chart-viewer', standalone: true, imports: [CommonModule, TranslocoDirective, Button, Icon, DashboardItem], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<ng-container *transloco=\"let t; prefix: 'dashboardBuilder'\">\n <div\n class=\"h-full flex flex-col\"\n [class.bg-surface-50]=\"!hideHeader()\"\n [class.border-l]=\"!hideHeader()\"\n [class.border-surface-200]=\"!hideHeader()\"\n >\n <!-- Header -->\n @if (!hideHeader()) {\n <div\n class=\"flex items-center justify-between px-4 py-3 bg-surface-0 border-b border-surface-200\"\n >\n <span class=\"text-sm font-medium text-surface-700\">{{\n t(\"preview\")\n }}</span>\n <mt-button\n icon=\"arrow.refresh-cw-01\"\n [rounded]=\"true\"\n size=\"small\"\n severity=\"help\"\n [tooltip]=\"t('refresh')\"\n (onClick)=\"refresh()\"\n />\n </div>\n }\n\n <!-- Preview Content. The inset is the panel's own presentation: a host that\n framed the preview itself (hideHeader) renders edge-to-edge, matching\n the dialog body, which is `p-0`. -->\n <div class=\"relative flex-1 overflow-auto\" [class.p-4]=\"!hideHeader()\">\n @if (config() && chartTypeId() && canPreview()) {\n <!-- The card frame is the panel's own presentation. A host that already\n framed the preview (hideHeader) would otherwise show a card inside\n its frame. -->\n <div\n class=\"h-full overflow-hidden\"\n [class.bg-surface-0]=\"!hideHeader()\"\n [class.rounded-lg]=\"!hideHeader()\"\n [class.shadow-sm]=\"!hideHeader()\"\n [class.border]=\"!hideHeader()\"\n [class.border-surface-200]=\"!hideHeader()\"\n >\n <mt-dashboard-item\n [config]=\"config()\"\n [chartTypeId]=\"chartTypeId()\"\n [readonly]=\"true\"\n [useCachedDataOnly]=\"useCachedDataOnly()\"\n [pageName]=\"\n config()?.clientConfig?.title?.['en'] ||\n config()?.clientConfig?.title?.['ar'] ||\n ''\n \"\n />\n </div>\n } @else {\n <div\n class=\"flex flex-col items-center justify-center h-full text-muted-color\"\n >\n <mt-icon icon=\"chart.bar-chart-10\" class=\"text-4xl mb-3 opacity-50\" />\n <p class=\"text-sm\">{{ t(\"noPreviewAvailable\") }}</p>\n <p class=\"text-xs opacity-70\">{{ t(\"configureChartToPreview\") }}</p>\n </div>\n }\n\n @if (loading()) {\n <div\n class=\"pointer-events-none absolute z-10 flex items-center justify-center rounded-lg bg-surface-0/70\"\n [class.inset-4]=\"!hideHeader()\"\n [class.inset-0]=\"hideHeader()\"\n role=\"status\"\n aria-live=\"polite\"\n [attr.aria-label]=\"t('styleStudio.refreshing')\"\n >\n <mt-icon\n icon=\"general.loading-02\"\n class=\"animate-spin text-3xl text-primary\"\n />\n <span class=\"sr-only\">{{ t(\"styleStudio.refreshing\") }}</span>\n </div>\n }\n </div>\n </div>\n</ng-container>\n", styles: [":host{display:block;height:100%}\n"] }]
|
|
33594
|
+
}], ctorParameters: () => [], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], chartTypeId: [{ type: i0.Input, args: [{ isSignal: true, alias: "chartTypeId", required: false }] }], hideHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideHeader", required: false }] }], useCachedDataOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "useCachedDataOnly", required: false }] }] } });
|
|
33454
33595
|
|
|
33455
33596
|
/**
|
|
33456
33597
|
* The canonical list of configuration domains. Order is the order of
|
|
@@ -33982,13 +34123,29 @@ function readableStyleLabel(value) {
|
|
|
33982
34123
|
.trim();
|
|
33983
34124
|
}
|
|
33984
34125
|
function translateDashboardText(transloco, key, fallback) {
|
|
34126
|
+
if (!hasTranslation(transloco, key))
|
|
34127
|
+
return fallback;
|
|
33985
34128
|
const translated = transloco.translate(key);
|
|
33986
34129
|
return translated && translated !== key ? translated : fallback;
|
|
33987
34130
|
}
|
|
33988
34131
|
function translateDashboardTextIfExists(transloco, key) {
|
|
34132
|
+
if (!hasTranslation(transloco, key))
|
|
34133
|
+
return null;
|
|
33989
34134
|
const translated = transloco.translate(key);
|
|
33990
34135
|
return translated && translated !== key ? translated : null;
|
|
33991
34136
|
}
|
|
34137
|
+
/** Schema labels have intentional readable fallbacks; do not log missing keys. */
|
|
34138
|
+
function hasTranslation(transloco, key) {
|
|
34139
|
+
const translation = transloco.getTranslation(transloco.getActiveLang());
|
|
34140
|
+
if (Object.prototype.hasOwnProperty.call(translation, key)) {
|
|
34141
|
+
return true;
|
|
34142
|
+
}
|
|
34143
|
+
return (key.split('.').reduce((value, part) => {
|
|
34144
|
+
return value && typeof value === 'object'
|
|
34145
|
+
? value[part]
|
|
34146
|
+
: undefined;
|
|
34147
|
+
}, translation) != null);
|
|
34148
|
+
}
|
|
33992
34149
|
function translateStyleLabel(transloco, label) {
|
|
33993
34150
|
if (!label)
|
|
33994
34151
|
return '';
|
|
@@ -33999,6 +34156,8 @@ function translateStyleLabel(transloco, label) {
|
|
|
33999
34156
|
}
|
|
34000
34157
|
function translateStyleMessage(transloco, key, fallback, params) {
|
|
34001
34158
|
const full = `${STYLE_PREFIX}.messages.${key}`;
|
|
34159
|
+
if (!hasTranslation(transloco, full))
|
|
34160
|
+
return fallback;
|
|
34002
34161
|
const translated = transloco.translate(full, params);
|
|
34003
34162
|
return translated && translated !== full ? translated : fallback;
|
|
34004
34163
|
}
|
|
@@ -34198,8 +34357,10 @@ class KeyValueMapField {
|
|
|
34198
34357
|
valueFields = input([], ...(ngDevMode ? [{ debugName: "valueFields" }] : /* istanbul ignore next */ []));
|
|
34199
34358
|
/** When true, store/read a positional array aligned to `keys` order. */
|
|
34200
34359
|
asArray = input(false, ...(ngDevMode ? [{ debugName: "asArray" }] : /* istanbul ignore next */ []));
|
|
34360
|
+
collapsibleRows = input(false, ...(ngDevMode ? [{ debugName: "collapsibleRows" }] : /* istanbul ignore next */ []));
|
|
34201
34361
|
valueChange = output();
|
|
34202
34362
|
rows = signal([], ...(ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []));
|
|
34363
|
+
expandedRows = signal(new Set(), ...(ngDevMode ? [{ debugName: "expandedRows" }] : /* istanbul ignore next */ []));
|
|
34203
34364
|
destroyRef = inject(DestroyRef);
|
|
34204
34365
|
/** Subscriptions for the current row set; torn down on every rebuild. */
|
|
34205
34366
|
rowSubs = new Subscription();
|
|
@@ -34245,8 +34406,22 @@ class KeyValueMapField {
|
|
|
34245
34406
|
* label beside the control, so mixing it into the labelled input grid leaves
|
|
34246
34407
|
* it vertically misaligned with every neighbour.
|
|
34247
34408
|
*/
|
|
34248
|
-
inputFields = computed(() => this.valueFields().filter((f) => f.type !== 'boolean'), ...(ngDevMode ? [{ debugName: "inputFields" }] : /* istanbul ignore next */ []));
|
|
34249
|
-
toggleFields = computed(() => this.valueFields().filter((f) => f.type === 'boolean'), ...(ngDevMode ? [{ debugName: "toggleFields" }] : /* istanbul ignore next */ []));
|
|
34409
|
+
inputFields = computed(() => this.valueFields().filter((f) => f.type !== 'boolean' && !f.key.startsWith('show')), ...(ngDevMode ? [{ debugName: "inputFields" }] : /* istanbul ignore next */ []));
|
|
34410
|
+
toggleFields = computed(() => this.valueFields().filter((f) => f.type === 'boolean' && !f.key.startsWith('show')), ...(ngDevMode ? [{ debugName: "toggleFields" }] : /* istanbul ignore next */ []));
|
|
34411
|
+
userFields = computed(() => this.valueFields().filter((f) => f.type === 'boolean' && f.key.startsWith('show')), ...(ngDevMode ? [{ debugName: "userFields" }] : /* istanbul ignore next */ []));
|
|
34412
|
+
isExpanded(key) {
|
|
34413
|
+
return this.expandedRows().has(key);
|
|
34414
|
+
}
|
|
34415
|
+
toggleRow(key) {
|
|
34416
|
+
this.expandedRows.update((current) => {
|
|
34417
|
+
const next = new Set(current);
|
|
34418
|
+
if (next.has(key))
|
|
34419
|
+
next.delete(key);
|
|
34420
|
+
else
|
|
34421
|
+
next.add(key);
|
|
34422
|
+
return next;
|
|
34423
|
+
});
|
|
34424
|
+
}
|
|
34250
34425
|
/**
|
|
34251
34426
|
* A sub-field's options, plus the row's own persisted value when it is not
|
|
34252
34427
|
* one of them. `colorAsProperty` also accepts a literal color (`#fff`,
|
|
@@ -34358,17 +34533,28 @@ class KeyValueMapField {
|
|
|
34358
34533
|
}
|
|
34359
34534
|
return obj;
|
|
34360
34535
|
}
|
|
34536
|
+
/** Keep persisted keys that this version of the editor does not expose. */
|
|
34537
|
+
mergedRow(row, index) {
|
|
34538
|
+
const existing = this.existingFor(this.value(), row.key, index, this.asArray());
|
|
34539
|
+
const merged = { ...existing };
|
|
34540
|
+
for (const field of this.valueFields())
|
|
34541
|
+
delete merged[field.key];
|
|
34542
|
+
return {
|
|
34543
|
+
...merged,
|
|
34544
|
+
...this.clean(row.group.value),
|
|
34545
|
+
};
|
|
34546
|
+
}
|
|
34361
34547
|
emit() {
|
|
34362
34548
|
this.syncing = true;
|
|
34363
34549
|
if (this.asArray()) {
|
|
34364
34550
|
// One entry per key, in order — keeps positional alignment.
|
|
34365
|
-
const arr = this.rows().map((row) => this.
|
|
34551
|
+
const arr = this.rows().map((row, index) => this.mergedRow(row, index));
|
|
34366
34552
|
this.valueChange.emit(arr);
|
|
34367
34553
|
}
|
|
34368
34554
|
else {
|
|
34369
34555
|
const out = {};
|
|
34370
|
-
for (const row of this.rows()) {
|
|
34371
|
-
const cleaned = this.
|
|
34556
|
+
for (const [index, row] of this.rows().entries()) {
|
|
34557
|
+
const cleaned = this.mergedRow(row, index);
|
|
34372
34558
|
if (Object.keys(cleaned).length)
|
|
34373
34559
|
out[row.key] = cleaned;
|
|
34374
34560
|
}
|
|
@@ -34387,7 +34573,7 @@ class KeyValueMapField {
|
|
|
34387
34573
|
const existing = this.existingFor(raw, key, i, asArray);
|
|
34388
34574
|
const current = rows[i].group.value;
|
|
34389
34575
|
for (const f of fields) {
|
|
34390
|
-
const a = existing?.[f.key] ?? null;
|
|
34576
|
+
const a = existing?.[f.key] ?? f.default ?? null;
|
|
34391
34577
|
const b = current?.[f.key] ?? null;
|
|
34392
34578
|
if ((a ?? '') !== (b ?? ''))
|
|
34393
34579
|
return false;
|
|
@@ -34396,7 +34582,7 @@ class KeyValueMapField {
|
|
|
34396
34582
|
return true;
|
|
34397
34583
|
}
|
|
34398
34584
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: KeyValueMapField, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
34399
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: KeyValueMapField, isStandalone: true, selector: "mt-key-value-map-field", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, keys: { classPropertyName: "keys", publicName: "keys", isSignal: true, isRequired: false, transformFunction: null }, valueFields: { classPropertyName: "valueFields", publicName: "valueFields", isSignal: true, isRequired: false, transformFunction: null }, asArray: { classPropertyName: "asArray", publicName: "asArray", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: "<div\n class=\"db-kv-map flex flex-col gap-2\"\n *transloco=\"let t; prefix: 'dashboardBuilder.styleStudio.messages'\"\n>\n @if (rows().length) {\n @for (row of rows(); track row.key) {\n <div\n class=\"flex flex-col gap-2.5 rounded-lg border border-surface-200 bg-surface-0 px-3 py-2.5\"\n >\n <span\n class=\"truncate text-sm font-semibold text-color\"\n mtTruncateTooltip\n >\n {{ row.label }}\n </span>\n\n <!-- Inputs carry their own label instead of a placeholder: four\n controls never fit on one line in the settings pane, and the\n placeholder-as-label truncated to \"Color F\u2026\". auto-fit (not a\n viewport breakpoint) reflows on the PANE's width \u2014 the pane is\n narrow while the viewport is wide. -->\n @if (inputFields().length) {\n <div\n class=\"grid gap-x-3 gap-y-2.5 grid-cols-[repeat(auto-fit,minmax(9rem,1fr))]\"\n >\n @for (f of inputFields(); track f.key) {\n @switch (f.type) {\n @case (\"color\") {\n <mt-color-picker-field\n class=\"min-w-0\"\n [label]=\"f.label\"\n [formControl]=\"control(row, f.key)\"\n />\n }\n @case (\"number\") {\n <mt-number-field\n class=\"min-w-0\"\n [label]=\"f.label\"\n [placeholder]=\"f.placeholder ?? ''\"\n [formControl]=\"control(row, f.key)\"\n />\n }\n @case (\"select\") {\n @if (f.allowCustomColor) {\n <!-- ngModel, not formControl: in custom mode the stored\n value is the colour itself while the select has to\n show the \"Custom color\" entry, so the displayed value\n is derived rather than the control's own. -->\n <mt-select-field\n class=\"min-w-0\"\n [label]=\"f.label\"\n [options]=\"options(row, f)\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [filter]=\"useFilter(row, f)\"\n [placeholder]=\"f.placeholder ?? ''\"\n [ngModel]=\"selectValue(row, f)\"\n (ngModelChange)=\"onSourceChange(row, f, $event)\"\n />\n @if (isCustomColor(row, f)) {\n <mt-color-picker-field\n class=\"min-w-0\"\n [label]=\"t('customColor')\"\n [formControl]=\"row.custom[f.key]\"\n />\n }\n } @else {\n <mt-select-field\n class=\"min-w-0\"\n [label]=\"f.label\"\n [options]=\"options(row, f)\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [filter]=\"useFilter(row, f)\"\n [placeholder]=\"f.placeholder ?? ''\"\n [formControl]=\"control(row, f.key)\"\n />\n }\n }\n @default {\n <mt-text-field\n class=\"min-w-0\"\n [label]=\"f.label\"\n [placeholder]=\"f.placeholder ?? ''\"\n [formControl]=\"control(row, f.key)\"\n />\n }\n }\n }\n </div>\n }\n\n <!-- Toggles on their own line \u2014 they are label-beside-control, so they\n read wrong when mixed into the labelled input grid. -->\n @if (toggleFields().length) {\n <div class=\"flex flex-wrap items-center gap-x-5 gap-y-2\">\n @for (f of toggleFields(); track f.key) {\n <mt-toggle-field\n class=\"shrink-0\"\n [label]=\"f.label\"\n labelPosition=\"start\"\n [formControl]=\"control(row, f.key)\"\n />\n }\n </div>\n }\n </div>\n }\n } @else {\n <p class=\"text-xs text-muted-color\">\n {{ t(\"noProperties\") }}\n </p>\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: TextField, selector: "mt-text-field", inputs: ["field", "hint", "label", "placeholder", "class", "type", "readonly", "pInputs", "required", "maxLength", "icon", "iconPosition"] }, { kind: "component", type: NumberField, selector: "mt-number-field", inputs: ["field", "hint", "label", "placeholder", "class", "readonly", "pInputs", "format", "useGrouping", "maxFractionDigits", "min", "max", "required"] }, { kind: "component", type: ColorPickerField, selector: "mt-color-picker-field", inputs: ["label", "appendTo", "placeholder", "class", "variant", "readonly", "pInputs", "required"], outputs: ["onChange"] }, { kind: "component", type: SelectField, selector: "mt-select-field", inputs: ["field", "hint", "label", "placeholder", "hasPlaceholderPrefix", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "clearAfterSelect", "required", "group", "size", "optionGroupLabel", "optionGroupChildren", "loading", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape", "markCurrentUser"], outputs: ["onChange"] }, { kind: "component", type: ToggleField, selector: "mt-toggle-field", inputs: ["label", "inputId", "labelPosition", "placeholder", "readonly", "pInputs", "required", "toggleShape", "size", "icon", "descriptionCard"], outputs: ["onChange"] }, { kind: "directive", type: TruncateTooltip, selector: "[mtTruncateTooltip]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
34585
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: KeyValueMapField, isStandalone: true, selector: "mt-key-value-map-field", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, keys: { classPropertyName: "keys", publicName: "keys", isSignal: true, isRequired: false, transformFunction: null }, valueFields: { classPropertyName: "valueFields", publicName: "valueFields", isSignal: true, isRequired: false, transformFunction: null }, asArray: { classPropertyName: "asArray", publicName: "asArray", isSignal: true, isRequired: false, transformFunction: null }, collapsibleRows: { classPropertyName: "collapsibleRows", publicName: "collapsibleRows", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: "<div\n class=\"db-kv-map flex flex-col gap-2\"\n *transloco=\"let t; prefix: 'dashboardBuilder.styleStudio.messages'\"\n>\n @if (rows().length) {\n @for (row of rows(); track row.key) {\n <div\n class=\"flex flex-col gap-2.5 rounded-lg border border-surface-200 bg-surface-0 px-3 py-2.5\"\n >\n @if (collapsibleRows()) {\n <button\n type=\"button\"\n class=\"flex w-full items-center justify-between gap-2 text-start text-sm font-semibold text-color\"\n [attr.aria-expanded]=\"isExpanded(row.key)\"\n (click)=\"toggleRow(row.key)\"\n >\n <span class=\"truncate\" mtTruncateTooltip>{{ row.label }}</span>\n <span aria-hidden=\"true\">{{\n isExpanded(row.key) ? \"\u2212\" : \"+\"\n }}</span>\n </button>\n } @else {\n <span\n class=\"truncate text-sm font-semibold text-color\"\n mtTruncateTooltip\n >\n {{ row.label }}\n </span>\n }\n\n @if (!collapsibleRows() || isExpanded(row.key)) {\n <!-- Inputs carry their own label instead of a placeholder: four\n controls never fit on one line in the settings pane, and the\n placeholder-as-label truncated to \"Color F\u2026\". auto-fit (not a\n viewport breakpoint) reflows on the PANE's width \u2014 the pane is\n narrow while the viewport is wide. -->\n @if (inputFields().length) {\n <div\n class=\"grid gap-x-3 gap-y-2.5 grid-cols-[repeat(auto-fit,minmax(9rem,1fr))]\"\n >\n @for (f of inputFields(); track f.key) {\n @switch (f.type) {\n @case (\"color\") {\n <mt-color-picker-field\n class=\"min-w-0\"\n [label]=\"f.label\"\n [formControl]=\"control(row, f.key)\"\n />\n }\n @case (\"number\") {\n <mt-number-field\n class=\"min-w-0\"\n [label]=\"f.label\"\n [placeholder]=\"f.placeholder ?? ''\"\n [formControl]=\"control(row, f.key)\"\n />\n }\n @case (\"multilineText\") {\n <mt-textarea-field\n class=\"min-w-0\"\n [label]=\"f.label\"\n [placeholder]=\"f.placeholder ?? ''\"\n rows=\"3\"\n [formControl]=\"control(row, f.key)\"\n />\n }\n @case (\"select\") {\n @if (f.allowCustomColor) {\n <!-- ngModel, not formControl: in custom mode the stored\n value is the colour itself while the select has to\n show the \"Custom color\" entry, so the displayed value\n is derived rather than the control's own. -->\n <mt-select-field\n class=\"min-w-0\"\n [label]=\"f.label\"\n [options]=\"options(row, f)\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [filter]=\"useFilter(row, f)\"\n [placeholder]=\"f.placeholder ?? ''\"\n [ngModel]=\"selectValue(row, f)\"\n (ngModelChange)=\"onSourceChange(row, f, $event)\"\n />\n @if (isCustomColor(row, f)) {\n <mt-color-picker-field\n class=\"min-w-0\"\n [label]=\"t('customColor')\"\n [formControl]=\"row.custom[f.key]\"\n />\n }\n } @else {\n <mt-select-field\n class=\"min-w-0\"\n [label]=\"f.label\"\n [options]=\"options(row, f)\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [filter]=\"useFilter(row, f)\"\n [placeholder]=\"f.placeholder ?? ''\"\n [formControl]=\"control(row, f.key)\"\n />\n }\n }\n @default {\n <mt-text-field\n class=\"min-w-0\"\n [label]=\"f.label\"\n [placeholder]=\"f.placeholder ?? ''\"\n [formControl]=\"control(row, f.key)\"\n />\n }\n }\n }\n </div>\n }\n\n <!-- Toggles on their own line \u2014 they are label-beside-control, so they\n read wrong when mixed into the labelled input grid. -->\n @if (toggleFields().length) {\n <div class=\"flex flex-wrap items-center gap-x-5 gap-y-2\">\n @for (f of toggleFields(); track f.key) {\n <mt-toggle-field\n class=\"shrink-0\"\n [label]=\"f.label\"\n labelPosition=\"start\"\n [formControl]=\"control(row, f.key)\"\n />\n }\n </div>\n }\n @if (userFields().length) {\n <details class=\"rounded-md border border-surface-200 px-3 py-2\">\n <summary class=\"cursor-pointer text-sm font-medium text-color\">\n {{ t(\"userDisplay\") }}\n </summary>\n <p class=\"mt-2 text-xs text-muted-color\">\n {{ t(\"userDisplayHint\") }}\n </p>\n <div class=\"mt-3 flex flex-wrap items-center gap-x-5 gap-y-2\">\n @for (f of userFields(); track f.key) {\n <mt-toggle-field\n class=\"shrink-0\"\n [label]=\"f.label\"\n labelPosition=\"start\"\n [formControl]=\"control(row, f.key)\"\n />\n }\n </div>\n </details>\n }\n }\n </div>\n }\n } @else {\n <p class=\"text-xs text-muted-color\">\n {{ t(\"noProperties\") }}\n </p>\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: TextField, selector: "mt-text-field", inputs: ["field", "hint", "label", "placeholder", "class", "type", "readonly", "pInputs", "required", "maxLength", "icon", "iconPosition"] }, { kind: "component", type: TextareaField, selector: "mt-textarea-field", inputs: ["field", "hint", "label", "placeholder", "class", "readonly", "noErrorStyle", "pInputs", "rows", "required", "maxLength"] }, { kind: "component", type: NumberField, selector: "mt-number-field", inputs: ["field", "hint", "label", "placeholder", "class", "readonly", "pInputs", "format", "useGrouping", "maxFractionDigits", "min", "max", "required"] }, { kind: "component", type: ColorPickerField, selector: "mt-color-picker-field", inputs: ["label", "appendTo", "placeholder", "class", "variant", "readonly", "pInputs", "required"], outputs: ["onChange"] }, { kind: "component", type: SelectField, selector: "mt-select-field", inputs: ["field", "hint", "label", "placeholder", "hasPlaceholderPrefix", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "clearAfterSelect", "required", "group", "size", "optionGroupLabel", "optionGroupChildren", "loading", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape", "markCurrentUser"], outputs: ["onChange"] }, { kind: "component", type: ToggleField, selector: "mt-toggle-field", inputs: ["label", "inputId", "labelPosition", "placeholder", "readonly", "pInputs", "required", "toggleShape", "size", "icon", "descriptionCard"], outputs: ["onChange"] }, { kind: "directive", type: TruncateTooltip, selector: "[mtTruncateTooltip]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
34400
34586
|
}
|
|
34401
34587
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: KeyValueMapField, decorators: [{
|
|
34402
34588
|
type: Component,
|
|
@@ -34406,13 +34592,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
34406
34592
|
FormsModule,
|
|
34407
34593
|
ReactiveFormsModule,
|
|
34408
34594
|
TextField,
|
|
34595
|
+
TextareaField,
|
|
34409
34596
|
NumberField,
|
|
34410
34597
|
ColorPickerField,
|
|
34411
34598
|
SelectField,
|
|
34412
34599
|
ToggleField,
|
|
34413
34600
|
TruncateTooltip,
|
|
34414
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div\n class=\"db-kv-map flex flex-col gap-2\"\n *transloco=\"let t; prefix: 'dashboardBuilder.styleStudio.messages'\"\n>\n @if (rows().length) {\n @for (row of rows(); track row.key) {\n <div\n class=\"flex flex-col gap-2.5 rounded-lg border border-surface-200 bg-surface-0 px-3 py-2.5\"\n >\n <span\n class=\"truncate text-sm font-semibold text-color\"\n
|
|
34415
|
-
}], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], keys: [{ type: i0.Input, args: [{ isSignal: true, alias: "keys", required: false }] }], valueFields: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueFields", required: false }] }], asArray: [{ type: i0.Input, args: [{ isSignal: true, alias: "asArray", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }] } });
|
|
34601
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div\n class=\"db-kv-map flex flex-col gap-2\"\n *transloco=\"let t; prefix: 'dashboardBuilder.styleStudio.messages'\"\n>\n @if (rows().length) {\n @for (row of rows(); track row.key) {\n <div\n class=\"flex flex-col gap-2.5 rounded-lg border border-surface-200 bg-surface-0 px-3 py-2.5\"\n >\n @if (collapsibleRows()) {\n <button\n type=\"button\"\n class=\"flex w-full items-center justify-between gap-2 text-start text-sm font-semibold text-color\"\n [attr.aria-expanded]=\"isExpanded(row.key)\"\n (click)=\"toggleRow(row.key)\"\n >\n <span class=\"truncate\" mtTruncateTooltip>{{ row.label }}</span>\n <span aria-hidden=\"true\">{{\n isExpanded(row.key) ? \"\u2212\" : \"+\"\n }}</span>\n </button>\n } @else {\n <span\n class=\"truncate text-sm font-semibold text-color\"\n mtTruncateTooltip\n >\n {{ row.label }}\n </span>\n }\n\n @if (!collapsibleRows() || isExpanded(row.key)) {\n <!-- Inputs carry their own label instead of a placeholder: four\n controls never fit on one line in the settings pane, and the\n placeholder-as-label truncated to \"Color F\u2026\". auto-fit (not a\n viewport breakpoint) reflows on the PANE's width \u2014 the pane is\n narrow while the viewport is wide. -->\n @if (inputFields().length) {\n <div\n class=\"grid gap-x-3 gap-y-2.5 grid-cols-[repeat(auto-fit,minmax(9rem,1fr))]\"\n >\n @for (f of inputFields(); track f.key) {\n @switch (f.type) {\n @case (\"color\") {\n <mt-color-picker-field\n class=\"min-w-0\"\n [label]=\"f.label\"\n [formControl]=\"control(row, f.key)\"\n />\n }\n @case (\"number\") {\n <mt-number-field\n class=\"min-w-0\"\n [label]=\"f.label\"\n [placeholder]=\"f.placeholder ?? ''\"\n [formControl]=\"control(row, f.key)\"\n />\n }\n @case (\"multilineText\") {\n <mt-textarea-field\n class=\"min-w-0\"\n [label]=\"f.label\"\n [placeholder]=\"f.placeholder ?? ''\"\n rows=\"3\"\n [formControl]=\"control(row, f.key)\"\n />\n }\n @case (\"select\") {\n @if (f.allowCustomColor) {\n <!-- ngModel, not formControl: in custom mode the stored\n value is the colour itself while the select has to\n show the \"Custom color\" entry, so the displayed value\n is derived rather than the control's own. -->\n <mt-select-field\n class=\"min-w-0\"\n [label]=\"f.label\"\n [options]=\"options(row, f)\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [filter]=\"useFilter(row, f)\"\n [placeholder]=\"f.placeholder ?? ''\"\n [ngModel]=\"selectValue(row, f)\"\n (ngModelChange)=\"onSourceChange(row, f, $event)\"\n />\n @if (isCustomColor(row, f)) {\n <mt-color-picker-field\n class=\"min-w-0\"\n [label]=\"t('customColor')\"\n [formControl]=\"row.custom[f.key]\"\n />\n }\n } @else {\n <mt-select-field\n class=\"min-w-0\"\n [label]=\"f.label\"\n [options]=\"options(row, f)\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [filter]=\"useFilter(row, f)\"\n [placeholder]=\"f.placeholder ?? ''\"\n [formControl]=\"control(row, f.key)\"\n />\n }\n }\n @default {\n <mt-text-field\n class=\"min-w-0\"\n [label]=\"f.label\"\n [placeholder]=\"f.placeholder ?? ''\"\n [formControl]=\"control(row, f.key)\"\n />\n }\n }\n }\n </div>\n }\n\n <!-- Toggles on their own line \u2014 they are label-beside-control, so they\n read wrong when mixed into the labelled input grid. -->\n @if (toggleFields().length) {\n <div class=\"flex flex-wrap items-center gap-x-5 gap-y-2\">\n @for (f of toggleFields(); track f.key) {\n <mt-toggle-field\n class=\"shrink-0\"\n [label]=\"f.label\"\n labelPosition=\"start\"\n [formControl]=\"control(row, f.key)\"\n />\n }\n </div>\n }\n @if (userFields().length) {\n <details class=\"rounded-md border border-surface-200 px-3 py-2\">\n <summary class=\"cursor-pointer text-sm font-medium text-color\">\n {{ t(\"userDisplay\") }}\n </summary>\n <p class=\"mt-2 text-xs text-muted-color\">\n {{ t(\"userDisplayHint\") }}\n </p>\n <div class=\"mt-3 flex flex-wrap items-center gap-x-5 gap-y-2\">\n @for (f of userFields(); track f.key) {\n <mt-toggle-field\n class=\"shrink-0\"\n [label]=\"f.label\"\n labelPosition=\"start\"\n [formControl]=\"control(row, f.key)\"\n />\n }\n </div>\n </details>\n }\n }\n </div>\n }\n } @else {\n <p class=\"text-xs text-muted-color\">\n {{ t(\"noProperties\") }}\n </p>\n }\n</div>\n" }]
|
|
34602
|
+
}], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], keys: [{ type: i0.Input, args: [{ isSignal: true, alias: "keys", required: false }] }], valueFields: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueFields", required: false }] }], asArray: [{ type: i0.Input, args: [{ isSignal: true, alias: "asArray", required: false }] }], collapsibleRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsibleRows", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }] } });
|
|
34416
34603
|
|
|
34417
34604
|
/**
|
|
34418
34605
|
* Drag-to-reorder the chart legend. The available entries (`items`) come from
|
|
@@ -34912,7 +35099,7 @@ class StyleField {
|
|
|
34912
35099
|
this.patch.emit({ path: SHADOW_PRESET_PATH$1, value: key });
|
|
34913
35100
|
}
|
|
34914
35101
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: StyleField, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
34915
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: StyleField, isStandalone: true, selector: "mt-style-field", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: true, transformFunction: null }, persisted: { classPropertyName: "persisted", publicName: "persisted", isSignal: true, isRequired: true, transformFunction: null }, capability: { classPropertyName: "capability", publicName: "capability", isSignal: true, isRequired: false, transformFunction: null }, legendItems: { classPropertyName: "legendItems", publicName: "legendItems", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { patch: "patch" }, ngImport: i0, template: "@let f = field();\r\n@switch (f.type) {\r\n @case (\"text\") {\r\n <mt-text-field\r\n [label]=\"f.label\"\r\n [hint]=\"f.description\"\r\n [placeholder]=\"f.placeholder ?? ''\"\r\n [formControl]=\"control\"\r\n />\r\n }\r\n @case (\"cssDimension\") {\r\n <mt-text-field\r\n [label]=\"f.label\"\r\n [hint]=\"f.description\"\r\n [placeholder]=\"f.placeholder ?? '16px'\"\r\n [formControl]=\"control\"\r\n />\r\n }\r\n @case (\"multilineText\") {\r\n <mt-textarea-field\r\n [label]=\"f.label\"\r\n [hint]=\"f.description\"\r\n [placeholder]=\"f.placeholder ?? ''\"\r\n [formControl]=\"control\"\r\n />\r\n }\r\n @case (\"number\") {\r\n <mt-number-field\r\n [label]=\"f.label\"\r\n [hint]=\"f.description\"\r\n [min]=\"numberMin\"\r\n [max]=\"numberMax\"\r\n [formControl]=\"control\"\r\n />\r\n }\r\n @case (\"numberRange\") {\r\n <mt-slider-field\r\n [label]=\"f.label\"\r\n [min]=\"f.min ?? 0\"\r\n [max]=\"f.max ?? 100\"\r\n [step]=\"f.step ?? 1\"\r\n [unit]=\"f.unit ?? ''\"\r\n [formControl]=\"control\"\r\n />\r\n }\r\n @case (\"boolean\") {\r\n <mt-toggle-field\r\n [label]=\"f.label\"\r\n toggleShape=\"card\"\r\n [descriptionCard]=\"f.description ?? ''\"\r\n [formControl]=\"control\"\r\n />\r\n }\r\n @case (\"color\") {\r\n <mt-color-picker-field [label]=\"f.label\" [formControl]=\"control\" />\r\n }\r\n @case (\"select\") {\r\n <mt-select-field\r\n [label]=\"f.label\"\r\n [hint]=\"f.description\"\r\n [options]=\"options()\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [filter]=\"useFilter\"\r\n [placeholder]=\"f.placeholder ?? ''\"\r\n [formControl]=\"control\"\r\n />\r\n }\r\n @case (\"multiselect\") {\r\n <mt-multi-select-field\r\n [label]=\"f.label\"\r\n [options]=\"options()\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n display=\"chip\"\r\n [formControl]=\"control\"\r\n />\r\n }\r\n @case (\"iconPicker\") {\r\n <mt-icon-field [label]=\"f.label\" [formControl]=\"control\" />\r\n }\r\n @default {\r\n <!-- Composite + JSON types render their own label header -->\r\n <div class=\"db-style-field__composite flex flex-col gap-1.5\">\r\n <span class=\"text-sm font-medium text-color\">{{ f.label }}</span>\r\n @if (f.description) {\r\n <span class=\"text-xs text-muted-color\">{{ f.description }}</span>\r\n }\r\n @switch (f.type) {\r\n @case (\"segmented\") {\r\n <mt-segmented-field\r\n [options]=\"options()\"\r\n [value]=\"currentValue()\"\r\n (valueChange)=\"emitValue($event)\"\r\n />\r\n }\r\n @case (\"palette\") {\r\n <mt-color-list-field\r\n [value]=\"readColors()\"\r\n (valueChange)=\"emitValue($event)\"\r\n />\r\n }\r\n @case (\"colorList\") {\r\n <mt-color-list-field\r\n [value]=\"readColors()\"\r\n (valueChange)=\"emitValue($event)\"\r\n />\r\n }\r\n @case (\"arrayBuilder\") {\r\n <mt-array-builder-field\r\n [value]=\"readArray()\"\r\n [itemFields]=\"arrayItemFields()\"\r\n [itemTitleKey]=\"f.itemTitleKey\"\r\n [addLabel]=\"addLabel('Add item')\"\r\n [maxItems]=\"f.maxItems\"\r\n (valueChange)=\"emitValue($event)\"\r\n />\r\n }\r\n @case (\"conditionBuilder\") {\r\n <mt-array-builder-field\r\n [value]=\"readArray()\"\r\n [itemFields]=\"conditionFields()\"\r\n [addLabel]=\"addLabel('Add rule')\"\r\n (valueChange)=\"emitValue($event)\"\r\n />\r\n }\r\n @case (\"keyValueMap\") {\r\n <mt-key-value-map-field\r\n [value]=\"readMapOrArray()\"\r\n [keys]=\"mapKeys()\"\r\n [valueFields]=\"mapValueFields()\"\r\n [asArray]=\"f.asArray ?? false\"\r\n (valueChange)=\"emitValue($event)\"\r\n />\r\n }\r\n @case (\"legendOrder\") {\r\n <mt-legend-order-field\r\n [items]=\"legendItems()\"\r\n [colorOverrides]=\"readLegendColorOverrides()\"\r\n (valueChange)=\"emitValue($event)\"\r\n (colorChange)=\"onLegendColorChange($event)\"\r\n />\r\n }\r\n @case (\"entryColors\") {\r\n <!-- Colors only: no (valueChange), because there is no order to\r\n persist for this control's charts. -->\r\n <mt-legend-order-field\r\n [items]=\"legendItems()\"\r\n [colorOverrides]=\"readLegendColorOverrides()\"\r\n [localizedLabels]=\"readOverrideLabels()\"\r\n [reorderable]=\"false\"\r\n [showLocalizedLabels]=\"true\"\r\n [useItemKeyForColor]=\"true\"\r\n (colorChange)=\"onLegendColorChange($event)\"\r\n (localizedLabelChange)=\"onEntryLabelChange($event)\"\r\n />\r\n }\r\n @case (\"json\") {\r\n <mt-textarea-field\r\n rows=\"8\"\r\n placeholder=\"{ }\"\r\n [formControl]=\"jsonControl\"\r\n />\r\n @if (jsonError()) {\r\n <span class=\"text-xs text-red-600\">{{ jsonError() }}</span>\r\n }\r\n }\r\n }\r\n </div>\r\n }\r\n}\r\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: "component", type: TextField, selector: "mt-text-field", inputs: ["field", "hint", "label", "placeholder", "class", "type", "readonly", "pInputs", "required", "maxLength", "icon", "iconPosition"] }, { kind: "component", type: TextareaField, selector: "mt-textarea-field", inputs: ["field", "hint", "label", "placeholder", "class", "readonly", "noErrorStyle", "pInputs", "rows", "required", "maxLength"] }, { kind: "component", type: NumberField, selector: "mt-number-field", inputs: ["field", "hint", "label", "placeholder", "class", "readonly", "pInputs", "format", "useGrouping", "maxFractionDigits", "min", "max", "required"] }, { kind: "component", type: SliderField, selector: "mt-slider-field", inputs: ["field", "label", "class", "min", "max", "step", "hideNumber", "unit", "readonly", "required"] }, { kind: "component", type: ToggleField, selector: "mt-toggle-field", inputs: ["label", "inputId", "labelPosition", "placeholder", "readonly", "pInputs", "required", "toggleShape", "size", "icon", "descriptionCard"], outputs: ["onChange"] }, { kind: "component", type: SelectField, selector: "mt-select-field", inputs: ["field", "hint", "label", "placeholder", "hasPlaceholderPrefix", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "clearAfterSelect", "required", "group", "size", "optionGroupLabel", "optionGroupChildren", "loading", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape", "markCurrentUser"], outputs: ["onChange"] }, { kind: "component", type: MultiSelectField, selector: "mt-multi-select-field", inputs: ["field", "label", "placeholder", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "display", "required", "maxSelectedLabels", "group", "virtualScroll", "virtualScrollItemSize", "optionGroupLabel", "optionGroupChildren", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape"], outputs: ["onChange"] }, { kind: "component", type: ColorPickerField, selector: "mt-color-picker-field", inputs: ["label", "appendTo", "placeholder", "class", "variant", "readonly", "pInputs", "required"], outputs: ["onChange"] }, { kind: "component", type: IconField, selector: "mt-icon-field", inputs: ["label", "required"] }, { kind: "component", type: SegmentedField, selector: "mt-segmented-field", inputs: ["options", "value", "disabled", "ariaLabel"], outputs: ["valueChange"] }, { kind: "component", type: ColorListField, selector: "mt-color-list-field", inputs: ["value"], outputs: ["valueChange"] }, { kind: "component", type: ArrayBuilderField, selector: "mt-array-builder-field", inputs: ["value", "itemFields", "itemTitleKey", "addLabel", "maxItems"], outputs: ["valueChange"] }, { kind: "component", type: KeyValueMapField, selector: "mt-key-value-map-field", inputs: ["value", "keys", "valueFields", "asArray"], outputs: ["valueChange"] }, { kind: "component", type: LegendOrderField, selector: "mt-legend-order-field", inputs: ["items", "colorOverrides", "localizedLabels", "reorderable", "showLocalizedLabels", "useItemKeyForColor"], outputs: ["valueChange", "colorChange", "localizedLabelChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
35102
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: StyleField, isStandalone: true, selector: "mt-style-field", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: true, transformFunction: null }, persisted: { classPropertyName: "persisted", publicName: "persisted", isSignal: true, isRequired: true, transformFunction: null }, capability: { classPropertyName: "capability", publicName: "capability", isSignal: true, isRequired: false, transformFunction: null }, legendItems: { classPropertyName: "legendItems", publicName: "legendItems", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { patch: "patch" }, ngImport: i0, template: "@let f = field();\n@switch (f.type) {\n @case (\"text\") {\n <mt-text-field\n [label]=\"f.label\"\n [hint]=\"f.description\"\n [placeholder]=\"f.placeholder ?? ''\"\n [formControl]=\"control\"\n />\n }\n @case (\"cssDimension\") {\n <mt-text-field\n [label]=\"f.label\"\n [hint]=\"f.description\"\n [placeholder]=\"f.placeholder ?? '16px'\"\n [formControl]=\"control\"\n />\n }\n @case (\"multilineText\") {\n <mt-textarea-field\n [label]=\"f.label\"\n [hint]=\"f.description\"\n [placeholder]=\"f.placeholder ?? ''\"\n [formControl]=\"control\"\n />\n }\n @case (\"number\") {\n <mt-number-field\n [label]=\"f.label\"\n [hint]=\"f.description\"\n [min]=\"numberMin\"\n [max]=\"numberMax\"\n [formControl]=\"control\"\n />\n }\n @case (\"numberRange\") {\n <mt-slider-field\n [label]=\"f.label\"\n [min]=\"f.min ?? 0\"\n [max]=\"f.max ?? 100\"\n [step]=\"f.step ?? 1\"\n [unit]=\"f.unit ?? ''\"\n [formControl]=\"control\"\n />\n }\n @case (\"boolean\") {\n <mt-toggle-field\n [label]=\"f.label\"\n toggleShape=\"card\"\n [descriptionCard]=\"f.description ?? ''\"\n [formControl]=\"control\"\n />\n }\n @case (\"color\") {\n <mt-color-picker-field [label]=\"f.label\" [formControl]=\"control\" />\n }\n @case (\"select\") {\n <mt-select-field\n [label]=\"f.label\"\n [hint]=\"f.description\"\n [options]=\"options()\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [filter]=\"useFilter\"\n [placeholder]=\"f.placeholder ?? ''\"\n [formControl]=\"control\"\n />\n }\n @case (\"multiselect\") {\n <mt-multi-select-field\n [label]=\"f.label\"\n [options]=\"options()\"\n optionLabel=\"label\"\n optionValue=\"value\"\n display=\"chip\"\n [formControl]=\"control\"\n />\n }\n @case (\"iconPicker\") {\n <mt-icon-field [label]=\"f.label\" [formControl]=\"control\" />\n }\n @default {\n <!-- Composite + JSON types render their own label header -->\n <div class=\"db-style-field__composite flex flex-col gap-1.5\">\n <span class=\"text-sm font-medium text-color\">{{ f.label }}</span>\n @if (f.description) {\n <span class=\"text-xs text-muted-color\">{{ f.description }}</span>\n }\n @switch (f.type) {\n @case (\"segmented\") {\n <mt-segmented-field\n [options]=\"options()\"\n [value]=\"currentValue()\"\n (valueChange)=\"emitValue($event)\"\n />\n }\n @case (\"palette\") {\n <mt-color-list-field\n [value]=\"readColors()\"\n (valueChange)=\"emitValue($event)\"\n />\n }\n @case (\"colorList\") {\n <mt-color-list-field\n [value]=\"readColors()\"\n (valueChange)=\"emitValue($event)\"\n />\n }\n @case (\"arrayBuilder\") {\n <mt-array-builder-field\n [value]=\"readArray()\"\n [itemFields]=\"arrayItemFields()\"\n [itemTitleKey]=\"f.itemTitleKey\"\n [addLabel]=\"addLabel('Add item')\"\n [maxItems]=\"f.maxItems\"\n (valueChange)=\"emitValue($event)\"\n />\n }\n @case (\"conditionBuilder\") {\n <mt-array-builder-field\n [value]=\"readArray()\"\n [itemFields]=\"conditionFields()\"\n [addLabel]=\"addLabel('Add rule')\"\n (valueChange)=\"emitValue($event)\"\n />\n }\n @case (\"keyValueMap\") {\n <mt-key-value-map-field\n [value]=\"readMapOrArray()\"\n [keys]=\"mapKeys()\"\n [valueFields]=\"mapValueFields()\"\n [asArray]=\"f.asArray ?? false\"\n [collapsibleRows]=\"f.collapsibleRows ?? false\"\n (valueChange)=\"emitValue($event)\"\n />\n }\n @case (\"legendOrder\") {\n <mt-legend-order-field\n [items]=\"legendItems()\"\n [colorOverrides]=\"readLegendColorOverrides()\"\n (valueChange)=\"emitValue($event)\"\n (colorChange)=\"onLegendColorChange($event)\"\n />\n }\n @case (\"entryColors\") {\n <!-- Colors only: no (valueChange), because there is no order to\n persist for this control's charts. -->\n <mt-legend-order-field\n [items]=\"legendItems()\"\n [colorOverrides]=\"readLegendColorOverrides()\"\n [localizedLabels]=\"readOverrideLabels()\"\n [reorderable]=\"false\"\n [showLocalizedLabels]=\"true\"\n [useItemKeyForColor]=\"true\"\n (colorChange)=\"onLegendColorChange($event)\"\n (localizedLabelChange)=\"onEntryLabelChange($event)\"\n />\n }\n @case (\"json\") {\n <mt-textarea-field\n rows=\"8\"\n placeholder=\"{ }\"\n [formControl]=\"jsonControl\"\n />\n @if (jsonError()) {\n <span class=\"text-xs text-red-600\">{{ jsonError() }}</span>\n }\n }\n }\n </div>\n }\n}\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: "component", type: TextField, selector: "mt-text-field", inputs: ["field", "hint", "label", "placeholder", "class", "type", "readonly", "pInputs", "required", "maxLength", "icon", "iconPosition"] }, { kind: "component", type: TextareaField, selector: "mt-textarea-field", inputs: ["field", "hint", "label", "placeholder", "class", "readonly", "noErrorStyle", "pInputs", "rows", "required", "maxLength"] }, { kind: "component", type: NumberField, selector: "mt-number-field", inputs: ["field", "hint", "label", "placeholder", "class", "readonly", "pInputs", "format", "useGrouping", "maxFractionDigits", "min", "max", "required"] }, { kind: "component", type: SliderField, selector: "mt-slider-field", inputs: ["field", "label", "class", "min", "max", "step", "hideNumber", "unit", "readonly", "required"] }, { kind: "component", type: ToggleField, selector: "mt-toggle-field", inputs: ["label", "inputId", "labelPosition", "placeholder", "readonly", "pInputs", "required", "toggleShape", "size", "icon", "descriptionCard"], outputs: ["onChange"] }, { kind: "component", type: SelectField, selector: "mt-select-field", inputs: ["field", "hint", "label", "placeholder", "hasPlaceholderPrefix", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "clearAfterSelect", "required", "group", "size", "optionGroupLabel", "optionGroupChildren", "loading", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape", "markCurrentUser"], outputs: ["onChange"] }, { kind: "component", type: MultiSelectField, selector: "mt-multi-select-field", inputs: ["field", "label", "placeholder", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "display", "required", "maxSelectedLabels", "group", "virtualScroll", "virtualScrollItemSize", "optionGroupLabel", "optionGroupChildren", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape"], outputs: ["onChange"] }, { kind: "component", type: ColorPickerField, selector: "mt-color-picker-field", inputs: ["label", "appendTo", "placeholder", "class", "variant", "readonly", "pInputs", "required"], outputs: ["onChange"] }, { kind: "component", type: IconField, selector: "mt-icon-field", inputs: ["label", "required"] }, { kind: "component", type: SegmentedField, selector: "mt-segmented-field", inputs: ["options", "value", "disabled", "ariaLabel"], outputs: ["valueChange"] }, { kind: "component", type: ColorListField, selector: "mt-color-list-field", inputs: ["value"], outputs: ["valueChange"] }, { kind: "component", type: ArrayBuilderField, selector: "mt-array-builder-field", inputs: ["value", "itemFields", "itemTitleKey", "addLabel", "maxItems"], outputs: ["valueChange"] }, { kind: "component", type: KeyValueMapField, selector: "mt-key-value-map-field", inputs: ["value", "keys", "valueFields", "asArray", "collapsibleRows"], outputs: ["valueChange"] }, { kind: "component", type: LegendOrderField, selector: "mt-legend-order-field", inputs: ["items", "colorOverrides", "localizedLabels", "reorderable", "showLocalizedLabels", "useItemKeyForColor"], outputs: ["valueChange", "colorChange", "localizedLabelChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
34916
35103
|
}
|
|
34917
35104
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: StyleField, decorators: [{
|
|
34918
35105
|
type: Component,
|
|
@@ -34933,13 +35120,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
34933
35120
|
ArrayBuilderField,
|
|
34934
35121
|
KeyValueMapField,
|
|
34935
35122
|
LegendOrderField,
|
|
34936
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "@let f = field();\
|
|
35123
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "@let f = field();\n@switch (f.type) {\n @case (\"text\") {\n <mt-text-field\n [label]=\"f.label\"\n [hint]=\"f.description\"\n [placeholder]=\"f.placeholder ?? ''\"\n [formControl]=\"control\"\n />\n }\n @case (\"cssDimension\") {\n <mt-text-field\n [label]=\"f.label\"\n [hint]=\"f.description\"\n [placeholder]=\"f.placeholder ?? '16px'\"\n [formControl]=\"control\"\n />\n }\n @case (\"multilineText\") {\n <mt-textarea-field\n [label]=\"f.label\"\n [hint]=\"f.description\"\n [placeholder]=\"f.placeholder ?? ''\"\n [formControl]=\"control\"\n />\n }\n @case (\"number\") {\n <mt-number-field\n [label]=\"f.label\"\n [hint]=\"f.description\"\n [min]=\"numberMin\"\n [max]=\"numberMax\"\n [formControl]=\"control\"\n />\n }\n @case (\"numberRange\") {\n <mt-slider-field\n [label]=\"f.label\"\n [min]=\"f.min ?? 0\"\n [max]=\"f.max ?? 100\"\n [step]=\"f.step ?? 1\"\n [unit]=\"f.unit ?? ''\"\n [formControl]=\"control\"\n />\n }\n @case (\"boolean\") {\n <mt-toggle-field\n [label]=\"f.label\"\n toggleShape=\"card\"\n [descriptionCard]=\"f.description ?? ''\"\n [formControl]=\"control\"\n />\n }\n @case (\"color\") {\n <mt-color-picker-field [label]=\"f.label\" [formControl]=\"control\" />\n }\n @case (\"select\") {\n <mt-select-field\n [label]=\"f.label\"\n [hint]=\"f.description\"\n [options]=\"options()\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [filter]=\"useFilter\"\n [placeholder]=\"f.placeholder ?? ''\"\n [formControl]=\"control\"\n />\n }\n @case (\"multiselect\") {\n <mt-multi-select-field\n [label]=\"f.label\"\n [options]=\"options()\"\n optionLabel=\"label\"\n optionValue=\"value\"\n display=\"chip\"\n [formControl]=\"control\"\n />\n }\n @case (\"iconPicker\") {\n <mt-icon-field [label]=\"f.label\" [formControl]=\"control\" />\n }\n @default {\n <!-- Composite + JSON types render their own label header -->\n <div class=\"db-style-field__composite flex flex-col gap-1.5\">\n <span class=\"text-sm font-medium text-color\">{{ f.label }}</span>\n @if (f.description) {\n <span class=\"text-xs text-muted-color\">{{ f.description }}</span>\n }\n @switch (f.type) {\n @case (\"segmented\") {\n <mt-segmented-field\n [options]=\"options()\"\n [value]=\"currentValue()\"\n (valueChange)=\"emitValue($event)\"\n />\n }\n @case (\"palette\") {\n <mt-color-list-field\n [value]=\"readColors()\"\n (valueChange)=\"emitValue($event)\"\n />\n }\n @case (\"colorList\") {\n <mt-color-list-field\n [value]=\"readColors()\"\n (valueChange)=\"emitValue($event)\"\n />\n }\n @case (\"arrayBuilder\") {\n <mt-array-builder-field\n [value]=\"readArray()\"\n [itemFields]=\"arrayItemFields()\"\n [itemTitleKey]=\"f.itemTitleKey\"\n [addLabel]=\"addLabel('Add item')\"\n [maxItems]=\"f.maxItems\"\n (valueChange)=\"emitValue($event)\"\n />\n }\n @case (\"conditionBuilder\") {\n <mt-array-builder-field\n [value]=\"readArray()\"\n [itemFields]=\"conditionFields()\"\n [addLabel]=\"addLabel('Add rule')\"\n (valueChange)=\"emitValue($event)\"\n />\n }\n @case (\"keyValueMap\") {\n <mt-key-value-map-field\n [value]=\"readMapOrArray()\"\n [keys]=\"mapKeys()\"\n [valueFields]=\"mapValueFields()\"\n [asArray]=\"f.asArray ?? false\"\n [collapsibleRows]=\"f.collapsibleRows ?? false\"\n (valueChange)=\"emitValue($event)\"\n />\n }\n @case (\"legendOrder\") {\n <mt-legend-order-field\n [items]=\"legendItems()\"\n [colorOverrides]=\"readLegendColorOverrides()\"\n (valueChange)=\"emitValue($event)\"\n (colorChange)=\"onLegendColorChange($event)\"\n />\n }\n @case (\"entryColors\") {\n <!-- Colors only: no (valueChange), because there is no order to\n persist for this control's charts. -->\n <mt-legend-order-field\n [items]=\"legendItems()\"\n [colorOverrides]=\"readLegendColorOverrides()\"\n [localizedLabels]=\"readOverrideLabels()\"\n [reorderable]=\"false\"\n [showLocalizedLabels]=\"true\"\n [useItemKeyForColor]=\"true\"\n (colorChange)=\"onLegendColorChange($event)\"\n (localizedLabelChange)=\"onEntryLabelChange($event)\"\n />\n }\n @case (\"json\") {\n <mt-textarea-field\n rows=\"8\"\n placeholder=\"{ }\"\n [formControl]=\"jsonControl\"\n />\n @if (jsonError()) {\n <span class=\"text-xs text-red-600\">{{ jsonError() }}</span>\n }\n }\n }\n </div>\n }\n}\n" }]
|
|
34937
35124
|
}], ctorParameters: () => [], propDecorators: { field: [{ type: i0.Input, args: [{ isSignal: true, alias: "field", required: true }] }], persisted: [{ type: i0.Input, args: [{ isSignal: true, alias: "persisted", required: true }] }], capability: [{ type: i0.Input, args: [{ isSignal: true, alias: "capability", required: false }] }], legendItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "legendItems", required: false }] }], patch: [{ type: i0.Output, args: ["patch"] }] } });
|
|
34938
35125
|
|
|
34939
35126
|
/**
|
|
34940
|
-
*
|
|
34941
|
-
*
|
|
34942
|
-
* `visibleWhen` predicates and a free-text `search` filter. Emits `ControlPatch`
|
|
35127
|
+
* Renders the host's visible, localized schema sections as reactive forms.
|
|
35128
|
+
* Emits `ControlPatch`
|
|
34943
35129
|
* upward; the host applies it via `applyControlPatchToPersisted` and re-feeds
|
|
34944
35130
|
* the persisted config (one-way data flow → the live preview reacts).
|
|
34945
35131
|
*/
|
|
@@ -34948,61 +35134,23 @@ class StyleSettingsRenderer {
|
|
|
34948
35134
|
activeLang = toSignal(this.transloco.langChanges$, {
|
|
34949
35135
|
initialValue: this.transloco.getActiveLang(),
|
|
34950
35136
|
});
|
|
34951
|
-
|
|
35137
|
+
visibleSections = input.required(...(ngDevMode ? [{ debugName: "visibleSections" }] : /* istanbul ignore next */ []));
|
|
34952
35138
|
persisted = input.required(...(ngDevMode ? [{ debugName: "persisted" }] : /* istanbul ignore next */ []));
|
|
34953
35139
|
capability = input(null, ...(ngDevMode ? [{ debugName: "capability" }] : /* istanbul ignore next */ []));
|
|
34954
35140
|
scope = input('simple', ...(ngDevMode ? [{ debugName: "scope" }] : /* istanbul ignore next */ []));
|
|
34955
|
-
search = input('', ...(ngDevMode ? [{ debugName: "search" }] : /* istanbul ignore next */ []));
|
|
34956
35141
|
/** Live legend entries forwarded to any legendOrder control. */
|
|
34957
35142
|
legendItems = input([], ...(ngDevMode ? [{ debugName: "legendItems" }] : /* istanbul ignore next */ []));
|
|
34958
35143
|
patch = output();
|
|
34959
35144
|
/** Emitted when the empty-state "switch to Advanced" affordance is used. */
|
|
34960
35145
|
requestScope = output();
|
|
34961
|
-
/**
|
|
35146
|
+
/** Use the exact same section objects as the rail, without relocalizing. */
|
|
34962
35147
|
sections = computed(() => {
|
|
34963
|
-
|
|
34964
|
-
|
|
34965
|
-
|
|
34966
|
-
|
|
34967
|
-
|
|
34968
|
-
|
|
34969
|
-
const query = this.search().trim().toLowerCase();
|
|
34970
|
-
const out = [];
|
|
34971
|
-
for (const section of this.schema().sections) {
|
|
34972
|
-
if (section.visibleWhen && !section.visibleWhen(cfg, cap))
|
|
34973
|
-
continue;
|
|
34974
|
-
const localizedSection = localizeControlSection(section, this.transloco);
|
|
34975
|
-
const sectionMatches = !query || localizedSection.label.toLowerCase().includes(query);
|
|
34976
|
-
const fields = section.fields
|
|
34977
|
-
.map((field, index) => ({
|
|
34978
|
-
field,
|
|
34979
|
-
localized: localizedSection.fields[index],
|
|
34980
|
-
}))
|
|
34981
|
-
.filter(({ field, localized }) => {
|
|
34982
|
-
const fieldScope = field.scope ?? section.scope ?? 'simple';
|
|
34983
|
-
if (scope === 'simple' && fieldScope === 'advanced')
|
|
34984
|
-
return false;
|
|
34985
|
-
if (field.visibleWhen && !field.visibleWhen(cfg, cap))
|
|
34986
|
-
return false;
|
|
34987
|
-
if (query && !sectionMatches) {
|
|
34988
|
-
// Match the user's words against label OR helper description.
|
|
34989
|
-
const hay = `${localized.label} ${localized.description ?? ''}`.toLowerCase();
|
|
34990
|
-
if (!hay.includes(query))
|
|
34991
|
-
return false;
|
|
34992
|
-
}
|
|
34993
|
-
return true;
|
|
34994
|
-
})
|
|
34995
|
-
.map(({ localized }) => localized);
|
|
34996
|
-
if (fields.length) {
|
|
34997
|
-
out.push({
|
|
34998
|
-
section: { ...localizedSection, fields },
|
|
34999
|
-
fields,
|
|
35000
|
-
controls: fields.filter((f) => f.type !== 'boolean'),
|
|
35001
|
-
toggles: fields.filter((f) => f.type === 'boolean'),
|
|
35002
|
-
});
|
|
35003
|
-
}
|
|
35004
|
-
}
|
|
35005
|
-
return out;
|
|
35148
|
+
return this.visibleSections().map((section) => ({
|
|
35149
|
+
section,
|
|
35150
|
+
fields: section.fields,
|
|
35151
|
+
controls: section.fields.filter((field) => field.type !== 'boolean'),
|
|
35152
|
+
toggles: section.fields.filter((field) => field.type === 'boolean'),
|
|
35153
|
+
}));
|
|
35006
35154
|
}, ...(ngDevMode ? [{ debugName: "sections" }] : /* istanbul ignore next */ []));
|
|
35007
35155
|
isEmpty = computed(() => this.sections().length === 0, ...(ngDevMode ? [{ debugName: "isEmpty" }] : /* istanbul ignore next */ []));
|
|
35008
35156
|
/** Composite/full-width field types span both grid columns. */
|
|
@@ -35039,12 +35187,12 @@ class StyleSettingsRenderer {
|
|
|
35039
35187
|
}
|
|
35040
35188
|
}
|
|
35041
35189
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: StyleSettingsRenderer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
35042
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: StyleSettingsRenderer, isStandalone: true, selector: "mt-style-settings-renderer", inputs: {
|
|
35190
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: StyleSettingsRenderer, isStandalone: true, selector: "mt-style-settings-renderer", inputs: { visibleSections: { classPropertyName: "visibleSections", publicName: "visibleSections", isSignal: true, isRequired: true, transformFunction: null }, persisted: { classPropertyName: "persisted", publicName: "persisted", isSignal: true, isRequired: true, transformFunction: null }, capability: { classPropertyName: "capability", publicName: "capability", isSignal: true, isRequired: false, transformFunction: null }, scope: { classPropertyName: "scope", publicName: "scope", isSignal: true, isRequired: false, transformFunction: null }, legendItems: { classPropertyName: "legendItems", publicName: "legendItems", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { patch: "patch", requestScope: "requestScope" }, ngImport: i0, template: "<div class=\"db-style-renderer flex flex-col gap-4\">\r\n @for (entry of sections(); track entry.section.key) {\r\n <section\r\n [id]=\"sectionId(entry.section)\"\r\n class=\"db-style-section scroll-mt-4 overflow-hidden rounded-xl border border-surface-200 bg-surface-0\"\r\n [attr.data-domain]=\"entry.section.domain\"\r\n >\r\n <header\r\n class=\"flex items-center gap-2 border-b border-surface-200 bg-surface-50 px-4 py-3\"\r\n >\r\n <span\r\n class=\"flex h-7 w-7 items-center justify-center rounded-lg bg-primary-100 text-primary-600\"\r\n >\r\n <mt-icon [icon]=\"entry.section.icon\" class=\"text-base\" />\r\n </span>\r\n <div class=\"min-w-0 flex-1\">\r\n <h4\r\n class=\"truncate text-sm font-semibold text-color\"\r\n mtTruncateTooltip\r\n >\r\n {{ entry.section.label }}\r\n </h4>\r\n @if (entry.section.description) {\r\n <p class=\"truncate text-xs text-muted-color\" mtTruncateTooltip>\r\n {{ entry.section.description }}\r\n </p>\r\n }\r\n </div>\r\n <mt-button\r\n icon=\"arrow.refresh-ccw-01\"\r\n severity=\"secondary\"\r\n variant=\"text\"\r\n size=\"small\"\r\n [tooltip]=\"message('resetSection', 'Reset this section')\"\r\n (onClick)=\"resetSection(entry)\"\r\n />\r\n </header>\r\n\r\n @if (entry.controls.length) {\r\n <div class=\"grid grid-cols-1 gap-x-4 gap-y-3 p-4 lg:grid-cols-2\">\r\n @for (field of entry.controls; track field.key) {\r\n <div\r\n class=\"db-style-field flex flex-col\"\r\n [class.lg:col-span-2]=\"isComposite(field)\"\r\n >\r\n <mt-style-field\r\n [field]=\"field\"\r\n [persisted]=\"persisted()\"\r\n [capability]=\"capability()\"\r\n [legendItems]=\"legendItems()\"\r\n (patch)=\"onPatch($event)\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n <!-- Toggles grouped together on their own row, as cards -->\r\n @if (entry.toggles.length) {\r\n <div\r\n class=\"grid grid-cols-1 gap-3 px-4 pb-4 sm:grid-cols-2\"\r\n [class.pt-4]=\"!entry.controls.length\"\r\n >\r\n @for (field of entry.toggles; track field.key) {\r\n <mt-style-field\r\n [field]=\"field\"\r\n [persisted]=\"persisted()\"\r\n [capability]=\"capability()\"\r\n [legendItems]=\"legendItems()\"\r\n (patch)=\"onPatch($event)\"\r\n />\r\n }\r\n </div>\r\n }\r\n </section>\r\n }\r\n\r\n @if (isEmpty()) {\r\n <div\r\n class=\"flex flex-col items-center justify-center rounded-xl border border-dashed border-surface-300 bg-surface-0 p-8 text-center\"\r\n >\r\n <mt-icon\r\n icon=\"general.search-md\"\r\n class=\"mb-2 text-2xl text-muted-color\"\r\n />\r\n <p class=\"text-sm font-medium text-color\">\r\n {{ message(\"noMatchingSettings\", \"No matching settings\") }}\r\n </p>\r\n <p class=\"mt-1 mb-3 text-xs text-muted-color\">\r\n {{ message(\"tryDifferentSearch\", \"Try a different search term.\") }}\r\n </p>\r\n @if (scope() === \"simple\") {\r\n <mt-button\r\n [label]=\"message('showAdvancedSettings', 'Show advanced settings')\"\r\n icon=\"general.settings-01\"\r\n severity=\"secondary\"\r\n variant=\"outlined\"\r\n size=\"small\"\r\n (onClick)=\"requestScope.emit('advanced')\"\r\n />\r\n }\r\n </div>\r\n }\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }, { 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: StyleField, selector: "mt-style-field", inputs: ["field", "persisted", "capability", "legendItems"], outputs: ["patch"] }, { kind: "directive", type: TruncateTooltip, selector: "[mtTruncateTooltip]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
35043
35191
|
}
|
|
35044
35192
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: StyleSettingsRenderer, decorators: [{
|
|
35045
35193
|
type: Component,
|
|
35046
35194
|
args: [{ selector: 'mt-style-settings-renderer', standalone: true, imports: [CommonModule, Icon, Button, StyleField, TruncateTooltip], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div class=\"db-style-renderer flex flex-col gap-4\">\r\n @for (entry of sections(); track entry.section.key) {\r\n <section\r\n [id]=\"sectionId(entry.section)\"\r\n class=\"db-style-section scroll-mt-4 overflow-hidden rounded-xl border border-surface-200 bg-surface-0\"\r\n [attr.data-domain]=\"entry.section.domain\"\r\n >\r\n <header\r\n class=\"flex items-center gap-2 border-b border-surface-200 bg-surface-50 px-4 py-3\"\r\n >\r\n <span\r\n class=\"flex h-7 w-7 items-center justify-center rounded-lg bg-primary-100 text-primary-600\"\r\n >\r\n <mt-icon [icon]=\"entry.section.icon\" class=\"text-base\" />\r\n </span>\r\n <div class=\"min-w-0 flex-1\">\r\n <h4\r\n class=\"truncate text-sm font-semibold text-color\"\r\n mtTruncateTooltip\r\n >\r\n {{ entry.section.label }}\r\n </h4>\r\n @if (entry.section.description) {\r\n <p class=\"truncate text-xs text-muted-color\" mtTruncateTooltip>\r\n {{ entry.section.description }}\r\n </p>\r\n }\r\n </div>\r\n <mt-button\r\n icon=\"arrow.refresh-ccw-01\"\r\n severity=\"secondary\"\r\n variant=\"text\"\r\n size=\"small\"\r\n [tooltip]=\"message('resetSection', 'Reset this section')\"\r\n (onClick)=\"resetSection(entry)\"\r\n />\r\n </header>\r\n\r\n @if (entry.controls.length) {\r\n <div class=\"grid grid-cols-1 gap-x-4 gap-y-3 p-4 lg:grid-cols-2\">\r\n @for (field of entry.controls; track field.key) {\r\n <div\r\n class=\"db-style-field flex flex-col\"\r\n [class.lg:col-span-2]=\"isComposite(field)\"\r\n >\r\n <mt-style-field\r\n [field]=\"field\"\r\n [persisted]=\"persisted()\"\r\n [capability]=\"capability()\"\r\n [legendItems]=\"legendItems()\"\r\n (patch)=\"onPatch($event)\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n <!-- Toggles grouped together on their own row, as cards -->\r\n @if (entry.toggles.length) {\r\n <div\r\n class=\"grid grid-cols-1 gap-3 px-4 pb-4 sm:grid-cols-2\"\r\n [class.pt-4]=\"!entry.controls.length\"\r\n >\r\n @for (field of entry.toggles; track field.key) {\r\n <mt-style-field\r\n [field]=\"field\"\r\n [persisted]=\"persisted()\"\r\n [capability]=\"capability()\"\r\n [legendItems]=\"legendItems()\"\r\n (patch)=\"onPatch($event)\"\r\n />\r\n }\r\n </div>\r\n }\r\n </section>\r\n }\r\n\r\n @if (isEmpty()) {\r\n <div\r\n class=\"flex flex-col items-center justify-center rounded-xl border border-dashed border-surface-300 bg-surface-0 p-8 text-center\"\r\n >\r\n <mt-icon\r\n icon=\"general.search-md\"\r\n class=\"mb-2 text-2xl text-muted-color\"\r\n />\r\n <p class=\"text-sm font-medium text-color\">\r\n {{ message(\"noMatchingSettings\", \"No matching settings\") }}\r\n </p>\r\n <p class=\"mt-1 mb-3 text-xs text-muted-color\">\r\n {{ message(\"tryDifferentSearch\", \"Try a different search term.\") }}\r\n </p>\r\n @if (scope() === \"simple\") {\r\n <mt-button\r\n [label]=\"message('showAdvancedSettings', 'Show advanced settings')\"\r\n icon=\"general.settings-01\"\r\n severity=\"secondary\"\r\n variant=\"outlined\"\r\n size=\"small\"\r\n (onClick)=\"requestScope.emit('advanced')\"\r\n />\r\n }\r\n </div>\r\n }\r\n</div>\r\n" }]
|
|
35047
|
-
}], propDecorators: {
|
|
35195
|
+
}], propDecorators: { visibleSections: [{ type: i0.Input, args: [{ isSignal: true, alias: "visibleSections", required: true }] }], persisted: [{ type: i0.Input, args: [{ isSignal: true, alias: "persisted", required: true }] }], capability: [{ type: i0.Input, args: [{ isSignal: true, alias: "capability", required: false }] }], scope: [{ type: i0.Input, args: [{ isSignal: true, alias: "scope", required: false }] }], legendItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "legendItems", required: false }] }], patch: [{ type: i0.Output, args: ["patch"] }], requestScope: [{ type: i0.Output, args: ["requestScope"] }] } });
|
|
35048
35196
|
|
|
35049
35197
|
/**
|
|
35050
35198
|
* Style Studio — the schema-driven chart style editor.
|
|
@@ -35134,6 +35282,7 @@ class StyleStudioDrawer {
|
|
|
35134
35282
|
this.destroyRef.onDestroy(() => {
|
|
35135
35283
|
if (this.previewSyncTimer)
|
|
35136
35284
|
clearTimeout(this.previewSyncTimer);
|
|
35285
|
+
this.itemStoreService.clearItemStore(this.previewId);
|
|
35137
35286
|
});
|
|
35138
35287
|
// Seed the isolated preview store from the real chart's cached data so the
|
|
35139
35288
|
// preview shows immediately; if not cached, fetch it on the real id.
|
|
@@ -35186,11 +35335,20 @@ class StyleStudioDrawer {
|
|
|
35186
35335
|
const patch = { ConfigurationItem: cfg };
|
|
35187
35336
|
if (raw != null) {
|
|
35188
35337
|
patch.DataResponse = raw;
|
|
35189
|
-
|
|
35190
|
-
|
|
35191
|
-
|
|
35192
|
-
|
|
35193
|
-
|
|
35338
|
+
// Multi-level timeline handling builds a resource hierarchy from the
|
|
35339
|
+
// query and raw rows. Style controls do not change either, so rebuilding
|
|
35340
|
+
// it for every color/text edit can freeze a large timeline preview.
|
|
35341
|
+
const handled = this.itemStoreService.getItemProperty(this.previewId, 'DataHandled');
|
|
35342
|
+
const reuseTimelineData = this.capability()?.id === 'timeline-view-multi-level' &&
|
|
35343
|
+
handled != null &&
|
|
35344
|
+
this.itemStoreService.getItemProperty(this.previewId, 'DataResponse') === raw;
|
|
35345
|
+
if (!reuseTimelineData) {
|
|
35346
|
+
try {
|
|
35347
|
+
patch.DataHandled = this.chartDataService.processChartData(raw, cfg);
|
|
35348
|
+
}
|
|
35349
|
+
catch {
|
|
35350
|
+
/* keep last good handled data */
|
|
35351
|
+
}
|
|
35194
35352
|
}
|
|
35195
35353
|
}
|
|
35196
35354
|
this.itemStoreService.updateStoreForItem(this.previewId, patch);
|
|
@@ -35218,6 +35376,11 @@ class StyleStudioDrawer {
|
|
|
35218
35376
|
});
|
|
35219
35377
|
}, ...(ngDevMode ? [{ debugName: "capability" }] : /* istanbul ignore next */ []));
|
|
35220
35378
|
schema = computed(() => getControlSchema(this.capability()?.id ?? null), ...(ngDevMode ? [{ debugName: "schema" }] : /* istanbul ignore next */ []));
|
|
35379
|
+
/** Translate the schema only when the capability or language changes. */
|
|
35380
|
+
localizedSections = computed(() => {
|
|
35381
|
+
this.activeLang();
|
|
35382
|
+
return this.schema().sections.map((section) => localizeControlSection(section, this.transloco));
|
|
35383
|
+
}, ...(ngDevMode ? [{ debugName: "localizedSections" }] : /* istanbul ignore next */ []));
|
|
35221
35384
|
chartName = computed(() => {
|
|
35222
35385
|
this.activeLang();
|
|
35223
35386
|
const capabilityName = this.capability()?.name;
|
|
@@ -35238,13 +35401,13 @@ class StyleStudioDrawer {
|
|
|
35238
35401
|
if (!cfg)
|
|
35239
35402
|
return [];
|
|
35240
35403
|
const scope = this.scope();
|
|
35241
|
-
this.activeLang();
|
|
35242
35404
|
const query = this.search().trim().toLowerCase();
|
|
35243
35405
|
const out = [];
|
|
35244
|
-
|
|
35406
|
+
const localizedSections = this.localizedSections();
|
|
35407
|
+
for (const [index, section] of this.schema().sections.entries()) {
|
|
35245
35408
|
if (section.visibleWhen && !section.visibleWhen(cfg, cap))
|
|
35246
35409
|
continue;
|
|
35247
|
-
const localized =
|
|
35410
|
+
const localized = localizedSections[index];
|
|
35248
35411
|
const sectionMatches = !query || localized.label.toLowerCase().includes(query);
|
|
35249
35412
|
const fields = section.fields
|
|
35250
35413
|
.map((field, index) => ({ field, localized: localized.fields[index] }))
|
|
@@ -35468,7 +35631,7 @@ class StyleStudioDrawer {
|
|
|
35468
35631
|
return out === full ? fallback : out;
|
|
35469
35632
|
}
|
|
35470
35633
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: StyleStudioDrawer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
35471
|
-
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\
|
|
35634
|
+
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 });
|
|
35472
35635
|
}
|
|
35473
35636
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: StyleStudioDrawer, decorators: [{
|
|
35474
35637
|
type: Component,
|
|
@@ -35483,7 +35646,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
35483
35646
|
StyleSettingsRenderer,
|
|
35484
35647
|
SegmentedField,
|
|
35485
35648
|
ChartViewer,
|
|
35486
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div\
|
|
35649
|
+
], 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"] }]
|
|
35487
35650
|
}], ctorParameters: () => [], propDecorators: { scrollPane: [{ type: i0.ViewChild, args: ['scrollPane', { isSignal: true }] }], previewViewer: [{ type: i0.ViewChild, args: [i0.forwardRef(() => ChartViewer), { isSignal: true }] }] } });
|
|
35488
35651
|
|
|
35489
35652
|
/**
|
|
@@ -36225,7 +36388,7 @@ class SourceLinkConfiguration {
|
|
|
36225
36388
|
useExisting: forwardRef(() => SourceLinkConfiguration),
|
|
36226
36389
|
multi: true,
|
|
36227
36390
|
},
|
|
36228
|
-
], ngImport: i0, template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\r\n <mt-card [title]=\"t('sourceLinks')\">\r\n <ng-template #cardEnd>\r\n <mt-button\r\n icon=\"general.plus\"\r\n [outlined]=\"true\"\r\n size=\"small\"\r\n (onClick)=\"addSourceLink()\"\r\n [disabled]=\"disabled\"\r\n [pTooltip]=\"t('addSourceLink')\"\r\n />\r\n </ng-template>\r\n\r\n <div class=\"flex flex-col gap-4\" [formGroup]=\"sourceLinksForm\">\r\n <div formArrayName=\"sourceLinks\">\r\n @for (\r\n link of sourceLinksArray.controls;\r\n track trackByIndex(i);\r\n let i = $index;\r\n let first = $first\r\n ) {\r\n <div\r\n class=\"p-4 rounded-lg border transition-all mb-4 last:mb-0\"\r\n [class.border-red-500]=\"link.invalid\"\r\n [class.border-surface-200]=\"!link.invalid\"\r\n [formGroupName]=\"i\"\r\n >\r\n <!-- Link Header with Type Tabs -->\r\n <div class=\"flex items-center justify-between mb-4\">\r\n <div class=\"flex items-center gap-3\">\r\n <span\r\n class=\"inline-flex items-center justify-center w-6 h-6 rounded-full bg-primary-100 text-primary-600 text-sm font-semibold\"\r\n >\r\n {{ i + 1 }}\r\n </span>\r\n\r\n <!-- Link Type Tabs (only show for non-first links) -->\r\n @if (!first) {\r\n <mt-tabs\r\n [active]=\"getLinkType(i)\"\r\n (activeChange)=\"onLinkTypeChange(i, $event)\"\r\n [options]=\"getLinkTypeOptions(i)\"\r\n size=\"small\"\r\n />\r\n } @else {\r\n <span class=\"text-sm font-medium text-muted-color\">\r\n {{ t(\"selectionToSelection\") }}\r\n </span>\r\n }\r\n </div>\r\n\r\n <mt-button\r\n icon=\"general.trash-01\"\r\n severity=\"danger\"\r\n [text]=\"true\"\r\n size=\"small\"\r\n [disabled]=\"disabled\"\r\n (onClick)=\"removeSourceLink(i)\"\r\n />\r\n </div>\r\n\r\n <!-- Source Selections based on link type -->\r\n @if (getLinkType(i) === \"selection\") {\r\n <!-- Selection to Selection Mode -->\r\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4\">\r\n <!-- Source 1 Selection -->\r\n <mt-select-field\r\n [label]=\"t('source1')\"\r\n formControlName=\"source1SelectionId\"\r\n [options]=\"selectionOptions()\"\r\n optionLabel=\"displayName\"\r\n optionValue=\"selectionId\"\r\n [placeholder]=\"t('selectSource')\"\r\n (ngModelChange)=\"onSourceChange(i)\"\r\n />\r\n\r\n <!-- Source 2 Selection -->\r\n <mt-select-field\r\n [label]=\"t('source2')\"\r\n formControlName=\"source2SelectionId\"\r\n [options]=\"selectionOptions()\"\r\n optionLabel=\"displayName\"\r\n optionValue=\"selectionId\"\r\n [placeholder]=\"t('selectSource')\"\r\n (ngModelChange)=\"onSourceChange(i)\"\r\n />\r\n </div>\r\n } @else {\r\n <!-- Chained Mode: Previous Link to Selection -->\r\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4\">\r\n <!-- Source Link (previous link) -->\r\n <mt-select-field\r\n [label]=\"t('previousLink')\"\r\n formControlName=\"sourceLinkId\"\r\n [options]=\"getAvailableSourceLinks(i)\"\r\n optionLabel=\"displayName\"\r\n optionValue=\"index\"\r\n [placeholder]=\"t('selectPreviousLink')\"\r\n (ngModelChange)=\"onSourceChange(i)\"\r\n />\r\n\r\n <!-- Source 2 Selection -->\r\n <mt-select-field\r\n [label]=\"t('source2')\"\r\n formControlName=\"source2SelectionId\"\r\n [options]=\"selectionOptions()\"\r\n optionLabel=\"displayName\"\r\n optionValue=\"selectionId\"\r\n [placeholder]=\"t('selectSource')\"\r\n (ngModelChange)=\"onSourceChange(i)\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- Link Properties -->\r\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4\">\r\n <!-- Source 1 Property -->\r\n <mt-select-field\r\n [label]=\"t('source1LinkProperty')\"\r\n formControlName=\"source1PropertyKey\"\r\n [options]=\"getSource1PropertiesGrouped(i)\"\r\n [group]=\"true\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [placeholder]=\"t('selectProperty')\"\r\n [filter]=\"true\"\r\n />\r\n\r\n <!-- Source 2 Property -->\r\n <mt-select-field\r\n [label]=\"t('source2LinkProperty')\"\r\n formControlName=\"source2PropertyKey\"\r\n [options]=\"getSource2PropertiesGrouped(i)\"\r\n [group]=\"true\"\r\n optionLabel=\"name\"\r\n optionValue=\"key\"\r\n optionGroupLabel=\"label\"\r\n optionGroupChildren=\"items\"\r\n [placeholder]=\"t('selectProperty')\"\r\n [filter]=\"true\"\r\n />\r\n </div>\r\n\r\n <!-- Join Options -->\r\n <div class=\"flex items-center gap-6\">\r\n <mt-toggle-field\r\n [label]=\"t('isLeftJoin')\"\r\n formControlName=\"isLeftJoin\"\r\n />\r\n <mt-toggle-field\r\n [label]=\"t('isFilterLinkage')\"\r\n formControlName=\"isFilterLinkage\"\r\n />\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n\r\n @if (sourceLinksArray.length === 0) {\r\n <div class=\"text-center py-8 text-muted-color\">\r\n <i class=\"mti mti-link-01 text-3xl mb-2 block\"></i>\r\n <p class=\"mb-2\">{{ t(\"noSourceLinksConfigured\") }}</p>\r\n <mt-button\r\n icon=\"general.plus\"\r\n [label]=\"t('addSourceLink')\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [disabled]=\"disabled\"\r\n (onClick)=\"addSourceLink()\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n </mt-card>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: SelectField, selector: "mt-select-field", inputs: ["field", "hint", "label", "placeholder", "hasPlaceholderPrefix", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "clearAfterSelect", "required", "group", "size", "optionGroupLabel", "optionGroupChildren", "loading", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape", "markCurrentUser"], outputs: ["onChange"] }, { kind: "component", type: ToggleField, selector: "mt-toggle-field", inputs: ["label", "inputId", "labelPosition", "placeholder", "readonly", "pInputs", "required", "toggleShape", "size", "icon", "descriptionCard"], outputs: ["onChange"] }, { kind: "component", type: Card, selector: "mt-card", inputs: ["class", "title", "paddingless"] }, { kind: "component", type: Tabs, selector: "mt-tabs", inputs: ["options", "optionLabel", "optionValue", "active", "mode", "moreLabel", "defaultIcon", "size", "fluid", "disabled", "searchThreshold"], outputs: ["activeChange", "onChange"] }, { kind: "directive", type: Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "showOnEllipsis", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip", "pTooltipPT", "pTooltipUnstyled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
36391
|
+
], ngImport: i0, template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\n <mt-card [title]=\"t('sourceLinks')\">\n <ng-template #cardEnd>\n <mt-button\n icon=\"general.plus\"\n [outlined]=\"true\"\n size=\"small\"\n (onClick)=\"addSourceLink()\"\n [disabled]=\"disabled\"\n [pTooltip]=\"t('addSourceLink')\"\n />\n </ng-template>\n\n <div class=\"flex flex-col gap-4\" [formGroup]=\"sourceLinksForm\">\n <div formArrayName=\"sourceLinks\">\n @for (\n link of sourceLinksArray.controls;\n track trackByIndex(i);\n let i = $index;\n let first = $first\n ) {\n <div\n class=\"p-4 rounded-lg border transition-all mb-4 last:mb-0\"\n [class.border-red-500]=\"link.invalid\"\n [class.border-surface-200]=\"!link.invalid\"\n [formGroupName]=\"i\"\n >\n <!-- Link Header with Type Tabs -->\n <div class=\"flex items-center justify-between mb-4\">\n <div class=\"flex items-center gap-3\">\n <span\n class=\"inline-flex items-center justify-center w-6 h-6 rounded-full bg-primary-100 text-primary-600 text-sm font-semibold\"\n >\n {{ i + 1 }}\n </span>\n\n <!-- Link Type Tabs (only show for non-first links) -->\n @if (!first) {\n <mt-tabs\n [active]=\"getLinkType(i)\"\n (activeChange)=\"onLinkTypeChange(i, $event)\"\n [options]=\"getLinkTypeOptions(i)\"\n size=\"small\"\n />\n } @else {\n <span class=\"text-sm font-medium text-muted-color\">\n {{ t(\"selectionToSelection\") }}\n </span>\n }\n </div>\n\n <mt-button\n icon=\"general.trash-01\"\n severity=\"danger\"\n [text]=\"true\"\n size=\"small\"\n [disabled]=\"disabled\"\n (onClick)=\"removeSourceLink(i)\"\n />\n </div>\n\n <!-- Source Selections based on link type -->\n @if (getLinkType(i) === \"selection\") {\n <!-- Selection to Selection Mode -->\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4\">\n <!-- Source 1 Selection -->\n <mt-select-field\n [label]=\"t('source1')\"\n formControlName=\"source1SelectionId\"\n [options]=\"selectionOptions()\"\n optionLabel=\"displayName\"\n optionValue=\"selectionId\"\n [placeholder]=\"t('selectSource')\"\n (ngModelChange)=\"onSourceChange(i)\"\n />\n\n <!-- Source 2 Selection -->\n <mt-select-field\n [label]=\"t('source2')\"\n formControlName=\"source2SelectionId\"\n [options]=\"selectionOptions()\"\n optionLabel=\"displayName\"\n optionValue=\"selectionId\"\n [placeholder]=\"t('selectSource')\"\n (ngModelChange)=\"onSourceChange(i)\"\n />\n </div>\n } @else {\n <!-- Chained Mode: Previous Link to Selection -->\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4\">\n <!-- Source Link (previous link) -->\n <mt-select-field\n [label]=\"t('previousLink')\"\n formControlName=\"sourceLinkId\"\n [options]=\"getAvailableSourceLinks(i)\"\n optionLabel=\"displayName\"\n optionValue=\"index\"\n [placeholder]=\"t('selectPreviousLink')\"\n (ngModelChange)=\"onSourceChange(i)\"\n />\n\n <!-- Source 2 Selection -->\n <mt-select-field\n [label]=\"t('source2')\"\n formControlName=\"source2SelectionId\"\n [options]=\"selectionOptions()\"\n optionLabel=\"displayName\"\n optionValue=\"selectionId\"\n [placeholder]=\"t('selectSource')\"\n (ngModelChange)=\"onSourceChange(i)\"\n />\n </div>\n }\n\n <!-- Link Properties -->\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4\">\n <!-- Source 1 Property -->\n <mt-select-field\n [label]=\"t('source1LinkProperty')\"\n formControlName=\"source1PropertyKey\"\n [options]=\"getSource1PropertiesGrouped(i)\"\n [group]=\"true\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [placeholder]=\"t('selectProperty')\"\n [filter]=\"true\"\n />\n\n <!-- Source 2 Property -->\n <mt-select-field\n [label]=\"t('source2LinkProperty')\"\n formControlName=\"source2PropertyKey\"\n [options]=\"getSource2PropertiesGrouped(i)\"\n [group]=\"true\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [placeholder]=\"t('selectProperty')\"\n [filter]=\"true\"\n />\n </div>\n\n <!-- Join Options -->\n <div class=\"flex items-center gap-6\">\n <mt-toggle-field\n [label]=\"t('isLeftJoin')\"\n formControlName=\"isLeftJoin\"\n />\n <mt-toggle-field\n [label]=\"t('isFilterLinkage')\"\n formControlName=\"isFilterLinkage\"\n />\n </div>\n </div>\n }\n </div>\n\n @if (sourceLinksArray.length === 0) {\n <div class=\"text-center py-8 text-muted-color\">\n <i class=\"mti mti-link-01 text-3xl mb-2 block\"></i>\n <p class=\"mb-2\">{{ t(\"noSourceLinksConfigured\") }}</p>\n <mt-button\n icon=\"general.plus\"\n [label]=\"t('addSourceLink')\"\n severity=\"secondary\"\n size=\"small\"\n [disabled]=\"disabled\"\n (onClick)=\"addSourceLink()\"\n />\n </div>\n }\n </div>\n </mt-card>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: SelectField, selector: "mt-select-field", inputs: ["field", "hint", "label", "placeholder", "hasPlaceholderPrefix", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "clearAfterSelect", "required", "group", "size", "optionGroupLabel", "optionGroupChildren", "loading", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape", "markCurrentUser"], outputs: ["onChange"] }, { kind: "component", type: ToggleField, selector: "mt-toggle-field", inputs: ["label", "inputId", "labelPosition", "placeholder", "readonly", "pInputs", "required", "toggleShape", "size", "icon", "descriptionCard"], outputs: ["onChange"] }, { kind: "component", type: Card, selector: "mt-card", inputs: ["class", "title", "paddingless"] }, { kind: "component", type: Tabs, selector: "mt-tabs", inputs: ["options", "optionLabel", "optionValue", "active", "mode", "moreLabel", "defaultIcon", "size", "fluid", "disabled", "searchThreshold"], outputs: ["activeChange", "onChange"] }, { kind: "directive", type: Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "showOnEllipsis", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip", "pTooltipPT", "pTooltipUnstyled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
36229
36392
|
}
|
|
36230
36393
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SourceLinkConfiguration, decorators: [{
|
|
36231
36394
|
type: Component,
|
|
@@ -36251,7 +36414,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
36251
36414
|
useExisting: forwardRef(() => SourceLinkConfiguration),
|
|
36252
36415
|
multi: true,
|
|
36253
36416
|
},
|
|
36254
|
-
], template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\
|
|
36417
|
+
], template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\n <mt-card [title]=\"t('sourceLinks')\">\n <ng-template #cardEnd>\n <mt-button\n icon=\"general.plus\"\n [outlined]=\"true\"\n size=\"small\"\n (onClick)=\"addSourceLink()\"\n [disabled]=\"disabled\"\n [pTooltip]=\"t('addSourceLink')\"\n />\n </ng-template>\n\n <div class=\"flex flex-col gap-4\" [formGroup]=\"sourceLinksForm\">\n <div formArrayName=\"sourceLinks\">\n @for (\n link of sourceLinksArray.controls;\n track trackByIndex(i);\n let i = $index;\n let first = $first\n ) {\n <div\n class=\"p-4 rounded-lg border transition-all mb-4 last:mb-0\"\n [class.border-red-500]=\"link.invalid\"\n [class.border-surface-200]=\"!link.invalid\"\n [formGroupName]=\"i\"\n >\n <!-- Link Header with Type Tabs -->\n <div class=\"flex items-center justify-between mb-4\">\n <div class=\"flex items-center gap-3\">\n <span\n class=\"inline-flex items-center justify-center w-6 h-6 rounded-full bg-primary-100 text-primary-600 text-sm font-semibold\"\n >\n {{ i + 1 }}\n </span>\n\n <!-- Link Type Tabs (only show for non-first links) -->\n @if (!first) {\n <mt-tabs\n [active]=\"getLinkType(i)\"\n (activeChange)=\"onLinkTypeChange(i, $event)\"\n [options]=\"getLinkTypeOptions(i)\"\n size=\"small\"\n />\n } @else {\n <span class=\"text-sm font-medium text-muted-color\">\n {{ t(\"selectionToSelection\") }}\n </span>\n }\n </div>\n\n <mt-button\n icon=\"general.trash-01\"\n severity=\"danger\"\n [text]=\"true\"\n size=\"small\"\n [disabled]=\"disabled\"\n (onClick)=\"removeSourceLink(i)\"\n />\n </div>\n\n <!-- Source Selections based on link type -->\n @if (getLinkType(i) === \"selection\") {\n <!-- Selection to Selection Mode -->\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4\">\n <!-- Source 1 Selection -->\n <mt-select-field\n [label]=\"t('source1')\"\n formControlName=\"source1SelectionId\"\n [options]=\"selectionOptions()\"\n optionLabel=\"displayName\"\n optionValue=\"selectionId\"\n [placeholder]=\"t('selectSource')\"\n (ngModelChange)=\"onSourceChange(i)\"\n />\n\n <!-- Source 2 Selection -->\n <mt-select-field\n [label]=\"t('source2')\"\n formControlName=\"source2SelectionId\"\n [options]=\"selectionOptions()\"\n optionLabel=\"displayName\"\n optionValue=\"selectionId\"\n [placeholder]=\"t('selectSource')\"\n (ngModelChange)=\"onSourceChange(i)\"\n />\n </div>\n } @else {\n <!-- Chained Mode: Previous Link to Selection -->\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4\">\n <!-- Source Link (previous link) -->\n <mt-select-field\n [label]=\"t('previousLink')\"\n formControlName=\"sourceLinkId\"\n [options]=\"getAvailableSourceLinks(i)\"\n optionLabel=\"displayName\"\n optionValue=\"index\"\n [placeholder]=\"t('selectPreviousLink')\"\n (ngModelChange)=\"onSourceChange(i)\"\n />\n\n <!-- Source 2 Selection -->\n <mt-select-field\n [label]=\"t('source2')\"\n formControlName=\"source2SelectionId\"\n [options]=\"selectionOptions()\"\n optionLabel=\"displayName\"\n optionValue=\"selectionId\"\n [placeholder]=\"t('selectSource')\"\n (ngModelChange)=\"onSourceChange(i)\"\n />\n </div>\n }\n\n <!-- Link Properties -->\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4\">\n <!-- Source 1 Property -->\n <mt-select-field\n [label]=\"t('source1LinkProperty')\"\n formControlName=\"source1PropertyKey\"\n [options]=\"getSource1PropertiesGrouped(i)\"\n [group]=\"true\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [placeholder]=\"t('selectProperty')\"\n [filter]=\"true\"\n />\n\n <!-- Source 2 Property -->\n <mt-select-field\n [label]=\"t('source2LinkProperty')\"\n formControlName=\"source2PropertyKey\"\n [options]=\"getSource2PropertiesGrouped(i)\"\n [group]=\"true\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [placeholder]=\"t('selectProperty')\"\n [filter]=\"true\"\n />\n </div>\n\n <!-- Join Options -->\n <div class=\"flex items-center gap-6\">\n <mt-toggle-field\n [label]=\"t('isLeftJoin')\"\n formControlName=\"isLeftJoin\"\n />\n <mt-toggle-field\n [label]=\"t('isFilterLinkage')\"\n formControlName=\"isFilterLinkage\"\n />\n </div>\n </div>\n }\n </div>\n\n @if (sourceLinksArray.length === 0) {\n <div class=\"text-center py-8 text-muted-color\">\n <i class=\"mti mti-link-01 text-3xl mb-2 block\"></i>\n <p class=\"mb-2\">{{ t(\"noSourceLinksConfigured\") }}</p>\n <mt-button\n icon=\"general.plus\"\n [label]=\"t('addSourceLink')\"\n severity=\"secondary\"\n size=\"small\"\n [disabled]=\"disabled\"\n (onClick)=\"addSourceLink()\"\n />\n </div>\n }\n </div>\n </mt-card>\n</div>\n" }]
|
|
36255
36418
|
}], ctorParameters: () => [], propDecorators: { selectionModules: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionModules", required: false }] }] } });
|
|
36256
36419
|
|
|
36257
36420
|
/**
|
|
@@ -36317,7 +36480,7 @@ class CustomApiConfiguration {
|
|
|
36317
36480
|
useExisting: forwardRef(() => CustomApiConfiguration),
|
|
36318
36481
|
multi: true,
|
|
36319
36482
|
},
|
|
36320
|
-
], ngImport: i0, template: "<mt-card\
|
|
36483
|
+
], 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 });
|
|
36321
36484
|
}
|
|
36322
36485
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CustomApiConfiguration, decorators: [{
|
|
36323
36486
|
type: Component,
|
|
@@ -36334,7 +36497,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
36334
36497
|
useExisting: forwardRef(() => CustomApiConfiguration),
|
|
36335
36498
|
multi: true,
|
|
36336
36499
|
},
|
|
36337
|
-
], template: "<mt-card\
|
|
36500
|
+
], 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" }]
|
|
36338
36501
|
}] });
|
|
36339
36502
|
|
|
36340
36503
|
/**
|
|
@@ -37519,7 +37682,7 @@ class TimelineQuery {
|
|
|
37519
37682
|
useExisting: forwardRef(() => TimelineQuery),
|
|
37520
37683
|
multi: true,
|
|
37521
37684
|
},
|
|
37522
|
-
], ngImport: i0, template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\
|
|
37685
|
+
], 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 });
|
|
37523
37686
|
}
|
|
37524
37687
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TimelineQuery, decorators: [{
|
|
37525
37688
|
type: Component,
|
|
@@ -37535,7 +37698,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
37535
37698
|
useExisting: forwardRef(() => TimelineQuery),
|
|
37536
37699
|
multi: true,
|
|
37537
37700
|
},
|
|
37538
|
-
], template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\
|
|
37701
|
+
], 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" }]
|
|
37539
37702
|
}], propDecorators: { propertiesFlat: [{ type: i0.Input, args: [{ isSignal: true, alias: "propertiesFlat", required: false }] }], propertiesGrouped: [{ type: i0.Input, args: [{ isSignal: true, alias: "propertiesGrouped", required: false }] }] } });
|
|
37540
37703
|
|
|
37541
37704
|
/**
|
|
@@ -37979,7 +38142,7 @@ class MapQuery {
|
|
|
37979
38142
|
useExisting: forwardRef(() => MapQuery),
|
|
37980
38143
|
multi: true,
|
|
37981
38144
|
},
|
|
37982
|
-
], ngImport: i0, template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\
|
|
38145
|
+
], ngImport: i0, template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n <!-- Location Property -->\n <mt-select-field\n [label]=\"t('locationProperty')\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('selectProperty')\"\n [ngModel]=\"query().locationProperty\"\n (ngModelChange)=\"updateField('locationProperty', $event)\"\n [disabled]=\"disabled\"\n />\n\n <!-- Grouping Property -->\n <mt-select-field\n [label]=\"t('groupingProperty')\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('selectProperty')\"\n [ngModel]=\"query().groupingProperty\"\n (ngModelChange)=\"updateField('groupingProperty', $event)\"\n [disabled]=\"disabled\"\n />\n </div>\n\n <!-- Extra Properties -->\n <div class=\"w-full\">\n <mt-multi-select-field\n [label]=\"t('extraProperties')\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('selectProperties')\"\n [ngModel]=\"query().extraProperties\"\n (ngModelChange)=\"updateField('extraProperties', $event)\"\n [disabled]=\"disabled\"\n />\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: SelectField, selector: "mt-select-field", inputs: ["field", "hint", "label", "placeholder", "hasPlaceholderPrefix", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "clearAfterSelect", "required", "group", "size", "optionGroupLabel", "optionGroupChildren", "loading", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape", "markCurrentUser"], outputs: ["onChange"] }, { kind: "component", type: MultiSelectField, selector: "mt-multi-select-field", inputs: ["field", "label", "placeholder", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "display", "required", "maxSelectedLabels", "group", "virtualScroll", "virtualScrollItemSize", "optionGroupLabel", "optionGroupChildren", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape"], outputs: ["onChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
37983
38146
|
}
|
|
37984
38147
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: MapQuery, decorators: [{
|
|
37985
38148
|
type: Component,
|
|
@@ -37995,7 +38158,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
37995
38158
|
useExisting: forwardRef(() => MapQuery),
|
|
37996
38159
|
multi: true,
|
|
37997
38160
|
},
|
|
37998
|
-
], template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\
|
|
38161
|
+
], template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n <!-- Location Property -->\n <mt-select-field\n [label]=\"t('locationProperty')\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('selectProperty')\"\n [ngModel]=\"query().locationProperty\"\n (ngModelChange)=\"updateField('locationProperty', $event)\"\n [disabled]=\"disabled\"\n />\n\n <!-- Grouping Property -->\n <mt-select-field\n [label]=\"t('groupingProperty')\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('selectProperty')\"\n [ngModel]=\"query().groupingProperty\"\n (ngModelChange)=\"updateField('groupingProperty', $event)\"\n [disabled]=\"disabled\"\n />\n </div>\n\n <!-- Extra Properties -->\n <div class=\"w-full\">\n <mt-multi-select-field\n [label]=\"t('extraProperties')\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('selectProperties')\"\n [ngModel]=\"query().extraProperties\"\n (ngModelChange)=\"updateField('extraProperties', $event)\"\n [disabled]=\"disabled\"\n />\n </div>\n</div>\n" }]
|
|
37999
38162
|
}], propDecorators: { propertiesFlat: [{ type: i0.Input, args: [{ isSignal: true, alias: "propertiesFlat", required: false }] }], propertiesGrouped: [{ type: i0.Input, args: [{ isSignal: true, alias: "propertiesGrouped", required: false }] }] } });
|
|
38000
38163
|
|
|
38001
38164
|
/**
|
|
@@ -38069,7 +38232,7 @@ class SplitterQuery {
|
|
|
38069
38232
|
useExisting: forwardRef(() => SplitterQuery),
|
|
38070
38233
|
multi: true,
|
|
38071
38234
|
},
|
|
38072
|
-
], ngImport: i0, template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\
|
|
38235
|
+
], ngImport: i0, template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\n <!-- Pivot Property -->\n <mt-select-field\n [label]=\"t('pivotProperty')\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('selectProperty')\"\n [ngModel]=\"query().pivotProperty\"\n (ngModelChange)=\"updateField('pivotProperty', $event)\"\n [disabled]=\"disabled\"\n />\n\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n <!-- Positive Values -->\n <mt-text-field\n [label]=\"t('positiveValues')\"\n [placeholder]=\"t('enterValuesCommaSeparated')\"\n [ngModel]=\"getArrayAsString('PositiveValues')\"\n (ngModelChange)=\"updateArrayFromString('PositiveValues', $event)\"\n [disabled]=\"disabled\"\n />\n\n <!-- Negative Values -->\n <mt-text-field\n [label]=\"t('negativeValues')\"\n [placeholder]=\"t('enterValuesCommaSeparated')\"\n [ngModel]=\"getArrayAsString('NegativeValues')\"\n (ngModelChange)=\"updateArrayFromString('NegativeValues', $event)\"\n [disabled]=\"disabled\"\n />\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: SelectField, selector: "mt-select-field", inputs: ["field", "hint", "label", "placeholder", "hasPlaceholderPrefix", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "clearAfterSelect", "required", "group", "size", "optionGroupLabel", "optionGroupChildren", "loading", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape", "markCurrentUser"], outputs: ["onChange"] }, { kind: "component", type: TextField, selector: "mt-text-field", inputs: ["field", "hint", "label", "placeholder", "class", "type", "readonly", "pInputs", "required", "maxLength", "icon", "iconPosition"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
38073
38236
|
}
|
|
38074
38237
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SplitterQuery, decorators: [{
|
|
38075
38238
|
type: Component,
|
|
@@ -38085,7 +38248,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
38085
38248
|
useExisting: forwardRef(() => SplitterQuery),
|
|
38086
38249
|
multi: true,
|
|
38087
38250
|
},
|
|
38088
|
-
], template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\
|
|
38251
|
+
], template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\n <!-- Pivot Property -->\n <mt-select-field\n [label]=\"t('pivotProperty')\"\n [options]=\"useGroupedSelect() ? propertiesGrouped() : propertiesFlat()\"\n [group]=\"useGroupedSelect()\"\n optionLabel=\"name\"\n optionValue=\"key\"\n optionGroupLabel=\"label\"\n optionGroupChildren=\"items\"\n [filter]=\"true\"\n [placeholder]=\"t('selectProperty')\"\n [ngModel]=\"query().pivotProperty\"\n (ngModelChange)=\"updateField('pivotProperty', $event)\"\n [disabled]=\"disabled\"\n />\n\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n <!-- Positive Values -->\n <mt-text-field\n [label]=\"t('positiveValues')\"\n [placeholder]=\"t('enterValuesCommaSeparated')\"\n [ngModel]=\"getArrayAsString('PositiveValues')\"\n (ngModelChange)=\"updateArrayFromString('PositiveValues', $event)\"\n [disabled]=\"disabled\"\n />\n\n <!-- Negative Values -->\n <mt-text-field\n [label]=\"t('negativeValues')\"\n [placeholder]=\"t('enterValuesCommaSeparated')\"\n [ngModel]=\"getArrayAsString('NegativeValues')\"\n (ngModelChange)=\"updateArrayFromString('NegativeValues', $event)\"\n [disabled]=\"disabled\"\n />\n </div>\n</div>\n" }]
|
|
38089
38252
|
}], propDecorators: { propertiesFlat: [{ type: i0.Input, args: [{ isSignal: true, alias: "propertiesFlat", required: false }] }], propertiesGrouped: [{ type: i0.Input, args: [{ isSignal: true, alias: "propertiesGrouped", required: false }] }] } });
|
|
38090
38253
|
|
|
38091
38254
|
class InformativeContextSelection {
|
|
@@ -39597,7 +39760,7 @@ class ManageItem {
|
|
|
39597
39760
|
this._manageItemService.updateServiceConfig(partialConfig);
|
|
39598
39761
|
}
|
|
39599
39762
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ManageItem, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
39600
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: ManageItem, isStandalone: true, selector: "mt-manage-item", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null } }, providers: [ManageItemService], ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'dashboardBuilder'\">\r\n <div class=\"flex flex-col h-full\" [class]=\"modal.contentClass\">\r\n <div class=\"flex flex-1 min-h-0\">\r\n <!-- Left: Datasource configuration -->\r\n <div\r\n class=\"db-sectioned-drawer flex min-w-0 flex-col\"\r\n [class.flex-1]=\"previewCollapsed()\"\r\n [class.border-r]=\"!previewCollapsed()\"\r\n [class.border-surface-200]=\"!previewCollapsed()\"\r\n [style.width]=\"previewCollapsed() ? '100%' : '60%'\"\r\n >\r\n <!-- Header: chart type badge + preview toggle -->\r\n <div\r\n class=\"flex items-center gap-2 border-b border-surface-200 bg-surface-50 px-4 py-2.5\"\r\n >\r\n @if (selectedChartType()) {\r\n <span\r\n class=\"flex h-9 w-9 items-center justify-center rounded-lg bg-primary-100 text-primary-600\"\r\n >\r\n <mt-icon [icon]=\"selectedChartType()?.icon\" class=\"text-lg\" />\r\n </span>\r\n <div class=\"min-w-0 flex-1\">\r\n <h3 class=\"truncate text-sm font-semibold text-surface-700\">\r\n {{ isNew() ? t(\"newItem\") : t(\"editItem\") }}\r\n </h3>\r\n <p class=\"truncate text-xs text-muted-color\">\r\n {{ selectedChartType()?.name }}\r\n </p>\r\n </div>\r\n } @else {\r\n <div class=\"flex-1\"></div>\r\n }\r\n\r\n <mt-button\r\n [label]=\"previewCollapsed() ? t('showPreview') : t('hidePreview')\"\r\n [icon]=\"previewCollapsed() ? 'general.eye' : 'general.eye-off'\"\r\n severity=\"secondary\"\r\n variant=\"outlined\"\r\n size=\"small\"\r\n (onClick)=\"togglePreview()\"\r\n />\r\n </div>\r\n\r\n <!-- Datasource is intentionally the only concern in this drawer. -->\r\n <div class=\"flex-1 overflow-auto p-4\">\r\n <mt-data-source-settings\r\n [config]=\"config()\"\r\n [chartType]=\"selectedChartType()\"\r\n [informativeContext]=\"informativeContext()\"\r\n (serviceConfigChange)=\"onServiceConfigUpdate($event)\"\r\n />\r\n </div>\r\n </div>\r\n\r\n <!-- Right: collapsible chart preview -->\r\n @if (!previewCollapsed()) {\r\n <div class=\"h-full min-w-[350px]\" [style.width]=\"'40%'\">\r\n <mt-chart-viewer [config]=\"config()\" [chartTypeId]=\"chartTypeId()\" />\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n\r\n <!-- Footer -->\r\n <div [class]=\"modal.footerClass\">\r\n <!-- Validation Status -->\r\n <div class=\"flex items-center gap-2 text-sm flex-1\">\r\n @if (isValid()) {\r\n <span class=\"flex items-center gap-1 text-green-600\">\r\n <mt-icon icon=\"general.check-circle\" class=\"text-base\" />\r\n {{ t(\"ready\") }}\r\n </span>\r\n } @else {\r\n <span class=\"flex items-center gap-1 text-amber-600\">\r\n <mt-icon icon=\"general.alert-circle\" class=\"text-base\" />\r\n {{ t(\"incomplete\") }}\r\n </span>\r\n }\r\n </div>\r\n\r\n <mt-button [label]=\"t('cancel')\" variant=\"outlined\" (onClick)=\"cancel()\" />\r\n <mt-button\r\n [label]=\"t('save')\"\r\n icon=\"general.save-02\"\r\n [loading]=\"saving()\"\r\n [disabled]=\"!isValid()\"\r\n (onClick)=\"save()\"\r\n />\r\n </div>\r\n</ng-container>\r\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: DataSourceSettings, selector: "mt-data-source-settings", inputs: ["config", "chartType", "informativeContext"], outputs: ["serviceConfigChange"] }, { kind: "component", type: ChartViewer, selector: "mt-chart-viewer", inputs: ["config", "chartTypeId", "hideHeader"] }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
39763
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: ManageItem, isStandalone: true, selector: "mt-manage-item", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null } }, providers: [ManageItemService], ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'dashboardBuilder'\">\r\n <div class=\"flex flex-col h-full\" [class]=\"modal.contentClass\">\r\n <div class=\"flex flex-1 min-h-0\">\r\n <!-- Left: Datasource configuration -->\r\n <div\r\n class=\"db-sectioned-drawer flex min-w-0 flex-col\"\r\n [class.flex-1]=\"previewCollapsed()\"\r\n [class.border-r]=\"!previewCollapsed()\"\r\n [class.border-surface-200]=\"!previewCollapsed()\"\r\n [style.width]=\"previewCollapsed() ? '100%' : '60%'\"\r\n >\r\n <!-- Header: chart type badge + preview toggle -->\r\n <div\r\n class=\"flex items-center gap-2 border-b border-surface-200 bg-surface-50 px-4 py-2.5\"\r\n >\r\n @if (selectedChartType()) {\r\n <span\r\n class=\"flex h-9 w-9 items-center justify-center rounded-lg bg-primary-100 text-primary-600\"\r\n >\r\n <mt-icon [icon]=\"selectedChartType()?.icon\" class=\"text-lg\" />\r\n </span>\r\n <div class=\"min-w-0 flex-1\">\r\n <h3 class=\"truncate text-sm font-semibold text-surface-700\">\r\n {{ isNew() ? t(\"newItem\") : t(\"editItem\") }}\r\n </h3>\r\n <p class=\"truncate text-xs text-muted-color\">\r\n {{ selectedChartType()?.name }}\r\n </p>\r\n </div>\r\n } @else {\r\n <div class=\"flex-1\"></div>\r\n }\r\n\r\n <mt-button\r\n [label]=\"previewCollapsed() ? t('showPreview') : t('hidePreview')\"\r\n [icon]=\"previewCollapsed() ? 'general.eye' : 'general.eye-off'\"\r\n severity=\"secondary\"\r\n variant=\"outlined\"\r\n size=\"small\"\r\n (onClick)=\"togglePreview()\"\r\n />\r\n </div>\r\n\r\n <!-- Datasource is intentionally the only concern in this drawer. -->\r\n <div class=\"flex-1 overflow-auto p-4\">\r\n <mt-data-source-settings\r\n [config]=\"config()\"\r\n [chartType]=\"selectedChartType()\"\r\n [informativeContext]=\"informativeContext()\"\r\n (serviceConfigChange)=\"onServiceConfigUpdate($event)\"\r\n />\r\n </div>\r\n </div>\r\n\r\n <!-- Right: collapsible chart preview -->\r\n @if (!previewCollapsed()) {\r\n <div class=\"h-full min-w-[350px]\" [style.width]=\"'40%'\">\r\n <mt-chart-viewer [config]=\"config()\" [chartTypeId]=\"chartTypeId()\" />\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n\r\n <!-- Footer -->\r\n <div [class]=\"modal.footerClass\">\r\n <!-- Validation Status -->\r\n <div class=\"flex items-center gap-2 text-sm flex-1\">\r\n @if (isValid()) {\r\n <span class=\"flex items-center gap-1 text-green-600\">\r\n <mt-icon icon=\"general.check-circle\" class=\"text-base\" />\r\n {{ t(\"ready\") }}\r\n </span>\r\n } @else {\r\n <span class=\"flex items-center gap-1 text-amber-600\">\r\n <mt-icon icon=\"general.alert-circle\" class=\"text-base\" />\r\n {{ t(\"incomplete\") }}\r\n </span>\r\n }\r\n </div>\r\n\r\n <mt-button [label]=\"t('cancel')\" variant=\"outlined\" (onClick)=\"cancel()\" />\r\n <mt-button\r\n [label]=\"t('save')\"\r\n icon=\"general.save-02\"\r\n [loading]=\"saving()\"\r\n [disabled]=\"!isValid()\"\r\n (onClick)=\"save()\"\r\n />\r\n </div>\r\n</ng-container>\r\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: DataSourceSettings, selector: "mt-data-source-settings", inputs: ["config", "chartType", "informativeContext"], outputs: ["serviceConfigChange"] }, { kind: "component", type: ChartViewer, selector: "mt-chart-viewer", inputs: ["config", "chartTypeId", "hideHeader", "useCachedDataOnly"] }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
39601
39764
|
}
|
|
39602
39765
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ManageItem, decorators: [{
|
|
39603
39766
|
type: Component,
|
|
@@ -39732,7 +39895,7 @@ class GeneralSettings {
|
|
|
39732
39895
|
return labels[category] || category;
|
|
39733
39896
|
}
|
|
39734
39897
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: GeneralSettings, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
39735
|
-
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'\">\
|
|
39898
|
+
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 });
|
|
39736
39899
|
}
|
|
39737
39900
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: GeneralSettings, decorators: [{
|
|
39738
39901
|
type: Component,
|
|
@@ -39744,7 +39907,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
39744
39907
|
Card,
|
|
39745
39908
|
TooltipModule,
|
|
39746
39909
|
Icon,
|
|
39747
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div class=\"flex flex-col gap-4\" *transloco=\"let t; prefix: 'dashboardBuilder'\">\
|
|
39910
|
+
], 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" }]
|
|
39748
39911
|
}], 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"] }] } });
|
|
39749
39912
|
|
|
39750
39913
|
/**
|
|
@@ -47104,7 +47267,7 @@ class DashboardBuilder {
|
|
|
47104
47267
|
return current;
|
|
47105
47268
|
}
|
|
47106
47269
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: DashboardBuilder, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
47107
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: DashboardBuilder, isStandalone: true, selector: "mt-dashboard-builder", inputs: { isPage: { classPropertyName: "isPage", publicName: "isPage", isSignal: true, isRequired: false, transformFunction: null }, pageTitle: { classPropertyName: "pageTitle", publicName: "pageTitle", isSignal: true, isRequired: false, transformFunction: null }, backButton: { classPropertyName: "backButton", publicName: "backButton", isSignal: true, isRequired: false, transformFunction: null }, pageId: { classPropertyName: "pageId", publicName: "pageId", isSignal: true, isRequired: false, transformFunction: null }, standalone: { classPropertyName: "standalone", publicName: "standalone", isSignal: true, isRequired: false, transformFunction: null }, services: { classPropertyName: "services", publicName: "services", isSignal: true, isRequired: false, transformFunction: null }, dashboardData: { classPropertyName: "dashboardData", publicName: "dashboardData", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, informativeContext: { classPropertyName: "informativeContext", publicName: "informativeContext", isSignal: true, isRequired: false, transformFunction: null }, extraFilters: { classPropertyName: "extraFilters", publicName: "extraFilters", isSignal: true, isRequired: false, transformFunction: null }, lookups: { classPropertyName: "lookups", publicName: "lookups", isSignal: true, isRequired: false, transformFunction: null }, statuses: { classPropertyName: "statuses", publicName: "statuses", isSignal: true, isRequired: false, transformFunction: null }, levelsSchema: { classPropertyName: "levelsSchema", publicName: "levelsSchema", isSignal: true, isRequired: false, transformFunction: null }, levelLogsResolver: { classPropertyName: "levelLogsResolver", publicName: "levelLogsResolver", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dashboardData: "dashboardDataChange", pageChange: "pageChange", chartsChange: "chartsChange", onSave: "onSave", onBack: "onBack", onAddChart: "onAddChart", onEditChart: "onEditChart" }, host: { listeners: { "window:keydown": "onKeyDown($event)" } }, viewQueries: [{ propertyName: "contextMenu", first: true, predicate: ["contextMenu"], descendants: true, isSignal: true }, { propertyName: "gridsterContainer", first: true, predicate: ["gridsterContainer"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'dashboardBuilder'\">\r\n <!-- Shared Actions Template -->\r\n <ng-template #actionsTemplate let-inPage=\"inPage\">\r\n @if (!isReadonly()) {\r\n <mt-button\r\n [label]=\"t('addWidget')\"\r\n icon=\"general.plus\"\r\n (onClick)=\"toggleWidgetPalette()\"\r\n severity=\"primary\"\r\n size=\"small\"\r\n [rounded]=\"!inPage\"\r\n />\r\n\r\n <mt-button\r\n [label]=\"t('save')\"\r\n icon=\"general.save-02\"\r\n [loading]=\"saving()\"\r\n [disabled]=\"saving()\"\r\n (onClick)=\"saveDash()\"\r\n severity=\"primary\"\r\n size=\"small\"\r\n [rounded]=\"!inPage\"\r\n />\r\n\r\n <span [class]=\"'w-px h-5 bg-surface-300'\"></span>\r\n\r\n <mt-button\r\n icon=\"arrow.reverse-left\"\r\n [tooltip]=\"t('undo')\"\r\n (onClick)=\"undo()\"\r\n [disabled]=\"!canUndo()\"\r\n [severity]=\"'secondary'\"\r\n [outlined]=\"true\"\r\n size=\"small\"\r\n [rounded]=\"!inPage\"\r\n />\r\n }\r\n\r\n <!--\r\n Preview toggle: switches the builder into a read-only, end-user-style view\r\n (all edit affordances hidden). Offered only in a real (non-readonly) builder.\r\n -->\r\n @if (!readonly()) {\r\n <mt-button\r\n [icon]=\"preview() ? 'general.eye-off' : 'general.eye'\"\r\n [tooltip]=\"preview() ? t('exitPreview') : t('preview')\"\r\n (onClick)=\"togglePreview()\"\r\n [severity]=\"preview() ? 'warn' : 'help'\"\r\n [outlined]=\"true\"\r\n size=\"small\"\r\n [rounded]=\"!inPage\"\r\n />\r\n }\r\n\r\n @if (!isReadonly()) {\r\n <mt-button\r\n icon=\"general.edit-05\"\r\n [tooltip]=\"t('pageSettings')\"\r\n (onClick)=\"addOrEditPage(pageConfig()!)\"\r\n [severity]=\"'help'\"\r\n [outlined]=\"true\"\r\n size=\"small\"\r\n [rounded]=\"!inPage\"\r\n />\r\n\r\n <mt-button\r\n icon=\"general.filter-lines\"\r\n [tooltip]=\"t('manageFilter')\"\r\n (click)=\"$event.stopPropagation(); openManageFilter()\"\r\n [severity]=\"'info'\"\r\n [outlined]=\"true\"\r\n size=\"small\"\r\n [rounded]=\"!inPage\"\r\n />\r\n }\r\n </ng-template>\r\n\r\n <!-- Page mode -->\r\n @if (isPage()) {\r\n <mt-page\r\n [title]=\"\r\n pageTitle() ||\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n t('builder')\r\n \"\r\n [backButton]=\"backButton()\"\r\n (backButtonClick)=\"onBack.emit()\"\r\n >\r\n <!-- Header actions -->\r\n <ng-template #headerEnd>\r\n <div class=\"flex items-center gap-2\">\r\n <ng-container\r\n *ngTemplateOutlet=\"actionsTemplate; context: { inPage: true }\"\r\n />\r\n </div>\r\n </ng-template>\r\n\r\n <!-- Content -->\r\n <ng-container *ngTemplateOutlet=\"builderContent\" />\r\n </mt-page>\r\n } @else {\r\n <!-- Non-page mode -->\r\n <ng-container *ngTemplateOutlet=\"builderContent\" />\r\n }\r\n\r\n <!-- Reusable builder content template -->\r\n <ng-template #builderContent>\r\n <div\r\n class=\"db-manage-dashboard-container relative h-full min-h-[600px]\"\r\n [attr.dir]=\"direction()\"\r\n >\r\n <!-- Loading State -->\r\n @if (loading()) {\r\n <div class=\"flex items-center justify-center h-64\">\r\n <i class=\"mti mti-spinner-third mti-spin text-4xl text-primary\"></i>\r\n </div>\r\n }\r\n\r\n <!-- Main Content -->\r\n @if (!loading() && pageConfig()) {\r\n <!-- Fixed Actions Bar (only when NOT page mode) -->\r\n @if (!isPage()) {\r\n <div\r\n class=\"fixed bottom-4 left-1/2 -translate-x-1/2 z-50 flex items-center gap-2 bg-surface-0 rounded-full shadow-lg px-4 py-2 border border-surface-200\"\r\n >\r\n <ng-container\r\n *ngTemplateOutlet=\"actionsTemplate; context: { inPage: false }\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- Gridster Container -->\r\n <gridster\r\n #gridsterContainer\r\n [attr.dir]=\"direction()\"\r\n [options]=\"options\"\r\n class=\"db-gridster-container h-full min-h-[500px] bg-surface-50!\"\r\n [class.is-page]=\"isPage()\"\r\n (dragover)=\"onGridDragOver($event)\"\r\n (drop)=\"onGridDrop($event)\"\r\n >\r\n @for (chart of charts() | filterByGroup: undefined; track $index) {\r\n <gridster-item\r\n [item]=\"chart\"\r\n class=\"db-gridster-item bg-surface-0 rounded-lg shadow-sm border border-surface-200 overflow-hidden hover:shadow-md hover:border-surface-300\"\r\n [class.db-gridster-item--properties-list]=\"\r\n isPropertiesListChart(chart)\r\n \"\r\n [class.db-gridster-item--topbar]=\"isTopbarChart(chart)\"\r\n [class.ring-2]=\"isSelected(chart)\"\r\n [class.ring-primary]=\"isSelected(chart)\"\r\n [class.ring-offset-2]=\"isSelected(chart)\"\r\n [attr.data-chart-id]=\"chart.config?.serviceConfig?.dashboardId\"\r\n (click)=\"onSelect(chart, $event)\"\r\n >\r\n <!-- Chart Content -->\r\n <div\r\n class=\"db-gridster-item-content h-full w-full relative group\"\r\n [attr.dir]=\"direction()\"\r\n >\r\n <!-- Drag Handle -->\r\n @if (!isReadonly()) {\r\n <div\r\n class=\"drag-handler absolute top-0 left-0 right-0 h-6 cursor-move bg-gradient-to-b from-black/10 to-transparent opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center z-10\"\r\n >\r\n <i\r\n class=\"mti mti-grip-horizontal text-white/70 text-sm\"\r\n ></i>\r\n </div>\r\n }\r\n\r\n <!--\r\n Pass 7 \u2014 Single top-end Manage menu per chart card.\r\n Layout widgets (header/topbar/group) keep their dedicated\r\n affordances; chart cards have **only** the kebab.\r\n -->\r\n @if (\r\n !isReadonly() &&\r\n chart.config?.clientConfig?.componentName !== \"Group\"\r\n ) {\r\n <div\r\n class=\"db-card-actions absolute top-1 end-1 flex items-center gap-1 opacity-0 group-hover:opacity-100 focus-within:opacity-100 transition-opacity z-20\"\r\n >\r\n <!-- Single kebab for chart cards (Pass 7 sole owner). -->\r\n @if (showContextToolbar(chart)) {\r\n <mt-item-card-menu\r\n [allowDuplicate]=\"true\"\r\n [hasLinkedDialog]=\"hasLinkedDialog(chart)\"\r\n [canLinkDialog]=\"canLinkDialog(chart)\"\r\n (action)=\"onItemCardMenuAction(chart, $event)\"\r\n />\r\n }\r\n\r\n <!-- Topbar: breadcrumb editor (layout-specific). -->\r\n @if (\r\n chart.config?.clientConfig?.componentName === \"topbar\"\r\n ) {\r\n <mt-button\r\n icon=\"general.slash-divider\"\r\n [tooltip]=\"t('manageBreadcrumb')\"\r\n (onClick)=\"openBreadcrumb(chart)\"\r\n severity=\"info\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n />\r\n }\r\n\r\n <!--\r\n Header / topbar \u2014 quick style + delete.\r\n These widgets don't have a datasource so they don't\r\n use the chart kebab; the affordances stay minimal.\r\n -->\r\n @if (\r\n chart.config?.clientConfig?.componentName === \"header\" ||\r\n chart.config?.clientConfig?.componentName === \"topbar\"\r\n ) {\r\n <mt-button\r\n icon=\"general.edit-05\"\r\n [tooltip]=\"t('actions.editTitle')\"\r\n (onClick)=\"requestLayoutTitleEdit(chart, $event)\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n />\r\n <mt-button\r\n icon=\"editor.palette\"\r\n [tooltip]=\"t('actions.style')\"\r\n (onClick)=\"openQuickManage($event, chart)\"\r\n severity=\"primary\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n />\r\n <mt-button\r\n icon=\"general.trash-01\"\r\n [tooltip]=\"t('actions.delete')\"\r\n (onClick)=\"deleteItem(chart)\"\r\n severity=\"danger\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n />\r\n }\r\n </div>\r\n }\r\n\r\n <!-- Chart Rendering -->\r\n @if (chart.config?.clientConfig?.componentName !== \"Group\") {\r\n @if (!chart.loading) {\r\n <mt-dashboard-item\r\n [config]=\"chart.config\"\r\n [chartTypeId]=\"chart.chartTypeId\"\r\n [readonly]=\"isReadonly()\"\r\n [builderMode]=\"!isReadonly()\"\r\n [extraFilters]=\"extraFilters()\"\r\n [reportId]=\"pageId()\"\r\n [pageName]=\"\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n pageConfig()?.name?.['ar'] ||\r\n ''\r\n \"\r\n (configureRequested)=\"configureChart(chart)\"\r\n (titleEdited)=\"onChartTitleEdited(chart, $event)\"\r\n />\r\n } @else {\r\n <div class=\"flex items-center justify-center h-full\">\r\n <i\r\n class=\"mti mti-spinner-third mti-spin text-2xl text-primary\"\r\n ></i>\r\n </div>\r\n }\r\n }\r\n\r\n <!-- Group Children -->\r\n @if (chart.config?.clientConfig?.componentName === \"Group\") {\r\n <mt-card-content\r\n [title]=\"getGroupTitle(chart)\"\r\n [headerConfig]=\"getGroupHeaderConfig(chart)\"\r\n [styleConfig]=\"getGroupStyleConfig(chart)\"\r\n [cardStyleConfig]=\"getGroupCardStyleConfig(chart)\"\r\n [groupHeader]=\"true\"\r\n [isNoTopEnd]=\"false\"\r\n >\r\n <ng-container topEnd>\r\n <div\r\n class=\"db-group-card-top-end flex min-w-0 items-center justify-end gap-2\"\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n <div\r\n class=\"db-group-card-tabs flex min-w-0 items-center gap-1 overflow-x-auto\"\r\n >\r\n @for (\r\n childChart of getGroupChildren(chart);\r\n track childChart.config?.serviceConfig?.dashboardId;\r\n let idx = $index\r\n ) {\r\n <button\r\n type=\"button\"\r\n class=\"db-group-card-tab h-8 max-w-48 shrink-0 truncate rounded-md px-3 text-sm font-medium transition-colors\"\r\n [class.bg-primary]=\"\r\n idx === (chart.selectedGroupIndex ?? 0)\r\n \"\r\n [class.text-white]=\"\r\n idx === (chart.selectedGroupIndex ?? 0)\r\n \"\r\n [class.text-muted-color]=\"\r\n idx !== (chart.selectedGroupIndex ?? 0)\r\n \"\r\n [class.hover:bg-surface-100]=\"\r\n idx !== (chart.selectedGroupIndex ?? 0)\r\n \"\r\n [title]=\"getItemTitle(childChart, idx)\"\r\n (click)=\"selectGroupChild(chart, idx, $event)\"\r\n >\r\n {{ getItemTitle(childChart, idx) }}\r\n </button>\r\n }\r\n </div>\r\n\r\n @if (!isReadonly()) {\r\n <div class=\"flex shrink-0 items-center gap-1\">\r\n @if (\r\n getSelectedGroupChild(chart);\r\n as selectedChild\r\n ) {\r\n <mt-item-card-menu\r\n [allowDuplicate]=\"true\"\r\n [hasLinkedDialog]=\"\r\n hasLinkedDialog(selectedChild)\r\n \"\r\n [canLinkDialog]=\"canLinkDialog(selectedChild)\"\r\n (action)=\"\r\n onItemCardMenuAction(\r\n selectedChild,\r\n $event,\r\n chart\r\n )\r\n \"\r\n />\r\n }\r\n <mt-button\r\n icon=\"general.edit-05\"\r\n [tooltip]=\"t('actions.editTitle')\"\r\n (onClick)=\"requestLayoutTitleEdit(chart, $event)\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n />\r\n <mt-button\r\n icon=\"general.trash-01\"\r\n [tooltip]=\"t('removeGroup')\"\r\n (onClick)=\"removeGroup(chart)\"\r\n severity=\"danger\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n </ng-container>\r\n\r\n <ng-container body>\r\n @for (\r\n childChart of getGroupChildren(chart);\r\n track childChart.config?.serviceConfig?.dashboardId;\r\n let idx = $index\r\n ) {\r\n @if (idx === (chart.selectedGroupIndex ?? 0)) {\r\n <div class=\"h-full min-h-0\">\r\n <mt-dashboard-item\r\n [config]=\"childChart.config\"\r\n [chartTypeId]=\"childChart.chartTypeId\"\r\n [readonly]=\"isReadonly()\"\r\n [builderMode]=\"!isReadonly()\"\r\n [extraFilters]=\"extraFilters()\"\r\n [reportId]=\"pageId()\"\r\n [inGroup]=\"true\"\r\n [pageName]=\"\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n pageConfig()?.name?.['ar'] ||\r\n ''\r\n \"\r\n (configureRequested)=\"\r\n editItem(childChart, chart, 'dataSource')\r\n \"\r\n (titleEdited)=\"\r\n onChartTitleEdited(childChart, $event)\r\n \"\r\n />\r\n </div>\r\n }\r\n }\r\n </ng-container>\r\n </mt-card-content>\r\n }\r\n </div>\r\n </gridster-item>\r\n }\r\n </gridster>\r\n\r\n <!-- Context Menu -->\r\n <p-contextMenu #contextMenu [model]=\"menuItems()\" appendTo=\"body\" />\r\n }\r\n\r\n <!-- Empty State -->\r\n @if (!loading() && !pageConfig()) {\r\n <div\r\n class=\"flex flex-col items-center justify-center h-64 text-muted-color\"\r\n >\r\n <i class=\"mti mti-layout text-6xl mb-4\"></i>\r\n <p class=\"text-lg\">{{ t(\"noPageSelected\") }}</p>\r\n <p class=\"text-sm\">{{ t(\"selectPageToStart\") }}</p>\r\n </div>\r\n }\r\n </div>\r\n </ng-template>\r\n</ng-container>\r\n", styles: [":host{display:block;height:100%}gridster.db-gridster-container{min-height:calc(100vh - 120px);height:100%}gridster.db-gridster-container .gridster-column{border-left:1px solid var(--p-primary-100)!important;border-right:1px solid var(--p-primary-100)!important}gridster.db-gridster-container .gridster-row{border-top:1px solid var(--p-primary-100)!important;border-bottom:1px solid var(--p-primary-100)!important}gridster.db-gridster-container.is-page{min-height:calc(100vh - 200px)}gridster-item.db-gridster-item{transition:none!important}gridster-item.db-gridster-item.db-gridster-item--properties-list{background:transparent!important;border-color:transparent!important;border-radius:0!important;box-shadow:none!important;overflow:visible!important}gridster-item.db-gridster-item.db-gridster-item--properties-list:hover{border-color:transparent!important;box-shadow:none!important}gridster-item.db-gridster-item.db-gridster-item--topbar{background:transparent!important;border-color:transparent!important;border-width:0!important;border-radius:0!important;box-shadow:none!important;overflow:visible!important}gridster-item.db-gridster-item.db-gridster-item--topbar:hover{border-color:transparent!important;box-shadow:none!important}.mti-spin{animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.gridster-drop-indicator{position:absolute;background:var(--p-primary-100);border:2px dashed var(--p-primary-400);border-radius:8px;pointer-events:none;z-index:100}.db-card-actions{pointer-events:auto;display:flex;flex-wrap:wrap;justify-content:flex-end;gap:.25rem;max-width:calc(100% - 2.5rem)}@media(max-width:640px){.db-card-actions{top:.25rem;right:.25rem}}.mt-item-config-popover-host .p-dialog-content{padding:0!important;height:clamp(420px,70vh,720px);max-height:80vh}.mt-item-config-popover-host .p-dialog-header{display:none}@media(max-width:768px){.mt-item-config-popover-host{width:100%!important;max-width:100%!important;margin:0!important;inset:auto 0 0!important;border-radius:1rem 1rem 0 0!important;transform:none!important}.mt-item-config-popover-host .p-dialog-content{height:80vh;border-radius:1rem 1rem 0 0}}.db-context-popover{--p-popover-content-padding: .4rem;min-width:200px}.db-group-card-top-end{width:100%}.db-group-card-tabs{flex:1 1 auto;scrollbar-width:none}.db-group-card-tabs::-webkit-scrollbar{display:none}.db-group-card-tab{min-width:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "ngmodule", type: GridsterModule }, { kind: "component", type: i2$3.GridsterComponent, selector: "gridster", inputs: ["options"] }, { kind: "component", type: i2$3.GridsterItemComponent, selector: "gridster-item", inputs: ["item"], outputs: ["itemInit", "itemChange", "itemResize"] }, { 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: Page, selector: "mt-page", inputs: ["backButton", "backButtonIcon", "avatarIcon", "avatarStyle", "avatarShape", "title", "tabs", "activeTab", "contentClass", "contentId"], outputs: ["backButtonClick", "tabChange"] }, { kind: "ngmodule", type: ContextMenuModule }, { kind: "component", type: i3$1.ContextMenu, selector: "p-contextMenu, p-contextmenu, p-context-menu", inputs: ["model", "triggerEvent", "target", "global", "style", "styleClass", "autoZIndex", "baseZIndex", "id", "breakpoint", "ariaLabel", "ariaLabelledBy", "pressDelay", "appendTo", "motionOptions"], outputs: ["onShow", "onHide"] }, { kind: "component", type: DashboardItem, selector: "mt-dashboard-item", inputs: ["config", "chartTypeId", "readonly", "pageName", "inGroup", "isDialog", "queryParams", "extraFilters", "reportId", "ignoreQueryFilter", "builderMode"], outputs: ["actionTriggered", "configureRequested", "titleEdited"] }, { 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: ItemCardMenuComponent, selector: "mt-item-card-menu", inputs: ["allowDuplicate", "hasLinkedDialog", "canLinkDialog"], outputs: ["action"] }, { kind: "pipe", type: FilterByGroupPipe, name: "filterByGroup" }], encapsulation: i0.ViewEncapsulation.None });
|
|
47270
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: DashboardBuilder, isStandalone: true, selector: "mt-dashboard-builder", inputs: { isPage: { classPropertyName: "isPage", publicName: "isPage", isSignal: true, isRequired: false, transformFunction: null }, pageTitle: { classPropertyName: "pageTitle", publicName: "pageTitle", isSignal: true, isRequired: false, transformFunction: null }, backButton: { classPropertyName: "backButton", publicName: "backButton", isSignal: true, isRequired: false, transformFunction: null }, pageId: { classPropertyName: "pageId", publicName: "pageId", isSignal: true, isRequired: false, transformFunction: null }, standalone: { classPropertyName: "standalone", publicName: "standalone", isSignal: true, isRequired: false, transformFunction: null }, services: { classPropertyName: "services", publicName: "services", isSignal: true, isRequired: false, transformFunction: null }, dashboardData: { classPropertyName: "dashboardData", publicName: "dashboardData", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, informativeContext: { classPropertyName: "informativeContext", publicName: "informativeContext", isSignal: true, isRequired: false, transformFunction: null }, extraFilters: { classPropertyName: "extraFilters", publicName: "extraFilters", isSignal: true, isRequired: false, transformFunction: null }, lookups: { classPropertyName: "lookups", publicName: "lookups", isSignal: true, isRequired: false, transformFunction: null }, statuses: { classPropertyName: "statuses", publicName: "statuses", isSignal: true, isRequired: false, transformFunction: null }, levelsSchema: { classPropertyName: "levelsSchema", publicName: "levelsSchema", isSignal: true, isRequired: false, transformFunction: null }, levelLogsResolver: { classPropertyName: "levelLogsResolver", publicName: "levelLogsResolver", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dashboardData: "dashboardDataChange", pageChange: "pageChange", chartsChange: "chartsChange", onSave: "onSave", onBack: "onBack", onAddChart: "onAddChart", onEditChart: "onEditChart" }, host: { listeners: { "window:keydown": "onKeyDown($event)" } }, viewQueries: [{ propertyName: "contextMenu", first: true, predicate: ["contextMenu"], descendants: true, isSignal: true }, { propertyName: "gridsterContainer", first: true, predicate: ["gridsterContainer"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'dashboardBuilder'\">\r\n <!-- Shared Actions Template -->\r\n <ng-template #actionsTemplate let-inPage=\"inPage\">\r\n @if (!isReadonly()) {\r\n <mt-button\r\n [label]=\"t('addWidget')\"\r\n icon=\"general.plus\"\r\n (onClick)=\"toggleWidgetPalette()\"\r\n severity=\"primary\"\r\n size=\"small\"\r\n [rounded]=\"!inPage\"\r\n />\r\n\r\n <mt-button\r\n [label]=\"t('save')\"\r\n icon=\"general.save-02\"\r\n [loading]=\"saving()\"\r\n [disabled]=\"saving()\"\r\n (onClick)=\"saveDash()\"\r\n severity=\"primary\"\r\n size=\"small\"\r\n [rounded]=\"!inPage\"\r\n />\r\n\r\n <span [class]=\"'w-px h-5 bg-surface-300'\"></span>\r\n\r\n <mt-button\r\n icon=\"arrow.reverse-left\"\r\n [tooltip]=\"t('undo')\"\r\n (onClick)=\"undo()\"\r\n [disabled]=\"!canUndo()\"\r\n [severity]=\"'secondary'\"\r\n [outlined]=\"true\"\r\n size=\"small\"\r\n [rounded]=\"!inPage\"\r\n />\r\n }\r\n\r\n <!--\r\n Preview toggle: switches the builder into a read-only, end-user-style view\r\n (all edit affordances hidden). Offered only in a real (non-readonly) builder.\r\n -->\r\n @if (!readonly()) {\r\n <mt-button\r\n [icon]=\"preview() ? 'general.eye-off' : 'general.eye'\"\r\n [tooltip]=\"preview() ? t('exitPreview') : t('preview')\"\r\n (onClick)=\"togglePreview()\"\r\n [severity]=\"preview() ? 'warn' : 'help'\"\r\n [outlined]=\"true\"\r\n size=\"small\"\r\n [rounded]=\"!inPage\"\r\n />\r\n }\r\n\r\n @if (!isReadonly()) {\r\n <mt-button\r\n icon=\"general.edit-05\"\r\n [tooltip]=\"t('pageSettings')\"\r\n (onClick)=\"addOrEditPage(pageConfig()!)\"\r\n [severity]=\"'help'\"\r\n [outlined]=\"true\"\r\n size=\"small\"\r\n [rounded]=\"!inPage\"\r\n />\r\n\r\n <mt-button\r\n icon=\"general.filter-lines\"\r\n [tooltip]=\"t('manageFilter')\"\r\n (click)=\"$event.stopPropagation(); openManageFilter()\"\r\n [severity]=\"'info'\"\r\n [outlined]=\"true\"\r\n size=\"small\"\r\n [rounded]=\"!inPage\"\r\n />\r\n }\r\n </ng-template>\r\n\r\n <!-- Page mode -->\r\n @if (isPage()) {\r\n <mt-page\r\n [title]=\"\r\n pageTitle() ||\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n t('builder')\r\n \"\r\n [backButton]=\"backButton()\"\r\n (backButtonClick)=\"onBack.emit()\"\r\n >\r\n <!-- Header actions -->\r\n <ng-template #headerEnd>\r\n <div class=\"flex items-center gap-2\">\r\n <ng-container\r\n *ngTemplateOutlet=\"actionsTemplate; context: { inPage: true }\"\r\n />\r\n </div>\r\n </ng-template>\r\n\r\n <!-- Content -->\r\n <ng-container *ngTemplateOutlet=\"builderContent\" />\r\n </mt-page>\r\n } @else {\r\n <!-- Non-page mode -->\r\n <ng-container *ngTemplateOutlet=\"builderContent\" />\r\n }\r\n\r\n <!-- Reusable builder content template -->\r\n <ng-template #builderContent>\r\n <div\r\n class=\"db-manage-dashboard-container relative h-full min-h-[600px]\"\r\n [attr.dir]=\"direction()\"\r\n >\r\n <!-- Loading State -->\r\n @if (loading()) {\r\n <div class=\"flex items-center justify-center h-64\">\r\n <i class=\"mti mti-spinner-third mti-spin text-4xl text-primary\"></i>\r\n </div>\r\n }\r\n\r\n <!-- Main Content -->\r\n @if (!loading() && pageConfig()) {\r\n <!-- Fixed Actions Bar (only when NOT page mode) -->\r\n @if (!isPage()) {\r\n <div\r\n class=\"fixed bottom-4 left-1/2 -translate-x-1/2 z-50 flex items-center gap-2 bg-surface-0 rounded-full shadow-lg px-4 py-2 border border-surface-200\"\r\n >\r\n <ng-container\r\n *ngTemplateOutlet=\"actionsTemplate; context: { inPage: false }\"\r\n />\r\n </div>\r\n }\r\n\r\n <!-- Gridster Container -->\r\n <gridster\r\n #gridsterContainer\r\n [attr.dir]=\"direction()\"\r\n [options]=\"options\"\r\n class=\"db-gridster-container h-full min-h-[500px] bg-surface-50!\"\r\n [class.is-page]=\"isPage()\"\r\n (dragover)=\"onGridDragOver($event)\"\r\n (drop)=\"onGridDrop($event)\"\r\n >\r\n @for (chart of charts() | filterByGroup: undefined; track $index) {\r\n <gridster-item\r\n [item]=\"chart\"\r\n class=\"db-gridster-item bg-surface-0 rounded-lg shadow-sm border border-surface-200 overflow-hidden hover:shadow-md hover:border-surface-300\"\r\n [class.db-gridster-item--properties-list]=\"\r\n isPropertiesListChart(chart)\r\n \"\r\n [class.db-gridster-item--topbar]=\"isTopbarChart(chart)\"\r\n [class.ring-2]=\"isSelected(chart)\"\r\n [class.ring-primary]=\"isSelected(chart)\"\r\n [class.ring-offset-2]=\"isSelected(chart)\"\r\n [attr.data-chart-id]=\"chart.config?.serviceConfig?.dashboardId\"\r\n (click)=\"onSelect(chart, $event)\"\r\n >\r\n <!-- Chart Content -->\r\n <div\r\n class=\"db-gridster-item-content h-full w-full relative group\"\r\n [attr.dir]=\"direction()\"\r\n >\r\n <!-- Drag Handle -->\r\n @if (!isReadonly()) {\r\n <div\r\n class=\"drag-handler absolute top-0 left-0 right-0 h-6 cursor-move bg-gradient-to-b from-black/10 to-transparent opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center z-10\"\r\n >\r\n <i\r\n class=\"mti mti-grip-horizontal text-white/70 text-sm\"\r\n ></i>\r\n </div>\r\n }\r\n\r\n <!--\r\n Pass 7 \u2014 Single top-end Manage menu per chart card.\r\n Layout widgets (header/topbar/group) keep their dedicated\r\n affordances; chart cards have **only** the kebab.\r\n -->\r\n @if (\r\n !isReadonly() &&\r\n chart.config?.clientConfig?.componentName !== \"Group\"\r\n ) {\r\n <div\r\n class=\"db-card-actions absolute top-1 end-1 flex items-center gap-1 opacity-0 group-hover:opacity-100 focus-within:opacity-100 transition-opacity z-20\"\r\n >\r\n <!-- Single kebab for chart cards (Pass 7 sole owner). -->\r\n @if (showContextToolbar(chart)) {\r\n <mt-item-card-menu\r\n [allowDuplicate]=\"true\"\r\n [hasLinkedDialog]=\"hasLinkedDialog(chart)\"\r\n [canLinkDialog]=\"canLinkDialog(chart)\"\r\n (action)=\"onItemCardMenuAction(chart, $event)\"\r\n />\r\n }\r\n\r\n <!-- Topbar: breadcrumb editor (layout-specific). -->\r\n @if (\r\n chart.config?.clientConfig?.componentName === \"topbar\"\r\n ) {\r\n <mt-button\r\n icon=\"general.slash-divider\"\r\n [tooltip]=\"t('manageBreadcrumb')\"\r\n (onClick)=\"openBreadcrumb(chart)\"\r\n severity=\"info\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n />\r\n }\r\n\r\n <!--\r\n Header / topbar \u2014 quick style + delete.\r\n These widgets don't have a datasource so they don't\r\n use the chart kebab; the affordances stay minimal.\r\n -->\r\n @if (\r\n chart.config?.clientConfig?.componentName === \"header\" ||\r\n chart.config?.clientConfig?.componentName === \"topbar\"\r\n ) {\r\n <mt-button\r\n icon=\"general.edit-05\"\r\n [tooltip]=\"t('actions.editTitle')\"\r\n (onClick)=\"requestLayoutTitleEdit(chart, $event)\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n />\r\n <mt-button\r\n icon=\"editor.palette\"\r\n [tooltip]=\"t('actions.style')\"\r\n (onClick)=\"openQuickManage($event, chart)\"\r\n severity=\"primary\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n />\r\n <mt-button\r\n icon=\"general.trash-01\"\r\n [tooltip]=\"t('actions.delete')\"\r\n (onClick)=\"deleteItem(chart)\"\r\n severity=\"danger\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n />\r\n }\r\n </div>\r\n }\r\n\r\n <!-- Chart Rendering -->\r\n @if (chart.config?.clientConfig?.componentName !== \"Group\") {\r\n @if (!chart.loading) {\r\n <mt-dashboard-item\r\n [config]=\"chart.config\"\r\n [chartTypeId]=\"chart.chartTypeId\"\r\n [readonly]=\"isReadonly()\"\r\n [builderMode]=\"!isReadonly()\"\r\n [extraFilters]=\"extraFilters()\"\r\n [reportId]=\"pageId()\"\r\n [pageName]=\"\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n pageConfig()?.name?.['ar'] ||\r\n ''\r\n \"\r\n (configureRequested)=\"configureChart(chart)\"\r\n (titleEdited)=\"onChartTitleEdited(chart, $event)\"\r\n />\r\n } @else {\r\n <div class=\"flex items-center justify-center h-full\">\r\n <i\r\n class=\"mti mti-spinner-third mti-spin text-2xl text-primary\"\r\n ></i>\r\n </div>\r\n }\r\n }\r\n\r\n <!-- Group Children -->\r\n @if (chart.config?.clientConfig?.componentName === \"Group\") {\r\n <mt-card-content\r\n [title]=\"getGroupTitle(chart)\"\r\n [headerConfig]=\"getGroupHeaderConfig(chart)\"\r\n [styleConfig]=\"getGroupStyleConfig(chart)\"\r\n [cardStyleConfig]=\"getGroupCardStyleConfig(chart)\"\r\n [groupHeader]=\"true\"\r\n [isNoTopEnd]=\"false\"\r\n >\r\n <ng-container topEnd>\r\n <div\r\n class=\"db-group-card-top-end flex min-w-0 items-center justify-end gap-2\"\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n <div\r\n class=\"db-group-card-tabs flex min-w-0 items-center gap-1 overflow-x-auto\"\r\n >\r\n @for (\r\n childChart of getGroupChildren(chart);\r\n track childChart.config?.serviceConfig?.dashboardId;\r\n let idx = $index\r\n ) {\r\n <button\r\n type=\"button\"\r\n class=\"db-group-card-tab h-8 max-w-48 shrink-0 truncate rounded-md px-3 text-sm font-medium transition-colors\"\r\n [class.bg-primary]=\"\r\n idx === (chart.selectedGroupIndex ?? 0)\r\n \"\r\n [class.text-white]=\"\r\n idx === (chart.selectedGroupIndex ?? 0)\r\n \"\r\n [class.text-muted-color]=\"\r\n idx !== (chart.selectedGroupIndex ?? 0)\r\n \"\r\n [class.hover:bg-surface-100]=\"\r\n idx !== (chart.selectedGroupIndex ?? 0)\r\n \"\r\n [title]=\"getItemTitle(childChart, idx)\"\r\n (click)=\"selectGroupChild(chart, idx, $event)\"\r\n >\r\n {{ getItemTitle(childChart, idx) }}\r\n </button>\r\n }\r\n </div>\r\n\r\n @if (!isReadonly()) {\r\n <div class=\"flex shrink-0 items-center gap-1\">\r\n @if (\r\n getSelectedGroupChild(chart);\r\n as selectedChild\r\n ) {\r\n <mt-item-card-menu\r\n [allowDuplicate]=\"true\"\r\n [hasLinkedDialog]=\"\r\n hasLinkedDialog(selectedChild)\r\n \"\r\n [canLinkDialog]=\"canLinkDialog(selectedChild)\"\r\n (action)=\"\r\n onItemCardMenuAction(\r\n selectedChild,\r\n $event,\r\n chart\r\n )\r\n \"\r\n />\r\n }\r\n <mt-button\r\n icon=\"general.edit-05\"\r\n [tooltip]=\"t('actions.editTitle')\"\r\n (onClick)=\"requestLayoutTitleEdit(chart, $event)\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n />\r\n <mt-button\r\n icon=\"general.trash-01\"\r\n [tooltip]=\"t('removeGroup')\"\r\n (onClick)=\"removeGroup(chart)\"\r\n severity=\"danger\"\r\n size=\"small\"\r\n [rounded]=\"true\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n </ng-container>\r\n\r\n <ng-container body>\r\n @for (\r\n childChart of getGroupChildren(chart);\r\n track childChart.config?.serviceConfig?.dashboardId;\r\n let idx = $index\r\n ) {\r\n @if (idx === (chart.selectedGroupIndex ?? 0)) {\r\n <div class=\"h-full min-h-0\">\r\n <mt-dashboard-item\r\n [config]=\"childChart.config\"\r\n [chartTypeId]=\"childChart.chartTypeId\"\r\n [readonly]=\"isReadonly()\"\r\n [builderMode]=\"!isReadonly()\"\r\n [extraFilters]=\"extraFilters()\"\r\n [reportId]=\"pageId()\"\r\n [inGroup]=\"true\"\r\n [pageName]=\"\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n pageConfig()?.name?.['ar'] ||\r\n ''\r\n \"\r\n (configureRequested)=\"\r\n editItem(childChart, chart, 'dataSource')\r\n \"\r\n (titleEdited)=\"\r\n onChartTitleEdited(childChart, $event)\r\n \"\r\n />\r\n </div>\r\n }\r\n }\r\n </ng-container>\r\n </mt-card-content>\r\n }\r\n </div>\r\n </gridster-item>\r\n }\r\n </gridster>\r\n\r\n <!-- Context Menu -->\r\n <p-contextMenu #contextMenu [model]=\"menuItems()\" appendTo=\"body\" />\r\n }\r\n\r\n <!-- Empty State -->\r\n @if (!loading() && !pageConfig()) {\r\n <div\r\n class=\"flex flex-col items-center justify-center h-64 text-muted-color\"\r\n >\r\n <i class=\"mti mti-layout text-6xl mb-4\"></i>\r\n <p class=\"text-lg\">{{ t(\"noPageSelected\") }}</p>\r\n <p class=\"text-sm\">{{ t(\"selectPageToStart\") }}</p>\r\n </div>\r\n }\r\n </div>\r\n </ng-template>\r\n</ng-container>\r\n", styles: [":host{display:block;height:100%}gridster.db-gridster-container{min-height:calc(100vh - 120px);height:100%}gridster.db-gridster-container .gridster-column{border-left:1px solid var(--p-primary-100)!important;border-right:1px solid var(--p-primary-100)!important}gridster.db-gridster-container .gridster-row{border-top:1px solid var(--p-primary-100)!important;border-bottom:1px solid var(--p-primary-100)!important}gridster.db-gridster-container.is-page{min-height:calc(100vh - 200px)}gridster-item.db-gridster-item{transition:none!important}gridster-item.db-gridster-item.db-gridster-item--properties-list{background:transparent!important;border-color:transparent!important;border-radius:0!important;box-shadow:none!important;overflow:visible!important}gridster-item.db-gridster-item.db-gridster-item--properties-list:hover{border-color:transparent!important;box-shadow:none!important}gridster-item.db-gridster-item.db-gridster-item--topbar{background:transparent!important;border-color:transparent!important;border-width:0!important;border-radius:0!important;box-shadow:none!important;overflow:visible!important}gridster-item.db-gridster-item.db-gridster-item--topbar:hover{border-color:transparent!important;box-shadow:none!important}.mti-spin{animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.gridster-drop-indicator{position:absolute;background:var(--p-primary-100);border:2px dashed var(--p-primary-400);border-radius:8px;pointer-events:none;z-index:100}.db-card-actions{pointer-events:auto;display:flex;flex-wrap:wrap;justify-content:flex-end;gap:.25rem;max-width:calc(100% - 2.5rem)}@media(max-width:640px){.db-card-actions{top:.25rem;right:.25rem}}.mt-item-config-popover-host .p-dialog-content{padding:0!important;height:clamp(420px,70vh,720px);max-height:80vh}.mt-item-config-popover-host .p-dialog-header{display:none}@media(max-width:768px){.mt-item-config-popover-host{width:100%!important;max-width:100%!important;margin:0!important;inset:auto 0 0!important;border-radius:1rem 1rem 0 0!important;transform:none!important}.mt-item-config-popover-host .p-dialog-content{height:80vh;border-radius:1rem 1rem 0 0}}.db-context-popover{--p-popover-content-padding: .4rem;min-width:200px}.db-group-card-top-end{width:100%}.db-group-card-tabs{flex:1 1 auto;scrollbar-width:none}.db-group-card-tabs::-webkit-scrollbar{display:none}.db-group-card-tab{min-width:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "ngmodule", type: GridsterModule }, { kind: "component", type: i2$3.GridsterComponent, selector: "gridster", inputs: ["options"] }, { kind: "component", type: i2$3.GridsterItemComponent, selector: "gridster-item", inputs: ["item"], outputs: ["itemInit", "itemChange", "itemResize"] }, { 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: Page, selector: "mt-page", inputs: ["backButton", "backButtonIcon", "avatarIcon", "avatarStyle", "avatarShape", "title", "tabs", "activeTab", "contentClass", "contentId"], outputs: ["backButtonClick", "tabChange"] }, { kind: "ngmodule", type: ContextMenuModule }, { kind: "component", type: i3$1.ContextMenu, selector: "p-contextMenu, p-contextmenu, p-context-menu", inputs: ["model", "triggerEvent", "target", "global", "style", "styleClass", "autoZIndex", "baseZIndex", "id", "breakpoint", "ariaLabel", "ariaLabelledBy", "pressDelay", "appendTo", "motionOptions"], outputs: ["onShow", "onHide"] }, { kind: "component", type: DashboardItem, selector: "mt-dashboard-item", inputs: ["config", "chartTypeId", "readonly", "useCachedDataOnly", "pageName", "inGroup", "isDialog", "queryParams", "extraFilters", "reportId", "ignoreQueryFilter", "builderMode"], outputs: ["actionTriggered", "configureRequested", "titleEdited"] }, { 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: ItemCardMenuComponent, selector: "mt-item-card-menu", inputs: ["allowDuplicate", "hasLinkedDialog", "canLinkDialog"], outputs: ["action"] }, { kind: "pipe", type: FilterByGroupPipe, name: "filterByGroup" }], encapsulation: i0.ViewEncapsulation.None });
|
|
47108
47271
|
}
|
|
47109
47272
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: DashboardBuilder, decorators: [{
|
|
47110
47273
|
type: Component,
|
|
@@ -48161,7 +48324,7 @@ class DashboardViewer {
|
|
|
48161
48324
|
});
|
|
48162
48325
|
}
|
|
48163
48326
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: DashboardViewer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
48164
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: DashboardViewer, isStandalone: true, selector: "mt-dashboard-viewer", inputs: { isPage: { classPropertyName: "isPage", publicName: "isPage", isSignal: true, isRequired: false, transformFunction: null }, pageTitle: { classPropertyName: "pageTitle", publicName: "pageTitle", isSignal: true, isRequired: false, transformFunction: null }, backButton: { classPropertyName: "backButton", publicName: "backButton", isSignal: true, isRequired: false, transformFunction: null }, pageId: { classPropertyName: "pageId", publicName: "pageId", isSignal: true, isRequired: false, transformFunction: null }, dashboardData: { classPropertyName: "dashboardData", publicName: "dashboardData", isSignal: true, isRequired: false, transformFunction: null }, chartsData: { classPropertyName: "chartsData", publicName: "chartsData", isSignal: true, isRequired: false, transformFunction: null }, dialogsData: { classPropertyName: "dialogsData", publicName: "dialogsData", isSignal: true, isRequired: false, transformFunction: null }, filtersData: { classPropertyName: "filtersData", publicName: "filtersData", isSignal: true, isRequired: false, transformFunction: null }, extraFilters: { classPropertyName: "extraFilters", publicName: "extraFilters", isSignal: true, isRequired: false, transformFunction: null }, lookups: { classPropertyName: "lookups", publicName: "lookups", isSignal: true, isRequired: false, transformFunction: null }, statuses: { classPropertyName: "statuses", publicName: "statuses", isSignal: true, isRequired: false, transformFunction: null }, levelsSchema: { classPropertyName: "levelsSchema", publicName: "levelsSchema", isSignal: true, isRequired: false, transformFunction: null }, levelLogsResolver: { classPropertyName: "levelLogsResolver", publicName: "levelLogsResolver", isSignal: true, isRequired: false, transformFunction: null }, showFilters: { classPropertyName: "showFilters", publicName: "showFilters", isSignal: true, isRequired: false, transformFunction: null }, showFilterTrigger: { classPropertyName: "showFilterTrigger", publicName: "showFilterTrigger", isSignal: true, isRequired: false, transformFunction: null }, ignoreQueryFilter: { classPropertyName: "ignoreQueryFilter", publicName: "ignoreQueryFilter", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pageLoaded: "pageLoaded", onBack: "onBack", chartClick: "chartClick" }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'dashboardBuilder'\">\r\n <!-- Page mode -->\r\n @if (isPage()) {\r\n <mt-page\r\n [title]=\"\r\n pageTitle() ||\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n t('dashboard')\r\n \"\r\n [backButton]=\"backButton()\"\r\n (backButtonClick)=\"onBack.emit()\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"viewerContent\" />\r\n </mt-page>\r\n } @else {\r\n <!-- Non-page mode -->\r\n <ng-container *ngTemplateOutlet=\"viewerContent\" />\r\n }\r\n\r\n <!-- Reusable viewer content template -->\r\n <ng-template #viewerContent>\r\n <div class=\"relative h-full min-h-[600px] mt-dashboard-viewer\">\r\n @if (!loading() && hasRenderableContent()) {\r\n @if (showFilters() && showFilterTrigger() && hasPageFilters()) {\r\n <div\r\n class=\"dashboard-viewer-filter-toolbar mb-3 flex items-center justify-end\"\r\n >\r\n <mt-button\r\n [label]=\"t('manageFilter')\"\r\n icon=\"general.filter-funnel-01\"\r\n variant=\"outlined\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [tooltip]=\"t('manageFilter')\"\r\n (click)=\"$event.stopPropagation(); openFiltersPanel()\"\r\n />\r\n </div>\r\n }\r\n\r\n <div class=\"dashboard-viewer-layout-wrapper\">\r\n <div\r\n class=\"dashboard-viewer-layout\"\r\n [style.min-height]=\"layoutHeight()\"\r\n >\r\n @for (\r\n item of visibleItems();\r\n track trackByDashboardId($index, item)\r\n ) {\r\n <div\r\n class=\"dashboard-viewer-item\"\r\n [class.dashboard-viewer-item--group]=\"isGroup(item)\"\r\n [class.dashboard-viewer-item--header]=\"isHeader(item)\"\r\n [class.dashboard-viewer-item--topbar]=\"isTopbar(item)\"\r\n [style.grid-column]=\"getGridColumn(item)\"\r\n [style.grid-row]=\"getGridRow(item)\"\r\n >\r\n <!-- Group Container -->\r\n @if (isGroup(item)) {\r\n @if (!item.loading) {\r\n <div\r\n class=\"group-container h-full flex flex-col rounded-lg border border-surface-200 overflow-hidden\"\r\n [style.background-color]=\"\r\n getStyleConfig(item)['background-color'] ||\r\n 'var(--surface-card)'\r\n \"\r\n >\r\n <!-- Group Header with Tabs -->\r\n <div\r\n class=\"group-header flex items-center justify-between px-4 py-2 bg-surface-50 border-b border-surface-200\"\r\n >\r\n <span class=\"font-medium text-sm\">{{\r\n getGroupTitle(item)\r\n }}</span>\r\n <div class=\"group-tabs flex items-center gap-1\">\r\n @for (\r\n child of getGroupChildren(item);\r\n track child.config?.serviceConfig?.dashboardId;\r\n let gIndex = $index\r\n ) {\r\n @if (getItemIcon(child); as icon) {\r\n <button\r\n type=\"button\"\r\n class=\"w-8 h-8 flex items-center justify-center rounded transition-colors\"\r\n [class.bg-primary-100]=\"\r\n item.selectedGroupIndex === gIndex\r\n \"\r\n [class.text-primary-600]=\"\r\n item.selectedGroupIndex === gIndex\r\n \"\r\n [class.text-muted-color]=\"\r\n item.selectedGroupIndex !== gIndex\r\n \"\r\n [class.hover:bg-surface-100]=\"\r\n item.selectedGroupIndex !== gIndex\r\n \"\r\n (click)=\"selectGroupChild(item, gIndex)\"\r\n >\r\n <i class=\"mti mti-{{ icon }}\"></i>\r\n </button>\r\n } @else {\r\n <button\r\n pButton\r\n type=\"button\"\r\n class=\"p-button-text p-button-sm\"\r\n [class.p-button-primary]=\"\r\n item.selectedGroupIndex === gIndex\r\n \"\r\n [class.p-button-secondary]=\"\r\n item.selectedGroupIndex !== gIndex\r\n \"\r\n [label]=\"getItemTitle(child)\"\r\n (click)=\"selectGroupChild(item, gIndex)\"\r\n ></button>\r\n }\r\n }\r\n </div>\r\n </div>\r\n\r\n <!-- Group Body - Selected Child Content -->\r\n <div class=\"group-body flex-1 min-h-0\">\r\n @if (\r\n item.selectedGroupIndex !== null &&\r\n item.selectedGroupIndex !== undefined\r\n ) {\r\n @for (\r\n child of getGroupChildren(item);\r\n track child.config?.serviceConfig?.dashboardId;\r\n let cIndex = $index\r\n ) {\r\n @if (\r\n cIndex === item.selectedGroupIndex &&\r\n !child.loading\r\n ) {\r\n <mt-dashboard-item\r\n class=\"dashboard-viewer-content-item\"\r\n [config]=\"child.config\"\r\n [chartTypeId]=\"child.chartTypeId\"\r\n [pageName]=\"\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n pageConfig()?.name?.['ar'] ||\r\n ''\r\n \"\r\n [extraFilters]=\"extraFilters()\"\r\n [queryParams]=\"pageQueryParams()\"\r\n [reportId]=\"pageId()\"\r\n [ignoreQueryFilter]=\"\r\n shouldIgnoreQueryFilter(child)\r\n \"\r\n [inGroup]=\"true\"\r\n >\r\n </mt-dashboard-item>\r\n }\r\n }\r\n }\r\n </div>\r\n </div>\r\n }\r\n }\r\n <!-- Header Item -->\r\n @else if (isHeader(item)) {\r\n @if (!item.loading) {\r\n <mt-dashboard-item\r\n class=\"dashboard-viewer-content-item\"\r\n [config]=\"item.config\"\r\n [chartTypeId]=\"item.chartTypeId\"\r\n [pageName]=\"\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n pageConfig()?.name?.['ar'] ||\r\n ''\r\n \"\r\n [extraFilters]=\"extraFilters()\"\r\n [queryParams]=\"pageQueryParams()\"\r\n [reportId]=\"pageId()\"\r\n [ignoreQueryFilter]=\"shouldIgnoreQueryFilter(item)\"\r\n [inGroup]=\"false\"\r\n >\r\n </mt-dashboard-item>\r\n }\r\n }\r\n <!-- Topbar Item -->\r\n @else if (isTopbar(item)) {\r\n @if (!item.loading) {\r\n <mt-dashboard-item\r\n class=\"dashboard-viewer-content-item\"\r\n [config]=\"item.config\"\r\n [chartTypeId]=\"item.chartTypeId\"\r\n [pageName]=\"\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n pageConfig()?.name?.['ar'] ||\r\n ''\r\n \"\r\n [extraFilters]=\"extraFilters()\"\r\n [queryParams]=\"pageQueryParams()\"\r\n [reportId]=\"pageId()\"\r\n [ignoreQueryFilter]=\"shouldIgnoreQueryFilter(item)\"\r\n [inGroup]=\"false\"\r\n >\r\n </mt-dashboard-item>\r\n }\r\n }\r\n <!-- Regular Chart Item -->\r\n @else {\r\n @if (!item.loading) {\r\n <mt-dashboard-item\r\n class=\"dashboard-viewer-content-item\"\r\n [config]=\"item.config\"\r\n [chartTypeId]=\"item.chartTypeId\"\r\n [pageName]=\"\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n pageConfig()?.name?.['ar'] ||\r\n ''\r\n \"\r\n [extraFilters]=\"extraFilters()\"\r\n [queryParams]=\"pageQueryParams()\"\r\n [reportId]=\"pageId()\"\r\n [ignoreQueryFilter]=\"shouldIgnoreQueryFilter(item)\"\r\n [inGroup]=\"false\"\r\n >\r\n </mt-dashboard-item>\r\n }\r\n }\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n\r\n <!-- Hidden Dialogs (for modal rendering) -->\r\n @if (dialogs().length > 0) {\r\n <div class=\"hidden\">\r\n @for (\r\n dialog of dialogs();\r\n track dialog.config?.serviceConfig?.dashboardId\r\n ) {\r\n <!-- Dialog placeholder - will be rendered in modal when triggered -->\r\n <div\r\n [attr.data-dialog-id]=\"\r\n dialog.config?.serviceConfig?.dashboardId\r\n \"\r\n ></div>\r\n }\r\n </div>\r\n }\r\n } @else if (loading()) {\r\n <!-- Loading State -->\r\n <div class=\"flex items-center justify-center h-64\">\r\n <div class=\"text-center\">\r\n <i\r\n class=\"mti mti-loader-2 text-4xl text-primary animate-spin mb-2\"\r\n ></i>\r\n <p class=\"text-muted-color\">{{ t(\"loading\") }}</p>\r\n </div>\r\n </div>\r\n } @else {\r\n <div\r\n class=\"flex flex-col items-center justify-center h-64 text-muted-color\"\r\n >\r\n <i class=\"mti mti-layout text-6xl mb-4\"></i>\r\n <p class=\"text-lg\">{{ t(\"noPageSelected\") }}</p>\r\n <p class=\"text-sm\">{{ t(\"selectPageToStart\") }}</p>\r\n </div>\r\n }\r\n </div>\r\n </ng-template>\r\n</ng-container>\r\n", styles: [".mt-dashboard-viewer{width:100%;height:100%}.dashboard-viewer-layout-wrapper{width:100%}.dashboard-viewer-layout{display:grid;grid-template-columns:repeat(36,minmax(0,1fr));grid-auto-rows:60px;gap:10px;width:100%;align-items:stretch}.dashboard-viewer-item{display:flex;min-width:0;min-height:0}.dashboard-viewer-item>*{width:100%;height:100%}.dashboard-viewer-content-item{display:block;flex:1 1 auto;min-width:0;min-height:0;width:100%;height:100%}.dashboard-viewer-item--header{z-index:1;overflow:hidden;border:1px solid var(--p-surface-200, #e5e7eb);border-radius:.5rem;background:var(--p-surface-0, #fff);box-shadow:0 1px 2px #0f172a14}.dashboard-viewer-item--topbar{z-index:2;overflow:visible;border:0;border-radius:0;background:transparent;box-shadow:none}.group-container{background-color:var(--surface-card)}.group-header{flex-shrink:0}.group-tabs{flex-wrap:wrap}.group-body{background-color:var(--surface-0)}.header-item{background-color:transparent}.topbar-item{background-color:var(--surface-50)}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.table-responsive{max-height:75vh;overflow-y:auto;overflow-x:auto}.modal-content{border:0!important}.custom-donut-chart{display:flex;justify-content:center;height:auto!important}.custom-donut-chart canvas{margin-top:-1.5rem!important}@media(max-width:768px){.dashboard-viewer-layout{display:flex;flex-direction:column;min-height:0!important}.dashboard-viewer-item{min-height:220px}.dashboard-viewer-item--header,.dashboard-viewer-item--topbar{min-height:72px}.dashboard-viewer-item--group{min-height:280px}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i2$4.ButtonDirective, selector: "[pButton]", inputs: ["ptButtonDirective", "pButtonPT", "pButtonUnstyled", "hostName", "text", "plain", "raised", "size", "outlined", "rounded", "iconPos", "loadingIcon", "fluid", "label", "icon", "loading", "buttonProps", "severity"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: DashboardItem, selector: "mt-dashboard-item", inputs: ["config", "chartTypeId", "readonly", "pageName", "inGroup", "isDialog", "queryParams", "extraFilters", "reportId", "ignoreQueryFilter", "builderMode"], outputs: ["actionTriggered", "configureRequested", "titleEdited"] }, { kind: "component", type: Page, selector: "mt-page", inputs: ["backButton", "backButtonIcon", "avatarIcon", "avatarStyle", "avatarShape", "title", "tabs", "activeTab", "contentClass", "contentId"], outputs: ["backButtonClick", "tabChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
48327
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: DashboardViewer, isStandalone: true, selector: "mt-dashboard-viewer", inputs: { isPage: { classPropertyName: "isPage", publicName: "isPage", isSignal: true, isRequired: false, transformFunction: null }, pageTitle: { classPropertyName: "pageTitle", publicName: "pageTitle", isSignal: true, isRequired: false, transformFunction: null }, backButton: { classPropertyName: "backButton", publicName: "backButton", isSignal: true, isRequired: false, transformFunction: null }, pageId: { classPropertyName: "pageId", publicName: "pageId", isSignal: true, isRequired: false, transformFunction: null }, dashboardData: { classPropertyName: "dashboardData", publicName: "dashboardData", isSignal: true, isRequired: false, transformFunction: null }, chartsData: { classPropertyName: "chartsData", publicName: "chartsData", isSignal: true, isRequired: false, transformFunction: null }, dialogsData: { classPropertyName: "dialogsData", publicName: "dialogsData", isSignal: true, isRequired: false, transformFunction: null }, filtersData: { classPropertyName: "filtersData", publicName: "filtersData", isSignal: true, isRequired: false, transformFunction: null }, extraFilters: { classPropertyName: "extraFilters", publicName: "extraFilters", isSignal: true, isRequired: false, transformFunction: null }, lookups: { classPropertyName: "lookups", publicName: "lookups", isSignal: true, isRequired: false, transformFunction: null }, statuses: { classPropertyName: "statuses", publicName: "statuses", isSignal: true, isRequired: false, transformFunction: null }, levelsSchema: { classPropertyName: "levelsSchema", publicName: "levelsSchema", isSignal: true, isRequired: false, transformFunction: null }, levelLogsResolver: { classPropertyName: "levelLogsResolver", publicName: "levelLogsResolver", isSignal: true, isRequired: false, transformFunction: null }, showFilters: { classPropertyName: "showFilters", publicName: "showFilters", isSignal: true, isRequired: false, transformFunction: null }, showFilterTrigger: { classPropertyName: "showFilterTrigger", publicName: "showFilterTrigger", isSignal: true, isRequired: false, transformFunction: null }, ignoreQueryFilter: { classPropertyName: "ignoreQueryFilter", publicName: "ignoreQueryFilter", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pageLoaded: "pageLoaded", onBack: "onBack", chartClick: "chartClick" }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'dashboardBuilder'\">\r\n <!-- Page mode -->\r\n @if (isPage()) {\r\n <mt-page\r\n [title]=\"\r\n pageTitle() ||\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n t('dashboard')\r\n \"\r\n [backButton]=\"backButton()\"\r\n (backButtonClick)=\"onBack.emit()\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"viewerContent\" />\r\n </mt-page>\r\n } @else {\r\n <!-- Non-page mode -->\r\n <ng-container *ngTemplateOutlet=\"viewerContent\" />\r\n }\r\n\r\n <!-- Reusable viewer content template -->\r\n <ng-template #viewerContent>\r\n <div class=\"relative h-full min-h-[600px] mt-dashboard-viewer\">\r\n @if (!loading() && hasRenderableContent()) {\r\n @if (showFilters() && showFilterTrigger() && hasPageFilters()) {\r\n <div\r\n class=\"dashboard-viewer-filter-toolbar mb-3 flex items-center justify-end\"\r\n >\r\n <mt-button\r\n [label]=\"t('manageFilter')\"\r\n icon=\"general.filter-funnel-01\"\r\n variant=\"outlined\"\r\n severity=\"secondary\"\r\n size=\"small\"\r\n [tooltip]=\"t('manageFilter')\"\r\n (click)=\"$event.stopPropagation(); openFiltersPanel()\"\r\n />\r\n </div>\r\n }\r\n\r\n <div class=\"dashboard-viewer-layout-wrapper\">\r\n <div\r\n class=\"dashboard-viewer-layout\"\r\n [style.min-height]=\"layoutHeight()\"\r\n >\r\n @for (\r\n item of visibleItems();\r\n track trackByDashboardId($index, item)\r\n ) {\r\n <div\r\n class=\"dashboard-viewer-item\"\r\n [class.dashboard-viewer-item--group]=\"isGroup(item)\"\r\n [class.dashboard-viewer-item--header]=\"isHeader(item)\"\r\n [class.dashboard-viewer-item--topbar]=\"isTopbar(item)\"\r\n [style.grid-column]=\"getGridColumn(item)\"\r\n [style.grid-row]=\"getGridRow(item)\"\r\n >\r\n <!-- Group Container -->\r\n @if (isGroup(item)) {\r\n @if (!item.loading) {\r\n <div\r\n class=\"group-container h-full flex flex-col rounded-lg border border-surface-200 overflow-hidden\"\r\n [style.background-color]=\"\r\n getStyleConfig(item)['background-color'] ||\r\n 'var(--surface-card)'\r\n \"\r\n >\r\n <!-- Group Header with Tabs -->\r\n <div\r\n class=\"group-header flex items-center justify-between px-4 py-2 bg-surface-50 border-b border-surface-200\"\r\n >\r\n <span class=\"font-medium text-sm\">{{\r\n getGroupTitle(item)\r\n }}</span>\r\n <div class=\"group-tabs flex items-center gap-1\">\r\n @for (\r\n child of getGroupChildren(item);\r\n track child.config?.serviceConfig?.dashboardId;\r\n let gIndex = $index\r\n ) {\r\n @if (getItemIcon(child); as icon) {\r\n <button\r\n type=\"button\"\r\n class=\"w-8 h-8 flex items-center justify-center rounded transition-colors\"\r\n [class.bg-primary-100]=\"\r\n item.selectedGroupIndex === gIndex\r\n \"\r\n [class.text-primary-600]=\"\r\n item.selectedGroupIndex === gIndex\r\n \"\r\n [class.text-muted-color]=\"\r\n item.selectedGroupIndex !== gIndex\r\n \"\r\n [class.hover:bg-surface-100]=\"\r\n item.selectedGroupIndex !== gIndex\r\n \"\r\n (click)=\"selectGroupChild(item, gIndex)\"\r\n >\r\n <i class=\"mti mti-{{ icon }}\"></i>\r\n </button>\r\n } @else {\r\n <button\r\n pButton\r\n type=\"button\"\r\n class=\"p-button-text p-button-sm\"\r\n [class.p-button-primary]=\"\r\n item.selectedGroupIndex === gIndex\r\n \"\r\n [class.p-button-secondary]=\"\r\n item.selectedGroupIndex !== gIndex\r\n \"\r\n [label]=\"getItemTitle(child)\"\r\n (click)=\"selectGroupChild(item, gIndex)\"\r\n ></button>\r\n }\r\n }\r\n </div>\r\n </div>\r\n\r\n <!-- Group Body - Selected Child Content -->\r\n <div class=\"group-body flex-1 min-h-0\">\r\n @if (\r\n item.selectedGroupIndex !== null &&\r\n item.selectedGroupIndex !== undefined\r\n ) {\r\n @for (\r\n child of getGroupChildren(item);\r\n track child.config?.serviceConfig?.dashboardId;\r\n let cIndex = $index\r\n ) {\r\n @if (\r\n cIndex === item.selectedGroupIndex &&\r\n !child.loading\r\n ) {\r\n <mt-dashboard-item\r\n class=\"dashboard-viewer-content-item\"\r\n [config]=\"child.config\"\r\n [chartTypeId]=\"child.chartTypeId\"\r\n [pageName]=\"\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n pageConfig()?.name?.['ar'] ||\r\n ''\r\n \"\r\n [extraFilters]=\"extraFilters()\"\r\n [queryParams]=\"pageQueryParams()\"\r\n [reportId]=\"pageId()\"\r\n [ignoreQueryFilter]=\"\r\n shouldIgnoreQueryFilter(child)\r\n \"\r\n [inGroup]=\"true\"\r\n >\r\n </mt-dashboard-item>\r\n }\r\n }\r\n }\r\n </div>\r\n </div>\r\n }\r\n }\r\n <!-- Header Item -->\r\n @else if (isHeader(item)) {\r\n @if (!item.loading) {\r\n <mt-dashboard-item\r\n class=\"dashboard-viewer-content-item\"\r\n [config]=\"item.config\"\r\n [chartTypeId]=\"item.chartTypeId\"\r\n [pageName]=\"\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n pageConfig()?.name?.['ar'] ||\r\n ''\r\n \"\r\n [extraFilters]=\"extraFilters()\"\r\n [queryParams]=\"pageQueryParams()\"\r\n [reportId]=\"pageId()\"\r\n [ignoreQueryFilter]=\"shouldIgnoreQueryFilter(item)\"\r\n [inGroup]=\"false\"\r\n >\r\n </mt-dashboard-item>\r\n }\r\n }\r\n <!-- Topbar Item -->\r\n @else if (isTopbar(item)) {\r\n @if (!item.loading) {\r\n <mt-dashboard-item\r\n class=\"dashboard-viewer-content-item\"\r\n [config]=\"item.config\"\r\n [chartTypeId]=\"item.chartTypeId\"\r\n [pageName]=\"\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n pageConfig()?.name?.['ar'] ||\r\n ''\r\n \"\r\n [extraFilters]=\"extraFilters()\"\r\n [queryParams]=\"pageQueryParams()\"\r\n [reportId]=\"pageId()\"\r\n [ignoreQueryFilter]=\"shouldIgnoreQueryFilter(item)\"\r\n [inGroup]=\"false\"\r\n >\r\n </mt-dashboard-item>\r\n }\r\n }\r\n <!-- Regular Chart Item -->\r\n @else {\r\n @if (!item.loading) {\r\n <mt-dashboard-item\r\n class=\"dashboard-viewer-content-item\"\r\n [config]=\"item.config\"\r\n [chartTypeId]=\"item.chartTypeId\"\r\n [pageName]=\"\r\n pageConfig()?.name?.[languageCode()] ||\r\n pageConfig()?.name?.['en'] ||\r\n pageConfig()?.name?.['ar'] ||\r\n ''\r\n \"\r\n [extraFilters]=\"extraFilters()\"\r\n [queryParams]=\"pageQueryParams()\"\r\n [reportId]=\"pageId()\"\r\n [ignoreQueryFilter]=\"shouldIgnoreQueryFilter(item)\"\r\n [inGroup]=\"false\"\r\n >\r\n </mt-dashboard-item>\r\n }\r\n }\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n\r\n <!-- Hidden Dialogs (for modal rendering) -->\r\n @if (dialogs().length > 0) {\r\n <div class=\"hidden\">\r\n @for (\r\n dialog of dialogs();\r\n track dialog.config?.serviceConfig?.dashboardId\r\n ) {\r\n <!-- Dialog placeholder - will be rendered in modal when triggered -->\r\n <div\r\n [attr.data-dialog-id]=\"\r\n dialog.config?.serviceConfig?.dashboardId\r\n \"\r\n ></div>\r\n }\r\n </div>\r\n }\r\n } @else if (loading()) {\r\n <!-- Loading State -->\r\n <div class=\"flex items-center justify-center h-64\">\r\n <div class=\"text-center\">\r\n <i\r\n class=\"mti mti-loader-2 text-4xl text-primary animate-spin mb-2\"\r\n ></i>\r\n <p class=\"text-muted-color\">{{ t(\"loading\") }}</p>\r\n </div>\r\n </div>\r\n } @else {\r\n <div\r\n class=\"flex flex-col items-center justify-center h-64 text-muted-color\"\r\n >\r\n <i class=\"mti mti-layout text-6xl mb-4\"></i>\r\n <p class=\"text-lg\">{{ t(\"noPageSelected\") }}</p>\r\n <p class=\"text-sm\">{{ t(\"selectPageToStart\") }}</p>\r\n </div>\r\n }\r\n </div>\r\n </ng-template>\r\n</ng-container>\r\n", styles: [".mt-dashboard-viewer{width:100%;height:100%}.dashboard-viewer-layout-wrapper{width:100%}.dashboard-viewer-layout{display:grid;grid-template-columns:repeat(36,minmax(0,1fr));grid-auto-rows:60px;gap:10px;width:100%;align-items:stretch}.dashboard-viewer-item{display:flex;min-width:0;min-height:0}.dashboard-viewer-item>*{width:100%;height:100%}.dashboard-viewer-content-item{display:block;flex:1 1 auto;min-width:0;min-height:0;width:100%;height:100%}.dashboard-viewer-item--header{z-index:1;overflow:hidden;border:1px solid var(--p-surface-200, #e5e7eb);border-radius:.5rem;background:var(--p-surface-0, #fff);box-shadow:0 1px 2px #0f172a14}.dashboard-viewer-item--topbar{z-index:2;overflow:visible;border:0;border-radius:0;background:transparent;box-shadow:none}.group-container{background-color:var(--surface-card)}.group-header{flex-shrink:0}.group-tabs{flex-wrap:wrap}.group-body{background-color:var(--surface-0)}.header-item{background-color:transparent}.topbar-item{background-color:var(--surface-50)}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.table-responsive{max-height:75vh;overflow-y:auto;overflow-x:auto}.modal-content{border:0!important}.custom-donut-chart{display:flex;justify-content:center;height:auto!important}.custom-donut-chart canvas{margin-top:-1.5rem!important}@media(max-width:768px){.dashboard-viewer-layout{display:flex;flex-direction:column;min-height:0!important}.dashboard-viewer-item{min-height:220px}.dashboard-viewer-item--header,.dashboard-viewer-item--topbar{min-height:72px}.dashboard-viewer-item--group{min-height:280px}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i2$4.ButtonDirective, selector: "[pButton]", inputs: ["ptButtonDirective", "pButtonPT", "pButtonUnstyled", "hostName", "text", "plain", "raised", "size", "outlined", "rounded", "iconPos", "loadingIcon", "fluid", "label", "icon", "loading", "buttonProps", "severity"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: DashboardItem, selector: "mt-dashboard-item", inputs: ["config", "chartTypeId", "readonly", "useCachedDataOnly", "pageName", "inGroup", "isDialog", "queryParams", "extraFilters", "reportId", "ignoreQueryFilter", "builderMode"], outputs: ["actionTriggered", "configureRequested", "titleEdited"] }, { kind: "component", type: Page, selector: "mt-page", inputs: ["backButton", "backButtonIcon", "avatarIcon", "avatarStyle", "avatarShape", "title", "tabs", "activeTab", "contentClass", "contentId"], outputs: ["backButtonClick", "tabChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
48165
48328
|
}
|
|
48166
48329
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: DashboardViewer, decorators: [{
|
|
48167
48330
|
type: Component,
|
|
@@ -51434,5 +51597,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
51434
51597
|
* Generated bundle index. Do not edit.
|
|
51435
51598
|
*/
|
|
51436
51599
|
|
|
51437
|
-
export {
|
|
51438
|
-
//# sourceMappingURL=masterteam-dashboard-builder-masterteam-dashboard-builder-
|
|
51600
|
+
export { BarChartHandler as $, mergePropertyAppearance as A, EntityPreviewCardComponent as B, CardContentComponent as C, DashboardItemStoreService as D, EChartComponent as E, FilterUtilsService as F, ListStatisticCardComponent as G, HeaderCardComponent as H, MAP_FALLBACK_COLORS as I, isPlottable as J, plottableGroups as K, LastHistoryLevelCardComponent as L, MAP_MARKER_PATH as M, buildMapChartOption as N, MAP_REGIONS as O, PropertiesCardComponent as P, DEFAULT_MAP_REGION_KEY as Q, MAP_DATA_ATTRIBUTION as R, StaticFiltersComponent as S, resolveMapRegion as T, MapViewComponent as U, SkeletonCardComponent as V, resolveStatisticIconPlacement as W, StatisticCardComponent as X, TableCardComponent as Y, TopbarCardComponent as Z, ChartDataService as _, DashboardItem as a, LegendOrderField as a$, PieChartHandler as a0, StackBarChartHandler as a1, axisFormatters as a2, groupDatesByYearAndMonth as a3, GaugeChartHandler as a4, TableViewHandler as a5, OverviewCardHandler as a6, TimelineHandler as a7, LineChartHandler as a8, SnapshotHandler as a9, DashboardStoreService as aA, isManagePagesDeleteResult as aB, ManagePages as aC, ManageBreadcrumb as aD, ManageFilterOnPage as aE, DynamicFiltersConfig as aF, ChartSettingsDrawer as aG, DisplaySettings as aH, DefaultControlUi as aI, PieControlUi as aJ, BarControlUi as aK, StackBarControlUi as aL, ManageItem as aM, CHART_TYPES as aN, ManageItemService as aO, GeneralSettings as aP, DataSourceSettings as aQ, ActionsSettings as aR, ChartViewer as aS, StyleStudioDrawer as aT, StyleSettingsRenderer as aU, expandResetPatches as aV, StyleField as aW, SegmentedField as aX, ColorListField as aY, ArrayBuilderField as aZ, KeyValueMapField as a_, ComparisonChartHandler as aa, SplitterChartHandler as ab, LevelCardHandler as ac, MapChartHandler as ad, RingGaugeChartHandler as ae, SPlusChartHandler as af, PhaseGateStepperHandler as ag, formatCurrency as ah, getCurrencySuffix as ai, formatPercentage as aj, formatNumber as ak, formatDate as al, createAxisFormatter as am, createTooltipFormatter as an, formatAxisLabel as ao, formatWordsUnderBar as ap, formatXAxis as aq, handleFiltersForCustom as ar, handleFilterForCard as as, handleFilterForSnapshot as at, DashboardList as au, MODULE_CLASSIFICATION_LOG as av, MODULE_CLASSIFICATION_LOG_NAME as aw, isLogClassification as ax, HTTPMethod as ay, DashboardBuilderService as az, DashboardDialogHeader as b, listControlSchemas as b$, ItemCardMenuComponent as b0, ChartFilterDrawer as b1, ItemContextToolbarComponent as b2, ItemConfigPopoverComponent as b3, GuidedConfigDialogComponent as b4, FilterChipsBarComponent as b5, FilterBuilderComponent as b6, DatasourcePanelComponent as b7, SchemaControlRendererComponent as b8, FilterByGroupPipe as b9, styleToUi as bA, applyStyleToPersisted as bB, layoutToUi as bC, applyLayoutToPersisted as bD, labelLegendFormatToUi as bE, applyLabelLegendFormatToPersisted as bF, behaviorToUi as bG, applyBehaviorToPersisted as bH, applyFilterChipsToPersisted as bI, persistedToUi as bJ, buildAssembly as bK, STYLE_PRESETS as bL, presetsForCapability as bM, findPreset as bN, validate as bO, hasBlockingIssues as bP, groupIssuesByDomain as bQ, parseAdvancedJson as bR, deepMerge$1 as bS, formatForEditor as bT, CUSTOM_COLOR_OPTION as bU, readByPath$1 as bV, setByPath as bW, applyControlPatchToPersisted as bX, applyControlPatchesToPersisted as bY, getControlSchema as bZ, listControlSchemaIds as b_, GetChartActionsPipe as ba, CHART_CAPABILITIES as bb, getCapabilityById as bc, resolveCapability as bd, toBackendChartType as be, normalizeChartTypeForRequest as bf, normalizeFilterOperation as bg, normalizeAggregateFunction as bh, normalizeFilters as bi, selectorFromLegacy as bj, moduleIdFromSelector as bk, toBackendSourceLink as bl, toFormSourceLink as bm, normalizeOnLoad as bn, normalizeBeforeSave as bo, normalizeBeforeRequest as bp, CONFIG_DOMAINS as bq, domainsForCapability as br, findDomain as bs, POPOVER_TABS as bt, POPOVER_TAB_SPECS as bu, titleToUi as bv, applyTitleToPersisted as bw, datasourceToUi as bx, fieldsToUi as by, filtersToUi as bz, cloneDeep$1 as c, getFallbackControlSchema as c0, flattenSchema as c1, resolveDisplayFields as c2, buildDisplayFieldPredicate as c3, bindingKey as c4, getBinding as c5, listBindings as c6, listBindingsForChart as c7, readBoundValue as c8, ITEM_GUIDANCE_REGISTRY as c9, describeGuidance as ca, ItemGuidanceService as cb, DashboardBuilder as d, DashboardViewer as e, switchAllKeysSmall$1 as f, getNestedData as g, dynamicTextReplace as h, dynamicReorder as i, generalConfiguration as j, formatValue as k, getLocalizedTitle as l, sortChartData as m, addCommasToNumber as n, sortDataTableView as o, isMobilePlatform$1 as p, getColorFromConditions as q, resolveDashboardDialogHeader as r, switchAllKeysToLower as s, CardFilterComponent as t, DynamicFiltersComponent as u, CardInfoComponent as v, ChartCardComponent as w, resolveEntityUserPhoto as x, EntityInfoComponent as y, normalizeDashboardCardEntityValue as z };
|
|
51601
|
+
//# sourceMappingURL=masterteam-dashboard-builder-masterteam-dashboard-builder-CLvaME2w.mjs.map
|