@acorex-platform/module-dashboard-management-client 0.0.46 → 0.0.48
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/{acorex-platform-module-dashboard-management-client-acorex-platform-module-dashboard-management-client-Ey27MqFo.mjs → acorex-platform-module-dashboard-management-client-acorex-platform-module-dashboard-management-client-61Q_QY8l.mjs} +18 -18
- package/fesm2022/{acorex-platform-module-dashboard-management-client-acorex-platform-module-dashboard-management-client-Ey27MqFo.mjs.map → acorex-platform-module-dashboard-management-client-acorex-platform-module-dashboard-management-client-61Q_QY8l.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-dashboard-management-client-bar-chart-widget.component-5c4X-lEC.mjs → acorex-platform-module-dashboard-management-client-bar-chart-widget.component-kw130ESN.mjs} +5 -5
- package/fesm2022/{acorex-platform-module-dashboard-management-client-bar-chart-widget.component-5c4X-lEC.mjs.map → acorex-platform-module-dashboard-management-client-bar-chart-widget.component-kw130ESN.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-dashboard-management-client-chart-card-widget.component-BYdlIBv9.mjs → acorex-platform-module-dashboard-management-client-chart-card-widget.component-B2ztaswG.mjs} +4 -4
- package/fesm2022/{acorex-platform-module-dashboard-management-client-chart-card-widget.component-BYdlIBv9.mjs.map → acorex-platform-module-dashboard-management-client-chart-card-widget.component-B2ztaswG.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-dashboard-management-client-chart-configurator-widget-edit.component-FhtkU52L.mjs → acorex-platform-module-dashboard-management-client-chart-configurator-widget-edit.component-BgR51eZ1.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-dashboard-management-client-chart-configurator-widget-edit.component-FhtkU52L.mjs.map → acorex-platform-module-dashboard-management-client-chart-configurator-widget-edit.component-BgR51eZ1.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-dashboard-management-client-chart-widget-data.util-DgCBHS1p.mjs → acorex-platform-module-dashboard-management-client-chart-widget-data.util-BLtv9sOm.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-dashboard-management-client-chart-widget-data.util-DgCBHS1p.mjs.map → acorex-platform-module-dashboard-management-client-chart-widget-data.util-BLtv9sOm.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-dashboard-management-client-donut-chart-widget.component-DRiIRbhX.mjs → acorex-platform-module-dashboard-management-client-donut-chart-widget.component-DB_7rLmK.mjs} +5 -5
- package/fesm2022/{acorex-platform-module-dashboard-management-client-donut-chart-widget.component-DRiIRbhX.mjs.map → acorex-platform-module-dashboard-management-client-donut-chart-widget.component-DB_7rLmK.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-dashboard-management-client-funnel-chart-widget.component-BPY1NchM.mjs → acorex-platform-module-dashboard-management-client-funnel-chart-widget.component-CltmXb8c.mjs} +5 -5
- package/fesm2022/{acorex-platform-module-dashboard-management-client-funnel-chart-widget.component-BPY1NchM.mjs.map → acorex-platform-module-dashboard-management-client-funnel-chart-widget.component-CltmXb8c.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-dashboard-management-client-gauge-chart-widget.component-Cy6fgife.mjs → acorex-platform-module-dashboard-management-client-gauge-chart-widget.component-Ci1cRFmt.mjs} +5 -5
- package/fesm2022/{acorex-platform-module-dashboard-management-client-gauge-chart-widget.component-Cy6fgife.mjs.map → acorex-platform-module-dashboard-management-client-gauge-chart-widget.component-Ci1cRFmt.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-dashboard-management-client-heatmap-chart-widget.component-CTelqGbm.mjs → acorex-platform-module-dashboard-management-client-heatmap-chart-widget.component-CzJTc6rm.mjs} +5 -5
- package/fesm2022/{acorex-platform-module-dashboard-management-client-heatmap-chart-widget.component-CTelqGbm.mjs.map → acorex-platform-module-dashboard-management-client-heatmap-chart-widget.component-CzJTc6rm.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-dashboard-management-client-index-P-PzUrbN.mjs → acorex-platform-module-dashboard-management-client-index-z10pHL3b.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-dashboard-management-client-index-P-PzUrbN.mjs.map → acorex-platform-module-dashboard-management-client-index-z10pHL3b.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-dashboard-management-client-line-chart-widget.component-B18VZb9t.mjs → acorex-platform-module-dashboard-management-client-line-chart-widget.component-Fu_lheQe.mjs} +5 -5
- package/fesm2022/{acorex-platform-module-dashboard-management-client-line-chart-widget.component-B18VZb9t.mjs.map → acorex-platform-module-dashboard-management-client-line-chart-widget.component-Fu_lheQe.mjs.map} +1 -1
- package/fesm2022/acorex-platform-module-dashboard-management-client.mjs +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-dashboard-management-client-donut-chart-widget.component-DRiIRbhX.mjs","sources":["../../../../libs/modules/dashboard-management/client/src/lib/features/shared/widgets/chart/donut-chart/donut-chart-widget.component.ts","../../../../libs/modules/dashboard-management/client/src/lib/features/shared/widgets/chart/donut-chart/donut-chart-widget.component.html"],"sourcesContent":["import { AXChartLegendComponent } from '@acorex/charts/chart-legend';\nimport { AXDonutChartComponent, AXDonutChartData, AXDonutChartOption } from '@acorex/charts/donut-chart';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\nimport { AXPQueryExecutor } from '@acorex-platform/framework-client/runtime';\nimport { ChangeDetectionStrategy, Component, computed, effect, inject, signal } from '@angular/core';\nimport { AXPDashboardWidgetComponent } from '../../dashboard-widget-base';\nimport { resolveChartQueryTabs } from '../chart-query-load.util';\nimport { loadDonutChartItems } from '../chart-widget-data.util';\nimport { AXPChartQueryTabsComponent } from '../chart-query-tabs.component';\nimport { AXP_CHART_LEGEND_OPTIONS_DONUT, omitChartFixedSize } from '../chart-legend.util';\n\n/**\n * Donut Chart Widget Component\n * Displays data in a circular donut chart with interactive segments\n */\n@Component({\n templateUrl: './donut-chart-widget.component.html',\n styleUrls: ['./donut-chart-widget.component.css'],\n imports: [AXDonutChartComponent, AXChartLegendComponent, AXPChartQueryTabsComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AXPDonutChartWidgetViewComponent extends AXPDashboardWidgetComponent {\n //#region ----- Services & Dependencies -----\n\n private readonly queryExecutor = inject(AXPQueryExecutor);\n private readonly translationService = inject(AXTranslationService);\n\n //#endregion\n\n //#region ----- Chart state -----\n\n protected data = signal<AXDonutChartData[]>([]);\n\n protected donutChartOptions = signal<AXDonutChartOption & { title: string }>(\n {} as AXDonutChartOption & { title: string },\n );\n\n protected readonly legendOptions = AXP_CHART_LEGEND_OPTIONS_DONUT;\n\n private labelResolveGeneration = 0;\n\n //#endregion\n\n //#region ----- Localization -----\n\n private async resolveChartOptionLabel(value: unknown): Promise<string> {\n if (value != null && typeof value === 'object' && !Array.isArray(value)) {\n return this.translationService.resolve(value as AXPMultiLanguageString);\n }\n const s = String(value ?? '');\n if (s.startsWith('@')) {\n return this.translationService.translateAsync(s);\n }\n return s;\n }\n\n /**\n * Resolves segment labels from plain text, @i18n keys, or multi-language maps.\n */\n private async resolveLocalizedChartText(value: unknown): Promise<string> {\n if (value == null) {\n return '';\n }\n if (typeof value === 'string') {\n if (value.startsWith('@')) {\n return this.translationService.translateAsync(value);\n }\n return value;\n }\n if (\n typeof value === 'object' &&\n !Array.isArray(value) &&\n this.translationService.isValidMultiLanguageObject(value)\n ) {\n return this.translationService.resolve(value as AXPMultiLanguageString);\n }\n return String(value);\n }\n\n private readonly resolveDonutOptionsEffect = effect(() => {\n const raw = this.options() as Record<string, unknown>;\n const generation = ++this.labelResolveGeneration;\n void (async () => {\n const title = await this.resolveChartOptionLabel(raw['title']);\n const totalLabel =\n raw['totalLabel'] !== undefined ? await this.resolveChartOptionLabel(raw['totalLabel']) : undefined;\n if (generation !== this.labelResolveGeneration) {\n return;\n }\n const base = omitChartFixedSize(raw) as unknown as AXDonutChartOption & { title: string };\n this.donutChartOptions.set({\n ...base,\n title,\n ...(totalLabel !== undefined ? { totalLabel } : {}),\n });\n })();\n });\n\n //#endregion\n\n //#region ----- Query tabs -----\n\n protected readonly queryTabs = computed(() =>\n resolveChartQueryTabs(this.options() as Record<string, unknown>, this.entityContext()?.entityId),\n );\n\n protected readonly activeTabIndex = signal(0);\n\n private readonly activeQuery = computed(() => {\n const tabs = this.queryTabs();\n if (tabs.length === 0) {\n return undefined;\n }\n const index = Math.min(Math.max(this.activeTabIndex(), 0), tabs.length - 1);\n return tabs[index];\n });\n\n protected selectQueryTab(index: number): void {\n this.activeTabIndex.set(index);\n }\n\n private readonly clampTabIndexEffect = effect(() => {\n const tabs = this.queryTabs();\n if (this.activeTabIndex() >= tabs.length) {\n this.activeTabIndex.set(0);\n }\n });\n\n //#endregion\n\n //#region ----- Query loading -----\n\n private readonly dataLoadEffect = effect(async () => {\n const opts = this.options() as Record<string, unknown>;\n const active = this.activeQuery();\n const items = await loadDonutChartItems(opts, {\n queryExecutor: this.queryExecutor,\n queryKey: active?.query,\n queryInput: active?.queryInput,\n });\n const resolved = await Promise.all(\n items.map(async (item) => ({\n ...item,\n label: await this.resolveLocalizedChartText(item.label),\n })),\n );\n this.data.set(resolved as AXDonutChartData[]);\n });\n\n //#endregion\n\n constructor() {\n super();\n this.setOptions({\n showDataLabels: false,\n donutWidth: 22,\n cornerRadius: 4,\n showTooltip: true,\n animationEasing: 'cubic-out',\n animationDuration: 800,\n ...omitChartFixedSize(this.options() as Record<string, unknown>),\n });\n this.donutChartOptions.set(\n omitChartFixedSize(this.options() as Record<string, unknown>) as unknown as AXDonutChartOption & {\n title: string;\n },\n );\n }\n\n handleDonutChartSegmentClick(_event: unknown) {\n // reserved for future drill-down\n }\n}\n","<div class=\"axp-chart-widget-host\">\n <axp-chart-query-tabs\n [tabs]=\"queryTabs()\"\n [activeIndex]=\"activeTabIndex()\"\n (activeIndexChange)=\"selectQueryTab($event)\"\n />\n <div class=\"axp-chart-widget-host__body axp-chart-widget-host__body--with-legend\">\n <div class=\"axp-chart-widget-host__chart axp-chart-widget-host__chart--radial\">\n <ax-donut-chart\n #chart\n [data]=\"data()\"\n [options]=\"donutChartOptions()\"\n (segmentClick)=\"handleDonutChartSegmentClick($event)\"\n ></ax-donut-chart>\n </div>\n <!-- ----- Series indicator (legend) ----- -->\n @if (data().length > 0) {\n <div class=\"axp-chart-widget-host__legend\">\n <ax-chart-legend [chart]=\"chart\" [options]=\"legendOptions\"></ax-chart-legend>\n </div>\n }\n </div>\n</div>\n"],"names":[],"mappings":";;;;;;;;;;AAYA;;;AAGG;AAOG,MAAO,gCAAiC,SAAQ,2BAA2B,CAAA;;;IAwBvE,MAAM,uBAAuB,CAAC,KAAc,EAAA;AAClD,QAAA,IAAI,KAAK,IAAI,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;YACvE,OAAO,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,KAA+B,CAAC;QACzE;QACA,MAAM,CAAC,GAAG,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC;AAC7B,QAAA,IAAI,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE;YACrB,OAAO,IAAI,CAAC,kBAAkB,CAAC,cAAc,CAAC,CAAC,CAAC;QAClD;AACA,QAAA,OAAO,CAAC;IACV;AAEA;;AAEG;IACK,MAAM,yBAAyB,CAAC,KAAc,EAAA;AACpD,QAAA,IAAI,KAAK,IAAI,IAAI,EAAE;AACjB,YAAA,OAAO,EAAE;QACX;AACA,QAAA,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AAC7B,YAAA,IAAI,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE;gBACzB,OAAO,IAAI,CAAC,kBAAkB,CAAC,cAAc,CAAC,KAAK,CAAC;YACtD;AACA,YAAA,OAAO,KAAK;QACd;QACA,IACE,OAAO,KAAK,KAAK,QAAQ;AACzB,YAAA,CAAC,KAAK,CAAC,OAAO,CAA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,IAAA,EAAA,gCAAgC,+FCtB7C,60BAuBA,EAAA,MAAA,EAAA,CAAA,w/PAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDJY,qBAAqB,EAAA,QAAA,EAAA,gBAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,SAAA,CAAA,EAAA,OAAA,EAAA,CAAA,cAAA,EAAA,cAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,sBAAsB,sJAAE,0BAA0B,EAAA,QAAA,EAAA,sBAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,aAAA,CAAA,EAAA,OAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAGxE,gCAAgC,EAAA,UAAA,EAAA,CAAA;kBAN5C,SAAS;8BAGC,CAAC,qBAAqB,EAAE,sBAAsB,EAAE,0BAA0B,CAAC,EAAA,eAAA,EACnE,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,60BAAA,EAAA,MAAA,EAAA,CAAA,w/PAAA,CAAA,EAAA;;;"}
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-dashboard-management-client-donut-chart-widget.component-DB_7rLmK.mjs","sources":["../../../../libs/modules/dashboard-management/client/src/lib/features/shared/widgets/chart/donut-chart/donut-chart-widget.component.ts","../../../../libs/modules/dashboard-management/client/src/lib/features/shared/widgets/chart/donut-chart/donut-chart-widget.component.html"],"sourcesContent":["import { AXChartLegendComponent } from '@acorex/charts/chart-legend';\nimport { AXDonutChartComponent, AXDonutChartData, AXDonutChartOption } from '@acorex/charts/donut-chart';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\nimport { AXPQueryExecutor } from '@acorex-platform/framework-client/runtime';\nimport { ChangeDetectionStrategy, Component, computed, effect, inject, signal } from '@angular/core';\nimport { AXPDashboardWidgetComponent } from '../../dashboard-widget-base';\nimport { resolveChartQueryTabs } from '../chart-query-load.util';\nimport { loadDonutChartItems } from '../chart-widget-data.util';\nimport { AXPChartQueryTabsComponent } from '../chart-query-tabs.component';\nimport { AXP_CHART_LEGEND_OPTIONS_DONUT, omitChartFixedSize } from '../chart-legend.util';\n\n/**\n * Donut Chart Widget Component\n * Displays data in a circular donut chart with interactive segments\n */\n@Component({\n templateUrl: './donut-chart-widget.component.html',\n styleUrls: ['./donut-chart-widget.component.css'],\n imports: [AXDonutChartComponent, AXChartLegendComponent, AXPChartQueryTabsComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AXPDonutChartWidgetViewComponent extends AXPDashboardWidgetComponent {\n //#region ----- Services & Dependencies -----\n\n private readonly queryExecutor = inject(AXPQueryExecutor);\n private readonly translationService = inject(AXTranslationService);\n\n //#endregion\n\n //#region ----- Chart state -----\n\n protected data = signal<AXDonutChartData[]>([]);\n\n protected donutChartOptions = signal<AXDonutChartOption & { title: string }>(\n {} as AXDonutChartOption & { title: string },\n );\n\n protected readonly legendOptions = AXP_CHART_LEGEND_OPTIONS_DONUT;\n\n private labelResolveGeneration = 0;\n\n //#endregion\n\n //#region ----- Localization -----\n\n private async resolveChartOptionLabel(value: unknown): Promise<string> {\n if (value != null && typeof value === 'object' && !Array.isArray(value)) {\n return this.translationService.resolve(value as AXPMultiLanguageString);\n }\n const s = String(value ?? '');\n if (s.startsWith('@')) {\n return this.translationService.translateAsync(s);\n }\n return s;\n }\n\n /**\n * Resolves segment labels from plain text, @i18n keys, or multi-language maps.\n */\n private async resolveLocalizedChartText(value: unknown): Promise<string> {\n if (value == null) {\n return '';\n }\n if (typeof value === 'string') {\n if (value.startsWith('@')) {\n return this.translationService.translateAsync(value);\n }\n return value;\n }\n if (\n typeof value === 'object' &&\n !Array.isArray(value) &&\n this.translationService.isValidMultiLanguageObject(value)\n ) {\n return this.translationService.resolve(value as AXPMultiLanguageString);\n }\n return String(value);\n }\n\n private readonly resolveDonutOptionsEffect = effect(() => {\n const raw = this.options() as Record<string, unknown>;\n const generation = ++this.labelResolveGeneration;\n void (async () => {\n const title = await this.resolveChartOptionLabel(raw['title']);\n const totalLabel =\n raw['totalLabel'] !== undefined ? await this.resolveChartOptionLabel(raw['totalLabel']) : undefined;\n if (generation !== this.labelResolveGeneration) {\n return;\n }\n const base = omitChartFixedSize(raw) as unknown as AXDonutChartOption & { title: string };\n this.donutChartOptions.set({\n ...base,\n title,\n ...(totalLabel !== undefined ? { totalLabel } : {}),\n });\n })();\n });\n\n //#endregion\n\n //#region ----- Query tabs -----\n\n protected readonly queryTabs = computed(() =>\n resolveChartQueryTabs(this.options() as Record<string, unknown>, this.entityContext()?.entityId),\n );\n\n protected readonly activeTabIndex = signal(0);\n\n private readonly activeQuery = computed(() => {\n const tabs = this.queryTabs();\n if (tabs.length === 0) {\n return undefined;\n }\n const index = Math.min(Math.max(this.activeTabIndex(), 0), tabs.length - 1);\n return tabs[index];\n });\n\n protected selectQueryTab(index: number): void {\n this.activeTabIndex.set(index);\n }\n\n private readonly clampTabIndexEffect = effect(() => {\n const tabs = this.queryTabs();\n if (this.activeTabIndex() >= tabs.length) {\n this.activeTabIndex.set(0);\n }\n });\n\n //#endregion\n\n //#region ----- Query loading -----\n\n private readonly dataLoadEffect = effect(async () => {\n const opts = this.options() as Record<string, unknown>;\n const active = this.activeQuery();\n const items = await loadDonutChartItems(opts, {\n queryExecutor: this.queryExecutor,\n queryKey: active?.query,\n queryInput: active?.queryInput,\n });\n const resolved = await Promise.all(\n items.map(async (item) => ({\n ...item,\n label: await this.resolveLocalizedChartText(item.label),\n })),\n );\n this.data.set(resolved as AXDonutChartData[]);\n });\n\n //#endregion\n\n constructor() {\n super();\n this.setOptions({\n showDataLabels: false,\n donutWidth: 22,\n cornerRadius: 4,\n showTooltip: true,\n animationEasing: 'cubic-out',\n animationDuration: 800,\n ...omitChartFixedSize(this.options() as Record<string, unknown>),\n });\n this.donutChartOptions.set(\n omitChartFixedSize(this.options() as Record<string, unknown>) as unknown as AXDonutChartOption & {\n title: string;\n },\n );\n }\n\n handleDonutChartSegmentClick(_event: unknown) {\n // reserved for future drill-down\n }\n}\n","<div class=\"axp-chart-widget-host\">\n <axp-chart-query-tabs\n [tabs]=\"queryTabs()\"\n [activeIndex]=\"activeTabIndex()\"\n (activeIndexChange)=\"selectQueryTab($event)\"\n />\n <div class=\"axp-chart-widget-host__body axp-chart-widget-host__body--with-legend\">\n <div class=\"axp-chart-widget-host__chart axp-chart-widget-host__chart--radial\">\n <ax-donut-chart\n #chart\n [data]=\"data()\"\n [options]=\"donutChartOptions()\"\n (segmentClick)=\"handleDonutChartSegmentClick($event)\"\n ></ax-donut-chart>\n </div>\n <!-- ----- Series indicator (legend) ----- -->\n @if (data().length > 0) {\n <div class=\"axp-chart-widget-host__legend\">\n <ax-chart-legend [chart]=\"chart\" [options]=\"legendOptions\"></ax-chart-legend>\n </div>\n }\n </div>\n</div>\n"],"names":[],"mappings":";;;;;;;;;;AAYA;;;AAGG;AAOG,MAAO,gCAAiC,SAAQ,2BAA2B,CAAA;;;IAwBvE,MAAM,uBAAuB,CAAC,KAAc,EAAA;AAClD,QAAA,IAAI,KAAK,IAAI,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;YACvE,OAAO,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,KAA+B,CAAC;QACzE;QACA,MAAM,CAAC,GAAG,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC;AAC7B,QAAA,IAAI,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE;YACrB,OAAO,IAAI,CAAC,kBAAkB,CAAC,cAAc,CAAC,CAAC,CAAC;QAClD;AACA,QAAA,OAAO,CAAC;IACV;AAEA;;AAEG;IACK,MAAM,yBAAyB,CAAC,KAAc,EAAA;AACpD,QAAA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as i0 from '@angular/core';
|
|
5
5
|
import { inject, signal, computed, effect, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
6
|
-
import { e as AXPDashboardWidgetComponent, f as resolveChartQueryTabs, g as AXPChartQueryTabsComponent } from './acorex-platform-module-dashboard-management-client-acorex-platform-module-dashboard-management-client-
|
|
7
|
-
import { b as loadFunnelChartItems } from './acorex-platform-module-dashboard-management-client-chart-widget-data.util-
|
|
6
|
+
import { e as AXPDashboardWidgetComponent, f as resolveChartQueryTabs, g as AXPChartQueryTabsComponent } from './acorex-platform-module-dashboard-management-client-acorex-platform-module-dashboard-management-client-61Q_QY8l.mjs';
|
|
7
|
+
import { b as loadFunnelChartItems } from './acorex-platform-module-dashboard-management-client-chart-widget-data.util-BLtv9sOm.mjs';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Funnel Chart Widget Component
|
|
@@ -124,12 +124,12 @@ class AXPFunnelChartWidgetViewComponent extends AXPDashboardWidgetComponent {
|
|
|
124
124
|
this.funnelOptions.set(this.options());
|
|
125
125
|
}
|
|
126
126
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPFunnelChartWidgetViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
127
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.8", type: AXPFunnelChartWidgetViewComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<div class=\"axp-chart-widget-host\">\n <axp-chart-query-tabs\n [tabs]=\"queryTabs()\"\n [activeIndex]=\"activeTabIndex()\"\n (activeIndexChange)=\"selectQueryTab($event)\"\n />\n <div class=\"axp-chart-widget-host__body\">\n <div class=\"axp-chart-widget-host__chart axp-chart-widget-host__chart--funnel\">\n <ax-funnel-chart [data]=\"data()\" [options]=\"funnelOptions()\"></ax-funnel-chart>\n </div>\n </div>\n</div>\n", styles: ["@layer properties;:host{display:block;width:100%;height:100%;min-height:0px;overflow:hidden}:host:has(.axp-chart-widget-host__chart--heatmap){block-size:auto;overflow:visible;min-block-size:0}.axp-chart-widget-host{display:flex;height:100%;min-height:0px;width:100%;flex-direction:column;gap:var(--spacing, .25rem)}.axp-chart-widget-host:has(.axp-chart-widget-host__chart--heatmap){block-size:auto;min-block-size:0;overflow:visible}.axp-chart-widget-host__body{display:flex;min-height:0px;flex:1;flex-direction:column;gap:var(--spacing, .25rem);padding-bottom:calc(var(--spacing, .25rem) * 2)}.axp-chart-widget-host__body:not(.axp-chart-widget-host__body--with-legend)>.axp-chart-widget-host__chart--radial{flex:1 1 auto}.axp-chart-widget-host__body--with-legend{min-height:0px;flex:1;gap:var(--spacing, .25rem);display:grid;grid-template-rows:minmax(0,1fr) auto}.axp-chart-widget-host__chart{position:relative;min-height:calc(var(--spacing, .25rem) * 64);width:100%;overflow:hidden;grid-row:1}.axp-chart-widget-host__chart--radial{position:relative;margin-inline:auto;align-self:center;justify-self:center;overflow:hidden;grid-row:1;flex:0 0 auto;height:auto;width:min(100%,18rem);max-width:100%;min-height:12rem;min-width:8rem;aspect-ratio:1 / 1}.axp-chart-widget-host__chart--funnel{position:relative;width:100%;overflow:hidden;block-size:20rem;flex:0 0 auto;max-block-size:24rem;min-block-size:16rem}.axp-chart-widget-host__chart--funnel ax-funnel-chart,.axp-chart-widget-host__chart--funnel .ax-funnel-chart-container{display:block;block-size:100%;inline-size:100%;min-block-size:0}.axp-chart-widget-host__body:has(.axp-chart-widget-host__chart--funnel){flex:none}.axp-chart-widget-host__chart--heatmap{position:relative;width:100%;max-width:100%;inline-size:100%;block-size:auto;flex:0 0 auto;overflow:visible;min-height:0!important;min-block-size:0!important;max-block-size:none}.axp-chart-widget-host__chart--heatmap ax-heatmap-chart,.axp-chart-widget-host__chart--heatmap .ax-heatmap-chart-container{display:block;inline-size:100%;max-inline-size:100%;block-size:auto;min-block-size:0;overflow:visible}.axp-chart-widget-host__body:has(.axp-chart-widget-host__chart--heatmap){flex:none;block-size:auto;min-block-size:0;overflow:visible}.axp-chart-widget-host__legend{width:100%;flex:none;grid-row:2;min-height:0;min-width:0;max-width:100%;display:flex;justify-content:flex-start;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;scrollbar-color:rgb(var(--ax-sys-color-border-lighter-surface)) transparent}:host ::ng-deep ax-chart-legend{display:block!important;height:auto!important;max-height:none;width:max-content;min-width:100%;max-width:none}:host ::ng-deep .ax-chart-legend{--ax-legend-bg: var(--ax-sys-color-lighter-surface);--ax-legend-text: var(--ax-sys-color-on-lighter-surface);--ax-legend-border: var(--ax-sys-color-border-lighter-surface);--ax-legend-radius: .625rem;--ax-legend-padding: .375rem .5rem;--ax-legend-gap: .375rem;--ax-legend-item-height: auto;height:auto;max-height:none;width:100%;overflow:visible;padding:var(--ax-legend-padding);gap:var(--ax-legend-gap);color:rgb(var(--ax-legend-text))}:host ::ng-deep .ax-chart-legend.ax-legend-horizontal{flex-direction:row;flex-wrap:nowrap;align-items:center;justify-content:flex-start;width:max-content;min-width:100%;max-width:none;overflow:visible;border:none;background:transparent;background-color:transparent;padding:.125rem .75rem .7rem;gap:.5rem}:host ::ng-deep .ax-legend-item{align-items:center;flex-shrink:0;gap:.375rem;height:auto;min-height:1.5rem;padding-block:.2rem;padding-inline:.5rem;border-radius:9999px;border:1px solid rgb(var(--ax-sys-color-border-lightest-surface));background-color:rgb(var(--ax-sys-color-lightest-surface));white-space:nowrap;transition:background-color .15s ease,border-color .15s ease,box-shadow .15s ease,opacity .15s ease,transform .15s ease}:host ::ng-deep .ax-legend-item:hover{border-color:rgb(var(--ax-sys-color-primary-500));background-color:rgb(var(--ax-sys-color-primary-500));box-shadow:0 1px 2px #0f172a0f}@supports (color: color-mix(in lab,red,red)){:host ::ng-deep .ax-legend-item:hover{border-color:color-mix(in srgb,rgb(var(--ax-sys-color-primary-500)) 35%,rgb(var(--ax-sys-color-border-lightest-surface)))}}@supports (color: color-mix(in lab,red,red)){:host ::ng-deep .ax-legend-item:hover{background-color:color-mix(in srgb,rgb(var(--ax-sys-color-primary-500)) 6%,rgb(var(--ax-sys-color-lightest-surface)))}}:host ::ng-deep .ax-legend-item:active{transform:scale(.98)}:host ::ng-deep .ax-legend-item.ax-legend-item-hidden{opacity:.62}:host ::ng-deep .ax-legend-color{width:.625rem;height:.625rem;flex-shrink:0;border-radius:9999px;box-shadow:0 0 0 1px rgb(var(--ax-legend-text))}@supports (color: color-mix(in lab,red,red)){:host ::ng-deep .ax-legend-color{box-shadow:0 0 0 1px color-mix(in srgb,rgb(var(--ax-legend-text)) 18%,transparent)}}:host ::ng-deep .ax-legend-name{font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);max-width:9rem;overflow:hidden;text-overflow:ellipsis}:host ::ng-deep .ax-legend-value{font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600);--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,);margin-inline-start:0;opacity:1;color:rgb(var(--ax-sys-color-on-lightest-surface))}:host ::ng-deep .ax-legend-percentage{margin-inline-start:0;border-radius:9999px;padding-inline:.4rem;padding-block:.125rem;font-size:.6875rem;line-height:1;font-weight:600;font-variant-numeric:tabular-nums;background-color:rgb(var(--ax-legend-text))}@supports (color: color-mix(in lab,red,red)){:host ::ng-deep .ax-legend-percentage{background-color:color-mix(in srgb,rgb(var(--ax-legend-text)) 12%,transparent)}}:host ::ng-deep ax-donut-chart,:host ::ng-deep ax-gauge-chart,:host ::ng-deep ax-bar-chart,:host ::ng-deep ax-line-chart,:host ::ng-deep ax-funnel-chart{display:block!important;width:100%!important;height:100%!important;min-height:0!important;max-height:100%!important}:host ::ng-deep .axp-chart-widget-host__chart--heatmap ax-heatmap-chart{display:block!important;width:100%!important;max-width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important}:host ::ng-deep ax-donut-chart .ax-donut-chart,:host ::ng-deep ax-gauge-chart .ax-gauge-chart,:host ::ng-deep ax-bar-chart .ax-bar-chart,:host ::ng-deep ax-line-chart .ax-line-chart,:host ::ng-deep ax-funnel-chart .ax-funnel-chart-container{min-height:0!important;height:100%!important;width:100%!important;padding:.25rem!important}:host ::ng-deep .axp-chart-widget-host__chart--heatmap ax-heatmap-chart .ax-heatmap-chart-container,:host ::ng-deep .axp-chart-widget-host__chart--heatmap .ax-heatmap-chart{min-height:0!important;height:auto!important;width:100%!important;max-width:100%!important;padding:.25rem!important;overflow:visible!important}:host ::ng-deep .axp-chart-widget-host__chart--heatmap svg{display:block;width:100%!important;max-width:100%!important;height:auto!important;overflow:visible!important}:host{display:block;width:100%;height:100%;min-height:0px}:host .axp-chart-widget-host{width:100%;height:100%;min-height:0px}:host ax-funnel-chart{display:block;width:100%;height:100%;min-height:0px}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@property --tw-ordinal{syntax: \"*\"; inherits: false;}@property --tw-slashed-zero{syntax: \"*\"; inherits: false;}@property --tw-numeric-figure{syntax: \"*\"; inherits: false;}@property --tw-numeric-spacing{syntax: \"*\"; inherits: false;}@property --tw-numeric-fraction{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight: initial;--tw-ordinal: initial;--tw-slashed-zero: initial;--tw-numeric-figure: initial;--tw-numeric-spacing: initial;--tw-numeric-fraction: initial}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: AXFunnelChartComponent, selector: "ax-funnel-chart", inputs: ["data", "options"], outputs: ["segmentClick"] }, { kind: "component", type: AXPChartQueryTabsComponent, selector: "axp-chart-query-tabs", inputs: ["tabs", "activeIndex"], outputs: ["activeIndexChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
127
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.8", type: AXPFunnelChartWidgetViewComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<div class=\"axp-chart-widget-host\">\n <axp-chart-query-tabs\n [tabs]=\"queryTabs()\"\n [activeIndex]=\"activeTabIndex()\"\n (activeIndexChange)=\"selectQueryTab($event)\"\n />\n <div class=\"axp-chart-widget-host__body\">\n <div class=\"axp-chart-widget-host__chart axp-chart-widget-host__chart--funnel\">\n <ax-funnel-chart [data]=\"data()\" [options]=\"funnelOptions()\"></ax-funnel-chart>\n </div>\n </div>\n</div>\n", styles: ["@layer properties;:host{display:block;width:100%;height:100%;min-height:0px;overflow:hidden}:host:has(.axp-chart-widget-host__chart--heatmap){block-size:auto;overflow:visible;min-block-size:0}.axp-chart-widget-host{display:flex;height:100%;min-height:0px;width:100%;flex-direction:column;gap:var(--spacing, .25rem)}.axp-chart-widget-host:has(.axp-chart-widget-host__chart--heatmap){block-size:auto;min-block-size:0;overflow:visible}.axp-chart-widget-host__body{display:flex;min-height:0px;flex:1;flex-direction:column;gap:var(--spacing, .25rem);padding-bottom:calc(var(--spacing, .25rem) * 2)}.axp-chart-widget-host__body:not(.axp-chart-widget-host__body--with-legend)>.axp-chart-widget-host__chart--radial{flex:1 1 auto}.axp-chart-widget-host__body--with-legend{min-height:0px;flex:1;gap:var(--spacing, .25rem);display:grid;grid-template-rows:minmax(0,1fr) auto}.axp-chart-widget-host__chart{position:relative;min-height:calc(var(--spacing, .25rem) * 64);width:100%;overflow:hidden;grid-row:1}.axp-chart-widget-host__chart--radial{position:relative;margin-inline:auto;align-self:center;justify-self:center;overflow:hidden;grid-row:1;flex:0 0 auto;height:auto;width:min(100%,18rem);max-width:100%;min-height:12rem;min-width:8rem;aspect-ratio:1 / 1}.axp-chart-widget-host__chart--funnel{position:relative;width:100%;overflow:hidden;block-size:20rem;flex:0 0 auto;max-block-size:24rem;min-block-size:16rem}.axp-chart-widget-host__chart--funnel ax-funnel-chart,.axp-chart-widget-host__chart--funnel .ax-funnel-chart-container{display:block;block-size:100%;inline-size:100%;min-block-size:0}.axp-chart-widget-host__body:has(.axp-chart-widget-host__chart--funnel){flex:none}.axp-chart-widget-host__chart--heatmap{position:relative;width:100%;max-width:100%;inline-size:100%;block-size:auto;flex:0 0 auto;overflow:visible;min-height:0!important;min-block-size:0!important;max-block-size:none}.axp-chart-widget-host__chart--heatmap ax-heatmap-chart,.axp-chart-widget-host__chart--heatmap .ax-heatmap-chart-container{display:block;inline-size:100%;max-inline-size:100%;block-size:auto;min-block-size:0;overflow:visible}.axp-chart-widget-host__body:has(.axp-chart-widget-host__chart--heatmap){flex:none;block-size:auto;min-block-size:0;overflow:visible}.axp-chart-widget-host__legend{width:100%;flex:none;grid-row:2;min-height:0;min-width:0;max-width:100%;display:flex;justify-content:flex-start;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;scrollbar-color:rgb(var(--ax-sys-color-border-lighter-surface)) transparent}:host ::ng-deep ax-chart-legend{display:block!important;height:auto!important;max-height:none;width:max-content;min-width:100%;max-width:none}:host ::ng-deep .ax-chart-legend{--ax-legend-bg: var(--ax-sys-color-lighter-surface);--ax-legend-text: var(--ax-sys-color-on-lighter-surface);--ax-legend-border: var(--ax-sys-color-border-lighter-surface);--ax-legend-radius: .625rem;--ax-legend-padding: .375rem .5rem;--ax-legend-gap: .375rem;--ax-legend-item-height: auto;height:auto;max-height:none;width:100%;overflow:visible;padding:var(--ax-legend-padding);gap:var(--ax-legend-gap);color:rgb(var(--ax-legend-text))}:host ::ng-deep .ax-chart-legend.ax-legend-horizontal{flex-direction:row;flex-wrap:nowrap;align-items:center;justify-content:flex-start;width:max-content;min-width:100%;max-width:none;overflow:visible;border:none;background:transparent;background-color:transparent;padding:.125rem .75rem .7rem;gap:.5rem}:host ::ng-deep .ax-legend-item{align-items:center;flex-shrink:0;gap:.375rem;height:auto;min-height:1.5rem;padding-block:.2rem;padding-inline:.5rem;border-radius:9999px;border:1px solid rgb(var(--ax-sys-color-border-lightest-surface));background-color:rgb(var(--ax-sys-color-lightest-surface));white-space:nowrap;transition:background-color .15s ease,border-color .15s ease,box-shadow .15s ease,opacity .15s ease,transform .15s ease}:host ::ng-deep .ax-legend-item:hover{border-color:rgb(var(--ax-sys-color-primary-500));background-color:rgb(var(--ax-sys-color-primary-500));box-shadow:0 1px 2px #0f172a0f}@supports (color: color-mix(in lab,red,red)){:host ::ng-deep .ax-legend-item:hover{border-color:color-mix(in srgb,rgb(var(--ax-sys-color-primary-500)) 35%,rgb(var(--ax-sys-color-border-lightest-surface)))}}@supports (color: color-mix(in lab,red,red)){:host ::ng-deep .ax-legend-item:hover{background-color:color-mix(in srgb,rgb(var(--ax-sys-color-primary-500)) 6%,rgb(var(--ax-sys-color-lightest-surface)))}}:host ::ng-deep .ax-legend-item:active{transform:scale(.98)}:host ::ng-deep .ax-legend-item.ax-legend-item-hidden{opacity:.62}:host ::ng-deep .ax-legend-color{width:.625rem;height:.625rem;flex-shrink:0;border-radius:9999px;box-shadow:0 0 0 1px rgb(var(--ax-legend-text))}@supports (color: color-mix(in lab,red,red)){:host ::ng-deep .ax-legend-color{box-shadow:0 0 0 1px color-mix(in srgb,rgb(var(--ax-legend-text)) 18%,transparent)}}:host ::ng-deep .ax-legend-name{font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);max-width:9rem;overflow:hidden;text-overflow:ellipsis}:host ::ng-deep .ax-legend-value{font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600);--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,);margin-inline-start:0;opacity:1;color:rgb(var(--ax-sys-color-on-lightest-surface))}:host ::ng-deep .ax-legend-percentage{margin-inline-start:0;border-radius:9999px;padding-inline:.4rem;padding-block:.125rem;font-size:.6875rem;line-height:1;font-weight:600;font-variant-numeric:tabular-nums;background-color:rgb(var(--ax-legend-text))}@supports (color: color-mix(in lab,red,red)){:host ::ng-deep .ax-legend-percentage{background-color:color-mix(in srgb,rgb(var(--ax-legend-text)) 12%,transparent)}}:host ::ng-deep ax-donut-chart,:host ::ng-deep ax-gauge-chart,:host ::ng-deep ax-bar-chart,:host ::ng-deep ax-line-chart,:host ::ng-deep ax-funnel-chart{display:block!important;width:100%!important;height:100%!important;min-height:0!important;max-height:100%!important}:host ::ng-deep .axp-chart-widget-host__chart--heatmap ax-heatmap-chart{display:block!important;width:100%!important;max-width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important}:host ::ng-deep ax-donut-chart .ax-donut-chart,:host ::ng-deep ax-gauge-chart .ax-gauge-chart,:host ::ng-deep ax-bar-chart .ax-bar-chart,:host ::ng-deep ax-line-chart .ax-line-chart,:host ::ng-deep ax-funnel-chart .ax-funnel-chart-container{min-height:0!important;height:100%!important;width:100%!important;padding:.25rem!important}:host ::ng-deep .axp-chart-widget-host__chart--heatmap ax-heatmap-chart .ax-heatmap-chart-container,:host ::ng-deep .axp-chart-widget-host__chart--heatmap .ax-heatmap-chart{min-height:0!important;height:auto!important;width:100%!important;max-width:100%!important;padding:.25rem!important;overflow:visible!important}:host ::ng-deep .axp-chart-widget-host__chart--heatmap svg{display:block;width:100%!important;max-width:100%!important;height:auto!important;overflow:visible!important}:host:has(.ax-chart-empty){block-size:100%;overflow:hidden}.axp-chart-widget-host:has(.ax-chart-empty){block-size:100%;overflow:hidden}.axp-chart-widget-host__body:has(.ax-chart-empty){flex:1 1 auto;min-block-size:0;overflow:hidden}.axp-chart-widget-host__chart--heatmap:has(.ax-chart-empty){flex:1 1 auto;block-size:100%;min-block-size:16rem!important;overflow:hidden}:host ::ng-deep .axp-chart-widget-host__chart--heatmap:has(.ax-chart-empty) ax-heatmap-chart,:host ::ng-deep .axp-chart-widget-host__chart--heatmap:has(.ax-chart-empty) ax-heatmap-chart .ax-heatmap-chart-container{display:block!important;width:100%!important;max-width:100%!important;height:100%!important;min-height:16rem!important;max-height:none!important;overflow:hidden!important}:host{display:block;width:100%;height:100%;min-height:0px}:host .axp-chart-widget-host{width:100%;height:100%;min-height:0px}:host ax-funnel-chart{display:block;width:100%;height:100%;min-height:0px}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@property --tw-ordinal{syntax: \"*\"; inherits: false;}@property --tw-slashed-zero{syntax: \"*\"; inherits: false;}@property --tw-numeric-figure{syntax: \"*\"; inherits: false;}@property --tw-numeric-spacing{syntax: \"*\"; inherits: false;}@property --tw-numeric-fraction{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight: initial;--tw-ordinal: initial;--tw-slashed-zero: initial;--tw-numeric-figure: initial;--tw-numeric-spacing: initial;--tw-numeric-fraction: initial}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: AXFunnelChartComponent, selector: "ax-funnel-chart", inputs: ["data", "options"], outputs: ["segmentClick"] }, { kind: "component", type: AXPChartQueryTabsComponent, selector: "axp-chart-query-tabs", inputs: ["tabs", "activeIndex"], outputs: ["activeIndexChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
128
128
|
}
|
|
129
129
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPFunnelChartWidgetViewComponent, decorators: [{
|
|
130
130
|
type: Component,
|
|
131
|
-
args: [{ imports: [AXFunnelChartComponent, AXPChartQueryTabsComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"axp-chart-widget-host\">\n <axp-chart-query-tabs\n [tabs]=\"queryTabs()\"\n [activeIndex]=\"activeTabIndex()\"\n (activeIndexChange)=\"selectQueryTab($event)\"\n />\n <div class=\"axp-chart-widget-host__body\">\n <div class=\"axp-chart-widget-host__chart axp-chart-widget-host__chart--funnel\">\n <ax-funnel-chart [data]=\"data()\" [options]=\"funnelOptions()\"></ax-funnel-chart>\n </div>\n </div>\n</div>\n", styles: ["@layer properties;:host{display:block;width:100%;height:100%;min-height:0px;overflow:hidden}:host:has(.axp-chart-widget-host__chart--heatmap){block-size:auto;overflow:visible;min-block-size:0}.axp-chart-widget-host{display:flex;height:100%;min-height:0px;width:100%;flex-direction:column;gap:var(--spacing, .25rem)}.axp-chart-widget-host:has(.axp-chart-widget-host__chart--heatmap){block-size:auto;min-block-size:0;overflow:visible}.axp-chart-widget-host__body{display:flex;min-height:0px;flex:1;flex-direction:column;gap:var(--spacing, .25rem);padding-bottom:calc(var(--spacing, .25rem) * 2)}.axp-chart-widget-host__body:not(.axp-chart-widget-host__body--with-legend)>.axp-chart-widget-host__chart--radial{flex:1 1 auto}.axp-chart-widget-host__body--with-legend{min-height:0px;flex:1;gap:var(--spacing, .25rem);display:grid;grid-template-rows:minmax(0,1fr) auto}.axp-chart-widget-host__chart{position:relative;min-height:calc(var(--spacing, .25rem) * 64);width:100%;overflow:hidden;grid-row:1}.axp-chart-widget-host__chart--radial{position:relative;margin-inline:auto;align-self:center;justify-self:center;overflow:hidden;grid-row:1;flex:0 0 auto;height:auto;width:min(100%,18rem);max-width:100%;min-height:12rem;min-width:8rem;aspect-ratio:1 / 1}.axp-chart-widget-host__chart--funnel{position:relative;width:100%;overflow:hidden;block-size:20rem;flex:0 0 auto;max-block-size:24rem;min-block-size:16rem}.axp-chart-widget-host__chart--funnel ax-funnel-chart,.axp-chart-widget-host__chart--funnel .ax-funnel-chart-container{display:block;block-size:100%;inline-size:100%;min-block-size:0}.axp-chart-widget-host__body:has(.axp-chart-widget-host__chart--funnel){flex:none}.axp-chart-widget-host__chart--heatmap{position:relative;width:100%;max-width:100%;inline-size:100%;block-size:auto;flex:0 0 auto;overflow:visible;min-height:0!important;min-block-size:0!important;max-block-size:none}.axp-chart-widget-host__chart--heatmap ax-heatmap-chart,.axp-chart-widget-host__chart--heatmap .ax-heatmap-chart-container{display:block;inline-size:100%;max-inline-size:100%;block-size:auto;min-block-size:0;overflow:visible}.axp-chart-widget-host__body:has(.axp-chart-widget-host__chart--heatmap){flex:none;block-size:auto;min-block-size:0;overflow:visible}.axp-chart-widget-host__legend{width:100%;flex:none;grid-row:2;min-height:0;min-width:0;max-width:100%;display:flex;justify-content:flex-start;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;scrollbar-color:rgb(var(--ax-sys-color-border-lighter-surface)) transparent}:host ::ng-deep ax-chart-legend{display:block!important;height:auto!important;max-height:none;width:max-content;min-width:100%;max-width:none}:host ::ng-deep .ax-chart-legend{--ax-legend-bg: var(--ax-sys-color-lighter-surface);--ax-legend-text: var(--ax-sys-color-on-lighter-surface);--ax-legend-border: var(--ax-sys-color-border-lighter-surface);--ax-legend-radius: .625rem;--ax-legend-padding: .375rem .5rem;--ax-legend-gap: .375rem;--ax-legend-item-height: auto;height:auto;max-height:none;width:100%;overflow:visible;padding:var(--ax-legend-padding);gap:var(--ax-legend-gap);color:rgb(var(--ax-legend-text))}:host ::ng-deep .ax-chart-legend.ax-legend-horizontal{flex-direction:row;flex-wrap:nowrap;align-items:center;justify-content:flex-start;width:max-content;min-width:100%;max-width:none;overflow:visible;border:none;background:transparent;background-color:transparent;padding:.125rem .75rem .7rem;gap:.5rem}:host ::ng-deep .ax-legend-item{align-items:center;flex-shrink:0;gap:.375rem;height:auto;min-height:1.5rem;padding-block:.2rem;padding-inline:.5rem;border-radius:9999px;border:1px solid rgb(var(--ax-sys-color-border-lightest-surface));background-color:rgb(var(--ax-sys-color-lightest-surface));white-space:nowrap;transition:background-color .15s ease,border-color .15s ease,box-shadow .15s ease,opacity .15s ease,transform .15s ease}:host ::ng-deep .ax-legend-item:hover{border-color:rgb(var(--ax-sys-color-primary-500));background-color:rgb(var(--ax-sys-color-primary-500));box-shadow:0 1px 2px #0f172a0f}@supports (color: color-mix(in lab,red,red)){:host ::ng-deep .ax-legend-item:hover{border-color:color-mix(in srgb,rgb(var(--ax-sys-color-primary-500)) 35%,rgb(var(--ax-sys-color-border-lightest-surface)))}}@supports (color: color-mix(in lab,red,red)){:host ::ng-deep .ax-legend-item:hover{background-color:color-mix(in srgb,rgb(var(--ax-sys-color-primary-500)) 6%,rgb(var(--ax-sys-color-lightest-surface)))}}:host ::ng-deep .ax-legend-item:active{transform:scale(.98)}:host ::ng-deep .ax-legend-item.ax-legend-item-hidden{opacity:.62}:host ::ng-deep .ax-legend-color{width:.625rem;height:.625rem;flex-shrink:0;border-radius:9999px;box-shadow:0 0 0 1px rgb(var(--ax-legend-text))}@supports (color: color-mix(in lab,red,red)){:host ::ng-deep .ax-legend-color{box-shadow:0 0 0 1px color-mix(in srgb,rgb(var(--ax-legend-text)) 18%,transparent)}}:host ::ng-deep .ax-legend-name{font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);max-width:9rem;overflow:hidden;text-overflow:ellipsis}:host ::ng-deep .ax-legend-value{font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600);--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,);margin-inline-start:0;opacity:1;color:rgb(var(--ax-sys-color-on-lightest-surface))}:host ::ng-deep .ax-legend-percentage{margin-inline-start:0;border-radius:9999px;padding-inline:.4rem;padding-block:.125rem;font-size:.6875rem;line-height:1;font-weight:600;font-variant-numeric:tabular-nums;background-color:rgb(var(--ax-legend-text))}@supports (color: color-mix(in lab,red,red)){:host ::ng-deep .ax-legend-percentage{background-color:color-mix(in srgb,rgb(var(--ax-legend-text)) 12%,transparent)}}:host ::ng-deep ax-donut-chart,:host ::ng-deep ax-gauge-chart,:host ::ng-deep ax-bar-chart,:host ::ng-deep ax-line-chart,:host ::ng-deep ax-funnel-chart{display:block!important;width:100%!important;height:100%!important;min-height:0!important;max-height:100%!important}:host ::ng-deep .axp-chart-widget-host__chart--heatmap ax-heatmap-chart{display:block!important;width:100%!important;max-width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important}:host ::ng-deep ax-donut-chart .ax-donut-chart,:host ::ng-deep ax-gauge-chart .ax-gauge-chart,:host ::ng-deep ax-bar-chart .ax-bar-chart,:host ::ng-deep ax-line-chart .ax-line-chart,:host ::ng-deep ax-funnel-chart .ax-funnel-chart-container{min-height:0!important;height:100%!important;width:100%!important;padding:.25rem!important}:host ::ng-deep .axp-chart-widget-host__chart--heatmap ax-heatmap-chart .ax-heatmap-chart-container,:host ::ng-deep .axp-chart-widget-host__chart--heatmap .ax-heatmap-chart{min-height:0!important;height:auto!important;width:100%!important;max-width:100%!important;padding:.25rem!important;overflow:visible!important}:host ::ng-deep .axp-chart-widget-host__chart--heatmap svg{display:block;width:100%!important;max-width:100%!important;height:auto!important;overflow:visible!important}:host{display:block;width:100%;height:100%;min-height:0px}:host .axp-chart-widget-host{width:100%;height:100%;min-height:0px}:host ax-funnel-chart{display:block;width:100%;height:100%;min-height:0px}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@property --tw-ordinal{syntax: \"*\"; inherits: false;}@property --tw-slashed-zero{syntax: \"*\"; inherits: false;}@property --tw-numeric-figure{syntax: \"*\"; inherits: false;}@property --tw-numeric-spacing{syntax: \"*\"; inherits: false;}@property --tw-numeric-fraction{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight: initial;--tw-ordinal: initial;--tw-slashed-zero: initial;--tw-numeric-figure: initial;--tw-numeric-spacing: initial;--tw-numeric-fraction: initial}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"] }]
|
|
131
|
+
args: [{ imports: [AXFunnelChartComponent, AXPChartQueryTabsComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"axp-chart-widget-host\">\n <axp-chart-query-tabs\n [tabs]=\"queryTabs()\"\n [activeIndex]=\"activeTabIndex()\"\n (activeIndexChange)=\"selectQueryTab($event)\"\n />\n <div class=\"axp-chart-widget-host__body\">\n <div class=\"axp-chart-widget-host__chart axp-chart-widget-host__chart--funnel\">\n <ax-funnel-chart [data]=\"data()\" [options]=\"funnelOptions()\"></ax-funnel-chart>\n </div>\n </div>\n</div>\n", styles: ["@layer properties;:host{display:block;width:100%;height:100%;min-height:0px;overflow:hidden}:host:has(.axp-chart-widget-host__chart--heatmap){block-size:auto;overflow:visible;min-block-size:0}.axp-chart-widget-host{display:flex;height:100%;min-height:0px;width:100%;flex-direction:column;gap:var(--spacing, .25rem)}.axp-chart-widget-host:has(.axp-chart-widget-host__chart--heatmap){block-size:auto;min-block-size:0;overflow:visible}.axp-chart-widget-host__body{display:flex;min-height:0px;flex:1;flex-direction:column;gap:var(--spacing, .25rem);padding-bottom:calc(var(--spacing, .25rem) * 2)}.axp-chart-widget-host__body:not(.axp-chart-widget-host__body--with-legend)>.axp-chart-widget-host__chart--radial{flex:1 1 auto}.axp-chart-widget-host__body--with-legend{min-height:0px;flex:1;gap:var(--spacing, .25rem);display:grid;grid-template-rows:minmax(0,1fr) auto}.axp-chart-widget-host__chart{position:relative;min-height:calc(var(--spacing, .25rem) * 64);width:100%;overflow:hidden;grid-row:1}.axp-chart-widget-host__chart--radial{position:relative;margin-inline:auto;align-self:center;justify-self:center;overflow:hidden;grid-row:1;flex:0 0 auto;height:auto;width:min(100%,18rem);max-width:100%;min-height:12rem;min-width:8rem;aspect-ratio:1 / 1}.axp-chart-widget-host__chart--funnel{position:relative;width:100%;overflow:hidden;block-size:20rem;flex:0 0 auto;max-block-size:24rem;min-block-size:16rem}.axp-chart-widget-host__chart--funnel ax-funnel-chart,.axp-chart-widget-host__chart--funnel .ax-funnel-chart-container{display:block;block-size:100%;inline-size:100%;min-block-size:0}.axp-chart-widget-host__body:has(.axp-chart-widget-host__chart--funnel){flex:none}.axp-chart-widget-host__chart--heatmap{position:relative;width:100%;max-width:100%;inline-size:100%;block-size:auto;flex:0 0 auto;overflow:visible;min-height:0!important;min-block-size:0!important;max-block-size:none}.axp-chart-widget-host__chart--heatmap ax-heatmap-chart,.axp-chart-widget-host__chart--heatmap .ax-heatmap-chart-container{display:block;inline-size:100%;max-inline-size:100%;block-size:auto;min-block-size:0;overflow:visible}.axp-chart-widget-host__body:has(.axp-chart-widget-host__chart--heatmap){flex:none;block-size:auto;min-block-size:0;overflow:visible}.axp-chart-widget-host__legend{width:100%;flex:none;grid-row:2;min-height:0;min-width:0;max-width:100%;display:flex;justify-content:flex-start;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;scrollbar-color:rgb(var(--ax-sys-color-border-lighter-surface)) transparent}:host ::ng-deep ax-chart-legend{display:block!important;height:auto!important;max-height:none;width:max-content;min-width:100%;max-width:none}:host ::ng-deep .ax-chart-legend{--ax-legend-bg: var(--ax-sys-color-lighter-surface);--ax-legend-text: var(--ax-sys-color-on-lighter-surface);--ax-legend-border: var(--ax-sys-color-border-lighter-surface);--ax-legend-radius: .625rem;--ax-legend-padding: .375rem .5rem;--ax-legend-gap: .375rem;--ax-legend-item-height: auto;height:auto;max-height:none;width:100%;overflow:visible;padding:var(--ax-legend-padding);gap:var(--ax-legend-gap);color:rgb(var(--ax-legend-text))}:host ::ng-deep .ax-chart-legend.ax-legend-horizontal{flex-direction:row;flex-wrap:nowrap;align-items:center;justify-content:flex-start;width:max-content;min-width:100%;max-width:none;overflow:visible;border:none;background:transparent;background-color:transparent;padding:.125rem .75rem .7rem;gap:.5rem}:host ::ng-deep .ax-legend-item{align-items:center;flex-shrink:0;gap:.375rem;height:auto;min-height:1.5rem;padding-block:.2rem;padding-inline:.5rem;border-radius:9999px;border:1px solid rgb(var(--ax-sys-color-border-lightest-surface));background-color:rgb(var(--ax-sys-color-lightest-surface));white-space:nowrap;transition:background-color .15s ease,border-color .15s ease,box-shadow .15s ease,opacity .15s ease,transform .15s ease}:host ::ng-deep .ax-legend-item:hover{border-color:rgb(var(--ax-sys-color-primary-500));background-color:rgb(var(--ax-sys-color-primary-500));box-shadow:0 1px 2px #0f172a0f}@supports (color: color-mix(in lab,red,red)){:host ::ng-deep .ax-legend-item:hover{border-color:color-mix(in srgb,rgb(var(--ax-sys-color-primary-500)) 35%,rgb(var(--ax-sys-color-border-lightest-surface)))}}@supports (color: color-mix(in lab,red,red)){:host ::ng-deep .ax-legend-item:hover{background-color:color-mix(in srgb,rgb(var(--ax-sys-color-primary-500)) 6%,rgb(var(--ax-sys-color-lightest-surface)))}}:host ::ng-deep .ax-legend-item:active{transform:scale(.98)}:host ::ng-deep .ax-legend-item.ax-legend-item-hidden{opacity:.62}:host ::ng-deep .ax-legend-color{width:.625rem;height:.625rem;flex-shrink:0;border-radius:9999px;box-shadow:0 0 0 1px rgb(var(--ax-legend-text))}@supports (color: color-mix(in lab,red,red)){:host ::ng-deep .ax-legend-color{box-shadow:0 0 0 1px color-mix(in srgb,rgb(var(--ax-legend-text)) 18%,transparent)}}:host ::ng-deep .ax-legend-name{font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);max-width:9rem;overflow:hidden;text-overflow:ellipsis}:host ::ng-deep .ax-legend-value{font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600);--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,);margin-inline-start:0;opacity:1;color:rgb(var(--ax-sys-color-on-lightest-surface))}:host ::ng-deep .ax-legend-percentage{margin-inline-start:0;border-radius:9999px;padding-inline:.4rem;padding-block:.125rem;font-size:.6875rem;line-height:1;font-weight:600;font-variant-numeric:tabular-nums;background-color:rgb(var(--ax-legend-text))}@supports (color: color-mix(in lab,red,red)){:host ::ng-deep .ax-legend-percentage{background-color:color-mix(in srgb,rgb(var(--ax-legend-text)) 12%,transparent)}}:host ::ng-deep ax-donut-chart,:host ::ng-deep ax-gauge-chart,:host ::ng-deep ax-bar-chart,:host ::ng-deep ax-line-chart,:host ::ng-deep ax-funnel-chart{display:block!important;width:100%!important;height:100%!important;min-height:0!important;max-height:100%!important}:host ::ng-deep .axp-chart-widget-host__chart--heatmap ax-heatmap-chart{display:block!important;width:100%!important;max-width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important}:host ::ng-deep ax-donut-chart .ax-donut-chart,:host ::ng-deep ax-gauge-chart .ax-gauge-chart,:host ::ng-deep ax-bar-chart .ax-bar-chart,:host ::ng-deep ax-line-chart .ax-line-chart,:host ::ng-deep ax-funnel-chart .ax-funnel-chart-container{min-height:0!important;height:100%!important;width:100%!important;padding:.25rem!important}:host ::ng-deep .axp-chart-widget-host__chart--heatmap ax-heatmap-chart .ax-heatmap-chart-container,:host ::ng-deep .axp-chart-widget-host__chart--heatmap .ax-heatmap-chart{min-height:0!important;height:auto!important;width:100%!important;max-width:100%!important;padding:.25rem!important;overflow:visible!important}:host ::ng-deep .axp-chart-widget-host__chart--heatmap svg{display:block;width:100%!important;max-width:100%!important;height:auto!important;overflow:visible!important}:host:has(.ax-chart-empty){block-size:100%;overflow:hidden}.axp-chart-widget-host:has(.ax-chart-empty){block-size:100%;overflow:hidden}.axp-chart-widget-host__body:has(.ax-chart-empty){flex:1 1 auto;min-block-size:0;overflow:hidden}.axp-chart-widget-host__chart--heatmap:has(.ax-chart-empty){flex:1 1 auto;block-size:100%;min-block-size:16rem!important;overflow:hidden}:host ::ng-deep .axp-chart-widget-host__chart--heatmap:has(.ax-chart-empty) ax-heatmap-chart,:host ::ng-deep .axp-chart-widget-host__chart--heatmap:has(.ax-chart-empty) ax-heatmap-chart .ax-heatmap-chart-container{display:block!important;width:100%!important;max-width:100%!important;height:100%!important;min-height:16rem!important;max-height:none!important;overflow:hidden!important}:host{display:block;width:100%;height:100%;min-height:0px}:host .axp-chart-widget-host{width:100%;height:100%;min-height:0px}:host ax-funnel-chart{display:block;width:100%;height:100%;min-height:0px}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@property --tw-ordinal{syntax: \"*\"; inherits: false;}@property --tw-slashed-zero{syntax: \"*\"; inherits: false;}@property --tw-numeric-figure{syntax: \"*\"; inherits: false;}@property --tw-numeric-spacing{syntax: \"*\"; inherits: false;}@property --tw-numeric-fraction{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight: initial;--tw-ordinal: initial;--tw-slashed-zero: initial;--tw-numeric-figure: initial;--tw-numeric-spacing: initial;--tw-numeric-fraction: initial}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"] }]
|
|
132
132
|
}], ctorParameters: () => [] });
|
|
133
133
|
|
|
134
134
|
export { AXPFunnelChartWidgetViewComponent };
|
|
135
|
-
//# sourceMappingURL=acorex-platform-module-dashboard-management-client-funnel-chart-widget.component-
|
|
135
|
+
//# sourceMappingURL=acorex-platform-module-dashboard-management-client-funnel-chart-widget.component-CltmXb8c.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-dashboard-management-client-funnel-chart-widget.component-BPY1NchM.mjs","sources":["../../../../libs/modules/dashboard-management/client/src/lib/features/shared/widgets/chart/funnel-chart/funnel-chart-widget.component.ts","../../../../libs/modules/dashboard-management/client/src/lib/features/shared/widgets/chart/funnel-chart/funnel-chart-widget.component.html"],"sourcesContent":["import { AXFunnelChartComponent, AXFunnelChartOption, AXFunnelData } from '@acorex/charts/funnel-chart';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\nimport { AXPQueryExecutor } from '@acorex-platform/framework-client/runtime';\nimport { ChangeDetectionStrategy, Component, computed, effect, inject, signal } from '@angular/core';\nimport { AXPDashboardWidgetComponent } from '../../dashboard-widget-base';\nimport { resolveChartQueryTabs } from '../chart-query-load.util';\nimport { loadFunnelChartItems } from '../chart-widget-data.util';\nimport { AXPChartQueryTabsComponent } from '../chart-query-tabs.component';\n\n/**\n * Funnel Chart Widget Component\n * Displays step-wise conversion/flow data as a funnel.\n */\n@Component({\n templateUrl: './funnel-chart-widget.component.html',\n styleUrls: ['./funnel-chart-widget.component.css'],\n imports: [AXFunnelChartComponent, AXPChartQueryTabsComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AXPFunnelChartWidgetViewComponent extends AXPDashboardWidgetComponent {\n //#region ----- Services & Dependencies -----\n\n private readonly queryExecutor = inject(AXPQueryExecutor);\n private readonly translationService = inject(AXTranslationService);\n\n //#endregion\n\n //#region ----- Chart state -----\n\n protected data = signal<AXFunnelData[]>([]);\n\n /** Options passed to the chart with resolved messages/labels (multi-language and @i18n keys). */\n protected funnelOptions = signal<AXFunnelChartOption>({} as AXFunnelChartOption);\n\n private labelResolveGeneration = 0;\n\n //#endregion\n\n //#region ----- Query tabs -----\n\n protected readonly queryTabs = computed(() =>\n resolveChartQueryTabs(this.options() as Record<string, unknown>, this.entityContext()?.entityId),\n );\n\n protected readonly activeTabIndex = signal(0);\n\n private readonly activeQuery = computed(() => {\n const tabs = this.queryTabs();\n if (tabs.length === 0) {\n return undefined;\n }\n const index = Math.min(Math.max(this.activeTabIndex(), 0), tabs.length - 1);\n return tabs[index];\n });\n\n protected selectQueryTab(index: number): void {\n this.activeTabIndex.set(index);\n }\n\n //#endregion\n\n //#region ----- Localization -----\n\n private async resolveChartText(value: unknown): Promise<string> {\n if (value == null) {\n return '';\n }\n if (typeof value === 'string') {\n return value.startsWith('@') ? this.translationService.translateAsync(value) : value;\n }\n if (\n typeof value === 'object' &&\n !Array.isArray(value) &&\n this.translationService.isValidMultiLanguageObject(value)\n ) {\n return this.translationService.resolve(value as AXPMultiLanguageString);\n }\n return String(value);\n }\n\n private readonly resolveOptionLabelsEffect = effect(() => {\n const raw = this.options() as Record<string, unknown>;\n const generation = ++this.labelResolveGeneration;\n\n void (async () => {\n const messagesRaw = raw['messages'];\n const messages =\n messagesRaw && typeof messagesRaw === 'object' && !Array.isArray(messagesRaw)\n ? (messagesRaw as Record<string, unknown>)\n : undefined;\n\n const noData = await this.resolveChartText(messages?.['noData']);\n\n if (generation !== this.labelResolveGeneration) {\n return;\n }\n\n const base = raw as unknown as AXFunnelChartOption;\n this.funnelOptions.set({\n ...base,\n ...(messages\n ? {\n messages: {\n ...base.messages,\n ...(noData ? { noData } : {}),\n ...(messages['noDataIcon'] ? { noDataIcon: String(messages['noDataIcon']) } : {}),\n },\n }\n : {}),\n });\n })();\n });\n\n //#endregion\n\n //#region ----- Query loading -----\n\n private readonly clampTabIndexEffect = effect(() => {\n const tabs = this.queryTabs();\n if (this.activeTabIndex() >= tabs.length) {\n this.activeTabIndex.set(0);\n }\n });\n\n private readonly dataLoadEffect = effect(async () => {\n const opts = this.options() as Record<string, unknown>;\n const active = this.activeQuery();\n const items = await loadFunnelChartItems(opts, {\n queryExecutor: this.queryExecutor,\n queryKey: active?.query,\n queryInput: active?.queryInput,\n });\n const resolved = await Promise.all(\n items.map(async (item) => ({\n ...item,\n name: await this.resolveChartText(item.name),\n })),\n );\n this.data.set(resolved as AXFunnelData[]);\n });\n\n //#endregion\n\n constructor() {\n super();\n this.setOptions({\n showLabels: true,\n showTooltip: true,\n neckWidth: 0.3,\n animationEasing: 'cubic-out',\n color: 'rgb(var(--ax-sys-color-primary-500))',\n animationDuration: 800,\n margin: { top: 16, right: 16, bottom: 16, left: 16 },\n ...this.options(),\n });\n\n this.funnelOptions.set(this.options() as AXFunnelChartOption);\n }\n}\n","<div class=\"axp-chart-widget-host\">\n <axp-chart-query-tabs\n [tabs]=\"queryTabs()\"\n [activeIndex]=\"activeTabIndex()\"\n (activeIndexChange)=\"selectQueryTab($event)\"\n />\n <div class=\"axp-chart-widget-host__body\">\n <div class=\"axp-chart-widget-host__chart axp-chart-widget-host__chart--funnel\">\n <ax-funnel-chart [data]=\"data()\" [options]=\"funnelOptions()\"></ax-funnel-chart>\n </div>\n </div>\n</div>\n"],"names":[],"mappings":";;;;;;;;AAUA;;;AAGG;AAOG,MAAO,iCAAkC,SAAQ,2BAA2B,CAAA;AAoCtE,IAAA,cAAc,CAAC,KAAa,EAAA;AACpC,QAAA,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,KAAK,CAAC;IAChC;;;IAMQ,MAAM,gBAAgB,CAAC,KAAc,EAAA;AAC3C,QAAA,IAAI,KAAK,IAAI,IAAI,EAAE;AACjB,YAAA,OAAO,EAAE;QACX;AACA,QAAA,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;YAC7B,OAAO,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,kBAAkB,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,KAAK;QACtF;QACA,IACE,OAAO,KAAK,KAAK,QAAQ;AACzB,YAAA,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;YACrB,IAAI,CAAC,kBAAkB,CAAC,0BAA0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,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,iCAAiC,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,cAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECpB9C,+bAYA,EAAA,MAAA,EAAA,CAAA,+rQAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDKY,sBAAsB,oHAAE,0BAA0B,EAAA,QAAA,EAAA,sBAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,aAAA,CAAA,EAAA,OAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAGjD,iCAAiC,EAAA,UAAA,EAAA,CAAA;kBAN7C,SAAS;AAGC,YAAA,IAAA,EAAA,CAAA,EAAA,OAAA,EAAA,CAAC,sBAAsB,EAAE,0BAA0B,CAAC,EAAA,eAAA,EAC5C,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,+bAAA,EAAA,MAAA,EAAA,CAAA,+rQAAA,CAAA,EAAA;;;"}
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-dashboard-management-client-funnel-chart-widget.component-CltmXb8c.mjs","sources":["../../../../libs/modules/dashboard-management/client/src/lib/features/shared/widgets/chart/funnel-chart/funnel-chart-widget.component.ts","../../../../libs/modules/dashboard-management/client/src/lib/features/shared/widgets/chart/funnel-chart/funnel-chart-widget.component.html"],"sourcesContent":["import { AXFunnelChartComponent, AXFunnelChartOption, AXFunnelData } from '@acorex/charts/funnel-chart';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\nimport { AXPQueryExecutor } from '@acorex-platform/framework-client/runtime';\nimport { ChangeDetectionStrategy, Component, computed, effect, inject, signal } from '@angular/core';\nimport { AXPDashboardWidgetComponent } from '../../dashboard-widget-base';\nimport { resolveChartQueryTabs } from '../chart-query-load.util';\nimport { loadFunnelChartItems } from '../chart-widget-data.util';\nimport { AXPChartQueryTabsComponent } from '../chart-query-tabs.component';\n\n/**\n * Funnel Chart Widget Component\n * Displays step-wise conversion/flow data as a funnel.\n */\n@Component({\n templateUrl: './funnel-chart-widget.component.html',\n styleUrls: ['./funnel-chart-widget.component.css'],\n imports: [AXFunnelChartComponent, AXPChartQueryTabsComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AXPFunnelChartWidgetViewComponent extends AXPDashboardWidgetComponent {\n //#region ----- Services & Dependencies -----\n\n private readonly queryExecutor = inject(AXPQueryExecutor);\n private readonly translationService = inject(AXTranslationService);\n\n //#endregion\n\n //#region ----- Chart state -----\n\n protected data = signal<AXFunnelData[]>([]);\n\n /** Options passed to the chart with resolved messages/labels (multi-language and @i18n keys). */\n protected funnelOptions = signal<AXFunnelChartOption>({} as AXFunnelChartOption);\n\n private labelResolveGeneration = 0;\n\n //#endregion\n\n //#region ----- Query tabs -----\n\n protected readonly queryTabs = computed(() =>\n resolveChartQueryTabs(this.options() as Record<string, unknown>, this.entityContext()?.entityId),\n );\n\n protected readonly activeTabIndex = signal(0);\n\n private readonly activeQuery = computed(() => {\n const tabs = this.queryTabs();\n if (tabs.length === 0) {\n return undefined;\n }\n const index = Math.min(Math.max(this.activeTabIndex(), 0), tabs.length - 1);\n return tabs[index];\n });\n\n protected selectQueryTab(index: number): void {\n this.activeTabIndex.set(index);\n }\n\n //#endregion\n\n //#region ----- Localization -----\n\n private async resolveChartText(value: unknown): Promise<string> {\n if (value == null) {\n return '';\n }\n if (typeof value === 'string') {\n return value.startsWith('@') ? this.translationService.translateAsync(value) : value;\n }\n if (\n typeof value === 'object' &&\n !Array.isArray(value) &&\n this.translationService.isValidMultiLanguageObject(value)\n ) {\n return this.translationService.resolve(value as AXPMultiLanguageString);\n }\n return String(value);\n }\n\n private readonly resolveOptionLabelsEffect = effect(() => {\n const raw = this.options() as Record<string, unknown>;\n const generation = ++this.labelResolveGeneration;\n\n void (async () => {\n const messagesRaw = raw['messages'];\n const messages =\n messagesRaw && typeof messagesRaw === 'object' && !Array.isArray(messagesRaw)\n ? (messagesRaw as Record<string, unknown>)\n : undefined;\n\n const noData = await this.resolveChartText(messages?.['noData']);\n\n if (generation !== this.labelResolveGeneration) {\n return;\n }\n\n const base = raw as unknown as AXFunnelChartOption;\n this.funnelOptions.set({\n ...base,\n ...(messages\n ? {\n messages: {\n ...base.messages,\n ...(noData ? { noData } : {}),\n ...(messages['noDataIcon'] ? { noDataIcon: String(messages['noDataIcon']) } : {}),\n },\n }\n : {}),\n });\n })();\n });\n\n //#endregion\n\n //#region ----- Query loading -----\n\n private readonly clampTabIndexEffect = effect(() => {\n const tabs = this.queryTabs();\n if (this.activeTabIndex() >= tabs.length) {\n this.activeTabIndex.set(0);\n }\n });\n\n private readonly dataLoadEffect = effect(async () => {\n const opts = this.options() as Record<string, unknown>;\n const active = this.activeQuery();\n const items = await loadFunnelChartItems(opts, {\n queryExecutor: this.queryExecutor,\n queryKey: active?.query,\n queryInput: active?.queryInput,\n });\n const resolved = await Promise.all(\n items.map(async (item) => ({\n ...item,\n name: await this.resolveChartText(item.name),\n })),\n );\n this.data.set(resolved as AXFunnelData[]);\n });\n\n //#endregion\n\n constructor() {\n super();\n this.setOptions({\n showLabels: true,\n showTooltip: true,\n neckWidth: 0.3,\n animationEasing: 'cubic-out',\n color: 'rgb(var(--ax-sys-color-primary-500))',\n animationDuration: 800,\n margin: { top: 16, right: 16, bottom: 16, left: 16 },\n ...this.options(),\n });\n\n this.funnelOptions.set(this.options() as AXFunnelChartOption);\n }\n}\n","<div class=\"axp-chart-widget-host\">\n <axp-chart-query-tabs\n [tabs]=\"queryTabs()\"\n [activeIndex]=\"activeTabIndex()\"\n (activeIndexChange)=\"selectQueryTab($event)\"\n />\n <div class=\"axp-chart-widget-host__body\">\n <div class=\"axp-chart-widget-host__chart axp-chart-widget-host__chart--funnel\">\n <ax-funnel-chart [data]=\"data()\" [options]=\"funnelOptions()\"></ax-funnel-chart>\n </div>\n </div>\n</div>\n"],"names":[],"mappings":";;;;;;;;AAUA;;;AAGG;AAOG,MAAO,iCAAkC,SAAQ,2BAA2B,CAAA;AAoCtE,IAAA,cAAc,CAAC,KAAa,EAAA;AACpC,QAAA,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,KAAK,CAAC;IAChC;;;IAMQ,MAAM,gBAAgB,CAAC,KAAc,EAAA;AAC3C,QAAA,IAAI,KAAK,IAAI,IAAI,EAAE;AACjB,YAAA,OAAO,EAAE;QACX;AACA,QAAA,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;YAC7B,OAAO,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,kBAAkB,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,KAAK;QACtF;QACA,IACE,OAAO,KAAK,KAAK,QAAQ;AACzB,YAAA,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;YACrB,IAAI,CAAC,kBAAkB,CAAC,0BAA0B,CAAC,KAAK,CAAC,EACzD;YACA,OAAO,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,KAA+B,CAAC;QACzE;AACA,QAAA,OAAO,MAAM,CAAC,KAAK,CAAC;IACtB;;AAiEA,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;;AA1HQ,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACxC,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC;;;QAMxD,IAAA,CAAA,IAAI,GAAG,MAAM,CAAiB,EAAE;iFAAC;;QAGjC,IAAA,CAAA,aAAa,GAAG,MAAM,CAAsB,EAAyB;0FAAC;QAExE,IAAA,CAAA,sBAAsB,GAAG,CAAC;;;A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AA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAGjD,iCAAiC,EAAA,UAAA,EAAA,CAAA;kBAN7C,SAAS;AAGC,YAAA,IAAA,EAAA,CAAA,EAAA,OAAA,EAAA,CAAC,sBAAsB,EAAE,0BAA0B,CAAC,EAAA,eAAA,EAC5C,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,+bAAA,EAAA,MAAA,EAAA,CAAA,i7RAAA,CAAA,EAAA;;;"}
|
|
@@ -3,8 +3,8 @@ import { AXTranslationService } from '@acorex/core/translation';
|
|
|
3
3
|
import { AXPQueryExecutor } from '@acorex-platform/framework-client/runtime';
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
5
|
import { inject, signal, effect, computed, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
6
|
-
import { e as AXPDashboardWidgetComponent, f as resolveChartQueryTabs, g as AXPChartQueryTabsComponent } from './acorex-platform-module-dashboard-management-client-acorex-platform-module-dashboard-management-client-
|
|
7
|
-
import { c as loadGaugeChartValue } from './acorex-platform-module-dashboard-management-client-chart-widget-data.util-
|
|
6
|
+
import { e as AXPDashboardWidgetComponent, f as resolveChartQueryTabs, g as AXPChartQueryTabsComponent } from './acorex-platform-module-dashboard-management-client-acorex-platform-module-dashboard-management-client-61Q_QY8l.mjs';
|
|
7
|
+
import { c as loadGaugeChartValue } from './acorex-platform-module-dashboard-management-client-chart-widget-data.util-BLtv9sOm.mjs';
|
|
8
8
|
import { o as omitChartFixedSize } from './acorex-platform-module-dashboard-management-client-chart-legend.util-C1zqTQEf.mjs';
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -127,12 +127,12 @@ class AXPGaugeChartWidgetViewComponent extends AXPDashboardWidgetComponent {
|
|
|
127
127
|
this.gaugeChartOptions.set(omitChartFixedSize(this.options()));
|
|
128
128
|
}
|
|
129
129
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPGaugeChartWidgetViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
130
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.8", type: AXPGaugeChartWidgetViewComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<div class=\"axp-chart-widget-host\">\n <axp-chart-query-tabs\n [tabs]=\"queryTabs()\"\n [activeIndex]=\"activeTabIndex()\"\n (activeIndexChange)=\"selectQueryTab($event)\"\n />\n <div class=\"axp-chart-widget-host__body\">\n <div class=\"axp-chart-widget-host__chart axp-chart-widget-host__chart--radial\">\n <ax-gauge-chart [value]=\"value()\" [options]=\"gaugeChartOptions()\"></ax-gauge-chart>\n </div>\n </div>\n</div>\n", styles: ["@layer properties;:host{display:block;width:100%;height:100%;min-height:0px;overflow:hidden}:host:has(.axp-chart-widget-host__chart--heatmap){block-size:auto;overflow:visible;min-block-size:0}.axp-chart-widget-host{display:flex;height:100%;min-height:0px;width:100%;flex-direction:column;gap:var(--spacing, .25rem)}.axp-chart-widget-host:has(.axp-chart-widget-host__chart--heatmap){block-size:auto;min-block-size:0;overflow:visible}.axp-chart-widget-host__body{display:flex;min-height:0px;flex:1;flex-direction:column;gap:var(--spacing, .25rem);padding-bottom:calc(var(--spacing, .25rem) * 2)}.axp-chart-widget-host__body:not(.axp-chart-widget-host__body--with-legend)>.axp-chart-widget-host__chart--radial{flex:1 1 auto}.axp-chart-widget-host__body--with-legend{min-height:0px;flex:1;gap:var(--spacing, .25rem);display:grid;grid-template-rows:minmax(0,1fr) auto}.axp-chart-widget-host__chart{position:relative;min-height:calc(var(--spacing, .25rem) * 64);width:100%;overflow:hidden;grid-row:1}.axp-chart-widget-host__chart--radial{position:relative;margin-inline:auto;align-self:center;justify-self:center;overflow:hidden;grid-row:1;flex:0 0 auto;height:auto;width:min(100%,18rem);max-width:100%;min-height:12rem;min-width:8rem;aspect-ratio:1 / 1}.axp-chart-widget-host__chart--funnel{position:relative;width:100%;overflow:hidden;block-size:20rem;flex:0 0 auto;max-block-size:24rem;min-block-size:16rem}.axp-chart-widget-host__chart--funnel ax-funnel-chart,.axp-chart-widget-host__chart--funnel .ax-funnel-chart-container{display:block;block-size:100%;inline-size:100%;min-block-size:0}.axp-chart-widget-host__body:has(.axp-chart-widget-host__chart--funnel){flex:none}.axp-chart-widget-host__chart--heatmap{position:relative;width:100%;max-width:100%;inline-size:100%;block-size:auto;flex:0 0 auto;overflow:visible;min-height:0!important;min-block-size:0!important;max-block-size:none}.axp-chart-widget-host__chart--heatmap ax-heatmap-chart,.axp-chart-widget-host__chart--heatmap .ax-heatmap-chart-container{display:block;inline-size:100%;max-inline-size:100%;block-size:auto;min-block-size:0;overflow:visible}.axp-chart-widget-host__body:has(.axp-chart-widget-host__chart--heatmap){flex:none;block-size:auto;min-block-size:0;overflow:visible}.axp-chart-widget-host__legend{width:100%;flex:none;grid-row:2;min-height:0;min-width:0;max-width:100%;display:flex;justify-content:flex-start;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;scrollbar-color:rgb(var(--ax-sys-color-border-lighter-surface)) transparent}:host ::ng-deep ax-chart-legend{display:block!important;height:auto!important;max-height:none;width:max-content;min-width:100%;max-width:none}:host ::ng-deep .ax-chart-legend{--ax-legend-bg: var(--ax-sys-color-lighter-surface);--ax-legend-text: var(--ax-sys-color-on-lighter-surface);--ax-legend-border: var(--ax-sys-color-border-lighter-surface);--ax-legend-radius: .625rem;--ax-legend-padding: .375rem .5rem;--ax-legend-gap: .375rem;--ax-legend-item-height: auto;height:auto;max-height:none;width:100%;overflow:visible;padding:var(--ax-legend-padding);gap:var(--ax-legend-gap);color:rgb(var(--ax-legend-text))}:host ::ng-deep .ax-chart-legend.ax-legend-horizontal{flex-direction:row;flex-wrap:nowrap;align-items:center;justify-content:flex-start;width:max-content;min-width:100%;max-width:none;overflow:visible;border:none;background:transparent;background-color:transparent;padding:.125rem .75rem .7rem;gap:.5rem}:host ::ng-deep .ax-legend-item{align-items:center;flex-shrink:0;gap:.375rem;height:auto;min-height:1.5rem;padding-block:.2rem;padding-inline:.5rem;border-radius:9999px;border:1px solid rgb(var(--ax-sys-color-border-lightest-surface));background-color:rgb(var(--ax-sys-color-lightest-surface));white-space:nowrap;transition:background-color .15s ease,border-color .15s ease,box-shadow .15s ease,opacity .15s ease,transform .15s ease}:host ::ng-deep .ax-legend-item:hover{border-color:rgb(var(--ax-sys-color-primary-500));background-color:rgb(var(--ax-sys-color-primary-500));box-shadow:0 1px 2px #0f172a0f}@supports (color: color-mix(in lab,red,red)){:host ::ng-deep .ax-legend-item:hover{border-color:color-mix(in srgb,rgb(var(--ax-sys-color-primary-500)) 35%,rgb(var(--ax-sys-color-border-lightest-surface)))}}@supports (color: color-mix(in lab,red,red)){:host ::ng-deep .ax-legend-item:hover{background-color:color-mix(in srgb,rgb(var(--ax-sys-color-primary-500)) 6%,rgb(var(--ax-sys-color-lightest-surface)))}}:host ::ng-deep .ax-legend-item:active{transform:scale(.98)}:host ::ng-deep .ax-legend-item.ax-legend-item-hidden{opacity:.62}:host ::ng-deep .ax-legend-color{width:.625rem;height:.625rem;flex-shrink:0;border-radius:9999px;box-shadow:0 0 0 1px rgb(var(--ax-legend-text))}@supports (color: color-mix(in lab,red,red)){:host ::ng-deep .ax-legend-color{box-shadow:0 0 0 1px color-mix(in srgb,rgb(var(--ax-legend-text)) 18%,transparent)}}:host ::ng-deep .ax-legend-name{font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);max-width:9rem;overflow:hidden;text-overflow:ellipsis}:host ::ng-deep .ax-legend-value{font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600);--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,);margin-inline-start:0;opacity:1;color:rgb(var(--ax-sys-color-on-lightest-surface))}:host ::ng-deep .ax-legend-percentage{margin-inline-start:0;border-radius:9999px;padding-inline:.4rem;padding-block:.125rem;font-size:.6875rem;line-height:1;font-weight:600;font-variant-numeric:tabular-nums;background-color:rgb(var(--ax-legend-text))}@supports (color: color-mix(in lab,red,red)){:host ::ng-deep .ax-legend-percentage{background-color:color-mix(in srgb,rgb(var(--ax-legend-text)) 12%,transparent)}}:host ::ng-deep ax-donut-chart,:host ::ng-deep ax-gauge-chart,:host ::ng-deep ax-bar-chart,:host ::ng-deep ax-line-chart,:host ::ng-deep ax-funnel-chart{display:block!important;width:100%!important;height:100%!important;min-height:0!important;max-height:100%!important}:host ::ng-deep .axp-chart-widget-host__chart--heatmap ax-heatmap-chart{display:block!important;width:100%!important;max-width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important}:host ::ng-deep ax-donut-chart .ax-donut-chart,:host ::ng-deep ax-gauge-chart .ax-gauge-chart,:host ::ng-deep ax-bar-chart .ax-bar-chart,:host ::ng-deep ax-line-chart .ax-line-chart,:host ::ng-deep ax-funnel-chart .ax-funnel-chart-container{min-height:0!important;height:100%!important;width:100%!important;padding:.25rem!important}:host ::ng-deep .axp-chart-widget-host__chart--heatmap ax-heatmap-chart .ax-heatmap-chart-container,:host ::ng-deep .axp-chart-widget-host__chart--heatmap .ax-heatmap-chart{min-height:0!important;height:auto!important;width:100%!important;max-width:100%!important;padding:.25rem!important;overflow:visible!important}:host ::ng-deep .axp-chart-widget-host__chart--heatmap svg{display:block;width:100%!important;max-width:100%!important;height:auto!important;overflow:visible!important}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@property --tw-ordinal{syntax: \"*\"; inherits: false;}@property --tw-slashed-zero{syntax: \"*\"; inherits: false;}@property --tw-numeric-figure{syntax: \"*\"; inherits: false;}@property --tw-numeric-spacing{syntax: \"*\"; inherits: false;}@property --tw-numeric-fraction{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight: initial;--tw-ordinal: initial;--tw-slashed-zero: initial;--tw-numeric-figure: initial;--tw-numeric-spacing: initial;--tw-numeric-fraction: initial}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: AXGaugeChartComponent, selector: "ax-gauge-chart", inputs: ["value", "options"] }, { kind: "component", type: AXPChartQueryTabsComponent, selector: "axp-chart-query-tabs", inputs: ["tabs", "activeIndex"], outputs: ["activeIndexChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
130
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.8", type: AXPGaugeChartWidgetViewComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<div class=\"axp-chart-widget-host\">\n <axp-chart-query-tabs\n [tabs]=\"queryTabs()\"\n [activeIndex]=\"activeTabIndex()\"\n (activeIndexChange)=\"selectQueryTab($event)\"\n />\n <div class=\"axp-chart-widget-host__body\">\n <div class=\"axp-chart-widget-host__chart axp-chart-widget-host__chart--radial\">\n <ax-gauge-chart [value]=\"value()\" [options]=\"gaugeChartOptions()\"></ax-gauge-chart>\n </div>\n </div>\n</div>\n", styles: ["@layer properties;:host{display:block;width:100%;height:100%;min-height:0px;overflow:hidden}:host:has(.axp-chart-widget-host__chart--heatmap){block-size:auto;overflow:visible;min-block-size:0}.axp-chart-widget-host{display:flex;height:100%;min-height:0px;width:100%;flex-direction:column;gap:var(--spacing, .25rem)}.axp-chart-widget-host:has(.axp-chart-widget-host__chart--heatmap){block-size:auto;min-block-size:0;overflow:visible}.axp-chart-widget-host__body{display:flex;min-height:0px;flex:1;flex-direction:column;gap:var(--spacing, .25rem);padding-bottom:calc(var(--spacing, .25rem) * 2)}.axp-chart-widget-host__body:not(.axp-chart-widget-host__body--with-legend)>.axp-chart-widget-host__chart--radial{flex:1 1 auto}.axp-chart-widget-host__body--with-legend{min-height:0px;flex:1;gap:var(--spacing, .25rem);display:grid;grid-template-rows:minmax(0,1fr) auto}.axp-chart-widget-host__chart{position:relative;min-height:calc(var(--spacing, .25rem) * 64);width:100%;overflow:hidden;grid-row:1}.axp-chart-widget-host__chart--radial{position:relative;margin-inline:auto;align-self:center;justify-self:center;overflow:hidden;grid-row:1;flex:0 0 auto;height:auto;width:min(100%,18rem);max-width:100%;min-height:12rem;min-width:8rem;aspect-ratio:1 / 1}.axp-chart-widget-host__chart--funnel{position:relative;width:100%;overflow:hidden;block-size:20rem;flex:0 0 auto;max-block-size:24rem;min-block-size:16rem}.axp-chart-widget-host__chart--funnel ax-funnel-chart,.axp-chart-widget-host__chart--funnel .ax-funnel-chart-container{display:block;block-size:100%;inline-size:100%;min-block-size:0}.axp-chart-widget-host__body:has(.axp-chart-widget-host__chart--funnel){flex:none}.axp-chart-widget-host__chart--heatmap{position:relative;width:100%;max-width:100%;inline-size:100%;block-size:auto;flex:0 0 auto;overflow:visible;min-height:0!important;min-block-size:0!important;max-block-size:none}.axp-chart-widget-host__chart--heatmap ax-heatmap-chart,.axp-chart-widget-host__chart--heatmap .ax-heatmap-chart-container{display:block;inline-size:100%;max-inline-size:100%;block-size:auto;min-block-size:0;overflow:visible}.axp-chart-widget-host__body:has(.axp-chart-widget-host__chart--heatmap){flex:none;block-size:auto;min-block-size:0;overflow:visible}.axp-chart-widget-host__legend{width:100%;flex:none;grid-row:2;min-height:0;min-width:0;max-width:100%;display:flex;justify-content:flex-start;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;scrollbar-color:rgb(var(--ax-sys-color-border-lighter-surface)) transparent}:host ::ng-deep ax-chart-legend{display:block!important;height:auto!important;max-height:none;width:max-content;min-width:100%;max-width:none}:host ::ng-deep .ax-chart-legend{--ax-legend-bg: var(--ax-sys-color-lighter-surface);--ax-legend-text: var(--ax-sys-color-on-lighter-surface);--ax-legend-border: var(--ax-sys-color-border-lighter-surface);--ax-legend-radius: .625rem;--ax-legend-padding: .375rem .5rem;--ax-legend-gap: .375rem;--ax-legend-item-height: auto;height:auto;max-height:none;width:100%;overflow:visible;padding:var(--ax-legend-padding);gap:var(--ax-legend-gap);color:rgb(var(--ax-legend-text))}:host ::ng-deep .ax-chart-legend.ax-legend-horizontal{flex-direction:row;flex-wrap:nowrap;align-items:center;justify-content:flex-start;width:max-content;min-width:100%;max-width:none;overflow:visible;border:none;background:transparent;background-color:transparent;padding:.125rem .75rem .7rem;gap:.5rem}:host ::ng-deep .ax-legend-item{align-items:center;flex-shrink:0;gap:.375rem;height:auto;min-height:1.5rem;padding-block:.2rem;padding-inline:.5rem;border-radius:9999px;border:1px solid rgb(var(--ax-sys-color-border-lightest-surface));background-color:rgb(var(--ax-sys-color-lightest-surface));white-space:nowrap;transition:background-color .15s ease,border-color .15s ease,box-shadow .15s ease,opacity .15s ease,transform .15s ease}:host ::ng-deep .ax-legend-item:hover{border-color:rgb(var(--ax-sys-color-primary-500));background-color:rgb(var(--ax-sys-color-primary-500));box-shadow:0 1px 2px #0f172a0f}@supports (color: color-mix(in lab,red,red)){:host ::ng-deep .ax-legend-item:hover{border-color:color-mix(in srgb,rgb(var(--ax-sys-color-primary-500)) 35%,rgb(var(--ax-sys-color-border-lightest-surface)))}}@supports (color: color-mix(in lab,red,red)){:host ::ng-deep .ax-legend-item:hover{background-color:color-mix(in srgb,rgb(var(--ax-sys-color-primary-500)) 6%,rgb(var(--ax-sys-color-lightest-surface)))}}:host ::ng-deep .ax-legend-item:active{transform:scale(.98)}:host ::ng-deep .ax-legend-item.ax-legend-item-hidden{opacity:.62}:host ::ng-deep .ax-legend-color{width:.625rem;height:.625rem;flex-shrink:0;border-radius:9999px;box-shadow:0 0 0 1px rgb(var(--ax-legend-text))}@supports (color: color-mix(in lab,red,red)){:host ::ng-deep .ax-legend-color{box-shadow:0 0 0 1px color-mix(in srgb,rgb(var(--ax-legend-text)) 18%,transparent)}}:host ::ng-deep .ax-legend-name{font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);max-width:9rem;overflow:hidden;text-overflow:ellipsis}:host ::ng-deep .ax-legend-value{font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600);--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,);margin-inline-start:0;opacity:1;color:rgb(var(--ax-sys-color-on-lightest-surface))}:host ::ng-deep .ax-legend-percentage{margin-inline-start:0;border-radius:9999px;padding-inline:.4rem;padding-block:.125rem;font-size:.6875rem;line-height:1;font-weight:600;font-variant-numeric:tabular-nums;background-color:rgb(var(--ax-legend-text))}@supports (color: color-mix(in lab,red,red)){:host ::ng-deep .ax-legend-percentage{background-color:color-mix(in srgb,rgb(var(--ax-legend-text)) 12%,transparent)}}:host ::ng-deep ax-donut-chart,:host ::ng-deep ax-gauge-chart,:host ::ng-deep ax-bar-chart,:host ::ng-deep ax-line-chart,:host ::ng-deep ax-funnel-chart{display:block!important;width:100%!important;height:100%!important;min-height:0!important;max-height:100%!important}:host ::ng-deep .axp-chart-widget-host__chart--heatmap ax-heatmap-chart{display:block!important;width:100%!important;max-width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important}:host ::ng-deep ax-donut-chart .ax-donut-chart,:host ::ng-deep ax-gauge-chart .ax-gauge-chart,:host ::ng-deep ax-bar-chart .ax-bar-chart,:host ::ng-deep ax-line-chart .ax-line-chart,:host ::ng-deep ax-funnel-chart .ax-funnel-chart-container{min-height:0!important;height:100%!important;width:100%!important;padding:.25rem!important}:host ::ng-deep .axp-chart-widget-host__chart--heatmap ax-heatmap-chart .ax-heatmap-chart-container,:host ::ng-deep .axp-chart-widget-host__chart--heatmap .ax-heatmap-chart{min-height:0!important;height:auto!important;width:100%!important;max-width:100%!important;padding:.25rem!important;overflow:visible!important}:host ::ng-deep .axp-chart-widget-host__chart--heatmap svg{display:block;width:100%!important;max-width:100%!important;height:auto!important;overflow:visible!important}:host:has(.ax-chart-empty){block-size:100%;overflow:hidden}.axp-chart-widget-host:has(.ax-chart-empty){block-size:100%;overflow:hidden}.axp-chart-widget-host__body:has(.ax-chart-empty){flex:1 1 auto;min-block-size:0;overflow:hidden}.axp-chart-widget-host__chart--heatmap:has(.ax-chart-empty){flex:1 1 auto;block-size:100%;min-block-size:16rem!important;overflow:hidden}:host ::ng-deep .axp-chart-widget-host__chart--heatmap:has(.ax-chart-empty) ax-heatmap-chart,:host ::ng-deep .axp-chart-widget-host__chart--heatmap:has(.ax-chart-empty) ax-heatmap-chart .ax-heatmap-chart-container{display:block!important;width:100%!important;max-width:100%!important;height:100%!important;min-height:16rem!important;max-height:none!important;overflow:hidden!important}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@property --tw-ordinal{syntax: \"*\"; inherits: false;}@property --tw-slashed-zero{syntax: \"*\"; inherits: false;}@property --tw-numeric-figure{syntax: \"*\"; inherits: false;}@property --tw-numeric-spacing{syntax: \"*\"; inherits: false;}@property --tw-numeric-fraction{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight: initial;--tw-ordinal: initial;--tw-slashed-zero: initial;--tw-numeric-figure: initial;--tw-numeric-spacing: initial;--tw-numeric-fraction: initial}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: AXGaugeChartComponent, selector: "ax-gauge-chart", inputs: ["value", "options"] }, { kind: "component", type: AXPChartQueryTabsComponent, selector: "axp-chart-query-tabs", inputs: ["tabs", "activeIndex"], outputs: ["activeIndexChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
131
131
|
}
|
|
132
132
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPGaugeChartWidgetViewComponent, decorators: [{
|
|
133
133
|
type: Component,
|
|
134
|
-
args: [{ imports: [AXGaugeChartComponent, AXPChartQueryTabsComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"axp-chart-widget-host\">\n <axp-chart-query-tabs\n [tabs]=\"queryTabs()\"\n [activeIndex]=\"activeTabIndex()\"\n (activeIndexChange)=\"selectQueryTab($event)\"\n />\n <div class=\"axp-chart-widget-host__body\">\n <div class=\"axp-chart-widget-host__chart axp-chart-widget-host__chart--radial\">\n <ax-gauge-chart [value]=\"value()\" [options]=\"gaugeChartOptions()\"></ax-gauge-chart>\n </div>\n </div>\n</div>\n", styles: ["@layer properties;:host{display:block;width:100%;height:100%;min-height:0px;overflow:hidden}:host:has(.axp-chart-widget-host__chart--heatmap){block-size:auto;overflow:visible;min-block-size:0}.axp-chart-widget-host{display:flex;height:100%;min-height:0px;width:100%;flex-direction:column;gap:var(--spacing, .25rem)}.axp-chart-widget-host:has(.axp-chart-widget-host__chart--heatmap){block-size:auto;min-block-size:0;overflow:visible}.axp-chart-widget-host__body{display:flex;min-height:0px;flex:1;flex-direction:column;gap:var(--spacing, .25rem);padding-bottom:calc(var(--spacing, .25rem) * 2)}.axp-chart-widget-host__body:not(.axp-chart-widget-host__body--with-legend)>.axp-chart-widget-host__chart--radial{flex:1 1 auto}.axp-chart-widget-host__body--with-legend{min-height:0px;flex:1;gap:var(--spacing, .25rem);display:grid;grid-template-rows:minmax(0,1fr) auto}.axp-chart-widget-host__chart{position:relative;min-height:calc(var(--spacing, .25rem) * 64);width:100%;overflow:hidden;grid-row:1}.axp-chart-widget-host__chart--radial{position:relative;margin-inline:auto;align-self:center;justify-self:center;overflow:hidden;grid-row:1;flex:0 0 auto;height:auto;width:min(100%,18rem);max-width:100%;min-height:12rem;min-width:8rem;aspect-ratio:1 / 1}.axp-chart-widget-host__chart--funnel{position:relative;width:100%;overflow:hidden;block-size:20rem;flex:0 0 auto;max-block-size:24rem;min-block-size:16rem}.axp-chart-widget-host__chart--funnel ax-funnel-chart,.axp-chart-widget-host__chart--funnel .ax-funnel-chart-container{display:block;block-size:100%;inline-size:100%;min-block-size:0}.axp-chart-widget-host__body:has(.axp-chart-widget-host__chart--funnel){flex:none}.axp-chart-widget-host__chart--heatmap{position:relative;width:100%;max-width:100%;inline-size:100%;block-size:auto;flex:0 0 auto;overflow:visible;min-height:0!important;min-block-size:0!important;max-block-size:none}.axp-chart-widget-host__chart--heatmap ax-heatmap-chart,.axp-chart-widget-host__chart--heatmap .ax-heatmap-chart-container{display:block;inline-size:100%;max-inline-size:100%;block-size:auto;min-block-size:0;overflow:visible}.axp-chart-widget-host__body:has(.axp-chart-widget-host__chart--heatmap){flex:none;block-size:auto;min-block-size:0;overflow:visible}.axp-chart-widget-host__legend{width:100%;flex:none;grid-row:2;min-height:0;min-width:0;max-width:100%;display:flex;justify-content:flex-start;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;scrollbar-color:rgb(var(--ax-sys-color-border-lighter-surface)) transparent}:host ::ng-deep ax-chart-legend{display:block!important;height:auto!important;max-height:none;width:max-content;min-width:100%;max-width:none}:host ::ng-deep .ax-chart-legend{--ax-legend-bg: var(--ax-sys-color-lighter-surface);--ax-legend-text: var(--ax-sys-color-on-lighter-surface);--ax-legend-border: var(--ax-sys-color-border-lighter-surface);--ax-legend-radius: .625rem;--ax-legend-padding: .375rem .5rem;--ax-legend-gap: .375rem;--ax-legend-item-height: auto;height:auto;max-height:none;width:100%;overflow:visible;padding:var(--ax-legend-padding);gap:var(--ax-legend-gap);color:rgb(var(--ax-legend-text))}:host ::ng-deep .ax-chart-legend.ax-legend-horizontal{flex-direction:row;flex-wrap:nowrap;align-items:center;justify-content:flex-start;width:max-content;min-width:100%;max-width:none;overflow:visible;border:none;background:transparent;background-color:transparent;padding:.125rem .75rem .7rem;gap:.5rem}:host ::ng-deep .ax-legend-item{align-items:center;flex-shrink:0;gap:.375rem;height:auto;min-height:1.5rem;padding-block:.2rem;padding-inline:.5rem;border-radius:9999px;border:1px solid rgb(var(--ax-sys-color-border-lightest-surface));background-color:rgb(var(--ax-sys-color-lightest-surface));white-space:nowrap;transition:background-color .15s ease,border-color .15s ease,box-shadow .15s ease,opacity .15s ease,transform .15s ease}:host ::ng-deep .ax-legend-item:hover{border-color:rgb(var(--ax-sys-color-primary-500));background-color:rgb(var(--ax-sys-color-primary-500));box-shadow:0 1px 2px #0f172a0f}@supports (color: color-mix(in lab,red,red)){:host ::ng-deep .ax-legend-item:hover{border-color:color-mix(in srgb,rgb(var(--ax-sys-color-primary-500)) 35%,rgb(var(--ax-sys-color-border-lightest-surface)))}}@supports (color: color-mix(in lab,red,red)){:host ::ng-deep .ax-legend-item:hover{background-color:color-mix(in srgb,rgb(var(--ax-sys-color-primary-500)) 6%,rgb(var(--ax-sys-color-lightest-surface)))}}:host ::ng-deep .ax-legend-item:active{transform:scale(.98)}:host ::ng-deep .ax-legend-item.ax-legend-item-hidden{opacity:.62}:host ::ng-deep .ax-legend-color{width:.625rem;height:.625rem;flex-shrink:0;border-radius:9999px;box-shadow:0 0 0 1px rgb(var(--ax-legend-text))}@supports (color: color-mix(in lab,red,red)){:host ::ng-deep .ax-legend-color{box-shadow:0 0 0 1px color-mix(in srgb,rgb(var(--ax-legend-text)) 18%,transparent)}}:host ::ng-deep .ax-legend-name{font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);max-width:9rem;overflow:hidden;text-overflow:ellipsis}:host ::ng-deep .ax-legend-value{font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600);--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,);margin-inline-start:0;opacity:1;color:rgb(var(--ax-sys-color-on-lightest-surface))}:host ::ng-deep .ax-legend-percentage{margin-inline-start:0;border-radius:9999px;padding-inline:.4rem;padding-block:.125rem;font-size:.6875rem;line-height:1;font-weight:600;font-variant-numeric:tabular-nums;background-color:rgb(var(--ax-legend-text))}@supports (color: color-mix(in lab,red,red)){:host ::ng-deep .ax-legend-percentage{background-color:color-mix(in srgb,rgb(var(--ax-legend-text)) 12%,transparent)}}:host ::ng-deep ax-donut-chart,:host ::ng-deep ax-gauge-chart,:host ::ng-deep ax-bar-chart,:host ::ng-deep ax-line-chart,:host ::ng-deep ax-funnel-chart{display:block!important;width:100%!important;height:100%!important;min-height:0!important;max-height:100%!important}:host ::ng-deep .axp-chart-widget-host__chart--heatmap ax-heatmap-chart{display:block!important;width:100%!important;max-width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important}:host ::ng-deep ax-donut-chart .ax-donut-chart,:host ::ng-deep ax-gauge-chart .ax-gauge-chart,:host ::ng-deep ax-bar-chart .ax-bar-chart,:host ::ng-deep ax-line-chart .ax-line-chart,:host ::ng-deep ax-funnel-chart .ax-funnel-chart-container{min-height:0!important;height:100%!important;width:100%!important;padding:.25rem!important}:host ::ng-deep .axp-chart-widget-host__chart--heatmap ax-heatmap-chart .ax-heatmap-chart-container,:host ::ng-deep .axp-chart-widget-host__chart--heatmap .ax-heatmap-chart{min-height:0!important;height:auto!important;width:100%!important;max-width:100%!important;padding:.25rem!important;overflow:visible!important}:host ::ng-deep .axp-chart-widget-host__chart--heatmap svg{display:block;width:100%!important;max-width:100%!important;height:auto!important;overflow:visible!important}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@property --tw-ordinal{syntax: \"*\"; inherits: false;}@property --tw-slashed-zero{syntax: \"*\"; inherits: false;}@property --tw-numeric-figure{syntax: \"*\"; inherits: false;}@property --tw-numeric-spacing{syntax: \"*\"; inherits: false;}@property --tw-numeric-fraction{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight: initial;--tw-ordinal: initial;--tw-slashed-zero: initial;--tw-numeric-figure: initial;--tw-numeric-spacing: initial;--tw-numeric-fraction: initial}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"] }]
|
|
134
|
+
args: [{ imports: [AXGaugeChartComponent, AXPChartQueryTabsComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"axp-chart-widget-host\">\n <axp-chart-query-tabs\n [tabs]=\"queryTabs()\"\n [activeIndex]=\"activeTabIndex()\"\n (activeIndexChange)=\"selectQueryTab($event)\"\n />\n <div class=\"axp-chart-widget-host__body\">\n <div class=\"axp-chart-widget-host__chart axp-chart-widget-host__chart--radial\">\n <ax-gauge-chart [value]=\"value()\" [options]=\"gaugeChartOptions()\"></ax-gauge-chart>\n </div>\n </div>\n</div>\n", styles: ["@layer properties;:host{display:block;width:100%;height:100%;min-height:0px;overflow:hidden}:host:has(.axp-chart-widget-host__chart--heatmap){block-size:auto;overflow:visible;min-block-size:0}.axp-chart-widget-host{display:flex;height:100%;min-height:0px;width:100%;flex-direction:column;gap:var(--spacing, .25rem)}.axp-chart-widget-host:has(.axp-chart-widget-host__chart--heatmap){block-size:auto;min-block-size:0;overflow:visible}.axp-chart-widget-host__body{display:flex;min-height:0px;flex:1;flex-direction:column;gap:var(--spacing, .25rem);padding-bottom:calc(var(--spacing, .25rem) * 2)}.axp-chart-widget-host__body:not(.axp-chart-widget-host__body--with-legend)>.axp-chart-widget-host__chart--radial{flex:1 1 auto}.axp-chart-widget-host__body--with-legend{min-height:0px;flex:1;gap:var(--spacing, .25rem);display:grid;grid-template-rows:minmax(0,1fr) auto}.axp-chart-widget-host__chart{position:relative;min-height:calc(var(--spacing, .25rem) * 64);width:100%;overflow:hidden;grid-row:1}.axp-chart-widget-host__chart--radial{position:relative;margin-inline:auto;align-self:center;justify-self:center;overflow:hidden;grid-row:1;flex:0 0 auto;height:auto;width:min(100%,18rem);max-width:100%;min-height:12rem;min-width:8rem;aspect-ratio:1 / 1}.axp-chart-widget-host__chart--funnel{position:relative;width:100%;overflow:hidden;block-size:20rem;flex:0 0 auto;max-block-size:24rem;min-block-size:16rem}.axp-chart-widget-host__chart--funnel ax-funnel-chart,.axp-chart-widget-host__chart--funnel .ax-funnel-chart-container{display:block;block-size:100%;inline-size:100%;min-block-size:0}.axp-chart-widget-host__body:has(.axp-chart-widget-host__chart--funnel){flex:none}.axp-chart-widget-host__chart--heatmap{position:relative;width:100%;max-width:100%;inline-size:100%;block-size:auto;flex:0 0 auto;overflow:visible;min-height:0!important;min-block-size:0!important;max-block-size:none}.axp-chart-widget-host__chart--heatmap ax-heatmap-chart,.axp-chart-widget-host__chart--heatmap .ax-heatmap-chart-container{display:block;inline-size:100%;max-inline-size:100%;block-size:auto;min-block-size:0;overflow:visible}.axp-chart-widget-host__body:has(.axp-chart-widget-host__chart--heatmap){flex:none;block-size:auto;min-block-size:0;overflow:visible}.axp-chart-widget-host__legend{width:100%;flex:none;grid-row:2;min-height:0;min-width:0;max-width:100%;display:flex;justify-content:flex-start;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;scrollbar-color:rgb(var(--ax-sys-color-border-lighter-surface)) transparent}:host ::ng-deep ax-chart-legend{display:block!important;height:auto!important;max-height:none;width:max-content;min-width:100%;max-width:none}:host ::ng-deep .ax-chart-legend{--ax-legend-bg: var(--ax-sys-color-lighter-surface);--ax-legend-text: var(--ax-sys-color-on-lighter-surface);--ax-legend-border: var(--ax-sys-color-border-lighter-surface);--ax-legend-radius: .625rem;--ax-legend-padding: .375rem .5rem;--ax-legend-gap: .375rem;--ax-legend-item-height: auto;height:auto;max-height:none;width:100%;overflow:visible;padding:var(--ax-legend-padding);gap:var(--ax-legend-gap);color:rgb(var(--ax-legend-text))}:host ::ng-deep .ax-chart-legend.ax-legend-horizontal{flex-direction:row;flex-wrap:nowrap;align-items:center;justify-content:flex-start;width:max-content;min-width:100%;max-width:none;overflow:visible;border:none;background:transparent;background-color:transparent;padding:.125rem .75rem .7rem;gap:.5rem}:host ::ng-deep .ax-legend-item{align-items:center;flex-shrink:0;gap:.375rem;height:auto;min-height:1.5rem;padding-block:.2rem;padding-inline:.5rem;border-radius:9999px;border:1px solid rgb(var(--ax-sys-color-border-lightest-surface));background-color:rgb(var(--ax-sys-color-lightest-surface));white-space:nowrap;transition:background-color .15s ease,border-color .15s ease,box-shadow .15s ease,opacity .15s ease,transform .15s ease}:host ::ng-deep .ax-legend-item:hover{border-color:rgb(var(--ax-sys-color-primary-500));background-color:rgb(var(--ax-sys-color-primary-500));box-shadow:0 1px 2px #0f172a0f}@supports (color: color-mix(in lab,red,red)){:host ::ng-deep .ax-legend-item:hover{border-color:color-mix(in srgb,rgb(var(--ax-sys-color-primary-500)) 35%,rgb(var(--ax-sys-color-border-lightest-surface)))}}@supports (color: color-mix(in lab,red,red)){:host ::ng-deep .ax-legend-item:hover{background-color:color-mix(in srgb,rgb(var(--ax-sys-color-primary-500)) 6%,rgb(var(--ax-sys-color-lightest-surface)))}}:host ::ng-deep .ax-legend-item:active{transform:scale(.98)}:host ::ng-deep .ax-legend-item.ax-legend-item-hidden{opacity:.62}:host ::ng-deep .ax-legend-color{width:.625rem;height:.625rem;flex-shrink:0;border-radius:9999px;box-shadow:0 0 0 1px rgb(var(--ax-legend-text))}@supports (color: color-mix(in lab,red,red)){:host ::ng-deep .ax-legend-color{box-shadow:0 0 0 1px color-mix(in srgb,rgb(var(--ax-legend-text)) 18%,transparent)}}:host ::ng-deep .ax-legend-name{font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);max-width:9rem;overflow:hidden;text-overflow:ellipsis}:host ::ng-deep .ax-legend-value{font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600);--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,);margin-inline-start:0;opacity:1;color:rgb(var(--ax-sys-color-on-lightest-surface))}:host ::ng-deep .ax-legend-percentage{margin-inline-start:0;border-radius:9999px;padding-inline:.4rem;padding-block:.125rem;font-size:.6875rem;line-height:1;font-weight:600;font-variant-numeric:tabular-nums;background-color:rgb(var(--ax-legend-text))}@supports (color: color-mix(in lab,red,red)){:host ::ng-deep .ax-legend-percentage{background-color:color-mix(in srgb,rgb(var(--ax-legend-text)) 12%,transparent)}}:host ::ng-deep ax-donut-chart,:host ::ng-deep ax-gauge-chart,:host ::ng-deep ax-bar-chart,:host ::ng-deep ax-line-chart,:host ::ng-deep ax-funnel-chart{display:block!important;width:100%!important;height:100%!important;min-height:0!important;max-height:100%!important}:host ::ng-deep .axp-chart-widget-host__chart--heatmap ax-heatmap-chart{display:block!important;width:100%!important;max-width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important}:host ::ng-deep ax-donut-chart .ax-donut-chart,:host ::ng-deep ax-gauge-chart .ax-gauge-chart,:host ::ng-deep ax-bar-chart .ax-bar-chart,:host ::ng-deep ax-line-chart .ax-line-chart,:host ::ng-deep ax-funnel-chart .ax-funnel-chart-container{min-height:0!important;height:100%!important;width:100%!important;padding:.25rem!important}:host ::ng-deep .axp-chart-widget-host__chart--heatmap ax-heatmap-chart .ax-heatmap-chart-container,:host ::ng-deep .axp-chart-widget-host__chart--heatmap .ax-heatmap-chart{min-height:0!important;height:auto!important;width:100%!important;max-width:100%!important;padding:.25rem!important;overflow:visible!important}:host ::ng-deep .axp-chart-widget-host__chart--heatmap svg{display:block;width:100%!important;max-width:100%!important;height:auto!important;overflow:visible!important}:host:has(.ax-chart-empty){block-size:100%;overflow:hidden}.axp-chart-widget-host:has(.ax-chart-empty){block-size:100%;overflow:hidden}.axp-chart-widget-host__body:has(.ax-chart-empty){flex:1 1 auto;min-block-size:0;overflow:hidden}.axp-chart-widget-host__chart--heatmap:has(.ax-chart-empty){flex:1 1 auto;block-size:100%;min-block-size:16rem!important;overflow:hidden}:host ::ng-deep .axp-chart-widget-host__chart--heatmap:has(.ax-chart-empty) ax-heatmap-chart,:host ::ng-deep .axp-chart-widget-host__chart--heatmap:has(.ax-chart-empty) ax-heatmap-chart .ax-heatmap-chart-container{display:block!important;width:100%!important;max-width:100%!important;height:100%!important;min-height:16rem!important;max-height:none!important;overflow:hidden!important}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@property --tw-ordinal{syntax: \"*\"; inherits: false;}@property --tw-slashed-zero{syntax: \"*\"; inherits: false;}@property --tw-numeric-figure{syntax: \"*\"; inherits: false;}@property --tw-numeric-spacing{syntax: \"*\"; inherits: false;}@property --tw-numeric-fraction{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight: initial;--tw-ordinal: initial;--tw-slashed-zero: initial;--tw-numeric-figure: initial;--tw-numeric-spacing: initial;--tw-numeric-fraction: initial}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"] }]
|
|
135
135
|
}], ctorParameters: () => [] });
|
|
136
136
|
|
|
137
137
|
export { AXPGaugeChartWidgetViewComponent };
|
|
138
|
-
//# sourceMappingURL=acorex-platform-module-dashboard-management-client-gauge-chart-widget.component-
|
|
138
|
+
//# sourceMappingURL=acorex-platform-module-dashboard-management-client-gauge-chart-widget.component-Ci1cRFmt.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-dashboard-management-client-gauge-chart-widget.component-Cy6fgife.mjs","sources":["../../../../libs/modules/dashboard-management/client/src/lib/features/shared/widgets/chart/gauge-chart/gauge-chart-widget.component.ts","../../../../libs/modules/dashboard-management/client/src/lib/features/shared/widgets/chart/gauge-chart/gauge-chart-widget.component.html"],"sourcesContent":["import { AXGaugeChartComponent, AXGaugeChartOption } from '@acorex/charts/gauge-chart';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\nimport { AXPQueryExecutor } from '@acorex-platform/framework-client/runtime';\nimport { ChangeDetectionStrategy, Component, computed, effect, inject, signal } from '@angular/core';\nimport { AXPDashboardWidgetComponent } from '../../dashboard-widget-base';\nimport { resolveChartQueryTabs } from '../chart-query-load.util';\nimport { loadGaugeChartValue } from '../chart-widget-data.util';\nimport { omitChartFixedSize } from '../chart-legend.util';\nimport { AXPChartQueryTabsComponent } from '../chart-query-tabs.component';\n\n/**\n * Gauge Chart Widget Component\n * Renders a semi-circular gauge chart with animated needle and thresholds\n */\n@Component({\n templateUrl: './gauge-chart-widget.component.html',\n styleUrls: ['./gauge-chart-widget.component.css'],\n imports: [AXGaugeChartComponent, AXPChartQueryTabsComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AXPGaugeChartWidgetViewComponent extends AXPDashboardWidgetComponent {\n //#region ----- Services & Dependencies -----\n\n private readonly queryExecutor = inject(AXPQueryExecutor);\n private readonly translationService = inject(AXTranslationService);\n\n //#endregion\n\n //#region ----- Chart state -----\n\n protected value = signal<number>(0);\n\n /** Options with resolved title, label, and threshold labels for the chart SVG/layer. */\n protected gaugeChartOptions = signal<AXGaugeChartOption & { title?: string }>(\n {} as AXGaugeChartOption & { title?: string },\n );\n\n private labelResolveGeneration = 0;\n\n //#endregion\n\n //#region ----- Localization -----\n\n private async resolveChartOptionLabel(value: unknown): Promise<string> {\n if (value != null && typeof value === 'object' && !Array.isArray(value)) {\n return this.translationService.resolve(value as AXPMultiLanguageString);\n }\n const s = String(value ?? '');\n if (s.startsWith('@')) {\n return this.translationService.translateAsync(s);\n }\n return s;\n }\n\n private readonly resolveGaugeOptionsEffect = effect(() => {\n const raw = this.options() as Record<string, unknown>;\n const generation = ++this.labelResolveGeneration;\n const thresholdSource = raw['thresholds'];\n void (async () => {\n const [title, label] = await Promise.all([\n this.resolveChartOptionLabel(raw['title']),\n this.resolveChartOptionLabel(raw['label']),\n ]);\n let thresholds: AXGaugeChartOption['thresholds'];\n if (Array.isArray(thresholdSource)) {\n thresholds = await Promise.all(\n thresholdSource.map(async (t) => {\n const entry = t as Record<string, unknown>;\n const labelRaw = entry['label'];\n return {\n value: entry['value'] as number,\n color: String(entry['color'] ?? ''),\n ...(labelRaw != null && labelRaw !== '' ? { label: await this.resolveChartOptionLabel(labelRaw) } : {}),\n };\n }),\n );\n }\n if (generation !== this.labelResolveGeneration) {\n return;\n }\n const base = omitChartFixedSize(raw) as unknown as AXGaugeChartOption & { title?: string };\n this.gaugeChartOptions.set({\n ...base,\n title,\n label,\n showValue: base.showValue !== false,\n showDataLabels: base.showDataLabels !== false,\n ...(thresholds ? { thresholds } : {}),\n });\n })();\n });\n\n //#endregion\n\n //#region ----- Query tabs -----\n\n protected readonly queryTabs = computed(() =>\n resolveChartQueryTabs(this.options() as Record<string, unknown>, this.entityContext()?.entityId),\n );\n\n protected readonly activeTabIndex = signal(0);\n\n private readonly activeQuery = computed(() => {\n const tabs = this.queryTabs();\n if (tabs.length === 0) {\n return undefined;\n }\n const index = Math.min(Math.max(this.activeTabIndex(), 0), tabs.length - 1);\n return tabs[index];\n });\n\n protected selectQueryTab(index: number): void {\n this.activeTabIndex.set(index);\n }\n\n private readonly clampTabIndexEffect = effect(() => {\n const tabs = this.queryTabs();\n if (this.activeTabIndex() >= tabs.length) {\n this.activeTabIndex.set(0);\n }\n });\n\n //#endregion\n\n //#region ----- Query loading -----\n\n private readonly dataLoadEffect = effect(async () => {\n const opts = this.options() as Record<string, unknown>;\n const active = this.activeQuery();\n const value = await loadGaugeChartValue(opts, {\n queryExecutor: this.queryExecutor,\n queryKey: active?.query,\n queryInput: active?.queryInput,\n });\n this.value.set(value);\n });\n\n //#endregion\n\n constructor() {\n super();\n this.setOptions({\n minValue: 0,\n maxValue: 100,\n showTooltip: true,\n showValue: true,\n showDataLabels: true,\n gaugeWidth: 18,\n cornerRadius: 4,\n animationEasing: 'cubic-out',\n animationDuration: 800,\n ...omitChartFixedSize(this.options() as Record<string, unknown>),\n });\n this.gaugeChartOptions.set(\n omitChartFixedSize(this.options() as Record<string, unknown>) as unknown as AXGaugeChartOption & {\n title?: string;\n },\n );\n }\n}\n","<div class=\"axp-chart-widget-host\">\n <axp-chart-query-tabs\n [tabs]=\"queryTabs()\"\n [activeIndex]=\"activeTabIndex()\"\n (activeIndexChange)=\"selectQueryTab($event)\"\n />\n <div class=\"axp-chart-widget-host__body\">\n <div class=\"axp-chart-widget-host__chart axp-chart-widget-host__chart--radial\">\n <ax-gauge-chart [value]=\"value()\" [options]=\"gaugeChartOptions()\"></ax-gauge-chart>\n </div>\n </div>\n</div>\n"],"names":[],"mappings":";;;;;;;;;AAWA;;;AAGG;AAOG,MAAO,gCAAiC,SAAQ,2BAA2B,CAAA;;;IAuBvE,MAAM,uBAAuB,CAAC,KAAc,EAAA;AAClD,QAAA,IAAI,KAAK,IAAI,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;YACvE,OAAO,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,KAA+B,CAAC;QACzE;QACA,MAAM,CAAC,GAAG,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC;AA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|
+
{"version":3,"file":"acorex-platform-module-dashboard-management-client-gauge-chart-widget.component-Ci1cRFmt.mjs","sources":["../../../../libs/modules/dashboard-management/client/src/lib/features/shared/widgets/chart/gauge-chart/gauge-chart-widget.component.ts","../../../../libs/modules/dashboard-management/client/src/lib/features/shared/widgets/chart/gauge-chart/gauge-chart-widget.component.html"],"sourcesContent":["import { AXGaugeChartComponent, AXGaugeChartOption } from '@acorex/charts/gauge-chart';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\nimport { AXPQueryExecutor } from '@acorex-platform/framework-client/runtime';\nimport { ChangeDetectionStrategy, Component, computed, effect, inject, signal } from '@angular/core';\nimport { AXPDashboardWidgetComponent } from '../../dashboard-widget-base';\nimport { resolveChartQueryTabs } from '../chart-query-load.util';\nimport { loadGaugeChartValue } from '../chart-widget-data.util';\nimport { omitChartFixedSize } from '../chart-legend.util';\nimport { AXPChartQueryTabsComponent } from '../chart-query-tabs.component';\n\n/**\n * Gauge Chart Widget Component\n * Renders a semi-circular gauge chart with animated needle and thresholds\n */\n@Component({\n templateUrl: './gauge-chart-widget.component.html',\n styleUrls: ['./gauge-chart-widget.component.css'],\n imports: [AXGaugeChartComponent, AXPChartQueryTabsComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AXPGaugeChartWidgetViewComponent extends AXPDashboardWidgetComponent {\n //#region ----- Services & Dependencies -----\n\n private readonly queryExecutor = inject(AXPQueryExecutor);\n private readonly translationService = inject(AXTranslationService);\n\n //#endregion\n\n //#region ----- Chart state -----\n\n protected value = signal<number>(0);\n\n /** Options with resolved title, label, and threshold labels for the chart SVG/layer. */\n protected gaugeChartOptions = signal<AXGaugeChartOption & { title?: string }>(\n {} as AXGaugeChartOption & { title?: string },\n );\n\n private labelResolveGeneration = 0;\n\n //#endregion\n\n //#region ----- Localization -----\n\n private async resolveChartOptionLabel(value: unknown): Promise<string> {\n if (value != null && typeof value === 'object' && !Array.isArray(value)) {\n return this.translationService.resolve(value as AXPMultiLanguageString);\n }\n const s = String(value ?? '');\n if (s.startsWith('@')) {\n return this.translationService.translateAsync(s);\n }\n return s;\n }\n\n private readonly resolveGaugeOptionsEffect = effect(() => {\n const raw = this.options() as Record<string, unknown>;\n const generation = ++this.labelResolveGeneration;\n const thresholdSource = raw['thresholds'];\n void (async () => {\n const [title, label] = await Promise.all([\n this.resolveChartOptionLabel(raw['title']),\n this.resolveChartOptionLabel(raw['label']),\n ]);\n let thresholds: AXGaugeChartOption['thresholds'];\n if (Array.isArray(thresholdSource)) {\n thresholds = await Promise.all(\n thresholdSource.map(async (t) => {\n const entry = t as Record<string, unknown>;\n const labelRaw = entry['label'];\n return {\n value: entry['value'] as number,\n color: String(entry['color'] ?? ''),\n ...(labelRaw != null && labelRaw !== '' ? { label: await this.resolveChartOptionLabel(labelRaw) } : {}),\n };\n }),\n );\n }\n if (generation !== this.labelResolveGeneration) {\n return;\n }\n const base = omitChartFixedSize(raw) as unknown as AXGaugeChartOption & { title?: string };\n this.gaugeChartOptions.set({\n ...base,\n title,\n label,\n showValue: base.showValue !== false,\n showDataLabels: base.showDataLabels !== false,\n ...(thresholds ? { thresholds } : {}),\n });\n })();\n });\n\n //#endregion\n\n //#region ----- Query tabs -----\n\n protected readonly queryTabs = computed(() =>\n resolveChartQueryTabs(this.options() as Record<string, unknown>, this.entityContext()?.entityId),\n );\n\n protected readonly activeTabIndex = signal(0);\n\n private readonly activeQuery = computed(() => {\n const tabs = this.queryTabs();\n if (tabs.length === 0) {\n return undefined;\n }\n const index = Math.min(Math.max(this.activeTabIndex(), 0), tabs.length - 1);\n return tabs[index];\n });\n\n protected selectQueryTab(index: number): void {\n this.activeTabIndex.set(index);\n }\n\n private readonly clampTabIndexEffect = effect(() => {\n const tabs = this.queryTabs();\n if (this.activeTabIndex() >= tabs.length) {\n this.activeTabIndex.set(0);\n }\n });\n\n //#endregion\n\n //#region ----- Query loading -----\n\n private readonly dataLoadEffect = effect(async () => {\n const opts = this.options() as Record<string, unknown>;\n const active = this.activeQuery();\n const value = await loadGaugeChartValue(opts, {\n queryExecutor: this.queryExecutor,\n queryKey: active?.query,\n queryInput: active?.queryInput,\n });\n this.value.set(value);\n });\n\n //#endregion\n\n constructor() {\n super();\n this.setOptions({\n minValue: 0,\n maxValue: 100,\n showTooltip: true,\n showValue: true,\n showDataLabels: true,\n gaugeWidth: 18,\n cornerRadius: 4,\n animationEasing: 'cubic-out',\n animationDuration: 800,\n ...omitChartFixedSize(this.options() as Record<string, unknown>),\n });\n this.gaugeChartOptions.set(\n omitChartFixedSize(this.options() as Record<string, unknown>) as unknown as AXGaugeChartOption & {\n title?: string;\n },\n );\n }\n}\n","<div class=\"axp-chart-widget-host\">\n <axp-chart-query-tabs\n [tabs]=\"queryTabs()\"\n [activeIndex]=\"activeTabIndex()\"\n (activeIndexChange)=\"selectQueryTab($event)\"\n />\n <div class=\"axp-chart-widget-host__body\">\n <div class=\"axp-chart-widget-host__chart axp-chart-widget-host__chart--radial\">\n <ax-gauge-chart [value]=\"value()\" [options]=\"gaugeChartOptions()\"></ax-gauge-chart>\n </div>\n </div>\n</div>\n"],"names":[],"mappings":";;;;;;;;;AAWA;;;AAGG;AAOG,MAAO,gCAAiC,SAAQ,2BAA2B,CAAA;;;IAuBvE,MAAM,uBAAuB,CAAC,KAAc,EAAA;AAClD,QAAA,IAAI,KAAK,IAAI,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;YACvE,OAAO,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,KAA+B,CAAC;QACzE;QACA,MAAM,CAAC,GAAG,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC;AAC7B,QAAA,IAAI,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE;YACrB,OAAO,IAAI,CAAC,kBAAkB,CAAC,cAAc,CAAC,CAAC,CAAC;QAClD;AACA,QAAA,O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EAA6B,CAAC;AACjE,SAAA,CAAC;AACF,QAAA,IAAI,CAAC,iBAAiB,CAAC,GAAG,CACxB,kBAAkB,CAAC,IAAI,CAAC,OAAO,EAA6B,CAE3D,CACF;IACH;8GA1IW,gCAAgC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAhC,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,gCAAgC,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,cAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECrB7C,mcAYA,EAAA,MAAA,EAAA,CAAA,0uRAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDMY,qBAAqB,yFAAE,0BAA0B,EAAA,QAAA,EAAA,sBAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,aAAA,CAAA,EAAA,OAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAGhD,gCAAgC,EAAA,UAAA,EAAA,CAAA;kBAN5C,SAAS;AAGC,YAAA,IAAA,EAAA,CAAA,EAAA,OAAA,EAAA,CAAC,qBAAqB,EAAE,0BAA0B,CAAC,EAAA,eAAA,EAC3C,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,mcAAA,EAAA,MAAA,EAAA,CAAA,0uRAAA,CAAA,EAAA;;;"}
|
|
@@ -3,8 +3,8 @@ import { AXTranslationService } from '@acorex/core/translation';
|
|
|
3
3
|
import { AXPQueryExecutor } from '@acorex-platform/framework-client/runtime';
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
5
|
import { inject, signal, computed, effect, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
6
|
-
import { e as AXPDashboardWidgetComponent, f as resolveChartQueryTabs, g as AXPChartQueryTabsComponent } from './acorex-platform-module-dashboard-management-client-acorex-platform-module-dashboard-management-client-
|
|
7
|
-
import { r as resolveChartAxisLabels, d as loadHeatmapChartItems } from './acorex-platform-module-dashboard-management-client-chart-widget-data.util-
|
|
6
|
+
import { e as AXPDashboardWidgetComponent, f as resolveChartQueryTabs, g as AXPChartQueryTabsComponent } from './acorex-platform-module-dashboard-management-client-acorex-platform-module-dashboard-management-client-61Q_QY8l.mjs';
|
|
7
|
+
import { r as resolveChartAxisLabels, d as loadHeatmapChartItems } from './acorex-platform-module-dashboard-management-client-chart-widget-data.util-BLtv9sOm.mjs';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Heatmap Chart Widget Component
|
|
@@ -143,12 +143,12 @@ class AXPHeatmapChartWidgetViewComponent extends AXPDashboardWidgetComponent {
|
|
|
143
143
|
this.heatmapOptions.set(this.options());
|
|
144
144
|
}
|
|
145
145
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPHeatmapChartWidgetViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
146
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.8", type: AXPHeatmapChartWidgetViewComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<div class=\"axp-chart-widget-host\">\n <axp-chart-query-tabs\n [tabs]=\"queryTabs()\"\n [activeIndex]=\"activeTabIndex()\"\n (activeIndexChange)=\"selectQueryTab($event)\"\n />\n <div class=\"axp-chart-widget-host__body\">\n <div class=\"axp-chart-widget-host__chart axp-chart-widget-host__chart--heatmap\">\n <ax-heatmap-chart [data]=\"data()\" [options]=\"heatmapOptions()\"></ax-heatmap-chart>\n </div>\n </div>\n</div>\n", styles: ["@layer properties;:host{display:block;width:100%;height:100%;min-height:0px;overflow:hidden}:host:has(.axp-chart-widget-host__chart--heatmap){block-size:auto;overflow:visible;min-block-size:0}.axp-chart-widget-host{display:flex;height:100%;min-height:0px;width:100%;flex-direction:column;gap:var(--spacing, .25rem)}.axp-chart-widget-host:has(.axp-chart-widget-host__chart--heatmap){block-size:auto;min-block-size:0;overflow:visible}.axp-chart-widget-host__body{display:flex;min-height:0px;flex:1;flex-direction:column;gap:var(--spacing, .25rem);padding-bottom:calc(var(--spacing, .25rem) * 2)}.axp-chart-widget-host__body:not(.axp-chart-widget-host__body--with-legend)>.axp-chart-widget-host__chart--radial{flex:1 1 auto}.axp-chart-widget-host__body--with-legend{min-height:0px;flex:1;gap:var(--spacing, .25rem);display:grid;grid-template-rows:minmax(0,1fr) auto}.axp-chart-widget-host__chart{position:relative;min-height:calc(var(--spacing, .25rem) * 64);width:100%;overflow:hidden;grid-row:1}.axp-chart-widget-host__chart--radial{position:relative;margin-inline:auto;align-self:center;justify-self:center;overflow:hidden;grid-row:1;flex:0 0 auto;height:auto;width:min(100%,18rem);max-width:100%;min-height:12rem;min-width:8rem;aspect-ratio:1 / 1}.axp-chart-widget-host__chart--funnel{position:relative;width:100%;overflow:hidden;block-size:20rem;flex:0 0 auto;max-block-size:24rem;min-block-size:16rem}.axp-chart-widget-host__chart--funnel ax-funnel-chart,.axp-chart-widget-host__chart--funnel .ax-funnel-chart-container{display:block;block-size:100%;inline-size:100%;min-block-size:0}.axp-chart-widget-host__body:has(.axp-chart-widget-host__chart--funnel){flex:none}.axp-chart-widget-host__chart--heatmap{position:relative;width:100%;max-width:100%;inline-size:100%;block-size:auto;flex:0 0 auto;overflow:visible;min-height:0!important;min-block-size:0!important;max-block-size:none}.axp-chart-widget-host__chart--heatmap ax-heatmap-chart,.axp-chart-widget-host__chart--heatmap .ax-heatmap-chart-container{display:block;inline-size:100%;max-inline-size:100%;block-size:auto;min-block-size:0;overflow:visible}.axp-chart-widget-host__body:has(.axp-chart-widget-host__chart--heatmap){flex:none;block-size:auto;min-block-size:0;overflow:visible}.axp-chart-widget-host__legend{width:100%;flex:none;grid-row:2;min-height:0;min-width:0;max-width:100%;display:flex;justify-content:flex-start;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;scrollbar-color:rgb(var(--ax-sys-color-border-lighter-surface)) transparent}:host ::ng-deep ax-chart-legend{display:block!important;height:auto!important;max-height:none;width:max-content;min-width:100%;max-width:none}:host ::ng-deep .ax-chart-legend{--ax-legend-bg: var(--ax-sys-color-lighter-surface);--ax-legend-text: var(--ax-sys-color-on-lighter-surface);--ax-legend-border: var(--ax-sys-color-border-lighter-surface);--ax-legend-radius: .625rem;--ax-legend-padding: .375rem .5rem;--ax-legend-gap: .375rem;--ax-legend-item-height: auto;height:auto;max-height:none;width:100%;overflow:visible;padding:var(--ax-legend-padding);gap:var(--ax-legend-gap);color:rgb(var(--ax-legend-text))}:host ::ng-deep .ax-chart-legend.ax-legend-horizontal{flex-direction:row;flex-wrap:nowrap;align-items:center;justify-content:flex-start;width:max-content;min-width:100%;max-width:none;overflow:visible;border:none;background:transparent;background-color:transparent;padding:.125rem .75rem .7rem;gap:.5rem}:host ::ng-deep .ax-legend-item{align-items:center;flex-shrink:0;gap:.375rem;height:auto;min-height:1.5rem;padding-block:.2rem;padding-inline:.5rem;border-radius:9999px;border:1px solid rgb(var(--ax-sys-color-border-lightest-surface));background-color:rgb(var(--ax-sys-color-lightest-surface));white-space:nowrap;transition:background-color .15s ease,border-color .15s ease,box-shadow .15s ease,opacity .15s ease,transform .15s ease}:host ::ng-deep .ax-legend-item:hover{border-color:rgb(var(--ax-sys-color-primary-500));background-color:rgb(var(--ax-sys-color-primary-500));box-shadow:0 1px 2px #0f172a0f}@supports (color: color-mix(in lab,red,red)){:host ::ng-deep .ax-legend-item:hover{border-color:color-mix(in srgb,rgb(var(--ax-sys-color-primary-500)) 35%,rgb(var(--ax-sys-color-border-lightest-surface)))}}@supports (color: color-mix(in lab,red,red)){:host ::ng-deep .ax-legend-item:hover{background-color:color-mix(in srgb,rgb(var(--ax-sys-color-primary-500)) 6%,rgb(var(--ax-sys-color-lightest-surface)))}}:host ::ng-deep .ax-legend-item:active{transform:scale(.98)}:host ::ng-deep .ax-legend-item.ax-legend-item-hidden{opacity:.62}:host ::ng-deep .ax-legend-color{width:.625rem;height:.625rem;flex-shrink:0;border-radius:9999px;box-shadow:0 0 0 1px rgb(var(--ax-legend-text))}@supports (color: color-mix(in lab,red,red)){:host ::ng-deep .ax-legend-color{box-shadow:0 0 0 1px color-mix(in srgb,rgb(var(--ax-legend-text)) 18%,transparent)}}:host ::ng-deep .ax-legend-name{font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);max-width:9rem;overflow:hidden;text-overflow:ellipsis}:host ::ng-deep .ax-legend-value{font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600);--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,);margin-inline-start:0;opacity:1;color:rgb(var(--ax-sys-color-on-lightest-surface))}:host ::ng-deep .ax-legend-percentage{margin-inline-start:0;border-radius:9999px;padding-inline:.4rem;padding-block:.125rem;font-size:.6875rem;line-height:1;font-weight:600;font-variant-numeric:tabular-nums;background-color:rgb(var(--ax-legend-text))}@supports (color: color-mix(in lab,red,red)){:host ::ng-deep .ax-legend-percentage{background-color:color-mix(in srgb,rgb(var(--ax-legend-text)) 12%,transparent)}}:host ::ng-deep ax-donut-chart,:host ::ng-deep ax-gauge-chart,:host ::ng-deep ax-bar-chart,:host ::ng-deep ax-line-chart,:host ::ng-deep ax-funnel-chart{display:block!important;width:100%!important;height:100%!important;min-height:0!important;max-height:100%!important}:host ::ng-deep .axp-chart-widget-host__chart--heatmap ax-heatmap-chart{display:block!important;width:100%!important;max-width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important}:host ::ng-deep ax-donut-chart .ax-donut-chart,:host ::ng-deep ax-gauge-chart .ax-gauge-chart,:host ::ng-deep ax-bar-chart .ax-bar-chart,:host ::ng-deep ax-line-chart .ax-line-chart,:host ::ng-deep ax-funnel-chart .ax-funnel-chart-container{min-height:0!important;height:100%!important;width:100%!important;padding:.25rem!important}:host ::ng-deep .axp-chart-widget-host__chart--heatmap ax-heatmap-chart .ax-heatmap-chart-container,:host ::ng-deep .axp-chart-widget-host__chart--heatmap .ax-heatmap-chart{min-height:0!important;height:auto!important;width:100%!important;max-width:100%!important;padding:.25rem!important;overflow:visible!important}:host ::ng-deep .axp-chart-widget-host__chart--heatmap svg{display:block;width:100%!important;max-width:100%!important;height:auto!important;overflow:visible!important}:host{display:block;width:100%;block-size:auto;min-height:0;overflow:visible}:host .axp-chart-widget-host{width:100%;block-size:auto;min-height:0;overflow:visible}:host ax-heatmap-chart{display:block;min-height:0px;width:100%;max-width:100%;block-size:auto;overflow:visible}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@property --tw-ordinal{syntax: \"*\"; inherits: false;}@property --tw-slashed-zero{syntax: \"*\"; inherits: false;}@property --tw-numeric-figure{syntax: \"*\"; inherits: false;}@property --tw-numeric-spacing{syntax: \"*\"; inherits: false;}@property --tw-numeric-fraction{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight: initial;--tw-ordinal: initial;--tw-slashed-zero: initial;--tw-numeric-figure: initial;--tw-numeric-spacing: initial;--tw-numeric-fraction: initial}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: AXHeatmapChartComponent, selector: "ax-heatmap-chart", inputs: ["data", "options"], outputs: ["cellClick"] }, { kind: "component", type: AXPChartQueryTabsComponent, selector: "axp-chart-query-tabs", inputs: ["tabs", "activeIndex"], outputs: ["activeIndexChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
146
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.8", type: AXPHeatmapChartWidgetViewComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<div class=\"axp-chart-widget-host\">\n <axp-chart-query-tabs\n [tabs]=\"queryTabs()\"\n [activeIndex]=\"activeTabIndex()\"\n (activeIndexChange)=\"selectQueryTab($event)\"\n />\n <div class=\"axp-chart-widget-host__body\">\n <div class=\"axp-chart-widget-host__chart axp-chart-widget-host__chart--heatmap\">\n <ax-heatmap-chart [data]=\"data()\" [options]=\"heatmapOptions()\"></ax-heatmap-chart>\n </div>\n </div>\n</div>\n", styles: ["@layer properties;:host{display:block;width:100%;height:100%;min-height:0px;overflow:hidden}:host:has(.axp-chart-widget-host__chart--heatmap){block-size:auto;overflow:visible;min-block-size:0}.axp-chart-widget-host{display:flex;height:100%;min-height:0px;width:100%;flex-direction:column;gap:var(--spacing, .25rem)}.axp-chart-widget-host:has(.axp-chart-widget-host__chart--heatmap){block-size:auto;min-block-size:0;overflow:visible}.axp-chart-widget-host__body{display:flex;min-height:0px;flex:1;flex-direction:column;gap:var(--spacing, .25rem);padding-bottom:calc(var(--spacing, .25rem) * 2)}.axp-chart-widget-host__body:not(.axp-chart-widget-host__body--with-legend)>.axp-chart-widget-host__chart--radial{flex:1 1 auto}.axp-chart-widget-host__body--with-legend{min-height:0px;flex:1;gap:var(--spacing, .25rem);display:grid;grid-template-rows:minmax(0,1fr) auto}.axp-chart-widget-host__chart{position:relative;min-height:calc(var(--spacing, .25rem) * 64);width:100%;overflow:hidden;grid-row:1}.axp-chart-widget-host__chart--radial{position:relative;margin-inline:auto;align-self:center;justify-self:center;overflow:hidden;grid-row:1;flex:0 0 auto;height:auto;width:min(100%,18rem);max-width:100%;min-height:12rem;min-width:8rem;aspect-ratio:1 / 1}.axp-chart-widget-host__chart--funnel{position:relative;width:100%;overflow:hidden;block-size:20rem;flex:0 0 auto;max-block-size:24rem;min-block-size:16rem}.axp-chart-widget-host__chart--funnel ax-funnel-chart,.axp-chart-widget-host__chart--funnel .ax-funnel-chart-container{display:block;block-size:100%;inline-size:100%;min-block-size:0}.axp-chart-widget-host__body:has(.axp-chart-widget-host__chart--funnel){flex:none}.axp-chart-widget-host__chart--heatmap{position:relative;width:100%;max-width:100%;inline-size:100%;block-size:auto;flex:0 0 auto;overflow:visible;min-height:0!important;min-block-size:0!important;max-block-size:none}.axp-chart-widget-host__chart--heatmap ax-heatmap-chart,.axp-chart-widget-host__chart--heatmap .ax-heatmap-chart-container{display:block;inline-size:100%;max-inline-size:100%;block-size:auto;min-block-size:0;overflow:visible}.axp-chart-widget-host__body:has(.axp-chart-widget-host__chart--heatmap){flex:none;block-size:auto;min-block-size:0;overflow:visible}.axp-chart-widget-host__legend{width:100%;flex:none;grid-row:2;min-height:0;min-width:0;max-width:100%;display:flex;justify-content:flex-start;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;scrollbar-color:rgb(var(--ax-sys-color-border-lighter-surface)) transparent}:host ::ng-deep ax-chart-legend{display:block!important;height:auto!important;max-height:none;width:max-content;min-width:100%;max-width:none}:host ::ng-deep .ax-chart-legend{--ax-legend-bg: var(--ax-sys-color-lighter-surface);--ax-legend-text: var(--ax-sys-color-on-lighter-surface);--ax-legend-border: var(--ax-sys-color-border-lighter-surface);--ax-legend-radius: .625rem;--ax-legend-padding: .375rem .5rem;--ax-legend-gap: .375rem;--ax-legend-item-height: auto;height:auto;max-height:none;width:100%;overflow:visible;padding:var(--ax-legend-padding);gap:var(--ax-legend-gap);color:rgb(var(--ax-legend-text))}:host ::ng-deep .ax-chart-legend.ax-legend-horizontal{flex-direction:row;flex-wrap:nowrap;align-items:center;justify-content:flex-start;width:max-content;min-width:100%;max-width:none;overflow:visible;border:none;background:transparent;background-color:transparent;padding:.125rem .75rem .7rem;gap:.5rem}:host ::ng-deep .ax-legend-item{align-items:center;flex-shrink:0;gap:.375rem;height:auto;min-height:1.5rem;padding-block:.2rem;padding-inline:.5rem;border-radius:9999px;border:1px solid rgb(var(--ax-sys-color-border-lightest-surface));background-color:rgb(var(--ax-sys-color-lightest-surface));white-space:nowrap;transition:background-color .15s ease,border-color .15s ease,box-shadow .15s ease,opacity .15s ease,transform .15s ease}:host ::ng-deep .ax-legend-item:hover{border-color:rgb(var(--ax-sys-color-primary-500));background-color:rgb(var(--ax-sys-color-primary-500));box-shadow:0 1px 2px #0f172a0f}@supports (color: color-mix(in lab,red,red)){:host ::ng-deep .ax-legend-item:hover{border-color:color-mix(in srgb,rgb(var(--ax-sys-color-primary-500)) 35%,rgb(var(--ax-sys-color-border-lightest-surface)))}}@supports (color: color-mix(in lab,red,red)){:host ::ng-deep .ax-legend-item:hover{background-color:color-mix(in srgb,rgb(var(--ax-sys-color-primary-500)) 6%,rgb(var(--ax-sys-color-lightest-surface)))}}:host ::ng-deep .ax-legend-item:active{transform:scale(.98)}:host ::ng-deep .ax-legend-item.ax-legend-item-hidden{opacity:.62}:host ::ng-deep .ax-legend-color{width:.625rem;height:.625rem;flex-shrink:0;border-radius:9999px;box-shadow:0 0 0 1px rgb(var(--ax-legend-text))}@supports (color: color-mix(in lab,red,red)){:host ::ng-deep .ax-legend-color{box-shadow:0 0 0 1px color-mix(in srgb,rgb(var(--ax-legend-text)) 18%,transparent)}}:host ::ng-deep .ax-legend-name{font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);max-width:9rem;overflow:hidden;text-overflow:ellipsis}:host ::ng-deep .ax-legend-value{font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600);--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,);margin-inline-start:0;opacity:1;color:rgb(var(--ax-sys-color-on-lightest-surface))}:host ::ng-deep .ax-legend-percentage{margin-inline-start:0;border-radius:9999px;padding-inline:.4rem;padding-block:.125rem;font-size:.6875rem;line-height:1;font-weight:600;font-variant-numeric:tabular-nums;background-color:rgb(var(--ax-legend-text))}@supports (color: color-mix(in lab,red,red)){:host ::ng-deep .ax-legend-percentage{background-color:color-mix(in srgb,rgb(var(--ax-legend-text)) 12%,transparent)}}:host ::ng-deep ax-donut-chart,:host ::ng-deep ax-gauge-chart,:host ::ng-deep ax-bar-chart,:host ::ng-deep ax-line-chart,:host ::ng-deep ax-funnel-chart{display:block!important;width:100%!important;height:100%!important;min-height:0!important;max-height:100%!important}:host ::ng-deep .axp-chart-widget-host__chart--heatmap ax-heatmap-chart{display:block!important;width:100%!important;max-width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important}:host ::ng-deep ax-donut-chart .ax-donut-chart,:host ::ng-deep ax-gauge-chart .ax-gauge-chart,:host ::ng-deep ax-bar-chart .ax-bar-chart,:host ::ng-deep ax-line-chart .ax-line-chart,:host ::ng-deep ax-funnel-chart .ax-funnel-chart-container{min-height:0!important;height:100%!important;width:100%!important;padding:.25rem!important}:host ::ng-deep .axp-chart-widget-host__chart--heatmap ax-heatmap-chart .ax-heatmap-chart-container,:host ::ng-deep .axp-chart-widget-host__chart--heatmap .ax-heatmap-chart{min-height:0!important;height:auto!important;width:100%!important;max-width:100%!important;padding:.25rem!important;overflow:visible!important}:host ::ng-deep .axp-chart-widget-host__chart--heatmap svg{display:block;width:100%!important;max-width:100%!important;height:auto!important;overflow:visible!important}:host:has(.ax-chart-empty){block-size:100%;overflow:hidden}.axp-chart-widget-host:has(.ax-chart-empty){block-size:100%;overflow:hidden}.axp-chart-widget-host__body:has(.ax-chart-empty){flex:1 1 auto;min-block-size:0;overflow:hidden}.axp-chart-widget-host__chart--heatmap:has(.ax-chart-empty){flex:1 1 auto;block-size:100%;min-block-size:16rem!important;overflow:hidden}:host ::ng-deep .axp-chart-widget-host__chart--heatmap:has(.ax-chart-empty) ax-heatmap-chart,:host ::ng-deep .axp-chart-widget-host__chart--heatmap:has(.ax-chart-empty) ax-heatmap-chart .ax-heatmap-chart-container{display:block!important;width:100%!important;max-width:100%!important;height:100%!important;min-height:16rem!important;max-height:none!important;overflow:hidden!important}:host{display:block;width:100%;block-size:auto;min-height:0;overflow:visible}:host .axp-chart-widget-host{width:100%;block-size:auto;min-height:0;overflow:visible}:host ax-heatmap-chart{display:block;min-height:0px;width:100%;max-width:100%;block-size:auto;overflow:visible}:host:has(.ax-chart-empty){block-size:100%;flex:1 1 auto;min-block-size:16rem;overflow:hidden}:host:has(.ax-chart-empty) .axp-chart-widget-host{block-size:100%;overflow:hidden}:host:has(.ax-chart-empty) ax-heatmap-chart,:host:has(.ax-chart-empty) .ax-heatmap-chart-container{block-size:100%;overflow:hidden}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@property --tw-ordinal{syntax: \"*\"; inherits: false;}@property --tw-slashed-zero{syntax: \"*\"; inherits: false;}@property --tw-numeric-figure{syntax: \"*\"; inherits: false;}@property --tw-numeric-spacing{syntax: \"*\"; inherits: false;}@property --tw-numeric-fraction{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight: initial;--tw-ordinal: initial;--tw-slashed-zero: initial;--tw-numeric-figure: initial;--tw-numeric-spacing: initial;--tw-numeric-fraction: initial}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: AXHeatmapChartComponent, selector: "ax-heatmap-chart", inputs: ["data", "options"], outputs: ["cellClick"] }, { kind: "component", type: AXPChartQueryTabsComponent, selector: "axp-chart-query-tabs", inputs: ["tabs", "activeIndex"], outputs: ["activeIndexChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
147
147
|
}
|
|
148
148
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPHeatmapChartWidgetViewComponent, decorators: [{
|
|
149
149
|
type: Component,
|
|
150
|
-
args: [{ imports: [AXHeatmapChartComponent, AXPChartQueryTabsComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"axp-chart-widget-host\">\n <axp-chart-query-tabs\n [tabs]=\"queryTabs()\"\n [activeIndex]=\"activeTabIndex()\"\n (activeIndexChange)=\"selectQueryTab($event)\"\n />\n <div class=\"axp-chart-widget-host__body\">\n <div class=\"axp-chart-widget-host__chart axp-chart-widget-host__chart--heatmap\">\n <ax-heatmap-chart [data]=\"data()\" [options]=\"heatmapOptions()\"></ax-heatmap-chart>\n </div>\n </div>\n</div>\n", styles: ["@layer properties;:host{display:block;width:100%;height:100%;min-height:0px;overflow:hidden}:host:has(.axp-chart-widget-host__chart--heatmap){block-size:auto;overflow:visible;min-block-size:0}.axp-chart-widget-host{display:flex;height:100%;min-height:0px;width:100%;flex-direction:column;gap:var(--spacing, .25rem)}.axp-chart-widget-host:has(.axp-chart-widget-host__chart--heatmap){block-size:auto;min-block-size:0;overflow:visible}.axp-chart-widget-host__body{display:flex;min-height:0px;flex:1;flex-direction:column;gap:var(--spacing, .25rem);padding-bottom:calc(var(--spacing, .25rem) * 2)}.axp-chart-widget-host__body:not(.axp-chart-widget-host__body--with-legend)>.axp-chart-widget-host__chart--radial{flex:1 1 auto}.axp-chart-widget-host__body--with-legend{min-height:0px;flex:1;gap:var(--spacing, .25rem);display:grid;grid-template-rows:minmax(0,1fr) auto}.axp-chart-widget-host__chart{position:relative;min-height:calc(var(--spacing, .25rem) * 64);width:100%;overflow:hidden;grid-row:1}.axp-chart-widget-host__chart--radial{position:relative;margin-inline:auto;align-self:center;justify-self:center;overflow:hidden;grid-row:1;flex:0 0 auto;height:auto;width:min(100%,18rem);max-width:100%;min-height:12rem;min-width:8rem;aspect-ratio:1 / 1}.axp-chart-widget-host__chart--funnel{position:relative;width:100%;overflow:hidden;block-size:20rem;flex:0 0 auto;max-block-size:24rem;min-block-size:16rem}.axp-chart-widget-host__chart--funnel ax-funnel-chart,.axp-chart-widget-host__chart--funnel .ax-funnel-chart-container{display:block;block-size:100%;inline-size:100%;min-block-size:0}.axp-chart-widget-host__body:has(.axp-chart-widget-host__chart--funnel){flex:none}.axp-chart-widget-host__chart--heatmap{position:relative;width:100%;max-width:100%;inline-size:100%;block-size:auto;flex:0 0 auto;overflow:visible;min-height:0!important;min-block-size:0!important;max-block-size:none}.axp-chart-widget-host__chart--heatmap ax-heatmap-chart,.axp-chart-widget-host__chart--heatmap .ax-heatmap-chart-container{display:block;inline-size:100%;max-inline-size:100%;block-size:auto;min-block-size:0;overflow:visible}.axp-chart-widget-host__body:has(.axp-chart-widget-host__chart--heatmap){flex:none;block-size:auto;min-block-size:0;overflow:visible}.axp-chart-widget-host__legend{width:100%;flex:none;grid-row:2;min-height:0;min-width:0;max-width:100%;display:flex;justify-content:flex-start;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;scrollbar-color:rgb(var(--ax-sys-color-border-lighter-surface)) transparent}:host ::ng-deep ax-chart-legend{display:block!important;height:auto!important;max-height:none;width:max-content;min-width:100%;max-width:none}:host ::ng-deep .ax-chart-legend{--ax-legend-bg: var(--ax-sys-color-lighter-surface);--ax-legend-text: var(--ax-sys-color-on-lighter-surface);--ax-legend-border: var(--ax-sys-color-border-lighter-surface);--ax-legend-radius: .625rem;--ax-legend-padding: .375rem .5rem;--ax-legend-gap: .375rem;--ax-legend-item-height: auto;height:auto;max-height:none;width:100%;overflow:visible;padding:var(--ax-legend-padding);gap:var(--ax-legend-gap);color:rgb(var(--ax-legend-text))}:host ::ng-deep .ax-chart-legend.ax-legend-horizontal{flex-direction:row;flex-wrap:nowrap;align-items:center;justify-content:flex-start;width:max-content;min-width:100%;max-width:none;overflow:visible;border:none;background:transparent;background-color:transparent;padding:.125rem .75rem .7rem;gap:.5rem}:host ::ng-deep .ax-legend-item{align-items:center;flex-shrink:0;gap:.375rem;height:auto;min-height:1.5rem;padding-block:.2rem;padding-inline:.5rem;border-radius:9999px;border:1px solid rgb(var(--ax-sys-color-border-lightest-surface));background-color:rgb(var(--ax-sys-color-lightest-surface));white-space:nowrap;transition:background-color .15s ease,border-color .15s ease,box-shadow .15s ease,opacity .15s ease,transform .15s ease}:host ::ng-deep .ax-legend-item:hover{border-color:rgb(var(--ax-sys-color-primary-500));background-color:rgb(var(--ax-sys-color-primary-500));box-shadow:0 1px 2px #0f172a0f}@supports (color: color-mix(in lab,red,red)){:host ::ng-deep .ax-legend-item:hover{border-color:color-mix(in srgb,rgb(var(--ax-sys-color-primary-500)) 35%,rgb(var(--ax-sys-color-border-lightest-surface)))}}@supports (color: color-mix(in lab,red,red)){:host ::ng-deep .ax-legend-item:hover{background-color:color-mix(in srgb,rgb(var(--ax-sys-color-primary-500)) 6%,rgb(var(--ax-sys-color-lightest-surface)))}}:host ::ng-deep .ax-legend-item:active{transform:scale(.98)}:host ::ng-deep .ax-legend-item.ax-legend-item-hidden{opacity:.62}:host ::ng-deep .ax-legend-color{width:.625rem;height:.625rem;flex-shrink:0;border-radius:9999px;box-shadow:0 0 0 1px rgb(var(--ax-legend-text))}@supports (color: color-mix(in lab,red,red)){:host ::ng-deep .ax-legend-color{box-shadow:0 0 0 1px color-mix(in srgb,rgb(var(--ax-legend-text)) 18%,transparent)}}:host ::ng-deep .ax-legend-name{font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);max-width:9rem;overflow:hidden;text-overflow:ellipsis}:host ::ng-deep .ax-legend-value{font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600);--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,);margin-inline-start:0;opacity:1;color:rgb(var(--ax-sys-color-on-lightest-surface))}:host ::ng-deep .ax-legend-percentage{margin-inline-start:0;border-radius:9999px;padding-inline:.4rem;padding-block:.125rem;font-size:.6875rem;line-height:1;font-weight:600;font-variant-numeric:tabular-nums;background-color:rgb(var(--ax-legend-text))}@supports (color: color-mix(in lab,red,red)){:host ::ng-deep .ax-legend-percentage{background-color:color-mix(in srgb,rgb(var(--ax-legend-text)) 12%,transparent)}}:host ::ng-deep ax-donut-chart,:host ::ng-deep ax-gauge-chart,:host ::ng-deep ax-bar-chart,:host ::ng-deep ax-line-chart,:host ::ng-deep ax-funnel-chart{display:block!important;width:100%!important;height:100%!important;min-height:0!important;max-height:100%!important}:host ::ng-deep .axp-chart-widget-host__chart--heatmap ax-heatmap-chart{display:block!important;width:100%!important;max-width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important}:host ::ng-deep ax-donut-chart .ax-donut-chart,:host ::ng-deep ax-gauge-chart .ax-gauge-chart,:host ::ng-deep ax-bar-chart .ax-bar-chart,:host ::ng-deep ax-line-chart .ax-line-chart,:host ::ng-deep ax-funnel-chart .ax-funnel-chart-container{min-height:0!important;height:100%!important;width:100%!important;padding:.25rem!important}:host ::ng-deep .axp-chart-widget-host__chart--heatmap ax-heatmap-chart .ax-heatmap-chart-container,:host ::ng-deep .axp-chart-widget-host__chart--heatmap .ax-heatmap-chart{min-height:0!important;height:auto!important;width:100%!important;max-width:100%!important;padding:.25rem!important;overflow:visible!important}:host ::ng-deep .axp-chart-widget-host__chart--heatmap svg{display:block;width:100%!important;max-width:100%!important;height:auto!important;overflow:visible!important}:host{display:block;width:100%;block-size:auto;min-height:0;overflow:visible}:host .axp-chart-widget-host{width:100%;block-size:auto;min-height:0;overflow:visible}:host ax-heatmap-chart{display:block;min-height:0px;width:100%;max-width:100%;block-size:auto;overflow:visible}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@property --tw-ordinal{syntax: \"*\"; inherits: false;}@property --tw-slashed-zero{syntax: \"*\"; inherits: false;}@property --tw-numeric-figure{syntax: \"*\"; inherits: false;}@property --tw-numeric-spacing{syntax: \"*\"; inherits: false;}@property --tw-numeric-fraction{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight: initial;--tw-ordinal: initial;--tw-slashed-zero: initial;--tw-numeric-figure: initial;--tw-numeric-spacing: initial;--tw-numeric-fraction: initial}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"] }]
|
|
150
|
+
args: [{ imports: [AXHeatmapChartComponent, AXPChartQueryTabsComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"axp-chart-widget-host\">\n <axp-chart-query-tabs\n [tabs]=\"queryTabs()\"\n [activeIndex]=\"activeTabIndex()\"\n (activeIndexChange)=\"selectQueryTab($event)\"\n />\n <div class=\"axp-chart-widget-host__body\">\n <div class=\"axp-chart-widget-host__chart axp-chart-widget-host__chart--heatmap\">\n <ax-heatmap-chart [data]=\"data()\" [options]=\"heatmapOptions()\"></ax-heatmap-chart>\n </div>\n </div>\n</div>\n", styles: ["@layer properties;:host{display:block;width:100%;height:100%;min-height:0px;overflow:hidden}:host:has(.axp-chart-widget-host__chart--heatmap){block-size:auto;overflow:visible;min-block-size:0}.axp-chart-widget-host{display:flex;height:100%;min-height:0px;width:100%;flex-direction:column;gap:var(--spacing, .25rem)}.axp-chart-widget-host:has(.axp-chart-widget-host__chart--heatmap){block-size:auto;min-block-size:0;overflow:visible}.axp-chart-widget-host__body{display:flex;min-height:0px;flex:1;flex-direction:column;gap:var(--spacing, .25rem);padding-bottom:calc(var(--spacing, .25rem) * 2)}.axp-chart-widget-host__body:not(.axp-chart-widget-host__body--with-legend)>.axp-chart-widget-host__chart--radial{flex:1 1 auto}.axp-chart-widget-host__body--with-legend{min-height:0px;flex:1;gap:var(--spacing, .25rem);display:grid;grid-template-rows:minmax(0,1fr) auto}.axp-chart-widget-host__chart{position:relative;min-height:calc(var(--spacing, .25rem) * 64);width:100%;overflow:hidden;grid-row:1}.axp-chart-widget-host__chart--radial{position:relative;margin-inline:auto;align-self:center;justify-self:center;overflow:hidden;grid-row:1;flex:0 0 auto;height:auto;width:min(100%,18rem);max-width:100%;min-height:12rem;min-width:8rem;aspect-ratio:1 / 1}.axp-chart-widget-host__chart--funnel{position:relative;width:100%;overflow:hidden;block-size:20rem;flex:0 0 auto;max-block-size:24rem;min-block-size:16rem}.axp-chart-widget-host__chart--funnel ax-funnel-chart,.axp-chart-widget-host__chart--funnel .ax-funnel-chart-container{display:block;block-size:100%;inline-size:100%;min-block-size:0}.axp-chart-widget-host__body:has(.axp-chart-widget-host__chart--funnel){flex:none}.axp-chart-widget-host__chart--heatmap{position:relative;width:100%;max-width:100%;inline-size:100%;block-size:auto;flex:0 0 auto;overflow:visible;min-height:0!important;min-block-size:0!important;max-block-size:none}.axp-chart-widget-host__chart--heatmap ax-heatmap-chart,.axp-chart-widget-host__chart--heatmap .ax-heatmap-chart-container{display:block;inline-size:100%;max-inline-size:100%;block-size:auto;min-block-size:0;overflow:visible}.axp-chart-widget-host__body:has(.axp-chart-widget-host__chart--heatmap){flex:none;block-size:auto;min-block-size:0;overflow:visible}.axp-chart-widget-host__legend{width:100%;flex:none;grid-row:2;min-height:0;min-width:0;max-width:100%;display:flex;justify-content:flex-start;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;scrollbar-color:rgb(var(--ax-sys-color-border-lighter-surface)) transparent}:host ::ng-deep ax-chart-legend{display:block!important;height:auto!important;max-height:none;width:max-content;min-width:100%;max-width:none}:host ::ng-deep .ax-chart-legend{--ax-legend-bg: var(--ax-sys-color-lighter-surface);--ax-legend-text: var(--ax-sys-color-on-lighter-surface);--ax-legend-border: var(--ax-sys-color-border-lighter-surface);--ax-legend-radius: .625rem;--ax-legend-padding: .375rem .5rem;--ax-legend-gap: .375rem;--ax-legend-item-height: auto;height:auto;max-height:none;width:100%;overflow:visible;padding:var(--ax-legend-padding);gap:var(--ax-legend-gap);color:rgb(var(--ax-legend-text))}:host ::ng-deep .ax-chart-legend.ax-legend-horizontal{flex-direction:row;flex-wrap:nowrap;align-items:center;justify-content:flex-start;width:max-content;min-width:100%;max-width:none;overflow:visible;border:none;background:transparent;background-color:transparent;padding:.125rem .75rem .7rem;gap:.5rem}:host ::ng-deep .ax-legend-item{align-items:center;flex-shrink:0;gap:.375rem;height:auto;min-height:1.5rem;padding-block:.2rem;padding-inline:.5rem;border-radius:9999px;border:1px solid rgb(var(--ax-sys-color-border-lightest-surface));background-color:rgb(var(--ax-sys-color-lightest-surface));white-space:nowrap;transition:background-color .15s ease,border-color .15s ease,box-shadow .15s ease,opacity .15s ease,transform .15s ease}:host ::ng-deep .ax-legend-item:hover{border-color:rgb(var(--ax-sys-color-primary-500));background-color:rgb(var(--ax-sys-color-primary-500));box-shadow:0 1px 2px #0f172a0f}@supports (color: color-mix(in lab,red,red)){:host ::ng-deep .ax-legend-item:hover{border-color:color-mix(in srgb,rgb(var(--ax-sys-color-primary-500)) 35%,rgb(var(--ax-sys-color-border-lightest-surface)))}}@supports (color: color-mix(in lab,red,red)){:host ::ng-deep .ax-legend-item:hover{background-color:color-mix(in srgb,rgb(var(--ax-sys-color-primary-500)) 6%,rgb(var(--ax-sys-color-lightest-surface)))}}:host ::ng-deep .ax-legend-item:active{transform:scale(.98)}:host ::ng-deep .ax-legend-item.ax-legend-item-hidden{opacity:.62}:host ::ng-deep .ax-legend-color{width:.625rem;height:.625rem;flex-shrink:0;border-radius:9999px;box-shadow:0 0 0 1px rgb(var(--ax-legend-text))}@supports (color: color-mix(in lab,red,red)){:host ::ng-deep .ax-legend-color{box-shadow:0 0 0 1px color-mix(in srgb,rgb(var(--ax-legend-text)) 18%,transparent)}}:host ::ng-deep .ax-legend-name{font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);max-width:9rem;overflow:hidden;text-overflow:ellipsis}:host ::ng-deep .ax-legend-value{font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600);--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,);margin-inline-start:0;opacity:1;color:rgb(var(--ax-sys-color-on-lightest-surface))}:host ::ng-deep .ax-legend-percentage{margin-inline-start:0;border-radius:9999px;padding-inline:.4rem;padding-block:.125rem;font-size:.6875rem;line-height:1;font-weight:600;font-variant-numeric:tabular-nums;background-color:rgb(var(--ax-legend-text))}@supports (color: color-mix(in lab,red,red)){:host ::ng-deep .ax-legend-percentage{background-color:color-mix(in srgb,rgb(var(--ax-legend-text)) 12%,transparent)}}:host ::ng-deep ax-donut-chart,:host ::ng-deep ax-gauge-chart,:host ::ng-deep ax-bar-chart,:host ::ng-deep ax-line-chart,:host ::ng-deep ax-funnel-chart{display:block!important;width:100%!important;height:100%!important;min-height:0!important;max-height:100%!important}:host ::ng-deep .axp-chart-widget-host__chart--heatmap ax-heatmap-chart{display:block!important;width:100%!important;max-width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important}:host ::ng-deep ax-donut-chart .ax-donut-chart,:host ::ng-deep ax-gauge-chart .ax-gauge-chart,:host ::ng-deep ax-bar-chart .ax-bar-chart,:host ::ng-deep ax-line-chart .ax-line-chart,:host ::ng-deep ax-funnel-chart .ax-funnel-chart-container{min-height:0!important;height:100%!important;width:100%!important;padding:.25rem!important}:host ::ng-deep .axp-chart-widget-host__chart--heatmap ax-heatmap-chart .ax-heatmap-chart-container,:host ::ng-deep .axp-chart-widget-host__chart--heatmap .ax-heatmap-chart{min-height:0!important;height:auto!important;width:100%!important;max-width:100%!important;padding:.25rem!important;overflow:visible!important}:host ::ng-deep .axp-chart-widget-host__chart--heatmap svg{display:block;width:100%!important;max-width:100%!important;height:auto!important;overflow:visible!important}:host:has(.ax-chart-empty){block-size:100%;overflow:hidden}.axp-chart-widget-host:has(.ax-chart-empty){block-size:100%;overflow:hidden}.axp-chart-widget-host__body:has(.ax-chart-empty){flex:1 1 auto;min-block-size:0;overflow:hidden}.axp-chart-widget-host__chart--heatmap:has(.ax-chart-empty){flex:1 1 auto;block-size:100%;min-block-size:16rem!important;overflow:hidden}:host ::ng-deep .axp-chart-widget-host__chart--heatmap:has(.ax-chart-empty) ax-heatmap-chart,:host ::ng-deep .axp-chart-widget-host__chart--heatmap:has(.ax-chart-empty) ax-heatmap-chart .ax-heatmap-chart-container{display:block!important;width:100%!important;max-width:100%!important;height:100%!important;min-height:16rem!important;max-height:none!important;overflow:hidden!important}:host{display:block;width:100%;block-size:auto;min-height:0;overflow:visible}:host .axp-chart-widget-host{width:100%;block-size:auto;min-height:0;overflow:visible}:host ax-heatmap-chart{display:block;min-height:0px;width:100%;max-width:100%;block-size:auto;overflow:visible}:host:has(.ax-chart-empty){block-size:100%;flex:1 1 auto;min-block-size:16rem;overflow:hidden}:host:has(.ax-chart-empty) .axp-chart-widget-host{block-size:100%;overflow:hidden}:host:has(.ax-chart-empty) ax-heatmap-chart,:host:has(.ax-chart-empty) .ax-heatmap-chart-container{block-size:100%;overflow:hidden}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@property --tw-ordinal{syntax: \"*\"; inherits: false;}@property --tw-slashed-zero{syntax: \"*\"; inherits: false;}@property --tw-numeric-figure{syntax: \"*\"; inherits: false;}@property --tw-numeric-spacing{syntax: \"*\"; inherits: false;}@property --tw-numeric-fraction{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight: initial;--tw-ordinal: initial;--tw-slashed-zero: initial;--tw-numeric-figure: initial;--tw-numeric-spacing: initial;--tw-numeric-fraction: initial}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"] }]
|
|
151
151
|
}], ctorParameters: () => [] });
|
|
152
152
|
|
|
153
153
|
export { AXPHeatmapChartWidgetViewComponent };
|
|
154
|
-
//# sourceMappingURL=acorex-platform-module-dashboard-management-client-heatmap-chart-widget.component-
|
|
154
|
+
//# sourceMappingURL=acorex-platform-module-dashboard-management-client-heatmap-chart-widget.component-CzJTc6rm.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-dashboard-management-client-heatmap-chart-widget.component-CTelqGbm.mjs","sources":["../../../../libs/modules/dashboard-management/client/src/lib/features/shared/widgets/chart/heatmap-chart/heatmap-chart-widget.component.ts","../../../../libs/modules/dashboard-management/client/src/lib/features/shared/widgets/chart/heatmap-chart/heatmap-chart-widget.component.html"],"sourcesContent":["import { AXHeatmapChartComponent, AXHeatmapChartOption, AXHeatmapData } from '@acorex/charts/heatmap-chart';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\nimport { AXPQueryExecutor } from '@acorex-platform/framework-client/runtime';\nimport { ChangeDetectionStrategy, Component, computed, effect, inject, signal } from '@angular/core';\nimport { AXPDashboardWidgetComponent } from '../../dashboard-widget-base';\nimport { resolveChartQueryTabs } from '../chart-query-load.util';\nimport { loadHeatmapChartItems, resolveChartAxisLabels } from '../chart-widget-data.util';\nimport { AXPChartQueryTabsComponent } from '../chart-query-tabs.component';\n\n/**\n * Heatmap Chart Widget Component\n * Displays matrix-like data with color intensity based on value.\n */\n@Component({\n templateUrl: './heatmap-chart-widget.component.html',\n styleUrls: ['./heatmap-chart-widget.component.css'],\n imports: [AXHeatmapChartComponent, AXPChartQueryTabsComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AXPHeatmapChartWidgetViewComponent extends AXPDashboardWidgetComponent {\n //#region ----- Services & Dependencies -----\n\n private readonly queryExecutor = inject(AXPQueryExecutor);\n private readonly translationService = inject(AXTranslationService);\n\n //#endregion\n\n //#region ----- Chart state -----\n\n protected data = signal<AXHeatmapData[]>([]);\n\n /** Options passed to the chart with resolved string labels (multi-language and @i18n keys). */\n protected heatmapOptions = signal<AXHeatmapChartOption>({} as AXHeatmapChartOption);\n\n private labelResolveGeneration = 0;\n\n //#endregion\n\n //#region ----- Query tabs -----\n\n protected readonly queryTabs = computed(() =>\n resolveChartQueryTabs(this.options() as Record<string, unknown>, this.entityContext()?.entityId),\n );\n\n protected readonly activeTabIndex = signal(0);\n\n private readonly activeQuery = computed(() => {\n const tabs = this.queryTabs();\n if (tabs.length === 0) {\n return undefined;\n }\n const index = Math.min(Math.max(this.activeTabIndex(), 0), tabs.length - 1);\n return tabs[index];\n });\n\n protected selectQueryTab(index: number): void {\n this.activeTabIndex.set(index);\n }\n\n //#endregion\n\n //#region ----- Localization -----\n\n private async resolveChartText(value: unknown): Promise<string> {\n if (value == null) {\n return '';\n }\n if (typeof value === 'string') {\n return value.startsWith('@') ? this.translationService.translateAsync(value) : value;\n }\n if (\n typeof value === 'object' &&\n !Array.isArray(value) &&\n this.translationService.isValidMultiLanguageObject(value)\n ) {\n return this.translationService.resolve(value as AXPMultiLanguageString);\n }\n return String(value);\n }\n\n private readonly resolveOptionLabelsEffect = effect(() => {\n const raw = this.options() as Record<string, unknown>;\n const generation = ++this.labelResolveGeneration;\n\n void (async () => {\n const axisLabels = resolveChartAxisLabels(raw);\n const [xAxisLabel, yAxisLabel] = await Promise.all([\n this.resolveChartText(axisLabels.xAxisLabel),\n this.resolveChartText(axisLabels.yAxisLabel),\n ]);\n\n const messagesRaw = raw['messages'];\n const messages =\n messagesRaw && typeof messagesRaw === 'object' && !Array.isArray(messagesRaw)\n ? (messagesRaw as Record<string, unknown>)\n : undefined;\n\n const [noData, noDataHelp] = await Promise.all([\n this.resolveChartText(messages?.['noData']),\n this.resolveChartText(messages?.['noDataHelp']),\n ]);\n\n if (generation !== this.labelResolveGeneration) {\n return;\n }\n\n const base = raw as unknown as AXHeatmapChartOption;\n this.heatmapOptions.set({\n ...base,\n xAxisLabel,\n yAxisLabel,\n ...(messages\n ? {\n messages: {\n ...base.messages,\n ...(noData ? { noData } : {}),\n ...(noDataHelp ? { noDataHelp } : {}),\n ...(messages['noDataIcon'] ? { noDataIcon: String(messages['noDataIcon']) } : {}),\n },\n }\n : {}),\n });\n })();\n });\n\n //#endregion\n\n //#region ----- Query loading -----\n\n private readonly clampTabIndexEffect = effect(() => {\n const tabs = this.queryTabs();\n if (this.activeTabIndex() >= tabs.length) {\n this.activeTabIndex.set(0);\n }\n });\n\n private readonly dataLoadEffect = effect(async () => {\n const opts = this.options() as Record<string, unknown>;\n const active = this.activeQuery();\n const items = await loadHeatmapChartItems(opts, {\n queryExecutor: this.queryExecutor,\n queryKey: active?.query,\n queryInput: active?.queryInput,\n });\n const resolved = await Promise.all(\n items.map(async (item) => {\n const x = item.x;\n const y = item.y;\n const label = item.label;\n\n return {\n ...item,\n x: typeof x === 'number' ? x : await this.resolveChartText(x),\n y: typeof y === 'number' ? y : await this.resolveChartText(y),\n ...(label !== undefined ? { label: await this.resolveChartText(label) } : {}),\n };\n }),\n );\n\n this.data.set(resolved as AXHeatmapData[]);\n });\n\n //#endregion\n\n constructor() {\n super();\n this.setOptions({\n showXAxis: true,\n showYAxis: true,\n showTooltip: true,\n cellPadding: 0.05,\n borderRadius: 2,\n color: 'rgb(var(--ax-sys-color-primary-500))',\n animationEasing: 'cubic-out',\n animationDuration: 800,\n ...this.options(),\n });\n\n this.heatmapOptions.set(this.options() as AXHeatmapChartOption);\n }\n}\n","<div class=\"axp-chart-widget-host\">\n <axp-chart-query-tabs\n [tabs]=\"queryTabs()\"\n [activeIndex]=\"activeTabIndex()\"\n (activeIndexChange)=\"selectQueryTab($event)\"\n />\n <div class=\"axp-chart-widget-host__body\">\n <div class=\"axp-chart-widget-host__chart axp-chart-widget-host__chart--heatmap\">\n <ax-heatmap-chart [data]=\"data()\" [options]=\"heatmapOptions()\"></ax-heatmap-chart>\n </div>\n </div>\n</div>\n"],"names":[],"mappings":";;;;;;;;AAUA;;;AAGG;AAOG,MAAO,kCAAmC,SAAQ,2BAA2B,CAAA;AAoCvE,IAAA,cAAc,CAAC,KAAa,EAAA;AACpC,QAAA,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,KAAK,CAAC;IAChC;;;IAMQ,MAAM,gBAAgB,CAAC,KAAc,EAAA;AAC3C,QAAA,IAAI,KAAK,IAAI,IAAI,EAAE;AACjB,YAAA,OAAO,EAAE;QACX;AACA,QAAA,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;YAC7B,OAAO,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,kBAAkB,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,KAAK;QACtF;QACA,IACE,OAAO,KAAK,KAAK,QAAQ;AACzB,YAAA,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;YACrB,IAAI,CAAC,kBAAkB,CAAC,0BAA0B,CAAC,KAAK,CAAC,EACzD;YACA,OAAO,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,KAA+B,CAAC;QACzE;AACA,QAAA,OAAO,MAAM,CAAC,KAAK,CAAC;IACtB;;AAsFA,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;;AA/IQ,QAAA,IAAA,CAAA,aAAa,GA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,EAAA,UAAA,EAAA,CAAA;kBAN9C,SAAS;AAGC,YAAA,IAAA,EAAA,CAAA,EAAA,OAAA,EAAA,CAAC,uBAAuB,EAAE,0BAA0B,CAAC,EAAA,eAAA,EAC7C,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,mcAAA,EAAA,MAAA,EAAA,CAAA,0wQAAA,CAAA,EAAA;;;"}
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-dashboard-management-client-heatmap-chart-widget.component-CzJTc6rm.mjs","sources":["../../../../libs/modules/dashboard-management/client/src/lib/features/shared/widgets/chart/heatmap-chart/heatmap-chart-widget.component.ts","../../../../libs/modules/dashboard-management/client/src/lib/features/shared/widgets/chart/heatmap-chart/heatmap-chart-widget.component.html"],"sourcesContent":["import { AXHeatmapChartComponent, AXHeatmapChartOption, AXHeatmapData } from '@acorex/charts/heatmap-chart';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\nimport { AXPQueryExecutor } from '@acorex-platform/framework-client/runtime';\nimport { ChangeDetectionStrategy, Component, computed, effect, inject, signal } from '@angular/core';\nimport { AXPDashboardWidgetComponent } from '../../dashboard-widget-base';\nimport { resolveChartQueryTabs } from '../chart-query-load.util';\nimport { loadHeatmapChartItems, resolveChartAxisLabels } from '../chart-widget-data.util';\nimport { AXPChartQueryTabsComponent } from '../chart-query-tabs.component';\n\n/**\n * Heatmap Chart Widget Component\n * Displays matrix-like data with color intensity based on value.\n */\n@Component({\n templateUrl: './heatmap-chart-widget.component.html',\n styleUrls: ['./heatmap-chart-widget.component.css'],\n imports: [AXHeatmapChartComponent, AXPChartQueryTabsComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AXPHeatmapChartWidgetViewComponent extends AXPDashboardWidgetComponent {\n //#region ----- Services & Dependencies -----\n\n private readonly queryExecutor = inject(AXPQueryExecutor);\n private readonly translationService = inject(AXTranslationService);\n\n //#endregion\n\n //#region ----- Chart state -----\n\n protected data = signal<AXHeatmapData[]>([]);\n\n /** Options passed to the chart with resolved string labels (multi-language and @i18n keys). */\n protected heatmapOptions = signal<AXHeatmapChartOption>({} as AXHeatmapChartOption);\n\n private labelResolveGeneration = 0;\n\n //#endregion\n\n //#region ----- Query tabs -----\n\n protected readonly queryTabs = computed(() =>\n resolveChartQueryTabs(this.options() as Record<string, unknown>, this.entityContext()?.entityId),\n );\n\n protected readonly activeTabIndex = signal(0);\n\n private readonly activeQuery = computed(() => {\n const tabs = this.queryTabs();\n if (tabs.length === 0) {\n return undefined;\n }\n const index = Math.min(Math.max(this.activeTabIndex(), 0), tabs.length - 1);\n return tabs[index];\n });\n\n protected selectQueryTab(index: number): void {\n this.activeTabIndex.set(index);\n }\n\n //#endregion\n\n //#region ----- Localization -----\n\n private async resolveChartText(value: unknown): Promise<string> {\n if (value == null) {\n return '';\n }\n if (typeof value === 'string') {\n return value.startsWith('@') ? this.translationService.translateAsync(value) : value;\n }\n if (\n typeof value === 'object' &&\n !Array.isArray(value) &&\n this.translationService.isValidMultiLanguageObject(value)\n ) {\n return this.translationService.resolve(value as AXPMultiLanguageString);\n }\n return String(value);\n }\n\n private readonly resolveOptionLabelsEffect = effect(() => {\n const raw = this.options() as Record<string, unknown>;\n const generation = ++this.labelResolveGeneration;\n\n void (async () => {\n const axisLabels = resolveChartAxisLabels(raw);\n const [xAxisLabel, yAxisLabel] = await Promise.all([\n this.resolveChartText(axisLabels.xAxisLabel),\n this.resolveChartText(axisLabels.yAxisLabel),\n ]);\n\n const messagesRaw = raw['messages'];\n const messages =\n messagesRaw && typeof messagesRaw === 'object' && !Array.isArray(messagesRaw)\n ? (messagesRaw as Record<string, unknown>)\n : undefined;\n\n const [noData, noDataHelp] = await Promise.all([\n this.resolveChartText(messages?.['noData']),\n this.resolveChartText(messages?.['noDataHelp']),\n ]);\n\n if (generation !== this.labelResolveGeneration) {\n return;\n }\n\n const base = raw as unknown as AXHeatmapChartOption;\n this.heatmapOptions.set({\n ...base,\n xAxisLabel,\n yAxisLabel,\n ...(messages\n ? {\n messages: {\n ...base.messages,\n ...(noData ? { noData } : {}),\n ...(noDataHelp ? { noDataHelp } : {}),\n ...(messages['noDataIcon'] ? { noDataIcon: String(messages['noDataIcon']) } : {}),\n },\n }\n : {}),\n });\n })();\n });\n\n //#endregion\n\n //#region ----- Query loading -----\n\n private readonly clampTabIndexEffect = effect(() => {\n const tabs = this.queryTabs();\n if (this.activeTabIndex() >= tabs.length) {\n this.activeTabIndex.set(0);\n }\n });\n\n private readonly dataLoadEffect = effect(async () => {\n const opts = this.options() as Record<string, unknown>;\n const active = this.activeQuery();\n const items = await loadHeatmapChartItems(opts, {\n queryExecutor: this.queryExecutor,\n queryKey: active?.query,\n queryInput: active?.queryInput,\n });\n const resolved = await Promise.all(\n items.map(async (item) => {\n const x = item.x;\n const y = item.y;\n const label = item.label;\n\n return {\n ...item,\n x: typeof x === 'number' ? x : await this.resolveChartText(x),\n y: typeof y === 'number' ? y : await this.resolveChartText(y),\n ...(label !== undefined ? { label: await this.resolveChartText(label) } : {}),\n };\n }),\n );\n\n this.data.set(resolved as AXHeatmapData[]);\n });\n\n //#endregion\n\n constructor() {\n super();\n this.setOptions({\n showXAxis: true,\n showYAxis: true,\n showTooltip: true,\n cellPadding: 0.05,\n borderRadius: 2,\n color: 'rgb(var(--ax-sys-color-primary-500))',\n animationEasing: 'cubic-out',\n animationDuration: 800,\n ...this.options(),\n });\n\n this.heatmapOptions.set(this.options() as AXHeatmapChartOption);\n }\n}\n","<div class=\"axp-chart-widget-host\">\n <axp-chart-query-tabs\n [tabs]=\"queryTabs()\"\n [activeIndex]=\"activeTabIndex()\"\n (activeIndexChange)=\"selectQueryTab($event)\"\n />\n <div class=\"axp-chart-widget-host__body\">\n <div class=\"axp-chart-widget-host__chart axp-chart-widget-host__chart--heatmap\">\n <ax-heatmap-chart [data]=\"data()\" [options]=\"heatmapOptions()\"></ax-heatmap-chart>\n </div>\n </div>\n</div>\n"],"names":[],"mappings":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