@foxeltech/angular-ui 0.4.0 → 0.7.44
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/archivo/archivo-400-latin-ext.woff2 +0 -0
- package/archivo/archivo-400-latin.woff2 +0 -0
- package/archivo/archivo-400-vietnamese.woff2 +0 -0
- package/archivo/archivo-500-latin-ext.woff2 +0 -0
- package/archivo/archivo-500-latin.woff2 +0 -0
- package/archivo/archivo-500-vietnamese.woff2 +0 -0
- package/archivo/archivo-600-latin-ext.woff2 +0 -0
- package/archivo/archivo-600-latin.woff2 +0 -0
- package/archivo/archivo-600-vietnamese.woff2 +0 -0
- package/archivo/archivo-700-latin-ext.woff2 +0 -0
- package/archivo/archivo-700-latin.woff2 +0 -0
- package/archivo/archivo-700-vietnamese.woff2 +0 -0
- package/components.css +12 -12
- package/dialogs.css +2 -2
- package/fesm2022/foxeltech-angular-ui-chart.mjs +185 -17
- package/fesm2022/foxeltech-angular-ui-chart.mjs.map +1 -1
- package/fesm2022/foxeltech-angular-ui-flow.mjs +176 -3
- package/fesm2022/foxeltech-angular-ui-flow.mjs.map +1 -1
- package/fesm2022/foxeltech-angular-ui-rich-text.mjs +2 -2
- package/fesm2022/foxeltech-angular-ui-rich-text.mjs.map +1 -1
- package/fesm2022/foxeltech-angular-ui.mjs +849 -69
- package/fesm2022/foxeltech-angular-ui.mjs.map +1 -1
- package/fonts.css +462 -138
- package/ibm-plex-mono/ibm-plex-mono-400-cyrillic-ext.woff2 +0 -0
- package/ibm-plex-mono/ibm-plex-mono-400-cyrillic.woff2 +0 -0
- package/ibm-plex-mono/ibm-plex-mono-400-latin-ext.woff2 +0 -0
- package/ibm-plex-mono/ibm-plex-mono-400-latin.woff2 +0 -0
- package/ibm-plex-mono/ibm-plex-mono-400-vietnamese.woff2 +0 -0
- package/ibm-plex-mono/ibm-plex-mono-500-cyrillic-ext.woff2 +0 -0
- package/ibm-plex-mono/ibm-plex-mono-500-cyrillic.woff2 +0 -0
- package/ibm-plex-mono/ibm-plex-mono-500-latin-ext.woff2 +0 -0
- package/ibm-plex-mono/ibm-plex-mono-500-latin.woff2 +0 -0
- package/ibm-plex-mono/ibm-plex-mono-500-vietnamese.woff2 +0 -0
- package/ibm-plex-mono/ibm-plex-mono-600-cyrillic-ext.woff2 +0 -0
- package/ibm-plex-mono/ibm-plex-mono-600-cyrillic.woff2 +0 -0
- package/ibm-plex-mono/ibm-plex-mono-600-latin-ext.woff2 +0 -0
- package/ibm-plex-mono/ibm-plex-mono-600-latin.woff2 +0 -0
- package/ibm-plex-mono/ibm-plex-mono-600-vietnamese.woff2 +0 -0
- package/jetbrains-mono/jetbrains-mono-400-cyrillic-ext.woff2 +0 -0
- package/jetbrains-mono/jetbrains-mono-400-cyrillic.woff2 +0 -0
- package/jetbrains-mono/jetbrains-mono-400-greek.woff2 +0 -0
- package/jetbrains-mono/jetbrains-mono-400-latin-ext.woff2 +0 -0
- package/jetbrains-mono/jetbrains-mono-400-latin.woff2 +0 -0
- package/jetbrains-mono/jetbrains-mono-400-vietnamese.woff2 +0 -0
- package/jetbrains-mono/jetbrains-mono-500-cyrillic-ext.woff2 +0 -0
- package/jetbrains-mono/jetbrains-mono-500-cyrillic.woff2 +0 -0
- package/jetbrains-mono/jetbrains-mono-500-greek.woff2 +0 -0
- package/jetbrains-mono/jetbrains-mono-500-latin-ext.woff2 +0 -0
- package/jetbrains-mono/jetbrains-mono-500-latin.woff2 +0 -0
- package/jetbrains-mono/jetbrains-mono-500-vietnamese.woff2 +0 -0
- package/jetbrains-mono/jetbrains-mono-600-cyrillic-ext.woff2 +0 -0
- package/jetbrains-mono/jetbrains-mono-600-cyrillic.woff2 +0 -0
- package/jetbrains-mono/jetbrains-mono-600-greek.woff2 +0 -0
- package/jetbrains-mono/jetbrains-mono-600-latin-ext.woff2 +0 -0
- package/jetbrains-mono/jetbrains-mono-600-latin.woff2 +0 -0
- package/jetbrains-mono/jetbrains-mono-600-vietnamese.woff2 +0 -0
- package/jetbrains-mono/jetbrains-mono-700-cyrillic-ext.woff2 +0 -0
- package/jetbrains-mono/jetbrains-mono-700-cyrillic.woff2 +0 -0
- package/jetbrains-mono/jetbrains-mono-700-greek.woff2 +0 -0
- package/jetbrains-mono/jetbrains-mono-700-latin-ext.woff2 +0 -0
- package/jetbrains-mono/jetbrains-mono-700-latin.woff2 +0 -0
- package/jetbrains-mono/jetbrains-mono-700-vietnamese.woff2 +0 -0
- package/newsreader/newsreader-400-latin-ext.woff2 +0 -0
- package/newsreader/newsreader-400-latin.woff2 +0 -0
- package/newsreader/newsreader-400-vietnamese.woff2 +0 -0
- package/newsreader/newsreader-500-latin-ext.woff2 +0 -0
- package/newsreader/newsreader-500-latin.woff2 +0 -0
- package/newsreader/newsreader-500-vietnamese.woff2 +0 -0
- package/newsreader/newsreader-600-latin-ext.woff2 +0 -0
- package/newsreader/newsreader-600-latin.woff2 +0 -0
- package/newsreader/newsreader-600-vietnamese.woff2 +0 -0
- package/package.json +5 -2
- package/source-serif-4/source-serif-4-400-cyrillic-ext.woff2 +0 -0
- package/source-serif-4/source-serif-4-400-cyrillic.woff2 +0 -0
- package/source-serif-4/source-serif-4-400-greek.woff2 +0 -0
- package/source-serif-4/source-serif-4-400-latin-ext.woff2 +0 -0
- package/source-serif-4/source-serif-4-400-latin.woff2 +0 -0
- package/source-serif-4/source-serif-4-400-vietnamese.woff2 +0 -0
- package/source-serif-4/source-serif-4-600-cyrillic-ext.woff2 +0 -0
- package/source-serif-4/source-serif-4-600-cyrillic.woff2 +0 -0
- package/source-serif-4/source-serif-4-600-greek.woff2 +0 -0
- package/source-serif-4/source-serif-4-600-latin-ext.woff2 +0 -0
- package/source-serif-4/source-serif-4-600-latin.woff2 +0 -0
- package/source-serif-4/source-serif-4-600-vietnamese.woff2 +0 -0
- package/src/lib/styles/components.css +12 -12
- package/src/lib/styles/dialogs.css +2 -2
- package/src/lib/styles/fonts.css +462 -138
- package/src/lib/styles/tailwind.css +1 -1
- package/src/lib/styles/theme.css +596 -69
- package/src/lib/styles/tokens.css +56 -19
- package/src/lib/styles/utilities.css +4 -1
- package/src/lib/ui/components/bar-list/bar-list.component.html +29 -0
- package/src/lib/ui/components/button/button.component.html +7 -5
- package/src/lib/ui/components/checkbox/checkbox.component.html +1 -1
- package/src/lib/ui/components/code-block/code-block.component.html +8 -0
- package/src/lib/ui/components/drawer/drawer.component.html +35 -12
- package/src/lib/ui/components/drawer/drawer.component.scss +104 -18
- package/src/lib/ui/components/facets-rail/facets-rail.component.html +42 -0
- package/src/lib/ui/components/filter-pills/filter-pills.component.html +16 -0
- package/src/lib/ui/components/kanban-board/kanban-board.component.scss +9 -9
- package/src/lib/ui/components/list-row/list-row.component.html +20 -0
- package/src/lib/ui/components/master-detail/master-detail.component.css +22 -0
- package/src/lib/ui/components/master-detail/master-detail.component.html +33 -1
- package/src/lib/ui/components/pending-badge/pending-badge.component.html +15 -0
- package/src/lib/ui/components/pipeline-stepper/pipeline-stepper.component.html +45 -0
- package/src/lib/ui/components/project-card/project-card.component.html +102 -0
- package/src/lib/ui/components/radio-button/radio-button.component.html +1 -1
- package/src/lib/ui/components/radio-button-toggle/radio-button-toggle.component.html +1 -1
- package/src/lib/ui/components/sample-frame/sample-frame.component.html +18 -0
- package/src/lib/ui/components/score-badge/score-badge.component.html +7 -0
- package/src/lib/ui/components/screenshot-frame/screenshot-frame.component.html +40 -0
- package/src/lib/ui/components/section-card/section-card.component.html +19 -6
- package/src/lib/ui/components/segmented/segmented.component.html +42 -0
- package/src/lib/ui/components/segmented/segmented.component.scss +12 -0
- package/src/lib/ui/components/slider/slider.component.html +2 -2
- package/src/lib/ui/components/sparkbar/sparkbar.component.html +14 -0
- package/src/lib/ui/components/stage-dots/stage-dots.component.html +13 -0
- package/src/lib/ui/components/stat-cards/stat-cards.component.html +44 -11
- package/src/lib/ui/components/status-dot/status-dot.component.html +13 -0
- package/src/lib/ui/components/tab-group/tab-group.component.html +37 -8
- package/src/lib/ui/components/tab-group/tab-group.component.scss +41 -1
- package/src/lib/ui/components/tag/tag.component.html +2 -2
- package/src/lib/ui/components/theme-picker/theme-picker.component.html +44 -0
- package/src/lib/ui/components/tree-diagram/tree-diagram.component.html +3 -3
- package/tailwind.css +1 -1
- package/theme.css +596 -69
- package/tokens.css +56 -19
- package/types/foxeltech-angular-ui-chart.d.ts +14 -2
- package/types/foxeltech-angular-ui-flow.d.ts +83 -1
- package/types/foxeltech-angular-ui.d.ts +636 -20
- package/utilities.css +4 -1
- package/BeVietnamPro/BeVietnamPro-Bold.woff2 +0 -0
- package/BeVietnamPro/BeVietnamPro-ExtraLight.woff2 +0 -0
- package/BeVietnamPro/BeVietnamPro-Light.woff2 +0 -0
- package/BeVietnamPro/BeVietnamPro-Medium.woff2 +0 -0
- package/BeVietnamPro/BeVietnamPro-Regular.woff2 +0 -0
- package/BeVietnamPro/BeVietnamPro-SemiBold.woff2 +0 -0
- package/BeVietnamPro/BeVietnamPro-Thin.woff2 +0 -0
- package/SpaceMono-Regular.woff2 +0 -0
- package/dm-sans/DMSans-Bold.woff2 +0 -0
- package/dm-sans/DMSans-Light.woff2 +0 -0
- package/dm-sans/DMSans-Medium.woff2 +0 -0
- package/dm-sans/DMSans-Regular.woff2 +0 -0
- package/dm-sans/DMSans-SemiBold.woff2 +0 -0
- package/dm-sans/DMSans-Thin.woff2 +0 -0
- package/orbitron/Orbitron-Bold.woff2 +0 -0
- package/orbitron/Orbitron-Medium.woff2 +0 -0
- package/orbitron/Orbitron-Regular.woff2 +0 -0
- package/orbitron/Orbitron-SemiBold.woff2 +0 -0
- package/roboto/Roboto-Black.woff2 +0 -0
- package/roboto/Roboto-BlackItalic.woff2 +0 -0
- package/roboto/Roboto-Bold.woff2 +0 -0
- package/roboto/Roboto-BoldCondensed.woff2 +0 -0
- package/roboto/Roboto-BoldCondensedItalic.woff2 +0 -0
- package/roboto/Roboto-BoldItalic.woff2 +0 -0
- package/roboto/Roboto-Condensed.woff2 +0 -0
- package/roboto/Roboto-CondensedItalic.woff2 +0 -0
- package/roboto/Roboto-Italic.woff2 +0 -0
- package/roboto/Roboto-Light.woff2 +0 -0
- package/roboto/Roboto-LightItalic.woff2 +0 -0
- package/roboto/Roboto-Medium.woff2 +0 -0
- package/roboto/Roboto-MediumItalic.woff2 +0 -0
- package/roboto/Roboto-Regular.woff2 +0 -0
- package/roboto/Roboto-Thin.woff2 +0 -0
- package/roboto/Roboto-ThinItalic.woff2 +0 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/components.css
CHANGED
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
margin-right: 0px !important;
|
|
78
78
|
}
|
|
79
79
|
.mat-mdc-tooltip {
|
|
80
|
-
border-radius:
|
|
80
|
+
border-radius: var(--og-radius-control) !important;
|
|
81
81
|
background-color: rgb(var(--bg-primary)) !important;
|
|
82
82
|
--mdc-plain-tooltip-container-color: rgb(var(--bg-primary));
|
|
83
83
|
--mdc-plain-tooltip-supporting-text-color: rgb(var(--text-primary));
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
|
|
89
89
|
.mat-mdc-table {
|
|
90
90
|
border: 1px solid rgb(var(--border-default)) !important;
|
|
91
|
-
border-radius:
|
|
91
|
+
border-radius: var(--og-radius-card) !important;
|
|
92
92
|
overflow: hidden !important;
|
|
93
93
|
border-collapse: separate !important;
|
|
94
94
|
border-spacing: 0 !important;
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
padding-top: 8px !important;
|
|
107
107
|
padding-bottom: 8px !important;
|
|
108
108
|
line-height: 24px !important;
|
|
109
|
-
font-family:
|
|
109
|
+
font-family: var(--og-font-body);
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
.mdc-data-table__row {
|
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
.mdc-data-table__cell {
|
|
123
123
|
border-bottom: 1px solid rgb(var(--border-default)) !important;
|
|
124
124
|
background-color: rgb(var(--bg-primary)) !important;
|
|
125
|
-
font-family:
|
|
125
|
+
font-family: var(--og-font-body);
|
|
126
126
|
}
|
|
127
127
|
|
|
128
128
|
.mat-mdc-row:last-child .mdc-data-table__cell {
|
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
.mat-mdc-select-panel {
|
|
137
137
|
background-color: rgb(var(--bg-primary)) !important;
|
|
138
138
|
border: 1px solid rgb(var(--border-default)) !important;
|
|
139
|
-
border-radius:
|
|
139
|
+
border-radius: var(--og-radius-card) !important;
|
|
140
140
|
box-shadow: 0 2px 4px rgb(var(--shadow-color) / 0.1) !important;
|
|
141
141
|
}
|
|
142
142
|
|
|
@@ -145,11 +145,11 @@
|
|
|
145
145
|
}
|
|
146
146
|
|
|
147
147
|
.mat-mdc-menu-panel {
|
|
148
|
-
border-radius:
|
|
148
|
+
border-radius: var(--og-radius-card) !important;
|
|
149
149
|
border-color: rgb(var(--border-default)) !important;
|
|
150
150
|
}
|
|
151
151
|
.mat-mdc-menu-panel .mat-mdc-menu-content {
|
|
152
|
-
@apply bg-bg-primary shadow-none border rounded-
|
|
152
|
+
@apply bg-bg-primary shadow-none border rounded-card border-border-default flex flex-col;
|
|
153
153
|
}
|
|
154
154
|
|
|
155
155
|
.mat-mdc-option .mat-pseudo-checkbox {
|
|
@@ -158,7 +158,7 @@
|
|
|
158
158
|
|
|
159
159
|
.mat-mdc-dialog-surface {
|
|
160
160
|
background-color: rgb(var(--bg-primary)) !important;
|
|
161
|
-
border-radius:
|
|
161
|
+
border-radius: var(--og-radius-card) !important;
|
|
162
162
|
}
|
|
163
163
|
.mat-mdc-dialog-container .mat-mdc-dialog-content {
|
|
164
164
|
letter-spacing: 0 !important;
|
|
@@ -203,7 +203,7 @@ input[type='password'] {
|
|
|
203
203
|
@apply font-semibold text-sm tracking-normal leading-5 text-text-primary;
|
|
204
204
|
}
|
|
205
205
|
.txt-heading-table {
|
|
206
|
-
@apply text-base font-
|
|
206
|
+
@apply text-base font-body font-semibold text-text-primary tracking-tight;
|
|
207
207
|
}
|
|
208
208
|
.txt-heading-compact-02 {
|
|
209
209
|
@apply font-semibold text-sm tracking-normal leading-5 text-text-primary;
|
|
@@ -334,7 +334,7 @@ input[type='password'] {
|
|
|
334
334
|
@apply btn-common bg-gradient-primary hover:opacity-75 text-text-focus;
|
|
335
335
|
}
|
|
336
336
|
.btn-success {
|
|
337
|
-
@apply btn-common bg-gradient-success hover:opacity-75 text-
|
|
337
|
+
@apply btn-common bg-gradient-success hover:opacity-75 text-surface;
|
|
338
338
|
}
|
|
339
339
|
.btn-alternative {
|
|
340
340
|
@apply btn-common hover:bg-bg-hover text-text-primary border border-border-default;
|
|
@@ -474,7 +474,7 @@ input[type='password'] {
|
|
|
474
474
|
.border-gradient-primary {
|
|
475
475
|
border: 1px solid transparent;
|
|
476
476
|
background:
|
|
477
|
-
linear-gradient(var(--surface
|
|
477
|
+
linear-gradient(rgb(var(--og-surface)), rgb(var(--og-surface))) padding-box,
|
|
478
478
|
linear-gradient(
|
|
479
479
|
135deg,
|
|
480
480
|
rgb(var(--gradient-primary-start)),
|
|
@@ -482,5 +482,5 @@ input[type='password'] {
|
|
|
482
482
|
) border-box;
|
|
483
483
|
}
|
|
484
484
|
.skeleton-load {
|
|
485
|
-
@apply rounded bg-
|
|
485
|
+
@apply rounded bg-track animate-pulse motion-reduce:animate-none;
|
|
486
486
|
}
|
package/dialogs.css
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.fx-dialog {
|
|
2
2
|
max-width: unset !important;
|
|
3
|
-
border-radius:
|
|
3
|
+
border-radius: var(--og-radius-card) !important;
|
|
4
4
|
.mat-dialog-actions {
|
|
5
5
|
border-top: 1px solid rgb(var(--border-default)) !important;
|
|
6
6
|
margin-left: -24px;
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
|
|
41
41
|
.mat-dialog-title {
|
|
42
42
|
background-color: rgb(var(--bg-primary));
|
|
43
|
-
box-shadow: 0px 4px 8px
|
|
43
|
+
box-shadow: 0px 4px 8px rgb(var(--shadow-color) / 0.15);
|
|
44
44
|
color: rgb(var(--text-primary));
|
|
45
45
|
padding: 12px 20px;
|
|
46
46
|
min-height: 24px;
|
|
@@ -17,8 +17,14 @@ class ChartComponent {
|
|
|
17
17
|
pieLegendAlign = input('10%', ...(ngDevMode ? [{ debugName: "pieLegendAlign" }] : /* istanbul ignore next */ []));
|
|
18
18
|
pieLegendPosition = input('middle', ...(ngDevMode ? [{ debugName: "pieLegendPosition" }] : /* istanbul ignore next */ []));
|
|
19
19
|
showPieLabel = input(true, ...(ngDevMode ? [{ debugName: "showPieLabel" }] : /* istanbul ignore next */ []));
|
|
20
|
+
/** Hide the built-in legend (panels that render their own legend beside the
|
|
21
|
+
donut); the donut then centres in the container. */
|
|
22
|
+
showPieLegend = input(true, ...(ngDevMode ? [{ debugName: "showPieLegend" }] : /* istanbul ignore next */ []));
|
|
23
|
+
/** Caption under the donut's centre total (design: "42 / confirmed"). */
|
|
24
|
+
pieCenterLabel = input('', ...(ngDevMode ? [{ debugName: "pieCenterLabel" }] : /* istanbul ignore next */ []));
|
|
20
25
|
mobileWidth = input(350, ...(ngDevMode ? [{ debugName: "mobileWidth" }] : /* istanbul ignore next */ []));
|
|
21
|
-
|
|
26
|
+
/** Override font for canvas text; empty = follow the theme's --og-font-figure. */
|
|
27
|
+
labelFontFamily = input('', ...(ngDevMode ? [{ debugName: "labelFontFamily" }] : /* istanbul ignore next */ []));
|
|
22
28
|
emptyText = input('No data available', ...(ngDevMode ? [{ debugName: "emptyText" }] : /* istanbul ignore next */ []));
|
|
23
29
|
/* ================= OUTPUTS ================= */
|
|
24
30
|
chartClick = output();
|
|
@@ -123,6 +129,14 @@ class ChartComponent {
|
|
|
123
129
|
const values = data?.values;
|
|
124
130
|
return !categories?.length || !values?.length;
|
|
125
131
|
}
|
|
132
|
+
if (type === 'line') {
|
|
133
|
+
const data = this.data();
|
|
134
|
+
return !data?.categories?.length || !data?.values?.length;
|
|
135
|
+
}
|
|
136
|
+
if (type === 'area-trend') {
|
|
137
|
+
const data = this.data();
|
|
138
|
+
return !data?.categories?.length || !data?.current?.length;
|
|
139
|
+
}
|
|
126
140
|
if (type === 'pie') {
|
|
127
141
|
const data = this.data();
|
|
128
142
|
if (!Array.isArray(data) || data.length === 0)
|
|
@@ -146,7 +160,7 @@ class ChartComponent {
|
|
|
146
160
|
width: 80,
|
|
147
161
|
overflow: 'truncate',
|
|
148
162
|
ellipsis: '…',
|
|
149
|
-
fontFamily: this.
|
|
163
|
+
fontFamily: this.resolvedFontFamily(),
|
|
150
164
|
fontSize: this.labelFontSize,
|
|
151
165
|
color: FxUtils.convertColorFromVariable('--text-secondary'),
|
|
152
166
|
},
|
|
@@ -159,7 +173,7 @@ class ChartComponent {
|
|
|
159
173
|
yAxis: {
|
|
160
174
|
type: 'value',
|
|
161
175
|
axisLabel: {
|
|
162
|
-
fontFamily: this.
|
|
176
|
+
fontFamily: this.resolvedFontFamily(),
|
|
163
177
|
fontSize: this.labelFontSize,
|
|
164
178
|
color: FxUtils.convertColorFromVariable('--text-secondary'),
|
|
165
179
|
},
|
|
@@ -185,7 +199,7 @@ class ChartComponent {
|
|
|
185
199
|
label: {
|
|
186
200
|
show: true,
|
|
187
201
|
position: 'top',
|
|
188
|
-
fontFamily: this.
|
|
202
|
+
fontFamily: this.resolvedFontFamily(),
|
|
189
203
|
fontSize: this.labelFontSize,
|
|
190
204
|
color: FxUtils.convertColorFromVariable('--text-primary'),
|
|
191
205
|
},
|
|
@@ -199,6 +213,7 @@ class ChartComponent {
|
|
|
199
213
|
color: colors,
|
|
200
214
|
tooltip: { trigger: 'item' },
|
|
201
215
|
legend: {
|
|
216
|
+
show: this.showPieLegend(),
|
|
202
217
|
type: 'scroll',
|
|
203
218
|
orient: layout.legendOrient,
|
|
204
219
|
icon: 'circle',
|
|
@@ -213,7 +228,7 @@ class ChartComponent {
|
|
|
213
228
|
return item ? `${name}: ${item.value}` : name;
|
|
214
229
|
},
|
|
215
230
|
textStyle: {
|
|
216
|
-
fontFamily: this.
|
|
231
|
+
fontFamily: this.resolvedFontFamily(),
|
|
217
232
|
fontSize: 13,
|
|
218
233
|
fontWeight: 500,
|
|
219
234
|
color: FxUtils.convertColorFromVariable('--text-primary'),
|
|
@@ -231,7 +246,7 @@ class ChartComponent {
|
|
|
231
246
|
position: 'outside',
|
|
232
247
|
formatter: '{d}%',
|
|
233
248
|
fontSize: this.labelFontSize,
|
|
234
|
-
fontFamily: this.
|
|
249
|
+
fontFamily: this.resolvedFontFamily(),
|
|
235
250
|
color: FxUtils.convertColorFromVariable('--text-primary'),
|
|
236
251
|
textBorderWidth: 0,
|
|
237
252
|
textBorderColor: 'transparent',
|
|
@@ -243,26 +258,124 @@ class ChartComponent {
|
|
|
243
258
|
},
|
|
244
259
|
},
|
|
245
260
|
],
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
261
|
+
// Centre figure: positioned by x/y in pixels — graphic left/top
|
|
262
|
+
// percentages place the element's bounding-box EDGE, which shifted the
|
|
263
|
+
// total right/down by half its own size (mis-centred, caption clipped).
|
|
264
|
+
graphic: (() => {
|
|
265
|
+
const cx = (this.containerWidth || 400) * (parseFloat(layout.pieCenter[0]) / 100);
|
|
266
|
+
const ch = this.ref.nativeElement.clientHeight || 300;
|
|
267
|
+
const cy = ch * (parseFloat(layout.pieCenter[1]) / 100);
|
|
268
|
+
return [
|
|
252
269
|
{
|
|
253
270
|
type: 'text',
|
|
271
|
+
// Shift the total up when a caption sits under it.
|
|
272
|
+
x: cx,
|
|
273
|
+
y: cy + (this.pieCenterLabel() ? -9 : 0),
|
|
254
274
|
style: {
|
|
255
275
|
text: total.toString(),
|
|
256
276
|
fontSize: 24,
|
|
257
277
|
fontWeight: 600,
|
|
258
|
-
fontFamily: this.
|
|
278
|
+
fontFamily: this.resolvedFontFamily(),
|
|
259
279
|
fill: FxUtils.convertColorFromVariable('--text-primary'),
|
|
260
280
|
align: 'center',
|
|
261
281
|
verticalAlign: 'middle',
|
|
262
282
|
},
|
|
263
283
|
},
|
|
264
|
-
|
|
284
|
+
...(this.pieCenterLabel()
|
|
285
|
+
? [
|
|
286
|
+
{
|
|
287
|
+
type: 'text',
|
|
288
|
+
x: cx,
|
|
289
|
+
y: cy + 12,
|
|
290
|
+
style: {
|
|
291
|
+
text: this.pieCenterLabel(),
|
|
292
|
+
fontSize: 11,
|
|
293
|
+
fontFamily: this.resolvedFontFamily(),
|
|
294
|
+
fill: FxUtils.convertColorFromVariable('--text-secondary'),
|
|
295
|
+
align: 'center',
|
|
296
|
+
verticalAlign: 'middle',
|
|
297
|
+
},
|
|
298
|
+
},
|
|
299
|
+
]
|
|
300
|
+
: []),
|
|
301
|
+
];
|
|
302
|
+
})(),
|
|
303
|
+
};
|
|
304
|
+
},
|
|
305
|
+
// V2 preset: single line, accent-coloured — "risk score by release".
|
|
306
|
+
line: (data) => ({
|
|
307
|
+
tooltip: { trigger: 'axis' },
|
|
308
|
+
grid: { left: '3%', right: '4%', bottom: '8%', top: '8%', containLabel: true },
|
|
309
|
+
xAxis: this.categoryAxis(data?.categories || []),
|
|
310
|
+
yAxis: this.valueAxis(),
|
|
311
|
+
series: [
|
|
312
|
+
{
|
|
313
|
+
type: 'line',
|
|
314
|
+
data: data?.values || [],
|
|
315
|
+
smooth: false,
|
|
316
|
+
symbol: 'circle',
|
|
317
|
+
symbolSize: 7,
|
|
318
|
+
lineStyle: { width: 2, color: FxUtils.convertColorFromVariable('--og-accent', 1, { legacyCommaSyntax: true }) },
|
|
319
|
+
itemStyle: { color: FxUtils.convertColorFromVariable('--og-accent', 1, { legacyCommaSyntax: true }) },
|
|
320
|
+
label: {
|
|
321
|
+
show: true,
|
|
322
|
+
position: 'top',
|
|
323
|
+
fontFamily: this.resolvedFontFamily(),
|
|
324
|
+
fontSize: this.labelFontSize,
|
|
325
|
+
color: FxUtils.convertColorFromVariable('--text-primary'),
|
|
326
|
+
},
|
|
327
|
+
},
|
|
328
|
+
],
|
|
329
|
+
}),
|
|
330
|
+
// V2 preset: weekly trend — accent gradient fill + gray comparison line.
|
|
331
|
+
// data: { categories: string[], current: number[], previous?: number[] }
|
|
332
|
+
'area-trend': (data) => {
|
|
333
|
+
// legacyCommaSyntax: zrender's colour parser chokes on CSS4 space syntax.
|
|
334
|
+
const accent = FxUtils.convertColorFromVariable('--og-accent', 1, { legacyCommaSyntax: true });
|
|
335
|
+
const accentSoft = FxUtils.convertColorFromVariable('--og-accent', 0.25, { legacyCommaSyntax: true });
|
|
336
|
+
const accentFade = FxUtils.convertColorFromVariable('--og-accent', 0.02, { legacyCommaSyntax: true });
|
|
337
|
+
const series = [
|
|
338
|
+
{
|
|
339
|
+
type: 'line',
|
|
340
|
+
name: data?.currentLabel || 'Current',
|
|
341
|
+
data: data?.current || [],
|
|
342
|
+
smooth: true,
|
|
343
|
+
symbol: 'none',
|
|
344
|
+
lineStyle: { width: 2, color: accent },
|
|
345
|
+
itemStyle: { color: accent },
|
|
346
|
+
areaStyle: {
|
|
347
|
+
color: {
|
|
348
|
+
type: 'linear',
|
|
349
|
+
x: 0, y: 0, x2: 0, y2: 1,
|
|
350
|
+
colorStops: [
|
|
351
|
+
{ offset: 0, color: accentSoft },
|
|
352
|
+
{ offset: 1, color: accentFade },
|
|
353
|
+
],
|
|
354
|
+
},
|
|
355
|
+
},
|
|
265
356
|
},
|
|
357
|
+
];
|
|
358
|
+
if (data?.previous?.length) {
|
|
359
|
+
series.push({
|
|
360
|
+
type: 'line',
|
|
361
|
+
name: data?.previousLabel || 'Previous',
|
|
362
|
+
data: data.previous,
|
|
363
|
+
smooth: true,
|
|
364
|
+
symbol: 'none',
|
|
365
|
+
lineStyle: {
|
|
366
|
+
width: 1.5,
|
|
367
|
+
type: 'dashed',
|
|
368
|
+
color: FxUtils.convertColorFromVariable('--text-placeholder', 1, { legacyCommaSyntax: true }),
|
|
369
|
+
},
|
|
370
|
+
itemStyle: { color: FxUtils.convertColorFromVariable('--text-placeholder', 1, { legacyCommaSyntax: true }) },
|
|
371
|
+
});
|
|
372
|
+
}
|
|
373
|
+
return {
|
|
374
|
+
tooltip: { trigger: 'axis' },
|
|
375
|
+
grid: { left: '3%', right: '4%', bottom: '8%', top: '10%', containLabel: true },
|
|
376
|
+
xAxis: { ...this.categoryAxis(data?.categories || []), boundaryGap: false },
|
|
377
|
+
yAxis: this.valueAxis(),
|
|
378
|
+
series,
|
|
266
379
|
};
|
|
267
380
|
},
|
|
268
381
|
sunburst: (data, colors) => ({
|
|
@@ -279,7 +392,7 @@ class ChartComponent {
|
|
|
279
392
|
label: {
|
|
280
393
|
rotate: 'tangential',
|
|
281
394
|
fontSize: this.labelFontSize,
|
|
282
|
-
fontFamily: this.
|
|
395
|
+
fontFamily: this.resolvedFontFamily(),
|
|
283
396
|
color: FxUtils.convertColorFromVariable('--text-primary'),
|
|
284
397
|
textBorderWidth: 0,
|
|
285
398
|
textBorderColor: 'transparent',
|
|
@@ -291,6 +404,19 @@ class ChartComponent {
|
|
|
291
404
|
/* ================= PIE LAYOUT ================= */
|
|
292
405
|
calcPieLayout(data) {
|
|
293
406
|
const cw = this.containerWidth || 400;
|
|
407
|
+
if (!this.showPieLegend()) {
|
|
408
|
+
return {
|
|
409
|
+
legendOrient: 'vertical',
|
|
410
|
+
legendLeft: undefined,
|
|
411
|
+
legendRight: undefined,
|
|
412
|
+
legendTop: undefined,
|
|
413
|
+
legendBottom: undefined,
|
|
414
|
+
legendWidth: undefined,
|
|
415
|
+
pieCenter: ['50%', '50%'],
|
|
416
|
+
graphicLeft: '50%',
|
|
417
|
+
graphicTop: '50%',
|
|
418
|
+
};
|
|
419
|
+
}
|
|
294
420
|
if (this.isMobile) {
|
|
295
421
|
return {
|
|
296
422
|
legendOrient: 'horizontal',
|
|
@@ -351,6 +477,48 @@ class ChartComponent {
|
|
|
351
477
|
...this.options(),
|
|
352
478
|
};
|
|
353
479
|
}
|
|
480
|
+
categoryAxis(categories) {
|
|
481
|
+
return {
|
|
482
|
+
type: 'category',
|
|
483
|
+
data: categories,
|
|
484
|
+
axisLabel: {
|
|
485
|
+
fontFamily: this.resolvedFontFamily(),
|
|
486
|
+
fontSize: this.labelFontSize,
|
|
487
|
+
color: FxUtils.convertColorFromVariable('--text-secondary'),
|
|
488
|
+
},
|
|
489
|
+
axisLine: {
|
|
490
|
+
lineStyle: { color: FxUtils.convertColorFromVariable('--border-strong') },
|
|
491
|
+
},
|
|
492
|
+
};
|
|
493
|
+
}
|
|
494
|
+
valueAxis() {
|
|
495
|
+
return {
|
|
496
|
+
type: 'value',
|
|
497
|
+
axisLabel: {
|
|
498
|
+
fontFamily: this.resolvedFontFamily(),
|
|
499
|
+
fontSize: this.labelFontSize,
|
|
500
|
+
color: FxUtils.convertColorFromVariable('--text-secondary'),
|
|
501
|
+
},
|
|
502
|
+
splitLine: {
|
|
503
|
+
lineStyle: { color: FxUtils.convertColorFromVariable('--border-default') },
|
|
504
|
+
},
|
|
505
|
+
};
|
|
506
|
+
}
|
|
507
|
+
/** Canvas không ăn var() — resolve font stack thật tại render; chart đã
|
|
508
|
+
rebuild theo event theme-changed nên tự đổi font khi đổi theme
|
|
509
|
+
(blueprint/terminal dùng mono qua --og-font-figure). */
|
|
510
|
+
resolvedFontFamily() {
|
|
511
|
+
const override = this.labelFontFamily();
|
|
512
|
+
if (override)
|
|
513
|
+
return override;
|
|
514
|
+
// Dev-mode CSS pretty-printer bẻ dòng giá trị dài — normalize whitespace
|
|
515
|
+
// trước khi chuỗi này vào ctx.font của canvas.
|
|
516
|
+
const figure = getComputedStyle(document.body)
|
|
517
|
+
.getPropertyValue('--og-font-figure')
|
|
518
|
+
.replace(/\s+/g, ' ')
|
|
519
|
+
.trim();
|
|
520
|
+
return figure || 'Archivo, system-ui, sans-serif';
|
|
521
|
+
}
|
|
354
522
|
resolvePalette() {
|
|
355
523
|
const defaults = [
|
|
356
524
|
'rgba(var(--success) / 1)',
|
|
@@ -374,12 +542,12 @@ class ChartComponent {
|
|
|
374
542
|
});
|
|
375
543
|
}
|
|
376
544
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: ChartComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
377
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.20", type: ChartComponent, isStandalone: true, selector: "fx-ui-chart", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, palette: { classPropertyName: "palette", publicName: "palette", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, pieLegendAlign: { classPropertyName: "pieLegendAlign", publicName: "pieLegendAlign", isSignal: true, isRequired: false, transformFunction: null }, pieLegendPosition: { classPropertyName: "pieLegendPosition", publicName: "pieLegendPosition", isSignal: true, isRequired: false, transformFunction: null }, showPieLabel: { classPropertyName: "showPieLabel", publicName: "showPieLabel", isSignal: true, isRequired: false, transformFunction: null }, mobileWidth: { classPropertyName: "mobileWidth", publicName: "mobileWidth", isSignal: true, isRequired: false, transformFunction: null }, labelFontFamily: { classPropertyName: "labelFontFamily", publicName: "labelFontFamily", isSignal: true, isRequired: false, transformFunction: null }, emptyText: { classPropertyName: "emptyText", publicName: "emptyText", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { chartClick: "chartClick", chartInit: "chartInit" }, host: { listeners: { "window:theme-changed": "onThemeChange()" } }, providers: [provideEchartsCore({ echarts: () => import('echarts') })], usesOnChanges: true, ngImport: i0, template: "<div class=\"chart-wrapper\" [style.height]=\"height()\">\n @if (isEmpty) {\n <div class=\"chart-empty\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\" class=\"chart-empty-icon\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 0 1 3 19.875v-6.75ZM9.75 8.625c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V8.625ZM16.5 4.125c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V4.125Z\" />\n </svg>\n <span class=\"chart-empty-text\">{{ emptyText() }}</span>\n </div>\n } @else {\n <div\n echarts\n [options]=\"chartOptions\"\n [loading]=\"loading()\"\n (chartInit)=\"onChartInit($event)\"\n (chartClick)=\"onChartClick($event)\"\n class=\"fx-chart\"\n [style.height]=\"height()\"\n ></div>\n }\n</div>\n", styles: [":host{display:block;width:100%}.chart-wrapper{position:relative;width:100%;height:100%}.chart-container{width:100%;height:100%}.chart-loader{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(var(--bg-primary-hover)/.6);font-weight:500;font-size:1.1rem;z-index:2;border-radius:4px}.chart-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;gap:12px;color:rgba(var(--text-secondary)/1)}.chart-empty-icon{width:48px;height:48px;opacity:.4}.chart-empty-text{font-size:14px;font-weight:500}\n"], dependencies: [{ kind: "directive", type: NgxEchartsDirective, selector: "echarts, [echarts]", inputs: ["options", "theme", "initOpts", "merge", "autoResize", "loading", "loadingType", "loadingOpts"], outputs: ["chartInit", "optionsError", "chartClick", "chartDblClick", "chartMouseDown", "chartMouseMove", "chartMouseUp", "chartMouseOver", "chartMouseOut", "chartGlobalOut", "chartContextMenu", "chartHighlight", "chartDownplay", "chartSelectChanged", "chartLegendSelectChanged", "chartLegendSelected", "chartLegendUnselected", "chartLegendLegendSelectAll", "chartLegendLegendInverseSelect", "chartLegendScroll", "chartDataZoom", "chartDataRangeSelected", "chartGraphRoam", "chartGeoRoam", "chartTreeRoam", "chartTimelineChanged", "chartTimelinePlayChanged", "chartRestore", "chartDataViewChanged", "chartMagicTypeChanged", "chartGeoSelectChanged", "chartGeoSelected", "chartGeoUnselected", "chartAxisAreaSelected", "chartBrush", "chartBrushEnd", "chartBrushSelected", "chartGlobalCursorTaken", "chartRendered", "chartFinished"], exportAs: ["echarts"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
545
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.20", type: ChartComponent, isStandalone: true, selector: "fx-ui-chart", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, palette: { classPropertyName: "palette", publicName: "palette", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, pieLegendAlign: { classPropertyName: "pieLegendAlign", publicName: "pieLegendAlign", isSignal: true, isRequired: false, transformFunction: null }, pieLegendPosition: { classPropertyName: "pieLegendPosition", publicName: "pieLegendPosition", isSignal: true, isRequired: false, transformFunction: null }, showPieLabel: { classPropertyName: "showPieLabel", publicName: "showPieLabel", isSignal: true, isRequired: false, transformFunction: null }, showPieLegend: { classPropertyName: "showPieLegend", publicName: "showPieLegend", isSignal: true, isRequired: false, transformFunction: null }, pieCenterLabel: { classPropertyName: "pieCenterLabel", publicName: "pieCenterLabel", isSignal: true, isRequired: false, transformFunction: null }, mobileWidth: { classPropertyName: "mobileWidth", publicName: "mobileWidth", isSignal: true, isRequired: false, transformFunction: null }, labelFontFamily: { classPropertyName: "labelFontFamily", publicName: "labelFontFamily", isSignal: true, isRequired: false, transformFunction: null }, emptyText: { classPropertyName: "emptyText", publicName: "emptyText", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { chartClick: "chartClick", chartInit: "chartInit" }, host: { listeners: { "window:theme-changed": "onThemeChange()" } }, providers: [provideEchartsCore({ echarts: () => import('echarts') })], usesOnChanges: true, ngImport: i0, template: "<div class=\"chart-wrapper\" [style.height]=\"height()\">\n @if (isEmpty) {\n <div class=\"chart-empty\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\" class=\"chart-empty-icon\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 0 1 3 19.875v-6.75ZM9.75 8.625c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V8.625ZM16.5 4.125c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V4.125Z\" />\n </svg>\n <span class=\"chart-empty-text\">{{ emptyText() }}</span>\n </div>\n } @else {\n <div\n echarts\n [options]=\"chartOptions\"\n [loading]=\"loading()\"\n (chartInit)=\"onChartInit($event)\"\n (chartClick)=\"onChartClick($event)\"\n class=\"fx-chart\"\n [style.height]=\"height()\"\n ></div>\n }\n</div>\n", styles: [":host{display:block;width:100%}.chart-wrapper{position:relative;width:100%;height:100%}.chart-container{width:100%;height:100%}.chart-loader{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(var(--bg-primary-hover)/.6);font-weight:500;font-size:1.1rem;z-index:2;border-radius:4px}.chart-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;gap:12px;color:rgba(var(--text-secondary)/1)}.chart-empty-icon{width:48px;height:48px;opacity:.4}.chart-empty-text{font-size:14px;font-weight:500}\n"], dependencies: [{ kind: "directive", type: NgxEchartsDirective, selector: "echarts, [echarts]", inputs: ["options", "theme", "initOpts", "merge", "autoResize", "loading", "loadingType", "loadingOpts"], outputs: ["chartInit", "optionsError", "chartClick", "chartDblClick", "chartMouseDown", "chartMouseMove", "chartMouseUp", "chartMouseOver", "chartMouseOut", "chartGlobalOut", "chartContextMenu", "chartHighlight", "chartDownplay", "chartSelectChanged", "chartLegendSelectChanged", "chartLegendSelected", "chartLegendUnselected", "chartLegendLegendSelectAll", "chartLegendLegendInverseSelect", "chartLegendScroll", "chartDataZoom", "chartDataRangeSelected", "chartGraphRoam", "chartGeoRoam", "chartTreeRoam", "chartTimelineChanged", "chartTimelinePlayChanged", "chartRestore", "chartDataViewChanged", "chartMagicTypeChanged", "chartGeoSelectChanged", "chartGeoSelected", "chartGeoUnselected", "chartAxisAreaSelected", "chartBrush", "chartBrushEnd", "chartBrushSelected", "chartGlobalCursorTaken", "chartRendered", "chartFinished"], exportAs: ["echarts"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
378
546
|
}
|
|
379
547
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: ChartComponent, decorators: [{
|
|
380
548
|
type: Component,
|
|
381
549
|
args: [{ selector: 'fx-ui-chart', changeDetection: ChangeDetectionStrategy.OnPush, imports: [NgxEchartsDirective, InputComponent], providers: [provideEchartsCore({ echarts: () => import('echarts') })], template: "<div class=\"chart-wrapper\" [style.height]=\"height()\">\n @if (isEmpty) {\n <div class=\"chart-empty\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\" class=\"chart-empty-icon\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 0 1 3 19.875v-6.75ZM9.75 8.625c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V8.625ZM16.5 4.125c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V4.125Z\" />\n </svg>\n <span class=\"chart-empty-text\">{{ emptyText() }}</span>\n </div>\n } @else {\n <div\n echarts\n [options]=\"chartOptions\"\n [loading]=\"loading()\"\n (chartInit)=\"onChartInit($event)\"\n (chartClick)=\"onChartClick($event)\"\n class=\"fx-chart\"\n [style.height]=\"height()\"\n ></div>\n }\n</div>\n", styles: [":host{display:block;width:100%}.chart-wrapper{position:relative;width:100%;height:100%}.chart-container{width:100%;height:100%}.chart-loader{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(var(--bg-primary-hover)/.6);font-weight:500;font-size:1.1rem;z-index:2;border-radius:4px}.chart-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;gap:12px;color:rgba(var(--text-secondary)/1)}.chart-empty-icon{width:48px;height:48px;opacity:.4}.chart-empty-text{font-size:14px;font-weight:500}\n"] }]
|
|
382
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }], propDecorators: { type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], palette: [{ type: i0.Input, args: [{ isSignal: true, alias: "palette", required: false }] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], pieLegendAlign: [{ type: i0.Input, args: [{ isSignal: true, alias: "pieLegendAlign", required: false }] }], pieLegendPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "pieLegendPosition", required: false }] }], showPieLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPieLabel", required: false }] }], mobileWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "mobileWidth", required: false }] }], labelFontFamily: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelFontFamily", required: false }] }], emptyText: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyText", required: false }] }], chartClick: [{ type: i0.Output, args: ["chartClick"] }], chartInit: [{ type: i0.Output, args: ["chartInit"] }], onThemeChange: [{
|
|
550
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }], propDecorators: { type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], palette: [{ type: i0.Input, args: [{ isSignal: true, alias: "palette", required: false }] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], pieLegendAlign: [{ type: i0.Input, args: [{ isSignal: true, alias: "pieLegendAlign", required: false }] }], pieLegendPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "pieLegendPosition", required: false }] }], showPieLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPieLabel", required: false }] }], showPieLegend: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPieLegend", required: false }] }], pieCenterLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "pieCenterLabel", required: false }] }], mobileWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "mobileWidth", required: false }] }], labelFontFamily: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelFontFamily", required: false }] }], emptyText: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyText", required: false }] }], chartClick: [{ type: i0.Output, args: ["chartClick"] }], chartInit: [{ type: i0.Output, args: ["chartInit"] }], onThemeChange: [{
|
|
383
551
|
type: HostListener,
|
|
384
552
|
args: ['window:theme-changed']
|
|
385
553
|
}] } });
|