openxiangda 1.0.148 → 1.0.149
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/openxiangda-skills/references/pages/page-sdk.md +19 -0
- package/package.json +1 -1
- package/packages/sdk/dist/{ProcessPreview-BoblxCUt.d.mts → ProcessPreview-BOCARAvP.d.mts} +9 -1
- package/packages/sdk/dist/{ProcessPreview-BoblxCUt.d.ts → ProcessPreview-BOCARAvP.d.ts} +9 -1
- package/packages/sdk/dist/components/index.cjs +33 -21
- package/packages/sdk/dist/components/index.cjs.map +1 -1
- package/packages/sdk/dist/components/index.d.mts +4 -4
- package/packages/sdk/dist/components/index.d.ts +4 -4
- package/packages/sdk/dist/components/index.mjs +33 -21
- package/packages/sdk/dist/components/index.mjs.map +1 -1
- package/packages/sdk/dist/{dataManagementApi-BCzfV88G.d.mts → dataManagementApi-CLMqf79O.d.mts} +1 -1
- package/packages/sdk/dist/{dataManagementApi-_FFNPv2e.d.ts → dataManagementApi-DhpRKmlp.d.ts} +1 -1
- package/packages/sdk/dist/runtime/index.cjs +375 -30
- package/packages/sdk/dist/runtime/index.cjs.map +1 -1
- package/packages/sdk/dist/runtime/index.d.mts +3 -3
- package/packages/sdk/dist/runtime/index.d.ts +3 -3
- package/packages/sdk/dist/runtime/index.mjs +377 -32
- package/packages/sdk/dist/runtime/index.mjs.map +1 -1
- package/packages/sdk/dist/runtime/react.cjs +12 -0
- package/packages/sdk/dist/runtime/react.cjs.map +1 -1
- package/packages/sdk/dist/runtime/react.d.mts +24 -2
- package/packages/sdk/dist/runtime/react.d.ts +24 -2
- package/packages/sdk/dist/runtime/react.mjs +12 -0
- package/packages/sdk/dist/runtime/react.mjs.map +1 -1
- package/templates/openxiangda-react-spa/AGENTS.md +7 -0
- package/templates/openxiangda-react-spa/src/pages/defaults/FilePreviewRoutePage.tsx +18 -33
|
@@ -1,8 +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, 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';
|
|
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, CreateFileAccessTicketOptions, 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, FileAccessTicketAction, FileAccessTicketResult, 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 { b as FormSchema, a as FormRuntimeApi, c as FormRuntimeApiConfig } from '../ProcessPreview-
|
|
5
|
-
export { e as extractFieldsFromComponentsTree } from '../dataManagementApi-
|
|
4
|
+
import { b as FormSchema, a as FormRuntimeApi, c as FormRuntimeApiConfig } from '../ProcessPreview-BOCARAvP.mjs';
|
|
5
|
+
export { e as extractFieldsFromComponentsTree } from '../dataManagementApi-CLMqf79O.mjs';
|
|
6
6
|
|
|
7
7
|
type RuntimeCssIsolation = "none" | "namespace" | "shadow";
|
|
8
8
|
interface RuntimeHostBootstrap {
|
|
@@ -1,8 +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, 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';
|
|
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, CreateFileAccessTicketOptions, 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, FileAccessTicketAction, FileAccessTicketResult, 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 { b as FormSchema, a as FormRuntimeApi, c as FormRuntimeApiConfig } from '../ProcessPreview-
|
|
5
|
-
export { e as extractFieldsFromComponentsTree } from '../dataManagementApi-
|
|
4
|
+
import { b as FormSchema, a as FormRuntimeApi, c as FormRuntimeApiConfig } from '../ProcessPreview-BOCARAvP.js';
|
|
5
|
+
export { e as extractFieldsFromComponentsTree } from '../dataManagementApi-DhpRKmlp.js';
|
|
6
6
|
|
|
7
7
|
type RuntimeCssIsolation = "none" | "namespace" | "shadow";
|
|
8
8
|
interface RuntimeHostBootstrap {
|
|
@@ -667,6 +667,17 @@ var createPageSdk = (context) => {
|
|
|
667
667
|
throw toSdkError(error, payload);
|
|
668
668
|
}
|
|
669
669
|
};
|
|
670
|
+
const createFileAccessTicket = (bucketName, objectName, fileName, action = "preview", options = {}) => request({
|
|
671
|
+
path: "/file/access-ticket",
|
|
672
|
+
method: "post",
|
|
673
|
+
body: {
|
|
674
|
+
bucketName,
|
|
675
|
+
objectName,
|
|
676
|
+
fileName,
|
|
677
|
+
action,
|
|
678
|
+
appType: resolveAppType(context, options.appType)
|
|
679
|
+
}
|
|
680
|
+
});
|
|
670
681
|
const logout = () => request({
|
|
671
682
|
path: "/api/auth/logout",
|
|
672
683
|
method: "post"
|
|
@@ -1952,6 +1963,7 @@ var createPageSdk = (context) => {
|
|
|
1952
1963
|
context,
|
|
1953
1964
|
request,
|
|
1954
1965
|
download,
|
|
1966
|
+
createFileAccessTicket,
|
|
1955
1967
|
transport: {
|
|
1956
1968
|
request,
|
|
1957
1969
|
download
|
|
@@ -6921,7 +6933,7 @@ var readPathFromLocation = () => typeof window === "undefined" ? void 0 : window
|
|
|
6921
6933
|
|
|
6922
6934
|
// packages/sdk/src/runtime/host/builtinRouteRenderer.tsx
|
|
6923
6935
|
import { useCallback as useCallback27, useEffect as useEffect51, useMemo as useMemo37, useState as useState42 } from "react";
|
|
6924
|
-
import { Alert as Alert4, Button as Button16, Card as Card2, Empty as Empty8, Spin as Spin6, Typography as Typography3 } from "antd";
|
|
6936
|
+
import { Alert as Alert4, Button as Button16, Card as Card2, Empty as Empty8, Spin as Spin6, Table as Table4, Tabs as Tabs2, Typography as Typography3 } from "antd";
|
|
6925
6937
|
|
|
6926
6938
|
// packages/sdk/src/components/core/imageCompression.ts
|
|
6927
6939
|
var DEFAULT_THUMB = {
|
|
@@ -7622,11 +7634,11 @@ function createFormRuntimeApi(config) {
|
|
|
7622
7634
|
});
|
|
7623
7635
|
return normalizeFileTicketResult(baseUrl, response.data || response.result);
|
|
7624
7636
|
},
|
|
7625
|
-
createFileAccessTicket: async (bucketName, objectName, fileName, purpose = "preview") => {
|
|
7637
|
+
createFileAccessTicket: async (bucketName, objectName, fileName, purpose = "preview", options = {}) => {
|
|
7626
7638
|
const response = await request({
|
|
7627
7639
|
url: "/file/access-ticket",
|
|
7628
7640
|
method: "post",
|
|
7629
|
-
data: { bucketName, objectName, fileName, purpose }
|
|
7641
|
+
data: { bucketName, objectName, fileName, purpose, appType: options.appType }
|
|
7630
7642
|
});
|
|
7631
7643
|
return normalizeFileTicketResult(baseUrl, response.data || response.result);
|
|
7632
7644
|
},
|
|
@@ -10782,6 +10794,11 @@ function canPreview(item) {
|
|
|
10782
10794
|
const ext = getFileExtension(item.name);
|
|
10783
10795
|
return isImageFile(item.name, item.contentType) || ["mp4", "webm", "ogg", "mov", "m4v"].includes(ext) || PREVIEW_PAGE_EXTENSIONS.includes(ext);
|
|
10784
10796
|
}
|
|
10797
|
+
function appendTicketIfMissing(url, ticket) {
|
|
10798
|
+
if (!url || !ticket || /[?&]ticket=/.test(url)) return url;
|
|
10799
|
+
const separator = url.includes("?") ? "&" : "?";
|
|
10800
|
+
return `${url}${separator}ticket=${encodeURIComponent(ticket)}`;
|
|
10801
|
+
}
|
|
10785
10802
|
function AttachmentFieldPC({
|
|
10786
10803
|
fieldId,
|
|
10787
10804
|
behavior,
|
|
@@ -10897,16 +10914,15 @@ function AttachmentFieldPC({
|
|
|
10897
10914
|
item.bucketName || bucketName,
|
|
10898
10915
|
item.objectName,
|
|
10899
10916
|
item.name,
|
|
10900
|
-
"preview"
|
|
10917
|
+
"preview",
|
|
10918
|
+
{ appType: item.appType || config.appType }
|
|
10901
10919
|
);
|
|
10902
10920
|
const ticketValue = typeof ticket === "string" ? { previewUrl: ticket } : ticket;
|
|
10903
|
-
if (ticketValue?.previewPageUrl
|
|
10904
|
-
|
|
10905
|
-
return `${ticketValue.previewPageUrl}${separator}ticket=${encodeURIComponent(ticketValue.ticket)}`;
|
|
10921
|
+
if (ticketValue?.previewPageUrl) {
|
|
10922
|
+
return appendTicketIfMissing(ticketValue.previewPageUrl, ticketValue.ticket);
|
|
10906
10923
|
}
|
|
10907
10924
|
if (ticketValue?.ticket && PREVIEW_PAGE_EXTENSIONS.includes(getFileExtension(item.name))) {
|
|
10908
|
-
|
|
10909
|
-
return `${previewPagePath}${separator}ticket=${encodeURIComponent(ticketValue.ticket)}`;
|
|
10925
|
+
return appendTicketIfMissing(previewPagePath, ticketValue.ticket);
|
|
10910
10926
|
}
|
|
10911
10927
|
return ticketValue?.previewUrl || ticketValue?.url || "";
|
|
10912
10928
|
}
|
|
@@ -11148,6 +11164,11 @@ function canPreview2(item) {
|
|
|
11148
11164
|
const ext = getFileExtension(item.name);
|
|
11149
11165
|
return isImageFile(item.name, item.contentType) || ["mp4", "webm", "ogg", "mov", "m4v"].includes(ext) || PREVIEW_PAGE_EXTENSIONS2.includes(ext);
|
|
11150
11166
|
}
|
|
11167
|
+
function appendTicketIfMissing2(url, ticket) {
|
|
11168
|
+
if (!url || !ticket || /[?&]ticket=/.test(url)) return url;
|
|
11169
|
+
const separator = url.includes("?") ? "&" : "?";
|
|
11170
|
+
return `${url}${separator}ticket=${encodeURIComponent(ticket)}`;
|
|
11171
|
+
}
|
|
11151
11172
|
function AttachmentFieldMobile({
|
|
11152
11173
|
fieldId,
|
|
11153
11174
|
behavior,
|
|
@@ -11296,16 +11317,15 @@ function AttachmentFieldMobile({
|
|
|
11296
11317
|
item.bucketName || bucketName,
|
|
11297
11318
|
item.objectName,
|
|
11298
11319
|
item.name,
|
|
11299
|
-
"preview"
|
|
11320
|
+
"preview",
|
|
11321
|
+
{ appType: item.appType || config.appType }
|
|
11300
11322
|
);
|
|
11301
11323
|
const ticketValue = typeof ticket === "string" ? { previewUrl: ticket } : ticket;
|
|
11302
|
-
if (ticketValue?.previewPageUrl
|
|
11303
|
-
|
|
11304
|
-
return `${ticketValue.previewPageUrl}${separator}ticket=${encodeURIComponent(ticketValue.ticket)}`;
|
|
11324
|
+
if (ticketValue?.previewPageUrl) {
|
|
11325
|
+
return appendTicketIfMissing2(ticketValue.previewPageUrl, ticketValue.ticket);
|
|
11305
11326
|
}
|
|
11306
11327
|
if (ticketValue?.ticket && PREVIEW_PAGE_EXTENSIONS2.includes(getFileExtension(item.name))) {
|
|
11307
|
-
|
|
11308
|
-
return `${previewPagePath}${separator}ticket=${encodeURIComponent(ticketValue.ticket)}`;
|
|
11328
|
+
return appendTicketIfMissing2(previewPagePath, ticketValue.ticket);
|
|
11309
11329
|
}
|
|
11310
11330
|
return ticketValue?.previewUrl || ticketValue?.url || "";
|
|
11311
11331
|
}
|
|
@@ -11436,6 +11456,11 @@ function canPreview3(item) {
|
|
|
11436
11456
|
const ext = getFileExtension(item.name);
|
|
11437
11457
|
return isImageFile(item.name, item.contentType) || ["mp4", "webm", "ogg", "mov", "m4v"].includes(ext) || PREVIEW_PAGE_EXTENSIONS3.includes(ext);
|
|
11438
11458
|
}
|
|
11459
|
+
function appendTicketIfMissing3(url, ticket) {
|
|
11460
|
+
if (!url || !ticket || /[?&]ticket=/.test(url)) return url;
|
|
11461
|
+
const separator = url.includes("?") ? "&" : "?";
|
|
11462
|
+
return `${url}${separator}ticket=${encodeURIComponent(ticket)}`;
|
|
11463
|
+
}
|
|
11439
11464
|
function AttachmentFieldReadonly({
|
|
11440
11465
|
fieldId,
|
|
11441
11466
|
readonlyClassName,
|
|
@@ -11446,7 +11471,7 @@ function AttachmentFieldReadonly({
|
|
|
11446
11471
|
showFileTypeBadge = false,
|
|
11447
11472
|
previewPagePath = "/file-preview"
|
|
11448
11473
|
}) {
|
|
11449
|
-
const { formData, api } = useFormContext();
|
|
11474
|
+
const { formData, api, config } = useFormContext();
|
|
11450
11475
|
const { isMobile } = useDeviceDetect();
|
|
11451
11476
|
const value = formData[fieldId] ?? [];
|
|
11452
11477
|
if (value.length === 0) {
|
|
@@ -11471,15 +11496,14 @@ function AttachmentFieldReadonly({
|
|
|
11471
11496
|
item.bucketName || bucketName,
|
|
11472
11497
|
item.objectName,
|
|
11473
11498
|
item.name,
|
|
11474
|
-
"preview"
|
|
11499
|
+
"preview",
|
|
11500
|
+
{ appType: item.appType || config.appType }
|
|
11475
11501
|
);
|
|
11476
11502
|
const ticketValue = typeof ticket === "string" ? { previewUrl: ticket } : ticket;
|
|
11477
|
-
if (ticketValue?.previewPageUrl
|
|
11478
|
-
|
|
11479
|
-
url = `${ticketValue.previewPageUrl}${separator}ticket=${encodeURIComponent(ticketValue.ticket)}`;
|
|
11503
|
+
if (ticketValue?.previewPageUrl) {
|
|
11504
|
+
url = appendTicketIfMissing3(ticketValue.previewPageUrl, ticketValue.ticket);
|
|
11480
11505
|
} else if (ticketValue?.ticket && PREVIEW_PAGE_EXTENSIONS3.includes(getFileExtension(item.name))) {
|
|
11481
|
-
|
|
11482
|
-
url = `${previewPagePath}${separator}ticket=${encodeURIComponent(ticketValue.ticket)}`;
|
|
11506
|
+
url = appendTicketIfMissing3(previewPagePath, ticketValue.ticket);
|
|
11483
11507
|
} else {
|
|
11484
11508
|
url = getTicketUrl(ticketValue, url);
|
|
11485
11509
|
}
|
|
@@ -24559,7 +24583,7 @@ var normalizeRuntimeFormSchema = (payload, options) => {
|
|
|
24559
24583
|
};
|
|
24560
24584
|
|
|
24561
24585
|
// packages/sdk/src/runtime/host/builtinRouteRenderer.tsx
|
|
24562
|
-
import { jsx as jsx101, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
24586
|
+
import { Fragment as Fragment16, jsx as jsx101, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
24563
24587
|
var DEFAULT_SERVICE_PREFIX = "/service";
|
|
24564
24588
|
var trimTrailingSlash3 = (value) => String(value || DEFAULT_SERVICE_PREFIX).replace(/\/+$/, "") || DEFAULT_SERVICE_PREFIX;
|
|
24565
24589
|
var appendQuery3 = (url, params) => {
|
|
@@ -24683,23 +24707,337 @@ var getDetailBasePath = (appType, formUuid, formType) => {
|
|
|
24683
24707
|
const detailType = isProcessKind("data-manage-list", formType) ? "processDetail" : "formDetail";
|
|
24684
24708
|
return `/view/${appType}/${detailType}/${formUuid}`;
|
|
24685
24709
|
};
|
|
24710
|
+
var unwrapRuntimePayload4 = (payload) => payload?.data ?? payload?.result ?? payload;
|
|
24711
|
+
var formatFileSize2 = (size) => {
|
|
24712
|
+
const value = Number(size || 0);
|
|
24713
|
+
if (!value) return "0 B";
|
|
24714
|
+
const units = ["B", "KB", "MB", "GB"];
|
|
24715
|
+
const index = Math.min(
|
|
24716
|
+
units.length - 1,
|
|
24717
|
+
Math.floor(Math.log(value) / Math.log(1024))
|
|
24718
|
+
);
|
|
24719
|
+
return `${(value / Math.pow(1024, index)).toFixed(index === 0 ? 0 : 1)} ${units[index]}`;
|
|
24720
|
+
};
|
|
24721
|
+
var toColumnName = (index) => {
|
|
24722
|
+
let value = index + 1;
|
|
24723
|
+
let name = "";
|
|
24724
|
+
while (value > 0) {
|
|
24725
|
+
const mod = (value - 1) % 26;
|
|
24726
|
+
name = String.fromCharCode(65 + mod) + name;
|
|
24727
|
+
value = Math.floor((value - mod) / 26);
|
|
24728
|
+
}
|
|
24729
|
+
return name;
|
|
24730
|
+
};
|
|
24731
|
+
var buildRowsTable = (rows = []) => {
|
|
24732
|
+
const maxColumns = rows.reduce(
|
|
24733
|
+
(count, row) => Math.max(count, Array.isArray(row) ? row.length : 0),
|
|
24734
|
+
0
|
|
24735
|
+
);
|
|
24736
|
+
const columns = Array.from({ length: maxColumns }).map((_, index) => ({
|
|
24737
|
+
title: toColumnName(index),
|
|
24738
|
+
dataIndex: `col_${index}`,
|
|
24739
|
+
key: `col_${index}`,
|
|
24740
|
+
width: 160,
|
|
24741
|
+
render: (value) => /* @__PURE__ */ jsx101(Typography3.Text, { ellipsis: { tooltip: String(value ?? "") }, children: String(value ?? "") })
|
|
24742
|
+
}));
|
|
24743
|
+
const dataSource = rows.map((row, rowIndex) => {
|
|
24744
|
+
const record = { key: rowIndex };
|
|
24745
|
+
(Array.isArray(row) ? row : []).forEach((value, colIndex) => {
|
|
24746
|
+
record[`col_${colIndex}`] = value;
|
|
24747
|
+
});
|
|
24748
|
+
return record;
|
|
24749
|
+
});
|
|
24750
|
+
return { columns, dataSource };
|
|
24751
|
+
};
|
|
24752
|
+
var loadScriptOnce = (src) => new Promise((resolve, reject) => {
|
|
24753
|
+
if (!src || typeof document === "undefined") {
|
|
24754
|
+
reject(new Error("ONLYOFFICE \u811A\u672C\u5730\u5740\u4E0D\u53EF\u7528"));
|
|
24755
|
+
return;
|
|
24756
|
+
}
|
|
24757
|
+
const existed = document.querySelector(`script[src="${src}"]`);
|
|
24758
|
+
if (existed) {
|
|
24759
|
+
resolve();
|
|
24760
|
+
return;
|
|
24761
|
+
}
|
|
24762
|
+
const script = document.createElement("script");
|
|
24763
|
+
script.src = src;
|
|
24764
|
+
script.async = true;
|
|
24765
|
+
script.onload = () => resolve();
|
|
24766
|
+
script.onerror = () => reject(new Error("ONLYOFFICE \u811A\u672C\u52A0\u8F7D\u5931\u8D25"));
|
|
24767
|
+
document.body.appendChild(script);
|
|
24768
|
+
});
|
|
24769
|
+
var OnlyOfficePreview = ({
|
|
24770
|
+
configUrl,
|
|
24771
|
+
request,
|
|
24772
|
+
servicePrefix,
|
|
24773
|
+
ticket
|
|
24774
|
+
}) => {
|
|
24775
|
+
const editorId = useMemo37(
|
|
24776
|
+
() => `openxiangda-onlyoffice-${ticket.replace(/[^a-zA-Z0-9_-]/g, "") || "editor"}`,
|
|
24777
|
+
[ticket]
|
|
24778
|
+
);
|
|
24779
|
+
const [loading, setLoading] = useState42(false);
|
|
24780
|
+
const [error, setError] = useState42("");
|
|
24781
|
+
useEffect51(() => {
|
|
24782
|
+
let disposed = false;
|
|
24783
|
+
const load = async () => {
|
|
24784
|
+
setLoading(true);
|
|
24785
|
+
setError("");
|
|
24786
|
+
try {
|
|
24787
|
+
const response = await request({
|
|
24788
|
+
url: configUrl || `/file/onlyoffice/config/${encodeURIComponent(ticket)}`,
|
|
24789
|
+
method: "get"
|
|
24790
|
+
});
|
|
24791
|
+
const payload = unwrapRuntimePayload4(response);
|
|
24792
|
+
const scriptUrl = `${String(payload.documentServerUrl || "").replace(
|
|
24793
|
+
/\/+$/,
|
|
24794
|
+
""
|
|
24795
|
+
)}/web-apps/apps/api/documents/api.js`;
|
|
24796
|
+
await loadScriptOnce(joinServicePath2(servicePrefix, scriptUrl));
|
|
24797
|
+
if (!disposed && typeof window !== "undefined" && window.DocsAPI?.DocEditor) {
|
|
24798
|
+
new window.DocsAPI.DocEditor(editorId, payload.config);
|
|
24799
|
+
}
|
|
24800
|
+
} catch (currentError) {
|
|
24801
|
+
if (!disposed) {
|
|
24802
|
+
setError(currentError?.message || "ONLYOFFICE \u9884\u89C8\u52A0\u8F7D\u5931\u8D25");
|
|
24803
|
+
}
|
|
24804
|
+
} finally {
|
|
24805
|
+
if (!disposed) {
|
|
24806
|
+
setLoading(false);
|
|
24807
|
+
}
|
|
24808
|
+
}
|
|
24809
|
+
};
|
|
24810
|
+
void load();
|
|
24811
|
+
return () => {
|
|
24812
|
+
disposed = true;
|
|
24813
|
+
};
|
|
24814
|
+
}, [configUrl, editorId, request, servicePrefix, ticket]);
|
|
24815
|
+
return /* @__PURE__ */ jsxs51("div", { style: { minHeight: "calc(100vh - 180px)" }, children: [
|
|
24816
|
+
loading ? /* @__PURE__ */ jsx101(Spin6, { tip: "\u6B63\u5728\u52A0\u8F7D ONLYOFFICE..." }) : null,
|
|
24817
|
+
error ? /* @__PURE__ */ jsx101(Alert4, { type: "warning", showIcon: true, message: error }) : null,
|
|
24818
|
+
/* @__PURE__ */ jsx101("div", { id: editorId, style: { height: "calc(100vh - 180px)", minHeight: 520 } })
|
|
24819
|
+
] });
|
|
24820
|
+
};
|
|
24686
24821
|
var BuiltinFilePreview = ({
|
|
24822
|
+
request,
|
|
24687
24823
|
route,
|
|
24688
24824
|
servicePrefix
|
|
24689
24825
|
}) => {
|
|
24690
24826
|
const ticket = pickRouteValue(route, "ticket");
|
|
24827
|
+
const [metadata, setMetadata] = useState42(null);
|
|
24828
|
+
const [payload, setPayload] = useState42(null);
|
|
24829
|
+
const [loading, setLoading] = useState42(false);
|
|
24830
|
+
const [payloadLoading, setPayloadLoading] = useState42(false);
|
|
24831
|
+
const [error, setError] = useState42("");
|
|
24832
|
+
const [reloadKey, setReloadKey] = useState42(0);
|
|
24833
|
+
useEffect51(() => {
|
|
24834
|
+
let disposed = false;
|
|
24835
|
+
setMetadata(null);
|
|
24836
|
+
setPayload(null);
|
|
24837
|
+
setError("");
|
|
24838
|
+
if (!ticket) return () => {
|
|
24839
|
+
disposed = true;
|
|
24840
|
+
};
|
|
24841
|
+
const loadMetadata = async () => {
|
|
24842
|
+
setLoading(true);
|
|
24843
|
+
try {
|
|
24844
|
+
const response = await request({
|
|
24845
|
+
url: `/file/access-ticket/${encodeURIComponent(ticket)}`,
|
|
24846
|
+
method: "get"
|
|
24847
|
+
});
|
|
24848
|
+
if (!disposed) {
|
|
24849
|
+
setMetadata(unwrapRuntimePayload4(response));
|
|
24850
|
+
}
|
|
24851
|
+
} catch (currentError) {
|
|
24852
|
+
if (!disposed) {
|
|
24853
|
+
setError(currentError?.message || "\u6587\u4EF6\u9884\u89C8\u4FE1\u606F\u52A0\u8F7D\u5931\u8D25");
|
|
24854
|
+
}
|
|
24855
|
+
} finally {
|
|
24856
|
+
if (!disposed) {
|
|
24857
|
+
setLoading(false);
|
|
24858
|
+
}
|
|
24859
|
+
}
|
|
24860
|
+
};
|
|
24861
|
+
void loadMetadata();
|
|
24862
|
+
return () => {
|
|
24863
|
+
disposed = true;
|
|
24864
|
+
};
|
|
24865
|
+
}, [request, reloadKey, ticket]);
|
|
24866
|
+
const resolvePreviewUrl = (url) => joinServicePath2(
|
|
24867
|
+
servicePrefix,
|
|
24868
|
+
url || `/file/preview-by-ticket/${encodeURIComponent(ticket)}`
|
|
24869
|
+
);
|
|
24870
|
+
const downloadUrl = metadata?.downloadUrl ? joinServicePath2(servicePrefix, metadata.downloadUrl) : "";
|
|
24871
|
+
useEffect51(() => {
|
|
24872
|
+
let disposed = false;
|
|
24873
|
+
setPayload(null);
|
|
24874
|
+
if (!metadata?.renderMode || ["pdfjs", "inline", "download", "onlyoffice"].includes(metadata.renderMode)) {
|
|
24875
|
+
setPayloadLoading(false);
|
|
24876
|
+
return () => {
|
|
24877
|
+
disposed = true;
|
|
24878
|
+
};
|
|
24879
|
+
}
|
|
24880
|
+
const url = metadata.renderMode === "excel-basic" ? metadata.excelPreviewUrl : metadata.renderMode === "office-text" ? metadata.officeTextPreviewUrl : metadata.textPreviewUrl;
|
|
24881
|
+
if (!url) return () => {
|
|
24882
|
+
disposed = true;
|
|
24883
|
+
};
|
|
24884
|
+
const loadPayload = async () => {
|
|
24885
|
+
setPayloadLoading(true);
|
|
24886
|
+
try {
|
|
24887
|
+
const response = await request({ url, method: "get" });
|
|
24888
|
+
if (!disposed) {
|
|
24889
|
+
setPayload(unwrapRuntimePayload4(response));
|
|
24890
|
+
}
|
|
24891
|
+
} catch (currentError) {
|
|
24892
|
+
if (!disposed) {
|
|
24893
|
+
setError(currentError?.message || "\u6587\u4EF6\u9884\u89C8\u5185\u5BB9\u52A0\u8F7D\u5931\u8D25");
|
|
24894
|
+
}
|
|
24895
|
+
} finally {
|
|
24896
|
+
if (!disposed) {
|
|
24897
|
+
setPayloadLoading(false);
|
|
24898
|
+
}
|
|
24899
|
+
}
|
|
24900
|
+
};
|
|
24901
|
+
void loadPayload();
|
|
24902
|
+
return () => {
|
|
24903
|
+
disposed = true;
|
|
24904
|
+
};
|
|
24905
|
+
}, [metadata, request]);
|
|
24691
24906
|
if (!ticket) {
|
|
24692
24907
|
return /* @__PURE__ */ jsx101(Card2, { style: { margin: 16 }, children: /* @__PURE__ */ jsx101(Empty8, { description: "\u7F3A\u5C11\u6587\u4EF6\u8BBF\u95EE\u7968\u636E" }) });
|
|
24693
24908
|
}
|
|
24694
|
-
const
|
|
24695
|
-
|
|
24696
|
-
|
|
24697
|
-
|
|
24698
|
-
|
|
24699
|
-
|
|
24700
|
-
|
|
24909
|
+
const renderContent = () => {
|
|
24910
|
+
if (loading && !metadata) return /* @__PURE__ */ jsx101(Spin6, { tip: "\u6B63\u5728\u52A0\u8F7D\u6587\u4EF6\u4FE1\u606F..." });
|
|
24911
|
+
if (error) {
|
|
24912
|
+
return /* @__PURE__ */ jsx101(
|
|
24913
|
+
Alert4,
|
|
24914
|
+
{
|
|
24915
|
+
type: "error",
|
|
24916
|
+
showIcon: true,
|
|
24917
|
+
message: error,
|
|
24918
|
+
action: /* @__PURE__ */ jsx101(Button16, { onClick: () => setReloadKey((value) => value + 1), children: "\u91CD\u8BD5" })
|
|
24919
|
+
}
|
|
24920
|
+
);
|
|
24701
24921
|
}
|
|
24702
|
-
|
|
24922
|
+
if (!metadata) return /* @__PURE__ */ jsx101(Empty8, { description: "\u672A\u83B7\u53D6\u5230\u6587\u4EF6\u4FE1\u606F" });
|
|
24923
|
+
if (metadata.renderMode === "pdfjs") {
|
|
24924
|
+
return /* @__PURE__ */ jsx101(
|
|
24925
|
+
"iframe",
|
|
24926
|
+
{
|
|
24927
|
+
title: "PDF \u9884\u89C8",
|
|
24928
|
+
src: resolvePreviewUrl(metadata.previewUrl),
|
|
24929
|
+
style: { width: "100%", minHeight: "calc(100vh - 180px)", border: 0 }
|
|
24930
|
+
}
|
|
24931
|
+
);
|
|
24932
|
+
}
|
|
24933
|
+
if (metadata.renderMode === "inline" && metadata.previewType === "image") {
|
|
24934
|
+
return /* @__PURE__ */ jsx101("div", { style: { textAlign: "center" }, children: /* @__PURE__ */ jsx101(
|
|
24935
|
+
"img",
|
|
24936
|
+
{
|
|
24937
|
+
alt: metadata.fileName || "\u9644\u4EF6\u9884\u89C8",
|
|
24938
|
+
src: resolvePreviewUrl(metadata.previewUrl),
|
|
24939
|
+
style: { maxWidth: "100%", maxHeight: "calc(100vh - 190px)" }
|
|
24940
|
+
}
|
|
24941
|
+
) });
|
|
24942
|
+
}
|
|
24943
|
+
if (metadata.renderMode === "inline" && metadata.previewType === "video") {
|
|
24944
|
+
return /* @__PURE__ */ jsx101(
|
|
24945
|
+
"video",
|
|
24946
|
+
{
|
|
24947
|
+
controls: true,
|
|
24948
|
+
playsInline: true,
|
|
24949
|
+
preload: "metadata",
|
|
24950
|
+
src: resolvePreviewUrl(metadata.previewUrl),
|
|
24951
|
+
style: { width: "100%", maxHeight: "calc(100vh - 190px)" }
|
|
24952
|
+
}
|
|
24953
|
+
);
|
|
24954
|
+
}
|
|
24955
|
+
if (metadata.renderMode === "excel-basic") {
|
|
24956
|
+
if (payloadLoading) return /* @__PURE__ */ jsx101(Spin6, { tip: "\u6B63\u5728\u89E3\u6790 Excel..." });
|
|
24957
|
+
const sheets = Array.isArray(payload?.sheets) ? payload.sheets : [];
|
|
24958
|
+
if (!sheets.length) return /* @__PURE__ */ jsx101(Empty8, { description: "\u6682\u65E0\u53EF\u9884\u89C8\u7684\u5DE5\u4F5C\u8868" });
|
|
24959
|
+
return /* @__PURE__ */ jsx101(
|
|
24960
|
+
Tabs2,
|
|
24961
|
+
{
|
|
24962
|
+
items: sheets.map((sheet) => {
|
|
24963
|
+
const table = buildRowsTable(sheet.rows || []);
|
|
24964
|
+
return {
|
|
24965
|
+
key: String(sheet.id || sheet.name),
|
|
24966
|
+
label: sheet.name || "Sheet",
|
|
24967
|
+
children: /* @__PURE__ */ jsx101(
|
|
24968
|
+
Table4,
|
|
24969
|
+
{
|
|
24970
|
+
bordered: true,
|
|
24971
|
+
size: "small",
|
|
24972
|
+
pagination: false,
|
|
24973
|
+
scroll: { x: true, y: "calc(100vh - 250px)" },
|
|
24974
|
+
columns: table.columns,
|
|
24975
|
+
dataSource: table.dataSource
|
|
24976
|
+
}
|
|
24977
|
+
)
|
|
24978
|
+
};
|
|
24979
|
+
})
|
|
24980
|
+
}
|
|
24981
|
+
);
|
|
24982
|
+
}
|
|
24983
|
+
if (metadata.renderMode === "text" || metadata.renderMode === "office-text") {
|
|
24984
|
+
if (payloadLoading) return /* @__PURE__ */ jsx101(Spin6, { tip: "\u6B63\u5728\u8BFB\u53D6\u6587\u672C..." });
|
|
24985
|
+
return /* @__PURE__ */ jsxs51("pre", { style: { whiteSpace: "pre-wrap", wordBreak: "break-word", margin: 0 }, children: [
|
|
24986
|
+
payload?.text || "\u6682\u65E0\u6587\u672C\u5185\u5BB9",
|
|
24987
|
+
payload?.truncated ? "\n\n... \u6587\u4EF6\u8F83\u5927\uFF0C\u4EC5\u5C55\u793A\u524D\u90E8\u5185\u5BB9\u3002" : ""
|
|
24988
|
+
] });
|
|
24989
|
+
}
|
|
24990
|
+
if (metadata.renderMode === "onlyoffice") {
|
|
24991
|
+
return /* @__PURE__ */ jsx101(
|
|
24992
|
+
OnlyOfficePreview,
|
|
24993
|
+
{
|
|
24994
|
+
configUrl: metadata.onlyofficeConfigUrl,
|
|
24995
|
+
request,
|
|
24996
|
+
servicePrefix,
|
|
24997
|
+
ticket
|
|
24998
|
+
}
|
|
24999
|
+
);
|
|
25000
|
+
}
|
|
25001
|
+
return /* @__PURE__ */ jsx101(
|
|
25002
|
+
Empty8,
|
|
25003
|
+
{
|
|
25004
|
+
description: "\u5F53\u524D\u6587\u4EF6\u7C7B\u578B\u6682\u4E0D\u652F\u6301\u9884\u89C8",
|
|
25005
|
+
image: Empty8.PRESENTED_IMAGE_SIMPLE,
|
|
25006
|
+
children: downloadUrl ? /* @__PURE__ */ jsx101(Button16, { type: "primary", onClick: () => window.location.assign(downloadUrl), children: "\u4E0B\u8F7D\u6587\u4EF6" }) : null
|
|
25007
|
+
}
|
|
25008
|
+
);
|
|
25009
|
+
};
|
|
25010
|
+
return /* @__PURE__ */ jsxs51("div", { style: { minHeight: "calc(100vh - 74px)", background: "#fff", padding: 16 }, children: [
|
|
25011
|
+
/* @__PURE__ */ jsxs51(
|
|
25012
|
+
Card2,
|
|
25013
|
+
{
|
|
25014
|
+
size: "small",
|
|
25015
|
+
style: { marginBottom: 16 },
|
|
25016
|
+
extra: /* @__PURE__ */ jsxs51(Fragment16, { children: [
|
|
25017
|
+
/* @__PURE__ */ jsx101(Button16, { size: "small", onClick: () => setReloadKey((value) => value + 1), children: "\u5237\u65B0" }),
|
|
25018
|
+
downloadUrl ? /* @__PURE__ */ jsx101(
|
|
25019
|
+
Button16,
|
|
25020
|
+
{
|
|
25021
|
+
size: "small",
|
|
25022
|
+
type: "primary",
|
|
25023
|
+
style: { marginLeft: 8 },
|
|
25024
|
+
onClick: () => window.location.assign(downloadUrl),
|
|
25025
|
+
children: "\u4E0B\u8F7D"
|
|
25026
|
+
}
|
|
25027
|
+
) : null
|
|
25028
|
+
] }),
|
|
25029
|
+
children: [
|
|
25030
|
+
/* @__PURE__ */ jsx101(Typography3.Text, { strong: true, children: metadata?.fileName || "\u9644\u4EF6\u9884\u89C8" }),
|
|
25031
|
+
metadata ? /* @__PURE__ */ jsxs51(Typography3.Text, { type: "secondary", style: { marginLeft: 12 }, children: [
|
|
25032
|
+
(metadata.extension || "FILE").toUpperCase(),
|
|
25033
|
+
" \xB7 ",
|
|
25034
|
+
formatFileSize2(metadata.size)
|
|
25035
|
+
] }) : null
|
|
25036
|
+
]
|
|
25037
|
+
}
|
|
25038
|
+
),
|
|
25039
|
+
renderContent()
|
|
25040
|
+
] });
|
|
24703
25041
|
};
|
|
24704
25042
|
var BuiltinRouteError = ({
|
|
24705
25043
|
error,
|
|
@@ -24826,7 +25164,14 @@ function BuiltinRouteRenderer({
|
|
|
24826
25164
|
}
|
|
24827
25165
|
let defaultNode;
|
|
24828
25166
|
if (route.kind === "file-preview") {
|
|
24829
|
-
defaultNode = /* @__PURE__ */ jsx101(
|
|
25167
|
+
defaultNode = /* @__PURE__ */ jsx101(
|
|
25168
|
+
BuiltinFilePreview,
|
|
25169
|
+
{
|
|
25170
|
+
request,
|
|
25171
|
+
route,
|
|
25172
|
+
servicePrefix: normalizedServicePrefix
|
|
25173
|
+
}
|
|
25174
|
+
);
|
|
24830
25175
|
} else if (route.kind === "data-manage-list") {
|
|
24831
25176
|
if (!appType || !formUuid) {
|
|
24832
25177
|
defaultNode = /* @__PURE__ */ jsx101(Card2, { style: { margin: 16 }, children: /* @__PURE__ */ jsx101(Empty8, { description: "\u6570\u636E\u7BA1\u7406\u9875\u7F3A\u5C11 formUuid\uFF0C\u8BF7\u5728 URL \u6216 resolver params \u4E2D\u63D0\u4F9B formUuid" }) });
|