openxiangda 1.0.33 → 1.0.35
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 +16 -0
- package/lib/cli.js +409 -0
- package/lib/workspace-init.js +1 -0
- package/openxiangda-skills/SKILL.md +7 -0
- package/openxiangda-skills/references/architecture-patterns.md +2 -2
- package/openxiangda-skills/references/best-practices.md +42 -12
- package/openxiangda-skills/references/connector-resources.md +3 -0
- package/openxiangda-skills/references/data-views.md +217 -0
- package/openxiangda-skills/references/forms/component-registry.md +4 -2
- package/openxiangda-skills/references/forms/form-schema.md +37 -0
- package/openxiangda-skills/references/pages/page-sdk.md +43 -0
- package/openxiangda-skills/references/pages/workspace-structure.md +1 -0
- package/openxiangda-skills/references/workspace-state.md +9 -0
- package/openxiangda-skills/skills/openxiangda-form/SKILL.md +8 -1
- package/openxiangda-skills/skills/openxiangda-page/SKILL.md +1 -0
- package/openxiangda-skills/skills/openxiangda-permission-settings/SKILL.md +1 -1
- package/package.json +1 -1
- package/packages/sdk/dist/components/index.cjs +944 -765
- package/packages/sdk/dist/components/index.cjs.map +1 -1
- package/packages/sdk/dist/components/index.d.mts +18 -2
- package/packages/sdk/dist/components/index.d.ts +18 -2
- package/packages/sdk/dist/components/index.mjs +938 -761
- package/packages/sdk/dist/components/index.mjs.map +1 -1
- package/packages/sdk/dist/runtime/index.cjs +47 -0
- package/packages/sdk/dist/runtime/index.cjs.map +1 -1
- package/packages/sdk/dist/runtime/index.d.mts +18 -1
- package/packages/sdk/dist/runtime/index.d.ts +18 -1
- package/packages/sdk/dist/runtime/index.mjs +47 -0
- package/packages/sdk/dist/runtime/index.mjs.map +1 -1
- package/packages/sdk/src/build-source/scripts/utils/form-api.mjs +1 -0
- package/templates/sy-lowcode-app-workspace/examples/best-practices/catalog.json +1 -1
- package/templates/sy-lowcode-app-workspace/examples/best-practices/decision-guide.md +12 -6
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/domain/role-governance/permissions.test.ts +24 -7
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/domain/role-governance/permissions.ts +13 -0
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/domain/role-governance/types.ts +8 -6
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/domain/service-ticket/permissions.test.ts +5 -5
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/domain/service-ticket/permissions.ts +7 -5
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/domain/service-ticket/state-machine.test.ts +1 -1
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/domain/service-ticket/state-machine.ts +3 -3
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/domain/service-ticket/ticket-query.test.ts +2 -2
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/domain/service-ticket/ticket-query.ts +8 -8
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/domain/service-ticket/types.ts +12 -10
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/forms/app-role/schema.ts +58 -6
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/forms/customer-profile/schema.ts +9 -0
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/forms/service-ticket/schema.ts +72 -16
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/service-ticket-ops/components/TicketDetailDrawer.tsx +6 -3
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/service-ticket-ops/components/TicketTableActions.tsx +6 -4
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/resources/permissions/form-groups/service-ticket-college.json +2 -2
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/resources/permissions/roles.json +2 -2
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/shared/services/service-ticket.ts +4 -4
- package/templates/sy-lowcode-app-workspace/examples/forms/customer/schema.ts +1 -0
- package/templates/sy-lowcode-app-workspace/src/shared/form-schema.ts +1 -0
|
@@ -410,6 +410,11 @@ interface OptionItem {
|
|
|
410
410
|
color?: string;
|
|
411
411
|
disabled?: boolean;
|
|
412
412
|
}
|
|
413
|
+
interface FieldValueSyncConfig {
|
|
414
|
+
targetFieldId: string;
|
|
415
|
+
valuePath?: 'value' | 'label';
|
|
416
|
+
emptyValue?: any;
|
|
417
|
+
}
|
|
413
418
|
type OptionSourceType = 'custom' | 'linkedForm' | 'dataLinkage';
|
|
414
419
|
interface OptionSourceConfig {
|
|
415
420
|
type: OptionSourceType;
|
|
@@ -421,10 +426,19 @@ interface LinkedFormOptionConfig {
|
|
|
421
426
|
formTitle?: string;
|
|
422
427
|
fieldId: string;
|
|
423
428
|
fieldLabel?: string;
|
|
429
|
+
valueFieldId?: string;
|
|
430
|
+
valueFieldLabel?: string;
|
|
431
|
+
labelFieldId?: string;
|
|
432
|
+
labelFieldLabel?: string;
|
|
433
|
+
searchFieldId?: string;
|
|
434
|
+
searchFieldLabel?: string;
|
|
424
435
|
sortField?: string;
|
|
425
436
|
sortOrder?: 'asc' | 'desc';
|
|
426
437
|
filters?: DataFilter[];
|
|
427
438
|
deduplicate?: boolean;
|
|
439
|
+
pageSize?: number;
|
|
440
|
+
remoteSearch?: boolean;
|
|
441
|
+
remoteSearchMinChars?: number;
|
|
428
442
|
}
|
|
429
443
|
interface DataLinkageConfig {
|
|
430
444
|
formUuid: string;
|
|
@@ -482,6 +496,7 @@ interface SelectFieldProps extends BaseFieldProps {
|
|
|
482
496
|
optionSource?: OptionSourceConfig;
|
|
483
497
|
coloredOptions?: boolean;
|
|
484
498
|
defaultValueLinkage?: DefaultValueLinkageConfig;
|
|
499
|
+
valueSync?: FieldValueSyncConfig[];
|
|
485
500
|
}
|
|
486
501
|
/** MultiSelectField 专用 Props */
|
|
487
502
|
interface MultiSelectFieldProps extends BaseFieldProps {
|
|
@@ -1066,6 +1081,7 @@ interface FormContextValue {
|
|
|
1066
1081
|
layoutBehaviors: Record<string, FieldBehavior>;
|
|
1067
1082
|
dynamicOptions: Record<string, OptionItem[]>;
|
|
1068
1083
|
api: FormRuntimeApi;
|
|
1084
|
+
runtime: FormRuntimeConfig;
|
|
1069
1085
|
config: Pick<FormEngineConfig, 'mode' | 'formUuid' | 'appType' | 'formInstanceId' | 'submit'>;
|
|
1070
1086
|
setFieldValue: (fieldId: string, value: any) => void;
|
|
1071
1087
|
getFieldValue: (fieldId: string) => any;
|
|
@@ -1180,7 +1196,7 @@ declare function createFormRuntimeApi(config?: FormRuntimeApiConfig): FormRuntim
|
|
|
1180
1196
|
/**
|
|
1181
1197
|
* 解析选项数据源,返回选项列表
|
|
1182
1198
|
*/
|
|
1183
|
-
declare function resolveOptions(config: OptionSourceConfig, runtime: FormRuntimeConfig | undefined, formData: Record<string, any
|
|
1199
|
+
declare function resolveOptions(config: OptionSourceConfig, runtime: FormRuntimeConfig | undefined, formData: Record<string, any>, searchKeyword?: string): Promise<OptionItem[]>;
|
|
1184
1200
|
/**
|
|
1185
1201
|
* 解析默认值联动(用于非选择类字段的数据联动默认值)
|
|
1186
1202
|
*/
|
|
@@ -2093,4 +2109,4 @@ interface PageSkeletonProps {
|
|
|
2093
2109
|
}
|
|
2094
2110
|
declare const PageSkeleton: React__default.FC<PageSkeletonProps>;
|
|
2095
2111
|
|
|
2096
|
-
export { type ActionConfig, AddressField, type AddressFieldProps, type AddressValue, ApprovalActionBar, type ApprovalActionBarProps, type ApprovalActionType, ApprovalActions, type ApprovalActionsProps, type ApprovalPermission, ApprovalTimeline, type ApprovalTimelineProps, type ApproveParams, type AssociationFormConfig, AssociationFormField, type AssociationFormFieldProps, type AssociationValue, AttachmentField, type AttachmentFieldProps, type AttachmentItem, type BaseFieldProps, type BaseLayoutNode, CascadeDateField, type CascadeDateFieldProps, CascadeSelectField, type CascadeSelectFieldProps, type ChangeRecord, type ChangeRecordListResponse, type ChangeRecordQueryParams, ChangeRecords, type ChangeRecordsProps, CheckboxField, type CheckboxFieldProps, ComponentRegistryContext, type ComponentRegistryContextValue, ComponentRegistryProvider, type DataFilter, type DataLinkageCondition, type DataLinkageConfig, type DataManagementConfig, type DataManagementConfigScope, type DataManagementDensity, type DataManagementField, type DataManagementFilterGroup, type DataManagementFilterRule, DataManagementList, type DataManagementListProps, type DataManagementListResult, type DataManagementQuery, type DataManagementRowAction, type DataManagementSort, DateField, type DateFieldProps, type DateRangeRestriction, type DateRestrictionConfig, type DateShortcutConfig, type DateShortcutType, type DefaultValueLinkageConfig, DepartmentSelectField, type DepartmentSelectFieldProps, type DepartmentTreeNode, type DeviceDetectResult, DigitalSignatureField, type DigitalSignatureFieldProps, type DigitalSignatureValue, DraftManager, type DraftManagerProps, type EditorChoiceOption, EditorField, type EditorFieldProps, type EditorToolbarAction, UserSelectField as EmployeeSelectField, type FieldBehavior, type FieldDefinition, type FieldLayoutNode, FieldWrapper, type FieldWrapperProps, FormActionBar, type FormActionBarProps, FormActions, type FormActionsProps, type FormAppearanceConfig, FormContainer, type FormContainerProps, FormContext, type FormContextValue, type FormDataDeleteParams, type FormDataQueryParams, FormDetailTemplate, type FormDetailTemplateProps, type FormEffect, type FormEffectAction, type FormEffectCondition, type FormEffectConditionOperator, type FormEngineConfig, type FormEngineMode, FormGrid, type FormGridProps, type FormInstanceData, type FormLayoutNode, FormProvider, type FormProviderProps, FormRenderer, type FormRendererProps, type FormRuntimeApi, type FormRuntimeApiConfig, type FormRuntimeConfig, type FormSchema, FormSection, type FormSectionProps, FormShell, type FormShellProps, type FormStepItem, FormSteps, type FormStepsProps, FormSubmitTemplate, type FormSubmitTemplateProps, FormSummary, FormSummaryCard, type FormSummaryCardProps, type FormSummaryProps, type FormTabItem, FormTabs, type FormTabsProps, type FormTemplateConfig, type GridLayoutCell, type GridLayoutNode, ImageField, type ImageFieldProps, type InitiatorSelectCandidate, type InitiatorSelectRequirement, type InitiatorSelectScope, type InitiatorSelectedApprovers, JSONField, type JSONFieldProps, type LayoutVisibleWhen, type LinkedFormOptionConfig, LocationField, type LocationFieldProps, type LocationValue, type LowcodePageMeta, type LowcodePageNode, type LowcodePageNodeType, LowcodePageRenderer, type LowcodePageRendererProps, type LowcodePageRuntimeContext, type LowcodePageSchema, MultiSelectField, type MultiSelectFieldProps, NumberField, type NumberFieldProps, type OptionItem, type OptionSourceConfig, type OptionSourceType, PROCESS_STATUS_META, PageSkeleton, type PageSkeletonProps, type PeopleShortcutConfig, type PeopleShortcutType, type PreviewParams, type ProcessAction, type ProcessBasicInfo, type ProcessDefinition, ProcessDetailTemplate, type ProcessDetailTemplateProps, type ProcessNodeType, ProcessPreview, type ProcessPreviewProps, type ProcessRoute, type ProcessStatus, type ProcessTask, RadioField, type RadioFieldProps, RecordChangePanel, type RecordChangePanelProps, type ResubmitParams, type ReturnParams, type ReturnPolicy, type ReturnableNode, type ReturnableNodeResult, RichTextEditorCore, type RichTextEditorCoreProps, type RuntimeDataQueryParams, type RuntimeDataQueryResult, RuntimePageShell, type RuntimePageShellProps, type RuntimeRequestConfig, type RuntimeResponse, type SaveTaskParams, type SectionLayoutNode, SelectField, type SelectFieldProps, SerialNumberField, type SerialNumberFieldProps, type SignaturePoint, StandardFormPage, type StandardFormPageMode, type StandardFormPageProps, type StatusMeta, type StepLayoutItem, type StepsLayoutNode, StickyActionBar, type StickyActionBarProps, type SubFormColumn, SubFormField, type SubFormFieldProps, type SubmitConfig, type SubmitSuccessInfo, SummaryPanel, type SummaryPanelMetaItem, type SummaryPanelProps, TASK_STATUS_META, type TabLayoutItem, type TabsLayoutNode, type TaskStatus, TextAreaField, type TextAreaFieldProps, TextField, type TextFieldProps, type TextShortcutConfig, type TextShortcutType, TextAreaField as TextareaField, type TransferParams, type UseApprovalActionsOptions, type UseApprovalActionsReturn, type UseChangeRecordsOptions, type UseChangeRecordsReturn, type UseDraftStorageOptions, type UseDraftStorageReturn, type UseFieldBehaviorOptions, type UseFieldPermissionOptions, type UseFieldPermissionReturn, type UseFormDataReturn, type UseFormDetailOptions, type UseFormDetailReturn, type UseFormEngineReturn, type UseFormNavigationOptions, type UseFormNavigationReturn, type UseFormSubmitReturn, type UseProcessDetailOptions, type UseProcessDetailReturn, type UserDisplayFormat, type UserItem, UserSelectField, type UserSelectFieldProps, VALIDATION_PRESETS, type ValidationPreset, type ValidationRule, type ViewPermissionQueryParams, type ViewPermissionSummary, type WithdrawParams, advancedSearchDataManagement, batchApproveDataManagementRows, buildFilterPayload, checkUserApproval, createFormRuntimeApi, decodeHtmlEntities, defaultComponentRegistry, defineFormSchema, deleteDataManagementRows, deleteFormData, downloadDataManagementImportTemplate, evaluateEffects, exportDataManagementRows, extractFormValues, getChangeRecords, getDataManagementConfig, getDataManagementSchema, getDataManagementTransferRecords, getFormData, getInitiatorSelectCandidates, getInitiatorSelectRequirements, getProcessBasic, getProcessDefinition, getProcessProgress, getResubmitInitiatorSelectRequirements, getReturnableNodeResult, getReturnableNodes, getSystemFieldsForFormType, getViewPermission, handleApproval, hasViewOperation, hasViewPermission, importDataManagementRows, importPreviewDataManagementRows, normalizeColumnConfig, normalizeDataManagementFields, normalizeDataManagementList, normalizeFieldBehaviors, normalizeOperation, normalizeRichTextHtml, previewProcess, resolveDefaultValueLinkage, resolveOptions, resubmitTask, returnTask, sanitizeRichTextHtml, saveDataManagementConfig, saveTask, transferTask, triggerCallbackTask, useApprovalActions, useChangeRecords, useComponent, useDeviceDetect, useDraftStorage, useFieldBehavior, useFieldPermission, useFormContext, useFormData, useFormDetail, useFormEngine, useFormNavigation, useFormSubmit, useProcessDetail, validateAllFields, validateField, withdrawProcess };
|
|
2112
|
+
export { type ActionConfig, AddressField, type AddressFieldProps, type AddressValue, ApprovalActionBar, type ApprovalActionBarProps, type ApprovalActionType, ApprovalActions, type ApprovalActionsProps, type ApprovalPermission, ApprovalTimeline, type ApprovalTimelineProps, type ApproveParams, type AssociationFormConfig, AssociationFormField, type AssociationFormFieldProps, type AssociationValue, AttachmentField, type AttachmentFieldProps, type AttachmentItem, type BaseFieldProps, type BaseLayoutNode, CascadeDateField, type CascadeDateFieldProps, CascadeSelectField, type CascadeSelectFieldProps, type ChangeRecord, type ChangeRecordListResponse, type ChangeRecordQueryParams, ChangeRecords, type ChangeRecordsProps, CheckboxField, type CheckboxFieldProps, ComponentRegistryContext, type ComponentRegistryContextValue, ComponentRegistryProvider, type DataFilter, type DataLinkageCondition, type DataLinkageConfig, type DataManagementConfig, type DataManagementConfigScope, type DataManagementDensity, type DataManagementField, type DataManagementFilterGroup, type DataManagementFilterRule, DataManagementList, type DataManagementListProps, type DataManagementListResult, type DataManagementQuery, type DataManagementRowAction, type DataManagementSort, DateField, type DateFieldProps, type DateRangeRestriction, type DateRestrictionConfig, type DateShortcutConfig, type DateShortcutType, type DefaultValueLinkageConfig, DepartmentSelectField, type DepartmentSelectFieldProps, type DepartmentTreeNode, type DeviceDetectResult, DigitalSignatureField, type DigitalSignatureFieldProps, type DigitalSignatureValue, DraftManager, type DraftManagerProps, type EditorChoiceOption, EditorField, type EditorFieldProps, type EditorToolbarAction, UserSelectField as EmployeeSelectField, type FieldBehavior, type FieldDefinition, type FieldLayoutNode, type FieldValueSyncConfig, FieldWrapper, type FieldWrapperProps, FormActionBar, type FormActionBarProps, FormActions, type FormActionsProps, type FormAppearanceConfig, FormContainer, type FormContainerProps, FormContext, type FormContextValue, type FormDataDeleteParams, type FormDataQueryParams, FormDetailTemplate, type FormDetailTemplateProps, type FormEffect, type FormEffectAction, type FormEffectCondition, type FormEffectConditionOperator, type FormEngineConfig, type FormEngineMode, FormGrid, type FormGridProps, type FormInstanceData, type FormLayoutNode, FormProvider, type FormProviderProps, FormRenderer, type FormRendererProps, type FormRuntimeApi, type FormRuntimeApiConfig, type FormRuntimeConfig, type FormSchema, FormSection, type FormSectionProps, FormShell, type FormShellProps, type FormStepItem, FormSteps, type FormStepsProps, FormSubmitTemplate, type FormSubmitTemplateProps, FormSummary, FormSummaryCard, type FormSummaryCardProps, type FormSummaryProps, type FormTabItem, FormTabs, type FormTabsProps, type FormTemplateConfig, type GridLayoutCell, type GridLayoutNode, ImageField, type ImageFieldProps, type InitiatorSelectCandidate, type InitiatorSelectRequirement, type InitiatorSelectScope, type InitiatorSelectedApprovers, JSONField, type JSONFieldProps, type LayoutVisibleWhen, type LinkedFormOptionConfig, LocationField, type LocationFieldProps, type LocationValue, type LowcodePageMeta, type LowcodePageNode, type LowcodePageNodeType, LowcodePageRenderer, type LowcodePageRendererProps, type LowcodePageRuntimeContext, type LowcodePageSchema, MultiSelectField, type MultiSelectFieldProps, NumberField, type NumberFieldProps, type OptionItem, type OptionSourceConfig, type OptionSourceType, PROCESS_STATUS_META, PageSkeleton, type PageSkeletonProps, type PeopleShortcutConfig, type PeopleShortcutType, type PreviewParams, type ProcessAction, type ProcessBasicInfo, type ProcessDefinition, ProcessDetailTemplate, type ProcessDetailTemplateProps, type ProcessNodeType, ProcessPreview, type ProcessPreviewProps, type ProcessRoute, type ProcessStatus, type ProcessTask, RadioField, type RadioFieldProps, RecordChangePanel, type RecordChangePanelProps, type ResubmitParams, type ReturnParams, type ReturnPolicy, type ReturnableNode, type ReturnableNodeResult, RichTextEditorCore, type RichTextEditorCoreProps, type RuntimeDataQueryParams, type RuntimeDataQueryResult, RuntimePageShell, type RuntimePageShellProps, type RuntimeRequestConfig, type RuntimeResponse, type SaveTaskParams, type SectionLayoutNode, SelectField, type SelectFieldProps, SerialNumberField, type SerialNumberFieldProps, type SignaturePoint, StandardFormPage, type StandardFormPageMode, type StandardFormPageProps, type StatusMeta, type StepLayoutItem, type StepsLayoutNode, StickyActionBar, type StickyActionBarProps, type SubFormColumn, SubFormField, type SubFormFieldProps, type SubmitConfig, type SubmitSuccessInfo, SummaryPanel, type SummaryPanelMetaItem, type SummaryPanelProps, TASK_STATUS_META, type TabLayoutItem, type TabsLayoutNode, type TaskStatus, TextAreaField, type TextAreaFieldProps, TextField, type TextFieldProps, type TextShortcutConfig, type TextShortcutType, TextAreaField as TextareaField, type TransferParams, type UseApprovalActionsOptions, type UseApprovalActionsReturn, type UseChangeRecordsOptions, type UseChangeRecordsReturn, type UseDraftStorageOptions, type UseDraftStorageReturn, type UseFieldBehaviorOptions, type UseFieldPermissionOptions, type UseFieldPermissionReturn, type UseFormDataReturn, type UseFormDetailOptions, type UseFormDetailReturn, type UseFormEngineReturn, type UseFormNavigationOptions, type UseFormNavigationReturn, type UseFormSubmitReturn, type UseProcessDetailOptions, type UseProcessDetailReturn, type UserDisplayFormat, type UserItem, UserSelectField, type UserSelectFieldProps, VALIDATION_PRESETS, type ValidationPreset, type ValidationRule, type ViewPermissionQueryParams, type ViewPermissionSummary, type WithdrawParams, advancedSearchDataManagement, batchApproveDataManagementRows, buildFilterPayload, checkUserApproval, createFormRuntimeApi, decodeHtmlEntities, defaultComponentRegistry, defineFormSchema, deleteDataManagementRows, deleteFormData, downloadDataManagementImportTemplate, evaluateEffects, exportDataManagementRows, extractFormValues, getChangeRecords, getDataManagementConfig, getDataManagementSchema, getDataManagementTransferRecords, getFormData, getInitiatorSelectCandidates, getInitiatorSelectRequirements, getProcessBasic, getProcessDefinition, getProcessProgress, getResubmitInitiatorSelectRequirements, getReturnableNodeResult, getReturnableNodes, getSystemFieldsForFormType, getViewPermission, handleApproval, hasViewOperation, hasViewPermission, importDataManagementRows, importPreviewDataManagementRows, normalizeColumnConfig, normalizeDataManagementFields, normalizeDataManagementList, normalizeFieldBehaviors, normalizeOperation, normalizeRichTextHtml, previewProcess, resolveDefaultValueLinkage, resolveOptions, resubmitTask, returnTask, sanitizeRichTextHtml, saveDataManagementConfig, saveTask, transferTask, triggerCallbackTask, useApprovalActions, useChangeRecords, useComponent, useDeviceDetect, useDraftStorage, useFieldBehavior, useFieldPermission, useFormContext, useFormData, useFormDetail, useFormEngine, useFormNavigation, useFormSubmit, useProcessDetail, validateAllFields, validateField, withdrawProcess };
|
|
@@ -410,6 +410,11 @@ interface OptionItem {
|
|
|
410
410
|
color?: string;
|
|
411
411
|
disabled?: boolean;
|
|
412
412
|
}
|
|
413
|
+
interface FieldValueSyncConfig {
|
|
414
|
+
targetFieldId: string;
|
|
415
|
+
valuePath?: 'value' | 'label';
|
|
416
|
+
emptyValue?: any;
|
|
417
|
+
}
|
|
413
418
|
type OptionSourceType = 'custom' | 'linkedForm' | 'dataLinkage';
|
|
414
419
|
interface OptionSourceConfig {
|
|
415
420
|
type: OptionSourceType;
|
|
@@ -421,10 +426,19 @@ interface LinkedFormOptionConfig {
|
|
|
421
426
|
formTitle?: string;
|
|
422
427
|
fieldId: string;
|
|
423
428
|
fieldLabel?: string;
|
|
429
|
+
valueFieldId?: string;
|
|
430
|
+
valueFieldLabel?: string;
|
|
431
|
+
labelFieldId?: string;
|
|
432
|
+
labelFieldLabel?: string;
|
|
433
|
+
searchFieldId?: string;
|
|
434
|
+
searchFieldLabel?: string;
|
|
424
435
|
sortField?: string;
|
|
425
436
|
sortOrder?: 'asc' | 'desc';
|
|
426
437
|
filters?: DataFilter[];
|
|
427
438
|
deduplicate?: boolean;
|
|
439
|
+
pageSize?: number;
|
|
440
|
+
remoteSearch?: boolean;
|
|
441
|
+
remoteSearchMinChars?: number;
|
|
428
442
|
}
|
|
429
443
|
interface DataLinkageConfig {
|
|
430
444
|
formUuid: string;
|
|
@@ -482,6 +496,7 @@ interface SelectFieldProps extends BaseFieldProps {
|
|
|
482
496
|
optionSource?: OptionSourceConfig;
|
|
483
497
|
coloredOptions?: boolean;
|
|
484
498
|
defaultValueLinkage?: DefaultValueLinkageConfig;
|
|
499
|
+
valueSync?: FieldValueSyncConfig[];
|
|
485
500
|
}
|
|
486
501
|
/** MultiSelectField 专用 Props */
|
|
487
502
|
interface MultiSelectFieldProps extends BaseFieldProps {
|
|
@@ -1066,6 +1081,7 @@ interface FormContextValue {
|
|
|
1066
1081
|
layoutBehaviors: Record<string, FieldBehavior>;
|
|
1067
1082
|
dynamicOptions: Record<string, OptionItem[]>;
|
|
1068
1083
|
api: FormRuntimeApi;
|
|
1084
|
+
runtime: FormRuntimeConfig;
|
|
1069
1085
|
config: Pick<FormEngineConfig, 'mode' | 'formUuid' | 'appType' | 'formInstanceId' | 'submit'>;
|
|
1070
1086
|
setFieldValue: (fieldId: string, value: any) => void;
|
|
1071
1087
|
getFieldValue: (fieldId: string) => any;
|
|
@@ -1180,7 +1196,7 @@ declare function createFormRuntimeApi(config?: FormRuntimeApiConfig): FormRuntim
|
|
|
1180
1196
|
/**
|
|
1181
1197
|
* 解析选项数据源,返回选项列表
|
|
1182
1198
|
*/
|
|
1183
|
-
declare function resolveOptions(config: OptionSourceConfig, runtime: FormRuntimeConfig | undefined, formData: Record<string, any
|
|
1199
|
+
declare function resolveOptions(config: OptionSourceConfig, runtime: FormRuntimeConfig | undefined, formData: Record<string, any>, searchKeyword?: string): Promise<OptionItem[]>;
|
|
1184
1200
|
/**
|
|
1185
1201
|
* 解析默认值联动(用于非选择类字段的数据联动默认值)
|
|
1186
1202
|
*/
|
|
@@ -2093,4 +2109,4 @@ interface PageSkeletonProps {
|
|
|
2093
2109
|
}
|
|
2094
2110
|
declare const PageSkeleton: React__default.FC<PageSkeletonProps>;
|
|
2095
2111
|
|
|
2096
|
-
export { type ActionConfig, AddressField, type AddressFieldProps, type AddressValue, ApprovalActionBar, type ApprovalActionBarProps, type ApprovalActionType, ApprovalActions, type ApprovalActionsProps, type ApprovalPermission, ApprovalTimeline, type ApprovalTimelineProps, type ApproveParams, type AssociationFormConfig, AssociationFormField, type AssociationFormFieldProps, type AssociationValue, AttachmentField, type AttachmentFieldProps, type AttachmentItem, type BaseFieldProps, type BaseLayoutNode, CascadeDateField, type CascadeDateFieldProps, CascadeSelectField, type CascadeSelectFieldProps, type ChangeRecord, type ChangeRecordListResponse, type ChangeRecordQueryParams, ChangeRecords, type ChangeRecordsProps, CheckboxField, type CheckboxFieldProps, ComponentRegistryContext, type ComponentRegistryContextValue, ComponentRegistryProvider, type DataFilter, type DataLinkageCondition, type DataLinkageConfig, type DataManagementConfig, type DataManagementConfigScope, type DataManagementDensity, type DataManagementField, type DataManagementFilterGroup, type DataManagementFilterRule, DataManagementList, type DataManagementListProps, type DataManagementListResult, type DataManagementQuery, type DataManagementRowAction, type DataManagementSort, DateField, type DateFieldProps, type DateRangeRestriction, type DateRestrictionConfig, type DateShortcutConfig, type DateShortcutType, type DefaultValueLinkageConfig, DepartmentSelectField, type DepartmentSelectFieldProps, type DepartmentTreeNode, type DeviceDetectResult, DigitalSignatureField, type DigitalSignatureFieldProps, type DigitalSignatureValue, DraftManager, type DraftManagerProps, type EditorChoiceOption, EditorField, type EditorFieldProps, type EditorToolbarAction, UserSelectField as EmployeeSelectField, type FieldBehavior, type FieldDefinition, type FieldLayoutNode, FieldWrapper, type FieldWrapperProps, FormActionBar, type FormActionBarProps, FormActions, type FormActionsProps, type FormAppearanceConfig, FormContainer, type FormContainerProps, FormContext, type FormContextValue, type FormDataDeleteParams, type FormDataQueryParams, FormDetailTemplate, type FormDetailTemplateProps, type FormEffect, type FormEffectAction, type FormEffectCondition, type FormEffectConditionOperator, type FormEngineConfig, type FormEngineMode, FormGrid, type FormGridProps, type FormInstanceData, type FormLayoutNode, FormProvider, type FormProviderProps, FormRenderer, type FormRendererProps, type FormRuntimeApi, type FormRuntimeApiConfig, type FormRuntimeConfig, type FormSchema, FormSection, type FormSectionProps, FormShell, type FormShellProps, type FormStepItem, FormSteps, type FormStepsProps, FormSubmitTemplate, type FormSubmitTemplateProps, FormSummary, FormSummaryCard, type FormSummaryCardProps, type FormSummaryProps, type FormTabItem, FormTabs, type FormTabsProps, type FormTemplateConfig, type GridLayoutCell, type GridLayoutNode, ImageField, type ImageFieldProps, type InitiatorSelectCandidate, type InitiatorSelectRequirement, type InitiatorSelectScope, type InitiatorSelectedApprovers, JSONField, type JSONFieldProps, type LayoutVisibleWhen, type LinkedFormOptionConfig, LocationField, type LocationFieldProps, type LocationValue, type LowcodePageMeta, type LowcodePageNode, type LowcodePageNodeType, LowcodePageRenderer, type LowcodePageRendererProps, type LowcodePageRuntimeContext, type LowcodePageSchema, MultiSelectField, type MultiSelectFieldProps, NumberField, type NumberFieldProps, type OptionItem, type OptionSourceConfig, type OptionSourceType, PROCESS_STATUS_META, PageSkeleton, type PageSkeletonProps, type PeopleShortcutConfig, type PeopleShortcutType, type PreviewParams, type ProcessAction, type ProcessBasicInfo, type ProcessDefinition, ProcessDetailTemplate, type ProcessDetailTemplateProps, type ProcessNodeType, ProcessPreview, type ProcessPreviewProps, type ProcessRoute, type ProcessStatus, type ProcessTask, RadioField, type RadioFieldProps, RecordChangePanel, type RecordChangePanelProps, type ResubmitParams, type ReturnParams, type ReturnPolicy, type ReturnableNode, type ReturnableNodeResult, RichTextEditorCore, type RichTextEditorCoreProps, type RuntimeDataQueryParams, type RuntimeDataQueryResult, RuntimePageShell, type RuntimePageShellProps, type RuntimeRequestConfig, type RuntimeResponse, type SaveTaskParams, type SectionLayoutNode, SelectField, type SelectFieldProps, SerialNumberField, type SerialNumberFieldProps, type SignaturePoint, StandardFormPage, type StandardFormPageMode, type StandardFormPageProps, type StatusMeta, type StepLayoutItem, type StepsLayoutNode, StickyActionBar, type StickyActionBarProps, type SubFormColumn, SubFormField, type SubFormFieldProps, type SubmitConfig, type SubmitSuccessInfo, SummaryPanel, type SummaryPanelMetaItem, type SummaryPanelProps, TASK_STATUS_META, type TabLayoutItem, type TabsLayoutNode, type TaskStatus, TextAreaField, type TextAreaFieldProps, TextField, type TextFieldProps, type TextShortcutConfig, type TextShortcutType, TextAreaField as TextareaField, type TransferParams, type UseApprovalActionsOptions, type UseApprovalActionsReturn, type UseChangeRecordsOptions, type UseChangeRecordsReturn, type UseDraftStorageOptions, type UseDraftStorageReturn, type UseFieldBehaviorOptions, type UseFieldPermissionOptions, type UseFieldPermissionReturn, type UseFormDataReturn, type UseFormDetailOptions, type UseFormDetailReturn, type UseFormEngineReturn, type UseFormNavigationOptions, type UseFormNavigationReturn, type UseFormSubmitReturn, type UseProcessDetailOptions, type UseProcessDetailReturn, type UserDisplayFormat, type UserItem, UserSelectField, type UserSelectFieldProps, VALIDATION_PRESETS, type ValidationPreset, type ValidationRule, type ViewPermissionQueryParams, type ViewPermissionSummary, type WithdrawParams, advancedSearchDataManagement, batchApproveDataManagementRows, buildFilterPayload, checkUserApproval, createFormRuntimeApi, decodeHtmlEntities, defaultComponentRegistry, defineFormSchema, deleteDataManagementRows, deleteFormData, downloadDataManagementImportTemplate, evaluateEffects, exportDataManagementRows, extractFormValues, getChangeRecords, getDataManagementConfig, getDataManagementSchema, getDataManagementTransferRecords, getFormData, getInitiatorSelectCandidates, getInitiatorSelectRequirements, getProcessBasic, getProcessDefinition, getProcessProgress, getResubmitInitiatorSelectRequirements, getReturnableNodeResult, getReturnableNodes, getSystemFieldsForFormType, getViewPermission, handleApproval, hasViewOperation, hasViewPermission, importDataManagementRows, importPreviewDataManagementRows, normalizeColumnConfig, normalizeDataManagementFields, normalizeDataManagementList, normalizeFieldBehaviors, normalizeOperation, normalizeRichTextHtml, previewProcess, resolveDefaultValueLinkage, resolveOptions, resubmitTask, returnTask, sanitizeRichTextHtml, saveDataManagementConfig, saveTask, transferTask, triggerCallbackTask, useApprovalActions, useChangeRecords, useComponent, useDeviceDetect, useDraftStorage, useFieldBehavior, useFieldPermission, useFormContext, useFormData, useFormDetail, useFormEngine, useFormNavigation, useFormSubmit, useProcessDetail, validateAllFields, validateField, withdrawProcess };
|
|
2112
|
+
export { type ActionConfig, AddressField, type AddressFieldProps, type AddressValue, ApprovalActionBar, type ApprovalActionBarProps, type ApprovalActionType, ApprovalActions, type ApprovalActionsProps, type ApprovalPermission, ApprovalTimeline, type ApprovalTimelineProps, type ApproveParams, type AssociationFormConfig, AssociationFormField, type AssociationFormFieldProps, type AssociationValue, AttachmentField, type AttachmentFieldProps, type AttachmentItem, type BaseFieldProps, type BaseLayoutNode, CascadeDateField, type CascadeDateFieldProps, CascadeSelectField, type CascadeSelectFieldProps, type ChangeRecord, type ChangeRecordListResponse, type ChangeRecordQueryParams, ChangeRecords, type ChangeRecordsProps, CheckboxField, type CheckboxFieldProps, ComponentRegistryContext, type ComponentRegistryContextValue, ComponentRegistryProvider, type DataFilter, type DataLinkageCondition, type DataLinkageConfig, type DataManagementConfig, type DataManagementConfigScope, type DataManagementDensity, type DataManagementField, type DataManagementFilterGroup, type DataManagementFilterRule, DataManagementList, type DataManagementListProps, type DataManagementListResult, type DataManagementQuery, type DataManagementRowAction, type DataManagementSort, DateField, type DateFieldProps, type DateRangeRestriction, type DateRestrictionConfig, type DateShortcutConfig, type DateShortcutType, type DefaultValueLinkageConfig, DepartmentSelectField, type DepartmentSelectFieldProps, type DepartmentTreeNode, type DeviceDetectResult, DigitalSignatureField, type DigitalSignatureFieldProps, type DigitalSignatureValue, DraftManager, type DraftManagerProps, type EditorChoiceOption, EditorField, type EditorFieldProps, type EditorToolbarAction, UserSelectField as EmployeeSelectField, type FieldBehavior, type FieldDefinition, type FieldLayoutNode, type FieldValueSyncConfig, FieldWrapper, type FieldWrapperProps, FormActionBar, type FormActionBarProps, FormActions, type FormActionsProps, type FormAppearanceConfig, FormContainer, type FormContainerProps, FormContext, type FormContextValue, type FormDataDeleteParams, type FormDataQueryParams, FormDetailTemplate, type FormDetailTemplateProps, type FormEffect, type FormEffectAction, type FormEffectCondition, type FormEffectConditionOperator, type FormEngineConfig, type FormEngineMode, FormGrid, type FormGridProps, type FormInstanceData, type FormLayoutNode, FormProvider, type FormProviderProps, FormRenderer, type FormRendererProps, type FormRuntimeApi, type FormRuntimeApiConfig, type FormRuntimeConfig, type FormSchema, FormSection, type FormSectionProps, FormShell, type FormShellProps, type FormStepItem, FormSteps, type FormStepsProps, FormSubmitTemplate, type FormSubmitTemplateProps, FormSummary, FormSummaryCard, type FormSummaryCardProps, type FormSummaryProps, type FormTabItem, FormTabs, type FormTabsProps, type FormTemplateConfig, type GridLayoutCell, type GridLayoutNode, ImageField, type ImageFieldProps, type InitiatorSelectCandidate, type InitiatorSelectRequirement, type InitiatorSelectScope, type InitiatorSelectedApprovers, JSONField, type JSONFieldProps, type LayoutVisibleWhen, type LinkedFormOptionConfig, LocationField, type LocationFieldProps, type LocationValue, type LowcodePageMeta, type LowcodePageNode, type LowcodePageNodeType, LowcodePageRenderer, type LowcodePageRendererProps, type LowcodePageRuntimeContext, type LowcodePageSchema, MultiSelectField, type MultiSelectFieldProps, NumberField, type NumberFieldProps, type OptionItem, type OptionSourceConfig, type OptionSourceType, PROCESS_STATUS_META, PageSkeleton, type PageSkeletonProps, type PeopleShortcutConfig, type PeopleShortcutType, type PreviewParams, type ProcessAction, type ProcessBasicInfo, type ProcessDefinition, ProcessDetailTemplate, type ProcessDetailTemplateProps, type ProcessNodeType, ProcessPreview, type ProcessPreviewProps, type ProcessRoute, type ProcessStatus, type ProcessTask, RadioField, type RadioFieldProps, RecordChangePanel, type RecordChangePanelProps, type ResubmitParams, type ReturnParams, type ReturnPolicy, type ReturnableNode, type ReturnableNodeResult, RichTextEditorCore, type RichTextEditorCoreProps, type RuntimeDataQueryParams, type RuntimeDataQueryResult, RuntimePageShell, type RuntimePageShellProps, type RuntimeRequestConfig, type RuntimeResponse, type SaveTaskParams, type SectionLayoutNode, SelectField, type SelectFieldProps, SerialNumberField, type SerialNumberFieldProps, type SignaturePoint, StandardFormPage, type StandardFormPageMode, type StandardFormPageProps, type StatusMeta, type StepLayoutItem, type StepsLayoutNode, StickyActionBar, type StickyActionBarProps, type SubFormColumn, SubFormField, type SubFormFieldProps, type SubmitConfig, type SubmitSuccessInfo, SummaryPanel, type SummaryPanelMetaItem, type SummaryPanelProps, TASK_STATUS_META, type TabLayoutItem, type TabsLayoutNode, type TaskStatus, TextAreaField, type TextAreaFieldProps, TextField, type TextFieldProps, type TextShortcutConfig, type TextShortcutType, TextAreaField as TextareaField, type TransferParams, type UseApprovalActionsOptions, type UseApprovalActionsReturn, type UseChangeRecordsOptions, type UseChangeRecordsReturn, type UseDraftStorageOptions, type UseDraftStorageReturn, type UseFieldBehaviorOptions, type UseFieldPermissionOptions, type UseFieldPermissionReturn, type UseFormDataReturn, type UseFormDetailOptions, type UseFormDetailReturn, type UseFormEngineReturn, type UseFormNavigationOptions, type UseFormNavigationReturn, type UseFormSubmitReturn, type UseProcessDetailOptions, type UseProcessDetailReturn, type UserDisplayFormat, type UserItem, UserSelectField, type UserSelectFieldProps, VALIDATION_PRESETS, type ValidationPreset, type ValidationRule, type ViewPermissionQueryParams, type ViewPermissionSummary, type WithdrawParams, advancedSearchDataManagement, batchApproveDataManagementRows, buildFilterPayload, checkUserApproval, createFormRuntimeApi, decodeHtmlEntities, defaultComponentRegistry, defineFormSchema, deleteDataManagementRows, deleteFormData, downloadDataManagementImportTemplate, evaluateEffects, exportDataManagementRows, extractFormValues, getChangeRecords, getDataManagementConfig, getDataManagementSchema, getDataManagementTransferRecords, getFormData, getInitiatorSelectCandidates, getInitiatorSelectRequirements, getProcessBasic, getProcessDefinition, getProcessProgress, getResubmitInitiatorSelectRequirements, getReturnableNodeResult, getReturnableNodes, getSystemFieldsForFormType, getViewPermission, handleApproval, hasViewOperation, hasViewPermission, importDataManagementRows, importPreviewDataManagementRows, normalizeColumnConfig, normalizeDataManagementFields, normalizeDataManagementList, normalizeFieldBehaviors, normalizeOperation, normalizeRichTextHtml, previewProcess, resolveDefaultValueLinkage, resolveOptions, resubmitTask, returnTask, sanitizeRichTextHtml, saveDataManagementConfig, saveTask, transferTask, triggerCallbackTask, useApprovalActions, useChangeRecords, useComponent, useDeviceDetect, useDraftStorage, useFieldBehavior, useFieldPermission, useFormContext, useFormData, useFormDetail, useFormEngine, useFormNavigation, useFormSubmit, useProcessDetail, validateAllFields, validateField, withdrawProcess };
|