@mintplayer/ng-bootstrap 22.14.0 → 22.16.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/fesm2022/mintplayer-ng-bootstrap-charts-hierarchy.mjs +49 -9
- package/fesm2022/mintplayer-ng-bootstrap-charts-hierarchy.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs +92 -20
- package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs.map +1 -1
- package/package.json +1 -1
- package/types/mintplayer-ng-bootstrap-charts-hierarchy.d.ts +17 -4
- package/types/mintplayer-ng-bootstrap-code-snippet.d.ts +61 -15
- package/src/styles/ngx-highlight-themes/a11y-dark.scss +0 -107
|
@@ -11,8 +11,12 @@ class BsHierarchyChartComponent {
|
|
|
11
11
|
...(ngDevMode ? [{ debugName: "layout" }] : /* istanbul ignore next */ []));
|
|
12
12
|
this.rootId = model(undefined, /* @ts-ignore */
|
|
13
13
|
...(ngDevMode ? [{ debugName: "rootId" }] : /* istanbul ignore next */ []));
|
|
14
|
-
/**
|
|
15
|
-
|
|
14
|
+
/**
|
|
15
|
+
* Levels rendered outward from the focus, or `'auto'` for every loaded level.
|
|
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 */
|
|
16
20
|
...(ngDevMode ? [{ debugName: "maxDepth" }] : /* istanbul ignore next */ []));
|
|
17
21
|
this.minAngle = input(0.2, /* @ts-ignore */
|
|
18
22
|
...(ngDevMode ? [{ debugName: "minAngle" }] : /* istanbul ignore next */ []));
|
|
@@ -20,8 +24,22 @@ class BsHierarchyChartComponent {
|
|
|
20
24
|
...(ngDevMode ? [{ debugName: "minSize" }] : /* istanbul ignore next */ []));
|
|
21
25
|
this.showLabels = input(true, /* @ts-ignore */
|
|
22
26
|
...(ngDevMode ? [{ debugName: "showLabels" }] : /* istanbul ignore next */ []));
|
|
23
|
-
|
|
24
|
-
|
|
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 */
|
|
32
|
+
...(ngDevMode ? [{ debugName: "backdrop" }] : /* istanbul ignore next */ []));
|
|
33
|
+
/** Gesture allowlist for the geometric zoom: 'wheel pinch' | 'wheel' | 'pinch' | 'none'. */
|
|
34
|
+
this.zoomGestures = input('wheel pinch', /* @ts-ignore */
|
|
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 */ []));
|
|
25
43
|
this.colorMin = input(0, /* @ts-ignore */
|
|
26
44
|
...(ngDevMode ? [{ debugName: "colorMin" }] : /* istanbul ignore next */ []));
|
|
27
45
|
this.colorMax = input(100, /* @ts-ignore */
|
|
@@ -64,8 +82,12 @@ class BsHierarchyChartComponent {
|
|
|
64
82
|
el.layout = this.layout(); });
|
|
65
83
|
effect(() => { const el = this.chartRef()?.nativeElement; if (el)
|
|
66
84
|
el.rootId = this.rootId(); });
|
|
67
|
-
effect(() => {
|
|
68
|
-
el
|
|
85
|
+
effect(() => {
|
|
86
|
+
const el = this.chartRef()?.nativeElement;
|
|
87
|
+
const depth = this.maxDepth();
|
|
88
|
+
if (el && depth !== undefined)
|
|
89
|
+
el.maxDepth = depth;
|
|
90
|
+
});
|
|
69
91
|
effect(() => { const el = this.chartRef()?.nativeElement; if (el)
|
|
70
92
|
el.minAngle = this.minAngle(); });
|
|
71
93
|
effect(() => { const el = this.chartRef()?.nativeElement; if (el)
|
|
@@ -73,7 +95,25 @@ class BsHierarchyChartComponent {
|
|
|
73
95
|
effect(() => { const el = this.chartRef()?.nativeElement; if (el)
|
|
74
96
|
el.showLabels = this.showLabels(); });
|
|
75
97
|
effect(() => { const el = this.chartRef()?.nativeElement; if (el)
|
|
76
|
-
el.
|
|
98
|
+
el.labelFontSize = this.labelFontSize(); });
|
|
99
|
+
effect(() => { const el = this.chartRef()?.nativeElement; if (el)
|
|
100
|
+
el.backdrop = this.backdrop(); });
|
|
101
|
+
effect(() => { const el = this.chartRef()?.nativeElement; if (el)
|
|
102
|
+
el.zoomGestures = this.zoomGestures(); });
|
|
103
|
+
effect(() => {
|
|
104
|
+
const el = this.chartRef()?.nativeElement;
|
|
105
|
+
const label = this.zoomHintLabel();
|
|
106
|
+
if (el && label !== undefined)
|
|
107
|
+
el.zoomHintLabel = label;
|
|
108
|
+
});
|
|
109
|
+
effect(() => { const el = this.chartRef()?.nativeElement; if (el)
|
|
110
|
+
el.showBreadcrumb = this.showBreadcrumb(); });
|
|
111
|
+
effect(() => {
|
|
112
|
+
const el = this.chartRef()?.nativeElement;
|
|
113
|
+
const label = this.breadcrumbLabel();
|
|
114
|
+
if (el && label !== undefined)
|
|
115
|
+
el.breadcrumbLabel = label;
|
|
116
|
+
});
|
|
77
117
|
effect(() => { const el = this.chartRef()?.nativeElement; if (el)
|
|
78
118
|
el.colorMin = this.colorMin(); });
|
|
79
119
|
effect(() => { const el = this.chartRef()?.nativeElement; if (el)
|
|
@@ -137,12 +177,12 @@ class BsHierarchyChartComponent {
|
|
|
137
177
|
this.nodeLoadError.emit(event.detail);
|
|
138
178
|
}
|
|
139
179
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsHierarchyChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
140
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.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 },
|
|
180
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.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 }, 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 }, 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 }, inputLabel: { classPropertyName: "inputLabel", publicName: "inputLabel", 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 }, 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", zoom: "zoom", nodeSelect: "nodeSelect", nodeHover: "nodeHover", nodeLoadError: "nodeLoadError" }, viewQueries: [{ propertyName: "chartRef", first: true, predicate: ["chart"], descendants: true, isSignal: true }], ngImport: i0, template: "<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", styles: [":host{display:block}\n"], dependencies: [{ kind: "directive", type: BsForwardAriaDirective, selector: "[bsForwardAria]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
141
181
|
}
|
|
142
182
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsHierarchyChartComponent, decorators: [{
|
|
143
183
|
type: Component,
|
|
144
184
|
args: [{ selector: 'bs-hierarchy-chart', imports: [BsForwardAriaDirective], schemas: [CUSTOM_ELEMENTS_SCHEMA], changeDetection: ChangeDetectionStrategy.OnPush, template: "<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", styles: [":host{display:block}\n"] }]
|
|
145
|
-
}], 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 }] }],
|
|
185
|
+
}], 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 }] }], 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 }] }], 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 }] }], inputLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputLabel", 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 }] }], 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 }] }], zoom: [{ type: i0.Output, args: ["zoom"] }], nodeSelect: [{ type: i0.Output, args: ["nodeSelect"] }], nodeHover: [{ type: i0.Output, args: ["nodeHover"] }], nodeLoadError: [{ type: i0.Output, args: ["nodeLoadError"] }], chartRef: [{ type: i0.ViewChild, args: ['chart', { isSignal: true }] }] } });
|
|
146
186
|
|
|
147
187
|
/**
|
|
148
188
|
* 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 /** Levels rendered outward from the focus, or `'auto'` for every loaded level. */\n readonly maxDepth = input<number | 'auto'>(2);\n readonly minAngle = input<number>(0.2);\n readonly minSize = input<number>(4);\n readonly showLabels = input<boolean>(true);\n readonly labelMinArea = input<number>(0.03);\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<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; if (el) el.data = this.data(); });\n effect(() => { const el = this.chartRef()?.nativeElement; if (el) el.layout = this.layout(); });\n effect(() => { const el = this.chartRef()?.nativeElement; if (el) el.rootId = this.rootId(); });\n effect(() => { const el = this.chartRef()?.nativeElement; if (el) el.maxDepth = this.maxDepth(); });\n effect(() => { const el = this.chartRef()?.nativeElement; if (el) el.minAngle = this.minAngle(); });\n effect(() => { const el = this.chartRef()?.nativeElement; if (el) el.minSize = this.minSize(); });\n effect(() => { const el = this.chartRef()?.nativeElement; if (el) el.showLabels = this.showLabels(); });\n effect(() => { const el = this.chartRef()?.nativeElement; if (el) el.labelMinArea = this.labelMinArea(); });\n effect(() => { const el = this.chartRef()?.nativeElement; if (el) el.colorMin = this.colorMin(); });\n effect(() => { const el = this.chartRef()?.nativeElement; if (el) el.colorMax = this.colorMax(); });\n effect(() => { const el = this.chartRef()?.nativeElement; if (el) el.colorStart = this.colorStart(); });\n effect(() => { const el = this.chartRef()?.nativeElement; if (el) el.colorEnd = this.colorEnd(); });\n effect(() => { const el = this.chartRef()?.nativeElement; if (el) el.transitionDuration = this.transitionDuration(); });\n effect(() => { const el = this.chartRef()?.nativeElement; if (el) el.locale = this.locale(); });\n effect(() => {\n const el = this.chartRef()?.nativeElement;\n if (el) el.inputLabel = this.inputLabel() ?? null;\n });\n effect(() => {\n const el = this.chartRef()?.nativeElement;\n const label = this.zoomOutLabel();\n if (el && label !== undefined) el.zoomOutLabel = label;\n });\n effect(() => {\n const el = this.chartRef()?.nativeElement;\n const label = this.metricUnitLabel();\n if (el && label !== undefined) el.metricUnitLabel = label;\n });\n effect(() => {\n const el = this.chartRef()?.nativeElement;\n const label = this.valueUnitLabel();\n if (el && label !== undefined) el.valueUnitLabel = label;\n });\n effect(() => {\n const el = this.chartRef()?.nativeElement;\n const label = this.loadingLabel();\n if (el && label !== undefined) el.loadingLabel = label;\n });\n effect(() => { const el = this.chartRef()?.nativeElement; if (el) el.tooltipFormatter = this.tooltipFormatter(); });\n effect(() => { const el = this.chartRef()?.nativeElement; if (el) el.labelFormatter = this.labelFormatter(); });\n effect(() => { const el = this.chartRef()?.nativeElement; if (el) 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;AAgCpC,IAAA,WAAA,GAAA;QA/BS,IAAA,CAAA,IAAI,GAAG,KAAK,CAA4B,SAAS;iFAAC;QAClD,IAAA,CAAA,MAAM,GAAG,KAAK,CAAu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AAA,QAAA,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;ygFAgCa,OAAO,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEjErE;;AAEG;;;;"}
|
|
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<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; if (el) el.data = this.data(); });\n effect(() => { const el = this.chartRef()?.nativeElement; if (el) el.layout = this.layout(); });\n effect(() => { const el = this.chartRef()?.nativeElement; if (el) el.rootId = this.rootId(); });\n effect(() => {\n const el = this.chartRef()?.nativeElement;\n const depth = this.maxDepth();\n if (el && depth !== undefined) el.maxDepth = depth;\n });\n effect(() => { const el = this.chartRef()?.nativeElement; if (el) el.minAngle = this.minAngle(); });\n effect(() => { const el = this.chartRef()?.nativeElement; if (el) el.minSize = this.minSize(); });\n effect(() => { const el = this.chartRef()?.nativeElement; if (el) el.showLabels = this.showLabels(); });\n effect(() => { const el = this.chartRef()?.nativeElement; if (el) el.labelFontSize = this.labelFontSize(); });\n effect(() => { const el = this.chartRef()?.nativeElement; if (el) el.backdrop = this.backdrop(); });\n effect(() => { const el = this.chartRef()?.nativeElement; if (el) el.zoomGestures = this.zoomGestures(); });\n effect(() => {\n const el = this.chartRef()?.nativeElement;\n const label = this.zoomHintLabel();\n if (el && label !== undefined) el.zoomHintLabel = label;\n });\n effect(() => { const el = this.chartRef()?.nativeElement; if (el) el.showBreadcrumb = this.showBreadcrumb(); });\n effect(() => {\n const el = this.chartRef()?.nativeElement;\n const label = this.breadcrumbLabel();\n if (el && label !== undefined) el.breadcrumbLabel = label;\n });\n effect(() => { const el = this.chartRef()?.nativeElement; if (el) el.colorMin = this.colorMin(); });\n effect(() => { const el = this.chartRef()?.nativeElement; if (el) el.colorMax = this.colorMax(); });\n effect(() => { const el = this.chartRef()?.nativeElement; if (el) el.colorStart = this.colorStart(); });\n effect(() => { const el = this.chartRef()?.nativeElement; if (el) el.colorEnd = this.colorEnd(); });\n effect(() => { const el = this.chartRef()?.nativeElement; if (el) el.transitionDuration = this.transitionDuration(); });\n effect(() => { const el = this.chartRef()?.nativeElement; if (el) el.locale = this.locale(); });\n effect(() => {\n const el = this.chartRef()?.nativeElement;\n if (el) el.inputLabel = this.inputLabel() ?? null;\n });\n effect(() => {\n const el = this.chartRef()?.nativeElement;\n const label = this.zoomOutLabel();\n if (el && label !== undefined) el.zoomOutLabel = label;\n });\n effect(() => {\n const el = this.chartRef()?.nativeElement;\n const label = this.metricUnitLabel();\n if (el && label !== undefined) el.metricUnitLabel = label;\n });\n effect(() => {\n const el = this.chartRef()?.nativeElement;\n const label = this.valueUnitLabel();\n if (el && label !== undefined) el.valueUnitLabel = label;\n });\n effect(() => {\n const el = this.chartRef()?.nativeElement;\n const label = this.loadingLabel();\n if (el && label !== undefined) el.loadingLabel = label;\n });\n effect(() => { const el = this.chartRef()?.nativeElement; if (el) el.tooltipFormatter = this.tooltipFormatter(); });\n effect(() => { const el = this.chartRef()?.nativeElement; if (el) el.labelFormatter = this.labelFormatter(); });\n effect(() => { const el = this.chartRef()?.nativeElement; if (el) 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,IAAA,CAAA,QAAQ,GAAG,KAA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BAAyB,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;uhGA6Ca,OAAO,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE9ErE;;AAEG;;;;"}
|
|
@@ -1,41 +1,113 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, output, ChangeDetectionStrategy, CUSTOM_ELEMENTS_SCHEMA, Component } from '@angular/core';
|
|
2
|
+
import { input, output, viewChild, inject, ElementRef, ChangeDetectionStrategy, CUSTOM_ELEMENTS_SCHEMA, Component } from '@angular/core';
|
|
3
3
|
import '@mintplayer/web-components/code-snippet';
|
|
4
4
|
|
|
5
|
+
/** Host attributes that describe the CONTROL and must reach it, not sit on a
|
|
6
|
+
* wrapper the accessibility tree does not care about. */
|
|
7
|
+
const FORWARDED_ATTRIBUTES = ['role', 'tabindex', 'id'];
|
|
5
8
|
/**
|
|
6
|
-
* Angular wrapper around `<mp-code-snippet>`. The WC owns
|
|
7
|
-
*
|
|
8
|
-
* component
|
|
9
|
-
* underlying WC's properties and events.
|
|
9
|
+
* Angular wrapper around `<mp-code-snippet>`. The WC owns highlighting,
|
|
10
|
+
* copy-to-clipboard, line rendering and the roving-focus keyboard layer; this
|
|
11
|
+
* component translates Angular input/output ergonomics onto it.
|
|
10
12
|
*
|
|
11
|
-
* Breaking changes
|
|
12
|
-
* - `
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
13
|
+
* Breaking changes:
|
|
14
|
+
* - `codeToCopy` is now `code`, matching the property it forwards to.
|
|
15
|
+
* - The code block follows `data-bs-theme` instead of being permanently dark.
|
|
16
|
+
* Pass `theme="dark"` to keep the old appearance.
|
|
17
|
+
* - `offcanvasVisible` (model) and `copiedTemplate` (viewChild) are long gone;
|
|
18
|
+
* the WC manages its own toast.
|
|
19
|
+
*
|
|
20
|
+
* CSS overrides go through parts: `::part(copy-button)`, `::part(pre)`,
|
|
21
|
+
* `::part(code)`, `::part(line)`, `::part(line-number)`, `::part(toast)`, and
|
|
22
|
+
* `::part(annotation-<kind>)` for whatever kinds you feed `annotations`.
|
|
19
23
|
*/
|
|
20
24
|
class BsCodeSnippetComponent {
|
|
21
25
|
constructor() {
|
|
22
|
-
this.
|
|
23
|
-
...(ngDevMode ? [{ debugName: "
|
|
26
|
+
this.code = input('', /* @ts-ignore */
|
|
27
|
+
...(ngDevMode ? [{ debugName: "code" }] : /* istanbul ignore next */ []));
|
|
24
28
|
this.language = input('', /* @ts-ignore */
|
|
25
29
|
...(ngDevMode ? [{ debugName: "language" }] : /* istanbul ignore next */ []));
|
|
30
|
+
this.lineNumbers = input(false, /* @ts-ignore */
|
|
31
|
+
...(ngDevMode ? [{ debugName: "lineNumbers" }] : /* istanbul ignore next */ []));
|
|
32
|
+
this.startLine = input(1, /* @ts-ignore */
|
|
33
|
+
...(ngDevMode ? [{ debugName: "startLine" }] : /* istanbul ignore next */ []));
|
|
34
|
+
this.wrap = input(false, /* @ts-ignore */
|
|
35
|
+
...(ngDevMode ? [{ debugName: "wrap" }] : /* istanbul ignore next */ []));
|
|
36
|
+
this.theme = input('auto', /* @ts-ignore */
|
|
37
|
+
...(ngDevMode ? [{ debugName: "theme" }] : /* istanbul ignore next */ []));
|
|
38
|
+
/** Sparse per-line markers; see `CodeLineAnnotation`. */
|
|
39
|
+
this.annotations = input([], /* @ts-ignore */
|
|
40
|
+
...(ngDevMode ? [{ debugName: "annotations" }] : /* istanbul ignore next */ []));
|
|
41
|
+
this.activeLine = input(null, /* @ts-ignore */
|
|
42
|
+
...(ngDevMode ? [{ debugName: "activeLine" }] : /* istanbul ignore next */ []));
|
|
43
|
+
/** Turns each line number into a real link, so middle-click still works. */
|
|
44
|
+
this.lineHref = input(null, /* @ts-ignore */
|
|
45
|
+
...(ngDevMode ? [{ debugName: "lineHref" }] : /* istanbul ignore next */ []));
|
|
46
|
+
this.label = input('', /* @ts-ignore */
|
|
47
|
+
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
48
|
+
this.copyLabel = input('', /* @ts-ignore */
|
|
49
|
+
...(ngDevMode ? [{ debugName: "copyLabel" }] : /* istanbul ignore next */ []));
|
|
50
|
+
this.lineLabel = input('', /* @ts-ignore */
|
|
51
|
+
...(ngDevMode ? [{ debugName: "lineLabel" }] : /* istanbul ignore next */ []));
|
|
26
52
|
this.detectedLanguage = output();
|
|
53
|
+
/**
|
|
54
|
+
* Emits the DOM event, not just the line number, so a consumer can call
|
|
55
|
+
* `preventDefault()` on it and navigate itself. Emitting the bare number
|
|
56
|
+
* dropped the only channel the element offers for that, and the anchor's
|
|
57
|
+
* default navigation always won.
|
|
58
|
+
*
|
|
59
|
+
* Angular's `output()` emits synchronously inside the DOM listener, so a
|
|
60
|
+
* `preventDefault()` in the handler lands before `dispatchEvent` returns.
|
|
61
|
+
* Same shape as `BsComboboxDirective`'s `activate`/`cancel`.
|
|
62
|
+
*/
|
|
63
|
+
this.lineActivate = output();
|
|
64
|
+
this.element = viewChild.required('element', /* @ts-ignore */
|
|
65
|
+
...(ngDevMode ? [{ debugName: "element" }] : /* istanbul ignore next */ []));
|
|
66
|
+
this.host = inject(ElementRef);
|
|
67
|
+
}
|
|
68
|
+
ngAfterViewInit() {
|
|
69
|
+
this.forwardHostAttributes();
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Scroll a line into view. Delegated to the element rather than reimplemented
|
|
73
|
+
* so that re-requesting the line the user is already on still scrolls — a
|
|
74
|
+
* plain `activeLine` binding would no-op.
|
|
75
|
+
*/
|
|
76
|
+
scrollToLine(line) {
|
|
77
|
+
this.element().nativeElement.scrollToLine(line);
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* A consumer writing `aria-label` or `role` on `<bs-code-snippet>` means it
|
|
81
|
+
* for the code block. Left on the Angular host it reaches nothing: the host
|
|
82
|
+
* is a roleless div as far as AT is concerned. So the attributes are moved
|
|
83
|
+
* onto the `mp-*` element and removed from the host, where a duplicate would
|
|
84
|
+
* otherwise produce two named nodes.
|
|
85
|
+
*/
|
|
86
|
+
forwardHostAttributes() {
|
|
87
|
+
const host = this.host.nativeElement;
|
|
88
|
+
const target = this.element().nativeElement;
|
|
89
|
+
const names = [...host.getAttributeNames()].filter((name) => name.startsWith('aria-') || FORWARDED_ATTRIBUTES.includes(name));
|
|
90
|
+
for (const name of names) {
|
|
91
|
+
const value = host.getAttribute(name);
|
|
92
|
+
if (value === null)
|
|
93
|
+
continue;
|
|
94
|
+
target.setAttribute(name, value);
|
|
95
|
+
host.removeAttribute(name);
|
|
96
|
+
}
|
|
27
97
|
}
|
|
28
98
|
onLanguageDetected(event) {
|
|
29
|
-
|
|
30
|
-
|
|
99
|
+
this.detectedLanguage.emit(event.detail.language);
|
|
100
|
+
}
|
|
101
|
+
onLineActivate(event) {
|
|
102
|
+
this.lineActivate.emit(event);
|
|
31
103
|
}
|
|
32
104
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsCodeSnippetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
33
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.
|
|
105
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.8", type: BsCodeSnippetComponent, isStandalone: true, selector: "bs-code-snippet", inputs: { code: { classPropertyName: "code", publicName: "code", isSignal: true, isRequired: false, transformFunction: null }, language: { classPropertyName: "language", publicName: "language", isSignal: true, isRequired: false, transformFunction: null }, lineNumbers: { classPropertyName: "lineNumbers", publicName: "lineNumbers", isSignal: true, isRequired: false, transformFunction: null }, startLine: { classPropertyName: "startLine", publicName: "startLine", isSignal: true, isRequired: false, transformFunction: null }, wrap: { classPropertyName: "wrap", publicName: "wrap", isSignal: true, isRequired: false, transformFunction: null }, theme: { classPropertyName: "theme", publicName: "theme", isSignal: true, isRequired: false, transformFunction: null }, annotations: { classPropertyName: "annotations", publicName: "annotations", isSignal: true, isRequired: false, transformFunction: null }, activeLine: { classPropertyName: "activeLine", publicName: "activeLine", isSignal: true, isRequired: false, transformFunction: null }, lineHref: { classPropertyName: "lineHref", publicName: "lineHref", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, copyLabel: { classPropertyName: "copyLabel", publicName: "copyLabel", isSignal: true, isRequired: false, transformFunction: null }, lineLabel: { classPropertyName: "lineLabel", publicName: "lineLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { detectedLanguage: "detectedLanguage", lineActivate: "lineActivate" }, viewQueries: [{ propertyName: "element", first: true, predicate: ["element"], descendants: true, isSignal: true }], ngImport: i0, template: "<!--\n Strings and booleans go in as ATTRIBUTES, not properties, so that an unset\n input removes the attribute (`null`) and the element keeps its own default.\n A property binding would write `''` over defaults like\n \"Copy ${language} code to clipboard\" and blank them.\n\n `code`, `annotations` and `lineHref` stay property bindings: multi-line text,\n an object and a function have no sensible attribute form.\n-->\n<mp-code-snippet\n #element\n [code]=\"code()\"\n [attr.language]=\"language() || null\"\n [attr.line-numbers]=\"lineNumbers() ? '' : null\"\n [attr.start-line]=\"startLine()\"\n [attr.wrap]=\"wrap() ? '' : null\"\n [attr.theme]=\"theme()\"\n [attr.active-line]=\"activeLine()\"\n [attr.label]=\"label() || null\"\n [attr.copy-label]=\"copyLabel() || null\"\n [attr.line-label]=\"lineLabel() || null\"\n [annotations]=\"annotations()\"\n [lineHref]=\"lineHref()\"\n (language-detected)=\"onLanguageDetected($event)\"\n (line-activate)=\"onLineActivate($event)\"\n></mp-code-snippet>\n", styles: [":host{display:flex;flex-direction:column}mp-code-snippet{flex:1 1 auto;min-height:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
34
106
|
}
|
|
35
107
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsCodeSnippetComponent, decorators: [{
|
|
36
108
|
type: Component,
|
|
37
|
-
args: [{ selector: 'bs-code-snippet', schemas: [CUSTOM_ELEMENTS_SCHEMA], changeDetection: ChangeDetectionStrategy.OnPush,
|
|
38
|
-
}], propDecorators: {
|
|
109
|
+
args: [{ selector: 'bs-code-snippet', schemas: [CUSTOM_ELEMENTS_SCHEMA], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n Strings and booleans go in as ATTRIBUTES, not properties, so that an unset\n input removes the attribute (`null`) and the element keeps its own default.\n A property binding would write `''` over defaults like\n \"Copy ${language} code to clipboard\" and blank them.\n\n `code`, `annotations` and `lineHref` stay property bindings: multi-line text,\n an object and a function have no sensible attribute form.\n-->\n<mp-code-snippet\n #element\n [code]=\"code()\"\n [attr.language]=\"language() || null\"\n [attr.line-numbers]=\"lineNumbers() ? '' : null\"\n [attr.start-line]=\"startLine()\"\n [attr.wrap]=\"wrap() ? '' : null\"\n [attr.theme]=\"theme()\"\n [attr.active-line]=\"activeLine()\"\n [attr.label]=\"label() || null\"\n [attr.copy-label]=\"copyLabel() || null\"\n [attr.line-label]=\"lineLabel() || null\"\n [annotations]=\"annotations()\"\n [lineHref]=\"lineHref()\"\n (language-detected)=\"onLanguageDetected($event)\"\n (line-activate)=\"onLineActivate($event)\"\n></mp-code-snippet>\n", styles: [":host{display:flex;flex-direction:column}mp-code-snippet{flex:1 1 auto;min-height:0}\n"] }]
|
|
110
|
+
}], propDecorators: { code: [{ type: i0.Input, args: [{ isSignal: true, alias: "code", required: false }] }], language: [{ type: i0.Input, args: [{ isSignal: true, alias: "language", required: false }] }], lineNumbers: [{ type: i0.Input, args: [{ isSignal: true, alias: "lineNumbers", required: false }] }], startLine: [{ type: i0.Input, args: [{ isSignal: true, alias: "startLine", required: false }] }], wrap: [{ type: i0.Input, args: [{ isSignal: true, alias: "wrap", required: false }] }], theme: [{ type: i0.Input, args: [{ isSignal: true, alias: "theme", required: false }] }], annotations: [{ type: i0.Input, args: [{ isSignal: true, alias: "annotations", required: false }] }], activeLine: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeLine", required: false }] }], lineHref: [{ type: i0.Input, args: [{ isSignal: true, alias: "lineHref", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], copyLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "copyLabel", required: false }] }], lineLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "lineLabel", required: false }] }], detectedLanguage: [{ type: i0.Output, args: ["detectedLanguage"] }], lineActivate: [{ type: i0.Output, args: ["lineActivate"] }], element: [{ type: i0.ViewChild, args: ['element', { isSignal: true }] }] } });
|
|
39
111
|
|
|
40
112
|
/**
|
|
41
113
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintplayer-ng-bootstrap-code-snippet.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/code-snippet/src/code-snippet.component.ts","../../../../libs/mintplayer-ng-bootstrap/code-snippet/src/code-snippet.component.html","../../../../libs/mintplayer-ng-bootstrap/code-snippet/mintplayer-ng-bootstrap-code-snippet.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-code-snippet.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/code-snippet/src/code-snippet.component.ts","../../../../libs/mintplayer-ng-bootstrap/code-snippet/src/code-snippet.component.html","../../../../libs/mintplayer-ng-bootstrap/code-snippet/mintplayer-ng-bootstrap-code-snippet.ts"],"sourcesContent":["import {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n CUSTOM_ELEMENTS_SCHEMA,\n ElementRef,\n inject,\n input,\n output,\n viewChild,\n} from '@angular/core';\nimport '@mintplayer/web-components/code-snippet';\nimport type { CodeLineAnnotation, MpCodeSnippet } from '@mintplayer/web-components/code-snippet';\n\n/** Host attributes that describe the CONTROL and must reach it, not sit on a\n * wrapper the accessibility tree does not care about. */\nconst FORWARDED_ATTRIBUTES = ['role', 'tabindex', 'id'];\n\n/**\n * Angular wrapper around `<mp-code-snippet>`. The WC owns highlighting,\n * copy-to-clipboard, line rendering and the roving-focus keyboard layer; this\n * component translates Angular input/output ergonomics onto it.\n *\n * Breaking changes:\n * - `codeToCopy` is now `code`, matching the property it forwards to.\n * - The code block follows `data-bs-theme` instead of being permanently dark.\n * Pass `theme=\"dark\"` to keep the old appearance.\n * - `offcanvasVisible` (model) and `copiedTemplate` (viewChild) are long gone;\n * the WC manages its own toast.\n *\n * CSS overrides go through parts: `::part(copy-button)`, `::part(pre)`,\n * `::part(code)`, `::part(line)`, `::part(line-number)`, `::part(toast)`, and\n * `::part(annotation-<kind>)` for whatever kinds you feed `annotations`.\n */\n@Component({\n selector: 'bs-code-snippet',\n templateUrl: './code-snippet.component.html',\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n changeDetection: ChangeDetectionStrategy.OnPush,\n /**\n * A flex column that the `<mp-code-snippet>` fills, so a `height` or\n * `max-height` set on `<bs-code-snippet>` reaches the element that actually\n * scrolls. As a plain block the constraint stopped at this host and the\n * element kept its content height, overflowing it.\n *\n * React and Vue need no equivalent: both put the consumer's class straight\n * onto the custom element.\n */\n styles: `\n :host { display: flex; flex-direction: column; }\n mp-code-snippet { flex: 1 1 auto; min-height: 0; }\n `,\n})\nexport class BsCodeSnippetComponent implements AfterViewInit {\n readonly code = input<string>('');\n readonly language = input<string>('');\n\n readonly lineNumbers = input<boolean>(false);\n readonly startLine = input<number>(1);\n readonly wrap = input<boolean>(false);\n readonly theme = input<'auto' | 'light' | 'dark'>('auto');\n\n /** Sparse per-line markers; see `CodeLineAnnotation`. */\n readonly annotations = input<CodeLineAnnotation[]>([]);\n readonly activeLine = input<number | null>(null);\n /** Turns each line number into a real link, so middle-click still works. */\n readonly lineHref = input<((line: number) => string) | null>(null);\n\n readonly label = input<string>('');\n readonly copyLabel = input<string>('');\n readonly lineLabel = input<string>('');\n\n readonly detectedLanguage = output<string>();\n\n /**\n * Emits the DOM event, not just the line number, so a consumer can call\n * `preventDefault()` on it and navigate itself. Emitting the bare number\n * dropped the only channel the element offers for that, and the anchor's\n * default navigation always won.\n *\n * Angular's `output()` emits synchronously inside the DOM listener, so a\n * `preventDefault()` in the handler lands before `dispatchEvent` returns.\n * Same shape as `BsComboboxDirective`'s `activate`/`cancel`.\n */\n readonly lineActivate = output<CustomEvent<{ line: number }>>();\n\n private readonly element = viewChild.required<ElementRef<MpCodeSnippet>>('element');\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n ngAfterViewInit(): void {\n this.forwardHostAttributes();\n }\n\n /**\n * Scroll a line into view. Delegated to the element rather than reimplemented\n * so that re-requesting the line the user is already on still scrolls — a\n * plain `activeLine` binding would no-op.\n */\n scrollToLine(line: number): void {\n this.element().nativeElement.scrollToLine(line);\n }\n\n /**\n * A consumer writing `aria-label` or `role` on `<bs-code-snippet>` means it\n * for the code block. Left on the Angular host it reaches nothing: the host\n * is a roleless div as far as AT is concerned. So the attributes are moved\n * onto the `mp-*` element and removed from the host, where a duplicate would\n * otherwise produce two named nodes.\n */\n private forwardHostAttributes(): void {\n const host = this.host.nativeElement;\n const target = this.element().nativeElement as unknown as HTMLElement;\n\n const names = [...host.getAttributeNames()].filter(\n (name) => name.startsWith('aria-') || FORWARDED_ATTRIBUTES.includes(name),\n );\n\n for (const name of names) {\n const value = host.getAttribute(name);\n if (value === null) continue;\n target.setAttribute(name, value);\n host.removeAttribute(name);\n }\n }\n\n protected onLanguageDetected(event: Event): void {\n this.detectedLanguage.emit((event as CustomEvent<{ language: string }>).detail.language);\n }\n\n protected onLineActivate(event: Event): void {\n this.lineActivate.emit(event as CustomEvent<{ line: number }>);\n }\n}\n","<!--\n Strings and booleans go in as ATTRIBUTES, not properties, so that an unset\n input removes the attribute (`null`) and the element keeps its own default.\n A property binding would write `''` over defaults like\n \"Copy ${language} code to clipboard\" and blank them.\n\n `code`, `annotations` and `lineHref` stay property bindings: multi-line text,\n an object and a function have no sensible attribute form.\n-->\n<mp-code-snippet\n #element\n [code]=\"code()\"\n [attr.language]=\"language() || null\"\n [attr.line-numbers]=\"lineNumbers() ? '' : null\"\n [attr.start-line]=\"startLine()\"\n [attr.wrap]=\"wrap() ? '' : null\"\n [attr.theme]=\"theme()\"\n [attr.active-line]=\"activeLine()\"\n [attr.label]=\"label() || null\"\n [attr.copy-label]=\"copyLabel() || null\"\n [attr.line-label]=\"lineLabel() || null\"\n [annotations]=\"annotations()\"\n [lineHref]=\"lineHref()\"\n (language-detected)=\"onLanguageDetected($event)\"\n (line-activate)=\"onLineActivate($event)\"\n></mp-code-snippet>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAcA;AAC0D;AAC1D,MAAM,oBAAoB,GAAG,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,CAAC;AAEvD;;;;;;;;;;;;;;;AAeG;MAoBU,sBAAsB,CAAA;AAnBnC,IAAA,WAAA,GAAA;QAoBW,IAAA,CAAA,IAAI,GAAG,KAAK,CAAS,EAAE;iFAAC;QACxB,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAS,EAAE;qFAAC;QAE5B,IAAA,CAAA,WAAW,GAAG,KAAK,CAAU,KAAK;wFAAC;QACnC,IAAA,CAAA,SAAS,GAAG,KAAK,CAAS,CAAC;sFAAC;QAC5B,IAAA,CAAA,IAAI,GAAG,KAAK,CAAU,KAAK;iFAAC;QAC5B,IAAA,CAAA,KAAK,GAAG,KAAK,CAA4B,MAAM;kFAAC;;QAGhD,IAAA,CAAA,WAAW,GAAG,KAAK,CAAuB,EAAE;w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: _angular_core.InputSignal<HierarchyChartLayout>;
|
|
9
9
|
readonly rootId: _angular_core.ModelSignal<string | undefined>;
|
|
10
|
-
/**
|
|
11
|
-
|
|
10
|
+
/**
|
|
11
|
+
* Levels rendered outward from the focus, or `'auto'` for every loaded level.
|
|
12
|
+
* Unset leaves the element's own default: `'auto'`, or a 2-level window when
|
|
13
|
+
* a `loadChildren` loader is bound.
|
|
14
|
+
*/
|
|
15
|
+
readonly maxDepth: _angular_core.InputSignal<number | "auto" | undefined>;
|
|
12
16
|
readonly minAngle: _angular_core.InputSignal<number>;
|
|
13
17
|
readonly minSize: _angular_core.InputSignal<number>;
|
|
14
18
|
readonly showLabels: _angular_core.InputSignal<boolean>;
|
|
15
|
-
|
|
19
|
+
/** Label font size in device px, constant across host size and zoom. */
|
|
20
|
+
readonly labelFontSize: _angular_core.InputSignal<number>;
|
|
21
|
+
/** Opaque color behind the chart for label contrast; unset = auto-detected. */
|
|
22
|
+
readonly backdrop: _angular_core.InputSignal<string | undefined>;
|
|
23
|
+
/** Gesture allowlist for the geometric zoom: 'wheel pinch' | 'wheel' | 'pinch' | 'none'. */
|
|
24
|
+
readonly zoomGestures: _angular_core.InputSignal<string>;
|
|
25
|
+
readonly zoomHintLabel: _angular_core.InputSignal<string | undefined>;
|
|
26
|
+
/** Renders the focus path as buttons above the chart. */
|
|
27
|
+
readonly showBreadcrumb: _angular_core.InputSignal<boolean>;
|
|
28
|
+
readonly breadcrumbLabel: _angular_core.InputSignal<string | undefined>;
|
|
16
29
|
readonly colorMin: _angular_core.InputSignal<number>;
|
|
17
30
|
readonly colorMax: _angular_core.InputSignal<number>;
|
|
18
31
|
readonly colorStart: _angular_core.InputSignal<string>;
|
|
@@ -38,7 +51,7 @@ declare class BsHierarchyChartComponent {
|
|
|
38
51
|
protected onNodeHover(event: Event): void;
|
|
39
52
|
protected onNodeLoadError(event: Event): void;
|
|
40
53
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsHierarchyChartComponent, never>;
|
|
41
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsHierarchyChartComponent, "bs-hierarchy-chart", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "layout": { "alias": "layout"; "required": false; "isSignal": true; }; "rootId": { "alias": "rootId"; "required": false; "isSignal": true; }; "maxDepth": { "alias": "maxDepth"; "required": false; "isSignal": true; }; "minAngle": { "alias": "minAngle"; "required": false; "isSignal": true; }; "minSize": { "alias": "minSize"; "required": false; "isSignal": true; }; "showLabels": { "alias": "showLabels"; "required": false; "isSignal": true; }; "
|
|
54
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsHierarchyChartComponent, "bs-hierarchy-chart", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "layout": { "alias": "layout"; "required": false; "isSignal": true; }; "rootId": { "alias": "rootId"; "required": false; "isSignal": true; }; "maxDepth": { "alias": "maxDepth"; "required": false; "isSignal": true; }; "minAngle": { "alias": "minAngle"; "required": false; "isSignal": true; }; "minSize": { "alias": "minSize"; "required": false; "isSignal": true; }; "showLabels": { "alias": "showLabels"; "required": false; "isSignal": true; }; "labelFontSize": { "alias": "labelFontSize"; "required": false; "isSignal": true; }; "backdrop": { "alias": "backdrop"; "required": false; "isSignal": true; }; "zoomGestures": { "alias": "zoomGestures"; "required": false; "isSignal": true; }; "zoomHintLabel": { "alias": "zoomHintLabel"; "required": false; "isSignal": true; }; "showBreadcrumb": { "alias": "showBreadcrumb"; "required": false; "isSignal": true; }; "breadcrumbLabel": { "alias": "breadcrumbLabel"; "required": false; "isSignal": true; }; "colorMin": { "alias": "colorMin"; "required": false; "isSignal": true; }; "colorMax": { "alias": "colorMax"; "required": false; "isSignal": true; }; "colorStart": { "alias": "colorStart"; "required": false; "isSignal": true; }; "colorEnd": { "alias": "colorEnd"; "required": false; "isSignal": true; }; "transitionDuration": { "alias": "transitionDuration"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; "inputLabel": { "alias": "inputLabel"; "required": false; "isSignal": true; }; "zoomOutLabel": { "alias": "zoomOutLabel"; "required": false; "isSignal": true; }; "metricUnitLabel": { "alias": "metricUnitLabel"; "required": false; "isSignal": true; }; "valueUnitLabel": { "alias": "valueUnitLabel"; "required": false; "isSignal": true; }; "loadingLabel": { "alias": "loadingLabel"; "required": false; "isSignal": true; }; "tooltipFormatter": { "alias": "tooltipFormatter"; "required": false; "isSignal": true; }; "labelFormatter": { "alias": "labelFormatter"; "required": false; "isSignal": true; }; "loadChildren": { "alias": "loadChildren"; "required": false; "isSignal": true; }; }, { "rootId": "rootIdChange"; "zoom": "zoom"; "nodeSelect": "nodeSelect"; "nodeHover": "nodeHover"; "nodeLoadError": "nodeLoadError"; }, never, never, true, never>;
|
|
42
55
|
}
|
|
43
56
|
|
|
44
57
|
export { BsHierarchyChartComponent };
|
|
@@ -1,27 +1,73 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { AfterViewInit } from '@angular/core';
|
|
3
|
+
import { CodeLineAnnotation } from '@mintplayer/web-components/code-snippet';
|
|
2
4
|
|
|
3
5
|
/**
|
|
4
|
-
* Angular wrapper around `<mp-code-snippet>`. The WC owns
|
|
5
|
-
*
|
|
6
|
-
* component
|
|
7
|
-
* underlying WC's properties and events.
|
|
6
|
+
* Angular wrapper around `<mp-code-snippet>`. The WC owns highlighting,
|
|
7
|
+
* copy-to-clipboard, line rendering and the roving-focus keyboard layer; this
|
|
8
|
+
* component translates Angular input/output ergonomics onto it.
|
|
8
9
|
*
|
|
9
|
-
* Breaking changes
|
|
10
|
-
* - `
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
10
|
+
* Breaking changes:
|
|
11
|
+
* - `codeToCopy` is now `code`, matching the property it forwards to.
|
|
12
|
+
* - The code block follows `data-bs-theme` instead of being permanently dark.
|
|
13
|
+
* Pass `theme="dark"` to keep the old appearance.
|
|
14
|
+
* - `offcanvasVisible` (model) and `copiedTemplate` (viewChild) are long gone;
|
|
15
|
+
* the WC manages its own toast.
|
|
16
|
+
*
|
|
17
|
+
* CSS overrides go through parts: `::part(copy-button)`, `::part(pre)`,
|
|
18
|
+
* `::part(code)`, `::part(line)`, `::part(line-number)`, `::part(toast)`, and
|
|
19
|
+
* `::part(annotation-<kind>)` for whatever kinds you feed `annotations`.
|
|
17
20
|
*/
|
|
18
|
-
declare class BsCodeSnippetComponent {
|
|
19
|
-
readonly
|
|
21
|
+
declare class BsCodeSnippetComponent implements AfterViewInit {
|
|
22
|
+
readonly code: _angular_core.InputSignal<string>;
|
|
20
23
|
readonly language: _angular_core.InputSignal<string>;
|
|
24
|
+
readonly lineNumbers: _angular_core.InputSignal<boolean>;
|
|
25
|
+
readonly startLine: _angular_core.InputSignal<number>;
|
|
26
|
+
readonly wrap: _angular_core.InputSignal<boolean>;
|
|
27
|
+
readonly theme: _angular_core.InputSignal<"auto" | "light" | "dark">;
|
|
28
|
+
/** Sparse per-line markers; see `CodeLineAnnotation`. */
|
|
29
|
+
readonly annotations: _angular_core.InputSignal<CodeLineAnnotation[]>;
|
|
30
|
+
readonly activeLine: _angular_core.InputSignal<number | null>;
|
|
31
|
+
/** Turns each line number into a real link, so middle-click still works. */
|
|
32
|
+
readonly lineHref: _angular_core.InputSignal<((line: number) => string) | null>;
|
|
33
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
34
|
+
readonly copyLabel: _angular_core.InputSignal<string>;
|
|
35
|
+
readonly lineLabel: _angular_core.InputSignal<string>;
|
|
21
36
|
readonly detectedLanguage: _angular_core.OutputEmitterRef<string>;
|
|
37
|
+
/**
|
|
38
|
+
* Emits the DOM event, not just the line number, so a consumer can call
|
|
39
|
+
* `preventDefault()` on it and navigate itself. Emitting the bare number
|
|
40
|
+
* dropped the only channel the element offers for that, and the anchor's
|
|
41
|
+
* default navigation always won.
|
|
42
|
+
*
|
|
43
|
+
* Angular's `output()` emits synchronously inside the DOM listener, so a
|
|
44
|
+
* `preventDefault()` in the handler lands before `dispatchEvent` returns.
|
|
45
|
+
* Same shape as `BsComboboxDirective`'s `activate`/`cancel`.
|
|
46
|
+
*/
|
|
47
|
+
readonly lineActivate: _angular_core.OutputEmitterRef<CustomEvent<{
|
|
48
|
+
line: number;
|
|
49
|
+
}>>;
|
|
50
|
+
private readonly element;
|
|
51
|
+
private readonly host;
|
|
52
|
+
ngAfterViewInit(): void;
|
|
53
|
+
/**
|
|
54
|
+
* Scroll a line into view. Delegated to the element rather than reimplemented
|
|
55
|
+
* so that re-requesting the line the user is already on still scrolls — a
|
|
56
|
+
* plain `activeLine` binding would no-op.
|
|
57
|
+
*/
|
|
58
|
+
scrollToLine(line: number): void;
|
|
59
|
+
/**
|
|
60
|
+
* A consumer writing `aria-label` or `role` on `<bs-code-snippet>` means it
|
|
61
|
+
* for the code block. Left on the Angular host it reaches nothing: the host
|
|
62
|
+
* is a roleless div as far as AT is concerned. So the attributes are moved
|
|
63
|
+
* onto the `mp-*` element and removed from the host, where a duplicate would
|
|
64
|
+
* otherwise produce two named nodes.
|
|
65
|
+
*/
|
|
66
|
+
private forwardHostAttributes;
|
|
22
67
|
protected onLanguageDetected(event: Event): void;
|
|
68
|
+
protected onLineActivate(event: Event): void;
|
|
23
69
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsCodeSnippetComponent, never>;
|
|
24
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsCodeSnippetComponent, "bs-code-snippet", never, { "
|
|
70
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsCodeSnippetComponent, "bs-code-snippet", never, { "code": { "alias": "code"; "required": false; "isSignal": true; }; "language": { "alias": "language"; "required": false; "isSignal": true; }; "lineNumbers": { "alias": "lineNumbers"; "required": false; "isSignal": true; }; "startLine": { "alias": "startLine"; "required": false; "isSignal": true; }; "wrap": { "alias": "wrap"; "required": false; "isSignal": true; }; "theme": { "alias": "theme"; "required": false; "isSignal": true; }; "annotations": { "alias": "annotations"; "required": false; "isSignal": true; }; "activeLine": { "alias": "activeLine"; "required": false; "isSignal": true; }; "lineHref": { "alias": "lineHref"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "copyLabel": { "alias": "copyLabel"; "required": false; "isSignal": true; }; "lineLabel": { "alias": "lineLabel"; "required": false; "isSignal": true; }; }, { "detectedLanguage": "detectedLanguage"; "lineActivate": "lineActivate"; }, never, never, true, never>;
|
|
25
71
|
}
|
|
26
72
|
|
|
27
73
|
export { BsCodeSnippetComponent };
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
Theme: a11y-dark
|
|
3
|
-
Author: @ericwbailey
|
|
4
|
-
Maintainer: @ericwbailey
|
|
5
|
-
|
|
6
|
-
Based on the Tomorrow Night Eighties theme:
|
|
7
|
-
https://github.com/isagalaev/highlight.js/blob/master/src/styles/tomorrow-night-eighties.css
|
|
8
|
-
Chosen because it meets WCAG AA contrast against the #2b2b2b background.
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
pre code.hljs {
|
|
12
|
-
display: block;
|
|
13
|
-
overflow-x: auto;
|
|
14
|
-
padding: 1em;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
code.hljs {
|
|
18
|
-
padding: 3px 5px;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.hljs {
|
|
22
|
-
background: #2b2b2b;
|
|
23
|
-
color: #f8f8f2;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.hljs ::selection, .hljs::selection {
|
|
27
|
-
background-color: #4d4d4d;
|
|
28
|
-
color: #f8f8f2;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.hljs-comment,
|
|
32
|
-
.hljs-quote {
|
|
33
|
-
color: #d4d0ab;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.hljs-variable,
|
|
37
|
-
.hljs-template-variable,
|
|
38
|
-
.hljs-tag,
|
|
39
|
-
.hljs-name,
|
|
40
|
-
.hljs-selector-id,
|
|
41
|
-
.hljs-selector-class,
|
|
42
|
-
.hljs-regexp,
|
|
43
|
-
.hljs-deletion {
|
|
44
|
-
color: #ffa07a;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.hljs-number,
|
|
48
|
-
.hljs-built_in,
|
|
49
|
-
.hljs-literal,
|
|
50
|
-
.hljs-type,
|
|
51
|
-
.hljs-params,
|
|
52
|
-
.hljs-meta,
|
|
53
|
-
.hljs-link {
|
|
54
|
-
color: #f5ab35;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.hljs-attribute {
|
|
58
|
-
color: #ffd700;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.hljs-string,
|
|
62
|
-
.hljs-symbol,
|
|
63
|
-
.hljs-bullet,
|
|
64
|
-
.hljs-addition {
|
|
65
|
-
color: #abe338;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.hljs-title,
|
|
69
|
-
.hljs-section {
|
|
70
|
-
color: #00e0e0;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.hljs-keyword,
|
|
74
|
-
.hljs-selector-tag {
|
|
75
|
-
color: #dcc6e0;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.hljs-emphasis {
|
|
79
|
-
font-style: italic;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.hljs-strong {
|
|
83
|
-
font-weight: bold;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
@media screen and (-ms-high-contrast: active) {
|
|
87
|
-
.hljs-addition,
|
|
88
|
-
.hljs-attribute,
|
|
89
|
-
.hljs-built_in,
|
|
90
|
-
.hljs-bullet,
|
|
91
|
-
.hljs-comment,
|
|
92
|
-
.hljs-link,
|
|
93
|
-
.hljs-literal,
|
|
94
|
-
.hljs-meta,
|
|
95
|
-
.hljs-number,
|
|
96
|
-
.hljs-params,
|
|
97
|
-
.hljs-string,
|
|
98
|
-
.hljs-symbol,
|
|
99
|
-
.hljs-type,
|
|
100
|
-
.hljs-quote {
|
|
101
|
-
color: highlight;
|
|
102
|
-
}
|
|
103
|
-
.hljs-keyword,
|
|
104
|
-
.hljs-selector-tag {
|
|
105
|
-
font-weight: bold;
|
|
106
|
-
}
|
|
107
|
-
}
|