openxiangda 1.0.254 → 1.0.256
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 +10 -1
- package/lib/sdd.js +38 -16
- package/openxiangda-skills/SKILL.md +1 -1
- package/openxiangda-skills/references/forms/component-registry.md +1 -0
- package/openxiangda-skills/skills/openxiangda-core/SKILL.md +2 -0
- package/openxiangda-skills/skills/openxiangda-form/SKILL.md +1 -0
- package/package.json +3 -2
- package/packages/sdk/dist/{ProcessPreview-DRJwSXYG.d.mts → ProcessPreview-DSUIJi5V.d.mts} +19 -2
- package/packages/sdk/dist/{ProcessPreview-DRJwSXYG.d.ts → ProcessPreview-DSUIJi5V.d.ts} +19 -2
- package/packages/sdk/dist/components/index.cjs +417 -248
- package/packages/sdk/dist/components/index.cjs.map +1 -1
- package/packages/sdk/dist/components/index.d.mts +10 -4
- package/packages/sdk/dist/components/index.d.ts +10 -4
- package/packages/sdk/dist/components/index.mjs +582 -413
- package/packages/sdk/dist/components/index.mjs.map +1 -1
- package/packages/sdk/dist/{dataManagementApi-DwZ13_9n.d.ts → dataManagementApi-Ro9itwm8.d.ts} +1 -1
- package/packages/sdk/dist/{dataManagementApi-COXXyOK-.d.mts → dataManagementApi-p_HOhQnA.d.mts} +1 -1
- package/packages/sdk/dist/runtime/index.cjs +392 -223
- package/packages/sdk/dist/runtime/index.cjs.map +1 -1
- package/packages/sdk/dist/runtime/index.d.mts +2 -2
- package/packages/sdk/dist/runtime/index.d.ts +2 -2
- package/packages/sdk/dist/runtime/index.mjs +508 -339
- package/packages/sdk/dist/runtime/index.mjs.map +1 -1
- package/packages/sdk/dist/runtime/react.d.mts +1 -1
- package/packages/sdk/dist/runtime/react.d.ts +1 -1
- package/templates/openxiangda-react-spa/.cursor/rules/openxiangda.mdc +1 -0
- package/templates/openxiangda-react-spa/.qoder/rules/openxiangda.md +1 -0
- package/templates/openxiangda-react-spa/AGENTS.md +2 -0
- package/templates/sy-lowcode-app-workspace/.cursor/rules/openxiangda.mdc +1 -0
- package/templates/sy-lowcode-app-workspace/.qoder/rules/openxiangda.md +1 -0
- package/templates/sy-lowcode-app-workspace/AGENTS.md +2 -0
package/README.md
CHANGED
|
@@ -45,6 +45,13 @@ same Runtime bytes. An exact same-package retry may reuse an `uploaded` release
|
|
|
45
45
|
only after verifying its content hash, source revision, and Runtime parent;
|
|
46
46
|
immutable storage objects are never overwritten.
|
|
47
47
|
|
|
48
|
+
The package release gate includes an equivalent-scale conformance scenario with
|
|
49
|
+
four Forms, fifteen form permission groups, two Functions, two DataViews, one
|
|
50
|
+
Runtime, repository aliases, preproduction execution, injected failure, and
|
|
51
|
+
cross-machine checkpoint recovery. A CLI/SDK package cannot be published when
|
|
52
|
+
that combined compiler → plan → executor → retry contract fails, even if its
|
|
53
|
+
smaller component tests still pass.
|
|
54
|
+
|
|
48
55
|
The lower-level commands later in this README remain available for V1
|
|
49
56
|
compatibility and diagnostics; do not use them to assemble a normal V2 release.
|
|
50
57
|
|
|
@@ -132,6 +139,8 @@ DataView `status` is a last-observed lifecycle value, not a stable candidate bin
|
|
|
132
139
|
|
|
133
140
|
Exact, non-destructive configuration selectors such as Data Views and permission groups are now sequenced automatically inside the same ship journal instead of requiring separate SDD changes. New forms are idempotently ensured per environment before their immutable FormRelease is staged. Unscoped resources and destructive configuration deletes remain fail-closed.
|
|
134
141
|
|
|
142
|
+
When a release contains both Form settings and form permission groups, `sdd bundle` emits one atomic `resource publish form-setting,form-permission-group` command with qualified `form-setting:<code>` and `form-permission-group:<code>` selectors. The prepublish verifier applies that same canonical contract, requires exact coverage of both sets, and still rejects missing, extra, split, unscoped, or directly activated Form resources.
|
|
143
|
+
|
|
135
144
|
Existing workspaces connect to a server-side environment set with `environment attach`. If the legacy `profiles.<profile>` binding has the same `appType` as one environment, its resource mappings are copied only into that matching target (normally preproduction). Production starts with an empty mapping, and later writes update only the selected target even when both targets reuse one login profile.
|
|
136
145
|
|
|
137
146
|
`environment swap` is a commissioning/reclassification operation, not a release shortcut. It requires `--confirm-production` and a reason, atomically exchanges the two existing environment roles, preserves each application's data and Release Heads, and remaps local resource IDs by appType. Existing side-effect policies remain restricted unless explicit replacement policy JSON is supplied.
|
|
@@ -154,7 +163,7 @@ React SPA workspaces publish their frontend with `openxiangda runtime deploy`. E
|
|
|
154
163
|
|
|
155
164
|
Environment-managed `release ship`, recovery `release deploy`, and `release promote` accept the same audited Runtime rollback pair. It is forwarded only to `runtime-stage`, never to resource stages or `app-finalize`. Ship freezes the intent in its private journal so production confirmation can inherit it automatically; without the explicit pair, lineage divergence remains blocked.
|
|
156
165
|
|
|
157
|
-
Before publishing the OpenXiangda npm package, run `npm run test:release` once on the final clean version commit. For an AdminList-only SDK patch, use the fixed `npm run test:release:sdk-admin-list` profile instead; it runs the AdminList state and response contracts plus the release-evidence guard without exercising unrelated deployment orchestration. Both commands write hash-bound evidence under `.openxiangda/evidence/tests/<HEAD>/release.json`. `npm publish` validates that evidence against the exact Git commit, package version, Node version, and complete passing result, then runs the mainline guard; it does not execute the selected suite a second time. Unknown or cross-module changes should continue to use the full release suite. Any commit, version, runtime, result, or evidence-hash drift remains fail closed.
|
|
166
|
+
Before publishing the OpenXiangda npm package, run `npm run test:release` once on the final clean version commit. The full suite always includes the equivalent-scale Delivery V2 conformance scenario above. For an AdminList-only SDK patch, use the fixed `npm run test:release:sdk-admin-list` profile instead; it runs the AdminList state and response contracts plus the release-evidence guard without exercising unrelated deployment orchestration. Both commands write hash-bound evidence under `.openxiangda/evidence/tests/<HEAD>/release.json`. `npm publish` validates that evidence against the exact Git commit, package version, Node version, and complete passing result, then runs the mainline guard; it does not execute the selected suite a second time. Unknown or cross-module changes should continue to use the full release suite. Any commit, version, runtime, result, or evidence-hash drift remains fail closed.
|
|
158
167
|
|
|
159
168
|
Parallel tasks develop and test in isolated worktrees, but feature worktrees do not publish. After approved commits are merged and pushed, `sdd bundle <release-change> --changes ...` unions their exact structured scope and preserves the source changes' common Git baseline instead of adopting the post-merge `HEAD`. Old imported changes that predate source-base metadata must pass `--source-base-ref <commit>` explicitly. Commit/push the bundle, then run `release publish --change <release-change> --profile <name>` from a clean local main/master whose commit exactly equals the authoritative remote tip. It verifies without rewriting reviewed SDD files, waits for the app lease, freezes one authoritative App capture, executes exact Form/Backend/Runtime staged steps, atomically finalizes the Root App release, and records a resumable local execution journal. Runtime checks use the narrow head endpoint; immutable Git-base artifact hashes are reused across plans.
|
|
160
169
|
|
package/lib/sdd.js
CHANGED
|
@@ -2589,12 +2589,30 @@ function validateAtomicReleaseCommands(
|
|
|
2589
2589
|
const errors = [];
|
|
2590
2590
|
const requireCompletePlan = options.requireCompletePlan !== false;
|
|
2591
2591
|
const normalized = commands.map(command => String(command || '').trim());
|
|
2592
|
+
const expectedFormPermissionGroups =
|
|
2593
|
+
targets.resourceSelectors?.formPermissionGroups || [];
|
|
2594
|
+
const expectedFormTypes = [
|
|
2595
|
+
...((targets.forms || []).length > 0 ? ['form-setting'] : []),
|
|
2596
|
+
...(expectedFormPermissionGroups.length > 0
|
|
2597
|
+
? ['form-permission-group']
|
|
2598
|
+
: []),
|
|
2599
|
+
].sort();
|
|
2600
|
+
const qualifyFormSelectors = expectedFormTypes.length > 1;
|
|
2601
|
+
const expectedFormSelectors = [
|
|
2602
|
+
...(targets.forms || []).map(code =>
|
|
2603
|
+
qualifyFormSelectors ? `form-setting:${code}` : String(code)
|
|
2604
|
+
),
|
|
2605
|
+
...expectedFormPermissionGroups.map(code =>
|
|
2606
|
+
qualifyFormSelectors ? `form-permission-group:${code}` : String(code)
|
|
2607
|
+
),
|
|
2608
|
+
].sort();
|
|
2592
2609
|
const publishCommands = normalized.filter(command =>
|
|
2593
2610
|
/^openxiangda\s+(?:workspace\s+publish|resource\s+publish|runtime\s+deploy|release\s+app-finalize)\b/.test(
|
|
2594
2611
|
command
|
|
2595
2612
|
)
|
|
2596
2613
|
);
|
|
2597
2614
|
for (const command of publishCommands) {
|
|
2615
|
+
const commandTypes = normalizedResourcePublishTypes(command);
|
|
2598
2616
|
if (!/\s--profile(?:=|\s+)\S+/.test(command) || /<profile>/.test(command)) {
|
|
2599
2617
|
errors.push({
|
|
2600
2618
|
name: 'sdd-release-profile-missing',
|
|
@@ -2619,7 +2637,9 @@ function validateAtomicReleaseCommands(
|
|
|
2619
2637
|
});
|
|
2620
2638
|
}
|
|
2621
2639
|
if (
|
|
2622
|
-
|
|
2640
|
+
commandTypes.some(type =>
|
|
2641
|
+
['form-setting', 'form-permission-group'].includes(type)
|
|
2642
|
+
) &&
|
|
2623
2643
|
/\s--activate(?:\s|$)/.test(command)
|
|
2624
2644
|
) {
|
|
2625
2645
|
errors.push({
|
|
@@ -2645,7 +2665,6 @@ function validateAtomicReleaseCommands(
|
|
|
2645
2665
|
message: `Runtime 必须先 --no-activate 暂存,再由 App Release 原子激活: ${command}`,
|
|
2646
2666
|
});
|
|
2647
2667
|
}
|
|
2648
|
-
const commandTypes = normalizedResourcePublishTypes(command);
|
|
2649
2668
|
const expectedBackendTypes = [
|
|
2650
2669
|
...((targets.functions || []).length > 0 ? ['function'] : []),
|
|
2651
2670
|
...((targets.automations || []).length > 0 ? ['automation'] : []),
|
|
@@ -2680,16 +2699,18 @@ function validateAtomicReleaseCommands(
|
|
|
2680
2699
|
}
|
|
2681
2700
|
}
|
|
2682
2701
|
if (
|
|
2683
|
-
commandTypes.
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
(
|
|
2688
|
-
|
|
2702
|
+
commandTypes.some(type =>
|
|
2703
|
+
['form-setting', 'form-permission-group'].includes(type)
|
|
2704
|
+
) &&
|
|
2705
|
+
(!sameStringSet(commandTypes, expectedFormTypes) ||
|
|
2706
|
+
!sameStringSet(
|
|
2707
|
+
normalizedCommandSelectors(command),
|
|
2708
|
+
expectedFormSelectors
|
|
2709
|
+
))
|
|
2689
2710
|
) {
|
|
2690
2711
|
errors.push({
|
|
2691
2712
|
name: 'sdd-release-form-scope-inexact',
|
|
2692
|
-
message: `Form bundle
|
|
2713
|
+
message: `Form bundle 命令必须以一条命令精确覆盖审核的 Form 与权限组 selector,不能缺失或夹带资源: ${command}`,
|
|
2693
2714
|
});
|
|
2694
2715
|
}
|
|
2695
2716
|
}
|
|
@@ -2729,20 +2750,21 @@ function validateAtomicReleaseCommands(
|
|
|
2729
2750
|
});
|
|
2730
2751
|
}
|
|
2731
2752
|
}
|
|
2732
|
-
if (
|
|
2753
|
+
if (expectedFormTypes.length > 0) {
|
|
2733
2754
|
const formStage = normalized.find(
|
|
2734
2755
|
command =>
|
|
2735
|
-
/^openxiangda\s+resource\s+publish\
|
|
2756
|
+
/^openxiangda\s+resource\s+publish\b/.test(command) &&
|
|
2736
2757
|
!/\s--activate(?:\s|$)/.test(command) &&
|
|
2737
2758
|
sameStringSet(
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
)
|
|
2759
|
+
normalizedResourcePublishTypes(command),
|
|
2760
|
+
expectedFormTypes
|
|
2761
|
+
) &&
|
|
2762
|
+
sameStringSet(normalizedCommandSelectors(command), expectedFormSelectors)
|
|
2741
2763
|
);
|
|
2742
2764
|
if (!formStage) {
|
|
2743
2765
|
errors.push({
|
|
2744
2766
|
name: 'sdd-release-form-stage-missing',
|
|
2745
|
-
message: 'Form
|
|
2767
|
+
message: 'Form 与权限组必须由一条精确 bundle 命令暂存为 FormRelease。',
|
|
2746
2768
|
});
|
|
2747
2769
|
}
|
|
2748
2770
|
}
|
|
@@ -2761,7 +2783,7 @@ function validateAtomicReleaseCommands(
|
|
|
2761
2783
|
}
|
|
2762
2784
|
if (
|
|
2763
2785
|
backendCodes.length > 0 ||
|
|
2764
|
-
|
|
2786
|
+
expectedFormTypes.length > 0 ||
|
|
2765
2787
|
targets.runtime
|
|
2766
2788
|
) {
|
|
2767
2789
|
const finalize = normalized.find(
|
|
@@ -107,7 +107,7 @@ Quick changes use compact generated JSON/prose. Do not expand them into proposal
|
|
|
107
107
|
|
|
108
108
|
Keep development lightweight: structured approval plus exact resource/file scope are authoritative. By default, only `change.json`, `coverage.json`, and `release.json` are created; use `openxiangda sdd render <change>` when prose is genuinely useful. Missing tasks/evidence/spec prose warns and does not block release; set `strictDocumentation: true` only for a workspace that intentionally wants prose as a gate. Actual publish argv, mainline identity, CAS, lease, destructive scope, and atomic activation remain hard gates.
|
|
109
109
|
|
|
110
|
-
The CLI regenerates one canonical command set from structured coverage instead of asking agents to maintain two command copies. A single Function uses `resource publish function --only <code>`; qualified selectors are used
|
|
110
|
+
The CLI regenerates one canonical command set from structured coverage instead of asking agents to maintain two command copies. A single Function uses `resource publish function --only <code>`; qualified selectors are used when Function and Automation are mixed. When Form settings and form permission groups are both present, they must share one `resource publish form-setting,form-permission-group` command with qualified `form-setting:<code>` and `form-permission-group:<code>` selectors so one immutable FormRelease contains both snapshots. Generated React SPA plans use exact Form bundles, one Backend `--stage-only` command, Runtime `--no-activate`, and Root `app-finalize`. Prepublish and actual-argv validation require those exact same type/selector sets and reject missing, extra, or split Form resources.
|
|
111
111
|
|
|
112
112
|
## Safe release recipes
|
|
113
113
|
|
|
@@ -78,6 +78,7 @@ Rules:
|
|
|
78
78
|
- For custom OSS attachment or image upload, first declare a `src/resources/storage/<code>.json` resource, optionally enable `configJson.cors.managed` for browser direct-upload CORS, then set `uploadProvider: "oss"` and `storageCode: "<code>"` on `AttachmentField` or `ImageField`. Never put OSS AK/SK values in schema, page code, or committed resource files.
|
|
79
79
|
- For image thumbnails or lightweight previews, set `imageCompression: { enabled: true }` on `ImageField` or `AttachmentField`. The runtime keeps the original `url` and adds `thumbUrl`, `previewUrl`, and `variants` when compressed image variants are created.
|
|
80
80
|
- For `SubFormField`, use `columns` for child fields and keep child `fieldId` values stable within the subform.
|
|
81
|
+
- `JSONField` renders a validated structured-text editor in `NORMAL` / `DISABLED` mode and a formatted value in `READONLY` mode. Invalid JSON becomes a form validation error and cannot be silently saved as an older value. For one field, use its `renderer` / `editor` callbacks; for a whole standard form or a `DataManagementList` detail/submit drawer, pass `components={{ JSONField: CustomJsonField }}` so the registry is preserved through `StandardFormPage` and `FormProvider`.
|
|
81
82
|
- `TextAreaField` is accepted by workspace tools and normalized to runtime `TextareaField`; prefer `TextAreaField` in OpenXiangda docs for readability.
|
|
82
83
|
|
|
83
84
|
Common validation rule examples:
|
|
@@ -77,6 +77,8 @@ The approved change scope, not the checkout's global dirty set, is the release b
|
|
|
77
77
|
|
|
78
78
|
Treat `scopes.changedResources`, `scopes.runtimeDependencies`, and `scopes.deployTargets` as different contracts. The first owns changed files/resources, the second records shared/transitive impact, and only the third authorizes writes. Dependency analysis may fail closed when an impact was not declared, but it must not silently expand `deployTargets`. Candidate preflight runs release-plan and SDD prepublish checks before source freeze or remote candidate/deployment writes; failure leaves reviewed SDD and private execution state untouched.
|
|
79
79
|
|
|
80
|
+
For React SPA releases that contain both Form settings and form permission groups, keep them in one immutable FormRelease command: `resource publish form-setting,form-permission-group --only form-setting:<form>,form-permission-group:<group>`. The SDD generator and prepublish/actual-argv validators use this same canonical qualified-selector contract; missing, extra, split, unscoped, or directly activated Form resources remain blocked.
|
|
81
|
+
|
|
80
82
|
For engineering resources, select type and exact codes:
|
|
81
83
|
|
|
82
84
|
```bash
|
|
@@ -37,6 +37,7 @@ openxiangda release app-finalize --staged-resources-json .openxiangda/releases/<
|
|
|
37
37
|
- ✅ Permission scope keys / sync keys / derived fields stay in schema with `behavior: "HIDDEN"`, derived from visible select/person/department fields via `valueSync`.
|
|
38
38
|
- ✅ Always provide `options` for option components (Select / MultiSelect / Radio / Checkbox / CascadeSelect).
|
|
39
39
|
- ✅ `schema.ts` is the source of data fields and platform field components; `page.tsx` is presentation only and should render through the OpenXiangda standard form/runtime.
|
|
40
|
+
- ✅ Use built-in `JSONField` for editable structured JSON. Customize one field with `renderer` / `editor`, or pass a `components` registry through `StandardFormPage` / `DataManagementList` when the whole surface needs a domain-specific JSON component.
|
|
40
41
|
- ✅ If a custom layout or widget is truly needed, wrap OpenXiangda platform components first. If no platform component exists, wrap `antd` / `antd-mobile` and preserve their props, refs, keyboard behavior, and overlay handling.
|
|
41
42
|
- ❌ `AssociationFormField` for new form work (use `linkedForm` SelectField).
|
|
42
43
|
- ❌ Top-level `schema.rules` as validation array. Top-level `rules` is `FormEffect[]` only (`when` / `then`).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openxiangda",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.256",
|
|
4
4
|
"description": "OpenXiangda CLI, workspace build tools, runtime SDK, and form components.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"bin": {
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"source:admin-list": "node scripts/sync-admin-list-source.mjs",
|
|
69
69
|
"check": "node --check bin/openxiangda.js && node --check lib/*.js && node --check packages/sdk/src/build-source/src/cli.mjs && node --check packages/sdk/src/build-source/scripts/*.mjs && node --check packages/sdk/src/build-source/scripts/utils/*.mjs",
|
|
70
70
|
"test": "npm run test:fast",
|
|
71
|
-
"test:fast": "npm run check && node scripts/delivery-v2-package-smoke.mjs && node scripts/delivery-v2-executor-smoke.mjs && node scripts/http-proxy-smoke.mjs && node scripts/form-export-cli-smoke.mjs && node scripts/open-api-cli-smoke.mjs && node scripts/release-plan-smoke.mjs && node scripts/typed-resource-plan-smoke.mjs && node scripts/integration-bundle-smoke.mjs && node scripts/content-cache-smoke.mjs && node scripts/dependency-capsule-smoke.mjs && node scripts/sdd-stages-smoke.mjs && node scripts/environment-swap-cli-smoke.mjs && node scripts/environment-policy-cli-smoke.mjs",
|
|
71
|
+
"test:fast": "npm run check && node scripts/delivery-v2-package-smoke.mjs && node scripts/delivery-v2-executor-smoke.mjs && node scripts/delivery-v2-release-conformance-smoke.mjs && node scripts/http-proxy-smoke.mjs && node scripts/form-export-cli-smoke.mjs && node scripts/open-api-cli-smoke.mjs && node scripts/release-plan-smoke.mjs && node scripts/typed-resource-plan-smoke.mjs && node scripts/integration-bundle-smoke.mjs && node scripts/content-cache-smoke.mjs && node scripts/dependency-capsule-smoke.mjs && node scripts/sdd-stages-smoke.mjs && node scripts/environment-swap-cli-smoke.mjs && node scripts/environment-policy-cli-smoke.mjs",
|
|
72
72
|
"test:changed": "npm run check && node scripts/run-test-suite.mjs --changed --evidence",
|
|
73
73
|
"test:contract": "npm run check && node scripts/run-test-suite.mjs --contract --evidence",
|
|
74
74
|
"test:release": "npm run check && node scripts/run-test-suite.mjs --release --evidence",
|
|
@@ -117,6 +117,7 @@
|
|
|
117
117
|
"release:evidence:verify": "node scripts/release-evidence-guard.mjs",
|
|
118
118
|
"test:delivery-v2-package": "node scripts/delivery-v2-package-smoke.mjs",
|
|
119
119
|
"test:delivery-v2-executor": "node scripts/delivery-v2-executor-smoke.mjs",
|
|
120
|
+
"test:delivery-v2-release-conformance": "node scripts/delivery-v2-release-conformance-smoke.mjs",
|
|
120
121
|
"test:task-status": "node scripts/task-status-smoke.mjs",
|
|
121
122
|
"test:policy": "node scripts/policy-smoke.mjs",
|
|
122
123
|
"test:release-plan": "node scripts/release-plan-smoke.mjs",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React__default from 'react';
|
|
1
|
+
import React__default, { ReactNode } from 'react';
|
|
2
2
|
|
|
3
3
|
type FormSectionVariant = 'plain' | 'card';
|
|
4
4
|
type FormSectionAccent = 'blue' | 'green';
|
|
@@ -952,8 +952,25 @@ interface DigitalSignatureFieldProps extends BaseFieldProps {
|
|
|
952
952
|
bucketName?: string;
|
|
953
953
|
allowClear?: boolean;
|
|
954
954
|
}
|
|
955
|
+
interface JSONFieldRendererContext {
|
|
956
|
+
fieldId: string;
|
|
957
|
+
label: string;
|
|
958
|
+
value: any;
|
|
959
|
+
formattedValue: string;
|
|
960
|
+
behavior: FieldBehavior;
|
|
961
|
+
}
|
|
962
|
+
interface JSONFieldEditorContext extends JSONFieldRendererContext {
|
|
963
|
+
disabled: boolean;
|
|
964
|
+
error?: string;
|
|
965
|
+
onChange: (value: any) => void;
|
|
966
|
+
onError: (error?: string) => void;
|
|
967
|
+
}
|
|
955
968
|
interface JSONFieldProps extends BaseFieldProps {
|
|
956
969
|
defaultValue?: any;
|
|
970
|
+
indent?: number;
|
|
971
|
+
rows?: number;
|
|
972
|
+
renderer?: (context: JSONFieldRendererContext) => ReactNode;
|
|
973
|
+
editor?: (context: JSONFieldEditorContext) => ReactNode;
|
|
957
974
|
}
|
|
958
975
|
/** 流程状态 */
|
|
959
976
|
type ProcessStatus = 'running' | 'waiting' | 'exception' | 'completed' | 'terminated' | 'withdrawn' | 'pending' | 'cancelled';
|
|
@@ -1272,4 +1289,4 @@ interface ProcessPreviewProps {
|
|
|
1272
1289
|
}
|
|
1273
1290
|
declare const ProcessPreview: React__default.FC<ProcessPreviewProps>;
|
|
1274
1291
|
|
|
1275
|
-
export { type DepartmentSelectFieldProps as $, type ApprovalPermission as A, type ReturnParams as B, type ChangeRecordQueryParams as C, type SaveTaskParams as D, type TransferParams as E, type FieldDefinition as F, type TextFieldProps as G, type TextAreaFieldProps as H, type InitiatorSelectCandidate as I, type SelectFieldProps as J, type RadioFieldProps as K, type CheckboxFieldProps as L, type MultiSelectFieldProps as M, type NumberFieldProps as N, type OptionItem as O, type ProcessStatus as P, type DateFieldProps as Q, type RuntimeResponse as R, type StatusMeta as S, type TaskStatus as T, type CascadeDateFieldProps as U, type ValidationPreset as V, type WithdrawParams as W, type AttachmentFieldProps as X, type ImageFieldProps as Y, type SubFormFieldProps as Z, type UserSelectFieldProps as _, type FormRuntimeApi as a, type ImageVariant as a$, type CascadeSelectFieldProps as a0, type AddressFieldProps as a1, type AssociationFormFieldProps as a2, type EditorFieldProps as a3, type EditorChoiceOption as a4, type SerialNumberFieldProps as a5, type LocationFieldProps as a6, type DigitalSignatureFieldProps as a7, type JSONFieldProps as a8, type AttachmentItem as a9, type DefaultValueLinkageConfig as aA, type DepartmentSearchParams as aB, type DepartmentSearchResult as aC, type DepartmentSearchScope as aD, type DepartmentTreeNode as aE, type DigitalSignatureValue as aF, type EditorToolbarAction as aG, type FieldLayoutNode as aH, type FieldValueSyncConfig as aI, type FilePreviewCapabilityBatch as aJ, type FilePreviewProvider as aK, type FilePreviewRenderMode as aL, type FilePreviewSurface as aM, type FilePreviewType as aN, type FormEffectAction as aO, type FormEffectCondition as aP, type FormEffectConditionOperator as aQ, type FormEngineMode as aR, type FormLayoutNode as aS, FormSection as aT, type FormSectionProps as aU, type FormSubmitBehavior as aV, type FormTemplateConfig as aW, type GridLayoutCell as aX, type GridLayoutNode as aY, type ImageCompressionConfig as aZ, type ImageCompressionVariantConfig as a_, type PreparedFilePreview as aa, type FilePreviewCapability as ab, type FilePreviewMetadata as ac, type FilePreviewRequest as ad, type ProcessAction as ae, type InitiatorSelectedApprovers as af, type ReturnPolicy as ag, type ChangeRecord as ah, type StandardFormPageMode as ai, type LowcodePageSchema as aj, type AddressValue as ak, type ApprovalActionType as al, ApprovalTimeline as am, type ApprovalTimelineProps as an, type AssociationFormConfig as ao, type AssociationValue as ap, type AttachmentImageVariants as aq, type BaseFieldProps as ar, type BaseLayoutNode as as, type DataFilter as at, type DataLinkageCondition as au, type DataLinkageConfig as av, type DateRangeRestriction as aw, type DateRestrictionConfig as ax, type DateShortcutConfig as ay, type DateShortcutType as az, type FormSchema as b, type InitiatorSelectScope as b0, type
|
|
1292
|
+
export { type DepartmentSelectFieldProps as $, type ApprovalPermission as A, type ReturnParams as B, type ChangeRecordQueryParams as C, type SaveTaskParams as D, type TransferParams as E, type FieldDefinition as F, type TextFieldProps as G, type TextAreaFieldProps as H, type InitiatorSelectCandidate as I, type SelectFieldProps as J, type RadioFieldProps as K, type CheckboxFieldProps as L, type MultiSelectFieldProps as M, type NumberFieldProps as N, type OptionItem as O, type ProcessStatus as P, type DateFieldProps as Q, type RuntimeResponse as R, type StatusMeta as S, type TaskStatus as T, type CascadeDateFieldProps as U, type ValidationPreset as V, type WithdrawParams as W, type AttachmentFieldProps as X, type ImageFieldProps as Y, type SubFormFieldProps as Z, type UserSelectFieldProps as _, type FormRuntimeApi as a, type ImageVariant as a$, type CascadeSelectFieldProps as a0, type AddressFieldProps as a1, type AssociationFormFieldProps as a2, type EditorFieldProps as a3, type EditorChoiceOption as a4, type SerialNumberFieldProps as a5, type LocationFieldProps as a6, type DigitalSignatureFieldProps as a7, type JSONFieldProps as a8, type AttachmentItem as a9, type DefaultValueLinkageConfig as aA, type DepartmentSearchParams as aB, type DepartmentSearchResult as aC, type DepartmentSearchScope as aD, type DepartmentTreeNode as aE, type DigitalSignatureValue as aF, type EditorToolbarAction as aG, type FieldLayoutNode as aH, type FieldValueSyncConfig as aI, type FilePreviewCapabilityBatch as aJ, type FilePreviewProvider as aK, type FilePreviewRenderMode as aL, type FilePreviewSurface as aM, type FilePreviewType as aN, type FormEffectAction as aO, type FormEffectCondition as aP, type FormEffectConditionOperator as aQ, type FormEngineMode as aR, type FormLayoutNode as aS, FormSection as aT, type FormSectionProps as aU, type FormSubmitBehavior as aV, type FormTemplateConfig as aW, type GridLayoutCell as aX, type GridLayoutNode as aY, type ImageCompressionConfig as aZ, type ImageCompressionVariantConfig as a_, type PreparedFilePreview as aa, type FilePreviewCapability as ab, type FilePreviewMetadata as ac, type FilePreviewRequest as ad, type ProcessAction as ae, type InitiatorSelectedApprovers as af, type ReturnPolicy as ag, type ChangeRecord as ah, type StandardFormPageMode as ai, type LowcodePageSchema as aj, type AddressValue as ak, type ApprovalActionType as al, ApprovalTimeline as am, type ApprovalTimelineProps as an, type AssociationFormConfig as ao, type AssociationValue as ap, type AttachmentImageVariants as aq, type BaseFieldProps as ar, type BaseLayoutNode as as, type DataFilter as at, type DataLinkageCondition as au, type DataLinkageConfig as av, type DateRangeRestriction as aw, type DateRestrictionConfig as ax, type DateShortcutConfig as ay, type DateShortcutType as az, type FormSchema as b, type InitiatorSelectScope as b0, type JSONFieldEditorContext as b1, type JSONFieldRendererContext as b2, type LayoutVisibleWhen as b3, type LinkedFormOptionConfig as b4, type LocationValue as b5, type LowcodePageMeta as b6, type LowcodePageNode as b7, type LowcodePageNodeType as b8, type OptionSourceType as b9, type PeopleShortcutConfig as ba, type PeopleShortcutType as bb, type PreviewImageItem as bc, type ProcessNodeType as bd, ProcessPreview as be, type ProcessPreviewProps as bf, type RuntimeAuthHeadersProvider as bg, type RuntimeDataQueryParams as bh, type RuntimeDataQueryResult as bi, type RuntimeRequestConfig as bj, type RuntimeUploadOptions as bk, type RuntimeUploadProvider as bl, type SectionLayoutNode as bm, type SignaturePoint as bn, type StepLayoutItem as bo, type StepsLayoutNode as bp, type SubFormColumn as bq, type TabLayoutItem as br, type TabsLayoutNode as bs, type TextShortcutConfig as bt, type TextShortcutType as bu, type UserDisplayFormat as bv, type UserItem as bw, type FormRuntimeApiConfig as c, type FormEngineConfig as d, type FieldBehavior as e, type FormRuntimeConfig as f, type FormAppearanceConfig as g, type ValidationRule as h, type FormEffect as i, type OptionSourceConfig as j, type FormDataDeleteParams as k, type ChangeRecordListResponse as l, type FormDataQueryParams as m, type FormInstanceData as n, type InitiatorSelectRequirement as o, type ProcessBasicInfo as p, type ProcessDefinition as q, type ProcessTask as r, type ReturnableNodeResult as s, type ReturnableNode as t, type ViewPermissionQueryParams as u, type ViewPermissionSummary as v, type ApproveParams as w, type PreviewParams as x, type ProcessRoute as y, type ResubmitParams as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React__default from 'react';
|
|
1
|
+
import React__default, { ReactNode } from 'react';
|
|
2
2
|
|
|
3
3
|
type FormSectionVariant = 'plain' | 'card';
|
|
4
4
|
type FormSectionAccent = 'blue' | 'green';
|
|
@@ -952,8 +952,25 @@ interface DigitalSignatureFieldProps extends BaseFieldProps {
|
|
|
952
952
|
bucketName?: string;
|
|
953
953
|
allowClear?: boolean;
|
|
954
954
|
}
|
|
955
|
+
interface JSONFieldRendererContext {
|
|
956
|
+
fieldId: string;
|
|
957
|
+
label: string;
|
|
958
|
+
value: any;
|
|
959
|
+
formattedValue: string;
|
|
960
|
+
behavior: FieldBehavior;
|
|
961
|
+
}
|
|
962
|
+
interface JSONFieldEditorContext extends JSONFieldRendererContext {
|
|
963
|
+
disabled: boolean;
|
|
964
|
+
error?: string;
|
|
965
|
+
onChange: (value: any) => void;
|
|
966
|
+
onError: (error?: string) => void;
|
|
967
|
+
}
|
|
955
968
|
interface JSONFieldProps extends BaseFieldProps {
|
|
956
969
|
defaultValue?: any;
|
|
970
|
+
indent?: number;
|
|
971
|
+
rows?: number;
|
|
972
|
+
renderer?: (context: JSONFieldRendererContext) => ReactNode;
|
|
973
|
+
editor?: (context: JSONFieldEditorContext) => ReactNode;
|
|
957
974
|
}
|
|
958
975
|
/** 流程状态 */
|
|
959
976
|
type ProcessStatus = 'running' | 'waiting' | 'exception' | 'completed' | 'terminated' | 'withdrawn' | 'pending' | 'cancelled';
|
|
@@ -1272,4 +1289,4 @@ interface ProcessPreviewProps {
|
|
|
1272
1289
|
}
|
|
1273
1290
|
declare const ProcessPreview: React__default.FC<ProcessPreviewProps>;
|
|
1274
1291
|
|
|
1275
|
-
export { type DepartmentSelectFieldProps as $, type ApprovalPermission as A, type ReturnParams as B, type ChangeRecordQueryParams as C, type SaveTaskParams as D, type TransferParams as E, type FieldDefinition as F, type TextFieldProps as G, type TextAreaFieldProps as H, type InitiatorSelectCandidate as I, type SelectFieldProps as J, type RadioFieldProps as K, type CheckboxFieldProps as L, type MultiSelectFieldProps as M, type NumberFieldProps as N, type OptionItem as O, type ProcessStatus as P, type DateFieldProps as Q, type RuntimeResponse as R, type StatusMeta as S, type TaskStatus as T, type CascadeDateFieldProps as U, type ValidationPreset as V, type WithdrawParams as W, type AttachmentFieldProps as X, type ImageFieldProps as Y, type SubFormFieldProps as Z, type UserSelectFieldProps as _, type FormRuntimeApi as a, type ImageVariant as a$, type CascadeSelectFieldProps as a0, type AddressFieldProps as a1, type AssociationFormFieldProps as a2, type EditorFieldProps as a3, type EditorChoiceOption as a4, type SerialNumberFieldProps as a5, type LocationFieldProps as a6, type DigitalSignatureFieldProps as a7, type JSONFieldProps as a8, type AttachmentItem as a9, type DefaultValueLinkageConfig as aA, type DepartmentSearchParams as aB, type DepartmentSearchResult as aC, type DepartmentSearchScope as aD, type DepartmentTreeNode as aE, type DigitalSignatureValue as aF, type EditorToolbarAction as aG, type FieldLayoutNode as aH, type FieldValueSyncConfig as aI, type FilePreviewCapabilityBatch as aJ, type FilePreviewProvider as aK, type FilePreviewRenderMode as aL, type FilePreviewSurface as aM, type FilePreviewType as aN, type FormEffectAction as aO, type FormEffectCondition as aP, type FormEffectConditionOperator as aQ, type FormEngineMode as aR, type FormLayoutNode as aS, FormSection as aT, type FormSectionProps as aU, type FormSubmitBehavior as aV, type FormTemplateConfig as aW, type GridLayoutCell as aX, type GridLayoutNode as aY, type ImageCompressionConfig as aZ, type ImageCompressionVariantConfig as a_, type PreparedFilePreview as aa, type FilePreviewCapability as ab, type FilePreviewMetadata as ac, type FilePreviewRequest as ad, type ProcessAction as ae, type InitiatorSelectedApprovers as af, type ReturnPolicy as ag, type ChangeRecord as ah, type StandardFormPageMode as ai, type LowcodePageSchema as aj, type AddressValue as ak, type ApprovalActionType as al, ApprovalTimeline as am, type ApprovalTimelineProps as an, type AssociationFormConfig as ao, type AssociationValue as ap, type AttachmentImageVariants as aq, type BaseFieldProps as ar, type BaseLayoutNode as as, type DataFilter as at, type DataLinkageCondition as au, type DataLinkageConfig as av, type DateRangeRestriction as aw, type DateRestrictionConfig as ax, type DateShortcutConfig as ay, type DateShortcutType as az, type FormSchema as b, type InitiatorSelectScope as b0, type
|
|
1292
|
+
export { type DepartmentSelectFieldProps as $, type ApprovalPermission as A, type ReturnParams as B, type ChangeRecordQueryParams as C, type SaveTaskParams as D, type TransferParams as E, type FieldDefinition as F, type TextFieldProps as G, type TextAreaFieldProps as H, type InitiatorSelectCandidate as I, type SelectFieldProps as J, type RadioFieldProps as K, type CheckboxFieldProps as L, type MultiSelectFieldProps as M, type NumberFieldProps as N, type OptionItem as O, type ProcessStatus as P, type DateFieldProps as Q, type RuntimeResponse as R, type StatusMeta as S, type TaskStatus as T, type CascadeDateFieldProps as U, type ValidationPreset as V, type WithdrawParams as W, type AttachmentFieldProps as X, type ImageFieldProps as Y, type SubFormFieldProps as Z, type UserSelectFieldProps as _, type FormRuntimeApi as a, type ImageVariant as a$, type CascadeSelectFieldProps as a0, type AddressFieldProps as a1, type AssociationFormFieldProps as a2, type EditorFieldProps as a3, type EditorChoiceOption as a4, type SerialNumberFieldProps as a5, type LocationFieldProps as a6, type DigitalSignatureFieldProps as a7, type JSONFieldProps as a8, type AttachmentItem as a9, type DefaultValueLinkageConfig as aA, type DepartmentSearchParams as aB, type DepartmentSearchResult as aC, type DepartmentSearchScope as aD, type DepartmentTreeNode as aE, type DigitalSignatureValue as aF, type EditorToolbarAction as aG, type FieldLayoutNode as aH, type FieldValueSyncConfig as aI, type FilePreviewCapabilityBatch as aJ, type FilePreviewProvider as aK, type FilePreviewRenderMode as aL, type FilePreviewSurface as aM, type FilePreviewType as aN, type FormEffectAction as aO, type FormEffectCondition as aP, type FormEffectConditionOperator as aQ, type FormEngineMode as aR, type FormLayoutNode as aS, FormSection as aT, type FormSectionProps as aU, type FormSubmitBehavior as aV, type FormTemplateConfig as aW, type GridLayoutCell as aX, type GridLayoutNode as aY, type ImageCompressionConfig as aZ, type ImageCompressionVariantConfig as a_, type PreparedFilePreview as aa, type FilePreviewCapability as ab, type FilePreviewMetadata as ac, type FilePreviewRequest as ad, type ProcessAction as ae, type InitiatorSelectedApprovers as af, type ReturnPolicy as ag, type ChangeRecord as ah, type StandardFormPageMode as ai, type LowcodePageSchema as aj, type AddressValue as ak, type ApprovalActionType as al, ApprovalTimeline as am, type ApprovalTimelineProps as an, type AssociationFormConfig as ao, type AssociationValue as ap, type AttachmentImageVariants as aq, type BaseFieldProps as ar, type BaseLayoutNode as as, type DataFilter as at, type DataLinkageCondition as au, type DataLinkageConfig as av, type DateRangeRestriction as aw, type DateRestrictionConfig as ax, type DateShortcutConfig as ay, type DateShortcutType as az, type FormSchema as b, type InitiatorSelectScope as b0, type JSONFieldEditorContext as b1, type JSONFieldRendererContext as b2, type LayoutVisibleWhen as b3, type LinkedFormOptionConfig as b4, type LocationValue as b5, type LowcodePageMeta as b6, type LowcodePageNode as b7, type LowcodePageNodeType as b8, type OptionSourceType as b9, type PeopleShortcutConfig as ba, type PeopleShortcutType as bb, type PreviewImageItem as bc, type ProcessNodeType as bd, ProcessPreview as be, type ProcessPreviewProps as bf, type RuntimeAuthHeadersProvider as bg, type RuntimeDataQueryParams as bh, type RuntimeDataQueryResult as bi, type RuntimeRequestConfig as bj, type RuntimeUploadOptions as bk, type RuntimeUploadProvider as bl, type SectionLayoutNode as bm, type SignaturePoint as bn, type StepLayoutItem as bo, type StepsLayoutNode as bp, type SubFormColumn as bq, type TabLayoutItem as br, type TabsLayoutNode as bs, type TextShortcutConfig as bt, type TextShortcutType as bu, type UserDisplayFormat as bv, type UserItem as bw, type FormRuntimeApiConfig as c, type FormEngineConfig as d, type FieldBehavior as e, type FormRuntimeConfig as f, type FormAppearanceConfig as g, type ValidationRule as h, type FormEffect as i, type OptionSourceConfig as j, type FormDataDeleteParams as k, type ChangeRecordListResponse as l, type FormDataQueryParams as m, type FormInstanceData as n, type InitiatorSelectRequirement as o, type ProcessBasicInfo as p, type ProcessDefinition as q, type ProcessTask as r, type ReturnableNodeResult as s, type ReturnableNode as t, type ViewPermissionQueryParams as u, type ViewPermissionSummary as v, type ApproveParams as w, type PreviewParams as x, type ProcessRoute as y, type ResubmitParams as z };
|