@accurix/centrinfo-widget 5.1.1 → 5.1.2
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/dist/cdn/centrinfo-widget.js +17 -17
- package/dist/cdn/manifest.json +6 -6
- 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 +1 -1
- package/dist/runtime.d.cts +5 -4
- package/dist/runtime.d.mts +1 -1
- package/dist/runtime.mjs +1 -1
- package/dist/styles-CwxqspIz.cjs +3516 -0
- package/dist/styles-yhqxR2ty.mjs +3516 -0
- package/dist/{types-k3nQBQjf.d.mts → types-3zpBBhPI.d.mts} +63 -6
- package/dist/{types-D0VIOagk.d.cts → types-BuoTcoZu.d.cts} +58 -2
- package/package.json +2 -2
- package/dist/styles-CvzR5bT8.cjs +0 -3516
- package/dist/styles-mW_qo6Ed.mjs +0 -3516
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as preact1 from "preact";
|
|
2
2
|
import { JSX } from "preact";
|
|
3
3
|
|
|
4
4
|
//#region ../centrinfo-results/src/analytics-chart-catalog.d.ts
|
|
@@ -83,6 +83,8 @@ interface AnalyticsExplanationFreshnessInput {
|
|
|
83
83
|
}
|
|
84
84
|
/** Structural explanation shape every surface's DTO satisfies. */
|
|
85
85
|
interface AnalyticsExplanationInput {
|
|
86
|
+
/** Set only when the backend verified every requested fact. */
|
|
87
|
+
answerComplete?: boolean;
|
|
86
88
|
explanationId?: string;
|
|
87
89
|
conversationalPreface?: string;
|
|
88
90
|
headline?: string;
|
|
@@ -113,6 +115,7 @@ interface AnalyticsExplanationInput {
|
|
|
113
115
|
action: string;
|
|
114
116
|
why: string;
|
|
115
117
|
successMetric?: string;
|
|
118
|
+
segment?: string;
|
|
116
119
|
evidenceIds?: string[];
|
|
117
120
|
}>;
|
|
118
121
|
forecast?: {
|
|
@@ -128,24 +131,63 @@ interface AnalyticsExplanationInput {
|
|
|
128
131
|
level?: 'basic' | 'detailed' | string;
|
|
129
132
|
/** The detailed AI explanation that loads separately (poll by explanationId). */
|
|
130
133
|
aiExplanation?: AnalyticsAIExplanationInput | null;
|
|
134
|
+
/** Ranked measured drivers (association, never proof of cause). */
|
|
135
|
+
drivers?: Array<{
|
|
136
|
+
text: string;
|
|
137
|
+
basis?: string;
|
|
138
|
+
evidenceIds?: string[];
|
|
139
|
+
}>;
|
|
140
|
+
/** Cited unusual values. */
|
|
141
|
+
anomalies?: Array<{
|
|
142
|
+
text: string;
|
|
143
|
+
evidenceIds?: string[];
|
|
144
|
+
}>;
|
|
145
|
+
/** General business guidance, NOT from the customer's data (label "guidance"). */
|
|
146
|
+
frameworks?: Array<{
|
|
147
|
+
name: string;
|
|
148
|
+
label?: string;
|
|
149
|
+
guidance: string;
|
|
150
|
+
fieldMapping?: Array<{
|
|
151
|
+
concept: string;
|
|
152
|
+
field?: string;
|
|
153
|
+
status: string;
|
|
154
|
+
}>;
|
|
155
|
+
evidenceIds?: string[];
|
|
156
|
+
}>;
|
|
157
|
+
/** Business concepts the answer needed that the data does not hold. */
|
|
158
|
+
dataGaps?: Array<{
|
|
159
|
+
concept: string;
|
|
160
|
+
text: string;
|
|
161
|
+
}>;
|
|
162
|
+
/** Governed facts the AI wording did not cover, added beside it. */
|
|
163
|
+
supplementaryFindings?: string[];
|
|
131
164
|
}
|
|
132
|
-
/**
|
|
165
|
+
/**
|
|
166
|
+
* State of the detailed AI explanation, as returned by every surface. The
|
|
167
|
+
* backend may also send "governed" (the checked governed explanation is
|
|
168
|
+
* final); it is read as `not_requested` — not a failure.
|
|
169
|
+
*/
|
|
133
170
|
type AnalyticsAIExplanationStatus = 'pending' | 'ready' | 'failed' | 'not_requested';
|
|
134
171
|
interface AnalyticsAIExplanationInput {
|
|
135
172
|
status: AnalyticsAIExplanationStatus | string;
|
|
136
173
|
explanationId?: string;
|
|
137
174
|
retryAvailable?: boolean;
|
|
175
|
+
/** Pending only: when the backend job's budget ends (ISO time). */
|
|
176
|
+
deadlineAt?: string;
|
|
177
|
+
/** Pending only: seconds left in the job's budget at response time (clock-skew safe). */
|
|
178
|
+
waitSeconds?: number;
|
|
138
179
|
}
|
|
139
180
|
declare const ANALYTICS_EXPLANATION_COPY: {
|
|
140
181
|
readonly eyebrow: "Answer from your data";
|
|
141
182
|
readonly provenanceAI: "AI-assisted · evidence checked";
|
|
183
|
+
readonly provenanceCalculated: "Calculated results";
|
|
142
184
|
readonly provenanceGoverned: "Based on current values";
|
|
143
185
|
readonly comparison: "Comparison";
|
|
144
186
|
readonly conclusions: "What we can conclude";
|
|
145
187
|
readonly whyItMatters: "Why it matters";
|
|
146
188
|
readonly limits: "Important limits";
|
|
147
189
|
readonly investigate: "Investigate further";
|
|
148
|
-
readonly evidenceList: "
|
|
190
|
+
readonly evidenceList: "Supporting evidence";
|
|
149
191
|
readonly causes: "Possible causes";
|
|
150
192
|
readonly causesHint: "Not proven causes";
|
|
151
193
|
readonly howToCheck: "How to check:";
|
|
@@ -154,6 +196,7 @@ declare const ANALYTICS_EXPLANATION_COPY: {
|
|
|
154
196
|
readonly outlook: "Outlook";
|
|
155
197
|
readonly followUps: "Ask a follow-up";
|
|
156
198
|
readonly sourceNoteAI: "AI-assisted wording, checked against the live values shown here.";
|
|
199
|
+
readonly sourceNoteCalculated: "AI-assisted wording based on calculated results.";
|
|
157
200
|
readonly sourceNoteGoverned: "Based only on the live values shown here.";
|
|
158
201
|
readonly evidence: "Evidence";
|
|
159
202
|
readonly evidenceMetric: "Metric";
|
|
@@ -181,10 +224,19 @@ declare const ANALYTICS_EXPLANATION_COPY: {
|
|
|
181
224
|
readonly notComparable: "Not comparable yet";
|
|
182
225
|
readonly basicExplanation: "Basic explanation";
|
|
183
226
|
readonly preparingDetailed: "Preparing a detailed explanation…";
|
|
227
|
+
readonly stillWorkingDetailed: "Still working on the detailed explanation…";
|
|
184
228
|
readonly detailedReady: "Detailed explanation ready.";
|
|
185
229
|
readonly detailedUnavailable: "A detailed explanation is not available right now.";
|
|
186
230
|
readonly detailedRetry: "Try again";
|
|
187
231
|
readonly region: "Explanation";
|
|
232
|
+
readonly drivers: "What is driving it";
|
|
233
|
+
readonly driversHint: "Measured association, not proof of cause";
|
|
234
|
+
readonly anomalies: "Unusual values";
|
|
235
|
+
readonly supplementaryFindings: "Also in the data";
|
|
236
|
+
readonly frameworks: "General guidance, not from your data";
|
|
237
|
+
readonly dataGaps: "Missing data";
|
|
238
|
+
readonly segment: "Segment:";
|
|
239
|
+
readonly tasks: "Tasks";
|
|
188
240
|
readonly inProgress: "in progress";
|
|
189
241
|
readonly expand: "Expand explanation";
|
|
190
242
|
readonly collapse: "Collapse explanation";
|
|
@@ -264,6 +316,9 @@ interface AnalyticsAIExplanationJob<E extends AnalyticsExplanationInput> {
|
|
|
264
316
|
status: AnalyticsAIExplanationStatus | string;
|
|
265
317
|
explanationId?: string;
|
|
266
318
|
retryAvailable?: boolean;
|
|
319
|
+
/** Pending only: the job's deadline (ISO) and seconds left (see AnalyticsAIExplanationInput). */
|
|
320
|
+
deadlineAt?: string;
|
|
321
|
+
waitSeconds?: number;
|
|
267
322
|
explanation?: E | null;
|
|
268
323
|
/**
|
|
269
324
|
* The free basic explanation as updated by the background job (it gains the
|
|
@@ -479,6 +534,7 @@ interface ResultColumn {
|
|
|
479
534
|
currencyCode?: string;
|
|
480
535
|
formatPattern?: string;
|
|
481
536
|
grain?: ResultGrain;
|
|
537
|
+
semanticRole?: AnalyticsVisualizationColumn$1['semanticRole'];
|
|
482
538
|
}
|
|
483
539
|
interface ResultTableClassNames {
|
|
484
540
|
wrap?: string;
|
|
@@ -529,7 +585,7 @@ declare const WidgetAnalyticsChart: ({
|
|
|
529
585
|
expanded?: boolean;
|
|
530
586
|
/** Class prefix of the surface (`cf` widget, `ca` chat app). */
|
|
531
587
|
classPrefix?: string;
|
|
532
|
-
}) =>
|
|
588
|
+
}) => preact1.JSX.Element;
|
|
533
589
|
//#endregion
|
|
534
590
|
//#region ../centrinfo-results/src/result.d.ts
|
|
535
591
|
declare const formatResultCell: (value: unknown, locale?: string, column?: ResultColumn, context?: ResultFormatContext) => string;
|
|
@@ -556,7 +612,7 @@ declare const ResultTable: ({
|
|
|
556
612
|
expanded,
|
|
557
613
|
classNames,
|
|
558
614
|
emptyLabel
|
|
559
|
-
}: ResultTableProps) =>
|
|
615
|
+
}: ResultTableProps) => preact1.JSX.Element;
|
|
560
616
|
//#endregion
|
|
561
617
|
//#region ../centrinfo-results/src/result-details.d.ts
|
|
562
618
|
interface AnalyticsResultDetail {
|
|
@@ -779,7 +835,7 @@ interface WidgetStrings {
|
|
|
779
835
|
previewActionNote: string;
|
|
780
836
|
previewBanner: string;
|
|
781
837
|
}
|
|
782
|
-
declare const StringsProvider:
|
|
838
|
+
declare const StringsProvider: preact1.Provider<WidgetStrings>;
|
|
783
839
|
//#endregion
|
|
784
840
|
//#region src/api/types.d.ts
|
|
785
841
|
/** The result metadata that arrives with (or after) an answer. */
|
|
@@ -949,6 +1005,7 @@ interface AnalyticsValueProvenance {
|
|
|
949
1005
|
reason?: string;
|
|
950
1006
|
}
|
|
951
1007
|
interface AnalyticsVisualizationExplanation {
|
|
1008
|
+
answerComplete?: boolean;
|
|
952
1009
|
/** Stable opaque id; used only for "Was this helpful?" feedback. */
|
|
953
1010
|
explanationId?: string;
|
|
954
1011
|
conversationalPreface?: string;
|
|
@@ -80,6 +80,8 @@ interface AnalyticsExplanationFreshnessInput {
|
|
|
80
80
|
}
|
|
81
81
|
/** Structural explanation shape every surface's DTO satisfies. */
|
|
82
82
|
interface AnalyticsExplanationInput {
|
|
83
|
+
/** Set only when the backend verified every requested fact. */
|
|
84
|
+
answerComplete?: boolean;
|
|
83
85
|
explanationId?: string;
|
|
84
86
|
conversationalPreface?: string;
|
|
85
87
|
headline?: string;
|
|
@@ -110,6 +112,7 @@ interface AnalyticsExplanationInput {
|
|
|
110
112
|
action: string;
|
|
111
113
|
why: string;
|
|
112
114
|
successMetric?: string;
|
|
115
|
+
segment?: string;
|
|
113
116
|
evidenceIds?: string[];
|
|
114
117
|
}>;
|
|
115
118
|
forecast?: {
|
|
@@ -125,24 +128,63 @@ interface AnalyticsExplanationInput {
|
|
|
125
128
|
level?: 'basic' | 'detailed' | string;
|
|
126
129
|
/** The detailed AI explanation that loads separately (poll by explanationId). */
|
|
127
130
|
aiExplanation?: AnalyticsAIExplanationInput | null;
|
|
131
|
+
/** Ranked measured drivers (association, never proof of cause). */
|
|
132
|
+
drivers?: Array<{
|
|
133
|
+
text: string;
|
|
134
|
+
basis?: string;
|
|
135
|
+
evidenceIds?: string[];
|
|
136
|
+
}>;
|
|
137
|
+
/** Cited unusual values. */
|
|
138
|
+
anomalies?: Array<{
|
|
139
|
+
text: string;
|
|
140
|
+
evidenceIds?: string[];
|
|
141
|
+
}>;
|
|
142
|
+
/** General business guidance, NOT from the customer's data (label "guidance"). */
|
|
143
|
+
frameworks?: Array<{
|
|
144
|
+
name: string;
|
|
145
|
+
label?: string;
|
|
146
|
+
guidance: string;
|
|
147
|
+
fieldMapping?: Array<{
|
|
148
|
+
concept: string;
|
|
149
|
+
field?: string;
|
|
150
|
+
status: string;
|
|
151
|
+
}>;
|
|
152
|
+
evidenceIds?: string[];
|
|
153
|
+
}>;
|
|
154
|
+
/** Business concepts the answer needed that the data does not hold. */
|
|
155
|
+
dataGaps?: Array<{
|
|
156
|
+
concept: string;
|
|
157
|
+
text: string;
|
|
158
|
+
}>;
|
|
159
|
+
/** Governed facts the AI wording did not cover, added beside it. */
|
|
160
|
+
supplementaryFindings?: string[];
|
|
128
161
|
}
|
|
129
|
-
/**
|
|
162
|
+
/**
|
|
163
|
+
* State of the detailed AI explanation, as returned by every surface. The
|
|
164
|
+
* backend may also send "governed" (the checked governed explanation is
|
|
165
|
+
* final); it is read as `not_requested` — not a failure.
|
|
166
|
+
*/
|
|
130
167
|
type AnalyticsAIExplanationStatus = 'pending' | 'ready' | 'failed' | 'not_requested';
|
|
131
168
|
interface AnalyticsAIExplanationInput {
|
|
132
169
|
status: AnalyticsAIExplanationStatus | string;
|
|
133
170
|
explanationId?: string;
|
|
134
171
|
retryAvailable?: boolean;
|
|
172
|
+
/** Pending only: when the backend job's budget ends (ISO time). */
|
|
173
|
+
deadlineAt?: string;
|
|
174
|
+
/** Pending only: seconds left in the job's budget at response time (clock-skew safe). */
|
|
175
|
+
waitSeconds?: number;
|
|
135
176
|
}
|
|
136
177
|
declare const ANALYTICS_EXPLANATION_COPY: {
|
|
137
178
|
readonly eyebrow: "Answer from your data";
|
|
138
179
|
readonly provenanceAI: "AI-assisted · evidence checked";
|
|
180
|
+
readonly provenanceCalculated: "Calculated results";
|
|
139
181
|
readonly provenanceGoverned: "Based on current values";
|
|
140
182
|
readonly comparison: "Comparison";
|
|
141
183
|
readonly conclusions: "What we can conclude";
|
|
142
184
|
readonly whyItMatters: "Why it matters";
|
|
143
185
|
readonly limits: "Important limits";
|
|
144
186
|
readonly investigate: "Investigate further";
|
|
145
|
-
readonly evidenceList: "
|
|
187
|
+
readonly evidenceList: "Supporting evidence";
|
|
146
188
|
readonly causes: "Possible causes";
|
|
147
189
|
readonly causesHint: "Not proven causes";
|
|
148
190
|
readonly howToCheck: "How to check:";
|
|
@@ -151,6 +193,7 @@ declare const ANALYTICS_EXPLANATION_COPY: {
|
|
|
151
193
|
readonly outlook: "Outlook";
|
|
152
194
|
readonly followUps: "Ask a follow-up";
|
|
153
195
|
readonly sourceNoteAI: "AI-assisted wording, checked against the live values shown here.";
|
|
196
|
+
readonly sourceNoteCalculated: "AI-assisted wording based on calculated results.";
|
|
154
197
|
readonly sourceNoteGoverned: "Based only on the live values shown here.";
|
|
155
198
|
readonly evidence: "Evidence";
|
|
156
199
|
readonly evidenceMetric: "Metric";
|
|
@@ -178,10 +221,19 @@ declare const ANALYTICS_EXPLANATION_COPY: {
|
|
|
178
221
|
readonly notComparable: "Not comparable yet";
|
|
179
222
|
readonly basicExplanation: "Basic explanation";
|
|
180
223
|
readonly preparingDetailed: "Preparing a detailed explanation…";
|
|
224
|
+
readonly stillWorkingDetailed: "Still working on the detailed explanation…";
|
|
181
225
|
readonly detailedReady: "Detailed explanation ready.";
|
|
182
226
|
readonly detailedUnavailable: "A detailed explanation is not available right now.";
|
|
183
227
|
readonly detailedRetry: "Try again";
|
|
184
228
|
readonly region: "Explanation";
|
|
229
|
+
readonly drivers: "What is driving it";
|
|
230
|
+
readonly driversHint: "Measured association, not proof of cause";
|
|
231
|
+
readonly anomalies: "Unusual values";
|
|
232
|
+
readonly supplementaryFindings: "Also in the data";
|
|
233
|
+
readonly frameworks: "General guidance, not from your data";
|
|
234
|
+
readonly dataGaps: "Missing data";
|
|
235
|
+
readonly segment: "Segment:";
|
|
236
|
+
readonly tasks: "Tasks";
|
|
185
237
|
readonly inProgress: "in progress";
|
|
186
238
|
readonly expand: "Expand explanation";
|
|
187
239
|
readonly collapse: "Collapse explanation";
|
|
@@ -261,6 +313,9 @@ interface AnalyticsAIExplanationJob<E extends AnalyticsExplanationInput> {
|
|
|
261
313
|
status: AnalyticsAIExplanationStatus | string;
|
|
262
314
|
explanationId?: string;
|
|
263
315
|
retryAvailable?: boolean;
|
|
316
|
+
/** Pending only: the job's deadline (ISO) and seconds left (see AnalyticsAIExplanationInput). */
|
|
317
|
+
deadlineAt?: string;
|
|
318
|
+
waitSeconds?: number;
|
|
264
319
|
explanation?: E | null;
|
|
265
320
|
/**
|
|
266
321
|
* The free basic explanation as updated by the background job (it gains the
|
|
@@ -741,6 +796,7 @@ interface AnalyticsValueProvenance {
|
|
|
741
796
|
reason?: string;
|
|
742
797
|
}
|
|
743
798
|
interface AnalyticsVisualizationExplanation {
|
|
799
|
+
answerComplete?: boolean;
|
|
744
800
|
/** Stable opaque id; used only for "Was this helpful?" feedback. */
|
|
745
801
|
explanationId?: string;
|
|
746
802
|
conversationalPreface?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@accurix/centrinfo-widget",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"preact": "^10.27.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@playwright/test": "^1.
|
|
47
|
+
"@playwright/test": "^1.61.0",
|
|
48
48
|
"@types/node": "^22.0.0",
|
|
49
49
|
"@vitest/coverage-v8": "^3.2.0",
|
|
50
50
|
"eslint": "^9.27.0",
|