openxiangda 1.0.140 → 1.0.142
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 +52 -2
- package/lib/cli.js +89 -0
- package/lib/design-gates.js +29 -0
- package/openxiangda-skills/SKILL.md +3 -1
- package/package.json +1 -1
- package/packages/sdk/dist/{ProcessPreview-CZJP8n3e.d.mts → ProcessPreview-CUQFUDvw.d.mts} +5 -2
- package/packages/sdk/dist/{ProcessPreview-CZJP8n3e.d.ts → ProcessPreview-CUQFUDvw.d.ts} +5 -2
- package/packages/sdk/dist/components/index.cjs +139 -30
- package/packages/sdk/dist/components/index.cjs.map +1 -1
- package/packages/sdk/dist/components/index.d.mts +6 -136
- package/packages/sdk/dist/components/index.d.ts +6 -136
- package/packages/sdk/dist/components/index.mjs +139 -30
- package/packages/sdk/dist/components/index.mjs.map +1 -1
- package/packages/sdk/dist/dataManagementApi-CwBEmnXg.d.ts +141 -0
- package/packages/sdk/dist/dataManagementApi-DQKInwWS.d.mts +141 -0
- package/packages/sdk/dist/runtime/index.cjs +157 -87
- package/packages/sdk/dist/runtime/index.cjs.map +1 -1
- package/packages/sdk/dist/runtime/index.d.mts +4 -4
- package/packages/sdk/dist/runtime/index.d.ts +4 -4
- package/packages/sdk/dist/runtime/index.mjs +157 -87
- package/packages/sdk/dist/runtime/index.mjs.map +1 -1
- package/packages/sdk/dist/runtime/react.cjs +16 -1
- package/packages/sdk/dist/runtime/react.cjs.map +1 -1
- package/packages/sdk/dist/runtime/react.d.mts +17 -2
- package/packages/sdk/dist/runtime/react.d.ts +17 -2
- package/packages/sdk/dist/runtime/react.mjs +16 -1
- package/packages/sdk/dist/runtime/react.mjs.map +1 -1
- package/templates/openxiangda-react-spa/src/pages/defaults/FormRoutePage.tsx +9 -0
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { PageContext, PageInfo, PageBridgeApi } from './react.mjs';
|
|
2
|
-
export { ApiEnvelope, ApiPermissionListParams, AppAuthClient, AppFunctionConnectorApi, AppFunctionContext, AppFunctionDataViewApi, AppFunctionFormApi, AppFunctionFormGetByIdParams, AppFunctionFormQueryParams, AppFunctionFormWriteParams, AppFunctionNotificationApi, AppFunctionOperatorInfo, AppFunctionOrganizationApi, AppFunctionPermissionContext, AppFunctionRuntimeContext, ApproveTaskParams, AssignPermissionsParams, AssignRolesParams, AuthChallengePayload, AuthClientError, AuthClientErrorOptions, AuthClientOptions, AuthErrorExtra, AuthLogoutRedirectOptions, AuthMethod, AuthMethodType, AuthTokenData, AuthUser, BatchAddUsersToRoleParams, BatchSendNotificationByTypeParams, ChangeOrganizationAccountPasswordParams, ChangeUserRoleParams, ConnectorCallParams, ConnectorInvokeParams, ConnectorInvokeResult, ConnectorRequestBodyType, ConnectorResponseType, CreateApiPermissionParams, CreateFormPermissionGroupDto, CreateOrganizationAccountParams, CreateOrganizationDepartmentParams, CreatePagePermissionGroupDto, CreateRoleParams, CreateUiPermissionParams, CreateUserParams, CurrentUserDepartmentParents, CustomPageEntryConfig, CustomPageEntryMode, DataManagementConfigParams, DataManagementFilterState, DataPermissionConditionDto, DataPermissionDto, DataPermissionRuleDto, DataViewQueryParams, DataViewQueryResult, DataViewStatsParams, DingTalkLoginInput, DingTalkNotificationCapabilities, DingTalkNotificationCardConfig, DingTalkNotificationCardField, DingTalkNotificationCardMode, DingTalkNotificationCardPreview, DingTalkNotificationChannelConfig, DingTalkNotificationDeliveryMode, DingTalkNotificationPreviewResult, ExecuteProcessOperationInput, FieldAccessLevel, FieldAccessPolicyDto, FieldAccessPolicyItemDto, FieldOptionValue, FieldPermissionDto, FindNotificationConfigParams, FormAdvancedSearchParams, FormChangeRecordParams, FormCreateParams, FormCreateResult, FormDetailResult, FormExportParams, FormFieldValue, FormGetDetailParams, FormImportParams, FormInstanceIdentifierResult, FormPermissionGroup, FormRemoveParams, FormSearchParams, FormUpdateParams, FormUpdateResult, FunctionInvokeParams, FunctionInvokeResult, GetParentDepartmentsOptions, GetProcessInstanceParams, GetUserRolesParams, GuestLoginInput, ImportExportRecordDownloadParams, ImportExportRecordQuery, InitiatorApproverSelector, InstanceStatus, ListNotificationInboxParams, ListWorkCenterItemsParams, LoginLogGetParams, LoginLogListParams, LoginLogRecord, LoginLogStats, LoginLogStatsParams, LoginLogStatus, LoginMethodsResult, LoginPage, LoginPageProps, MarkAllNotificationReadResult, NotificationChannel, NotificationChannelConfig, NotificationChannelsConfig, NotificationConfigLevel, NotificationInboxListResult, NotificationInboxMessage, NotificationInboxReadStatus, NotificationMessageRecord, NotificationTemplate, NotificationTemplatePreview, NotificationTypeConfig, NotificationUnreadCountResult, OpenXiangdaPageProvider, OpenXiangdaPageProviderProps, OpenXiangdaProvider, OpenXiangdaProviderProps, OrganizationAccountListParams, OrganizationCapabilities, OrganizationListResult, PageApiPermissionRecord, PageApiResponse, PageAppInfo, PageBinaryResponse, PageDataManagementConfig, PageDataSourceDescriptor, PageDepartmentInfo, PageDepartmentRecord, PageHttpMethod, PageListResult, PageMessageApi, PageModalApi, PageNavigationApi, PageOffsetListResult, PagePermissionGroup, PagePermissionInfo, PageProvider, PageQueryValue, PageRequestOptions, PageRoleRecord, PageRouteInfo, PageScope, PageSdk, PageSdkError, PageSdkMeta, PageTransportDownloadPayload, PageTransportRequestPayload, PageUiPermissionRecord, PageUiPermissionType, PageUserInfo, PageUserRecord, PageUserType, PasswordLoginInput, PermissionBoundary, PermissionBoundaryFallback, PermissionBoundaryFallbackState, PermissionBoundaryProps, PhoneCodeInput, PhoneCodeLoginInput, PhoneCodeRegisterInput, PhoneCodeSendResult, PreviewDingTalkNotificationParams, PreviewNotificationTemplateParams, ProcessActionBar, ProcessActionBarProps, ProcessApproveAction, ProcessCapabilities, ProcessCapabilityOperation, ProcessInstanceLookupParams, ProcessPreviewPanel, ProcessPreviewPanelProps, ProcessTimeline, ProcessTimelineProps, PublicAccessClaim, PublicAccessClient, PublicAccessClientError, PublicAccessClientOptions, PublicAccessGate, PublicAccessGateProps, PublicAccessSessionData, PublicAccessSessionInput, QueryFormPermissionGroupDto, QueryPagePermissionGroupDto, RefreshInput, ResetOrganizationAccountPasswordParams, ResolveLoginUrlInput, ResolveProcessCapabilitiesParams, RoleListParams, RoleUsersParams, RouteAccessResult, RuntimeBootstrap, RuntimeErrorSnapshot, RuntimeErrorType, RuntimeLogoutOptions, RuntimeMenuItem, RuntimePagePermissions, RuntimeRedirectLoginOptions, RuntimeRequestError, RuntimeRequestState, RuntimeResolveLoginOptions, SaveDataManagementConfigParams, SearchComponentName, SearchExpression, SearchFieldKey, SearchGroup, SearchLogic, SearchOperator, SearchRule, SearchSortItem, SearchSystemField, SendNotificationByTypeParams, SendNotificationResult, SsoLoginUrlInput, SsoLoginUrlResult, SubFormRule, SwitchAppRoleParams, SwitchPlatformRoleParams, TerminateProcessInstanceParams, TriggerCallbackTaskParams, UiPermissionListParams, UpdateApiPermissionParams, UpdateFormPermissionGroupDto, UpdateOrganizationAccountParams, UpdateOrganizationDepartmentParams, UpdatePagePermissionGroupDto, UpdateRoleParams, UpdateUiPermissionParams, UpdateUserParams, UseAuthOptions, UseCanAccessRouteInput, UseLoginMethodsState, UseProcessActionsOptions, UseProcessActionsReturn, UseProcessCapabilitiesOptions, UseProcessCapabilitiesReturn, UsePublicAccessOptions, UsePublicAccessState, UserListParams, UserMenuPermissionsResponse, ValidateUserParams, ViewFieldPermissionValue, ViewOperationPermission, ViewPermissionSummary, WorkCenterBoxType, WorkCenterGroupedStat, WorkCenterItem, WorkCenterListResult, WorkCenterStats, WorkCenterStatsParams, WorkflowApproveParams, WorkflowCapabilityActionKey, WorkflowDefinitionByFormParams, WorkflowInitiatorSelectCandidatesParams, WorkflowInitiatorSelectRequirementsParams, WorkflowPreviewParams, WorkflowResubmitInitiatorSelectRequirementsParams, WorkflowResubmitParams, WorkflowReturnParams, WorkflowSaveTaskParams, WorkflowStartFromExistingInstanceParams, WorkflowTaskParams, WorkflowTransferParams, WorkflowWithdrawParams, createAuthClient, createPageSdk, createPublicAccessClient, createReactPage, getAuthErrorExtra, getAuthErrorReason, isAuthChallengeRequired, isAuthClientError, useAppMenus, useAuth, useCanAccessRoute, useCurrentUser, useDataSource, useFormViewPermissions, useLoginMethods, useMessage, useModal, useNavigation, useOpenXiangda, usePageContext, usePageProps, usePageRoute, usePageSdk, usePermission, useProcessActions, useProcessCapabilities, usePublicAccess, useRuntimeAuth, useRuntimeBootstrap } from './react.mjs';
|
|
2
|
+
export { ApiEnvelope, ApiPermissionListParams, AppAuthClient, AppFunctionConnectorApi, AppFunctionContext, AppFunctionDataViewApi, AppFunctionFormApi, AppFunctionFormGetByIdParams, AppFunctionFormQueryParams, AppFunctionFormWriteParams, AppFunctionNotificationApi, AppFunctionOperatorInfo, AppFunctionOrganizationApi, AppFunctionPermissionContext, AppFunctionRuntimeContext, ApproveTaskParams, AssignPermissionsParams, AssignRolesParams, AuthChallengePayload, AuthClientError, AuthClientErrorOptions, AuthClientOptions, AuthErrorExtra, AuthLogoutRedirectOptions, AuthMethod, AuthMethodType, AuthTokenData, AuthUser, BatchAddUsersToRoleParams, BatchSendNotificationByTypeParams, ChangeOrganizationAccountPasswordParams, ChangeUserRoleParams, ConnectorCallParams, ConnectorInvokeParams, ConnectorInvokeResult, ConnectorRequestBodyType, ConnectorResponseType, CreateApiPermissionParams, CreateFormPermissionGroupDto, CreateOrganizationAccountParams, CreateOrganizationDepartmentParams, CreatePagePermissionGroupDto, CreateRoleParams, CreateUiPermissionParams, CreateUserParams, CurrentUserDepartmentParents, CustomPageEntryConfig, CustomPageEntryMode, DataManagementConfigParams, DataManagementFilterState, DataPermissionConditionDto, DataPermissionDto, DataPermissionRuleDto, DataViewQueryParams, DataViewQueryResult, DataViewStatsParams, DingTalkLoginInput, DingTalkNotificationCapabilities, DingTalkNotificationCardConfig, DingTalkNotificationCardField, DingTalkNotificationCardMode, DingTalkNotificationCardPreview, DingTalkNotificationChannelConfig, DingTalkNotificationDeliveryMode, DingTalkNotificationPreviewResult, ExecuteProcessOperationInput, FieldAccessLevel, FieldAccessPolicyDto, FieldAccessPolicyItemDto, FieldOptionValue, FieldPermissionDto, FindNotificationConfigParams, FormAdvancedSearchParams, FormChangeRecordParams, FormCreateParams, FormCreateResult, FormDetailResult, FormExportParams, FormFieldValue, FormGetDetailParams, FormImportParams, FormInstanceIdentifierResult, FormPermissionGroup, FormRemoveParams, FormSearchParams, FormUpdateParams, FormUpdateResult, FunctionInvokeParams, FunctionInvokeResult, GetParentDepartmentsOptions, GetProcessInstanceParams, GetUserRolesParams, GuestLoginInput, ImportExportRecordDownloadParams, ImportExportRecordQuery, InitiatorApproverSelector, InstanceStatus, ListNotificationInboxParams, ListWorkCenterItemsParams, LoginLogGetParams, LoginLogListParams, LoginLogRecord, LoginLogStats, LoginLogStatsParams, LoginLogStatus, LoginMethodsResult, LoginPage, LoginPageProps, MarkAllNotificationReadResult, NotificationChannel, NotificationChannelConfig, NotificationChannelsConfig, NotificationConfigLevel, NotificationInboxListResult, NotificationInboxMessage, NotificationInboxReadStatus, NotificationMessageRecord, NotificationTemplate, NotificationTemplatePreview, NotificationTypeConfig, NotificationUnreadCountResult, OpenXiangdaPageProvider, OpenXiangdaPageProviderProps, OpenXiangdaProvider, OpenXiangdaProviderProps, OrganizationAccountListParams, OrganizationCapabilities, OrganizationListResult, PageApiPermissionRecord, PageApiResponse, PageAppInfo, PageBinaryResponse, PageDataManagementConfig, PageDataSourceDescriptor, PageDepartmentInfo, PageDepartmentRecord, PageHttpMethod, PageListResult, PageMessageApi, PageModalApi, PageNavigationApi, PageOffsetListResult, PagePermissionGroup, PagePermissionInfo, PageProvider, PageQueryValue, PageRequestOptions, PageRoleRecord, PageRouteInfo, PageScope, PageSdk, PageSdkError, PageSdkMeta, PageTransportDownloadPayload, PageTransportRequestPayload, PageUiPermissionRecord, PageUiPermissionType, PageUserInfo, PageUserRecord, PageUserType, PasswordLoginInput, PermissionBoundary, PermissionBoundaryFallback, PermissionBoundaryFallbackState, PermissionBoundaryProps, PhoneCodeInput, PhoneCodeLoginInput, PhoneCodeRegisterInput, PhoneCodeSendResult, PreviewDingTalkNotificationParams, PreviewNotificationTemplateParams, ProcessActionBar, ProcessActionBarProps, ProcessApproveAction, ProcessCapabilities, ProcessCapabilityOperation, ProcessInstanceLookupParams, ProcessPreviewPanel, ProcessPreviewPanelProps, ProcessTimeline, ProcessTimelineProps, PublicAccessClaim, PublicAccessClient, PublicAccessClientError, PublicAccessClientOptions, PublicAccessGate, PublicAccessGateProps, PublicAccessSessionData, PublicAccessSessionInput, PublicStorageAction, PublicStorageGrant, QueryFormPermissionGroupDto, QueryPagePermissionGroupDto, RefreshInput, ResetOrganizationAccountPasswordParams, ResolveLoginUrlInput, ResolveProcessCapabilitiesParams, RoleListParams, RoleUsersParams, RouteAccessResult, RuntimeBootstrap, RuntimeErrorSnapshot, RuntimeErrorType, RuntimeLogoutOptions, RuntimeMenuItem, RuntimePagePermissions, RuntimeRedirectLoginOptions, RuntimeRequestError, RuntimeRequestState, RuntimeResolveLoginOptions, SaveDataManagementConfigParams, SearchComponentName, SearchExpression, SearchFieldKey, SearchGroup, SearchLogic, SearchOperator, SearchRule, SearchSortItem, SearchSystemField, SendNotificationByTypeParams, SendNotificationResult, SsoLoginUrlInput, SsoLoginUrlResult, SubFormRule, SwitchAppRoleParams, SwitchPlatformRoleParams, TerminateProcessInstanceParams, TriggerCallbackTaskParams, UiPermissionListParams, UpdateApiPermissionParams, UpdateFormPermissionGroupDto, UpdateOrganizationAccountParams, UpdateOrganizationDepartmentParams, UpdatePagePermissionGroupDto, UpdateRoleParams, UpdateUiPermissionParams, UpdateUserParams, UseAuthOptions, UseCanAccessRouteInput, UseLoginMethodsState, UseProcessActionsOptions, UseProcessActionsReturn, UseProcessCapabilitiesOptions, UseProcessCapabilitiesReturn, UsePublicAccessOptions, UsePublicAccessState, UserListParams, UserMenuPermissionsResponse, ValidateUserParams, ViewFieldPermissionValue, ViewOperationPermission, ViewPermissionSummary, WorkCenterBoxType, WorkCenterGroupedStat, WorkCenterItem, WorkCenterListResult, WorkCenterStats, WorkCenterStatsParams, WorkflowApproveParams, WorkflowCapabilityActionKey, WorkflowDefinitionByFormParams, WorkflowInitiatorSelectCandidatesParams, WorkflowInitiatorSelectRequirementsParams, WorkflowPreviewParams, WorkflowResubmitInitiatorSelectRequirementsParams, WorkflowResubmitParams, WorkflowReturnParams, WorkflowSaveTaskParams, WorkflowStartFromExistingInstanceParams, WorkflowTaskParams, WorkflowTransferParams, WorkflowWithdrawParams, createAuthClient, createPageSdk, createPublicAccessClient, createReactPage, getAuthErrorExtra, getAuthErrorReason, isAuthChallengeRequired, isAuthClientError, useAppMenus, useAuth, useCanAccessRoute, useCurrentUser, useDataSource, useFormViewPermissions, useLoginMethods, useMessage, useModal, useNavigation, useOpenXiangda, usePageContext, usePageProps, usePageRoute, usePageSdk, usePermission, useProcessActions, useProcessCapabilities, usePublicAccess, useRuntimeAuth, useRuntimeBootstrap } from './react.mjs';
|
|
3
3
|
import React__default from 'react';
|
|
4
|
-
import {
|
|
4
|
+
import { b as FormSchema, a as FormRuntimeApi, c as FormRuntimeApiConfig } from '../ProcessPreview-CUQFUDvw.mjs';
|
|
5
|
+
export { e as extractFieldsFromComponentsTree } from '../dataManagementApi-DQKInwWS.mjs';
|
|
5
6
|
|
|
6
7
|
type RuntimeCssIsolation = "none" | "namespace" | "shadow";
|
|
7
8
|
interface RuntimeHostBootstrap {
|
|
@@ -165,7 +166,6 @@ interface NormalizeRuntimeFormSchemaOptions {
|
|
|
165
166
|
appType: string;
|
|
166
167
|
formUuid: string;
|
|
167
168
|
}
|
|
168
|
-
declare const extractFieldsFromComponentsTree: (componentsTree: any) => FieldDefinition[];
|
|
169
169
|
declare const normalizeRuntimeFormSchema: (payload: any, options: NormalizeRuntimeFormSchemaOptions) => FormSchema | undefined;
|
|
170
170
|
|
|
171
|
-
export { type BrowserRuntimeBootstrapOptions, type BrowserRuntimeHostOptions, type BrowserRuntimeMountOptions, type BrowserRuntimeMountResult, type BrowserRuntimeRouteKind, type BrowserRuntimeRouteMode, type BrowserRuntimeRouteResolution, type BrowserRuntimeRouteResolveOptions, type BuiltinRouteConfigMap, type BuiltinRouteOverrideComponent, type BuiltinRouteOverrideComponentProps, type BuiltinRouteOverrides, BuiltinRouteRenderer, type BuiltinRouteRendererProps, type BuiltinRouteSurfaceConfig, type CustomPageModule, type LoadedRuntimeAssets, type NormalizeRuntimeFormSchemaOptions, PageBridgeApi, PageContext, PageInfo, type RuntimeCssIsolation, type RuntimeHostBootstrap, type RuntimeMountOptions, createBrowserPageBridge, createBrowserPageContext, createBuiltinRouteRequest,
|
|
171
|
+
export { type BrowserRuntimeBootstrapOptions, type BrowserRuntimeHostOptions, type BrowserRuntimeMountOptions, type BrowserRuntimeMountResult, type BrowserRuntimeRouteKind, type BrowserRuntimeRouteMode, type BrowserRuntimeRouteResolution, type BrowserRuntimeRouteResolveOptions, type BuiltinRouteConfigMap, type BuiltinRouteOverrideComponent, type BuiltinRouteOverrideComponentProps, type BuiltinRouteOverrides, BuiltinRouteRenderer, type BuiltinRouteRendererProps, type BuiltinRouteSurfaceConfig, type CustomPageModule, type LoadedRuntimeAssets, type NormalizeRuntimeFormSchemaOptions, PageBridgeApi, PageContext, PageInfo, type RuntimeCssIsolation, type RuntimeHostBootstrap, type RuntimeMountOptions, createBrowserPageBridge, createBrowserPageContext, createBuiltinRouteRequest, fetchBrowserRuntimeBootstrap, loadCustomPageModule, loadRuntimeScriptModules, mountBrowserPageRuntime, mountCustomPageRuntime, normalizeRuntimeFormSchema, resolveBrowserRuntimeRoute, resolveRuntimeAssets };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { PageContext, PageInfo, PageBridgeApi } from './react.js';
|
|
2
|
-
export { ApiEnvelope, ApiPermissionListParams, AppAuthClient, AppFunctionConnectorApi, AppFunctionContext, AppFunctionDataViewApi, AppFunctionFormApi, AppFunctionFormGetByIdParams, AppFunctionFormQueryParams, AppFunctionFormWriteParams, AppFunctionNotificationApi, AppFunctionOperatorInfo, AppFunctionOrganizationApi, AppFunctionPermissionContext, AppFunctionRuntimeContext, ApproveTaskParams, AssignPermissionsParams, AssignRolesParams, AuthChallengePayload, AuthClientError, AuthClientErrorOptions, AuthClientOptions, AuthErrorExtra, AuthLogoutRedirectOptions, AuthMethod, AuthMethodType, AuthTokenData, AuthUser, BatchAddUsersToRoleParams, BatchSendNotificationByTypeParams, ChangeOrganizationAccountPasswordParams, ChangeUserRoleParams, ConnectorCallParams, ConnectorInvokeParams, ConnectorInvokeResult, ConnectorRequestBodyType, ConnectorResponseType, CreateApiPermissionParams, CreateFormPermissionGroupDto, CreateOrganizationAccountParams, CreateOrganizationDepartmentParams, CreatePagePermissionGroupDto, CreateRoleParams, CreateUiPermissionParams, CreateUserParams, CurrentUserDepartmentParents, CustomPageEntryConfig, CustomPageEntryMode, DataManagementConfigParams, DataManagementFilterState, DataPermissionConditionDto, DataPermissionDto, DataPermissionRuleDto, DataViewQueryParams, DataViewQueryResult, DataViewStatsParams, DingTalkLoginInput, DingTalkNotificationCapabilities, DingTalkNotificationCardConfig, DingTalkNotificationCardField, DingTalkNotificationCardMode, DingTalkNotificationCardPreview, DingTalkNotificationChannelConfig, DingTalkNotificationDeliveryMode, DingTalkNotificationPreviewResult, ExecuteProcessOperationInput, FieldAccessLevel, FieldAccessPolicyDto, FieldAccessPolicyItemDto, FieldOptionValue, FieldPermissionDto, FindNotificationConfigParams, FormAdvancedSearchParams, FormChangeRecordParams, FormCreateParams, FormCreateResult, FormDetailResult, FormExportParams, FormFieldValue, FormGetDetailParams, FormImportParams, FormInstanceIdentifierResult, FormPermissionGroup, FormRemoveParams, FormSearchParams, FormUpdateParams, FormUpdateResult, FunctionInvokeParams, FunctionInvokeResult, GetParentDepartmentsOptions, GetProcessInstanceParams, GetUserRolesParams, GuestLoginInput, ImportExportRecordDownloadParams, ImportExportRecordQuery, InitiatorApproverSelector, InstanceStatus, ListNotificationInboxParams, ListWorkCenterItemsParams, LoginLogGetParams, LoginLogListParams, LoginLogRecord, LoginLogStats, LoginLogStatsParams, LoginLogStatus, LoginMethodsResult, LoginPage, LoginPageProps, MarkAllNotificationReadResult, NotificationChannel, NotificationChannelConfig, NotificationChannelsConfig, NotificationConfigLevel, NotificationInboxListResult, NotificationInboxMessage, NotificationInboxReadStatus, NotificationMessageRecord, NotificationTemplate, NotificationTemplatePreview, NotificationTypeConfig, NotificationUnreadCountResult, OpenXiangdaPageProvider, OpenXiangdaPageProviderProps, OpenXiangdaProvider, OpenXiangdaProviderProps, OrganizationAccountListParams, OrganizationCapabilities, OrganizationListResult, PageApiPermissionRecord, PageApiResponse, PageAppInfo, PageBinaryResponse, PageDataManagementConfig, PageDataSourceDescriptor, PageDepartmentInfo, PageDepartmentRecord, PageHttpMethod, PageListResult, PageMessageApi, PageModalApi, PageNavigationApi, PageOffsetListResult, PagePermissionGroup, PagePermissionInfo, PageProvider, PageQueryValue, PageRequestOptions, PageRoleRecord, PageRouteInfo, PageScope, PageSdk, PageSdkError, PageSdkMeta, PageTransportDownloadPayload, PageTransportRequestPayload, PageUiPermissionRecord, PageUiPermissionType, PageUserInfo, PageUserRecord, PageUserType, PasswordLoginInput, PermissionBoundary, PermissionBoundaryFallback, PermissionBoundaryFallbackState, PermissionBoundaryProps, PhoneCodeInput, PhoneCodeLoginInput, PhoneCodeRegisterInput, PhoneCodeSendResult, PreviewDingTalkNotificationParams, PreviewNotificationTemplateParams, ProcessActionBar, ProcessActionBarProps, ProcessApproveAction, ProcessCapabilities, ProcessCapabilityOperation, ProcessInstanceLookupParams, ProcessPreviewPanel, ProcessPreviewPanelProps, ProcessTimeline, ProcessTimelineProps, PublicAccessClaim, PublicAccessClient, PublicAccessClientError, PublicAccessClientOptions, PublicAccessGate, PublicAccessGateProps, PublicAccessSessionData, PublicAccessSessionInput, QueryFormPermissionGroupDto, QueryPagePermissionGroupDto, RefreshInput, ResetOrganizationAccountPasswordParams, ResolveLoginUrlInput, ResolveProcessCapabilitiesParams, RoleListParams, RoleUsersParams, RouteAccessResult, RuntimeBootstrap, RuntimeErrorSnapshot, RuntimeErrorType, RuntimeLogoutOptions, RuntimeMenuItem, RuntimePagePermissions, RuntimeRedirectLoginOptions, RuntimeRequestError, RuntimeRequestState, RuntimeResolveLoginOptions, SaveDataManagementConfigParams, SearchComponentName, SearchExpression, SearchFieldKey, SearchGroup, SearchLogic, SearchOperator, SearchRule, SearchSortItem, SearchSystemField, SendNotificationByTypeParams, SendNotificationResult, SsoLoginUrlInput, SsoLoginUrlResult, SubFormRule, SwitchAppRoleParams, SwitchPlatformRoleParams, TerminateProcessInstanceParams, TriggerCallbackTaskParams, UiPermissionListParams, UpdateApiPermissionParams, UpdateFormPermissionGroupDto, UpdateOrganizationAccountParams, UpdateOrganizationDepartmentParams, UpdatePagePermissionGroupDto, UpdateRoleParams, UpdateUiPermissionParams, UpdateUserParams, UseAuthOptions, UseCanAccessRouteInput, UseLoginMethodsState, UseProcessActionsOptions, UseProcessActionsReturn, UseProcessCapabilitiesOptions, UseProcessCapabilitiesReturn, UsePublicAccessOptions, UsePublicAccessState, UserListParams, UserMenuPermissionsResponse, ValidateUserParams, ViewFieldPermissionValue, ViewOperationPermission, ViewPermissionSummary, WorkCenterBoxType, WorkCenterGroupedStat, WorkCenterItem, WorkCenterListResult, WorkCenterStats, WorkCenterStatsParams, WorkflowApproveParams, WorkflowCapabilityActionKey, WorkflowDefinitionByFormParams, WorkflowInitiatorSelectCandidatesParams, WorkflowInitiatorSelectRequirementsParams, WorkflowPreviewParams, WorkflowResubmitInitiatorSelectRequirementsParams, WorkflowResubmitParams, WorkflowReturnParams, WorkflowSaveTaskParams, WorkflowStartFromExistingInstanceParams, WorkflowTaskParams, WorkflowTransferParams, WorkflowWithdrawParams, createAuthClient, createPageSdk, createPublicAccessClient, createReactPage, getAuthErrorExtra, getAuthErrorReason, isAuthChallengeRequired, isAuthClientError, useAppMenus, useAuth, useCanAccessRoute, useCurrentUser, useDataSource, useFormViewPermissions, useLoginMethods, useMessage, useModal, useNavigation, useOpenXiangda, usePageContext, usePageProps, usePageRoute, usePageSdk, usePermission, useProcessActions, useProcessCapabilities, usePublicAccess, useRuntimeAuth, useRuntimeBootstrap } from './react.js';
|
|
2
|
+
export { ApiEnvelope, ApiPermissionListParams, AppAuthClient, AppFunctionConnectorApi, AppFunctionContext, AppFunctionDataViewApi, AppFunctionFormApi, AppFunctionFormGetByIdParams, AppFunctionFormQueryParams, AppFunctionFormWriteParams, AppFunctionNotificationApi, AppFunctionOperatorInfo, AppFunctionOrganizationApi, AppFunctionPermissionContext, AppFunctionRuntimeContext, ApproveTaskParams, AssignPermissionsParams, AssignRolesParams, AuthChallengePayload, AuthClientError, AuthClientErrorOptions, AuthClientOptions, AuthErrorExtra, AuthLogoutRedirectOptions, AuthMethod, AuthMethodType, AuthTokenData, AuthUser, BatchAddUsersToRoleParams, BatchSendNotificationByTypeParams, ChangeOrganizationAccountPasswordParams, ChangeUserRoleParams, ConnectorCallParams, ConnectorInvokeParams, ConnectorInvokeResult, ConnectorRequestBodyType, ConnectorResponseType, CreateApiPermissionParams, CreateFormPermissionGroupDto, CreateOrganizationAccountParams, CreateOrganizationDepartmentParams, CreatePagePermissionGroupDto, CreateRoleParams, CreateUiPermissionParams, CreateUserParams, CurrentUserDepartmentParents, CustomPageEntryConfig, CustomPageEntryMode, DataManagementConfigParams, DataManagementFilterState, DataPermissionConditionDto, DataPermissionDto, DataPermissionRuleDto, DataViewQueryParams, DataViewQueryResult, DataViewStatsParams, DingTalkLoginInput, DingTalkNotificationCapabilities, DingTalkNotificationCardConfig, DingTalkNotificationCardField, DingTalkNotificationCardMode, DingTalkNotificationCardPreview, DingTalkNotificationChannelConfig, DingTalkNotificationDeliveryMode, DingTalkNotificationPreviewResult, ExecuteProcessOperationInput, FieldAccessLevel, FieldAccessPolicyDto, FieldAccessPolicyItemDto, FieldOptionValue, FieldPermissionDto, FindNotificationConfigParams, FormAdvancedSearchParams, FormChangeRecordParams, FormCreateParams, FormCreateResult, FormDetailResult, FormExportParams, FormFieldValue, FormGetDetailParams, FormImportParams, FormInstanceIdentifierResult, FormPermissionGroup, FormRemoveParams, FormSearchParams, FormUpdateParams, FormUpdateResult, FunctionInvokeParams, FunctionInvokeResult, GetParentDepartmentsOptions, GetProcessInstanceParams, GetUserRolesParams, GuestLoginInput, ImportExportRecordDownloadParams, ImportExportRecordQuery, InitiatorApproverSelector, InstanceStatus, ListNotificationInboxParams, ListWorkCenterItemsParams, LoginLogGetParams, LoginLogListParams, LoginLogRecord, LoginLogStats, LoginLogStatsParams, LoginLogStatus, LoginMethodsResult, LoginPage, LoginPageProps, MarkAllNotificationReadResult, NotificationChannel, NotificationChannelConfig, NotificationChannelsConfig, NotificationConfigLevel, NotificationInboxListResult, NotificationInboxMessage, NotificationInboxReadStatus, NotificationMessageRecord, NotificationTemplate, NotificationTemplatePreview, NotificationTypeConfig, NotificationUnreadCountResult, OpenXiangdaPageProvider, OpenXiangdaPageProviderProps, OpenXiangdaProvider, OpenXiangdaProviderProps, OrganizationAccountListParams, OrganizationCapabilities, OrganizationListResult, PageApiPermissionRecord, PageApiResponse, PageAppInfo, PageBinaryResponse, PageDataManagementConfig, PageDataSourceDescriptor, PageDepartmentInfo, PageDepartmentRecord, PageHttpMethod, PageListResult, PageMessageApi, PageModalApi, PageNavigationApi, PageOffsetListResult, PagePermissionGroup, PagePermissionInfo, PageProvider, PageQueryValue, PageRequestOptions, PageRoleRecord, PageRouteInfo, PageScope, PageSdk, PageSdkError, PageSdkMeta, PageTransportDownloadPayload, PageTransportRequestPayload, PageUiPermissionRecord, PageUiPermissionType, PageUserInfo, PageUserRecord, PageUserType, PasswordLoginInput, PermissionBoundary, PermissionBoundaryFallback, PermissionBoundaryFallbackState, PermissionBoundaryProps, PhoneCodeInput, PhoneCodeLoginInput, PhoneCodeRegisterInput, PhoneCodeSendResult, PreviewDingTalkNotificationParams, PreviewNotificationTemplateParams, ProcessActionBar, ProcessActionBarProps, ProcessApproveAction, ProcessCapabilities, ProcessCapabilityOperation, ProcessInstanceLookupParams, ProcessPreviewPanel, ProcessPreviewPanelProps, ProcessTimeline, ProcessTimelineProps, PublicAccessClaim, PublicAccessClient, PublicAccessClientError, PublicAccessClientOptions, PublicAccessGate, PublicAccessGateProps, PublicAccessSessionData, PublicAccessSessionInput, PublicStorageAction, PublicStorageGrant, QueryFormPermissionGroupDto, QueryPagePermissionGroupDto, RefreshInput, ResetOrganizationAccountPasswordParams, ResolveLoginUrlInput, ResolveProcessCapabilitiesParams, RoleListParams, RoleUsersParams, RouteAccessResult, RuntimeBootstrap, RuntimeErrorSnapshot, RuntimeErrorType, RuntimeLogoutOptions, RuntimeMenuItem, RuntimePagePermissions, RuntimeRedirectLoginOptions, RuntimeRequestError, RuntimeRequestState, RuntimeResolveLoginOptions, SaveDataManagementConfigParams, SearchComponentName, SearchExpression, SearchFieldKey, SearchGroup, SearchLogic, SearchOperator, SearchRule, SearchSortItem, SearchSystemField, SendNotificationByTypeParams, SendNotificationResult, SsoLoginUrlInput, SsoLoginUrlResult, SubFormRule, SwitchAppRoleParams, SwitchPlatformRoleParams, TerminateProcessInstanceParams, TriggerCallbackTaskParams, UiPermissionListParams, UpdateApiPermissionParams, UpdateFormPermissionGroupDto, UpdateOrganizationAccountParams, UpdateOrganizationDepartmentParams, UpdatePagePermissionGroupDto, UpdateRoleParams, UpdateUiPermissionParams, UpdateUserParams, UseAuthOptions, UseCanAccessRouteInput, UseLoginMethodsState, UseProcessActionsOptions, UseProcessActionsReturn, UseProcessCapabilitiesOptions, UseProcessCapabilitiesReturn, UsePublicAccessOptions, UsePublicAccessState, UserListParams, UserMenuPermissionsResponse, ValidateUserParams, ViewFieldPermissionValue, ViewOperationPermission, ViewPermissionSummary, WorkCenterBoxType, WorkCenterGroupedStat, WorkCenterItem, WorkCenterListResult, WorkCenterStats, WorkCenterStatsParams, WorkflowApproveParams, WorkflowCapabilityActionKey, WorkflowDefinitionByFormParams, WorkflowInitiatorSelectCandidatesParams, WorkflowInitiatorSelectRequirementsParams, WorkflowPreviewParams, WorkflowResubmitInitiatorSelectRequirementsParams, WorkflowResubmitParams, WorkflowReturnParams, WorkflowSaveTaskParams, WorkflowStartFromExistingInstanceParams, WorkflowTaskParams, WorkflowTransferParams, WorkflowWithdrawParams, createAuthClient, createPageSdk, createPublicAccessClient, createReactPage, getAuthErrorExtra, getAuthErrorReason, isAuthChallengeRequired, isAuthClientError, useAppMenus, useAuth, useCanAccessRoute, useCurrentUser, useDataSource, useFormViewPermissions, useLoginMethods, useMessage, useModal, useNavigation, useOpenXiangda, usePageContext, usePageProps, usePageRoute, usePageSdk, usePermission, useProcessActions, useProcessCapabilities, usePublicAccess, useRuntimeAuth, useRuntimeBootstrap } from './react.js';
|
|
3
3
|
import React__default from 'react';
|
|
4
|
-
import {
|
|
4
|
+
import { b as FormSchema, a as FormRuntimeApi, c as FormRuntimeApiConfig } from '../ProcessPreview-CUQFUDvw.js';
|
|
5
|
+
export { e as extractFieldsFromComponentsTree } from '../dataManagementApi-CwBEmnXg.js';
|
|
5
6
|
|
|
6
7
|
type RuntimeCssIsolation = "none" | "namespace" | "shadow";
|
|
7
8
|
interface RuntimeHostBootstrap {
|
|
@@ -165,7 +166,6 @@ interface NormalizeRuntimeFormSchemaOptions {
|
|
|
165
166
|
appType: string;
|
|
166
167
|
formUuid: string;
|
|
167
168
|
}
|
|
168
|
-
declare const extractFieldsFromComponentsTree: (componentsTree: any) => FieldDefinition[];
|
|
169
169
|
declare const normalizeRuntimeFormSchema: (payload: any, options: NormalizeRuntimeFormSchemaOptions) => FormSchema | undefined;
|
|
170
170
|
|
|
171
|
-
export { type BrowserRuntimeBootstrapOptions, type BrowserRuntimeHostOptions, type BrowserRuntimeMountOptions, type BrowserRuntimeMountResult, type BrowserRuntimeRouteKind, type BrowserRuntimeRouteMode, type BrowserRuntimeRouteResolution, type BrowserRuntimeRouteResolveOptions, type BuiltinRouteConfigMap, type BuiltinRouteOverrideComponent, type BuiltinRouteOverrideComponentProps, type BuiltinRouteOverrides, BuiltinRouteRenderer, type BuiltinRouteRendererProps, type BuiltinRouteSurfaceConfig, type CustomPageModule, type LoadedRuntimeAssets, type NormalizeRuntimeFormSchemaOptions, PageBridgeApi, PageContext, PageInfo, type RuntimeCssIsolation, type RuntimeHostBootstrap, type RuntimeMountOptions, createBrowserPageBridge, createBrowserPageContext, createBuiltinRouteRequest,
|
|
171
|
+
export { type BrowserRuntimeBootstrapOptions, type BrowserRuntimeHostOptions, type BrowserRuntimeMountOptions, type BrowserRuntimeMountResult, type BrowserRuntimeRouteKind, type BrowserRuntimeRouteMode, type BrowserRuntimeRouteResolution, type BrowserRuntimeRouteResolveOptions, type BuiltinRouteConfigMap, type BuiltinRouteOverrideComponent, type BuiltinRouteOverrideComponentProps, type BuiltinRouteOverrides, BuiltinRouteRenderer, type BuiltinRouteRendererProps, type BuiltinRouteSurfaceConfig, type CustomPageModule, type LoadedRuntimeAssets, type NormalizeRuntimeFormSchemaOptions, PageBridgeApi, PageContext, PageInfo, type RuntimeCssIsolation, type RuntimeHostBootstrap, type RuntimeMountOptions, createBrowserPageBridge, createBrowserPageContext, createBuiltinRouteRequest, fetchBrowserRuntimeBootstrap, loadCustomPageModule, loadRuntimeScriptModules, mountBrowserPageRuntime, mountCustomPageRuntime, normalizeRuntimeFormSchema, resolveBrowserRuntimeRoute, resolveRuntimeAssets };
|
|
@@ -6135,6 +6135,12 @@ var OpenXiangdaProvider = ({
|
|
|
6135
6135
|
() => createAuthorizedFetch(resolvedFetch, accessToken),
|
|
6136
6136
|
[accessToken, resolvedFetch]
|
|
6137
6137
|
);
|
|
6138
|
+
const getAuthHeaders = useCallback8(() => {
|
|
6139
|
+
const state2 = accessTokenRef.current;
|
|
6140
|
+
if (!state2) return {};
|
|
6141
|
+
const token = resolveAccessTokenForCurrentRoute(state2);
|
|
6142
|
+
return token ? { authorization: `Bearer ${token}` } : {};
|
|
6143
|
+
}, []);
|
|
6138
6144
|
const [state, setState] = useState9({
|
|
6139
6145
|
data: null,
|
|
6140
6146
|
loading: true,
|
|
@@ -6204,10 +6210,19 @@ var OpenXiangdaProvider = ({
|
|
|
6204
6210
|
servicePrefix,
|
|
6205
6211
|
fetchImpl: authorizedFetch,
|
|
6206
6212
|
baseFetchImpl: resolvedFetch,
|
|
6213
|
+
getAuthHeaders,
|
|
6207
6214
|
reload,
|
|
6208
6215
|
setAccessToken
|
|
6209
6216
|
}),
|
|
6210
|
-
[
|
|
6217
|
+
[
|
|
6218
|
+
authorizedFetch,
|
|
6219
|
+
getAuthHeaders,
|
|
6220
|
+
reload,
|
|
6221
|
+
resolvedAppType,
|
|
6222
|
+
resolvedFetch,
|
|
6223
|
+
servicePrefix,
|
|
6224
|
+
state
|
|
6225
|
+
]
|
|
6211
6226
|
);
|
|
6212
6227
|
return /* @__PURE__ */ jsx10(OpenXiangdaRuntimeContext.Provider, { value, children });
|
|
6213
6228
|
};
|
|
@@ -7163,7 +7178,31 @@ var parseResponse = async (response) => {
|
|
|
7163
7178
|
message: response.statusText
|
|
7164
7179
|
};
|
|
7165
7180
|
};
|
|
7166
|
-
var
|
|
7181
|
+
var applyAuthHeaders = (headers, getAuthHeaders) => {
|
|
7182
|
+
const authHeaders = getAuthHeaders?.();
|
|
7183
|
+
if (authHeaders) {
|
|
7184
|
+
new Headers(authHeaders).forEach((value, key) => {
|
|
7185
|
+
if (!headers.has(key)) headers.set(key, value);
|
|
7186
|
+
});
|
|
7187
|
+
}
|
|
7188
|
+
const token = typeof window !== "undefined" ? window.localStorage?.getItem("token") : void 0;
|
|
7189
|
+
if (token && !headers.has("authorization")) {
|
|
7190
|
+
headers.set("authorization", token);
|
|
7191
|
+
}
|
|
7192
|
+
};
|
|
7193
|
+
var applyXhrAuthHeaders = (xhr, getAuthHeaders) => {
|
|
7194
|
+
let hasAuthorization = false;
|
|
7195
|
+
const authHeaders = getAuthHeaders?.();
|
|
7196
|
+
if (authHeaders) {
|
|
7197
|
+
new Headers(authHeaders).forEach((value, key) => {
|
|
7198
|
+
if (key.toLowerCase() === "authorization") hasAuthorization = true;
|
|
7199
|
+
xhr.setRequestHeader(key, value);
|
|
7200
|
+
});
|
|
7201
|
+
}
|
|
7202
|
+
const token = typeof window !== "undefined" ? window.localStorage?.getItem("token") : void 0;
|
|
7203
|
+
if (token && !hasAuthorization) xhr.setRequestHeader("authorization", token);
|
|
7204
|
+
};
|
|
7205
|
+
var createDefaultRequest = (baseUrl, fetchImpl = fetch, getAuthHeaders) => async (config) => {
|
|
7167
7206
|
const method = config.method ?? "get";
|
|
7168
7207
|
const url = appendQuery2(joinUrl(baseUrl, config.url), config.params);
|
|
7169
7208
|
const headers = new Headers(config.headers);
|
|
@@ -7176,11 +7215,8 @@ var createDefaultRequest = (baseUrl) => async (config) => {
|
|
|
7176
7215
|
body = JSON.stringify(config.data);
|
|
7177
7216
|
}
|
|
7178
7217
|
}
|
|
7179
|
-
|
|
7180
|
-
|
|
7181
|
-
headers.set("authorization", token);
|
|
7182
|
-
}
|
|
7183
|
-
const response = await fetch(url, {
|
|
7218
|
+
applyAuthHeaders(headers, getAuthHeaders);
|
|
7219
|
+
const response = await fetchImpl(url, {
|
|
7184
7220
|
method,
|
|
7185
7221
|
headers,
|
|
7186
7222
|
body,
|
|
@@ -7248,7 +7284,7 @@ var normalizeUploadData = (data, file, bucketName, baseUrl = "") => {
|
|
|
7248
7284
|
variants
|
|
7249
7285
|
};
|
|
7250
7286
|
};
|
|
7251
|
-
var uploadWithXhr = (baseUrl, file, bucketName, onProgress, options = {}) => new Promise((resolve, reject) => {
|
|
7287
|
+
var uploadWithXhr = (baseUrl, file, bucketName, onProgress, options = {}, getAuthHeaders) => new Promise((resolve, reject) => {
|
|
7252
7288
|
if (globalThis.process?.env?.VITEST) {
|
|
7253
7289
|
onProgress?.(100);
|
|
7254
7290
|
resolve({
|
|
@@ -7278,8 +7314,7 @@ var uploadWithXhr = (baseUrl, file, bucketName, onProgress, options = {}) => new
|
|
|
7278
7314
|
)
|
|
7279
7315
|
);
|
|
7280
7316
|
xhr.withCredentials = true;
|
|
7281
|
-
|
|
7282
|
-
if (token) xhr.setRequestHeader("authorization", token);
|
|
7317
|
+
applyXhrAuthHeaders(xhr, getAuthHeaders);
|
|
7283
7318
|
xhr.upload.onprogress = (event) => {
|
|
7284
7319
|
if (event.lengthComputable) {
|
|
7285
7320
|
onProgress?.(Math.round(event.loaded / event.total * 100));
|
|
@@ -7383,7 +7418,8 @@ async function uploadChunkedFile(request, file, bucketName, baseUrl, onProgress,
|
|
|
7383
7418
|
fileSize: file.size,
|
|
7384
7419
|
chunkSize: DEFAULT_CHUNK_SIZE,
|
|
7385
7420
|
bucketName,
|
|
7386
|
-
visibility: options.visibility
|
|
7421
|
+
visibility: options.visibility,
|
|
7422
|
+
contentType: file.type || void 0
|
|
7387
7423
|
}
|
|
7388
7424
|
});
|
|
7389
7425
|
const uploadInfo = initiate.data || initiate.result;
|
|
@@ -7442,7 +7478,7 @@ var createSegmentProgress = (onProgress, start, end) => (percent) => {
|
|
|
7442
7478
|
onProgress?.(Math.round(next));
|
|
7443
7479
|
};
|
|
7444
7480
|
var getAttachmentUrl = (item) => item.publicUrl || item.previewUrl || item.downloadUrl || item.url || "";
|
|
7445
|
-
async function uploadSingleRuntimeFile(request, baseUrl, file, bucketName, onProgress, options) {
|
|
7481
|
+
async function uploadSingleRuntimeFile(request, baseUrl, file, bucketName, onProgress, options, getAuthHeaders) {
|
|
7446
7482
|
const singleOptions = stripImageCompressionOptions(options);
|
|
7447
7483
|
if (singleOptions.uploadProvider === "builtin-oss") {
|
|
7448
7484
|
return uploadBuiltinOssFile(request, file, bucketName, onProgress, singleOptions);
|
|
@@ -7453,7 +7489,7 @@ async function uploadSingleRuntimeFile(request, baseUrl, file, bucketName, onPro
|
|
|
7453
7489
|
if (file.size > CHUNK_UPLOAD_THRESHOLD) {
|
|
7454
7490
|
return uploadChunkedFile(request, file, bucketName, baseUrl, onProgress);
|
|
7455
7491
|
}
|
|
7456
|
-
return uploadWithXhr(baseUrl, file, bucketName, onProgress);
|
|
7492
|
+
return uploadWithXhr(baseUrl, file, bucketName, onProgress, {}, getAuthHeaders);
|
|
7457
7493
|
}
|
|
7458
7494
|
function toImageVariantMetadata(uploaded, variant) {
|
|
7459
7495
|
return {
|
|
@@ -7467,7 +7503,7 @@ function toImageVariantMetadata(uploaded, variant) {
|
|
|
7467
7503
|
quality: variant.quality
|
|
7468
7504
|
};
|
|
7469
7505
|
}
|
|
7470
|
-
async function uploadFileWithImageVariants(request, baseUrl, file, bucketName, onProgress, options) {
|
|
7506
|
+
async function uploadFileWithImageVariants(request, baseUrl, file, bucketName, onProgress, options, getAuthHeaders) {
|
|
7471
7507
|
let variants = [];
|
|
7472
7508
|
try {
|
|
7473
7509
|
variants = await createCompressedImageVariants(file, options.imageCompression);
|
|
@@ -7475,7 +7511,15 @@ async function uploadFileWithImageVariants(request, baseUrl, file, bucketName, o
|
|
|
7475
7511
|
variants = [];
|
|
7476
7512
|
}
|
|
7477
7513
|
if (variants.length === 0) {
|
|
7478
|
-
return uploadSingleRuntimeFile(
|
|
7514
|
+
return uploadSingleRuntimeFile(
|
|
7515
|
+
request,
|
|
7516
|
+
baseUrl,
|
|
7517
|
+
file,
|
|
7518
|
+
bucketName,
|
|
7519
|
+
onProgress,
|
|
7520
|
+
options,
|
|
7521
|
+
getAuthHeaders
|
|
7522
|
+
);
|
|
7479
7523
|
}
|
|
7480
7524
|
const originalProgressEnd = 70;
|
|
7481
7525
|
const uploaded = await uploadSingleRuntimeFile(
|
|
@@ -7484,7 +7528,8 @@ async function uploadFileWithImageVariants(request, baseUrl, file, bucketName, o
|
|
|
7484
7528
|
file,
|
|
7485
7529
|
bucketName,
|
|
7486
7530
|
createSegmentProgress(onProgress, 0, originalProgressEnd),
|
|
7487
|
-
options
|
|
7531
|
+
options,
|
|
7532
|
+
getAuthHeaders
|
|
7488
7533
|
);
|
|
7489
7534
|
const imageVariants = { ...uploaded.variants || {} };
|
|
7490
7535
|
const variantProgressStep = (100 - originalProgressEnd) / variants.length;
|
|
@@ -7499,7 +7544,8 @@ async function uploadFileWithImageVariants(request, baseUrl, file, bucketName, o
|
|
|
7499
7544
|
variant.file,
|
|
7500
7545
|
bucketName,
|
|
7501
7546
|
createSegmentProgress(onProgress, start, end),
|
|
7502
|
-
options
|
|
7547
|
+
options,
|
|
7548
|
+
getAuthHeaders
|
|
7503
7549
|
);
|
|
7504
7550
|
imageVariants[variant.kind] = toImageVariantMetadata(variantUpload, variant);
|
|
7505
7551
|
} catch {
|
|
@@ -7516,11 +7562,20 @@ async function uploadFileWithImageVariants(request, baseUrl, file, bucketName, o
|
|
|
7516
7562
|
}
|
|
7517
7563
|
function createFormRuntimeApi(config) {
|
|
7518
7564
|
const { baseUrl = getDefaultBaseUrl(), ...overrides } = config ?? {};
|
|
7519
|
-
const
|
|
7565
|
+
const { fetchImpl, getAuthHeaders } = overrides;
|
|
7566
|
+
const request = overrides.request ?? createDefaultRequest(baseUrl, fetchImpl, getAuthHeaders);
|
|
7520
7567
|
const defaults = {
|
|
7521
7568
|
request,
|
|
7522
7569
|
uploadFile: async (file, bucketName = "files", onProgress, options = {}) => {
|
|
7523
|
-
return uploadFileWithImageVariants(
|
|
7570
|
+
return uploadFileWithImageVariants(
|
|
7571
|
+
request,
|
|
7572
|
+
baseUrl,
|
|
7573
|
+
file,
|
|
7574
|
+
bucketName,
|
|
7575
|
+
onProgress,
|
|
7576
|
+
options,
|
|
7577
|
+
getAuthHeaders
|
|
7578
|
+
);
|
|
7524
7579
|
},
|
|
7525
7580
|
uploadPublicFile: async (file, bucketName = DEFAULT_PUBLIC_FILE_BUCKET, onProgress) => {
|
|
7526
7581
|
if (file.size > CHUNK_UPLOAD_THRESHOLD) {
|
|
@@ -7530,7 +7585,7 @@ function createFormRuntimeApi(config) {
|
|
|
7530
7585
|
}
|
|
7531
7586
|
return uploadWithXhr(baseUrl, file, bucketName, onProgress, {
|
|
7532
7587
|
visibility: "public"
|
|
7533
|
-
});
|
|
7588
|
+
}, getAuthHeaders);
|
|
7534
7589
|
},
|
|
7535
7590
|
deleteFile: async (objectName, bucketName = "files", options = {}) => {
|
|
7536
7591
|
if (options.uploadProvider === "builtin-oss" || options.storageScope === "platform") {
|
|
@@ -21554,6 +21609,60 @@ var unwrap = (response) => {
|
|
|
21554
21609
|
return response;
|
|
21555
21610
|
};
|
|
21556
21611
|
var pickData = (value) => value?.data ?? value?.result ?? value;
|
|
21612
|
+
var normalizePlatformComponentName = (componentName) => {
|
|
21613
|
+
const value = String(componentName || "").trim();
|
|
21614
|
+
return value || "TextField";
|
|
21615
|
+
};
|
|
21616
|
+
var extractSlotNodes = (value) => {
|
|
21617
|
+
if (!value) return [];
|
|
21618
|
+
if (Array.isArray(value)) {
|
|
21619
|
+
return value.flatMap((item) => extractSlotNodes(item));
|
|
21620
|
+
}
|
|
21621
|
+
if (typeof value !== "object") return [];
|
|
21622
|
+
if (value.type === "JSSlot" && value.value) {
|
|
21623
|
+
return extractSlotNodes(value.value);
|
|
21624
|
+
}
|
|
21625
|
+
if (value.componentName || Array.isArray(value.children)) {
|
|
21626
|
+
return [value];
|
|
21627
|
+
}
|
|
21628
|
+
return Object.values(value).flatMap((item) => extractSlotNodes(item));
|
|
21629
|
+
};
|
|
21630
|
+
var extractFieldsFromComponentsTree = (componentsTree) => {
|
|
21631
|
+
const roots = Array.isArray(componentsTree) ? componentsTree : [componentsTree];
|
|
21632
|
+
const fields = [];
|
|
21633
|
+
const seen = /* @__PURE__ */ new Set();
|
|
21634
|
+
const walk = (components) => {
|
|
21635
|
+
if (!Array.isArray(components)) return;
|
|
21636
|
+
components.forEach((component) => {
|
|
21637
|
+
if (!component || typeof component !== "object") return;
|
|
21638
|
+
const props = component.props || {};
|
|
21639
|
+
const fieldId = String(props.fieldId || component.fieldId || component.id || "").trim();
|
|
21640
|
+
if (props.isFormComponent === true && fieldId && !seen.has(fieldId)) {
|
|
21641
|
+
seen.add(fieldId);
|
|
21642
|
+
fields.push({
|
|
21643
|
+
...props,
|
|
21644
|
+
id: props.id || component.id || fieldId,
|
|
21645
|
+
fieldId,
|
|
21646
|
+
componentName: normalizePlatformComponentName(
|
|
21647
|
+
props.componentName || component.componentName
|
|
21648
|
+
),
|
|
21649
|
+
label: props.label || component.title || props.title || fieldId,
|
|
21650
|
+
title: props.title || component.title || props.label || fieldId,
|
|
21651
|
+
required: props.required ?? component.required
|
|
21652
|
+
});
|
|
21653
|
+
}
|
|
21654
|
+
if (component.componentName === "SubFormField") return;
|
|
21655
|
+
if (Array.isArray(component.children)) {
|
|
21656
|
+
walk(component.children);
|
|
21657
|
+
}
|
|
21658
|
+
Object.values(props).forEach((propValue) => {
|
|
21659
|
+
walk(extractSlotNodes(propValue));
|
|
21660
|
+
});
|
|
21661
|
+
});
|
|
21662
|
+
};
|
|
21663
|
+
walk(roots);
|
|
21664
|
+
return fields;
|
|
21665
|
+
};
|
|
21557
21666
|
var normalizeActionSummary = (value) => {
|
|
21558
21667
|
const raw = pickData(value) || {};
|
|
21559
21668
|
const actions = Array.from(
|
|
@@ -21582,6 +21691,11 @@ var normalizeField = (key, field, system = false) => ({
|
|
|
21582
21691
|
width: field?.width,
|
|
21583
21692
|
system
|
|
21584
21693
|
});
|
|
21694
|
+
var createDefaultLayout = (fields) => fields.map((field) => ({
|
|
21695
|
+
id: `layout_${field.fieldId}`,
|
|
21696
|
+
type: "field",
|
|
21697
|
+
fieldId: field.fieldId
|
|
21698
|
+
}));
|
|
21585
21699
|
var SYSTEM_VALUE_ALIASES = {
|
|
21586
21700
|
formInstanceId: ["formInstanceId", "formInstId", "form_instance_id", "processInstanceId"],
|
|
21587
21701
|
instanceTitle: ["instanceTitle", "instance_title", "processInstanceTitle", "title"],
|
|
@@ -21695,20 +21809,25 @@ var BASE_SYSTEM_FIELDS = [
|
|
|
21695
21809
|
)
|
|
21696
21810
|
];
|
|
21697
21811
|
var getSystemFieldsForFormType = (formType) => formType === "process" ? [...BASE_SYSTEM_FIELDS, ...PROCESS_SYSTEM_FIELDS] : BASE_SYSTEM_FIELDS;
|
|
21698
|
-
var normalizeDataManagementFields = (payload) => {
|
|
21812
|
+
var normalizeDataManagementFields = (payload, options = {}) => {
|
|
21699
21813
|
const data = pickData(payload);
|
|
21700
21814
|
const rawSchema = data?.schema || data?.formSchema || data?.publishedSchema || data;
|
|
21701
|
-
const schemaAppType = rawSchema?.formMeta?.appType || data?.appType;
|
|
21702
|
-
const schemaFormUuid = rawSchema?.formMeta?.formUuid || data?.formUuid;
|
|
21703
|
-
const schemaTitle = rawSchema?.formMeta?.title || data?.title || data?.name || data?.formName || schemaFormUuid;
|
|
21704
|
-
const formType = data?.formType || data?.schema?.formType || data?.schema?.template?.formType || rawSchema?.template?.formType || data?.type;
|
|
21705
|
-
const rawFields = data?.formFields || data?.schema?.formFields || data?.fields || data?.schema?.fields || data?.formSchema?.fields || [];
|
|
21706
|
-
const
|
|
21815
|
+
const schemaAppType = rawSchema?.formMeta?.appType || rawSchema?.appType || data?.appType || options.appType;
|
|
21816
|
+
const schemaFormUuid = rawSchema?.formMeta?.formUuid || rawSchema?.formUuid || data?.formUuid || options.formUuid;
|
|
21817
|
+
const schemaTitle = rawSchema?.formMeta?.title || rawSchema?.title || data?.title || data?.name || data?.formName || schemaFormUuid;
|
|
21818
|
+
const formType = data?.formType || data?.schema?.formType || data?.schema?.template?.formType || rawSchema?.formType || rawSchema?.template?.formType || data?.type;
|
|
21819
|
+
const rawFields = data?.formFields || data?.schema?.formFields || rawSchema?.formFields || data?.fields || data?.schema?.fields || data?.formSchema?.fields || rawSchema?.fields || [];
|
|
21820
|
+
const extractedFields = Array.isArray(rawFields) && rawFields.length === 0 && rawSchema?.componentsTree ? extractFieldsFromComponentsTree(rawSchema.componentsTree) : rawFields;
|
|
21821
|
+
const fields = (Array.isArray(extractedFields) ? extractedFields.map((field) => normalizeField(field?.fieldId || field?.id, field)) : Object.entries(extractedFields).map(([key, field]) => normalizeField(key, field))).filter((field) => field.componentName !== "PageSection");
|
|
21822
|
+
const schemaFields = Array.isArray(rawSchema?.fields) ? rawSchema.fields : fields;
|
|
21823
|
+
const hasSchemaFields = Array.isArray(rawSchema?.fields) || fields.length > 0;
|
|
21707
21824
|
return {
|
|
21708
|
-
fields
|
|
21825
|
+
fields,
|
|
21709
21826
|
formType,
|
|
21710
|
-
schema: rawSchema &&
|
|
21827
|
+
schema: rawSchema && hasSchemaFields && schemaAppType && schemaFormUuid ? {
|
|
21711
21828
|
...rawSchema,
|
|
21829
|
+
fields: schemaFields,
|
|
21830
|
+
layout: rawSchema.layout || createDefaultLayout(fields),
|
|
21712
21831
|
formMeta: {
|
|
21713
21832
|
formUuid: schemaFormUuid,
|
|
21714
21833
|
appType: schemaAppType,
|
|
@@ -21799,7 +21918,7 @@ async function getDataManagementSchema(request, params) {
|
|
|
21799
21918
|
method: "get",
|
|
21800
21919
|
params
|
|
21801
21920
|
});
|
|
21802
|
-
const result = normalizeDataManagementFields(response);
|
|
21921
|
+
const result = normalizeDataManagementFields(response, params);
|
|
21803
21922
|
if (result.schema) {
|
|
21804
21923
|
result.schema = {
|
|
21805
21924
|
...result.schema,
|
|
@@ -22883,6 +23002,7 @@ var DataManagementList = ({
|
|
|
22883
23002
|
title,
|
|
22884
23003
|
formTitle,
|
|
22885
23004
|
formType: propFormType,
|
|
23005
|
+
schema: providedSchema,
|
|
22886
23006
|
forcedConfig,
|
|
22887
23007
|
showForcedConfig = true,
|
|
22888
23008
|
detailRenderer,
|
|
@@ -23100,7 +23220,10 @@ var DataManagementList = ({
|
|
|
23100
23220
|
setTotal(0);
|
|
23101
23221
|
setSelectedRowKeys([]);
|
|
23102
23222
|
try {
|
|
23103
|
-
const schemaResult =
|
|
23223
|
+
const schemaResult = providedSchema ? normalizeDataManagementFields(
|
|
23224
|
+
{ appType, formUuid, schema: providedSchema },
|
|
23225
|
+
{ appType, formUuid }
|
|
23226
|
+
) : await getDataManagementSchema(request, { appType, formUuid });
|
|
23104
23227
|
if (!mounted) return;
|
|
23105
23228
|
const allFields = uniqueFields([
|
|
23106
23229
|
...schemaResult.fields,
|
|
@@ -23176,6 +23299,7 @@ var DataManagementList = ({
|
|
|
23176
23299
|
loadData,
|
|
23177
23300
|
menuFormUuid,
|
|
23178
23301
|
propFormType,
|
|
23302
|
+
providedSchema,
|
|
23179
23303
|
request,
|
|
23180
23304
|
title
|
|
23181
23305
|
]);
|
|
@@ -24122,61 +24246,7 @@ var DataManagementList = ({
|
|
|
24122
24246
|
};
|
|
24123
24247
|
|
|
24124
24248
|
// packages/sdk/src/runtime/host/formSchema.ts
|
|
24125
|
-
var
|
|
24126
|
-
const value = String(componentName || "").trim();
|
|
24127
|
-
return value || "TextField";
|
|
24128
|
-
};
|
|
24129
|
-
var extractSlotNodes = (value) => {
|
|
24130
|
-
if (!value) return [];
|
|
24131
|
-
if (Array.isArray(value)) {
|
|
24132
|
-
return value.flatMap((item) => extractSlotNodes(item));
|
|
24133
|
-
}
|
|
24134
|
-
if (typeof value !== "object") return [];
|
|
24135
|
-
if (value.type === "JSSlot" && value.value) {
|
|
24136
|
-
return extractSlotNodes(value.value);
|
|
24137
|
-
}
|
|
24138
|
-
if (value.componentName || Array.isArray(value.children)) {
|
|
24139
|
-
return [value];
|
|
24140
|
-
}
|
|
24141
|
-
return Object.values(value).flatMap((item) => extractSlotNodes(item));
|
|
24142
|
-
};
|
|
24143
|
-
var extractFieldsFromComponentsTree = (componentsTree) => {
|
|
24144
|
-
const roots = Array.isArray(componentsTree) ? componentsTree : [componentsTree];
|
|
24145
|
-
const fields = [];
|
|
24146
|
-
const seen = /* @__PURE__ */ new Set();
|
|
24147
|
-
const walk = (components) => {
|
|
24148
|
-
if (!Array.isArray(components)) return;
|
|
24149
|
-
components.forEach((component) => {
|
|
24150
|
-
if (!component || typeof component !== "object") return;
|
|
24151
|
-
const props = component.props || {};
|
|
24152
|
-
const fieldId = String(props.fieldId || component.fieldId || component.id || "").trim();
|
|
24153
|
-
if (props.isFormComponent === true && fieldId && !seen.has(fieldId)) {
|
|
24154
|
-
seen.add(fieldId);
|
|
24155
|
-
fields.push({
|
|
24156
|
-
...props,
|
|
24157
|
-
id: props.id || component.id || fieldId,
|
|
24158
|
-
fieldId,
|
|
24159
|
-
componentName: normalizePlatformComponentName(
|
|
24160
|
-
props.componentName || component.componentName
|
|
24161
|
-
),
|
|
24162
|
-
label: props.label || component.title || props.title || fieldId,
|
|
24163
|
-
title: props.title || component.title || props.label || fieldId,
|
|
24164
|
-
required: props.required ?? component.required
|
|
24165
|
-
});
|
|
24166
|
-
}
|
|
24167
|
-
if (component.componentName === "SubFormField") return;
|
|
24168
|
-
if (Array.isArray(component.children)) {
|
|
24169
|
-
walk(component.children);
|
|
24170
|
-
}
|
|
24171
|
-
Object.values(props).forEach((propValue) => {
|
|
24172
|
-
walk(extractSlotNodes(propValue));
|
|
24173
|
-
});
|
|
24174
|
-
});
|
|
24175
|
-
};
|
|
24176
|
-
walk(roots);
|
|
24177
|
-
return fields;
|
|
24178
|
-
};
|
|
24179
|
-
var createDefaultLayout = (fields) => fields.map((field) => ({
|
|
24249
|
+
var createDefaultLayout2 = (fields) => fields.map((field) => ({
|
|
24180
24250
|
id: `layout_${field.fieldId}`,
|
|
24181
24251
|
type: "field",
|
|
24182
24252
|
fieldId: field.fieldId
|
|
@@ -24192,7 +24262,7 @@ var normalizeRuntimeFormSchema = (payload, options) => {
|
|
|
24192
24262
|
return {
|
|
24193
24263
|
...rawSchema,
|
|
24194
24264
|
fields,
|
|
24195
|
-
layout: rawSchema.layout ||
|
|
24265
|
+
layout: rawSchema.layout || createDefaultLayout2(fields),
|
|
24196
24266
|
formMeta: {
|
|
24197
24267
|
appType: options.appType,
|
|
24198
24268
|
formUuid: options.formUuid,
|