48 lines
1.4 KiB
TypeScript
48 lines
1.4 KiB
TypeScript
import React from 'react';
|
|
import { WebComponentProps } from 'oak-frontend-base';
|
|
import { EntityDict } from '../../oak-app-domain';
|
|
type RowItem = {
|
|
aId: string;
|
|
aName: string;
|
|
typeRecords: TypeRecord;
|
|
defaultOptions: {
|
|
label: string;
|
|
value: string;
|
|
}[];
|
|
defaultValue: string;
|
|
};
|
|
type TypeRecord = Record<string, {
|
|
render: 'switch' | 'select';
|
|
passportOptions?: PassportOption[];
|
|
checkedValue?: string;
|
|
pId?: string;
|
|
apId?: string;
|
|
checked?: boolean;
|
|
disabled: boolean;
|
|
disabledTip: string;
|
|
showPwd: boolean;
|
|
allowPwd?: boolean;
|
|
pwdDisabled?: boolean;
|
|
pwdDisabledTip?: string;
|
|
}>;
|
|
type PassportOption = {
|
|
label: string;
|
|
value: string;
|
|
apId: string;
|
|
disabled: boolean;
|
|
disabledTip?: string;
|
|
};
|
|
export default function render(props: WebComponentProps<EntityDict, 'applicationPassport', true, {
|
|
applicationPassports: EntityDict['applicationPassport']['OpSchema'][];
|
|
systemId: string;
|
|
applications: EntityDict['application']['Schema'][];
|
|
passports: EntityDict['passport']['Schema'][];
|
|
types: EntityDict['passport']['Schema']['type'][];
|
|
apArray: RowItem[];
|
|
}, {
|
|
onCheckedChange: (aId: string, pId: string, checked: boolean, apId?: string) => void;
|
|
checkLastOne: (aId: string, pId: string) => boolean;
|
|
onSelectChange: (aId: string, addPId?: string, removeApId?: string) => void;
|
|
}>): React.JSX.Element;
|
|
export {};
|