@mantha911/ng-echarts 0.1.0-rc.18 → 0.1.0-rc.21
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/CHANGELOG.md +17 -0
- package/README.md +9 -5
- package/fesm2022/mantha911-ng-echarts-area.mjs +34 -21
- package/fesm2022/mantha911-ng-echarts-area.mjs.map +1 -1
- package/fesm2022/mantha911-ng-echarts-bar.mjs +35 -22
- package/fesm2022/mantha911-ng-echarts-bar.mjs.map +1 -1
- package/fesm2022/mantha911-ng-echarts-calendar.mjs +13 -14
- package/fesm2022/mantha911-ng-echarts-calendar.mjs.map +1 -1
- package/fesm2022/mantha911-ng-echarts-composed.mjs +64 -26
- package/fesm2022/mantha911-ng-echarts-composed.mjs.map +1 -1
- package/fesm2022/mantha911-ng-echarts-core.mjs +219 -43
- package/fesm2022/mantha911-ng-echarts-core.mjs.map +1 -1
- package/fesm2022/mantha911-ng-echarts-line.mjs +34 -21
- package/fesm2022/mantha911-ng-echarts-line.mjs.map +1 -1
- package/fesm2022/mantha911-ng-echarts-pie.mjs +81 -48
- package/fesm2022/mantha911-ng-echarts-pie.mjs.map +1 -1
- package/fesm2022/mantha911-ng-echarts-radial.mjs +13 -14
- package/fesm2022/mantha911-ng-echarts-radial.mjs.map +1 -1
- package/fesm2022/mantha911-ng-echarts-sankey.mjs +13 -14
- package/fesm2022/mantha911-ng-echarts-sankey.mjs.map +1 -1
- package/package.json +1 -1
- package/types/mantha911-ng-echarts-composed.d.ts +3 -0
- package/types/mantha911-ng-echarts-core.d.ts +40 -1
- package/types/mantha911-ng-echarts-pie.d.ts +8 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mantha911-ng-echarts-radial.mjs","names":[],"sources":["../../../projects/chart-library/radial/src/lib/radial-model.ts","../../../projects/chart-library/radial/src/lib/radial-options.ts","../../../projects/chart-library/radial/src/lib/radial-browser.ts","../../../projects/chart-library/radial/src/lib/radial-progress.ts","../../../projects/chart-library/radial/src/lib/radial-progress.html"],"sourcesContent":["export type RadialModel =\n | { readonly kind: 'error'; readonly message: string }\n | { readonly kind: 'empty' }\n | {\n readonly kind: 'ready';\n readonly value: number;\n readonly max: number;\n readonly ratio: number;\n };\n\nexport function normalizeRadialProgress(value: number | null, max: number): RadialModel {\n if (typeof max !== 'number' || !Number.isFinite(max) || max <= 0)\n return { kind: 'error', message: 'Progress maximum must be a positive, finite number.' };\n if (value === null) return { kind: 'empty' };\n if (typeof value !== 'number' || !Number.isFinite(value) || value < 0 || value > max)\n return { kind: 'error', message: 'Progress value must be between zero and its maximum.' };\n const normalized = value === 0 ? 0 : value;\n return { kind: 'ready', value: normalized, max, ratio: normalized / max };\n}\n","import type { PieSeriesOption } from 'echarts/charts';\nimport type { ComposeOption } from 'echarts/core';\nimport type { ɵCartesianThemeTokens } from '@mantha911/ng-echarts/core';\nimport type { RadialModel } from './radial-model';\nexport type RadialOption = ComposeOption<PieSeriesOption> & { readonly animation: boolean };\nexport function buildRadialOptions(\n model: Extract<RadialModel, { kind: 'ready' }>,\n tokens: ɵCartesianThemeTokens,\n animation: boolean,\n): RadialOption {\n return {\n animation,\n animationDuration: 300,\n animationDurationUpdate: 200,\n backgroundColor: tokens.background,\n series: [\n {\n id: 'progress',\n type: 'pie',\n silent: true,\n radius: ['68%', '80%'],\n center: ['50%', '50%'],\n startAngle: 90,\n clockwise: true,\n selectedMode: false,\n stillShowZeroSum: false,\n showEmptyCircle: false,\n label: { show: false },\n labelLine: { show: false },\n emphasis: { disabled: true },\n // Unit weights avoid overflow when finite raw values approach Number.MAX_VALUE.\n data: [\n { id: 'completed', value: model.ratio, itemStyle: { color: tokens.series[0] } },\n { id: 'remaining', value: 1 - model.ratio, itemStyle: { color: tokens.border } },\n ],\n },\n ],\n };\n}\n","import { InjectionToken } from '@angular/core';\nimport type { ɵPlotRendererFactory } from '@mantha911/ng-echarts/core';\nimport type { RadialOption } from './radial-options';\nexport const RADIAL_RENDERER_LOADER = new InjectionToken<\n () => Promise<ɵPlotRendererFactory<RadialOption>>\n>('Radial progress renderer loader', {\n providedIn: 'root',\n factory: () => () => import('./radial-renderer').then((m) => m.createRadialRenderer),\n});\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n afterNextRender,\n afterRenderEffect,\n ApplicationRef,\n ChangeDetectionStrategy,\n Component,\n computed,\n DestroyRef,\n effect,\n ElementRef,\n inject,\n input,\n PLATFORM_ID,\n signal,\n viewChild,\n} from '@angular/core';\nimport {\n ChartFrame,\n ɵChartStage,\n ɵPlotController,\n ɵChartFocusKeeper,\n ɵbrowserPlotEnvironment,\n ɵreadCartesianTheme,\n ɵdefaultCartesianTheme,\n ɵcreateValueFormatting,\n ɵresolveCartesianState,\n type ɵCartesianThemeTokens,\n type ChartTheme,\n type ValueFormatter,\n} from '@mantha911/ng-echarts/core';\nimport { normalizeRadialProgress } from './radial-model';\nimport { buildRadialOptions, type RadialOption } from './radial-options';\nimport { RADIAL_RENDERER_LOADER } from './radial-browser';\n@Component({\n selector: 'nec-radial-progress',\n imports: [ChartFrame, ɵChartStage],\n templateUrl: './radial-progress.html',\n styleUrl: './radial-progress.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class RadialProgress {\n readonly title = input.required<string>();\n readonly description = input('');\n readonly value = input.required<number | null>();\n readonly max = input(100);\n readonly height = input(240);\n readonly theme = input<ChartTheme>('light');\n readonly themeRevision = input(0);\n readonly locale = input('en-US');\n readonly numberFormatOptions = input<Intl.NumberFormatOptions>();\n readonly valueFormatter = input<ValueFormatter>();\n readonly loading = input(false);\n readonly error = input<string | null>(null);\n readonly animation = input(true);\n\n private readonly loader = inject(RADIAL_RENDERER_LOADER);\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly destroyRef = inject(DestroyRef);\n private readonly application = inject(ApplicationRef);\n private readonly platform = inject(PLATFORM_ID);\n private readonly plot = viewChild.required<ElementRef<HTMLElement>>('plot');\n private readonly browserReady = signal(false);\n private readonly reducedMotion = signal(false);\n private readonly measuredTheme = signal<ɵCartesianThemeTokens | null>(null);\n private controller: ɵPlotController<RadialOption> | null = null;\n private focusKeeper: ɵChartFocusKeeper | null = null;\n private removeMotionListener: (() => void) | null = null;\n protected readonly rendererError = signal(false);\n protected readonly model = computed(() => normalizeRadialProgress(this.value(), this.max()));\n private readonly formatting = computed(() => {\n const model = this.model();\n return ɵcreateValueFormatting(\n this.locale(),\n this.numberFormatOptions(),\n this.valueFormatter(),\n model.kind === 'ready' ? [model.value, model.max] : [],\n );\n });\n private readonly percentFormatting = computed(() => {\n try {\n return {\n format: new Intl.NumberFormat(this.locale(), { style: 'percent', maximumFractionDigits: 1 })\n .format,\n error: null,\n };\n } catch {\n return { format: () => '', error: 'The progress locale is invalid.' };\n }\n });\n private readonly settings = computed(() => ({\n title: this.title(),\n height: this.height(),\n theme: this.theme(),\n themeRevision: this.themeRevision(),\n animation: this.animation(),\n loading: this.loading(),\n error: this.error(),\n }));\n protected readonly tokens = computed(\n () => this.measuredTheme() ?? ɵdefaultCartesianTheme(this.theme()),\n );\n protected readonly plotHeight = computed(() =>\n Number.isFinite(this.height()) && this.height() > 0 ? this.height() : 240,\n );\n protected readonly state = computed(() => {\n const settings = this.settings();\n const configurationError =\n typeof settings.title !== 'string' || !settings.title.trim()\n ? 'Progress title must be nonempty text.'\n : !Number.isFinite(settings.height) || settings.height <= 0\n ? 'Progress height must be a positive, finite number.'\n : !['light', 'dark'].includes(settings.theme) || !Number.isFinite(settings.themeRevision)\n ? 'Progress theme configuration is invalid.'\n : typeof settings.animation !== 'boolean' || typeof settings.loading !== 'boolean'\n ? 'Progress animation and loading settings must be booleans.'\n : (this.formatting().error ?? this.percentFormatting().error);\n const state = ɵresolveCartesianState(\n settings.error,\n typeof settings.loading === 'boolean' && settings.loading,\n this.model(),\n this.rendererError(),\n configurationError,\n );\n return state.kind === 'loading'\n ? { ...state, message: 'Loading progress…' }\n : state.kind === 'empty'\n ? { ...state, message: 'No progress data available.' }\n : state;\n });\n protected readonly labels = computed(() => {\n const model = this.model();\n if (model.kind !== 'ready') return { percent: '', values: '', accessible: '' };\n const formatPercent = this.percentFormatting().format;\n const rounded = formatPercent(model.ratio);\n const percent =\n model.value > 0 && rounded === formatPercent(0)\n ? `<${formatPercent(0.001)}`\n : model.value < model.max && rounded === formatPercent(1)\n ? `>${formatPercent(0.999)}`\n : rounded;\n const values = `${this.formatting().format(model.value)} of ${this.formatting().format(model.max)}`;\n return { percent, values, accessible: `${percent}; ${values}` };\n });\n private readonly options = computed(() => {\n const model = this.model();\n return this.state().kind === 'ready' && model.kind === 'ready'\n ? buildRadialOptions(model, this.tokens(), this.animation() && !this.reducedMotion())\n : null;\n });\n constructor() {\n effect(() => {\n this.model();\n this.settings();\n this.formatting();\n this.rendererError.set(false);\n });\n afterNextRender(() => {\n if (!isPlatformBrowser(this.platform)) return;\n void this.application.whenStable().then(() => {\n if (this.destroyRef.destroyed) return;\n try {\n const preference = window.matchMedia('(prefers-reduced-motion: reduce)');\n this.reducedMotion.set(preference.matches);\n const onMotion = (event: MediaQueryListEvent) => this.reducedMotion.set(event.matches);\n preference.addEventListener('change', onMotion);\n this.removeMotionListener = () => preference.removeEventListener('change', onMotion);\n this.controller = new ɵPlotController(\n this.plot().nativeElement,\n ɵbrowserPlotEnvironment(() => this.loader(), this.host.nativeElement),\n () => {},\n () => this.rendererError.set(true),\n );\n this.focusKeeper = new ɵChartFocusKeeper(this.host.nativeElement);\n this.browserReady.set(true);\n } catch {\n this.rendererError.set(true);\n }\n });\n });\n afterRenderEffect(() => {\n if (!this.browserReady()) return;\n const theme = this.theme();\n this.themeRevision();\n try {\n this.measuredTheme.set(\n ɵreadCartesianTheme<{ value: number }>(\n this.host.nativeElement,\n theme,\n [{ id: 'progress', key: 'value', label: this.title() }],\n this.plot().nativeElement,\n ),\n );\n } catch {\n this.rendererError.set(true);\n }\n });\n afterRenderEffect(() => {\n this.browserReady();\n this.controller?.update(this.options());\n });\n afterRenderEffect(() => {\n this.state();\n this.focusKeeper?.restore();\n });\n this.destroyRef.onDestroy(() => {\n this.removeMotionListener?.();\n this.controller?.destroy();\n this.focusKeeper?.destroy();\n });\n }\n protected retryRenderer(): void {\n this.rendererError.set(false);\n }\n}\n","<nec-chart-frame\n [title]=\"title()\"\n [description]=\"description()\"\n [style.--_nec-default-background]=\"tokens().background\"\n [style.--_nec-default-text]=\"tokens().text\"\n [style.--_nec-default-muted]=\"tokens().muted\"\n [style.--_nec-default-border]=\"tokens().border\"\n>\n @let currentState = state();\n\n @let current = model();\n @if (currentState.kind === 'ready' && current.kind === 'ready') {\n <progress\n class=\"native-progress\"\n [attr.aria-label]=\"title()\"\n [attr.value]=\"current.value\"\n [attr.max]=\"current.max\"\n [attr.aria-valuetext]=\"labels().accessible\"\n >\n {{ labels().accessible }}\n </progress>\n }\n <nec-chart-stage\n [state]=\"currentState\"\n [height]=\"plotHeight()\"\n [retryable]=\"rendererError()\"\n retryLabel=\"Retry progress\"\n (retry)=\"retryRenderer()\"\n >\n <div\n class=\"progress-surface\"\n [hidden]=\"currentState.kind !== 'ready'\"\n [style.height.px]=\"plotHeight()\"\n [style.--nec-progress-height]=\"plotHeight() + 'px'\"\n >\n <div #plot class=\"plot\" aria-hidden=\"true\"></div>\n @if (currentState.kind === 'ready') {\n <div class=\"progress-label\" aria-hidden=\"true\">\n <strong>{{ labels().percent }}</strong><span>{{ labels().values }}</span>\n </div>\n }\n </div>\n </nec-chart-stage>\n</nec-chart-frame>\n"],"mappings":";;;;AAUA,SAAgB,wBAAwB,OAAsB,KAAW;CACvE,IAAI,OAAO,QAAQ,YAAY,CAAC,OAAO,SAAS,GAAG,KAAK,OAAO,GAC7D,OAAO;EAAE,MAAM;EAAS,SAAS;CAAqD;CACxF,IAAI,UAAU,MAAM,OAAO,EAAE,MAAM,QAAO;CAC1C,IAAI,OAAO,UAAU,YAAY,CAAC,OAAO,SAAS,KAAK,KAAK,QAAQ,KAAK,QAAQ,KAC/E,OAAO;EAAE,MAAM;EAAS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AA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,gBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,SAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,OAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,WAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,MAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,QAAM,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"mantha911-ng-echarts-radial.mjs","names":[],"sources":["../../../projects/chart-library/radial/src/lib/radial-model.ts","../../../projects/chart-library/radial/src/lib/radial-options.ts","../../../projects/chart-library/radial/src/lib/radial-browser.ts","../../../projects/chart-library/radial/src/lib/radial-progress.ts","../../../projects/chart-library/radial/src/lib/radial-progress.html"],"sourcesContent":["export type RadialModel =\n | { readonly kind: 'error'; readonly message: string }\n | { readonly kind: 'empty' }\n | {\n readonly kind: 'ready';\n readonly value: number;\n readonly max: number;\n readonly ratio: number;\n };\n\nexport function normalizeRadialProgress(value: number | null, max: number): RadialModel {\n if (typeof max !== 'number' || !Number.isFinite(max) || max <= 0)\n return { kind: 'error', message: 'Progress maximum must be a positive, finite number.' };\n if (value === null) return { kind: 'empty' };\n if (typeof value !== 'number' || !Number.isFinite(value) || value < 0 || value > max)\n return { kind: 'error', message: 'Progress value must be between zero and its maximum.' };\n const normalized = value === 0 ? 0 : value;\n return { kind: 'ready', value: normalized, max, ratio: normalized / max };\n}\n","import type { PieSeriesOption } from 'echarts/charts';\nimport type { ComposeOption } from 'echarts/core';\nimport type { ɵCartesianThemeTokens } from '@mantha911/ng-echarts/core';\nimport type { RadialModel } from './radial-model';\nexport type RadialOption = ComposeOption<PieSeriesOption> & { readonly animation: boolean };\nexport function buildRadialOptions(\n model: Extract<RadialModel, { kind: 'ready' }>,\n tokens: ɵCartesianThemeTokens,\n animation: boolean,\n): RadialOption {\n return {\n animation,\n animationDuration: 300,\n animationDurationUpdate: 200,\n backgroundColor: tokens.background,\n series: [\n {\n id: 'progress',\n type: 'pie',\n silent: true,\n radius: ['68%', '80%'],\n center: ['50%', '50%'],\n startAngle: 90,\n clockwise: true,\n selectedMode: false,\n stillShowZeroSum: false,\n showEmptyCircle: false,\n label: { show: false },\n labelLine: { show: false },\n emphasis: { disabled: true },\n // Unit weights avoid overflow when finite raw values approach Number.MAX_VALUE.\n data: [\n { id: 'completed', value: model.ratio, itemStyle: { color: tokens.series[0] } },\n { id: 'remaining', value: 1 - model.ratio, itemStyle: { color: tokens.border } },\n ],\n },\n ],\n };\n}\n","import { InjectionToken } from '@angular/core';\nimport type { ɵPlotRendererFactory } from '@mantha911/ng-echarts/core';\nimport type { RadialOption } from './radial-options';\nexport const RADIAL_RENDERER_LOADER = new InjectionToken<\n () => Promise<ɵPlotRendererFactory<RadialOption>>\n>('Radial progress renderer loader', {\n providedIn: 'root',\n factory: () => () => import('./radial-renderer').then((m) => m.createRadialRenderer),\n});\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n afterNextRender,\n afterRenderEffect,\n ApplicationRef,\n ChangeDetectionStrategy,\n Component,\n computed,\n DestroyRef,\n ElementRef,\n inject,\n input,\n linkedSignal,\n PLATFORM_ID,\n signal,\n viewChild,\n} from '@angular/core';\nimport {\n ChartFrame,\n ɵChartStage,\n ɵPlotController,\n ɵChartFocusKeeper,\n ɵbrowserPlotEnvironment,\n ɵreadCartesianTheme,\n ɵdefaultCartesianTheme,\n ɵcreateValueFormatting,\n ɵresolveCartesianState,\n type ɵCartesianThemeTokens,\n type ChartTheme,\n type ValueFormatter,\n} from '@mantha911/ng-echarts/core';\nimport { normalizeRadialProgress } from './radial-model';\nimport { buildRadialOptions, type RadialOption } from './radial-options';\nimport { RADIAL_RENDERER_LOADER } from './radial-browser';\n@Component({\n selector: 'nec-radial-progress',\n imports: [ChartFrame, ɵChartStage],\n templateUrl: './radial-progress.html',\n styleUrl: './radial-progress.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class RadialProgress {\n readonly title = input.required<string>();\n readonly description = input('');\n readonly value = input.required<number | null>();\n readonly max = input(100);\n readonly height = input(240);\n readonly theme = input<ChartTheme>('light');\n readonly themeRevision = input(0);\n readonly locale = input('en-US');\n readonly numberFormatOptions = input<Intl.NumberFormatOptions>();\n readonly valueFormatter = input<ValueFormatter>();\n readonly loading = input(false);\n readonly error = input<string | null>(null);\n readonly animation = input(true);\n\n private readonly loader = inject(RADIAL_RENDERER_LOADER);\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly destroyRef = inject(DestroyRef);\n private readonly application = inject(ApplicationRef);\n private readonly platform = inject(PLATFORM_ID);\n private readonly plot = viewChild.required<ElementRef<HTMLElement>>('plot');\n private readonly browserReady = signal(false);\n private readonly reducedMotion = signal(false);\n private readonly measuredTheme = signal<ɵCartesianThemeTokens | null>(null);\n private controller: ɵPlotController<RadialOption> | null = null;\n private focusKeeper: ɵChartFocusKeeper | null = null;\n private removeMotionListener: (() => void) | null = null;\n // A failed renderer stays failed until retry or a relevant input changes.\n protected readonly rendererError = linkedSignal(() => {\n this.model();\n this.settings();\n this.formatting();\n return false;\n });\n protected readonly model = computed(() => normalizeRadialProgress(this.value(), this.max()));\n private readonly formatting = computed(() => {\n const model = this.model();\n return ɵcreateValueFormatting(\n this.locale(),\n this.numberFormatOptions(),\n this.valueFormatter(),\n model.kind === 'ready' ? [model.value, model.max] : [],\n );\n });\n private readonly percentFormatting = computed(() => {\n try {\n return {\n format: new Intl.NumberFormat(this.locale(), { style: 'percent', maximumFractionDigits: 1 })\n .format,\n error: null,\n };\n } catch {\n return { format: () => '', error: 'The progress locale is invalid.' };\n }\n });\n private readonly settings = computed(() => ({\n title: this.title(),\n height: this.height(),\n theme: this.theme(),\n themeRevision: this.themeRevision(),\n animation: this.animation(),\n loading: this.loading(),\n error: this.error(),\n }));\n protected readonly tokens = computed(\n () => this.measuredTheme() ?? ɵdefaultCartesianTheme(this.theme()),\n );\n protected readonly plotHeight = computed(() =>\n Number.isFinite(this.height()) && this.height() > 0 ? this.height() : 240,\n );\n protected readonly state = computed(() => {\n const settings = this.settings();\n const configurationError =\n typeof settings.title !== 'string' || !settings.title.trim()\n ? 'Progress title must be nonempty text.'\n : !Number.isFinite(settings.height) || settings.height <= 0\n ? 'Progress height must be a positive, finite number.'\n : !['light', 'dark'].includes(settings.theme) || !Number.isFinite(settings.themeRevision)\n ? 'Progress theme configuration is invalid.'\n : typeof settings.animation !== 'boolean' || typeof settings.loading !== 'boolean'\n ? 'Progress animation and loading settings must be booleans.'\n : (this.formatting().error ?? this.percentFormatting().error);\n const state = ɵresolveCartesianState(\n settings.error,\n typeof settings.loading === 'boolean' && settings.loading,\n this.model(),\n this.rendererError(),\n configurationError,\n );\n return state.kind === 'loading'\n ? { ...state, message: 'Loading progress…' }\n : state.kind === 'empty'\n ? { ...state, message: 'No progress data available.' }\n : state;\n });\n protected readonly labels = computed(() => {\n const model = this.model();\n if (model.kind !== 'ready') return { percent: '', values: '', accessible: '' };\n const formatPercent = this.percentFormatting().format;\n const rounded = formatPercent(model.ratio);\n const percent =\n model.value > 0 && rounded === formatPercent(0)\n ? `<${formatPercent(0.001)}`\n : model.value < model.max && rounded === formatPercent(1)\n ? `>${formatPercent(0.999)}`\n : rounded;\n const values = `${this.formatting().format(model.value)} of ${this.formatting().format(model.max)}`;\n return { percent, values, accessible: `${percent}; ${values}` };\n });\n private readonly options = computed(() => {\n const model = this.model();\n return this.state().kind === 'ready' && model.kind === 'ready'\n ? buildRadialOptions(model, this.tokens(), this.animation() && !this.reducedMotion())\n : null;\n });\n constructor() {\n afterNextRender(() => {\n if (!isPlatformBrowser(this.platform)) return;\n void this.application.whenStable().then(() => {\n if (this.destroyRef.destroyed) return;\n try {\n const preference = window.matchMedia('(prefers-reduced-motion: reduce)');\n this.reducedMotion.set(preference.matches);\n const onMotion = (event: MediaQueryListEvent) => this.reducedMotion.set(event.matches);\n preference.addEventListener('change', onMotion);\n this.removeMotionListener = () => preference.removeEventListener('change', onMotion);\n this.controller = new ɵPlotController(\n this.plot().nativeElement,\n ɵbrowserPlotEnvironment(() => this.loader(), this.host.nativeElement),\n () => {},\n () => this.rendererError.set(true),\n );\n this.focusKeeper = new ɵChartFocusKeeper(this.host.nativeElement);\n this.browserReady.set(true);\n } catch {\n this.rendererError.set(true);\n }\n });\n });\n // Resolving CSS colors writes a probe and immediately reads its computed color.\n afterRenderEffect({\n mixedReadWrite: () => {\n if (!this.browserReady()) return;\n const theme = this.theme();\n this.themeRevision();\n try {\n this.measuredTheme.set(\n ɵreadCartesianTheme<{ value: number }>(\n this.host.nativeElement,\n theme,\n [{ id: 'progress', key: 'value', label: this.title() }],\n this.plot().nativeElement,\n ),\n );\n } catch {\n this.rendererError.set(true);\n }\n },\n });\n // Option updates only schedule rendering or dispose the previous plot.\n afterRenderEffect({\n write: () => {\n this.browserReady();\n this.controller?.update(this.options());\n },\n });\n // Focus restoration checks current DOM ownership before changing focus.\n afterRenderEffect({\n mixedReadWrite: () => {\n this.state();\n this.focusKeeper?.restore();\n },\n });\n this.destroyRef.onDestroy(() => {\n this.removeMotionListener?.();\n this.controller?.destroy();\n this.focusKeeper?.destroy();\n });\n }\n protected retryRenderer(): void {\n this.rendererError.set(false);\n }\n}\n","<nec-chart-frame\n [title]=\"title()\"\n [description]=\"description()\"\n [style.--_nec-default-background]=\"tokens().background\"\n [style.--_nec-default-text]=\"tokens().text\"\n [style.--_nec-default-muted]=\"tokens().muted\"\n [style.--_nec-default-border]=\"tokens().border\"\n>\n @let currentState = state();\n\n @let current = model();\n @if (currentState.kind === 'ready' && current.kind === 'ready') {\n <progress\n class=\"native-progress\"\n [attr.aria-label]=\"title()\"\n [attr.value]=\"current.value\"\n [attr.max]=\"current.max\"\n [attr.aria-valuetext]=\"labels().accessible\"\n >\n {{ labels().accessible }}\n </progress>\n }\n <nec-chart-stage\n [state]=\"currentState\"\n [height]=\"plotHeight()\"\n [retryable]=\"rendererError()\"\n retryLabel=\"Retry progress\"\n (retry)=\"retryRenderer()\"\n >\n <div\n class=\"progress-surface\"\n [hidden]=\"currentState.kind !== 'ready'\"\n [style.height.px]=\"plotHeight()\"\n [style.--nec-progress-height]=\"plotHeight() + 'px'\"\n >\n <div #plot class=\"plot\" aria-hidden=\"true\"></div>\n @if (currentState.kind === 'ready') {\n <div class=\"progress-label\" aria-hidden=\"true\">\n <strong>{{ labels().percent }}</strong><span>{{ labels().values }}</span>\n </div>\n }\n </div>\n </nec-chart-stage>\n</nec-chart-frame>\n"],"mappings":";;;;AAUA,SAAgB,wBAAwB,OAAsB,KAAW;CACvE,IAAI,OAAO,QAAQ,YAAY,CAAC,OAAO,SAAS,GAAG,KAAK,OAAO,GAC7D,OAAO;EAAE,MAAM;EAAS,SAAS;CAAqD;CACxF,IAAI,UAAU,MAAM,OAAO,EAAE,MAAM,QAAO;CAC1C,IAAI,OAAO,UAAU,YAAY,CAAC,OAAO,SAAS,KAAK,KAAK,QAAQ,KAAK,QAAQ,KAC/E,OAAO;EAAE,MAAM;EAAS,SAAS;CAAsD;CACzF,MAAM,aAAa,UAAU,IAAI,IAAI;CACrC,OAAO;EAAE,MAAM;EAAS,OAAO;EAAY;EAAK,OAAO,aAAa;CAAG;AACzE;ACbA,SAAgB,mBACd,OACA,QACA,WAAkB;CAElB,OAAO;EACL;EACA,mBAAmB;EACnB,yBAAyB;EACzB,iBAAiB,OAAO;EACxB,QAAQ,CACN;GAC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A,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,OAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,WAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,MAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,QAAM,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isPlatformBrowser } from "@angular/common";
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
-
import { ApplicationRef, ChangeDetectionStrategy, Component, DestroyRef, ElementRef, InjectionToken, PLATFORM_ID, afterNextRender, afterRenderEffect, computed,
|
|
3
|
+
import { ApplicationRef, ChangeDetectionStrategy, Component, DestroyRef, ElementRef, InjectionToken, PLATFORM_ID, afterNextRender, afterRenderEffect, computed, inject, input, linkedSignal, output, signal, viewChild } from "@angular/core";
|
|
4
4
|
import { ChartFrame, ɵChartFocusKeeper, ɵChartStage, ɵPlotController, ɵbrowserPlotEnvironment, ɵcreateValueFormatting, ɵdefaultCartesianTheme, ɵreadCartesianTheme, ɵresolveCartesianState } from "@mantha911/ng-echarts/core";
|
|
5
5
|
function normalizeSankey(nodes, links) {
|
|
6
6
|
const error = (message) => ({
|
|
@@ -112,7 +112,12 @@ var SankeyChart = class SankeyChart {
|
|
|
112
112
|
focusKeeper = null;
|
|
113
113
|
removeMotionListener = null;
|
|
114
114
|
scrollViewport = scrollFlowViewport;
|
|
115
|
-
rendererError =
|
|
115
|
+
rendererError = linkedSignal(() => {
|
|
116
|
+
this.model();
|
|
117
|
+
this.settings();
|
|
118
|
+
this.formatting();
|
|
119
|
+
return false;
|
|
120
|
+
}, ...ngDevMode ? [{ debugName: "rendererError" }] : /* istanbul ignore next */ []);
|
|
116
121
|
model = computed(() => normalizeSankey(this.nodes(), this.links()), ...ngDevMode ? [{ debugName: "model" }] : /* istanbul ignore next */ []);
|
|
117
122
|
formatting = computed(() => {
|
|
118
123
|
const model = this.model();
|
|
@@ -204,12 +209,6 @@ var SankeyChart = class SankeyChart {
|
|
|
204
209
|
}
|
|
205
210
|
}
|
|
206
211
|
constructor() {
|
|
207
|
-
effect(() => {
|
|
208
|
-
this.model();
|
|
209
|
-
this.settings();
|
|
210
|
-
this.formatting();
|
|
211
|
-
this.rendererError.set(false);
|
|
212
|
-
});
|
|
213
212
|
afterNextRender(() => {
|
|
214
213
|
if (!isPlatformBrowser(this.platform)) return;
|
|
215
214
|
this.application.whenStable().then(() => {
|
|
@@ -228,7 +227,7 @@ var SankeyChart = class SankeyChart {
|
|
|
228
227
|
}
|
|
229
228
|
});
|
|
230
229
|
});
|
|
231
|
-
afterRenderEffect(() => {
|
|
230
|
+
afterRenderEffect({ mixedReadWrite: () => {
|
|
232
231
|
if (!this.browserReady()) return;
|
|
233
232
|
const theme = this.theme();
|
|
234
233
|
this.themeRevision();
|
|
@@ -241,17 +240,17 @@ var SankeyChart = class SankeyChart {
|
|
|
241
240
|
} catch {
|
|
242
241
|
this.rendererError.set(true);
|
|
243
242
|
}
|
|
244
|
-
});
|
|
245
|
-
afterRenderEffect(() => {
|
|
243
|
+
} });
|
|
244
|
+
afterRenderEffect({ write: () => {
|
|
246
245
|
this.browserReady();
|
|
247
246
|
this.controller?.update(this.options());
|
|
248
|
-
});
|
|
249
|
-
afterRenderEffect(() => {
|
|
247
|
+
} });
|
|
248
|
+
afterRenderEffect({ mixedReadWrite: () => {
|
|
250
249
|
this.state();
|
|
251
250
|
this.nodeRows();
|
|
252
251
|
this.linkRows();
|
|
253
252
|
this.focusKeeper?.restore();
|
|
254
|
-
});
|
|
253
|
+
} });
|
|
255
254
|
this.destroyRef.onDestroy(() => {
|
|
256
255
|
this.removeMotionListener?.();
|
|
257
256
|
this.controller?.destroy();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mantha911-ng-echarts-sankey.mjs","names":[],"sources":["../../../projects/chart-library/sankey/src/lib/sankey-model.ts","../../../projects/chart-library/sankey/src/lib/sankey-browser.ts","../../../projects/chart-library/sankey/src/lib/sankey-chart.ts","../../../projects/chart-library/sankey/src/lib/sankey-chart.html"],"sourcesContent":["export interface SankeyNode {\n readonly id: string;\n readonly label: string;\n}\nexport interface SankeyLink {\n readonly id: string;\n readonly source: string;\n readonly target: string;\n readonly value: number;\n}\nexport type SankeySelection<N extends SankeyNode, L extends SankeyLink> =\n | {\n readonly kind: 'node';\n readonly node: N;\n readonly incoming: number;\n readonly outgoing: number;\n readonly source: 'plot' | 'table';\n }\n | {\n readonly kind: 'link';\n readonly link: L;\n readonly value: number;\n readonly source: 'plot' | 'table';\n };\nexport interface FlowNode<N> {\n readonly row: N;\n readonly id: string;\n readonly label: string;\n readonly incoming: number;\n readonly outgoing: number;\n readonly depth: number;\n}\nexport type SankeyModel<N, L> =\n | { readonly kind: 'error'; readonly message: string }\n | {\n readonly kind: 'ready' | 'empty';\n readonly nodes: readonly FlowNode<N>[];\n readonly links: readonly L[];\n readonly maximum: number;\n };\n\n/** Validate identity and topology before any graph reaches the browser renderer. */\nexport function normalizeSankey<N extends SankeyNode, L extends SankeyLink>(\n nodes: readonly N[],\n links: readonly L[],\n): SankeyModel<N, L> {\n const error = (message: string): SankeyModel<N, L> => ({ kind: 'error', message });\n if (!Array.isArray(nodes) || !Array.isArray(links))\n return error('Sankey nodes and links must be arrays.');\n if (nodes.length > 24 || links.length > 60)\n return error('Sankey supports at most 24 nodes and 60 links.');\n const byId = new Map<\n string,\n {\n row: N;\n id: string;\n label: string;\n incoming: number;\n outgoing: number;\n depth: number;\n degree: number;\n next: string[];\n }\n >();\n for (const node of nodes) {\n if (\n !node ||\n typeof node.id !== 'string' ||\n !node.id.trim() ||\n typeof node.label !== 'string' ||\n !node.label.trim()\n )\n return error('Sankey nodes require nonempty text IDs and labels.');\n if (byId.has(node.id)) return error('Sankey node IDs must be unique.');\n byId.set(node.id, {\n row: node,\n id: node.id,\n label: node.label,\n incoming: 0,\n outgoing: 0,\n depth: 0,\n degree: 0,\n next: [],\n });\n }\n const ids = new Set<string>();\n const pairs = new Map<string, Set<string>>();\n let maximum = 0;\n for (const link of links) {\n if (!link || typeof link.id !== 'string' || !link.id.trim() || ids.has(link.id))\n return error('Sankey link IDs must be unique nonempty text.');\n ids.add(link.id);\n const from = byId.get(link.source),\n to = byId.get(link.target);\n if (!from || !to) return error('Sankey link endpoints must reference existing node IDs.');\n if (from === to) return error('Sankey self-links are not supported.');\n if (pairs.get(link.source)?.has(link.target))\n return error(\n 'Sankey allows one link per directed node pair; aggregate parallel links explicitly.',\n );\n if (!pairs.has(link.source)) pairs.set(link.source, new Set());\n pairs.get(link.source)!.add(link.target);\n if (typeof link.value !== 'number' || !Number.isFinite(link.value) || link.value < 0)\n return error('Sankey link values must be finite nonnegative numbers.');\n maximum = Math.max(maximum, link.value);\n from.outgoing += link.value;\n to.incoming += link.value;\n if (!Number.isFinite(from.outgoing) || !Number.isFinite(to.incoming))\n return error('Sankey node totals must remain finite.');\n from.next.push(link.target);\n to.degree++;\n }\n // Include zero-valued edges in cycle detection: topology never changes with weights.\n const queue = [...byId.values()].filter((n) => n.degree === 0);\n for (let i = 0; i < queue.length; i++) {\n const node = queue[i]!;\n for (const id of node.next) {\n const target = byId.get(id)!;\n target.depth = Math.max(target.depth, node.depth + 1);\n if (--target.degree === 0) queue.push(target);\n }\n }\n if (queue.length !== nodes.length)\n return error('Sankey links must form a directed acyclic graph.');\n if (links.some((link) => link.value > 0 && link.value / maximum === 0))\n return error('Sankey values span an unsupported numeric range.');\n return {\n kind: nodes.length ? 'ready' : 'empty',\n nodes: [...byId.values()].map(({ row, id, label, incoming, outgoing, depth }) => ({\n row,\n id,\n label,\n incoming,\n outgoing,\n depth,\n })),\n links,\n maximum,\n };\n}\n","import { InjectionToken } from '@angular/core';\nimport type { ɵPlotRendererFactory } from '@mantha911/ng-echarts/core';\nimport type { SankeyView } from './sankey-options';\nexport const SANKEY_RENDERER_LOADER = new InjectionToken<\n () => Promise<ɵPlotRendererFactory<SankeyView>>\n>('Sankey renderer loader', {\n providedIn: 'root',\n factory: () => () => import('./sankey-renderer').then((m) => m.createSankeyRenderer),\n});\n\n/** Consistent local keyboard scrolling, including WebKit's overflow-region behavior. */\nexport function scrollFlowViewport(event: KeyboardEvent): void {\n const viewport = event.currentTarget;\n if (\n event.defaultPrevented ||\n event.altKey ||\n event.ctrlKey ||\n event.metaKey ||\n event.target !== viewport ||\n !(viewport instanceof HTMLElement)\n )\n return;\n const maximum = viewport.scrollWidth - viewport.clientWidth;\n if (maximum <= 0) return;\n const step = Math.max(40, Math.min(160, viewport.clientWidth / 2));\n const next =\n event.key === 'ArrowRight'\n ? viewport.scrollLeft + step\n : event.key === 'ArrowLeft'\n ? viewport.scrollLeft - step\n : event.key === 'Home'\n ? 0\n : event.key === 'End'\n ? maximum\n : null;\n if (next === null) return;\n event.preventDefault();\n viewport.scrollLeft = Math.max(0, Math.min(maximum, next));\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n afterNextRender,\n afterRenderEffect,\n ApplicationRef,\n ChangeDetectionStrategy,\n Component,\n computed,\n DestroyRef,\n effect,\n ElementRef,\n inject,\n input,\n output,\n PLATFORM_ID,\n signal,\n viewChild,\n} from '@angular/core';\nimport {\n ChartFrame,\n ɵChartStage,\n ɵPlotController,\n ɵChartFocusKeeper,\n ɵbrowserPlotEnvironment,\n ɵreadCartesianTheme,\n ɵdefaultCartesianTheme,\n ɵcreateValueFormatting,\n ɵresolveCartesianState,\n type ɵCartesianThemeTokens,\n type ChartTheme,\n type ValueFormatter,\n} from '@mantha911/ng-echarts/core';\nimport {\n normalizeSankey,\n type SankeyNode,\n type SankeyLink,\n type SankeySelection,\n} from './sankey-model';\nimport type { SankeyView } from './sankey-options';\nimport { SANKEY_RENDERER_LOADER, scrollFlowViewport } from './sankey-browser';\n@Component({\n selector: 'nec-sankey-chart',\n imports: [ChartFrame, ɵChartStage],\n templateUrl: './sankey-chart.html',\n styleUrls: ['./sankey-chart.css', '../../../core/src/lib/chart-controls.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SankeyChart<N extends SankeyNode = SankeyNode, L extends SankeyLink = SankeyLink> {\n readonly title = input.required<string>();\n readonly description = input('');\n readonly valueLabel = input('Value');\n readonly nodes = input.required<readonly N[]>();\n readonly links = input.required<readonly L[]>();\n readonly select = output<SankeySelection<N, L>>();\n readonly theme = input<ChartTheme>('light');\n readonly themeRevision = input(0);\n readonly locale = input('en-US');\n readonly numberFormatOptions = input<Intl.NumberFormatOptions>();\n readonly valueFormatter = input<ValueFormatter>();\n readonly loading = input(false);\n readonly error = input<string | null>(null);\n readonly animation = input(true);\n\n private readonly loader = inject(SANKEY_RENDERER_LOADER);\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly destroyRef = inject(DestroyRef);\n private readonly application = inject(ApplicationRef);\n private readonly platform = inject(PLATFORM_ID);\n private readonly plot = viewChild.required<ElementRef<HTMLElement>>('plot');\n private readonly browserReady = signal(false);\n private readonly reducedMotion = signal(false);\n private readonly measuredTheme = signal<ɵCartesianThemeTokens | null>(null);\n private controller: ɵPlotController<SankeyView> | null = null;\n private focusKeeper: ɵChartFocusKeeper | null = null;\n private removeMotionListener: (() => void) | null = null;\n protected readonly scrollViewport = scrollFlowViewport;\n protected readonly rendererError = signal(false);\n protected readonly model = computed(() => normalizeSankey(this.nodes(), this.links()));\n private readonly formatting = computed(() => {\n const model = this.model();\n return ɵcreateValueFormatting(\n this.locale(),\n this.numberFormatOptions(),\n this.valueFormatter(),\n model.kind === 'error'\n ? []\n : [\n ...model.links.map((link) => link.value),\n ...model.nodes.flatMap((node) => [node.incoming, node.outgoing]),\n ],\n );\n });\n private readonly settings = computed(() => ({\n title: this.title(),\n valueLabel: this.valueLabel(),\n theme: this.theme(),\n themeRevision: this.themeRevision(),\n animation: this.animation(),\n loading: this.loading(),\n error: this.error(),\n }));\n protected readonly tokens = computed(\n () => this.measuredTheme() ?? ɵdefaultCartesianTheme(this.theme()),\n );\n protected readonly hasFlow = computed(() => {\n const model = this.model();\n return model.kind === 'ready' && model.maximum > 0;\n });\n protected readonly plotWidth = computed(() => {\n const model = this.model();\n return model.kind === 'error'\n ? 560\n : Math.max(560, (Math.max(0, ...model.nodes.map((n) => n.depth)) + 1) * 140);\n });\n protected readonly plotHeight = computed(() => {\n const model = this.model();\n return model.kind === 'error' ? 320 : Math.max(320, model.nodes.length * 28);\n });\n protected readonly nodeRows = computed(() => {\n const model = this.model();\n return model.kind === 'error'\n ? []\n : model.nodes.map((node) => ({\n ...node,\n incomingText: this.formatting().format(node.incoming),\n outgoingText: this.formatting().format(node.outgoing),\n }));\n });\n protected readonly linkRows = computed(() => {\n const model = this.model();\n return model.kind === 'error'\n ? []\n : model.links.map((link) => ({\n ...link,\n sourceLabel: model.nodes.find((n) => n.id === link.source)!.label,\n targetLabel: model.nodes.find((n) => n.id === link.target)!.label,\n text: this.formatting().format(link.value),\n }));\n });\n protected readonly state = computed(() => {\n const settings = this.settings();\n const configurationError =\n typeof settings.valueLabel !== 'string' || !settings.valueLabel.trim()\n ? 'Value label must be nonempty text.'\n : typeof settings.title !== 'string' || !settings.title.trim()\n ? 'Sankey title must be nonempty text.'\n : !['light', 'dark'].includes(settings.theme) || !Number.isFinite(settings.themeRevision)\n ? 'Sankey theme configuration is invalid.'\n : typeof settings.animation !== 'boolean' || typeof settings.loading !== 'boolean'\n ? 'Sankey animation and loading settings must be booleans.'\n : this.formatting().error;\n const state = ɵresolveCartesianState(\n settings.error,\n typeof settings.loading === 'boolean' && settings.loading,\n this.model(),\n this.rendererError(),\n configurationError,\n );\n return state.kind === 'loading'\n ? { ...state, message: 'Loading flows…' }\n : state.kind === 'empty'\n ? { ...state, message: 'No flow nodes available.' }\n : state;\n });\n private readonly options = computed<SankeyView | null>(() => {\n const model = this.model();\n return this.state().kind === 'ready' && model.kind === 'ready' && this.hasFlow()\n ? {\n nodes: model.nodes,\n links: model.links,\n maximum: model.maximum,\n tokens: this.tokens(),\n animation: this.animation() && !this.reducedMotion(),\n format: this.formatting().format,\n valueLabel: this.valueLabel(),\n }\n : null;\n });\n protected selectItem(id: string, kind: string, source: 'plot' | 'table'): void {\n const model = this.model();\n if (this.state().kind !== 'ready' || model.kind !== 'ready') return;\n if (kind === 'node') {\n const node = model.nodes.find((n) => n.id === id);\n if (node)\n this.select.emit({\n kind: 'node',\n node: node.row,\n incoming: node.incoming,\n outgoing: node.outgoing,\n source,\n });\n } else if (kind === 'link') {\n const link = model.links.find((l) => l.id === id);\n if (link) this.select.emit({ kind: 'link', link, value: link.value, source });\n }\n }\n constructor() {\n effect(() => {\n this.model();\n this.settings();\n this.formatting();\n this.rendererError.set(false);\n });\n afterNextRender(() => {\n if (!isPlatformBrowser(this.platform)) return;\n void this.application.whenStable().then(() => {\n if (this.destroyRef.destroyed) return;\n try {\n const preference = window.matchMedia('(prefers-reduced-motion: reduce)');\n this.reducedMotion.set(preference.matches);\n const onMotion = (event: MediaQueryListEvent) => this.reducedMotion.set(event.matches);\n preference.addEventListener('change', onMotion);\n this.removeMotionListener = () => preference.removeEventListener('change', onMotion);\n this.controller = new ɵPlotController(\n this.plot().nativeElement,\n ɵbrowserPlotEnvironment(() => this.loader(), this.host.nativeElement),\n (point) => this.selectItem(point.rowId, point.seriesId, 'plot'),\n () => this.rendererError.set(true),\n );\n this.focusKeeper = new ɵChartFocusKeeper(this.host.nativeElement);\n this.browserReady.set(true);\n } catch {\n this.rendererError.set(true);\n }\n });\n });\n afterRenderEffect(() => {\n if (!this.browserReady()) return;\n const theme = this.theme();\n this.themeRevision();\n try {\n this.measuredTheme.set(\n ɵreadCartesianTheme<{ value: number }>(\n this.host.nativeElement,\n theme,\n Array.from({ length: 4 }, (_, index) => ({\n id: `stage-${index}`,\n key: 'value' as const,\n label: `Stage ${index + 1}`,\n })),\n this.plot().nativeElement,\n ),\n );\n } catch {\n this.rendererError.set(true);\n }\n });\n afterRenderEffect(() => {\n this.browserReady();\n this.controller?.update(this.options());\n });\n afterRenderEffect(() => {\n this.state();\n this.nodeRows();\n this.linkRows();\n this.focusKeeper?.restore();\n });\n this.destroyRef.onDestroy(() => {\n this.removeMotionListener?.();\n this.controller?.destroy();\n this.focusKeeper?.destroy();\n });\n }\n protected retryRenderer(): void {\n this.rendererError.set(false);\n }\n}\n","<nec-chart-frame\n [title]=\"title()\"\n [description]=\"description()\"\n [style.--_nec-default-background]=\"tokens().background\"\n [style.--_nec-default-text]=\"tokens().text\"\n [style.--_nec-default-muted]=\"tokens().muted\"\n [style.--_nec-default-border]=\"tokens().border\"\n>\n @let currentState = state();\n\n <nec-chart-stage\n [state]=\"currentState\"\n [height]=\"plotHeight()\"\n [retryable]=\"rendererError()\"\n retryLabel=\"Retry flows\"\n (retry)=\"retryRenderer()\"\n >\n <div\n class=\"flow-viewport\"\n tabindex=\"0\"\n (keydown)=\"scrollViewport($event)\"\n role=\"region\"\n aria-label=\"Flow diagram. Scroll horizontally for wider graphs.\"\n [hidden]=\"currentState.kind !== 'ready' || !hasFlow()\"\n >\n <div\n #plot\n class=\"plot\"\n aria-hidden=\"true\"\n [style.min-width.px]=\"plotWidth()\"\n [style.height.px]=\"plotHeight()\"\n ></div>\n </div>\n @if (currentState.kind === 'ready' && !hasFlow()) {\n <p class=\"plot-message\" role=\"status\">\n No positive flow to draw. Recorded zeros and isolated nodes remain in the tables.\n </p>\n }\n </nec-chart-stage>\n <div\n class=\"chart-controls\"\n [attr.inert]=\"currentState.kind !== 'ready' ? '' : null\"\n [attr.aria-hidden]=\"currentState.kind !== 'ready' ? 'true' : null\"\n >\n <p class=\"flow-scroll-hint\">\n Scroll to explore all stages. You can also focus the diagram and use the arrow keys.\n </p>\n\n <details class=\"flow-data\">\n <summary class=\"table-toggle\">Explore flow data</summary>\n <p class=\"table-help\">\n Ribbon width represents link value. Node height represents the larger incoming or outgoing\n total; totals can differ. Zero links and isolated nodes appear only in these tables. Scroll\n the diagram on narrow screens.\n </p>\n @if (currentState.kind === 'ready') {\n <div class=\"table-scroll\" tabindex=\"0\" role=\"region\" aria-label=\"Node totals\">\n <table>\n <caption>\n {{\n title()\n }}\n — Nodes\n </caption>\n <thead>\n <tr>\n <th scope=\"col\">Node</th>\n <th scope=\"col\">Incoming</th>\n <th scope=\"col\">Outgoing</th>\n </tr>\n </thead>\n <tbody>\n @for (node of nodeRows(); track node.id) {\n <tr>\n <th scope=\"row\">\n <button\n type=\"button\"\n [attr.aria-label]=\"'Select node ' + node.label\"\n (click)=\"selectItem(node.id, 'node', 'table')\"\n >\n {{ node.label }}\n </button>\n </th>\n <td>{{ node.incomingText }}</td>\n <td>{{ node.outgoingText }}</td>\n </tr>\n }\n </tbody>\n </table>\n </div>\n <div class=\"table-scroll\" tabindex=\"0\" role=\"region\" aria-label=\"Flow links\">\n <table>\n <caption>\n {{\n title()\n }}\n — Links\n </caption>\n <thead>\n <tr>\n <th scope=\"col\">From</th>\n <th scope=\"col\">To</th>\n <th scope=\"col\">Value</th>\n </tr>\n </thead>\n <tbody>\n @for (link of linkRows(); track link.id) {\n <tr>\n <th scope=\"row\">{{ link.sourceLabel }}</th>\n <td>{{ link.targetLabel }}</td>\n <td>\n <button\n type=\"button\"\n [attr.aria-label]=\"\n 'Select flow ' +\n link.sourceLabel +\n ' to ' +\n link.targetLabel +\n ': ' +\n link.text\n \"\n (click)=\"selectItem(link.id, 'link', 'table')\"\n >\n {{ link.text }}\n </button>\n </td>\n </tr>\n }\n </tbody>\n </table>\n </div>\n }\n </details>\n </div>\n</nec-chart-frame>\n"],"mappings":";;;;AA0CA,SAAgB,gBACd,OACA,OAAmB;CAEnB,MAAM,SAAS,aAAwC;EAAE,MAAM;EAAS;CAAO;CAC/E,IAAI,CAAC,MAAM,QAAQ,KA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A;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,OAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,WAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,MAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,QAAM,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"mantha911-ng-echarts-sankey.mjs","names":[],"sources":["../../../projects/chart-library/sankey/src/lib/sankey-model.ts","../../../projects/chart-library/sankey/src/lib/sankey-browser.ts","../../../projects/chart-library/sankey/src/lib/sankey-chart.ts","../../../projects/chart-library/sankey/src/lib/sankey-chart.html"],"sourcesContent":["export interface SankeyNode {\n readonly id: string;\n readonly label: string;\n}\nexport interface SankeyLink {\n readonly id: string;\n readonly source: string;\n readonly target: string;\n readonly value: number;\n}\nexport type SankeySelection<N extends SankeyNode, L extends SankeyLink> =\n | {\n readonly kind: 'node';\n readonly node: N;\n readonly incoming: number;\n readonly outgoing: number;\n readonly source: 'plot' | 'table';\n }\n | {\n readonly kind: 'link';\n readonly link: L;\n readonly value: number;\n readonly source: 'plot' | 'table';\n };\nexport interface FlowNode<N> {\n readonly row: N;\n readonly id: string;\n readonly label: string;\n readonly incoming: number;\n readonly outgoing: number;\n readonly depth: number;\n}\nexport type SankeyModel<N, L> =\n | { readonly kind: 'error'; readonly message: string }\n | {\n readonly kind: 'ready' | 'empty';\n readonly nodes: readonly FlowNode<N>[];\n readonly links: readonly L[];\n readonly maximum: number;\n };\n\n/** Validate identity and topology before any graph reaches the browser renderer. */\nexport function normalizeSankey<N extends SankeyNode, L extends SankeyLink>(\n nodes: readonly N[],\n links: readonly L[],\n): SankeyModel<N, L> {\n const error = (message: string): SankeyModel<N, L> => ({ kind: 'error', message });\n if (!Array.isArray(nodes) || !Array.isArray(links))\n return error('Sankey nodes and links must be arrays.');\n if (nodes.length > 24 || links.length > 60)\n return error('Sankey supports at most 24 nodes and 60 links.');\n const byId = new Map<\n string,\n {\n row: N;\n id: string;\n label: string;\n incoming: number;\n outgoing: number;\n depth: number;\n degree: number;\n next: string[];\n }\n >();\n for (const node of nodes) {\n if (\n !node ||\n typeof node.id !== 'string' ||\n !node.id.trim() ||\n typeof node.label !== 'string' ||\n !node.label.trim()\n )\n return error('Sankey nodes require nonempty text IDs and labels.');\n if (byId.has(node.id)) return error('Sankey node IDs must be unique.');\n byId.set(node.id, {\n row: node,\n id: node.id,\n label: node.label,\n incoming: 0,\n outgoing: 0,\n depth: 0,\n degree: 0,\n next: [],\n });\n }\n const ids = new Set<string>();\n const pairs = new Map<string, Set<string>>();\n let maximum = 0;\n for (const link of links) {\n if (!link || typeof link.id !== 'string' || !link.id.trim() || ids.has(link.id))\n return error('Sankey link IDs must be unique nonempty text.');\n ids.add(link.id);\n const from = byId.get(link.source),\n to = byId.get(link.target);\n if (!from || !to) return error('Sankey link endpoints must reference existing node IDs.');\n if (from === to) return error('Sankey self-links are not supported.');\n if (pairs.get(link.source)?.has(link.target))\n return error(\n 'Sankey allows one link per directed node pair; aggregate parallel links explicitly.',\n );\n if (!pairs.has(link.source)) pairs.set(link.source, new Set());\n pairs.get(link.source)!.add(link.target);\n if (typeof link.value !== 'number' || !Number.isFinite(link.value) || link.value < 0)\n return error('Sankey link values must be finite nonnegative numbers.');\n maximum = Math.max(maximum, link.value);\n from.outgoing += link.value;\n to.incoming += link.value;\n if (!Number.isFinite(from.outgoing) || !Number.isFinite(to.incoming))\n return error('Sankey node totals must remain finite.');\n from.next.push(link.target);\n to.degree++;\n }\n // Include zero-valued edges in cycle detection: topology never changes with weights.\n const queue = [...byId.values()].filter((n) => n.degree === 0);\n for (let i = 0; i < queue.length; i++) {\n const node = queue[i]!;\n for (const id of node.next) {\n const target = byId.get(id)!;\n target.depth = Math.max(target.depth, node.depth + 1);\n if (--target.degree === 0) queue.push(target);\n }\n }\n if (queue.length !== nodes.length)\n return error('Sankey links must form a directed acyclic graph.');\n if (links.some((link) => link.value > 0 && link.value / maximum === 0))\n return error('Sankey values span an unsupported numeric range.');\n return {\n kind: nodes.length ? 'ready' : 'empty',\n nodes: [...byId.values()].map(({ row, id, label, incoming, outgoing, depth }) => ({\n row,\n id,\n label,\n incoming,\n outgoing,\n depth,\n })),\n links,\n maximum,\n };\n}\n","import { InjectionToken } from '@angular/core';\nimport type { ɵPlotRendererFactory } from '@mantha911/ng-echarts/core';\nimport type { SankeyView } from './sankey-options';\nexport const SANKEY_RENDERER_LOADER = new InjectionToken<\n () => Promise<ɵPlotRendererFactory<SankeyView>>\n>('Sankey renderer loader', {\n providedIn: 'root',\n factory: () => () => import('./sankey-renderer').then((m) => m.createSankeyRenderer),\n});\n\n/** Consistent local keyboard scrolling, including WebKit's overflow-region behavior. */\nexport function scrollFlowViewport(event: KeyboardEvent): void {\n const viewport = event.currentTarget;\n if (\n event.defaultPrevented ||\n event.altKey ||\n event.ctrlKey ||\n event.metaKey ||\n event.target !== viewport ||\n !(viewport instanceof HTMLElement)\n )\n return;\n const maximum = viewport.scrollWidth - viewport.clientWidth;\n if (maximum <= 0) return;\n const step = Math.max(40, Math.min(160, viewport.clientWidth / 2));\n const next =\n event.key === 'ArrowRight'\n ? viewport.scrollLeft + step\n : event.key === 'ArrowLeft'\n ? viewport.scrollLeft - step\n : event.key === 'Home'\n ? 0\n : event.key === 'End'\n ? maximum\n : null;\n if (next === null) return;\n event.preventDefault();\n viewport.scrollLeft = Math.max(0, Math.min(maximum, next));\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n afterNextRender,\n afterRenderEffect,\n ApplicationRef,\n ChangeDetectionStrategy,\n Component,\n computed,\n DestroyRef,\n ElementRef,\n inject,\n input,\n linkedSignal,\n output,\n PLATFORM_ID,\n signal,\n viewChild,\n} from '@angular/core';\nimport {\n ChartFrame,\n ɵChartStage,\n ɵPlotController,\n ɵChartFocusKeeper,\n ɵbrowserPlotEnvironment,\n ɵreadCartesianTheme,\n ɵdefaultCartesianTheme,\n ɵcreateValueFormatting,\n ɵresolveCartesianState,\n type ɵCartesianThemeTokens,\n type ChartTheme,\n type ValueFormatter,\n} from '@mantha911/ng-echarts/core';\nimport {\n normalizeSankey,\n type SankeyNode,\n type SankeyLink,\n type SankeySelection,\n} from './sankey-model';\nimport type { SankeyView } from './sankey-options';\nimport { SANKEY_RENDERER_LOADER, scrollFlowViewport } from './sankey-browser';\n@Component({\n selector: 'nec-sankey-chart',\n imports: [ChartFrame, ɵChartStage],\n templateUrl: './sankey-chart.html',\n styleUrls: ['./sankey-chart.css', '../../../core/src/lib/chart-controls.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SankeyChart<N extends SankeyNode = SankeyNode, L extends SankeyLink = SankeyLink> {\n readonly title = input.required<string>();\n readonly description = input('');\n readonly valueLabel = input('Value');\n readonly nodes = input.required<readonly N[]>();\n readonly links = input.required<readonly L[]>();\n readonly select = output<SankeySelection<N, L>>();\n readonly theme = input<ChartTheme>('light');\n readonly themeRevision = input(0);\n readonly locale = input('en-US');\n readonly numberFormatOptions = input<Intl.NumberFormatOptions>();\n readonly valueFormatter = input<ValueFormatter>();\n readonly loading = input(false);\n readonly error = input<string | null>(null);\n readonly animation = input(true);\n\n private readonly loader = inject(SANKEY_RENDERER_LOADER);\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly destroyRef = inject(DestroyRef);\n private readonly application = inject(ApplicationRef);\n private readonly platform = inject(PLATFORM_ID);\n private readonly plot = viewChild.required<ElementRef<HTMLElement>>('plot');\n private readonly browserReady = signal(false);\n private readonly reducedMotion = signal(false);\n private readonly measuredTheme = signal<ɵCartesianThemeTokens | null>(null);\n private controller: ɵPlotController<SankeyView> | null = null;\n private focusKeeper: ɵChartFocusKeeper | null = null;\n private removeMotionListener: (() => void) | null = null;\n protected readonly scrollViewport = scrollFlowViewport;\n // A failed renderer stays failed until retry or a relevant input changes.\n protected readonly rendererError = linkedSignal(() => {\n this.model();\n this.settings();\n this.formatting();\n return false;\n });\n protected readonly model = computed(() => normalizeSankey(this.nodes(), this.links()));\n private readonly formatting = computed(() => {\n const model = this.model();\n return ɵcreateValueFormatting(\n this.locale(),\n this.numberFormatOptions(),\n this.valueFormatter(),\n model.kind === 'error'\n ? []\n : [\n ...model.links.map((link) => link.value),\n ...model.nodes.flatMap((node) => [node.incoming, node.outgoing]),\n ],\n );\n });\n private readonly settings = computed(() => ({\n title: this.title(),\n valueLabel: this.valueLabel(),\n theme: this.theme(),\n themeRevision: this.themeRevision(),\n animation: this.animation(),\n loading: this.loading(),\n error: this.error(),\n }));\n protected readonly tokens = computed(\n () => this.measuredTheme() ?? ɵdefaultCartesianTheme(this.theme()),\n );\n protected readonly hasFlow = computed(() => {\n const model = this.model();\n return model.kind === 'ready' && model.maximum > 0;\n });\n protected readonly plotWidth = computed(() => {\n const model = this.model();\n return model.kind === 'error'\n ? 560\n : Math.max(560, (Math.max(0, ...model.nodes.map((n) => n.depth)) + 1) * 140);\n });\n protected readonly plotHeight = computed(() => {\n const model = this.model();\n return model.kind === 'error' ? 320 : Math.max(320, model.nodes.length * 28);\n });\n protected readonly nodeRows = computed(() => {\n const model = this.model();\n return model.kind === 'error'\n ? []\n : model.nodes.map((node) => ({\n ...node,\n incomingText: this.formatting().format(node.incoming),\n outgoingText: this.formatting().format(node.outgoing),\n }));\n });\n protected readonly linkRows = computed(() => {\n const model = this.model();\n return model.kind === 'error'\n ? []\n : model.links.map((link) => ({\n ...link,\n sourceLabel: model.nodes.find((n) => n.id === link.source)!.label,\n targetLabel: model.nodes.find((n) => n.id === link.target)!.label,\n text: this.formatting().format(link.value),\n }));\n });\n protected readonly state = computed(() => {\n const settings = this.settings();\n const configurationError =\n typeof settings.valueLabel !== 'string' || !settings.valueLabel.trim()\n ? 'Value label must be nonempty text.'\n : typeof settings.title !== 'string' || !settings.title.trim()\n ? 'Sankey title must be nonempty text.'\n : !['light', 'dark'].includes(settings.theme) || !Number.isFinite(settings.themeRevision)\n ? 'Sankey theme configuration is invalid.'\n : typeof settings.animation !== 'boolean' || typeof settings.loading !== 'boolean'\n ? 'Sankey animation and loading settings must be booleans.'\n : this.formatting().error;\n const state = ɵresolveCartesianState(\n settings.error,\n typeof settings.loading === 'boolean' && settings.loading,\n this.model(),\n this.rendererError(),\n configurationError,\n );\n return state.kind === 'loading'\n ? { ...state, message: 'Loading flows…' }\n : state.kind === 'empty'\n ? { ...state, message: 'No flow nodes available.' }\n : state;\n });\n private readonly options = computed<SankeyView | null>(() => {\n const model = this.model();\n return this.state().kind === 'ready' && model.kind === 'ready' && this.hasFlow()\n ? {\n nodes: model.nodes,\n links: model.links,\n maximum: model.maximum,\n tokens: this.tokens(),\n animation: this.animation() && !this.reducedMotion(),\n format: this.formatting().format,\n valueLabel: this.valueLabel(),\n }\n : null;\n });\n protected selectItem(id: string, kind: string, source: 'plot' | 'table'): void {\n const model = this.model();\n if (this.state().kind !== 'ready' || model.kind !== 'ready') return;\n if (kind === 'node') {\n const node = model.nodes.find((n) => n.id === id);\n if (node)\n this.select.emit({\n kind: 'node',\n node: node.row,\n incoming: node.incoming,\n outgoing: node.outgoing,\n source,\n });\n } else if (kind === 'link') {\n const link = model.links.find((l) => l.id === id);\n if (link) this.select.emit({ kind: 'link', link, value: link.value, source });\n }\n }\n constructor() {\n afterNextRender(() => {\n if (!isPlatformBrowser(this.platform)) return;\n void this.application.whenStable().then(() => {\n if (this.destroyRef.destroyed) return;\n try {\n const preference = window.matchMedia('(prefers-reduced-motion: reduce)');\n this.reducedMotion.set(preference.matches);\n const onMotion = (event: MediaQueryListEvent) => this.reducedMotion.set(event.matches);\n preference.addEventListener('change', onMotion);\n this.removeMotionListener = () => preference.removeEventListener('change', onMotion);\n this.controller = new ɵPlotController(\n this.plot().nativeElement,\n ɵbrowserPlotEnvironment(() => this.loader(), this.host.nativeElement),\n (point) => this.selectItem(point.rowId, point.seriesId, 'plot'),\n () => this.rendererError.set(true),\n );\n this.focusKeeper = new ɵChartFocusKeeper(this.host.nativeElement);\n this.browserReady.set(true);\n } catch {\n this.rendererError.set(true);\n }\n });\n });\n // Resolving CSS colors writes a probe and immediately reads its computed color.\n afterRenderEffect({\n mixedReadWrite: () => {\n if (!this.browserReady()) return;\n const theme = this.theme();\n this.themeRevision();\n try {\n this.measuredTheme.set(\n ɵreadCartesianTheme<{ value: number }>(\n this.host.nativeElement,\n theme,\n Array.from({ length: 4 }, (_, index) => ({\n id: `stage-${index}`,\n key: 'value' as const,\n label: `Stage ${index + 1}`,\n })),\n this.plot().nativeElement,\n ),\n );\n } catch {\n this.rendererError.set(true);\n }\n },\n });\n // Option updates only schedule rendering or dispose the previous plot.\n afterRenderEffect({\n write: () => {\n this.browserReady();\n this.controller?.update(this.options());\n },\n });\n // Focus restoration checks current DOM ownership before changing focus.\n afterRenderEffect({\n mixedReadWrite: () => {\n this.state();\n this.nodeRows();\n this.linkRows();\n this.focusKeeper?.restore();\n },\n });\n this.destroyRef.onDestroy(() => {\n this.removeMotionListener?.();\n this.controller?.destroy();\n this.focusKeeper?.destroy();\n });\n }\n protected retryRenderer(): void {\n this.rendererError.set(false);\n }\n}\n","<nec-chart-frame\n [title]=\"title()\"\n [description]=\"description()\"\n [style.--_nec-default-background]=\"tokens().background\"\n [style.--_nec-default-text]=\"tokens().text\"\n [style.--_nec-default-muted]=\"tokens().muted\"\n [style.--_nec-default-border]=\"tokens().border\"\n>\n @let currentState = state();\n\n <nec-chart-stage\n [state]=\"currentState\"\n [height]=\"plotHeight()\"\n [retryable]=\"rendererError()\"\n retryLabel=\"Retry flows\"\n (retry)=\"retryRenderer()\"\n >\n <div\n class=\"flow-viewport\"\n tabindex=\"0\"\n (keydown)=\"scrollViewport($event)\"\n role=\"region\"\n aria-label=\"Flow diagram. Scroll horizontally for wider graphs.\"\n [hidden]=\"currentState.kind !== 'ready' || !hasFlow()\"\n >\n <div\n #plot\n class=\"plot\"\n aria-hidden=\"true\"\n [style.min-width.px]=\"plotWidth()\"\n [style.height.px]=\"plotHeight()\"\n ></div>\n </div>\n @if (currentState.kind === 'ready' && !hasFlow()) {\n <p class=\"plot-message\" role=\"status\">\n No positive flow to draw. Recorded zeros and isolated nodes remain in the tables.\n </p>\n }\n </nec-chart-stage>\n <div\n class=\"chart-controls\"\n [attr.inert]=\"currentState.kind !== 'ready' ? '' : null\"\n [attr.aria-hidden]=\"currentState.kind !== 'ready' ? 'true' : null\"\n >\n <p class=\"flow-scroll-hint\">\n Scroll to explore all stages. You can also focus the diagram and use the arrow keys.\n </p>\n\n <details class=\"flow-data\">\n <summary class=\"table-toggle\">Explore flow data</summary>\n <p class=\"table-help\">\n Ribbon width represents link value. Node height represents the larger incoming or outgoing\n total; totals can differ. Zero links and isolated nodes appear only in these tables. Scroll\n the diagram on narrow screens.\n </p>\n @if (currentState.kind === 'ready') {\n <div class=\"table-scroll\" tabindex=\"0\" role=\"region\" aria-label=\"Node totals\">\n <table>\n <caption>\n {{\n title()\n }}\n — Nodes\n </caption>\n <thead>\n <tr>\n <th scope=\"col\">Node</th>\n <th scope=\"col\">Incoming</th>\n <th scope=\"col\">Outgoing</th>\n </tr>\n </thead>\n <tbody>\n @for (node of nodeRows(); track node.id) {\n <tr>\n <th scope=\"row\">\n <button\n type=\"button\"\n [attr.aria-label]=\"'Select node ' + node.label\"\n (click)=\"selectItem(node.id, 'node', 'table')\"\n >\n {{ node.label }}\n </button>\n </th>\n <td>{{ node.incomingText }}</td>\n <td>{{ node.outgoingText }}</td>\n </tr>\n }\n </tbody>\n </table>\n </div>\n <div class=\"table-scroll\" tabindex=\"0\" role=\"region\" aria-label=\"Flow links\">\n <table>\n <caption>\n {{\n title()\n }}\n — Links\n </caption>\n <thead>\n <tr>\n <th scope=\"col\">From</th>\n <th scope=\"col\">To</th>\n <th scope=\"col\">Value</th>\n </tr>\n </thead>\n <tbody>\n @for (link of linkRows(); track link.id) {\n <tr>\n <th scope=\"row\">{{ link.sourceLabel }}</th>\n <td>{{ link.targetLabel }}</td>\n <td>\n <button\n type=\"button\"\n [attr.aria-label]=\"\n 'Select flow ' +\n link.sourceLabel +\n ' to ' +\n link.targetLabel +\n ': ' +\n link.text\n \"\n (click)=\"selectItem(link.id, 'link', 'table')\"\n >\n {{ link.text }}\n </button>\n </td>\n </tr>\n }\n </tbody>\n </table>\n </div>\n }\n </details>\n </div>\n</nec-chart-frame>\n"],"mappings":";;;;AA0CA,SAAgB,gBACd,OACA,OAAmB;CAEnB,MAAM,SAAS,aAAwC;EAAE,MAAM;EAAS;CAAO;CAC/E,IAAI,CAAC,MAAM,QAAQ,KAAK,KAAK,CAAC,MAAM,QAAQ,KAAK,GAC/C,OAAO,MAAM,wCAAwC;CACvD,IAAI,MAAM,SAAS,MAAM,MAAM,SAAS,IACtC,OAAO,MAAM,gDAAgD;CAC/D,MAAM,uBAAO,IAAI,IAAG;CAapB,KAAK,MAAM,QAAQ,OAAO;EACxB,IACE,CAAC,QACD,OAAO,KAAK,OAAO,YACnB,CAAC,KAAK,GAAG,KAAI,KACb,OAAO,KAAK,UAAU,YACtB,CAAC,KAAK,MAAM,KAAI,GAEhB,OAAO,MAAM,oDAAoD;EACnE,IAAI,KAAK,IAAI,KAAK,EAAE,GAAG,OAAO,MAAM,iCAAiC;EACrE,KAAK,IAAI,KAAK,IAAI;GAChB,KAAK;GACL,IAAI,KAAK;GACT,OAAO,KAAK;GACZ,UAAU;GACV,UAAU;GACV,OAAO;GACP,QAAQ;GACR,MAAM,CAAA;EACP,CAAA;CACH;CACA,MAAM,sBAAM,IAAI,IAAG;CACnB,MAAM,wBAAQ,IAAI,IAAG;CACrB,IAAI,UAAU;CACd,KAAK,MAAM,QAAQ,OAAO;EACxB,IAAI,CAAC,QAAQ,OAAO,KAAK,OAAO,YAAY,CAA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AA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,eAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,QAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,qBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,gBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,SAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,OAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,WAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,MAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,QAAM,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
|
package/package.json
CHANGED
|
@@ -5,11 +5,14 @@ import { ComposeOption } from "echarts/core";
|
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
interface ComposedBarSeries<T> extends ChartSeries$1<T> {
|
|
7
7
|
readonly kind: 'bar';
|
|
8
|
+
/** Bars with the same nonempty name stack by sign; omission keeps a grouped bar. */
|
|
9
|
+
readonly stack?: string;
|
|
8
10
|
readonly smooth?: never;
|
|
9
11
|
readonly showPoints?: never;
|
|
10
12
|
}
|
|
11
13
|
interface ComposedLineSeries<T> extends ChartSeries$1<T> {
|
|
12
14
|
readonly kind: 'line';
|
|
15
|
+
readonly stack?: never;
|
|
13
16
|
readonly smooth?: boolean;
|
|
14
17
|
readonly showPoints?: boolean;
|
|
15
18
|
}
|
|
@@ -281,6 +281,21 @@ declare class PlotController<Option> {
|
|
|
281
281
|
private disposeRenderer;
|
|
282
282
|
private cancelFrame;
|
|
283
283
|
}
|
|
284
|
+
/** Internal table window; paging never changes plot data or selection ownership. */
|
|
285
|
+
declare class TablePagination {
|
|
286
|
+
private readonly data;
|
|
287
|
+
private readonly pageSize;
|
|
288
|
+
readonly error: import("@angular/core").Signal<"Table page size must be a positive safe integer or null." | null>;
|
|
289
|
+
readonly total: import("@angular/core").Signal<number>;
|
|
290
|
+
private readonly requestedPage;
|
|
291
|
+
readonly count: import("@angular/core").Signal<number>;
|
|
292
|
+
readonly page: import("@angular/core").Signal<number>;
|
|
293
|
+
readonly start: import("@angular/core").Signal<number>;
|
|
294
|
+
readonly end: import("@angular/core").Signal<number>;
|
|
295
|
+
constructor(data: () => readonly unknown[], pageSize: () => number | null);
|
|
296
|
+
rows<T>(rows: readonly T[]): readonly T[];
|
|
297
|
+
move(delta: number): void;
|
|
298
|
+
}
|
|
284
299
|
/** Internal Cartesian behavior shared by the Cartesian entries; not a supported consumer API. */
|
|
285
300
|
declare abstract class CartesianChart<T extends object, Option, Series extends ChartSeries<T> = ChartSeries<T>> {
|
|
286
301
|
protected abstract renderer(): Promise<PlotRendererFactory<Option>>;
|
|
@@ -315,6 +330,7 @@ declare abstract class CartesianChart<T extends object, Option, Series extends C
|
|
|
315
330
|
readonly valueFormatter: import("@angular/core").InputSignal<ValueFormatter | undefined>;
|
|
316
331
|
readonly categoryTickFormatter: import("@angular/core").InputSignal<CategoryTickFormatter | undefined>;
|
|
317
332
|
readonly showDataTable: import("@angular/core").InputSignal<boolean>;
|
|
333
|
+
readonly tablePageSize: import("@angular/core").InputSignal<number | null>;
|
|
318
334
|
readonly loading: import("@angular/core").InputSignal<boolean>;
|
|
319
335
|
readonly error: import("@angular/core").InputSignal<string | null>;
|
|
320
336
|
readonly animation: import("@angular/core").InputSignal<boolean>;
|
|
@@ -335,6 +351,7 @@ declare abstract class CartesianChart<T extends object, Option, Series extends C
|
|
|
335
351
|
private removePreviewListeners;
|
|
336
352
|
protected readonly rendererError: import("@angular/core").WritableSignal<boolean>;
|
|
337
353
|
protected readonly tableExpanded: import("@angular/core").WritableSignal<boolean>;
|
|
354
|
+
protected readonly tablePagination: TablePagination;
|
|
338
355
|
protected readonly model: import("@angular/core").Signal<CartesianModel<T>>;
|
|
339
356
|
private readonly formatting;
|
|
340
357
|
private readonly categoryTicks;
|
|
@@ -444,6 +461,11 @@ declare abstract class CartesianChart<T extends object, Option, Series extends C
|
|
|
444
461
|
"required": false;
|
|
445
462
|
"isSignal": true;
|
|
446
463
|
};
|
|
464
|
+
"tablePageSize": {
|
|
465
|
+
"alias": "tablePageSize";
|
|
466
|
+
"required": false;
|
|
467
|
+
"isSignal": true;
|
|
468
|
+
};
|
|
447
469
|
"loading": {
|
|
448
470
|
"alias": "loading";
|
|
449
471
|
"required": false;
|
|
@@ -537,4 +559,21 @@ declare class ChartStage {
|
|
|
537
559
|
"retry": "retry";
|
|
538
560
|
}, never, ["*"], true, never>;
|
|
539
561
|
}
|
|
540
|
-
|
|
562
|
+
declare class TablePager {
|
|
563
|
+
readonly pagination: import("@angular/core").InputSignal<TablePagination>;
|
|
564
|
+
readonly label: import("@angular/core").InputSignal<string>;
|
|
565
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TablePager, never>;
|
|
566
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TablePager, "nec-table-pager", never, {
|
|
567
|
+
"pagination": {
|
|
568
|
+
"alias": "pagination";
|
|
569
|
+
"required": true;
|
|
570
|
+
"isSignal": true;
|
|
571
|
+
};
|
|
572
|
+
"label": {
|
|
573
|
+
"alias": "label";
|
|
574
|
+
"required": true;
|
|
575
|
+
"isSignal": true;
|
|
576
|
+
};
|
|
577
|
+
}, {}, never, never, true, never>;
|
|
578
|
+
}
|
|
579
|
+
export { type BarLayout, type CategoryTickFormatter, type CategoryVisibilityChange, type ChartMeasure, type ChartSeries, type ChartTheme, type LegendVisibilityChange, type NumericKey, type PointPreview, type PointSelection, type StringKey, type ValueFormatter, CartesianChart as ɵCartesianChart, type CartesianContext as ɵCartesianContext, type CartesianModel as ɵCartesianModel, type CartesianPoint as ɵCartesianPoint, type CartesianRow as ɵCartesianRow, type CartesianThemeTokens as ɵCartesianThemeTokens, ChartFocusKeeper as ɵChartFocusKeeper, ChartStage as ɵChartStage, type ChartState as ɵChartState, type CurveOption as ɵCurveOption, PlotController as ɵPlotController, type PlotEnvironment as ɵPlotEnvironment, type PlotPoint as ɵPlotPoint, type PlotRenderer as ɵPlotRenderer, type PlotRendererFactory as ɵPlotRendererFactory, TablePager as ɵTablePager, TablePagination as ɵTablePagination, browserPlotEnvironment as ɵbrowserPlotEnvironment, buildCartesianOptions as ɵbuildCartesianOptions, buildCurveOptions as ɵbuildCurveOptions, createValueFormatting as ɵcreateValueFormatting, curvePoint as ɵcurvePoint, defaultCartesianTheme as ɵdefaultCartesianTheme, escapeTooltipText as ɵescapeTooltipText, formatCategoryTicks as ɵformatCategoryTicks, normalizeCartesianData as ɵnormalizeCartesianData, readCartesianTheme as ɵreadCartesianTheme, resolveCartesianState as ɵresolveCartesianState, tooltipMarkup as ɵtooltipMarkup, tooltipStyle as ɵtooltipStyle };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CategoryVisibilityChange, CategoryVisibilityChange as CategoryVisibilityChange$1, ChartMeasure, ChartMeasure as ChartMeasure$1, ChartTheme, ChartTheme as ChartTheme$1, NumericKey, PointSelection, PointSelection as PointSelection$1, StringKey, StringKey as StringKey$1, ValueFormatter, ValueFormatter as ValueFormatter$1, ɵCartesianThemeTokens, ɵPlotPoint } from "@mantha911/ng-echarts/core";
|
|
1
|
+
import { CategoryVisibilityChange, CategoryVisibilityChange as CategoryVisibilityChange$1, ChartMeasure, ChartMeasure as ChartMeasure$1, ChartTheme, ChartTheme as ChartTheme$1, NumericKey, PointSelection, PointSelection as PointSelection$1, StringKey, StringKey as StringKey$1, ValueFormatter, ValueFormatter as ValueFormatter$1, ɵCartesianThemeTokens, ɵPlotPoint, ɵTablePagination } from "@mantha911/ng-echarts/core";
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export declare class PieChart<T extends object> {
|
|
4
4
|
private readonly loader;
|
|
@@ -18,6 +18,7 @@ export declare class PieChart<T extends object> {
|
|
|
18
18
|
readonly numberFormatOptions: import("@angular/core").InputSignal<Intl.NumberFormatOptions | undefined>;
|
|
19
19
|
readonly valueFormatter: import("@angular/core").InputSignal<ValueFormatter$1 | undefined>;
|
|
20
20
|
readonly showDataTable: import("@angular/core").InputSignal<boolean>;
|
|
21
|
+
readonly tablePageSize: import("@angular/core").InputSignal<number | null>;
|
|
21
22
|
readonly loading: import("@angular/core").InputSignal<boolean>;
|
|
22
23
|
readonly error: import("@angular/core").InputSignal<string | null>;
|
|
23
24
|
readonly animation: import("@angular/core").InputSignal<boolean>;
|
|
@@ -37,6 +38,7 @@ export declare class PieChart<T extends object> {
|
|
|
37
38
|
private focusKeeper;
|
|
38
39
|
protected readonly rendererError: import("@angular/core").WritableSignal<boolean>;
|
|
39
40
|
protected readonly tableExpanded: import("@angular/core").WritableSignal<boolean>;
|
|
41
|
+
protected readonly tablePagination: ɵTablePagination;
|
|
40
42
|
protected readonly model: import("@angular/core").Signal<import("@mantha911/ng-echarts/core").ɵCartesianModel<T>>;
|
|
41
43
|
private readonly formatting;
|
|
42
44
|
private readonly settings;
|
|
@@ -155,6 +157,11 @@ export declare class PieChart<T extends object> {
|
|
|
155
157
|
"required": false;
|
|
156
158
|
"isSignal": true;
|
|
157
159
|
};
|
|
160
|
+
"tablePageSize": {
|
|
161
|
+
"alias": "tablePageSize";
|
|
162
|
+
"required": false;
|
|
163
|
+
"isSignal": true;
|
|
164
|
+
};
|
|
158
165
|
"loading": {
|
|
159
166
|
"alias": "loading";
|
|
160
167
|
"required": false;
|