openxiangda 1.0.103 → 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/package.json +1 -1
- package/packages/sdk/dist/runtime/index.cjs +136 -5
- package/packages/sdk/dist/runtime/index.cjs.map +1 -1
- package/packages/sdk/dist/runtime/index.d.mts +1 -1
- package/packages/sdk/dist/runtime/index.d.ts +1 -1
- package/packages/sdk/dist/runtime/index.mjs +169 -38
- 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
|
@@ -1,5 +1,5 @@
|
|
|
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
5
|
import { _ as FormSchema, X as FormRuntimeApi, Y as FormRuntimeApiConfig, J as FieldDefinition } from '../types-B1GRkvLM.mjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
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
5
|
import { _ as FormSchema, X as FormRuntimeApi, Y as FormRuntimeApiConfig, J as FieldDefinition } from '../types-B1GRkvLM.js';
|
|
@@ -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;
|
|
@@ -35418,7 +35545,7 @@ function MobileLocaleProvider({ children }) {
|
|
|
35418
35545
|
}
|
|
35419
35546
|
|
|
35420
35547
|
// packages/sdk/src/components/fields/DateField/DateFieldMobile.tsx
|
|
35421
|
-
import { Fragment as
|
|
35548
|
+
import { Fragment as Fragment9, jsx as jsx41, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
35422
35549
|
function DateFieldMobile({
|
|
35423
35550
|
fieldId,
|
|
35424
35551
|
placeholder,
|
|
@@ -35490,13 +35617,13 @@ function DateFieldMobile({
|
|
|
35490
35617
|
confirmTestId: `datefield-confirm-${fieldId}`
|
|
35491
35618
|
}
|
|
35492
35619
|
),
|
|
35493
|
-
mode === "time" ? /* @__PURE__ */ jsxs10(
|
|
35620
|
+
mode === "time" ? /* @__PURE__ */ jsxs10(Fragment9, { children: [
|
|
35494
35621
|
/* @__PURE__ */ jsx41(MobileTimePickerView, { value: tempDate, dateFormat: format2, onChange: setTempDate }),
|
|
35495
35622
|
/* @__PURE__ */ jsxs10("div", { className: "sy-mobile-date-time-footer", children: [
|
|
35496
35623
|
/* @__PURE__ */ jsx41("span", { children: "\u9009\u62E9\u65F6\u95F4" }),
|
|
35497
35624
|
/* @__PURE__ */ jsx41("button", { type: "button", className: "sy-mobile-time-pill is-active", children: formatMobileTime(tempDate, format2) })
|
|
35498
35625
|
] })
|
|
35499
|
-
] }) : /* @__PURE__ */ jsxs10(
|
|
35626
|
+
] }) : /* @__PURE__ */ jsxs10(Fragment9, { children: [
|
|
35500
35627
|
/* @__PURE__ */ jsx41(
|
|
35501
35628
|
calendar_default,
|
|
35502
35629
|
{
|
|
@@ -36919,7 +37046,7 @@ import { useEffect as useEffect70 } from "react";
|
|
|
36919
37046
|
// packages/sdk/src/components/fields/ImageField/ImageFieldPC.tsx
|
|
36920
37047
|
import React216 from "react";
|
|
36921
37048
|
import { Upload as Upload2 } from "antd";
|
|
36922
|
-
import { Fragment as
|
|
37049
|
+
import { Fragment as Fragment10, jsx as jsx53, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
36923
37050
|
var createLocalItem3 = (file) => {
|
|
36924
37051
|
const uid = file.uid || createUid("image");
|
|
36925
37052
|
return {
|
|
@@ -36942,7 +37069,7 @@ function ImageThumbContent({ item }) {
|
|
|
36942
37069
|
setImageFailed(false);
|
|
36943
37070
|
}, [src]);
|
|
36944
37071
|
if (src && !imageFailed) {
|
|
36945
|
-
return /* @__PURE__ */ jsxs16(
|
|
37072
|
+
return /* @__PURE__ */ jsxs16(Fragment10, { children: [
|
|
36946
37073
|
/* @__PURE__ */ jsx53("img", { src, alt: item.name, onError: () => setImageFailed(true) }),
|
|
36947
37074
|
item.status === "uploading" && /* @__PURE__ */ jsxs16("span", { className: "sy-image-state", children: [
|
|
36948
37075
|
Math.round(item.percent ?? 0),
|
|
@@ -37234,7 +37361,7 @@ function ImageFieldPC({
|
|
|
37234
37361
|
|
|
37235
37362
|
// packages/sdk/src/components/fields/ImageField/ImageFieldMobile.tsx
|
|
37236
37363
|
import React217 from "react";
|
|
37237
|
-
import { Fragment as
|
|
37364
|
+
import { Fragment as Fragment11, jsx as jsx54, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
37238
37365
|
var createLocalItem4 = (file) => {
|
|
37239
37366
|
const uid = createUid("image");
|
|
37240
37367
|
return {
|
|
@@ -37257,7 +37384,7 @@ function ImageThumbContent2({ item }) {
|
|
|
37257
37384
|
setImageFailed(false);
|
|
37258
37385
|
}, [src]);
|
|
37259
37386
|
if (src && !imageFailed) {
|
|
37260
|
-
return /* @__PURE__ */ jsxs17(
|
|
37387
|
+
return /* @__PURE__ */ jsxs17(Fragment11, { children: [
|
|
37261
37388
|
/* @__PURE__ */ jsx54("img", { src, alt: item.name, onError: () => setImageFailed(true) }),
|
|
37262
37389
|
item.status === "uploading" && /* @__PURE__ */ jsxs17("span", { className: "sy-image-state", children: [
|
|
37263
37390
|
Math.round(item.percent ?? 0),
|
|
@@ -37452,7 +37579,7 @@ function ImageFieldMobile({
|
|
|
37452
37579
|
|
|
37453
37580
|
// packages/sdk/src/components/fields/ImageField/ImageFieldReadonly.tsx
|
|
37454
37581
|
import React218 from "react";
|
|
37455
|
-
import { Fragment as
|
|
37582
|
+
import { Fragment as Fragment12, jsx as jsx55, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
37456
37583
|
var getTicketUrl2 = (ticket, fallback) => typeof ticket === "string" ? ticket : ticket?.previewUrl || ticket?.downloadUrl || ticket?.relayUrl || ticket?.url || fallback;
|
|
37457
37584
|
function ImageThumbContent3({ item, testId }) {
|
|
37458
37585
|
const [imageFailed, setImageFailed] = React218.useState(false);
|
|
@@ -37461,7 +37588,7 @@ function ImageThumbContent3({ item, testId }) {
|
|
|
37461
37588
|
setImageFailed(false);
|
|
37462
37589
|
}, [src]);
|
|
37463
37590
|
if (src && !imageFailed) {
|
|
37464
|
-
return /* @__PURE__ */ jsxs18(
|
|
37591
|
+
return /* @__PURE__ */ jsxs18(Fragment12, { children: [
|
|
37465
37592
|
/* @__PURE__ */ jsx55("img", { src, alt: item.name, "data-testid": testId, onError: () => setImageFailed(true) }),
|
|
37466
37593
|
item.status === "uploading" && /* @__PURE__ */ jsxs18("span", { className: "sy-image-state", children: [
|
|
37467
37594
|
Math.round(item.percent ?? 0),
|
|
@@ -37798,9 +37925,9 @@ function SubFormCell({
|
|
|
37798
37925
|
}
|
|
37799
37926
|
|
|
37800
37927
|
// packages/sdk/src/components/fields/SubFormField/SubFormColumnLabel.tsx
|
|
37801
|
-
import { Fragment as
|
|
37928
|
+
import { Fragment as Fragment13, jsx as jsx58, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
37802
37929
|
function SubFormColumnLabel({ label, required: required4 }) {
|
|
37803
|
-
return /* @__PURE__ */ jsxs19(
|
|
37930
|
+
return /* @__PURE__ */ jsxs19(Fragment13, { children: [
|
|
37804
37931
|
required4 ? /* @__PURE__ */ jsx58("span", { className: "sy-field-required", "aria-hidden": "true", children: "*" }) : null,
|
|
37805
37932
|
label
|
|
37806
37933
|
] });
|
|
@@ -40444,7 +40571,7 @@ import {
|
|
|
40444
40571
|
UndoOutlined,
|
|
40445
40572
|
UnorderedListOutlined
|
|
40446
40573
|
} from "@ant-design/icons";
|
|
40447
|
-
import { Fragment as
|
|
40574
|
+
import { Fragment as Fragment14, jsx as jsx75, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
40448
40575
|
var lowlight = createLowlight(common);
|
|
40449
40576
|
var FontSize = Extension.create({
|
|
40450
40577
|
name: "fontSize",
|
|
@@ -40777,7 +40904,7 @@ function EditorToolbar({
|
|
|
40777
40904
|
)
|
|
40778
40905
|
] }),
|
|
40779
40906
|
(has("color") || has("highlight")) && /* @__PURE__ */ jsxs30("div", { className: "sy-editor-toolbar-group", children: [
|
|
40780
|
-
has("color") && /* @__PURE__ */ jsxs30(
|
|
40907
|
+
has("color") && /* @__PURE__ */ jsxs30(Fragment14, { children: [
|
|
40781
40908
|
/* @__PURE__ */ jsx75(Tooltip, { title: "\u6587\u5B57\u989C\u8272", children: /* @__PURE__ */ jsx75(
|
|
40782
40909
|
"input",
|
|
40783
40910
|
{
|
|
@@ -41235,7 +41362,7 @@ function RichTextEditorCore({
|
|
|
41235
41362
|
};
|
|
41236
41363
|
const minHeight = typeof height === "number" ? height : typeof height === "string" ? height : Math.max(160, rows * 32);
|
|
41237
41364
|
const showFooter = !mobile || uploading || !!uploadError;
|
|
41238
|
-
return /* @__PURE__ */ jsxs30(
|
|
41365
|
+
return /* @__PURE__ */ jsxs30(Fragment14, { children: [
|
|
41239
41366
|
/* @__PURE__ */ jsxs30("div", { className: inputClassName, "data-testid": `editorfield-shell-${fieldId}`, children: [
|
|
41240
41367
|
/* @__PURE__ */ jsxs30("div", { className: `sy-editor ${disabled ? "is-disabled" : ""} ${mobile ? "is-mobile" : ""}`, children: [
|
|
41241
41368
|
/* @__PURE__ */ jsx75(
|
|
@@ -44418,7 +44545,7 @@ function useChangeRecords(options) {
|
|
|
44418
44545
|
|
|
44419
44546
|
// packages/sdk/src/components/modules/RuntimePageShell.tsx
|
|
44420
44547
|
import { Alert as Alert2, Empty as Empty5, Spin as Spin5 } from "antd";
|
|
44421
|
-
import { Fragment as
|
|
44548
|
+
import { Fragment as Fragment15, jsx as jsx86, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
44422
44549
|
var RuntimePageShell = ({
|
|
44423
44550
|
children,
|
|
44424
44551
|
actions,
|
|
@@ -44444,7 +44571,7 @@ var RuntimePageShell = ({
|
|
|
44444
44571
|
return /* @__PURE__ */ jsx86(Alert2, { type: "error", showIcon: true, message: "\u9875\u9762\u52A0\u8F7D\u5931\u8D25", description: error });
|
|
44445
44572
|
}
|
|
44446
44573
|
if (empty) {
|
|
44447
|
-
return /* @__PURE__ */ jsx86(
|
|
44574
|
+
return /* @__PURE__ */ jsx86(Fragment15, { children: empty });
|
|
44448
44575
|
}
|
|
44449
44576
|
return children;
|
|
44450
44577
|
};
|
|
@@ -44742,7 +44869,7 @@ var confirmAction = (title, content) => {
|
|
|
44742
44869
|
};
|
|
44743
44870
|
|
|
44744
44871
|
// packages/sdk/src/components/modules/StickyActionBar.tsx
|
|
44745
|
-
import { Fragment as
|
|
44872
|
+
import { Fragment as Fragment16, jsx as jsx89, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
44746
44873
|
var getActionPriority = (action) => {
|
|
44747
44874
|
const maybePriority = action.priority;
|
|
44748
44875
|
if (typeof maybePriority === "number") return maybePriority;
|
|
@@ -44806,7 +44933,7 @@ var StickyActionBar = ({
|
|
|
44806
44933
|
{
|
|
44807
44934
|
className: `mx-auto flex w-full items-center gap-3 ${!isMobile ? desktopJustifyClass : "justify-end"}`,
|
|
44808
44935
|
style: { maxWidth: maxWidthStyle },
|
|
44809
|
-
children: isMobile ? /* @__PURE__ */ jsxs39(
|
|
44936
|
+
children: isMobile ? /* @__PURE__ */ jsxs39(Fragment16, { children: [
|
|
44810
44937
|
/* @__PURE__ */ jsx89("div", { className: "flex flex-1 gap-2", children: primaryMobile.map((action) => renderButton(action, true)) }),
|
|
44811
44938
|
moreMobile.length > 0 && /* @__PURE__ */ jsx89(
|
|
44812
44939
|
Dropdown2,
|
|
@@ -45651,7 +45778,7 @@ var ProcessPreview = ({
|
|
|
45651
45778
|
};
|
|
45652
45779
|
|
|
45653
45780
|
// packages/sdk/src/components/templates/FormSubmitTemplate.tsx
|
|
45654
|
-
import { Fragment as
|
|
45781
|
+
import { Fragment as Fragment17, jsx as jsx95, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
45655
45782
|
var SUPERVISOR_APPROVER_TYPE = "ext_target_approval_department_supervisor";
|
|
45656
45783
|
var unwrapRuntimePayload2 = (value) => value?.data ?? value?.result ?? value;
|
|
45657
45784
|
var normalizeSubmitFormType = (value) => {
|
|
@@ -45717,7 +45844,7 @@ var SubmitSuccessCard = ({
|
|
|
45717
45844
|
renderSuccess
|
|
45718
45845
|
}) => {
|
|
45719
45846
|
if (renderSuccess) {
|
|
45720
|
-
return /* @__PURE__ */ jsx95(
|
|
45847
|
+
return /* @__PURE__ */ jsx95(Fragment17, { children: renderSuccess(info) });
|
|
45721
45848
|
}
|
|
45722
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: [
|
|
45723
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" }) }),
|
|
@@ -47123,7 +47250,7 @@ import {
|
|
|
47123
47250
|
SaveOutlined,
|
|
47124
47251
|
SwapOutlined
|
|
47125
47252
|
} from "@ant-design/icons";
|
|
47126
|
-
import { Fragment as
|
|
47253
|
+
import { Fragment as Fragment18, jsx as jsx97, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
47127
47254
|
var actionPriority = {
|
|
47128
47255
|
agree: 10,
|
|
47129
47256
|
approved: 10,
|
|
@@ -47180,7 +47307,7 @@ function DefaultTransferSelector({
|
|
|
47180
47307
|
const [open, setOpen] = useState90(false);
|
|
47181
47308
|
const [selectedUsers, setSelectedUsers] = useState90([]);
|
|
47182
47309
|
const selectedLabel = selectedUsers[0] ? getUserName(selectedUsers[0]) : value;
|
|
47183
|
-
return /* @__PURE__ */ jsxs47(
|
|
47310
|
+
return /* @__PURE__ */ jsxs47(Fragment18, { children: [
|
|
47184
47311
|
/* @__PURE__ */ jsx97(
|
|
47185
47312
|
Input11,
|
|
47186
47313
|
{
|
|
@@ -47324,7 +47451,7 @@ var ApprovalActionBar = ({
|
|
|
47324
47451
|
};
|
|
47325
47452
|
});
|
|
47326
47453
|
const requiredComment = activeAction?.remark?.required || modalAction === "rejected" || modalAction === "withdraw";
|
|
47327
|
-
return /* @__PURE__ */ jsxs47(
|
|
47454
|
+
return /* @__PURE__ */ jsxs47(Fragment18, { children: [
|
|
47328
47455
|
/* @__PURE__ */ jsx97(
|
|
47329
47456
|
StickyActionBar,
|
|
47330
47457
|
{
|
|
@@ -47371,7 +47498,7 @@ var ApprovalActionBar = ({
|
|
|
47371
47498
|
)
|
|
47372
47499
|
}
|
|
47373
47500
|
),
|
|
47374
|
-
modalAction === "return" && /* @__PURE__ */ jsxs47(
|
|
47501
|
+
modalAction === "return" && /* @__PURE__ */ jsxs47(Fragment18, { children: [
|
|
47375
47502
|
formatReturnPolicy(returnPolicy) && /* @__PURE__ */ jsxs47("div", { className: "mb-3 text-sm text-gray-500", children: [
|
|
47376
47503
|
"\u9000\u56DE\u540E\u5BA1\u6279\u903B\u8F91\uFF1A",
|
|
47377
47504
|
formatReturnPolicy(returnPolicy)
|
|
@@ -51034,6 +51161,10 @@ export {
|
|
|
51034
51161
|
createReactPage,
|
|
51035
51162
|
extractFieldsFromComponentsTree,
|
|
51036
51163
|
fetchBrowserRuntimeBootstrap,
|
|
51164
|
+
getAuthErrorExtra,
|
|
51165
|
+
getAuthErrorReason,
|
|
51166
|
+
isAuthChallengeRequired,
|
|
51167
|
+
isAuthClientError,
|
|
51037
51168
|
loadCustomPageModule,
|
|
51038
51169
|
loadRuntimeScriptModules,
|
|
51039
51170
|
mountBrowserPageRuntime,
|