@accurix/centrinfo-widget 5.2.0 → 5.3.1
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/README.md +9 -1
- package/dist/cdn/centrinfo-widget-charts.js +5352 -4683
- package/dist/cdn/centrinfo-widget.js +148 -144
- package/dist/cdn/manifest.json +9 -9
- package/dist/echarts-runtime-CoBDVO7m.mjs +18 -0
- package/dist/echarts-runtime-w0DrsYLy.cjs +24 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +1 -1
- package/dist/runtime.cjs +2 -2
- package/dist/runtime.d.cts +8 -134
- package/dist/runtime.d.mts +4 -2
- package/dist/runtime.mjs +2 -2
- package/dist/styles-BUK2S5l_.mjs +3543 -0
- package/dist/styles-BVQRcZkH.cjs +3543 -0
- package/dist/{types-CmLbqY23.d.mts → types-CSrYnsOp.d.mts} +161 -79
- package/dist/{types-CCk7I1fM.d.cts → types-eBuee08Q.d.cts} +212 -1
- package/package.json +2 -2
- package/dist/echarts-runtime-BfpVL8xu.cjs +0 -24
- package/dist/echarts-runtime-Bu1uy4oO.mjs +0 -18
- package/dist/styles-BNPs-1he.mjs +0 -3539
- package/dist/styles-Bp-0ZpvF.cjs +0 -3539
|
@@ -188,6 +188,7 @@ interface AnalyticsAIExplanationInput {
|
|
|
188
188
|
status: AnalyticsAIExplanationStatus | string;
|
|
189
189
|
explanationId?: string;
|
|
190
190
|
retryAvailable?: boolean;
|
|
191
|
+
retryAfterSeconds?: number;
|
|
191
192
|
/** Pending only: when the backend job's budget ends (ISO time). */
|
|
192
193
|
deadlineAt?: string;
|
|
193
194
|
/** Pending only: seconds left in the job's budget at response time (clock-skew safe). */
|
|
@@ -241,6 +242,7 @@ declare const ANALYTICS_EXPLANATION_COPY: {
|
|
|
241
242
|
readonly basicExplanation: "Basic explanation";
|
|
242
243
|
readonly preparingDetailed: "Preparing a detailed explanation…";
|
|
243
244
|
readonly stillWorkingDetailed: "Still working on the detailed explanation…";
|
|
245
|
+
readonly waitingToRetry: "Waiting briefly before retrying the detailed explanation…";
|
|
244
246
|
readonly detailedReady: "Detailed explanation ready.";
|
|
245
247
|
readonly detailedUnavailable: "A detailed explanation is not available right now.";
|
|
246
248
|
readonly detailedRetry: "Try again";
|
|
@@ -333,6 +335,7 @@ interface AnalyticsAIExplanationJob<E extends AnalyticsExplanationInput> {
|
|
|
333
335
|
status: AnalyticsAIExplanationStatus | string;
|
|
334
336
|
explanationId?: string;
|
|
335
337
|
retryAvailable?: boolean;
|
|
338
|
+
retryAfterSeconds?: number;
|
|
336
339
|
/** Pending only: the job's deadline (ISO) and seconds left (see AnalyticsAIExplanationInput). */
|
|
337
340
|
deadlineAt?: string;
|
|
338
341
|
waitSeconds?: number;
|
|
@@ -353,84 +356,6 @@ interface AnalyticsAIExplanationTransport<E extends AnalyticsExplanationInput> {
|
|
|
353
356
|
settled?: (explanationId: string, status: 'ready' | 'failed' | 'not_requested', explanation?: E) => void;
|
|
354
357
|
}
|
|
355
358
|
//#endregion
|
|
356
|
-
//#region ../centrinfo-results/src/labels.d.ts
|
|
357
|
-
type AnalyticsExplanationCopy = Required<AnalyticsExplanationCopyOverrides>;
|
|
358
|
-
/** Every string the shared result renderer shows. Hosts override any subset. */
|
|
359
|
-
interface ResultLabels {
|
|
360
|
-
resultDetails: string;
|
|
361
|
-
liveMetric: string;
|
|
362
|
-
currentValue: string;
|
|
363
|
-
noMatchTitle: string;
|
|
364
|
-
noMatchBody: string;
|
|
365
|
-
chartType: string;
|
|
366
|
-
chooseChartType: string;
|
|
367
|
-
aggregate: string;
|
|
368
|
-
aggregateTitle: string;
|
|
369
|
-
aggregateCharge: string;
|
|
370
|
-
chartFallback: string;
|
|
371
|
-
chartLine: string;
|
|
372
|
-
chartBar: string;
|
|
373
|
-
chartStackedBar: string;
|
|
374
|
-
chartLineHint: string;
|
|
375
|
-
chartBarHint: string;
|
|
376
|
-
chartStackedBarHint: string;
|
|
377
|
-
aggregationSum: string;
|
|
378
|
-
aggregationAvg: string;
|
|
379
|
-
aggregationMin: string;
|
|
380
|
-
aggregationMax: string;
|
|
381
|
-
aggregationCount: string;
|
|
382
|
-
aggregationCountDistinct: string;
|
|
383
|
-
download: string;
|
|
384
|
-
downloadData: string;
|
|
385
|
-
expandTable: string;
|
|
386
|
-
expandChart: string;
|
|
387
|
-
restoreView: string;
|
|
388
|
-
aboutResult: string;
|
|
389
|
-
aboutPeriod: string;
|
|
390
|
-
aboutResults: string;
|
|
391
|
-
aboutChecked: string;
|
|
392
|
-
aboutTimezone: string;
|
|
393
|
-
aboutSourceData: string;
|
|
394
|
-
aboutFilters: string;
|
|
395
|
-
/** `{count}` placeholder. */
|
|
396
|
-
rowOne: string;
|
|
397
|
-
rowMany: string;
|
|
398
|
-
filtersOne: string;
|
|
399
|
-
filtersMany: string;
|
|
400
|
-
filtersApplied: string;
|
|
401
|
-
notSet: string;
|
|
402
|
-
noValue: string;
|
|
403
|
-
yes: string;
|
|
404
|
-
no: string;
|
|
405
|
-
chartValues: string;
|
|
406
|
-
/** `{measure}`, `{dimension}`. */
|
|
407
|
-
chartTitle: string;
|
|
408
|
-
seriesLimited: string;
|
|
409
|
-
summaryLatest: string;
|
|
410
|
-
summaryNoTrend: string;
|
|
411
|
-
summaryHighest: string;
|
|
412
|
-
summaryNoComparison: string;
|
|
413
|
-
zoomControls: string;
|
|
414
|
-
zoomIn: string;
|
|
415
|
-
zoomOut: string;
|
|
416
|
-
zoomReset: string;
|
|
417
|
-
zoomResetShort: string;
|
|
418
|
-
zoomNone: string;
|
|
419
|
-
zoomAllOne: string;
|
|
420
|
-
zoomAllMany: string;
|
|
421
|
-
zoomRange: string;
|
|
422
|
-
inProgress: string;
|
|
423
|
-
newContent: string;
|
|
424
|
-
updatedAt: string;
|
|
425
|
-
liveData: string;
|
|
426
|
-
viewData: string;
|
|
427
|
-
hideData: string;
|
|
428
|
-
inProgressLegend: string;
|
|
429
|
-
/** Overrides for the explanation panel copy. */
|
|
430
|
-
explanation?: Partial<AnalyticsExplanationCopy>;
|
|
431
|
-
governedResult: string;
|
|
432
|
-
}
|
|
433
|
-
//#endregion
|
|
434
359
|
//#region ../centrinfo-results/src/format.d.ts
|
|
435
360
|
/**
|
|
436
361
|
* The one place numbers, currency, percentages and dates are formatted, so the
|
|
@@ -471,6 +396,7 @@ interface AnalyticsVisualizationColumn$1 {
|
|
|
471
396
|
currencyCode?: string;
|
|
472
397
|
/** Time granularity of a date column; drives how its values are labelled. */
|
|
473
398
|
grain?: ResultGrain;
|
|
399
|
+
timeGrain?: string;
|
|
474
400
|
description?: string;
|
|
475
401
|
priority?: 'primary' | 'secondary' | 'detail';
|
|
476
402
|
sortable?: boolean;
|
|
@@ -478,6 +404,8 @@ interface AnalyticsVisualizationColumn$1 {
|
|
|
478
404
|
groupable?: boolean;
|
|
479
405
|
}
|
|
480
406
|
interface AnalyticsVisualizationRecommendation$1 {
|
|
407
|
+
layout?: 'overlay' | 'panels' | 'overlap';
|
|
408
|
+
layers?: AnalyticsChartLayer[];
|
|
481
409
|
type: AnalyticsChartCatalogType | 'area' | 'stacked_bar';
|
|
482
410
|
mode: string;
|
|
483
411
|
categoryField?: string;
|
|
@@ -490,6 +418,20 @@ interface AnalyticsVisualizationRecommendation$1 {
|
|
|
490
418
|
confidence?: number;
|
|
491
419
|
}
|
|
492
420
|
interface AnalyticsVisualization$1 {
|
|
421
|
+
truncated?: boolean;
|
|
422
|
+
maxSeries?: number;
|
|
423
|
+
valueProvenance?: Array<{
|
|
424
|
+
rowIndex: number;
|
|
425
|
+
field: string;
|
|
426
|
+
status?: string;
|
|
427
|
+
filled?: string;
|
|
428
|
+
}>;
|
|
429
|
+
panels?: Array<{
|
|
430
|
+
id: string;
|
|
431
|
+
title: string;
|
|
432
|
+
status: string;
|
|
433
|
+
visualization?: AnalyticsVisualization$1;
|
|
434
|
+
}>;
|
|
493
435
|
/** The latest time bucket is still in progress (drawn dashed). */
|
|
494
436
|
lastPeriodInProgress?: boolean;
|
|
495
437
|
/** Like-for-like comparison basis (reader-safe). */
|
|
@@ -559,6 +501,132 @@ interface ResultTableClassNames {
|
|
|
559
501
|
note?: string;
|
|
560
502
|
}
|
|
561
503
|
//#endregion
|
|
504
|
+
//#region ../centrinfo-results/src/combo-chart.d.ts
|
|
505
|
+
/** References governed result columns. Layers never contain queries or data. */
|
|
506
|
+
interface AnalyticsChartLayer {
|
|
507
|
+
sourceTitle?: string;
|
|
508
|
+
categorySourceTitle?: string;
|
|
509
|
+
type: 'line' | 'bar';
|
|
510
|
+
mode: string;
|
|
511
|
+
categoryField: string;
|
|
512
|
+
valueField: string;
|
|
513
|
+
seriesField?: string;
|
|
514
|
+
axis: 'y1' | 'y2';
|
|
515
|
+
}
|
|
516
|
+
interface AnalyticsComboModel {
|
|
517
|
+
layout?: 'overlay' | 'panels' | 'overlap';
|
|
518
|
+
horizontal?: boolean;
|
|
519
|
+
categories: string[];
|
|
520
|
+
categoryLabel: string;
|
|
521
|
+
series: Array<{
|
|
522
|
+
layer: number;
|
|
523
|
+
name: string;
|
|
524
|
+
type: 'line' | 'bar';
|
|
525
|
+
area: boolean;
|
|
526
|
+
stack?: string;
|
|
527
|
+
axis: number;
|
|
528
|
+
column: AnalyticsVisualizationColumn$1;
|
|
529
|
+
values: Array<number | null>;
|
|
530
|
+
reference?: boolean;
|
|
531
|
+
}>;
|
|
532
|
+
axes: Array<{
|
|
533
|
+
label: string;
|
|
534
|
+
column: AnalyticsVisualizationColumn$1;
|
|
535
|
+
}>;
|
|
536
|
+
omittedSeriesCount: number;
|
|
537
|
+
partial: boolean;
|
|
538
|
+
locale?: string;
|
|
539
|
+
}
|
|
540
|
+
//#endregion
|
|
541
|
+
//#region ../centrinfo-results/src/labels.d.ts
|
|
542
|
+
type AnalyticsExplanationCopy = Required<AnalyticsExplanationCopyOverrides>;
|
|
543
|
+
/** Every string the shared result renderer shows. Hosts override any subset. */
|
|
544
|
+
interface ResultLabels {
|
|
545
|
+
analysisUnavailable: string;
|
|
546
|
+
resultDetails: string;
|
|
547
|
+
liveMetric: string;
|
|
548
|
+
currentValue: string;
|
|
549
|
+
noMatchTitle: string;
|
|
550
|
+
noMatchBody: string;
|
|
551
|
+
chartType: string;
|
|
552
|
+
chooseChartType: string;
|
|
553
|
+
aggregate: string;
|
|
554
|
+
aggregateTitle: string;
|
|
555
|
+
aggregateCharge: string;
|
|
556
|
+
chartFallback: string;
|
|
557
|
+
chartLine: string;
|
|
558
|
+
chartArea: string;
|
|
559
|
+
chartCombo: string;
|
|
560
|
+
chartAreaHint: string;
|
|
561
|
+
chartComboHint: string;
|
|
562
|
+
chartBar: string;
|
|
563
|
+
chartStackedBar: string;
|
|
564
|
+
chartLineHint: string;
|
|
565
|
+
chartBarHint: string;
|
|
566
|
+
chartStackedBarHint: string;
|
|
567
|
+
aggregationSum: string;
|
|
568
|
+
aggregationAvg: string;
|
|
569
|
+
aggregationMin: string;
|
|
570
|
+
aggregationMax: string;
|
|
571
|
+
aggregationCount: string;
|
|
572
|
+
aggregationCountDistinct: string;
|
|
573
|
+
download: string;
|
|
574
|
+
downloadData: string;
|
|
575
|
+
expandTable: string;
|
|
576
|
+
expandChart: string;
|
|
577
|
+
restoreView: string;
|
|
578
|
+
aboutResult: string;
|
|
579
|
+
aboutPeriod: string;
|
|
580
|
+
aboutResults: string;
|
|
581
|
+
aboutChecked: string;
|
|
582
|
+
aboutTimezone: string;
|
|
583
|
+
aboutSourceData: string;
|
|
584
|
+
aboutFilters: string;
|
|
585
|
+
/** `{count}` placeholder. */
|
|
586
|
+
rowOne: string;
|
|
587
|
+
rowMany: string;
|
|
588
|
+
filtersOne: string;
|
|
589
|
+
filtersMany: string;
|
|
590
|
+
filtersApplied: string;
|
|
591
|
+
notSet: string;
|
|
592
|
+
noValue: string;
|
|
593
|
+
yes: string;
|
|
594
|
+
no: string;
|
|
595
|
+
chartValues: string;
|
|
596
|
+
/** `{measure}`, `{dimension}`. */
|
|
597
|
+
chartTitle: string;
|
|
598
|
+
viewerTitle: string;
|
|
599
|
+
viewerUnavailable: string;
|
|
600
|
+
retryViewer: string;
|
|
601
|
+
viewerUpdateAvailable: string;
|
|
602
|
+
updateViewer: string;
|
|
603
|
+
seriesLimited: string;
|
|
604
|
+
partialChart: string;
|
|
605
|
+
summaryLatest: string;
|
|
606
|
+
summaryNoTrend: string;
|
|
607
|
+
summaryHighest: string;
|
|
608
|
+
summaryNoComparison: string;
|
|
609
|
+
zoomControls: string;
|
|
610
|
+
zoomIn: string;
|
|
611
|
+
zoomOut: string;
|
|
612
|
+
zoomReset: string;
|
|
613
|
+
zoomResetShort: string;
|
|
614
|
+
zoomNone: string;
|
|
615
|
+
zoomAllOne: string;
|
|
616
|
+
zoomAllMany: string;
|
|
617
|
+
zoomRange: string;
|
|
618
|
+
inProgress: string;
|
|
619
|
+
newContent: string;
|
|
620
|
+
updatedAt: string;
|
|
621
|
+
liveData: string;
|
|
622
|
+
viewData: string;
|
|
623
|
+
hideData: string;
|
|
624
|
+
inProgressLegend: string;
|
|
625
|
+
/** Overrides for the explanation panel copy. */
|
|
626
|
+
explanation?: Partial<AnalyticsExplanationCopy>;
|
|
627
|
+
governedResult: string;
|
|
628
|
+
}
|
|
629
|
+
//#endregion
|
|
562
630
|
//#region ../centrinfo-results/src/chart.d.ts
|
|
563
631
|
type WidgetAnalyticsSeries = {
|
|
564
632
|
field: string;
|
|
@@ -568,8 +636,9 @@ type WidgetAnalyticsSeries = {
|
|
|
568
636
|
/** Like-for-like breakdown: per-point comparison (tooltip detail). */
|
|
569
637
|
points?: Array<AnalyticsGroupComparisonPoint | undefined>;
|
|
570
638
|
};
|
|
571
|
-
type WidgetAnalyticsChartType = 'line' | 'bar' | 'stacked_bar';
|
|
639
|
+
type WidgetAnalyticsChartType = 'line' | 'area' | 'bar' | 'stacked_bar' | 'combo';
|
|
572
640
|
type WidgetAnalyticsChartModel = {
|
|
641
|
+
combo?: AnalyticsComboModel;
|
|
573
642
|
type: WidgetAnalyticsChartType;
|
|
574
643
|
title: string;
|
|
575
644
|
xAxisTitle: string;
|
|
@@ -589,6 +658,7 @@ type WidgetAnalyticsChartModel = {
|
|
|
589
658
|
labels: ResultLabels;
|
|
590
659
|
};
|
|
591
660
|
type WidgetAnalyticsChartOptions = {
|
|
661
|
+
maxSeries?: number;
|
|
592
662
|
locale?: string;
|
|
593
663
|
labels?: Partial<ResultLabels>;
|
|
594
664
|
};
|
|
@@ -948,6 +1018,7 @@ interface AnalyticsVisualizationColumn {
|
|
|
948
1018
|
label: string;
|
|
949
1019
|
dataType: 'text' | 'number' | 'currency' | 'percent' | 'boolean' | 'date' | 'datetime';
|
|
950
1020
|
semanticRole: 'identifier' | 'dimension' | 'measure' | 'date' | 'geography' | 'boolean';
|
|
1021
|
+
timeGrain?: string;
|
|
951
1022
|
aggregation?: 'none' | 'sum' | 'avg' | 'count' | 'count_distinct' | 'min' | 'max';
|
|
952
1023
|
allowedAggregations?: Array<'none' | 'sum' | 'avg' | 'count' | 'count_distinct' | 'min' | 'max'>;
|
|
953
1024
|
formatPattern?: string;
|
|
@@ -959,6 +1030,7 @@ interface AnalyticsVisualizationColumn {
|
|
|
959
1030
|
groupable?: boolean;
|
|
960
1031
|
}
|
|
961
1032
|
interface AnalyticsVisualizationRecommendation {
|
|
1033
|
+
layers?: AnalyticsChartLayer[];
|
|
962
1034
|
type: 'kpi' | 'table' | 'line' | 'area' | 'bar' | 'stacked_bar' | 'pie' | 'scatter' | 'funnel' | 'heatmap' | 'radar';
|
|
963
1035
|
mode: string;
|
|
964
1036
|
categoryField?: string;
|
|
@@ -1150,6 +1222,12 @@ interface AnalyticsVisualizationBusinessAnalysis {
|
|
|
1150
1222
|
coverage?: AnalyticsVisualizationAnalysisCoverage;
|
|
1151
1223
|
}
|
|
1152
1224
|
interface AnalyticsVisualization {
|
|
1225
|
+
panels?: Array<{
|
|
1226
|
+
id: string;
|
|
1227
|
+
title: string;
|
|
1228
|
+
status: string;
|
|
1229
|
+
visualization?: AnalyticsVisualization;
|
|
1230
|
+
}>;
|
|
1153
1231
|
version?: number;
|
|
1154
1232
|
presentation?: 'kpi' | 'chart' | 'table';
|
|
1155
1233
|
type: 'kpi' | 'table' | 'bar' | 'line' | 'area' | 'stacked_bar' | 'pie' | 'scatter' | 'funnel' | 'heatmap' | 'radar';
|
|
@@ -1506,6 +1584,10 @@ interface WidgetConfig {
|
|
|
1506
1584
|
getIdentityToken?: () => string | Promise<string>;
|
|
1507
1585
|
/** API origin. Defaults to the production Centrinfo API. */
|
|
1508
1586
|
apiBaseUrl?: string;
|
|
1587
|
+
/** Dashboard origin serving the shared analytics screen, including dedicated Enterprise deployments. */
|
|
1588
|
+
workspaceUrl?: string;
|
|
1589
|
+
/** Keep analytics rendering local during a controlled rollout or for a disconnected installation. */
|
|
1590
|
+
analyticsRenderer?: 'hosted' | 'local';
|
|
1509
1591
|
/** Brand accent (any CSS color). Overrides the persona/default green. */
|
|
1510
1592
|
accentColor?: string;
|
|
1511
1593
|
/**
|
|
@@ -16,6 +16,9 @@ interface CentrinfoAnswer<Visualization = unknown, Source$1 = unknown, Artifact
|
|
|
16
16
|
timezone?: string;
|
|
17
17
|
}
|
|
18
18
|
//#endregion
|
|
19
|
+
//#region ../centrinfo-results/src/analytics-chart-catalog.d.ts
|
|
20
|
+
type AnalyticsChartCatalogType = 'kpi' | 'table' | 'line' | 'bar' | 'pie' | 'scatter' | 'effectScatter' | 'map' | 'candlestick' | 'boxplot' | 'graph' | 'lines' | 'tree' | 'treemap' | 'sunburst' | 'parallel' | 'sankey' | 'funnel' | 'heatmap' | 'radar' | 'gauge' | 'pictorialBar' | 'themeRiver' | 'matrix' | 'chord' | 'custom' | 'dataset' | 'dataZoom' | 'graphic' | 'richText' | 'globe' | 'bar3D' | 'scatter3D' | 'surface' | 'map3D' | 'lines3D' | 'line3D' | 'scatterGL' | 'linesGL' | 'flowGL' | 'graphGL' | 'polygons3D';
|
|
21
|
+
//#endregion
|
|
19
22
|
//#region ../centrinfo-results/src/analytics-explanation.d.ts
|
|
20
23
|
/**
|
|
21
24
|
* Framework-agnostic analytics explanation core.
|
|
@@ -184,6 +187,7 @@ interface AnalyticsAIExplanationInput {
|
|
|
184
187
|
status: AnalyticsAIExplanationStatus | string;
|
|
185
188
|
explanationId?: string;
|
|
186
189
|
retryAvailable?: boolean;
|
|
190
|
+
retryAfterSeconds?: number;
|
|
187
191
|
/** Pending only: when the backend job's budget ends (ISO time). */
|
|
188
192
|
deadlineAt?: string;
|
|
189
193
|
/** Pending only: seconds left in the job's budget at response time (clock-skew safe). */
|
|
@@ -237,6 +241,7 @@ declare const ANALYTICS_EXPLANATION_COPY: {
|
|
|
237
241
|
readonly basicExplanation: "Basic explanation";
|
|
238
242
|
readonly preparingDetailed: "Preparing a detailed explanation…";
|
|
239
243
|
readonly stillWorkingDetailed: "Still working on the detailed explanation…";
|
|
244
|
+
readonly waitingToRetry: "Waiting briefly before retrying the detailed explanation…";
|
|
240
245
|
readonly detailedReady: "Detailed explanation ready.";
|
|
241
246
|
readonly detailedUnavailable: "A detailed explanation is not available right now.";
|
|
242
247
|
readonly detailedRetry: "Try again";
|
|
@@ -329,6 +334,7 @@ interface AnalyticsAIExplanationJob<E extends AnalyticsExplanationInput> {
|
|
|
329
334
|
status: AnalyticsAIExplanationStatus | string;
|
|
330
335
|
explanationId?: string;
|
|
331
336
|
retryAvailable?: boolean;
|
|
337
|
+
retryAfterSeconds?: number;
|
|
332
338
|
/** Pending only: the job's deadline (ISO) and seconds left (see AnalyticsAIExplanationInput). */
|
|
333
339
|
deadlineAt?: string;
|
|
334
340
|
waitSeconds?: number;
|
|
@@ -349,10 +355,193 @@ interface AnalyticsAIExplanationTransport<E extends AnalyticsExplanationInput> {
|
|
|
349
355
|
settled?: (explanationId: string, status: 'ready' | 'failed' | 'not_requested', explanation?: E) => void;
|
|
350
356
|
}
|
|
351
357
|
//#endregion
|
|
358
|
+
//#region ../centrinfo-results/src/format.d.ts
|
|
359
|
+
/**
|
|
360
|
+
* The one place numbers, currency, percentages and dates are formatted, so the
|
|
361
|
+
* chart axis, tooltip, table and KPI show the same value the same way.
|
|
362
|
+
*
|
|
363
|
+
* Rules:
|
|
364
|
+
* - Currency comes from column metadata (`currencyCode`) or the result's fixed
|
|
365
|
+
* currency. With no known code the amount is shown as a plain number.
|
|
366
|
+
* - A `percent` column is read as percentage points (0.5 is "0.5%") unless its
|
|
367
|
+
* `formatPattern` contains `%` (Excel style), which marks a fraction (0.5 is
|
|
368
|
+
* "50%"). Magnitude is never used to guess.
|
|
369
|
+
* - Date-only values (`2024-03-05`) are calendar dates: they are formatted in
|
|
370
|
+
* UTC so they never shift a day. Instants are formatted in the result
|
|
371
|
+
* timezone. Granularity follows column metadata, the result's comparison
|
|
372
|
+
* grain, or the shape of the values — a daily series is never "Mar 2024".
|
|
373
|
+
*/
|
|
374
|
+
type ResultGrain = 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year';
|
|
375
|
+
interface ResultFormatContext {
|
|
376
|
+
locale?: string;
|
|
377
|
+
/** IANA zone of the result; used for instants, never for date-only values. */
|
|
378
|
+
timezone?: string;
|
|
379
|
+
grain?: ResultGrain;
|
|
380
|
+
/** Result-level fixed currency, used when the column has none. */
|
|
381
|
+
currencyCode?: string;
|
|
382
|
+
yes?: string;
|
|
383
|
+
no?: string;
|
|
384
|
+
}
|
|
385
|
+
//#endregion
|
|
386
|
+
//#region ../centrinfo-results/src/types.d.ts
|
|
387
|
+
interface AnalyticsVisualizationColumn$1 {
|
|
388
|
+
key: string;
|
|
389
|
+
label: string;
|
|
390
|
+
dataType: 'text' | 'number' | 'currency' | 'percent' | 'boolean' | 'date' | 'datetime';
|
|
391
|
+
semanticRole: 'identifier' | 'dimension' | 'measure' | 'date' | 'geography' | 'boolean';
|
|
392
|
+
aggregation?: 'none' | 'sum' | 'avg' | 'count' | 'count_distinct' | 'min' | 'max';
|
|
393
|
+
allowedAggregations?: Array<'none' | 'sum' | 'avg' | 'count' | 'count_distinct' | 'min' | 'max'>;
|
|
394
|
+
formatPattern?: string;
|
|
395
|
+
currencyCode?: string;
|
|
396
|
+
/** Time granularity of a date column; drives how its values are labelled. */
|
|
397
|
+
grain?: ResultGrain;
|
|
398
|
+
timeGrain?: string;
|
|
399
|
+
description?: string;
|
|
400
|
+
priority?: 'primary' | 'secondary' | 'detail';
|
|
401
|
+
sortable?: boolean;
|
|
402
|
+
filterable?: boolean;
|
|
403
|
+
groupable?: boolean;
|
|
404
|
+
}
|
|
405
|
+
interface AnalyticsVisualizationRecommendation$1 {
|
|
406
|
+
layout?: 'overlay' | 'panels' | 'overlap';
|
|
407
|
+
layers?: AnalyticsChartLayer[];
|
|
408
|
+
type: AnalyticsChartCatalogType | 'area' | 'stacked_bar';
|
|
409
|
+
mode: string;
|
|
410
|
+
categoryField?: string;
|
|
411
|
+
latitudeField?: string;
|
|
412
|
+
longitudeField?: string;
|
|
413
|
+
geometryField?: string;
|
|
414
|
+
valueFields?: string[];
|
|
415
|
+
seriesField?: string;
|
|
416
|
+
reason?: string;
|
|
417
|
+
confidence?: number;
|
|
418
|
+
}
|
|
419
|
+
interface AnalyticsVisualization$1 {
|
|
420
|
+
truncated?: boolean;
|
|
421
|
+
maxSeries?: number;
|
|
422
|
+
valueProvenance?: Array<{
|
|
423
|
+
rowIndex: number;
|
|
424
|
+
field: string;
|
|
425
|
+
status?: string;
|
|
426
|
+
filled?: string;
|
|
427
|
+
}>;
|
|
428
|
+
panels?: Array<{
|
|
429
|
+
id: string;
|
|
430
|
+
title: string;
|
|
431
|
+
status: string;
|
|
432
|
+
visualization?: AnalyticsVisualization$1;
|
|
433
|
+
}>;
|
|
434
|
+
/** The latest time bucket is still in progress (drawn dashed). */
|
|
435
|
+
lastPeriodInProgress?: boolean;
|
|
436
|
+
/** Like-for-like comparison basis (reader-safe). */
|
|
437
|
+
periodComparison?: AnalyticsPeriodComparison;
|
|
438
|
+
version?: number;
|
|
439
|
+
presentation?: 'kpi' | 'chart' | 'table';
|
|
440
|
+
type: AnalyticsChartCatalogType | 'area' | 'stacked_bar';
|
|
441
|
+
title?: string;
|
|
442
|
+
label?: string;
|
|
443
|
+
value?: string;
|
|
444
|
+
latitudeField?: string;
|
|
445
|
+
longitudeField?: string;
|
|
446
|
+
geometryField?: string;
|
|
447
|
+
valueFields?: string[];
|
|
448
|
+
series?: string;
|
|
449
|
+
seriesField?: string;
|
|
450
|
+
columns?: string[];
|
|
451
|
+
rows?: Array<Record<string, unknown>>;
|
|
452
|
+
rowCount?: number;
|
|
453
|
+
timezone?: string;
|
|
454
|
+
freshness?: {
|
|
455
|
+
status?: string;
|
|
456
|
+
answeredAt?: string;
|
|
457
|
+
};
|
|
458
|
+
reportingPeriod?: {
|
|
459
|
+
label?: string;
|
|
460
|
+
start?: string;
|
|
461
|
+
end?: string;
|
|
462
|
+
timezone?: string;
|
|
463
|
+
};
|
|
464
|
+
appliedFilters?: Array<{
|
|
465
|
+
field: string;
|
|
466
|
+
operator: string;
|
|
467
|
+
value: unknown;
|
|
468
|
+
}>;
|
|
469
|
+
explanation?: {
|
|
470
|
+
checkedAt?: string;
|
|
471
|
+
timezone?: string;
|
|
472
|
+
dataFreshness?: {
|
|
473
|
+
status?: string;
|
|
474
|
+
};
|
|
475
|
+
};
|
|
476
|
+
expandable?: boolean;
|
|
477
|
+
tableAvailable?: boolean;
|
|
478
|
+
downloadAvailable?: boolean;
|
|
479
|
+
columnMetadata?: AnalyticsVisualizationColumn$1[];
|
|
480
|
+
currency?: {
|
|
481
|
+
code?: string;
|
|
482
|
+
field?: string;
|
|
483
|
+
source?: 'fixed_metadata' | 'source_field';
|
|
484
|
+
isMixed: boolean;
|
|
485
|
+
};
|
|
486
|
+
chartRecommendation?: AnalyticsVisualizationRecommendation$1;
|
|
487
|
+
}
|
|
488
|
+
interface ResultColumn {
|
|
489
|
+
key: string;
|
|
490
|
+
label?: string;
|
|
491
|
+
dataType?: AnalyticsVisualizationColumn$1['dataType'];
|
|
492
|
+
currencyCode?: string;
|
|
493
|
+
formatPattern?: string;
|
|
494
|
+
grain?: ResultGrain;
|
|
495
|
+
semanticRole?: AnalyticsVisualizationColumn$1['semanticRole'];
|
|
496
|
+
}
|
|
497
|
+
interface ResultTableClassNames {
|
|
498
|
+
wrap?: string;
|
|
499
|
+
table?: string;
|
|
500
|
+
note?: string;
|
|
501
|
+
}
|
|
502
|
+
//#endregion
|
|
503
|
+
//#region ../centrinfo-results/src/combo-chart.d.ts
|
|
504
|
+
/** References governed result columns. Layers never contain queries or data. */
|
|
505
|
+
interface AnalyticsChartLayer {
|
|
506
|
+
sourceTitle?: string;
|
|
507
|
+
categorySourceTitle?: string;
|
|
508
|
+
type: 'line' | 'bar';
|
|
509
|
+
mode: string;
|
|
510
|
+
categoryField: string;
|
|
511
|
+
valueField: string;
|
|
512
|
+
seriesField?: string;
|
|
513
|
+
axis: 'y1' | 'y2';
|
|
514
|
+
}
|
|
515
|
+
interface AnalyticsComboModel {
|
|
516
|
+
layout?: 'overlay' | 'panels' | 'overlap';
|
|
517
|
+
horizontal?: boolean;
|
|
518
|
+
categories: string[];
|
|
519
|
+
categoryLabel: string;
|
|
520
|
+
series: Array<{
|
|
521
|
+
layer: number;
|
|
522
|
+
name: string;
|
|
523
|
+
type: 'line' | 'bar';
|
|
524
|
+
area: boolean;
|
|
525
|
+
stack?: string;
|
|
526
|
+
axis: number;
|
|
527
|
+
column: AnalyticsVisualizationColumn$1;
|
|
528
|
+
values: Array<number | null>;
|
|
529
|
+
reference?: boolean;
|
|
530
|
+
}>;
|
|
531
|
+
axes: Array<{
|
|
532
|
+
label: string;
|
|
533
|
+
column: AnalyticsVisualizationColumn$1;
|
|
534
|
+
}>;
|
|
535
|
+
omittedSeriesCount: number;
|
|
536
|
+
partial: boolean;
|
|
537
|
+
locale?: string;
|
|
538
|
+
}
|
|
539
|
+
//#endregion
|
|
352
540
|
//#region ../centrinfo-results/src/labels.d.ts
|
|
353
541
|
type AnalyticsExplanationCopy = Required<AnalyticsExplanationCopyOverrides>;
|
|
354
542
|
/** Every string the shared result renderer shows. Hosts override any subset. */
|
|
355
543
|
interface ResultLabels {
|
|
544
|
+
analysisUnavailable: string;
|
|
356
545
|
resultDetails: string;
|
|
357
546
|
liveMetric: string;
|
|
358
547
|
currentValue: string;
|
|
@@ -365,6 +554,10 @@ interface ResultLabels {
|
|
|
365
554
|
aggregateCharge: string;
|
|
366
555
|
chartFallback: string;
|
|
367
556
|
chartLine: string;
|
|
557
|
+
chartArea: string;
|
|
558
|
+
chartCombo: string;
|
|
559
|
+
chartAreaHint: string;
|
|
560
|
+
chartComboHint: string;
|
|
368
561
|
chartBar: string;
|
|
369
562
|
chartStackedBar: string;
|
|
370
563
|
chartLineHint: string;
|
|
@@ -401,7 +594,13 @@ interface ResultLabels {
|
|
|
401
594
|
chartValues: string;
|
|
402
595
|
/** `{measure}`, `{dimension}`. */
|
|
403
596
|
chartTitle: string;
|
|
597
|
+
viewerTitle: string;
|
|
598
|
+
viewerUnavailable: string;
|
|
599
|
+
retryViewer: string;
|
|
600
|
+
viewerUpdateAvailable: string;
|
|
601
|
+
updateViewer: string;
|
|
404
602
|
seriesLimited: string;
|
|
603
|
+
partialChart: string;
|
|
405
604
|
summaryLatest: string;
|
|
406
605
|
summaryNoTrend: string;
|
|
407
606
|
summaryHighest: string;
|
|
@@ -738,6 +937,7 @@ interface AnalyticsVisualizationColumn {
|
|
|
738
937
|
label: string;
|
|
739
938
|
dataType: 'text' | 'number' | 'currency' | 'percent' | 'boolean' | 'date' | 'datetime';
|
|
740
939
|
semanticRole: 'identifier' | 'dimension' | 'measure' | 'date' | 'geography' | 'boolean';
|
|
940
|
+
timeGrain?: string;
|
|
741
941
|
aggregation?: 'none' | 'sum' | 'avg' | 'count' | 'count_distinct' | 'min' | 'max';
|
|
742
942
|
allowedAggregations?: Array<'none' | 'sum' | 'avg' | 'count' | 'count_distinct' | 'min' | 'max'>;
|
|
743
943
|
formatPattern?: string;
|
|
@@ -749,6 +949,7 @@ interface AnalyticsVisualizationColumn {
|
|
|
749
949
|
groupable?: boolean;
|
|
750
950
|
}
|
|
751
951
|
interface AnalyticsVisualizationRecommendation {
|
|
952
|
+
layers?: AnalyticsChartLayer[];
|
|
752
953
|
type: 'kpi' | 'table' | 'line' | 'area' | 'bar' | 'stacked_bar' | 'pie' | 'scatter' | 'funnel' | 'heatmap' | 'radar';
|
|
753
954
|
mode: string;
|
|
754
955
|
categoryField?: string;
|
|
@@ -940,6 +1141,12 @@ interface AnalyticsVisualizationBusinessAnalysis {
|
|
|
940
1141
|
coverage?: AnalyticsVisualizationAnalysisCoverage;
|
|
941
1142
|
}
|
|
942
1143
|
interface AnalyticsVisualization {
|
|
1144
|
+
panels?: Array<{
|
|
1145
|
+
id: string;
|
|
1146
|
+
title: string;
|
|
1147
|
+
status: string;
|
|
1148
|
+
visualization?: AnalyticsVisualization;
|
|
1149
|
+
}>;
|
|
943
1150
|
version?: number;
|
|
944
1151
|
presentation?: 'kpi' | 'chart' | 'table';
|
|
945
1152
|
type: 'kpi' | 'table' | 'bar' | 'line' | 'area' | 'stacked_bar' | 'pie' | 'scatter' | 'funnel' | 'heatmap' | 'radar';
|
|
@@ -1296,6 +1503,10 @@ interface WidgetConfig {
|
|
|
1296
1503
|
getIdentityToken?: () => string | Promise<string>;
|
|
1297
1504
|
/** API origin. Defaults to the production Centrinfo API. */
|
|
1298
1505
|
apiBaseUrl?: string;
|
|
1506
|
+
/** Dashboard origin serving the shared analytics screen, including dedicated Enterprise deployments. */
|
|
1507
|
+
workspaceUrl?: string;
|
|
1508
|
+
/** Keep analytics rendering local during a controlled rollout or for a disconnected installation. */
|
|
1509
|
+
analyticsRenderer?: 'hosted' | 'local';
|
|
1299
1510
|
/** Brand accent (any CSS color). Overrides the persona/default green. */
|
|
1300
1511
|
accentColor?: string;
|
|
1301
1512
|
/**
|
|
@@ -1699,4 +1910,4 @@ interface SchedulerInfo {
|
|
|
1699
1910
|
};
|
|
1700
1911
|
}
|
|
1701
1912
|
//#endregion
|
|
1702
|
-
export {
|
|
1913
|
+
export { ResultColumn as A, Transport as C, AnalyticsComboModel as D, ResultLabels as E, AnalyticsGroupComparisonPoint as F, AnalyticsPeriodComparison as I, ResultFormatContext as M, AnalyticsAIExplanationTransport as N, AnalyticsVisualization$1 as O, AnalyticsExplanationInput as P, PublicChatActionField as S, WidgetStrings as T, DemoBooking as _, MessageAttachment as a, GifResult as b, Visitor as c, WidgetHandle as d, WidgetThemeTokens as f, AnalyticsVisualization as g, AnalyticsModelOption as h, FeaturedLink as i, ResultTableClassNames as j, AnalyticsVisualizationColumn$1 as k, WidgetActionTranslation as l, ActionResult as m, ChatArtifact as n, SchedulerInfo as o, WidgetUser as p, ChatMessage as r, Source as s, BootstrapInfo as t, WidgetConfig as u, DemoSlotsResult as v, StringsProvider as w, PublicChatAction as x, ExplanationFeedbackInput as y };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@accurix/centrinfo-widget",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.3.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"typescript": "^5.8.0",
|
|
54
54
|
"vite": "^7.0.0",
|
|
55
55
|
"vitest": "^3.2.0",
|
|
56
|
-
"wrangler": "^4.
|
|
56
|
+
"wrangler": "^4.148.0",
|
|
57
57
|
"@accurix/centrinfo-results": "^0.1.0",
|
|
58
58
|
"@accurix/centrinfo-voice": "^0.1.0",
|
|
59
59
|
"@accurix/web-config-eslint": "^0.0.0"
|