@epistola.app/valtimo-plugin 0.9.4 → 0.10.0
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/epistola.app-valtimo-plugin.mjs +526 -194
- package/fesm2022/epistola.app-valtimo-plugin.mjs.map +1 -1
- package/lib/components/download-document-configuration/download-document-config.util.d.ts +15 -0
- package/lib/components/download-document-configuration/download-document-configuration.component.d.ts +10 -1
- package/lib/components/epistola-admin-page/epistola-admin-page.component.d.ts +21 -4
- package/lib/components/epistola-document/epistola-document.component.d.ts +11 -7
- package/lib/components/epistola-document-preview/epistola-document-preview.component.d.ts +19 -7
- package/lib/components/epistola-document-preview/preview-utils.d.ts +22 -0
- package/lib/components/epistola-retry-form/epistola-retry-form.component.d.ts +9 -7
- package/lib/components/formio-builder-utils.d.ts +14 -0
- package/lib/models/admin.d.ts +38 -0
- package/lib/models/config.d.ts +16 -1
- package/lib/services/epistola-admin.service.d.ts +11 -4
- package/lib/services/epistola-plugin.service.d.ts +9 -9
- package/lib/services/index.d.ts +1 -2
- package/lib/services/prefilled-task-id.d.ts +52 -0
- package/package.json +1 -1
- package/sbom.json +1 -1
- package/lib/services/epistola-task-context.interceptor.d.ts +0 -29
- package/lib/services/epistola-task-context.matcher.d.ts +0 -19
- package/lib/services/epistola-task-context.service.d.ts +0 -26
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { DownloadDocumentConfig } from '../../models';
|
|
2
|
+
/**
|
|
3
|
+
* Pure helpers for the download-document configurator, extracted so they can be unit-tested
|
|
4
|
+
* without the Angular component (mirrors the process-link-selector util pattern). See
|
|
5
|
+
* `docs/adr/0001-download-document-content-storage.md`.
|
|
6
|
+
*/
|
|
7
|
+
export type StorageTarget = 'TEMPORARY_RESOURCE' | 'PROCESS_VARIABLE';
|
|
8
|
+
export declare const DEFAULT_STORAGE_TARGET: StorageTarget;
|
|
9
|
+
/** Normalize a (possibly undefined) storageTarget to a concrete target, applying the default. */
|
|
10
|
+
export declare function resolveStorageTarget(target?: string): StorageTarget;
|
|
11
|
+
/**
|
|
12
|
+
* A config is valid when the input variable and the output variable that matches the chosen
|
|
13
|
+
* storage target are both set.
|
|
14
|
+
*/
|
|
15
|
+
export declare function isDownloadDocumentConfigValid(config: Partial<DownloadDocumentConfig> | null | undefined): boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
2
2
|
import { FunctionConfigurationComponent } from '@valtimo/plugin';
|
|
3
|
-
import { FormOutput } from '@valtimo/components';
|
|
3
|
+
import { FormOutput, SelectItem } from '@valtimo/components';
|
|
4
4
|
import { BehaviorSubject, Observable } from 'rxjs';
|
|
5
5
|
import { DownloadDocumentConfig } from '../../models';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
@@ -22,6 +22,15 @@ export declare class DownloadDocumentConfigurationComponent implements FunctionC
|
|
|
22
22
|
resolvedPrefill: Partial<DownloadDocumentConfig>;
|
|
23
23
|
readonly prefillResolved$: BehaviorSubject<boolean>;
|
|
24
24
|
safeDisabled$: Observable<boolean>;
|
|
25
|
+
/**
|
|
26
|
+
* Static option set for the storage target. Values match the backend
|
|
27
|
+
* {@code DocumentStorageTarget} enum constants; labels are explained further via the
|
|
28
|
+
* translated field title/tooltip.
|
|
29
|
+
*/
|
|
30
|
+
readonly storageTargetOptions: SelectItem[];
|
|
31
|
+
readonly defaultStorageTarget: import("./download-document-config.util").StorageTarget;
|
|
32
|
+
/** Drives which output-variable field is shown (resource id vs inline content). */
|
|
33
|
+
readonly selectedTarget$: BehaviorSubject<string>;
|
|
25
34
|
ngOnInit(): void;
|
|
26
35
|
ngOnDestroy(): void;
|
|
27
36
|
formValueChange(formOutput: FormOutput): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
2
|
import { ActivatedRoute, Router } from '@angular/router';
|
|
3
3
|
import { EpistolaAdminService } from '../../services/epistola-admin.service';
|
|
4
|
-
import { BpmnValidationViolation, ChangelogRelease, ClasspathCatalog, PendingJob, PluginUsageEntry } from '../../models';
|
|
4
|
+
import { BpmnValidationReport, BpmnValidationViolation, ChangelogRelease, ClasspathCatalog, FormCarrierIssue, PendingJob, PluginUsageEntry } from '../../models';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
/**
|
|
7
7
|
* Combined view model for a single plugin configuration card.
|
|
@@ -26,12 +26,12 @@ export declare class EpistolaAdminPageComponent implements OnInit {
|
|
|
26
26
|
cards: ConfigurationCard[];
|
|
27
27
|
selectedCard: ConfigurationCard | null;
|
|
28
28
|
activeTab: 'actions' | 'pending' | 'catalogs';
|
|
29
|
-
overviewTab: 'configurations' | 'validations' | 'changelog';
|
|
29
|
+
overviewTab: 'configurations' | 'validations' | 'changelog' | 'forms';
|
|
30
30
|
loading: boolean;
|
|
31
31
|
pluginVersion: string | null;
|
|
32
32
|
changelog: ChangelogRelease[] | null;
|
|
33
33
|
changelogLoading: boolean;
|
|
34
|
-
|
|
34
|
+
validationReport: BpmnValidationReport | null;
|
|
35
35
|
reconcilingExecutionIds: Set<string>;
|
|
36
36
|
reconcileFeedback: {
|
|
37
37
|
executionId: string;
|
|
@@ -46,6 +46,15 @@ export declare class EpistolaAdminPageComponent implements OnInit {
|
|
|
46
46
|
type: 'success' | 'error';
|
|
47
47
|
message: string;
|
|
48
48
|
} | null;
|
|
49
|
+
formIssues: FormCarrierIssue[] | null;
|
|
50
|
+
formIssuesLoading: boolean;
|
|
51
|
+
repairingFormIds: Set<string>;
|
|
52
|
+
repairingAll: boolean;
|
|
53
|
+
formFeedback: {
|
|
54
|
+
formId: string;
|
|
55
|
+
type: 'success' | 'error';
|
|
56
|
+
message: string;
|
|
57
|
+
} | null;
|
|
49
58
|
private connectionStatuses;
|
|
50
59
|
private usageEntries;
|
|
51
60
|
private pendingJobs;
|
|
@@ -54,11 +63,19 @@ export declare class EpistolaAdminPageComponent implements OnInit {
|
|
|
54
63
|
private pendingLoaded;
|
|
55
64
|
private deepLinkConfigId;
|
|
56
65
|
constructor(adminService: EpistolaAdminService, route: ActivatedRoute, router: Router);
|
|
66
|
+
/** Violations from the latest report (empty when healthy or not yet loaded). */
|
|
67
|
+
get validationViolations(): BpmnValidationViolation[];
|
|
68
|
+
/** Scan cadence in whole minutes, for the "refreshes every N min" note. */
|
|
69
|
+
get refreshIntervalMinutes(): number;
|
|
57
70
|
ngOnInit(): void;
|
|
58
71
|
selectConfiguration(card: ConfigurationCard): void;
|
|
59
72
|
backToOverview(): void;
|
|
60
73
|
setActiveTab(tab: 'actions' | 'pending' | 'catalogs'): void;
|
|
61
|
-
setOverviewTab(tab: 'configurations' | 'validations' | 'changelog'): void;
|
|
74
|
+
setOverviewTab(tab: 'configurations' | 'validations' | 'changelog' | 'forms'): void;
|
|
75
|
+
private loadFormIssues;
|
|
76
|
+
isRepairingForm(issue: FormCarrierIssue): boolean;
|
|
77
|
+
repairForm(issue: FormCarrierIssue): void;
|
|
78
|
+
repairAllForms(): void;
|
|
62
79
|
private loadChangelog;
|
|
63
80
|
refresh(): void;
|
|
64
81
|
exportProcessLink(entry: PluginUsageEntry): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ChangeDetectorRef, EventEmitter, OnDestroy,
|
|
1
|
+
import { ChangeDetectorRef, EventEmitter, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';
|
|
3
3
|
import { FormioCustomComponent, FormIoStateService } from '@valtimo/components';
|
|
4
|
-
import { EpistolaPluginService
|
|
4
|
+
import { EpistolaPluginService } from '../../services';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export type EpistolaDocumentDisplay = 'inline' | 'button' | 'both';
|
|
7
7
|
/**
|
|
@@ -20,11 +20,10 @@ export type EpistolaDocumentDisplay = 'inline' | 'button' | 'both';
|
|
|
20
20
|
* <p>For the dry-run / what-would-be-generated UX use
|
|
21
21
|
* {@code epistola-document-preview} instead.
|
|
22
22
|
*/
|
|
23
|
-
export declare class EpistolaDocumentComponent implements FormioCustomComponent<unknown>,
|
|
23
|
+
export declare class EpistolaDocumentComponent implements FormioCustomComponent<unknown>, OnChanges, OnDestroy {
|
|
24
24
|
private readonly epistolaPluginService;
|
|
25
25
|
private readonly sanitizer;
|
|
26
26
|
private readonly formIoStateService;
|
|
27
|
-
private readonly taskContext;
|
|
28
27
|
private readonly cdr;
|
|
29
28
|
value: unknown;
|
|
30
29
|
valueChange: EventEmitter<unknown>;
|
|
@@ -45,6 +44,11 @@ export declare class EpistolaDocumentComponent implements FormioCustomComponent<
|
|
|
45
44
|
tenantIdVariable: string;
|
|
46
45
|
/** Filename used for the download disposition. */
|
|
47
46
|
filename: string;
|
|
47
|
+
/**
|
|
48
|
+
* Task id forwarded by the Formio wrapper from the server-prefilled form
|
|
49
|
+
* ({@code epistola:taskId} value resolver), populated in every Valtimo task-open flow.
|
|
50
|
+
*/
|
|
51
|
+
taskInstanceId?: string | null;
|
|
48
52
|
loading: boolean;
|
|
49
53
|
downloading: boolean;
|
|
50
54
|
error: string | null;
|
|
@@ -52,8 +56,8 @@ export declare class EpistolaDocumentComponent implements FormioCustomComponent<
|
|
|
52
56
|
private currentBlobUrl;
|
|
53
57
|
private subscription?;
|
|
54
58
|
get designMode(): boolean;
|
|
55
|
-
constructor(epistolaPluginService: EpistolaPluginService, sanitizer: DomSanitizer, formIoStateService: FormIoStateService,
|
|
56
|
-
|
|
59
|
+
constructor(epistolaPluginService: EpistolaPluginService, sanitizer: DomSanitizer, formIoStateService: FormIoStateService, cdr: ChangeDetectorRef);
|
|
60
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
57
61
|
ngOnDestroy(): void;
|
|
58
62
|
refresh(): void;
|
|
59
63
|
download(): void;
|
|
@@ -61,5 +65,5 @@ export declare class EpistolaDocumentComponent implements FormioCustomComponent<
|
|
|
61
65
|
private buildRequest;
|
|
62
66
|
private revokeBlobUrl;
|
|
63
67
|
static ɵfac: i0.ɵɵFactoryDeclaration<EpistolaDocumentComponent, never>;
|
|
64
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<EpistolaDocumentComponent, "epistola-document-component", never, { "value": { "alias": "value"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "label": { "alias": "label"; "required": false; }; "display": { "alias": "display"; "required": false; }; "documentVariable": { "alias": "documentVariable"; "required": false; }; "tenantIdVariable": { "alias": "tenantIdVariable"; "required": false; }; "filename": { "alias": "filename"; "required": false; }; }, { "valueChange": "valueChange"; }, never, never, true, never>;
|
|
68
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<EpistolaDocumentComponent, "epistola-document-component", never, { "value": { "alias": "value"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "label": { "alias": "label"; "required": false; }; "display": { "alias": "display"; "required": false; }; "documentVariable": { "alias": "documentVariable"; "required": false; }; "tenantIdVariable": { "alias": "tenantIdVariable"; "required": false; }; "filename": { "alias": "filename"; "required": false; }; "taskInstanceId": { "alias": "taskInstanceId"; "required": false; }; }, { "valueChange": "valueChange"; }, never, never, true, never>;
|
|
65
69
|
}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { ChangeDetectorRef, EventEmitter, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';
|
|
3
3
|
import { FormioCustomComponent, FormIoStateService } from '@valtimo/components';
|
|
4
|
-
import { EpistolaPluginService
|
|
4
|
+
import { EpistolaPluginService } from '../../services';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class EpistolaDocumentPreviewComponent implements FormioCustomComponent<Record<string, any> | null>, OnChanges, OnDestroy {
|
|
7
7
|
private readonly epistolaPluginService;
|
|
8
8
|
private readonly sanitizer;
|
|
9
9
|
private readonly formIoStateService;
|
|
10
10
|
private readonly cdr;
|
|
11
|
-
private readonly taskContext;
|
|
12
11
|
value: Record<string, any> | null;
|
|
13
12
|
valueChange: EventEmitter<Record<string, any>>;
|
|
14
13
|
disabled: boolean;
|
|
@@ -16,6 +15,11 @@ export declare class EpistolaDocumentPreviewComponent implements FormioCustomCom
|
|
|
16
15
|
processDefinitionKey?: string;
|
|
17
16
|
sourceActivityId?: string;
|
|
18
17
|
overrideMapping?: Record<string, any>;
|
|
18
|
+
/**
|
|
19
|
+
* Task id forwarded by the Formio wrapper from the server-prefilled form
|
|
20
|
+
* ({@code epistola:taskId} value resolver), populated in every Valtimo task-open flow.
|
|
21
|
+
*/
|
|
22
|
+
taskInstanceId?: string | null;
|
|
19
23
|
loading: boolean;
|
|
20
24
|
error: string | null;
|
|
21
25
|
previewUrl: SafeResourceUrl | null;
|
|
@@ -23,11 +27,11 @@ export declare class EpistolaDocumentPreviewComponent implements FormioCustomCom
|
|
|
23
27
|
private initialized;
|
|
24
28
|
private currentBlobUrl;
|
|
25
29
|
private previewSubscription?;
|
|
26
|
-
constructor(epistolaPluginService: EpistolaPluginService, sanitizer: DomSanitizer, formIoStateService: FormIoStateService, cdr: ChangeDetectorRef
|
|
30
|
+
constructor(epistolaPluginService: EpistolaPluginService, sanitizer: DomSanitizer, formIoStateService: FormIoStateService, cdr: ChangeDetectorRef);
|
|
27
31
|
/**
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
32
|
+
* The active task id, forwarded by the Formio wrapper from the server-prefilled
|
|
33
|
+
* form ({@code epistola:taskId} value resolver). Null outside a task context
|
|
34
|
+
* (e.g. Formio builder), in which case the component fails closed.
|
|
31
35
|
*/
|
|
32
36
|
private get currentTaskId();
|
|
33
37
|
get overrideMappingScopes(): string[];
|
|
@@ -38,6 +42,14 @@ export declare class EpistolaDocumentPreviewComponent implements FormioCustomCom
|
|
|
38
42
|
ngOnChanges(changes: SimpleChanges): void;
|
|
39
43
|
ngOnDestroy(): void;
|
|
40
44
|
refresh(): void;
|
|
45
|
+
/**
|
|
46
|
+
* Load the preview only when there is enough data for it. Override-driven
|
|
47
|
+
* previews (those with an override mapping) wait until the mapped form data
|
|
48
|
+
* has been computed; until then they show a placeholder rather than firing a
|
|
49
|
+
* request that Epistola would reject with a 400 for missing required fields.
|
|
50
|
+
*/
|
|
51
|
+
private triggerPreview;
|
|
52
|
+
private showWaitingForInput;
|
|
41
53
|
/**
|
|
42
54
|
* Preview using the explicitly configured process link + input overrides.
|
|
43
55
|
* Requires a runtime task context — the backend authorizes the request against
|
|
@@ -48,5 +60,5 @@ export declare class EpistolaDocumentPreviewComponent implements FormioCustomCom
|
|
|
48
60
|
private handlePreviewError;
|
|
49
61
|
private revokeBlobUrl;
|
|
50
62
|
static ɵfac: i0.ɵɵFactoryDeclaration<EpistolaDocumentPreviewComponent, never>;
|
|
51
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<EpistolaDocumentPreviewComponent, "epistola-document-preview-component", never, { "value": { "alias": "value"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "label": { "alias": "label"; "required": false; }; "processDefinitionKey": { "alias": "processDefinitionKey"; "required": false; }; "sourceActivityId": { "alias": "sourceActivityId"; "required": false; }; "overrideMapping": { "alias": "overrideMapping"; "required": false; }; }, { "valueChange": "valueChange"; }, never, never, true, never>;
|
|
63
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<EpistolaDocumentPreviewComponent, "epistola-document-preview-component", never, { "value": { "alias": "value"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "label": { "alias": "label"; "required": false; }; "processDefinitionKey": { "alias": "processDefinitionKey"; "required": false; }; "sourceActivityId": { "alias": "sourceActivityId"; "required": false; }; "overrideMapping": { "alias": "overrideMapping"; "required": false; }; "taskInstanceId": { "alias": "taskInstanceId"; "required": false; }; }, { "valueChange": "valueChange"; }, never, never, true, never>;
|
|
52
64
|
}
|
|
@@ -10,6 +10,28 @@ export declare function isExpression(value: string): boolean;
|
|
|
10
10
|
* e.g. { "beslissing.tekst": "value" } -> { beslissing: { tekst: "value" } }
|
|
11
11
|
*/
|
|
12
12
|
export declare function expandDotNotation(flat: Record<string, any>): Record<string, any>;
|
|
13
|
+
/**
|
|
14
|
+
* A preview is "override-driven" when it has a non-empty override mapping: its
|
|
15
|
+
* input data comes from the form via the mapping, so it must wait for that data
|
|
16
|
+
* before it can render. Previews without a mapping load straight from the base
|
|
17
|
+
* doc/case data.
|
|
18
|
+
*/
|
|
19
|
+
export declare function isOverrideDriven(mapping?: OverrideMapping | null): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Whether the computed input overrides carry any usable data yet.
|
|
22
|
+
*/
|
|
23
|
+
export declare function hasUsableOverrides(overrides?: Record<string, any> | null): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Decide whether a preview request should fire given the configured override
|
|
26
|
+
* mapping and the currently computed overrides.
|
|
27
|
+
*
|
|
28
|
+
* - Override-driven previews only load once the mapped form data is present;
|
|
29
|
+
* before that they show a "complete the form" placeholder and fire nothing
|
|
30
|
+
* (avoids a doomed request that Epistola rejects with a 400 for missing
|
|
31
|
+
* required fields).
|
|
32
|
+
* - Previews without a mapping always load (base data is the whole input).
|
|
33
|
+
*/
|
|
34
|
+
export declare function shouldLoadPreview(mapping?: OverrideMapping | null, overrides?: Record<string, any> | null): boolean;
|
|
13
35
|
/**
|
|
14
36
|
* Given an override mapping (scope -> { inputPath -> "form:<componentKey>" })
|
|
15
37
|
* and form data, produce the inputOverrides object for the backend.
|
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
import { ChangeDetectorRef, EventEmitter, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';
|
|
3
|
-
import { FormioCustomComponent
|
|
4
|
-
import { EpistolaPluginService
|
|
3
|
+
import { FormioCustomComponent } from '@valtimo/components';
|
|
4
|
+
import { EpistolaPluginService } from '../../services';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class EpistolaRetryFormComponent implements FormioCustomComponent<string>, OnChanges, OnDestroy {
|
|
7
7
|
private readonly epistolaPluginService;
|
|
8
|
-
private readonly formIoStateService;
|
|
9
8
|
private readonly cdr;
|
|
10
9
|
private readonly sanitizer;
|
|
11
|
-
private readonly taskContext;
|
|
12
10
|
value: string;
|
|
13
11
|
valueChange: EventEmitter<string>;
|
|
14
12
|
disabled: boolean;
|
|
15
13
|
label: string;
|
|
16
14
|
sourceActivityId?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Task id forwarded by the Formio wrapper from the server-prefilled form
|
|
17
|
+
* ({@code epistola:taskId} value resolver), populated in every Valtimo task-open flow.
|
|
18
|
+
*/
|
|
19
|
+
taskInstanceId?: string | null;
|
|
17
20
|
formDefinition: any;
|
|
18
21
|
submission: any;
|
|
19
22
|
loading: boolean;
|
|
@@ -28,9 +31,8 @@ export declare class EpistolaRetryFormComponent implements FormioCustomComponent
|
|
|
28
31
|
private previewSubject;
|
|
29
32
|
private currentBlobUrl;
|
|
30
33
|
private resolvedSourceActivityId?;
|
|
31
|
-
private processDefinitionKey?;
|
|
32
34
|
formOptions: any;
|
|
33
|
-
constructor(epistolaPluginService: EpistolaPluginService,
|
|
35
|
+
constructor(epistolaPluginService: EpistolaPluginService, cdr: ChangeDetectorRef, sanitizer: DomSanitizer);
|
|
34
36
|
ngOnChanges(changes: SimpleChanges): void;
|
|
35
37
|
ngOnDestroy(): void;
|
|
36
38
|
togglePreview(): void;
|
|
@@ -38,5 +40,5 @@ export declare class EpistolaRetryFormComponent implements FormioCustomComponent
|
|
|
38
40
|
private loadPreview;
|
|
39
41
|
private loadForm;
|
|
40
42
|
static ɵfac: i0.ɵɵFactoryDeclaration<EpistolaRetryFormComponent, never>;
|
|
41
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<EpistolaRetryFormComponent, "epistola-retry-form-component", never, { "value": { "alias": "value"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "label": { "alias": "label"; "required": false; }; "sourceActivityId": { "alias": "sourceActivityId"; "required": false; }; }, { "valueChange": "valueChange"; }, never, never, true, never>;
|
|
43
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<EpistolaRetryFormComponent, "epistola-retry-form-component", never, { "value": { "alias": "value"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "label": { "alias": "label"; "required": false; }; "sourceActivityId": { "alias": "sourceActivityId"; "required": false; }; "taskInstanceId": { "alias": "taskInstanceId"; "required": false; }; }, { "valueChange": "valueChange"; }, never, never, true, never>;
|
|
42
44
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hides a registered custom Formio component from the builder's component palette,
|
|
3
|
+
* while keeping it fully usable inside other components' `editForm`s and at runtime.
|
|
4
|
+
*
|
|
5
|
+
* Formio's `WebformBuilder` only adds a component to the palette when
|
|
6
|
+
* `component.builderInfo && component.builderInfo.schema` is truthy. Overriding the
|
|
7
|
+
* registered class's static `builderInfo` getter to `false` therefore removes it from
|
|
8
|
+
* the palette. Runtime instantiation and editForm usage don't consult `builderInfo`,
|
|
9
|
+
* so they are unaffected.
|
|
10
|
+
*
|
|
11
|
+
* Call this AFTER the component is registered (and after any `setComponent` re-registration),
|
|
12
|
+
* so it targets the final class in `Formio.Components.components[type]`.
|
|
13
|
+
*/
|
|
14
|
+
export declare function hideFormioComponentFromBuilder(type: string): void;
|
package/lib/models/admin.d.ts
CHANGED
|
@@ -119,3 +119,41 @@ export interface BpmnValidationViolation {
|
|
|
119
119
|
code: string;
|
|
120
120
|
message: string;
|
|
121
121
|
}
|
|
122
|
+
/**
|
|
123
|
+
* The BPMN race-safety validation report from `GET /admin/validations`.
|
|
124
|
+
* `lastCheckedAt` is an ISO-8601 timestamp of the last completed scan, or `null`
|
|
125
|
+
* if no scan has run yet. `refreshIntervalMs` is the validator's scan cadence, used
|
|
126
|
+
* to tell the operator how often the result refreshes. Only the latest deployed
|
|
127
|
+
* version of each process definition is inspected.
|
|
128
|
+
*/
|
|
129
|
+
export interface BpmnValidationReport {
|
|
130
|
+
lastCheckedAt: string | null;
|
|
131
|
+
refreshIntervalMs: number;
|
|
132
|
+
violations: BpmnValidationViolation[];
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* TEMPORARY (removed in 1.0.0). A form whose Epistola components are missing the
|
|
136
|
+
* task-id carrier field — surfaced on the admin page so it can be repaired.
|
|
137
|
+
* `readOnly` flags classpath-deployed forms (a repair there is reverted on the next
|
|
138
|
+
* boot; fix the source instead).
|
|
139
|
+
*/
|
|
140
|
+
export interface FormCarrierIssue {
|
|
141
|
+
formId: string;
|
|
142
|
+
name: string;
|
|
143
|
+
missingComponents: number;
|
|
144
|
+
readOnly: boolean;
|
|
145
|
+
}
|
|
146
|
+
/** TEMPORARY (removed in 1.0.0). Outcome of repairing one form's carrier. */
|
|
147
|
+
export interface FormCarrierRepairResult {
|
|
148
|
+
formId: string;
|
|
149
|
+
name: string | null;
|
|
150
|
+
success: boolean;
|
|
151
|
+
componentsPatched: number;
|
|
152
|
+
errorMessage: string | null;
|
|
153
|
+
}
|
|
154
|
+
/** TEMPORARY (removed in 1.0.0). Aggregate outcome of repairing all flagged forms. */
|
|
155
|
+
export interface FormCarrierRepairSummary {
|
|
156
|
+
formsRepaired: number;
|
|
157
|
+
componentsPatched: number;
|
|
158
|
+
failed: number;
|
|
159
|
+
}
|
package/lib/models/config.d.ts
CHANGED
|
@@ -62,7 +62,22 @@ export interface DownloadDocumentConfig {
|
|
|
62
62
|
* updated by the result collector). The action extracts the document id.
|
|
63
63
|
*/
|
|
64
64
|
documentVariable: string;
|
|
65
|
-
|
|
65
|
+
/**
|
|
66
|
+
* Where the downloaded PDF is materialized (see
|
|
67
|
+
* `docs/adr/0001-download-document-content-storage.md`). Defaults to `TEMPORARY_RESOURCE`. The
|
|
68
|
+
* output variable used depends on this choice: `resourceIdVariable` or `contentVariable`.
|
|
69
|
+
*/
|
|
70
|
+
storageTarget?: 'TEMPORARY_RESOURCE' | 'PROCESS_VARIABLE';
|
|
71
|
+
/**
|
|
72
|
+
* Output for `TEMPORARY_RESOURCE`: the process variable that receives the temporary resource id
|
|
73
|
+
* (ready to hand to `documenten-api:store-temp-document`).
|
|
74
|
+
*/
|
|
75
|
+
resourceIdVariable?: string;
|
|
76
|
+
/**
|
|
77
|
+
* Output for `PROCESS_VARIABLE`: the process variable that receives the raw PDF bytes inline
|
|
78
|
+
* (best for small, non-sensitive documents).
|
|
79
|
+
*/
|
|
80
|
+
contentVariable?: string;
|
|
66
81
|
}
|
|
67
82
|
export interface VariableSuggestions {
|
|
68
83
|
doc: string[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
|
2
2
|
import { ConfigService } from '@valtimo/shared';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
|
-
import {
|
|
4
|
+
import { BpmnValidationReport, CatalogRedeployResult, ChangelogRelease, ClasspathCatalog, ConnectionStatus, FormCarrierIssue, FormCarrierRepairResult, FormCarrierRepairSummary, PendingJob, PluginUsageEntry, ReconcileResult, VersionInfo } from '../models';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
/**
|
|
7
7
|
* Service for Epistola plugin administrative operations.
|
|
@@ -37,10 +37,11 @@ export declare class EpistolaAdminService {
|
|
|
37
37
|
*/
|
|
38
38
|
reconcilePending(executionId: string): Observable<ReconcileResult>;
|
|
39
39
|
/**
|
|
40
|
-
* Get the latest BPMN race-safety validation
|
|
41
|
-
*
|
|
40
|
+
* Get the latest BPMN race-safety validation report across deployed process
|
|
41
|
+
* definitions: the violations (empty = healthy) plus when it was last checked
|
|
42
|
+
* and how often it refreshes.
|
|
42
43
|
*/
|
|
43
|
-
|
|
44
|
+
getValidationReport(): Observable<BpmnValidationReport>;
|
|
44
45
|
/**
|
|
45
46
|
* List the classpath catalogs available to manually redeploy for a plugin
|
|
46
47
|
* configuration, each annotated with the version last deployed in this
|
|
@@ -63,6 +64,12 @@ export declare class EpistolaAdminService {
|
|
|
63
64
|
* Export a single process link as a .process-link.json file.
|
|
64
65
|
*/
|
|
65
66
|
exportProcessLink(processLinkId: string): Observable<Blob>;
|
|
67
|
+
/** Forms whose Epistola components are missing the task-id carrier. */
|
|
68
|
+
getFormCarrierIssues(): Observable<FormCarrierIssue[]>;
|
|
69
|
+
/** Inject the task-id carrier into a single form's Epistola components. */
|
|
70
|
+
repairFormCarrier(formId: string): Observable<FormCarrierRepairResult>;
|
|
71
|
+
/** Repair every flagged form. */
|
|
72
|
+
repairAllFormCarriers(): Observable<FormCarrierRepairSummary>;
|
|
66
73
|
static ɵfac: i0.ɵɵFactoryDeclaration<EpistolaAdminService, never>;
|
|
67
74
|
static ɵprov: i0.ɵɵInjectableDeclaration<EpistolaAdminService>;
|
|
68
75
|
}
|
|
@@ -5,18 +5,15 @@ import { AttributeDefinition, CatalogInfo, EnvironmentInfo, ExpressionFunctionIn
|
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
/**
|
|
7
7
|
* Body of a {@link EpistolaPluginService.previewToBlob} call. Mirrors the
|
|
8
|
-
* backend {@code PreviewRequest} record.
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* and {@code inputOverrides} let the
|
|
12
|
-
* JSONata mapping runs.
|
|
8
|
+
* backend {@code PreviewRequest} record. The backend derives the process
|
|
9
|
+
* instance and case document from the authorized task, so only {@code taskId}
|
|
10
|
+
* and {@code sourceActivityId} (which identifies the {@code generate-document}
|
|
11
|
+
* process link) are sent; {@code overrides} and {@code inputOverrides} let the
|
|
12
|
+
* caller substitute data before the JSONata mapping runs.
|
|
13
13
|
*/
|
|
14
14
|
export interface PreviewBlobRequest {
|
|
15
15
|
taskId: string;
|
|
16
|
-
documentId: string;
|
|
17
|
-
processDefinitionKey?: string | null;
|
|
18
16
|
sourceActivityId?: string | null;
|
|
19
|
-
processInstanceId?: string | null;
|
|
20
17
|
inputOverrides?: Record<string, unknown> | null;
|
|
21
18
|
overrides?: Record<string, unknown> | null;
|
|
22
19
|
}
|
|
@@ -82,9 +79,12 @@ export declare class EpistolaPluginService {
|
|
|
82
79
|
/**
|
|
83
80
|
* Get a dynamically generated Formio form for retrying a failed document generation.
|
|
84
81
|
*
|
|
82
|
+
* The backend derives the process instance and case document from the authorized task,
|
|
83
|
+
* so only the task id (and optionally the source activity) is sent.
|
|
84
|
+
*
|
|
85
85
|
* @param taskId Operaton user task id (required — backend authorizes via OperatonTask:VIEW)
|
|
86
86
|
*/
|
|
87
|
-
getRetryForm(taskId: string,
|
|
87
|
+
getRetryForm(taskId: string, sourceActivityId?: string): Observable<any>;
|
|
88
88
|
/**
|
|
89
89
|
* List all available expression functions for expr: data mapping values.
|
|
90
90
|
*/
|
package/lib/services/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export * from './epistola-admin.service';
|
|
2
2
|
export * from './epistola-menu.service';
|
|
3
3
|
export * from './epistola-plugin.service';
|
|
4
|
-
export * from './
|
|
5
|
-
export * from './epistola-task-context.interceptor';
|
|
4
|
+
export * from './prefilled-task-id';
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Helpers for reading the active user task's id out of a Valtimo task form that was
|
|
3
|
+
* prefilled server-side by the {@code epistola:} value resolver (see the backend
|
|
4
|
+
* {@code EpistolaTaskValueResolverFactory}).
|
|
5
|
+
*
|
|
6
|
+
* <p>Background: the Epistola Formio components need the id of the user task whose form
|
|
7
|
+
* they're rendered in, to authorize their backend requests ({@code OperatonTask:VIEW}).
|
|
8
|
+
* Valtimo exposes no service that carries the task id to a custom Formio component at
|
|
9
|
+
* runtime, and earlier URL-sniffing only worked in the direct task-open flow (the
|
|
10
|
+
* task-list / case-detail flow bulk-fetches process links and never fires the per-task
|
|
11
|
+
* call).
|
|
12
|
+
*
|
|
13
|
+
* <p>Form prefill, however, runs server-side in every flow. A form field with
|
|
14
|
+
* {@code properties.sourceKey = "epistola:taskId"} is filled with the task id at prefill
|
|
15
|
+
* time (by the backend {@code EpistolaTaskValueResolverFactory}); this helper reads it back
|
|
16
|
+
* from the Formio root — robustly, regardless of how the task was opened.
|
|
17
|
+
*/
|
|
18
|
+
/** The value-resolver source key that yields the current task id at prefill time. */
|
|
19
|
+
export declare const PREFILLED_TASK_ID_SOURCE_KEY = "epistola:taskId";
|
|
20
|
+
/** Conventional key of the hidden carrier field that holds the prefilled task id. */
|
|
21
|
+
export declare const PREFILLED_TASK_ID_DATA_KEY = "epistolaTaskId";
|
|
22
|
+
/**
|
|
23
|
+
* Hidden Formio child component that carries the prefilled task id. It is embedded as a
|
|
24
|
+
* nested component inside each Epistola task component's schema, so dropping that component
|
|
25
|
+
* brings the carrier with it — the form author never adds a separate field. Valtimo's
|
|
26
|
+
* server-side prefill fills its {@code defaultValue} from the {@code epistola:taskId}
|
|
27
|
+
* value resolver; {@link readPrefilledTaskId} reads it back from the form definition.
|
|
28
|
+
*
|
|
29
|
+
* {@code persistent: false} keeps the value out of the submission, so the task id never
|
|
30
|
+
* lands in the case document / process variables.
|
|
31
|
+
*/
|
|
32
|
+
export declare const PREFILLED_TASK_ID_CARRIER: {
|
|
33
|
+
type: string;
|
|
34
|
+
key: string;
|
|
35
|
+
input: boolean;
|
|
36
|
+
persistent: boolean;
|
|
37
|
+
label: string;
|
|
38
|
+
properties: {
|
|
39
|
+
sourceKey: string;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Reads the prefilled task id from a Formio webform/wizard root, or null when absent.
|
|
44
|
+
*
|
|
45
|
+
* Looks in two places, in order:
|
|
46
|
+
* 1. The (prefilled) form definition — any component whose {@code properties.sourceKey}
|
|
47
|
+
* is {@code epistola:taskId} carries the task id in its {@code defaultValue}. This works
|
|
48
|
+
* even when the carrier is a hidden field that Formio doesn't surface into submission data.
|
|
49
|
+
* 2. The submission data under {@link PREFILLED_TASK_ID_DATA_KEY}, for a rendered sibling
|
|
50
|
+
* hidden field whose value Formio copied into {@code root.data}.
|
|
51
|
+
*/
|
|
52
|
+
export declare function readPrefilledTaskId(root: any): string | null;
|