@masterteam/dashboard-builder 0.0.86 → 0.0.88
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 +23 -2
- package/assets/dashboard-builder.css +1 -1
- package/assets/i18n/ar.json +8 -4
- package/assets/i18n/en.json +8 -5
- package/fesm2022/{masterteam-dashboard-builder-dashboard-dialog.component-Cw9EV2Xn.mjs → masterteam-dashboard-builder-dashboard-dialog.component-BFkefeOr.mjs} +2 -2
- package/fesm2022/{masterteam-dashboard-builder-dashboard-dialog.component-Cw9EV2Xn.mjs.map → masterteam-dashboard-builder-dashboard-dialog.component-BFkefeOr.mjs.map} +1 -1
- package/fesm2022/{masterteam-dashboard-builder-masterteam-dashboard-builder-Bcn8YzoD.mjs → masterteam-dashboard-builder-masterteam-dashboard-builder-DaN0WjWE.mjs} +347 -49
- package/fesm2022/masterteam-dashboard-builder-masterteam-dashboard-builder-DaN0WjWE.mjs.map +1 -0
- package/fesm2022/masterteam-dashboard-builder.mjs +1 -1
- package/package.json +3 -3
- package/types/masterteam-dashboard-builder.d.ts +97 -13
- package/fesm2022/masterteam-dashboard-builder-masterteam-dashboard-builder-Bcn8YzoD.mjs.map +0 -1
|
@@ -50,6 +50,7 @@ import { Tooltip as Tooltip$1, TruncateTooltip } from '@masterteam/components/to
|
|
|
50
50
|
import { ToastService } from '@masterteam/components/toast';
|
|
51
51
|
import { DateField } from '@masterteam/components/date-field';
|
|
52
52
|
import { UserSearchField } from '@masterteam/components/user-search-field';
|
|
53
|
+
import { TableValueResolver, Table } from '@masterteam/components/table';
|
|
53
54
|
import { SecureImagePipe } from '@masterteam/components/upload-field';
|
|
54
55
|
import * as mtIcons from '@masterteam/icons/assets/select-icons.json';
|
|
55
56
|
import { Avatar } from '@masterteam/components/avatar';
|
|
@@ -66,7 +67,6 @@ import { Menu } from '@masterteam/components/menu';
|
|
|
66
67
|
import { Chip } from '@masterteam/components/chip';
|
|
67
68
|
import * as i2$4 from 'primeng/button';
|
|
68
69
|
import { ButtonModule } from 'primeng/button';
|
|
69
|
-
import { Table } from '@masterteam/components/table';
|
|
70
70
|
import * as i2$5 from 'primeng/inputnumber';
|
|
71
71
|
import { InputNumberModule } from 'primeng/inputnumber';
|
|
72
72
|
|
|
@@ -3532,8 +3532,20 @@ function toBackendSourceLink(link, fallbackId) {
|
|
|
3532
3532
|
* (source1SelectionId / source1PropertyKey) both restore correctly — the
|
|
3533
3533
|
* source-link form was rendering blank because it only read the FE keys.
|
|
3534
3534
|
*
|
|
3535
|
-
*
|
|
3536
|
-
*
|
|
3535
|
+
* A chained ("From previous link") row is encoded on EITHER side:
|
|
3536
|
+
*
|
|
3537
|
+
* - `sourceLinkId` — side 1 comes from a previous link's result, joined on
|
|
3538
|
+
* `source1LinkProperty`. This is what `toBackendSourceLink` writes for a
|
|
3539
|
+
* row the builder authored, and it maps straight back with no swap.
|
|
3540
|
+
* - `sourceLinkId2` — side 2 comes from a previous link's result (what the
|
|
3541
|
+
* backend's context-navigation path builder emits). The form only models
|
|
3542
|
+
* "previous link on side 1", so that encoding is mirrored into side 1 with
|
|
3543
|
+
* the two link properties swapped.
|
|
3544
|
+
*
|
|
3545
|
+
* Reading only `sourceLinkId2` silently dropped `sourceLinkId` on the way back
|
|
3546
|
+
* in, so a row saved as chained reloaded as selection-to-selection and the
|
|
3547
|
+
* builder's link-type tab snapped back to "Selection ↔ Selection" the moment a
|
|
3548
|
+
* previous link was picked (#1546).
|
|
3537
3549
|
*/
|
|
3538
3550
|
function toFormSourceLink(link) {
|
|
3539
3551
|
if (!link)
|
|
@@ -3555,8 +3567,23 @@ function toFormSourceLink(link) {
|
|
|
3555
3567
|
isFilterLinkage: !!link.isFilterLinkage,
|
|
3556
3568
|
};
|
|
3557
3569
|
}
|
|
3558
|
-
|
|
3559
|
-
|
|
3570
|
+
// Chained on side 1 — the builder's own encoding. Straight through: the
|
|
3571
|
+
// backend reads source1LinkProperty against the referenced link's result and
|
|
3572
|
+
// ignores sourceId1 entirely (ChartBuilder.GetSourceData1).
|
|
3573
|
+
if (link.sourceLinkId != null && link.sourceLinkId > 0) {
|
|
3574
|
+
return {
|
|
3575
|
+
sourceLinkId: link.sourceLinkId,
|
|
3576
|
+
source1SelectionId: null,
|
|
3577
|
+
source2SelectionId: link.sourceId2 ?? null,
|
|
3578
|
+
source1PropertyKey: link.source1LinkProperty ?? null,
|
|
3579
|
+
source2PropertyKey: link.source2LinkProperty ?? null,
|
|
3580
|
+
isLeftJoin: !!link.isLeftJoin,
|
|
3581
|
+
isFilterLinkage: !!link.isFilterLinkage,
|
|
3582
|
+
};
|
|
3583
|
+
}
|
|
3584
|
+
// Chained on side 2 — flip it onto side 1, which is the only side the form
|
|
3585
|
+
// can express, and swap the link properties with it.
|
|
3586
|
+
if (link.sourceLinkId2 != null && link.sourceLinkId2 > 0) {
|
|
3560
3587
|
return {
|
|
3561
3588
|
sourceLinkId: link.sourceLinkId2,
|
|
3562
3589
|
source1SelectionId: null,
|
|
@@ -6285,6 +6312,16 @@ const ICON_PLACEMENT_OPTIONS = [
|
|
|
6285
6312
|
{ label: 'End', value: 'end' },
|
|
6286
6313
|
{ label: 'Above title', value: 'top' },
|
|
6287
6314
|
];
|
|
6315
|
+
/** Inner padding steps — shared by the card style and layout-widget sections. */
|
|
6316
|
+
const PADDING_OPTIONS = [
|
|
6317
|
+
{ label: 'None', value: 0 },
|
|
6318
|
+
{ label: 'XS', value: 4 },
|
|
6319
|
+
{ label: 'S', value: 8 },
|
|
6320
|
+
{ label: 'M', value: 16 },
|
|
6321
|
+
{ label: 'L', value: 24 },
|
|
6322
|
+
{ label: 'XL', value: 32 },
|
|
6323
|
+
{ label: 'XXL', value: 48 },
|
|
6324
|
+
];
|
|
6288
6325
|
const CARD_CONTENT_ICON_VISIBLE = (_cfg, capability) => ['chart', 'table', 'entityPreview'].includes(capability?.renderer ?? '');
|
|
6289
6326
|
const LABEL_POSITION_BAR_OPTIONS = [
|
|
6290
6327
|
{ label: 'Top', value: 'top' },
|
|
@@ -6738,15 +6775,7 @@ const CARD_STYLE_SECTION = {
|
|
|
6738
6775
|
type: 'select',
|
|
6739
6776
|
path: 'clientConfig.configAsType.padding',
|
|
6740
6777
|
default: 16,
|
|
6741
|
-
options:
|
|
6742
|
-
{ label: 'None', value: 0 },
|
|
6743
|
-
{ label: 'XS', value: 4 },
|
|
6744
|
-
{ label: 'S', value: 8 },
|
|
6745
|
-
{ label: 'M', value: 16 },
|
|
6746
|
-
{ label: 'L', value: 24 },
|
|
6747
|
-
{ label: 'XL', value: 32 },
|
|
6748
|
-
{ label: 'XXL', value: 48 },
|
|
6749
|
-
],
|
|
6778
|
+
options: PADDING_OPTIONS,
|
|
6750
6779
|
},
|
|
6751
6780
|
{
|
|
6752
6781
|
key: 'shadow',
|
|
@@ -6839,7 +6868,8 @@ const BAR_COLORS_SECTION = {
|
|
|
6839
6868
|
// Reset-section clears the whole override map, which is the right scope
|
|
6840
6869
|
// for this control (StyleField writes it through onLegendColorChange).
|
|
6841
6870
|
path: 'clientConfig.configAsType.legend.colorOverrides',
|
|
6842
|
-
|
|
6871
|
+
mirrorPaths: ['clientConfig.configAsType.overrideLabels'],
|
|
6872
|
+
description: "Set each bar's English/Arabic label and color.",
|
|
6843
6873
|
},
|
|
6844
6874
|
],
|
|
6845
6875
|
};
|
|
@@ -8614,6 +8644,8 @@ const REPEATER_SECTION = {
|
|
|
8614
8644
|
scope: 'simple',
|
|
8615
8645
|
fields: [],
|
|
8616
8646
|
};
|
|
8647
|
+
/** True once the layout widget actually has an icon to color. */
|
|
8648
|
+
const LAYOUT_WIDGET_HAS_ICON = (cfg) => Boolean(cfg.clientConfig?.configAsType?.icon);
|
|
8617
8649
|
/** Shared icon controls for the Header and Topbar layout widgets. */
|
|
8618
8650
|
const LAYOUT_WIDGET_ICON_FIELDS = [
|
|
8619
8651
|
{
|
|
@@ -8632,6 +8664,78 @@ const LAYOUT_WIDGET_ICON_FIELDS = [
|
|
|
8632
8664
|
options: ICON_PLACEMENT_OPTIONS,
|
|
8633
8665
|
description: 'Position of the icon relative to the layout widget title.',
|
|
8634
8666
|
},
|
|
8667
|
+
{
|
|
8668
|
+
// Both layout renderers push these onto the mt-avatar's
|
|
8669
|
+
// --p-avatar-color / --p-avatar-background, defaulting to a hard-coded
|
|
8670
|
+
// green when unset — so without a control the icon could not be brought
|
|
8671
|
+
// onto the dashboard's palette.
|
|
8672
|
+
key: 'iconColor',
|
|
8673
|
+
label: 'Icon color',
|
|
8674
|
+
type: 'color',
|
|
8675
|
+
path: 'clientConfig.displayConfig.StyleConfig.iconColor',
|
|
8676
|
+
visibleWhen: LAYOUT_WIDGET_HAS_ICON,
|
|
8677
|
+
},
|
|
8678
|
+
{
|
|
8679
|
+
key: 'iconBgColor',
|
|
8680
|
+
label: 'Icon background',
|
|
8681
|
+
type: 'color',
|
|
8682
|
+
path: 'clientConfig.displayConfig.StyleConfig.iconBgColor',
|
|
8683
|
+
visibleWhen: LAYOUT_WIDGET_HAS_ICON,
|
|
8684
|
+
},
|
|
8685
|
+
];
|
|
8686
|
+
/**
|
|
8687
|
+
* Shared appearance controls for the Header and Topbar layout widgets.
|
|
8688
|
+
*
|
|
8689
|
+
* The layout schema is deliberately much smaller than a chart's — it drops the
|
|
8690
|
+
* generic Card style / Palette / Legend sections that a header or topbar never
|
|
8691
|
+
* renders. Trimming it, however, also took away the styles these two widgets
|
|
8692
|
+
* DO paint: a header could not be given a background color at all even though
|
|
8693
|
+
* `header-card` has always rendered one (#1556). Every field below maps to a
|
|
8694
|
+
* value one of the two renderers reads.
|
|
8695
|
+
*/
|
|
8696
|
+
const LAYOUT_WIDGET_STYLE_FIELDS = [
|
|
8697
|
+
{
|
|
8698
|
+
// Canonical card background — the same path CARD_STYLE_SECTION writes and
|
|
8699
|
+
// the `background` binding declares. `header-card` paints `.header-card`
|
|
8700
|
+
// from it; `topbar-card` reads it first and falls back to the legacy
|
|
8701
|
+
// StyleConfig path, which the old "Topbar background" control wrote. The
|
|
8702
|
+
// mirror keeps both renderers and every already-saved topbar in agreement.
|
|
8703
|
+
key: 'background',
|
|
8704
|
+
label: 'Background',
|
|
8705
|
+
type: 'color',
|
|
8706
|
+
path: 'clientConfig.configAsType.cardStyleConfig.backgroundColor',
|
|
8707
|
+
mirrorPaths: ['clientConfig.displayConfig.StyleConfig.background-color'],
|
|
8708
|
+
},
|
|
8709
|
+
{
|
|
8710
|
+
key: 'textColor',
|
|
8711
|
+
label: 'Text color',
|
|
8712
|
+
type: 'color',
|
|
8713
|
+
path: 'clientConfig.displayConfig.StyleConfig.color',
|
|
8714
|
+
},
|
|
8715
|
+
{
|
|
8716
|
+
// Both renderers draw a 1px solid border as soon as a color is set.
|
|
8717
|
+
key: 'borderColor',
|
|
8718
|
+
label: 'Border color',
|
|
8719
|
+
type: 'color',
|
|
8720
|
+
path: 'clientConfig.displayConfig.StyleConfig.border-color',
|
|
8721
|
+
},
|
|
8722
|
+
{
|
|
8723
|
+
key: 'borderRadius',
|
|
8724
|
+
label: 'Radius',
|
|
8725
|
+
type: 'number',
|
|
8726
|
+
min: 0,
|
|
8727
|
+
max: 32,
|
|
8728
|
+
step: 1,
|
|
8729
|
+
path: 'clientConfig.configAsType.cardStyleConfig.borderRadius',
|
|
8730
|
+
},
|
|
8731
|
+
{
|
|
8732
|
+
key: 'padding',
|
|
8733
|
+
label: 'Padding',
|
|
8734
|
+
type: 'select',
|
|
8735
|
+
path: 'clientConfig.configAsType.padding',
|
|
8736
|
+
default: 16,
|
|
8737
|
+
options: PADDING_OPTIONS,
|
|
8738
|
+
},
|
|
8635
8739
|
];
|
|
8636
8740
|
const HEADER_WIDGET_SECTION = {
|
|
8637
8741
|
key: 'header-widget',
|
|
@@ -8678,6 +8782,7 @@ const HEADER_WIDGET_SECTION = {
|
|
|
8678
8782
|
type: 'boolean',
|
|
8679
8783
|
path: 'clientConfig.configAsType.headerCardConfig.isHeaderCentered',
|
|
8680
8784
|
},
|
|
8785
|
+
...LAYOUT_WIDGET_STYLE_FIELDS,
|
|
8681
8786
|
],
|
|
8682
8787
|
};
|
|
8683
8788
|
const TOPBAR_WIDGET_SECTION = {
|
|
@@ -8695,6 +8800,18 @@ const TOPBAR_WIDGET_SECTION = {
|
|
|
8695
8800
|
placeholder: 'Topbar label',
|
|
8696
8801
|
},
|
|
8697
8802
|
...LAYOUT_WIDGET_ICON_FIELDS,
|
|
8803
|
+
{
|
|
8804
|
+
// topbar-card sizes its <h3> from StyleConfig['font-size-title'], the
|
|
8805
|
+
// same key the Header widget's "Font size" control writes.
|
|
8806
|
+
key: 'fontSize',
|
|
8807
|
+
label: 'Font size',
|
|
8808
|
+
type: 'number',
|
|
8809
|
+
min: 10,
|
|
8810
|
+
max: 64,
|
|
8811
|
+
step: 1,
|
|
8812
|
+
path: 'clientConfig.displayConfig.StyleConfig.font-size-title',
|
|
8813
|
+
default: 18,
|
|
8814
|
+
},
|
|
8698
8815
|
{
|
|
8699
8816
|
// topbar-card reads configAsType.headerCardConfig.isHeaderCentered.
|
|
8700
8817
|
key: 'centerHeader',
|
|
@@ -8702,12 +8819,7 @@ const TOPBAR_WIDGET_SECTION = {
|
|
|
8702
8819
|
type: 'boolean',
|
|
8703
8820
|
path: 'clientConfig.configAsType.headerCardConfig.isHeaderCentered',
|
|
8704
8821
|
},
|
|
8705
|
-
|
|
8706
|
-
key: 'topbarBg',
|
|
8707
|
-
label: 'Topbar background',
|
|
8708
|
-
type: 'color',
|
|
8709
|
-
path: 'clientConfig.displayConfig.StyleConfig.background-color',
|
|
8710
|
-
},
|
|
8822
|
+
...LAYOUT_WIDGET_STYLE_FIELDS,
|
|
8711
8823
|
],
|
|
8712
8824
|
};
|
|
8713
8825
|
/* ============================================================================
|
|
@@ -10832,6 +10944,38 @@ const HEADER_WIDGET_BINDINGS = [
|
|
|
10832
10944
|
],
|
|
10833
10945
|
simpleOrAdvanced: 'simple',
|
|
10834
10946
|
},
|
|
10947
|
+
{
|
|
10948
|
+
// Overrides the common `background` binding to record the legacy path.
|
|
10949
|
+
// Both layout renderers accept it, and the schema field mirrors writes
|
|
10950
|
+
// into it, so topbars saved by the old "Topbar background" control keep
|
|
10951
|
+
// rendering and keep showing their color in the picker.
|
|
10952
|
+
chartId: 'header',
|
|
10953
|
+
controlId: 'background',
|
|
10954
|
+
domain: 'header',
|
|
10955
|
+
label: 'Background',
|
|
10956
|
+
uiPath: 'header.background',
|
|
10957
|
+
persistedPath: 'clientConfig.configAsType.cardStyleConfig.backgroundColor',
|
|
10958
|
+
runtimePath: 'clientConfig.configAsType.cardStyleConfig.backgroundColor',
|
|
10959
|
+
rendererReadPaths: [
|
|
10960
|
+
'clientConfig.configAsType.cardStyleConfig.backgroundColor',
|
|
10961
|
+
'clientConfig.displayConfig.StyleConfig.background-color',
|
|
10962
|
+
],
|
|
10963
|
+
legacyPersistPaths: [
|
|
10964
|
+
'clientConfig.displayConfig.StyleConfig.background-color',
|
|
10965
|
+
],
|
|
10966
|
+
simpleOrAdvanced: 'simple',
|
|
10967
|
+
},
|
|
10968
|
+
{
|
|
10969
|
+
chartId: 'header',
|
|
10970
|
+
controlId: 'textColor',
|
|
10971
|
+
domain: 'header',
|
|
10972
|
+
label: 'Text color',
|
|
10973
|
+
uiPath: 'header.textColor',
|
|
10974
|
+
persistedPath: 'clientConfig.displayConfig.StyleConfig.color',
|
|
10975
|
+
runtimePath: 'clientConfig.displayConfig.StyleConfig.color',
|
|
10976
|
+
rendererReadPaths: ['clientConfig.displayConfig.StyleConfig.color'],
|
|
10977
|
+
simpleOrAdvanced: 'simple',
|
|
10978
|
+
},
|
|
10835
10979
|
];
|
|
10836
10980
|
const TOPBAR_WIDGET_BINDINGS = [
|
|
10837
10981
|
{
|
|
@@ -10871,17 +11015,49 @@ const TOPBAR_WIDGET_BINDINGS = [
|
|
|
10871
11015
|
},
|
|
10872
11016
|
{
|
|
10873
11017
|
chartId: 'topbar',
|
|
10874
|
-
controlId: '
|
|
11018
|
+
controlId: 'fontSize',
|
|
10875
11019
|
domain: 'header',
|
|
10876
|
-
label: '
|
|
11020
|
+
label: 'Font size',
|
|
11021
|
+
uiPath: 'topbar.fontSize',
|
|
11022
|
+
persistedPath: 'clientConfig.displayConfig.StyleConfig.font-size-title',
|
|
11023
|
+
runtimePath: 'clientConfig.displayConfig.StyleConfig.font-size-title',
|
|
11024
|
+
rendererReadPaths: [
|
|
11025
|
+
'clientConfig.displayConfig.StyleConfig.font-size-title',
|
|
11026
|
+
],
|
|
11027
|
+
simpleOrAdvanced: 'simple',
|
|
11028
|
+
},
|
|
11029
|
+
{
|
|
11030
|
+
// Overrides the common `background` binding to record the legacy path.
|
|
11031
|
+
// Both layout renderers accept it, and the schema field mirrors writes
|
|
11032
|
+
// into it, so topbars saved by the old "Topbar background" control keep
|
|
11033
|
+
// rendering and keep showing their color in the picker.
|
|
11034
|
+
chartId: 'topbar',
|
|
11035
|
+
controlId: 'background',
|
|
11036
|
+
domain: 'header',
|
|
11037
|
+
label: 'Background',
|
|
10877
11038
|
uiPath: 'topbar.background',
|
|
10878
|
-
persistedPath: 'clientConfig.
|
|
10879
|
-
runtimePath: 'clientConfig.
|
|
11039
|
+
persistedPath: 'clientConfig.configAsType.cardStyleConfig.backgroundColor',
|
|
11040
|
+
runtimePath: 'clientConfig.configAsType.cardStyleConfig.backgroundColor',
|
|
10880
11041
|
rendererReadPaths: [
|
|
11042
|
+
'clientConfig.configAsType.cardStyleConfig.backgroundColor',
|
|
11043
|
+
'clientConfig.displayConfig.StyleConfig.background-color',
|
|
11044
|
+
],
|
|
11045
|
+
legacyPersistPaths: [
|
|
10881
11046
|
'clientConfig.displayConfig.StyleConfig.background-color',
|
|
10882
11047
|
],
|
|
10883
11048
|
simpleOrAdvanced: 'simple',
|
|
10884
11049
|
},
|
|
11050
|
+
{
|
|
11051
|
+
chartId: 'topbar',
|
|
11052
|
+
controlId: 'textColor',
|
|
11053
|
+
domain: 'header',
|
|
11054
|
+
label: 'Text color',
|
|
11055
|
+
uiPath: 'topbar.textColor',
|
|
11056
|
+
persistedPath: 'clientConfig.displayConfig.StyleConfig.color',
|
|
11057
|
+
runtimePath: 'clientConfig.displayConfig.StyleConfig.color',
|
|
11058
|
+
rendererReadPaths: ['clientConfig.displayConfig.StyleConfig.color'],
|
|
11059
|
+
simpleOrAdvanced: 'simple',
|
|
11060
|
+
},
|
|
10885
11061
|
];
|
|
10886
11062
|
/**
|
|
10887
11063
|
* Dialog header — the `dialog` schema's DIALOG_HEADER_SECTION.
|
|
@@ -14501,7 +14677,7 @@ class BarChartHandler {
|
|
|
14501
14677
|
// Use bar labels as xAxis data. `overrideLabels` is the user's own column
|
|
14502
14678
|
// name and outranks anything the response supplies — same precedence the
|
|
14503
14679
|
// series `name` below already uses.
|
|
14504
|
-
let xAxisData = allBars.map((bar, index) => overrideLabels
|
|
14680
|
+
let xAxisData = allBars.map((bar, index) => this.resolveOverrideLabel(overrideLabels, barKey(bar), index, languageCode) ||
|
|
14505
14681
|
bar?.label ||
|
|
14506
14682
|
bar?.name ||
|
|
14507
14683
|
bar?.display ||
|
|
@@ -14551,14 +14727,16 @@ class BarChartHandler {
|
|
|
14551
14727
|
statusItem?.value?.[languageCode] ||
|
|
14552
14728
|
statusItem?.value?.en ||
|
|
14553
14729
|
statusItem?.value?.ar ||
|
|
14554
|
-
overrideLabels
|
|
14730
|
+
this.resolveOverrideLabel(overrideLabels, barKey(bar), index, languageCode) ||
|
|
14555
14731
|
bar?.label ||
|
|
14556
14732
|
bar?.name ||
|
|
14557
14733
|
bar?.display ||
|
|
14558
14734
|
labelMap?.get(barKey(bar).toLowerCase()) ||
|
|
14559
14735
|
barKey(bar) ||
|
|
14560
14736
|
'',
|
|
14561
|
-
key: barKey(bar) ||
|
|
14737
|
+
key: barKey(bar) ||
|
|
14738
|
+
this.resolveOverrideLabel(overrideLabels, barKey(bar), index, languageCode) ||
|
|
14739
|
+
'',
|
|
14562
14740
|
extraValues: bar.extraValues,
|
|
14563
14741
|
groupValues: bar.groupValues,
|
|
14564
14742
|
};
|
|
@@ -14570,7 +14748,9 @@ class BarChartHandler {
|
|
|
14570
14748
|
itemStyle: { color: '#e5e5e5' },
|
|
14571
14749
|
extraValues: item.extraValues,
|
|
14572
14750
|
groupValues: item.groupValues,
|
|
14573
|
-
key: item.key ||
|
|
14751
|
+
key: item.key ||
|
|
14752
|
+
this.resolveOverrideLabel(overrideLabels, item.key, index, languageCode) ||
|
|
14753
|
+
'',
|
|
14574
14754
|
}));
|
|
14575
14755
|
}
|
|
14576
14756
|
// Pass-5: sortDataBars accepts either the legacy
|
|
@@ -15081,7 +15261,7 @@ class BarChartHandler {
|
|
|
15081
15261
|
// Use barType from the response (this is the series key)
|
|
15082
15262
|
const key = this.resolveBarKey(bar) || `property_${index}`;
|
|
15083
15263
|
// Determine label - priority: overrideLabels (by index) > labelMap > barType
|
|
15084
|
-
const label = overrideLabels
|
|
15264
|
+
const label = this.resolveOverrideLabel(overrideLabels, key, index, languageCode) ||
|
|
15085
15265
|
labelMap.get(key.toLowerCase()) ||
|
|
15086
15266
|
key;
|
|
15087
15267
|
// Format the value using the configured format
|
|
@@ -15105,6 +15285,25 @@ class BarChartHandler {
|
|
|
15105
15285
|
});
|
|
15106
15286
|
return { values };
|
|
15107
15287
|
}
|
|
15288
|
+
/**
|
|
15289
|
+
* New Style Studio rows carry the stable bar key, so labels survive data
|
|
15290
|
+
* sorting and a backend-provided label changing. Existing index-only rows
|
|
15291
|
+
* came from the legacy editor and keep their original positional behavior.
|
|
15292
|
+
*/
|
|
15293
|
+
resolveOverrideLabel(overrides, key, index, languageCode) {
|
|
15294
|
+
if (!Array.isArray(overrides))
|
|
15295
|
+
return undefined;
|
|
15296
|
+
const normalizedKey = String(key ?? '')
|
|
15297
|
+
.trim()
|
|
15298
|
+
.toLowerCase();
|
|
15299
|
+
const keyed = normalizedKey
|
|
15300
|
+
? overrides.find((row) => String(row?.key ?? '')
|
|
15301
|
+
.trim()
|
|
15302
|
+
.toLowerCase() === normalizedKey)
|
|
15303
|
+
: undefined;
|
|
15304
|
+
const value = (keyed ?? overrides[index])?.[languageCode];
|
|
15305
|
+
return typeof value === 'string' && value.trim() ? value : undefined;
|
|
15306
|
+
}
|
|
15108
15307
|
/**
|
|
15109
15308
|
* #1549 — a bar in the chart response is identified by `barType`, not `key`.
|
|
15110
15309
|
* `ChartTypesServiceV2.BuildSingleCategoryChart` emits
|
|
@@ -15386,7 +15585,7 @@ function applyLegendDataColorOverride(overrides, dataItem, seriesName) {
|
|
|
15386
15585
|
* Update exactly one legend entry. Duplicate keys that differ only by casing
|
|
15387
15586
|
* are collapsed so runtime matching stays deterministic.
|
|
15388
15587
|
*/
|
|
15389
|
-
function updateLegendColorOverride(overrides, name, color) {
|
|
15588
|
+
function updateLegendColorOverride(overrides, name, color, aliases = []) {
|
|
15390
15589
|
const next = overrides && typeof overrides === 'object' && !Array.isArray(overrides)
|
|
15391
15590
|
? { ...overrides }
|
|
15392
15591
|
: {};
|
|
@@ -15394,6 +15593,15 @@ function updateLegendColorOverride(overrides, name, color) {
|
|
|
15394
15593
|
const identity = normalizeLegendIdentity(label);
|
|
15395
15594
|
if (!identity)
|
|
15396
15595
|
return next;
|
|
15596
|
+
// Drop rows this entry used to live under, so a stale one cannot shadow it.
|
|
15597
|
+
for (const alias of aliases) {
|
|
15598
|
+
const aliasIdentity = normalizeLegendIdentity(legendDataName(alias).trim());
|
|
15599
|
+
if (!aliasIdentity || aliasIdentity === identity)
|
|
15600
|
+
continue;
|
|
15601
|
+
Object.keys(next)
|
|
15602
|
+
.filter((key) => normalizeLegendIdentity(key) === aliasIdentity)
|
|
15603
|
+
.forEach((key) => delete next[key]);
|
|
15604
|
+
}
|
|
15397
15605
|
const matchingKeys = Object.keys(next).filter((key) => normalizeLegendIdentity(key) === identity);
|
|
15398
15606
|
const targetKey = matchingKeys[0] ?? label;
|
|
15399
15607
|
matchingKeys.slice(1).forEach((key) => delete next[key]);
|
|
@@ -23577,7 +23785,7 @@ class ActionService {
|
|
|
23577
23785
|
// "Dialog header"), not from the chart that opened it.
|
|
23578
23786
|
const header = resolveDashboardDialogHeader(dialogConfig);
|
|
23579
23787
|
// Dynamically import DashboardDialogComponent to avoid circular dependency
|
|
23580
|
-
import('./masterteam-dashboard-builder-dashboard-dialog.component-
|
|
23788
|
+
import('./masterteam-dashboard-builder-dashboard-dialog.component-BFkefeOr.mjs').then(({ DashboardDialogComponent }) => {
|
|
23581
23789
|
// Open dialog using ModalService
|
|
23582
23790
|
this.modalService.openModal(DashboardDialogComponent, 'dialog', {
|
|
23583
23791
|
header: header.title,
|
|
@@ -28234,7 +28442,8 @@ i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "21.2.8", ng
|
|
|
28234
28442
|
* Matches old app-entity-info behavior with viewType-based rendering.
|
|
28235
28443
|
*
|
|
28236
28444
|
* Supported viewTypes:
|
|
28237
|
-
* - text, float,
|
|
28445
|
+
* - text, float, title, phasegate → text display
|
|
28446
|
+
* - longtext → rich-text HTML display
|
|
28238
28447
|
* - number → formatted number
|
|
28239
28448
|
* - date, datetime → date display
|
|
28240
28449
|
* - currency → currency display
|
|
@@ -28292,6 +28501,20 @@ class EntityInfoComponent {
|
|
|
28292
28501
|
}
|
|
28293
28502
|
return String(value);
|
|
28294
28503
|
}, ...(ngDevMode ? [{ debugName: "textValue" }] : /* istanbul ignore next */ []));
|
|
28504
|
+
// === Long text values ===
|
|
28505
|
+
/**
|
|
28506
|
+
* A `LongText` property stores rich-text HTML authored in the editor, so the
|
|
28507
|
+
* cell has to render it as markup — interpolating it printed the raw
|
|
28508
|
+
* `<p>…</p>` source into the table. Angular sanitizes `[innerHTML]`, and this
|
|
28509
|
+
* matches `mt-entity-long-text`, which is what the level-workspace table
|
|
28510
|
+
* renders the same property with.
|
|
28511
|
+
*/
|
|
28512
|
+
longTextHtml = computed(() => this.textValue(), ...(ngDevMode ? [{ debugName: "longTextHtml" }] : /* istanbul ignore next */ []));
|
|
28513
|
+
/** Tag-stripped text for the `title` tooltip — an attribute can't hold markup. */
|
|
28514
|
+
longTextTooltip = computed(() => {
|
|
28515
|
+
const text = TableValueResolver.stripHtml(this.longTextHtml());
|
|
28516
|
+
return typeof text === 'string' ? text : '';
|
|
28517
|
+
}, ...(ngDevMode ? [{ debugName: "longTextTooltip" }] : /* istanbul ignore next */ []));
|
|
28295
28518
|
// === Number values ===
|
|
28296
28519
|
numericValue = computed(() => {
|
|
28297
28520
|
const value = this.data()?.value;
|
|
@@ -28514,11 +28737,11 @@ class EntityInfoComponent {
|
|
|
28514
28737
|
});
|
|
28515
28738
|
}
|
|
28516
28739
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntityInfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
28517
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: EntityInfoComponent, isStandalone: true, selector: "mt-entity-info", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, displayType: { classPropertyName: "displayType", publicName: "displayType", isSignal: true, isRequired: false, transformFunction: null }, extraInfoData: { classPropertyName: "extraInfoData", publicName: "extraInfoData", isSignal: true, isRequired: false, transformFunction: null }, limitWords: { classPropertyName: "limitWords", publicName: "limitWords", isSignal: true, isRequired: false, transformFunction: null }, customClass: { classPropertyName: "customClass", publicName: "customClass", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div\r\n class=\"entity-info-wrapper w-full\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n>\r\n @switch (viewTypeLower()) {\r\n <!-- Text Types -->\r\n @case (\"text\") {\r\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\r\n }\r\n @case (\"float\") {\r\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\r\n }\r\n @case (\"longtext\") {\r\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\r\n }\r\n @case (\"title\") {\r\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\r\n }\r\n @case (\"phasegate\") {\r\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Number -->\r\n @case (\"number\") {\r\n <ng-container *ngTemplateOutlet=\"numberTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Date Types -->\r\n @case (\"date\") {\r\n <ng-container *ngTemplateOutlet=\"dateTemplate\"></ng-container>\r\n }\r\n @case (\"datetime\") {\r\n <ng-container *ngTemplateOutlet=\"dateTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Currency -->\r\n @case (\"currency\") {\r\n <ng-container *ngTemplateOutlet=\"currencyTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Time -->\r\n @case (\"time\") {\r\n <ng-container *ngTemplateOutlet=\"timeTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Lookup -->\r\n @case (\"lookup\") {\r\n <ng-container *ngTemplateOutlet=\"lookupTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Lookup Matrix (same value shape as lookup: key/display/color) -->\r\n @case (\"lookupmatrix\") {\r\n <ng-container *ngTemplateOutlet=\"lookupTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Checkbox -->\r\n @case (\"checkbox\") {\r\n <ng-container *ngTemplateOutlet=\"checkboxTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Status -->\r\n @case (\"status\") {\r\n <ng-container *ngTemplateOutlet=\"statusTemplate\"></ng-container>\r\n }\r\n @case (\"request_status\") {\r\n <ng-container *ngTemplateOutlet=\"statusTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Percentage -->\r\n @case (\"percentage\") {\r\n <ng-container *ngTemplateOutlet=\"percentageTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Slider -->\r\n @case (\"slider\") {\r\n <ng-container *ngTemplateOutlet=\"sliderTemplate\"></ng-container>\r\n }\r\n\r\n <!-- User -->\r\n @case (\"user\") {\r\n <ng-container *ngTemplateOutlet=\"userTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Multi-select lookup -->\r\n @case (\"lookupmultiselect\") {\r\n <ng-container\r\n *ngTemplateOutlet=\"lookupMultiselectTemplate\"\r\n ></ng-container>\r\n }\r\n\r\n <!-- Multi user -->\r\n @case (\"multiuser\") {\r\n <ng-container *ngTemplateOutlet=\"multiUserTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Dynamic List -->\r\n @case (\"dynamiclist\") {\r\n <ng-container *ngTemplateOutlet=\"dynamicListTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Location -->\r\n @case (\"location\") {\r\n <ng-container *ngTemplateOutlet=\"locationTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Default: treat as text -->\r\n @default {\r\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\r\n }\r\n }\r\n</div>\r\n\r\n<!-- Text Template -->\r\n<ng-template #textTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div\r\n class=\"font-semibold\"\r\n [class.text-ellipsis]=\"limitWords()\"\r\n [class.overflow-hidden]=\"limitWords()\"\r\n [class.whitespace-nowrap]=\"limitWords()\"\r\n [style.max-width]=\"limitWords() ? '200px' : 'auto'\"\r\n [title]=\"textValue()\"\r\n >\r\n {{ textValue() || \"__\" }}\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Number Template -->\r\n<ng-template #numberTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"font-semibold\">\r\n {{ numericValue() !== null ? (numericValue() | number) : \"__\" }}\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Date Template -->\r\n<ng-template #dateTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"font-semibold\">\r\n {{ dateDisplayValue() || \"__\" }}\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Currency Template -->\r\n<ng-template #currencyTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"font-semibold\">\r\n {{ currencyDisplayValue() || \"__\" }}\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Time Template -->\r\n<ng-template #timeTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"font-semibold\">\r\n {{ timeDisplayValue() || \"__\" }}\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Lookup Template -->\r\n<ng-template #lookupTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n @if (lookupName()) {\r\n <span class=\"flex items-center gap-1\" [style.color]=\"lookupColor()\">\r\n @if (displayType() === \"entity\" && lookupColor()) {\r\n <span\r\n class=\"w-2 h-2 rounded-full inline-block\"\r\n [style.backgroundColor]=\"lookupColor()\"\r\n ></span>\r\n }\r\n {{ lookupName() }}\r\n </span>\r\n } @else {\r\n <span class=\"font-semibold\">__</span>\r\n }\r\n</ng-template>\r\n\r\n<!-- Checkbox Template -->\r\n<ng-template #checkboxTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"flex items-center\">\r\n <i\r\n [class]=\"\r\n checkboxValue()\r\n ? 'pi pi-check-square text-primary'\r\n : 'pi pi-stop text-muted-color'\r\n \"\r\n ></i>\r\n <span class=\"ml-2\">{{ checkboxLabel() }}</span>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Status Template -->\r\n<ng-template #statusTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"flex items-center gap-2\">\r\n @if (statusColor()) {\r\n <span\r\n class=\"w-2.5 h-2.5 rounded-full flex-shrink-0\"\r\n [style.backgroundColor]=\"statusColor()\"\r\n ></span>\r\n }\r\n <span [style.color]=\"statusColor()\">\r\n {{ statusName() || \"__\" }}\r\n </span>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Percentage Template -->\r\n<ng-template #percentageTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"flex items-center gap-2\">\r\n @if (\r\n displayType() !== \"inTable\" ||\r\n extraInfoData()?.showPercentageAsProgressBar\r\n ) {\r\n <div\r\n class=\"flex-1 h-2 bg-surface-200 rounded-full overflow-hidden max-w-24\"\r\n >\r\n <div\r\n class=\"h-full rounded-full transition-all\"\r\n [style.width.%]=\"percentageValue() || 0\"\r\n [style.backgroundColor]=\"percentageColor() || 'var(--primary-color)'\"\r\n ></div>\r\n </div>\r\n }\r\n @if (\r\n extraInfoData()?.showPercentageStatus &&\r\n !extraInfoData()?.showPercentageAsProgressBar\r\n ) {\r\n <span\r\n class=\"w-2.5 h-2.5 rounded-full\"\r\n [style.backgroundColor]=\"percentageColor() || '#000'\"\r\n ></span>\r\n }\r\n <span [style.color]=\"percentageColor()\">\r\n {{\r\n percentageValue() !== null\r\n ? (percentageValue() | number: \"1.0-0\") + \"%\"\r\n : \"__\"\r\n }}\r\n </span>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Slider Template -->\r\n<ng-template #sliderTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"flex items-center gap-2\">\r\n <div\r\n class=\"flex-1 h-2 bg-surface-200 rounded-full overflow-hidden max-w-32\"\r\n >\r\n <div\r\n class=\"h-full bg-primary rounded-full transition-all\"\r\n [style.width.%]=\"sliderValue() || 0\"\r\n ></div>\r\n </div>\r\n <span class=\"text-sm\">{{ sliderValue() || 0 }}%</span>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- User Template -->\r\n<ng-template #userTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n @if (userData()) {\r\n <div class=\"flex items-center gap-2\">\r\n @if (userPhoto()) {\r\n <img\r\n [src]=\"userPhoto() | secureImage: true : httpContext : 'avatar/'\"\r\n alt=\"User avatar\"\r\n class=\"w-8 h-8 rounded-full object-cover\"\r\n />\r\n } @else {\r\n <div\r\n class=\"w-8 h-8 rounded-full bg-primary/20 flex items-center justify-center text-primary font-semibold text-sm\"\r\n >\r\n {{ userInitials() }}\r\n </div>\r\n }\r\n <span class=\"font-medium\">{{ userName() }}</span>\r\n </div>\r\n } @else {\r\n <span class=\"font-semibold\">__</span>\r\n }\r\n</ng-template>\r\n\r\n<!-- Lookup Multiselect Template -->\r\n<ng-template #lookupMultiselectTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n @if (multiselectValues()?.length) {\r\n <div class=\"flex flex-wrap gap-1\">\r\n @for (item of multiselectValues(); track item.key || $index) {\r\n <span\r\n class=\"px-2 py-0.5 rounded-full text-xs font-medium\"\r\n [style.backgroundColor]=\"(item.details?.color || '#6b7280') + '20'\"\r\n [style.color]=\"item.details?.color || '#6b7280'\"\r\n >\r\n {{ item.name || item.display || item }}\r\n </span>\r\n }\r\n </div>\r\n } @else {\r\n <span class=\"font-semibold\">__</span>\r\n }\r\n</ng-template>\r\n\r\n<!-- Multi User Template -->\r\n<ng-template #multiUserTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n @if (multiUserValues()?.length) {\r\n <div class=\"flex items-center -space-x-2\">\r\n @for (user of multiUserValues().slice(0, 5); track user.id || $index) {\r\n @if (getUserPhoto(user); as userPhoto) {\r\n <img\r\n [src]=\"userPhoto | secureImage: true : httpContext : 'avatar/'\"\r\n [alt]=\"user.name || user.displayName\"\r\n class=\"w-7 h-7 rounded-full border-2 border-white object-cover\"\r\n />\r\n } @else {\r\n <div\r\n class=\"w-7 h-7 rounded-full border-2 border-white bg-primary/20 flex items-center justify-center text-primary font-semibold text-xs\"\r\n >\r\n {{ getInitials(user.name || user.displayName) }}\r\n </div>\r\n }\r\n }\r\n @if (multiUserValues().length > 5) {\r\n <div\r\n class=\"w-7 h-7 rounded-full border-2 border-white bg-surface-300 flex items-center justify-center text-xs font-medium\"\r\n >\r\n +{{ multiUserValues().length - 5 }}\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <span class=\"font-semibold\">__</span>\r\n }\r\n</ng-template>\r\n\r\n<!-- Dynamic List Template -->\r\n<ng-template #dynamicListTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n @if (dynamicListValues()?.length) {\r\n <div class=\"flex flex-col gap-1\">\r\n @for (item of dynamicListValues(); track $index) {\r\n <div class=\"text-sm\">\r\n {{ item?.label || item?.name || item }}\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <span class=\"font-semibold\">__</span>\r\n }\r\n</ng-template>\r\n\r\n<!-- Location Template -->\r\n<ng-template #locationTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"font-semibold\">\r\n {{ locationDisplayValue() || \"__\" }}\r\n </div>\r\n</ng-template>\r\n", styles: [":host{display:block}.text-ellipsis{text-overflow:ellipsis}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "pipe", type: i1$1.DecimalPipe, name: "number" }, { kind: "pipe", type: SecureImagePipe, name: "secureImage" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
28740
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: EntityInfoComponent, isStandalone: true, selector: "mt-entity-info", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, displayType: { classPropertyName: "displayType", publicName: "displayType", isSignal: true, isRequired: false, transformFunction: null }, extraInfoData: { classPropertyName: "extraInfoData", publicName: "extraInfoData", isSignal: true, isRequired: false, transformFunction: null }, limitWords: { classPropertyName: "limitWords", publicName: "limitWords", isSignal: true, isRequired: false, transformFunction: null }, customClass: { classPropertyName: "customClass", publicName: "customClass", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div\r\n class=\"entity-info-wrapper w-full\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n>\r\n @switch (viewTypeLower()) {\r\n <!-- Text Types -->\r\n @case (\"text\") {\r\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\r\n }\r\n @case (\"float\") {\r\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\r\n }\r\n @case (\"longtext\") {\r\n <ng-container *ngTemplateOutlet=\"longTextTemplate\"></ng-container>\r\n }\r\n @case (\"title\") {\r\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\r\n }\r\n @case (\"phasegate\") {\r\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Number -->\r\n @case (\"number\") {\r\n <ng-container *ngTemplateOutlet=\"numberTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Date Types -->\r\n @case (\"date\") {\r\n <ng-container *ngTemplateOutlet=\"dateTemplate\"></ng-container>\r\n }\r\n @case (\"datetime\") {\r\n <ng-container *ngTemplateOutlet=\"dateTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Currency -->\r\n @case (\"currency\") {\r\n <ng-container *ngTemplateOutlet=\"currencyTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Time -->\r\n @case (\"time\") {\r\n <ng-container *ngTemplateOutlet=\"timeTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Lookup -->\r\n @case (\"lookup\") {\r\n <ng-container *ngTemplateOutlet=\"lookupTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Lookup Matrix (same value shape as lookup: key/display/color) -->\r\n @case (\"lookupmatrix\") {\r\n <ng-container *ngTemplateOutlet=\"lookupTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Checkbox -->\r\n @case (\"checkbox\") {\r\n <ng-container *ngTemplateOutlet=\"checkboxTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Status -->\r\n @case (\"status\") {\r\n <ng-container *ngTemplateOutlet=\"statusTemplate\"></ng-container>\r\n }\r\n @case (\"request_status\") {\r\n <ng-container *ngTemplateOutlet=\"statusTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Percentage -->\r\n @case (\"percentage\") {\r\n <ng-container *ngTemplateOutlet=\"percentageTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Slider -->\r\n @case (\"slider\") {\r\n <ng-container *ngTemplateOutlet=\"sliderTemplate\"></ng-container>\r\n }\r\n\r\n <!-- User -->\r\n @case (\"user\") {\r\n <ng-container *ngTemplateOutlet=\"userTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Multi-select lookup -->\r\n @case (\"lookupmultiselect\") {\r\n <ng-container\r\n *ngTemplateOutlet=\"lookupMultiselectTemplate\"\r\n ></ng-container>\r\n }\r\n\r\n <!-- Multi user -->\r\n @case (\"multiuser\") {\r\n <ng-container *ngTemplateOutlet=\"multiUserTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Dynamic List -->\r\n @case (\"dynamiclist\") {\r\n <ng-container *ngTemplateOutlet=\"dynamicListTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Location -->\r\n @case (\"location\") {\r\n <ng-container *ngTemplateOutlet=\"locationTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Default: treat as text -->\r\n @default {\r\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\r\n }\r\n }\r\n</div>\r\n\r\n<!-- Text Template -->\r\n<ng-template #textTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div\r\n class=\"font-semibold\"\r\n [class.text-ellipsis]=\"limitWords()\"\r\n [class.overflow-hidden]=\"limitWords()\"\r\n [class.whitespace-nowrap]=\"limitWords()\"\r\n [style.max-width]=\"limitWords() ? '200px' : 'auto'\"\r\n [title]=\"textValue()\"\r\n >\r\n {{ textValue() || \"__\" }}\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Long Text Template: the value is rich-text HTML, so render it as markup\r\n (Angular sanitizes [innerHTML]) instead of printing the tags. -->\r\n<ng-template #longTextTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n @if (longTextTooltip()) {\r\n <div\r\n class=\"entity-long-text font-semibold break-words\"\r\n [class.entity-long-text-clamped]=\"displayType() === 'inTable'\"\r\n [title]=\"longTextTooltip()\"\r\n [innerHTML]=\"longTextHtml()\"\r\n ></div>\r\n } @else {\r\n <div class=\"font-semibold\">__</div>\r\n }\r\n</ng-template>\r\n\r\n<!-- Number Template -->\r\n<ng-template #numberTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"font-semibold\">\r\n {{ numericValue() !== null ? (numericValue() | number) : \"__\" }}\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Date Template -->\r\n<ng-template #dateTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"font-semibold\">\r\n {{ dateDisplayValue() || \"__\" }}\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Currency Template -->\r\n<ng-template #currencyTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"font-semibold\">\r\n {{ currencyDisplayValue() || \"__\" }}\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Time Template -->\r\n<ng-template #timeTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"font-semibold\">\r\n {{ timeDisplayValue() || \"__\" }}\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Lookup Template -->\r\n<ng-template #lookupTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n @if (lookupName()) {\r\n <span class=\"flex items-center gap-1\" [style.color]=\"lookupColor()\">\r\n @if (displayType() === \"entity\" && lookupColor()) {\r\n <span\r\n class=\"w-2 h-2 rounded-full inline-block\"\r\n [style.backgroundColor]=\"lookupColor()\"\r\n ></span>\r\n }\r\n {{ lookupName() }}\r\n </span>\r\n } @else {\r\n <span class=\"font-semibold\">__</span>\r\n }\r\n</ng-template>\r\n\r\n<!-- Checkbox Template -->\r\n<ng-template #checkboxTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"flex items-center\">\r\n <i\r\n [class]=\"\r\n checkboxValue()\r\n ? 'pi pi-check-square text-primary'\r\n : 'pi pi-stop text-muted-color'\r\n \"\r\n ></i>\r\n <span class=\"ml-2\">{{ checkboxLabel() }}</span>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Status Template -->\r\n<ng-template #statusTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"flex items-center gap-2\">\r\n @if (statusColor()) {\r\n <span\r\n class=\"w-2.5 h-2.5 rounded-full flex-shrink-0\"\r\n [style.backgroundColor]=\"statusColor()\"\r\n ></span>\r\n }\r\n <span [style.color]=\"statusColor()\">\r\n {{ statusName() || \"__\" }}\r\n </span>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Percentage Template -->\r\n<ng-template #percentageTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"flex items-center gap-2\">\r\n @if (\r\n displayType() !== \"inTable\" ||\r\n extraInfoData()?.showPercentageAsProgressBar\r\n ) {\r\n <div\r\n class=\"flex-1 h-2 bg-surface-200 rounded-full overflow-hidden max-w-24\"\r\n >\r\n <div\r\n class=\"h-full rounded-full transition-all\"\r\n [style.width.%]=\"percentageValue() || 0\"\r\n [style.backgroundColor]=\"percentageColor() || 'var(--primary-color)'\"\r\n ></div>\r\n </div>\r\n }\r\n @if (\r\n extraInfoData()?.showPercentageStatus &&\r\n !extraInfoData()?.showPercentageAsProgressBar\r\n ) {\r\n <span\r\n class=\"w-2.5 h-2.5 rounded-full\"\r\n [style.backgroundColor]=\"percentageColor() || '#000'\"\r\n ></span>\r\n }\r\n <span [style.color]=\"percentageColor()\">\r\n {{\r\n percentageValue() !== null\r\n ? (percentageValue() | number: \"1.0-0\") + \"%\"\r\n : \"__\"\r\n }}\r\n </span>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Slider Template -->\r\n<ng-template #sliderTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"flex items-center gap-2\">\r\n <div\r\n class=\"flex-1 h-2 bg-surface-200 rounded-full overflow-hidden max-w-32\"\r\n >\r\n <div\r\n class=\"h-full bg-primary rounded-full transition-all\"\r\n [style.width.%]=\"sliderValue() || 0\"\r\n ></div>\r\n </div>\r\n <span class=\"text-sm\">{{ sliderValue() || 0 }}%</span>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- User Template -->\r\n<ng-template #userTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n @if (userData()) {\r\n <div class=\"flex items-center gap-2\">\r\n @if (userPhoto()) {\r\n <img\r\n [src]=\"userPhoto() | secureImage: true : httpContext : 'avatar/'\"\r\n alt=\"User avatar\"\r\n class=\"w-8 h-8 rounded-full object-cover\"\r\n />\r\n } @else {\r\n <div\r\n class=\"w-8 h-8 rounded-full bg-primary/20 flex items-center justify-center text-primary font-semibold text-sm\"\r\n >\r\n {{ userInitials() }}\r\n </div>\r\n }\r\n <span class=\"font-medium\">{{ userName() }}</span>\r\n </div>\r\n } @else {\r\n <span class=\"font-semibold\">__</span>\r\n }\r\n</ng-template>\r\n\r\n<!-- Lookup Multiselect Template -->\r\n<ng-template #lookupMultiselectTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n @if (multiselectValues()?.length) {\r\n <div class=\"flex flex-wrap gap-1\">\r\n @for (item of multiselectValues(); track item.key || $index) {\r\n <!-- A lookup value is { key, display, color } \u2014 `details.color` alone\r\n left every chip on the grey fallback. Same order as lookupColor(). -->\r\n <span\r\n class=\"px-2 py-0.5 rounded-full text-xs font-medium\"\r\n [style.backgroundColor]=\"\r\n (item.details?.color || item.color || '#6b7280') + '20'\r\n \"\r\n [style.color]=\"item.details?.color || item.color || '#6b7280'\"\r\n >\r\n {{ item.name || item.display || item.key || item }}\r\n </span>\r\n }\r\n </div>\r\n } @else {\r\n <span class=\"font-semibold\">__</span>\r\n }\r\n</ng-template>\r\n\r\n<!-- Multi User Template -->\r\n<ng-template #multiUserTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n @if (multiUserValues()?.length) {\r\n <div class=\"flex items-center -space-x-2\">\r\n @for (user of multiUserValues().slice(0, 5); track user.id || $index) {\r\n @if (getUserPhoto(user); as userPhoto) {\r\n <img\r\n [src]=\"userPhoto | secureImage: true : httpContext : 'avatar/'\"\r\n [alt]=\"user.name || user.displayName\"\r\n class=\"w-7 h-7 rounded-full border-2 border-white object-cover\"\r\n />\r\n } @else {\r\n <div\r\n class=\"w-7 h-7 rounded-full border-2 border-white bg-primary/20 flex items-center justify-center text-primary font-semibold text-xs\"\r\n >\r\n {{ getInitials(user.name || user.displayName) }}\r\n </div>\r\n }\r\n }\r\n @if (multiUserValues().length > 5) {\r\n <div\r\n class=\"w-7 h-7 rounded-full border-2 border-white bg-surface-300 flex items-center justify-center text-xs font-medium\"\r\n >\r\n +{{ multiUserValues().length - 5 }}\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <span class=\"font-semibold\">__</span>\r\n }\r\n</ng-template>\r\n\r\n<!-- Dynamic List Template -->\r\n<ng-template #dynamicListTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n @if (dynamicListValues()?.length) {\r\n <div class=\"flex flex-col gap-1\">\r\n @for (item of dynamicListValues(); track $index) {\r\n <div class=\"text-sm\">\r\n {{ item?.label || item?.name || item }}\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <span class=\"font-semibold\">__</span>\r\n }\r\n</ng-template>\r\n\r\n<!-- Location Template -->\r\n<ng-template #locationTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"font-semibold\">\r\n {{ locationDisplayValue() || \"__\" }}\r\n </div>\r\n</ng-template>\r\n", styles: [":host{display:block}.text-ellipsis{text-overflow:ellipsis}.entity-long-text ::ng-deep :is(p,ul,ol,h1,h2,h3,h4,h5,h6){margin:0}.entity-long-text-clamped{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.entity-long-text-clamped ::ng-deep :is(p,div,li,h1,h2,h3,h4,h5,h6){display:inline}.entity-long-text-clamped ::ng-deep :is(p,div,li,h1,h2,h3,h4,h5,h6):after{content:\" \"}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "pipe", type: i1$1.DecimalPipe, name: "number" }, { kind: "pipe", type: SecureImagePipe, name: "secureImage" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
28518
28741
|
}
|
|
28519
28742
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EntityInfoComponent, decorators: [{
|
|
28520
28743
|
type: Component,
|
|
28521
|
-
args: [{ selector: 'mt-entity-info', standalone: true, imports: [CommonModule, TranslocoDirective, DecimalPipe, SecureImagePipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\r\n class=\"entity-info-wrapper w-full\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n>\r\n @switch (viewTypeLower()) {\r\n <!-- Text Types -->\r\n @case (\"text\") {\r\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\r\n }\r\n @case (\"float\") {\r\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\r\n }\r\n @case (\"longtext\") {\r\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\r\n }\r\n @case (\"title\") {\r\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\r\n }\r\n @case (\"phasegate\") {\r\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Number -->\r\n @case (\"number\") {\r\n <ng-container *ngTemplateOutlet=\"numberTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Date Types -->\r\n @case (\"date\") {\r\n <ng-container *ngTemplateOutlet=\"dateTemplate\"></ng-container>\r\n }\r\n @case (\"datetime\") {\r\n <ng-container *ngTemplateOutlet=\"dateTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Currency -->\r\n @case (\"currency\") {\r\n <ng-container *ngTemplateOutlet=\"currencyTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Time -->\r\n @case (\"time\") {\r\n <ng-container *ngTemplateOutlet=\"timeTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Lookup -->\r\n @case (\"lookup\") {\r\n <ng-container *ngTemplateOutlet=\"lookupTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Lookup Matrix (same value shape as lookup: key/display/color) -->\r\n @case (\"lookupmatrix\") {\r\n <ng-container *ngTemplateOutlet=\"lookupTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Checkbox -->\r\n @case (\"checkbox\") {\r\n <ng-container *ngTemplateOutlet=\"checkboxTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Status -->\r\n @case (\"status\") {\r\n <ng-container *ngTemplateOutlet=\"statusTemplate\"></ng-container>\r\n }\r\n @case (\"request_status\") {\r\n <ng-container *ngTemplateOutlet=\"statusTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Percentage -->\r\n @case (\"percentage\") {\r\n <ng-container *ngTemplateOutlet=\"percentageTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Slider -->\r\n @case (\"slider\") {\r\n <ng-container *ngTemplateOutlet=\"sliderTemplate\"></ng-container>\r\n }\r\n\r\n <!-- User -->\r\n @case (\"user\") {\r\n <ng-container *ngTemplateOutlet=\"userTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Multi-select lookup -->\r\n @case (\"lookupmultiselect\") {\r\n <ng-container\r\n *ngTemplateOutlet=\"lookupMultiselectTemplate\"\r\n ></ng-container>\r\n }\r\n\r\n <!-- Multi user -->\r\n @case (\"multiuser\") {\r\n <ng-container *ngTemplateOutlet=\"multiUserTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Dynamic List -->\r\n @case (\"dynamiclist\") {\r\n <ng-container *ngTemplateOutlet=\"dynamicListTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Location -->\r\n @case (\"location\") {\r\n <ng-container *ngTemplateOutlet=\"locationTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Default: treat as text -->\r\n @default {\r\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\r\n }\r\n }\r\n</div>\r\n\r\n<!-- Text Template -->\r\n<ng-template #textTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div\r\n class=\"font-semibold\"\r\n [class.text-ellipsis]=\"limitWords()\"\r\n [class.overflow-hidden]=\"limitWords()\"\r\n [class.whitespace-nowrap]=\"limitWords()\"\r\n [style.max-width]=\"limitWords() ? '200px' : 'auto'\"\r\n [title]=\"textValue()\"\r\n >\r\n {{ textValue() || \"__\" }}\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Number Template -->\r\n<ng-template #numberTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"font-semibold\">\r\n {{ numericValue() !== null ? (numericValue() | number) : \"__\" }}\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Date Template -->\r\n<ng-template #dateTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"font-semibold\">\r\n {{ dateDisplayValue() || \"__\" }}\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Currency Template -->\r\n<ng-template #currencyTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"font-semibold\">\r\n {{ currencyDisplayValue() || \"__\" }}\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Time Template -->\r\n<ng-template #timeTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"font-semibold\">\r\n {{ timeDisplayValue() || \"__\" }}\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Lookup Template -->\r\n<ng-template #lookupTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n @if (lookupName()) {\r\n <span class=\"flex items-center gap-1\" [style.color]=\"lookupColor()\">\r\n @if (displayType() === \"entity\" && lookupColor()) {\r\n <span\r\n class=\"w-2 h-2 rounded-full inline-block\"\r\n [style.backgroundColor]=\"lookupColor()\"\r\n ></span>\r\n }\r\n {{ lookupName() }}\r\n </span>\r\n } @else {\r\n <span class=\"font-semibold\">__</span>\r\n }\r\n</ng-template>\r\n\r\n<!-- Checkbox Template -->\r\n<ng-template #checkboxTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"flex items-center\">\r\n <i\r\n [class]=\"\r\n checkboxValue()\r\n ? 'pi pi-check-square text-primary'\r\n : 'pi pi-stop text-muted-color'\r\n \"\r\n ></i>\r\n <span class=\"ml-2\">{{ checkboxLabel() }}</span>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Status Template -->\r\n<ng-template #statusTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"flex items-center gap-2\">\r\n @if (statusColor()) {\r\n <span\r\n class=\"w-2.5 h-2.5 rounded-full flex-shrink-0\"\r\n [style.backgroundColor]=\"statusColor()\"\r\n ></span>\r\n }\r\n <span [style.color]=\"statusColor()\">\r\n {{ statusName() || \"__\" }}\r\n </span>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Percentage Template -->\r\n<ng-template #percentageTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"flex items-center gap-2\">\r\n @if (\r\n displayType() !== \"inTable\" ||\r\n extraInfoData()?.showPercentageAsProgressBar\r\n ) {\r\n <div\r\n class=\"flex-1 h-2 bg-surface-200 rounded-full overflow-hidden max-w-24\"\r\n >\r\n <div\r\n class=\"h-full rounded-full transition-all\"\r\n [style.width.%]=\"percentageValue() || 0\"\r\n [style.backgroundColor]=\"percentageColor() || 'var(--primary-color)'\"\r\n ></div>\r\n </div>\r\n }\r\n @if (\r\n extraInfoData()?.showPercentageStatus &&\r\n !extraInfoData()?.showPercentageAsProgressBar\r\n ) {\r\n <span\r\n class=\"w-2.5 h-2.5 rounded-full\"\r\n [style.backgroundColor]=\"percentageColor() || '#000'\"\r\n ></span>\r\n }\r\n <span [style.color]=\"percentageColor()\">\r\n {{\r\n percentageValue() !== null\r\n ? (percentageValue() | number: \"1.0-0\") + \"%\"\r\n : \"__\"\r\n }}\r\n </span>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Slider Template -->\r\n<ng-template #sliderTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"flex items-center gap-2\">\r\n <div\r\n class=\"flex-1 h-2 bg-surface-200 rounded-full overflow-hidden max-w-32\"\r\n >\r\n <div\r\n class=\"h-full bg-primary rounded-full transition-all\"\r\n [style.width.%]=\"sliderValue() || 0\"\r\n ></div>\r\n </div>\r\n <span class=\"text-sm\">{{ sliderValue() || 0 }}%</span>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- User Template -->\r\n<ng-template #userTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n @if (userData()) {\r\n <div class=\"flex items-center gap-2\">\r\n @if (userPhoto()) {\r\n <img\r\n [src]=\"userPhoto() | secureImage: true : httpContext : 'avatar/'\"\r\n alt=\"User avatar\"\r\n class=\"w-8 h-8 rounded-full object-cover\"\r\n />\r\n } @else {\r\n <div\r\n class=\"w-8 h-8 rounded-full bg-primary/20 flex items-center justify-center text-primary font-semibold text-sm\"\r\n >\r\n {{ userInitials() }}\r\n </div>\r\n }\r\n <span class=\"font-medium\">{{ userName() }}</span>\r\n </div>\r\n } @else {\r\n <span class=\"font-semibold\">__</span>\r\n }\r\n</ng-template>\r\n\r\n<!-- Lookup Multiselect Template -->\r\n<ng-template #lookupMultiselectTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n @if (multiselectValues()?.length) {\r\n <div class=\"flex flex-wrap gap-1\">\r\n @for (item of multiselectValues(); track item.key || $index) {\r\n <span\r\n class=\"px-2 py-0.5 rounded-full text-xs font-medium\"\r\n [style.backgroundColor]=\"(item.details?.color || '#6b7280') + '20'\"\r\n [style.color]=\"item.details?.color || '#6b7280'\"\r\n >\r\n {{ item.name || item.display || item }}\r\n </span>\r\n }\r\n </div>\r\n } @else {\r\n <span class=\"font-semibold\">__</span>\r\n }\r\n</ng-template>\r\n\r\n<!-- Multi User Template -->\r\n<ng-template #multiUserTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n @if (multiUserValues()?.length) {\r\n <div class=\"flex items-center -space-x-2\">\r\n @for (user of multiUserValues().slice(0, 5); track user.id || $index) {\r\n @if (getUserPhoto(user); as userPhoto) {\r\n <img\r\n [src]=\"userPhoto | secureImage: true : httpContext : 'avatar/'\"\r\n [alt]=\"user.name || user.displayName\"\r\n class=\"w-7 h-7 rounded-full border-2 border-white object-cover\"\r\n />\r\n } @else {\r\n <div\r\n class=\"w-7 h-7 rounded-full border-2 border-white bg-primary/20 flex items-center justify-center text-primary font-semibold text-xs\"\r\n >\r\n {{ getInitials(user.name || user.displayName) }}\r\n </div>\r\n }\r\n }\r\n @if (multiUserValues().length > 5) {\r\n <div\r\n class=\"w-7 h-7 rounded-full border-2 border-white bg-surface-300 flex items-center justify-center text-xs font-medium\"\r\n >\r\n +{{ multiUserValues().length - 5 }}\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <span class=\"font-semibold\">__</span>\r\n }\r\n</ng-template>\r\n\r\n<!-- Dynamic List Template -->\r\n<ng-template #dynamicListTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n @if (dynamicListValues()?.length) {\r\n <div class=\"flex flex-col gap-1\">\r\n @for (item of dynamicListValues(); track $index) {\r\n <div class=\"text-sm\">\r\n {{ item?.label || item?.name || item }}\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <span class=\"font-semibold\">__</span>\r\n }\r\n</ng-template>\r\n\r\n<!-- Location Template -->\r\n<ng-template #locationTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"font-semibold\">\r\n {{ locationDisplayValue() || \"__\" }}\r\n </div>\r\n</ng-template>\r\n", styles: [":host{display:block}.text-ellipsis{text-overflow:ellipsis}\n"] }]
|
|
28744
|
+
args: [{ selector: 'mt-entity-info', standalone: true, imports: [CommonModule, TranslocoDirective, DecimalPipe, SecureImagePipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\r\n class=\"entity-info-wrapper w-full\"\r\n *transloco=\"let t; prefix: 'dashboardBuilder'\"\r\n>\r\n @switch (viewTypeLower()) {\r\n <!-- Text Types -->\r\n @case (\"text\") {\r\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\r\n }\r\n @case (\"float\") {\r\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\r\n }\r\n @case (\"longtext\") {\r\n <ng-container *ngTemplateOutlet=\"longTextTemplate\"></ng-container>\r\n }\r\n @case (\"title\") {\r\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\r\n }\r\n @case (\"phasegate\") {\r\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Number -->\r\n @case (\"number\") {\r\n <ng-container *ngTemplateOutlet=\"numberTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Date Types -->\r\n @case (\"date\") {\r\n <ng-container *ngTemplateOutlet=\"dateTemplate\"></ng-container>\r\n }\r\n @case (\"datetime\") {\r\n <ng-container *ngTemplateOutlet=\"dateTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Currency -->\r\n @case (\"currency\") {\r\n <ng-container *ngTemplateOutlet=\"currencyTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Time -->\r\n @case (\"time\") {\r\n <ng-container *ngTemplateOutlet=\"timeTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Lookup -->\r\n @case (\"lookup\") {\r\n <ng-container *ngTemplateOutlet=\"lookupTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Lookup Matrix (same value shape as lookup: key/display/color) -->\r\n @case (\"lookupmatrix\") {\r\n <ng-container *ngTemplateOutlet=\"lookupTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Checkbox -->\r\n @case (\"checkbox\") {\r\n <ng-container *ngTemplateOutlet=\"checkboxTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Status -->\r\n @case (\"status\") {\r\n <ng-container *ngTemplateOutlet=\"statusTemplate\"></ng-container>\r\n }\r\n @case (\"request_status\") {\r\n <ng-container *ngTemplateOutlet=\"statusTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Percentage -->\r\n @case (\"percentage\") {\r\n <ng-container *ngTemplateOutlet=\"percentageTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Slider -->\r\n @case (\"slider\") {\r\n <ng-container *ngTemplateOutlet=\"sliderTemplate\"></ng-container>\r\n }\r\n\r\n <!-- User -->\r\n @case (\"user\") {\r\n <ng-container *ngTemplateOutlet=\"userTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Multi-select lookup -->\r\n @case (\"lookupmultiselect\") {\r\n <ng-container\r\n *ngTemplateOutlet=\"lookupMultiselectTemplate\"\r\n ></ng-container>\r\n }\r\n\r\n <!-- Multi user -->\r\n @case (\"multiuser\") {\r\n <ng-container *ngTemplateOutlet=\"multiUserTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Dynamic List -->\r\n @case (\"dynamiclist\") {\r\n <ng-container *ngTemplateOutlet=\"dynamicListTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Location -->\r\n @case (\"location\") {\r\n <ng-container *ngTemplateOutlet=\"locationTemplate\"></ng-container>\r\n }\r\n\r\n <!-- Default: treat as text -->\r\n @default {\r\n <ng-container *ngTemplateOutlet=\"textTemplate\"></ng-container>\r\n }\r\n }\r\n</div>\r\n\r\n<!-- Text Template -->\r\n<ng-template #textTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div\r\n class=\"font-semibold\"\r\n [class.text-ellipsis]=\"limitWords()\"\r\n [class.overflow-hidden]=\"limitWords()\"\r\n [class.whitespace-nowrap]=\"limitWords()\"\r\n [style.max-width]=\"limitWords() ? '200px' : 'auto'\"\r\n [title]=\"textValue()\"\r\n >\r\n {{ textValue() || \"__\" }}\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Long Text Template: the value is rich-text HTML, so render it as markup\r\n (Angular sanitizes [innerHTML]) instead of printing the tags. -->\r\n<ng-template #longTextTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n @if (longTextTooltip()) {\r\n <div\r\n class=\"entity-long-text font-semibold break-words\"\r\n [class.entity-long-text-clamped]=\"displayType() === 'inTable'\"\r\n [title]=\"longTextTooltip()\"\r\n [innerHTML]=\"longTextHtml()\"\r\n ></div>\r\n } @else {\r\n <div class=\"font-semibold\">__</div>\r\n }\r\n</ng-template>\r\n\r\n<!-- Number Template -->\r\n<ng-template #numberTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"font-semibold\">\r\n {{ numericValue() !== null ? (numericValue() | number) : \"__\" }}\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Date Template -->\r\n<ng-template #dateTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"font-semibold\">\r\n {{ dateDisplayValue() || \"__\" }}\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Currency Template -->\r\n<ng-template #currencyTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"font-semibold\">\r\n {{ currencyDisplayValue() || \"__\" }}\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Time Template -->\r\n<ng-template #timeTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"font-semibold\">\r\n {{ timeDisplayValue() || \"__\" }}\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Lookup Template -->\r\n<ng-template #lookupTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n @if (lookupName()) {\r\n <span class=\"flex items-center gap-1\" [style.color]=\"lookupColor()\">\r\n @if (displayType() === \"entity\" && lookupColor()) {\r\n <span\r\n class=\"w-2 h-2 rounded-full inline-block\"\r\n [style.backgroundColor]=\"lookupColor()\"\r\n ></span>\r\n }\r\n {{ lookupName() }}\r\n </span>\r\n } @else {\r\n <span class=\"font-semibold\">__</span>\r\n }\r\n</ng-template>\r\n\r\n<!-- Checkbox Template -->\r\n<ng-template #checkboxTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"flex items-center\">\r\n <i\r\n [class]=\"\r\n checkboxValue()\r\n ? 'pi pi-check-square text-primary'\r\n : 'pi pi-stop text-muted-color'\r\n \"\r\n ></i>\r\n <span class=\"ml-2\">{{ checkboxLabel() }}</span>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Status Template -->\r\n<ng-template #statusTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"flex items-center gap-2\">\r\n @if (statusColor()) {\r\n <span\r\n class=\"w-2.5 h-2.5 rounded-full flex-shrink-0\"\r\n [style.backgroundColor]=\"statusColor()\"\r\n ></span>\r\n }\r\n <span [style.color]=\"statusColor()\">\r\n {{ statusName() || \"__\" }}\r\n </span>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Percentage Template -->\r\n<ng-template #percentageTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"flex items-center gap-2\">\r\n @if (\r\n displayType() !== \"inTable\" ||\r\n extraInfoData()?.showPercentageAsProgressBar\r\n ) {\r\n <div\r\n class=\"flex-1 h-2 bg-surface-200 rounded-full overflow-hidden max-w-24\"\r\n >\r\n <div\r\n class=\"h-full rounded-full transition-all\"\r\n [style.width.%]=\"percentageValue() || 0\"\r\n [style.backgroundColor]=\"percentageColor() || 'var(--primary-color)'\"\r\n ></div>\r\n </div>\r\n }\r\n @if (\r\n extraInfoData()?.showPercentageStatus &&\r\n !extraInfoData()?.showPercentageAsProgressBar\r\n ) {\r\n <span\r\n class=\"w-2.5 h-2.5 rounded-full\"\r\n [style.backgroundColor]=\"percentageColor() || '#000'\"\r\n ></span>\r\n }\r\n <span [style.color]=\"percentageColor()\">\r\n {{\r\n percentageValue() !== null\r\n ? (percentageValue() | number: \"1.0-0\") + \"%\"\r\n : \"__\"\r\n }}\r\n </span>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- Slider Template -->\r\n<ng-template #sliderTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"flex items-center gap-2\">\r\n <div\r\n class=\"flex-1 h-2 bg-surface-200 rounded-full overflow-hidden max-w-32\"\r\n >\r\n <div\r\n class=\"h-full bg-primary rounded-full transition-all\"\r\n [style.width.%]=\"sliderValue() || 0\"\r\n ></div>\r\n </div>\r\n <span class=\"text-sm\">{{ sliderValue() || 0 }}%</span>\r\n </div>\r\n</ng-template>\r\n\r\n<!-- User Template -->\r\n<ng-template #userTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n @if (userData()) {\r\n <div class=\"flex items-center gap-2\">\r\n @if (userPhoto()) {\r\n <img\r\n [src]=\"userPhoto() | secureImage: true : httpContext : 'avatar/'\"\r\n alt=\"User avatar\"\r\n class=\"w-8 h-8 rounded-full object-cover\"\r\n />\r\n } @else {\r\n <div\r\n class=\"w-8 h-8 rounded-full bg-primary/20 flex items-center justify-center text-primary font-semibold text-sm\"\r\n >\r\n {{ userInitials() }}\r\n </div>\r\n }\r\n <span class=\"font-medium\">{{ userName() }}</span>\r\n </div>\r\n } @else {\r\n <span class=\"font-semibold\">__</span>\r\n }\r\n</ng-template>\r\n\r\n<!-- Lookup Multiselect Template -->\r\n<ng-template #lookupMultiselectTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n @if (multiselectValues()?.length) {\r\n <div class=\"flex flex-wrap gap-1\">\r\n @for (item of multiselectValues(); track item.key || $index) {\r\n <!-- A lookup value is { key, display, color } \u2014 `details.color` alone\r\n left every chip on the grey fallback. Same order as lookupColor(). -->\r\n <span\r\n class=\"px-2 py-0.5 rounded-full text-xs font-medium\"\r\n [style.backgroundColor]=\"\r\n (item.details?.color || item.color || '#6b7280') + '20'\r\n \"\r\n [style.color]=\"item.details?.color || item.color || '#6b7280'\"\r\n >\r\n {{ item.name || item.display || item.key || item }}\r\n </span>\r\n }\r\n </div>\r\n } @else {\r\n <span class=\"font-semibold\">__</span>\r\n }\r\n</ng-template>\r\n\r\n<!-- Multi User Template -->\r\n<ng-template #multiUserTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n @if (multiUserValues()?.length) {\r\n <div class=\"flex items-center -space-x-2\">\r\n @for (user of multiUserValues().slice(0, 5); track user.id || $index) {\r\n @if (getUserPhoto(user); as userPhoto) {\r\n <img\r\n [src]=\"userPhoto | secureImage: true : httpContext : 'avatar/'\"\r\n [alt]=\"user.name || user.displayName\"\r\n class=\"w-7 h-7 rounded-full border-2 border-white object-cover\"\r\n />\r\n } @else {\r\n <div\r\n class=\"w-7 h-7 rounded-full border-2 border-white bg-primary/20 flex items-center justify-center text-primary font-semibold text-xs\"\r\n >\r\n {{ getInitials(user.name || user.displayName) }}\r\n </div>\r\n }\r\n }\r\n @if (multiUserValues().length > 5) {\r\n <div\r\n class=\"w-7 h-7 rounded-full border-2 border-white bg-surface-300 flex items-center justify-center text-xs font-medium\"\r\n >\r\n +{{ multiUserValues().length - 5 }}\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <span class=\"font-semibold\">__</span>\r\n }\r\n</ng-template>\r\n\r\n<!-- Dynamic List Template -->\r\n<ng-template #dynamicListTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n @if (dynamicListValues()?.length) {\r\n <div class=\"flex flex-col gap-1\">\r\n @for (item of dynamicListValues(); track $index) {\r\n <div class=\"text-sm\">\r\n {{ item?.label || item?.name || item }}\r\n </div>\r\n }\r\n </div>\r\n } @else {\r\n <span class=\"font-semibold\">__</span>\r\n }\r\n</ng-template>\r\n\r\n<!-- Location Template -->\r\n<ng-template #locationTemplate>\r\n @if (displayType() === \"entity\") {\r\n <div class=\"text-muted-color text-sm font-semibold mb-1\">\r\n {{ data()?.label }}\r\n </div>\r\n }\r\n <div class=\"font-semibold\">\r\n {{ locationDisplayValue() || \"__\" }}\r\n </div>\r\n</ng-template>\r\n", styles: [":host{display:block}.text-ellipsis{text-overflow:ellipsis}.entity-long-text ::ng-deep :is(p,ul,ol,h1,h2,h3,h4,h5,h6){margin:0}.entity-long-text-clamped{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.entity-long-text-clamped ::ng-deep :is(p,div,li,h1,h2,h3,h4,h5,h6){display:inline}.entity-long-text-clamped ::ng-deep :is(p,div,li,h1,h2,h3,h4,h5,h6):after{content:\" \"}\n"] }]
|
|
28522
28745
|
}], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], displayType: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayType", required: false }] }], extraInfoData: [{ type: i0.Input, args: [{ isSignal: true, alias: "extraInfoData", required: false }] }], limitWords: [{ type: i0.Input, args: [{ isSignal: true, alias: "limitWords", required: false }] }], customClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "customClass", required: false }] }] } });
|
|
28523
28746
|
|
|
28524
28747
|
/**
|
|
@@ -33604,10 +33827,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
33604
33827
|
class LegendOrderField {
|
|
33605
33828
|
items = input([], ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
33606
33829
|
colorOverrides = input({}, ...(ngDevMode ? [{ debugName: "colorOverrides" }] : /* istanbul ignore next */ []));
|
|
33830
|
+
/** Existing chart label overrides, aligned by key (or legacy row position). */
|
|
33831
|
+
localizedLabels = input([], ...(ngDevMode ? [{ debugName: "localizedLabels" }] : /* istanbul ignore next */ []));
|
|
33607
33832
|
/** When false, render colors only — no drag handle, no order reset. */
|
|
33608
33833
|
reorderable = input(true, ...(ngDevMode ? [{ debugName: "reorderable" }] : /* istanbul ignore next */ []));
|
|
33834
|
+
/** Enables English/Arabic label editors beside each color picker. */
|
|
33835
|
+
showLocalizedLabels = input(false, ...(ngDevMode ? [{ debugName: "showLocalizedLabels" }] : /* istanbul ignore next */ []));
|
|
33836
|
+
/** Persist color against the stable entry key, rather than its visible label. */
|
|
33837
|
+
useItemKeyForColor = input(false, ...(ngDevMode ? [{ debugName: "useItemKeyForColor" }] : /* istanbul ignore next */ []));
|
|
33609
33838
|
valueChange = output();
|
|
33610
33839
|
colorChange = output();
|
|
33840
|
+
localizedLabelChange = output();
|
|
33611
33841
|
/** Working list is just the input — reorder mutates a copy and emits. */
|
|
33612
33842
|
rows = computed(() => this.items(), ...(ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []));
|
|
33613
33843
|
drop(event) {
|
|
@@ -33619,18 +33849,59 @@ class LegendOrderField {
|
|
|
33619
33849
|
this.valueChange.emit([]);
|
|
33620
33850
|
}
|
|
33621
33851
|
colorFor(item) {
|
|
33622
|
-
|
|
33623
|
-
|
|
33624
|
-
|
|
33852
|
+
const overrides = this.colorOverrides();
|
|
33853
|
+
for (const identity of [
|
|
33854
|
+
this.colorIdentity(item),
|
|
33855
|
+
...this.legacyColorIdentities(item),
|
|
33856
|
+
]) {
|
|
33857
|
+
const color = resolveLegendColorOverride(overrides, identity);
|
|
33858
|
+
if (color)
|
|
33859
|
+
return color;
|
|
33860
|
+
}
|
|
33861
|
+
return item.color ?? null;
|
|
33625
33862
|
}
|
|
33626
33863
|
setColor(item, color) {
|
|
33627
33864
|
this.colorChange.emit({
|
|
33628
|
-
name:
|
|
33865
|
+
name: this.colorIdentity(item),
|
|
33629
33866
|
color: typeof color === 'string' && color.trim() ? color.trim() : null,
|
|
33867
|
+
aliases: this.legacyColorIdentities(item),
|
|
33868
|
+
});
|
|
33869
|
+
}
|
|
33870
|
+
/** The identity this control stores an entry's color under. */
|
|
33871
|
+
colorIdentity(item) {
|
|
33872
|
+
return ((this.useItemKeyForColor() ? item.key : item.name) ||
|
|
33873
|
+
item.name ||
|
|
33874
|
+
item.key);
|
|
33875
|
+
}
|
|
33876
|
+
/**
|
|
33877
|
+
* Identities the same entry was stored under before this control switched to
|
|
33878
|
+
* the stable key. Only charts that made that switch need the migration, so
|
|
33879
|
+
* name-keyed controls return nothing and never delete a key-keyed row.
|
|
33880
|
+
*/
|
|
33881
|
+
legacyColorIdentities(item) {
|
|
33882
|
+
if (!this.useItemKeyForColor())
|
|
33883
|
+
return [];
|
|
33884
|
+
const current = this.colorIdentity(item);
|
|
33885
|
+
return item.name && item.name !== current ? [item.name] : [];
|
|
33886
|
+
}
|
|
33887
|
+
localizedLabel(item, index, language) {
|
|
33888
|
+
const key = item.key.trim().toLowerCase();
|
|
33889
|
+
const keyed = this.localizedLabels().find((label) => String(label.key ?? '')
|
|
33890
|
+
.trim()
|
|
33891
|
+
.toLowerCase() === key);
|
|
33892
|
+
const value = (keyed ?? this.localizedLabels()[index])?.[language];
|
|
33893
|
+
return typeof value === 'string' ? value : '';
|
|
33894
|
+
}
|
|
33895
|
+
setLocalizedLabel(item, index, language, value) {
|
|
33896
|
+
this.localizedLabelChange.emit({
|
|
33897
|
+
index,
|
|
33898
|
+
key: item.key || item.name,
|
|
33899
|
+
language,
|
|
33900
|
+
value: typeof value === 'string' ? value : '',
|
|
33630
33901
|
});
|
|
33631
33902
|
}
|
|
33632
33903
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: LegendOrderField, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
33633
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: LegendOrderField, isStandalone: true, selector: "mt-legend-order-field", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, colorOverrides: { classPropertyName: "colorOverrides", publicName: "colorOverrides", isSignal: true, isRequired: false, transformFunction: null }, reorderable: { classPropertyName: "reorderable", publicName: "reorderable", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", colorChange: "colorChange" }, ngImport: i0, template: "<div\
|
|
33904
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: LegendOrderField, isStandalone: true, selector: "mt-legend-order-field", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, colorOverrides: { classPropertyName: "colorOverrides", publicName: "colorOverrides", isSignal: true, isRequired: false, transformFunction: null }, localizedLabels: { classPropertyName: "localizedLabels", publicName: "localizedLabels", isSignal: true, isRequired: false, transformFunction: null }, reorderable: { classPropertyName: "reorderable", publicName: "reorderable", isSignal: true, isRequired: false, transformFunction: null }, showLocalizedLabels: { classPropertyName: "showLocalizedLabels", publicName: "showLocalizedLabels", isSignal: true, isRequired: false, transformFunction: null }, useItemKeyForColor: { classPropertyName: "useItemKeyForColor", publicName: "useItemKeyForColor", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", colorChange: "colorChange", localizedLabelChange: "localizedLabelChange" }, ngImport: i0, template: "<div\n class=\"db-legend-order flex flex-col gap-2\"\n *transloco=\"let t; prefix: 'dashboardBuilder.styleStudio.messages'\"\n>\n @if (rows().length) {\n <div\n cdkDropList\n class=\"flex flex-col gap-2\"\n [cdkDropListDisabled]=\"!reorderable()\"\n (cdkDropListDropped)=\"drop($event)\"\n >\n @for (item of rows(); track item.key; let i = $index) {\n <div\n cdkDrag\n class=\"flex flex-col gap-2 rounded-lg border border-surface-200 bg-surface-0 px-3 py-2\"\n [cdkDragDisabled]=\"!reorderable()\"\n >\n <div class=\"flex items-center gap-3\">\n <div\n class=\"w-44 max-w-[55%] shrink-0\"\n role=\"group\"\n [attr.aria-label]=\"t('legendColorFor', { name: item.name })\"\n >\n <mt-color-picker-field\n [ngModel]=\"colorFor(item)\"\n [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"setColor(item, $event)\"\n />\n </div>\n\n @if (reorderable()) {\n <span\n cdkDragHandle\n class=\"cursor-grab text-muted-color\"\n aria-hidden=\"true\"\n >\n <mt-icon icon=\"general.dots-grid\" class=\"text-base\" />\n </span>\n }\n <div class=\"min-w-0 flex-1\">\n <span class=\"block truncate text-sm text-color\" mtTruncateTooltip>\n {{ item.name }}\n </span>\n </div>\n </div>\n\n @if (showLocalizedLabels()) {\n <div class=\"grid grid-cols-1 gap-2 sm:grid-cols-2\">\n <mt-text-field\n [label]=\"t('englishLabel')\"\n [ngModel]=\"localizedLabel(item, i, 'en')\"\n [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"setLocalizedLabel(item, i, 'en', $event)\"\n />\n <mt-text-field\n [label]=\"t('arabicLabel')\"\n [ngModel]=\"localizedLabel(item, i, 'ar')\"\n [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"setLocalizedLabel(item, i, 'ar', $event)\"\n />\n </div>\n }\n </div>\n }\n </div>\n @if (reorderable()) {\n <div class=\"flex justify-end\">\n <mt-button\n [label]=\"t('resetOrder')\"\n icon=\"arrow.refresh-ccw-01\"\n severity=\"secondary\"\n variant=\"outlined\"\n size=\"small\"\n (onClick)=\"reset()\"\n />\n </div>\n }\n } @else {\n <p class=\"text-xs text-muted-color\">\n {{ t(\"noLegendEntries\") }}\n </p>\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.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: "ngmodule", type: DragDropModule }, { kind: "directive", type: i2$2.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i2$2.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i2$2.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { 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: ColorPickerField, selector: "mt-color-picker-field", inputs: ["label", "appendTo", "placeholder", "class", "variant", "readonly", "pInputs", "required"], 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: Icon, selector: "mt-icon", inputs: ["icon"] }, { kind: "directive", type: TruncateTooltip, selector: "[mtTruncateTooltip]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
33634
33905
|
}
|
|
33635
33906
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: LegendOrderField, decorators: [{
|
|
33636
33907
|
type: Component,
|
|
@@ -33641,10 +33912,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
33641
33912
|
DragDropModule,
|
|
33642
33913
|
Button,
|
|
33643
33914
|
ColorPickerField,
|
|
33915
|
+
TextField,
|
|
33644
33916
|
Icon,
|
|
33645
33917
|
TruncateTooltip,
|
|
33646
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div\
|
|
33647
|
-
}], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], colorOverrides: [{ type: i0.Input, args: [{ isSignal: true, alias: "colorOverrides", required: false }] }], reorderable: [{ type: i0.Input, args: [{ isSignal: true, alias: "reorderable", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], colorChange: [{ type: i0.Output, args: ["colorChange"] }] } });
|
|
33918
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div\n class=\"db-legend-order flex flex-col gap-2\"\n *transloco=\"let t; prefix: 'dashboardBuilder.styleStudio.messages'\"\n>\n @if (rows().length) {\n <div\n cdkDropList\n class=\"flex flex-col gap-2\"\n [cdkDropListDisabled]=\"!reorderable()\"\n (cdkDropListDropped)=\"drop($event)\"\n >\n @for (item of rows(); track item.key; let i = $index) {\n <div\n cdkDrag\n class=\"flex flex-col gap-2 rounded-lg border border-surface-200 bg-surface-0 px-3 py-2\"\n [cdkDragDisabled]=\"!reorderable()\"\n >\n <div class=\"flex items-center gap-3\">\n <div\n class=\"w-44 max-w-[55%] shrink-0\"\n role=\"group\"\n [attr.aria-label]=\"t('legendColorFor', { name: item.name })\"\n >\n <mt-color-picker-field\n [ngModel]=\"colorFor(item)\"\n [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"setColor(item, $event)\"\n />\n </div>\n\n @if (reorderable()) {\n <span\n cdkDragHandle\n class=\"cursor-grab text-muted-color\"\n aria-hidden=\"true\"\n >\n <mt-icon icon=\"general.dots-grid\" class=\"text-base\" />\n </span>\n }\n <div class=\"min-w-0 flex-1\">\n <span class=\"block truncate text-sm text-color\" mtTruncateTooltip>\n {{ item.name }}\n </span>\n </div>\n </div>\n\n @if (showLocalizedLabels()) {\n <div class=\"grid grid-cols-1 gap-2 sm:grid-cols-2\">\n <mt-text-field\n [label]=\"t('englishLabel')\"\n [ngModel]=\"localizedLabel(item, i, 'en')\"\n [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"setLocalizedLabel(item, i, 'en', $event)\"\n />\n <mt-text-field\n [label]=\"t('arabicLabel')\"\n [ngModel]=\"localizedLabel(item, i, 'ar')\"\n [ngModelOptions]=\"{ standalone: true }\"\n (ngModelChange)=\"setLocalizedLabel(item, i, 'ar', $event)\"\n />\n </div>\n }\n </div>\n }\n </div>\n @if (reorderable()) {\n <div class=\"flex justify-end\">\n <mt-button\n [label]=\"t('resetOrder')\"\n icon=\"arrow.refresh-ccw-01\"\n severity=\"secondary\"\n variant=\"outlined\"\n size=\"small\"\n (onClick)=\"reset()\"\n />\n </div>\n }\n } @else {\n <p class=\"text-xs text-muted-color\">\n {{ t(\"noLegendEntries\") }}\n </p>\n }\n</div>\n" }]
|
|
33919
|
+
}], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], colorOverrides: [{ type: i0.Input, args: [{ isSignal: true, alias: "colorOverrides", required: false }] }], localizedLabels: [{ type: i0.Input, args: [{ isSignal: true, alias: "localizedLabels", required: false }] }], reorderable: [{ type: i0.Input, args: [{ isSignal: true, alias: "reorderable", required: false }] }], showLocalizedLabels: [{ type: i0.Input, args: [{ isSignal: true, alias: "showLocalizedLabels", required: false }] }], useItemKeyForColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "useItemKeyForColor", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], colorChange: [{ type: i0.Output, args: ["colorChange"] }], localizedLabelChange: [{ type: i0.Output, args: ["localizedLabelChange"] }] } });
|
|
33648
33920
|
|
|
33649
33921
|
const SHADOW_PRESET_PATH$1 = 'clientConfig.configAsType.cardStyleConfig.__shadowPreset';
|
|
33650
33922
|
const SHADOW_SHAPES$1 = {
|
|
@@ -33682,6 +33954,9 @@ const SHADOW_SHAPES$1 = {
|
|
|
33682
33954
|
};
|
|
33683
33955
|
const SHADOW_ARRAY_PATH = 'clientConfig.configAsType.cardStyleConfig.shadows';
|
|
33684
33956
|
const LEGEND_COLOR_OVERRIDES_PATH = 'clientConfig.configAsType.legend.colorOverrides';
|
|
33957
|
+
const OVERRIDE_LABELS_PATH = 'clientConfig.configAsType.overrideLabels';
|
|
33958
|
+
/** Shared empty result — a fresh [] each read re-sets the child input. */
|
|
33959
|
+
const NO_OVERRIDE_LABELS = [];
|
|
33685
33960
|
// The "Show top border" toggle only writes `border-top-show`; the renderer
|
|
33686
33961
|
// reads `border-top-color` and otherwise falls back to `var(--primary-color)`.
|
|
33687
33962
|
// Enabling the toggle therefore has to seed the top-border color from the
|
|
@@ -33904,6 +34179,10 @@ class StyleField {
|
|
|
33904
34179
|
? raw
|
|
33905
34180
|
: {};
|
|
33906
34181
|
}
|
|
34182
|
+
readOverrideLabels() {
|
|
34183
|
+
const raw = readByPath$1(this.persisted(), OVERRIDE_LABELS_PATH);
|
|
34184
|
+
return Array.isArray(raw) ? raw : NO_OVERRIDE_LABELS;
|
|
34185
|
+
}
|
|
33907
34186
|
readJson() {
|
|
33908
34187
|
const raw = this.currentValue();
|
|
33909
34188
|
if (raw === undefined || raw === null)
|
|
@@ -33951,9 +34230,28 @@ class StyleField {
|
|
|
33951
34230
|
onLegendColorChange(change) {
|
|
33952
34231
|
this.patch.emit({
|
|
33953
34232
|
path: LEGEND_COLOR_OVERRIDES_PATH,
|
|
33954
|
-
value: updateLegendColorOverride(this.readLegendColorOverrides(), change.name, change.color),
|
|
34233
|
+
value: updateLegendColorOverride(this.readLegendColorOverrides(), change.name, change.color, change.aliases),
|
|
33955
34234
|
});
|
|
33956
34235
|
}
|
|
34236
|
+
onEntryLabelChange(change) {
|
|
34237
|
+
const labels = this.readOverrideLabels().map((label) => ({ ...label }));
|
|
34238
|
+
const key = change.key.trim();
|
|
34239
|
+
const normalizedKey = key.toLowerCase();
|
|
34240
|
+
const keyedIndex = normalizedKey
|
|
34241
|
+
? labels.findIndex((label) => String(label.key ?? '')
|
|
34242
|
+
.trim()
|
|
34243
|
+
.toLowerCase() === normalizedKey)
|
|
34244
|
+
: -1;
|
|
34245
|
+
const targetIndex = keyedIndex >= 0 ? keyedIndex : change.index;
|
|
34246
|
+
while (labels.length <= targetIndex)
|
|
34247
|
+
labels.push({});
|
|
34248
|
+
labels[targetIndex] = {
|
|
34249
|
+
...labels[targetIndex],
|
|
34250
|
+
...(key ? { key } : {}),
|
|
34251
|
+
[change.language]: change.value,
|
|
34252
|
+
};
|
|
34253
|
+
this.patch.emit({ path: OVERRIDE_LABELS_PATH, value: labels });
|
|
34254
|
+
}
|
|
33957
34255
|
onJsonInput(raw) {
|
|
33958
34256
|
if (!raw || !raw.trim()) {
|
|
33959
34257
|
this.jsonError.set(null);
|
|
@@ -33993,7 +34291,7 @@ class StyleField {
|
|
|
33993
34291
|
this.patch.emit({ path: SHADOW_PRESET_PATH$1, value: key });
|
|
33994
34292
|
}
|
|
33995
34293
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: StyleField, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
33996
|
-
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();\
|
|
34294
|
+
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]=\"f.itemFields ?? []\"\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]=\"f.valueFields ?? []\"\n [asArray]=\"f.asArray ?? 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"], 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 });
|
|
33997
34295
|
}
|
|
33998
34296
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: StyleField, decorators: [{
|
|
33999
34297
|
type: Component,
|
|
@@ -34014,7 +34312,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
34014
34312
|
ArrayBuilderField,
|
|
34015
34313
|
KeyValueMapField,
|
|
34016
34314
|
LegendOrderField,
|
|
34017
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "@let f = field();\
|
|
34315
|
+
], 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]=\"f.itemFields ?? []\"\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]=\"f.valueFields ?? []\"\n [asArray]=\"f.asArray ?? 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" }]
|
|
34018
34316
|
}], 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"] }] } });
|
|
34019
34317
|
|
|
34020
34318
|
/**
|
|
@@ -34114,7 +34412,7 @@ class StyleSettingsRenderer {
|
|
|
34114
34412
|
/** Clear every visible field in a section back to its (unset) default. */
|
|
34115
34413
|
resetSection(entry) {
|
|
34116
34414
|
for (const field of entry.fields) {
|
|
34117
|
-
for (const patch of expandResetPatches(field.path)) {
|
|
34415
|
+
for (const patch of expandResetPatches(field.path, field.mirrorPaths)) {
|
|
34118
34416
|
this.patch.emit(patch);
|
|
34119
34417
|
}
|
|
34120
34418
|
}
|
|
@@ -34529,7 +34827,7 @@ class StyleStudioDrawer {
|
|
|
34529
34827
|
const patches = [];
|
|
34530
34828
|
for (const section of this.schema().sections) {
|
|
34531
34829
|
for (const field of section.fields) {
|
|
34532
|
-
patches.push(...expandResetPatches(field.path));
|
|
34830
|
+
patches.push(...expandResetPatches(field.path, field.mirrorPaths));
|
|
34533
34831
|
}
|
|
34534
34832
|
}
|
|
34535
34833
|
this.item.set({
|
|
@@ -35868,7 +36166,7 @@ class LegacyDashboardFormulaBuilder {
|
|
|
35868
36166
|
useExisting: forwardRef(() => LegacyDashboardFormulaBuilder),
|
|
35869
36167
|
multi: true,
|
|
35870
36168
|
},
|
|
35871
|
-
], viewQueries: [{ propertyName: "editor", first: true, predicate: ["formulaEditor"], descendants: true, isSignal: true }], ngImport: i0, template: "<div\r\n class=\"overflow-hidden rounded-lg border border-surface-200 bg-surface-0 dark:border-surface-700 dark:bg-surface-800\"\r\n [class.pointer-events-none]=\"disabled()\"\r\n [class.opacity-60]=\"disabled()\"\r\n>\r\n <mt-formula-toolbar\r\n [functionCategories]=\"functionCategories\"\r\n [operators]=\"operators\"\r\n [knownProperties]=\"properties()\"\r\n (onBlockInsert)=\"onBlockInsert($event)\"\r\n />\r\n\r\n <div class=\"border-t border-surface-200 dark:border-surface-700\">\r\n <mt-formula-editor\r\n #formulaEditor\r\n [initialTokens]=\"tokens()\"\r\n [placeholder]=\"placeholder()\"\r\n [disabled]=\"disabled()\"\r\n [borderless]=\"true\"\r\n (formulaChange)=\"onFormulaChange($event)\"\r\n (tokensChange)=\"onTokensChange($event)\"\r\n (onBlur)=\"markTouched()\"\r\n />\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "component", type: FormulaToolbar, selector: "mt-formula-toolbar", inputs: ["knownProperties", "propertiesTemplate", "functionCategories", "operators", "initialTab", "visibleTabs", "searchPlaceholder", "labels"], outputs: ["onBlockInsert", "onTabChange"] }, { kind: "component", type: FormulaEditor, selector: "mt-formula-editor", inputs: ["placeholder", "initialTokens", "disabled", "borderless"], outputs: ["formulaChange", "tokensChange", "onBlur", "onFocus"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
36169
|
+
], viewQueries: [{ propertyName: "editor", first: true, predicate: ["formulaEditor"], descendants: true, isSignal: true }], ngImport: i0, template: "<div\r\n class=\"overflow-hidden rounded-lg border border-surface-200 bg-surface-0 dark:border-surface-700 dark:bg-surface-800\"\r\n [class.pointer-events-none]=\"disabled()\"\r\n [class.opacity-60]=\"disabled()\"\r\n>\r\n <mt-formula-toolbar\r\n [functionCategories]=\"functionCategories\"\r\n [operators]=\"operators\"\r\n [knownProperties]=\"properties()\"\r\n (onBlockInsert)=\"onBlockInsert($event)\"\r\n />\r\n\r\n <div class=\"border-t border-surface-200 dark:border-surface-700\">\r\n <mt-formula-editor\r\n #formulaEditor\r\n [initialTokens]=\"tokens()\"\r\n [placeholder]=\"placeholder()\"\r\n [disabled]=\"disabled()\"\r\n [borderless]=\"true\"\r\n (formulaChange)=\"onFormulaChange($event)\"\r\n (tokensChange)=\"onTokensChange($event)\"\r\n (onBlur)=\"markTouched()\"\r\n />\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "component", type: FormulaToolbar, selector: "mt-formula-toolbar", inputs: ["knownProperties", "propertiesTemplate", "propertyValues", "loadingValuesFor", "functionCategories", "operators", "initialTab", "visibleTabs", "searchPlaceholder", "labels"], outputs: ["onBlockInsert", "onTabChange", "onPropertyValuesRequest"] }, { kind: "component", type: FormulaEditor, selector: "mt-formula-editor", inputs: ["placeholder", "initialTokens", "disabled", "borderless"], outputs: ["formulaChange", "tokensChange", "onBlur", "onFocus"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
35872
36170
|
}
|
|
35873
36171
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: LegacyDashboardFormulaBuilder, decorators: [{
|
|
35874
36172
|
type: Component,
|
|
@@ -50454,4 +50752,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
50454
50752
|
*/
|
|
50455
50753
|
|
|
50456
50754
|
export { ComparisonChartHandler as $, EntityPreviewCardComponent as A, ListStatisticCardComponent as B, CardContentComponent as C, DashboardItemStoreService as D, EChartComponent as E, FilterUtilsService as F, SkeletonCardComponent as G, HeaderCardComponent as H, resolveStatisticIconPlacement as I, StatisticCardComponent as J, TopbarCardComponent as K, LastHistoryLevelCardComponent as L, ChartDataService as M, BarChartHandler as N, PieChartHandler as O, PropertiesCardComponent as P, StackBarChartHandler as Q, axisFormatters as R, StaticFiltersComponent as S, TableCardComponent as T, groupDatesByYearAndMonth as U, GaugeChartHandler as V, TableViewHandler as W, OverviewCardHandler as X, TimelineHandler as Y, LineChartHandler as Z, SnapshotHandler as _, DashboardItem as a, GetChartActionsPipe as a$, SplitterChartHandler as a0, LevelCardHandler as a1, MapChartHandler as a2, RingGaugeChartHandler as a3, SPlusChartHandler as a4, PhaseGateStepperHandler as a5, formatCurrency as a6, getCurrencySuffix as a7, formatPercentage as a8, formatNumber as a9, StackBarControlUi as aA, ManageItem as aB, CHART_TYPES as aC, ManageItemService as aD, GeneralSettings as aE, DataSourceSettings as aF, ActionsSettings as aG, ChartViewer as aH, StyleStudioDrawer as aI, StyleSettingsRenderer as aJ, expandResetPatches as aK, StyleField as aL, SegmentedField as aM, ColorListField as aN, ArrayBuilderField as aO, KeyValueMapField as aP, LegendOrderField as aQ, ItemCardMenuComponent as aR, ChartFilterDrawer as aS, ItemContextToolbarComponent as aT, ItemConfigPopoverComponent as aU, GuidedConfigDialogComponent as aV, FilterChipsBarComponent as aW, FilterBuilderComponent as aX, DatasourcePanelComponent as aY, SchemaControlRendererComponent as aZ, FilterByGroupPipe as a_, formatDate as aa, createAxisFormatter as ab, createTooltipFormatter as ac, formatAxisLabel as ad, formatWordsUnderBar as ae, formatXAxis as af, handleFiltersForCustom as ag, handleFilterForCard as ah, handleFilterForSnapshot as ai, DashboardList as aj, MODULE_CLASSIFICATION_LOG as ak, MODULE_CLASSIFICATION_LOG_NAME as al, isLogClassification as am, HTTPMethod as an, DashboardBuilderService as ao, DashboardStoreService as ap, isManagePagesDeleteResult as aq, ManagePages as ar, ManageBreadcrumb as as, ManageFilterOnPage as at, DynamicFiltersConfig as au, ChartSettingsDrawer as av, DisplaySettings as aw, DefaultControlUi as ax, PieControlUi as ay, BarControlUi as az, DashboardDialogHeader as b, ItemGuidanceService as b$, CHART_CAPABILITIES as b0, getCapabilityById as b1, resolveCapability as b2, toBackendChartType as b3, normalizeChartTypeForRequest as b4, normalizeFilterOperation as b5, normalizeAggregateFunction as b6, normalizeFilters as b7, selectorFromLegacy as b8, moduleIdFromSelector as b9, STYLE_PRESETS as bA, presetsForCapability as bB, findPreset as bC, validate as bD, hasBlockingIssues as bE, groupIssuesByDomain as bF, parseAdvancedJson as bG, deepMerge$1 as bH, formatForEditor as bI, readByPath$1 as bJ, setByPath as bK, applyControlPatchToPersisted as bL, applyControlPatchesToPersisted as bM, getControlSchema as bN, listControlSchemaIds as bO, listControlSchemas as bP, getFallbackControlSchema as bQ, flattenSchema as bR, resolveDisplayFields as bS, buildDisplayFieldPredicate as bT, bindingKey as bU, getBinding as bV, listBindings as bW, listBindingsForChart as bX, readBoundValue as bY, ITEM_GUIDANCE_REGISTRY as bZ, describeGuidance as b_, toBackendSourceLink as ba, toFormSourceLink as bb, normalizeOnLoad as bc, normalizeBeforeSave as bd, normalizeBeforeRequest as be, CONFIG_DOMAINS as bf, domainsForCapability as bg, findDomain as bh, POPOVER_TABS as bi, POPOVER_TAB_SPECS as bj, titleToUi as bk, applyTitleToPersisted as bl, datasourceToUi as bm, fieldsToUi as bn, filtersToUi as bo, styleToUi as bp, applyStyleToPersisted as bq, layoutToUi as br, applyLayoutToPersisted as bs, labelLegendFormatToUi as bt, applyLabelLegendFormatToPersisted as bu, behaviorToUi as bv, applyBehaviorToPersisted as bw, applyFilterChipsToPersisted as bx, persistedToUi as by, buildAssembly as bz, cloneDeep$1 as c, 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 };
|
|
50457
|
-
//# sourceMappingURL=masterteam-dashboard-builder-masterteam-dashboard-builder-
|
|
50755
|
+
//# sourceMappingURL=masterteam-dashboard-builder-masterteam-dashboard-builder-DaN0WjWE.mjs.map
|