@mintplayer/ng-bootstrap 22.28.0 → 22.29.0
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/_bootstrap.scss +4 -101
- package/fesm2022/mintplayer-ng-bootstrap-a11y.mjs +62 -30
- package/fesm2022/mintplayer-ng-bootstrap-a11y.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs +71 -64
- package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs +50 -46
- package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-card.mjs +65 -94
- package/fesm2022/mintplayer-ng-bootstrap-card.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs +122 -97
- package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-charts-hierarchy.mjs +80 -133
- package/fesm2022/mintplayer-ng-bootstrap-charts-hierarchy.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-charts-sparkline.mjs +31 -19
- package/fesm2022/mintplayer-ng-bootstrap-charts-sparkline.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-charts-trend.mjs +41 -46
- package/fesm2022/mintplayer-ng-bootstrap-charts-trend.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-checkbox.mjs +76 -37
- package/fesm2022/mintplayer-ng-bootstrap-checkbox.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs +37 -82
- package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs +150 -824
- package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs +172 -118
- package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-datetime-picker.mjs +180 -142
- package/fesm2022/mintplayer-ng-bootstrap-datetime-picker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-dock.mjs +66 -116
- package/fesm2022/mintplayer-ng-bootstrap-dock.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs +41 -46
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-file-manager.mjs +80 -204
- package/fesm2022/mintplayer-ng-bootstrap-file-manager.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-floating-labels.mjs +2 -2
- package/fesm2022/mintplayer-ng-bootstrap-floating-labels.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-form.mjs +2 -2
- package/fesm2022/mintplayer-ng-bootstrap-form.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-input-group.mjs +32 -17
- package/fesm2022/mintplayer-ng-bootstrap-input-group.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-machine.mjs +220 -20
- package/fesm2022/mintplayer-ng-bootstrap-machine.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-multi-range.mjs +98 -129
- package/fesm2022/mintplayer-ng-bootstrap-multi-range.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs +144 -265
- package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-otp-input.mjs +133 -217
- package/fesm2022/mintplayer-ng-bootstrap-otp-input.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs +46 -25
- package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-phone-input.mjs +166 -93
- package/fesm2022/mintplayer-ng-bootstrap-phone-input.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-query-builder.mjs +148 -231
- package/fesm2022/mintplayer-ng-bootstrap-query-builder.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-radio.mjs +133 -94
- package/fesm2022/mintplayer-ng-bootstrap-radio.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-range.mjs +2 -2
- package/fesm2022/mintplayer-ng-bootstrap-range.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-rating.mjs +76 -7
- package/fesm2022/mintplayer-ng-bootstrap-rating.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-ribbon.mjs +766 -812
- package/fesm2022/mintplayer-ng-bootstrap-ribbon.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs +206 -180
- package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-select.mjs +202 -141
- package/fesm2022/mintplayer-ng-bootstrap-select.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-shell.mjs +113 -59
- package/fesm2022/mintplayer-ng-bootstrap-shell.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs +133 -76
- package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-splitter.mjs +60 -87
- package/fesm2022/mintplayer-ng-bootstrap-splitter.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs +86 -83
- package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-table.mjs +1 -2
- package/fesm2022/mintplayer-ng-bootstrap-table.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-theming.mjs +38 -34
- package/fesm2022/mintplayer-ng-bootstrap-theming.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-timeline.mjs +177 -147
- package/fesm2022/mintplayer-ng-bootstrap-timeline.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs +200 -94
- package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tree-select.mjs +186 -233
- package/fesm2022/mintplayer-ng-bootstrap-tree-select.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs +58 -136
- package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs +22 -16
- package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs.map +1 -1
- package/package.json +11 -9
- package/types/mintplayer-ng-bootstrap-a11y.d.ts +40 -21
- package/types/mintplayer-ng-bootstrap-accordion.d.ts +36 -33
- package/types/mintplayer-ng-bootstrap-calendar.d.ts +39 -16
- package/types/mintplayer-ng-bootstrap-card.d.ts +25 -33
- package/types/mintplayer-ng-bootstrap-carousel.d.ts +70 -55
- package/types/mintplayer-ng-bootstrap-charts-hierarchy.d.ts +65 -45
- package/types/mintplayer-ng-bootstrap-charts-sparkline.d.ts +12 -3
- package/types/mintplayer-ng-bootstrap-charts-trend.d.ts +34 -19
- package/types/mintplayer-ng-bootstrap-checkbox.d.ts +34 -8
- package/types/mintplayer-ng-bootstrap-code-snippet.d.ts +32 -59
- package/types/mintplayer-ng-bootstrap-datatable.d.ts +217 -422
- package/types/mintplayer-ng-bootstrap-datepicker.d.ts +77 -29
- package/types/mintplayer-ng-bootstrap-datetime-picker.d.ts +83 -51
- package/types/mintplayer-ng-bootstrap-dock.d.ts +57 -38
- package/types/mintplayer-ng-bootstrap-dropdown-menu.d.ts +25 -30
- package/types/mintplayer-ng-bootstrap-file-manager.d.ts +61 -81
- package/types/mintplayer-ng-bootstrap-input-group.d.ts +17 -12
- package/types/mintplayer-ng-bootstrap-machine.d.ts +112 -4
- package/types/mintplayer-ng-bootstrap-multi-range.d.ts +53 -27
- package/types/mintplayer-ng-bootstrap-navbar.d.ts +88 -164
- package/types/mintplayer-ng-bootstrap-otp-input.d.ts +63 -30
- package/types/mintplayer-ng-bootstrap-pagination.d.ts +23 -7
- package/types/mintplayer-ng-bootstrap-phone-input.d.ts +77 -47
- package/types/mintplayer-ng-bootstrap-query-builder.d.ts +95 -98
- package/types/mintplayer-ng-bootstrap-radio.d.ts +68 -35
- package/types/mintplayer-ng-bootstrap-rating.d.ts +27 -2
- package/types/mintplayer-ng-bootstrap-ribbon.d.ts +546 -220
- package/types/mintplayer-ng-bootstrap-scheduler.d.ts +82 -197
- package/types/mintplayer-ng-bootstrap-select.d.ts +113 -53
- package/types/mintplayer-ng-bootstrap-shell.d.ts +59 -33
- package/types/mintplayer-ng-bootstrap-signature-pad.d.ts +63 -27
- package/types/mintplayer-ng-bootstrap-splitter.d.ts +45 -56
- package/types/mintplayer-ng-bootstrap-tab-control.d.ts +47 -26
- package/types/mintplayer-ng-bootstrap-table.d.ts +1 -2
- package/types/mintplayer-ng-bootstrap-theming.d.ts +19 -18
- package/types/mintplayer-ng-bootstrap-timeline.d.ts +287 -117
- package/types/mintplayer-ng-bootstrap-timepicker.d.ts +100 -27
- package/types/mintplayer-ng-bootstrap-tree-select.d.ts +188 -94
- package/types/mintplayer-ng-bootstrap-treeview.d.ts +74 -59
- package/types/mintplayer-ng-bootstrap-typeahead.d.ts +3 -0
- package/src/styles/utilities/cursor.scss +0 -12
- package/src/styles/utilities/overflow.scss +0 -12
- package/src/styles/utilities/white-space.scss +0 -12
- package/src/styles/utilities/width.scss +0 -14
|
@@ -1,168 +1,115 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, model,
|
|
3
|
-
import '@mintplayer/
|
|
4
|
-
import {
|
|
2
|
+
import { inject, ElementRef, input, model, numberAttribute, booleanAttribute, output, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { useCore, useScopedStyles, MpPropsDirective } from '@mintplayer/ng-bootstrap/machine';
|
|
4
|
+
import { hierarchyChartCore, hierarchyChartScopedStyles } from '@mintplayer/ui-core/charts/hierarchy';
|
|
5
5
|
|
|
6
|
+
// GENERATED from the charts/hierarchy manifest (hierarchy-chart) by @mintplayer/nx-component-compiler. Do not edit.
|
|
7
|
+
/**
|
|
8
|
+
* One weighted tree, three projections: `layout` is sunburst, icicle or treemap.
|
|
9
|
+
*
|
|
10
|
+
* Size follows the summed leaf `value`, colour follows `colorValue`. Click, Enter or a breadcrumb re-roots
|
|
11
|
+
* on a node (two-way `rootId`); ctrl/cmd+wheel, pinch and `+` / `-` / `0` magnify it geometrically.
|
|
12
|
+
* Every node is a treeitem: arrows move between siblings (Down goes outward), Escape and Backspace zoom out.
|
|
13
|
+
* The server renders the finished chart at a 420px fallback scale, its controls inert until it is live.
|
|
14
|
+
*/
|
|
6
15
|
class BsHierarchyChartComponent {
|
|
16
|
+
#core;
|
|
7
17
|
constructor() {
|
|
8
|
-
|
|
18
|
+
/** The host element. */
|
|
19
|
+
this.elementRef = inject(ElementRef);
|
|
20
|
+
this.data = input(null, /* @ts-ignore */
|
|
9
21
|
...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
|
|
10
22
|
this.layout = input('sunburst', /* @ts-ignore */
|
|
11
23
|
...(ngDevMode ? [{ debugName: "layout" }] : /* istanbul ignore next */ []));
|
|
12
|
-
this.rootId = model(
|
|
24
|
+
this.rootId = model(null, /* @ts-ignore */
|
|
13
25
|
...(ngDevMode ? [{ debugName: "rootId" }] : /* istanbul ignore next */ []));
|
|
14
|
-
/**
|
|
15
|
-
|
|
16
|
-
* Unset leaves the element's own default: `'auto'`, or a 2-level window when
|
|
17
|
-
* a `loadChildren` loader is bound.
|
|
18
|
-
*/
|
|
19
|
-
this.maxDepth = input(undefined, /* @ts-ignore */
|
|
26
|
+
/** A positive number, or `auto`. */
|
|
27
|
+
this.maxDepth = input(null, /* @ts-ignore */
|
|
20
28
|
...(ngDevMode ? [{ debugName: "maxDepth" }] : /* istanbul ignore next */ []));
|
|
21
|
-
this.minAngle = input(0.2, /*
|
|
22
|
-
...(ngDevMode ?
|
|
23
|
-
this.
|
|
24
|
-
...(ngDevMode ?
|
|
25
|
-
this.
|
|
26
|
-
...(ngDevMode ? [{ debugName: "showLabels" }] : /* istanbul ignore next */ []));
|
|
27
|
-
/** Label font size in device px, constant across host size and zoom. */
|
|
28
|
-
this.labelFontSize = input(12, /* @ts-ignore */
|
|
29
|
-
...(ngDevMode ? [{ debugName: "labelFontSize" }] : /* istanbul ignore next */ []));
|
|
30
|
-
/** Opaque color behind the chart for label contrast; unset = auto-detected. */
|
|
31
|
-
this.backdrop = input(undefined, /* @ts-ignore */
|
|
29
|
+
this.minAngle = input(0.2, { ...(ngDevMode ? { debugName: "minAngle" } : /* istanbul ignore next */ {}), transform: (v) => numberAttribute(v) });
|
|
30
|
+
this.minSize = input(4, { ...(ngDevMode ? { debugName: "minSize" } : /* istanbul ignore next */ {}), transform: (v) => numberAttribute(v) });
|
|
31
|
+
this.showLabels = input(true, { ...(ngDevMode ? { debugName: "showLabels" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
32
|
+
this.labelFontSize = input(12, { ...(ngDevMode ? { debugName: "labelFontSize" } : /* istanbul ignore next */ {}), transform: (v) => numberAttribute(v) });
|
|
33
|
+
this.backdrop = input(null, /* @ts-ignore */
|
|
32
34
|
...(ngDevMode ? [{ debugName: "backdrop" }] : /* istanbul ignore next */ []));
|
|
33
|
-
|
|
34
|
-
this.
|
|
35
|
-
...(ngDevMode ? [{ debugName: "zoomGestures" }] : /* istanbul ignore next */ []));
|
|
36
|
-
this.zoomHintLabel = input(undefined, /* @ts-ignore */
|
|
37
|
-
...(ngDevMode ? [{ debugName: "zoomHintLabel" }] : /* istanbul ignore next */ []));
|
|
38
|
-
/** Renders the focus path as buttons above the chart. */
|
|
39
|
-
this.showBreadcrumb = input(false, /* @ts-ignore */
|
|
40
|
-
...(ngDevMode ? [{ debugName: "showBreadcrumb" }] : /* istanbul ignore next */ []));
|
|
41
|
-
this.breadcrumbLabel = input(undefined, /* @ts-ignore */
|
|
42
|
-
...(ngDevMode ? [{ debugName: "breadcrumbLabel" }] : /* istanbul ignore next */ []));
|
|
43
|
-
this.colorMin = input(0, /* @ts-ignore */
|
|
44
|
-
...(ngDevMode ? [{ debugName: "colorMin" }] : /* istanbul ignore next */ []));
|
|
45
|
-
this.colorMax = input(100, /* @ts-ignore */
|
|
46
|
-
...(ngDevMode ? [{ debugName: "colorMax" }] : /* istanbul ignore next */ []));
|
|
35
|
+
this.colorMin = input(0, { ...(ngDevMode ? { debugName: "colorMin" } : /* istanbul ignore next */ {}), transform: (v) => numberAttribute(v) });
|
|
36
|
+
this.colorMax = input(100, { ...(ngDevMode ? { debugName: "colorMax" } : /* istanbul ignore next */ {}), transform: (v) => numberAttribute(v) });
|
|
47
37
|
this.colorStart = input('#fe0000', /* @ts-ignore */
|
|
48
38
|
...(ngDevMode ? [{ debugName: "colorStart" }] : /* istanbul ignore next */ []));
|
|
49
39
|
this.colorEnd = input('#21b577', /* @ts-ignore */
|
|
50
40
|
...(ngDevMode ? [{ debugName: "colorEnd" }] : /* istanbul ignore next */ []));
|
|
51
|
-
this.transitionDuration = input(300, /*
|
|
52
|
-
|
|
53
|
-
this.locale = input(undefined, /* @ts-ignore */
|
|
41
|
+
this.transitionDuration = input(300, { ...(ngDevMode ? { debugName: "transitionDuration" } : /* istanbul ignore next */ {}), transform: (v) => numberAttribute(v) });
|
|
42
|
+
this.locale = input(null, /* @ts-ignore */
|
|
54
43
|
...(ngDevMode ? [{ debugName: "locale" }] : /* istanbul ignore next */ []));
|
|
55
|
-
this.
|
|
56
|
-
...(ngDevMode ? [{ debugName: "
|
|
57
|
-
this.
|
|
44
|
+
this.zoomGestures = input('wheel pinch', /* @ts-ignore */
|
|
45
|
+
...(ngDevMode ? [{ debugName: "zoomGestures" }] : /* istanbul ignore next */ []));
|
|
46
|
+
this.zoomHintLabel = input(null, /* @ts-ignore */
|
|
47
|
+
...(ngDevMode ? [{ debugName: "zoomHintLabel" }] : /* istanbul ignore next */ []));
|
|
48
|
+
this.showBreadcrumb = input(false, { ...(ngDevMode ? { debugName: "showBreadcrumb" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
49
|
+
this.breadcrumbLabel = input('Chart path', /* @ts-ignore */
|
|
50
|
+
...(ngDevMode ? [{ debugName: "breadcrumbLabel" }] : /* istanbul ignore next */ []));
|
|
51
|
+
this.zoomOutLabel = input('Zoom out one level', /* @ts-ignore */
|
|
58
52
|
...(ngDevMode ? [{ debugName: "zoomOutLabel" }] : /* istanbul ignore next */ []));
|
|
59
|
-
this.metricUnitLabel = input(
|
|
53
|
+
this.metricUnitLabel = input('%', /* @ts-ignore */
|
|
60
54
|
...(ngDevMode ? [{ debugName: "metricUnitLabel" }] : /* istanbul ignore next */ []));
|
|
61
|
-
this.valueUnitLabel = input(
|
|
55
|
+
this.valueUnitLabel = input('', /* @ts-ignore */
|
|
62
56
|
...(ngDevMode ? [{ debugName: "valueUnitLabel" }] : /* istanbul ignore next */ []));
|
|
63
|
-
this.loadingLabel = input(
|
|
57
|
+
this.loadingLabel = input('Loading', /* @ts-ignore */
|
|
64
58
|
...(ngDevMode ? [{ debugName: "loadingLabel" }] : /* istanbul ignore next */ []));
|
|
65
|
-
this.
|
|
59
|
+
this.inputLabel = input(null, /* @ts-ignore */
|
|
60
|
+
...(ngDevMode ? [{ debugName: "inputLabel" }] : /* istanbul ignore next */ []));
|
|
61
|
+
this.tooltipFormatter = input(null, /* @ts-ignore */
|
|
66
62
|
...(ngDevMode ? [{ debugName: "tooltipFormatter" }] : /* istanbul ignore next */ []));
|
|
67
|
-
this.labelFormatter = input(
|
|
63
|
+
this.labelFormatter = input(null, /* @ts-ignore */
|
|
68
64
|
...(ngDevMode ? [{ debugName: "labelFormatter" }] : /* istanbul ignore next */ []));
|
|
69
|
-
this.loadChildren = input(
|
|
65
|
+
this.loadChildren = input(null, /* @ts-ignore */
|
|
70
66
|
...(ngDevMode ? [{ debugName: "loadChildren" }] : /* istanbul ignore next */ []));
|
|
67
|
+
/** The focus node changed (null: the tree root). */
|
|
68
|
+
this.rootidchange = output();
|
|
69
|
+
/** The chart re-rooted on a node; the detail has its path. */
|
|
71
70
|
this.zoom = output();
|
|
72
|
-
|
|
73
|
-
this.
|
|
74
|
-
|
|
75
|
-
this.
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
effect(() => {
|
|
83
|
-
const el = this.chartRef().nativeElement;
|
|
84
|
-
const depth = this.maxDepth();
|
|
85
|
-
if (depth !== undefined)
|
|
86
|
-
el.maxDepth = depth;
|
|
87
|
-
});
|
|
88
|
-
effect(() => { const el = this.chartRef().nativeElement; el.minAngle = this.minAngle(); });
|
|
89
|
-
effect(() => { const el = this.chartRef().nativeElement; el.minSize = this.minSize(); });
|
|
90
|
-
effect(() => { const el = this.chartRef().nativeElement; el.showLabels = this.showLabels(); });
|
|
91
|
-
effect(() => { const el = this.chartRef().nativeElement; el.labelFontSize = this.labelFontSize(); });
|
|
92
|
-
effect(() => { const el = this.chartRef().nativeElement; el.backdrop = this.backdrop(); });
|
|
93
|
-
effect(() => { const el = this.chartRef().nativeElement; el.zoomGestures = this.zoomGestures(); });
|
|
94
|
-
effect(() => {
|
|
95
|
-
const el = this.chartRef().nativeElement;
|
|
96
|
-
const label = this.zoomHintLabel();
|
|
97
|
-
if (label !== undefined)
|
|
98
|
-
el.zoomHintLabel = label;
|
|
99
|
-
});
|
|
100
|
-
effect(() => { const el = this.chartRef().nativeElement; el.showBreadcrumb = this.showBreadcrumb(); });
|
|
101
|
-
effect(() => {
|
|
102
|
-
const el = this.chartRef().nativeElement;
|
|
103
|
-
const label = this.breadcrumbLabel();
|
|
104
|
-
if (label !== undefined)
|
|
105
|
-
el.breadcrumbLabel = label;
|
|
106
|
-
});
|
|
107
|
-
effect(() => { const el = this.chartRef().nativeElement; el.colorMin = this.colorMin(); });
|
|
108
|
-
effect(() => { const el = this.chartRef().nativeElement; el.colorMax = this.colorMax(); });
|
|
109
|
-
effect(() => { const el = this.chartRef().nativeElement; el.colorStart = this.colorStart(); });
|
|
110
|
-
effect(() => { const el = this.chartRef().nativeElement; el.colorEnd = this.colorEnd(); });
|
|
111
|
-
effect(() => { const el = this.chartRef().nativeElement; el.transitionDuration = this.transitionDuration(); });
|
|
112
|
-
effect(() => { const el = this.chartRef().nativeElement; el.locale = this.locale(); });
|
|
113
|
-
effect(() => {
|
|
114
|
-
const el = this.chartRef().nativeElement;
|
|
115
|
-
el.inputLabel = this.inputLabel() ?? null;
|
|
116
|
-
});
|
|
117
|
-
effect(() => {
|
|
118
|
-
const el = this.chartRef().nativeElement;
|
|
119
|
-
const label = this.zoomOutLabel();
|
|
120
|
-
if (label !== undefined)
|
|
121
|
-
el.zoomOutLabel = label;
|
|
122
|
-
});
|
|
123
|
-
effect(() => {
|
|
124
|
-
const el = this.chartRef().nativeElement;
|
|
125
|
-
const label = this.metricUnitLabel();
|
|
126
|
-
if (label !== undefined)
|
|
127
|
-
el.metricUnitLabel = label;
|
|
128
|
-
});
|
|
129
|
-
effect(() => {
|
|
130
|
-
const el = this.chartRef().nativeElement;
|
|
131
|
-
const label = this.valueUnitLabel();
|
|
132
|
-
if (label !== undefined)
|
|
133
|
-
el.valueUnitLabel = label;
|
|
134
|
-
});
|
|
135
|
-
effect(() => {
|
|
136
|
-
const el = this.chartRef().nativeElement;
|
|
137
|
-
const label = this.loadingLabel();
|
|
138
|
-
if (label !== undefined)
|
|
139
|
-
el.loadingLabel = label;
|
|
140
|
-
});
|
|
141
|
-
effect(() => { const el = this.chartRef().nativeElement; el.tooltipFormatter = this.tooltipFormatter(); });
|
|
142
|
-
effect(() => { const el = this.chartRef().nativeElement; el.labelFormatter = this.labelFormatter(); });
|
|
143
|
-
effect(() => { const el = this.chartRef().nativeElement; el.loadChildren = this.loadChildren(); });
|
|
71
|
+
/** A leaf was clicked or activated with Enter. */
|
|
72
|
+
this.nodeselect = output();
|
|
73
|
+
/** The hovered node changed (`node` null when the pointer leaves). */
|
|
74
|
+
this.nodehover = output();
|
|
75
|
+
/** A lazy `loadChildren` call rejected; activating the node retries. */
|
|
76
|
+
this.nodeloaderror = output();
|
|
77
|
+
this.#core = useCore(hierarchyChartCore, { inputs: () => ({ data: this.data(), layout: this.layout(), rootId: this.rootId(), maxDepth: this.maxDepth(), minAngle: this.minAngle(), minSize: this.minSize(), showLabels: this.showLabels(), labelFontSize: this.labelFontSize(), backdrop: this.backdrop(), colorMin: this.colorMin(), colorMax: this.colorMax(), colorStart: this.colorStart(), colorEnd: this.colorEnd(), transitionDuration: this.transitionDuration(), locale: this.locale(), zoomGestures: this.zoomGestures(), zoomHintLabel: this.zoomHintLabel(), showBreadcrumb: this.showBreadcrumb(), breadcrumbLabel: this.breadcrumbLabel(), zoomOutLabel: this.zoomOutLabel(), metricUnitLabel: this.metricUnitLabel(), valueUnitLabel: this.valueUnitLabel(), loadingLabel: this.loadingLabel(), inputLabel: this.inputLabel(), tooltipFormatter: this.tooltipFormatter(), labelFormatter: this.labelFormatter(), loadChildren: this.loadChildren() }), idPrefix: 'bs-hierarchy-chart', outputs: { rootIdChange: this.rootidchange, zoom: this.zoom, nodeSelect: this.nodeselect, nodeHover: this.nodehover, nodeLoadError: this.nodeloaderror }, hostBag: (props) => ({ ...props.view.root, 'data-mps': 'hierarchy-chart' }), models: { rootId: this.rootId } });
|
|
78
|
+
/** The template's props. */
|
|
79
|
+
this.props = this.#core.props;
|
|
80
|
+
useScopedStyles('hierarchy-chart', hierarchyChartScopedStyles);
|
|
144
81
|
}
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
this.
|
|
148
|
-
this.zoom.emit(detail);
|
|
82
|
+
/** Re-root on a node id (the tree root when omitted). */
|
|
83
|
+
zoomTo(...args) {
|
|
84
|
+
return this.#core.call('zoomTo', args);
|
|
149
85
|
}
|
|
150
|
-
|
|
151
|
-
|
|
86
|
+
/** Move focus to a rendered node. */
|
|
87
|
+
focusNode(...args) {
|
|
88
|
+
return this.#core.call('focusNode', args);
|
|
152
89
|
}
|
|
153
|
-
|
|
154
|
-
|
|
90
|
+
/** Magnify geometrically, anchored at chart fractions (default: the centre). */
|
|
91
|
+
setZoomLevel(...args) {
|
|
92
|
+
return this.#core.call('setZoomLevel', args);
|
|
155
93
|
}
|
|
156
|
-
|
|
157
|
-
|
|
94
|
+
/** Back to the fitted view. */
|
|
95
|
+
resetZoom(...args) {
|
|
96
|
+
return this.#core.call('resetZoom', args);
|
|
97
|
+
}
|
|
98
|
+
/** The current geometric magnification (1 = fitted). */
|
|
99
|
+
zoomLevel(...args) {
|
|
100
|
+
return this.#core.call('zoomLevel', args);
|
|
158
101
|
}
|
|
159
102
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsHierarchyChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
160
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.
|
|
103
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: BsHierarchyChartComponent, isStandalone: true, selector: "bs-hierarchy-chart", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null }, rootId: { classPropertyName: "rootId", publicName: "rootId", isSignal: true, isRequired: false, transformFunction: null }, maxDepth: { classPropertyName: "maxDepth", publicName: "maxDepth", isSignal: true, isRequired: false, transformFunction: null }, minAngle: { classPropertyName: "minAngle", publicName: "minAngle", isSignal: true, isRequired: false, transformFunction: null }, minSize: { classPropertyName: "minSize", publicName: "minSize", isSignal: true, isRequired: false, transformFunction: null }, showLabels: { classPropertyName: "showLabels", publicName: "showLabels", isSignal: true, isRequired: false, transformFunction: null }, labelFontSize: { classPropertyName: "labelFontSize", publicName: "labelFontSize", isSignal: true, isRequired: false, transformFunction: null }, backdrop: { classPropertyName: "backdrop", publicName: "backdrop", isSignal: true, isRequired: false, transformFunction: null }, colorMin: { classPropertyName: "colorMin", publicName: "colorMin", isSignal: true, isRequired: false, transformFunction: null }, colorMax: { classPropertyName: "colorMax", publicName: "colorMax", isSignal: true, isRequired: false, transformFunction: null }, colorStart: { classPropertyName: "colorStart", publicName: "colorStart", isSignal: true, isRequired: false, transformFunction: null }, colorEnd: { classPropertyName: "colorEnd", publicName: "colorEnd", isSignal: true, isRequired: false, transformFunction: null }, transitionDuration: { classPropertyName: "transitionDuration", publicName: "transitionDuration", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, zoomGestures: { classPropertyName: "zoomGestures", publicName: "zoomGestures", isSignal: true, isRequired: false, transformFunction: null }, zoomHintLabel: { classPropertyName: "zoomHintLabel", publicName: "zoomHintLabel", isSignal: true, isRequired: false, transformFunction: null }, showBreadcrumb: { classPropertyName: "showBreadcrumb", publicName: "showBreadcrumb", isSignal: true, isRequired: false, transformFunction: null }, breadcrumbLabel: { classPropertyName: "breadcrumbLabel", publicName: "breadcrumbLabel", isSignal: true, isRequired: false, transformFunction: null }, zoomOutLabel: { classPropertyName: "zoomOutLabel", publicName: "zoomOutLabel", isSignal: true, isRequired: false, transformFunction: null }, metricUnitLabel: { classPropertyName: "metricUnitLabel", publicName: "metricUnitLabel", isSignal: true, isRequired: false, transformFunction: null }, valueUnitLabel: { classPropertyName: "valueUnitLabel", publicName: "valueUnitLabel", isSignal: true, isRequired: false, transformFunction: null }, loadingLabel: { classPropertyName: "loadingLabel", publicName: "loadingLabel", isSignal: true, isRequired: false, transformFunction: null }, inputLabel: { classPropertyName: "inputLabel", publicName: "inputLabel", isSignal: true, isRequired: false, transformFunction: null }, tooltipFormatter: { classPropertyName: "tooltipFormatter", publicName: "tooltipFormatter", isSignal: true, isRequired: false, transformFunction: null }, labelFormatter: { classPropertyName: "labelFormatter", publicName: "labelFormatter", isSignal: true, isRequired: false, transformFunction: null }, loadChildren: { classPropertyName: "loadChildren", publicName: "loadChildren", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { rootId: "rootIdChange", rootidchange: "rootidchange", zoom: "zoom", nodeselect: "nodeselect", nodehover: "nodehover", nodeloaderror: "nodeloaderror" }, ngImport: i0, template: "<!-- GENERATED from libs/mintplayer-ui-core/charts/hierarchy/src/templates/hierarchy-chart.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_view = props().view;\n@if (p_view.breadcrumb) {\n <nav data-mps=\"hierarchy-chart\" [mpProps]=\"p_view.breadcrumb.nav\">\n @for (c of p_view.breadcrumb.items; track c.key) {\n @if (c.current) {\n <span data-mps=\"hierarchy-chart\" [mpProps]=\"c.current\">\n {{ c.text }}\n </span>\n }\n @if (c.button) {\n <button data-mps=\"hierarchy-chart\" [mpProps]=\"c.button\">\n {{ c.text }}\n </button>\n }\n @if (c.sep) {\n <span data-mps=\"hierarchy-chart\" [mpProps]=\"c.sep\">\n /\n </span>\n }\n }\n </nav>\n}\n<div data-mps=\"hierarchy-chart\" [mpProps]=\"p_view.chart\" [style]=\"p_view.chartStyle\">\n @if (p_view.sunburst) {\n <svg data-mps=\"hierarchy-chart\" [mpProps]=\"p_view.sunburst.svg\">\n <g data-mps=\"hierarchy-chart\" [mpProps]=\"p_view.sunburst.g\">\n @for (a of p_view.sunburst.arcs; track a.key) {\n <path data-mps=\"hierarchy-chart\" [mpProps]=\"a.bag\"></path>\n }\n @for (l of p_view.sunburst.labels; track l.key) {\n <text data-mps=\"hierarchy-chart\" [mpProps]=\"l.bag\">\n {{ l.text }}\n </text>\n }\n </g>\n </svg>\n }\n @if (p_view.sunburst) {\n <button data-mps=\"hierarchy-chart\" [mpProps]=\"p_view.sunburst.center.bag\" [style]=\"p_view.sunburst.center.style\">\n {{ p_view.sunburst.center.text }}\n </button>\n }\n @if (p_view.icicle) {\n <div data-mps=\"hierarchy-chart\" [mpProps]=\"p_view.icicle.tree\">\n <div data-mps=\"hierarchy-chart\" [mpProps]=\"p_view.icicle.focus.bag\" [style]=\"p_view.icicle.focus.style\">\n @if (p_view.icicle.focus.label !== null) {\n <span data-mps=\"hierarchy-chart\" [mpProps]=\"p_view.cellLabel\">\n {{ p_view.icicle.focus.label }}\n </span>\n }\n </div>\n @for (c of p_view.icicle.cells; track c.key) {\n <div data-mps=\"hierarchy-chart\" [mpProps]=\"c.bag\" [style]=\"c.style\">\n @if (c.label !== null) {\n <span data-mps=\"hierarchy-chart\" [mpProps]=\"p_view.cellLabel\">\n {{ c.label }}\n </span>\n }\n </div>\n }\n </div>\n }\n @if (p_view.treemap) {\n <div data-mps=\"hierarchy-chart\" [mpProps]=\"p_view.treemap.wrap\">\n <button data-mps=\"hierarchy-chart\" [mpProps]=\"p_view.treemap.header.bag\">\n {{ p_view.treemap.header.text }}\n </button>\n <div data-mps=\"hierarchy-chart\" [mpProps]=\"p_view.treemap.body\">\n @for (c of p_view.treemap.cells; track c.key) {\n <div data-mps=\"hierarchy-chart\" [mpProps]=\"c.bag\" [style]=\"c.style\">\n @if (c.label !== null) {\n <span data-mps=\"hierarchy-chart\" [mpProps]=\"p_view.cellLabel\">\n {{ c.label }}\n </span>\n }\n </div>\n }\n </div>\n </div>\n }\n <div data-mps=\"hierarchy-chart\" [mpProps]=\"p_view.tooltip.bag\" [style]=\"p_view.tooltip.style\">\n {{ p_view.tooltip.text }}\n </div>\n @if (p_view.hint) {\n <div data-mps=\"hierarchy-chart\" [mpProps]=\"p_view.hint.bag\">\n {{ p_view.hint.text }}\n </div>\n }\n <div data-mps=\"hierarchy-chart\" [mpProps]=\"p_view.live\">\n {{ p_view.announcement }}\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: MpPropsDirective, selector: "[mpProps]", inputs: ["mpProps"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
161
104
|
}
|
|
162
105
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsHierarchyChartComponent, decorators: [{
|
|
163
106
|
type: Component,
|
|
164
|
-
args: [{ selector: 'bs-hierarchy-chart', imports: [
|
|
165
|
-
}], ctorParameters: () => [], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], layout: [{ type: i0.Input, args: [{ isSignal: true, alias: "layout", required: false }] }], rootId: [{ type: i0.Input, args: [{ isSignal: true, alias: "rootId", required: false }] }, { type: i0.Output, args: ["rootIdChange"] }], maxDepth: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDepth", required: false }] }], minAngle: [{ type: i0.Input, args: [{ isSignal: true, alias: "minAngle", required: false }] }], minSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "minSize", required: false }] }], showLabels: [{ type: i0.Input, args: [{ isSignal: true, alias: "showLabels", required: false }] }], labelFontSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelFontSize", required: false }] }], backdrop: [{ type: i0.Input, args: [{ isSignal: true, alias: "backdrop", required: false }] }],
|
|
107
|
+
args: [{ selector: 'bs-hierarchy-chart', imports: [MpPropsDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- GENERATED from libs/mintplayer-ui-core/charts/hierarchy/src/templates/hierarchy-chart.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_view = props().view;\n@if (p_view.breadcrumb) {\n <nav data-mps=\"hierarchy-chart\" [mpProps]=\"p_view.breadcrumb.nav\">\n @for (c of p_view.breadcrumb.items; track c.key) {\n @if (c.current) {\n <span data-mps=\"hierarchy-chart\" [mpProps]=\"c.current\">\n {{ c.text }}\n </span>\n }\n @if (c.button) {\n <button data-mps=\"hierarchy-chart\" [mpProps]=\"c.button\">\n {{ c.text }}\n </button>\n }\n @if (c.sep) {\n <span data-mps=\"hierarchy-chart\" [mpProps]=\"c.sep\">\n /\n </span>\n }\n }\n </nav>\n}\n<div data-mps=\"hierarchy-chart\" [mpProps]=\"p_view.chart\" [style]=\"p_view.chartStyle\">\n @if (p_view.sunburst) {\n <svg data-mps=\"hierarchy-chart\" [mpProps]=\"p_view.sunburst.svg\">\n <g data-mps=\"hierarchy-chart\" [mpProps]=\"p_view.sunburst.g\">\n @for (a of p_view.sunburst.arcs; track a.key) {\n <path data-mps=\"hierarchy-chart\" [mpProps]=\"a.bag\"></path>\n }\n @for (l of p_view.sunburst.labels; track l.key) {\n <text data-mps=\"hierarchy-chart\" [mpProps]=\"l.bag\">\n {{ l.text }}\n </text>\n }\n </g>\n </svg>\n }\n @if (p_view.sunburst) {\n <button data-mps=\"hierarchy-chart\" [mpProps]=\"p_view.sunburst.center.bag\" [style]=\"p_view.sunburst.center.style\">\n {{ p_view.sunburst.center.text }}\n </button>\n }\n @if (p_view.icicle) {\n <div data-mps=\"hierarchy-chart\" [mpProps]=\"p_view.icicle.tree\">\n <div data-mps=\"hierarchy-chart\" [mpProps]=\"p_view.icicle.focus.bag\" [style]=\"p_view.icicle.focus.style\">\n @if (p_view.icicle.focus.label !== null) {\n <span data-mps=\"hierarchy-chart\" [mpProps]=\"p_view.cellLabel\">\n {{ p_view.icicle.focus.label }}\n </span>\n }\n </div>\n @for (c of p_view.icicle.cells; track c.key) {\n <div data-mps=\"hierarchy-chart\" [mpProps]=\"c.bag\" [style]=\"c.style\">\n @if (c.label !== null) {\n <span data-mps=\"hierarchy-chart\" [mpProps]=\"p_view.cellLabel\">\n {{ c.label }}\n </span>\n }\n </div>\n }\n </div>\n }\n @if (p_view.treemap) {\n <div data-mps=\"hierarchy-chart\" [mpProps]=\"p_view.treemap.wrap\">\n <button data-mps=\"hierarchy-chart\" [mpProps]=\"p_view.treemap.header.bag\">\n {{ p_view.treemap.header.text }}\n </button>\n <div data-mps=\"hierarchy-chart\" [mpProps]=\"p_view.treemap.body\">\n @for (c of p_view.treemap.cells; track c.key) {\n <div data-mps=\"hierarchy-chart\" [mpProps]=\"c.bag\" [style]=\"c.style\">\n @if (c.label !== null) {\n <span data-mps=\"hierarchy-chart\" [mpProps]=\"p_view.cellLabel\">\n {{ c.label }}\n </span>\n }\n </div>\n }\n </div>\n </div>\n }\n <div data-mps=\"hierarchy-chart\" [mpProps]=\"p_view.tooltip.bag\" [style]=\"p_view.tooltip.style\">\n {{ p_view.tooltip.text }}\n </div>\n @if (p_view.hint) {\n <div data-mps=\"hierarchy-chart\" [mpProps]=\"p_view.hint.bag\">\n {{ p_view.hint.text }}\n </div>\n }\n <div data-mps=\"hierarchy-chart\" [mpProps]=\"p_view.live\">\n {{ p_view.announcement }}\n </div>\n</div>\n" }]
|
|
108
|
+
}], ctorParameters: () => [], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], layout: [{ type: i0.Input, args: [{ isSignal: true, alias: "layout", required: false }] }], rootId: [{ type: i0.Input, args: [{ isSignal: true, alias: "rootId", required: false }] }, { type: i0.Output, args: ["rootIdChange"] }], maxDepth: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDepth", required: false }] }], minAngle: [{ type: i0.Input, args: [{ isSignal: true, alias: "minAngle", required: false }] }], minSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "minSize", required: false }] }], showLabels: [{ type: i0.Input, args: [{ isSignal: true, alias: "showLabels", required: false }] }], labelFontSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelFontSize", required: false }] }], backdrop: [{ type: i0.Input, args: [{ isSignal: true, alias: "backdrop", required: false }] }], colorMin: [{ type: i0.Input, args: [{ isSignal: true, alias: "colorMin", required: false }] }], colorMax: [{ type: i0.Input, args: [{ isSignal: true, alias: "colorMax", required: false }] }], colorStart: [{ type: i0.Input, args: [{ isSignal: true, alias: "colorStart", required: false }] }], colorEnd: [{ type: i0.Input, args: [{ isSignal: true, alias: "colorEnd", required: false }] }], transitionDuration: [{ type: i0.Input, args: [{ isSignal: true, alias: "transitionDuration", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], zoomGestures: [{ type: i0.Input, args: [{ isSignal: true, alias: "zoomGestures", required: false }] }], zoomHintLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "zoomHintLabel", required: false }] }], showBreadcrumb: [{ type: i0.Input, args: [{ isSignal: true, alias: "showBreadcrumb", required: false }] }], breadcrumbLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "breadcrumbLabel", required: false }] }], zoomOutLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "zoomOutLabel", required: false }] }], metricUnitLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "metricUnitLabel", required: false }] }], valueUnitLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueUnitLabel", required: false }] }], loadingLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingLabel", required: false }] }], inputLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputLabel", required: false }] }], tooltipFormatter: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipFormatter", required: false }] }], labelFormatter: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelFormatter", required: false }] }], loadChildren: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadChildren", required: false }] }], rootidchange: [{ type: i0.Output, args: ["rootidchange"] }], zoom: [{ type: i0.Output, args: ["zoom"] }], nodeselect: [{ type: i0.Output, args: ["nodeselect"] }], nodehover: [{ type: i0.Output, args: ["nodehover"] }], nodeloaderror: [{ type: i0.Output, args: ["nodeloaderror"] }] } });
|
|
109
|
+
|
|
110
|
+
// GENERATED from the charts/hierarchy manifest by @mintplayer/nx-component-compiler. Do not edit.
|
|
111
|
+
|
|
112
|
+
// The hierarchy chart is generated from @mintplayer/ui-core/charts/hierarchy (PRD #437 D10).
|
|
166
113
|
|
|
167
114
|
/**
|
|
168
115
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintplayer-ng-bootstrap-charts-hierarchy.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/charts/hierarchy/src/hierarchy-chart/hierarchy-chart.component.ts","../../../../libs/mintplayer-ng-bootstrap/charts/hierarchy/src/hierarchy-chart/hierarchy-chart.component.html","../../../../libs/mintplayer-ng-bootstrap/charts/hierarchy/mintplayer-ng-bootstrap-charts-hierarchy.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n CUSTOM_ELEMENTS_SCHEMA,\n effect,\n ElementRef,\n input,\n model,\n output,\n viewChild,\n} from '@angular/core';\nimport {\n MpHierarchyChart,\n type HierarchyChartLayout,\n type HierarchyChildrenLoader,\n type HierarchyHoverEventDetail,\n type HierarchyLoadErrorEventDetail,\n type HierarchyNode,\n type HierarchyNodeEventDetail,\n type HierarchyNodeFormatter,\n} from '@mintplayer/web-components/charts/hierarchy';\n\n// Side-effect import: registers the `<mp-hierarchy-chart>` custom element.\nimport '@mintplayer/web-components/charts/hierarchy';\n\nimport { BsForwardAriaDirective } from '@mintplayer/ng-bootstrap/a11y';\n\n@Component({\n selector: 'bs-hierarchy-chart',\n templateUrl: './hierarchy-chart.component.html',\n styleUrls: ['./hierarchy-chart.component.scss'],\n imports: [BsForwardAriaDirective],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsHierarchyChartComponent {\n readonly data = input<HierarchyNode | undefined>(undefined);\n readonly layout = input<HierarchyChartLayout>('sunburst');\n readonly rootId = model<string | undefined>(undefined);\n /**\n * Levels rendered outward from the focus, or `'auto'` for every loaded level.\n * Unset leaves the element's own default: `'auto'`, or a 2-level window when\n * a `loadChildren` loader is bound.\n */\n readonly maxDepth = input<number | 'auto' | undefined>(undefined);\n readonly minAngle = input<number>(0.2);\n readonly minSize = input<number>(4);\n readonly showLabels = input<boolean>(true);\n /** Label font size in device px, constant across host size and zoom. */\n readonly labelFontSize = input<number>(12);\n /** Opaque color behind the chart for label contrast; unset = auto-detected. */\n readonly backdrop = input<string | undefined>(undefined);\n /** Gesture allowlist for the geometric zoom: 'wheel pinch' | 'wheel' | 'pinch' | 'none'. */\n readonly zoomGestures = input<string>('wheel pinch');\n readonly zoomHintLabel = input<string | undefined>(undefined);\n /** Renders the focus path as buttons above the chart. */\n readonly showBreadcrumb = input<boolean>(false);\n readonly breadcrumbLabel = input<string | undefined>(undefined);\n readonly colorMin = input<number>(0);\n readonly colorMax = input<number>(100);\n readonly colorStart = input<string>('#fe0000');\n readonly colorEnd = input<string>('#21b577');\n readonly transitionDuration = input<number>(300);\n readonly locale = input<string | undefined>(undefined);\n readonly inputLabel = input<string | undefined>(undefined);\n readonly zoomOutLabel = input<string | undefined>(undefined);\n readonly metricUnitLabel = input<string | undefined>(undefined);\n readonly valueUnitLabel = input<string | undefined>(undefined);\n readonly loadingLabel = input<string | undefined>(undefined);\n readonly tooltipFormatter = input<HierarchyNodeFormatter | undefined>(undefined);\n readonly labelFormatter = input<HierarchyNodeFormatter | undefined>(undefined);\n readonly loadChildren = input<HierarchyChildrenLoader | undefined>(undefined);\n\n readonly zoom = output<HierarchyNodeEventDetail>();\n readonly nodeSelect = output<HierarchyNodeEventDetail>();\n readonly nodeHover = output<HierarchyHoverEventDetail>();\n readonly nodeLoadError = output<HierarchyLoadErrorEventDetail>();\n\n readonly chartRef = viewChild.required<ElementRef<MpHierarchyChart>>('chart');\n\n constructor() {\n // One effect per input, deliberately: a `data` write must not re-fire on\n // every zoom tick and vice versa.\n effect(() => { const el = this.chartRef().nativeElement; el.data = this.data(); });\n effect(() => { const el = this.chartRef().nativeElement; el.layout = this.layout(); });\n effect(() => { const el = this.chartRef().nativeElement; el.rootId = this.rootId(); });\n effect(() => {\n const el = this.chartRef().nativeElement;\n const depth = this.maxDepth();\n if (depth !== undefined) el.maxDepth = depth;\n });\n effect(() => { const el = this.chartRef().nativeElement; el.minAngle = this.minAngle(); });\n effect(() => { const el = this.chartRef().nativeElement; el.minSize = this.minSize(); });\n effect(() => { const el = this.chartRef().nativeElement; el.showLabels = this.showLabels(); });\n effect(() => { const el = this.chartRef().nativeElement; el.labelFontSize = this.labelFontSize(); });\n effect(() => { const el = this.chartRef().nativeElement; el.backdrop = this.backdrop(); });\n effect(() => { const el = this.chartRef().nativeElement; el.zoomGestures = this.zoomGestures(); });\n effect(() => {\n const el = this.chartRef().nativeElement;\n const label = this.zoomHintLabel();\n if (label !== undefined) el.zoomHintLabel = label;\n });\n effect(() => { const el = this.chartRef().nativeElement; el.showBreadcrumb = this.showBreadcrumb(); });\n effect(() => {\n const el = this.chartRef().nativeElement;\n const label = this.breadcrumbLabel();\n if (label !== undefined) el.breadcrumbLabel = label;\n });\n effect(() => { const el = this.chartRef().nativeElement; el.colorMin = this.colorMin(); });\n effect(() => { const el = this.chartRef().nativeElement; el.colorMax = this.colorMax(); });\n effect(() => { const el = this.chartRef().nativeElement; el.colorStart = this.colorStart(); });\n effect(() => { const el = this.chartRef().nativeElement; el.colorEnd = this.colorEnd(); });\n effect(() => { const el = this.chartRef().nativeElement; el.transitionDuration = this.transitionDuration(); });\n effect(() => { const el = this.chartRef().nativeElement; el.locale = this.locale(); });\n effect(() => {\n const el = this.chartRef().nativeElement;\n el.inputLabel = this.inputLabel() ?? null;\n });\n effect(() => {\n const el = this.chartRef().nativeElement;\n const label = this.zoomOutLabel();\n if (label !== undefined) el.zoomOutLabel = label;\n });\n effect(() => {\n const el = this.chartRef().nativeElement;\n const label = this.metricUnitLabel();\n if (label !== undefined) el.metricUnitLabel = label;\n });\n effect(() => {\n const el = this.chartRef().nativeElement;\n const label = this.valueUnitLabel();\n if (label !== undefined) el.valueUnitLabel = label;\n });\n effect(() => {\n const el = this.chartRef().nativeElement;\n const label = this.loadingLabel();\n if (label !== undefined) el.loadingLabel = label;\n });\n effect(() => { const el = this.chartRef().nativeElement; el.tooltipFormatter = this.tooltipFormatter(); });\n effect(() => { const el = this.chartRef().nativeElement; el.labelFormatter = this.labelFormatter(); });\n effect(() => { const el = this.chartRef().nativeElement; el.loadChildren = this.loadChildren(); });\n }\n\n protected onZoom(event: Event): void {\n const detail = (event as CustomEvent<HierarchyNodeEventDetail>).detail;\n this.rootId.set((event.target as MpHierarchyChart).rootId);\n this.zoom.emit(detail);\n }\n\n protected onNodeSelect(event: Event): void {\n this.nodeSelect.emit((event as CustomEvent<HierarchyNodeEventDetail>).detail);\n }\n\n protected onNodeHover(event: Event): void {\n this.nodeHover.emit((event as CustomEvent<HierarchyHoverEventDetail>).detail);\n }\n\n protected onNodeLoadError(event: Event): void {\n this.nodeLoadError.emit((event as CustomEvent<HierarchyLoadErrorEventDetail>).detail);\n }\n}\n","<mp-hierarchy-chart bsForwardAria\n #chart\n class=\"bs-hierarchy-chart\"\n (hierarchy-zoom)=\"onZoom($event)\"\n (hierarchy-node-select)=\"onNodeSelect($event)\"\n (hierarchy-node-hover)=\"onNodeHover($event)\"\n (hierarchy-node-load-error)=\"onNodeLoadError($event)\"\n></mp-hierarchy-chart>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAmCa,yBAAyB,CAAA;AA6CpC,IAAA,WAAA,GAAA;QA5CS,IAAA,CAAA,IAAI,GAAG,KAAK,CAA4B,SAAS;iFAAC;QAClD,IAAA,CAAA,MAAM,GAAG,KAAK,CAAuB,UAAU;mFAAC;QAChD,IAAA,CAAA,MAAM,GAAG,KAAK,CAAqB,SAAS;mFAAC;AACtD;;;;AAIG;QACM,IAAA,CAAA,QAAQ,GAAG,KAAK,CAA8B,SAAS;qFAAC;QACxD,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAS,GAAG;qFAAC;QAC7B,IAAA,CAAA,OAAO,GAAG,KAAK,CAAS,CAAC;oFAAC;QAC1B,IAAA,CAAA,UAAU,GAAG,KAAK,CAAU,IAAI;uFAAC;;QAEjC,IAAA,CAAA,aAAa,GAAG,KAAK,CAAS,EAAE;0FAAC;;QAEjC,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AA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,MAAA,EAAA,cAAA,EAAA,IAAA,EAAA,MAAA,EAAA,UAAA,EAAA,YAAA,EAAA,SAAA,EAAA,WAAA,EAAA,aAAA,EAAA,eAAA,EAAA,EAAA,WAAA,EAAA,CAAA,EAAA,YAAA,EAAA,UAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,OAAA,CAAA,EAAA,WAAA,EAAA,IAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECnCtC,+SAQA,EAAA,MAAA,EAAA,CAAA,wBAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDuBY,sBAAsB,EAAA,QAAA,EAAA,iBAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAIrB,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBARrC,SAAS;+BACE,oBAAoB,EAAA,OAAA,EAGrB,CAAC,sBAAsB,CAAC,EAAA,OAAA,EACxB,CAAC,sBAAsB,CAAC,EAAA,eAAA,EAChB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,+SAAA,EAAA,MAAA,EAAA,CAAA,wBAAA,CAAA,EAAA;uhGA6CsB,OAAO,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE9E9E;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-charts-hierarchy.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/charts/hierarchy/src/generated/hierarchy-chart.component.generated.ts","../../../../libs/mintplayer-ng-bootstrap/charts/hierarchy/src/generated/hierarchy-chart.view.generated.html","../../../../libs/mintplayer-ng-bootstrap/charts/hierarchy/src/generated/index.ts","../../../../libs/mintplayer-ng-bootstrap/charts/hierarchy/src/index.ts","../../../../libs/mintplayer-ng-bootstrap/charts/hierarchy/mintplayer-ng-bootstrap-charts-hierarchy.ts"],"sourcesContent":["// GENERATED from the charts/hierarchy manifest (hierarchy-chart) by @mintplayer/nx-component-compiler. Do not edit.\nimport { ChangeDetectionStrategy, Component, ElementRef, booleanAttribute, inject, input, model, numberAttribute, output } from '@angular/core';\nimport { MpPropsDirective, useCore, useScopedStyles } from '@mintplayer/ng-bootstrap/machine';\nimport { hierarchyChartCore, type HierarchyChartInputs, type HierarchyChartMethods, hierarchyChartScopedStyles, type HierarchyHoverEventDetail, type HierarchyLoadErrorEventDetail, type HierarchyNodeEventDetail } from '@mintplayer/ui-core/charts/hierarchy';\n\n/**\n * One weighted tree, three projections: `layout` is sunburst, icicle or treemap.\n *\n * Size follows the summed leaf `value`, colour follows `colorValue`. Click, Enter or a breadcrumb re-roots\n * on a node (two-way `rootId`); ctrl/cmd+wheel, pinch and `+` / `-` / `0` magnify it geometrically.\n * Every node is a treeitem: arrows move between siblings (Down goes outward), Escape and Backspace zoom out.\n * The server renders the finished chart at a 420px fallback scale, its controls inert until it is live.\n */\n@Component({\n selector: 'bs-hierarchy-chart',\n templateUrl: './hierarchy-chart.view.generated.html',\n imports: [MpPropsDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsHierarchyChartComponent {\n /** The host element. */\n readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n readonly data = input<HierarchyChartInputs['data']>(null);\n readonly layout = input<HierarchyChartInputs['layout']>('sunburst');\n readonly rootId = model<HierarchyChartInputs['rootId']>(null);\n /** A positive number, or `auto`. */\n readonly maxDepth = input<HierarchyChartInputs['maxDepth']>(null);\n readonly minAngle = input<HierarchyChartInputs['minAngle'], unknown>(0.2, { transform: (v: unknown) => numberAttribute(v) as HierarchyChartInputs['minAngle'] });\n readonly minSize = input<HierarchyChartInputs['minSize'], unknown>(4, { transform: (v: unknown) => numberAttribute(v) as HierarchyChartInputs['minSize'] });\n readonly showLabels = input<HierarchyChartInputs['showLabels'], unknown>(true, { transform: booleanAttribute });\n readonly labelFontSize = input<HierarchyChartInputs['labelFontSize'], unknown>(12, { transform: (v: unknown) => numberAttribute(v) as HierarchyChartInputs['labelFontSize'] });\n readonly backdrop = input<HierarchyChartInputs['backdrop']>(null);\n readonly colorMin = input<HierarchyChartInputs['colorMin'], unknown>(0, { transform: (v: unknown) => numberAttribute(v) as HierarchyChartInputs['colorMin'] });\n readonly colorMax = input<HierarchyChartInputs['colorMax'], unknown>(100, { transform: (v: unknown) => numberAttribute(v) as HierarchyChartInputs['colorMax'] });\n readonly colorStart = input<HierarchyChartInputs['colorStart']>('#fe0000');\n readonly colorEnd = input<HierarchyChartInputs['colorEnd']>('#21b577');\n readonly transitionDuration = input<HierarchyChartInputs['transitionDuration'], unknown>(300, { transform: (v: unknown) => numberAttribute(v) as HierarchyChartInputs['transitionDuration'] });\n readonly locale = input<HierarchyChartInputs['locale']>(null);\n readonly zoomGestures = input<HierarchyChartInputs['zoomGestures']>('wheel pinch');\n readonly zoomHintLabel = input<HierarchyChartInputs['zoomHintLabel']>(null);\n readonly showBreadcrumb = input<HierarchyChartInputs['showBreadcrumb'], unknown>(false, { transform: booleanAttribute });\n readonly breadcrumbLabel = input<HierarchyChartInputs['breadcrumbLabel']>('Chart path');\n readonly zoomOutLabel = input<HierarchyChartInputs['zoomOutLabel']>('Zoom out one level');\n readonly metricUnitLabel = input<HierarchyChartInputs['metricUnitLabel']>('%');\n readonly valueUnitLabel = input<HierarchyChartInputs['valueUnitLabel']>('');\n readonly loadingLabel = input<HierarchyChartInputs['loadingLabel']>('Loading');\n readonly inputLabel = input<HierarchyChartInputs['inputLabel']>(null);\n readonly tooltipFormatter = input<HierarchyChartInputs['tooltipFormatter']>(null);\n readonly labelFormatter = input<HierarchyChartInputs['labelFormatter']>(null);\n readonly loadChildren = input<HierarchyChartInputs['loadChildren']>(null);\n /** The focus node changed (null: the tree root). */\n readonly rootidchange = output<string | null>();\n /** The chart re-rooted on a node; the detail has its path. */\n readonly zoom = output<HierarchyNodeEventDetail>();\n /** A leaf was clicked or activated with Enter. */\n readonly nodeselect = output<HierarchyNodeEventDetail>();\n /** The hovered node changed (`node` null when the pointer leaves). */\n readonly nodehover = output<HierarchyHoverEventDetail>();\n /** A lazy `loadChildren` call rejected; activating the node retries. */\n readonly nodeloaderror = output<HierarchyLoadErrorEventDetail>();\n\n readonly #core = useCore(hierarchyChartCore, { inputs: () => ({ data: this.data(), layout: this.layout(), rootId: this.rootId(), maxDepth: this.maxDepth(), minAngle: this.minAngle(), minSize: this.minSize(), showLabels: this.showLabels(), labelFontSize: this.labelFontSize(), backdrop: this.backdrop(), colorMin: this.colorMin(), colorMax: this.colorMax(), colorStart: this.colorStart(), colorEnd: this.colorEnd(), transitionDuration: this.transitionDuration(), locale: this.locale(), zoomGestures: this.zoomGestures(), zoomHintLabel: this.zoomHintLabel(), showBreadcrumb: this.showBreadcrumb(), breadcrumbLabel: this.breadcrumbLabel(), zoomOutLabel: this.zoomOutLabel(), metricUnitLabel: this.metricUnitLabel(), valueUnitLabel: this.valueUnitLabel(), loadingLabel: this.loadingLabel(), inputLabel: this.inputLabel(), tooltipFormatter: this.tooltipFormatter(), labelFormatter: this.labelFormatter(), loadChildren: this.loadChildren() }), idPrefix: 'bs-hierarchy-chart', outputs: { rootIdChange: this.rootidchange, zoom: this.zoom, nodeSelect: this.nodeselect, nodeHover: this.nodehover, nodeLoadError: this.nodeloaderror }, hostBag: (props) => ({ ...props.view.root, 'data-mps': 'hierarchy-chart' }), models: { rootId: this.rootId } });\n /** The template's props. */\n protected readonly props = this.#core.props;\n\n constructor() {\n useScopedStyles('hierarchy-chart', hierarchyChartScopedStyles);\n }\n\n /** Re-root on a node id (the tree root when omitted). */\n zoomTo(...args: Parameters<HierarchyChartMethods['zoomTo']>): ReturnType<HierarchyChartMethods['zoomTo']> {\n return this.#core.call('zoomTo', args) as ReturnType<HierarchyChartMethods['zoomTo']>;\n }\n\n /** Move focus to a rendered node. */\n focusNode(...args: Parameters<HierarchyChartMethods['focusNode']>): ReturnType<HierarchyChartMethods['focusNode']> {\n return this.#core.call('focusNode', args) as ReturnType<HierarchyChartMethods['focusNode']>;\n }\n\n /** Magnify geometrically, anchored at chart fractions (default: the centre). */\n setZoomLevel(...args: Parameters<HierarchyChartMethods['setZoomLevel']>): ReturnType<HierarchyChartMethods['setZoomLevel']> {\n return this.#core.call('setZoomLevel', args) as ReturnType<HierarchyChartMethods['setZoomLevel']>;\n }\n\n /** Back to the fitted view. */\n resetZoom(...args: Parameters<HierarchyChartMethods['resetZoom']>): ReturnType<HierarchyChartMethods['resetZoom']> {\n return this.#core.call('resetZoom', args) as ReturnType<HierarchyChartMethods['resetZoom']>;\n }\n\n /** The current geometric magnification (1 = fitted). */\n zoomLevel(...args: Parameters<HierarchyChartMethods['zoomLevel']>): ReturnType<HierarchyChartMethods['zoomLevel']> {\n return this.#core.call('zoomLevel', args) as ReturnType<HierarchyChartMethods['zoomLevel']>;\n }\n}\n","<!-- GENERATED from libs/mintplayer-ui-core/charts/hierarchy/src/templates/hierarchy-chart.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_view = props().view;\n@if (p_view.breadcrumb) {\n <nav data-mps=\"hierarchy-chart\" [mpProps]=\"p_view.breadcrumb.nav\">\n @for (c of p_view.breadcrumb.items; track c.key) {\n @if (c.current) {\n <span data-mps=\"hierarchy-chart\" [mpProps]=\"c.current\">\n {{ c.text }}\n </span>\n }\n @if (c.button) {\n <button data-mps=\"hierarchy-chart\" [mpProps]=\"c.button\">\n {{ c.text }}\n </button>\n }\n @if (c.sep) {\n <span data-mps=\"hierarchy-chart\" [mpProps]=\"c.sep\">\n /\n </span>\n }\n }\n </nav>\n}\n<div data-mps=\"hierarchy-chart\" [mpProps]=\"p_view.chart\" [style]=\"p_view.chartStyle\">\n @if (p_view.sunburst) {\n <svg data-mps=\"hierarchy-chart\" [mpProps]=\"p_view.sunburst.svg\">\n <g data-mps=\"hierarchy-chart\" [mpProps]=\"p_view.sunburst.g\">\n @for (a of p_view.sunburst.arcs; track a.key) {\n <path data-mps=\"hierarchy-chart\" [mpProps]=\"a.bag\"></path>\n }\n @for (l of p_view.sunburst.labels; track l.key) {\n <text data-mps=\"hierarchy-chart\" [mpProps]=\"l.bag\">\n {{ l.text }}\n </text>\n }\n </g>\n </svg>\n }\n @if (p_view.sunburst) {\n <button data-mps=\"hierarchy-chart\" [mpProps]=\"p_view.sunburst.center.bag\" [style]=\"p_view.sunburst.center.style\">\n {{ p_view.sunburst.center.text }}\n </button>\n }\n @if (p_view.icicle) {\n <div data-mps=\"hierarchy-chart\" [mpProps]=\"p_view.icicle.tree\">\n <div data-mps=\"hierarchy-chart\" [mpProps]=\"p_view.icicle.focus.bag\" [style]=\"p_view.icicle.focus.style\">\n @if (p_view.icicle.focus.label !== null) {\n <span data-mps=\"hierarchy-chart\" [mpProps]=\"p_view.cellLabel\">\n {{ p_view.icicle.focus.label }}\n </span>\n }\n </div>\n @for (c of p_view.icicle.cells; track c.key) {\n <div data-mps=\"hierarchy-chart\" [mpProps]=\"c.bag\" [style]=\"c.style\">\n @if (c.label !== null) {\n <span data-mps=\"hierarchy-chart\" [mpProps]=\"p_view.cellLabel\">\n {{ c.label }}\n </span>\n }\n </div>\n }\n </div>\n }\n @if (p_view.treemap) {\n <div data-mps=\"hierarchy-chart\" [mpProps]=\"p_view.treemap.wrap\">\n <button data-mps=\"hierarchy-chart\" [mpProps]=\"p_view.treemap.header.bag\">\n {{ p_view.treemap.header.text }}\n </button>\n <div data-mps=\"hierarchy-chart\" [mpProps]=\"p_view.treemap.body\">\n @for (c of p_view.treemap.cells; track c.key) {\n <div data-mps=\"hierarchy-chart\" [mpProps]=\"c.bag\" [style]=\"c.style\">\n @if (c.label !== null) {\n <span data-mps=\"hierarchy-chart\" [mpProps]=\"p_view.cellLabel\">\n {{ c.label }}\n </span>\n }\n </div>\n }\n </div>\n </div>\n }\n <div data-mps=\"hierarchy-chart\" [mpProps]=\"p_view.tooltip.bag\" [style]=\"p_view.tooltip.style\">\n {{ p_view.tooltip.text }}\n </div>\n @if (p_view.hint) {\n <div data-mps=\"hierarchy-chart\" [mpProps]=\"p_view.hint.bag\">\n {{ p_view.hint.text }}\n </div>\n }\n <div data-mps=\"hierarchy-chart\" [mpProps]=\"p_view.live\">\n {{ p_view.announcement }}\n </div>\n</div>\n","// GENERATED from the charts/hierarchy manifest by @mintplayer/nx-component-compiler. Do not edit.\nexport { BsHierarchyChartComponent } from './hierarchy-chart.component.generated';\n","// The hierarchy chart is generated from @mintplayer/ui-core/charts/hierarchy (PRD #437 D10).\nexport * from './generated';\nexport type {\n HierarchyChartLayout,\n HierarchyChildrenLoader,\n HierarchyHoverEventDetail,\n HierarchyLoadErrorEventDetail,\n HierarchyNode,\n HierarchyNodeEventDetail,\n HierarchyNodeFormatter,\n} from '@mintplayer/ui-core/charts/hierarchy';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAAA;AAKA;;;;;;;AAOG;MAOU,yBAAyB,CAAA;AA2C3B,IAAA,KAAK;AAId,IAAA,WAAA,GAAA;;AA7CS,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAA0B,UAAU,CAAC;QAExD,IAAA,CAAA,IAAI,GAAG,KAAK,CAA+B,IAAI;iFAAC;QAChD,IAAA,CAAA,MAAM,GAAG,KAAK,CAAiC,UAAU;mFAAC;QAC1D,IAAA,CAAA,MAAM,GAAG,KAAK,CAAiC,IAAI;mFAAC;;QAEpD,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAmC,IAAI;qFAAC;AACxD,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAA4C,GAAG,EAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,UAAA,EAAA,8BAAA,EAAA,CAAA,EAAI,SAA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AA,EAAA,EAAA,cAAA,EAAA,EAAA,iBAAA,EAAA,gBAAA,EAAA,UAAA,EAAA,gBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,YAAA,EAAA,EAAA,iBAAA,EAAA,cAAA,EAAA,UAAA,EAAA,cAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,MAAA,EAAA,cAAA,EAAA,YAAA,EAAA,cAAA,EAAA,IAAA,EAAA,MAAA,EAAA,UAAA,EAAA,YAAA,EAAA,SAAA,EAAA,WAAA,EAAA,aAAA,EAAA,eAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECnBtC,27GA6FA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,ED7EY,gBAAgB,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAGf,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBANrC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,oBAAoB,WAErB,CAAC,gBAAgB,CAAC,EAAA,eAAA,EACV,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,27GAAA,EAAA;;;AEjBjD;;ACAA;;ACAA;;AAEG;;;;"}
|
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
3
|
-
import '@mintplayer/
|
|
4
|
-
import {
|
|
2
|
+
import { inject, ElementRef, LOCALE_ID, input, computed, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { connectSparkline, SPARKLINE_SCOPE, sparklineScopedStyles } from '@mintplayer/ui-core/charts/sparkline';
|
|
4
|
+
import { takeHostAria } from '@mintplayer/ng-bootstrap/a11y';
|
|
5
|
+
import { useScopedStyles, MpPropsDirective } from '@mintplayer/ng-bootstrap/machine';
|
|
5
6
|
|
|
7
|
+
/**
|
|
8
|
+
* An axis-less inline trend for table cells (#437), rendered by this
|
|
9
|
+
* component's own template from `@mintplayer/ui-core/charts/sparkline`, so the
|
|
10
|
+
* server HTML is the finished chart. `<bs-sparkline>` is the sized box; the
|
|
11
|
+
* `role="img"` svg inside is named by `inputLabel`, the host's `aria-label`,
|
|
12
|
+
* `summaryFormatter`, or the generated "first, last, lowest, highest".
|
|
13
|
+
*/
|
|
6
14
|
class BsSparklineComponent {
|
|
7
15
|
constructor() {
|
|
16
|
+
this.hostAria = takeHostAria(inject(ElementRef).nativeElement);
|
|
17
|
+
this.localeId = inject(LOCALE_ID);
|
|
8
18
|
this.points = input([], /* @ts-ignore */
|
|
9
19
|
...(ngDevMode ? [{ debugName: "points" }] : /* istanbul ignore next */ []));
|
|
10
20
|
this.area = input(false, /* @ts-ignore */
|
|
@@ -15,33 +25,35 @@ class BsSparklineComponent {
|
|
|
15
25
|
...(ngDevMode ? [{ debugName: "yMin" }] : /* istanbul ignore next */ []));
|
|
16
26
|
this.yMax = input(undefined, /* @ts-ignore */
|
|
17
27
|
...(ngDevMode ? [{ debugName: "yMax" }] : /* istanbul ignore next */ []));
|
|
28
|
+
/** Number formatting for the generated name. Defaults to the app's `LOCALE_ID`. */
|
|
18
29
|
this.locale = input(undefined, /* @ts-ignore */
|
|
19
30
|
...(ngDevMode ? [{ debugName: "locale" }] : /* istanbul ignore next */ []));
|
|
20
31
|
this.inputLabel = input(undefined, /* @ts-ignore */
|
|
21
32
|
...(ngDevMode ? [{ debugName: "inputLabel" }] : /* istanbul ignore next */ []));
|
|
22
33
|
this.summaryFormatter = input(undefined, /* @ts-ignore */
|
|
23
34
|
...(ngDevMode ? [{ debugName: "summaryFormatter" }] : /* istanbul ignore next */ []));
|
|
24
|
-
this.
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
});
|
|
36
|
-
effect(() => { const el = this.sparklineRef().nativeElement; el.summaryFormatter = this.summaryFormatter(); });
|
|
35
|
+
this.view = computed(() => connectSparkline(this.points(), {
|
|
36
|
+
area: this.area(),
|
|
37
|
+
showLastDot: this.showLastDot(),
|
|
38
|
+
yMin: this.yMin(),
|
|
39
|
+
yMax: this.yMax(),
|
|
40
|
+
locale: this.locale() ?? this.localeId,
|
|
41
|
+
label: this.inputLabel() ?? this.hostAria['aria-label'],
|
|
42
|
+
summaryFormatter: this.summaryFormatter(),
|
|
43
|
+
}), /* @ts-ignore */
|
|
44
|
+
...(ngDevMode ? [{ debugName: "view" }] : /* istanbul ignore next */ []));
|
|
45
|
+
useScopedStyles(SPARKLINE_SCOPE, sparklineScopedStyles);
|
|
37
46
|
}
|
|
38
47
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsSparklineComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
39
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.
|
|
48
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: BsSparklineComponent, isStandalone: true, selector: "bs-sparkline", inputs: { points: { classPropertyName: "points", publicName: "points", isSignal: true, isRequired: false, transformFunction: null }, area: { classPropertyName: "area", publicName: "area", isSignal: true, isRequired: false, transformFunction: null }, showLastDot: { classPropertyName: "showLastDot", publicName: "showLastDot", isSignal: true, isRequired: false, transformFunction: null }, yMin: { classPropertyName: "yMin", publicName: "yMin", isSignal: true, isRequired: false, transformFunction: null }, yMax: { classPropertyName: "yMax", publicName: "yMax", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, inputLabel: { classPropertyName: "inputLabel", publicName: "inputLabel", isSignal: true, isRequired: false, transformFunction: null }, summaryFormatter: { classPropertyName: "summaryFormatter", publicName: "summaryFormatter", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-mps": "sparkline" }, classAttribute: "sparkline" }, ngImport: i0, template: "@let v = view();\n@if (v.svg) {\n <svg [mpProps]=\"v.svg\">\n @if (v.fill) {\n <svg:path [mpProps]=\"v.fill\"></svg:path>\n }\n <svg:path [mpProps]=\"v.line\"></svg:path>\n @if (v.dot) {\n <svg:circle [mpProps]=\"v.dot\"></svg:circle>\n }\n </svg>\n}\n", dependencies: [{ kind: "directive", type: MpPropsDirective, selector: "[mpProps]", inputs: ["mpProps"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
40
49
|
}
|
|
41
50
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsSparklineComponent, decorators: [{
|
|
42
51
|
type: Component,
|
|
43
|
-
args: [{ selector: 'bs-sparkline', imports: [
|
|
44
|
-
|
|
52
|
+
args: [{ selector: 'bs-sparkline', imports: [MpPropsDirective], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
53
|
+
'data-mps': SPARKLINE_SCOPE,
|
|
54
|
+
'class': 'sparkline',
|
|
55
|
+
}, template: "@let v = view();\n@if (v.svg) {\n <svg [mpProps]=\"v.svg\">\n @if (v.fill) {\n <svg:path [mpProps]=\"v.fill\"></svg:path>\n }\n <svg:path [mpProps]=\"v.line\"></svg:path>\n @if (v.dot) {\n <svg:circle [mpProps]=\"v.dot\"></svg:circle>\n }\n </svg>\n}\n" }]
|
|
56
|
+
}], ctorParameters: () => [], propDecorators: { points: [{ type: i0.Input, args: [{ isSignal: true, alias: "points", required: false }] }], area: [{ type: i0.Input, args: [{ isSignal: true, alias: "area", required: false }] }], showLastDot: [{ type: i0.Input, args: [{ isSignal: true, alias: "showLastDot", required: false }] }], yMin: [{ type: i0.Input, args: [{ isSignal: true, alias: "yMin", required: false }] }], yMax: [{ type: i0.Input, args: [{ isSignal: true, alias: "yMax", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], inputLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputLabel", required: false }] }], summaryFormatter: [{ type: i0.Input, args: [{ isSignal: true, alias: "summaryFormatter", required: false }] }] } });
|
|
45
57
|
|
|
46
58
|
/**
|
|
47
59
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintplayer-ng-bootstrap-charts-sparkline.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/charts/sparkline/src/sparkline/sparkline.component.ts","../../../../libs/mintplayer-ng-bootstrap/charts/sparkline/src/sparkline/sparkline.component.html","../../../../libs/mintplayer-ng-bootstrap/charts/sparkline/mintplayer-ng-bootstrap-charts-sparkline.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-charts-sparkline.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/charts/sparkline/src/sparkline/sparkline.component.ts","../../../../libs/mintplayer-ng-bootstrap/charts/sparkline/src/sparkline/sparkline.component.html","../../../../libs/mintplayer-ng-bootstrap/charts/sparkline/mintplayer-ng-bootstrap-charts-sparkline.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n computed,\n ElementRef,\n inject,\n input,\n LOCALE_ID,\n} from '@angular/core';\nimport {\n SPARKLINE_SCOPE,\n connectSparkline,\n sparklineScopedStyles,\n} from '@mintplayer/ui-core/charts/sparkline';\nimport { takeHostAria } from '@mintplayer/ng-bootstrap/a11y';\nimport { MpPropsDirective, useScopedStyles } from '@mintplayer/ng-bootstrap/machine';\n\n/**\n * An axis-less inline trend for table cells (#437), rendered by this\n * component's own template from `@mintplayer/ui-core/charts/sparkline`, so the\n * server HTML is the finished chart. `<bs-sparkline>` is the sized box; the\n * `role=\"img\"` svg inside is named by `inputLabel`, the host's `aria-label`,\n * `summaryFormatter`, or the generated \"first, last, lowest, highest\".\n */\n@Component({\n selector: 'bs-sparkline',\n templateUrl: './sparkline.component.html',\n imports: [MpPropsDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n 'data-mps': SPARKLINE_SCOPE,\n 'class': 'sparkline',\n },\n})\nexport class BsSparklineComponent {\n private readonly hostAria = takeHostAria(inject(ElementRef).nativeElement as HTMLElement);\n private readonly localeId = inject(LOCALE_ID);\n\n readonly points = input<(number | null)[]>([]);\n readonly area = input<boolean>(false);\n readonly showLastDot = input<boolean>(true);\n readonly yMin = input<number | undefined>(undefined);\n readonly yMax = input<number | undefined>(undefined);\n /** Number formatting for the generated name. Defaults to the app's `LOCALE_ID`. */\n readonly locale = input<string | undefined>(undefined);\n readonly inputLabel = input<string | undefined>(undefined);\n readonly summaryFormatter = input<((points: (number | null)[]) => string | undefined) | undefined>(undefined);\n\n readonly view = computed(() => connectSparkline(this.points(), {\n area: this.area(),\n showLastDot: this.showLastDot(),\n yMin: this.yMin(),\n yMax: this.yMax(),\n locale: this.locale() ?? this.localeId,\n label: this.inputLabel() ?? this.hostAria['aria-label'],\n summaryFormatter: this.summaryFormatter(),\n }));\n\n constructor() {\n useScopedStyles(SPARKLINE_SCOPE, sparklineScopedStyles);\n }\n}\n","@let v = view();\n@if (v.svg) {\n <svg [mpProps]=\"v.svg\">\n @if (v.fill) {\n <svg:path [mpProps]=\"v.fill\"></svg:path>\n }\n <svg:path [mpProps]=\"v.line\"></svg:path>\n @if (v.dot) {\n <svg:circle [mpProps]=\"v.dot\"></svg:circle>\n }\n </svg>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAiBA;;;;;;AAMG;MAWU,oBAAoB,CAAA;AAwB/B,IAAA,WAAA,GAAA;QAv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