@uipath/du-utils 1.0.0-rc.2 → 1.0.0-rc.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +40 -0
- package/README.md +4 -2
- package/package.json +1 -1
- package/src/lib/load-web-component.d.ts +8 -1
- package/src/lib/load-web-component.js +9 -1
- package/src/lib/load-web-component.js.map +1 -1
- package/src/lib/shared/classification-station-wc.d.ts +3 -2
- package/src/lib/shared/processed-document.d.ts +10 -3
- package/src/lib/shared/processed-document.js.map +1 -1
- package/src/lib/shared/types.d.ts +9 -0
- package/src/lib/shared/validation-station-wc.d.ts +52 -6
- package/src/lib/shared/validation-station-wc.js.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,46 @@ All notable consumer-facing changes to `@uipath/du-utils` are documented in this
|
|
|
4
4
|
follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and the package follows
|
|
5
5
|
[Semantic Versioning](https://semver.org/).
|
|
6
6
|
|
|
7
|
+
## [Unreleased]
|
|
8
|
+
|
|
9
|
+
## [1.0.0-rc.4] - 2026-11-17
|
|
10
|
+
|
|
11
|
+
Fourth release candidate for `1.0.0`. The existing loader functions and their options are
|
|
12
|
+
unchanged, and every addition is optional, so code written against `1.0.0-rc.3` compiles
|
|
13
|
+
unchanged. The types now match `@uipath/du-validation-station-wc` `1.0.0-rc.6`.
|
|
14
|
+
|
|
15
|
+
> 🚀 This is a **release candidate**. Please report any issues before the stable release.
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
|
|
19
|
+
- `loadDocumentViewerWebComponent` and `documentViewerAppName`, for the document viewer web component
|
|
20
|
+
(`@uipath/du-document-viewer-wc`).
|
|
21
|
+
- New `IValidationStationOptions` members, matching `@uipath/du-validation-station-wc`:
|
|
22
|
+
`intendedUse` (typed `ValidationStationIntendedUse`), `hideDiscardButton` and
|
|
23
|
+
`emptyTaxonomyMessage`.
|
|
24
|
+
- `DocumentViewerOptions.hideReferencedFieldsPopover` and
|
|
25
|
+
`DocumentViewerFloatingButtonsOptions.showDownloadButton`, matching
|
|
26
|
+
`@uipath/du-validation-station-wc`.
|
|
27
|
+
- `WcTheme`, the theme id the web components accept, which adds the Apollo Modern themes
|
|
28
|
+
`future-light` and `future-dark`. The `theme` input of the Validation Station and Classification
|
|
29
|
+
Station element types uses it.
|
|
30
|
+
- `ProcessedDocumentMetadata.hitl` (typed `ProcessedDocumentHitl`), the human-in-the-loop state a
|
|
31
|
+
review records: `draft` is `true` for a draft save and `false` once the reviewer submitted.
|
|
32
|
+
|
|
33
|
+
## [1.0.0-rc.3] - 2026-10-01
|
|
34
|
+
|
|
35
|
+
Third release candidate for `1.0.0`. The loader functions and their options are unchanged. One
|
|
36
|
+
event payload changed: read **Changed** before upgrading.
|
|
37
|
+
|
|
38
|
+
> 🚀 This is a **release candidate**. Please report any issues before the stable release.
|
|
39
|
+
|
|
40
|
+
### Changed
|
|
41
|
+
|
|
42
|
+
- **Breaking:** the `actionCenterTaskCompleteWithResult` detail is now
|
|
43
|
+
`{ taskId, processedDocument }` instead of `{ taskId, validatedExtractionResult }`. Complete the
|
|
44
|
+
task with `processedDocument` as its `data`, verbatim. Its shape belongs to the node downstream,
|
|
45
|
+
so pass it through without inspecting it.
|
|
46
|
+
|
|
7
47
|
## [1.0.0-rc.2] - 2026-09-28
|
|
8
48
|
|
|
9
49
|
Second release candidate for `1.0.0`. The loader functions and their options are unchanged. The
|
package/README.md
CHANGED
|
@@ -10,8 +10,10 @@ framework.
|
|
|
10
10
|
|
|
11
11
|
## What's in the box
|
|
12
12
|
|
|
13
|
-
- **`loadValidationStationWebComponent` / `loadClassificationStationWebComponent
|
|
14
|
-
component's assets from a deployment URL and
|
|
13
|
+
- **`loadValidationStationWebComponent` / `loadClassificationStationWebComponent` /
|
|
14
|
+
`loadDocumentViewerWebComponent`** — load a web component's assets from a deployment URL and
|
|
15
|
+
register its custom element. The document viewer's types ship with its own package,
|
|
16
|
+
`@uipath/du-document-viewer-wc`.
|
|
15
17
|
- **TypeScript contracts** for the registered custom elements — element interfaces, event maps, and
|
|
16
18
|
ambient `HTMLElementTagNameMap` / JSX augmentations so `querySelector`, `viewChild`, and JSX all
|
|
17
19
|
return the right types.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/du-utils",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.4",
|
|
4
4
|
"description": "Framework-agnostic loaders and TypeScript contracts for embedding the UiPath Document Understanding web components (Validation Station and Classification Station).",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"uipath",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Options accepted by the public web-component loaders (Validation Station and
|
|
1
|
+
/** Options accepted by the public web-component loaders (Validation Station, Classification Station and the document viewer). */
|
|
2
2
|
export interface LoadWebComponentOptions {
|
|
3
3
|
/**
|
|
4
4
|
* When true, inject a light-DOM `<link rel="stylesheet">` to the WC's `fonts.css` so the
|
|
@@ -16,6 +16,7 @@ export interface LoadWebComponentOptions {
|
|
|
16
16
|
export type ResolveBaseUrl = () => string | Promise<string>;
|
|
17
17
|
export declare const csAppName = "du-cs-wc";
|
|
18
18
|
export declare const vsAppName = "du-vs-wc";
|
|
19
|
+
export declare const documentViewerAppName = "du-dv-wc";
|
|
19
20
|
/**
|
|
20
21
|
* Load the Classification Station web component from a deployment URL (path-loading variant).
|
|
21
22
|
* @param webComponentDeploymentUrl Base URL the WC assets (`polyfills.js`, `main.js`, `styles.css`,
|
|
@@ -28,6 +29,12 @@ export declare const loadClassificationStationWebComponent: (document: Document,
|
|
|
28
29
|
* `fonts.css`) are served from.
|
|
29
30
|
*/
|
|
30
31
|
export declare const loadValidationStationWebComponent: (document: Document, webComponentDeploymentUrl: string, options?: LoadWebComponentOptions) => Promise<void>;
|
|
32
|
+
/**
|
|
33
|
+
* Load the document viewer web component from a deployment URL (path-loading variant).
|
|
34
|
+
* @param webComponentDeploymentUrl Base URL the WC assets (`polyfills.js`, `main.js`, `styles.css`,
|
|
35
|
+
* `fonts.css`) are served from.
|
|
36
|
+
*/
|
|
37
|
+
export declare const loadDocumentViewerWebComponent: (document: Document, webComponentDeploymentUrl: string, options?: LoadWebComponentOptions) => Promise<void>;
|
|
31
38
|
/**
|
|
32
39
|
* Core loader: resolves the base URL, loads the WC scripts once (cached per app on `window`), and
|
|
33
40
|
* injects the id-deduped style-asset `<link>`s. The base URL can be a ready string or a (possibly
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.loadWebComponent = exports.loadValidationStationWebComponent = exports.loadClassificationStationWebComponent = exports.vsAppName = exports.csAppName = void 0;
|
|
3
|
+
exports.loadWebComponent = exports.loadDocumentViewerWebComponent = exports.loadValidationStationWebComponent = exports.loadClassificationStationWebComponent = exports.documentViewerAppName = exports.vsAppName = exports.csAppName = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const url_util_1 = require("./url.util");
|
|
6
6
|
const themeStylesheetFile = 'styles.css';
|
|
@@ -11,6 +11,7 @@ const getWindowCache = () => window;
|
|
|
11
11
|
const resolvedBaseByApp = new Map();
|
|
12
12
|
exports.csAppName = 'du-cs-wc';
|
|
13
13
|
exports.vsAppName = 'du-vs-wc';
|
|
14
|
+
exports.documentViewerAppName = 'du-dv-wc';
|
|
14
15
|
/**
|
|
15
16
|
* Load the Classification Station web component from a deployment URL (path-loading variant).
|
|
16
17
|
* @param webComponentDeploymentUrl Base URL the WC assets (`polyfills.js`, `main.js`, `styles.css`,
|
|
@@ -25,6 +26,13 @@ exports.loadClassificationStationWebComponent = loadClassificationStationWebComp
|
|
|
25
26
|
*/
|
|
26
27
|
const loadValidationStationWebComponent = (document, webComponentDeploymentUrl, options) => (0, exports.loadWebComponent)(exports.vsAppName, document, webComponentDeploymentUrl, options);
|
|
27
28
|
exports.loadValidationStationWebComponent = loadValidationStationWebComponent;
|
|
29
|
+
/**
|
|
30
|
+
* Load the document viewer web component from a deployment URL (path-loading variant).
|
|
31
|
+
* @param webComponentDeploymentUrl Base URL the WC assets (`polyfills.js`, `main.js`, `styles.css`,
|
|
32
|
+
* `fonts.css`) are served from.
|
|
33
|
+
*/
|
|
34
|
+
const loadDocumentViewerWebComponent = (document, webComponentDeploymentUrl, options) => (0, exports.loadWebComponent)(exports.documentViewerAppName, document, webComponentDeploymentUrl, options);
|
|
35
|
+
exports.loadDocumentViewerWebComponent = loadDocumentViewerWebComponent;
|
|
28
36
|
const buildStyleAssets = (options) => ({
|
|
29
37
|
// Cache-warm the theme so the shadow-root theme adopt is instant.
|
|
30
38
|
preload: [themeStylesheetFile],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load-web-component.js","sourceRoot":"","sources":["../../../../../../../../libs/du/shared/util/du-utils/src/lib/load-web-component.ts"],"names":[],"mappings":";;;;AAAA,yCAAkD;AAiClD,MAAM,mBAAmB,GAAG,YAAY,CAAC;AACzC,MAAM,mBAAmB,GAAG,WAAW,CAAC;AAExC,MAAM,cAAc,GAAG,GAAG,EAAE,CAAC,MAAwC,CAAC;AAEtE,8FAA8F;AAC9F,uFAAuF;AACvF,MAAM,iBAAiB,GAAG,IAAI,GAAG,EAAkB,CAAC;AAEvC,QAAA,SAAS,GAAG,UAAU,CAAC;AACvB,QAAA,SAAS,GAAG,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"load-web-component.js","sourceRoot":"","sources":["../../../../../../../../libs/du/shared/util/du-utils/src/lib/load-web-component.ts"],"names":[],"mappings":";;;;AAAA,yCAAkD;AAiClD,MAAM,mBAAmB,GAAG,YAAY,CAAC;AACzC,MAAM,mBAAmB,GAAG,WAAW,CAAC;AAExC,MAAM,cAAc,GAAG,GAAG,EAAE,CAAC,MAAwC,CAAC;AAEtE,8FAA8F;AAC9F,uFAAuF;AACvF,MAAM,iBA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iBAAiB,GAAG,QAAQ,GAAG,YAAY,CAAC;IAClD,IAAI,SAAS,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,iBAAiB,CAAC,EAAE,CAAC;QAC3D,MAAM,eAAe,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;QACzD,eAAe,CAAC,EAAE,GAAG,iBAAiB,CAAC;QACvC,eAAe,CAAC,IAAI,GAAG,QAAQ,CAAC;QAChC,eAAe,CAAC,GAAG,GAAG,SAAS,CAAC;QAEhC,eAAe,CAAC,gBAAgB,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,cAAc,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;QACjF,eAAe,CAAC,gBAAgB,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,oCAAoC,SAAS,EAAE,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;QAEpI,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC;IAC/C,CAAC;SAAM,CAAC;QACJ,cAAc,EAAE,CAAC;IACrB,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,MAAM,WAAW,GAAG,CAAC,OAAe,EAAoB,EAAE,CAAC,CAAC;IACxD,SAAS,EAAE,GAAG,OAAO,eAAe;IACpC,IAAI,EAAE,GAAG,OAAO,UAAU;CAC7B,CAAC,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { WcTheme } from './types';
|
|
1
2
|
export interface CsContentValidationData {
|
|
2
3
|
BucketName: string;
|
|
3
4
|
BucketId: number;
|
|
@@ -75,7 +76,7 @@ export interface IClassificationStationWcElement extends HTMLElement {
|
|
|
75
76
|
/** Action Center task ID associated with the document. */
|
|
76
77
|
actionCenterTaskId: number | null;
|
|
77
78
|
/** Visual theme applied to the component. @default 'light' */
|
|
78
|
-
theme:
|
|
79
|
+
theme: WcTheme;
|
|
79
80
|
/** BCP-47 language code for the UI. @default 'en' */
|
|
80
81
|
language: string;
|
|
81
82
|
/** When true, the component renders in read-only mode. @default false */
|
|
@@ -127,7 +128,7 @@ export interface IClassificationStationWcElement extends HTMLElement {
|
|
|
127
128
|
* passed directly without a ref.
|
|
128
129
|
*/
|
|
129
130
|
export interface IClassificationStationWcJsxProps {
|
|
130
|
-
theme?:
|
|
131
|
+
theme?: WcTheme;
|
|
131
132
|
language?: string;
|
|
132
133
|
/** JS property form. */
|
|
133
134
|
authToken?: string;
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
*/
|
|
10
10
|
export interface ProcessedDocumentMetadata {
|
|
11
11
|
/**
|
|
12
|
-
* GUID of the IDP pipeline run that produced this output.
|
|
13
|
-
*
|
|
14
|
-
*
|
|
12
|
+
* GUID of the IDP pipeline run that produced this output. It ties the output back to the
|
|
13
|
+
* Processor run surface, and selects this run's spans within the trace, which a flow run shares
|
|
14
|
+
* across every IDP node it executes. It does not reach the trace itself (that is {@link traceId}).
|
|
15
15
|
*/
|
|
16
16
|
pipelineRunId: string;
|
|
17
17
|
/**
|
|
@@ -31,6 +31,13 @@ export interface ProcessedDocumentMetadata {
|
|
|
31
31
|
* travels here, binding needs no trace lookup.
|
|
32
32
|
*/
|
|
33
33
|
spanId: string;
|
|
34
|
+
/** Human-in-the-loop state. Absent on a producer's output, which no reviewer has seen. */
|
|
35
|
+
hitl?: ProcessedDocumentHitl;
|
|
36
|
+
}
|
|
37
|
+
/** The state a human-in-the-loop review records on a {@link ProcessedDocument}. */
|
|
38
|
+
export interface ProcessedDocumentHitl {
|
|
39
|
+
/** `true` for a draft save, `false` once the reviewer submitted. */
|
|
40
|
+
draft: boolean;
|
|
34
41
|
}
|
|
35
42
|
/**
|
|
36
43
|
* Which processor produced the {@link ProcessedDocument}, and therefore how to interpret its
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"processed-document.js","sourceRoot":"","sources":["../../../../../../../../../libs/du/shared/util/du-utils/src/lib/shared/processed-document.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"processed-document.js","sourceRoot":"","sources":["../../../../../../../../../libs/du/shared/util/du-utils/src/lib/shared/processed-document.ts"],"names":[],"mappings":";;;AAiGA;;;;;;;;;;;;;;;;;;GAkBG;AACI,MAAM,mBAAmB,GAAG,CAAC,OAAgB,EAAgC,EAAE,CAClF,CAAC,CAAC,OAAO;OACN,OAAO,OAAO,KAAK,QAAQ;OAC3B,QAAQ,IAAI,OAAO;OACnB,UAAU,IAAI,OAAO;OACrB,UAAU,IAAI,OAAO,CAAC;AALhB,QAAA,mBAAmB,uBAKH"}
|
|
@@ -9,3 +9,12 @@ export declare enum WcHost {
|
|
|
9
9
|
ActionCenter = "action-center",
|
|
10
10
|
Standalone = "standalone"
|
|
11
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* Theme id accepted by the `theme` input of the DU web components. `future-light` and
|
|
14
|
+
* `future-dark` are the Apollo Modern themes.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* const element = document.querySelector('ui-du-validation-station-wc-element') as IValidationStationWcElement;
|
|
18
|
+
* element.theme = 'future-dark';
|
|
19
|
+
*/
|
|
20
|
+
export type WcTheme = 'light' | 'dark' | 'light-hc' | 'dark-hc' | 'future-light' | 'future-dark';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ContentValidationData, Criticality, DocumentTaxonomy, ExtractionResult, LogicalOperator, ResultsDataPoint, ResultsValue } from '@uipath/uipath-typescript/document-understanding';
|
|
2
2
|
import type { ProcessedDocument } from './processed-document';
|
|
3
|
+
import type { WcTheme } from './types';
|
|
3
4
|
export type { ContentValidationData };
|
|
4
5
|
/**
|
|
5
6
|
* The details of the selected field and value.
|
|
@@ -78,13 +79,45 @@ export interface FieldFilterOptions {
|
|
|
78
79
|
/** Hides the `With no flagged issues` entry of the `Hide fields` menu. */
|
|
79
80
|
hideNoFlaggedIssues?: boolean;
|
|
80
81
|
}
|
|
82
|
+
/**
|
|
83
|
+
* What a host uses the station for. See {@link IValidationStationOptions.intendedUse}.
|
|
84
|
+
*/
|
|
85
|
+
export type ValidationStationIntendedUse = 'extraction-validation' | 'document-annotation';
|
|
81
86
|
export interface IValidationStationOptions {
|
|
87
|
+
/**
|
|
88
|
+
* What the host uses the station for: `'extraction-validation'` when a reviewer checks
|
|
89
|
+
* extracted data before automation acts on it, `'document-annotation'` when an annotator
|
|
90
|
+
* produces the reference data a model learns from.
|
|
91
|
+
*
|
|
92
|
+
* Tunes the wording and the in-feature actions of features that are already on. It never
|
|
93
|
+
* turns a feature on or off; the other options and the customization flags do that.
|
|
94
|
+
* Unknown values behave as the default.
|
|
95
|
+
*
|
|
96
|
+
* @default 'extraction-validation'
|
|
97
|
+
* @example
|
|
98
|
+
* options = { intendedUse: 'document-annotation' };
|
|
99
|
+
*/
|
|
100
|
+
intendedUse?: ValidationStationIntendedUse;
|
|
82
101
|
hideSubmitButton?: boolean;
|
|
102
|
+
/**
|
|
103
|
+
* Hides the Discard button in the fields panel footer and turns off its keyboard shortcut.
|
|
104
|
+
* A host that triggers discard itself is unaffected.
|
|
105
|
+
*/
|
|
106
|
+
hideDiscardButton?: boolean;
|
|
83
107
|
hideReportAsExceptionButton?: boolean;
|
|
84
108
|
/** Hides the document type field. Defaults to `true` for a Flow input, `false` otherwise. */
|
|
85
109
|
hideDocumentTypeField?: boolean;
|
|
86
110
|
hideFields?: boolean;
|
|
87
111
|
hideBusinessRules?: boolean;
|
|
112
|
+
/**
|
|
113
|
+
* In compact mode, message shown under the "No taxonomy defined" title when the selected document type has no fields.
|
|
114
|
+
* Rendered verbatim — pass text already localized for the user. When unset or empty, a default about
|
|
115
|
+
* there being no fields to validate is shown.
|
|
116
|
+
*
|
|
117
|
+
* @example
|
|
118
|
+
* options = { emptyTaxonomyMessage: 'To generate predictions, the taxonomy must have field groups and fields defined.' };
|
|
119
|
+
*/
|
|
120
|
+
emptyTaxonomyMessage?: string;
|
|
88
121
|
fieldsSectionPosition?: 'left' | 'right';
|
|
89
122
|
/**
|
|
90
123
|
* Trims or removes the compact fields form's field-filter toolbar.
|
|
@@ -148,6 +181,11 @@ export interface DocumentViewerOptions {
|
|
|
148
181
|
* interaction-type button, since it only switches between selection modes.
|
|
149
182
|
*/
|
|
150
183
|
disableSelection?: boolean;
|
|
184
|
+
/**
|
|
185
|
+
* Set to true to hide the popover listing the fields that reference a word
|
|
186
|
+
* in the document. Selecting words is unaffected.
|
|
187
|
+
*/
|
|
188
|
+
hideReferencedFieldsPopover?: boolean;
|
|
151
189
|
}
|
|
152
190
|
export interface DocumentViewerFloatingButtonsOptions {
|
|
153
191
|
hideTextView?: boolean;
|
|
@@ -166,6 +204,12 @@ export interface DocumentViewerFloatingButtonsOptions {
|
|
|
166
204
|
* `DisableLanguageSelection` customization, which leaves it visible but disabled.
|
|
167
205
|
*/
|
|
168
206
|
hideLanguageSelect?: boolean;
|
|
207
|
+
/**
|
|
208
|
+
* Shows a "Download document" entry in the viewer's burger menu, which saves the file the
|
|
209
|
+
* viewer was given. Off by default; the entry also stays hidden while there is no such file,
|
|
210
|
+
* e.g. for a text-only document.
|
|
211
|
+
*/
|
|
212
|
+
showDownloadButton?: boolean;
|
|
169
213
|
}
|
|
170
214
|
export declare enum InteractionType {
|
|
171
215
|
Tokens = "Tokens",
|
|
@@ -382,16 +426,18 @@ export interface IValidationStationWcEventMap extends IVsWcSharedEventMap {
|
|
|
382
426
|
* Fires alongside `actionCenterTaskComplete` when the document came from a `processedDocument`,
|
|
383
427
|
* carrying the reviewer's result as well as the task id.
|
|
384
428
|
*
|
|
385
|
-
* Complete the task with
|
|
386
|
-
* task's data as its output, so a completion without it produces nothing.
|
|
387
|
-
*
|
|
429
|
+
* Complete the task with `processedDocument` as its `data`, verbatim: a downstream node reads
|
|
430
|
+
* the completed task's data as its output, so a completion without it produces nothing. Its
|
|
431
|
+
* shape belongs to the node downstream, not to this contract, so pass it through without
|
|
432
|
+
* inspecting it — today it is the `processedDocument` the station was given, with its `result`
|
|
433
|
+
* replaced by the reviewer's.
|
|
388
434
|
*
|
|
389
435
|
* A classic `contentValidationData` document fires only `actionCenterTaskComplete`, since it
|
|
390
436
|
* persists its own result and the task needs no data.
|
|
391
437
|
*/
|
|
392
438
|
actionCenterTaskCompleteWithResult: {
|
|
393
439
|
taskId: number;
|
|
394
|
-
|
|
440
|
+
processedDocument: unknown;
|
|
395
441
|
};
|
|
396
442
|
/** Fires when the Action Center task has been reported as exception. Detail is the task ID. */
|
|
397
443
|
actionCenterTaskReportAsException: number;
|
|
@@ -414,7 +460,7 @@ export interface IValidationStationWcEventMap extends IVsWcSharedEventMap {
|
|
|
414
460
|
*/
|
|
415
461
|
export interface IVsWcBaseElement<TEventMap> extends HTMLElement {
|
|
416
462
|
/** Visual theme applied to the component. @default 'light' */
|
|
417
|
-
theme:
|
|
463
|
+
theme: WcTheme;
|
|
418
464
|
/** BCP-47 language code for the UI. @default 'en' */
|
|
419
465
|
language: string;
|
|
420
466
|
/** When true, the component renders in read-only mode. @default false */
|
|
@@ -523,7 +569,7 @@ export interface IPersistentValidationStationWcElement extends IValidationStatio
|
|
|
523
569
|
* Covers configuration inputs, command inputs, and common HTML attributes.
|
|
524
570
|
*/
|
|
525
571
|
export interface IVsWcSharedJsxProps {
|
|
526
|
-
theme?:
|
|
572
|
+
theme?: WcTheme;
|
|
527
573
|
language?: string;
|
|
528
574
|
/** JS property form. */
|
|
529
575
|
isReadonly?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation-station-wc.js","sourceRoot":"","sources":["../../../../../../../../../libs/du/shared/util/du-utils/src/lib/shared/validation-station-wc.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"validation-station-wc.js","sourceRoot":"","sources":["../../../../../../../../../libs/du/shared/util/du-utils/src/lib/shared/validation-station-wc.ts"],"names":[],"mappings":";;;AAyQA,IAAY,eAKX;AALD,WAAY,eAAe;IACvB,oCAAiB,CAAA;IACjB,gCAAa,CAAA;IACb,4CAAyB,CAAA;IACzB,gCAAa,CAAA;AACjB,CAAC,EALW,eAAe,+BAAf,eAAe,QAK1B"}
|