From 8d59718742cf0adbb6c0a488680963201f6ea9a3 Mon Sep 17 00:00:00 2001 From: qsc <3153284618@qq.com> Date: Mon, 21 Aug 2023 13:44:51 +0800 Subject: [PATCH] build --- lib/components/amap/location/index.d.ts | 2 +- lib/components/amap/map/index.d.ts | 2 +- lib/components/article/cell/web.d.ts | 2 +- lib/components/article/detail/web.d.ts | 2 +- lib/components/article/preview/web.d.ts | 2 +- lib/components/article/treeList/web.pc.d.ts | 2 +- lib/components/article/upsert/web.d.ts | 2 +- .../articleMenu/treeCell/web.pc.d.ts | 2 +- .../articleMenu/treeList/web.pc.d.ts | 2 +- .../articleMenu/treeManager/web.pc.d.ts | 2 +- .../changePassword/byMobile/web.d.ts | 2 +- .../changePassword/byPassword/web.d.ts | 2 +- lib/components/changePassword/web.d.ts | 2 +- lib/components/common/download/index.d.ts | 2 +- lib/components/common/empty/empty.d.ts | 2 +- lib/components/common/empty/simple.d.ts | 2 +- lib/components/common/errorPage/web.d.ts | 2 +- lib/components/common/grid/index.d.ts | 2 +- lib/components/common/pageHeader/index.d.ts | 2 +- lib/components/common/qrCode/index.d.ts | 2 +- lib/components/common/result/fail/index.d.ts | 2 +- .../common/result/success/index.d.ts | 2 +- .../common/weChatLoginGrant/index.d.ts | 2 +- .../common/weChatLoginQrCode/index.d.ts | 2 +- lib/components/config/application/web.pc.d.ts | 2 +- .../config/application/web/index.d.ts | 2 +- .../config/application/wechatMp/index.d.ts | 2 +- .../application/wechatPublic/index.d.ts | 2 +- lib/components/config/style/index.d.ts | 2 +- .../config/upsert/account/index.d.ts | 2 +- lib/components/config/upsert/cos/index.d.ts | 2 +- lib/components/config/upsert/live/index.d.ts | 2 +- lib/components/config/upsert/map/index.d.ts | 2 +- lib/components/config/upsert/sms/index.d.ts | 2 +- lib/components/config/upsert/web.pc.d.ts | 2 +- lib/components/extraFile/avatar/web.d.ts | 2 +- lib/components/extraFile/display/web.d.ts | 2 +- lib/components/extraFile/forUrl/web.d.ts | 2 +- lib/components/extraFile/gallery/web.d.ts | 2 +- lib/components/func/actionPanel/web.d.ts | 2 +- lib/components/func/debugPanel/web.d.ts | 2 +- lib/components/icon/web.d.ts | 2 +- lib/components/message/cell/web.d.ts | 2 +- lib/components/message/web.d.ts | 2 +- .../messageTypeTemplateId/list/web.pc.d.ts | 2 +- lib/components/my/avatar/web.d.ts | 2 +- lib/components/my/info/web.d.ts | 2 +- lib/components/my/info/web.pc.d.ts | 2 +- lib/components/my/message/web.d.ts | 2 +- lib/components/my/message/web.pc.d.ts | 2 +- lib/components/parasite/detail/web.d.ts | 2 +- lib/components/parasite/excess/web.d.ts | 2 +- lib/components/parasite/list/web.d.ts | 2 +- lib/components/parasite/upsert/web.d.ts | 2 +- lib/components/subwayLine/list/web.d.ts | 2 +- lib/components/theme/setting/RadioColor.d.ts | 2 +- lib/components/theme/setting/RadioRect.d.ts | 2 +- lib/components/theme/setting/index.d.ts | 2 +- lib/components/user/login/web.d.ts | 2 +- lib/components/userRelation/list/index.d.ts | 14 + lib/components/userRelation/list/index.js | 403 ++++++++++++++++++ lib/components/userRelation/list/index.json | 14 + lib/components/userRelation/list/index.less | 58 +++ lib/components/userRelation/list/index.xml | 67 +++ .../userRelation/list/locales/zh_CN.json | 4 + .../userRelation/list/mobile.module.less | 49 +++ lib/components/userRelation/list/web.d.ts | 20 + lib/components/userRelation/list/web.js | 31 ++ .../userRelation/list/web.module.less | 8 + lib/components/userRelation/list/web.pc.d.ts | 14 + lib/components/userRelation/list/web.pc.js | 86 ++++ .../userRelation/onEntity/index.d.ts | 8 + lib/components/userRelation/onEntity/index.js | 66 +++ .../userRelation/onEntity/index.json | 8 + .../userRelation/onEntity/index.less | 159 +++++++ .../userRelation/onEntity/index.xml | 32 ++ lib/components/userRelation/onEntity/web.d.ts | 1 + lib/components/userRelation/onEntity/web.js | 8 + .../userRelation/onEntity/web.module.less | 7 + .../userRelation/upsert/byMobile/index.d.ts | 8 + .../userRelation/upsert/byMobile/index.js | 147 +++++++ .../userRelation/upsert/byMobile/index.json | 14 + .../userRelation/upsert/byMobile/index.less | 30 ++ .../userRelation/upsert/byMobile/index.xml | 43 ++ .../upsert/byMobile/locales/zh_CN.json | 3 + .../upsert/byMobile/mobile.module.less | 12 + .../userRelation/upsert/byMobile/web.d.ts | 14 + .../userRelation/upsert/byMobile/web.js | 31 ++ .../upsert/byMobile/web.module.less | 17 + .../userRelation/upsert/byMobile/web.pc.d.ts | 16 + .../userRelation/upsert/byMobile/web.pc.js | 42 ++ .../userRelation/upsert/byUser/index.d.ts | 8 + .../userRelation/upsert/byUser/index.js | 74 ++++ .../userRelation/upsert/byUser/index.json | 7 + .../userRelation/upsert/byUser/index.less | 16 + .../userRelation/upsert/byUser/index.xml | 9 + .../upsert/byUser/mobile.module.less | 12 + .../userRelation/upsert/byUser/web.d.ts | 11 + .../userRelation/upsert/byUser/web.js | 15 + .../upsert/byUser/web.module.less | 8 + .../userRelation/upsert/byUser/web.pc.d.ts | 11 + .../userRelation/upsert/byUser/web.pc.js | 13 + .../upsert/byUserEntityGrant/index.d.ts | 12 + .../upsert/byUserEntityGrant/index.js | 202 +++++++++ .../upsert/byUserEntityGrant/index.json | 16 + .../upsert/byUserEntityGrant/index.less | 98 +++++ .../upsert/byUserEntityGrant/index.xml | 112 +++++ .../byUserEntityGrant/locales/zh_CN.json | 13 + .../upsert/byUserEntityGrant/web.d.ts | 18 + .../upsert/byUserEntityGrant/web.js | 49 +++ .../upsert/byUserEntityGrant/web.module.less | 9 + .../upsert/byUserEntityGrant/web.pc.d.ts | 22 + .../upsert/byUserEntityGrant/web.pc.js | 51 +++ lib/components/userRelation/upsert/index.d.ts | 10 + lib/components/userRelation/upsert/index.js | 100 +++++ lib/components/userRelation/upsert/index.json | 4 + lib/components/userRelation/upsert/index.less | 28 ++ lib/components/userRelation/upsert/index.xml | 4 + .../userRelation/upsert/mobile.module.less | 6 + .../userRelation/upsert/onUser/index.d.ts | 11 + .../userRelation/upsert/onUser/index.js | 80 ++++ .../userRelation/upsert/onUser/index.json | 12 + .../userRelation/upsert/onUser/index.less | 36 ++ .../userRelation/upsert/onUser/index.xml | 11 + .../upsert/onUser/locales/zh_CN.json | 10 + .../upsert/onUser/mobile.module.less | 6 + .../upsert/onUser/userRelation/index.d.ts | 8 + .../upsert/onUser/userRelation/index.js | 78 ++++ .../upsert/onUser/userRelation/index.json | 10 + .../upsert/onUser/userRelation/index.less | 0 .../upsert/onUser/userRelation/index.xml | 11 + .../onUser/userRelation/mobile.module.less | 8 + .../upsert/onUser/userRelation/web.d.ts | 11 + .../upsert/onUser/userRelation/web.js | 16 + .../onUser/userRelation/web.module.less | 8 + .../upsert/onUser/userRelation/web.pc.d.ts | 11 + .../upsert/onUser/userRelation/web.pc.js | 18 + .../userRelation/upsert/onUser/web.d.ts | 18 + .../userRelation/upsert/onUser/web.js | 38 ++ .../upsert/onUser/web.module.less | 15 + .../userRelation/upsert/onUser/web.pc.d.ts | 19 + .../userRelation/upsert/onUser/web.pc.js | 85 ++++ lib/components/userRelation/upsert/web.d.ts | 14 + lib/components/userRelation/upsert/web.js | 64 +++ .../userRelation/upsert/web.module.less | 8 + .../userRelation/upsert/web.pc.d.ts | 14 + lib/components/userRelation/upsert/web.pc.js | 64 +++ lib/components/wechatLogin/qrCode/web.d.ts | 2 +- .../wechatUser/bindingList/web.d.ts | 2 +- lib/components/wechatUser/unbindBtn/web.d.ts | 2 +- lib/data/i18n.js | 66 ++- lib/pages/address/list/web.d.ts | 2 +- lib/pages/address/upsert/web.d.ts | 2 +- .../application/config/upsert/web.pc.d.ts | 2 +- lib/pages/application/detail/web.d.ts | 2 +- lib/pages/application/list/web.pc.d.ts | 2 +- lib/pages/application/upsert/web.pc.d.ts | 2 +- lib/pages/changePassword/web.d.ts | 2 +- lib/pages/changePassword/web.pc.d.ts | 2 +- lib/pages/domain/detail/web.d.ts | 2 +- lib/pages/domain/list/web.pc.d.ts | 2 +- lib/pages/domain/upsert/web.pc.d.ts | 2 +- lib/pages/icon/web.d.ts | 2 +- lib/pages/message/detail/web.d.ts | 2 +- lib/pages/message/detail/web.pc.d.ts | 2 +- lib/pages/message/drawerList/web.d.ts | 2 +- lib/pages/message/list/web.d.ts | 2 +- lib/pages/message/list/web.pc.d.ts | 2 +- lib/pages/mobile/login/web.d.ts | 2 +- lib/pages/mobile/login/web.pc.d.ts | 2 +- lib/pages/mobile/me/web.d.ts | 2 +- lib/pages/mobile/me/web.pc.d.ts | 2 +- lib/pages/paper/detail/web.d.ts | 2 +- lib/pages/paper/list/web.d.ts | 2 +- lib/pages/paper/preview/web.d.ts | 2 +- lib/pages/paper/upsert/web.d.ts | 2 +- lib/pages/personal/web.d.ts | 2 +- lib/pages/personal/web.pc.d.ts | 2 +- lib/pages/pickers/area/web.d.ts | 2 +- lib/pages/platform/config/upsert/web.pc.d.ts | 2 +- lib/pages/platform/detail/web.d.ts | 2 +- lib/pages/platform/list/web.pc.d.ts | 2 +- lib/pages/platform/upsert/web.pc.d.ts | 2 +- lib/pages/setting/web.d.ts | 2 +- lib/pages/setting/web.pc.d.ts | 2 +- .../subscription/config/upsert/web.pc.d.ts | 2 +- lib/pages/subscription/detail/web.d.ts | 2 +- lib/pages/subscription/list/web.pc.d.ts | 2 +- lib/pages/subscription/upsert/web.pc.d.ts | 2 +- lib/pages/subwayLine/list/web.d.ts | 2 +- lib/pages/subwayLine/upsertStation/web.d.ts | 2 +- lib/pages/subwayLine/upsertSubway/web.d.ts | 2 +- lib/pages/system/config/upsert/web.pc.d.ts | 2 +- lib/pages/system/detail/web.d.ts | 2 +- lib/pages/system/list/web.pc.d.ts | 2 +- lib/pages/system/upsert/web.pc.d.ts | 2 +- lib/pages/token/me/web.d.ts | 2 +- lib/pages/user/info/web.d.ts | 2 +- lib/pages/user/info/web.pc.d.ts | 2 +- lib/pages/user/manage/detail/web.d.ts | 2 +- lib/pages/user/manage/upsert/web.d.ts | 2 +- lib/pages/user/manage/web.d.ts | 2 +- lib/pages/user/manage/web.pc.d.ts | 2 +- lib/pages/user/search/web.d.ts | 2 +- lib/pages/userEntityGrant/confirm/web.d.ts | 2 +- lib/pages/userEntityGrant/detail/web.d.ts | 2 +- lib/pages/userEntityGrant/detail/web.pc.d.ts | 2 +- lib/pages/userEntityGrant/grant/web.d.ts | 2 +- lib/pages/userEntityGrant/list/web.d.ts | 2 +- lib/pages/userRelation/list/index.js | 4 +- lib/pages/userRelation/list/index.json | 3 +- lib/pages/userRelation/list/index.xml | 6 +- lib/pages/userRelation/list/web.d.ts | 2 +- lib/pages/userRelation/list/web.pc.d.ts | 2 +- lib/pages/userRelation/onEntity/web.d.ts | 2 +- .../userRelation/upsert/byMobile/index.less | 1 - .../userRelation/upsert/byMobile/index.xml | 5 + .../userRelation/upsert/byMobile/web.d.ts | 2 +- .../userRelation/upsert/byMobile/web.pc.d.ts | 2 +- .../userRelation/upsert/byUser/index.xml | 2 +- lib/pages/userRelation/upsert/byUser/web.d.ts | 2 +- .../userRelation/upsert/byUser/web.pc.d.ts | 2 +- .../upsert/byUserEntityGrant/web.d.ts | 2 +- .../upsert/byUserEntityGrant/web.js | 2 +- .../upsert/byUserEntityGrant/web.pc.d.ts | 2 +- .../upsert/byUserEntityGrant/web.pc.js | 2 +- .../userRelation/upsert/onUser/index.less | 12 - .../userRelation/upsert/onUser/index.xml | 2 +- .../upsert/onUser/userRelation/web.d.ts | 2 +- .../upsert/onUser/userRelation/web.pc.d.ts | 2 +- lib/pages/userRelation/upsert/onUser/web.d.ts | 2 +- .../userRelation/upsert/onUser/web.pc.d.ts | 2 +- lib/pages/userRelation/upsert/web.pc.d.ts | 2 +- lib/pages/wechatLogin/confirm/web.d.ts | 2 +- lib/pages/wechatPublic/tag/list/web.pc.d.ts | 2 +- lib/pages/wechatPublic/tag/upsert/web.d.ts | 2 +- lib/pages/wechatQrCode/scan/web.d.ts | 2 +- lib/pages/wechatUser/login/web.d.ts | 2 +- src/data/i18n.ts | 66 ++- 239 files changed, 3334 insertions(+), 171 deletions(-) create mode 100644 lib/components/userRelation/list/index.d.ts create mode 100644 lib/components/userRelation/list/index.js create mode 100644 lib/components/userRelation/list/index.json create mode 100644 lib/components/userRelation/list/index.less create mode 100644 lib/components/userRelation/list/index.xml create mode 100644 lib/components/userRelation/list/locales/zh_CN.json create mode 100644 lib/components/userRelation/list/mobile.module.less create mode 100644 lib/components/userRelation/list/web.d.ts create mode 100644 lib/components/userRelation/list/web.js create mode 100644 lib/components/userRelation/list/web.module.less create mode 100644 lib/components/userRelation/list/web.pc.d.ts create mode 100644 lib/components/userRelation/list/web.pc.js create mode 100644 lib/components/userRelation/onEntity/index.d.ts create mode 100644 lib/components/userRelation/onEntity/index.js create mode 100644 lib/components/userRelation/onEntity/index.json create mode 100644 lib/components/userRelation/onEntity/index.less create mode 100644 lib/components/userRelation/onEntity/index.xml create mode 100644 lib/components/userRelation/onEntity/web.d.ts create mode 100644 lib/components/userRelation/onEntity/web.js create mode 100644 lib/components/userRelation/onEntity/web.module.less create mode 100644 lib/components/userRelation/upsert/byMobile/index.d.ts create mode 100644 lib/components/userRelation/upsert/byMobile/index.js create mode 100644 lib/components/userRelation/upsert/byMobile/index.json create mode 100644 lib/components/userRelation/upsert/byMobile/index.less create mode 100644 lib/components/userRelation/upsert/byMobile/index.xml create mode 100644 lib/components/userRelation/upsert/byMobile/locales/zh_CN.json create mode 100644 lib/components/userRelation/upsert/byMobile/mobile.module.less create mode 100644 lib/components/userRelation/upsert/byMobile/web.d.ts create mode 100644 lib/components/userRelation/upsert/byMobile/web.js create mode 100644 lib/components/userRelation/upsert/byMobile/web.module.less create mode 100644 lib/components/userRelation/upsert/byMobile/web.pc.d.ts create mode 100644 lib/components/userRelation/upsert/byMobile/web.pc.js create mode 100644 lib/components/userRelation/upsert/byUser/index.d.ts create mode 100644 lib/components/userRelation/upsert/byUser/index.js create mode 100644 lib/components/userRelation/upsert/byUser/index.json create mode 100644 lib/components/userRelation/upsert/byUser/index.less create mode 100644 lib/components/userRelation/upsert/byUser/index.xml create mode 100644 lib/components/userRelation/upsert/byUser/mobile.module.less create mode 100644 lib/components/userRelation/upsert/byUser/web.d.ts create mode 100644 lib/components/userRelation/upsert/byUser/web.js create mode 100644 lib/components/userRelation/upsert/byUser/web.module.less create mode 100644 lib/components/userRelation/upsert/byUser/web.pc.d.ts create mode 100644 lib/components/userRelation/upsert/byUser/web.pc.js create mode 100644 lib/components/userRelation/upsert/byUserEntityGrant/index.d.ts create mode 100644 lib/components/userRelation/upsert/byUserEntityGrant/index.js create mode 100644 lib/components/userRelation/upsert/byUserEntityGrant/index.json create mode 100644 lib/components/userRelation/upsert/byUserEntityGrant/index.less create mode 100644 lib/components/userRelation/upsert/byUserEntityGrant/index.xml create mode 100644 lib/components/userRelation/upsert/byUserEntityGrant/locales/zh_CN.json create mode 100644 lib/components/userRelation/upsert/byUserEntityGrant/web.d.ts create mode 100644 lib/components/userRelation/upsert/byUserEntityGrant/web.js create mode 100644 lib/components/userRelation/upsert/byUserEntityGrant/web.module.less create mode 100644 lib/components/userRelation/upsert/byUserEntityGrant/web.pc.d.ts create mode 100644 lib/components/userRelation/upsert/byUserEntityGrant/web.pc.js create mode 100644 lib/components/userRelation/upsert/index.d.ts create mode 100644 lib/components/userRelation/upsert/index.js create mode 100644 lib/components/userRelation/upsert/index.json create mode 100644 lib/components/userRelation/upsert/index.less create mode 100644 lib/components/userRelation/upsert/index.xml create mode 100644 lib/components/userRelation/upsert/mobile.module.less create mode 100644 lib/components/userRelation/upsert/onUser/index.d.ts create mode 100644 lib/components/userRelation/upsert/onUser/index.js create mode 100644 lib/components/userRelation/upsert/onUser/index.json create mode 100644 lib/components/userRelation/upsert/onUser/index.less create mode 100644 lib/components/userRelation/upsert/onUser/index.xml create mode 100644 lib/components/userRelation/upsert/onUser/locales/zh_CN.json create mode 100644 lib/components/userRelation/upsert/onUser/mobile.module.less create mode 100644 lib/components/userRelation/upsert/onUser/userRelation/index.d.ts create mode 100644 lib/components/userRelation/upsert/onUser/userRelation/index.js create mode 100644 lib/components/userRelation/upsert/onUser/userRelation/index.json create mode 100644 lib/components/userRelation/upsert/onUser/userRelation/index.less create mode 100644 lib/components/userRelation/upsert/onUser/userRelation/index.xml create mode 100644 lib/components/userRelation/upsert/onUser/userRelation/mobile.module.less create mode 100644 lib/components/userRelation/upsert/onUser/userRelation/web.d.ts create mode 100644 lib/components/userRelation/upsert/onUser/userRelation/web.js create mode 100644 lib/components/userRelation/upsert/onUser/userRelation/web.module.less create mode 100644 lib/components/userRelation/upsert/onUser/userRelation/web.pc.d.ts create mode 100644 lib/components/userRelation/upsert/onUser/userRelation/web.pc.js create mode 100644 lib/components/userRelation/upsert/onUser/web.d.ts create mode 100644 lib/components/userRelation/upsert/onUser/web.js create mode 100644 lib/components/userRelation/upsert/onUser/web.module.less create mode 100644 lib/components/userRelation/upsert/onUser/web.pc.d.ts create mode 100644 lib/components/userRelation/upsert/onUser/web.pc.js create mode 100644 lib/components/userRelation/upsert/web.d.ts create mode 100644 lib/components/userRelation/upsert/web.js create mode 100644 lib/components/userRelation/upsert/web.module.less create mode 100644 lib/components/userRelation/upsert/web.pc.d.ts create mode 100644 lib/components/userRelation/upsert/web.pc.js diff --git a/lib/components/amap/location/index.d.ts b/lib/components/amap/location/index.d.ts index 433c215f6..c449bb837 100644 --- a/lib/components/amap/location/index.d.ts +++ b/lib/components/amap/location/index.d.ts @@ -37,5 +37,5 @@ export declare type Poi = { email?: string; businessArea?: string; }; -declare const Location: (props: LocationProps) => JSX.Element; +declare const Location: (props: LocationProps) => import("react/jsx-runtime").JSX.Element; export default Location; diff --git a/lib/components/amap/map/index.d.ts b/lib/components/amap/map/index.d.ts index 284ac4f66..7d8a429d6 100644 --- a/lib/components/amap/map/index.d.ts +++ b/lib/components/amap/map/index.d.ts @@ -29,5 +29,5 @@ export interface AMapProps extends APILoaderProps { securityJsCode?: string; serviceHost?: string; } -declare const memo: (props: AMapProps) => JSX.Element; +declare const memo: (props: AMapProps) => import("react/jsx-runtime").JSX.Element; export default memo; diff --git a/lib/components/article/cell/web.d.ts b/lib/components/article/cell/web.d.ts index 3a4446aca..fae9cd1d7 100644 --- a/lib/components/article/cell/web.d.ts +++ b/lib/components/article/cell/web.d.ts @@ -7,4 +7,4 @@ export default function Render(props: WebComponentProps): JSX.Element; +}, {}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/components/article/detail/web.d.ts b/lib/components/article/detail/web.d.ts index 01b65b185..a69ec6234 100644 --- a/lib/components/article/detail/web.d.ts +++ b/lib/components/article/detail/web.d.ts @@ -8,4 +8,4 @@ export default function Render(props: WebComponentProps): JSX.Element; +}, {}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/components/article/preview/web.d.ts b/lib/components/article/preview/web.d.ts index 01b65b185..a69ec6234 100644 --- a/lib/components/article/preview/web.d.ts +++ b/lib/components/article/preview/web.d.ts @@ -8,4 +8,4 @@ export default function Render(props: WebComponentProps): JSX.Element; +}, {}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/components/article/treeList/web.pc.d.ts b/lib/components/article/treeList/web.pc.d.ts index 3691473ef..ca941e8a2 100644 --- a/lib/components/article/treeList/web.pc.d.ts +++ b/lib/components/article/treeList/web.pc.d.ts @@ -12,4 +12,4 @@ export default function Render(props: WebComponentProps Promise; -}>): JSX.Element | null; +}>): import("react/jsx-runtime").JSX.Element | null; diff --git a/lib/components/article/upsert/web.d.ts b/lib/components/article/upsert/web.d.ts index 9bff015ce..e88308d2e 100644 --- a/lib/components/article/upsert/web.d.ts +++ b/lib/components/article/upsert/web.d.ts @@ -26,4 +26,4 @@ export default function Render(props: WebComponentProps; clearContentTip: () => void; gotoPreview: (content?: string, title?: string) => void; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/components/articleMenu/treeCell/web.pc.d.ts b/lib/components/articleMenu/treeCell/web.pc.d.ts index abf6db516..155dcdce9 100644 --- a/lib/components/articleMenu/treeCell/web.pc.d.ts +++ b/lib/components/articleMenu/treeCell/web.pc.d.ts @@ -21,4 +21,4 @@ export default function Render(props: WebComponentProps Promise; createSubArticleMenu: (name: string) => Promise; gotoDoc: (articleMenuId: string) => void; -}>): JSX.Element | null; +}>): import("react/jsx-runtime").JSX.Element | null; diff --git a/lib/components/articleMenu/treeList/web.pc.d.ts b/lib/components/articleMenu/treeList/web.pc.d.ts index e6841a36b..a156e9510 100644 --- a/lib/components/articleMenu/treeList/web.pc.d.ts +++ b/lib/components/articleMenu/treeList/web.pc.d.ts @@ -18,4 +18,4 @@ export default function Render(props: WebComponentProps Promise; getDefaultArticle: (rows: EntityDict['articleMenu']['OpSchema'][]) => void; -}>): JSX.Element | null; +}>): import("react/jsx-runtime").JSX.Element | null; diff --git a/lib/components/articleMenu/treeManager/web.pc.d.ts b/lib/components/articleMenu/treeManager/web.pc.d.ts index eb683bf6a..43ae4763c 100644 --- a/lib/components/articleMenu/treeManager/web.pc.d.ts +++ b/lib/components/articleMenu/treeManager/web.pc.d.ts @@ -9,4 +9,4 @@ export default function Render(props: WebComponentProps void; gotoArticleDetail: (oakId: string) => void; -}>): JSX.Element | null; +}>): import("react/jsx-runtime").JSX.Element | null; diff --git a/lib/components/changePassword/byMobile/web.d.ts b/lib/components/changePassword/byMobile/web.d.ts index 30ac7e1f5..4db80166f 100644 --- a/lib/components/changePassword/byMobile/web.d.ts +++ b/lib/components/changePassword/byMobile/web.d.ts @@ -10,4 +10,4 @@ export default function Render(props: WebComponentProps void; sendCaptcha: (mobile: string) => Promise; onConfirmByMobile: (mobile: string, captcha: string, newPassword: string) => Promise; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/components/changePassword/byPassword/web.d.ts b/lib/components/changePassword/byPassword/web.d.ts index 7d7d891f6..05cee5d4f 100644 --- a/lib/components/changePassword/byPassword/web.d.ts +++ b/lib/components/changePassword/byPassword/web.d.ts @@ -5,4 +5,4 @@ export default function Render(props: WebComponentProps Promise; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/components/changePassword/web.d.ts b/lib/components/changePassword/web.d.ts index 866b26fa8..f57472239 100644 --- a/lib/components/changePassword/web.d.ts +++ b/lib/components/changePassword/web.d.ts @@ -6,4 +6,4 @@ export default function Render(props: WebComponentProps void; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/components/common/download/index.d.ts b/lib/components/common/download/index.d.ts index 26a2c908d..1523cc9b8 100644 --- a/lib/components/common/download/index.d.ts +++ b/lib/components/common/download/index.d.ts @@ -7,7 +7,7 @@ declare type IDownloadProps = { style?: React.CSSProperties; filename?: string; }; -declare function Download(props: IDownloadProps): JSX.Element; +declare function Download(props: IDownloadProps): import("react/jsx-runtime").JSX.Element; declare namespace Download { var onDownload: (arrayBuffer: ArrayBuffer, filename: string) => void; var base64ToBlob: (base64String: string) => Blob; diff --git a/lib/components/common/empty/empty.d.ts b/lib/components/common/empty/empty.d.ts index 5ad33b8bc..a2511328e 100644 --- a/lib/components/common/empty/empty.d.ts +++ b/lib/components/common/empty/empty.d.ts @@ -1,3 +1,3 @@ import './index.less'; -declare const Empty: () => JSX.Element; +declare const Empty: () => import("react/jsx-runtime").JSX.Element; export default Empty; diff --git a/lib/components/common/empty/simple.d.ts b/lib/components/common/empty/simple.d.ts index 5ad33b8bc..a2511328e 100644 --- a/lib/components/common/empty/simple.d.ts +++ b/lib/components/common/empty/simple.d.ts @@ -1,3 +1,3 @@ import './index.less'; -declare const Empty: () => JSX.Element; +declare const Empty: () => import("react/jsx-runtime").JSX.Element; export default Empty; diff --git a/lib/components/common/errorPage/web.d.ts b/lib/components/common/errorPage/web.d.ts index 7248dae40..ebd3ddf61 100644 --- a/lib/components/common/errorPage/web.d.ts +++ b/lib/components/common/errorPage/web.d.ts @@ -15,5 +15,5 @@ interface IErrorPageProps { children?: React.ReactNode; icon?: React.ReactNode; } -declare function ErrorPage(props: IErrorPageProps): JSX.Element; +declare function ErrorPage(props: IErrorPageProps): import("react/jsx-runtime").JSX.Element; export default ErrorPage; diff --git a/lib/components/common/grid/index.d.ts b/lib/components/common/grid/index.d.ts index b0a44f1a2..d88319bef 100644 --- a/lib/components/common/grid/index.d.ts +++ b/lib/components/common/grid/index.d.ts @@ -15,5 +15,5 @@ declare type GridProps = { list: Array; onChange?: (index: number, event?: React.MouseEvent) => void; }; -declare const _default: React.MemoExoticComponent<(props: GridProps) => JSX.Element>; +declare const _default: React.MemoExoticComponent<(props: GridProps) => import("react/jsx-runtime").JSX.Element>; export default _default; diff --git a/lib/components/common/pageHeader/index.d.ts b/lib/components/common/pageHeader/index.d.ts index 6e311de0b..9c10ae4ed 100644 --- a/lib/components/common/pageHeader/index.d.ts +++ b/lib/components/common/pageHeader/index.d.ts @@ -17,5 +17,5 @@ declare type PageHeaderProps = { children?: React.ReactNode; showHeader?: boolean; }; -declare const _default: React.MemoExoticComponent<(props: PageHeaderProps) => JSX.Element>; +declare const _default: React.MemoExoticComponent<(props: PageHeaderProps) => import("react/jsx-runtime").JSX.Element>; export default _default; diff --git a/lib/components/common/qrCode/index.d.ts b/lib/components/common/qrCode/index.d.ts index f7466976a..0d392c9cc 100644 --- a/lib/components/common/qrCode/index.d.ts +++ b/lib/components/common/qrCode/index.d.ts @@ -14,5 +14,5 @@ declare type IQrCodeProps = { successed?: boolean; type?: EntityDict['wechatLogin']['Schema']['type']; }; -declare function QrCode(props: IQrCodeProps): JSX.Element; +declare function QrCode(props: IQrCodeProps): import("react/jsx-runtime").JSX.Element; export default QrCode; diff --git a/lib/components/common/result/fail/index.d.ts b/lib/components/common/result/fail/index.d.ts index c6fa58026..a6297a1a2 100644 --- a/lib/components/common/result/fail/index.d.ts +++ b/lib/components/common/result/fail/index.d.ts @@ -5,5 +5,5 @@ declare type Props = { description?: string; children?: React.ReactNode; }; -declare const _default: React.MemoExoticComponent<(props: Props) => JSX.Element>; +declare const _default: React.MemoExoticComponent<(props: Props) => import("react/jsx-runtime").JSX.Element>; export default _default; diff --git a/lib/components/common/result/success/index.d.ts b/lib/components/common/result/success/index.d.ts index c6fa58026..a6297a1a2 100644 --- a/lib/components/common/result/success/index.d.ts +++ b/lib/components/common/result/success/index.d.ts @@ -5,5 +5,5 @@ declare type Props = { description?: string; children?: React.ReactNode; }; -declare const _default: React.MemoExoticComponent<(props: Props) => JSX.Element>; +declare const _default: React.MemoExoticComponent<(props: Props) => import("react/jsx-runtime").JSX.Element>; export default _default; diff --git a/lib/components/common/weChatLoginGrant/index.d.ts b/lib/components/common/weChatLoginGrant/index.d.ts index 8682eb1f9..103066375 100644 --- a/lib/components/common/weChatLoginGrant/index.d.ts +++ b/lib/components/common/weChatLoginGrant/index.d.ts @@ -14,5 +14,5 @@ interface GrantProps { rootStyle?: React.CSSProperties; rootClassName?: string; } -declare function Grant(props: GrantProps): JSX.Element; +declare function Grant(props: GrantProps): import("react/jsx-runtime").JSX.Element; export default Grant; diff --git a/lib/components/common/weChatLoginQrCode/index.d.ts b/lib/components/common/weChatLoginQrCode/index.d.ts index 9649b84d0..8ee8cfe2b 100644 --- a/lib/components/common/weChatLoginQrCode/index.d.ts +++ b/lib/components/common/weChatLoginQrCode/index.d.ts @@ -14,5 +14,5 @@ interface QrCodeProps { rootStyle?: React.CSSProperties; rootClassName?: string; } -declare function QrCode(props: QrCodeProps): JSX.Element; +declare function QrCode(props: QrCodeProps): import("react/jsx-runtime").JSX.Element; export default QrCode; diff --git a/lib/components/config/application/web.pc.d.ts b/lib/components/config/application/web.pc.d.ts index 00b4cbb30..eccda843f 100644 --- a/lib/components/config/application/web.pc.d.ts +++ b/lib/components/config/application/web.pc.d.ts @@ -15,5 +15,5 @@ export default function render(props: WebComponentProps void; removeItem: (path: string, index: number) => void; cleanKey: (path: string, key: string) => void; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; export {}; diff --git a/lib/components/config/application/web/index.d.ts b/lib/components/config/application/web/index.d.ts index f6dab4516..c4aece1ab 100644 --- a/lib/components/config/application/web/index.d.ts +++ b/lib/components/config/application/web/index.d.ts @@ -4,4 +4,4 @@ export default function Web(props: { setValue: (path: string, value: any) => void; removeItem: (path: string, index: number) => void; cleanKey: (path: string, key: string) => void; -}): JSX.Element; +}): import("react/jsx-runtime").JSX.Element; diff --git a/lib/components/config/application/wechatMp/index.d.ts b/lib/components/config/application/wechatMp/index.d.ts index ddba55f50..163e97d8b 100644 --- a/lib/components/config/application/wechatMp/index.d.ts +++ b/lib/components/config/application/wechatMp/index.d.ts @@ -4,4 +4,4 @@ export default function WechatMp(props: { setValue: (path: string, value: any) => void; removeItem: (path: string, index: number) => void; cleanKey: (path: string, key: string) => void; -}): JSX.Element; +}): import("react/jsx-runtime").JSX.Element; diff --git a/lib/components/config/application/wechatPublic/index.d.ts b/lib/components/config/application/wechatPublic/index.d.ts index fef4156cc..cac9e549c 100644 --- a/lib/components/config/application/wechatPublic/index.d.ts +++ b/lib/components/config/application/wechatPublic/index.d.ts @@ -5,4 +5,4 @@ export default function WechatPublic(props: { setValue: (path: string, value: any) => void; removeItem: (path: string, index: number) => void; cleanKey: (path: string, key: string) => void; -}): JSX.Element; +}): import("react/jsx-runtime").JSX.Element; diff --git a/lib/components/config/style/index.d.ts b/lib/components/config/style/index.d.ts index 2469d4262..db7ae7ced 100644 --- a/lib/components/config/style/index.d.ts +++ b/lib/components/config/style/index.d.ts @@ -3,5 +3,5 @@ declare type StyleProps = { value?: StyleType | null; onChange: (value: StyleType) => void; }; -export default function Render(props: StyleProps): JSX.Element; +export default function Render(props: StyleProps): import("react/jsx-runtime").JSX.Element; export {}; diff --git a/lib/components/config/upsert/account/index.d.ts b/lib/components/config/upsert/account/index.d.ts index d12966ca5..7e62ed49f 100644 --- a/lib/components/config/upsert/account/index.d.ts +++ b/lib/components/config/upsert/account/index.d.ts @@ -3,4 +3,4 @@ export default function Account(props: { account: Required['Account']; setValue: (path: string, value: any) => void; removeItem: (path: string, index: number) => void; -}): JSX.Element; +}): import("react/jsx-runtime").JSX.Element; diff --git a/lib/components/config/upsert/cos/index.d.ts b/lib/components/config/upsert/cos/index.d.ts index e597fb133..e5a04827d 100644 --- a/lib/components/config/upsert/cos/index.d.ts +++ b/lib/components/config/upsert/cos/index.d.ts @@ -2,4 +2,4 @@ import { Config } from '../../../../types/Config'; export default function Cos(props: { cos: Required['Cos']; setValue: (path: string, value: any) => void; -}): JSX.Element; +}): import("react/jsx-runtime").JSX.Element; diff --git a/lib/components/config/upsert/live/index.d.ts b/lib/components/config/upsert/live/index.d.ts index e6e06424f..aa52c1d83 100644 --- a/lib/components/config/upsert/live/index.d.ts +++ b/lib/components/config/upsert/live/index.d.ts @@ -2,4 +2,4 @@ import { Config } from '../../../../types/Config'; export default function Cos(props: { live: Required['Live']; setValue: (path: string, value: any) => void; -}): JSX.Element; +}): import("react/jsx-runtime").JSX.Element; diff --git a/lib/components/config/upsert/map/index.d.ts b/lib/components/config/upsert/map/index.d.ts index 84db02c1b..a6d4f007f 100644 --- a/lib/components/config/upsert/map/index.d.ts +++ b/lib/components/config/upsert/map/index.d.ts @@ -2,4 +2,4 @@ import { Config } from '../../../../types/Config'; export default function Cos(props: { map: Required['Map']; setValue: (path: string, value: any) => void; -}): JSX.Element; +}): import("react/jsx-runtime").JSX.Element; diff --git a/lib/components/config/upsert/sms/index.d.ts b/lib/components/config/upsert/sms/index.d.ts index 56f0dd17c..69f8bdf55 100644 --- a/lib/components/config/upsert/sms/index.d.ts +++ b/lib/components/config/upsert/sms/index.d.ts @@ -4,4 +4,4 @@ export default function Sms(props: { setValue: (path: string, value: any) => void; removeItem: (path: string, index: number) => void; cleanKey: (path: string, key: string) => void; -}): JSX.Element; +}): import("react/jsx-runtime").JSX.Element; diff --git a/lib/components/config/upsert/web.pc.d.ts b/lib/components/config/upsert/web.pc.d.ts index e44901f31..62aacb982 100644 --- a/lib/components/config/upsert/web.pc.d.ts +++ b/lib/components/config/upsert/web.pc.d.ts @@ -12,4 +12,4 @@ export default function Render(props: WebComponentProps void; removeItem: (path: string, index: number) => void; cleanKey: (path: string, key: string) => void; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/components/extraFile/avatar/web.d.ts b/lib/components/extraFile/avatar/web.d.ts index c4da6f9c4..3c90adebc 100644 --- a/lib/components/extraFile/avatar/web.d.ts +++ b/lib/components/extraFile/avatar/web.d.ts @@ -6,4 +6,4 @@ export default function render(props: WebComponentProps void; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/components/extraFile/display/web.d.ts b/lib/components/extraFile/display/web.d.ts index cfaabf286..3313c4c64 100644 --- a/lib/components/extraFile/display/web.d.ts +++ b/lib/components/extraFile/display/web.d.ts @@ -1 +1 @@ -export default function render(): JSX.Element; +export default function render(): import("react/jsx-runtime").JSX.Element; diff --git a/lib/components/extraFile/forUrl/web.d.ts b/lib/components/extraFile/forUrl/web.d.ts index 9bead9e06..b11a202d5 100644 --- a/lib/components/extraFile/forUrl/web.d.ts +++ b/lib/components/extraFile/forUrl/web.d.ts @@ -19,5 +19,5 @@ export default function render(props: WebComponentProps void; onModal1Confirm: (value: number) => void; setSelectedId: (id: number) => void; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; export {}; diff --git a/lib/components/extraFile/gallery/web.d.ts b/lib/components/extraFile/gallery/web.d.ts index 08807924f..ce81bee49 100644 --- a/lib/components/extraFile/gallery/web.d.ts +++ b/lib/components/extraFile/gallery/web.d.ts @@ -30,5 +30,5 @@ export default function render(props: WebComponentProps string; getFileName: (extraFile: EntityDict['extraFile']['OpSchema']) => string; eFFormatBytes: (value: number) => string; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; export {}; diff --git a/lib/components/func/actionPanel/web.d.ts b/lib/components/func/actionPanel/web.d.ts index 715d4231d..9c850af28 100644 --- a/lib/components/func/actionPanel/web.d.ts +++ b/lib/components/func/actionPanel/web.d.ts @@ -10,4 +10,4 @@ export default function Render(props: WebComponentProps; }, { onClick: (action: string) => void; -}>): JSX.Element | null; +}>): import("react/jsx-runtime").JSX.Element | null; diff --git a/lib/components/func/debugPanel/web.d.ts b/lib/components/func/debugPanel/web.d.ts index 9f422c05b..d28454d7e 100644 --- a/lib/components/func/debugPanel/web.d.ts +++ b/lib/components/func/debugPanel/web.d.ts @@ -10,4 +10,4 @@ export default function render(props: WebComponentProps void; downloadEnv: () => void; resetEnv: (data: Record) => void; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/components/icon/web.d.ts b/lib/components/icon/web.d.ts index acd0ce16d..0d5c0042f 100644 --- a/lib/components/icon/web.d.ts +++ b/lib/components/icon/web.d.ts @@ -8,4 +8,4 @@ export default function Render(props: WebComponentProps): JSX.Element; +}, {}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/components/message/cell/web.d.ts b/lib/components/message/cell/web.d.ts index 33ae776e1..a62a16030 100644 --- a/lib/components/message/cell/web.d.ts +++ b/lib/components/message/cell/web.d.ts @@ -11,4 +11,4 @@ export default function Render(props: WebComponentProps): JSX.Element; +}, {}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/components/message/web.d.ts b/lib/components/message/web.d.ts index 2ee2d0046..adbdc8735 100644 --- a/lib/components/message/web.d.ts +++ b/lib/components/message/web.d.ts @@ -3,4 +3,4 @@ export default function render(props: { data: { data: MessageProps; }; -}): JSX.Element; +}): import("react/jsx-runtime").JSX.Element; diff --git a/lib/components/messageTypeTemplateId/list/web.pc.d.ts b/lib/components/messageTypeTemplateId/list/web.pc.d.ts index 7c8007313..179e75e79 100644 --- a/lib/components/messageTypeTemplateId/list/web.pc.d.ts +++ b/lib/components/messageTypeTemplateId/list/web.pc.d.ts @@ -5,4 +5,4 @@ export default function Render(props: WebComponentProps): JSX.Element; +}, {}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/components/my/avatar/web.d.ts b/lib/components/my/avatar/web.d.ts index 3527203b4..83ba9638b 100644 --- a/lib/components/my/avatar/web.d.ts +++ b/lib/components/my/avatar/web.d.ts @@ -9,4 +9,4 @@ export default function Render(props: WebComponentProps void; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/components/my/info/web.d.ts b/lib/components/my/info/web.d.ts index ba6b0a802..2dc080f0f 100644 --- a/lib/components/my/info/web.d.ts +++ b/lib/components/my/info/web.d.ts @@ -13,4 +13,4 @@ export default function Render(props: WebComponentProps void; updateAttribute: (attr: string, value: any) => Promise; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/components/my/info/web.pc.d.ts b/lib/components/my/info/web.pc.d.ts index 80fcfe6a1..73eeab450 100644 --- a/lib/components/my/info/web.pc.d.ts +++ b/lib/components/my/info/web.pc.d.ts @@ -13,4 +13,4 @@ export default function Render(props: WebComponentProps void; updateAttribute: (attr: string, value: any) => Promise; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/components/my/message/web.d.ts b/lib/components/my/message/web.d.ts index e9d5ea208..0a09bb113 100644 --- a/lib/components/my/message/web.d.ts +++ b/lib/components/my/message/web.d.ts @@ -8,4 +8,4 @@ export default function Render(props: WebComponentProps void; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/components/my/message/web.pc.d.ts b/lib/components/my/message/web.pc.d.ts index 50cf3f0f5..09ecd6d00 100644 --- a/lib/components/my/message/web.pc.d.ts +++ b/lib/components/my/message/web.pc.d.ts @@ -10,4 +10,4 @@ export default function Render(props: WebComponentProps void; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/components/parasite/detail/web.d.ts b/lib/components/parasite/detail/web.d.ts index 85e0f7556..058f6a823 100644 --- a/lib/components/parasite/detail/web.d.ts +++ b/lib/components/parasite/detail/web.d.ts @@ -6,4 +6,4 @@ export default function Render(props: WebComponentProps): JSX.Element; +}, {}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/components/parasite/excess/web.d.ts b/lib/components/parasite/excess/web.d.ts index 5e9055c31..0728f2008 100644 --- a/lib/components/parasite/excess/web.d.ts +++ b/lib/components/parasite/excess/web.d.ts @@ -4,4 +4,4 @@ export default function render(props: WebComponentProps): JSX.Element; +}, {}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/components/parasite/list/web.d.ts b/lib/components/parasite/list/web.d.ts index cd4afd228..32b912e3e 100644 --- a/lib/components/parasite/list/web.d.ts +++ b/lib/components/parasite/list/web.d.ts @@ -7,4 +7,4 @@ export default function render(props: WebComponentProps void; getQrCode: () => Promise; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/components/parasite/upsert/web.d.ts b/lib/components/parasite/upsert/web.d.ts index 29adf4442..458806c16 100644 --- a/lib/components/parasite/upsert/web.d.ts +++ b/lib/components/parasite/upsert/web.d.ts @@ -19,4 +19,4 @@ export default function Render(props: WebComponentProps void; onSelect: (value: string) => void; setSearchValue: (value: string) => void; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/components/subwayLine/list/web.d.ts b/lib/components/subwayLine/list/web.d.ts index 09acc725d..44c153754 100644 --- a/lib/components/subwayLine/list/web.d.ts +++ b/lib/components/subwayLine/list/web.d.ts @@ -16,4 +16,4 @@ export default function render(props: WebComponentProps void; cancel: () => void; confirm: () => void; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/components/theme/setting/RadioColor.d.ts b/lib/components/theme/setting/RadioColor.d.ts index 73f280ac3..9abf7c407 100644 --- a/lib/components/theme/setting/RadioColor.d.ts +++ b/lib/components/theme/setting/RadioColor.d.ts @@ -3,5 +3,5 @@ interface IProps { defaultValue?: number | string; onChange: (color: string) => void; } -declare const _default: React.MemoExoticComponent<(props: IProps) => JSX.Element>; +declare const _default: React.MemoExoticComponent<(props: IProps) => import("react/jsx-runtime").JSX.Element>; export default _default; diff --git a/lib/components/theme/setting/RadioRect.d.ts b/lib/components/theme/setting/RadioRect.d.ts index f363ad49a..688664958 100644 --- a/lib/components/theme/setting/RadioRect.d.ts +++ b/lib/components/theme/setting/RadioRect.d.ts @@ -9,5 +9,5 @@ interface IProps { onChange: (value?: any) => void; options: IOption[]; } -declare const _default: React.MemoExoticComponent<(props: IProps) => JSX.Element>; +declare const _default: React.MemoExoticComponent<(props: IProps) => import("react/jsx-runtime").JSX.Element>; export default _default; diff --git a/lib/components/theme/setting/index.d.ts b/lib/components/theme/setting/index.d.ts index 8540c7ec7..ceea5e606 100644 --- a/lib/components/theme/setting/index.d.ts +++ b/lib/components/theme/setting/index.d.ts @@ -1 +1 @@ -export default function Render(this: any): JSX.Element; +export default function Render(this: any): import("react/jsx-runtime").JSX.Element; diff --git a/lib/components/user/login/web.d.ts b/lib/components/user/login/web.d.ts index 97980c3a8..82f03a08b 100644 --- a/lib/components/user/login/web.d.ts +++ b/lib/components/user/login/web.d.ts @@ -19,4 +19,4 @@ export default function Render(props: WebComponentProps Promise; loginByMobile: (mobile: string, password?: string, captcha?: string) => Promise; setLoginMode: (value: number) => void; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/components/userRelation/list/index.d.ts b/lib/components/userRelation/list/index.d.ts new file mode 100644 index 000000000..0aeb43c45 --- /dev/null +++ b/lib/components/userRelation/list/index.d.ts @@ -0,0 +1,14 @@ +import { EntityDict } from '../../../oak-app-domain'; +import { EntityDict as BaseEntityDict } from 'oak-domain/lib/types/Entity'; +import { ReactComponentProps } from 'oak-frontend-base/lib/types/Page'; +declare const _default: (props: ReactComponentProps void; + onUpdate: (id: string) => void; +}>) => React.ReactElement; +export default _default; diff --git a/lib/components/userRelation/list/index.js b/lib/components/userRelation/list/index.js new file mode 100644 index 000000000..a4331030c --- /dev/null +++ b/lib/components/userRelation/list/index.js @@ -0,0 +1,403 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var tslib_1 = require("tslib"); +var types_1 = require("oak-domain/lib/types"); +var string_1 = require("oak-domain/lib/utils/string"); +var uuid_1 = require("oak-domain/lib/utils/uuid"); +var assert_1 = tslib_1.__importDefault(require("assert")); +exports.default = OakComponent({ + entity: 'user', + projection: function () { + var userId = this.features.token.getUserId(); + var isRoot = this.features.token.isRoot(); + (0, assert_1.default)(userId); + var _a = this.props, entity = _a.entity, entityId = _a.entityId; + var userRelationFilter = { + entity: entity, + entityId: entityId, + }; + if (!isRoot) { + userRelationFilter.relation = { + relationAuth$destRelation: { + sourceRelation: { + userRelation$relation: { + userId: userId, + }, + }, + } + }; + } + return { + id: 1, + name: 1, + nickname: 1, + mobile$user: { + $entity: 'mobile', + data: { + id: 1, + userId: 1, + mobile: 1, + }, + }, + userRelation$user: { + $entity: 'userRelation', + data: { + id: 1, + entity: 1, + entityId: 1, + userId: 1, + relationId: 1, + relation: { + id: 1, + name: 1, + display: 1, + relationAuth$destRelation: { + $entity: 'relationAuth', + data: { + id: 1, + sourceRelation: { + userRelation$relation: { + $entity: 'userRelation', + data: { + id: 1, + userId: 1, + } + } + } + } + } + } + }, + filter: userRelationFilter, + }, + extraFile$entity: { + $entity: 'extraFile', + data: { + id: 1, + tag1: 1, + origin: 1, + bucket: 1, + objectId: 1, + filename: 1, + extra1: 1, + type: 1, + entity: 1, + entityId: 1, + extension: 1, + sort: 1, + }, + filter: { + tag1: 'avatar', + }, + indexFrom: 0, + count: 1, + }, + }; + }, + filters: [ + { + filter: function () { + var userId = this.features.token.getUserId(); + var isRoot = this.features.token.isRoot(); + var _a = this.props, entityId = _a.entityId, entity = _a.entity; + var filter = { + entity: entity, + entityId: entityId, + }; + if (!isRoot) { + filter.relation = { + relationAuth$destRelation: { + sourceRelation: { + userRelation$relation: { + userId: userId, + } + } + } + }; + /* filter.relationId = { + $in: { + entity: 'relationAuth', + data: { + destRelationId: 1, + }, + filter: { + sourceRelationId: { + $in: { + entity: 'userRelation', + data: { + relationId: 1, + }, + filter: { + userId, + }, + }, + }, + }, + }, + }; */ + } + return { + userRelation$user: filter, + /* id: { + $in: { + entity: 'userRelation', + data: { + userId: 1, + }, + filter, + }, + }, */ + }; + }, + }, + ], + isList: true, + formData: function (_a) { + var users = _a.data, props = _a.props, features = _a.features; + var entity = props.entity, entityId = props.entityId; + var filter = this.getFilterByName('fulltext'); + return { + users: users === null || users === void 0 ? void 0 : users.map(function (ele) { + var _a; + var mobile$user = ele.mobile$user, extraFile$entity = ele.extraFile$entity; + var mobile = mobile$user && ((_a = mobile$user[0]) === null || _a === void 0 ? void 0 : _a.mobile); + var avatar = features.extraFile.getUrl(extraFile$entity && extraFile$entity[0]); + var user2 = Object.assign({}, ele, { + mobile: mobile, + avatar: avatar, + }); + return user2; + }), + searchValue: (filter === null || filter === void 0 ? void 0 : filter.$text) && filter.$text.$search, + }; + }, + properties: { + entity: '', + entityId: '', + redirectToAfterConfirm: {}, + qrCodeType: '', + onUpdate: function (id) { }, + onCreate: function () { }, + }, + data: { + searchValue: '', + showActionSheet: false, + itemList: [ + { + name: '从现有人员中选择(通过手机号)', + mode: 'byMobile', + }, + { + name: '通过分享二维码', + mode: 'byQrCode', + }, + ], + idRemoveMp: '', + }, + listeners: { + 'entity,entityId': function (prev, next) { + if (this.state.oakFullpath) { + if (prev.entity !== next.entity || prev.entityId !== next.entityId) { + this.refresh(); + } + } + }, + }, + lifetimes: { + attached: function () { + // this.calcRelations(); + }, + ready: function () { + // console.log('ready', this.props.relations); + }, + }, + methods: { + goUpsert: function () { + var _a = this.props, entity = _a.entity, entityId = _a.entityId, redirectToAfterConfirm = _a.redirectToAfterConfirm, qrCodeType = _a.qrCodeType, onCreate = _a.onCreate; + if (onCreate) { + onCreate(); + } + else { + if (process.env.NODE_ENV === 'development') { + console.warn('userRelation将不再作为page直接使用,请使用回调函数处理'); + } + this.navigateTo({ + url: '/userRelation/upsert', + entity: entity, + entityId: entityId, + }, { + redirectToAfterConfirm: redirectToAfterConfirm, + qrCodeType: qrCodeType, + }); + } + }, + goUpdate: function (id) { + var _a = this.props, entity = _a.entity, entityId = _a.entityId, onUpdate = _a.onUpdate; + if (onUpdate) { + onUpdate(id); + } + else { + if (process.env.NODE_ENV === 'development') { + console.warn('userRelation将不再作为page直接使用,请使用回调函数处理'); + } + this.navigateTo({ + url: '/userRelation/upsert/byUser', + entity: entity, + entityId: entityId, + oakId: id, + }); + } + }, + confirmDelete: function (idRemove) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + var _a, entity, entityId, entityStr, users, user, relations, err_1; + return tslib_1.__generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = this.props, entity = _a.entity, entityId = _a.entityId; + entityStr = (0, string_1.firstLetterUpperCase)(entity); + users = this.state.users; + user = users.find(function (ele) { return ele.id === idRemove; }); + relations = user.userRelation$user; + _b.label = 1; + case 1: + _b.trys.push([1, 3, , 4]); + this.updateItem({ + userRelation$user: [ + { + id: (0, uuid_1.generateNewId)(), + action: 'remove', + data: {}, + filter: { + id: { + $in: relations.map(function (ele) { return ele.id; }), + }, + }, + }, + ], + }, idRemove, 'revoke'); + return [4 /*yield*/, this.execute()]; + case 2: + _b.sent(); + return [3 /*break*/, 4]; + case 3: + err_1 = _b.sent(); + if (err_1 instanceof types_1.OakUserUnpermittedException) { + this.setMessage({ + type: 'error', + content: err_1.message, + }); + return [2 /*return*/]; + } + return [3 /*break*/, 4]; + case 4: return [2 /*return*/]; + } + }); + }); + }, + searchChangeMp: function (event) { + var value = event.detail.value; + this.addNamedFilter({ + filter: { + $text: { + $search: value, + }, + }, + '#name': 'fulltext', + }); + }, + searchCancelMp: function () { + this.removeNamedFilterByName('fulltext', true); + }, + searchConfirmMp: function () { + this.refresh(); + }, + chooseActionMp: function (e) { + var _a = this.props, entity = _a.entity, entityId = _a.entityId, redirectToAfterConfirm = _a.redirectToAfterConfirm, qrCodeType = _a.qrCodeType; + var mode = e.detail.item.mode; + if (mode === 'byMobile') { + this.navigateTo({ + url: '/userRelation/upsert/byMobile', + entity: entity, + entityId: entityId, + }); + } + else { + this.navigateTo({ + url: '/userRelation/upsert/byUserEntityGrant', + entity: entity, + entityId: entityId, + redirectToAfterConfirm: redirectToAfterConfirm, + qrCodeType: qrCodeType, + }); + } + }, + cancelActionMp: function (e) { + this.setState({ + showActionSheet: false, + }); + }, + showActionSheetMp: function () { + this.setState({ + showActionSheet: true, + }); + }, + onItemTapMp: function (e) { + var _a = this.props, entity = _a.entity, entityId = _a.entityId; + var id = e.currentTarget.dataset.id; + this.navigateTo({ + url: '/userRelation/upsert/byUser', + oakId: id, + entity: entity, + entityId: entityId, + }); + }, + onDeleteMp: function (e) { + var id = e.currentTarget.dataset.id; + this.setState({ + idRemoveMp: id, + }); + }, + cancelDeleteMp: function () { + this.setState({ + idRemoveMp: '', + }); + }, + confirmDeleteMp: function () { + return tslib_1.__awaiter(this, void 0, void 0, function () { + var idRemoveMp, err_2; + return tslib_1.__generator(this, function (_a) { + switch (_a.label) { + case 0: + idRemoveMp = this.state.idRemoveMp; + _a.label = 1; + case 1: + _a.trys.push([1, 3, , 4]); + return [4 /*yield*/, this.confirmDelete(idRemoveMp)]; + case 2: + _a.sent(); + return [3 /*break*/, 4]; + case 3: + err_2 = _a.sent(); + this.setState({ + idRemoveMp: '', + }); + if (err_2 instanceof types_1.OakUserUnpermittedException) { + this.setMessage({ + type: 'error', + content: err_2.message, + }); + return [2 /*return*/]; + } + return [3 /*break*/, 4]; + case 4: + this.setState({ + idRemoveMp: '', + }); + return [2 /*return*/]; + } + }); + }); + }, + }, +}); diff --git a/lib/components/userRelation/list/index.json b/lib/components/userRelation/list/index.json new file mode 100644 index 000000000..087c1ef2c --- /dev/null +++ b/lib/components/userRelation/list/index.json @@ -0,0 +1,14 @@ +{ + "navigationBarTitleText": "人员列表", + "usingComponents": { + "l-input": "@oak-frontend-base/miniprogram_npm/lin-ui/input/index", + "l-icon": "@oak-frontend-base/miniprogram_npm/lin-ui/icon/index", + "l-card": "@oak-frontend-base/miniprogram_npm/lin-ui/card/index", + "l-button": "@oak-frontend-base/miniprogram_npm/lin-ui/button/index", + "l-tag": "@oak-frontend-base/miniprogram_npm/lin-ui/tag/index", + "l-list": "@oak-frontend-base/miniprogram_npm/lin-ui/list/index", + "l-dialog": "@oak-frontend-base/miniprogram_npm/lin-ui/dialog/index", + "l-action-sheet": "@oak-frontend-base/miniprogram_npm/lin-ui/action-sheet/index", + "l-status-show": "@oak-frontend-base/miniprogram_npm/lin-ui/status-show/index" + } +} diff --git a/lib/components/userRelation/list/index.less b/lib/components/userRelation/list/index.less new file mode 100644 index 000000000..1205f6f8d --- /dev/null +++ b/lib/components/userRelation/list/index.less @@ -0,0 +1,58 @@ +/** index.wxss **/ +@import "../../../config/styles/mp/index.less"; +@import "../../../config/styles/mp/mixins.less"; + +page { + height: 100%; + background-color: @oak-bg-color-page; +} + +.page-body { + height: 100%; + display: flex; + flex: 1; + flex-direction: column; + box-sizing: border-box; + align-items: stretch; + padding: 0; + .safe-area-inset-bottom(); +} + +.search-bar { + background-color: #fff; + padding: 10rpx; + z-index: 1; + margin-bottom: 20rpx; + display: flex; + flex-direction: row; + align-items: flex-end; + + .search-input { + flex: 1; + margin-right: 10rpx; + } +} + +.relation { + display: flex; + flex-wrap: wrap; + + .tag { + margin: 10rpx; + } +} + +.info { + height: 100%; + display: flex; + justify-content: center; + align-items: center; + background-color: @oak-bg-color-container; + color: @oak-color-info; +} + +.add { + position: fixed; + right: 20rpx; + bottom: 20rpx; +} \ No newline at end of file diff --git a/lib/components/userRelation/list/index.xml b/lib/components/userRelation/list/index.xml new file mode 100644 index 000000000..dda6a23cf --- /dev/null +++ b/lib/components/userRelation/list/index.xml @@ -0,0 +1,67 @@ + + + + + + + + 新增 + + + + + + + + + + {{item2.relation.name ? t(entity + ':r.' + item2.relation.name) : item2.relation.display}} + + + + + + + + + + + + + + + + diff --git a/lib/components/userRelation/list/locales/zh_CN.json b/lib/components/userRelation/list/locales/zh_CN.json new file mode 100644 index 000000000..29884db7b --- /dev/null +++ b/lib/components/userRelation/list/locales/zh_CN.json @@ -0,0 +1,4 @@ +{ + "confirmRevokeAll": "确认删除用户的所有权限吗?", + "search": "搜索用户名" +} diff --git a/lib/components/userRelation/list/mobile.module.less b/lib/components/userRelation/list/mobile.module.less new file mode 100644 index 000000000..124b7bac9 --- /dev/null +++ b/lib/components/userRelation/list/mobile.module.less @@ -0,0 +1,49 @@ + + +.container { + height: 100%; + flex: 1; + display: flex; + flex-direction: column; + background-color: var(--oak-bg-color-page); +} + +.header { + padding: 16px; + background-color: var(--oak-bg-color-container); + margin-bottom: 10rpx; + display: flex; + flex-direction: row; + align-items: center; +} + +.avatar { + height: 56px; + width: 56px; + + .text { + color: #fff; + font-size: 16px; + } +} + +.description { + .row { + .label { + color: var(--oak-text-color-secondary); + font-size: 12px; + } + + .value { + color: var(--oak-text-color-primary); + font-size: 12px; + } + } +} + +.fab { + position: fixed; + bottom: 50px; + right: 10px; + z-index: 1; +} diff --git a/lib/components/userRelation/list/web.d.ts b/lib/components/userRelation/list/web.d.ts new file mode 100644 index 000000000..2ae7577da --- /dev/null +++ b/lib/components/userRelation/list/web.d.ts @@ -0,0 +1,20 @@ +import { WebComponentProps } from 'oak-frontend-base'; +import { EntityDict } from '../../../oak-app-domain'; +export default function Render(props: WebComponentProps void; + confirmDelete: (id: string) => Promise; + goUpdate: (id: string) => void; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/components/userRelation/list/web.js b/lib/components/userRelation/list/web.js new file mode 100644 index 000000000..01cb85a31 --- /dev/null +++ b/lib/components/userRelation/list/web.js @@ -0,0 +1,31 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var tslib_1 = require("tslib"); +var jsx_runtime_1 = require("react/jsx-runtime"); +var antd_mobile_1 = require("antd-mobile"); +var antd_mobile_icons_1 = require("antd-mobile-icons"); +var mobile_module_less_1 = tslib_1.__importDefault(require("./mobile.module.less")); +function Render(props) { + var _a = props.methods, t = _a.t, goUpsert = _a.goUpsert, goUpdate = _a.goUpdate, addNamedFilter = _a.addNamedFilter, refresh = _a.refresh, removeNamedFilterByName = _a.removeNamedFilterByName; + var _b = props.data, entity = _b.entity, users = _b.users, searchValue = _b.searchValue; + return ((0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: mobile_module_less_1.default.container }, { children: [(0, jsx_runtime_1.jsxs)("span", tslib_1.__assign({ className: mobile_module_less_1.default.header }, { children: [(0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ style: { flex: 1 } }, { children: (0, jsx_runtime_1.jsx)(antd_mobile_1.Input, { placeholder: t('search'), value: searchValue, onChange: function (value) { + addNamedFilter({ + '#name': 'name', + filter: { + $text: { + $search: value, + } + } + }, false); + }, onEnterPress: function () { return refresh(); }, clearable: true, onClear: function () { return removeNamedFilterByName('name'); } }) })), (0, jsx_runtime_1.jsx)(antd_mobile_1.Button, tslib_1.__assign({ size: 'small', color: 'primary', onClick: function () { return goUpsert(); } }, { children: t('common::action.create') }))] })), (0, jsx_runtime_1.jsx)(antd_mobile_1.List, { children: users === null || users === void 0 ? void 0 : users.map(function (ele, index) { + var _a; + return ((0, jsx_runtime_1.jsx)(antd_mobile_1.List.Item, tslib_1.__assign({ prefix: ele.avatar ? (0, jsx_runtime_1.jsx)(antd_mobile_1.Avatar, { className: mobile_module_less_1.default.avatar, src: ele.avatar }) : (0, jsx_runtime_1.jsx)(antd_mobile_icons_1.UserCircleOutline, { className: mobile_module_less_1.default.avatar }), extra: ele.mobile || '--', description: (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ style: { + display: 'flex', + flexWrap: 'wrap', + } }, { children: (_a = ele.userRelation$user) === null || _a === void 0 ? void 0 : _a.map(function (ele2, index2) { + var _a, _b; + return ((0, jsx_runtime_1.jsx)(antd_mobile_1.Tag, tslib_1.__assign({ fill: "outline" }, { children: ((_a = ele2.relation) === null || _a === void 0 ? void 0 : _a.name) ? t(entity + ':r.' + ele2.relation.name) : (_b = ele2.relation) === null || _b === void 0 ? void 0 : _b.display }), index)); + }) })), onClick: function () { return goUpdate(ele.id); } }, { children: ele.name || ele.nickname || '--' }))); + }) })] }))); +} +exports.default = Render; diff --git a/lib/components/userRelation/list/web.module.less b/lib/components/userRelation/list/web.module.less new file mode 100644 index 000000000..1903c799a --- /dev/null +++ b/lib/components/userRelation/list/web.module.less @@ -0,0 +1,8 @@ + + +.container { + background: var(--oak-bg-color-container); + box-shadow: 0 2px 3px #0000001a; + border-radius: 3px; + padding: 30px 32px; +} diff --git a/lib/components/userRelation/list/web.pc.d.ts b/lib/components/userRelation/list/web.pc.d.ts new file mode 100644 index 000000000..e7fee118d --- /dev/null +++ b/lib/components/userRelation/list/web.pc.d.ts @@ -0,0 +1,14 @@ +import { WebComponentProps } from 'oak-frontend-base'; +import { EntityDict } from '../../../oak-app-domain'; +export default function Render(props: WebComponentProps void; + goUpdate: (id: string) => void; + confirmDelete: (id: string) => Promise; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/components/userRelation/list/web.pc.js b/lib/components/userRelation/list/web.pc.js new file mode 100644 index 000000000..77e132b47 --- /dev/null +++ b/lib/components/userRelation/list/web.pc.js @@ -0,0 +1,86 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var tslib_1 = require("tslib"); +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = require("react"); +var antd_1 = require("antd"); +// import UserEntityGrantList from '../../../pages/userEntityGrant/list'; +var web_module_less_1 = tslib_1.__importDefault(require("./web.module.less")); +function Render(props) { + var _this = this; + var _a = props.data, oakPagination = _a.oakPagination, _b = _a.users, users = _b === void 0 ? [] : _b, entity = _a.entity, entityId = _a.entityId, oakLoading = _a.oakLoading; + var _c = oakPagination || {}, pageSize = _c.pageSize, total = _c.total, currentPage = _c.currentPage; + var _d = props.methods, goUpsert = _d.goUpsert, t = _d.t, setCurrentPage = _d.setCurrentPage, setPageSize = _d.setPageSize, confirmDelete = _d.confirmDelete, goUpdate = _d.goUpdate; + var _e = tslib_1.__read((0, react_1.useState)(undefined), 2), idRemove = _e[0], setIdRemove = _e[1]; + var _f = tslib_1.__read((0, react_1.useState)(false), 2), inviteVisible = _f[0], setInviteVisible = _f[1]; + return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: web_module_less_1.default.container }, { children: [(0, jsx_runtime_1.jsx)(antd_1.Space, tslib_1.__assign({ style: { marginBottom: 16 } }, { children: (0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ type: "primary", onClick: function () { return goUpsert(); } }, { children: "\u6DFB\u52A0" })) })), (0, jsx_runtime_1.jsx)(antd_1.Table, { loading: oakLoading, rowKey: "id", columns: [ + { + width: 100, + dataIndex: 'index', + title: '序号', + render: function (value, record, index) { return index + 1; }, + }, + { + dataIndex: 'avatar', + title: '头像', + render: function (value, record, index) { + return value ? ((0, jsx_runtime_1.jsx)(antd_1.Avatar, { src: value, shape: "circle" })) : ((0, jsx_runtime_1.jsx)("span", { children: "\u672A\u8BBE\u7F6E" })); + }, + }, + { + dataIndex: 'name', + title: '姓名', + }, + { + dataIndex: 'nickname', + title: '昵称', + }, + { + dataIndex: 'mobile', + title: '手机号', + }, + { + dataIndex: 'relations', + title: '权限', + render: function (value, record, index) { + var _a; + return ((0, jsx_runtime_1.jsx)(antd_1.Space, { children: (_a = record.userRelation$user) === null || _a === void 0 ? void 0 : _a.map(function (ele, index) { return ((0, jsx_runtime_1.jsx)(antd_1.Tag, { children: ele.relation.name ? t(entity + ':r.' + ele.relation.name) : ele.relation.display }, index)); }) })); + }, + }, + { + title: '操作', + dataIndex: 'operate', + render: function (value, record, index) { + var _a, _b; + return ((0, jsx_runtime_1.jsxs)(antd_1.Space, { children: [(0, jsx_runtime_1.jsx)("a", tslib_1.__assign({ onClick: function (e) { return goUpdate(record.id); } }, { children: !!((_a = record.userRelation$user) === null || _a === void 0 ? void 0 : _a.length) + ? t('common::action.update') + : t('common::action.grant') })), !!((_b = record.userRelation$user) === null || _b === void 0 ? void 0 : _b.length) && ((0, jsx_runtime_1.jsx)("a", tslib_1.__assign({ style: { + color: 'var(--oak-color-error)', + }, onClick: function () { + return setIdRemove(record.id); + } }, { children: t('common::action.revoke') })))] })); + }, + }, + ], dataSource: users, pagination: { + total: total, + pageSize: pageSize, + current: currentPage, + onShowSizeChange: function (current, size) { + setPageSize(current); + }, + onChange: function (page, pageSize) { + setCurrentPage(page); + }, + } })] })), (0, jsx_runtime_1.jsx)(antd_1.Modal, tslib_1.__assign({ title: t('common::areYouSure'), open: !!idRemove, onOk: function () { return tslib_1.__awaiter(_this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, confirmDelete(idRemove)]; + case 1: + _a.sent(); + setIdRemove(undefined); + return [2 /*return*/]; + } + }); + }); }, onCancel: function () { return setIdRemove(undefined); }, cancelText: t('common::action.cancel'), okText: t('common::action.confirm') }, { children: (0, jsx_runtime_1.jsx)("p", { children: t('confirmRevokeAll') }) }))] })); +} +exports.default = Render; diff --git a/lib/components/userRelation/onEntity/index.d.ts b/lib/components/userRelation/onEntity/index.d.ts new file mode 100644 index 000000000..0438e1522 --- /dev/null +++ b/lib/components/userRelation/onEntity/index.d.ts @@ -0,0 +1,8 @@ +/// +declare const _default: (props: import("oak-frontend-base").ReactComponentProps) => import("react").ReactElement>; +export default _default; diff --git a/lib/components/userRelation/onEntity/index.js b/lib/components/userRelation/onEntity/index.js new file mode 100644 index 000000000..9e63f7061 --- /dev/null +++ b/lib/components/userRelation/onEntity/index.js @@ -0,0 +1,66 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var tslib_1 = require("tslib"); +var string_1 = require("oak-domain/lib/utils/string"); +exports.default = OakComponent({ + isList: true, + formData: function (_a) { + var _this = this; + var data = _a.data; + var _b = this.props, nameProperty = _b.nameProperty, oakEntity = _b.oakEntity; + var entityStr = (0, string_1.firstLetterUpperCase)(oakEntity); + var rows = data === null || data === void 0 ? void 0 : data.map(function (ele) { + var _a = ele, id = _a.id, _b = nameProperty, name = _a[_b], _c = "user".concat(entityStr, "$").concat(oakEntity), userEntity = _a[_c]; + var relations = userEntity === null || userEntity === void 0 ? void 0 : userEntity.map(function (ele) { return ele.relation; }); + var hasRelation = _this.props.relations.map(function (ele2) { + return relations.includes(ele2); + }); + return { + id: id, + name: name, + hasRelation: hasRelation, + }; + }); + return { + rows: rows, + }; + }, + properties: { + nameProperty: '', + user: {}, + relations: [], + oakEntity: '', + }, + methods: { + onChange: function (input) { + var _a = this.resolveInput(input, ['checked']), dataset = _a.dataset, checked = _a.checked; + var _b = dataset, entityId = _b.id, relation = _b.relation, index = _b.index; + var _c = this.props, oakEntity = _c.oakEntity, user = _c.user; + var entityStr = (0, string_1.firstLetterUpperCase)(oakEntity); + // todo 需要修改为最新写法 + // this.toggleNode( + // { + // relation, + // userId: user.id, + // }, + // checked, + // `${index}.user${entityStr}$${oakEntity}` + // ); + }, + confirm: function () { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.execute()]; + case 1: + _a.sent(); + return [4 /*yield*/, this.navigateBack()]; + case 2: + _a.sent(); + return [2 /*return*/]; + } + }); + }); + }, + }, +}); diff --git a/lib/components/userRelation/onEntity/index.json b/lib/components/userRelation/onEntity/index.json new file mode 100644 index 000000000..62951296f --- /dev/null +++ b/lib/components/userRelation/onEntity/index.json @@ -0,0 +1,8 @@ +{ + "navigationBarTitleText": "修改权限", + "usingComponents": { + "t-divider": "@oak-frontend-base/miniprogram_npm/tdesign/divider/divider", + "t-button": "@oak-frontend-base/miniprogram_npm/tdesign/button/button", + "t-switch": "@oak-frontend-base/miniprogram_npm/tdesign/switch/switch" + } +} diff --git a/lib/components/userRelation/onEntity/index.less b/lib/components/userRelation/onEntity/index.less new file mode 100644 index 000000000..54fb4a961 --- /dev/null +++ b/lib/components/userRelation/onEntity/index.less @@ -0,0 +1,159 @@ +/** index.wxss **/ +@import "../../../config/styles/mp/index.less"; +@import "../../../config/styles/mp/mixins.less"; + +page { + height: 100%; +} + +.container { + height: 100%; + display: flex; + flex: 1; + flex-direction: column; + box-sizing: border-box; + align-items: stretch; + padding: 0; + .safe-area-inset-bottom(); +} + +.primary-bg { + width: 100%; + height: 140rpx; + background-color: @primary-color; +} + +.img { + width: 180rpx; + height: 180rpx; + margin: 0 auto; + border-radius: 50%; + background-color: @bg-color-fade; +} + +.row-end { + display: flex; + justify-content: flex-end; +} + +.white-bg { + display: flex; + flex-direction: column; + padding: @spacer; +} + +.content { + display: flex; + flex-direction: column; + transform: translateY(-110rpx); +} + +.name { + margin: @spacer auto; + font-size: @font-size-base; + color: @text-level-2-color; +} + +.mobile { + margin: 0 auto; + font-size: @font-size-base; + color: @text-level-3-color; +} + +.tag-view { + display: flex; + justify-content: center; + flex-wrap: wrap; + margin-bottom: @spacer; +} + +.tag { + margin: 2rpx; +} + +.btn-view { + display: flex; + justify-content: center; +} + +.check-view { + width: 700rpx; + display: flex; + flex: 1; + flex-direction: column; + background-color: #fff; +} + +.col { + display: flex; + flex-direction: column; + flex: 1; +} + +.list { + flex: 1; + display: flex; + flex-direction: column; + align-items: center; +} + +.singleRelationItem { + display: flex; + padding: 18rpx; + flex-direction: row; + align-items: center; + width: 92%; + box-shadow: 0 4rpx 20rpx 0 rgba(212, 217, 223, 0.5); + border-radius: 4px; + + .name { + color: @text-level-3-color; + flex: 1; + margin-right: 10rpx; + } +} + +.multiRelationItem { + display: flex; + padding: 18rpx; + flex-direction: column; + align-items: stretch; + width: 92%; + box-shadow: 0 4rpx 20rpx 0 rgba(212, 217, 223, 0.5); + border-radius: 4px; + + .name { + color: @text-level-3-color; + } + + .relationList { + display: flex; + flex-direction: row; + + .relationItem { + display: flex; + flex-direction: column; + align-items: center; + padding: 10rpx; + + text { + color: @text-level-4-color; + font-size: @font-size-base; + } + } + } +} + +.btn-container { + position: fixed; + bottom: 0; + display: flex; + flex-direction: row; + width: 100%; + .btn { + flex: 1; + } + padding-left: 10rpx; + padding-right: 10rpx; + } + \ No newline at end of file diff --git a/lib/components/userRelation/onEntity/index.xml b/lib/components/userRelation/onEntity/index.xml new file mode 100644 index 000000000..838ec2202 --- /dev/null +++ b/lib/components/userRelation/onEntity/index.xml @@ -0,0 +1,32 @@ + + + + + + + {{user.name || user.nickname || '--'}} + {{user.mobile || '--'}} + + + + + {{item.name}} + + + + + + {{item.name}} + + + + {{relation}} + + + + + + + + + \ No newline at end of file diff --git a/lib/components/userRelation/onEntity/web.d.ts b/lib/components/userRelation/onEntity/web.d.ts new file mode 100644 index 000000000..f4a1e98f8 --- /dev/null +++ b/lib/components/userRelation/onEntity/web.d.ts @@ -0,0 +1 @@ +export default function render(this: any): import("react/jsx-runtime").JSX.Element; diff --git a/lib/components/userRelation/onEntity/web.js b/lib/components/userRelation/onEntity/web.js new file mode 100644 index 000000000..173434581 --- /dev/null +++ b/lib/components/userRelation/onEntity/web.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var jsx_runtime_1 = require("react/jsx-runtime"); +function render() { + var rows = this.state.rows; + return ((0, jsx_runtime_1.jsx)("div", {})); +} +exports.default = render; diff --git a/lib/components/userRelation/onEntity/web.module.less b/lib/components/userRelation/onEntity/web.module.less new file mode 100644 index 000000000..07e0c4c2c --- /dev/null +++ b/lib/components/userRelation/onEntity/web.module.less @@ -0,0 +1,7 @@ + + +.container { + height: 100vh; + display: flex; + flex-direction: column; +} diff --git a/lib/components/userRelation/upsert/byMobile/index.d.ts b/lib/components/userRelation/upsert/byMobile/index.d.ts new file mode 100644 index 000000000..db398efac --- /dev/null +++ b/lib/components/userRelation/upsert/byMobile/index.d.ts @@ -0,0 +1,8 @@ +/// +import { EntityDict } from '../../../../oak-app-domain'; +declare const _default: (props: import("oak-frontend-base").ReactComponentProps) => import("react").ReactElement>; +export default _default; diff --git a/lib/components/userRelation/upsert/byMobile/index.js b/lib/components/userRelation/upsert/byMobile/index.js new file mode 100644 index 000000000..98bd59729 --- /dev/null +++ b/lib/components/userRelation/upsert/byMobile/index.js @@ -0,0 +1,147 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var tslib_1 = require("tslib"); +var uuid_1 = require("oak-domain/lib/utils/uuid"); +var validator_1 = require("oak-domain/lib/utils/validator"); +exports.default = OakComponent({ + entity: 'mobile', + projection: { + id: 1, + mobile: 1, + ableState: 1, + userId: 1, + }, + isList: false, + formData: function (_a) { + var mobile = _a.data; + var oakFullpath = this.state.oakFullpath; + var userRelations = oakFullpath && this.features.runningTree.getOperations("".concat(oakFullpath, ".user.userRelation$user")); + return { + userId: mobile === null || mobile === void 0 ? void 0 : mobile.userId, + legal: userRelations && userRelations.length > 0, + }; + }, + properties: { + entity: '', + entityId: '', + relations: [], + }, + data: { + mobileValue: '', + mobileValueReady: false, + isNew: false, + }, + methods: { + onMobileChange: function (value) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + var mobileValueReady, data; + return tslib_1.__generator(this, function (_a) { + switch (_a.label) { + case 0: + mobileValueReady = (0, validator_1.isMobile)(value); + if (!mobileValueReady) return [3 /*break*/, 2]; + return [4 /*yield*/, this.features.cache.refresh('mobile', { + data: { + id: 1, + mobile: 1, + ableState: 1, + userId: 1, + }, + filter: { + mobile: value, + ableState: 'enabled', + } + })]; + case 1: + data = (_a.sent()).data; + if (data.length > 0) { + this.clean(); + this.setId(data[0].id); + this.setState({ + isNew: false, + }); + } + else { + this.clean(); + this.setState({ + isNew: true, + }); + this.create({ + mobile: value, + user: { + id: (0, uuid_1.generateNewId)(), + action: 'create', + data: { + id: (0, uuid_1.generateNewId)(), + } + } + }); + } + return [3 /*break*/, 3]; + case 2: + this.clean(); + this.unsetId(); + _a.label = 3; + case 3: + this.setState({ + mobileValueReady: mobileValueReady, + mobileValue: value, + }); + return [2 /*return*/]; + } + }); + }); + }, + onConfirm: function () { + return tslib_1.__awaiter(this, void 0, void 0, function () { + var userValue; + return tslib_1.__generator(this, function (_a) { + switch (_a.label) { + case 0: + if (this.state.isNew) { + userValue = this.getFreshValue('user'); + if (!userValue.name) { + this.setMessage({ + type: 'error', + content: '用户姓名未填写', + }); + return [2 /*return*/]; + } + if (!userValue.password) { + this.setMessage({ + type: 'error', + content: '用户密码未设置', + }); + return [2 /*return*/]; + } + } + return [4 /*yield*/, this.execute()]; + case 1: + _a.sent(); + this.setState({ + mobileValue: '', + mobileValueReady: false, + }); + this.unsetId(); + return [2 /*return*/]; + } + }); + }); + }, + onReset: function () { + this.clean(); + this.setState({ + mobileValue: '', + mobileValueReady: false, + }); + this.unsetId(); + }, + searchChangeMp: function (e) { + var value = e.detail.value; + this.onMobileChange(value); + }, + searchCancelMp: function () { + this.onReset(); + } + }, +}); diff --git a/lib/components/userRelation/upsert/byMobile/index.json b/lib/components/userRelation/upsert/byMobile/index.json new file mode 100644 index 000000000..f558621af --- /dev/null +++ b/lib/components/userRelation/upsert/byMobile/index.json @@ -0,0 +1,14 @@ +{ + "navigationBarTitleText": "添加权限", + "usingComponents": { + "l-status-show": "@oak-frontend-base/miniprogram_npm/lin-ui/status-show/index", + "l-notice-bar": "@oak-frontend-base/miniprogram_npm/lin-ui/notice-bar/index", + "l-input": "@oak-frontend-base/miniprogram_npm/lin-ui/input/index", + "l-icon": "@oak-frontend-base/miniprogram_npm/lin-ui/icon/index", + "l-card": "@oak-frontend-base/miniprogram_npm/lin-ui/card/index", + "l-button": "@oak-frontend-base/miniprogram_npm/lin-ui/button/index", + "l-tag": "@oak-frontend-base/miniprogram_npm/lin-ui/tag/index", + "l-list": "@oak-frontend-base/miniprogram_npm/lin-ui/list/index", + "relation-on-user": "../onUser/index" + } +} diff --git a/lib/components/userRelation/upsert/byMobile/index.less b/lib/components/userRelation/upsert/byMobile/index.less new file mode 100644 index 000000000..9a5e10cd0 --- /dev/null +++ b/lib/components/userRelation/upsert/byMobile/index.less @@ -0,0 +1,30 @@ +@import "../../../../config/styles/mp/index.less"; +@import "../../../../config/styles/mp/mixins.less"; + +page { + height: 100%; + background-color: @oak-bg-color-page; +} + +.page-body { + height: 100%; + display: flex; + flex: 1; + flex-direction: column; + box-sizing: border-box; + align-items: stretch; + padding: 0; + background-color: @oak-bg-color-container; + + .r-o-u { + flex: 1; + display: flex; + flex-direction: column; + } +} + +.search-bar { + padding: 10rpx; + z-index: 1; + margin-bottom: 20rpx; +} \ No newline at end of file diff --git a/lib/components/userRelation/upsert/byMobile/index.xml b/lib/components/userRelation/upsert/byMobile/index.xml new file mode 100644 index 000000000..a90503176 --- /dev/null +++ b/lib/components/userRelation/upsert/byMobile/index.xml @@ -0,0 +1,43 @@ + + + 必须在系统中登记了手机号的用户才可通过这里搜索 + + + + + + + + + + + + + + + + {{t('common::action.confirm')}} + + \ No newline at end of file diff --git a/lib/components/userRelation/upsert/byMobile/locales/zh_CN.json b/lib/components/userRelation/upsert/byMobile/locales/zh_CN.json new file mode 100644 index 000000000..524e6e2d9 --- /dev/null +++ b/lib/components/userRelation/upsert/byMobile/locales/zh_CN.json @@ -0,0 +1,3 @@ +{ + "inputMobile": "请输入手机号查找" +} diff --git a/lib/components/userRelation/upsert/byMobile/mobile.module.less b/lib/components/userRelation/upsert/byMobile/mobile.module.less new file mode 100644 index 000000000..46f2181f4 --- /dev/null +++ b/lib/components/userRelation/upsert/byMobile/mobile.module.less @@ -0,0 +1,12 @@ +.container { + background: var(--oak-bg-color-container); + box-shadow: 0 2px 3px #0000001a; + border-radius: 3px; + padding: 30px 32px; +} + +.btn-container { + width: 100%; + display: flex; + flex-direction: row; +} \ No newline at end of file diff --git a/lib/components/userRelation/upsert/byMobile/web.d.ts b/lib/components/userRelation/upsert/byMobile/web.d.ts new file mode 100644 index 000000000..b2788ddcb --- /dev/null +++ b/lib/components/userRelation/upsert/byMobile/web.d.ts @@ -0,0 +1,14 @@ +import { WebComponentProps } from 'oak-frontend-base'; +import { EntityDict } from '../../../../oak-app-domain'; +export default function Render(props: WebComponentProps Promise; + onConfirm: () => Promise; + onReset: () => void; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/components/userRelation/upsert/byMobile/web.js b/lib/components/userRelation/upsert/byMobile/web.js new file mode 100644 index 000000000..5b93a4c4c --- /dev/null +++ b/lib/components/userRelation/upsert/byMobile/web.js @@ -0,0 +1,31 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var tslib_1 = require("tslib"); +var jsx_runtime_1 = require("react/jsx-runtime"); +var antd_mobile_1 = require("antd-mobile"); +var mobile_module_less_1 = tslib_1.__importDefault(require("./mobile.module.less")); +var index_1 = tslib_1.__importDefault(require("../onUser/index")); +function Render(props) { + var _a = props.data, mobileValue = _a.mobileValue, mobileValueReady = _a.mobileValueReady, relations = _a.relations, entity = _a.entity, entityId = _a.entityId, userId = _a.userId, oakFullpath = _a.oakFullpath, oakExecutable = _a.oakExecutable, oakDirty = _a.oakDirty; + var _b = props.methods, onConfirm = _b.onConfirm, onMobileChange = _b.onMobileChange, onReset = _b.onReset, t = _b.t; + return ((0, jsx_runtime_1.jsxs)(antd_mobile_1.Form, tslib_1.__assign({ footer: (0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: mobile_module_less_1.default['btn-container'] }, { children: [(0, jsx_runtime_1.jsx)(antd_mobile_1.Button, tslib_1.__assign({ color: "primary", style: { flex: 2 }, onClick: function () { + onConfirm(); + }, disabled: !oakExecutable }, { children: t('common::action.confirm') })), (0, jsx_runtime_1.jsx)(antd_mobile_1.Button, tslib_1.__assign({ style: { flex: 1 }, onClick: function () { return onReset(); } }, { children: t('common::reset') }))] })) }, { children: [(0, jsx_runtime_1.jsx)(antd_mobile_1.Form.Item, tslib_1.__assign({ label: "\u624B\u673A\u53F7\u7801", name: "mobile", rules: [ + { + required: true, + message: '手机号不能为空', + }, + { + min: 11, + message: '请输入11位手机号', + }, + { + max: 11, + message: '请输入11位手机号', + }, + ] }, { children: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(antd_mobile_1.Input, { maxLength: 11, value: mobileValue, onChange: function (value) { + onMobileChange(value); + }, placeholder: t('inputMobile'), type: "tel", clearable: true }) }) })), mobileValueReady && userId && ((0, jsx_runtime_1.jsx)(index_1.default, { oakAutoUnmount: true, oakPath: oakFullpath ? "".concat(oakFullpath, ".user") + : undefined, entity: entity, entityId: entityId, relations: relations, oakId: userId }))] }))); +} +exports.default = Render; diff --git a/lib/components/userRelation/upsert/byMobile/web.module.less b/lib/components/userRelation/upsert/byMobile/web.module.less new file mode 100644 index 000000000..5d5ff6cf9 --- /dev/null +++ b/lib/components/userRelation/upsert/byMobile/web.module.less @@ -0,0 +1,17 @@ + + +.container { + background: var(--oak-bg-color-container); + box-shadow: 0 2px 3px #0000001a; + border-radius: 3px; + padding: 30px 32px; +} +.formContainer { + padding-top: 32px; + width: 676px; + margin: 0 auto; +} +.tip { + font-size: 12px; + color: var(--oak-warning-color); +} \ No newline at end of file diff --git a/lib/components/userRelation/upsert/byMobile/web.pc.d.ts b/lib/components/userRelation/upsert/byMobile/web.pc.d.ts new file mode 100644 index 000000000..eb88c0233 --- /dev/null +++ b/lib/components/userRelation/upsert/byMobile/web.pc.d.ts @@ -0,0 +1,16 @@ +import { WebComponentProps } from 'oak-frontend-base'; +import { EntityDict } from '../../../../oak-app-domain'; +export default function Render(props: WebComponentProps Promise; + onConfirm: () => Promise; + onReset: () => void; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/components/userRelation/upsert/byMobile/web.pc.js b/lib/components/userRelation/upsert/byMobile/web.pc.js new file mode 100644 index 000000000..2af00ef77 --- /dev/null +++ b/lib/components/userRelation/upsert/byMobile/web.pc.js @@ -0,0 +1,42 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var tslib_1 = require("tslib"); +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = require("react"); +var antd_1 = require("antd"); +var web_module_less_1 = tslib_1.__importDefault(require("./web.module.less")); +var index_1 = tslib_1.__importDefault(require("../onUser/index")); +function Render(props) { + var _this = this; + var _a = props.data, mobileValue = _a.mobileValue, mobileValueReady = _a.mobileValueReady, relations = _a.relations, entity = _a.entity, entityId = _a.entityId, userId = _a.userId, oakFullpath = _a.oakFullpath, oakExecutable = _a.oakExecutable, legal = _a.legal, isNew = _a.isNew; + var _b = props.methods, onConfirm = _b.onConfirm, onMobileChange = _b.onMobileChange, onReset = _b.onReset, t = _b.t; + var _c = tslib_1.__read((0, react_1.useState)(false), 2), passwordConfirm = _c[0], setPasswordConfirm = _c[1]; + return ((0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: web_module_less_1.default.container }, { children: [(0, jsx_runtime_1.jsx)(antd_1.Form, tslib_1.__assign({ colon: true, labelCol: { span: 4 }, wrapperCol: { span: 8 } }, { children: (0, jsx_runtime_1.jsx)(antd_1.Form.Item, tslib_1.__assign({ label: "\u624B\u673A\u53F7\u7801", required: true, name: "mobile", rules: [ + { + message: '手机号不能为空', + }, + { + min: 11, + message: '请输入11位手机号', + }, + { + max: 11, + message: '请输入11位手机号', + }, + ] }, { children: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(antd_1.Input, { maxLength: 11, value: mobileValue, onChange: function (e) { + var strValue = e.target.value; + onMobileChange(strValue); + }, placeholder: "\u8BF7\u8F93\u5165\u624B\u673A\u53F7\u7801", type: "tel" }) }) })) })), mobileValueReady && userId && ((0, jsx_runtime_1.jsx)(index_1.default, { oakAutoUnmount: true, oakPath: oakFullpath ? "".concat(oakFullpath, ".user") + : undefined, entity: entity, entityId: entityId, relations: relations, oakId: userId, setPasswordConfirm: setPasswordConfirm })), (0, jsx_runtime_1.jsx)(antd_1.Form, tslib_1.__assign({ colon: true, labelCol: { span: 4 }, wrapperCol: { span: 8 } }, { children: (0, jsx_runtime_1.jsx)(antd_1.Form.Item, tslib_1.__assign({ wrapperCol: { offset: 4 } }, { children: (0, jsx_runtime_1.jsxs)(antd_1.Space, { children: [(0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ style: { flex: 2 }, type: "primary", onClick: function () { return tslib_1.__awaiter(_this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, onConfirm()]; + case 1: + _a.sent(); + setPasswordConfirm(false); + return [2 /*return*/]; + } + }); + }); }, disabled: !legal || !oakExecutable || (isNew && !passwordConfirm) }, { children: t('common::action.confirm') })), (0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ htmlType: "reset", onClick: function () { return onReset(); }, style: { flex: 1 } }, { children: t('common::reset') }))] }) })) }))] }))); +} +exports.default = Render; diff --git a/lib/components/userRelation/upsert/byUser/index.d.ts b/lib/components/userRelation/upsert/byUser/index.d.ts new file mode 100644 index 000000000..37e6d26ab --- /dev/null +++ b/lib/components/userRelation/upsert/byUser/index.d.ts @@ -0,0 +1,8 @@ +import { EntityDict } from '../../../../oak-app-domain'; +import { ReactComponentProps } from 'oak-frontend-base/lib/types/Page'; +import { EntityDict as BaseEntityDict } from 'oak-domain/lib/types/Entity'; +declare const _default: (props: ReactComponentProps) => React.ReactElement; +export default _default; diff --git a/lib/components/userRelation/upsert/byUser/index.js b/lib/components/userRelation/upsert/byUser/index.js new file mode 100644 index 000000000..17d474a06 --- /dev/null +++ b/lib/components/userRelation/upsert/byUser/index.js @@ -0,0 +1,74 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var tslib_1 = require("tslib"); +exports.default = OakComponent({ + isList: false, + properties: { + entity: '', + entityId: '', + }, + data: { + relations: [], + }, + lifetimes: { + ready: function () { + return tslib_1.__awaiter(this, void 0, void 0, function () { + var _a, entity, entityId, isRoot, filter, userId, relations; + return tslib_1.__generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = this.props, entity = _a.entity, entityId = _a.entityId; + isRoot = this.features.token.isRoot(); + filter = { + entity: entity, + $or: [ + { + entityId: entityId, + }, + { + entityId: { + $exists: false, + }, + } + ], + }; + if (!isRoot) { + userId = this.features.token.getUserId(); + filter.relationAuth$destRelation = { + sourceRelation: { + userRelation$relation: { + userId: userId, + }, + }, + }; + } + return [4 /*yield*/, this.features.cache.refresh('relation', { + data: { + id: 1, + entity: 1, + entityId: 1, + name: 1, + display: 1, + }, + filter: filter, + })]; + case 1: + relations = (_b.sent()).data; + this.setState({ + relations: relations, + }); + return [2 /*return*/]; + } + }); + }); + } + }, + methods: { + onConfirm: function () { + this.execute(); + }, + onReset: function () { + this.clean(); + } + } +}); diff --git a/lib/components/userRelation/upsert/byUser/index.json b/lib/components/userRelation/upsert/byUser/index.json new file mode 100644 index 000000000..bc27b13fc --- /dev/null +++ b/lib/components/userRelation/upsert/byUser/index.json @@ -0,0 +1,7 @@ +{ + "navigationBarTitleText": "添加权限", + "usingComponents": { + "onUser": "./../onUser/index", + "l-button": "@oak-frontend-base/miniprogram_npm/lin-ui/button/index" + } +} diff --git a/lib/components/userRelation/upsert/byUser/index.less b/lib/components/userRelation/upsert/byUser/index.less new file mode 100644 index 000000000..99df4232d --- /dev/null +++ b/lib/components/userRelation/upsert/byUser/index.less @@ -0,0 +1,16 @@ +/** index.wxss **/ +@import "../../../../config/styles/mp/index.less"; +@import "../../../../config/styles/mp/mixins.less"; + + +page { + height: 100%; + display: flex; + flex-direction: column; +} + +.container { + display: flex; + flex-direction: column; + flex: 1; +} diff --git a/lib/components/userRelation/upsert/byUser/index.xml b/lib/components/userRelation/upsert/byUser/index.xml new file mode 100644 index 000000000..93f82e307 --- /dev/null +++ b/lib/components/userRelation/upsert/byUser/index.xml @@ -0,0 +1,9 @@ + + + + + + + {{t('common::action.confirm')}} + + \ No newline at end of file diff --git a/lib/components/userRelation/upsert/byUser/mobile.module.less b/lib/components/userRelation/upsert/byUser/mobile.module.less new file mode 100644 index 000000000..75245c866 --- /dev/null +++ b/lib/components/userRelation/upsert/byUser/mobile.module.less @@ -0,0 +1,12 @@ +.container { + background: var(--oak-bg-color-container); + box-shadow: 0 2px 3px #0000001a; + border-radius: 3px; + padding: 30px 32px; +} + +.btn-container { + width: 100%; + display: flex; + flex-direction: row; +} diff --git a/lib/components/userRelation/upsert/byUser/web.d.ts b/lib/components/userRelation/upsert/byUser/web.d.ts new file mode 100644 index 000000000..b60014ab5 --- /dev/null +++ b/lib/components/userRelation/upsert/byUser/web.d.ts @@ -0,0 +1,11 @@ +import { WebComponentProps } from 'oak-frontend-base'; +import { EntityDict } from '../../../../oak-app-domain'; +export default function Render(props: WebComponentProps Promise; + onReset: () => void; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/components/userRelation/upsert/byUser/web.js b/lib/components/userRelation/upsert/byUser/web.js new file mode 100644 index 000000000..7f902665f --- /dev/null +++ b/lib/components/userRelation/upsert/byUser/web.js @@ -0,0 +1,15 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var tslib_1 = require("tslib"); +var jsx_runtime_1 = require("react/jsx-runtime"); +var antd_mobile_1 = require("antd-mobile"); +var mobile_module_less_1 = tslib_1.__importDefault(require("./mobile.module.less")); +var index_1 = tslib_1.__importDefault(require("../onUser/index")); +function Render(props) { + var _a = props.data, relations = _a.relations, entity = _a.entity, entityId = _a.entityId, oakId = _a.oakId, oakDirty = _a.oakDirty, oakFullpath = _a.oakFullpath, oakExecutable = _a.oakExecutable; + var _b = props.methods, onConfirm = _b.onConfirm, onReset = _b.onReset, t = _b.t; + return ((0, jsx_runtime_1.jsx)(antd_mobile_1.Form, tslib_1.__assign({ footer: (0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: mobile_module_less_1.default['btn-container'] }, { children: [(0, jsx_runtime_1.jsx)(antd_mobile_1.Button, tslib_1.__assign({ color: "primary", style: { flex: 2 }, onClick: function () { + onConfirm(); + }, disabled: oakExecutable !== true }, { children: t('common::action.confirm') })), (0, jsx_runtime_1.jsx)(antd_mobile_1.Button, tslib_1.__assign({ style: { flex: 1 }, onClick: function () { return onReset(); } }, { children: t('common::reset') }))] })) }, { children: (0, jsx_runtime_1.jsx)(index_1.default, { oakAutoUnmount: true, oakPath: oakFullpath && "".concat(oakFullpath, ".user"), entity: entity, entityId: entityId, relations: relations, oakId: oakId }) }))); +} +exports.default = Render; diff --git a/lib/components/userRelation/upsert/byUser/web.module.less b/lib/components/userRelation/upsert/byUser/web.module.less new file mode 100644 index 000000000..0dad10def --- /dev/null +++ b/lib/components/userRelation/upsert/byUser/web.module.less @@ -0,0 +1,8 @@ + + +.container { + background: var(--oak-bg-color-container); + box-shadow: 0 2px 3px #0000001a; + border-radius: 3px; + padding: 30px 32px; +} \ No newline at end of file diff --git a/lib/components/userRelation/upsert/byUser/web.pc.d.ts b/lib/components/userRelation/upsert/byUser/web.pc.d.ts new file mode 100644 index 000000000..b60014ab5 --- /dev/null +++ b/lib/components/userRelation/upsert/byUser/web.pc.d.ts @@ -0,0 +1,11 @@ +import { WebComponentProps } from 'oak-frontend-base'; +import { EntityDict } from '../../../../oak-app-domain'; +export default function Render(props: WebComponentProps Promise; + onReset: () => void; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/components/userRelation/upsert/byUser/web.pc.js b/lib/components/userRelation/upsert/byUser/web.pc.js new file mode 100644 index 000000000..02cb1df66 --- /dev/null +++ b/lib/components/userRelation/upsert/byUser/web.pc.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var tslib_1 = require("tslib"); +var jsx_runtime_1 = require("react/jsx-runtime"); +var antd_1 = require("antd"); +var web_module_less_1 = tslib_1.__importDefault(require("./web.module.less")); +var index_1 = tslib_1.__importDefault(require("../onUser/index")); +function Render(props) { + var _a = props.data, relations = _a.relations, entity = _a.entity, entityId = _a.entityId, oakId = _a.oakId, oakDirty = _a.oakDirty, oakFullpath = _a.oakFullpath; + var _b = props.methods, onConfirm = _b.onConfirm, onReset = _b.onReset, t = _b.t; + return ((0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: web_module_less_1.default.container }, { children: [(0, jsx_runtime_1.jsx)(index_1.default, { oakAutoUnmount: true, oakPath: oakFullpath && "".concat(oakFullpath, ".user"), entity: entity, entityId: entityId, relations: relations, oakId: oakId }), (0, jsx_runtime_1.jsx)(antd_1.Form, tslib_1.__assign({ colon: true, labelCol: { span: 4 }, wrapperCol: { span: 8 } }, { children: (0, jsx_runtime_1.jsx)(antd_1.Form.Item, tslib_1.__assign({ wrapperCol: { offset: 4 } }, { children: (0, jsx_runtime_1.jsxs)(antd_1.Space, { children: [(0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ disabled: !oakDirty, type: "primary", onClick: function () { return onConfirm(); } }, { children: t('common::action.confirm') })), (0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ htmlType: "reset", onClick: function () { return onReset(); } }, { children: t('common::reset') }))] }) })) }))] }))); +} +exports.default = Render; diff --git a/lib/components/userRelation/upsert/byUserEntityGrant/index.d.ts b/lib/components/userRelation/upsert/byUserEntityGrant/index.d.ts new file mode 100644 index 000000000..58a32bb7c --- /dev/null +++ b/lib/components/userRelation/upsert/byUserEntityGrant/index.d.ts @@ -0,0 +1,12 @@ +/// +import { EntityDict } from '../../../../oak-app-domain'; +import { QrCodeType } from '../../../../types/Config'; +declare const _default: (props: import("oak-frontend-base").ReactComponentProps) => import("react").ReactElement>; +export default _default; diff --git a/lib/components/userRelation/upsert/byUserEntityGrant/index.js b/lib/components/userRelation/upsert/byUserEntityGrant/index.js new file mode 100644 index 000000000..e5e21b013 --- /dev/null +++ b/lib/components/userRelation/upsert/byUserEntityGrant/index.js @@ -0,0 +1,202 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var tslib_1 = require("tslib"); +var assert_1 = tslib_1.__importDefault(require("assert")); +exports.default = OakComponent({ + entity: 'userEntityGrant', + projection: { + id: 1, + entity: 1, + entityId: 1, + relationId: 1, + type: 1, + number: 1, + remark: 1, + granterId: 1, + granteeId: 1, + qrCodeType: 1, + }, + isList: false, + formData: function (_a) { + var userEntityGrant = _a.data; + return ({ + userEntityGrant: userEntityGrant, + }); + }, + properties: { + entity: '', + entityId: '', + relations: [], + type: 'grant', + redirectToAfterConfirm: {}, + qrCodeType: '', + }, + data: { + period: 15, + userEntityGrantId: '', + unit: 'minute', + maxes: { + minute: 3 * 24 * 60, + hour: 3 * 24, + day: 3, + }, + defaultPeriods: { + minute: 15, + hour: 1, + day: 1, + }, + unitArr: [ + { + label: '分钟', + value: 'minute', + }, + { + label: '小时', + value: 'hour', + }, + ], + unitIndex: 0, + }, + lifetimes: { + ready: function () { + this.setInit(); + }, + }, + methods: { + onShareAppMessage: function (e) { + var _a; + var app = this.features.application.getApplication(); + var _b = app, config = _b.config, system = _b.system; + var systemConfig = system.config; + var userEntityGrantId = this.state.userEntityGrantId; + var imageUrl = (systemConfig && ((_a = systemConfig === null || systemConfig === void 0 ? void 0 : systemConfig.App) === null || _a === void 0 ? void 0 : _a.mpShareImageUrl)) || ''; + return { + title: '', + path: "/pages/userEntityGrant/confirm/index?oakId=".concat(userEntityGrantId), + imageUrl: imageUrl, + }; + }, + setInit: function () { + var userId = this.features.token.getUserId(); + var _a = this.props, entity = _a.entity, entityId = _a.entityId, type = _a.type, redirectToAfterConfirm = _a.redirectToAfterConfirm, qrCodeType = _a.qrCodeType; + this.update({ + confirmed: 0, + entity: entity, + entityId: entityId, + type: type || 'grant', + number: 1, + granterId: userId, + redirectTo: redirectToAfterConfirm, + qrCodeType: qrCodeType, + }); + this.setState({ + userEntityGrantId: '', + }); + if (process.env.OAK_PLATFORM === 'wechatMp') { + wx.hideShareMenu(); + } + }, + setRelation: function (value) { + this.update({ + relationId: value, + }); + }, + setRelationMp: function (e) { + var currentKey = e.detail.currentKey; + this.setRelation(currentKey); + }, + setNumber: function (value) { + this.update({ + number: value, + }); + }, + setNumberMp: function (e) { + var currentKey = e.detail.currentKey; + this.setNumber(parseInt(currentKey, 10)); + }, + setPeriod: function (p) { + this.setState({ period: p }); + }, + setPeriodMp: function (e) { + var count = e.detail.count; + this.setPeriod(count); + }, + setUnit: function (u) { + var defaultPeriods = this.state.defaultPeriods; + this.setState({ unit: u }); + this.setPeriod(defaultPeriods[u]); + }, + setUnitMp: function (e) { + var unitArr = this.state.unitArr; + var value = e.detail.value; + var unitObj = unitArr[value]; + this.setState({ + unitIndex: value, + }); + this.setUnit(unitObj.value); + }, + onBack: function () { + this.navigateBack(); + }, + confirm: function () { + return tslib_1.__awaiter(this, void 0, void 0, function () { + var _a, period, unit, userEntityGrant, time, expiresAt, id; + return tslib_1.__generator(this, function (_b) { + switch (_b.label) { + case 0: + _a = this.state, period = _a.period, unit = _a.unit, userEntityGrant = _a.userEntityGrant; + if (!(userEntityGrant === null || userEntityGrant === void 0 ? void 0 : userEntityGrant.relationId)) { + this.setMessage({ + type: 'error', + content: '请选择角色权限', + }); + return [2 /*return*/]; + } + time = 0; + switch (unit) { + case 'hour': { + time = period * 60 * 60 * 1000; + break; + } + case 'day': { + time = period * 24 * 60 * 60 * 1000; + break; + } + default: { + if (unit === 'minute') { + time = period * 60 * 1000; + } + else { + this.setMessage({ + type: 'error', + content: '请选择过期时长单位', + }); + return [2 /*return*/]; + } + break; + } + } + expiresAt = Date.now() + time; + this.update({ + expiresAt: expiresAt, + }); + (0, assert_1.default)(!this.props.oakId); + id = this.getId(); + return [4 /*yield*/, this.execute()]; + case 1: + _b.sent(); + // set了这个值就在页面显示二维码 + this.setState({ + userEntityGrantId: id, + }); + // 小程序显示可分享菜单 + if (process.env.OAK_PLATFORM === 'wechatMp') { + wx.showShareMenu({}); + } + return [2 /*return*/]; + } + }); + }); + }, + }, +}); diff --git a/lib/components/userRelation/upsert/byUserEntityGrant/index.json b/lib/components/userRelation/upsert/byUserEntityGrant/index.json new file mode 100644 index 000000000..a444281dd --- /dev/null +++ b/lib/components/userRelation/upsert/byUserEntityGrant/index.json @@ -0,0 +1,16 @@ +{ + "navigationBarTitleText": "授予权限", + "usingComponents": { + "l-notice-bar": "@oak-frontend-base/miniprogram_npm/lin-ui/notice-bar/index", + "l-input": "@oak-frontend-base/miniprogram_npm/lin-ui/input/index", + "l-icon": "@oak-frontend-base/miniprogram_npm/lin-ui/icon/index", + "l-card": "@oak-frontend-base/miniprogram_npm/lin-ui/card/index", + "l-button": "@oak-frontend-base/miniprogram_npm/lin-ui/button/index", + "l-tag": "@oak-frontend-base/miniprogram_npm/lin-ui/tag/index", + "l-list": "@oak-frontend-base/miniprogram_npm/lin-ui/list/index", + "l-radio": "@oak-frontend-base/miniprogram_npm/lin-ui/radio/index", + "l-radio-group": "@oak-frontend-base/miniprogram_npm/lin-ui/radio-group/index", + "l-counter": "@oak-frontend-base/miniprogram_npm/lin-ui/counter/index", + "userEntityGrant-detail": "../../../../pages/userEntityGrant/detail/index" + } +} diff --git a/lib/components/userRelation/upsert/byUserEntityGrant/index.less b/lib/components/userRelation/upsert/byUserEntityGrant/index.less new file mode 100644 index 000000000..f5ddf7546 --- /dev/null +++ b/lib/components/userRelation/upsert/byUserEntityGrant/index.less @@ -0,0 +1,98 @@ +/** index.wxss **/ +@import "../../../../config/styles/mp/index.less"; +@import "../../../../config/styles/mp/mixins.less"; + +.page-body { + height: 100vh; + display: flex; + flex: 1; + flex-direction: column; + background-color: @oak-bg-color-page; + box-sizing: border-box; + .safe-area-inset-bottom(); +} + +.ueg-container { + flex: 1; + display: flex; + flex-direction: column; + align-items: stretch; + // justify-content: space-around; + + .share { + align-self: center; + margin-top: 32rpx; + } +} + +.list-item { + display: flex; + background-color: @oak-bg-color-container; + position: relative; + font-size: 28rpx; + color: #333; + min-height: 88rpx; + display: flex; + flex-direction: row; + align-items: center; + padding-right: 25rpx; + box-sizing: border-box; + border-bottom: 1px solid #eeeeee; + + .label { + width: 100px; + display: flex; + flex-direction: row; + align-items: center; + height: 88rpx; + padding-left: 25rpx; + padding-right: 15rpx; + box-sizing: border-box; + color: @oak-text-color-primary; + } + + .value { + flex: 1; + + .radio-container { + flex-wrap: wrap; + + .radio { + margin-right: 12rpx; + } + } + } + + .value-period { + display: flex; + flex-direction: row; + align-items: center; + } + + .confirm-btn { + align-self: flex-end; + } +} + +.unit-box { + margin-left: 32rpx; + + height: 50rpx; + width: 120rpx; + border: 1px solid @oak-color-primary; + color: @oak-color-primary; + border-radius: 10rpx; + + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; + + .unit { + margin-right: 16rpx; + } + + .icon { + color: @oak-color-primary !important; + } +} \ No newline at end of file diff --git a/lib/components/userRelation/upsert/byUserEntityGrant/index.xml b/lib/components/userRelation/upsert/byUserEntityGrant/index.xml new file mode 100644 index 000000000..252f2f835 --- /dev/null +++ b/lib/components/userRelation/upsert/byUserEntityGrant/index.xml @@ -0,0 +1,112 @@ + + + + + 请通过分享或者截屏二维码方式分享权限 + + + + + + + + 权限: + + + + {{item.display || t(entity + ':r.' + item.name)}} + + + + + + 人次: + + + + 单人次 + + + 不限人次 + + + + + + 有效期: + + + + + + + {{unitArr[unitIndex].label}} + + + + + + + + + + + 确定 + + + \ No newline at end of file diff --git a/lib/components/userRelation/upsert/byUserEntityGrant/locales/zh_CN.json b/lib/components/userRelation/upsert/byUserEntityGrant/locales/zh_CN.json new file mode 100644 index 000000000..f76acee0c --- /dev/null +++ b/lib/components/userRelation/upsert/byUserEntityGrant/locales/zh_CN.json @@ -0,0 +1,13 @@ +{ + "single": "单次", + "unlimited": "不限", + "restart": "重新生成", + "chooseNumber": "请选择分享的目标人数", + "chooseExpiresAt": "请选择有效时长", + "expiresHelp": "支持分钟、小时选择", + "shareCode": "请将二维码发给待分享权限的用户使用微信扫描", + "unit": { + "hour": "小时", + "minute": "分钟" + } +} diff --git a/lib/components/userRelation/upsert/byUserEntityGrant/web.d.ts b/lib/components/userRelation/upsert/byUserEntityGrant/web.d.ts new file mode 100644 index 000000000..ef5350143 --- /dev/null +++ b/lib/components/userRelation/upsert/byUserEntityGrant/web.d.ts @@ -0,0 +1,18 @@ +import { WebComponentProps } from 'oak-frontend-base'; +import { EntityDict } from '../../../../oak-app-domain'; +declare type Unit = 'minute' | 'hour' | 'day'; +export default function render(props: WebComponentProps; +}, { + confirm: () => Promise; + onBack: () => void; + setInit: () => void; + setPeriod: (p: number) => void; + setUnit: (u: Unit) => void; +}>): import("react/jsx-runtime").JSX.Element; +export {}; diff --git a/lib/components/userRelation/upsert/byUserEntityGrant/web.js b/lib/components/userRelation/upsert/byUserEntityGrant/web.js new file mode 100644 index 000000000..d377df378 --- /dev/null +++ b/lib/components/userRelation/upsert/byUserEntityGrant/web.js @@ -0,0 +1,49 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var tslib_1 = require("tslib"); +var jsx_runtime_1 = require("react/jsx-runtime"); +var antd_mobile_1 = require("antd-mobile"); +var detail_1 = tslib_1.__importDefault(require("../../../../pages/userEntityGrant/detail")); +var web_module_less_1 = tslib_1.__importDefault(require("./web.module.less")); +function render(props) { + var _a = props.data, relations = _a.relations, userEntityGrant = _a.userEntityGrant, userEntityGrantId = _a.userEntityGrantId, period = _a.period, unit = _a.unit, maxes = _a.maxes, oakExecutable = _a.oakExecutable; + var _b = userEntityGrant || {}, relationId = _b.relationId, type = _b.type, number = _b.number, entity = _b.entity; + var _c = props.methods, update = _c.update, t = _c.t, onBack = _c.onBack, confirm = _c.confirm, setInit = _c.setInit, setPeriod = _c.setPeriod, setUnit = _c.setUnit; + var P = !!userEntityGrantId ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(antd_mobile_1.NoticeBar, { content: t('shareCode'), color: 'info' }), (0, jsx_runtime_1.jsx)(detail_1.default, { showBack: false, oakId: userEntityGrantId, oakAutoUnmount: true, oakPath: "$userRelation/upsert/byUserEntityGrant-userEntityGrant/detail" }), (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ style: { + width: '100%', + display: 'flex', + justifyContent: 'center', + } }, { children: (0, jsx_runtime_1.jsx)(antd_mobile_1.Button, tslib_1.__assign({ color: "primary", onClick: function () { return setInit(); }, block: true }, { children: t('restart') })) }))] })) : ((0, jsx_runtime_1.jsxs)(antd_mobile_1.Form, { children: [(0, jsx_runtime_1.jsx)(antd_mobile_1.Form.Item, tslib_1.__assign({ label: t('userEntityGrant:attr.relation'), name: "relation", rules: [ + { + required: true, + }, + ] }, { children: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(antd_mobile_1.Radio.Group, tslib_1.__assign({ value: relationId, onChange: function (value) { + update({ relationId: value }); + } }, { children: relations.map(function (ele) { return (0, jsx_runtime_1.jsx)(antd_mobile_1.Radio, tslib_1.__assign({ value: ele.id, style: { marginRight: 20 } }, { children: ele.display || t("".concat(entity, ":r.").concat(ele.name)) })); }) })) }) })), type === 'grant' && ((0, jsx_runtime_1.jsx)(antd_mobile_1.Form.Item, tslib_1.__assign({ label: t('userEntityGrant:attr.number'), name: "number", rules: [ + { + required: true, + message: t('chooseNumber'), + }, + ] }, { children: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsxs)(antd_mobile_1.Radio.Group, tslib_1.__assign({ value: number, onChange: function (value) { + update({ number: value }); + } }, { children: [(0, jsx_runtime_1.jsx)(antd_mobile_1.Radio, tslib_1.__assign({ value: 1, style: { marginRight: 20 } }, { children: t('single') })), (0, jsx_runtime_1.jsx)(antd_mobile_1.Radio, tslib_1.__assign({ value: 10000 }, { children: t('unlimited') }))] })) }) }))), (0, jsx_runtime_1.jsx)(antd_mobile_1.Form.Item, tslib_1.__assign({ label: t('userEntityGrant:attr.expiresAt'), name: "period", rules: [ + { + required: true, + message: t('chooseExpiresAt'), + }, + ], help: (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ style: { marginBottom: 16 } }, { children: t('expiresAt') })), extra: (0, jsx_runtime_1.jsx)(antd_mobile_1.Selector, { options: [ + { + label: t('unit.hour'), + value: 'hour', + }, + { + label: t('unit.minute'), + value: 'minute', + } + ], defaultValue: ['minute'], value: unit && [unit], onChange: function (arr) { return setUnit(arr[0]); } }) }, { children: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(antd_mobile_1.Input, { min: 1, max: maxes[unit], value: "".concat(period), type: "number", placeholder: t('chooseExpiresAt'), onChange: function (value) { + var v = parseInt(value); + setPeriod(v); + } }) }) })), (0, jsx_runtime_1.jsx)(antd_mobile_1.Form.Item, { children: (0, jsx_runtime_1.jsxs)(antd_mobile_1.Space, { children: [(0, jsx_runtime_1.jsx)(antd_mobile_1.Button, tslib_1.__assign({ color: "primary", onClick: function () { return confirm(); }, disabled: oakExecutable !== true }, { children: t('common::action.confirm') })), (0, jsx_runtime_1.jsx)(antd_mobile_1.Button, tslib_1.__assign({ onClick: function () { return onBack(); } }, { children: t('common::back') }))] }) })] })); + return (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: web_module_less_1.default.container }, { children: P })); +} +exports.default = render; diff --git a/lib/components/userRelation/upsert/byUserEntityGrant/web.module.less b/lib/components/userRelation/upsert/byUserEntityGrant/web.module.less new file mode 100644 index 000000000..85e0243d9 --- /dev/null +++ b/lib/components/userRelation/upsert/byUserEntityGrant/web.module.less @@ -0,0 +1,9 @@ + + + +.container { + padding: 30px 32px; + background: var(--oak-bg-color-container); + // box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1); + // border-radius: 3px; +} \ No newline at end of file diff --git a/lib/components/userRelation/upsert/byUserEntityGrant/web.pc.d.ts b/lib/components/userRelation/upsert/byUserEntityGrant/web.pc.d.ts new file mode 100644 index 000000000..d41e77c7c --- /dev/null +++ b/lib/components/userRelation/upsert/byUserEntityGrant/web.pc.d.ts @@ -0,0 +1,22 @@ +import { WebComponentProps } from 'oak-frontend-base'; +import { EntityDict } from '../../../../oak-app-domain'; +declare type Unit = 'minute' | 'hour' | 'day'; +export default function render(props: WebComponentProps; + unitArr: Array<{ + label: string; + value: Unit; + }>; +}, { + confirm: () => Promise; + onBack: () => void; + setInit: () => void; + setPeriod: (p: number) => void; + setUnit: (u: Unit) => void; +}>): import("react/jsx-runtime").JSX.Element; +export {}; diff --git a/lib/components/userRelation/upsert/byUserEntityGrant/web.pc.js b/lib/components/userRelation/upsert/byUserEntityGrant/web.pc.js new file mode 100644 index 000000000..2f40a80de --- /dev/null +++ b/lib/components/userRelation/upsert/byUserEntityGrant/web.pc.js @@ -0,0 +1,51 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var tslib_1 = require("tslib"); +var jsx_runtime_1 = require("react/jsx-runtime"); +var antd_1 = require("antd"); +var detail_1 = tslib_1.__importDefault(require("../../../../pages/userEntityGrant/detail")); +var web_module_less_1 = tslib_1.__importDefault(require("./web.module.less")); +function render(props) { + var _a = props.data, relations = _a.relations, userEntityGrant = _a.userEntityGrant, userEntityGrantId = _a.userEntityGrantId, period = _a.period, unit = _a.unit, maxes = _a.maxes, oakExecutable = _a.oakExecutable; + var _b = userEntityGrant || {}, relationId = _b.relationId, type = _b.type, number = _b.number, entity = _b.entity; + var _c = props.methods, update = _c.update, t = _c.t, onBack = _c.onBack, confirm = _c.confirm, setInit = _c.setInit, setPeriod = _c.setPeriod, setUnit = _c.setUnit; + var P = !!userEntityGrantId ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(antd_1.Alert, { showIcon: true, message: t('shareCode'), type: "info", style: { marginBottom: 16 } }), (0, jsx_runtime_1.jsx)(detail_1.default, { showBack: false, oakId: userEntityGrantId, oakAutoUnmount: true, oakPath: "$userRelation/upsert/byUserEntityGrant-userEntityGrant/detail" }), (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ style: { + width: '100%', + display: 'flex', + justifyContent: 'flex-end', + } }, { children: (0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ type: "primary", onClick: function () { return setInit(); } }, { children: t('restart') })) }))] })) : ((0, jsx_runtime_1.jsxs)(antd_1.Form, tslib_1.__assign({ labelCol: { span: 4 }, wrapperCol: { span: 8 } }, { children: [(0, jsx_runtime_1.jsx)(antd_1.Form.Item, tslib_1.__assign({ label: t('userEntityGrant:attr.relation'), name: "relation", rules: [ + { + required: true, + }, + ] }, { children: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(antd_1.Radio.Group, { value: relationId, onChange: function (_a) { + var target = _a.target; + var value = target.value; + update({ relationId: value }); + }, options: relations === null || relations === void 0 ? void 0 : relations.map(function (ele) { return ({ + value: ele.id, + label: ele.display || t("".concat(entity, ":r.").concat(ele.name)), + }); }) }) }) })), type === 'grant' && ((0, jsx_runtime_1.jsx)(antd_1.Form.Item, tslib_1.__assign({ label: t('userEntityGrant:attr.number'), name: "number", rules: [ + { + required: true, + message: t('chooseNumber'), + }, + ] }, { children: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(antd_1.Radio.Group, { value: number, onChange: function (_a) { + var target = _a.target; + var value = target.value; + update({ number: value }); + }, options: [ + { value: 1, label: t('single') }, + { value: 10000, label: t('unlimited') }, + ] }) }) }))), (0, jsx_runtime_1.jsx)(antd_1.Form.Item, tslib_1.__assign({ label: t('userEntityGrant:attr.expiresAt'), name: "period", rules: [ + { + required: true, + message: t('chooseExpiresAt'), + }, + ], help: (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ style: { marginBottom: 16 } }, { children: t('expiresHelp') })), tooltip: "\u901A\u8FC7\u914D\u7F6E\u5B9E\u73B0\u5728\u89C4\u5B9A\u7684\u65F6\u6548\u5185\u626B\u63CF\u4E8C\u7EF4\u7801\u4E0D\u8FC7\u671F\u7684\u6548\u679C\u3002" }, { children: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(antd_1.InputNumber, { min: 1, max: maxes[unit], value: period, onChange: function (value) { return setPeriod(value); }, + // addonAfter="分钟" + addonAfter: (0, jsx_runtime_1.jsxs)(antd_1.Select, tslib_1.__assign({ value: unit, style: { width: 80 }, onChange: function (v) { + setUnit(v); + } }, { children: [(0, jsx_runtime_1.jsx)(antd_1.Select.Option, tslib_1.__assign({ value: "minute" }, { children: t('unit.minute') })), (0, jsx_runtime_1.jsx)(antd_1.Select.Option, tslib_1.__assign({ value: "hour" }, { children: t('unit.hour') }))] })) }) }) })), (0, jsx_runtime_1.jsx)(antd_1.Form.Item, tslib_1.__assign({ wrapperCol: { offset: 4 } }, { children: (0, jsx_runtime_1.jsxs)(antd_1.Space, { children: [(0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ type: "primary", onClick: function () { return confirm(); }, disabled: oakExecutable !== true }, { children: t('common::action.confirm') })), (0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ onClick: function () { return onBack(); } }, { children: t('common::back') }))] }) }))] }))); + return (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: web_module_less_1.default.container }, { children: P })); +} +exports.default = render; diff --git a/lib/components/userRelation/upsert/index.d.ts b/lib/components/userRelation/upsert/index.d.ts new file mode 100644 index 000000000..b0b84b73a --- /dev/null +++ b/lib/components/userRelation/upsert/index.d.ts @@ -0,0 +1,10 @@ +import { ReactComponentProps } from 'oak-frontend-base/lib/types/Page'; +import { EntityDict } from '../../../oak-app-domain'; +import { EntityDict as BaseEntityDict } from 'oak-domain/lib/types/Entity'; +declare const _default: (props: ReactComponentProps) => React.ReactElement; +export default _default; diff --git a/lib/components/userRelation/upsert/index.js b/lib/components/userRelation/upsert/index.js new file mode 100644 index 000000000..271f04a74 --- /dev/null +++ b/lib/components/userRelation/upsert/index.js @@ -0,0 +1,100 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var tslib_1 = require("tslib"); +var assert_1 = tslib_1.__importDefault(require("assert")); +exports.default = OakComponent({ + isList: true, + entity: 'relation', + projection: { + id: 1, + entity: 1, + entityId: 1, + name: 1, + display: 1, + }, + data: { + grantByUserEntityGrant: false, + grantByEmail: false, + grantByMobile: false, + grantMethodCount: 0, + }, + filters: [ + { + filter: function () { + var _a = this.props, entity = _a.entity, entityId = _a.entityId; + var isRoot = this.features.token.isRoot(); + var filter = { + entity: entity, + $or: [ + { + entityId: entityId, + }, + { + entityId: { + $exists: false, + }, + } + ], + }; + if (!isRoot) { + var userId = this.features.token.getUserId(); + filter.relationAuth$destRelation = { + sourceRelation: { + userRelation$relation: { + userId: userId, + }, + }, + }; + } + return filter; + } + } + ], + formData: function (_a) { + var data = _a.data; + return { + relations: data, + }; + }, + properties: { + entity: '', + entityId: '', + redirectToAfterConfirm: {}, + qrCodeType: '', + }, + lifetimes: { + ready: function () { + var isRoot = this.features.token.isRoot(); + var application = this.features.application.getApplication(); + var _a = application, type = _a.type, config = _a.config; // 这个页面总不可能是第一个页面吧,application肯定初始化完成了 + var grantByUserEntityGrant = false, grantByMobile = false, grantByEmail = false; + if (type.startsWith('wechat')) { + grantByUserEntityGrant = true; + } + else { + (0, assert_1.default)(type === 'web'); + var passport = config.passport || []; + grantByEmail = passport.includes('email'); + // 是超级管理员 不需要根据配置手机号来判断 by wkj + grantByMobile = isRoot || passport.includes('mobile'); + grantByUserEntityGrant = passport.includes('wechat'); + } + var grantMethodCount = 0; + if (grantByEmail) { + grantMethodCount++; + } + if (grantByMobile) { + grantMethodCount++; + } + if (grantByUserEntityGrant) { + grantMethodCount++; + } + this.setState({ + grantMethodCount: grantMethodCount, + grantByUserEntityGrant: grantByUserEntityGrant, + grantByEmail: grantByEmail, + grantByMobile: grantByMobile, + }); + }, + }, +}); diff --git a/lib/components/userRelation/upsert/index.json b/lib/components/userRelation/upsert/index.json new file mode 100644 index 000000000..1b6a0ac99 --- /dev/null +++ b/lib/components/userRelation/upsert/index.json @@ -0,0 +1,4 @@ +{ + "navigationBarTitleText": "添加权限", + "usingComponents": {} +} diff --git a/lib/components/userRelation/upsert/index.less b/lib/components/userRelation/upsert/index.less new file mode 100644 index 000000000..6f28bc812 --- /dev/null +++ b/lib/components/userRelation/upsert/index.less @@ -0,0 +1,28 @@ +/** index.wxss **/ +@import "../../../config/styles/mp/index.less"; +@import "../../../config/styles/mp/mixins.less"; + +page { + height: 100%; + background-color: @bg-color; +} + +.page-body { + height: 100%; + display: flex; + flex: 1; + flex-direction: column; + box-sizing: border-box; + align-items: stretch; + padding: 0; + .safe-area-inset-bottom(); +} + +.col { + display: flex; + flex-direction: column; +} +.btn-view { + display: flex; + margin: 0rpx @spacer-2; +} \ No newline at end of file diff --git a/lib/components/userRelation/upsert/index.xml b/lib/components/userRelation/upsert/index.xml new file mode 100644 index 000000000..56d00a076 --- /dev/null +++ b/lib/components/userRelation/upsert/index.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/lib/components/userRelation/upsert/mobile.module.less b/lib/components/userRelation/upsert/mobile.module.less new file mode 100644 index 000000000..6e07a40cd --- /dev/null +++ b/lib/components/userRelation/upsert/mobile.module.less @@ -0,0 +1,6 @@ +.container { + background: var(--oak-bg-color-container); + box-shadow: 0 2px 3px #0000001a; + border-radius: 3px; + padding: 30px 32px; +} diff --git a/lib/components/userRelation/upsert/onUser/index.d.ts b/lib/components/userRelation/upsert/onUser/index.d.ts new file mode 100644 index 000000000..e939b7ccc --- /dev/null +++ b/lib/components/userRelation/upsert/onUser/index.d.ts @@ -0,0 +1,11 @@ +/// +import { EntityDict } from '../../../../oak-app-domain'; +declare const _default: (props: import("oak-frontend-base").ReactComponentProps void; +}>) => import("react").ReactElement>; +export default _default; diff --git a/lib/components/userRelation/upsert/onUser/index.js b/lib/components/userRelation/upsert/onUser/index.js new file mode 100644 index 000000000..96b5749ab --- /dev/null +++ b/lib/components/userRelation/upsert/onUser/index.js @@ -0,0 +1,80 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = OakComponent({ + entity: 'user', + projection: { + id: 1, + name: 1, + password: 1, + nickname: 1, + extraFile$entity: { + $entity: 'extraFile', + data: { + id: 1, + tag1: 1, + origin: 1, + bucket: 1, + objectId: 1, + filename: 1, + extra1: 1, + type: 1, + entity: 1, + extension: 1, + }, + filter: { + tag1: 'avatar', + }, + }, + userRelation$user: { + $entity: 'userRelation', + data: { + id: 1, + entity: 1, + entityId: 1, + userId: 1, + relationId: 1, + relation: { + id: 1, + name: 1, + display: 1, + relationAuth$destRelation: { + $entity: 'relationAuth', + data: { + id: 1, + sourceRelation: { + userRelation$relation: { + $entity: 'userRelation', + data: { + id: 1, + userId: 1, + }, + }, + }, + }, + }, + }, + }, + }, + }, + isList: false, + formData: function (_a) { + var user = _a.data; + var _b = user || {}, name = _b.name, nickname = _b.nickname, password = _b.password, extraFile$entity = _b.extraFile$entity, $$createAt$$ = _b.$$createAt$$; + var avatar = this.features.extraFile.getUrl(extraFile$entity && extraFile$entity[0]); + return { + avatar: avatar, + password: password, + name: name, + nickname: nickname, + isNew: $$createAt$$ === 1, + }; + }, + properties: { + entity: '', + entityId: '', + relations: [], + mobile: '', + isComponent: false, + setPasswordConfirm: function (value) { } + }, +}); diff --git a/lib/components/userRelation/upsert/onUser/index.json b/lib/components/userRelation/upsert/onUser/index.json new file mode 100644 index 000000000..c109659b1 --- /dev/null +++ b/lib/components/userRelation/upsert/onUser/index.json @@ -0,0 +1,12 @@ +{ + "navigationBarTitleText": "添加权限", + "usingComponents": { + "l-input": "@oak-frontend-base/miniprogram_npm/lin-ui/input/index", + "l-icon": "@oak-frontend-base/miniprogram_npm/lin-ui/icon/index", + "l-card": "@oak-frontend-base/miniprogram_npm/lin-ui/card/index", + "l-button": "@oak-frontend-base/miniprogram_npm/lin-ui/button/index", + "l-tag": "@oak-frontend-base/miniprogram_npm/lin-ui/tag/index", + "l-list": "@oak-frontend-base/miniprogram_npm/lin-ui/list/index", + "user-relations": "./userRelation/index" + } +} diff --git a/lib/components/userRelation/upsert/onUser/index.less b/lib/components/userRelation/upsert/onUser/index.less new file mode 100644 index 000000000..9ed0c4f01 --- /dev/null +++ b/lib/components/userRelation/upsert/onUser/index.less @@ -0,0 +1,36 @@ +/** index.wxss **/ +@import "../../../../config/styles/mp/index.less"; +@import "../../../../config/styles/mp/mixins.less"; + +page { + height: 100%; + display: flex; + flex-direction: column; +} + +.component-body { + height: 100%; + display: flex; + flex-direction: column; +} + +.list-item { + display: flex; + flex-direction: row; + align-items: center; + + .label { + width: 120rpx; + padding-left: 25rpx; + padding-right: 15rpx; + color: @oak-color-primary; + } + + .relation-box { + flex: 1; + } + + .confirm-btn { + align-self: flex-end; + } +} \ No newline at end of file diff --git a/lib/components/userRelation/upsert/onUser/index.xml b/lib/components/userRelation/upsert/onUser/index.xml new file mode 100644 index 000000000..af7fa4f6c --- /dev/null +++ b/lib/components/userRelation/upsert/onUser/index.xml @@ -0,0 +1,11 @@ + + + + 权限: + + + + + + + diff --git a/lib/components/userRelation/upsert/onUser/locales/zh_CN.json b/lib/components/userRelation/upsert/onUser/locales/zh_CN.json new file mode 100644 index 000000000..59fc90a8b --- /dev/null +++ b/lib/components/userRelation/upsert/onUser/locales/zh_CN.json @@ -0,0 +1,10 @@ +{ + "placeholder": { + "name": "请输入姓名", + "password": "密码不少于8位", + "relation": "至少应选择一个权限" + }, + "auth": "权限", + "existedUser": "现有用户", + "newUser": "新建用户" +} diff --git a/lib/components/userRelation/upsert/onUser/mobile.module.less b/lib/components/userRelation/upsert/onUser/mobile.module.less new file mode 100644 index 000000000..2ab973ffe --- /dev/null +++ b/lib/components/userRelation/upsert/onUser/mobile.module.less @@ -0,0 +1,6 @@ +.container { + background: var(--oak-bg-color-container); + // box-shadow: 0 2px 3px #0000001a; + // border-radius: 3px; + // padding: 30px 32px; +} diff --git a/lib/components/userRelation/upsert/onUser/userRelation/index.d.ts b/lib/components/userRelation/upsert/onUser/userRelation/index.d.ts new file mode 100644 index 000000000..5ab6ccec3 --- /dev/null +++ b/lib/components/userRelation/upsert/onUser/userRelation/index.d.ts @@ -0,0 +1,8 @@ +/// +import { EntityDict } from "../../../../../oak-app-domain"; +declare const _default: (props: import("oak-frontend-base").ReactComponentProps) => import("react").ReactElement>; +export default _default; diff --git a/lib/components/userRelation/upsert/onUser/userRelation/index.js b/lib/components/userRelation/upsert/onUser/userRelation/index.js new file mode 100644 index 000000000..384c88708 --- /dev/null +++ b/lib/components/userRelation/upsert/onUser/userRelation/index.js @@ -0,0 +1,78 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var tslib_1 = require("tslib"); +var assert_1 = tslib_1.__importDefault(require("assert")); +exports.default = OakComponent({ + entity: 'userRelation', + projection: { + id: 1, + userId: 1, + relationId: 1, + }, + properties: { + entity: '', + entityId: '', + relations: [], + }, + isList: true, + filters: [{ + filter: function () { + var _a = this.props, entity = _a.entity, entityId = _a.entityId; + return { + entity: entity, + entityId: entityId, + }; + } + }], + formData: function (_a) { + var userRelations = _a.data; + var relations = this.props.relations; + var relations2 = relations ? relations.map(function (relation) { + var isChecked = !!(userRelations === null || userRelations === void 0 ? void 0 : userRelations.find(function (ele) { return ele.relationId === relation.id && !ele.$$deleteAt$$; })); + return { + isChecked: isChecked, + relation: relation, + }; + }) : []; + return { + relations2: relations2, + userRelations: userRelations, + }; + }, + listeners: { + relations: function () { + this.reRender(); + }, + }, + methods: { + onRelationChange: function (relation, checked) { + var _a = this.props, entity = _a.entity, entityId = _a.entityId; + var userRelations = this.state.userRelations; + if (checked) { + var userRelation = userRelations === null || userRelations === void 0 ? void 0 : userRelations.find(function (ele) { return ele.relationId === relation.id; }); + if (userRelation) { + (0, assert_1.default)(userRelation.$$deleteAt$$); + this.recoverItem(userRelation.id); + } + else { + this.addItem({ + relationId: relation.id, + entity: entity, + entityId: entityId, + }); + } + } + else { + var userRelation = userRelations.find(function (ele) { return ele.relationId === relation.id; }); + (0, assert_1.default)(userRelation); + this.removeItem(userRelation.id); + } + }, + onRelationChangeMp: function (e) { + var _a = e.detail, relationId = _a.key, checked = _a.checked; + var relations2 = this.state.relations2; + var userRelation = relations2 === null || relations2 === void 0 ? void 0 : relations2.find(function (ele) { return ele.relation.id === relationId; }); + this.onRelationChange(userRelation === null || userRelation === void 0 ? void 0 : userRelation.relation, checked); + } + } +}); diff --git a/lib/components/userRelation/upsert/onUser/userRelation/index.json b/lib/components/userRelation/upsert/onUser/userRelation/index.json new file mode 100644 index 000000000..e1beb313b --- /dev/null +++ b/lib/components/userRelation/upsert/onUser/userRelation/index.json @@ -0,0 +1,10 @@ +{ + "component": true, + "usingComponents": { + "l-input": "@oak-frontend-base/miniprogram_npm/lin-ui/input/index", + "l-icon": "@oak-frontend-base/miniprogram_npm/lin-ui/icon/index", + "l-checkbox-group": "@oak-frontend-base/miniprogram_npm/lin-ui/checkbox-group/index", + "l-checkbox": "@oak-frontend-base/miniprogram_npm/lin-ui/checkbox/index", + "l-button": "@oak-frontend-base/miniprogram_npm/lin-ui/button/index" + } +} diff --git a/lib/components/userRelation/upsert/onUser/userRelation/index.less b/lib/components/userRelation/upsert/onUser/userRelation/index.less new file mode 100644 index 000000000..e69de29bb diff --git a/lib/components/userRelation/upsert/onUser/userRelation/index.xml b/lib/components/userRelation/upsert/onUser/userRelation/index.xml new file mode 100644 index 000000000..dae6512f2 --- /dev/null +++ b/lib/components/userRelation/upsert/onUser/userRelation/index.xml @@ -0,0 +1,11 @@ + + + {{item.relation.name ? t(entity + ':r.' + item.relation.name) : item.relation.display}} + + \ No newline at end of file diff --git a/lib/components/userRelation/upsert/onUser/userRelation/mobile.module.less b/lib/components/userRelation/upsert/onUser/userRelation/mobile.module.less new file mode 100644 index 000000000..539168574 --- /dev/null +++ b/lib/components/userRelation/upsert/onUser/userRelation/mobile.module.less @@ -0,0 +1,8 @@ + + +.container { + background: var(--oak-bg-color-container); + // box-shadow: 0 2px 3px #0000001a; + // border-radius: 3px; + // padding: 30px 32px; +} diff --git a/lib/components/userRelation/upsert/onUser/userRelation/web.d.ts b/lib/components/userRelation/upsert/onUser/userRelation/web.d.ts new file mode 100644 index 000000000..e7fa0a695 --- /dev/null +++ b/lib/components/userRelation/upsert/onUser/userRelation/web.d.ts @@ -0,0 +1,11 @@ +import { WebComponentProps } from 'oak-frontend-base'; +import { EntityDict } from '../../../../../oak-app-domain'; +export default function Render(props: WebComponentProps void; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/components/userRelation/upsert/onUser/userRelation/web.js b/lib/components/userRelation/upsert/onUser/userRelation/web.js new file mode 100644 index 000000000..ecb790630 --- /dev/null +++ b/lib/components/userRelation/upsert/onUser/userRelation/web.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var tslib_1 = require("tslib"); +var jsx_runtime_1 = require("react/jsx-runtime"); +var antd_mobile_1 = require("antd-mobile"); +function Render(props) { + var _a = props.data, entity = _a.entity, relations2 = _a.relations2; + var _b = props.methods, t = _b.t, onRelationChange = _b.onRelationChange; + return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: relations2 === null || relations2 === void 0 ? void 0 : relations2.map(function (_a) { + var relation = _a.relation, isChecked = _a.isChecked; + return ((0, jsx_runtime_1.jsx)(antd_mobile_1.Checkbox, tslib_1.__assign({ style: { marginRight: 20 }, checked: isChecked, onChange: function (checked) { + onRelationChange(relation, checked); + } }, { children: relation.name ? t("".concat(entity, ":r.").concat(relation.name)) : relation.display }))); + }) })); +} +exports.default = Render; diff --git a/lib/components/userRelation/upsert/onUser/userRelation/web.module.less b/lib/components/userRelation/upsert/onUser/userRelation/web.module.less new file mode 100644 index 000000000..539168574 --- /dev/null +++ b/lib/components/userRelation/upsert/onUser/userRelation/web.module.less @@ -0,0 +1,8 @@ + + +.container { + background: var(--oak-bg-color-container); + // box-shadow: 0 2px 3px #0000001a; + // border-radius: 3px; + // padding: 30px 32px; +} diff --git a/lib/components/userRelation/upsert/onUser/userRelation/web.pc.d.ts b/lib/components/userRelation/upsert/onUser/userRelation/web.pc.d.ts new file mode 100644 index 000000000..e7fa0a695 --- /dev/null +++ b/lib/components/userRelation/upsert/onUser/userRelation/web.pc.d.ts @@ -0,0 +1,11 @@ +import { WebComponentProps } from 'oak-frontend-base'; +import { EntityDict } from '../../../../../oak-app-domain'; +export default function Render(props: WebComponentProps void; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/components/userRelation/upsert/onUser/userRelation/web.pc.js b/lib/components/userRelation/upsert/onUser/userRelation/web.pc.js new file mode 100644 index 000000000..e76bce059 --- /dev/null +++ b/lib/components/userRelation/upsert/onUser/userRelation/web.pc.js @@ -0,0 +1,18 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var tslib_1 = require("tslib"); +var jsx_runtime_1 = require("react/jsx-runtime"); +var antd_1 = require("antd"); +function Render(props) { + var _a = props.data, entity = _a.entity, relations2 = _a.relations2; + var _b = props.methods, t = _b.t, onRelationChange = _b.onRelationChange; + return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: relations2 === null || relations2 === void 0 ? void 0 : relations2.map(function (_a) { + var relation = _a.relation, isChecked = _a.isChecked; + return ((0, jsx_runtime_1.jsx)(antd_1.Checkbox, tslib_1.__assign({ checked: isChecked, value: relation, onChange: function (_a) { + var target = _a.target; + var checked = target.checked; + onRelationChange(relation, checked); + } }, { children: relation.name ? t("".concat(entity, ":r.").concat(relation.name)) : relation.display }))); + }) })); +} +exports.default = Render; diff --git a/lib/components/userRelation/upsert/onUser/web.d.ts b/lib/components/userRelation/upsert/onUser/web.d.ts new file mode 100644 index 000000000..48b947378 --- /dev/null +++ b/lib/components/userRelation/upsert/onUser/web.d.ts @@ -0,0 +1,18 @@ +import { WebComponentProps } from 'oak-frontend-base'; +import { EntityDict } from '../../../../oak-app-domain'; +export default function Render(props: WebComponentProps Promise; + onConfirm: () => Promise; + onReset: () => void; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/components/userRelation/upsert/onUser/web.js b/lib/components/userRelation/upsert/onUser/web.js new file mode 100644 index 000000000..878788a70 --- /dev/null +++ b/lib/components/userRelation/upsert/onUser/web.js @@ -0,0 +1,38 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var tslib_1 = require("tslib"); +var jsx_runtime_1 = require("react/jsx-runtime"); +var antd_mobile_1 = require("antd-mobile"); +var mobile_module_less_1 = tslib_1.__importDefault(require("./mobile.module.less")); +var userRelation_1 = tslib_1.__importDefault(require("./userRelation")); +function Render(props) { + var _a = props.data, name = _a.name, isNew = _a.isNew, nickname = _a.nickname, password = _a.password, relations = _a.relations, oakFullpath = _a.oakFullpath, entity = _a.entity, entityId = _a.entityId; + var _b = props.methods, t = _b.t, update = _b.update; + return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(antd_mobile_1.Form.Item, { style: { marginBottom: 0 }, label: (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: mobile_module_less_1.default.tip }, { children: !isNew ? t('existedUser') : t('newUser') })) }), (0, jsx_runtime_1.jsx)(antd_mobile_1.Form.Item, tslib_1.__assign({ label: t('user:attr.name'), name: "name", rules: [ + { + required: true, + }, + ] }, { children: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(antd_mobile_1.Input, { disabled: !isNew, onChange: function (value) { + update({ + name: value, + }); + }, value: name, placeholder: t('placeholder.name') }) }) })), !isNew ? (0, jsx_runtime_1.jsx)(antd_mobile_1.Form.Item, tslib_1.__assign({ label: t('user:attr.nickname'), name: "nickname", rules: [ + { + required: true, + }, + ] }, { children: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(antd_mobile_1.Input, { disabled: true, value: nickname }) }) })) : (0, jsx_runtime_1.jsx)(antd_mobile_1.Form.Item, tslib_1.__assign({ label: t('user:attr.password'), name: "password", rules: [ + { + required: true, + }, + ] }, { children: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(antd_mobile_1.Input, { value: password, onChange: function (value) { + update({ + password: value, + }); + }, placeholder: t('placeholder.password') }) }) })), (0, jsx_runtime_1.jsx)(antd_mobile_1.Form.Item, tslib_1.__assign({ label: t('auth'), rules: [ + { + required: true, + }, + ], name: "relation" }, { children: (0, jsx_runtime_1.jsx)(userRelation_1.default, { oakAutoUnmount: true, oakPath: oakFullpath ? "".concat(oakFullpath, ".userRelation$user") + : undefined, entity: entity, entityId: entityId, relations: relations }) }))] })); +} +exports.default = Render; diff --git a/lib/components/userRelation/upsert/onUser/web.module.less b/lib/components/userRelation/upsert/onUser/web.module.less new file mode 100644 index 000000000..07f277e56 --- /dev/null +++ b/lib/components/userRelation/upsert/onUser/web.module.less @@ -0,0 +1,15 @@ + + +.container { + background: var(--oak-bg-color-container); + // box-shadow: 0 2px 3px #0000001a; + // border-radius: 3px; + // padding: 30px 32px; +} + + +.tip { + font-size: 12px; + line-height: 20px; + color: var(--oak-warning-color); +} \ No newline at end of file diff --git a/lib/components/userRelation/upsert/onUser/web.pc.d.ts b/lib/components/userRelation/upsert/onUser/web.pc.d.ts new file mode 100644 index 000000000..9570f51d2 --- /dev/null +++ b/lib/components/userRelation/upsert/onUser/web.pc.d.ts @@ -0,0 +1,19 @@ +import { WebComponentProps } from 'oak-frontend-base'; +import { EntityDict } from '../../../../oak-app-domain'; +export default function Render(props: WebComponentProps void; +}, { + onMobileChange: (value: string) => Promise; + onConfirm: () => Promise; + onReset: () => void; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/components/userRelation/upsert/onUser/web.pc.js b/lib/components/userRelation/upsert/onUser/web.pc.js new file mode 100644 index 000000000..ebf0ef2d0 --- /dev/null +++ b/lib/components/userRelation/upsert/onUser/web.pc.js @@ -0,0 +1,85 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var tslib_1 = require("tslib"); +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = require("react"); +var antd_1 = require("antd"); +var web_module_less_1 = tslib_1.__importDefault(require("./web.module.less")); +var userRelation_1 = tslib_1.__importDefault(require("./userRelation")); +var icons_1 = require("@ant-design/icons"); +var password_1 = require("../../../../utils/password"); +function Render(props) { + var _a = props.data, name = _a.name, isNew = _a.isNew, nickname = _a.nickname, password = _a.password, relations = _a.relations, oakFullpath = _a.oakFullpath, entity = _a.entity, entityId = _a.entityId, setPasswordConfirm = _a.setPasswordConfirm; + var _b = props.methods, t = _b.t, update = _b.update; + var _c = tslib_1.__read((0, react_1.useState)(''), 2), password2 = _c[0], setPassword2 = _c[1]; + var _d = tslib_1.__read((0, react_1.useState)(''), 2), validateHelp = _d[0], setValidateHelp = _d[1]; + var _e = tslib_1.__read((0, react_1.useState)(''), 2), validateHelp1 = _e[0], setValidateHelp1 = _e[1]; + var _f = tslib_1.__read((0, react_1.useState)(''), 2), validateStatus = _f[0], setValidateStatus = _f[1]; + return ((0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: web_module_less_1.default.container }, { children: (0, jsx_runtime_1.jsxs)(antd_1.Form, tslib_1.__assign({ colon: true, labelCol: { span: 4 }, wrapperCol: { span: 8 } }, { children: [(0, jsx_runtime_1.jsx)(antd_1.Form.Item, { style: { marginBottom: 0 }, label: (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: web_module_less_1.default.tip }, { children: !isNew ? t('existedUser') : t('newUser') })), colon: false }), (0, jsx_runtime_1.jsx)(antd_1.Form.Item, tslib_1.__assign({ label: t('user:attr.name'), name: "name", rules: [ + { + required: true, + }, + ] }, { children: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(antd_1.Input, { disabled: !isNew, onChange: function (e) { + var strValue = e.target.value; + update({ + name: strValue, + }); + }, value: name, placeholder: t('placeholder.name') }) }) })), !isNew ? (0, jsx_runtime_1.jsx)(antd_1.Form.Item, tslib_1.__assign({ label: t('user:attr.nickname'), name: "nickname", rules: [ + { + required: true, + }, + ] }, { children: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(antd_1.Input, { disabled: true, value: nickname }) }) })) : + (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(antd_1.Form.Item, tslib_1.__assign({ label: t('user:attr.password'), name: "password", help: validateHelp1, rules: [ + { + required: true, + message: '请输入密码', + validator: function (_, value) { + if (value.length < 8) { + setValidateHelp1('密码最短长度为8位'); + setValidateStatus('error'); + return; + } + else { + setValidateHelp1(''); + setValidateStatus(''); + } + if (password2) { + setValidateHelp(value === password2 ? '' : '两次输入的密码不一致,请检查'); + setValidateStatus(value === password2 ? 'success' : 'error'); + } + } + }, + ], hasFeedback: true, validateStatus: validateStatus }, { children: (0, jsx_runtime_1.jsx)(antd_1.Input.Password, { value: password, onChange: function (e) { + var strValue = e.target.value; + update({ + password: strValue, + }); + setPasswordConfirm(strValue === password2 && strValue !== ''); + }, iconRender: function (visible) { return (visible ? (0, jsx_runtime_1.jsx)(icons_1.EyeTwoTone, {}) : (0, jsx_runtime_1.jsx)(icons_1.EyeInvisibleOutlined, {})); }, placeholder: t('placeholder.password') }) })), (0, jsx_runtime_1.jsx)(antd_1.Form.Item, tslib_1.__assign({ label: '确认密码', name: "passwordConfirm", rules: [ + { + required: true, + validator: function (_, value) { + if (password.length < 8) { + return; + } + setValidateHelp(value === password ? '' : '两次输入的密码不一致,请检查'); + setValidateStatus(value === password ? 'success' : 'error'); + } + }, + ], validateTrigger: "onChange", help: validateHelp, validateStatus: validateStatus, hasFeedback: true }, { children: (0, jsx_runtime_1.jsx)(antd_1.Input.Password, { value: password2, onChange: function (e) { + var strValue = e.target.value; + setPassword2(strValue); + if (password === strValue) { + update({ + passwordSha1: (0, password_1.encryptPasswordSha1)(password) + }); + } + setPasswordConfirm(password === strValue); + }, iconRender: function (visible) { return (visible ? (0, jsx_runtime_1.jsx)(icons_1.EyeTwoTone, {}) : (0, jsx_runtime_1.jsx)(icons_1.EyeInvisibleOutlined, {})); }, placeholder: '请再次输入密码' }) }))] }), (0, jsx_runtime_1.jsx)(antd_1.Form.Item, tslib_1.__assign({ label: t('auth'), rules: [ + { + required: true, + }, + ], name: "relation" }, { children: (0, jsx_runtime_1.jsx)(userRelation_1.default, { oakAutoUnmount: true, oakPath: oakFullpath ? "".concat(oakFullpath, ".userRelation$user") + : undefined, entity: entity, entityId: entityId, relations: relations }) }))] })) }))); +} +exports.default = Render; diff --git a/lib/components/userRelation/upsert/web.d.ts b/lib/components/userRelation/upsert/web.d.ts new file mode 100644 index 000000000..5230c1310 --- /dev/null +++ b/lib/components/userRelation/upsert/web.d.ts @@ -0,0 +1,14 @@ +import { WebComponentProps } from 'oak-frontend-base'; +import { EntityDict } from '../../../oak-app-domain'; +import { QrCodeType } from '../../../types/Config'; +export default function Render(props: WebComponentProps): JSX.Element; diff --git a/lib/components/userRelation/upsert/web.js b/lib/components/userRelation/upsert/web.js new file mode 100644 index 000000000..23cf8c294 --- /dev/null +++ b/lib/components/userRelation/upsert/web.js @@ -0,0 +1,64 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var tslib_1 = require("tslib"); +var jsx_runtime_1 = require("react/jsx-runtime"); +var antd_mobile_1 = require("antd-mobile"); +var mobile_module_less_1 = tslib_1.__importDefault(require("./mobile.module.less")); +var index_1 = tslib_1.__importDefault(require("./byMobile/index")); +var byUserEntityGrant_1 = tslib_1.__importDefault(require("./byUserEntityGrant")); +var assert_1 = tslib_1.__importDefault(require("assert")); +function Render(props) { + var _a = props.data, entity = _a.entity, entityId = _a.entityId, relations = _a.relations, grantByUserEntityGrant = _a.grantByUserEntityGrant, grantByEmail = _a.grantByEmail, grantByMobile = _a.grantByMobile, grantMethodCount = _a.grantMethodCount, oakFullpath = _a.oakFullpath, redirectToAfterConfirm = _a.redirectToAfterConfirm, qrCodeType = _a.qrCodeType; + var SubPart = (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {}); + if (grantMethodCount === 0) { + SubPart = ((0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: mobile_module_less_1.default.container }, { children: "\u5E94\u7528\u6CA1\u6709\u5B9A\u4E49\u6388\u6743\u65B9\u5F0F\uFF0C\u8BF7\u7BA1\u7406\u5458\u5728\u63A7\u5236\u53F0\u4E2D\u5B9A\u4E49" }))); + } + else if (grantMethodCount === 1) { + if (grantByEmail) { + SubPart = (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: mobile_module_less_1.default.container }, { children: "\u5C1A\u672A\u5B9E\u73B0" })); + } + else if (grantByMobile) { + SubPart = ((0, jsx_runtime_1.jsx)(index_1.default, { entity: entity, entityId: entityId, relations: relations, oakPath: oakFullpath ? "$".concat(oakFullpath, "-mobile") : undefined, oakAutoUnmount: true })); + } + else { + (0, assert_1.default)(grantByUserEntityGrant === true); + SubPart = ((0, jsx_runtime_1.jsx)(byUserEntityGrant_1.default, { qrCodeType: qrCodeType, entity: entity, entityId: entityId, relations: relations, oakPath: oakFullpath + ? "$".concat(oakFullpath, "-userEntityGrant") + : undefined, oakAutoUnmount: true, redirectToAfterConfirm: redirectToAfterConfirm })); + } + } + else { + var items = [ + { + label: 'Email', + key: 'item-1', + children: (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: mobile_module_less_1.default.container }, { children: "\u5C1A\u672A\u5B9E\u73B0" })), + }, + { + label: '手机号', + key: 'item-2', + children: ((0, jsx_runtime_1.jsx)(index_1.default, { entity: entity, entityId: entityId, relations: relations, oakPath: oakFullpath ? "$".concat(oakFullpath, "-mobile") : undefined, oakAutoUnmount: true })), + }, + { + label: '二维码', + key: 'item-3', + children: ((0, jsx_runtime_1.jsx)(byUserEntityGrant_1.default, { entity: entity, entityId: entityId, relations: relations, qrCodeType: qrCodeType, oakPath: oakFullpath + ? "$".concat(oakFullpath, "-userEntityGrant") + : undefined, oakAutoUnmount: true, redirectToAfterConfirm: redirectToAfterConfirm })), + }, + ]; + var items2 = []; + if (grantByEmail) { + items2.push(items[0]); + } + if (grantByMobile) { + items2.push(items[1]); + } + if (grantByUserEntityGrant) { + items2.push(items[2]); + } + SubPart = ((0, jsx_runtime_1.jsx)(antd_mobile_1.Tabs, { children: items2.map(function (ele) { return (0, jsx_runtime_1.jsx)(antd_mobile_1.Tabs.Tab, tslib_1.__assign({ title: ele.label }, { children: ele.children }), ele.key); }) })); + } + return SubPart; +} +exports.default = Render; diff --git a/lib/components/userRelation/upsert/web.module.less b/lib/components/userRelation/upsert/web.module.less new file mode 100644 index 000000000..0dad10def --- /dev/null +++ b/lib/components/userRelation/upsert/web.module.less @@ -0,0 +1,8 @@ + + +.container { + background: var(--oak-bg-color-container); + box-shadow: 0 2px 3px #0000001a; + border-radius: 3px; + padding: 30px 32px; +} \ No newline at end of file diff --git a/lib/components/userRelation/upsert/web.pc.d.ts b/lib/components/userRelation/upsert/web.pc.d.ts new file mode 100644 index 000000000..1c0d32030 --- /dev/null +++ b/lib/components/userRelation/upsert/web.pc.d.ts @@ -0,0 +1,14 @@ +import { WebComponentProps } from 'oak-frontend-base'; +import { EntityDict } from '../../../oak-app-domain'; +import { QrCodeType } from '../../../types/Config'; +export default function Render(props: WebComponentProps): import("react/jsx-runtime").JSX.Element; diff --git a/lib/components/userRelation/upsert/web.pc.js b/lib/components/userRelation/upsert/web.pc.js new file mode 100644 index 000000000..8f5be685d --- /dev/null +++ b/lib/components/userRelation/upsert/web.pc.js @@ -0,0 +1,64 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var tslib_1 = require("tslib"); +var jsx_runtime_1 = require("react/jsx-runtime"); +var antd_1 = require("antd"); +var web_module_less_1 = tslib_1.__importDefault(require("./web.module.less")); +var index_1 = tslib_1.__importDefault(require("./byMobile/index")); +var byUserEntityGrant_1 = tslib_1.__importDefault(require("./byUserEntityGrant")); +var assert_1 = tslib_1.__importDefault(require("assert")); +function Render(props) { + var _a = props.data, entity = _a.entity, entityId = _a.entityId, relations = _a.relations, grantByUserEntityGrant = _a.grantByUserEntityGrant, grantByEmail = _a.grantByEmail, grantByMobile = _a.grantByMobile, grantMethodCount = _a.grantMethodCount, oakFullpath = _a.oakFullpath, redirectToAfterConfirm = _a.redirectToAfterConfirm, qrCodeType = _a.qrCodeType; + var SubPart = (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {}); + if (grantMethodCount === 0) { + SubPart = ((0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: web_module_less_1.default.container }, { children: "\u5E94\u7528\u6CA1\u6709\u5B9A\u4E49\u6388\u6743\u65B9\u5F0F\uFF0C\u8BF7\u7BA1\u7406\u5458\u5728\u63A7\u5236\u53F0\u4E2D\u5B9A\u4E49" }))); + } + else if (grantMethodCount === 1) { + if (grantByEmail) { + SubPart = (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: web_module_less_1.default.container }, { children: "\u5C1A\u672A\u5B9E\u73B0" })); + } + else if (grantByMobile) { + SubPart = ((0, jsx_runtime_1.jsx)(index_1.default, { entity: entity, entityId: entityId, relations: relations, oakPath: oakFullpath ? "$userRelation-upsert-by-mobile" : undefined, oakAutoUnmount: true })); + } + else { + (0, assert_1.default)(grantByUserEntityGrant === true); + SubPart = ((0, jsx_runtime_1.jsx)(byUserEntityGrant_1.default, { qrCodeType: qrCodeType, entity: entity, entityId: entityId, relations: relations, oakPath: oakFullpath + ? "$userRelation-upsert-by-userEntityGrant" + : undefined, oakAutoUnmount: true, redirectToAfterConfirm: redirectToAfterConfirm })); + } + } + else { + var items = [ + { + label: 'Email', + key: 'item-1', + children: (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: web_module_less_1.default.container }, { children: "\u5C1A\u672A\u5B9E\u73B0" })), + }, + { + label: '手机号', + key: 'item-2', + children: ((0, jsx_runtime_1.jsx)(index_1.default, { entity: entity, entityId: entityId, relations: relations, oakPath: oakFullpath ? "$userRelation-upsert-by-mobile" : undefined, oakAutoUnmount: true })), + }, + { + label: '二维码', + key: 'item-3', + children: ((0, jsx_runtime_1.jsx)(byUserEntityGrant_1.default, { entity: entity, entityId: entityId, relations: relations, qrCodeType: qrCodeType, oakPath: oakFullpath + ? "$userRelation-upsert-by-userEntityGrant" + : undefined, oakAutoUnmount: true, redirectToAfterConfirm: redirectToAfterConfirm })), + }, + ]; + var items2 = []; + if (grantByEmail) { + items2.push(items[0]); + } + if (grantByMobile) { + items2.push(items[1]); + } + if (grantByUserEntityGrant) { + items2.push(items[2]); + } + SubPart = (0, jsx_runtime_1.jsx)(antd_1.Tabs, { items: items2 }); + } + return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: SubPart })); +} +exports.default = Render; diff --git a/lib/components/wechatLogin/qrCode/web.d.ts b/lib/components/wechatLogin/qrCode/web.d.ts index 64aba2ccd..714f028b6 100644 --- a/lib/components/wechatLogin/qrCode/web.d.ts +++ b/lib/components/wechatLogin/qrCode/web.d.ts @@ -6,4 +6,4 @@ export default function Render(props: WebComponentProps): JSX.Element; +}, {}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/components/wechatUser/bindingList/web.d.ts b/lib/components/wechatUser/bindingList/web.d.ts index 165ea90e8..bd3139280 100644 --- a/lib/components/wechatUser/bindingList/web.d.ts +++ b/lib/components/wechatUser/bindingList/web.d.ts @@ -2,4 +2,4 @@ import { EntityDict } from '../../../oak-app-domain'; import { WebComponentProps } from 'oak-frontend-base'; export default function Render(props: WebComponentProps): JSX.Element; +}, {}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/components/wechatUser/unbindBtn/web.d.ts b/lib/components/wechatUser/unbindBtn/web.d.ts index 73749bca0..a0028a439 100644 --- a/lib/components/wechatUser/unbindBtn/web.d.ts +++ b/lib/components/wechatUser/unbindBtn/web.d.ts @@ -4,4 +4,4 @@ export default function Render(props: WebComponentProps): JSX.Element; +}, {}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/data/i18n.js b/lib/data/i18n.js index b10e02d23..e0f3db858 100644 --- a/lib/data/i18n.js +++ b/lib/data/i18n.js @@ -245,7 +245,65 @@ var i18ns = [ } }, { - id: "491aa39ba7ec77e4c21d1b6ea6a648f9", + id: "0637e049611c35325530219085fd9acb", + namespace: "oak-general-business-c-userRelation-list", + language: "zh-CN", + module: "oak-general-business", + position: "src/components/userRelation/list", + data: { + "confirmRevokeAll": "确认删除用户的所有权限吗?", + "search": "搜索用户名" + } + }, + { + id: "2e6bf38a80fd7e5f42e22a4cc8f0303f", + namespace: "oak-general-business-c-userRelation-upsert-byMobile", + language: "zh-CN", + module: "oak-general-business", + position: "src/components/userRelation/upsert/byMobile", + data: { + "inputMobile": "请输入手机号查找" + } + }, + { + id: "c9a343e53c3768d1b66d320370260beb", + namespace: "oak-general-business-c-userRelation-upsert-byUserEntityGrant", + language: "zh-CN", + module: "oak-general-business", + position: "src/components/userRelation/upsert/byUserEntityGrant", + data: { + "single": "单次", + "unlimited": "不限", + "restart": "重新生成", + "chooseNumber": "请选择分享的目标人数", + "chooseExpiresAt": "请选择有效时长", + "expiresHelp": "支持分钟、小时选择", + "shareCode": "请将二维码发给待分享权限的用户使用微信扫描", + "unit": { + "hour": "小时", + "minute": "分钟" + } + } + }, + { + id: "557e5ea860a6f3a536628c31de841462", + namespace: "oak-general-business-c-userRelation-upsert-onUser", + language: "zh-CN", + module: "oak-general-business", + position: "src/components/userRelation/upsert/onUser", + data: { + "placeholder": { + "name": "请输入姓名", + "password": "密码不少于8位", + "relation": "至少应选择一个权限" + }, + "auth": "权限", + "existedUser": "现有用户", + "newUser": "新建用户" + } + }, + { + id: "c636a9f371fc6da432ca925f3b865071", namespace: "oak-general-business-c-wechatUser-unbindBtn", language: "zh-CN", module: "oak-general-business", @@ -256,11 +314,11 @@ var i18ns = [ } }, { - id: "e07ce685f0383e7f7f3ce86501567f28", - namespace: "oak-general-business-l-common", + id: "c92ab50ae7c0980c7a8cde78031a9ca9", + namespace: "oak-general-business-l-Common", language: "zh-CN", module: "oak-general-business", - position: "locales/common", + position: "locales/Common", data: { "noData": "暂无数据", "areYouSure": "请确认", diff --git a/lib/pages/address/list/web.d.ts b/lib/pages/address/list/web.d.ts index 92a8d8a09..424043c2d 100644 --- a/lib/pages/address/list/web.d.ts +++ b/lib/pages/address/list/web.d.ts @@ -5,4 +5,4 @@ export default function Render(props: WebComponentProps void; goNewAddress: () => void; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/address/upsert/web.d.ts b/lib/pages/address/upsert/web.d.ts index 9b3cc87e8..9abfc6a1b 100644 --- a/lib/pages/address/upsert/web.d.ts +++ b/lib/pages/address/upsert/web.d.ts @@ -9,4 +9,4 @@ export default function Render(props: WebComponentProps void; confirm: () => Promise; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/application/config/upsert/web.pc.d.ts b/lib/pages/application/config/upsert/web.pc.d.ts index 3e7db684d..4957b0e75 100644 --- a/lib/pages/application/config/upsert/web.pc.d.ts +++ b/lib/pages/application/config/upsert/web.pc.d.ts @@ -8,5 +8,5 @@ export default function render(props: WebComponentProps): JSX.Element; +}, {}>): import("react/jsx-runtime").JSX.Element; export {}; diff --git a/lib/pages/application/detail/web.d.ts b/lib/pages/application/detail/web.d.ts index 6a7dc8798..3b8937823 100644 --- a/lib/pages/application/detail/web.d.ts +++ b/lib/pages/application/detail/web.d.ts @@ -14,5 +14,5 @@ export default function Render(props: WebComponentProps void; goWechatPublicTagList: () => void; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; export {}; diff --git a/lib/pages/application/list/web.pc.d.ts b/lib/pages/application/list/web.pc.d.ts index 72f46bdab..dd8d276c9 100644 --- a/lib/pages/application/list/web.pc.d.ts +++ b/lib/pages/application/list/web.pc.d.ts @@ -12,4 +12,4 @@ export default function Render(props: WebComponentProps void; goUpdate: (id: string) => void; removeApplication: (id: string) => void; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/application/upsert/web.pc.d.ts b/lib/pages/application/upsert/web.pc.d.ts index 3517250fc..b14191e33 100644 --- a/lib/pages/application/upsert/web.pc.d.ts +++ b/lib/pages/application/upsert/web.pc.d.ts @@ -15,4 +15,4 @@ export default function Render(props: WebComponentProps void; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/changePassword/web.d.ts b/lib/pages/changePassword/web.d.ts index dc5614a18..8e3e05e80 100644 --- a/lib/pages/changePassword/web.d.ts +++ b/lib/pages/changePassword/web.d.ts @@ -4,4 +4,4 @@ export default function render(props: WebComponentProps): JSX.Element; +}, {}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/changePassword/web.pc.d.ts b/lib/pages/changePassword/web.pc.d.ts index dc5614a18..8e3e05e80 100644 --- a/lib/pages/changePassword/web.pc.d.ts +++ b/lib/pages/changePassword/web.pc.d.ts @@ -4,4 +4,4 @@ export default function render(props: WebComponentProps): JSX.Element; +}, {}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/domain/detail/web.d.ts b/lib/pages/domain/detail/web.d.ts index 07d4941c8..2c142b932 100644 --- a/lib/pages/domain/detail/web.d.ts +++ b/lib/pages/domain/detail/web.d.ts @@ -11,4 +11,4 @@ export default function Render(props: WebComponentProps void; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/domain/list/web.pc.d.ts b/lib/pages/domain/list/web.pc.d.ts index 04c1a7f52..ff07b5a3c 100644 --- a/lib/pages/domain/list/web.pc.d.ts +++ b/lib/pages/domain/list/web.pc.d.ts @@ -10,4 +10,4 @@ export default function Render(props: WebComponentProps void; goCreate: () => void; goUpdate: (id: string) => void; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/domain/upsert/web.pc.d.ts b/lib/pages/domain/upsert/web.pc.d.ts index 79b51472f..8b50d33f8 100644 --- a/lib/pages/domain/upsert/web.pc.d.ts +++ b/lib/pages/domain/upsert/web.pc.d.ts @@ -11,4 +11,4 @@ export default function Render(props: WebComponentProps void; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/icon/web.d.ts b/lib/pages/icon/web.d.ts index 0860535ce..d6b0fa37c 100644 --- a/lib/pages/icon/web.d.ts +++ b/lib/pages/icon/web.d.ts @@ -1,3 +1,3 @@ import { EntityDict } from '../../oak-app-domain'; import { WebComponentProps } from 'oak-frontend-base'; -export default function Render(props: WebComponentProps): JSX.Element; +export default function Render(props: WebComponentProps): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/message/detail/web.d.ts b/lib/pages/message/detail/web.d.ts index 743c25998..cf689b387 100644 --- a/lib/pages/message/detail/web.d.ts +++ b/lib/pages/message/detail/web.d.ts @@ -10,4 +10,4 @@ export default function Render(props: WebComponentProps void; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/message/detail/web.pc.d.ts b/lib/pages/message/detail/web.pc.d.ts index 743c25998..cf689b387 100644 --- a/lib/pages/message/detail/web.pc.d.ts +++ b/lib/pages/message/detail/web.pc.d.ts @@ -10,4 +10,4 @@ export default function Render(props: WebComponentProps void; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/message/drawerList/web.d.ts b/lib/pages/message/drawerList/web.d.ts index c9ae8c16f..56a08305a 100644 --- a/lib/pages/message/drawerList/web.d.ts +++ b/lib/pages/message/drawerList/web.d.ts @@ -7,4 +7,4 @@ export default function Render(props: WebComponentProps void; goMessageList: () => void; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/message/list/web.d.ts b/lib/pages/message/list/web.d.ts index 21d9824fe..85c8cd912 100644 --- a/lib/pages/message/list/web.d.ts +++ b/lib/pages/message/list/web.d.ts @@ -4,4 +4,4 @@ export default function Render(props: WebComponentProps void; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/message/list/web.pc.d.ts b/lib/pages/message/list/web.pc.d.ts index 2fe599863..0203f64bf 100644 --- a/lib/pages/message/list/web.pc.d.ts +++ b/lib/pages/message/list/web.pc.d.ts @@ -4,4 +4,4 @@ export default function Render(props: WebComponentProps[]; }, { goDetailById: (id: string) => void; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/mobile/login/web.d.ts b/lib/pages/mobile/login/web.d.ts index 5616355e4..f20ffeaf0 100644 --- a/lib/pages/mobile/login/web.d.ts +++ b/lib/pages/mobile/login/web.d.ts @@ -17,4 +17,4 @@ export default function render(props: WebComponentProps void; sendCaptcha: () => Promise; loginByMobile: () => Promise; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/mobile/login/web.pc.d.ts b/lib/pages/mobile/login/web.pc.d.ts index 5eea0030a..bb1add491 100644 --- a/lib/pages/mobile/login/web.pc.d.ts +++ b/lib/pages/mobile/login/web.pc.d.ts @@ -16,4 +16,4 @@ export default function render(props: WebComponentProps void; sendCaptcha: () => Promise; loginByMobile: () => Promise; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/mobile/me/web.d.ts b/lib/pages/mobile/me/web.d.ts index 641f953a3..978817dba 100644 --- a/lib/pages/mobile/me/web.d.ts +++ b/lib/pages/mobile/me/web.d.ts @@ -5,4 +5,4 @@ export default function render(props: WebComponentProps void; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/mobile/me/web.pc.d.ts b/lib/pages/mobile/me/web.pc.d.ts index fdee9f0af..ce75695de 100644 --- a/lib/pages/mobile/me/web.pc.d.ts +++ b/lib/pages/mobile/me/web.pc.d.ts @@ -6,4 +6,4 @@ export default function render(props: WebComponentProps void; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/paper/detail/web.d.ts b/lib/pages/paper/detail/web.d.ts index af5108db1..c57152a54 100644 --- a/lib/pages/paper/detail/web.d.ts +++ b/lib/pages/paper/detail/web.d.ts @@ -6,4 +6,4 @@ export default function render(props: WebComponentProps): JSX.Element; +}, {}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/paper/list/web.d.ts b/lib/pages/paper/list/web.d.ts index 8efdc15a5..2104ddb5a 100644 --- a/lib/pages/paper/list/web.d.ts +++ b/lib/pages/paper/list/web.d.ts @@ -13,4 +13,4 @@ export default function render(props: WebComponentProps Promise; searchConfirm: () => Promise; onRemove: (id: string) => Promise; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/paper/preview/web.d.ts b/lib/pages/paper/preview/web.d.ts index b64855c39..4ef12cc2f 100644 --- a/lib/pages/paper/preview/web.d.ts +++ b/lib/pages/paper/preview/web.d.ts @@ -8,4 +8,4 @@ export default function Render(props: WebComponentProps): JSX.Element; +}, {}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/paper/upsert/web.d.ts b/lib/pages/paper/upsert/web.d.ts index 5ec7ded18..00a358ebf 100644 --- a/lib/pages/paper/upsert/web.d.ts +++ b/lib/pages/paper/upsert/web.d.ts @@ -21,4 +21,4 @@ export default function Render(props: WebComponentProps; clearContentTip: () => void; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/personal/web.d.ts b/lib/pages/personal/web.d.ts index baca2f3aa..594681efd 100644 --- a/lib/pages/personal/web.d.ts +++ b/lib/pages/personal/web.d.ts @@ -1 +1 @@ -export default function Render(): JSX.Element; +export default function Render(): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/personal/web.pc.d.ts b/lib/pages/personal/web.pc.d.ts index baca2f3aa..594681efd 100644 --- a/lib/pages/personal/web.pc.d.ts +++ b/lib/pages/personal/web.pc.d.ts @@ -1 +1 @@ -export default function Render(): JSX.Element; +export default function Render(): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/pickers/area/web.d.ts b/lib/pages/pickers/area/web.d.ts index f9bb133dd..b2ca6d492 100644 --- a/lib/pages/pickers/area/web.d.ts +++ b/lib/pages/pickers/area/web.d.ts @@ -4,4 +4,4 @@ export default function render(props: WebComponentProps Promise; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/platform/config/upsert/web.pc.d.ts b/lib/pages/platform/config/upsert/web.pc.d.ts index 11bb7ef98..a1d26878b 100644 --- a/lib/pages/platform/config/upsert/web.pc.d.ts +++ b/lib/pages/platform/config/upsert/web.pc.d.ts @@ -6,4 +6,4 @@ export default function Render(props: WebComponentProps): JSX.Element; +}, {}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/platform/detail/web.d.ts b/lib/pages/platform/detail/web.d.ts index abe71382c..98c8fcaf3 100644 --- a/lib/pages/platform/detail/web.d.ts +++ b/lib/pages/platform/detail/web.d.ts @@ -9,4 +9,4 @@ export default function Render(props: WebComponentProps void; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/platform/list/web.pc.d.ts b/lib/pages/platform/list/web.pc.d.ts index 7cad87793..0d529c99b 100644 --- a/lib/pages/platform/list/web.pc.d.ts +++ b/lib/pages/platform/list/web.pc.d.ts @@ -11,4 +11,4 @@ export default function Render(props: WebComponentProps void; goSetConfig: (id: string) => void; goUpdate: (id: string) => void; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/platform/upsert/web.pc.d.ts b/lib/pages/platform/upsert/web.pc.d.ts index 72957a6d2..fbbc68bc1 100644 --- a/lib/pages/platform/upsert/web.pc.d.ts +++ b/lib/pages/platform/upsert/web.pc.d.ts @@ -6,4 +6,4 @@ export default function Render(props: WebComponentProps void; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/setting/web.d.ts b/lib/pages/setting/web.d.ts index a897c3cb6..a26be4c02 100644 --- a/lib/pages/setting/web.d.ts +++ b/lib/pages/setting/web.d.ts @@ -9,4 +9,4 @@ export default function render(props: WebComponentProps void; setVisible: () => void; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/setting/web.pc.d.ts b/lib/pages/setting/web.pc.d.ts index baca2f3aa..594681efd 100644 --- a/lib/pages/setting/web.pc.d.ts +++ b/lib/pages/setting/web.pc.d.ts @@ -1 +1 @@ -export default function Render(): JSX.Element; +export default function Render(): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/subscription/config/upsert/web.pc.d.ts b/lib/pages/subscription/config/upsert/web.pc.d.ts index 35b74b5a0..88820328e 100644 --- a/lib/pages/subscription/config/upsert/web.pc.d.ts +++ b/lib/pages/subscription/config/upsert/web.pc.d.ts @@ -7,5 +7,5 @@ export default function render(props: WebComponentProps): JSX.Element; +}, {}>): import("react/jsx-runtime").JSX.Element; export {}; diff --git a/lib/pages/subscription/detail/web.d.ts b/lib/pages/subscription/detail/web.d.ts index 58c618262..14829cc28 100644 --- a/lib/pages/subscription/detail/web.d.ts +++ b/lib/pages/subscription/detail/web.d.ts @@ -12,5 +12,5 @@ export default function Render(props: WebComponentProps void; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; export {}; diff --git a/lib/pages/subscription/list/web.pc.d.ts b/lib/pages/subscription/list/web.pc.d.ts index 17f695294..c14ad48db 100644 --- a/lib/pages/subscription/list/web.pc.d.ts +++ b/lib/pages/subscription/list/web.pc.d.ts @@ -11,4 +11,4 @@ export default function Render(props: WebComponentProps void; goUpdate: (id: string) => void; remove: (id: string) => void; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/subscription/upsert/web.pc.d.ts b/lib/pages/subscription/upsert/web.pc.d.ts index 55a362e5e..d16ba7d3a 100644 --- a/lib/pages/subscription/upsert/web.pc.d.ts +++ b/lib/pages/subscription/upsert/web.pc.d.ts @@ -10,4 +10,4 @@ export default function Render(props: WebComponentProps void; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/subwayLine/list/web.d.ts b/lib/pages/subwayLine/list/web.d.ts index 27d54a300..175126fdc 100644 --- a/lib/pages/subwayLine/list/web.d.ts +++ b/lib/pages/subwayLine/list/web.d.ts @@ -11,4 +11,4 @@ export default function Render(props: WebComponentProps void; setFilterByAreaId: (areaId: string) => void; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/subwayLine/upsertStation/web.d.ts b/lib/pages/subwayLine/upsertStation/web.d.ts index 5f6316d8f..9a5aa0156 100644 --- a/lib/pages/subwayLine/upsertStation/web.d.ts +++ b/lib/pages/subwayLine/upsertStation/web.d.ts @@ -6,4 +6,4 @@ export default function Render(props: WebComponentProps void; openStation: boolean; subwayId: string; -}, {}>): JSX.Element; +}, {}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/subwayLine/upsertSubway/web.d.ts b/lib/pages/subwayLine/upsertSubway/web.d.ts index ab23b3894..8a08e34d0 100644 --- a/lib/pages/subwayLine/upsertSubway/web.d.ts +++ b/lib/pages/subwayLine/upsertSubway/web.d.ts @@ -5,4 +5,4 @@ export default function Render(props: WebComponentProps void; openSubway: boolean; -}, {}>): JSX.Element; +}, {}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/system/config/upsert/web.pc.d.ts b/lib/pages/system/config/upsert/web.pc.d.ts index bcb8e572c..acffdee90 100644 --- a/lib/pages/system/config/upsert/web.pc.d.ts +++ b/lib/pages/system/config/upsert/web.pc.d.ts @@ -6,4 +6,4 @@ export default function Render(props: WebComponentProps): JSX.Element; +}, {}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/system/detail/web.d.ts b/lib/pages/system/detail/web.d.ts index 38dd1ce37..5dfab7bca 100644 --- a/lib/pages/system/detail/web.d.ts +++ b/lib/pages/system/detail/web.d.ts @@ -14,4 +14,4 @@ export default function Render(props: WebComponentProps void; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/system/list/web.pc.d.ts b/lib/pages/system/list/web.pc.d.ts index c0ba36154..c40bb6b38 100644 --- a/lib/pages/system/list/web.pc.d.ts +++ b/lib/pages/system/list/web.pc.d.ts @@ -11,4 +11,4 @@ export default function Render(props: WebComponentProps void; goSetConfig: (id: string) => void; goUpdate: (id: string) => void; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/system/upsert/web.pc.d.ts b/lib/pages/system/upsert/web.pc.d.ts index 8d2352f32..953584620 100644 --- a/lib/pages/system/upsert/web.pc.d.ts +++ b/lib/pages/system/upsert/web.pc.d.ts @@ -10,4 +10,4 @@ export default function Render(props: WebComponentProps void; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/token/me/web.d.ts b/lib/pages/token/me/web.d.ts index 8c24eab24..f8c59b723 100644 --- a/lib/pages/token/me/web.d.ts +++ b/lib/pages/token/me/web.d.ts @@ -15,4 +15,4 @@ export default function Render(props: WebComponentProps Promise; goMyMobile: () => Promise; goUserManage: () => Promise; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/user/info/web.d.ts b/lib/pages/user/info/web.d.ts index 6025678c8..0dae98ec8 100644 --- a/lib/pages/user/info/web.d.ts +++ b/lib/pages/user/info/web.d.ts @@ -28,5 +28,5 @@ declare type MethodsProps = { onConfirm: (attr: string) => Promise; refreshWechatPublicUserInfo: () => void; }; -export default function render(props: WebComponentProps): JSX.Element; +export default function render(props: WebComponentProps): import("react/jsx-runtime").JSX.Element; export {}; diff --git a/lib/pages/user/info/web.pc.d.ts b/lib/pages/user/info/web.pc.d.ts index 6db3ed15b..37be3e590 100644 --- a/lib/pages/user/info/web.pc.d.ts +++ b/lib/pages/user/info/web.pc.d.ts @@ -22,4 +22,4 @@ export default function Render(props: WebComponentProps void; goChangePassword: () => void; unbunding: (captcha?: string) => void; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/user/manage/detail/web.d.ts b/lib/pages/user/manage/detail/web.d.ts index 90c922c27..241e6ffed 100644 --- a/lib/pages/user/manage/detail/web.d.ts +++ b/lib/pages/user/manage/detail/web.d.ts @@ -22,4 +22,4 @@ export default function render(props: WebComponentProps Promise; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/user/manage/upsert/web.d.ts b/lib/pages/user/manage/upsert/web.d.ts index d68616a4c..b5e9f5775 100644 --- a/lib/pages/user/manage/upsert/web.d.ts +++ b/lib/pages/user/manage/upsert/web.d.ts @@ -15,4 +15,4 @@ export default function Render(props: WebComponentProps; -}, {}>): JSX.Element; +}, {}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/user/manage/web.d.ts b/lib/pages/user/manage/web.d.ts index ef68161e7..e9127bdbb 100644 --- a/lib/pages/user/manage/web.d.ts +++ b/lib/pages/user/manage/web.d.ts @@ -9,4 +9,4 @@ export default function render(props: WebComponentProps Promise; goNewUser: () => Promise; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/user/manage/web.pc.d.ts b/lib/pages/user/manage/web.pc.d.ts index 11df1296a..f4a1e98f8 100644 --- a/lib/pages/user/manage/web.pc.d.ts +++ b/lib/pages/user/manage/web.pc.d.ts @@ -1 +1 @@ -export default function render(this: any): JSX.Element; +export default function render(this: any): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/user/search/web.d.ts b/lib/pages/user/search/web.d.ts index cfaabf286..3313c4c64 100644 --- a/lib/pages/user/search/web.d.ts +++ b/lib/pages/user/search/web.d.ts @@ -1 +1 @@ -export default function render(): JSX.Element; +export default function render(): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/userEntityGrant/confirm/web.d.ts b/lib/pages/userEntityGrant/confirm/web.d.ts index 96de6392c..f5f02391d 100644 --- a/lib/pages/userEntityGrant/confirm/web.d.ts +++ b/lib/pages/userEntityGrant/confirm/web.d.ts @@ -20,4 +20,4 @@ export default function Render(props: WebComponentProps void; redirectPage: () => void; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/userEntityGrant/detail/web.d.ts b/lib/pages/userEntityGrant/detail/web.d.ts index 85e0f7556..058f6a823 100644 --- a/lib/pages/userEntityGrant/detail/web.d.ts +++ b/lib/pages/userEntityGrant/detail/web.d.ts @@ -6,4 +6,4 @@ export default function Render(props: WebComponentProps): JSX.Element; +}, {}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/userEntityGrant/detail/web.pc.d.ts b/lib/pages/userEntityGrant/detail/web.pc.d.ts index 85e0f7556..058f6a823 100644 --- a/lib/pages/userEntityGrant/detail/web.pc.d.ts +++ b/lib/pages/userEntityGrant/detail/web.pc.d.ts @@ -6,4 +6,4 @@ export default function Render(props: WebComponentProps): JSX.Element; +}, {}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/userEntityGrant/grant/web.d.ts b/lib/pages/userEntityGrant/grant/web.d.ts index d013193b0..5f3ce5371 100644 --- a/lib/pages/userEntityGrant/grant/web.d.ts +++ b/lib/pages/userEntityGrant/grant/web.d.ts @@ -15,4 +15,4 @@ export default function render(props: WebComponentProps void; setNumber: (value: string) => void; setPeriod: (value: number | null) => void; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/userEntityGrant/list/web.d.ts b/lib/pages/userEntityGrant/list/web.d.ts index 1cf12ff3f..5e546e767 100644 --- a/lib/pages/userEntityGrant/list/web.d.ts +++ b/lib/pages/userEntityGrant/list/web.d.ts @@ -6,4 +6,4 @@ export default function render(props: WebComponentProps): JSX.Element; +}, {}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/userRelation/list/index.js b/lib/pages/userRelation/list/index.js index 20320c6c2..a4331030c 100644 --- a/lib/pages/userRelation/list/index.js +++ b/lib/pages/userRelation/list/index.js @@ -176,8 +176,8 @@ exports.default = OakComponent({ entityId: '', redirectToAfterConfirm: {}, qrCodeType: '', - onUpdate: function (id) { return undefined; }, - onCreate: function () { return undefined; }, + onUpdate: function (id) { }, + onCreate: function () { }, }, data: { searchValue: '', diff --git a/lib/pages/userRelation/list/index.json b/lib/pages/userRelation/list/index.json index 012c1b05e..087c1ef2c 100644 --- a/lib/pages/userRelation/list/index.json +++ b/lib/pages/userRelation/list/index.json @@ -8,6 +8,7 @@ "l-tag": "@oak-frontend-base/miniprogram_npm/lin-ui/tag/index", "l-list": "@oak-frontend-base/miniprogram_npm/lin-ui/list/index", "l-dialog": "@oak-frontend-base/miniprogram_npm/lin-ui/dialog/index", - "l-action-sheet": "@oak-frontend-base/miniprogram_npm/lin-ui/action-sheet/index" + "l-action-sheet": "@oak-frontend-base/miniprogram_npm/lin-ui/action-sheet/index", + "l-status-show": "@oak-frontend-base/miniprogram_npm/lin-ui/status-show/index" } } diff --git a/lib/pages/userRelation/list/index.xml b/lib/pages/userRelation/list/index.xml index e7b1e3f4b..dda6a23cf 100644 --- a/lib/pages/userRelation/list/index.xml +++ b/lib/pages/userRelation/list/index.xml @@ -51,10 +51,8 @@ - - 没有相关人员 - - + + void; confirmDelete: (id: string) => Promise; goUpdate: (id: string) => void; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/userRelation/list/web.pc.d.ts b/lib/pages/userRelation/list/web.pc.d.ts index 211d1d7e3..e7fee118d 100644 --- a/lib/pages/userRelation/list/web.pc.d.ts +++ b/lib/pages/userRelation/list/web.pc.d.ts @@ -11,4 +11,4 @@ export default function Render(props: WebComponentProps void; goUpdate: (id: string) => void; confirmDelete: (id: string) => Promise; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/userRelation/onEntity/web.d.ts b/lib/pages/userRelation/onEntity/web.d.ts index 11df1296a..f4a1e98f8 100644 --- a/lib/pages/userRelation/onEntity/web.d.ts +++ b/lib/pages/userRelation/onEntity/web.d.ts @@ -1 +1 @@ -export default function render(this: any): JSX.Element; +export default function render(this: any): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/userRelation/upsert/byMobile/index.less b/lib/pages/userRelation/upsert/byMobile/index.less index 4ece32700..9a5e10cd0 100644 --- a/lib/pages/userRelation/upsert/byMobile/index.less +++ b/lib/pages/userRelation/upsert/byMobile/index.less @@ -15,7 +15,6 @@ page { align-items: stretch; padding: 0; background-color: @oak-bg-color-container; - .safe-area-inset-bottom(); .r-o-u { flex: 1; diff --git a/lib/pages/userRelation/upsert/byMobile/index.xml b/lib/pages/userRelation/upsert/byMobile/index.xml index 20c81962c..a90503176 100644 --- a/lib/pages/userRelation/upsert/byMobile/index.xml +++ b/lib/pages/userRelation/upsert/byMobile/index.xml @@ -35,4 +35,9 @@ + + + + {{t('common::action.confirm')}} + \ No newline at end of file diff --git a/lib/pages/userRelation/upsert/byMobile/web.d.ts b/lib/pages/userRelation/upsert/byMobile/web.d.ts index cb0b70c8b..b2788ddcb 100644 --- a/lib/pages/userRelation/upsert/byMobile/web.d.ts +++ b/lib/pages/userRelation/upsert/byMobile/web.d.ts @@ -11,4 +11,4 @@ export default function Render(props: WebComponentProps Promise; onConfirm: () => Promise; onReset: () => void; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/userRelation/upsert/byMobile/web.pc.d.ts b/lib/pages/userRelation/upsert/byMobile/web.pc.d.ts index 59e8673cd..eb88c0233 100644 --- a/lib/pages/userRelation/upsert/byMobile/web.pc.d.ts +++ b/lib/pages/userRelation/upsert/byMobile/web.pc.d.ts @@ -13,4 +13,4 @@ export default function Render(props: WebComponentProps Promise; onConfirm: () => Promise; onReset: () => void; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/userRelation/upsert/byUser/index.xml b/lib/pages/userRelation/upsert/byUser/index.xml index fec886fc1..93f82e307 100644 --- a/lib/pages/userRelation/upsert/byUser/index.xml +++ b/lib/pages/userRelation/upsert/byUser/index.xml @@ -4,6 +4,6 @@ - 确定 + {{t('common::action.confirm')}} \ No newline at end of file diff --git a/lib/pages/userRelation/upsert/byUser/web.d.ts b/lib/pages/userRelation/upsert/byUser/web.d.ts index 2bdc7e15c..b60014ab5 100644 --- a/lib/pages/userRelation/upsert/byUser/web.d.ts +++ b/lib/pages/userRelation/upsert/byUser/web.d.ts @@ -8,4 +8,4 @@ export default function Render(props: WebComponentProps Promise; onReset: () => void; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/userRelation/upsert/byUser/web.pc.d.ts b/lib/pages/userRelation/upsert/byUser/web.pc.d.ts index 2bdc7e15c..b60014ab5 100644 --- a/lib/pages/userRelation/upsert/byUser/web.pc.d.ts +++ b/lib/pages/userRelation/upsert/byUser/web.pc.d.ts @@ -8,4 +8,4 @@ export default function Render(props: WebComponentProps Promise; onReset: () => void; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/userRelation/upsert/byUserEntityGrant/web.d.ts b/lib/pages/userRelation/upsert/byUserEntityGrant/web.d.ts index e3bd1f0cd..ef5350143 100644 --- a/lib/pages/userRelation/upsert/byUserEntityGrant/web.d.ts +++ b/lib/pages/userRelation/upsert/byUserEntityGrant/web.d.ts @@ -14,5 +14,5 @@ export default function render(props: WebComponentProps void; setPeriod: (p: number) => void; setUnit: (u: Unit) => void; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; export {}; diff --git a/lib/pages/userRelation/upsert/byUserEntityGrant/web.js b/lib/pages/userRelation/upsert/byUserEntityGrant/web.js index d377df378..d53720984 100644 --- a/lib/pages/userRelation/upsert/byUserEntityGrant/web.js +++ b/lib/pages/userRelation/upsert/byUserEntityGrant/web.js @@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = require("tslib"); var jsx_runtime_1 = require("react/jsx-runtime"); var antd_mobile_1 = require("antd-mobile"); -var detail_1 = tslib_1.__importDefault(require("../../../../pages/userEntityGrant/detail")); +var detail_1 = tslib_1.__importDefault(require("../../../userEntityGrant/detail")); var web_module_less_1 = tslib_1.__importDefault(require("./web.module.less")); function render(props) { var _a = props.data, relations = _a.relations, userEntityGrant = _a.userEntityGrant, userEntityGrantId = _a.userEntityGrantId, period = _a.period, unit = _a.unit, maxes = _a.maxes, oakExecutable = _a.oakExecutable; diff --git a/lib/pages/userRelation/upsert/byUserEntityGrant/web.pc.d.ts b/lib/pages/userRelation/upsert/byUserEntityGrant/web.pc.d.ts index e28a125c9..d41e77c7c 100644 --- a/lib/pages/userRelation/upsert/byUserEntityGrant/web.pc.d.ts +++ b/lib/pages/userRelation/upsert/byUserEntityGrant/web.pc.d.ts @@ -18,5 +18,5 @@ export default function render(props: WebComponentProps void; setPeriod: (p: number) => void; setUnit: (u: Unit) => void; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; export {}; diff --git a/lib/pages/userRelation/upsert/byUserEntityGrant/web.pc.js b/lib/pages/userRelation/upsert/byUserEntityGrant/web.pc.js index 2f40a80de..feac0a575 100644 --- a/lib/pages/userRelation/upsert/byUserEntityGrant/web.pc.js +++ b/lib/pages/userRelation/upsert/byUserEntityGrant/web.pc.js @@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = require("tslib"); var jsx_runtime_1 = require("react/jsx-runtime"); var antd_1 = require("antd"); -var detail_1 = tslib_1.__importDefault(require("../../../../pages/userEntityGrant/detail")); +var detail_1 = tslib_1.__importDefault(require("../../../userEntityGrant/detail")); var web_module_less_1 = tslib_1.__importDefault(require("./web.module.less")); function render(props) { var _a = props.data, relations = _a.relations, userEntityGrant = _a.userEntityGrant, userEntityGrantId = _a.userEntityGrantId, period = _a.period, unit = _a.unit, maxes = _a.maxes, oakExecutable = _a.oakExecutable; diff --git a/lib/pages/userRelation/upsert/onUser/index.less b/lib/pages/userRelation/upsert/onUser/index.less index ae768a4da..9ed0c4f01 100644 --- a/lib/pages/userRelation/upsert/onUser/index.less +++ b/lib/pages/userRelation/upsert/onUser/index.less @@ -8,18 +8,6 @@ page { flex-direction: column; } -.page-body { - display: flex; - flex-direction: column; - flex: 1; - background-color: @oak-bg-color-page; - .safe-area-inset-bottom(); - - .card { - margin-top: 20rpx; - } -} - .component-body { height: 100%; display: flex; diff --git a/lib/pages/userRelation/upsert/onUser/index.xml b/lib/pages/userRelation/upsert/onUser/index.xml index 377487b30..af7fa4f6c 100644 --- a/lib/pages/userRelation/upsert/onUser/index.xml +++ b/lib/pages/userRelation/upsert/onUser/index.xml @@ -1,4 +1,4 @@ - + 权限: diff --git a/lib/pages/userRelation/upsert/onUser/userRelation/web.d.ts b/lib/pages/userRelation/upsert/onUser/userRelation/web.d.ts index 677e28c07..e7fa0a695 100644 --- a/lib/pages/userRelation/upsert/onUser/userRelation/web.d.ts +++ b/lib/pages/userRelation/upsert/onUser/userRelation/web.d.ts @@ -8,4 +8,4 @@ export default function Render(props: WebComponentProps void; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/userRelation/upsert/onUser/userRelation/web.pc.d.ts b/lib/pages/userRelation/upsert/onUser/userRelation/web.pc.d.ts index 677e28c07..e7fa0a695 100644 --- a/lib/pages/userRelation/upsert/onUser/userRelation/web.pc.d.ts +++ b/lib/pages/userRelation/upsert/onUser/userRelation/web.pc.d.ts @@ -8,4 +8,4 @@ export default function Render(props: WebComponentProps void; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/userRelation/upsert/onUser/web.d.ts b/lib/pages/userRelation/upsert/onUser/web.d.ts index 2b0e5b799..48b947378 100644 --- a/lib/pages/userRelation/upsert/onUser/web.d.ts +++ b/lib/pages/userRelation/upsert/onUser/web.d.ts @@ -15,4 +15,4 @@ export default function Render(props: WebComponentProps Promise; onConfirm: () => Promise; onReset: () => void; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/userRelation/upsert/onUser/web.pc.d.ts b/lib/pages/userRelation/upsert/onUser/web.pc.d.ts index fbcea650f..9570f51d2 100644 --- a/lib/pages/userRelation/upsert/onUser/web.pc.d.ts +++ b/lib/pages/userRelation/upsert/onUser/web.pc.d.ts @@ -16,4 +16,4 @@ export default function Render(props: WebComponentProps Promise; onConfirm: () => Promise; onReset: () => void; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/userRelation/upsert/web.pc.d.ts b/lib/pages/userRelation/upsert/web.pc.d.ts index 7a94d476e..1c0d32030 100644 --- a/lib/pages/userRelation/upsert/web.pc.d.ts +++ b/lib/pages/userRelation/upsert/web.pc.d.ts @@ -11,4 +11,4 @@ export default function Render(props: WebComponentProps): JSX.Element; +}, {}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/wechatLogin/confirm/web.d.ts b/lib/pages/wechatLogin/confirm/web.d.ts index cf97ae016..9da1f64f5 100644 --- a/lib/pages/wechatLogin/confirm/web.d.ts +++ b/lib/pages/wechatLogin/confirm/web.d.ts @@ -14,4 +14,4 @@ export default function Render(props: WebComponentProps void; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/wechatPublic/tag/list/web.pc.d.ts b/lib/pages/wechatPublic/tag/list/web.pc.d.ts index 2943b15f4..c7442b170 100644 --- a/lib/pages/wechatPublic/tag/list/web.pc.d.ts +++ b/lib/pages/wechatPublic/tag/list/web.pc.d.ts @@ -8,4 +8,4 @@ export default function Render(props: WebComponentProps void; goUpdate: (id: string) => void; goDelete: (id: string) => void; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/wechatPublic/tag/upsert/web.d.ts b/lib/pages/wechatPublic/tag/upsert/web.d.ts index ea8ebaaf2..497eb4825 100644 --- a/lib/pages/wechatPublic/tag/upsert/web.d.ts +++ b/lib/pages/wechatPublic/tag/upsert/web.d.ts @@ -6,4 +6,4 @@ export default function Render(props: WebComponentProps void; -}>): JSX.Element; +}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/wechatQrCode/scan/web.d.ts b/lib/pages/wechatQrCode/scan/web.d.ts index 46a945cb3..06b00c6a4 100644 --- a/lib/pages/wechatQrCode/scan/web.d.ts +++ b/lib/pages/wechatQrCode/scan/web.d.ts @@ -4,4 +4,4 @@ export default function render(props: WebComponentProps): JSX.Element; +}, {}>): import("react/jsx-runtime").JSX.Element; diff --git a/lib/pages/wechatUser/login/web.d.ts b/lib/pages/wechatUser/login/web.d.ts index 55440ed77..426085b42 100644 --- a/lib/pages/wechatUser/login/web.d.ts +++ b/lib/pages/wechatUser/login/web.d.ts @@ -3,4 +3,4 @@ import { WebComponentProps } from 'oak-frontend-base'; export default function render(props: WebComponentProps): JSX.Element; +}, {}>): import("react/jsx-runtime").JSX.Element; diff --git a/src/data/i18n.ts b/src/data/i18n.ts index 10d8cd333..424cc7162 100644 --- a/src/data/i18n.ts +++ b/src/data/i18n.ts @@ -245,7 +245,65 @@ const i18ns: I18n[] = [ } }, { - id: "491aa39ba7ec77e4c21d1b6ea6a648f9", + id: "0637e049611c35325530219085fd9acb", + namespace: "oak-general-business-c-userRelation-list", + language: "zh-CN", + module: "oak-general-business", + position: "src/components/userRelation/list", + data: { + "confirmRevokeAll": "确认删除用户的所有权限吗?", + "search": "搜索用户名" + } + }, + { + id: "2e6bf38a80fd7e5f42e22a4cc8f0303f", + namespace: "oak-general-business-c-userRelation-upsert-byMobile", + language: "zh-CN", + module: "oak-general-business", + position: "src/components/userRelation/upsert/byMobile", + data: { + "inputMobile": "请输入手机号查找" + } + }, + { + id: "c9a343e53c3768d1b66d320370260beb", + namespace: "oak-general-business-c-userRelation-upsert-byUserEntityGrant", + language: "zh-CN", + module: "oak-general-business", + position: "src/components/userRelation/upsert/byUserEntityGrant", + data: { + "single": "单次", + "unlimited": "不限", + "restart": "重新生成", + "chooseNumber": "请选择分享的目标人数", + "chooseExpiresAt": "请选择有效时长", + "expiresHelp": "支持分钟、小时选择", + "shareCode": "请将二维码发给待分享权限的用户使用微信扫描", + "unit": { + "hour": "小时", + "minute": "分钟" + } + } + }, + { + id: "557e5ea860a6f3a536628c31de841462", + namespace: "oak-general-business-c-userRelation-upsert-onUser", + language: "zh-CN", + module: "oak-general-business", + position: "src/components/userRelation/upsert/onUser", + data: { + "placeholder": { + "name": "请输入姓名", + "password": "密码不少于8位", + "relation": "至少应选择一个权限" + }, + "auth": "权限", + "existedUser": "现有用户", + "newUser": "新建用户" + } + }, + { + id: "c636a9f371fc6da432ca925f3b865071", namespace: "oak-general-business-c-wechatUser-unbindBtn", language: "zh-CN", module: "oak-general-business", @@ -256,11 +314,11 @@ const i18ns: I18n[] = [ } }, { - id: "e07ce685f0383e7f7f3ce86501567f28", - namespace: "oak-general-business-l-common", + id: "c92ab50ae7c0980c7a8cde78031a9ca9", + namespace: "oak-general-business-l-Common", language: "zh-CN", module: "oak-general-business", - position: "locales/common", + position: "locales/Common", data: { "noData": "暂无数据", "areYouSure": "请确认",