openxiangda 1.0.102 → 1.0.104
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 +12 -0
- package/package.json +1 -1
- package/packages/sdk/dist/components/index.cjs +30 -5
- package/packages/sdk/dist/components/index.cjs.map +1 -1
- package/packages/sdk/dist/components/index.d.mts +2 -2
- package/packages/sdk/dist/components/index.d.ts +2 -2
- package/packages/sdk/dist/components/index.mjs +30 -5
- package/packages/sdk/dist/components/index.mjs.map +1 -1
- package/packages/sdk/dist/runtime/index.cjs +166 -10
- package/packages/sdk/dist/runtime/index.cjs.map +1 -1
- package/packages/sdk/dist/runtime/index.d.mts +2 -2
- package/packages/sdk/dist/runtime/index.d.ts +2 -2
- package/packages/sdk/dist/runtime/index.mjs +199 -43
- package/packages/sdk/dist/runtime/index.mjs.map +1 -1
- package/packages/sdk/dist/runtime/react.cjs +134 -3
- package/packages/sdk/dist/runtime/react.cjs.map +1 -1
- package/packages/sdk/dist/runtime/react.d.mts +39 -7
- package/packages/sdk/dist/runtime/react.d.ts +39 -7
- package/packages/sdk/dist/runtime/react.mjs +143 -12
- package/packages/sdk/dist/runtime/react.mjs.map +1 -1
- package/packages/sdk/dist/{types-U26h_FIh.d.mts → types-B1GRkvLM.d.mts} +3 -0
- package/packages/sdk/dist/{types-U26h_FIh.d.ts → types-B1GRkvLM.d.ts} +3 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { PageContext, PageInfo, PageBridgeApi } from './react.mjs';
|
|
2
|
-
export { ApiPermissionListParams, AppAuthClient, ApproveTaskParams, AssignPermissionsParams, AssignRolesParams, AuthClientError, AuthClientOptions, AuthLogoutRedirectOptions, AuthMethod, AuthMethodType, AuthTokenData, AuthUser, BatchAddUsersToRoleParams, BatchSendNotificationByTypeParams, ChangeUserRoleParams, ConnectorCallParams, ConnectorInvokeParams, ConnectorInvokeResult, ConnectorRequestBodyType, ConnectorResponseType, CreateApiPermissionParams, CreateFormPermissionGroupDto, CreatePagePermissionGroupDto, CreateRoleParams, CreateUiPermissionParams, CreateUserParams, CurrentUserDepartmentParents, CustomPageEntryConfig, CustomPageEntryMode, DataManagementConfigParams, DataManagementFilterState, DataPermissionConditionDto, DataPermissionDto, DataPermissionRuleDto, DataViewQueryParams, DataViewQueryResult, DataViewStatsParams, DingTalkLoginInput, FieldAccessLevel, FieldAccessPolicyDto, FieldAccessPolicyItemDto, FieldPermissionDto, FindNotificationConfigParams, FormAdvancedSearchParams, FormChangeRecordParams, FormCreateParams, FormExportParams, FormGetDetailParams, FormImportParams, FormPermissionGroup, FormRemoveParams, FormSearchParams, FormUpdateParams, FunctionInvokeParams, FunctionInvokeResult, GetParentDepartmentsOptions, GetProcessInstanceParams, GetUserRolesParams, GuestLoginInput, ImportExportRecordDownloadParams, ImportExportRecordQuery, InstanceStatus, LoginMethodsResult, LoginPage, LoginPageProps, NotificationChannel, NotificationChannelConfig, NotificationChannelsConfig, NotificationConfigLevel, NotificationMessageRecord, NotificationTemplate, NotificationTemplatePreview, NotificationTypeConfig, OpenXiangdaPageProvider, OpenXiangdaPageProviderProps, OpenXiangdaProvider, OpenXiangdaProviderProps, 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, PreviewNotificationTemplateParams, ProcessApproveAction, PublicAccessClaim, PublicAccessClient, PublicAccessClientError, PublicAccessClientOptions, PublicAccessGate, PublicAccessGateProps, PublicAccessSessionData, PublicAccessSessionInput, QueryFormPermissionGroupDto, QueryPagePermissionGroupDto, RefreshInput, ResolveLoginUrlInput, 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, UpdatePagePermissionGroupDto, UpdateRoleParams, UpdateUiPermissionParams, UpdateUserParams, UseAuthOptions, UseCanAccessRouteInput, UseLoginMethodsState, UsePublicAccessOptions, UsePublicAccessState, UserListParams, UserMenuPermissionsResponse, ValidateUserParams, ViewFieldPermissionValue, ViewOperationPermission, ViewPermissionSummary, createAuthClient, createPageSdk, createPublicAccessClient, createReactPage, useAppMenus, useAuth, useCanAccessRoute, useCurrentUser, useDataSource, useFormViewPermissions, useLoginMethods, useMessage, useModal, useNavigation, useOpenXiangda, usePageContext, usePageProps, usePageRoute, usePageSdk, usePermission, usePublicAccess, useRuntimeAuth, useRuntimeBootstrap } from './react.mjs';
|
|
2
|
+
export { ApiPermissionListParams, AppAuthClient, ApproveTaskParams, AssignPermissionsParams, AssignRolesParams, AuthChallengePayload, AuthClientError, AuthClientErrorOptions, AuthClientOptions, AuthErrorExtra, AuthLogoutRedirectOptions, AuthMethod, AuthMethodType, AuthTokenData, AuthUser, BatchAddUsersToRoleParams, BatchSendNotificationByTypeParams, ChangeUserRoleParams, ConnectorCallParams, ConnectorInvokeParams, ConnectorInvokeResult, ConnectorRequestBodyType, ConnectorResponseType, CreateApiPermissionParams, CreateFormPermissionGroupDto, CreatePagePermissionGroupDto, CreateRoleParams, CreateUiPermissionParams, CreateUserParams, CurrentUserDepartmentParents, CustomPageEntryConfig, CustomPageEntryMode, DataManagementConfigParams, DataManagementFilterState, DataPermissionConditionDto, DataPermissionDto, DataPermissionRuleDto, DataViewQueryParams, DataViewQueryResult, DataViewStatsParams, DingTalkLoginInput, FieldAccessLevel, FieldAccessPolicyDto, FieldAccessPolicyItemDto, FieldPermissionDto, FindNotificationConfigParams, FormAdvancedSearchParams, FormChangeRecordParams, FormCreateParams, FormExportParams, FormGetDetailParams, FormImportParams, FormPermissionGroup, FormRemoveParams, FormSearchParams, FormUpdateParams, FunctionInvokeParams, FunctionInvokeResult, GetParentDepartmentsOptions, GetProcessInstanceParams, GetUserRolesParams, GuestLoginInput, ImportExportRecordDownloadParams, ImportExportRecordQuery, InstanceStatus, LoginMethodsResult, LoginPage, LoginPageProps, NotificationChannel, NotificationChannelConfig, NotificationChannelsConfig, NotificationConfigLevel, NotificationMessageRecord, NotificationTemplate, NotificationTemplatePreview, NotificationTypeConfig, OpenXiangdaPageProvider, OpenXiangdaPageProviderProps, OpenXiangdaProvider, OpenXiangdaProviderProps, 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, PreviewNotificationTemplateParams, ProcessApproveAction, PublicAccessClaim, PublicAccessClient, PublicAccessClientError, PublicAccessClientOptions, PublicAccessGate, PublicAccessGateProps, PublicAccessSessionData, PublicAccessSessionInput, QueryFormPermissionGroupDto, QueryPagePermissionGroupDto, RefreshInput, ResolveLoginUrlInput, 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, UpdatePagePermissionGroupDto, UpdateRoleParams, UpdateUiPermissionParams, UpdateUserParams, UseAuthOptions, UseCanAccessRouteInput, UseLoginMethodsState, UsePublicAccessOptions, UsePublicAccessState, UserListParams, UserMenuPermissionsResponse, ValidateUserParams, ViewFieldPermissionValue, ViewOperationPermission, ViewPermissionSummary, createAuthClient, createPageSdk, createPublicAccessClient, createReactPage, getAuthErrorExtra, getAuthErrorReason, isAuthChallengeRequired, isAuthClientError, useAppMenus, useAuth, useCanAccessRoute, useCurrentUser, useDataSource, useFormViewPermissions, useLoginMethods, useMessage, useModal, useNavigation, useOpenXiangda, usePageContext, usePageProps, usePageRoute, usePageSdk, usePermission, usePublicAccess, useRuntimeAuth, useRuntimeBootstrap } from './react.mjs';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import React__default from 'react';
|
|
5
|
-
import { _ as FormSchema, X as FormRuntimeApi, Y as FormRuntimeApiConfig, J as FieldDefinition } from '../types-
|
|
5
|
+
import { _ as FormSchema, X as FormRuntimeApi, Y as FormRuntimeApiConfig, J as FieldDefinition } from '../types-B1GRkvLM.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 { ApiPermissionListParams, AppAuthClient, ApproveTaskParams, AssignPermissionsParams, AssignRolesParams, AuthClientError, AuthClientOptions, AuthLogoutRedirectOptions, AuthMethod, AuthMethodType, AuthTokenData, AuthUser, BatchAddUsersToRoleParams, BatchSendNotificationByTypeParams, ChangeUserRoleParams, ConnectorCallParams, ConnectorInvokeParams, ConnectorInvokeResult, ConnectorRequestBodyType, ConnectorResponseType, CreateApiPermissionParams, CreateFormPermissionGroupDto, CreatePagePermissionGroupDto, CreateRoleParams, CreateUiPermissionParams, CreateUserParams, CurrentUserDepartmentParents, CustomPageEntryConfig, CustomPageEntryMode, DataManagementConfigParams, DataManagementFilterState, DataPermissionConditionDto, DataPermissionDto, DataPermissionRuleDto, DataViewQueryParams, DataViewQueryResult, DataViewStatsParams, DingTalkLoginInput, FieldAccessLevel, FieldAccessPolicyDto, FieldAccessPolicyItemDto, FieldPermissionDto, FindNotificationConfigParams, FormAdvancedSearchParams, FormChangeRecordParams, FormCreateParams, FormExportParams, FormGetDetailParams, FormImportParams, FormPermissionGroup, FormRemoveParams, FormSearchParams, FormUpdateParams, FunctionInvokeParams, FunctionInvokeResult, GetParentDepartmentsOptions, GetProcessInstanceParams, GetUserRolesParams, GuestLoginInput, ImportExportRecordDownloadParams, ImportExportRecordQuery, InstanceStatus, LoginMethodsResult, LoginPage, LoginPageProps, NotificationChannel, NotificationChannelConfig, NotificationChannelsConfig, NotificationConfigLevel, NotificationMessageRecord, NotificationTemplate, NotificationTemplatePreview, NotificationTypeConfig, OpenXiangdaPageProvider, OpenXiangdaPageProviderProps, OpenXiangdaProvider, OpenXiangdaProviderProps, 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, PreviewNotificationTemplateParams, ProcessApproveAction, PublicAccessClaim, PublicAccessClient, PublicAccessClientError, PublicAccessClientOptions, PublicAccessGate, PublicAccessGateProps, PublicAccessSessionData, PublicAccessSessionInput, QueryFormPermissionGroupDto, QueryPagePermissionGroupDto, RefreshInput, ResolveLoginUrlInput, 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, UpdatePagePermissionGroupDto, UpdateRoleParams, UpdateUiPermissionParams, UpdateUserParams, UseAuthOptions, UseCanAccessRouteInput, UseLoginMethodsState, UsePublicAccessOptions, UsePublicAccessState, UserListParams, UserMenuPermissionsResponse, ValidateUserParams, ViewFieldPermissionValue, ViewOperationPermission, ViewPermissionSummary, createAuthClient, createPageSdk, createPublicAccessClient, createReactPage, useAppMenus, useAuth, useCanAccessRoute, useCurrentUser, useDataSource, useFormViewPermissions, useLoginMethods, useMessage, useModal, useNavigation, useOpenXiangda, usePageContext, usePageProps, usePageRoute, usePageSdk, usePermission, usePublicAccess, useRuntimeAuth, useRuntimeBootstrap } from './react.js';
|
|
2
|
+
export { ApiPermissionListParams, AppAuthClient, ApproveTaskParams, AssignPermissionsParams, AssignRolesParams, AuthChallengePayload, AuthClientError, AuthClientErrorOptions, AuthClientOptions, AuthErrorExtra, AuthLogoutRedirectOptions, AuthMethod, AuthMethodType, AuthTokenData, AuthUser, BatchAddUsersToRoleParams, BatchSendNotificationByTypeParams, ChangeUserRoleParams, ConnectorCallParams, ConnectorInvokeParams, ConnectorInvokeResult, ConnectorRequestBodyType, ConnectorResponseType, CreateApiPermissionParams, CreateFormPermissionGroupDto, CreatePagePermissionGroupDto, CreateRoleParams, CreateUiPermissionParams, CreateUserParams, CurrentUserDepartmentParents, CustomPageEntryConfig, CustomPageEntryMode, DataManagementConfigParams, DataManagementFilterState, DataPermissionConditionDto, DataPermissionDto, DataPermissionRuleDto, DataViewQueryParams, DataViewQueryResult, DataViewStatsParams, DingTalkLoginInput, FieldAccessLevel, FieldAccessPolicyDto, FieldAccessPolicyItemDto, FieldPermissionDto, FindNotificationConfigParams, FormAdvancedSearchParams, FormChangeRecordParams, FormCreateParams, FormExportParams, FormGetDetailParams, FormImportParams, FormPermissionGroup, FormRemoveParams, FormSearchParams, FormUpdateParams, FunctionInvokeParams, FunctionInvokeResult, GetParentDepartmentsOptions, GetProcessInstanceParams, GetUserRolesParams, GuestLoginInput, ImportExportRecordDownloadParams, ImportExportRecordQuery, InstanceStatus, LoginMethodsResult, LoginPage, LoginPageProps, NotificationChannel, NotificationChannelConfig, NotificationChannelsConfig, NotificationConfigLevel, NotificationMessageRecord, NotificationTemplate, NotificationTemplatePreview, NotificationTypeConfig, OpenXiangdaPageProvider, OpenXiangdaPageProviderProps, OpenXiangdaProvider, OpenXiangdaProviderProps, 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, PreviewNotificationTemplateParams, ProcessApproveAction, PublicAccessClaim, PublicAccessClient, PublicAccessClientError, PublicAccessClientOptions, PublicAccessGate, PublicAccessGateProps, PublicAccessSessionData, PublicAccessSessionInput, QueryFormPermissionGroupDto, QueryPagePermissionGroupDto, RefreshInput, ResolveLoginUrlInput, 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, UpdatePagePermissionGroupDto, UpdateRoleParams, UpdateUiPermissionParams, UpdateUserParams, UseAuthOptions, UseCanAccessRouteInput, UseLoginMethodsState, UsePublicAccessOptions, UsePublicAccessState, UserListParams, UserMenuPermissionsResponse, ValidateUserParams, ViewFieldPermissionValue, ViewOperationPermission, ViewPermissionSummary, createAuthClient, createPageSdk, createPublicAccessClient, createReactPage, getAuthErrorExtra, getAuthErrorReason, isAuthChallengeRequired, isAuthClientError, useAppMenus, useAuth, useCanAccessRoute, useCurrentUser, useDataSource, useFormViewPermissions, useLoginMethods, useMessage, useModal, useNavigation, useOpenXiangda, usePageContext, usePageProps, usePageRoute, usePageSdk, usePermission, usePublicAccess, useRuntimeAuth, useRuntimeBootstrap } from './react.js';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import React__default from 'react';
|
|
5
|
-
import { _ as FormSchema, X as FormRuntimeApi, Y as FormRuntimeApiConfig, J as FieldDefinition } from '../types-
|
|
5
|
+
import { _ as FormSchema, X as FormRuntimeApi, Y as FormRuntimeApiConfig, J as FieldDefinition } from '../types-B1GRkvLM.js';
|
|
6
6
|
|
|
7
7
|
type RuntimeCssIsolation = "none" | "namespace" | "shadow";
|
|
8
8
|
interface RuntimeHostBootstrap {
|
|
@@ -577,7 +577,7 @@ var require_react_is_development = __commonJS({
|
|
|
577
577
|
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
578
578
|
var Element2 = REACT_ELEMENT_TYPE;
|
|
579
579
|
var ForwardRef2 = REACT_FORWARD_REF_TYPE;
|
|
580
|
-
var
|
|
580
|
+
var Fragment19 = REACT_FRAGMENT_TYPE2;
|
|
581
581
|
var Lazy = REACT_LAZY_TYPE;
|
|
582
582
|
var Memo = REACT_MEMO_TYPE;
|
|
583
583
|
var Portal = REACT_PORTAL_TYPE;
|
|
@@ -645,7 +645,7 @@ var require_react_is_development = __commonJS({
|
|
|
645
645
|
exports.ContextProvider = ContextProvider;
|
|
646
646
|
exports.Element = Element2;
|
|
647
647
|
exports.ForwardRef = ForwardRef2;
|
|
648
|
-
exports.Fragment =
|
|
648
|
+
exports.Fragment = Fragment19;
|
|
649
649
|
exports.Lazy = Lazy;
|
|
650
650
|
exports.Memo = Memo;
|
|
651
651
|
exports.Portal = Portal;
|
|
@@ -2202,8 +2202,43 @@ var AuthClientError = class extends Error {
|
|
|
2202
2202
|
this.status = options.status;
|
|
2203
2203
|
this.code = options.code;
|
|
2204
2204
|
this.payload = options.payload;
|
|
2205
|
+
this.extra = normalizeAuthErrorExtra(
|
|
2206
|
+
options.extra || getRecordValue(options.payload, "extra")
|
|
2207
|
+
);
|
|
2208
|
+
this.reason = this.extra?.reason || this.extra?.guardCode || (typeof options.code === "string" ? options.code : void 0);
|
|
2209
|
+
this.challenge = this.extra?.challenge;
|
|
2210
|
+
this.retryAfter = readNumber(
|
|
2211
|
+
this.extra?.retryAfter ?? this.extra?.retryAfterSeconds
|
|
2212
|
+
);
|
|
2213
|
+
this.remainingAttempts = readNumber(this.extra?.remainingAttempts);
|
|
2214
|
+
this.lockUntil = this.extra?.lockUntil ?? null;
|
|
2205
2215
|
}
|
|
2206
2216
|
};
|
|
2217
|
+
var isAuthClientError = (error) => {
|
|
2218
|
+
if (error instanceof AuthClientError) return true;
|
|
2219
|
+
return Boolean(
|
|
2220
|
+
error && typeof error === "object" && error.name === "AuthClientError"
|
|
2221
|
+
);
|
|
2222
|
+
};
|
|
2223
|
+
var getAuthErrorExtra = (error) => {
|
|
2224
|
+
if (!error || typeof error !== "object") return void 0;
|
|
2225
|
+
const record2 = error;
|
|
2226
|
+
return normalizeAuthErrorExtra(record2.extra || getRecordValue(record2.payload, "extra"));
|
|
2227
|
+
};
|
|
2228
|
+
var getAuthErrorReason = (error) => {
|
|
2229
|
+
if (!error || typeof error !== "object") return void 0;
|
|
2230
|
+
const record2 = error;
|
|
2231
|
+
const extra = getAuthErrorExtra(error);
|
|
2232
|
+
return extra?.reason || extra?.guardCode || (typeof record2.reason === "string" ? record2.reason : void 0) || (typeof record2.code === "string" ? record2.code : void 0);
|
|
2233
|
+
};
|
|
2234
|
+
var isAuthChallengeRequired = (error) => {
|
|
2235
|
+
if (!error || typeof error !== "object") return false;
|
|
2236
|
+
const record2 = error;
|
|
2237
|
+
const code = record2.code;
|
|
2238
|
+
const reason = getAuthErrorReason(error);
|
|
2239
|
+
const extra = getAuthErrorExtra(error);
|
|
2240
|
+
return code === 460 || code === "460" || code === "LOGIN_CHALLENGE_REQUIRED" || reason === "LOGIN_CHALLENGE_REQUIRED" || reason === "CHALLENGE_REQUIRED" || extra?.guardCode === "LOGIN_CHALLENGE_REQUIRED";
|
|
2241
|
+
};
|
|
2207
2242
|
var createAuthClient = ({
|
|
2208
2243
|
appType,
|
|
2209
2244
|
servicePrefix = "/service",
|
|
@@ -2230,7 +2265,12 @@ var createAuthClient = ({
|
|
|
2230
2265
|
if (!response.ok || success === false || !isSuccessCode2(code)) {
|
|
2231
2266
|
throw new AuthClientError(
|
|
2232
2267
|
String(getRecordValue(payload, "message") || `Auth request failed: ${response.status}`),
|
|
2233
|
-
{
|
|
2268
|
+
{
|
|
2269
|
+
status: response.status,
|
|
2270
|
+
code,
|
|
2271
|
+
payload,
|
|
2272
|
+
extra: normalizeAuthErrorExtra(getRecordValue(payload, "extra"))
|
|
2273
|
+
}
|
|
2234
2274
|
);
|
|
2235
2275
|
}
|
|
2236
2276
|
return unwrapPayload(payload);
|
|
@@ -2280,6 +2320,27 @@ var getRecordValue = (value, key) => {
|
|
|
2280
2320
|
if (!value || typeof value !== "object") return void 0;
|
|
2281
2321
|
return value[key];
|
|
2282
2322
|
};
|
|
2323
|
+
var normalizeAuthErrorExtra = (value) => {
|
|
2324
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) return void 0;
|
|
2325
|
+
const record2 = value;
|
|
2326
|
+
const challenge = record2.challenge && typeof record2.challenge === "object" && !Array.isArray(record2.challenge) ? record2.challenge : void 0;
|
|
2327
|
+
const reason = readString(record2.reason);
|
|
2328
|
+
const guardCode = readString(record2.guardCode);
|
|
2329
|
+
return {
|
|
2330
|
+
...record2,
|
|
2331
|
+
...reason ? { reason } : {},
|
|
2332
|
+
...guardCode ? { guardCode } : {},
|
|
2333
|
+
...challenge ? { challenge } : {},
|
|
2334
|
+
...readNumber(record2.retryAfter) !== void 0 ? { retryAfter: readNumber(record2.retryAfter) } : {},
|
|
2335
|
+
...readNumber(record2.retryAfterSeconds) !== void 0 ? { retryAfterSeconds: readNumber(record2.retryAfterSeconds) } : {},
|
|
2336
|
+
...readNumber(record2.remainingAttempts) !== void 0 ? { remainingAttempts: readNumber(record2.remainingAttempts) } : {}
|
|
2337
|
+
};
|
|
2338
|
+
};
|
|
2339
|
+
var readString = (value) => typeof value === "string" ? value : void 0;
|
|
2340
|
+
var readNumber = (value) => {
|
|
2341
|
+
const numberValue = Number(value);
|
|
2342
|
+
return Number.isFinite(numberValue) ? numberValue : void 0;
|
|
2343
|
+
};
|
|
2283
2344
|
var isSuccessCode2 = (code) => {
|
|
2284
2345
|
if (code === void 0 || code === null || code === "") return true;
|
|
2285
2346
|
const normalized = Number(code);
|
|
@@ -3912,7 +3973,7 @@ import {
|
|
|
3912
3973
|
SafetyCertificateOutlined,
|
|
3913
3974
|
UserOutlined
|
|
3914
3975
|
} from "@ant-design/icons";
|
|
3915
|
-
import { jsx as jsx3, jsxs } from "react/jsx-runtime";
|
|
3976
|
+
import { Fragment as Fragment2, jsx as jsx3, jsxs } from "react/jsx-runtime";
|
|
3916
3977
|
var useAuth = (options = {}) => {
|
|
3917
3978
|
const runtime = useOpenXiangda();
|
|
3918
3979
|
const client = useMemo4(
|
|
@@ -4019,6 +4080,7 @@ var LoginPage = ({
|
|
|
4019
4080
|
"login"
|
|
4020
4081
|
);
|
|
4021
4082
|
const [phoneChallengeId, setPhoneChallengeId] = useState3("");
|
|
4083
|
+
const [passwordChallenge, setPasswordChallenge] = useState3(null);
|
|
4022
4084
|
const [submitting, setSubmitting] = useState3(false);
|
|
4023
4085
|
const [sendingCode, setSendingCode] = useState3(false);
|
|
4024
4086
|
const [error, setError] = useState3(null);
|
|
@@ -4041,6 +4103,7 @@ var LoginPage = ({
|
|
|
4041
4103
|
children: /* @__PURE__ */ jsx3(
|
|
4042
4104
|
PasswordLoginForm,
|
|
4043
4105
|
{
|
|
4106
|
+
challenge: passwordChallenge,
|
|
4044
4107
|
form: passwordForm,
|
|
4045
4108
|
loading: submitting,
|
|
4046
4109
|
onFinish: async (values) => {
|
|
@@ -4049,12 +4112,25 @@ var LoginPage = ({
|
|
|
4049
4112
|
try {
|
|
4050
4113
|
await handleSuccess(
|
|
4051
4114
|
await auth.passwordLogin({
|
|
4115
|
+
challengeAnswer: passwordChallenge ? values.challengeAnswer : void 0,
|
|
4116
|
+
challengeId: readChallengeId(passwordChallenge),
|
|
4117
|
+
clientFingerprint: getOrCreateLoginFingerprint(auth.client),
|
|
4052
4118
|
username: values.username,
|
|
4053
4119
|
password: values.password
|
|
4054
4120
|
})
|
|
4055
4121
|
);
|
|
4122
|
+
setPasswordChallenge(null);
|
|
4056
4123
|
} catch (loginError) {
|
|
4057
|
-
|
|
4124
|
+
if (isAuthChallengeRequired(loginError)) {
|
|
4125
|
+
const nextChallenge = getAuthErrorExtra(loginError)?.challenge;
|
|
4126
|
+
if (nextChallenge) {
|
|
4127
|
+
setPasswordChallenge(nextChallenge);
|
|
4128
|
+
passwordForm.setFieldValue("challengeAnswer", "");
|
|
4129
|
+
}
|
|
4130
|
+
} else {
|
|
4131
|
+
setPasswordChallenge(null);
|
|
4132
|
+
}
|
|
4133
|
+
setError(formatAuthErrorMessage(loginError));
|
|
4058
4134
|
} finally {
|
|
4059
4135
|
setSubmitting(false);
|
|
4060
4136
|
}
|
|
@@ -4124,6 +4200,7 @@ var LoginPage = ({
|
|
|
4124
4200
|
allowRegister,
|
|
4125
4201
|
auth,
|
|
4126
4202
|
handleSuccess,
|
|
4203
|
+
passwordChallenge,
|
|
4127
4204
|
passwordForm,
|
|
4128
4205
|
passwordMethod,
|
|
4129
4206
|
phoneChallengeId,
|
|
@@ -4277,7 +4354,7 @@ var LoginPage = ({
|
|
|
4277
4354
|
}
|
|
4278
4355
|
);
|
|
4279
4356
|
};
|
|
4280
|
-
var PasswordLoginForm = ({ form, loading, onFinish }) => /* @__PURE__ */ jsxs(Form, { form, layout: "vertical", requiredMark: false, onFinish, children: [
|
|
4357
|
+
var PasswordLoginForm = ({ challenge, form, loading, onFinish }) => /* @__PURE__ */ jsxs(Form, { form, layout: "vertical", requiredMark: false, onFinish, children: [
|
|
4281
4358
|
/* @__PURE__ */ jsx3(
|
|
4282
4359
|
Form.Item,
|
|
4283
4360
|
{
|
|
@@ -4296,6 +4373,26 @@ var PasswordLoginForm = ({ form, loading, onFinish }) => /* @__PURE__ */ jsxs(Fo
|
|
|
4296
4373
|
children: /* @__PURE__ */ jsx3(Input.Password, { autoComplete: "current-password" })
|
|
4297
4374
|
}
|
|
4298
4375
|
),
|
|
4376
|
+
challenge ? /* @__PURE__ */ jsxs(Fragment2, { children: [
|
|
4377
|
+
/* @__PURE__ */ jsx3(
|
|
4378
|
+
Alert,
|
|
4379
|
+
{
|
|
4380
|
+
showIcon: true,
|
|
4381
|
+
type: "warning",
|
|
4382
|
+
message: "\u8BF7\u5B8C\u6210\u989D\u5916\u9A8C\u8BC1",
|
|
4383
|
+
description: readChallengeQuestion(challenge) || "\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801\u540E\u7EE7\u7EED\u767B\u5F55\u3002"
|
|
4384
|
+
}
|
|
4385
|
+
),
|
|
4386
|
+
/* @__PURE__ */ jsx3(
|
|
4387
|
+
Form.Item,
|
|
4388
|
+
{
|
|
4389
|
+
label: "\u9A8C\u8BC1\u7B54\u6848",
|
|
4390
|
+
name: "challengeAnswer",
|
|
4391
|
+
rules: [{ required: true, message: "\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7B54\u6848" }],
|
|
4392
|
+
children: /* @__PURE__ */ jsx3(Input, { autoComplete: "one-time-code" })
|
|
4393
|
+
}
|
|
4394
|
+
)
|
|
4395
|
+
] }) : null,
|
|
4299
4396
|
/* @__PURE__ */ jsx3(Button, { block: true, htmlType: "submit", icon: /* @__PURE__ */ jsx3(LoginOutlined, {}), loading, type: "primary", children: "\u767B\u5F55" })
|
|
4300
4397
|
] });
|
|
4301
4398
|
var PhoneCodeLoginForm = ({
|
|
@@ -4357,6 +4454,22 @@ var PhoneCodeLoginForm = ({
|
|
|
4357
4454
|
] });
|
|
4358
4455
|
var findMethod = (methods, type4) => methods.find((method4) => method4.type === type4);
|
|
4359
4456
|
var normalizeError = (error) => error instanceof Error ? error : new Error(String(error || "\u8BF7\u6C42\u5931\u8D25"));
|
|
4457
|
+
var formatAuthErrorMessage = (error) => {
|
|
4458
|
+
const normalized = normalizeError(error);
|
|
4459
|
+
const extra = getAuthErrorExtra(error);
|
|
4460
|
+
const reason = getAuthErrorReason(error);
|
|
4461
|
+
if (isAuthChallengeRequired(error)) {
|
|
4462
|
+
return extra?.challenge?.question ? "\u8BF7\u5B8C\u6210\u4E0B\u65B9\u9A8C\u8BC1\u540E\u518D\u767B\u5F55" : normalized.message || "\u8BF7\u5148\u5B8C\u6210\u989D\u5916\u9A8C\u8BC1\u540E\u518D\u5C1D\u8BD5\u767B\u5F55";
|
|
4463
|
+
}
|
|
4464
|
+
if (reason === "LOGIN_BLOCKED" || reason === "USERNAME_BLOCKED" || reason === "IP_BLOCKED" || reason === "ACCOUNT_LOCKED") {
|
|
4465
|
+
const retryAfter = Number(extra?.retryAfter ?? extra?.retryAfterSeconds);
|
|
4466
|
+
if (Number.isFinite(retryAfter) && retryAfter > 0) {
|
|
4467
|
+
const minutes = Math.ceil(retryAfter / 60);
|
|
4468
|
+
return `\u767B\u5F55\u53D7\u9650\uFF0C\u8BF7\u7EA6 ${minutes} \u5206\u949F\u540E\u518D\u8BD5\u6216\u8054\u7CFB\u7BA1\u7406\u5458`;
|
|
4469
|
+
}
|
|
4470
|
+
}
|
|
4471
|
+
return normalized.message || "\u767B\u5F55\u5931\u8D25";
|
|
4472
|
+
};
|
|
4360
4473
|
var getString = (value, key) => {
|
|
4361
4474
|
if (!value || typeof value !== "object") return void 0;
|
|
4362
4475
|
const result = value[key];
|
|
@@ -4390,7 +4503,21 @@ var getOrCreateGuestIdentifier = (client) => {
|
|
|
4390
4503
|
window.localStorage.setItem(key, next);
|
|
4391
4504
|
return next;
|
|
4392
4505
|
};
|
|
4506
|
+
var getOrCreateLoginFingerprint = (client) => {
|
|
4507
|
+
const key = `openxiangda:${client.appType}:login_fingerprint`;
|
|
4508
|
+
if (typeof window === "undefined") return createGuestIdentifier();
|
|
4509
|
+
const current = window.localStorage.getItem(key);
|
|
4510
|
+
const id = current || createGuestIdentifier();
|
|
4511
|
+
if (!current) window.localStorage.setItem(key, id);
|
|
4512
|
+
return `${id}:${window.navigator?.userAgent || "unknown"}`;
|
|
4513
|
+
};
|
|
4393
4514
|
var createGuestIdentifier = () => `guest_${Date.now()}_${Math.random().toString(36).slice(2, 10)}`;
|
|
4515
|
+
var readChallengeId = (challenge) => {
|
|
4516
|
+
if (!challenge) return void 0;
|
|
4517
|
+
const id = challenge.id || challenge.challengeId;
|
|
4518
|
+
return typeof id === "string" && id.trim() ? id.trim() : void 0;
|
|
4519
|
+
};
|
|
4520
|
+
var readChallengeQuestion = (challenge) => typeof challenge.question === "string" ? challenge.question : void 0;
|
|
4394
4521
|
var getCurrentHref3 = () => typeof window === "undefined" ? "" : window.location.href;
|
|
4395
4522
|
var getCurrentHostname = () => typeof window === "undefined" ? "" : window.location.hostname;
|
|
4396
4523
|
var getCallbackUrl = () => {
|
|
@@ -4400,7 +4527,7 @@ var getCallbackUrl = () => {
|
|
|
4400
4527
|
};
|
|
4401
4528
|
|
|
4402
4529
|
// packages/sdk/src/runtime/react/openxiangdaProvider.tsx
|
|
4403
|
-
import { Fragment as
|
|
4530
|
+
import { Fragment as Fragment3, jsx as jsx4 } from "react/jsx-runtime";
|
|
4404
4531
|
var RuntimeHttpError = class extends Error {
|
|
4405
4532
|
constructor(snapshot) {
|
|
4406
4533
|
super(snapshot.message);
|
|
@@ -4750,12 +4877,12 @@ var PermissionBoundary = ({
|
|
|
4750
4877
|
const access = useCanAccessRoute({ routeCode, menuCode, path });
|
|
4751
4878
|
const fallbackState = createPermissionFallbackState(access, runtime);
|
|
4752
4879
|
if (access.loading) {
|
|
4753
|
-
return /* @__PURE__ */ jsx4(
|
|
4880
|
+
return /* @__PURE__ */ jsx4(Fragment3, { children: renderBoundaryFallback(loadingFallback, fallbackState) });
|
|
4754
4881
|
}
|
|
4755
4882
|
if (!access.canAccess) {
|
|
4756
|
-
return /* @__PURE__ */ jsx4(
|
|
4883
|
+
return /* @__PURE__ */ jsx4(Fragment3, { children: renderBoundaryFallback(fallback, fallbackState) });
|
|
4757
4884
|
}
|
|
4758
|
-
return /* @__PURE__ */ jsx4(
|
|
4885
|
+
return /* @__PURE__ */ jsx4(Fragment3, { children });
|
|
4759
4886
|
};
|
|
4760
4887
|
var useRuntimeAuth = () => {
|
|
4761
4888
|
const runtime = useOpenXiangda();
|
|
@@ -5046,7 +5173,7 @@ var resolveAppTypeFromLocation = () => {
|
|
|
5046
5173
|
|
|
5047
5174
|
// packages/sdk/src/runtime/react/publicAccess.tsx
|
|
5048
5175
|
import { useCallback as useCallback5, useEffect as useEffect5, useMemo as useMemo6, useState as useState5 } from "react";
|
|
5049
|
-
import { Fragment as
|
|
5176
|
+
import { Fragment as Fragment4, jsx as jsx5 } from "react/jsx-runtime";
|
|
5050
5177
|
var usePublicAccess = (options = {}) => {
|
|
5051
5178
|
const runtime = useOpenXiangda();
|
|
5052
5179
|
const {
|
|
@@ -5123,11 +5250,11 @@ var PublicAccessGate = ({
|
|
|
5123
5250
|
...options
|
|
5124
5251
|
}) => {
|
|
5125
5252
|
const state = usePublicAccess(options);
|
|
5126
|
-
if (state.loading) return /* @__PURE__ */ jsx5(
|
|
5253
|
+
if (state.loading) return /* @__PURE__ */ jsx5(Fragment4, { children: fallback });
|
|
5127
5254
|
if (state.error) {
|
|
5128
|
-
return /* @__PURE__ */ jsx5(
|
|
5255
|
+
return /* @__PURE__ */ jsx5(Fragment4, { children: typeof errorFallback === "function" ? errorFallback(state.error) : errorFallback });
|
|
5129
5256
|
}
|
|
5130
|
-
return /* @__PURE__ */ jsx5(
|
|
5257
|
+
return /* @__PURE__ */ jsx5(Fragment4, { children });
|
|
5131
5258
|
};
|
|
5132
5259
|
var readTicketFromLocation = () => {
|
|
5133
5260
|
if (typeof window === "undefined") return void 0;
|
|
@@ -5142,6 +5269,7 @@ import { Alert as Alert4, Button as Button17, Card as Card3, Empty as Empty9, Sp
|
|
|
5142
5269
|
// packages/sdk/src/components/core/runtimeApi.ts
|
|
5143
5270
|
var DEFAULT_CHUNK_SIZE = 5 * 1024 * 1024;
|
|
5144
5271
|
var CHUNK_UPLOAD_THRESHOLD = 10 * 1024 * 1024;
|
|
5272
|
+
var DEFAULT_PUBLIC_FILE_BUCKET = "public-assets";
|
|
5145
5273
|
var trimTrailingSlash2 = (value) => String(value || "").replace(/\/$/, "");
|
|
5146
5274
|
var getDefaultBaseUrl = () => {
|
|
5147
5275
|
const globalEnv = globalThis.process?.env;
|
|
@@ -5188,6 +5316,7 @@ var normalizeFilePayloadUrls = (baseUrl, payload) => {
|
|
|
5188
5316
|
...payload,
|
|
5189
5317
|
url: normalizeRuntimeFileUrl(baseUrl, payload.url),
|
|
5190
5318
|
downloadUrl: normalizeRuntimeFileUrl(baseUrl, payload.downloadUrl),
|
|
5319
|
+
publicUrl: normalizeRuntimeFileUrl(baseUrl, payload.publicUrl),
|
|
5191
5320
|
relayUrl: normalizeRuntimeFileUrl(baseUrl, payload.relayUrl),
|
|
5192
5321
|
previewUrl: normalizeRuntimeFileUrl(baseUrl, payload.previewUrl),
|
|
5193
5322
|
metadataUrl: normalizeRuntimeFileUrl(baseUrl, payload.metadataUrl),
|
|
@@ -5283,6 +5412,8 @@ var normalizeUploadData = (data, file, bucketName, baseUrl = "") => {
|
|
|
5283
5412
|
url: normalizeRuntimeFileUrl(baseUrl, item?.url) || "",
|
|
5284
5413
|
downloadUrl: normalizeRuntimeFileUrl(baseUrl, item?.downloadUrl),
|
|
5285
5414
|
previewUrl: normalizeRuntimeFileUrl(baseUrl, item?.previewUrl),
|
|
5415
|
+
publicUrl: normalizeRuntimeFileUrl(baseUrl, item?.publicUrl),
|
|
5416
|
+
visibility: item?.visibility,
|
|
5286
5417
|
status: "done",
|
|
5287
5418
|
size: item?.size ?? file.size,
|
|
5288
5419
|
objectName,
|
|
@@ -5291,7 +5422,7 @@ var normalizeUploadData = (data, file, bucketName, baseUrl = "") => {
|
|
|
5291
5422
|
mimeType: item?.contentType || file.type
|
|
5292
5423
|
};
|
|
5293
5424
|
};
|
|
5294
|
-
var uploadWithXhr = (baseUrl, file, bucketName, onProgress) => new Promise((resolve, reject) => {
|
|
5425
|
+
var uploadWithXhr = (baseUrl, file, bucketName, onProgress, options = {}) => new Promise((resolve, reject) => {
|
|
5295
5426
|
if (globalThis.process?.env?.VITEST) {
|
|
5296
5427
|
onProgress?.(100);
|
|
5297
5428
|
resolve({
|
|
@@ -5302,14 +5433,24 @@ var uploadWithXhr = (baseUrl, file, bucketName, onProgress) => new Promise((reso
|
|
|
5302
5433
|
status: "done",
|
|
5303
5434
|
size: file.size,
|
|
5304
5435
|
bucketName,
|
|
5305
|
-
contentType: file.type
|
|
5436
|
+
contentType: file.type,
|
|
5437
|
+
visibility: options.visibility
|
|
5306
5438
|
});
|
|
5307
5439
|
return;
|
|
5308
5440
|
}
|
|
5309
5441
|
const xhr = new XMLHttpRequest();
|
|
5310
5442
|
const formData = new FormData();
|
|
5311
5443
|
formData.append("files", file);
|
|
5312
|
-
xhr.open(
|
|
5444
|
+
xhr.open(
|
|
5445
|
+
"POST",
|
|
5446
|
+
joinUrl(
|
|
5447
|
+
baseUrl,
|
|
5448
|
+
appendQuery2("/file/upload", {
|
|
5449
|
+
bucketName,
|
|
5450
|
+
visibility: options.visibility
|
|
5451
|
+
})
|
|
5452
|
+
)
|
|
5453
|
+
);
|
|
5313
5454
|
xhr.withCredentials = true;
|
|
5314
5455
|
const token = typeof window !== "undefined" ? window.localStorage?.getItem("token") : void 0;
|
|
5315
5456
|
if (token) xhr.setRequestHeader("authorization", token);
|
|
@@ -5333,7 +5474,7 @@ var uploadWithXhr = (baseUrl, file, bucketName, onProgress) => new Promise((reso
|
|
|
5333
5474
|
xhr.onerror = () => reject(new Error("\u4E0A\u4F20\u5931\u8D25"));
|
|
5334
5475
|
xhr.send(formData);
|
|
5335
5476
|
});
|
|
5336
|
-
async function uploadChunkedFile(request, file, bucketName, baseUrl, onProgress) {
|
|
5477
|
+
async function uploadChunkedFile(request, file, bucketName, baseUrl, onProgress, options = {}) {
|
|
5337
5478
|
const initiate = await request({
|
|
5338
5479
|
url: "/file/multipart/initiate",
|
|
5339
5480
|
method: "post",
|
|
@@ -5341,7 +5482,8 @@ async function uploadChunkedFile(request, file, bucketName, baseUrl, onProgress)
|
|
|
5341
5482
|
fileName: file.name,
|
|
5342
5483
|
fileSize: file.size,
|
|
5343
5484
|
chunkSize: DEFAULT_CHUNK_SIZE,
|
|
5344
|
-
bucketName
|
|
5485
|
+
bucketName,
|
|
5486
|
+
visibility: options.visibility
|
|
5345
5487
|
}
|
|
5346
5488
|
});
|
|
5347
5489
|
const uploadInfo = initiate.data || initiate.result;
|
|
@@ -5402,6 +5544,16 @@ function createFormRuntimeApi(config3) {
|
|
|
5402
5544
|
}
|
|
5403
5545
|
return uploadWithXhr(baseUrl, file, bucketName, onProgress);
|
|
5404
5546
|
},
|
|
5547
|
+
uploadPublicFile: async (file, bucketName = DEFAULT_PUBLIC_FILE_BUCKET, onProgress) => {
|
|
5548
|
+
if (file.size > CHUNK_UPLOAD_THRESHOLD) {
|
|
5549
|
+
return uploadChunkedFile(request, file, bucketName, baseUrl, onProgress, {
|
|
5550
|
+
visibility: "public"
|
|
5551
|
+
});
|
|
5552
|
+
}
|
|
5553
|
+
return uploadWithXhr(baseUrl, file, bucketName, onProgress, {
|
|
5554
|
+
visibility: "public"
|
|
5555
|
+
});
|
|
5556
|
+
},
|
|
5405
5557
|
deleteFile: async (objectName, bucketName = "files") => {
|
|
5406
5558
|
await request({ url: "/file/delete", method: "post", data: { bucketName, objectName } });
|
|
5407
5559
|
return { success: true };
|
|
@@ -35393,7 +35545,7 @@ function MobileLocaleProvider({ children }) {
|
|
|
35393
35545
|
}
|
|
35394
35546
|
|
|
35395
35547
|
// packages/sdk/src/components/fields/DateField/DateFieldMobile.tsx
|
|
35396
|
-
import { Fragment as
|
|
35548
|
+
import { Fragment as Fragment9, jsx as jsx41, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
35397
35549
|
function DateFieldMobile({
|
|
35398
35550
|
fieldId,
|
|
35399
35551
|
placeholder,
|
|
@@ -35465,13 +35617,13 @@ function DateFieldMobile({
|
|
|
35465
35617
|
confirmTestId: `datefield-confirm-${fieldId}`
|
|
35466
35618
|
}
|
|
35467
35619
|
),
|
|
35468
|
-
mode === "time" ? /* @__PURE__ */ jsxs10(
|
|
35620
|
+
mode === "time" ? /* @__PURE__ */ jsxs10(Fragment9, { children: [
|
|
35469
35621
|
/* @__PURE__ */ jsx41(MobileTimePickerView, { value: tempDate, dateFormat: format2, onChange: setTempDate }),
|
|
35470
35622
|
/* @__PURE__ */ jsxs10("div", { className: "sy-mobile-date-time-footer", children: [
|
|
35471
35623
|
/* @__PURE__ */ jsx41("span", { children: "\u9009\u62E9\u65F6\u95F4" }),
|
|
35472
35624
|
/* @__PURE__ */ jsx41("button", { type: "button", className: "sy-mobile-time-pill is-active", children: formatMobileTime(tempDate, format2) })
|
|
35473
35625
|
] })
|
|
35474
|
-
] }) : /* @__PURE__ */ jsxs10(
|
|
35626
|
+
] }) : /* @__PURE__ */ jsxs10(Fragment9, { children: [
|
|
35475
35627
|
/* @__PURE__ */ jsx41(
|
|
35476
35628
|
calendar_default,
|
|
35477
35629
|
{
|
|
@@ -36894,7 +37046,7 @@ import { useEffect as useEffect70 } from "react";
|
|
|
36894
37046
|
// packages/sdk/src/components/fields/ImageField/ImageFieldPC.tsx
|
|
36895
37047
|
import React216 from "react";
|
|
36896
37048
|
import { Upload as Upload2 } from "antd";
|
|
36897
|
-
import { Fragment as
|
|
37049
|
+
import { Fragment as Fragment10, jsx as jsx53, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
36898
37050
|
var createLocalItem3 = (file) => {
|
|
36899
37051
|
const uid = file.uid || createUid("image");
|
|
36900
37052
|
return {
|
|
@@ -36917,7 +37069,7 @@ function ImageThumbContent({ item }) {
|
|
|
36917
37069
|
setImageFailed(false);
|
|
36918
37070
|
}, [src]);
|
|
36919
37071
|
if (src && !imageFailed) {
|
|
36920
|
-
return /* @__PURE__ */ jsxs16(
|
|
37072
|
+
return /* @__PURE__ */ jsxs16(Fragment10, { children: [
|
|
36921
37073
|
/* @__PURE__ */ jsx53("img", { src, alt: item.name, onError: () => setImageFailed(true) }),
|
|
36922
37074
|
item.status === "uploading" && /* @__PURE__ */ jsxs16("span", { className: "sy-image-state", children: [
|
|
36923
37075
|
Math.round(item.percent ?? 0),
|
|
@@ -37209,7 +37361,7 @@ function ImageFieldPC({
|
|
|
37209
37361
|
|
|
37210
37362
|
// packages/sdk/src/components/fields/ImageField/ImageFieldMobile.tsx
|
|
37211
37363
|
import React217 from "react";
|
|
37212
|
-
import { Fragment as
|
|
37364
|
+
import { Fragment as Fragment11, jsx as jsx54, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
37213
37365
|
var createLocalItem4 = (file) => {
|
|
37214
37366
|
const uid = createUid("image");
|
|
37215
37367
|
return {
|
|
@@ -37232,7 +37384,7 @@ function ImageThumbContent2({ item }) {
|
|
|
37232
37384
|
setImageFailed(false);
|
|
37233
37385
|
}, [src]);
|
|
37234
37386
|
if (src && !imageFailed) {
|
|
37235
|
-
return /* @__PURE__ */ jsxs17(
|
|
37387
|
+
return /* @__PURE__ */ jsxs17(Fragment11, { children: [
|
|
37236
37388
|
/* @__PURE__ */ jsx54("img", { src, alt: item.name, onError: () => setImageFailed(true) }),
|
|
37237
37389
|
item.status === "uploading" && /* @__PURE__ */ jsxs17("span", { className: "sy-image-state", children: [
|
|
37238
37390
|
Math.round(item.percent ?? 0),
|
|
@@ -37427,7 +37579,7 @@ function ImageFieldMobile({
|
|
|
37427
37579
|
|
|
37428
37580
|
// packages/sdk/src/components/fields/ImageField/ImageFieldReadonly.tsx
|
|
37429
37581
|
import React218 from "react";
|
|
37430
|
-
import { Fragment as
|
|
37582
|
+
import { Fragment as Fragment12, jsx as jsx55, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
37431
37583
|
var getTicketUrl2 = (ticket, fallback) => typeof ticket === "string" ? ticket : ticket?.previewUrl || ticket?.downloadUrl || ticket?.relayUrl || ticket?.url || fallback;
|
|
37432
37584
|
function ImageThumbContent3({ item, testId }) {
|
|
37433
37585
|
const [imageFailed, setImageFailed] = React218.useState(false);
|
|
@@ -37436,7 +37588,7 @@ function ImageThumbContent3({ item, testId }) {
|
|
|
37436
37588
|
setImageFailed(false);
|
|
37437
37589
|
}, [src]);
|
|
37438
37590
|
if (src && !imageFailed) {
|
|
37439
|
-
return /* @__PURE__ */ jsxs18(
|
|
37591
|
+
return /* @__PURE__ */ jsxs18(Fragment12, { children: [
|
|
37440
37592
|
/* @__PURE__ */ jsx55("img", { src, alt: item.name, "data-testid": testId, onError: () => setImageFailed(true) }),
|
|
37441
37593
|
item.status === "uploading" && /* @__PURE__ */ jsxs18("span", { className: "sy-image-state", children: [
|
|
37442
37594
|
Math.round(item.percent ?? 0),
|
|
@@ -37773,9 +37925,9 @@ function SubFormCell({
|
|
|
37773
37925
|
}
|
|
37774
37926
|
|
|
37775
37927
|
// packages/sdk/src/components/fields/SubFormField/SubFormColumnLabel.tsx
|
|
37776
|
-
import { Fragment as
|
|
37928
|
+
import { Fragment as Fragment13, jsx as jsx58, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
37777
37929
|
function SubFormColumnLabel({ label, required: required4 }) {
|
|
37778
|
-
return /* @__PURE__ */ jsxs19(
|
|
37930
|
+
return /* @__PURE__ */ jsxs19(Fragment13, { children: [
|
|
37779
37931
|
required4 ? /* @__PURE__ */ jsx58("span", { className: "sy-field-required", "aria-hidden": "true", children: "*" }) : null,
|
|
37780
37932
|
label
|
|
37781
37933
|
] });
|
|
@@ -40419,7 +40571,7 @@ import {
|
|
|
40419
40571
|
UndoOutlined,
|
|
40420
40572
|
UnorderedListOutlined
|
|
40421
40573
|
} from "@ant-design/icons";
|
|
40422
|
-
import { Fragment as
|
|
40574
|
+
import { Fragment as Fragment14, jsx as jsx75, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
40423
40575
|
var lowlight = createLowlight(common);
|
|
40424
40576
|
var FontSize = Extension.create({
|
|
40425
40577
|
name: "fontSize",
|
|
@@ -40752,7 +40904,7 @@ function EditorToolbar({
|
|
|
40752
40904
|
)
|
|
40753
40905
|
] }),
|
|
40754
40906
|
(has("color") || has("highlight")) && /* @__PURE__ */ jsxs30("div", { className: "sy-editor-toolbar-group", children: [
|
|
40755
|
-
has("color") && /* @__PURE__ */ jsxs30(
|
|
40907
|
+
has("color") && /* @__PURE__ */ jsxs30(Fragment14, { children: [
|
|
40756
40908
|
/* @__PURE__ */ jsx75(Tooltip, { title: "\u6587\u5B57\u989C\u8272", children: /* @__PURE__ */ jsx75(
|
|
40757
40909
|
"input",
|
|
40758
40910
|
{
|
|
@@ -41210,7 +41362,7 @@ function RichTextEditorCore({
|
|
|
41210
41362
|
};
|
|
41211
41363
|
const minHeight = typeof height === "number" ? height : typeof height === "string" ? height : Math.max(160, rows * 32);
|
|
41212
41364
|
const showFooter = !mobile || uploading || !!uploadError;
|
|
41213
|
-
return /* @__PURE__ */ jsxs30(
|
|
41365
|
+
return /* @__PURE__ */ jsxs30(Fragment14, { children: [
|
|
41214
41366
|
/* @__PURE__ */ jsxs30("div", { className: inputClassName, "data-testid": `editorfield-shell-${fieldId}`, children: [
|
|
41215
41367
|
/* @__PURE__ */ jsxs30("div", { className: `sy-editor ${disabled ? "is-disabled" : ""} ${mobile ? "is-mobile" : ""}`, children: [
|
|
41216
41368
|
/* @__PURE__ */ jsx75(
|
|
@@ -44393,7 +44545,7 @@ function useChangeRecords(options) {
|
|
|
44393
44545
|
|
|
44394
44546
|
// packages/sdk/src/components/modules/RuntimePageShell.tsx
|
|
44395
44547
|
import { Alert as Alert2, Empty as Empty5, Spin as Spin5 } from "antd";
|
|
44396
|
-
import { Fragment as
|
|
44548
|
+
import { Fragment as Fragment15, jsx as jsx86, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
44397
44549
|
var RuntimePageShell = ({
|
|
44398
44550
|
children,
|
|
44399
44551
|
actions,
|
|
@@ -44419,7 +44571,7 @@ var RuntimePageShell = ({
|
|
|
44419
44571
|
return /* @__PURE__ */ jsx86(Alert2, { type: "error", showIcon: true, message: "\u9875\u9762\u52A0\u8F7D\u5931\u8D25", description: error });
|
|
44420
44572
|
}
|
|
44421
44573
|
if (empty) {
|
|
44422
|
-
return /* @__PURE__ */ jsx86(
|
|
44574
|
+
return /* @__PURE__ */ jsx86(Fragment15, { children: empty });
|
|
44423
44575
|
}
|
|
44424
44576
|
return children;
|
|
44425
44577
|
};
|
|
@@ -44717,7 +44869,7 @@ var confirmAction = (title, content) => {
|
|
|
44717
44869
|
};
|
|
44718
44870
|
|
|
44719
44871
|
// packages/sdk/src/components/modules/StickyActionBar.tsx
|
|
44720
|
-
import { Fragment as
|
|
44872
|
+
import { Fragment as Fragment16, jsx as jsx89, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
44721
44873
|
var getActionPriority = (action) => {
|
|
44722
44874
|
const maybePriority = action.priority;
|
|
44723
44875
|
if (typeof maybePriority === "number") return maybePriority;
|
|
@@ -44781,7 +44933,7 @@ var StickyActionBar = ({
|
|
|
44781
44933
|
{
|
|
44782
44934
|
className: `mx-auto flex w-full items-center gap-3 ${!isMobile ? desktopJustifyClass : "justify-end"}`,
|
|
44783
44935
|
style: { maxWidth: maxWidthStyle },
|
|
44784
|
-
children: isMobile ? /* @__PURE__ */ jsxs39(
|
|
44936
|
+
children: isMobile ? /* @__PURE__ */ jsxs39(Fragment16, { children: [
|
|
44785
44937
|
/* @__PURE__ */ jsx89("div", { className: "flex flex-1 gap-2", children: primaryMobile.map((action) => renderButton(action, true)) }),
|
|
44786
44938
|
moreMobile.length > 0 && /* @__PURE__ */ jsx89(
|
|
44787
44939
|
Dropdown2,
|
|
@@ -45626,7 +45778,7 @@ var ProcessPreview = ({
|
|
|
45626
45778
|
};
|
|
45627
45779
|
|
|
45628
45780
|
// packages/sdk/src/components/templates/FormSubmitTemplate.tsx
|
|
45629
|
-
import { Fragment as
|
|
45781
|
+
import { Fragment as Fragment17, jsx as jsx95, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
45630
45782
|
var SUPERVISOR_APPROVER_TYPE = "ext_target_approval_department_supervisor";
|
|
45631
45783
|
var unwrapRuntimePayload2 = (value) => value?.data ?? value?.result ?? value;
|
|
45632
45784
|
var normalizeSubmitFormType = (value) => {
|
|
@@ -45692,7 +45844,7 @@ var SubmitSuccessCard = ({
|
|
|
45692
45844
|
renderSuccess
|
|
45693
45845
|
}) => {
|
|
45694
45846
|
if (renderSuccess) {
|
|
45695
|
-
return /* @__PURE__ */ jsx95(
|
|
45847
|
+
return /* @__PURE__ */ jsx95(Fragment17, { children: renderSuccess(info) });
|
|
45696
45848
|
}
|
|
45697
45849
|
return /* @__PURE__ */ jsx95("div", { className: "bg-white rounded-xl shadow-sm border border-gray-100 p-6", children: /* @__PURE__ */ jsxs45("div", { className: "flex flex-col items-center py-16 animate-[fadeIn_0.3s_ease-out,scaleIn_0.3s_ease-out]", children: [
|
|
45698
45850
|
/* @__PURE__ */ jsx95("div", { className: "w-12 h-12 rounded-full bg-green-100 flex items-center justify-center mb-4", children: /* @__PURE__ */ jsx95(CheckCircleFilled, { className: "text-2xl text-green-500" }) }),
|
|
@@ -47098,7 +47250,7 @@ import {
|
|
|
47098
47250
|
SaveOutlined,
|
|
47099
47251
|
SwapOutlined
|
|
47100
47252
|
} from "@ant-design/icons";
|
|
47101
|
-
import { Fragment as
|
|
47253
|
+
import { Fragment as Fragment18, jsx as jsx97, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
47102
47254
|
var actionPriority = {
|
|
47103
47255
|
agree: 10,
|
|
47104
47256
|
approved: 10,
|
|
@@ -47155,7 +47307,7 @@ function DefaultTransferSelector({
|
|
|
47155
47307
|
const [open, setOpen] = useState90(false);
|
|
47156
47308
|
const [selectedUsers, setSelectedUsers] = useState90([]);
|
|
47157
47309
|
const selectedLabel = selectedUsers[0] ? getUserName(selectedUsers[0]) : value;
|
|
47158
|
-
return /* @__PURE__ */ jsxs47(
|
|
47310
|
+
return /* @__PURE__ */ jsxs47(Fragment18, { children: [
|
|
47159
47311
|
/* @__PURE__ */ jsx97(
|
|
47160
47312
|
Input11,
|
|
47161
47313
|
{
|
|
@@ -47299,7 +47451,7 @@ var ApprovalActionBar = ({
|
|
|
47299
47451
|
};
|
|
47300
47452
|
});
|
|
47301
47453
|
const requiredComment = activeAction?.remark?.required || modalAction === "rejected" || modalAction === "withdraw";
|
|
47302
|
-
return /* @__PURE__ */ jsxs47(
|
|
47454
|
+
return /* @__PURE__ */ jsxs47(Fragment18, { children: [
|
|
47303
47455
|
/* @__PURE__ */ jsx97(
|
|
47304
47456
|
StickyActionBar,
|
|
47305
47457
|
{
|
|
@@ -47346,7 +47498,7 @@ var ApprovalActionBar = ({
|
|
|
47346
47498
|
)
|
|
47347
47499
|
}
|
|
47348
47500
|
),
|
|
47349
|
-
modalAction === "return" && /* @__PURE__ */ jsxs47(
|
|
47501
|
+
modalAction === "return" && /* @__PURE__ */ jsxs47(Fragment18, { children: [
|
|
47350
47502
|
formatReturnPolicy(returnPolicy) && /* @__PURE__ */ jsxs47("div", { className: "mb-3 text-sm text-gray-500", children: [
|
|
47351
47503
|
"\u9000\u56DE\u540E\u5BA1\u6279\u903B\u8F91\uFF1A",
|
|
47352
47504
|
formatReturnPolicy(returnPolicy)
|
|
@@ -51009,6 +51161,10 @@ export {
|
|
|
51009
51161
|
createReactPage,
|
|
51010
51162
|
extractFieldsFromComponentsTree,
|
|
51011
51163
|
fetchBrowserRuntimeBootstrap,
|
|
51164
|
+
getAuthErrorExtra,
|
|
51165
|
+
getAuthErrorReason,
|
|
51166
|
+
isAuthChallengeRequired,
|
|
51167
|
+
isAuthClientError,
|
|
51012
51168
|
loadCustomPageModule,
|
|
51013
51169
|
loadRuntimeScriptModules,
|
|
51014
51170
|
mountBrowserPageRuntime,
|