给WechatMpConfig增加了getPhone的配置

This commit is contained in:
Xu Chang 2025-10-31 16:57:46 +08:00
parent b1c33ebd9c
commit 83f0879d0c
169 changed files with 622 additions and 412 deletions

View File

@ -103,7 +103,7 @@ export async function createSession(params, context) {
origin: 'wechat',
type: 'image',
tag1: 'image',
objectId: await generateNewIdAsync(), // 这个域用来标识唯一性
objectId: await generateNewIdAsync(),
sort: 1000,
uploadState: 'success',
extra1: data.MediaId,
@ -128,7 +128,7 @@ export async function createSession(params, context) {
origin: 'wechat',
type: 'video',
tag1: 'video',
objectId: await generateNewIdAsync(), // 这个域用来标识唯一性
objectId: await generateNewIdAsync(),
sort: 1000,
uploadState: 'success',
extra1: data.MediaId,
@ -150,7 +150,7 @@ export async function createSession(params, context) {
origin: 'wechat',
type: 'audio',
tag1: 'audio',
objectId: await generateNewIdAsync(), // 这个域用来标识唯一性
objectId: await generateNewIdAsync(),
sort: 1000,
uploadState: 'success',
extra1: data.MediaId,

View File

@ -19,6 +19,6 @@ export declare function syncMessageTemplate<ED extends EntityDict>(params: {
example: string;
keywordEnumValueList: {
keywordCode: string;
enumValueList: Array<string>;
enumValueList: string[];
}[];
}[]>;

View File

@ -3,7 +3,7 @@ import WechatSDK from 'oak-external-sdk/lib/WechatSDK';
import { assert } from 'oak-domain/lib/utils/assert';
import { OakPreConditionUnsetException, OakRowInconsistencyException, OakUnloggedInException, OakUserException, OakOperationUnpermittedException, } from 'oak-domain/lib/types';
import { composeFileUrl } from '../utils/cos/index.backend';
import { OakChangeLoginWayException, OakDistinguishUserException, OakUserDisabledException, } from '../types/Exception';
import { OakChangeLoginWayException, OakDistinguishUserException, OakIncompleteConfig, OakUserDisabledException, } from '../types/Exception';
import { encryptPasswordSha1 } from '../utils/password';
import { tokenProjection } from '../types/Projection';
import { sendSms } from '../utils/sms';
@ -1991,7 +1991,9 @@ export async function sendCaptchaByMobile({ mobile, env, type: captchaType, }, c
}, {
dontCollect: true,
});
assert(applicationPassport?.passport);
if (!applicationPassport?.passport) {
throw new OakIncompleteConfig(application.id);
}
const config = applicationPassport.passport.config;
const mockSend = config.mockSend;
const codeTemplateName = config.templateName;
@ -2467,8 +2469,8 @@ export async function refreshToken(params, context) {
// 只有server模式去刷新token
// 'development' | 'production' | 'staging'
const intervals = {
development: 7200 * 1000, // 2小时
staging: 600 * 1000, // 十分钟
development: 7200 * 1000,
staging: 600 * 1000,
production: 600 * 1000, // 十分钟
};
let applicationId = token.applicationId;

View File

@ -49,6 +49,28 @@ export async function mergeUser(params, context, innerLogic) {
}
}
} */
// 如果from是rootto也得赋上
const [fromUser] = await context.select('user', {
data: {
id: 1,
isRoot: 1,
},
filter: {
id: from,
}
}, { dontCollect: true });
if (fromUser.isRoot) {
await context.operate('user', {
id: await generateNewIdAsync(),
action: 'update',
data: {
isRoot: true,
},
filter: {
id: to,
},
}, {});
}
await context.operate('token', {
id: await generateNewIdAsync(),
action: 'disable',

View File

@ -162,7 +162,7 @@ export async function createWechatQrCode(options, context) {
permanent,
url,
expired: false,
expiresAt: Date.now() + 2592000 * 1000, // wecharQrCode里的过期时间都放到最大由上层关联对象来主动过期by Xc, 20230131)
expiresAt: Date.now() + 2592000 * 1000,
props,
};
// 直接创建

View File

@ -1,2 +1,3 @@
/// <reference types="wechat-miniprogram" />
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "address", true, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
export default _default;

View File

@ -1,2 +1,3 @@
/// <reference types="wechat-miniprogram" />
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "address", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
export default _default;

View File

@ -1,3 +1,4 @@
/// <reference types="@uiw/react-amap-types" />
import React from 'react';
export type PositionProps = {
loadUI: boolean;

View File

@ -1,3 +1,4 @@
/// <reference types="@uiw/react-amap-types" />
import React from 'react';
import { ModalProps } from 'antd';
import { GeolocationProps } from '@uiw/react-amap';

View File

@ -1,3 +1,4 @@
/// <reference types="@uiw/react-amap-types" />
import React from 'react';
import { MapProps, APILoaderConfig } from '@uiw/react-amap';
import './index.less';

View File

@ -1,2 +1,3 @@
/// <reference types="wechat-miniprogram" />
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "application", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
export default _default;

View File

@ -1,2 +1,3 @@
/// <reference types="wechat-miniprogram" />
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "application", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
export default _default;

View File

@ -1,2 +1,3 @@
/// <reference types="wechat-miniprogram" />
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "application", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
export default _default;

View File

@ -1,3 +1,4 @@
/// <reference types="wechat-miniprogram" />
import { EntityDict } from '../../../oak-app-domain';
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "application", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
export default _default;

View File

@ -1,2 +1,3 @@
/// <reference types="wechat-miniprogram" />
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "article", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
export default _default;

View File

@ -23,12 +23,12 @@ export default OakComponent({
tocFixed: true,
tocPosition: 'none',
highlightBgColor: 'none',
headerTop: 0, //页面中吸顶部分高度
headerTop: 0,
className: '',
scrollId: '', // 滚动条所在容器id不传默认body
scrollId: '',
tocWidth: undefined,
tocHeight: undefined,
showtitle: false, //大纲顶层显示文章名称
showtitle: false,
activeColor: undefined,
},
data: {

View File

@ -26,11 +26,11 @@ export default OakComponent({
properties: {
articleMenuId: '',
changeIsEdit: () => undefined,
tocPosition: 'none', //目录显示位置none为不显示目录
highlightBgColor: 'none', //点击目录时标题高亮背景色none为不显示高亮背景色
onArticlePreview: (content, title) => undefined, //预览文章
origin: 'qiniu', // 默认为七牛云
scrollId: '', // 滚动条所在容器id不传默认页面编辑器容器id
tocPosition: 'none',
highlightBgColor: 'none',
onArticlePreview: (content, title) => undefined,
origin: 'qiniu',
scrollId: '',
height: 600,
activeColor: undefined,
},

View File

@ -1,9 +1,10 @@
/// <reference types="react" />
import { GenerateUrlFn } from "../../../types/Article";
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "article", true, {
entityId: string;
articleMenuId: string | undefined;
generateUrl: GenerateUrlFn;
empty: React.ReactNode | undefined;
empty: import("react").ReactNode;
menuCheck: (isArticle: boolean) => void;
}>) => React.ReactElement;
export default _default;

View File

@ -28,12 +28,12 @@ export default OakComponent({
tocFixed: true,
tocPosition: 'none',
highlightBgColor: 'none',
headerTop: 0, //页面中吸顶部分高度
headerTop: 0,
className: '',
scrollId: '', // 滚动条所在容器id不传默认body
scrollId: '',
tocWidth: undefined,
tocHeight: undefined,
showtitle: false, //大纲顶层显示文章名称
showtitle: false,
activeColor: undefined,
},
methods: {},

View File

@ -4,7 +4,7 @@ export default OakComponent({
properties: {
articleMenuId: '',
onChildEditArticleChange: (data) => undefined,
show: 'edit', // edit为编辑doc为查看preview为预览
show: 'edit',
getBreadcrumbItemsByParent: (breadcrumbItems) => undefined,
breadcrumbItems: [],
drawerOpen: false,

View File

@ -25,11 +25,11 @@ export default OakComponent({
properties: {
articleMenuId: '',
changeIsEdit: () => undefined,
tocPosition: 'none', //目录显示位置none为不显示目录
highlightBgColor: 'none', //点击目录时标题高亮背景色none为不显示高亮背景色
onArticlePreview: (content, title) => undefined, //预览文章
origin: 'qiniu', // 默认为七牛云
scrollId: '', // 滚动条所在容器id不传默认页面编辑器容器id
tocPosition: 'none',
highlightBgColor: 'none',
onArticlePreview: (content, title) => undefined,
origin: 'qiniu',
scrollId: '',
height: 600,
activeColor: undefined,
},

View File

@ -1,3 +1,4 @@
/// <reference types="react" />
import { EntityDict } from "../../../oak-app-domain";
import { GenerateUrlFn } from "../../../types/Article";
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, keyof EntityDict, false, {
@ -5,8 +6,8 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
entityId: string;
title: string;
origin: string;
menuEmpty: React.ReactNode | undefined;
articleEmpty: React.ReactNode | undefined;
menuEmpty: import("react").ReactNode;
articleEmpty: import("react").ReactNode;
generateUrl: GenerateUrlFn;
}>) => React.ReactElement;
export default _default;

View File

@ -7,7 +7,7 @@ export default OakComponent({
entity: '',
entityId: '',
title: '',
origin: 'qiniu', // cos origin默认七牛云
origin: 'qiniu',
menuEmpty: undefined,
articleEmpty: undefined,
generateUrl: ((mode, type, id) => { }), //构造文章显示路由
@ -20,7 +20,7 @@ export default OakComponent({
showAddArticle: false,
showAddMenu: true,
parentId: '',
articleMenuId: '', //非空时展示atricle表格
articleMenuId: '',
unsub: undefined,
},
listeners: {

View File

@ -50,7 +50,7 @@ export default OakComponent({
};
},
properties: {
highlightBgColor: 'none', //点击文章目录时标题高亮背景色none为不显示高亮背景色
highlightBgColor: 'none',
allowHiddenMenu: false,
},
});

View File

@ -1,3 +1,4 @@
/// <reference types="react" />
import { GenerateUrlFn } from "../../../types/Article";
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "articleMenu", true, {
entity: string;
@ -6,7 +7,7 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
origin: string;
onMenuClick: (menuId: string, menuName: string, isArticle: boolean) => void;
onArticleClick: (atricleId: string) => void;
empty: React.ReactNode | undefined;
empty: import("react").ReactNode;
changeAddArticle: (show: boolean) => void;
generateUrl: GenerateUrlFn;
}>) => React.ReactElement;

View File

@ -93,7 +93,7 @@ export default OakComponent({
entity: '',
entityId: '',
parentId: '',
origin: 'qiniu', // cos origin默认七牛云
origin: 'qiniu',
onMenuClick: (menuId, menuName, isArticle) => undefined,
onArticleClick: (atricleId) => undefined,
empty: undefined,

View File

@ -47,7 +47,7 @@ export default OakComponent({
onRemove: () => undefined,
onUpdateName: async (name) => undefined,
onChildEditArticleChange: (data) => undefined,
show: 'edit', // edit为编辑doc为查看preview为预览
show: 'edit',
getBreadcrumbItemsByParent: (breadcrumbItems) => undefined,
breadItems: [],
drawerOpen: false,

View File

@ -6,7 +6,7 @@ export default OakComponent({
entityId: '',
parentId: '',
onGrandChildEditArticleChange: (data) => undefined,
show: 'edit', // edit为编辑doc为查看preview为预览
show: 'edit',
articleMenuId: '',
articleId: '',
getBreadcrumbItems: (breadcrumbItems) => undefined,

View File

@ -14,19 +14,19 @@ export default OakComponent({
properties: {
entity: '',
entityId: '',
show: 'edit', // edit为编辑doc为查看preview为预览
articleMenuId: '', // 菜单id
articleId: '', //文章id
tocPosition: 'none', //文章目录显示位置none为不显示目录
highlightBgColor: 'none', //点击文章目录时标题高亮背景色none为不显示高亮背景色
onMenuView: () => undefined, //查看全部菜单
onMenuViewById: (articleMenuId) => undefined, //查看指定id菜单
onArticleView: (articleId) => undefined, //查看文章
onArticlePreview: (content, title) => undefined, //预览文章
onArticleEdit: (articleId) => undefined, //编辑文章
show: 'edit',
articleMenuId: '',
articleId: '',
tocPosition: 'none',
highlightBgColor: 'none',
onMenuView: () => undefined,
onMenuViewById: (articleMenuId) => undefined,
onArticleView: (articleId) => undefined,
onArticlePreview: (content, title) => undefined,
onArticleEdit: (articleId) => undefined,
setCopyArticleUrl: (articleId) => '',
origin: 'qiniu', // cos origin默认七牛云
scrollId: '', // 滚动条所在容器id不传默认页面编辑器容器id
origin: 'qiniu',
scrollId: '',
activeColor: undefined, //目录高亮颜色
},
});

View File

@ -1,2 +1,3 @@
/// <reference types="wechat-miniprogram" />
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "user", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
export default _default;

View File

@ -1,2 +1,3 @@
/// <reference types="wechat-miniprogram" />
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "user", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
export default _default;

View File

@ -1,3 +1,4 @@
/// <reference types="node" />
import * as React from 'react';
type IDownloadProps = {
children?: React.ReactNode;
@ -8,9 +9,9 @@ type IDownloadProps = {
};
declare function Download(props: IDownloadProps): React.JSX.Element;
declare namespace Download {
var onDownload: (data: ArrayBuffer | ReadableStream, filename: string) => Promise<void>;
var onDownload: (data: ArrayBuffer | ReadableStream<any>, filename: string) => Promise<void>;
var base64ToBlob: (base64String: string) => Blob;
var arrayBufferToBase64: (buffer: Buffer) => string;
var base64ToArrayBuffer: (base64String: string) => ArrayBuffer;
var base64ToArrayBuffer: (base64String: string) => ArrayBufferLike;
}
export default Download;

View File

@ -4,8 +4,8 @@ import { ReactComponentProps } from 'oak-frontend-base';
import { ECode } from '../../../types/ErrorPage';
declare const _default: <ED2 extends EntityDict & BaseEntityDict, T2 extends keyof ED2>(props: ReactComponentProps<ED2, T2, false, {
code: ECode;
title?: string;
desc?: string;
title?: string | undefined;
desc?: string | undefined;
children?: React.ReactNode;
icon?: React.ReactNode;
}>) => React.ReactElement;

View File

@ -37,7 +37,7 @@ export default OakComponent({
code: '',
title: '',
desc: '',
icon: '', //web独有
icon: '',
imagePath: '', //小程序独有
},
lifetimes: {

View File

@ -2,21 +2,21 @@ import { EntityDict } from '../../../oak-app-domain';
import { EntityDict as BaseEntityDict } from 'oak-domain/lib/types/Entity';
import { ReactComponentProps } from 'oak-frontend-base';
declare const _default: <ED2 extends EntityDict & BaseEntityDict, T2 extends keyof ED2>(props: ReactComponentProps<ED2, T2, false, {
filename?: string;
expiresAt?: number;
filename?: string | undefined;
expiresAt?: number | undefined;
tips?: React.ReactNode;
onDownload?: (qrCodeImage: string, filename?: string) => void;
onRefresh?: () => void;
size?: number;
onDownload?: ((qrCodeImage: string, filename?: string) => void) | undefined;
onRefresh?: (() => void) | undefined;
size?: number | undefined;
url: string;
loading?: boolean;
disableDownload?: boolean;
loading?: boolean | undefined;
disableDownload?: boolean | undefined;
disabled: boolean;
color: string;
bgColor: string;
maskColor: string;
maskTextColor: string;
maskText: string;
mode: "simple" | "default";
mode: 'simple' | 'default';
}>) => React.ReactElement;
export default _default;

View File

@ -43,9 +43,9 @@ export default OakComponent({
return;
}
const qrCodeURL = qrcode.drawImg(url, {
typeNumber: 4, // 密度
errorCorrectLevel: 'L', // 纠错等级
size: size, // 白色边框
typeNumber: 4,
errorCorrectLevel: 'L',
size: size,
color,
bgColor
});
@ -77,8 +77,8 @@ export default OakComponent({
// 注意写入前需确保Base64数据已经去掉了数据URL前缀如"data:image/png;base64,"
fs.writeFile({
filePath: filePath,
data: base64Data, // 传入纯Base64字符串
encoding: 'base64', // 指定编码格式
data: base64Data,
encoding: 'base64',
success(res) {
// 文件写入成功后,检查并保存到相册
that.checkAuthAndSave(filePath);

View File

@ -6,11 +6,11 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
redDot: boolean;
text: string;
pagePath: string;
iconName?: string;
selectedIconName?: string;
iconPath?: string;
selectedIconPath?: string;
iconSize?: string;
iconName?: string | undefined;
selectedIconName?: string | undefined;
iconPath?: string | undefined;
selectedIconPath?: string | undefined;
iconSize?: string | undefined;
}[];
color: string;
selectedColor: string;

View File

@ -12,7 +12,7 @@ export default OakComponent({
color: '#666',
selectedColor: '',
border: false,
selectedIconPath: '', //一般在list设置
selectedIconPath: '',
iconPath: '',
},
lifetimes: {

View File

@ -1,5 +1,5 @@
import React from 'react';
import { Row, Col, Card, Divider, Input, Form, Space, Select, } from 'antd';
import { Row, Col, Card, Divider, Input, Form, Space, Select, Switch } from 'antd';
import Styles from './web.module.less';
export default function WechatMp(props) {
const { config, setValue } = props;
@ -33,6 +33,11 @@ export default function WechatMp(props) {
<>
<Input placeholder="请输入普通链接二维码规则" type="text" value={config?.qrCodePrefix} onChange={(e) => setValue(`qrCodePrefix`, e.target.value)}/>
</>
</Form.Item>
<Form.Item label="从微信获取手机号" tooltip="如果设置为真,小程序将从微信获取用户手机号,不设置则让用户手动输入">
<>
<Switch value={config?.getPhone} onChange={(e) => setValue(`getPhone`, e)}/>
</>
</Form.Item>
</Form>
</Col>

View File

@ -1,7 +1,7 @@
import { Style } from '../../../../types/Style';
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../../oak-app-domain").EntityDict, keyof import("../../../../oak-app-domain").EntityDict, false, {
style: Style;
entity: "system" | "platform" | "application";
entity: "platform" | "system" | "application";
entityId: string;
name: string;
}>) => React.ReactElement;

View File

@ -1,7 +1,7 @@
import { Config } from '../../../types/Config';
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, keyof import("../../../oak-app-domain").EntityDict, false, {
config: Config;
entity: "system" | "platform";
entity: "platform" | "system";
name: string;
entityId: string;
}>) => React.ReactElement;

View File

@ -1,2 +1,3 @@
/// <reference types="wechat-miniprogram" />
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "domain", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
export default _default;

View File

@ -1,2 +1,3 @@
/// <reference types="wechat-miniprogram" />
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "domain", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
export default _default;

View File

@ -1,3 +1,4 @@
/// <reference types="react" />
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';
@ -8,14 +9,31 @@ type AfterCommit = (() => void) | undefined;
type BeforeCommit = (() => boolean | undefined | Promise<boolean | undefined>) | undefined;
declare const _default: <ED2 extends EntityDict & BaseEntityDict, T2 extends keyof ED2>(props: ReactComponentProps<ED2, T2, true, {
entity: keyof ED2;
action?: string;
size?: ButtonProps["size"] | AmButtonProps["size"];
block?: boolean;
type?: ButtonProps["type"] | AmButtonProps["type"];
executeText?: string;
buttonProps?: ButtonProps & AmButtonProps;
action?: string | undefined;
size?: ButtonProps['size'] | AmButtonProps['size'];
block?: boolean | undefined;
type?: ButtonProps['type'] | AmButtonProps['type'];
executeText?: string | undefined;
buttonProps?: (ButtonProps & {
color?: "default" | "primary" | "success" | "warning" | "danger" | undefined;
fill?: "none" | "solid" | "outline" | undefined;
size?: "small" | "large" | "middle" | "mini" | undefined;
block?: boolean | undefined;
loading?: boolean | "auto" | undefined;
loadingText?: string | undefined;
loadingIcon?: import("react").ReactNode;
disabled?: boolean | undefined;
onClick?: ((event: import("react").MouseEvent<HTMLButtonElement, MouseEvent>) => unknown) | undefined;
type?: "reset" | "submit" | "button" | undefined;
shape?: "default" | "rounded" | "rectangular" | undefined;
children?: import("react").ReactNode;
} & Pick<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement>, "id" | "onMouseUp" | "onMouseDown" | "onTouchStart" | "onTouchEnd"> & {
className?: string | undefined;
style?: (import("react").CSSProperties & Partial<Record<"--text-color" | "--background-color" | "--border-radius" | "--border-width" | "--border-style" | "--border-color", string>>) | undefined;
tabIndex?: number | undefined;
} & import("react").AriaAttributes) | undefined;
afterCommit?: AfterCommit;
beforeCommit?: BeforeCommit;
messageProps?: MessageProps | boolean;
messageProps?: boolean | MessageProps | undefined;
}>) => React.ReactElement;
export default _default;

View File

@ -20,7 +20,7 @@ declare const _default: <ED2 extends EntityDict & BaseEntityDict, T2 extends key
extension: string[];
selectCount: number;
sourceType: SourceType[];
mediaType: ("image" | "video")[];
mediaType: ('image' | 'video')[];
mode: ImageMode;
size: number;
showUploadList: boolean;
@ -52,7 +52,7 @@ declare const _default: <ED2 extends EntityDict & BaseEntityDict, T2 extends key
aspect: number;
minZoom: number;
maxZoom: number;
cropShape: "rect" | "round";
cropShape: 'rect' | 'round';
cropperProps: object;
modalTitle: string;
modalWidth: string;
@ -67,7 +67,7 @@ declare const _default: <ED2 extends EntityDict & BaseEntityDict, T2 extends key
minHeight: number;
compressWidth: number;
compressHeight: number;
resize: "contain" | "cover" | "none";
resize: 'contain' | 'cover' | 'none';
compressQuality: number;
mimeType: string;
convertTypes: string[];

View File

@ -47,19 +47,19 @@ export default OakComponent({
bucket: '',
autoUpload: false,
maxNumber: 20,
extension: [], //小程序独有 chooseMessageFile
selectCount: 1, // 每次打开图片时,可选中的数量 小程序独有
sourceType: ['album', 'camera'], // 小程序独有 chooseMedia
mediaType: ['image'], // 小程序独有 chooseMedia
mode: 'aspectFit', // 图片显示模式
size: 3, // 每行可显示的个数 小程序独有
showUploadList: true, //web独有
showUploadProgress: false, // web独有
accept: 'image/*', // web独有
disablePreview: false, // 图片是否可预览
disableDelete: false, // 图片是否可删除
disableAdd: false, // 上传按钮隐藏
disableDownload: false, // 下载按钮隐藏
extension: [],
selectCount: 1,
sourceType: ['album', 'camera'],
mediaType: ['image'],
mode: 'aspectFit',
size: 3,
showUploadList: true,
showUploadProgress: false,
accept: 'image/*',
disablePreview: false,
disableDelete: false,
disableAdd: false,
disableDownload: false,
type: 'image',
origin: 'qiniu',
tag1: '',
@ -67,40 +67,40 @@ export default OakComponent({
entity: '',
entityId: '',
theme: 'image',
enableCrop: false, //启用裁剪
enableCompross: false, //启用压缩
enableCrop: false,
enableCompross: false,
//图片裁剪
cropQuality: 1, //图片裁剪质量范围0 ~ 1
showRest: false, //显示重置按钮,重置缩放及旋转
showGrid: false, //显示裁切区域网格(九宫格)
fillColor: 'white', //裁切图像填充色
rotationSlider: false, //图片旋转控制
aspectSlider: false, //裁切比率控制
zoomSlider: true, //图片缩放控制
resetText: '重置', //重置按钮文字
aspect: 1 / 1, //裁切区域宽高比width / height
minZoom: 1, //最小缩放倍数
maxZoom: 3, //最大缩放倍数
cropShape: 'rect', //裁切区域形状,'rect' 或 'round'
cropperProps: {}, //recat-easy-crop的props
modalTitle: '编辑图片', //弹窗标题
modalWidth: '40vw', //弹窗宽度
modalOk: '确定', //确定按钮文字
modalCancel: '取消', //取消按钮的文字
cropQuality: 1,
showRest: false,
showGrid: false,
fillColor: 'white',
rotationSlider: false,
aspectSlider: false,
zoomSlider: true,
resetText: '重置',
aspect: 1 / 1,
minZoom: 1,
maxZoom: 3,
cropShape: 'rect',
cropperProps: {},
modalTitle: '编辑图片',
modalWidth: '40vw',
modalOk: '确定',
modalCancel: '取消',
//图片压缩
strict: true, //当压缩后的图片尺寸大于原图尺寸时输出原图
checkOrientation: true, //读取图像的Exif方向值并自动旋转或翻转图像仅限 JPEG 图像)
retainExif: false, //压缩后保留图片的Exif信息
maxWidth: Infinity, //输出图片的最大宽度值需大于0
maxHeight: Infinity, //输出图片的最大高度值需大于0
minWidth: 0, //输出图片的最小宽度值需大于0且不应大于maxWidth
minHeight: 0, //输出图片的最小高度。值需大于0且不应大于maxHeight
compressWidth: undefined, //输出图像的宽度。如果未指定则将使用原始图像的宽度若设置了height则宽度将根据自然纵横比自动计算。
compressHeight: undefined, //输出图像的高度。如果未指定则将使用原始图像的高度若设置了width则高度将根据自然纵横比自动计算。
resize: 'none', //仅在同时指定了width和height时生效
compressQuality: 0.8, //输出图像的质量。范围0 ~ 1
mimeType: 'auto', //输出图片的 MIME 类型。默认情况下,将使用源图片文件的原始 MIME 类型。
convertTypes: ['image/png'], //文件类型包含在其中且文件大小超过该convertSize值的文件将被转换为 JPEG。
strict: true,
checkOrientation: true,
retainExif: false,
maxWidth: Infinity,
maxHeight: Infinity,
minWidth: 0,
minHeight: 0,
compressWidth: undefined,
compressHeight: undefined,
resize: 'none',
compressQuality: 0.8,
mimeType: 'auto',
convertTypes: ['image/png'],
convertSize: Infinity, //文件类型包含在convertTypes中且文件大小超过此值的文件将转换为 JPEGInfinity表示禁用该功能
},
features: ['extraFile'],

View File

@ -13,7 +13,7 @@ export default function render(props) {
};
return (<>
{enableCrop ? (<ImgCrop showReset={showRest} showGrid={showGrid} fillColor={fillColor} rotationSlider={rotationSlider} aspectSlider={aspectSlider} zoomSlider={zoomSlider} resetText={resetText} aspect={aspect} minZoom={minZoom} maxZoom={maxZoom} cropShape={cropShape} quality={cropQuality} cropperProps={{
restrictPosition: false, //允许移动图片位置
restrictPosition: false,
...cropperProps,
}} modalTitle={modalTitle} modalWidth={modalWidth} modalOk={modalOk} modalCancel={modalCancel}>
<ExtrafileUpload oakPath={oakFullpath} bucket={bucket} autoUpload={autoUpload} maxNumber={maxNumber} mode={mode} showUploadList={showUploadList} showUploadProgress={showUploadProgress} accept={accept} disablePreview={disablePreview} disableDelete={disableDelete} disableAdd={disableAdd} disableDownload={disableDownload} disabled={disabled} type={type} origin={origin} tag1={tag1} tag2={tag2} entity={entity} entityId={entityId} theme={theme} children={children} beforeUpload={async (file) => {

View File

@ -55,9 +55,9 @@ export default OakComponent({
data: {
isModalOpen: false,
isModalOpen1: false,
renderImgs: [], // 读取的原文图片在modal使用
renderImgs: [],
methodsType: '',
bridgeUrl: '', // 通过桥接方式获得的url
bridgeUrl: '',
selectedId: -1,
},
properties: {

View File

@ -11,6 +11,6 @@ declare const _default: <ED2 extends EntityDict & BaseEntityDict, T2 extends key
tag2: string;
entity: keyof ED2;
entityId: string;
style?: string;
style?: string | undefined;
}>) => React.ReactElement;
export default _default;

View File

@ -67,10 +67,10 @@ export default OakComponent({
},
],
properties: {
mode: 'aspectFit', // 图片显示模式
size: 3, // 每行可显示的个数 小程序独有
disablePreview: false, // 图片是否可预览
disableDownload: false, // 下载按钮隐藏
mode: 'aspectFit',
size: 3,
disablePreview: false,
disableDownload: false,
tag1: '',
tag2: '',
entity: '',

View File

@ -1,3 +1,4 @@
/// <reference types="react" />
import { EntityDict } from '../../../oak-app-domain';
import { FileState } from '../../../features/extraFile';
import { EntityDict as BaseEntityDict } from 'oak-domain/lib/types/Entity';
@ -20,7 +21,7 @@ declare const _default: <ED2 extends EntityDict & BaseEntityDict, T2 extends key
extension: string[];
selectCount: number;
sourceType: SourceType[];
mediaType: ("image" | "video")[];
mediaType: ('image' | 'video')[];
mode: ImageMode;
size: number;
showUploadList: boolean;
@ -39,8 +40,8 @@ declare const _default: <ED2 extends EntityDict & BaseEntityDict, T2 extends key
entityId: string;
theme: Theme;
children?: React.ReactNode;
style?: React.CSSProperties;
className?: string;
style?: import("react").CSSProperties | undefined;
className?: string | undefined;
beforeUpload: (file: File) => Promise<string>;
}>) => React.ReactElement;
export default _default;

View File

@ -50,19 +50,19 @@ export default OakComponent({
bucket: '',
autoUpload: false,
maxNumber: 20,
extension: [], //小程序独有 chooseMessageFile
selectCount: 1, // 每次打开图片时,可选中的数量 小程序独有
sourceType: ['album', 'camera'], // 小程序独有 chooseMedia
mediaType: ['image'], // 小程序独有 chooseMedia
mode: 'aspectFit', // 图片显示模式
size: 3, // 每行可显示的个数 小程序独有
showUploadList: true, //web独有
showUploadProgress: false, // web独有
accept: 'image/*', // web独有
disablePreview: false, // 图片是否可预览
disableDelete: false, // 图片是否可删除
disableAdd: false, // 上传按钮隐藏
disableDownload: false, // 下载按钮隐藏
extension: [],
selectCount: 1,
sourceType: ['album', 'camera'],
mediaType: ['image'],
mode: 'aspectFit',
size: 3,
showUploadList: true,
showUploadProgress: false,
accept: 'image/*',
disablePreview: false,
disableDelete: false,
disableAdd: false,
disableDownload: false,
type: 'image',
origin: 'qiniu',
tag1: '',
@ -147,7 +147,7 @@ export default OakComponent({
type,
tag1,
tag2,
objectId: generateNewId(), // 这个域用来标识唯一性
objectId: generateNewId(),
entity,
filename,
size,

View File

@ -8,23 +8,23 @@ export interface UploadHandle {
}
declare const _default: React.ForwardRefExoticComponent<WebComponentProps<EntityDict, "extraFile", true, {
files: EnhancedExtraFile[];
accept?: string;
maxNumber?: number;
multiple?: boolean;
draggable?: boolean;
theme?: Theme;
beforeUpload?: (file: File) => Promise<boolean> | boolean;
style?: React.CSSProperties;
className?: string;
directory?: boolean;
onPreview?: (file: UploadFile<any>) => void;
onDownload?: (file: UploadFile<any>) => void;
showUploadList?: boolean;
children?: JSX.Element;
disableInsert?: boolean;
disableDownload?: boolean;
disableDelete?: boolean;
disablePreview?: boolean;
accept?: string | undefined;
maxNumber?: number | undefined;
multiple?: boolean | undefined;
draggable?: boolean | undefined;
theme?: Theme | undefined;
beforeUpload?: ((file: File) => Promise<boolean> | boolean) | undefined;
style?: React.CSSProperties | undefined;
className?: string | undefined;
directory?: boolean | undefined;
onPreview?: ((file: UploadFile<any>) => void) | undefined;
onDownload?: ((file: UploadFile<any>) => void) | undefined;
showUploadList?: boolean | undefined;
children?: JSX.Element | undefined;
disableInsert?: boolean | undefined;
disableDownload?: boolean | undefined;
disableDelete?: boolean | undefined;
disablePreview?: boolean | undefined;
}, {
onRemove: (file: UploadFile) => void;
addFileByWeb: (file: UploadFile) => void;

View File

@ -1,2 +1,3 @@
/// <reference types="wechat-miniprogram" />
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, keyof import("../../../oak-app-domain").EntityDict, boolean, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
export default _default;

View File

@ -1,2 +1,3 @@
/// <reference types="wechat-miniprogram" />
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "message", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
export default _default;

View File

@ -1,2 +1,3 @@
/// <reference types="wechat-miniprogram" />
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "message", true, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
export default _default;

View File

@ -1,6 +1,6 @@
import { EntityDict } from '../../../oak-app-domain';
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "messageTypeSmsTemplate", true, {
systemId: string;
origin: EntityDict["smsTemplate"]["Schema"]["origin"];
origin: import("../../../oak-app-domain/SmsTemplate/_baseSchema").Origin;
}>) => React.ReactElement;
export default _default;

View File

@ -2,6 +2,6 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
onlyCaptcha: boolean;
onlyPassword: boolean;
eventLoggedIn: string;
callback: ((() => void) | undefined);
callback: (() => void) | undefined;
}>) => React.ReactElement;
export default _default;

View File

@ -1,2 +1,3 @@
/// <reference types="wechat-miniprogram" />
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "mobile", true, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
export default _default;

View File

@ -29,7 +29,9 @@ export default OakComponent({
const isSelf = userId === myId;
const mobiles = origin ? origin : data;
const creatingOnes = origin && differenceBy(data, origin, 'id');
const { config } = features.application.getApplication();
return {
getPhone: !!config.getPhone,
isRoot,
tokenMobileId,
mobiles,

View File

@ -37,23 +37,27 @@
</block>
<block wx:if="{{ allowCreate }}">
<view class="btn-container">
<l-button
style="flex: 1"
size="long"
bind:lintap="onAddOpenMp"
>
{{t('common::action.add')}}{{t('mobile:name')}}
</l-button>
<l-button
style="flex: 1"
bg-color="#04BE02"
type="default"
size="long"
loading="{{ refreshing }}"
open-type="getPhoneNumber"
bindgetphonenumber="onRefreshMobileMp">
{{t('common::action.grant')}}{{t('mobile:name')}}
</l-button>
<block wx:if="{{!getPhone}}">
<l-button
style="flex: 1"
size="long"
bind:lintap="onAddOpenMp"
>
{{t('common::action.add')}}{{t('mobile:name')}}
</l-button>
</block>
<block wx:else>
<l-button
style="flex: 1"
bg-color="#04BE02"
type="default"
size="long"
loading="{{ refreshing }}"
open-type="getPhoneNumber"
bindgetphonenumber="onRefreshMobileMp">
{{t('common::action.grant')}}{{t('mobile:name')}}
</l-button>
</block>
</view>
</block>
</block>

View File

@ -1,6 +1,6 @@
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, keyof import("../../../oak-app-domain").EntityDict, false, {
shape: string;
size: number | string;
size: string | number;
iconColor: string;
iconName: string;
}>) => React.ReactElement;

View File

@ -1,2 +1,3 @@
/// <reference types="wechat-miniprogram" />
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, keyof import("../../../oak-app-domain").EntityDict, false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
export default _default;

View File

@ -1,3 +1,4 @@
/// <reference types="wechat-miniprogram" />
import { EntityDict } from '../../../oak-app-domain';
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, keyof EntityDict, false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
export default _default;

View File

@ -5,7 +5,7 @@ declare const _default: <ED2 extends EntityDict & BaseEntityDict, T2 extends key
entity: keyof ED2;
entityId: string;
relation: string;
redirectTo: EntityDict["parasite"]["Schema"]["redirectTo"];
redirectTo: EntityDict['parasite']['Schema']['redirectTo'];
multiple: boolean;
nameLabel: string;
nameRequired: boolean;

View File

@ -1,2 +1,3 @@
/// <reference types="wechat-miniprogram" />
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "platform", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
export default _default;

View File

@ -1,2 +1,3 @@
/// <reference types="wechat-miniprogram" />
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "platform", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
export default _default;

View File

@ -1,2 +1,3 @@
/// <reference types="wechat-miniprogram" />
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "platform", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
export default _default;

View File

@ -1,7 +1,7 @@
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, keyof import("../../../oak-app-domain").EntityDict, false, {
sessionId: string;
isEntity: boolean;
entityDisplay: (data: any) => Array<any>;
entityDisplay: (data: any) => any[];
entityProjection: any;
}>) => React.ReactElement;
export default _default;

View File

@ -20,7 +20,7 @@ export default OakComponent({
properties: {
sessionId: '',
isEntity: false,
entityDisplay: (data) => [], // user端指示如何显示entity对象名称
entityDisplay: (data) => [],
entityProjection: null, // user端指示需要取哪些entity的属性来显示entityDisplay
},
methods: {

View File

@ -1,2 +1,3 @@
/// <reference types="wechat-miniprogram" />
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, keyof import("../../../oak-app-domain").EntityDict, false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
export default _default;

View File

@ -4,10 +4,10 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
entity: string;
entityFilter: any;
entityFilterSubStr: string;
entityDisplay: (data: EntityDict["session"]["Schema"][] | RowWithActions<EntityDict, "session">[]) => Array<any>;
entityDisplay: (data: EntityDict['session']['Schema'][] | RowWithActions<EntityDict, 'session'>[]) => any[];
entityProjection: any;
sessionId: string;
dialog: boolean;
onItemClick: ((sessionId: string) => {}) | undefined | null;
onItemClick: ((sessionId: string) => {}) | null | undefined;
}>) => React.ReactElement;
export default _default;

View File

@ -140,12 +140,12 @@ export default OakComponent({
unSub: undefined,
},
properties: {
entity: '', // entity端指示相应的entity
entityFilter: null, // entity端指示相应的entity查询条件
entity: '',
entityFilter: null,
entityFilterSubStr: '',
entityDisplay: (data) => [], // user端指示如何显示entity对象名称
entityProjection: null, // user端指示需要取哪些entity的属性来显示entityDisplay
sessionId: '', // 指示需要打开的默认session
entityDisplay: (data) => [],
entityProjection: null,
sessionId: '',
dialog: false,
onItemClick: null,
},

View File

@ -6,7 +6,7 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
dialog: boolean;
entity: string;
entityId: string;
entityDisplay: (data: EntityDict["session"]["Schema"][] | RowWithActions<EntityDict, "session">[]) => Array<any>;
entityDisplay: (data: EntityDict['session']['Schema'][] | RowWithActions<EntityDict, 'session'>[]) => any[];
entityProjection: any;
}>) => React.ReactElement;
export default _default;

View File

@ -102,7 +102,7 @@ export default OakComponent({
dialog: false,
entity: '',
entityId: '',
entityDisplay: (data) => [], // user端指示如何显示entity对象名称
entityDisplay: (data) => [],
entityProjection: null, // user端指示需要取哪些entity的属性来显示entityDisplay
},
filters: [

View File

@ -1,2 +1,3 @@
/// <reference types="wechat-miniprogram" />
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../../oak-app-domain").EntityDict, "subscription", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
export default _default;

View File

@ -1,2 +1,3 @@
/// <reference types="wechat-miniprogram" />
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "subscription", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
export default _default;

View File

@ -1,5 +1,5 @@
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, keyof import("../../../oak-app-domain").EntityDict, true, {
areaId: string | undefined | null;
areaId: string | null | undefined;
onCancel: (() => void) | undefined;
onConfirm: ((stationIds: string[]) => void) | undefined;
selectIds: string[] | undefined;

View File

@ -1,2 +1,3 @@
/// <reference types="wechat-miniprogram" />
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "system", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
export default _default;

View File

@ -1,2 +1,3 @@
/// <reference types="wechat-miniprogram" />
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "system", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
export default _default;

View File

@ -1,2 +1,3 @@
/// <reference types="wechat-miniprogram" />
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "system", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
export default _default;

View File

@ -1,2 +1,3 @@
/// <reference types="wechat-miniprogram" />
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../../oak-app-domain").EntityDict, keyof import("../../../../oak-app-domain").EntityDict, boolean, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
export default _default;

View File

@ -1,8 +1,9 @@
/// <reference types="react" />
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "token", true, {
onMyInfoClicked: () => void;
myInfoUrl: string;
manageUserUrl: string;
loginUrl: string;
Body: React.ReactNode | undefined;
Body: import("react").ReactNode;
}>) => React.ReactElement;
export default _default;

View File

@ -21,8 +21,8 @@ export default OakComponent({
},
properties: {
disabled: '',
url: '', // 登录系统之后要返回的页面
callback: undefined, // 登录成功回调,排除微信登录方式
url: '',
callback: undefined,
setLoginMode: (value) => undefined,
digit: 4, //验证码位数
},

View File

@ -17,16 +17,16 @@ export default OakComponent({
allowPassword: false,
allowWechatMp: false,
setLoginModeMp(value) { this.setLoginMode(value); },
smsDigit: 4, //短信验证码位数
emailDigit: 4, //邮箱验证码位数
smsDigit: 4,
emailDigit: 4,
pwdMode: 'all', //密码明文密文存储模式
},
properties: {
onlyCaptcha: false,
onlyPassword: false,
disabled: '',
redirectUri: '', // 微信登录后的redirectUri要指向wechatUser/login去处理
url: '', // 登录系统之后要返回的页面
redirectUri: '',
url: '',
callback: undefined, // 登录成功回调,排除微信登录方式
},
formData({ features, props }) {

View File

@ -19,12 +19,12 @@ export default OakComponent({
},
properties: {
disabled: '',
redirectUri: '', // 微信登录后的redirectUri要指向wechatUser/login去处理
url: '', // 登录系统之后要返回的页面
callback: undefined, // 登录成功回调,排除微信登录方式
redirectUri: '',
url: '',
callback: undefined,
allowSms: false,
allowEmail: false,
allowWechatMp: false, //小程序切换授权登录
allowWechatMp: false,
setLoginMode: (value) => undefined,
pwdMode: 'all', //密码明文密文存储模式
},

View File

@ -21,10 +21,10 @@ export default OakComponent({
},
properties: {
disabled: '',
url: '', // 登录系统之后要返回的页面
callback: undefined, // 登录成功回调,排除微信登录方式
allowPassword: false, //小程序切换密码登录
allowWechatMp: false, //小程序切换授权登录
url: '',
callback: undefined,
allowPassword: false,
allowWechatMp: false,
setLoginMode: (value) => undefined,
digit: 4 //验证码位数,
},

View File

@ -1,4 +1,4 @@
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../../oak-app-domain").EntityDict, keyof import("../../../../oak-app-domain").EntityDict, boolean, {
onVerified: undefined | (() => void);
onVerified: (() => void) | undefined;
}>) => React.ReactElement;
export default _default;

View File

@ -1,3 +1,4 @@
/// <reference types="react" />
import { WebComponentProps } from "oak-frontend-base";
import { EntityDict } from "../../../../oak-app-domain";
export default function Render(props: WebComponentProps<EntityDict, 'user', false, {

View File

@ -1,3 +1,4 @@
/// <reference types="react" />
import { WebComponentProps } from "oak-frontend-base";
import { EntityDict } from "../../../../oak-app-domain";
export default function Render(props: WebComponentProps<EntityDict, 'user', false, {

View File

@ -1,20 +1,20 @@
import { EntityDict } from '../../../oak-app-domain';
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "userEntityGrant", false, {
picker: ((props: {
disabled?: boolean;
disabled?: boolean | undefined;
entity: keyof EntityDict;
entityFilter: object;
relationIds: string[];
rule: EntityDict["userEntityGrant"]["OpSchema"]["rule"];
ruleOnRow: EntityDict["userEntityGrant"]["OpSchema"]["ruleOnRow"];
rule: EntityDict['userEntityGrant']['OpSchema']['rule'];
ruleOnRow: EntityDict['userEntityGrant']['OpSchema']['ruleOnRow'];
onPickRelations: (ids: string[]) => void;
onPickRows: (ids: string[]) => void;
pickedRowIds?: string[];
pickedRelationIds?: string[];
pickedRowIds?: string[] | undefined;
pickedRelationIds?: string[] | undefined;
oakPath: string;
}) => React.ReactElement) | undefined;
hideInfo: boolean;
hideTip: boolean;
afterClaim: ((ueg: EntityDict["userEntityGrant"]["OpSchema"]) => void) | undefined;
afterClaim: ((ueg: EntityDict['userEntityGrant']['OpSchema']) => void) | undefined;
}>) => React.ReactElement;
export default _default;

View File

@ -4,8 +4,8 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
entity: keyof EntityDict;
entityFilter: any;
relationIds: string[];
rule: EntityDict["userEntityGrant"]["OpSchema"]["rule"];
ruleOnRow: EntityDict["userEntityGrant"]["OpSchema"]["ruleOnRow"];
rule: "single" | "all" | "free";
ruleOnRow: "single" | "all" | "free";
onPickRelations: (ids: string[]) => void;
onPickRows: (ids: string[]) => void;
pickedRowIds: string[] | undefined;

View File

@ -17,7 +17,7 @@ export default OakComponent({
id: 1,
entity: 1,
entityId: 1,
type: 1, //类型
type: 1,
ticket: 1,
url: 1,
buffer: 1,

View File

@ -6,12 +6,12 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
relationEntity: string;
relationEntityFilter: any;
relationIds: string[];
type: EntityDict["userEntityGrant"]["Schema"]["type"];
redirectToAfterConfirm: EntityDict["userEntityGrant"]["Schema"]["redirectTo"];
type: "grant" | "transfer";
redirectToAfterConfirm: import("../../../oak-app-domain/UserEntityGrant/_baseSchema").RedirectToProps | null | undefined;
claimUrl: string;
qrCodeType: QrCodeType;
multiple: boolean;
rule: EntityDict["userEntityGrant"]["OpSchema"]["rule"];
ruleOnRow: EntityDict["userEntityGrant"]["OpSchema"]["ruleOnRow"];
rule: "single" | "all" | "free";
ruleOnRow: "single" | "all" | "free";
}>) => React.ReactElement;
export default _default;

View File

@ -4,9 +4,9 @@ import { EntityDict as BaseEntityDict } from 'oak-domain/lib/types/Entity';
declare const _default: <ED2 extends EntityDict & BaseEntityDict, T2 extends keyof ED2>(props: ReactComponentProps<ED2, T2, true, {
entity: keyof ED2;
entityId: string;
relations: EntityDict["relation"]["OpSchema"][];
passwordRequired?: boolean;
allowUpdateName?: boolean;
allowUpdateNickname?: boolean;
relations: EntityDict['relation']['OpSchema'][];
passwordRequired?: boolean | undefined;
allowUpdateName?: boolean | undefined;
allowUpdateNickname?: boolean | undefined;
}>) => React.ReactElement;
export default _default;

View File

@ -4,7 +4,7 @@ import { EntityDict as BaseEntityDict } from 'oak-domain/lib/types/Entity';
declare const _default: <ED2 extends EntityDict & BaseEntityDict, T2 extends keyof ED2>(props: ReactComponentProps<ED2, T2, true, {
entity: keyof ED2;
entityId: string;
allowUpdateName?: boolean;
allowUpdateNickname?: boolean;
allowUpdateName?: boolean | undefined;
allowUpdateNickname?: boolean | undefined;
}>) => React.ReactElement;
export default _default;

View File

@ -7,11 +7,11 @@ declare const _default: <ED2 extends EntityDict & BaseEntityDict, T2 extends key
entityId: string;
redirectToAfterConfirm: ED2["userEntityGrant"]["Schema"]["redirectTo"];
qrCodeType: QrCodeType;
type: EntityDict["userEntityGrant"]["Schema"]["type"];
relations: EntityDict["relation"]["OpSchema"][];
type: EntityDict['userEntityGrant']['Schema']['type'];
relations: EntityDict['relation']['OpSchema'][];
claimUrl: string;
multiple: boolean;
rule: EntityDict["userEntityGrant"]["Schema"]["rule"];
ruleOnRow: EntityDict["userEntityGrant"]["OpSchema"]["ruleOnRow"];
rule: EntityDict['userEntityGrant']['Schema']['rule'];
ruleOnRow: EntityDict['userEntityGrant']['OpSchema']['ruleOnRow'];
}>) => React.ReactElement;
export default _default;

View File

@ -7,8 +7,8 @@ declare const _default: <ED2 extends EntityDict & BaseEntityDict, T2 extends key
redirectToAfterConfirm: ED2["userEntityGrant"]["Schema"]["redirectTo"];
claimUrl: string;
qrCodeType: string;
passwordRequired?: boolean;
disabledMethods: Array<"email" | "mobile" | "userEntityGrant">;
mode: "byMobile" | "byUserEntityGrant" | "byEmail";
passwordRequired?: boolean | undefined;
disabledMethods: Array<'email' | 'mobile' | 'userEntityGrant'>;
mode: 'byMobile' | 'byUserEntityGrant' | 'byEmail';
}>) => React.ReactElement;
export default _default;

View File

@ -2,7 +2,7 @@ import { EntityDict } from '../../../../oak-app-domain';
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "user", false, {
entity: keyof EntityDict;
entityId: string;
relations: EntityDict["relation"]["OpSchema"][];
relations: import("../../../../oak-app-domain/Relation/_baseSchema").OpSchema[];
mobile: string;
setPasswordConfirm: (value: boolean) => void;
passwordRequired: boolean;

View File

@ -2,6 +2,6 @@ import { EntityDict } from '../../../../../oak-app-domain';
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "userRelation", true, {
entity: keyof EntityDict;
entityId: string;
relations: EntityDict["relation"]["OpSchema"][];
relations: import("../../../../../oak-app-domain/Relation/_baseSchema").OpSchema[];
}>) => React.ReactElement;
export default _default;

Some files were not shown because too many files have changed in this diff Show More