openxiangda 1.0.134 → 1.0.136
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 +6 -0
- package/lib/cli.js +947 -16
- package/lib/design-gates.js +40 -10
- package/lib/sdd.js +777 -0
- package/lib/workspace-init.js +3 -0
- package/openxiangda-skills/SKILL.md +11 -1
- package/openxiangda-skills/references/best-practices.md +32 -5
- package/openxiangda-skills/references/openxiangda-api.md +32 -6
- package/openxiangda-skills/references/pages/page-sdk.md +3 -0
- package/openxiangda-skills/references/pages/publish-flow.md +16 -0
- package/openxiangda-skills/references/permission-design-patterns.md +216 -0
- package/openxiangda-skills/references/permissions-settings.md +58 -0
- package/openxiangda-skills/references/platform-data-model.md +19 -4
- package/openxiangda-skills/references/resource-manifest-cheatsheet.md +32 -1
- package/openxiangda-skills/skills/openxiangda-architecture-design/SKILL.md +8 -0
- package/openxiangda-skills/skills/openxiangda-core/SKILL.md +2 -0
- package/openxiangda-skills/skills/openxiangda-permission-settings/SKILL.md +38 -1
- package/package.json +2 -1
- package/packages/sdk/dist/{ProcessPreview-Dfc4-wIq.d.mts → ProcessPreview-Ci8_UsbN.d.mts} +4 -0
- package/packages/sdk/dist/{ProcessPreview-Dfc4-wIq.d.ts → ProcessPreview-Ci8_UsbN.d.ts} +4 -0
- package/packages/sdk/dist/build/index.cjs.map +1 -1
- package/packages/sdk/dist/build/index.d.mts +7 -0
- package/packages/sdk/dist/build/index.d.ts +7 -0
- package/packages/sdk/dist/build/index.mjs.map +1 -1
- package/packages/sdk/dist/components/index.cjs +32 -4
- package/packages/sdk/dist/components/index.cjs.map +1 -1
- package/packages/sdk/dist/components/index.d.mts +8 -2
- package/packages/sdk/dist/components/index.d.ts +8 -2
- package/packages/sdk/dist/components/index.mjs +32 -4
- package/packages/sdk/dist/components/index.mjs.map +1 -1
- package/packages/sdk/dist/runtime/index.cjs +181 -28
- 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 +181 -28
- package/packages/sdk/dist/runtime/index.mjs.map +1 -1
- package/packages/sdk/dist/runtime/react.cjs +152 -25
- package/packages/sdk/dist/runtime/react.cjs.map +1 -1
- package/packages/sdk/dist/runtime/react.d.mts +57 -4
- package/packages/sdk/dist/runtime/react.d.ts +57 -4
- package/packages/sdk/dist/runtime/react.mjs +152 -25
- package/packages/sdk/dist/runtime/react.mjs.map +1 -1
- package/templates/openxiangda-react-spa/.cursor/rules/openxiangda.mdc +8 -1
- package/templates/openxiangda-react-spa/.qoder/rules/openxiangda.md +8 -1
- package/templates/openxiangda-react-spa/AGENTS.md +9 -1
- package/templates/openxiangda-react-spa/app-workspace.config.ts +14 -0
- package/templates/sy-lowcode-app-workspace/.cursor/rules/openxiangda-resources.mdc +5 -1
- package/templates/sy-lowcode-app-workspace/.cursor/rules/openxiangda.mdc +7 -1
- package/templates/sy-lowcode-app-workspace/.qoder/rules/openxiangda-resources.md +6 -0
- package/templates/sy-lowcode-app-workspace/.qoder/rules/openxiangda.md +7 -1
- package/templates/sy-lowcode-app-workspace/AGENTS.md +10 -1
- package/templates/sy-lowcode-app-workspace/app-workspace.config.ts +14 -0
- package/templates/sy-lowcode-app-workspace/examples/best-practices/README.md +3 -0
- package/templates/sy-lowcode-app-workspace/examples/best-practices/access-governance.md +239 -0
- package/templates/sy-lowcode-app-workspace/examples/best-practices/catalog.json +6 -0
- package/templates/sy-lowcode-app-workspace/examples/best-practices/decision-guide.md +25 -1
- package/templates/sy-lowcode-app-workspace/src/types/app-workspace.types.ts +12 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as FormEngineConfig, F as FormSchema, e as FieldBehavior, O as OptionItem, a as FormRuntimeApi, f as FormRuntimeConfig, g as FormAppearanceConfig, V as ValidationPreset, h as ValidationRule, i as FormEffect, b as FormRuntimeApiConfig, j as OptionSourceConfig, P as ProcessStatus, S as StatusMeta, T as TaskStatus, A as ApprovalPermission, k as FormDataDeleteParams, C as ChangeRecordQueryParams, l as ChangeRecordListResponse, m as FormDataQueryParams, n as FormInstanceData, I as InitiatorSelectCandidate, o as InitiatorSelectRequirement, p as ProcessBasicInfo, q as ProcessDefinition, r as ProcessTask, R as ReturnableNodeResult, s as ReturnableNode, t as ViewPermissionQueryParams, u as ViewPermissionSummary, v as ApproveParams, w as PreviewParams, x as ProcessRoute, y as ResubmitParams, z as ReturnParams, B as SaveTaskParams, D as TransferParams, W as WithdrawParams, c as FieldDefinition, E as RuntimeResponse, G as TextFieldProps, N as NumberFieldProps, H as TextAreaFieldProps, J as SelectFieldProps, M as MultiSelectFieldProps, K as RadioFieldProps, L as CheckboxFieldProps, Q as DateFieldProps, U as CascadeDateFieldProps, X as AttachmentFieldProps, Y as ImageFieldProps, Z as SubFormFieldProps, _ as UserSelectFieldProps, $ as DepartmentSelectFieldProps, a0 as CascadeSelectFieldProps, a1 as AddressFieldProps, a2 as AssociationFormFieldProps, a3 as EditorFieldProps, a4 as EditorChoiceOption, a5 as SerialNumberFieldProps, a6 as LocationFieldProps, a7 as DigitalSignatureFieldProps, a8 as JSONFieldProps, a9 as ProcessAction, aa as InitiatorSelectedApprovers, ab as ReturnPolicy, ac as ChangeRecord, ad as StandardFormPageMode, ae as LowcodePageSchema } from '../ProcessPreview-
|
|
2
|
-
export { af as AddressValue, ag as ApprovalActionType, ah as ApprovalTimeline, ai as ApprovalTimelineProps, aj as AssociationFormConfig, ak as AssociationValue, al as AttachmentImageVariants, am as AttachmentItem, an as BaseFieldProps, ao as BaseLayoutNode, ap as DataFilter, aq as DataLinkageCondition, ar as DataLinkageConfig, as as DateRangeRestriction, at as DateRestrictionConfig, au as DateShortcutConfig, av as DateShortcutType, aw as DefaultValueLinkageConfig, ax as DepartmentTreeNode, ay as DigitalSignatureValue, az as EditorToolbarAction, aA as FieldLayoutNode, aB as FieldValueSyncConfig, aC as FormEffectAction, aD as FormEffectCondition, aE as FormEffectConditionOperator, aF as FormEngineMode, aG as FormLayoutNode, aH as FormSection, aI as FormSectionProps, aJ as FormSubmitBehavior, aK as FormTemplateConfig, aL as GridLayoutCell, aM as GridLayoutNode, aN as ImageCompressionConfig, aO as ImageCompressionVariantConfig, aP as ImageVariant, aQ as InitiatorSelectScope, aR as LayoutVisibleWhen, aS as LinkedFormOptionConfig, aT as LocationValue, aU as LowcodePageMeta, aV as LowcodePageNode, aW as LowcodePageNodeType, aX as OptionSourceType, aY as PeopleShortcutConfig, aZ as PeopleShortcutType, a_ as ProcessNodeType, a$ as ProcessPreview, b0 as ProcessPreviewProps, b1 as RuntimeDataQueryParams, b2 as RuntimeDataQueryResult, b3 as RuntimeRequestConfig, b4 as RuntimeUploadOptions, b5 as RuntimeUploadProvider, b6 as SectionLayoutNode, b7 as SignaturePoint, b8 as StepLayoutItem, b9 as StepsLayoutNode, ba as SubFormColumn, bb as TabLayoutItem, bc as TabsLayoutNode, bd as TextShortcutConfig, be as TextShortcutType, bf as UserDisplayFormat, bg as UserItem } from '../ProcessPreview-
|
|
1
|
+
import { d as FormEngineConfig, F as FormSchema, e as FieldBehavior, O as OptionItem, a as FormRuntimeApi, f as FormRuntimeConfig, g as FormAppearanceConfig, V as ValidationPreset, h as ValidationRule, i as FormEffect, b as FormRuntimeApiConfig, j as OptionSourceConfig, P as ProcessStatus, S as StatusMeta, T as TaskStatus, A as ApprovalPermission, k as FormDataDeleteParams, C as ChangeRecordQueryParams, l as ChangeRecordListResponse, m as FormDataQueryParams, n as FormInstanceData, I as InitiatorSelectCandidate, o as InitiatorSelectRequirement, p as ProcessBasicInfo, q as ProcessDefinition, r as ProcessTask, R as ReturnableNodeResult, s as ReturnableNode, t as ViewPermissionQueryParams, u as ViewPermissionSummary, v as ApproveParams, w as PreviewParams, x as ProcessRoute, y as ResubmitParams, z as ReturnParams, B as SaveTaskParams, D as TransferParams, W as WithdrawParams, c as FieldDefinition, E as RuntimeResponse, G as TextFieldProps, N as NumberFieldProps, H as TextAreaFieldProps, J as SelectFieldProps, M as MultiSelectFieldProps, K as RadioFieldProps, L as CheckboxFieldProps, Q as DateFieldProps, U as CascadeDateFieldProps, X as AttachmentFieldProps, Y as ImageFieldProps, Z as SubFormFieldProps, _ as UserSelectFieldProps, $ as DepartmentSelectFieldProps, a0 as CascadeSelectFieldProps, a1 as AddressFieldProps, a2 as AssociationFormFieldProps, a3 as EditorFieldProps, a4 as EditorChoiceOption, a5 as SerialNumberFieldProps, a6 as LocationFieldProps, a7 as DigitalSignatureFieldProps, a8 as JSONFieldProps, a9 as ProcessAction, aa as InitiatorSelectedApprovers, ab as ReturnPolicy, ac as ChangeRecord, ad as StandardFormPageMode, ae as LowcodePageSchema } from '../ProcessPreview-Ci8_UsbN.mjs';
|
|
2
|
+
export { af as AddressValue, ag as ApprovalActionType, ah as ApprovalTimeline, ai as ApprovalTimelineProps, aj as AssociationFormConfig, ak as AssociationValue, al as AttachmentImageVariants, am as AttachmentItem, an as BaseFieldProps, ao as BaseLayoutNode, ap as DataFilter, aq as DataLinkageCondition, ar as DataLinkageConfig, as as DateRangeRestriction, at as DateRestrictionConfig, au as DateShortcutConfig, av as DateShortcutType, aw as DefaultValueLinkageConfig, ax as DepartmentTreeNode, ay as DigitalSignatureValue, az as EditorToolbarAction, aA as FieldLayoutNode, aB as FieldValueSyncConfig, aC as FormEffectAction, aD as FormEffectCondition, aE as FormEffectConditionOperator, aF as FormEngineMode, aG as FormLayoutNode, aH as FormSection, aI as FormSectionProps, aJ as FormSubmitBehavior, aK as FormTemplateConfig, aL as GridLayoutCell, aM as GridLayoutNode, aN as ImageCompressionConfig, aO as ImageCompressionVariantConfig, aP as ImageVariant, aQ as InitiatorSelectScope, aR as LayoutVisibleWhen, aS as LinkedFormOptionConfig, aT as LocationValue, aU as LowcodePageMeta, aV as LowcodePageNode, aW as LowcodePageNodeType, aX as OptionSourceType, aY as PeopleShortcutConfig, aZ as PeopleShortcutType, a_ as ProcessNodeType, a$ as ProcessPreview, b0 as ProcessPreviewProps, b1 as RuntimeDataQueryParams, b2 as RuntimeDataQueryResult, b3 as RuntimeRequestConfig, b4 as RuntimeUploadOptions, b5 as RuntimeUploadProvider, b6 as SectionLayoutNode, b7 as SignaturePoint, b8 as StepLayoutItem, b9 as StepsLayoutNode, ba as SubFormColumn, bb as TabLayoutItem, bc as TabsLayoutNode, bd as TextShortcutConfig, be as TextShortcutType, bf as UserDisplayFormat, bg as UserItem } from '../ProcessPreview-Ci8_UsbN.mjs';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import React__default from 'react';
|
|
5
5
|
|
|
@@ -904,6 +904,7 @@ interface DataManagementListProps {
|
|
|
904
904
|
detailPageUrlBuilder?: DetailPageUrlBuilder;
|
|
905
905
|
submitRenderer?: SubmitRenderer;
|
|
906
906
|
requestOverride?: FormRuntimeApi['request'] | FormRuntimeApiConfig;
|
|
907
|
+
allowSchemaFallback?: boolean;
|
|
907
908
|
rowActions?: DataManagementRowAction[];
|
|
908
909
|
maxVisibleRowActions?: number;
|
|
909
910
|
}
|
|
@@ -999,6 +1000,7 @@ interface StandardFormPageProps {
|
|
|
999
1000
|
formInstanceId?: string;
|
|
1000
1001
|
defaultUploadProvider?: FormEngineConfig['defaultUploadProvider'];
|
|
1001
1002
|
submitBehavior?: FormEngineConfig['submitBehavior'];
|
|
1003
|
+
compatibility?: FormEngineConfig['compatibility'];
|
|
1002
1004
|
onSubmit?: (values: Record<string, any>) => Promise<any>;
|
|
1003
1005
|
onSubmitSuccess?: (formInstId: string) => void;
|
|
1004
1006
|
inDrawer?: boolean;
|
|
@@ -1008,6 +1010,10 @@ declare const StandardFormPage: React__default.FC<StandardFormPageProps>;
|
|
|
1008
1010
|
interface LowcodePageRuntimeContext {
|
|
1009
1011
|
appType?: string;
|
|
1010
1012
|
mode?: string;
|
|
1013
|
+
compatibility?: {
|
|
1014
|
+
apiContracts?: 'strict' | 'legacy';
|
|
1015
|
+
legacyFallbacks?: boolean;
|
|
1016
|
+
};
|
|
1011
1017
|
route?: Record<string, any>;
|
|
1012
1018
|
bridge?: {
|
|
1013
1019
|
invoke?: (method: string, payload?: any) => Promise<any>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as FormEngineConfig, F as FormSchema, e as FieldBehavior, O as OptionItem, a as FormRuntimeApi, f as FormRuntimeConfig, g as FormAppearanceConfig, V as ValidationPreset, h as ValidationRule, i as FormEffect, b as FormRuntimeApiConfig, j as OptionSourceConfig, P as ProcessStatus, S as StatusMeta, T as TaskStatus, A as ApprovalPermission, k as FormDataDeleteParams, C as ChangeRecordQueryParams, l as ChangeRecordListResponse, m as FormDataQueryParams, n as FormInstanceData, I as InitiatorSelectCandidate, o as InitiatorSelectRequirement, p as ProcessBasicInfo, q as ProcessDefinition, r as ProcessTask, R as ReturnableNodeResult, s as ReturnableNode, t as ViewPermissionQueryParams, u as ViewPermissionSummary, v as ApproveParams, w as PreviewParams, x as ProcessRoute, y as ResubmitParams, z as ReturnParams, B as SaveTaskParams, D as TransferParams, W as WithdrawParams, c as FieldDefinition, E as RuntimeResponse, G as TextFieldProps, N as NumberFieldProps, H as TextAreaFieldProps, J as SelectFieldProps, M as MultiSelectFieldProps, K as RadioFieldProps, L as CheckboxFieldProps, Q as DateFieldProps, U as CascadeDateFieldProps, X as AttachmentFieldProps, Y as ImageFieldProps, Z as SubFormFieldProps, _ as UserSelectFieldProps, $ as DepartmentSelectFieldProps, a0 as CascadeSelectFieldProps, a1 as AddressFieldProps, a2 as AssociationFormFieldProps, a3 as EditorFieldProps, a4 as EditorChoiceOption, a5 as SerialNumberFieldProps, a6 as LocationFieldProps, a7 as DigitalSignatureFieldProps, a8 as JSONFieldProps, a9 as ProcessAction, aa as InitiatorSelectedApprovers, ab as ReturnPolicy, ac as ChangeRecord, ad as StandardFormPageMode, ae as LowcodePageSchema } from '../ProcessPreview-
|
|
2
|
-
export { af as AddressValue, ag as ApprovalActionType, ah as ApprovalTimeline, ai as ApprovalTimelineProps, aj as AssociationFormConfig, ak as AssociationValue, al as AttachmentImageVariants, am as AttachmentItem, an as BaseFieldProps, ao as BaseLayoutNode, ap as DataFilter, aq as DataLinkageCondition, ar as DataLinkageConfig, as as DateRangeRestriction, at as DateRestrictionConfig, au as DateShortcutConfig, av as DateShortcutType, aw as DefaultValueLinkageConfig, ax as DepartmentTreeNode, ay as DigitalSignatureValue, az as EditorToolbarAction, aA as FieldLayoutNode, aB as FieldValueSyncConfig, aC as FormEffectAction, aD as FormEffectCondition, aE as FormEffectConditionOperator, aF as FormEngineMode, aG as FormLayoutNode, aH as FormSection, aI as FormSectionProps, aJ as FormSubmitBehavior, aK as FormTemplateConfig, aL as GridLayoutCell, aM as GridLayoutNode, aN as ImageCompressionConfig, aO as ImageCompressionVariantConfig, aP as ImageVariant, aQ as InitiatorSelectScope, aR as LayoutVisibleWhen, aS as LinkedFormOptionConfig, aT as LocationValue, aU as LowcodePageMeta, aV as LowcodePageNode, aW as LowcodePageNodeType, aX as OptionSourceType, aY as PeopleShortcutConfig, aZ as PeopleShortcutType, a_ as ProcessNodeType, a$ as ProcessPreview, b0 as ProcessPreviewProps, b1 as RuntimeDataQueryParams, b2 as RuntimeDataQueryResult, b3 as RuntimeRequestConfig, b4 as RuntimeUploadOptions, b5 as RuntimeUploadProvider, b6 as SectionLayoutNode, b7 as SignaturePoint, b8 as StepLayoutItem, b9 as StepsLayoutNode, ba as SubFormColumn, bb as TabLayoutItem, bc as TabsLayoutNode, bd as TextShortcutConfig, be as TextShortcutType, bf as UserDisplayFormat, bg as UserItem } from '../ProcessPreview-
|
|
1
|
+
import { d as FormEngineConfig, F as FormSchema, e as FieldBehavior, O as OptionItem, a as FormRuntimeApi, f as FormRuntimeConfig, g as FormAppearanceConfig, V as ValidationPreset, h as ValidationRule, i as FormEffect, b as FormRuntimeApiConfig, j as OptionSourceConfig, P as ProcessStatus, S as StatusMeta, T as TaskStatus, A as ApprovalPermission, k as FormDataDeleteParams, C as ChangeRecordQueryParams, l as ChangeRecordListResponse, m as FormDataQueryParams, n as FormInstanceData, I as InitiatorSelectCandidate, o as InitiatorSelectRequirement, p as ProcessBasicInfo, q as ProcessDefinition, r as ProcessTask, R as ReturnableNodeResult, s as ReturnableNode, t as ViewPermissionQueryParams, u as ViewPermissionSummary, v as ApproveParams, w as PreviewParams, x as ProcessRoute, y as ResubmitParams, z as ReturnParams, B as SaveTaskParams, D as TransferParams, W as WithdrawParams, c as FieldDefinition, E as RuntimeResponse, G as TextFieldProps, N as NumberFieldProps, H as TextAreaFieldProps, J as SelectFieldProps, M as MultiSelectFieldProps, K as RadioFieldProps, L as CheckboxFieldProps, Q as DateFieldProps, U as CascadeDateFieldProps, X as AttachmentFieldProps, Y as ImageFieldProps, Z as SubFormFieldProps, _ as UserSelectFieldProps, $ as DepartmentSelectFieldProps, a0 as CascadeSelectFieldProps, a1 as AddressFieldProps, a2 as AssociationFormFieldProps, a3 as EditorFieldProps, a4 as EditorChoiceOption, a5 as SerialNumberFieldProps, a6 as LocationFieldProps, a7 as DigitalSignatureFieldProps, a8 as JSONFieldProps, a9 as ProcessAction, aa as InitiatorSelectedApprovers, ab as ReturnPolicy, ac as ChangeRecord, ad as StandardFormPageMode, ae as LowcodePageSchema } from '../ProcessPreview-Ci8_UsbN.js';
|
|
2
|
+
export { af as AddressValue, ag as ApprovalActionType, ah as ApprovalTimeline, ai as ApprovalTimelineProps, aj as AssociationFormConfig, ak as AssociationValue, al as AttachmentImageVariants, am as AttachmentItem, an as BaseFieldProps, ao as BaseLayoutNode, ap as DataFilter, aq as DataLinkageCondition, ar as DataLinkageConfig, as as DateRangeRestriction, at as DateRestrictionConfig, au as DateShortcutConfig, av as DateShortcutType, aw as DefaultValueLinkageConfig, ax as DepartmentTreeNode, ay as DigitalSignatureValue, az as EditorToolbarAction, aA as FieldLayoutNode, aB as FieldValueSyncConfig, aC as FormEffectAction, aD as FormEffectCondition, aE as FormEffectConditionOperator, aF as FormEngineMode, aG as FormLayoutNode, aH as FormSection, aI as FormSectionProps, aJ as FormSubmitBehavior, aK as FormTemplateConfig, aL as GridLayoutCell, aM as GridLayoutNode, aN as ImageCompressionConfig, aO as ImageCompressionVariantConfig, aP as ImageVariant, aQ as InitiatorSelectScope, aR as LayoutVisibleWhen, aS as LinkedFormOptionConfig, aT as LocationValue, aU as LowcodePageMeta, aV as LowcodePageNode, aW as LowcodePageNodeType, aX as OptionSourceType, aY as PeopleShortcutConfig, aZ as PeopleShortcutType, a_ as ProcessNodeType, a$ as ProcessPreview, b0 as ProcessPreviewProps, b1 as RuntimeDataQueryParams, b2 as RuntimeDataQueryResult, b3 as RuntimeRequestConfig, b4 as RuntimeUploadOptions, b5 as RuntimeUploadProvider, b6 as SectionLayoutNode, b7 as SignaturePoint, b8 as StepLayoutItem, b9 as StepsLayoutNode, ba as SubFormColumn, bb as TabLayoutItem, bc as TabsLayoutNode, bd as TextShortcutConfig, be as TextShortcutType, bf as UserDisplayFormat, bg as UserItem } from '../ProcessPreview-Ci8_UsbN.js';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import React__default from 'react';
|
|
5
5
|
|
|
@@ -904,6 +904,7 @@ interface DataManagementListProps {
|
|
|
904
904
|
detailPageUrlBuilder?: DetailPageUrlBuilder;
|
|
905
905
|
submitRenderer?: SubmitRenderer;
|
|
906
906
|
requestOverride?: FormRuntimeApi['request'] | FormRuntimeApiConfig;
|
|
907
|
+
allowSchemaFallback?: boolean;
|
|
907
908
|
rowActions?: DataManagementRowAction[];
|
|
908
909
|
maxVisibleRowActions?: number;
|
|
909
910
|
}
|
|
@@ -999,6 +1000,7 @@ interface StandardFormPageProps {
|
|
|
999
1000
|
formInstanceId?: string;
|
|
1000
1001
|
defaultUploadProvider?: FormEngineConfig['defaultUploadProvider'];
|
|
1001
1002
|
submitBehavior?: FormEngineConfig['submitBehavior'];
|
|
1003
|
+
compatibility?: FormEngineConfig['compatibility'];
|
|
1002
1004
|
onSubmit?: (values: Record<string, any>) => Promise<any>;
|
|
1003
1005
|
onSubmitSuccess?: (formInstId: string) => void;
|
|
1004
1006
|
inDrawer?: boolean;
|
|
@@ -1008,6 +1010,10 @@ declare const StandardFormPage: React__default.FC<StandardFormPageProps>;
|
|
|
1008
1010
|
interface LowcodePageRuntimeContext {
|
|
1009
1011
|
appType?: string;
|
|
1010
1012
|
mode?: string;
|
|
1013
|
+
compatibility?: {
|
|
1014
|
+
apiContracts?: 'strict' | 'legacy';
|
|
1015
|
+
legacyFallbacks?: boolean;
|
|
1016
|
+
};
|
|
1011
1017
|
route?: Record<string, any>;
|
|
1012
1018
|
bridge?: {
|
|
1013
1019
|
invoke?: (method: string, payload?: any) => Promise<any>;
|
|
@@ -16133,7 +16133,23 @@ var pickFormInstanceId = (value) => {
|
|
|
16133
16133
|
if (!value) return void 0;
|
|
16134
16134
|
if (typeof value === "string") return value;
|
|
16135
16135
|
if (typeof value !== "object") return void 0;
|
|
16136
|
-
|
|
16136
|
+
const direct = value.formInstanceId || value.formInstId || value.instanceId || value.id;
|
|
16137
|
+
if (direct) return pickFormInstanceId(direct);
|
|
16138
|
+
for (const candidate of [value.result, value.data, value.raw]) {
|
|
16139
|
+
const picked = pickFormInstanceId(candidate);
|
|
16140
|
+
if (picked) return picked;
|
|
16141
|
+
}
|
|
16142
|
+
return void 0;
|
|
16143
|
+
};
|
|
16144
|
+
var getSubmitResultFormInstanceId = (submitResponse, config, submitBehavior) => {
|
|
16145
|
+
const responseId = pickFormInstanceId(submitResponse);
|
|
16146
|
+
if (responseId) return responseId;
|
|
16147
|
+
if (submitBehavior !== "create" && config.formInstanceId) {
|
|
16148
|
+
return config.formInstanceId;
|
|
16149
|
+
}
|
|
16150
|
+
throw new Error(
|
|
16151
|
+
"\u63D0\u4EA4\u63A5\u53E3\u672A\u8FD4\u56DE formInstId/formInstanceId\u3002\u4FDD\u5B58\u63A5\u53E3\u53EA\u8FD4\u56DE\u5B9E\u4F8B\u6807\u8BC6\u548C\u5DF2\u751F\u6210\u7684\u6D41\u6C34\u53F7\uFF1B\u5982\u9700\u5B8C\u6574\u6570\u636E\u3001\u516C\u5F0F\u56DE\u586B\u6216\u5176\u4ED6\u670D\u52A1\u7AEF\u5B57\u6BB5\uFF0C\u8BF7\u4FDD\u5B58\u6210\u529F\u540E\u518D\u67E5\u8BE2\u8BE6\u60C5\u3002"
|
|
16152
|
+
);
|
|
16137
16153
|
};
|
|
16138
16154
|
var normalizeFormDataForSubmit = (schema, formData) => {
|
|
16139
16155
|
const next = { ...formData };
|
|
@@ -16332,7 +16348,7 @@ var InnerFormContent = ({
|
|
|
16332
16348
|
selectedApprovers: initiatorSelectedApprovers,
|
|
16333
16349
|
initiatorSelectedApprovers
|
|
16334
16350
|
});
|
|
16335
|
-
const formInstId =
|
|
16351
|
+
const formInstId = getSubmitResultFormInstanceId(submitResponse, config, submitBehavior);
|
|
16336
16352
|
if (config.submit?.afterSubmit) {
|
|
16337
16353
|
await config.submit.afterSubmit({
|
|
16338
16354
|
formInstanceId: formInstId,
|
|
@@ -16356,6 +16372,7 @@ var InnerFormContent = ({
|
|
|
16356
16372
|
}
|
|
16357
16373
|
} catch (error) {
|
|
16358
16374
|
console.error("[FormSubmitTemplate] Submit failed:", error);
|
|
16375
|
+
message3.error(error instanceof Error ? error.message : "\u63D0\u4EA4\u5931\u8D25");
|
|
16359
16376
|
} finally {
|
|
16360
16377
|
setSubmitting(false);
|
|
16361
16378
|
}
|
|
@@ -17383,6 +17400,7 @@ var StandardFormPage = ({
|
|
|
17383
17400
|
formInstanceId,
|
|
17384
17401
|
defaultUploadProvider,
|
|
17385
17402
|
submitBehavior,
|
|
17403
|
+
compatibility,
|
|
17386
17404
|
onSubmit,
|
|
17387
17405
|
onSubmitSuccess,
|
|
17388
17406
|
inDrawer
|
|
@@ -17456,6 +17474,7 @@ var StandardFormPage = ({
|
|
|
17456
17474
|
defaultUploadProvider,
|
|
17457
17475
|
submitBehavior,
|
|
17458
17476
|
permissions,
|
|
17477
|
+
compatibility,
|
|
17459
17478
|
api
|
|
17460
17479
|
},
|
|
17461
17480
|
formType,
|
|
@@ -18416,6 +18435,7 @@ var DataManagementList = ({
|
|
|
18416
18435
|
detailPageUrlBuilder,
|
|
18417
18436
|
submitRenderer,
|
|
18418
18437
|
requestOverride,
|
|
18438
|
+
allowSchemaFallback = false,
|
|
18419
18439
|
rowActions = [],
|
|
18420
18440
|
maxVisibleRowActions
|
|
18421
18441
|
}) => {
|
|
@@ -18583,6 +18603,11 @@ var DataManagementList = ({
|
|
|
18583
18603
|
const nextSearchKeyWord = saved?.filter?.searchKeyWord || "";
|
|
18584
18604
|
const nextFilterGroup = hydrateFilterGroup(saved?.filter?.group);
|
|
18585
18605
|
const nextFormType = propFormType || schemaResult.formType || "form";
|
|
18606
|
+
if (!schemaResult.schema && !allowSchemaFallback) {
|
|
18607
|
+
throw new Error(
|
|
18608
|
+
`\u8868\u5355 schema \u4E0D\u5B58\u5728\u6216\u672A\u53D1\u5E03: ${formUuid}\u3002\u8BF7\u5148\u53D1\u5E03\u8868\u5355 schema\uFF1B\u4E25\u683C\u6A21\u5F0F\u4E0D\u4F1A\u751F\u6210\u515C\u5E95\u8868\u5355\u3002`
|
|
18609
|
+
);
|
|
18610
|
+
}
|
|
18586
18611
|
setFields(allFields);
|
|
18587
18612
|
setRuntimeFormSchema(
|
|
18588
18613
|
schemaResult.schema || buildFallbackFormSchema({
|
|
@@ -18613,7 +18638,7 @@ var DataManagementList = ({
|
|
|
18613
18638
|
});
|
|
18614
18639
|
} catch (error) {
|
|
18615
18640
|
console.error("[DataManagementList] load schema failed:", error);
|
|
18616
|
-
message5.error("\u52A0\u8F7D\u8868\u5355\u914D\u7F6E\u5931\u8D25");
|
|
18641
|
+
message5.error(error instanceof Error ? error.message : "\u52A0\u8F7D\u8868\u5355\u914D\u7F6E\u5931\u8D25");
|
|
18617
18642
|
} finally {
|
|
18618
18643
|
if (mounted) setSchemaLoading(false);
|
|
18619
18644
|
}
|
|
@@ -18624,6 +18649,7 @@ var DataManagementList = ({
|
|
|
18624
18649
|
};
|
|
18625
18650
|
}, [
|
|
18626
18651
|
appType,
|
|
18652
|
+
allowSchemaFallback,
|
|
18627
18653
|
forcedConfig,
|
|
18628
18654
|
formTitle,
|
|
18629
18655
|
formUuid,
|
|
@@ -19632,7 +19658,8 @@ function LowcodePageRenderer({ schema, context }) {
|
|
|
19632
19658
|
forcedConfig: props.forcedConfig,
|
|
19633
19659
|
showForcedConfig: props.showForcedConfig,
|
|
19634
19660
|
maxVisibleRowActions: props.maxVisibleRowActions,
|
|
19635
|
-
requestOverride
|
|
19661
|
+
requestOverride,
|
|
19662
|
+
allowSchemaFallback: props.allowSchemaFallback ?? context?.compatibility?.legacyFallbacks ?? false
|
|
19636
19663
|
},
|
|
19637
19664
|
node.id
|
|
19638
19665
|
);
|
|
@@ -19645,6 +19672,7 @@ function LowcodePageRenderer({ schema, context }) {
|
|
|
19645
19672
|
mode: props.mode || context?.mode || "submit",
|
|
19646
19673
|
appType: props.appType || appType,
|
|
19647
19674
|
formUuid: props.formUuid || props.schema?.formMeta?.formUuid,
|
|
19675
|
+
compatibility: props.compatibility || context?.compatibility,
|
|
19648
19676
|
inDrawer: props.inDrawer ?? true
|
|
19649
19677
|
},
|
|
19650
19678
|
node.id
|